mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
diagnostics: Don't mention external crates when hitting import errors on crate imports in 2018
This commit is contained in:
parent
9d5d669b77
commit
0eeae1abfc
@ -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
|
||||
|
@ -18,4 +18,4 @@ mod inner {
|
||||
|
||||
fn main() {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ mod inner {
|
||||
//~^ ERROR failed to resolve: could not find `nonexistant` in the list of imported crates
|
||||
}
|
||||
fn crate_inner(_: crate::nonexistant::Foo) {
|
||||
//~^ ERROR failed to resolve: maybe a missing crate `nonexistant`?
|
||||
//~^ ERROR failed to resolve: could not find `nonexistant` in the crate root
|
||||
}
|
||||
|
||||
fn bare_global(_: ::nonexistant) {
|
||||
@ -18,4 +18,4 @@ mod inner {
|
||||
|
||||
fn main() {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -4,11 +4,11 @@ error[E0433]: failed to resolve: could not find `nonexistant` in the list of imp
|
||||
LL | fn global_inner(_: ::nonexistant::Foo) {
|
||||
| ^^^^^^^^^^^ could not find `nonexistant` in the list of imported crates
|
||||
|
||||
error[E0433]: failed to resolve: maybe a missing crate `nonexistant`?
|
||||
error[E0433]: failed to resolve: could not find `nonexistant` in the crate root
|
||||
--> $DIR/editions-crate-root-2018.rs:7:30
|
||||
|
|
||||
LL | fn crate_inner(_: crate::nonexistant::Foo) {
|
||||
| ^^^^^^^^^^^ maybe a missing crate `nonexistant`?
|
||||
| ^^^^^^^^^^^ could not find `nonexistant` in the crate root
|
||||
|
||||
error[E0412]: cannot find crate `nonexistant` in the list of imported crates
|
||||
--> $DIR/editions-crate-root-2018.rs:11:25
|
||||
|
Loading…
Reference in New Issue
Block a user