Skip to content

Commit f79ca80

Browse files
author
Ulrik Sverdrup
committed
Update testcases for illegal pointer casts
1 parent ca2ac60 commit f79ca80

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/compile-fail/issue-22034.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ fn main() {
1414
let foo: *mut libc::c_void;
1515
let cb: &mut Fn() = unsafe {
1616
&mut *(foo as *mut Fn())
17-
//~^ ERROR use of possibly uninitialized variable: `foo`
17+
//~^ ERROR illegal cast
1818
};
1919
}

src/test/compile-fail/issue-22289.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// except according to those terms.
1010

1111
fn main() {
12-
0 as &std::any::Any; //~ ERROR non-scalar cast: `i32` as `&core::any::Any`
12+
0 as &std::any::Any; //~ ERROR illegal cast
1313
}

0 commit comments

Comments
 (0)