diff --git a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc index e51aef8e9d0..36900376556 100644 --- a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc +++ b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc @@ -109,6 +109,15 @@ TopLevel::visit (AST::Trait &trait) DefaultResolver::visit (trait); } +void +TopLevel::visit (AST::TraitItemType &trait_item) +{ + insert_or_error_out (trait_item.get_identifier ().as_string (), trait_item, + Namespace::Types); + + DefaultResolver::visit (trait_item); +} + template static void insert_macros (std::vector ¯os, NameResolutionContext &ctx) diff --git a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h index ce84cd392fe..081ad2ddd82 100644 --- a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h +++ b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h @@ -148,6 +148,7 @@ class TopLevel : public DefaultResolver void visit (AST::Module &module) override; void visit (AST::Trait &trait) override; + void visit (AST::TraitItemType &trait_item) override; void visit (AST::MacroRulesDefinition ¯o) override; void visit (AST::Function &function) override; void visit (AST::BlockExpr &expr) override; diff --git a/gcc/testsuite/rust/compile/nr2/exclude b/gcc/testsuite/rust/compile/nr2/exclude index 2a5bc94b646..760fa735f60 100644 --- a/gcc/testsuite/rust/compile/nr2/exclude +++ b/gcc/testsuite/rust/compile/nr2/exclude @@ -74,8 +74,6 @@ issue-2139.rs issue-2142.rs issue-2165.rs issue-2166.rs -issue-2190-1.rs -issue-2190-2.rs issue-2238.rs issue-2304.rs issue-2330.rs @@ -85,7 +83,6 @@ issue-2723-1.rs issue-2723-2.rs issue-2772-2.rs issue-2775.rs -issue-2747.rs issue-2782.rs issue-2812.rs issue-850.rs @@ -98,7 +95,6 @@ macros/mbe/macro-issue1233.rs macros/mbe/macro-issue1400.rs macros/mbe/macro13.rs macros/mbe/macro15.rs -macros/mbe/macro20.rs macros/mbe/macro23.rs macros/mbe/macro40.rs macros/mbe/macro43.rs @@ -198,7 +194,6 @@ iflet.rs issue-3033.rs issue-3009.rs issue-2323.rs -issue-2953-1.rs issue-2953-2.rs issue-1773.rs issue-2905-1.rs