3dfbc88a62
macros: hygienize use of `core`/`std` in builtin macros Today, if a builtin macro wants to access an item from `core` or `std` (depending `#![no_std]`), it generates `::core::path::to::item` or `::std::path::to::item` respectively (c.f. `fn std_path()` in `libsyntax/ext/base.rs`). This PR refactors the builtin macros to instead always emit `$crate::path::to::item` here. That is, the def site of builtin macros is taken to be in `extern crate core;` or `extern crate std;`. Since builtin macros are macros 1.0 (i.e. mostly unhygienic), changing the def site can only effect the resolution of `$crate`. r? @nrc |
||
---|---|---|
.. | ||
deriving | ||
asm.rs | ||
Cargo.toml | ||
cfg.rs | ||
compile_error.rs | ||
concat_idents.rs | ||
concat.rs | ||
env.rs | ||
format_foreign.rs | ||
format.rs | ||
global_asm.rs | ||
lib.rs | ||
log_syntax.rs | ||
proc_macro_impl.rs | ||
proc_macro_registrar.rs | ||
trace_macros.rs |