mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Cleanup
This commit is contained in:
parent
c203cd4cb7
commit
f5f3921fab
@ -20,6 +20,7 @@ use syntax::{
|
|||||||
},
|
},
|
||||||
match_ast,
|
match_ast,
|
||||||
ted::{self, Position},
|
ted::{self, Position},
|
||||||
|
SyntaxElement,
|
||||||
SyntaxKind::*,
|
SyntaxKind::*,
|
||||||
SyntaxNode, T,
|
SyntaxNode, T,
|
||||||
};
|
};
|
||||||
@ -222,12 +223,7 @@ fn tag_generics_in_variant(
|
|||||||
types: &mut [(ast::TypeParam, bool)],
|
types: &mut [(ast::TypeParam, bool)],
|
||||||
consts: &mut [(ast::ConstParam, bool)],
|
consts: &mut [(ast::ConstParam, bool)],
|
||||||
) {
|
) {
|
||||||
for token in
|
for token in ty.syntax().descendants_with_tokens().filter_map(SyntaxElement::into_token) {
|
||||||
ty.syntax().preorder_with_tokens().filter_map(|node_or_token| match node_or_token {
|
|
||||||
syntax::WalkEvent::Enter(syntax::NodeOrToken::Token(token)) => Some(token),
|
|
||||||
_ => None,
|
|
||||||
})
|
|
||||||
{
|
|
||||||
match token.kind() {
|
match token.kind() {
|
||||||
T![lifetime_ident] => {
|
T![lifetime_ident] => {
|
||||||
for (lt, present) in lifetimes.iter_mut() {
|
for (lt, present) in lifetimes.iter_mut() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user