Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Oct 30, 2024
1 parent 66df93c commit 77183cf
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 14 deletions.
5 changes: 3 additions & 2 deletions tests/ui/lint/cli-lint-override.forbid_warn.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ error: extern declarations without an explicit ABI are deprecated
--> $DIR/cli-lint-override.rs:12:1
|
LL | extern fn foo() {}
| ^^^^^^^^^^^^^^^ ABI should be specified here
| ^^^^^^ help: explicitly specify the C ABI: `extern "C"`
|
= help: the default ABI is C
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024!
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/explicit-abi.html>
= note: requested on the command line with `-F missing-abi`

error: aborting due to 1 previous error
Expand Down
5 changes: 3 additions & 2 deletions tests/ui/lint/cli-lint-override.force_warn_deny.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ warning: extern declarations without an explicit ABI are deprecated
--> $DIR/cli-lint-override.rs:12:1
|
LL | extern fn foo() {}
| ^^^^^^^^^^^^^^^ ABI should be specified here
| ^^^^^^ help: explicitly specify the C ABI: `extern "C"`
|
= help: the default ABI is C
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024!
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/explicit-abi.html>
= note: requested on the command line with `--force-warn missing-abi`

warning: 1 warning emitted
Expand Down
1 change: 1 addition & 0 deletions tests/ui/lint/cli-lint-override.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ extern fn foo() {}
//[warn_deny]~^ ERROR extern declarations without an explicit ABI are deprecated
//[forbid_warn]~^^ ERROR extern declarations without an explicit ABI are deprecated
//[force_warn_deny]~^^^ WARN extern declarations without an explicit ABI are deprecated
//~^^^^ WARN edition

fn main() {}
5 changes: 3 additions & 2 deletions tests/ui/lint/cli-lint-override.warn_deny.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ error: extern declarations without an explicit ABI are deprecated
--> $DIR/cli-lint-override.rs:12:1
|
LL | extern fn foo() {}
| ^^^^^^^^^^^^^^^ ABI should be specified here
| ^^^^^^ help: explicitly specify the C ABI: `extern "C"`
|
= help: the default ABI is C
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024!
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/explicit-abi.html>
= note: requested on the command line with `-D missing-abi`

error: aborting due to 1 previous error
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/unpretty/expanded-exhaustive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,15 +452,15 @@ mod items {
/// ItemKind::Fn
mod item_fn {
pub const unsafe extern "C" fn f() {}
pub async unsafe extern fn g() {}
pub async unsafe extern "C" fn g() {}
fn h<'a, T>() where T: 'a {}

trait TraitItems {
unsafe extern fn f();
unsafe extern "C" fn f();
}

impl TraitItems for _ {
default unsafe extern fn f() {}
default unsafe extern "C" fn f() {}
}
}

Expand All @@ -472,7 +472,7 @@ mod items {
/// ItemKind::ForeignMod
mod item_foreign_mod {
unsafe extern "C++" {}
unsafe extern {}
unsafe extern "C" {}
}

/// ItemKind::GlobalAsm
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/unpretty/expanded-exhaustive.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -433,21 +433,21 @@ mod items {
/// ItemKind::Fn
mod item_fn {
pub const unsafe extern "C" fn f() {}
pub async unsafe extern fn g() {}
pub async unsafe extern "C" fn g() {}
fn h<'a, T>() where T: 'a {}
trait TraitItems {
unsafe extern fn f();
unsafe extern "C" fn f();
}
impl TraitItems for _ {
default unsafe extern fn f() {}
default unsafe extern "C" fn f() {}
}
}
/// ItemKind::Mod
mod item_mod { }
/// ItemKind::ForeignMod
mod item_foreign_mod {
unsafe extern "C++" {}
unsafe extern {}
unsafe extern "C" {}
}
/// ItemKind::GlobalAsm
mod item_global_asm {
Expand Down

0 comments on commit 77183cf

Please sign in to comment.