mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 22:18:23 +03:00
adjust error messages
This commit is contained in:
@@ -4,5 +4,5 @@ pub enum Foo {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let _f = unsafe { std::mem::transmute::<i32, Foo>(42) }; //~ ERROR encountered 0x0000002a, but expected a valid enum tag
|
||||
let _f = unsafe { std::mem::transmute::<i32, Foo>(42) }; //~ ERROR encountered 0x0000002a at .<enum-tag>, but expected a valid enum tag
|
||||
}
|
||||
|
||||
@@ -266,5 +266,5 @@ union MyUninit {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let _a = unsafe { MyUninit { init: () }.uninit }; //~ ERROR encountered uninitialized bytes, but expected a valid enum tag
|
||||
let _a = unsafe { MyUninit { init: () }.uninit }; //~ ERROR encountered uninitialized bytes at .<enum-tag>, but expected a valid enum tag
|
||||
}
|
||||
|
||||
@@ -10,5 +10,5 @@ fn main() {
|
||||
let mut x = Bool::True;
|
||||
evil(&mut x);
|
||||
let _y = x; // reading this ought to be enough to trigger validation
|
||||
//~^ ERROR encountered 0x0000002c, but expected a valid enum tag
|
||||
//~^ ERROR encountered 0x0000002c at .<enum-tag>, but expected a valid enum tag
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user