Bless tests

This commit is contained in:
Fabian Drinck 2019-03-16 18:08:51 +01:00
parent 2245d10fac
commit d04e83fe2c
2 changed files with 69 additions and 0 deletions

View file

@ -34,12 +34,35 @@ error: unused import: `foo::Square`
LL | use foo::Square;
| ^^^^^^^^^^^
warning: the item `g` is imported redundantly
--> $DIR/lint-unused-imports.rs:68:9
|
LL | / fn g() {
LL | | use self::g;
| | ^^^^^^^
LL | | fn f() {
LL | | self::g();
LL | | }
LL | | }
| |_- the item `g` was already imported here
|
= note: #[warn(redundant_import)] on by default
error: unused import: `self::g`
--> $DIR/lint-unused-imports.rs:68:9
|
LL | use self::g;
| ^^^^^^^
warning: the item `foo` is imported redundantly
--> $DIR/lint-unused-imports.rs:77:9
|
LL | use test2::{foo, bar};
| --- the item `foo` was already imported here
...
LL | use test2::foo;
| ^^^^^^^^^^
error: unused import: `test2::foo`
--> $DIR/lint-unused-imports.rs:77:9
|

View file

@ -52,5 +52,51 @@ error: imports cannot refer to local variables
LL | use {T as _, x};
| ^
warning: the item `T` is imported redundantly
--> $DIR/future-proofing-locals.rs:19:9
|
LL | / mod T {
LL | | pub struct U;
LL | | }
| |_- the item `T` was already imported here
...
LL | use T;
| ^
|
= note: #[warn(redundant_import)] on by default
warning: the item `x` is imported redundantly
--> $DIR/future-proofing-locals.rs:31:9
|
LL | / mod x {
LL | | pub struct y;
LL | | }
| |_- the item `x` was already imported here
...
LL | use x;
| ^
warning: the item `x` is imported redundantly
--> $DIR/future-proofing-locals.rs:37:17
|
LL | / mod x {
LL | | pub struct y;
LL | | }
| |_- the item `x` was already imported here
...
LL | use x;
| ^
warning: the item `x` is imported redundantly
--> $DIR/future-proofing-locals.rs:45:18
|
LL | / mod x {
LL | | pub struct y;
LL | | }
| |_- the item `x` was already imported here
...
LL | use {T as _, x};
| ^
error: aborting due to 9 previous errors