Skip to content

Commit 62461c2

Browse files
committed
Update tests.
1 parent ca2ab07 commit 62461c2

File tree

59 files changed

+194
-139
lines changed

Some content is hidden

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

59 files changed

+194
-139
lines changed

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
@@ -239,7 +239,7 @@ fn parenthesized_word() {}
239239
/// UXes
240240
fn plural_acronym_test() {}
241241

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

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

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

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

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
@@ -150,6 +150,7 @@ mod msrv {
150150
//~^ ERROR: this could be a `const fn`
151151

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

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
@@ -150,6 +150,7 @@ mod msrv {
150150
//~^ ERROR: this could be a `const fn`
151151

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

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ LL | const extern "C" fn c() {}
222222
| +++++
223223

224224
error: this could be a `const fn`
225-
--> tests/ui/missing_const_for_fn/could_be_const.rs:153:9
225+
--> tests/ui/missing_const_for_fn/could_be_const.rs:154:9
226226
|
227227
LL | extern fn implicit_c() {}
228228
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -233,7 +233,7 @@ LL | const extern fn implicit_c() {}
233233
| +++++
234234

235235
error: this could be a `const fn`
236-
--> tests/ui/missing_const_for_fn/could_be_const.rs:170:9
236+
--> tests/ui/missing_const_for_fn/could_be_const.rs:171:9
237237
|
238238
LL | / pub fn new(strings: Vec<String>) -> Self {
239239
LL | | Self { strings }
@@ -246,7 +246,7 @@ LL | pub const fn new(strings: Vec<String>) -> Self {
246246
| +++++
247247

248248
error: this could be a `const fn`
249-
--> tests/ui/missing_const_for_fn/could_be_const.rs:175:9
249+
--> tests/ui/missing_const_for_fn/could_be_const.rs:176:9
250250
|
251251
LL | / pub fn empty() -> Self {
252252
LL | | Self { strings: Vec::new() }
@@ -259,7 +259,7 @@ LL | pub const fn empty() -> Self {
259259
| +++++
260260

261261
error: this could be a `const fn`
262-
--> tests/ui/missing_const_for_fn/could_be_const.rs:186:9
262+
--> tests/ui/missing_const_for_fn/could_be_const.rs:187:9
263263
|
264264
LL | / pub fn new(text: String) -> Self {
265265
LL | | let vec = Vec::new();
@@ -273,7 +273,7 @@ LL | pub const fn new(text: String) -> Self {
273273
| +++++
274274

275275
error: this could be a `const fn`
276-
--> tests/ui/missing_const_for_fn/could_be_const.rs:205:5
276+
--> tests/ui/missing_const_for_fn/could_be_const.rs:206:5
277277
|
278278
LL | fn alias_ty_is_projection(bar: <() as FooTrait>::Foo) {}
279279
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -284,7 +284,7 @@ LL | const fn alias_ty_is_projection(bar: <() as FooTrait>::Foo) {}
284284
| +++++
285285

286286
error: this could be a `const fn`
287-
--> tests/ui/missing_const_for_fn/could_be_const.rs:209:5
287+
--> tests/ui/missing_const_for_fn/could_be_const.rs:210:5
288288
|
289289
LL | extern "C-unwind" fn c_unwind() {}
290290
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -295,7 +295,7 @@ LL | const extern "C-unwind" fn c_unwind() {}
295295
| +++++
296296

297297
error: this could be a `const fn`
298-
--> tests/ui/missing_const_for_fn/could_be_const.rs:211:5
298+
--> tests/ui/missing_const_for_fn/could_be_const.rs:212:5
299299
|
300300
LL | extern "system" fn system() {}
301301
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -306,7 +306,7 @@ LL | const extern "system" fn system() {}
306306
| +++++
307307

308308
error: this could be a `const fn`
309-
--> tests/ui/missing_const_for_fn/could_be_const.rs:213:5
309+
--> tests/ui/missing_const_for_fn/could_be_const.rs:214:5
310310
|
311311
LL | extern "system-unwind" fn system_unwind() {}
312312
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -317,7 +317,7 @@ LL | const extern "system-unwind" fn system_unwind() {}
317317
| +++++
318318

319319
error: this could be a `const fn`
320-
--> tests/ui/missing_const_for_fn/could_be_const.rs:215:5
320+
--> tests/ui/missing_const_for_fn/could_be_const.rs:216:5
321321
|
322322
LL | pub extern "vectorcall" fn std_call() {}
323323
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -328,7 +328,7 @@ LL | pub const extern "vectorcall" fn std_call() {}
328328
| +++++
329329

330330
error: this could be a `const fn`
331-
--> tests/ui/missing_const_for_fn/could_be_const.rs:217:5
331+
--> tests/ui/missing_const_for_fn/could_be_const.rs:218:5
332332
|
333333
LL | pub extern "vectorcall-unwind" fn std_call_unwind() {}
334334
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/associated-types/issue-91231.rs

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

6-
extern {
6+
extern "C" {
77
type Extern;
88
}
99

tests/ui/attributes/key-value-expansion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ bug!();
3939
macro_rules! doc_comment {
4040
($x:expr) => {
4141
#[doc = $x]
42-
extern {}
42+
extern "C" {}
4343
};
4444
}
4545

tests/ui/borrowck/issue-92157.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#[cfg(target_os = "linux")]
77
#[link(name = "c")]
8-
extern {}
8+
extern "C" {}
99

1010
#[lang = "start"]
1111
fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {

0 commit comments

Comments
 (0)