You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tracking issue for feature extern_crate_item_prelude #55599
With this feature extern crate foo as bar; item placed into the crate root puts the name bar into extern prelude. This has the next effects:
The name is in scope in the whole crate, including inner modules, like other prelude names.
On 2018 edition imports can refer to that name use bar::zzz; or use ::bar::zzz;, plus non-import absolute paths can refer to it as well let z = ::bar::zzz;.
More details are available on the implementation PR - #54658.
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 crate::proc_macro everywhere).
If not, this appears to have no forward-compat warning when building under 2015, which causes a failure to migrate with cargo fix:
error[E0658]:use of extern prelude names introduced with `externcrate` 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
Reacted by Carol (Nichols || Goulding) and Dainslef Tei
@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).
I'll prepare a stabilization report.
Activity
Nemo157 commentedon Nov 3, 2018
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
crate::proc_macroeverywhere).If not, this appears to have no forward-compat warning when building under 2015, which causes a failure to migrate with
cargo fix:SimonSapin commentedon Nov 4, 2018
I’ve also hit this and filed #55592
steveklabnik commentedon Nov 7, 2018
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?
SimonSapin commentedon Nov 7, 2018
@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?
SimonSapin commentedon Nov 7, 2018
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).
petrochenkov commentedon Nov 14, 2018
@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).
I'll prepare a stabilization report.
Auto merge of #56032 - petrochenkov:stabecip, r=nikomatsakis