Skip to content

Commit d10b98d

Browse files
authored
Rollup merge of #75802 - petrochenkov:nometa, r=nikomatsakis
resolve: Do not put nonexistent crate `meta` into prelude Before the 2018 edition release there was some vague suggestion about adding a crate named `meta` to the standard distribution. On this basis the name `meta` was "partially reserved" by putting `meta` into extern prelude (this means importing something named `meta` will result in an ambiguity error, for example). This only caused confusion so far, and two years later there are no specific plans to add such crate. If some standard crate (named `meta` or not) is added in the future, then cargo will hopefully already have ability to put it into extern prelude explicitly through `Cargo.toml`. Otherwise, it could be added to extern prelude by the compiler at edition boundary. Closes #73948
2 parents 6af9846 + 3522add commit d10b98d

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

compiler/rustc_resolve/src/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1240,9 +1240,6 @@ impl<'a> Resolver<'a> {
12401240
extern_prelude.insert(Ident::with_dummy_span(sym::core), Default::default());
12411241
if !session.contains_name(&krate.attrs, sym::no_std) {
12421242
extern_prelude.insert(Ident::with_dummy_span(sym::std), Default::default());
1243-
if session.rust_2018() {
1244-
extern_prelude.insert(Ident::with_dummy_span(sym::meta), Default::default());
1245-
}
12461243
}
12471244
}
12481245

src/test/ui/rfc-2126-extern-absolute-paths/meta.rs

-7
This file was deleted.

src/test/ui/rfc-2126-extern-absolute-paths/meta.stderr

-9
This file was deleted.

0 commit comments

Comments
 (0)