rust/src/libsyntax_ext
bors 3dfbc88a62 Auto merge of #46550 - jseyfried:cleanup_builtin_hygiene, r=nrc
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
2017-12-13 11:09:55 +00:00
..
deriving Use hygiene to access the injected crate (core or std) from builtin macros. 2017-12-09 17:22:07 -08:00
asm.rs
Cargo.toml
cfg.rs Produce expansion info for more builtin macros 2017-09-04 11:03:19 +02:00
compile_error.rs
concat_idents.rs Produce expansion info for more builtin macros 2017-09-04 11:03:19 +02:00
concat.rs Produce expansion info for more builtin macros 2017-09-04 11:03:19 +02:00
env.rs Produce expansion info for more builtin macros 2017-09-04 11:03:19 +02:00
format_foreign.rs Use Try syntax for Option in place of macros or match 2017-12-09 14:18:33 -08:00
format.rs Retain information on whether a format argument has explicit position 2017-11-09 20:57:58 +00:00
global_asm.rs
lib.rs Use hygiene to access the injected crate (core or std) from builtin macros. 2017-12-09 17:22:07 -08:00
log_syntax.rs
proc_macro_impl.rs
proc_macro_registrar.rs
trace_macros.rs