From patchwork Thu Aug 1 14:58:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 1967830 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256 header.s=google header.b=FuVY9jsj; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WZY0v4dy4z1yZv for ; Fri, 2 Aug 2024 01:34:23 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E00153861837 for ; Thu, 1 Aug 2024 15:34:21 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by sourceware.org (Postfix) with ESMTPS id 2A520385E441 for ; Thu, 1 Aug 2024 15:00:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A520385E441 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2A520385E441 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::529 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722524511; cv=none; b=YCCXckbsSgNBYTPUQEobhlp0q/Icl1RYv23PnLxMBr0rAwMX9GwXhEbHA3kKk9f2WDsS3B78nuoLrpvqdsqZVmQpioVXeCQme3gpPpSxlPNnQghqo9O0jdbPRbHl2M/1wxt24EBdeOGo+8FTUl3fBgsYtU4VMqBAoIGhdNW7+2c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722524511; c=relaxed/simple; bh=JjcPsorQkNB8sAI74f3WMQjOXhGoF6kipCl++92R8Ns=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=I9kPC19Pu+gXvZOFQG0aSJ/qVGWm8P8nd0mV7LDzs0k+uZ1d3GMW/gW74EkCnMeoFKoiuUqUOyAP/SD9MHWUZ5pwUM6GeWyD23jl5T/9+uMTp1pzGnyJ/FGbyr33beAZxDiRWqRr4MKVy+xV7bFTRutBPrWcnXy6Pz7yjoiFH0w= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5af6a1afa7bso7885461a12.1 for ; Thu, 01 Aug 2024 08:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1722524458; x=1723129258; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=D3H+dmGmVIHgc1j7SYe2PUlls6mOO47VYD+3WHuNWT4=; b=FuVY9jsjY+zWL3K2C7QpNH9Fvqo733fQLgKQNGSRXWZFz6CsNuV/VoOKVO30gj6nn0 7jLGXB6Qo0tx+II5ce1je3W5RLPKRnZS7d2zaEuwRfoDiY7BUQ/NFoezLg/0IZwSUbf5 LDeX9zSvbxizPYacvWcpcZA/TNGaVolP0LLX8a/qe9d7G63sjqm7TUpWcVD2Bgk4Wgy9 HcxKc76K0cMrH7yLQhsj6+hrRW/a3Rym4HKHRYTzW8kBgHvPQZQGbgpOQAuydbXGg8Bn hHeJWqGwtngGfUs1C61zL1obuIh9CiqO/fJg5w6v8D/o0SLkp7S/nb7btIeOfRrG7Nn7 GPaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722524458; x=1723129258; h=content-transfer-encoding:mime-version: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=D3H+dmGmVIHgc1j7SYe2PUlls6mOO47VYD+3WHuNWT4=; b=nz5IsbwLy0gjPO4+Oy0tdITzQZEFxN2rvxddMnb6/xzgtE/ERFIhdcclc+4sQrlVuQ ysZgvOZH/OcDHhwz8bszpcewf4tmi/LWGEKnpM5WY966QgweOleS/+neJRVwetG2GCul Ym5fSE7qIN2+XDubkjQa8qkpybEGNNpCkBTwnCxLE3/pK+r9p31yiS3p/iuVc6XEZ4WR XA/qqTCuwWdCc8R0Nq1jjy/i5OaisgH+x5KsRoWGPf5FgUnbAcXkfZaFrjzNrJEbzFdB ZnGrRUp4KRltVuZ7qTHHBrKOqNih/UlSkTGHl/QAp9qdjYLxBW9Ny4BiI61As+iTW+jz yKzQ== X-Gm-Message-State: AOJu0Yye0SEcwjvtFKpEgXYil2CSDXO9HQbq+PLScK1ttM17rKomiEdI Q5an289/W1tOy19TM+kRn3poBms0XQ7WN7litKuPbA31eonqOJOI9dcvT8QGFBAWMdqlcote4V5 sjqbb X-Google-Smtp-Source: AGHT+IGM6TCrKGFGqW6hvPAtI8e8gmrbAJrRXvTlLVp7d5e+SYn1FAY/ytl2KKEDTCJYt56nQRMuEw== X-Received: by 2002:a05:6402:284:b0:5af:51d6:d8e with SMTP id 4fb4d7f45d1cf-5b7f419f7f8mr415585a12.20.1722524457476; Thu, 01 Aug 2024 08:00:57 -0700 (PDT) Received: from platypus.lan ([2a04:cec2:9:dc84:3622:6733:ff49:ee91]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac63590592sm10252456a12.25.2024.08.01.08.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 08:00:57 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Pierre-Emmanuel Patry Subject: [PATCH 125/125] gccrs: Add a test for inherent impl type name resolve Date: Thu, 1 Aug 2024 16:58:01 +0200 Message-ID: <20240801145809.366388-127-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801145809.366388-2-arthur.cohen@embecosm.com> References: <20240801145809.366388-2-arthur.cohen@embecosm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.2 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org From: Pierre-Emmanuel Patry A previous bug with name resolution 2.0 was caused by an incorrectly resolved inherent impl name. This test shall highlight the behavior and prevent regression. gcc/testsuite/ChangeLog: * rust/compile/name_resolution25.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/name_resolution25.rs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 gcc/testsuite/rust/compile/name_resolution25.rs diff --git a/gcc/testsuite/rust/compile/name_resolution25.rs b/gcc/testsuite/rust/compile/name_resolution25.rs new file mode 100644 index 00000000000..3cacac7f64b --- /dev/null +++ b/gcc/testsuite/rust/compile/name_resolution25.rs @@ -0,0 +1,5 @@ +// { dg-options "-frust-name-resolution-2.0" } + +struct Test; // { dg-warning "struct is never constructed: .Test." } + +impl Test {}