From patchwork Tue Jan 30 12:06:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 194091 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1184138dyb; Tue, 30 Jan 2024 04:30:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwm/SH+HrCPLvX98E4XwPPsKDpi2RUYJ50Ra4qJuOowMoEeN6fHW6rsUf84OXpcVnWkr1X X-Received: by 2002:ac8:5752:0:b0:42a:7372:d72d with SMTP id 18-20020ac85752000000b0042a7372d72dmr11411664qtx.94.1706617826915; Tue, 30 Jan 2024 04:30:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706617826; cv=pass; d=google.com; s=arc-20160816; b=h8oeWDFhPE/gx0eLGmFgApfzfJxrOz8DSfWxwkoNS5YtuqACC/8+22XxqVM4d4+Y6B cDIj3KSfrKMDFc3CH6leVrS+UABZP37pJITy5zWPDRNyfAioSj55xiE1jqos0Hnghw3d YS+c+zdpVGiyw95S9hegi5vFnJ56MaSx0gU9ANcv/5g4MNvpesxoNpiZPtCDf06VXu+E hPWbSibgfBpnzWWAjA8Ipr8uBViliyDASDk2vukj/t4so0/SvMncPuXhzg/d0IrMBnZh Ll6ivo+S5TaSHUJrrTxMmTqVB3RC8cayKdFQwAB86fxyfzi0TejFPqNYZVv7++zr5ct8 2G1w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=5WIG602jF0/NcdS+HfCAx3v6LginBYLqhITxXSERSas=; fh=s1GzlUPo1djGkCl3rkRJI30hDOSCVwGp0RAbVwQ8dxQ=; b=gxfPbHoGVTTmot/aqwJuSEUSi0plyu97Hoq8apa2ohqfKRXu8DWor0jcBitaZzOy6y 9u8/BilwEw+ymbqUsygqS91Otcgz9Kvb7EWfonTKHqBWHd5t2p1kSbugqbYqig4cQiP0 6nOdedFbbk4iP7u2LdqNYzdC9iQL14qW68kKZEqtd+28d6wGvoqnxutsRJiNecwN5906 Wm6lG41V9bjIptIzRMPf30nYsO7BZBQFAj5GuGQ2/nhDTx5rT15s9X0NUchVFojPtob1 K3DTZ8Vv2GRWJthD1ezAT1NyUYJq6FpRQw3JyV6K+fZQiINKwVRVC4ytz/J2MRLRXU6b 4Rjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=TyVVqs9X; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id c2-20020ac87d82000000b0042b08e152aasi809432qtd.116.2024.01.30.04.30.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:30:26 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=TyVVqs9X; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E0FF386F417 for ; Tue, 30 Jan 2024 12:30:10 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 3C2053858011 for ; Tue, 30 Jan 2024 12:11:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3C2053858011 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 3C2053858011 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::331 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616673; cv=none; b=IbirB2gLtyJMW8jLdmr/rhd3AlqmksCbTfHyhqbRfAd1es28S5NbQ5ZUsew7SBffnuhNj6sSkpO6TWhNvVcaKlE6Y5Z9uxTaX8Ulbmc3CjwHMqVVBHpm6VeU1Jm7j6v/loYDhFObWMucmqnsKSzBQQ2EpSgJOE6s38ca2pRG6gw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616673; c=relaxed/simple; bh=kXMRablxmdhB/Uw+4C9wA5nkkVvmwJYn/ZjxA1dOxa8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=nL8IHSSfvDyYCzHKv4ve1FYflSVjaO1nJhgPglqdEAjLixOjxJMqXsKpoHld/98rkVTFwykYxPEaBP7Wy86bvOeaLziHzB/tbFr+PrnlUGK1RJNUnAkwvFQGikM/3dAKOyys0kXS4FnHeKCQHeHHtPI8JEuGCUX70w+I3jaEJ1U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40f033c2e30so4226615e9.0 for ; Tue, 30 Jan 2024 04:11:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1706616664; x=1707221464; darn=gcc.gnu.org; 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=5WIG602jF0/NcdS+HfCAx3v6LginBYLqhITxXSERSas=; b=TyVVqs9Xik1/9DqPhahGBCRVEfdPM3Vk73BaWj700an3iOSK9QYGkO2JmYuAh+zgLx GqBTj3wNWQppStCINRsTCzXtBfFtdwklBCexPuJZxavwM0c2iy7m7uKEy52evHkk+mWm +0jCdFIg5joKaU8LoykuyCGEI/zmcmao+/tv3gkNv8ScEMxN4iYY+jsHtj2ru/BfrUpI 1YAbu61NRYr0yoWABYhjQCgBBECCW43uaQf8aBRNE3BhtYaNPga16ZMVq1pgvRpXkTPH +cvu9gl0mXVmTw1iQZcMpbV9YIl0IRs/8uFIlhOpiWXUDmzEt//eD17ndiIe2pEeit43 wGrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706616664; x=1707221464; 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=5WIG602jF0/NcdS+HfCAx3v6LginBYLqhITxXSERSas=; b=RCyx7Pf5KeN6CP6LZxvrVXEpZHJjrJnJuU+MElrm6HDkY+dD5FI0kxJZbChP2ZsDKg EdhAzeUGb0Q5/XcdqIv3hV1DL2tH36XmUiRUCDyljL5R8eLM9BdO3q628lyEfh8MWnbN tENrlngbNuWUhi0XQXF5205/hMhXjpIwFojXhqZmIZdgyo55qPXuIklyIShwqHbcYYpo 9uXKWSBAj+d9qFudp9BGgWc4Fed2Nku7oI69En283wg3GdNZlQaI4zoMgopKVBaXj01A t8Y2sumH0qC0lzCQ8JIXBYIYyH8GNEqMlIFEAIkBu1DR4duN95I8eC5h6/bHQG1/OOJj eJ3w== X-Gm-Message-State: AOJu0Yy2mHjsF2O4sexkWhl1aTo2t0Tfp4gW03eBnqqIzqNlbJy43fQ1 btpt4rURmb4mpSZmdHc0Rciu5tRn7B7YoHrB4UCsLAeAl1E+9oq19RJUIaJ/S6+F6N1tXJDf3aN ulw== X-Received: by 2002:adf:ca84:0:b0:337:c4b3:e03e with SMTP id r4-20020adfca84000000b00337c4b3e03emr5592044wrh.1.1706616663878; Tue, 30 Jan 2024 04:11:03 -0800 (PST) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id f9-20020a056000036900b00339307d9d31sm10569894wrf.112.2024.01.30.04.11.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:11:03 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Pierre-Emmanuel Patry Subject: [COMMITTED 019/101] gccrs: Add a regression test for super trait on auto trait Date: Tue, 30 Jan 2024 13:06:35 +0100 Message-ID: <20240130121026.807464-22-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20240130121026.807464-2-arthur.cohen@embecosm.com> References: <20240130121026.807464-2-arthur.cohen@embecosm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 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, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: , Reply-To: arthur.cohen@embecosm.com Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789518494889912301 X-GMAIL-MSGID: 1789518494889912301 From: Pierre-Emmanuel Patry Add a new regression test to highlight the error behavior with a super trait on an auto trait. gcc/testsuite/ChangeLog: * rust/compile/auto_trait_super_trait.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/auto_trait_super_trait.rs | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 gcc/testsuite/rust/compile/auto_trait_super_trait.rs diff --git a/gcc/testsuite/rust/compile/auto_trait_super_trait.rs b/gcc/testsuite/rust/compile/auto_trait_super_trait.rs new file mode 100644 index 00000000000..1080afb5124 --- /dev/null +++ b/gcc/testsuite/rust/compile/auto_trait_super_trait.rs @@ -0,0 +1,4 @@ +trait Cold {} + +auto trait IsCool: Cold {} +// { dg-error "auto traits cannot have super traits .E0568." "" { target *-*-* } .-1 }