rust/compiler/rustc_parse/src/parser
Nicholas Nethercote 9d33a8fe51 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).
2024-07-07 15:58:36 +10:00
..
mut_visit Specialize assert_pred. 2024-06-06 08:26:54 +10:00
tokenstream Move some tests from rustc_expand to rustc_parse. 2024-05-06 09:06:02 +10:00
attr_wrapper.rs Simplify ReplaceRange. 2024-07-07 15:58:36 +10:00
attr.rs Simplify ReplaceRange. 2024-07-07 15:58:36 +10:00
diagnostics.rs Rollup merge of #126125 - dev-ardi:conflict-markers, r=estebank 2024-06-21 09:12:34 +02:00
expr.rs Rollup merge of #127103 - compiler-errors:tighten-trait-bound-parsing, r=fmease 2024-06-29 09:14:59 +02:00
generics.rs Move binder and polarity parsing into parse_generic_ty_bound 2024-06-28 19:40:31 -04:00
item.rs StaticForeignItem and StaticItem are the same 2024-06-20 19:51:09 -04:00
mod.rs Simplify ReplaceRange. 2024-07-07 15:58:36 +10:00
nonterminal.rs Rework pattern and expression nonterminal kinds. 2024-06-23 15:57:24 +10:00
pat.rs Inline can_begin_literal_maybe_minus call into two places. 2024-06-20 04:50:38 +10:00
path.rs Change RTN to use .. again 2024-06-28 14:20:43 -04:00
stmt.rs Refactor parse_expr_res. 2024-06-19 19:12:02 +10:00
tests.rs Special case when a code line only has multiline span starts 2024-06-23 22:00:52 +00:00
ty.rs Move binder and polarity parsing into parse_generic_ty_bound 2024-06-28 19:40:31 -04:00