about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2020-09-30 15:52:13 -0700
committerCamelid <camelidcamel@gmail.com>2020-09-30 16:03:01 -0700
commit2c5e2a6fc6fe5cc7a604725c49cd22d5b2a1fc3b (patch)
tree64eb14a026944509afde6b1f43a1e16147f22e3e
parent867bd42c38bac3870388765f65386b18cf1d9c5f (diff)
downloadrust-2c5e2a6fc6fe5cc7a604725c49cd22d5b2a1fc3b.tar.gz
rust-2c5e2a6fc6fe5cc7a604725c49cd22d5b2a1fc3b.zip
Improve wording for external crate resolution error
I think it reads better this way.
-rw-r--r--compiler/rustc_resolve/src/imports.rs2
-rw-r--r--src/test/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr2
-rw-r--r--src/test/ui/rfc-2126-extern-absolute-paths/not-allowed.stderr2
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/imports.rs b/compiler/rustc_resolve/src/imports.rs
index b02fc427d60..bf8a2f269dd 100644
--- a/compiler/rustc_resolve/src/imports.rs
+++ b/compiler/rustc_resolve/src/imports.rs
@@ -1157,7 +1157,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
                     }
                     _ => {
                         if !ident.is_path_segment_keyword() {
-                            format!("no `{}` external crate", ident)
+                            format!("no external crate `{}`", ident)
                         } else {
                             // HACK(eddyb) this shows up for `self` & `super`, which
                             // should work instead - for now keep the same error message.
diff --git a/src/test/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr b/src/test/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr
index bfce180789c..bd6778cf3d6 100644
--- a/src/test/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr
+++ b/src/test/ui/rfc-2126-extern-absolute-paths/non-existent-3.stderr
@@ -2,7 +2,7 @@ error[E0432]: unresolved import `ycrate`
   --> $DIR/non-existent-3.rs:3:5
    |
 LL | use ycrate;
-   |     ^^^^^^ no `ycrate` external crate
+   |     ^^^^^^ no external crate `ycrate`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2126-extern-absolute-paths/not-allowed.stderr b/src/test/ui/rfc-2126-extern-absolute-paths/not-allowed.stderr
index 6d2b4508a05..a66330ccc46 100644
--- a/src/test/ui/rfc-2126-extern-absolute-paths/not-allowed.stderr
+++ b/src/test/ui/rfc-2126-extern-absolute-paths/not-allowed.stderr
@@ -2,7 +2,7 @@ error[E0432]: unresolved import `alloc`
   --> $DIR/not-allowed.rs:5:5
    |
 LL | use alloc;
-   |     ^^^^^ no `alloc` external crate
+   |     ^^^^^ no external crate `alloc`
 
 error: aborting due to previous error