-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when applied
Description
Lint name: single_component_path_imports
I tried this code:
m!();
macro_rules! m { () => {} }
use m;
I expected to see this happen: Clippy would not warn
Instead, this happened: Clippy showed this warning:
warning: this import is redundant
--> src/lib.rs:3:1
|
3 | use m;
| ^^^^^^ help: remove it entirely
|
= note: `#[warn(clippy::single_component_path_imports)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
Meta
Rust version (rustc -Vv
):
rustc 1.58.0-nightly (29b124802 2021-10-25)
binary: rustc
commit-hash: 29b1248025b19bd132c8047fc710ea9314b9b76b
commit-date: 2021-10-25
host: x86_64-unknown-linux-gnu
release: 1.58.0-nightly
LLVM version: 13.0.0
cc #7106
@rustbot label +I-suggestion-causes-error
csnover and gleb-chipiga
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't haveI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when applied