Skip to content

Commit 77183cf

Browse files
committed
Update tests.
1 parent 66df93c commit 77183cf

6 files changed

+18
-14
lines changed

tests/ui/lint/cli-lint-override.forbid_warn.stderr

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ error: extern declarations without an explicit ABI are deprecated
22
--> $DIR/cli-lint-override.rs:12:1
33
|
44
LL | extern fn foo() {}
5-
| ^^^^^^^^^^^^^^^ ABI should be specified here
5+
| ^^^^^^ help: explicitly specify the C ABI: `extern "C"`
66
|
7-
= help: the default ABI is C
7+
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024!
8+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/explicit-abi.html>
89
= note: requested on the command line with `-F missing-abi`
910

1011
error: aborting due to 1 previous error

tests/ui/lint/cli-lint-override.force_warn_deny.stderr

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ warning: extern declarations without an explicit ABI are deprecated
22
--> $DIR/cli-lint-override.rs:12:1
33
|
44
LL | extern fn foo() {}
5-
| ^^^^^^^^^^^^^^^ ABI should be specified here
5+
| ^^^^^^ help: explicitly specify the C ABI: `extern "C"`
66
|
7-
= help: the default ABI is C
7+
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2024!
8+
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/explicit-abi.html>
89
= note: requested on the command line with `--force-warn missing-abi`
910

1011
warning: 1 warning emitted

tests/ui/lint/cli-lint-override.rs

+1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ extern fn foo() {}
1313
//[warn_deny]~^ ERROR extern declarations without an explicit ABI are deprecated
1414
//[forbid_warn]~^^ ERROR extern declarations without an explicit ABI are deprecated
1515
//[force_warn_deny]~^^^ WARN extern declarations without an explicit ABI are deprecated
16+
//~^^^^ WARN edition
1617

1718
fn main() {}

tests/ui/lint/cli-lint-override.warn_deny.stderr

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

1011
error: aborting due to 1 previous error

tests/ui/unpretty/expanded-exhaustive.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -452,15 +452,15 @@ mod items {
452452
/// ItemKind::Fn
453453
mod item_fn {
454454
pub const unsafe extern "C" fn f() {}
455-
pub async unsafe extern fn g() {}
455+
pub async unsafe extern "C" fn g() {}
456456
fn h<'a, T>() where T: 'a {}
457457

458458
trait TraitItems {
459-
unsafe extern fn f();
459+
unsafe extern "C" fn f();
460460
}
461461

462462
impl TraitItems for _ {
463-
default unsafe extern fn f() {}
463+
default unsafe extern "C" fn f() {}
464464
}
465465
}
466466

@@ -472,7 +472,7 @@ mod items {
472472
/// ItemKind::ForeignMod
473473
mod item_foreign_mod {
474474
unsafe extern "C++" {}
475-
unsafe extern {}
475+
unsafe extern "C" {}
476476
}
477477

478478
/// ItemKind::GlobalAsm

tests/ui/unpretty/expanded-exhaustive.stdout

+4-4
Original file line numberDiff line numberDiff line change
@@ -433,21 +433,21 @@ mod items {
433433
/// ItemKind::Fn
434434
mod item_fn {
435435
pub const unsafe extern "C" fn f() {}
436-
pub async unsafe extern fn g() {}
436+
pub async unsafe extern "C" fn g() {}
437437
fn h<'a, T>() where T: 'a {}
438438
trait TraitItems {
439-
unsafe extern fn f();
439+
unsafe extern "C" fn f();
440440
}
441441
impl TraitItems for _ {
442-
default unsafe extern fn f() {}
442+
default unsafe extern "C" fn f() {}
443443
}
444444
}
445445
/// ItemKind::Mod
446446
mod item_mod { }
447447
/// ItemKind::ForeignMod
448448
mod item_foreign_mod {
449449
unsafe extern "C++" {}
450-
unsafe extern {}
450+
unsafe extern "C" {}
451451
}
452452
/// ItemKind::GlobalAsm
453453
mod item_global_asm {

0 commit comments

Comments
 (0)