diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-07-01 20:35:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-01 20:35:44 -0700 |
| commit | 8ed5c0d37a79d22b919c969141f3453ade407ca1 (patch) | |
| tree | 388fd6b4f3aa200b94c56711bdb4f09e33a542d7 /src/rustllvm/CoverageMappingWrapper.cpp | |
| parent | 3d391d2a733404415010afadb4b0ffdf84c928a4 (diff) | |
| parent | eb4ba55055393961a51ae47fee1e734e095d91ef (diff) | |
| download | rust-8ed5c0d37a79d22b919c969141f3453ade407ca1.tar.gz rust-8ed5c0d37a79d22b919c969141f3453ade407ca1.zip | |
Rollup merge of #73345 - petrochenkov:nointerp, r=Aaron1011
expand: Stop using nonterminals for passing tokens to attribute and derive macros Make one more step towards fully token-based expansion and fix issues described in https://github.com/rust-lang/rust/issues/72545#issuecomment-640276791. Now `struct S;` is passed to `foo!(struct S;)` and `#[foo] struct S;` in the same way - as a token stream `struct S ;`, rather than a single non-terminal token `NtItem` which is then broken into parts later. The cost is making pretty-printing of token streams less pretty. Some of the pretty-printing regressions will be recovered by keeping jointness with each token, which we will need to do anyway. Unfortunately, this is not exactly the same thing as https://github.com/rust-lang/rust/pull/73102. One more observable effect is how `$crate` is printed in the attribute input. Inside `NtItem` was printed as `crate` or `that_crate`, now as a part of a token stream it's printed as `$crate` (there are good reasons for these differences, see https://github.com/rust-lang/rust/pull/62393 and related PRs). This may break old proc macros (custom derives) written before the main portion of the proc macro API (macros 1.2) was stabilized, those macros did `input.to_string()` and reparsed the result, now that result can contain `$crate` which cannot be reparsed. So, I think we should do this regardless, but we need to run crater first. r? @Aaron1011
Diffstat (limited to 'src/rustllvm/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
