diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2020-09-01 17:12:52 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-01-13 07:49:16 -0500 |
| commit | 8a3edb1d661ed5ce685bd5dcfa600b6e02897b86 (patch) | |
| tree | 5615826fc30a674b49dcc89fc09ff84a1fced008 /src/test/ui/error-codes | |
| parent | c4a8d7f86a5d54a2f3b3875e703d06acd12ae7cc (diff) | |
| download | rust-8a3edb1d661ed5ce685bd5dcfa600b6e02897b86.tar.gz rust-8a3edb1d661ed5ce685bd5dcfa600b6e02897b86.zip | |
Update tests for extern block linting
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0044.rs | 11 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0130.rs | 7 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0454.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0454.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0458.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0458.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0459.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0459.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0617.rs | 2 |
9 files changed, 17 insertions, 19 deletions
diff --git a/src/test/ui/error-codes/E0044.rs b/src/test/ui/error-codes/E0044.rs index 9eee9c31d3c..d9cdaf83c69 100644 --- a/src/test/ui/error-codes/E0044.rs +++ b/src/test/ui/error-codes/E0044.rs @@ -1,9 +1,8 @@ -extern { +extern "C" { fn sqrt<T>(f: T) -> T; - //~^ ERROR foreign items may not have type parameters [E0044] - //~| HELP replace the type parameters with concrete types - //~| NOTE can't have type parameters +//~^ ERROR foreign items may not have type parameters [E0044] +//~| HELP replace the type parameters with concrete types +//~| NOTE can't have type parameters } -fn main() { -} +fn main() {} diff --git a/src/test/ui/error-codes/E0130.rs b/src/test/ui/error-codes/E0130.rs index 1ac546b9dbe..d523507899f 100644 --- a/src/test/ui/error-codes/E0130.rs +++ b/src/test/ui/error-codes/E0130.rs @@ -1,7 +1,6 @@ -extern { +extern "C" { fn foo((a, b): (u32, u32)); - //~^ ERROR E0130 +//~^ ERROR E0130 } -fn main() { -} +fn main() {} diff --git a/src/test/ui/error-codes/E0454.rs b/src/test/ui/error-codes/E0454.rs index d62210c3f94..ff5478382cc 100644 --- a/src/test/ui/error-codes/E0454.rs +++ b/src/test/ui/error-codes/E0454.rs @@ -1,4 +1,4 @@ -#[link(name = "")] extern {} +#[link(name = "")] extern "C" {} //~^ ERROR E0454 fn main() { diff --git a/src/test/ui/error-codes/E0454.stderr b/src/test/ui/error-codes/E0454.stderr index 499162694e5..6b62bef112f 100644 --- a/src/test/ui/error-codes/E0454.stderr +++ b/src/test/ui/error-codes/E0454.stderr @@ -1,7 +1,7 @@ error[E0454]: `#[link(name = "")]` given with empty name --> $DIR/E0454.rs:1:1 | -LL | #[link(name = "")] extern {} +LL | #[link(name = "")] extern "C" {} | ^^^^^^^^^^^^^^^^^^ empty name given error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0458.rs b/src/test/ui/error-codes/E0458.rs index 3d230358721..35e7e84d479 100644 --- a/src/test/ui/error-codes/E0458.rs +++ b/src/test/ui/error-codes/E0458.rs @@ -1,5 +1,5 @@ -#[link(kind = "wonderful_unicorn")] extern {} //~ ERROR E0458 - //~| ERROR E0459 +#[link(kind = "wonderful_unicorn")] extern "C" {} //~ ERROR E0458 + //~| ERROR E0459 fn main() { } diff --git a/src/test/ui/error-codes/E0458.stderr b/src/test/ui/error-codes/E0458.stderr index 51f7764aaf2..0f2fec029e7 100644 --- a/src/test/ui/error-codes/E0458.stderr +++ b/src/test/ui/error-codes/E0458.stderr @@ -1,7 +1,7 @@ error[E0458]: unknown kind: `wonderful_unicorn` --> $DIR/E0458.rs:1:8 | -LL | #[link(kind = "wonderful_unicorn")] extern {} +LL | #[link(kind = "wonderful_unicorn")] extern "C" {} | -------^^^^^^^^^^^^^^^^^^^^^^^^^^-- | | | unknown kind @@ -9,7 +9,7 @@ LL | #[link(kind = "wonderful_unicorn")] extern {} error[E0459]: `#[link(...)]` specified without `name = "foo"` --> $DIR/E0458.rs:1:1 | -LL | #[link(kind = "wonderful_unicorn")] extern {} +LL | #[link(kind = "wonderful_unicorn")] extern "C" {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0459.rs b/src/test/ui/error-codes/E0459.rs index 80a2fd35151..c56d8f0a8a8 100644 --- a/src/test/ui/error-codes/E0459.rs +++ b/src/test/ui/error-codes/E0459.rs @@ -1,4 +1,4 @@ -#[link(kind = "dylib")] extern {} //~ ERROR E0459 +#[link(kind = "dylib")] extern "C" {} //~ ERROR E0459 fn main() { } diff --git a/src/test/ui/error-codes/E0459.stderr b/src/test/ui/error-codes/E0459.stderr index c618fea9afc..4e0d51e8753 100644 --- a/src/test/ui/error-codes/E0459.stderr +++ b/src/test/ui/error-codes/E0459.stderr @@ -1,7 +1,7 @@ error[E0459]: `#[link(...)]` specified without `name = "foo"` --> $DIR/E0459.rs:1:1 | -LL | #[link(kind = "dylib")] extern {} +LL | #[link(kind = "dylib")] extern "C" {} | ^^^^^^^^^^^^^^^^^^^^^^^ missing `name` argument error: aborting due to previous error diff --git a/src/test/ui/error-codes/E0617.rs b/src/test/ui/error-codes/E0617.rs index c832e09ac11..b71ba0ed88b 100644 --- a/src/test/ui/error-codes/E0617.rs +++ b/src/test/ui/error-codes/E0617.rs @@ -1,4 +1,4 @@ -extern { +extern "C" { fn printf(c: *const i8, ...); } |
