mirror of https://github.com/rust-lang/rust.git
Add unsafe extern blocks failing tests
This commit is contained in:
parent
30ea1a2693
commit
68b0b86c5b
|
@ -0,0 +1,12 @@
|
|||
extern "C" {
|
||||
static TEST1: i32;
|
||||
fn test1(i: i32);
|
||||
}
|
||||
|
||||
unsafe extern "C" {
|
||||
//~^ ERROR: extern block cannot be declared unsafe
|
||||
static TEST2: i32;
|
||||
fn test2(i: i32);
|
||||
}
|
||||
|
||||
fn main() {}
|
|
@ -0,0 +1,8 @@
|
|||
error: extern block cannot be declared unsafe
|
||||
--> $DIR/extern-items.rs:6:1
|
||||
|
|
||||
LL | unsafe extern "C" {
|
||||
| ^^^^^^
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
Loading…
Reference in New Issue