diagnostics: Don't mention external crates when hitting import errors on crate imports in 2018

This commit is contained in:
Manish Goregaokar 2021-03-07 14:51:35 -08:00
parent 9d5d669b77
commit 0eeae1abfc
4 changed files with 8 additions and 6 deletions

View file

@ -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