2018-12-09 10:40:49 -06:00
|
|
|
error: unused import: `std::fmt::{}`
|
|
|
|
--> $DIR/lint-unused-imports.rs:8:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | use std::fmt::{};
|
2019-02-11 13:16:22 -06:00
|
|
|
| ^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
note: lint level defined here
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unused-imports.rs:1:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | #![deny(unused_imports)]
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unused imports: `None`, `Some`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unused-imports.rs:12:27
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | use std::option::Option::{Some, None};
|
2019-02-11 13:16:22 -06:00
|
|
|
| ^^^^ ^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: unused import: `test::A`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unused-imports.rs:15:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | use test::A;
|
2019-02-11 13:16:22 -06:00
|
|
|
| ^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: unused import: `bar`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unused-imports.rs:24:18
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | use test2::{foo, bar};
|
2019-02-11 13:16:22 -06:00
|
|
|
| ^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: unused import: `foo::Square`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unused-imports.rs:52:13
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | use foo::Square;
|
2019-02-11 13:16:22 -06:00
|
|
|
| ^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-03-17 03:49:31 -05:00
|
|
|
error: the item `g` is imported redundantly
|
2019-03-16 12:08:51 -05:00
|
|
|
--> $DIR/lint-unused-imports.rs:68:9
|
|
|
|
|
|
|
|
|
LL | / fn g() {
|
|
|
|
LL | | use self::g;
|
|
|
|
| | ^^^^^^^
|
2019-03-17 05:38:38 -05:00
|
|
|
LL | |
|
2019-03-16 12:08:51 -05:00
|
|
|
LL | | fn f() {
|
|
|
|
LL | | self::g();
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
2019-03-17 15:07:57 -05:00
|
|
|
| |_- the item `g` is already defined here
|
2019-03-16 12:08:51 -05:00
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
error: unused import: `self::g`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unused-imports.rs:68:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | use self::g;
|
2019-02-11 13:16:22 -06:00
|
|
|
| ^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-03-17 03:49:31 -05:00
|
|
|
error: the item `foo` is imported redundantly
|
2019-03-17 05:38:38 -05:00
|
|
|
--> $DIR/lint-unused-imports.rs:78:9
|
2019-03-16 12:08:51 -05:00
|
|
|
|
|
|
|
|
LL | use test2::{foo, bar};
|
2019-03-17 15:07:57 -05:00
|
|
|
| --- the item `foo` is already imported here
|
2019-03-16 12:08:51 -05:00
|
|
|
...
|
|
|
|
LL | use test2::foo;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
error: unused import: `test2::foo`
|
2019-03-17 05:38:38 -05:00
|
|
|
--> $DIR/lint-unused-imports.rs:78:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | use test2::foo;
|
2019-02-11 13:16:22 -06:00
|
|
|
| ^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: unused import: `test::B2`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-unused-imports.rs:20:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | use test::B2;
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
2019-03-17 03:49:31 -05:00
|
|
|
error: aborting due to 10 previous errors
|
2018-08-08 07:28:26 -05:00
|
|
|
|