-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Tracking issue for feature extern_crate_item_prelude
#55599
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Is this intended to be stable for the initial 2018 release? It seems important for a nice experience with proc-macros (otherwise you must use If not, this appears to have no forward-compat warning when building under 2015, which causes a failure to migrate with error[E0658]: use of extern prelude names introduced with `extern crate` items is unstable (see issue #54658)
--> interp-macros/src/lib.rs:12:5
|
12 | use proc_macro::TokenStream;
| ^^^^^^^^^^
|
= help: add #![feature(extern_crate_item_prelude)] to the crate attributes to enable |
I’ve also hit this and filed #55592 |
Knowing if this will ship in 1.31 or not is important for the book, for the reasons that @Nemo157 mentioned. Could we maybe get an answer here? |
@petrochenkov, @rust-lang/lang Are there any blockers for stabilizing this feature? How do you feel about backporting its stabilization to 1.31 beta? Should FCP be proposed now? |
In servo/servo#22086 I’ve migrated a number of Servo crates to the 2018 editions, but I left out proc-macro and plugin crates in part because of this issue (or lack of other good way to deal with crate dependencies not known to Cargo). |
@aturon and @steveklabnik wanted to stabilize this for the edition release as well (on #edition-planning discord channel). This should be ready for stabilization and backport to 1.31 beta once #55884 lands (or some fixes for this feature are extracted from that PR). |
Stabilize `extern_crate_item_prelude` Closes #55599
With this feature
extern crate foo as bar;
item placed into the crate root puts the namebar
into extern prelude. This has the next effects:use bar::zzz;
oruse ::bar::zzz;
, plus non-import absolute paths can refer to it as welllet z = ::bar::zzz;
.More details are available on the implementation PR - #54658.
The text was updated successfully, but these errors were encountered: