Skip to content

Commit d04e83f

Browse files
Bless tests
1 parent 2245d10 commit d04e83f

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

src/test/ui/lint/lint-unused-imports.stderr

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,35 @@ error: unused import: `foo::Square`
3434
LL | use foo::Square;
3535
| ^^^^^^^^^^^
3636

37+
warning: the item `g` is imported redundantly
38+
--> $DIR/lint-unused-imports.rs:68:9
39+
|
40+
LL | / fn g() {
41+
LL | | use self::g;
42+
| | ^^^^^^^
43+
LL | | fn f() {
44+
LL | | self::g();
45+
LL | | }
46+
LL | | }
47+
| |_- the item `g` was already imported here
48+
|
49+
= note: #[warn(redundant_import)] on by default
50+
3751
error: unused import: `self::g`
3852
--> $DIR/lint-unused-imports.rs:68:9
3953
|
4054
LL | use self::g;
4155
| ^^^^^^^
4256

57+
warning: the item `foo` is imported redundantly
58+
--> $DIR/lint-unused-imports.rs:77:9
59+
|
60+
LL | use test2::{foo, bar};
61+
| --- the item `foo` was already imported here
62+
...
63+
LL | use test2::foo;
64+
| ^^^^^^^^^^
65+
4366
error: unused import: `test2::foo`
4467
--> $DIR/lint-unused-imports.rs:77:9
4568
|

src/test/ui/rust-2018/future-proofing-locals.stderr

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,51 @@ error: imports cannot refer to local variables
5252
LL | use {T as _, x};
5353
| ^
5454

55+
warning: the item `T` is imported redundantly
56+
--> $DIR/future-proofing-locals.rs:19:9
57+
|
58+
LL | / mod T {
59+
LL | | pub struct U;
60+
LL | | }
61+
| |_- the item `T` was already imported here
62+
...
63+
LL | use T;
64+
| ^
65+
|
66+
= note: #[warn(redundant_import)] on by default
67+
68+
warning: the item `x` is imported redundantly
69+
--> $DIR/future-proofing-locals.rs:31:9
70+
|
71+
LL | / mod x {
72+
LL | | pub struct y;
73+
LL | | }
74+
| |_- the item `x` was already imported here
75+
...
76+
LL | use x;
77+
| ^
78+
79+
warning: the item `x` is imported redundantly
80+
--> $DIR/future-proofing-locals.rs:37:17
81+
|
82+
LL | / mod x {
83+
LL | | pub struct y;
84+
LL | | }
85+
| |_- the item `x` was already imported here
86+
...
87+
LL | use x;
88+
| ^
89+
90+
warning: the item `x` is imported redundantly
91+
--> $DIR/future-proofing-locals.rs:45:18
92+
|
93+
LL | / mod x {
94+
LL | | pub struct y;
95+
LL | | }
96+
| |_- the item `x` was already imported here
97+
...
98+
LL | use {T as _, x};
99+
| ^
100+
55101
error: aborting due to 9 previous errors
56102

0 commit comments

Comments
 (0)