mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
Remove unused Subtree::visit_ids function
This commit is contained in:
parent
8f6a72871e
commit
1451270372
1 changed files with 0 additions and 13 deletions
|
@ -76,19 +76,6 @@ impl<S: Span> Subtree<S> {
|
|||
pub const fn empty(span: DelimSpan<S>) -> Self {
|
||||
Subtree { delimiter: Delimiter::invisible_delim_spanned(span), token_trees: vec![] }
|
||||
}
|
||||
|
||||
pub fn visit_ids(&mut self, f: &mut impl FnMut(S) -> S) {
|
||||
self.delimiter.open = f(self.delimiter.open);
|
||||
self.delimiter.close = f(self.delimiter.close);
|
||||
self.token_trees.iter_mut().for_each(|tt| match tt {
|
||||
crate::TokenTree::Leaf(leaf) => match leaf {
|
||||
crate::Leaf::Literal(it) => it.span = f(it.span),
|
||||
crate::Leaf::Punct(it) => it.span = f(it.span),
|
||||
crate::Leaf::Ident(it) => it.span = f(it.span),
|
||||
},
|
||||
crate::TokenTree::Subtree(s) => s.visit_ids(f),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
|
|
Loading…
Reference in a new issue