Skip to content

Commit c30c67b

Browse files
committed
Update tests.
1 parent 13c23fc commit c30c67b

5 files changed

+11
-14
lines changed

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ 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
87
= note: requested on the command line with `-F missing-abi`
98

109
error: aborting due to 1 previous error

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ 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
87
= note: requested on the command line with `--force-warn missing-abi`
98

109
warning: 1 warning emitted

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ 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
87
= note: requested on the command line with `-D missing-abi`
98

109
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)