diff options
| author | bors <bors@rust-lang.org> | 2018-09-15 19:50:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-09-15 19:50:26 +0000 |
| commit | e4ba1d41e3c2a66215943e43de70f93bb195b1f0 (patch) | |
| tree | b987e0eddbd091477ef786182dd789a910ca0894 /src/test/incremental/thinlto | |
| parent | 9f53c87b4b1f097e111c9525d60470ed22631018 (diff) | |
| parent | bde0a54737653776ce271ec38f65f07fe1bd4388 (diff) | |
| download | rust-e4ba1d41e3c2a66215943e43de70f93bb195b1f0.tar.gz rust-e4ba1d41e3c2a66215943e43de70f93bb195b1f0.zip | |
Auto merge of #54116 - eddyb:extern-prelude, r=petrochenkov
rustc_resolve: allow only core, std, meta and --extern in Rust 2018 paths.
As per https://github.com/rust-lang/rust/issues/53166#issuecomment-419265401:
* Rust 2018 imports can no longer refer to crates not in "extern prelude"
* `::foo` won't load a crate named `foo` unless `foo` is in the "extern prelude"
* `extern crate foo;`, however, remains unchanged (can load arbitrary crates)
* `--extern crate_name` is added (note the lack of `=path`) as an unstable option
* adds `crate_name` to the "extern prelude" (see above)
* crate is searched in sysroot & library paths, just like `extern crate crate_name`.
* `Cargo` support will be added later
* `core`, `std` and ~~`proc_macro`~~ `meta` are *always* available in the extern prelude
* warning for interaction with `no_std` / `no_core` will be added later
* **EDIT**: `proc_macro` was replaced by `meta`, see https://github.com/rust-lang/rust/issues/53166#issuecomment-421137230
* note that there is no crate named `meta` being added, so `use meta::...;` will fail, we're only whitelisting it so we can start producing `uniform_paths` compatibility errors
Fixes #54006 (as the example now requires `--extern alloc`, which is unstable).
Fixes #54253 (hit during fixing RLS).
r? @petrochenkov cc @aturon @alexcrichton @Centril @joshtriplett
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
