about summary refs log tree commit diff
path: root/tests/ui/statics/mutable_memory_validation.rs
diff options
context:
space:
mode:
authorOli Scherer <github333195615777966@oli-obk.de>2025-05-28 10:29:08 +0000
committerOli Scherer <github333195615777966@oli-obk.de>2025-06-02 15:37:15 +0000
commitb331b8b96d86a6433df957a3cc49ed51f3656135 (patch)
tree72e20ae9fa73a475719589593a790156181e4e24 /tests/ui/statics/mutable_memory_validation.rs
parente6152cdf5b31bd844a4cc1049433859d54863602 (diff)
downloadrust-b331b8b96d86a6433df957a3cc49ed51f3656135.tar.gz
rust-b331b8b96d86a6433df957a3cc49ed51f3656135.zip
Use the informative error as the main const eval error message
Diffstat (limited to 'tests/ui/statics/mutable_memory_validation.rs')
-rw-r--r--tests/ui/statics/mutable_memory_validation.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/statics/mutable_memory_validation.rs b/tests/ui/statics/mutable_memory_validation.rs
index 3bb572d38bc..033c2bc2839 100644
--- a/tests/ui/statics/mutable_memory_validation.rs
+++ b/tests/ui/statics/mutable_memory_validation.rs
@@ -11,7 +11,7 @@ struct Meh {
 }
 
 const MUH: Meh = Meh { x: unsafe { &mut *(&READONLY as *const _ as *mut _) } };
-//~^ ERROR: it is undefined behavior to use this value
+//~^ ERROR: invalid value at .x.<deref>: encountered `UnsafeCell` in read-only memory
 
 static READONLY: i32 = 0;