From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 80EAF385697B for ; Wed, 5 Apr 2023 14:05:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 80EAF385697B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wm1-x331.google.com with SMTP id l10-20020a05600c1d0a00b003f04bd3691eso7159889wms.5 for ; Wed, 05 Apr 2023 07:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1680703532; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=7tTXTtx8/xnSVb54wRORL/77orvdZsHkhaZekhyjbrk=; b=TmIxw8+O+RtpeeZYInuh2NmgtrhZ+FUEvtWjUoCeDdsF2ft+1H8K2g7MiX/H0cQV6u e4YIGwuZ3p+f6rW8VWuyY+UChFk1B2HJNRwOiticOW9FXSUvnqCMwmxD+ZS3jqWj/NGZ Ksd7KfQlz9LbUprXLFZyPlqVMKKZnbTplZ+/GAmOAwzSj7iGe18FSgfqEPiSz2PsGVkk CsjoJT4v4HFy7I3fJXezz4H4E1tFmdO0NOqwyT8cMV3T096xPUwtBx+G6t8DeAsP8rK9 RbkWOmRl6H+HHPQwtgPuqnYLQ26PkX0k+UgSWc3AUweWIhBJKNr7b7S+Sh0XJvvsx4CD k+Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680703532; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7tTXTtx8/xnSVb54wRORL/77orvdZsHkhaZekhyjbrk=; b=C50SA5fw0fuJhoaaIKcwnuW356myRO8wW86M/lr0UGldT5OgGTztjrG8MTFgl1jv9Z r7CAs/EVBdlvtunc3LyAIMPmyASSCXF6O0OOTJ2JgCcr/pWlH/d0r64OHAFkmaSk2i+L iUx3F1BKYbjKXeoaL2aRVf0eIA7AS2tDtCRZN4n84cb5ecWiEPK2bVhrLBRMC7tI2CS1 JLOCIV2SxCb4LngWL+pGNdnWYYhgVPVMjajk10Kxn4Vtp6BF80H7j7YMF9GFWTrOQx45 XpKkIJk3Cr6brPyvl/JjtT+P5gqMWlq2dhPV+Jnovh2FwpOo/T2LjCFs+u6WgwT/VIh0 BqLQ== X-Gm-Message-State: AAQBX9caOQazrfPeLhSnal8jPKHvla4JK2OzLqW4MtLepSJUxCaIZ767 Oaf/t6IdWQk6L8czAnKmrVGUQ8d9YyNQCA948Q== X-Google-Smtp-Source: AKy350ZbVHH+onlP6mbR9tWpfF1FWjreVXP49VEVK52uE8W2DQSc/5M02l0Gdz2/N1OZuo8u3nTkaw== X-Received: by 2002:a05:600c:218d:b0:3ee:36f:3485 with SMTP id e13-20020a05600c218d00b003ee036f3485mr5109703wme.8.1680703532380; Wed, 05 Apr 2023 07:05:32 -0700 (PDT) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id ay8-20020a05600c1e0800b003edddae1068sm2330150wmb.9.2023.04.05.07.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 07:05:32 -0700 (PDT) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Philip Herron Subject: [committed 06/88] gccrs: Add name resolution to generic argument associated item bindings Date: Wed, 5 Apr 2023 16:02:50 +0200 Message-Id: <20230405140411.3016563-7-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230405140411.3016563-1-arthur.cohen@embecosm.com> References: <20230405140411.3016563-1-arthur.cohen@embecosm.com> Reply-To: arthur.cohen@embecosm.com MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Philip Herron 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 gcc/rust/ChangeLog: * resolve/rust-ast-resolve-type.cc (ResolveGenericArgs::go): Add name resolution to Trait items. Signed-off-by: Philip Herron --- 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 16d05f3792b..28ab0697431 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 -- 2.40.0