Skip to content

Commit 5ce6fba

Browse files
committed
Bless rest tests
1 parent 5aaf45e commit 5ce6fba

52 files changed

Lines changed: 406 additions & 805 deletions

Some content is hidden

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

src/tools/clippy/tests/ui/unnecessary_self_imports.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(clippy::unnecessary_self_imports)]
2-
#![allow(unused_imports, dead_code)]
2+
#![allow(unused_imports, dead_code, redundant_self)]
33

44
use std::collections::hash_map::{self, *};
55
use std::fs as alias;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(clippy::unnecessary_self_imports)]
2-
#![allow(unused_imports, dead_code)]
2+
#![allow(unused_imports, dead_code, redundant_self)]
33

44
use std::collections::hash_map::{self, *};
55
use std::fs::{self as alias};

tests/ui-fulldeps/internal-lints/non_glob_import_of_type_ir_inherent.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ compile-flags: -Z unstable-options
22
#![feature(rustc_private)]
33
#![deny(rustc::non_glob_import_of_type_ir_inherent)]
4+
#![allow(redundant_self)]
45

56
extern crate rustc_type_ir;
67

tests/ui-fulldeps/internal-lints/non_glob_import_of_type_ir_inherent.stderr

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: non-glob import of `rustc_type_ir::inherent`
2-
--> $DIR/non_glob_import_of_type_ir_inherent.rs:16:9
2+
--> $DIR/non_glob_import_of_type_ir_inherent.rs:17:9
33
|
44
LL | use rustc_type_ir::inherent::Predicate;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^---------
@@ -13,51 +13,51 @@ LL | #![deny(rustc::non_glob_import_of_type_ir_inherent)]
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

1515
error: non-glob import of `rustc_type_ir::inherent`
16-
--> $DIR/non_glob_import_of_type_ir_inherent.rs:17:35
16+
--> $DIR/non_glob_import_of_type_ir_inherent.rs:18:35
1717
|
1818
LL | use rustc_type_ir::inherent::{AdtDef, Ty};
1919
| ^^^^^^ help: try using a glob import instead: `*`
2020

2121
error: non-glob import of `rustc_type_ir::inherent`
22-
--> $DIR/non_glob_import_of_type_ir_inherent.rs:17:43
22+
--> $DIR/non_glob_import_of_type_ir_inherent.rs:18:43
2323
|
2424
LL | use rustc_type_ir::inherent::{AdtDef, Ty};
2525
| ^^ help: try using a glob import instead: `*`
2626

2727
error: non-glob import of `rustc_type_ir::inherent`
28-
--> $DIR/non_glob_import_of_type_ir_inherent.rs:20:9
28+
--> $DIR/non_glob_import_of_type_ir_inherent.rs:21:9
2929
|
3030
LL | use rustc_type_ir::inherent::ParamEnv as _;
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^^-------------
3232
| |
3333
| help: try using a glob import instead: `*`
3434

3535
error: non-glob import of `rustc_type_ir::inherent`
36-
--> $DIR/non_glob_import_of_type_ir_inherent.rs:24:9
36+
--> $DIR/non_glob_import_of_type_ir_inherent.rs:25:9
3737
|
3838
LL | use rustc_type_ir::inherent;
3939
| ^^^^^^^^^^^^^^^^^^^^^^^- help: try using a glob import instead: `::*`
4040

4141
error: non-glob import of `rustc_type_ir::inherent`
42-
--> $DIR/non_glob_import_of_type_ir_inherent.rs:25:9
42+
--> $DIR/non_glob_import_of_type_ir_inherent.rs:26:9
4343
|
4444
LL | use rustc_type_ir::inherent as inh;
4545
| ^^^^^^^^^^^^^^^^^^^^^^^------- help: try using a glob import instead: `::*`
4646

