]> git.lizzy.rs Git - rust.git/commitdiff
Mark duplicate import removal suggestion tool only
authorEsteban Küber <esteban@kuber.com.ar>
Mon, 11 Mar 2019 16:50:50 +0000 (09:50 -0700)
committerEsteban Küber <esteban@kuber.com.ar>
Sat, 23 Mar 2019 20:05:30 +0000 (13:05 -0700)
src/librustc_resolve/lib.rs
src/test/ui/double-type-import.stderr
src/test/ui/imports/duplicate.stderr
src/test/ui/issues/issue-26886.stderr
src/test/ui/issues/issue-52891.stderr
src/test/ui/proc-macro/shadow.stderr
src/test/ui/resolve/resolve-conflict-import-vs-import.stderr
src/test/ui/unresolved/unresolved-extern-mod-suggestion.stderr
src/test/ui/use/use-paths-as-items.stderr

index 4c5b9e3675b47995ca327a23d2a853d57e42d666..38ca5f0b6640a85e992383d78d1806cb3463c8ef 100644 (file)
@@ -4932,7 +4932,7 @@ fn report_conflict<'b>(&mut self,
             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(),
index d5e153d22ad7c7a9e6fd6aa262e0912a83fed316..a2f30d82ec38bda4562bb147d4cdad340fa67f7e 100644 (file)
@@ -7,7 +7,6 @@ LL |     use self::bar::X;
    |         ^^^^^^^^^^^^ `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
 
index f85a265487bfdf1d858f731235e0f707090c2621..cc897b2b6b7e97ba2bebd88b39585c95f5b7c8f0 100644 (file)
@@ -7,7 +7,6 @@ LL |     use a::foo;
    |         ^^^^^^ `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
index 6002befe0d817ad561fd22ff9c7031757163c71b..e2b925ec5a70587a8871285612b2c1ac5c49c91e 100644 (file)
@@ -7,7 +7,6 @@ LL | use std::sync::Arc;
    |     ^^^^^^^^^^^^^^ `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
@@ -19,7 +18,6 @@ LL | use std::sync;
    |     ^^^^^^^^^ `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
 
index 895e3a77946efbf2f1bb73821c7f24266ea3fa61..9173c02bcd8661dbe5dfaa101760a5bcedcd40dc 100644 (file)
@@ -7,7 +7,6 @@ LL | use issue_52891::a;
    |     ^^^^^^^^^^^^^^ `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
@@ -125,7 +124,6 @@ LL | use issue_52891::n;
    |     ^^^^^^^^^^^^^^ `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
 
index 597c05434f33b0ebbaebce822a91e48c47c01ebf..08057e163496dd633147ee3d5922ebe8f63760f9 100644 (file)
@@ -8,7 +8,6 @@ LL | extern crate derive_a;
    | ^^^^^^^^^^^^^^^^^^^^^^ `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
 
index 34f18feb9dcd019ee1b07d904a12c6015f034dc2..8df68ad3229edcaa21dd3e0ff12acbe2fa03764f 100644 (file)
@@ -7,7 +7,6 @@ LL | use std::mem::transmute;
    |     ^^^^^^^^^^^^^^^^^^^ `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
 
index cfae699b6edc32cd537af792e40e03b8a0ca5eb8..28333228a29baccd46f54bdc8b816421e3a2cdba 100644 (file)
@@ -7,7 +7,6 @@ LL | use core;
    |     ^^^^ `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
 
index 43ebbf157c3c225e99f9300d670242b1a693ca63..b09001a9bcd45b8f4458689a10af81616c90fb40 100644 (file)
@@ -7,7 +7,6 @@ LL | use std::mem;
    |     ^^^^^^^^ `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