diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-24 18:00:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-24 18:00:41 +0200 |
| commit | 2dc88bf88a3a17297670fc0be54286d900bc2ca1 (patch) | |
| tree | 42864ca51febcf71324086fdd09835a086409ac1 /compiler/rustc_parse/src/errors.rs | |
| parent | f3a7c3fd3b252da0f7b955d66d7ea975d03c7f98 (diff) | |
| parent | ac26b883bf3824de42e7adbf0fa69e24f2586ddf (diff) | |
| download | rust-2dc88bf88a3a17297670fc0be54286d900bc2ca1.tar.gz rust-2dc88bf88a3a17297670fc0be54286d900bc2ca1.zip | |
Rollup merge of #128133 - nnethercote:fix-cfg_attr-spans, r=petrochenkov
Improve spans on evaluated `cfg_attr`s. When converting something like `#![cfg_attr(cond, attr)]` into `#![attr]`, we currently duplicate the `#` token and the `!` token. But weirdly, there is also this comment: // We don't really have a good span to use for the synthesized `[]` // in `#[attr]`, so just use the span of the `#` token. Maybe that comment used to be true? But now it is false: we can duplicate the existing delimiters (and their spans and spacing), much like we do for the `#` and `!`. This commit does that, thus removing the incorrect comment, and improving the spans on `Group`s in a few proc-macro tests. `@petrochenkov`
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
