-
Notifications
You must be signed in to change notification settings - Fork 939
Closed
Labels
1x-backport:completedgood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorshelp wantedonly-with-optionrequires a non-default option value to reproducerequires a non-default option value to reproducepoor-formatting
Description
Describe the bug
Duplicate imports are not removed with imports_granularity = "Item"
turned on.
To Reproduce
test.rs
use std::env;
use std::env;
fn main() {
println!("{:?}", env::var("TEST"));
}
.rustfmt.toml
unstable_features = true
edition = "2018"
imports_granularity = "Item"
Run rustfmt test.rs
Expected behavior
Duplicate use std::env;
should be removed. It is not.
Meta
- rustfmt version:
rustfmt 1.4.36-nightly (7de6968 2021-02-07)
- From where did you install rustfmt?:
asdf install
with .tool-versionsrust nightly-2021-02-17
- How do you run rustfmt:
rustfmt
, in VSCode
stepancheg
Metadata
Metadata
Assignees
Labels
1x-backport:completedgood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorshelp wantedonly-with-optionrequires a non-default option value to reproducerequires a non-default option value to reproducepoor-formatting