Skip to content

Commit 9ad75b3

Browse files
committed
Update tests.
1 parent 5262111 commit 9ad75b3

File tree

7 files changed

+15
-12
lines changed

7 files changed

+15
-12
lines changed

Diff for: tests/ui/boxed_local.rs

+1
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

Diff for: tests/ui/boxed_local.stderr

+2-2
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
| ^

Diff for: tests/ui/doc/doc-fixable.fixed

+1-1
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
}

Diff for: tests/ui/doc/doc-fixable.rs

+1-1
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
}

Diff for: tests/ui/missing_const_for_fn/could_be_const.fixed

+1
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

Diff for: tests/ui/missing_const_for_fn/could_be_const.rs

+1
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

Diff for: tests/ui/missing_const_for_fn/could_be_const.stderr

+8-8
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:152:9
225+
--> tests/ui/missing_const_for_fn/could_be_const.rs:153: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:169:9
236+
--> tests/ui/missing_const_for_fn/could_be_const.rs:170: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:174:9
249+
--> tests/ui/missing_const_for_fn/could_be_const.rs:175: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:185:9
262+
--> tests/ui/missing_const_for_fn/could_be_const.rs:186: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:204:5
276+
--> tests/ui/missing_const_for_fn/could_be_const.rs:205: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:208:5
287+
--> tests/ui/missing_const_for_fn/could_be_const.rs:209: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:210:5
298+
--> tests/ui/missing_const_for_fn/could_be_const.rs:211: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:212:5
309+
--> tests/ui/missing_const_for_fn/could_be_const.rs:213:5
310310
|
311311
LL | extern "system-unwind" fn system_unwind() {}
312312
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)