mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
fix: Strip unused token ids from eager macro input token maps
This commit is contained in:
parent
bf5624664d
commit
c7b34e4873
5 changed files with 37 additions and 7 deletions
|
@ -117,4 +117,8 @@ impl TokenMap {
|
|||
TokenTextRange::Delimiter(_) => None,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn filter(&mut self, id: impl Fn(tt::TokenId) -> bool) {
|
||||
self.entries.retain(|&(tid, _)| id(tid));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue