diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-10-21 12:54:52 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-21 12:36:51 +0100 |
commit | 32a4659c5e405771dc8c83568b30efefc77a2031 (patch) | |
tree | 6e305de69b6f0dd11b19a24dc90a63e44b4ca912 /gcc/rust/resolve/rust-ast-resolve-pattern.cc | |
parent | 01af669357c4e7e974e85177e5d1763012bf113a (diff) | |
download | gcc-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.cc | 2 |
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; |