diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-12 15:47:16 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-19 15:25:54 +1000 |
| commit | 757f73f506a48ff96de54c0cb8c79a25ffbc70d9 (patch) | |
| tree | f92ed5e6ac886abff68e4bd18955dc3dc918c5b7 /compiler/rustc_parse/src/parser/mod.rs | |
| parent | 3d68afc9e821b00d59058abc9bda670b07639955 (diff) | |
| download | rust-757f73f506a48ff96de54c0cb8c79a25ffbc70d9.tar.gz rust-757f73f506a48ff96de54c0cb8c79a25ffbc70d9.zip | |
Simplify `CaptureState::inner_attr_ranges`.
The `Option`s within the `ReplaceRange`s within the hashmap are always `None`. This PR omits them and inserts them when they are extracted from the hashmap.
Diffstat (limited to 'compiler/rustc_parse/src/parser/mod.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index c03527acb2c..9a63a205242 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -225,7 +225,7 @@ enum Capturing { struct CaptureState { capturing: Capturing, replace_ranges: Vec<ReplaceRange>, - inner_attr_ranges: FxHashMap<AttrId, ReplaceRange>, + inner_attr_ranges: FxHashMap<AttrId, Range<u32>>, } /// Iterator over a `TokenStream` that produces `Token`s. It's a bit odd that |
