]> git.lizzy.rs Git - rust.git/blobdiff - tests/compile-fail/intptrcast_alignment_check.rs
Auto merge of #1308 - RalfJung:miri, r=RalfJung
[rust.git] / tests / compile-fail / intptrcast_alignment_check.rs
index fcf613ace462709f5495473013366306c19be948..1a8df5eacede810bc6b4871c527e6427c0b989ad 100644 (file)
@@ -7,6 +7,6 @@ fn main() {
     let base_addr = x as *mut _ as usize;
     let base_addr_aligned = if base_addr % 2 == 0 { base_addr } else { base_addr+1 };
     let u16_ptr = base_addr_aligned as *mut u16;
-    unsafe { *u16_ptr = 2; } //~ ERROR tried to access memory with alignment 1, but alignment 2 is required
+    unsafe { *u16_ptr = 2; } //~ ERROR memory with alignment 1, but alignment 2 is required
     println!("{:?}", x);
 }