rust/src/librustc_span
bors e482c86b9d Auto merge of #73084 - Aaron1011:feature/new-recursive-expand, r=petrochenkov
Re-land PR #72388:  Recursively expand `TokenKind::Interpolated` in `probably_equal_for_proc_macro`

PR #72388 allowed us to preserve the original `TokenStream` in more cases during proc-macro expansion, but had to be reverted due to a large number of regressions (See #72545 and #72622). These regressions fell into two categories

1. Missing handling for `Group`s with `Delimiter::None`, which are inserted during `macro_rules!` expansion (but are lost during stringification and re-parsing). A large number of these regressions were due to `syn` and `proc-macro-hack`, but several crates needed changes to their own proc-macro code.
2. Legitimate hygiene issues that were previously being masked by stringification. Some of these were relatively benign (e.g. [a compiliation error](https://github.com/paritytech/parity-scale-codec/pull/210) caused by misusing `quote_spanned!`). However, two crates had intentionally written unhygenic `macro_rules!` macros, which were able to access identifiers that were not passed as arguments (see https://github.com/rust-lang/rust/issues/72622#issuecomment-636402573).

All but one of the Crater regressions have now been fixed upstream (see https://hackmd.io/ItrXWRaSSquVwoJATPx3PQ?both). The remaining crate (which has a PR pending at https://github.com/sammhicks/face-generator/pull/1) is not on `crates.io`, and is a Yew application that seems unlikely to have any reverse dependencies.

As @petrochenkov mentioned in https://github.com/rust-lang/rust/issues/72545#issuecomment-638632434, not re-landing PR #72388 allows more crates to write unhygenic `macro_rules!` macros, which will eventually stop compiling. Since there is only one Crater regression remaining, since additional crates could write unhygenic `macro_rules!` macros in the time it takes that PR to be merged.
2020-08-23 01:44:36 +00:00
..
analyze_source_file Rename directories for some crates from syntax_x to rustc_x 2019-12-30 19:18:16 +03:00
source_map Normalize source when loading external foreign source into SourceMap 2020-04-11 23:26:46 -07:00
symbol Eliminate confusing "globals" terminology. 2020-07-09 14:11:44 +10:00
analyze_source_file.rs Rename directories for some crates from syntax_x to rustc_x 2019-12-30 19:18:16 +03:00
caching_source_map_view.rs remove redundant returns (clippy::needless_return) 2020-03-20 20:23:03 +01:00
Cargo.toml replaced log with tracing 2020-08-15 13:03:11 -07:00
def_id.rs Rework rustc_serialize 2020-08-14 17:34:30 +01:00
edition.rs Rework rustc_serialize 2020-08-14 17:34:30 +01:00
fatal_error.rs Rename directories for some crates from syntax_x to rustc_x 2019-12-30 19:18:16 +03:00
hygiene.rs replaced log with tracing 2020-08-15 13:03:11 -07:00
lib.rs Rework rustc_serialize 2020-08-14 17:34:30 +01:00
source_map.rs replaced log with tracing 2020-08-15 13:03:11 -07:00
span_encoding.rs rustc_span: use IndexSet in SpanInterner 2020-08-09 12:25:22 -07:00
symbol.rs Auto merge of #73084 - Aaron1011:feature/new-recursive-expand, r=petrochenkov 2020-08-23 01:44:36 +00:00
tests.rs Rename directories for some crates from syntax_x to rustc_x 2019-12-30 19:18:16 +03:00