resolve: Do not put nonexistent crate meta into prelude

This commit is contained in:
Vadim Petrochenkov 2020-08-22 12:28:09 +03:00
parent 03687f8ffa
commit 3522add318
3 changed files with 0 additions and 19 deletions

View File

@ -1240,9 +1240,6 @@ impl<'a> Resolver<'a> {
extern_prelude.insert(Ident::with_dummy_span(sym::core), Default::default());
if !session.contains_name(&krate.attrs, sym::no_std) {
extern_prelude.insert(Ident::with_dummy_span(sym::std), Default::default());
if session.rust_2018() {
extern_prelude.insert(Ident::with_dummy_span(sym::meta), Default::default());
}
}
}

View File

@ -1,7 +0,0 @@
// edition:2018
// Tests that `meta` is allowed, even if the crate doesn't exist
// yet (i.e., it causes a different error than `not-allowed.rs`).
use meta; //~ ERROR can't find crate for `meta`
fn main() {}

View File

@ -1,9 +0,0 @@
error[E0463]: can't find crate for `meta`
--> $DIR/meta.rs:5:5
|
LL | use meta;
| ^^^^ can't find crate
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.