rust/compiler/rustc_expand/src
Aaron Hill f190bc4f47
Introduce proc_macro_back_compat lint, and emit for time-macros-impl
Now that future-incompat-report support has landed in nightly Cargo, we
can start to make progress towards removing the various proc-macro
back-compat hacks that have accumulated in the compiler.

This PR introduces a new lint `proc_macro_back_compat`, which results in
a future-incompat-report entry being generated. All proc-macro
back-compat warnings will be grouped under this lint. Note that this
lint will never actually become a hard error - instead, we will remove
the special cases for various macros, which will cause older versions of
those crates to emit some other error.

I've added code to fire this lint for the `time-macros-impl` case. This
is the easiest case out of all of our current back-compat hacks - the
crate was renamed to `time-macros`, so seeing a filename with
`time-macros-impl` guarantees that an older version of the parent `time`
crate is in use.

When Cargo's future-incompat-report feature gets stabilized, affected
users will start to see future-incompat warnings when they build their
crates.
2021-03-14 21:31:46 -04:00
..
mbe Add SEMICOLON_IN_EXPRESSIONS_FROM_MACROS lint 2021-01-28 08:51:43 -05:00
mut_visit ast: Stop using Mod in Crate 2021-02-18 13:07:49 +03:00
parse ast: Keep expansion status for out-of-line module items 2021-02-18 13:07:49 +03:00
tokenstream mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
base.rs Auto merge of #82422 - petrochenkov:allunst, r=oli-obk 2021-03-12 11:46:50 +00:00
build.rs Properly handle attributes on statements 2020-11-26 17:08:35 -05:00
config.rs Move full configuration logic from rustc_expand to rustc_builtin_macros 2021-03-07 00:17:31 +03:00
expand.rs expand: Resolve and expand inner attributes on out-of-line modules 2021-03-14 18:10:29 +03:00
lib.rs expand: Introduce enum for module loading errors and make module loading speculative 2021-03-05 01:33:43 +03:00
mbe.rs Revert "Promote missing_fragment_specifier to hard error" 2020-12-22 09:33:16 -05:00
module.rs expand: Resolve and expand inner attributes on out-of-line modules 2021-03-14 18:10:29 +03:00
placeholders.rs expand: Remove obsolete ExpansionConfig::keep_macs 2021-02-14 19:43:54 +03:00
proc_macro_server.rs Introduce proc_macro_back_compat lint, and emit for time-macros-impl 2021-03-14 21:31:46 -04:00
proc_macro.rs expand/resolve: Turn #[derive] into a regular macro attribute 2021-02-07 20:08:45 +03:00
tests.rs remove redundant closures (clippy::redundant_closure) 2021-01-03 13:34:24 +01:00