4747
error: non-glob import of `rustc_type_ir::inherent`
48-
--> $DIR/non_glob_import_of_type_ir_inherent.rs:26:25
48+
--> $DIR/non_glob_import_of_type_ir_inherent.rs:27:25
4949
|
5050
LL | use rustc_type_ir::{inherent as _};
5151
| ^^^^^^^^----- help: try using a glob import instead: `::*`
5252

5353
error: non-glob import of `rustc_type_ir::inherent`
54-
--> $DIR/non_glob_import_of_type_ir_inherent.rs:33:35
54+
--> $DIR/non_glob_import_of_type_ir_inherent.rs:34:35
5555
|
5656
LL | use rustc_type_ir::inherent::{self};
5757
| ^^^^ help: try using a glob import instead: `*`
5858

5959
error: non-glob import of `rustc_type_ir::inherent`
60-
--> $DIR/non_glob_import_of_type_ir_inherent.rs:34:35
60+
--> $DIR/non_glob_import_of_type_ir_inherent.rs:35:35
6161
|
6262
LL | use rustc_type_ir::inherent::{self as innate};
6363
| ^^^^----------

tests/ui/async-await/async-drop/ex-ice-132103.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//@ edition: 2018
66
#![feature(async_drop)]
77
#![allow(incomplete_features)]
8+
#![allow(redundant_self)]
89

910
use core::future::{async_drop_in_place, Future};
1011
use core::mem::{self};

tests/ui/delegation/target-expr-pass.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#![feature(fn_delegation)]
44
#![allow(incomplete_features)]
5+
#![allow(redundant_self)]
56

67
mod to_reuse {
78
pub fn foo(x: i32) -> i32 { x }

tests/ui/delegation/target-expr-pass.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
warning: trait `Trait` is never used
2-
--> $DIR/target-expr-pass.rs:17:7
2+
--> $DIR/target-expr-pass.rs:18:7
33
|
44
LL | trait Trait {
55
| ^^^^^
66
|
77
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
88

99
warning: struct `F` is never constructed
10-
--> $DIR/target-expr-pass.rs:21:8
10+
--> $DIR/target-expr-pass.rs:22:8
1111
|
1212
LL | struct F;
1313
| ^
1414

1515
warning: struct `S` is never constructed
16-
--> $DIR/target-expr-pass.rs:24:8
16+
--> $DIR/target-expr-pass.rs:25:8
1717
|
1818
LL | struct S(F);
1919
| ^

tests/ui/error-codes/E0429.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
use std::fmt::self; //~ ERROR E0429
1+
#![deny(redundant_self)]
2+
3+
use std::fmt::self; //~ ERROR unnecessary `self`
24

35
fn main () {
46
}

tests/ui/error-codes/E0429.stderr

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
error[E0429]: `self` imports are only allowed within a { } list
2-
--> $DIR/E0429.rs:1:13
1+
error: unnecessary `self`
2+
--> $DIR/E0429.rs:3:15
33
|
44
LL | use std::fmt::self;
5-
| ^^^^^^
5+
| --^^^^
6+
| |
7+
| help: consider removing this
68
|
7-
help: consider importing the module directly
9+
note: the lint level is defined here
10+
--> $DIR/E0429.rs:1:9
811
|
9-
LL - use std::fmt::self;
10-
LL + use std::fmt;
11-
|
12-
help: alternatively, use the multi-path `use` syntax to import `self`
13-
|
14-
LL | use std::fmt::{self};
15-
| + +
12+
LL | #![deny(redundant_self)]
13+
| ^^^^^^^^^^^^^^
1614

1715
error: aborting due to 1 previous error
1816

19-
For more information about this error, try `rustc --explain E0429`.

tests/ui/imports/cycle-import-in-std-1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
// https://github.com/rust-lang/rust/issues/124490
44

5+
#![allow(redundant_self)]
6+
57
use ops::{self as std};
68
//~^ ERROR: unresolved import `ops`
79
use std::collections::{self as ops};

0 commit comments

Comments
 (0)