-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Silence unused_imports lint for redundant imports
- Loading branch information
1 parent
72fe8a0
commit c40029e
Showing
20 changed files
with
36 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
tests/ui/imports/redundant-import-issue-121915-2015.stderr
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,20 @@ | ||
error: the item `TryFrom` is imported redundantly | ||
--> $DIR/suggest-remove-issue-121315.rs:7:9 | ||
| | ||
LL | use std::convert::TryFrom; | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
--> $SRC_DIR/std/src/prelude/mod.rs:LL:COL | ||
| | ||
= note: the item `TryFrom` is already defined here | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/suggest-remove-issue-121315.rs:2:9 | ||
| | ||
LL | #![deny(unused_imports)] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: the item `TryFrom` is imported redundantly | ||
--> $DIR/suggest-remove-issue-121315.rs:14:24 | ||
| | ||
LL | use std::convert::{TryFrom, TryInto}; | ||
| ^^^^^^^ | ||
--> $SRC_DIR/std/src/prelude/mod.rs:LL:COL | ||
| | ||
= note: the item `TryFrom` is already defined here | ||
|
||
error: the item `TryInto` is imported redundantly | ||
--> $DIR/suggest-remove-issue-121315.rs:14:33 | ||
| | ||
LL | use std::convert::{TryFrom, TryInto}; | ||
| ^^^^^^^ | ||
--> $SRC_DIR/std/src/prelude/mod.rs:LL:COL | ||
| | ||
= note: the item `TryInto` is already defined here | ||
|
||
error: unused import: `AsMut` | ||
--> $DIR/suggest-remove-issue-121315.rs:24:24 | ||
--> $DIR/suggest-remove-issue-121315.rs:25:24 | ||
| | ||
LL | use std::convert::{AsMut, Into}; | ||
| ^^^^^ | ||
|
||
error: the item `Into` is imported redundantly | ||
--> $DIR/suggest-remove-issue-121315.rs:24:31 | ||
| | ||
LL | use std::convert::{AsMut, Into}; | ||
| ^^^^ | ||
--> $SRC_DIR/std/src/prelude/mod.rs:LL:COL | ||
note: the lint level is defined here | ||
--> $DIR/suggest-remove-issue-121315.rs:3:9 | ||
| | ||
= note: the item `Into` is already defined here | ||
LL | #![deny(unused_imports)] | ||
| ^^^^^^^^^^^^^^ | ||
|
||
error: unused import: `From` | ||
--> $DIR/suggest-remove-issue-121315.rs:33:24 | ||
--> $DIR/suggest-remove-issue-121315.rs:34:24 | ||
| | ||
LL | use std::convert::{From, Infallible}; | ||
| ^^^^ | ||
|
||
error: aborting due to 6 previous errors | ||
error: aborting due to 2 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
//@ check-pass | ||
#![deny(unused_imports)] | ||
|
||
struct S; | ||
|
||
fn main() { | ||
use S; //~ ERROR the item `S` is imported redundantly | ||
use S; //FIXME(unused_imports): ~ ERROR the item `S` is imported redundantly | ||
|
||
let _s = S; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
tests/ui/lint/use-redundant/use-redundant-glob-parent.stderr
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
tests/ui/lint/use-redundant/use-redundant-issue-71450.stderr
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
tests/ui/lint/use-redundant/use-redundant-prelude-rust-2015.stderr
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
tests/ui/lint/use-redundant/use-redundant-prelude-rust-2021.stderr
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters