about summary refs log tree commit diff
path: root/tests/ui/mir/enum/with_niche_int_break.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/mir/enum/with_niche_int_break.rs')
-rw-r--r--tests/ui/mir/enum/with_niche_int_break.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/mir/enum/with_niche_int_break.rs b/tests/ui/mir/enum/with_niche_int_break.rs
index 0ec60a33564..6a97eaa8f4f 100644
--- a/tests/ui/mir/enum/with_niche_int_break.rs
+++ b/tests/ui/mir/enum/with_niche_int_break.rs
@@ -1,6 +1,6 @@
 //@ run-fail
 //@ compile-flags: -C debug-assertions
-//@ error-pattern: trying to construct an enum from an invalid value 0x4
+//@ error-pattern: trying to construct an enum from an invalid value
 
 #[allow(dead_code)]
 #[repr(u16)]
@@ -17,5 +17,5 @@ enum Nested {
 }
 
 fn main() {
-    let _val: Nested = unsafe { std::mem::transmute::<u32, Nested>(4) };
+    let _val: Nested = unsafe { std::mem::transmute::<u32, Nested>(u32::MAX) };
 }