Skip to content

Commit 49051e0

Browse files
committed
rustup, and some final message adjustments
1 parent e1e158e commit 49051e0

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
660326e9791d5caf3186b14521498c2584a494ab
1+
57e1da59cd0761330b4ea8d47b16340a78eeafa9

tests/compile-fail/cast_fn_ptr1.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
fn main() {
2-
fn f() {}
2+
fn f() {} //~ ERROR calling a function with more arguments than it expected
33

44
let g = unsafe {
55
std::mem::transmute::<fn(), fn(i32)>(f)
66
};
77

8-
g(42) //~ ERROR calling a function with more arguments than it expected
8+
g(42)
99
}

tests/compile-fail/cast_fn_ptr5.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
fn main() {
2-
fn f() -> u32 { 42 }
2+
fn f() -> u32 { 42 } //~ ERROR calling a function with return type u32 passing return place of type ()
33

44
let g = unsafe {
55
std::mem::transmute::<fn() -> u32, fn()>(f)
66
};
77

8-
g() //~ ERROR calling a function with return type u32 passing return place of type ()
8+
g()
99
}

tests/compile-fail/pointer_byte_read.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ fn main() {
33
let y = &x;
44
let z = &y as *const &i32 as *const u8;
55
// the deref fails, because we are reading only a part of the pointer
6-
let _val = unsafe { *z }; //~ ERROR unable to turn this pointer into raw bytes
6+
let _val = unsafe { *z }; //~ ERROR unable to turn pointer into raw bytes
77
}

tests/compile-fail/reading_half_a_pointer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ fn main() {
2424
// starts 1 byte to the right, so using it would actually be wrong!
2525
let d_alias = &mut w.data as *mut _ as *mut *const u8;
2626
unsafe {
27-
let _x = *d_alias; //~ ERROR unable to turn this pointer into raw bytes
27+
let _x = *d_alias; //~ ERROR unable to turn pointer into raw bytes
2828
}
2929
}

tests/compile-fail/transmute_fat1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ fn main() {
1010
let bad = unsafe {
1111
std::mem::transmute::<&[u8], [u8; 8]>(&[1u8])
1212
};
13-
let _val = bad[0] + bad[bad.len()-1]; //~ ERROR unable to turn this pointer into raw bytes
13+
let _val = bad[0] + bad[bad.len()-1]; //~ ERROR unable to turn pointer into raw bytes
1414
}

0 commit comments

Comments
 (0)