Some((directive, _, true)) if should_remove_import && !directive.is_glob() => {
// Simple case - remove the entire import. Due to the above match arm, this can
// only be a single use so just remove it entirely.
- err.span_suggestion_hidden(
+ err.tool_only_span_suggestion(
directive.use_span_with_attributes,
"remove unnecessary import",
String::new(),
| ^^^^^^^^^^^^ `X` reimported here
|
= note: `X` must be defined only once in the type namespace of this module
- = help: remove unnecessary import
error: aborting due to previous error
| ^^^^^^ `foo` reimported here
|
= note: `foo` must be defined only once in the value namespace of this module
- = help: remove unnecessary import
error[E0659]: `foo` is ambiguous (glob import vs glob import in the same module)
--> $DIR/duplicate.rs:46:15
| ^^^^^^^^^^^^^^ `Arc` reimported here
|
= note: `Arc` must be defined only once in the type namespace of this module
- = help: remove unnecessary import
error[E0252]: the name `sync` is defined multiple times
--> $DIR/issue-26886.rs:4:5
| ^^^^^^^^^ `sync` reimported here
|
= note: `sync` must be defined only once in the type namespace of this module
- = help: remove unnecessary import
error: aborting due to 2 previous errors
| ^^^^^^^^^^^^^^ `a` reimported here
|
= note: `a` must be defined only once in the type namespace of this module
- = help: remove unnecessary import
error[E0252]: the name `a` is defined multiple times
--> $DIR/issue-52891.rs:14:19
| ^^^^^^^^^^^^^^ `n` reimported here
|
= note: `n` must be defined only once in the type namespace of this module
- = help: remove unnecessary import
error: aborting due to 10 previous errors
| ^^^^^^^^^^^^^^^^^^^^^^ `derive_a` reimported here
|
= note: `derive_a` must be defined only once in the type namespace of this module
- = help: remove unnecessary import
error: aborting due to previous error
| ^^^^^^^^^^^^^^^^^^^ `transmute` reimported here
|
= note: `transmute` must be defined only once in the value namespace of this module
- = help: remove unnecessary import
error: aborting due to previous error
| ^^^^ `core` reimported here
|
= note: `core` must be defined only once in the type namespace of this module
- = help: remove unnecessary import
error: aborting due to previous error
| ^^^^^^^^ `mem` reimported here
|
= note: `mem` must be defined only once in the type namespace of this module
- = help: remove unnecessary import
error: aborting due to previous error