public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Add name resolution to generic argument associated item bindings Date: Thu, 12 Jan 2023 07:44:49 +0000 (GMT) [thread overview] Message-ID: <20230112074449.CBA92385438E@sourceware.org> (raw) 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
reply other threads:[~2023-01-12 7:44 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230112074449.CBA92385438E@sourceware.org \ --to=tschwinge@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).