diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-26 10:54:56 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-26 14:18:20 +1000 |
| commit | a560810a69a09452b4cd0c3173b6af98496dba35 (patch) | |
| tree | 61be6542bf923e05fb1d530a122919c7ef0bea85 /compiler/rustc_parse/src/errors.rs | |
| parent | 6106b05b27988f4b946d7af219a6db95fb4477a1 (diff) | |
| download | rust-a560810a69a09452b4cd0c3173b6af98496dba35.tar.gz rust-a560810a69a09452b4cd0c3173b6af98496dba35.zip | |
Don't include inner attribute ranges in `CaptureState`.
The current code is this: ``` self.capture_state.replace_ranges.push((start_pos..end_pos, Some(target))); self.capture_state.replace_ranges.extend(inner_attr_replace_ranges); ``` What's not obvious is that every range in `inner_attr_replace_ranges` must be a strict sub-range of `start_pos..end_pos`. Which means, in `LazyAttrTokenStreamImpl::to_attr_token_stream`, they will be done first, and then the `start_pos..end_pos` replacement will just overwrite them. So they aren't needed.
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
