bump Rust, fix error messages

This commit is contained in:
Ralf Jung 2019-12-08 01:45:41 +01:00
parent 74c3ea5935
commit cefc592273
6 changed files with 6 additions and 6 deletions

View file

@ -1 +1 @@
6d77e45f01079fe3d40180b3e256e414ab379f63
5c5c8eb864e56ce905742b8e97df5506bba6aeef

View file

@ -6,7 +6,7 @@
fn main() {
let y = &5;
let x: ! = unsafe {
*(y as *const _ as *const !) //~ ERROR entered unreachable code
*(y as *const _ as *const !) //~ ERROR entering unreachable code
};
f(x)
}

View file

@ -5,6 +5,6 @@ struct Human;
fn main() {
let _x: ! = unsafe {
std::mem::transmute::<Human, !>(Human) //~ ERROR entered unreachable code
std::mem::transmute::<Human, !>(Human) //~ ERROR entering unreachable code
};
}

View file

@ -6,7 +6,7 @@
enum Void {}
fn f(v: Void) -> ! {
match v {} //~ ERROR entered unreachable code
match v {} //~ ERROR entering unreachable code
}
fn main() {

View file

@ -1,4 +1,4 @@
// error-pattern: attempt to add with overflow
// error-pattern: overflowing in-bounds pointer arithmetic
fn main() {
let v = [0i8; 4];
let x = &v as *const i8;

View file

@ -1,4 +1,4 @@
//error-pattern: attempt to add with overflow
//error-pattern: overflowing in-bounds pointer arithmetic
fn main() {
let v = [1i8, 2];
let x = &v[1] as *const i8;