fix compile-fail tests for latest rustc

This commit is contained in:
Ralf Jung 2019-07-16 18:39:18 +02:00
parent 4d76526415
commit 95e6e671bf
3 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
97b1128589fdaa786a7cf65c5a6ff7ed37a1d2f3
d36b7f69448f7390fa9dfde75d58b914365acdab

View File

@ -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)
}

View File

@ -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)
}