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 use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
Cargo.toml Move unused-extern-crate to late pass 2017-08-27 19:02:24 +09:00
cfg.rs Produce expansion info for more builtin macros 2017-09-04 11:03:19 +02:00
compile_error.rs Stabilize the compile_error_macro feature 2017-07-25 07:09:31 -07:00
concat.rs Produce expansion info for more builtin macros 2017-09-04 11:03:19 +02:00
concat_idents.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.rs Retain information on whether a format argument has explicit position 2017-11-09 20:57:58 +00:00
format_foreign.rs Use Try syntax for Option in place of macros or match 2017-12-09 14:18:33 -08:00
global_asm.rs use field init shorthand EVERYWHERE 2017-08-15 15:29:17 -07:00
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 make emit_feature_err take a ParseSess 2016-09-26 07:07:41 +02:00
proc_macro_impl.rs Simplify hygiene::Mark application, and 2017-06-26 02:05:45 +00:00
proc_macro_registrar.rs Make fields of Span private 2017-08-30 01:38:54 +03:00
trace_macros.rs Move syntax::util::interner -> syntax::symbol, cleanup. 2016-11-20 23:40:20 +00:00