diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-24 20:29:28 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-24 21:03:52 +1000 |
| commit | ac26b883bf3824de42e7adbf0fa69e24f2586ddf (patch) | |
| tree | 83099ceb7cdefd601b0f4874647f2558d5178285 /compiler/rustc_parse/src/errors.rs | |
| parent | 08a9ca7c18a30a23a72a43b65be616c9a6a36a5a (diff) | |
| download | rust-ac26b883bf3824de42e7adbf0fa69e24f2586ddf.tar.gz rust-ac26b883bf3824de42e7adbf0fa69e24f2586ddf.zip | |
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.
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
