diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-04 17:51:16 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-07-07 15:58:36 +1000 |
| commit | 9d33a8fe513fa237d5c008317e6a268143071597 (patch) | |
| tree | 975e0bb792c0d7b70f43f554e918a84a14f6de17 /compiler/rustc_codegen_gcc/example/std_example.rs | |
| parent | b261501b71c64ede374f71abae914a71dd723072 (diff) | |
| download | rust-9d33a8fe513fa237d5c008317e6a268143071597.tar.gz rust-9d33a8fe513fa237d5c008317e6a268143071597.zip | |
Simplify `ReplaceRange`.
Currently the second element is a `Vec<(FlatToken, Spacing)>`. But the vector always has zero or one elements, and the `FlatToken` is always `FlatToken::AttrTarget` (which contains an `AttributesData`), and the spacing is always `Alone`. So we can simplify it to `Option<AttributesData>`. An assertion in `to_attr_token_stream` can can also be removed, because `new_tokens.len()` was always 0 or 1, which means than `range.len()` is always greater than or equal to it, because `range.is_empty()` is always false (as per the earlier assertion).
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions
