about summary refs log tree commit diff
path: root/tests/ui/consts/const-eval/ub-int-array.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-04-05 19:19:56 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-04-30 10:44:24 +0300
commit20faf8532b5ddeb636ba3078344b0cad058c8f8a (patch)
tree04512e985a99a3715b4a0829826be7139fdcee09 /tests/ui/consts/const-eval/ub-int-array.rs
parent427288b3ce2d574847fdb41cc3184c893750e09a (diff)
downloadrust-20faf8532b5ddeb636ba3078344b0cad058c8f8a.tar.gz
rust-20faf8532b5ddeb636ba3078344b0cad058c8f8a.zip
compiletest: Make diagnostic kind mandatory on line annotations
Diffstat (limited to 'tests/ui/consts/const-eval/ub-int-array.rs')
-rw-r--r--tests/ui/consts/const-eval/ub-int-array.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/ui/consts/const-eval/ub-int-array.rs b/tests/ui/consts/const-eval/ub-int-array.rs
index cde0749dc5f..169ac7f1519 100644
--- a/tests/ui/consts/const-eval/ub-int-array.rs
+++ b/tests/ui/consts/const-eval/ub-int-array.rs
@@ -1,6 +1,8 @@
 //! Test the "array of int" fast path in validity checking, and in particular whether it
 //! points at the right array element.
 
+//@ dont-require-annotations: NOTE
+
 use std::mem;
 
 #[repr(C)]
@@ -17,7 +19,7 @@ impl<T: Copy> MaybeUninit<T> {
 
 const UNINIT_INT_0: [u32; 3] = unsafe {
     //~^ ERROR it is undefined behavior to use this value
-    //~| invalid value at [0]
+    //~| NOTE invalid value at [0]
     mem::transmute([
         MaybeUninit { uninit: () },
         // Constants chosen to achieve endianness-independent hex dump.
@@ -27,7 +29,7 @@ const UNINIT_INT_0: [u32; 3] = unsafe {
 };
 const UNINIT_INT_1: [u32; 3] = unsafe {
     //~^ ERROR it is undefined behavior to use this value
-    //~| invalid value at [1]
+    //~| NOTE invalid value at [1]
     mem::transmute([
         MaybeUninit::new(0u8),
         MaybeUninit::new(0u8),
@@ -45,7 +47,7 @@ const UNINIT_INT_1: [u32; 3] = unsafe {
 };
 const UNINIT_INT_2: [u32; 3] = unsafe {
     //~^ ERROR it is undefined behavior to use this value
-    //~| invalid value at [2]
+    //~| NOTE invalid value at [2]
     mem::transmute([
         MaybeUninit::new(0u8),
         MaybeUninit::new(0u8),