fix compile-fail tests for latest rustc
This commit is contained in:
parent
4d76526415
commit
95e6e671bf
@ -1 +1 @@
|
||||
97b1128589fdaa786a7cf65c5a6ff7ed37a1d2f3
|
||||
d36b7f69448f7390fa9dfde75d58b914365acdab
|
||||
|
@ -1,5 +1,5 @@
|
||||
use std::mem;
|
||||
|
||||
fn main() {
|
||||
let _x: &i32 = unsafe { mem::transmute(16usize) }; //~ ERROR integer pointer in non-ZST reference
|
||||
let _x: &i32 = unsafe { mem::transmute(16usize) }; //~ ERROR dangling reference (created from integer)
|
||||
}
|
||||
|
@ -3,5 +3,5 @@ use std::mem;
|
||||
fn main() {
|
||||
let val = 14;
|
||||
let ptr = (&val as *const i32).wrapping_offset(1);
|
||||
let _x: &i32 = unsafe { mem::transmute(ptr) }; //~ ERROR encountered dangling (not entirely in bounds) reference
|
||||
let _x: &i32 = unsafe { mem::transmute(ptr) }; //~ ERROR dangling reference (not entirely in bounds)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user