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.
This commit is contained in:
parent
b7e7f6e903
commit
1fdabfbebb
6 changed files with 30 additions and 35 deletions
|
@ -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>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue