Update tests for extern block linting

This commit is contained in:
Mark Rousskov 2020-09-01 17:12:52 -04:00
parent c4a8d7f86a
commit 8a3edb1d66
285 changed files with 1010 additions and 947 deletions

View file

@ -8,7 +8,7 @@ static _X: usize = 0;
fn _foo() {}
struct _Y {
_z: usize
_z: usize,
}
enum _Z {}
@ -23,7 +23,7 @@ mod _bar {
fn _qux() {}
}
extern {
extern "C" {
#[link_name = "abort"]
fn _abort() -> !;
}

View file

@ -7,7 +7,7 @@
pub use extern_foo as x;
extern {
extern "C" {
pub fn extern_foo();
}
@ -47,7 +47,7 @@ mod blah {
// `malloc` below, which are also used.
enum c_void {}
extern {
extern "C" {
fn free(p: *const c_void);
fn malloc(size: usize) -> *const c_void;
}
@ -58,7 +58,7 @@ mod blah {
}
enum c_void {} //~ ERROR: enum is never used
extern {
extern "C" {
fn free(p: *const c_void); //~ ERROR: function is never used
}