aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve-pattern.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-10-21 12:54:52 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2023-02-21 12:36:51 +0100
commit32a4659c5e405771dc8c83568b30efefc77a2031 (patch)
tree6e305de69b6f0dd11b19a24dc90a63e44b4ca912 /gcc/rust/resolve/rust-ast-resolve-pattern.cc
parent01af669357c4e7e974e85177e5d1763012bf113a (diff)
downloadgcc-32a4659c5e405771dc8c83568b30efefc77a2031.zip
gcc-32a4659c5e405771dc8c83568b30efefc77a2031.tar.gz
gcc-32a4659c5e405771dc8c83568b30efefc77a2031.tar.bz2
gccrs: Refactor name resolver to take a Rib::ItemType
This allows us to track the type of declaration that is stored within a Rib. gcc/rust/ChangeLog: * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Add Rib argument. (ResolveExpr::resolve_closure_param): Likewise. * resolve/rust-ast-resolve-implitem.h: Likewise. * resolve/rust-ast-resolve-item.cc (ResolveTraitItems::visit): Likewise. (ResolveItem::visit): Likewise. * resolve/rust-ast-resolve-pattern.cc (PatternDeclaration::visit): Likewise. * resolve/rust-ast-resolve-pattern.h: Likewise. * resolve/rust-ast-resolve-stmt.h: Likewise. * resolve/rust-ast-resolve-toplevel.h: Likewise. * resolve/rust-ast-resolve-type.h: Likewise. * resolve/rust-name-resolver.cc (Rib::lookup_decl_type): Likewise. (Scope::insert): Likewise. (Resolver::insert_builtin_types): Likewise. * resolve/rust-name-resolver.h: Likewise.
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-pattern.cc')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-pattern.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-pattern.cc b/gcc/rust/resolve/rust-ast-resolve-pattern.cc
index 483d190..10f4fd8 100644
--- a/gcc/rust/resolve/rust-ast-resolve-pattern.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-pattern.cc
@@ -49,7 +49,7 @@ PatternDeclaration::visit (AST::TupleStructPattern &pattern)
for (auto &inner_pattern : items_no_range.get_patterns ())
{
- PatternDeclaration::go (inner_pattern.get ());
+ PatternDeclaration::go (inner_pattern.get (), type);
}
}
break;