about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorDavid Wood <david@davidtw.co>2019-01-29 13:34:40 +0100
committerDavid Wood <david@davidtw.co>2019-01-31 12:01:28 +0100
commit1595163356546e8a4db55784bcc591e2c5cea26c (patch)
tree29590b60d7f33441479541a23f1fc04fa7a56b20 /src/test/ui/error-codes
parenta21bd756889942cfed06dfd4ccd08838fc27ffdf (diff)
downloadrust-1595163356546e8a4db55784bcc591e2c5cea26c.tar.gz
rust-1595163356546e8a4db55784bcc591e2c5cea26c.zip
Add suggestion for duplicated import.
This commit adds a suggestion when a import is duplicated (ie. the same name
is used twice trying to import the same thing) to remove the second
import.
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0430.stderr10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/test/ui/error-codes/E0430.stderr b/src/test/ui/error-codes/E0430.stderr
index 0151cde887f..78e4e43ac2f 100644
--- a/src/test/ui/error-codes/E0430.stderr
+++ b/src/test/ui/error-codes/E0430.stderr
@@ -10,15 +10,13 @@ error[E0252]: the name `fmt` is defined multiple times
   --> $DIR/E0430.rs:1:22
    |
 LL | use std::fmt::{self, self}; //~ ERROR E0430
-   |                ----  ^^^^ `fmt` reimported here
-   |                |
+   |                ------^^^^
+   |                |   | |
+   |                |   | `fmt` reimported here
+   |                |   help: remove unnecessary import
    |                previous import of the module `fmt` here
    |
    = note: `fmt` must be defined only once in the type namespace of this module
-help: you can use `as` to change the binding name of the import
-   |
-LL | use std::fmt::{self, self as other_fmt}; //~ ERROR E0430
-   |                      ^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors