about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-11-11 17:35:23 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-11-18 13:57:01 +0300
commitcfe81559ee970b99e45a73af02ba4837cb30b6db (patch)
treeb7bf70150dea1b4cd2ec5203bf11598b25eb2c69 /src/test
parent4c5d822a8ba8b11c653f48da73c0e281f7245bea (diff)
downloadrust-cfe81559ee970b99e45a73af02ba4837cb30b6db.tar.gz
rust-cfe81559ee970b99e45a73af02ba4837cb30b6db.zip
resolve: Recover "did you mean" suggestions in imports
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/resolve_self_super_hint.rs4
-rw-r--r--src/test/ui/resolve_self_super_hint.stderr4
-rw-r--r--src/test/ui/rust-2018/local-path-suggestions-2018.rs2
-rw-r--r--src/test/ui/rust-2018/local-path-suggestions-2018.stderr8
4 files changed, 6 insertions, 12 deletions
diff --git a/src/test/ui/resolve_self_super_hint.rs b/src/test/ui/resolve_self_super_hint.rs
index a30e73cf02d..a24f92fdc6d 100644
--- a/src/test/ui/resolve_self_super_hint.rs
+++ b/src/test/ui/resolve_self_super_hint.rs
@@ -23,11 +23,11 @@ mod a {
         mod c {
             use alloc::HashMap;
             //~^ ERROR unresolved import `alloc` [E0432]
-            //~| Did you mean `std::alloc`?
+            //~| Did you mean `a::alloc`?
             mod d {
                 use alloc::HashMap;
                 //~^ ERROR unresolved import `alloc` [E0432]
-                //~| Did you mean `std::alloc`?
+                //~| Did you mean `a::alloc`?
             }
         }
     }
diff --git a/src/test/ui/resolve_self_super_hint.stderr b/src/test/ui/resolve_self_super_hint.stderr
index b58a23724e4..924788bdaab 100644
--- a/src/test/ui/resolve_self_super_hint.stderr
+++ b/src/test/ui/resolve_self_super_hint.stderr
@@ -14,13 +14,13 @@ error[E0432]: unresolved import `alloc`
   --> $DIR/resolve_self_super_hint.rs:24:17
    |
 LL |             use alloc::HashMap;
-   |                 ^^^^^ Did you mean `std::alloc`?
+   |                 ^^^^^ Did you mean `a::alloc`?
 
 error[E0432]: unresolved import `alloc`
   --> $DIR/resolve_self_super_hint.rs:28:21
    |
 LL |                 use alloc::HashMap;
-   |                     ^^^^^ Did you mean `std::alloc`?
+   |                     ^^^^^ Did you mean `a::alloc`?
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/rust-2018/local-path-suggestions-2018.rs b/src/test/ui/rust-2018/local-path-suggestions-2018.rs
index 147dae401f6..2a673bdbad2 100644
--- a/src/test/ui/rust-2018/local-path-suggestions-2018.rs
+++ b/src/test/ui/rust-2018/local-path-suggestions-2018.rs
@@ -16,7 +16,7 @@ mod foo {
     pub type Bar = u32;
 }
 
-mod baz {
+mod bazz {
     use foo::Bar;
 
     fn baz() {
diff --git a/src/test/ui/rust-2018/local-path-suggestions-2018.stderr b/src/test/ui/rust-2018/local-path-suggestions-2018.stderr
index 2293f4b0017..b8a786bcbb4 100644
--- a/src/test/ui/rust-2018/local-path-suggestions-2018.stderr
+++ b/src/test/ui/rust-2018/local-path-suggestions-2018.stderr
@@ -6,18 +6,12 @@ LL |     use foo::Bar;
    |
    = note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html>
 
-error[E0432]: unresolved import `foo`
-  --> $DIR/local-path-suggestions-2018.rs:27:5
-   |
-LL | use foo::Bar;
-   |     ^^^ Did you mean `self::foo`?
-
 error[E0432]: unresolved import `foobar`
   --> $DIR/local-path-suggestions-2018.rs:29:5
    |
 LL | use foobar::Baz;
    |     ^^^^^^ Did you mean `baz::foobar`?
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0432`.