mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
resolve: Do not put nonexistent crate meta
into prelude
This commit is contained in:
parent
03687f8ffa
commit
3522add318
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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() {}
|
@ -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`.
|
Loading…
Reference in New Issue
Block a user