about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2021-03-07 14:51:35 -0800
committerManish Goregaokar <manishsmail@gmail.com>2021-03-07 15:15:19 -0800
commit0eeae1abfcd8e588b41b01100db4dbc9384f6144 (patch)
tree8c3b38c869fcd7ae077e8717b47bc32244f51269 /compiler
parent9d5d669b77f8c100f3e01a7bd5924d30c8bad152 (diff)
downloadrust-0eeae1abfcd8e588b41b01100db4dbc9384f6144.tar.gz
rust-0eeae1abfcd8e588b41b01100db4dbc9384f6144.zip
diagnostics: Don't mention external crates when hitting import errors on crate imports in 2018
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_resolve/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs
index 11b0ade1e83..2ce54658c0b 100644
--- a/compiler/rustc_resolve/src/lib.rs
+++ b/compiler/rustc_resolve/src/lib.rs
@@ -2433,8 +2433,10 @@ impl<'a> Resolver<'a> {
                                     Applicability::MaybeIncorrect,
                                 )),
                             )
-                        } else {
+                        } else if self.session.edition() == Edition::Edition2015 {
                             (format!("maybe a missing crate `{}`?", ident), None)
+                        } else {
+                            (format!("could not find `{}` in the crate root", ident), None)
                         }
                     } else if i == 0 {
                         if ident