diff options
Diffstat (limited to 'gcc/rust/ast/rust-ast-visitor.cc')
-rw-r--r-- | gcc/rust/ast/rust-ast-visitor.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/rust/ast/rust-ast-visitor.cc b/gcc/rust/ast/rust-ast-visitor.cc index e2e2d9d..077b41b 100644 --- a/gcc/rust/ast/rust-ast-visitor.cc +++ b/gcc/rust/ast/rust-ast-visitor.cc @@ -89,8 +89,10 @@ void DefaultASTVisitor::visit (AST::PathInExpression &path) { visit_outer_attrs (path); - for (auto &segment : path.get_segments ()) - visit (segment); + + if (!path.is_lang_item ()) + for (auto &segment : path.get_segments ()) + visit (segment); } void |