Skip to content

Commit 73f258c

Browse files
committed
Replace error-pattern with annotation; remove unreachable line
1 parent ae9796b commit 73f258c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tests/compile-fail/shim_arg_size.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#![feature(rustc_private)]
22

3-
extern crate libc;
4-
5-
// error-pattern: scalar size mismatch
63
fn main() {
74
extern "C" {
85
// Use the wrong type(ie. not the pointer width) for the `size`
@@ -15,7 +12,6 @@ fn main() {
1512
}
1613

1714
unsafe {
18-
let p1 = malloc(42);
19-
libc::free(p1);
15+
let _p1 = malloc(42); //~ ERROR Undefined Behavior: scalar size mismatch
2016
};
2117
}

0 commit comments

Comments
 (0)