From 0447e230f68570b1f35055cd0fa8d4befb57414f Mon Sep 17 00:00:00 2001 From: Owen Avery Date: Sat, 28 Dec 2024 15:58:41 -0500 Subject: [PATCH] Visit the trait paths of trait implementations gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): When visiting a TraitImpl, visit its trait path. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entries. Signed-off-by: Owen Avery --- gcc/rust/ast/rust-ast-visitor.cc | 1 + gcc/testsuite/rust/compile/nr2/exclude | 36 -------------------------- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/gcc/rust/ast/rust-ast-visitor.cc b/gcc/rust/ast/rust-ast-visitor.cc index 7c5117d48db..228f81a647f 100644 --- a/gcc/rust/ast/rust-ast-visitor.cc +++ b/gcc/rust/ast/rust-ast-visitor.cc @@ -1039,6 +1039,7 @@ DefaultASTVisitor::visit (AST::TraitImpl &impl) if (impl.has_where_clause ()) visit (impl.get_where_clause ()); visit (impl.get_type ()); + visit (impl.get_trait_path ()); visit_inner_attrs (impl); for (auto &item : impl.get_impl_items ()) visit (item); diff --git a/gcc/testsuite/rust/compile/nr2/exclude b/gcc/testsuite/rust/compile/nr2/exclude index 760fa735f60..bb8166e6aeb 100644 --- a/gcc/testsuite/rust/compile/nr2/exclude +++ b/gcc/testsuite/rust/compile/nr2/exclude @@ -13,7 +13,6 @@ cfg4.rs cfg5.rs closure_no_type_anno.rs complex-path1.rs -complex_qualified_path_in_expr.rs const-issue1440.rs const_generics_3.rs const_generics_4.rs @@ -27,7 +26,6 @@ derive_macro6.rs expected_type_args2.rs expected_type_args3.rs feature_rust_attri0.rs -for_lifetimes.rs format_args_basic_expansion.rs generic-default1.rs generics1.rs @@ -41,10 +39,8 @@ generics6.rs generics8.rs generics9.rs if_let_expr.rs -issue-1019.rs issue-1031.rs issue-1034.rs -issue-1129-2.rs issue-1130.rs issue-1165.rs issue-1173.rs @@ -59,25 +55,13 @@ issue-1786.rs issue-1893.rs issue-1901.rs issue-1981.rs -issue-2019-1.rs -issue-2019-2.rs -issue-2019-3.rs issue-2036.rs -issue-2037.rs issue-2043.rs -issue-2070.rs issue-2105.rs -issue-2135.rs -issue-2136-1.rs issue-2136-2.rs -issue-2139.rs issue-2142.rs -issue-2165.rs -issue-2166.rs issue-2238.rs -issue-2304.rs issue-2330.rs -issue-2478.rs issue-2479.rs issue-2723-1.rs issue-2723-2.rs @@ -88,11 +72,9 @@ issue-2812.rs issue-850.rs issue-852.rs issue-855.rs -issue-925.rs iterators1.rs lookup_err1.rs macros/mbe/macro-issue1233.rs -macros/mbe/macro-issue1400.rs macros/mbe/macro13.rs macros/mbe/macro15.rs macros/mbe/macro23.rs @@ -121,7 +103,6 @@ nested_generic.rs nested_macro_use1.rs nested_macro_use2.rs nested_macro_use3.rs -non_member_const.rs not_find_value_in_scope.rs parse_associated_type_as_generic_arg.rs parse_associated_type_as_generic_arg2.rs @@ -146,17 +127,10 @@ redef_error6.rs self-path1.rs self-path2.rs sizeof-stray-infer-var-bug.rs -stmt_with_block_dot.rs struct-expr-parse.rs -traits1.rs -traits12.rs -traits2.rs traits3.rs -traits4.rs -traits5.rs traits6.rs traits7.rs -traits8.rs type-bindings1.rs unconstrained_type_param.rs undeclared_label.rs @@ -165,27 +139,17 @@ use_2.rs v0-mangle1.rs v0-mangle2.rs while_break_expr.rs -negative_impls.rs exhaustiveness1.rs exhaustiveness2.rs exhaustiveness3.rs -trait13.rs -trait14.rs issue-2324-1.rs issue-2324-2.rs issue-2987.rs -issue-3045-1.rs -issue-3045-2.rs issue-3046.rs -issue-3030.rs issue-3035.rs issue-3139-1.rs issue-3139-2.rs -issue-3139-3.rs -issue-3036.rs issue-2951.rs -issue-2203.rs -issue-2499.rs issue-3032-1.rs issue-3032-2.rs # https://github.com/Rust-GCC/gccrs/issues/3189