Skip to content

Commit 585c976

Browse files
committed
Update tests.
1 parent e7bd340 commit 585c976

File tree

63 files changed

+197
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+197
-142
lines changed

compiler/rustc_codegen_gcc/example/mini_core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ impl<T> Index<usize> for [T] {
681681
}
682682
}
683683

684-
extern {
684+
extern "C" {
685685
type VaListImpl;
686686
}
687687

compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,13 @@ fn main() {
258258

259259
assert_eq!(((|()| 42u8) as fn(()) -> u8)(()), 42);
260260

261-
extern {
261+
extern "C" {
262262
#[linkage = "weak"]
263263
static ABC: *const u8;
264264
}
265265

266266
{
267-
extern {
267+
extern "C" {
268268
#[linkage = "weak"]
269269
static ABC: *const u8;
270270
}

compiler/rustc_codegen_gcc/example/mod_bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#![allow(internal_features)]
44

55
#[link(name = "c")]
6-
extern {}
6+
extern "C" {}
77

88
#[panic_handler]
99
fn panic_handler(_: &core::panic::PanicInfo<'_>) -> ! {

compiler/rustc_codegen_gcc/example/std_example.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::arch::x86_64::*;
77
use std::io::Write;
88
use std::ops::Coroutine;
99

10-
extern {
10+
extern "C" {
1111
pub fn printf(format: *const i8, ...) -> i32;
1212
}
1313

src/tools/clippy/tests/ui/boxed_local.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ mod issue_3739 {
173173
/// This shouldn't warn for `boxed_local` as it is intended to called from non-Rust code.
174174
pub extern "C" fn do_not_warn_me(_c_pointer: Box<String>) -> () {}
175175

176+
#[allow(missing_abi)]
176177
#[rustfmt::skip] // Forces rustfmt to not add ABI
177178
pub extern fn do_not_warn_me_no_abi(_c_pointer: Box<String>) -> () {}
178179

src/tools/clippy/tests/ui/boxed_local.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ LL | pub fn new(_needs_name: Box<PeekableSeekable<&()>>) -> () {}
1414
| ^^^^^^^^^^^
1515

1616
error: local variable doesn't need to be boxed here
17-
--> tests/ui/boxed_local.rs:188:44
17+
--> tests/ui/boxed_local.rs:189:44
1818
|
1919
LL | fn default_impl_x(self: Box<Self>, x: Box<u32>) -> u32 {
2020
| ^
2121

2222
error: local variable doesn't need to be boxed here
23-
--> tests/ui/boxed_local.rs:196:16
23+
--> tests/ui/boxed_local.rs:197:16
2424
|
2525
LL | fn foo(x: Box<u32>) {}
2626
| ^

src/tools/clippy/tests/ui/doc/doc-fixable.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ fn parenthesized_word() {}
240240
/// UXes
241241
fn plural_acronym_test() {}
242242

243-
extern {
243+
extern "C" {
244244
/// `foo()`
245245
fn in_extern();
246246
}

src/tools/clippy/tests/ui/doc/doc-fixable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ fn parenthesized_word() {}
240240
/// UXes
241241
fn plural_acronym_test() {}
242242

243-
extern {
243+
extern "C" {
244244
/// foo()
245245
fn in_extern();
246246
}

src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ mod msrv {
149149
//~^ ERROR: this could be a `const fn`
150150

151151
#[rustfmt::skip]
152+
#[allow(missing_abi)]
152153
const extern fn implicit_c() {}
153154
//~^ ERROR: this could be a `const fn`
154155

src/tools/clippy/tests/ui/missing_const_for_fn/could_be_const.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ mod msrv {
149149
//~^ ERROR: this could be a `const fn`
150150

151151
#[rustfmt::skip]
152+
#[allow(missing_abi)]
152153
extern fn implicit_c() {}
153154
//~^ ERROR: this could be a `const fn`
154155

0 commit comments

Comments
 (0)