diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-08-21 14:16:42 +1000 | 
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-08-24 06:57:47 +1000 | 
| commit | 1fdabfbebbb12b2836f91aeec3157fd092f9a8ad (patch) | |
| tree | a265515e278fed64245e30890ce24638a9d7b167 /compiler/rustc_index/src/interval.rs | |
| parent | b7e7f6e903ac28021a4b099d63eefd35f125c2a6 (diff) | |
| download | rust-1fdabfbebbb12b2836f91aeec3157fd092f9a8ad.tar.gz rust-1fdabfbebbb12b2836f91aeec3157fd092f9a8ad.zip | |
Avoid double-handling of attributes in `collect_tokens`.
By keeping track of attributes that have been previously processed. This fixes the `macro-rules-derive-cfg.stdout` test, and is necessary for #124141 which removes nonterminals. Also shrink the `SmallVec` inline size used in `IntervalSet`. 2 gives slightly better perf than 4 now that there's an `IntervalSet` in `Parser`, which is cloned reasonably often.
Diffstat (limited to 'compiler/rustc_index/src/interval.rs')
| -rw-r--r-- | compiler/rustc_index/src/interval.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/compiler/rustc_index/src/interval.rs b/compiler/rustc_index/src/interval.rs index be028feca60..503470f896d 100644 --- a/compiler/rustc_index/src/interval.rs +++ b/compiler/rustc_index/src/interval.rs @@ -18,7 +18,7 @@ mod tests; #[derive(Debug, Clone)] pub struct IntervalSet<I> { // Start, end - map: SmallVec<[(u32, u32); 4]>, + map: SmallVec<[(u32, u32); 2]>, domain: usize, _data: PhantomData<I>, } | 
