Rust: skip all token trees in library mode

This commit is contained in:
Paolo Tranquilli
2025-06-02 09:32:39 +02:00
parent 7be44d2fe8
commit fa3fcf0f95

View File

@@ -689,12 +689,7 @@ impl<'a> Translator<'a> {
{
return true;
}
if syntax
.parent()
.and_then(ast::MacroCall::cast)
.and_then(|x| x.token_tree())
.is_some_and(|tt| tt.syntax() == syntax)
{
if syntax.kind() == SyntaxKind::TOKEN_TREE {
return true;
}
}