Skip to content

Commit fa3fcf0

Browse files
author
Paolo Tranquilli
committed
Rust: skip all token trees in library mode
1 parent 7be44d2 commit fa3fcf0

File tree

1 file changed

+1
-6
lines changed
  • rust/extractor/src/translate

1 file changed

+1
-6
lines changed

rust/extractor/src/translate/base.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -689,12 +689,7 @@ impl<'a> Translator<'a> {
689689
{
690690
return true;
691691
}
692-
if syntax
693-
.parent()
694-
.and_then(ast::MacroCall::cast)
695-
.and_then(|x| x.token_tree())
696-
.is_some_and(|tt| tt.syntax() == syntax)
697-
{
692+
if syntax.kind() == SyntaxKind::TOKEN_TREE {
698693
return true;
699694
}
700695
}

0 commit comments

Comments
 (0)