From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id CBA92385438E; Thu, 12 Jan 2023 07:44:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CBA92385438E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673509489; bh=6LkU0PtRUNZOo8pKGt6OvEXr/AoU0rPiLF7g+D5S4K8=; h=From:To:Subject:Date:From; b=nlmS8c22fk/oMBMQxrr8AvDAi5bPQveuWlgLs1t0cFG+hRujtnQe4OK/SGuRypf3c /8F8mVK2URqXiSw+kAT/QtvhvDA1ba67tcC8LpcfLuysnNntbJBxz58qMcOg2Rz9RZ m5UrBnNy9IKUc4tKtEDPqhWnENvkd5cpYPL4F5mc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Add name resolution to generic argument associated item bindings X-Act-Checkin: gcc X-Git-Author: Philip Herron X-Git-Refname: refs/heads/devel/rust/master X-Git-Oldrev: 3290293e16fa47cf59f0434343c1bf40497ede90 X-Git-Newrev: 235932042738838ac9ea9f9a32656bcd609c7497 Message-Id: <20230112074449.CBA92385438E@sourceware.org> Date: Thu, 12 Jan 2023 07:44:49 +0000 (GMT) List-Id: https://gcc.gnu.org/g:235932042738838ac9ea9f9a32656bcd609c7497 commit 235932042738838ac9ea9f9a32656bcd609c7497 Author: Philip Herron 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 `` 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 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