From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id D0F123858C31 for ; Wed, 5 Apr 2023 14:05:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D0F123858C31 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-x32e.google.com with SMTP id he13so1340028wmb.2 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=LM6KnCReT3WueWFphcyKLEu1yL+0kyYbdvZLXYfVx7Ha43mqJEgOGj6BnhyQw/jM2r nmWZF/zr02TdfHjftBMugu0UipEf//be0rE8PMROXvk62QoxCeSnlWf2mhqDBpMpqIhV JqSDT3O0tjklVYhVs+8s1JtQ/9XgBqQcLnwe+YX0GOiRWmkQF5uJTAOw+ZrZgT6efx4Z VLVX4OvuxmbSFGLcBpsnAFYkO0kwuogfaqHAWfjNGb9pqrIEuhCHcwTuPNoWNp9nPORu 2DtJI2AmdE7hYBF682xouW+1lGSPcLSiI2sfbRQsjWmPm6EJKhS4uLj5bxfFVkJXWnsq 9wOQ== X-Gm-Message-State: AAQBX9fu0sgMDeZKY9IXCb2wYySY5BEyIKl74Tor4hOvkKoC+IciwTGo ngZL8clow4BLlwGJu8bejhEtzic5FnwVxV7Pdw== 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.3 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=unavailable 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