about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/example/std_example.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-07-04 17:51:16 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-07-07 15:58:36 +1000
commit9d33a8fe513fa237d5c008317e6a268143071597 (patch)
tree975e0bb792c0d7b70f43f554e918a84a14f6de17 /compiler/rustc_codegen_gcc/example/std_example.rs
parentb261501b71c64ede374f71abae914a71dd723072 (diff)
downloadrust-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