public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Add name resolution to generic argument associated item bindings
@ 2023-01-12  7:44 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-01-12  7:44 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:235932042738838ac9ea9f9a32656bcd609c7497

commit 235932042738838ac9ea9f9a32656bcd609c7497
Author: Philip Herron <herron.philip@googlemail.com>
Date:   Sat Jan 7 17:15:23 2023 +0000

    Add name resolution to generic argument associated item bindings
    
    When specifying generic arguments to Traits we can also specify the
    associated types using `<BindingName=i32>` syntax we need to add
    name resolution to the type argument here and rely on the type
    resolution pass to ensure the associated type exists and to setup the
    associated types accordingly.
    
    Addresses #1720
    
    Signed-off-by: Philip Herron <herron.philip@googlemail.com>
    
    gcc/rust/ChangeLog:
    
            * resolve/rust-ast-resolve-type.cc (ResolveGenericArgs::go):

Diff:
---
 gcc/rust/resolve/rust-ast-resolve-type.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/rust/resolve/rust-ast-resolve-type.cc b/gcc/rust/resolve/rust-ast-resolve-type.cc
index 76eb93b9c38..78466039833 100644
--- a/gcc/rust/resolve/rust-ast-resolve-type.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-type.cc
@@ -589,6 +589,11 @@ ResolveGenericArgs::go (AST::GenericArgs &generic_args,
 
       resolver.resolve_disambiguated_generic (arg);
     }
+
+  for (auto &binding : generic_args.get_binding_args ())
+    {
+      ResolveType::go (binding.get_type ().get ());
+    }
 }
 
 } // namespace Resolver

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-12  7:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12  7:44 [gcc/devel/rust/master] Add name resolution to generic argument associated item bindings Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).