Hide obvious suggestion from cli output

This commit is contained in:
Esteban Küber 2019-03-10 22:25:23 -07:00
parent 3211f38828
commit 44730271f7
4 changed files with 10 additions and 22 deletions

View File

@ -5112,7 +5112,7 @@ impl<'a> Resolver<'a> {
// extra for the comma.
span.lo().0 - (prev_comma.as_bytes().len() as u32) - 1
));
err.span_suggestion(
err.tool_only_span_suggestion(
span, message, String::new(), Applicability::MaybeIncorrect,
);
return;

View File

@ -10,10 +10,8 @@ error[E0252]: the name `fmt` is defined multiple times
--> $DIR/E0430.rs:1:22
|
LL | use std::fmt::{self, self};
| ------^^^^
| | | |
| | | `fmt` reimported here
| | help: remove unnecessary import
| ---- ^^^^ `fmt` reimported here
| |
| previous import of the module `fmt` here
|
= note: `fmt` must be defined only once in the type namespace of this module

View File

@ -2,10 +2,8 @@ error[E0252]: the name `A` is defined multiple times
--> $DIR/import-twice.rs:6:14
|
LL | use foo::{A, A};
| ---^
| || |
| || `A` reimported here
| |help: remove unnecessary import
| - ^ `A` reimported here
| |
| previous import of the type `A` here
|
= note: `A` must be defined only once in the type namespace of this module

View File

@ -44,10 +44,7 @@ LL | use issue_52891::a;
| -------------- previous import of the module `a` here
...
LL | use issue_52891::{f, g, a};
| --^
| | |
| | `a` reimported here
| help: remove unnecessary import
| ^ `a` reimported here
|
= note: `a` must be defined only once in the type namespace of this module
@ -82,16 +79,11 @@ LL | a,
error[E0252]: the name `a` is defined multiple times
--> $DIR/issue-52891.rs:26:5
|
LL | use issue_52891::a;
| -------------- previous import of the module `a` here
LL | use issue_52891::a;
| -------------- previous import of the module `a` here
...
LL | m,
| ______-
LL | | a};
| | ^
| | |
| |_____`a` reimported here
| help: remove unnecessary import
LL | a};
| ^ `a` reimported here
|
= note: `a` must be defined only once in the type namespace of this module