rust/compiler/rustc_builtin_macros/src
Dylan DPC 759204ffc4
Rollup merge of #82217 - m-ou-se:edition-prelude, r=nikomatsakis
Edition-specific preludes

This changes `{std,core}::prelude` to export edition-specific preludes under `rust_2015`, `rust_2018` and `rust_2021`. (As suggested in https://github.com/rust-lang/rust/issues/51418#issuecomment-395630382.) For now they all just re-export `v1::*`, but this allows us to add things to the 2021edition prelude soon.

This also changes the compiler to make the automatically injected prelude import dependent on the selected edition.

cc `@rust-lang/libs` `@djc`
2021-03-10 17:55:38 +01:00
..
deriving Borrow builder only once in debug derive 2021-02-10 00:00:00 +00:00
format_foreign mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
asm.rs rustc_parse: Make Parser::unexpected public and use it in built-in macros 2020-10-06 00:23:36 +03:00
assert.rs Fix bug with assert!() calling the wrong edition of panic!(). 2021-02-01 23:23:27 +01:00
cfg.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
cfg_accessible.rs expand: Tell built-in macros whether we are currently in forced expansion mode 2020-11-19 19:25:20 +03:00
cfg_eval.rs rustc_builtin_macros: Share some more logic between derive and cfg_eval 2021-03-07 01:12:18 +03:00
cmdline_attrs.rs Unconditionally capture tokens for attributes. 2020-10-21 18:57:29 -04:00
compile_error.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
concat.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
concat_idents.rs expand: Stop un-interpolating NtIdents before passing them to built-in macros 2020-09-28 23:10:44 +03:00
derive.rs rustc_builtin_macros: Share some more logic between derive and cfg_eval 2021-03-07 01:12:18 +03:00
env.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
format.rs avoid full-slicing slices 2021-02-16 00:31:11 +01:00
format_foreign.rs avoid full-slicing slices 2021-02-16 00:31:11 +01:00
global_allocator.rs Box the biggest ast::ItemKind variants 2021-02-01 09:23:39 +01:00
global_asm.rs Remove some P-s 2021-02-20 10:51:26 +01:00
lib.rs Implement built-in attribute macro #[cfg_eval] 2021-03-06 23:03:19 +03:00
llvm_asm.rs Rollup merge of #80495 - jyn514:rename-empty, r=petrochenkov 2020-12-30 20:56:58 +00:00
log_syntax.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
panic.rs Implement new panic!() behaviour for Rust 2021. 2021-01-25 13:48:11 +01:00
proc_macro_harness.rs ast: Stop using Mod in Crate 2021-02-18 13:07:49 +03:00
source_util.rs expand: Some more consistent naming in module loading 2021-03-05 01:33:43 +03:00
standard_library_imports.rs Rollup merge of #82217 - m-ou-se:edition-prelude, r=nikomatsakis 2021-03-10 17:55:38 +01:00
test.rs Box the biggest ast::ItemKind variants 2021-02-01 09:23:39 +01:00
test_harness.rs ast: Keep expansion status for out-of-line module items 2021-02-18 13:07:49 +03:00
trace_macros.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
util.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00