From patchwork Tue Jan 30 12:07:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 1892928 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=UMRAaMoD; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4TPQ6B3Vgqz23dQ for ; Tue, 30 Jan 2024 23:51:46 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 80750386C5A2 for ; Tue, 30 Jan 2024 12:51:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id E89283857C64 for ; Tue, 30 Jan 2024 12:11:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E89283857C64 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 E89283857C64 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::332 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616767; cv=none; b=XYDmHrXJSafd5BdV/OvxZsfSsSbrQmJAwqRHLjQg8D/NThZO5iWW05QcmO2QNIg8pGlFVzwNWNjzTkSBQS1hOQ5WmRLRJzgZJIVFlt2UpYr5lra30uyKm0WF5onqEuYyqK6dutUwK+oIqv6SyIMZ1Scz86+uc8c1NQtCEYJ5Td4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616767; c=relaxed/simple; bh=1jj14OqzUd2gkwwq/FD9ePfhbgQfQAbYyI3q+iGA2xQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=petJU0R7UZB7ynyhqPyYX8R8o4jEKX5QtNN+AFDKyawWo++jk4X9zp9b4Af8q+cDZmNr/D3RR8ZH3Nde/3VLTrTqb+grrHhLDKttej+l7gJOZjxhr6MUta3UE7B8HvoYpgmjKlZSUJh2/aYXEWIu/V6MXbOYm2qcAB5bXHei3ZI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40e76626170so43137875e9.2 for ; Tue, 30 Jan 2024 04:11:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1706616715; x=1707221515; 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=TwUYhoaMGkQI89BvsFruBOH5ISWv4+v8oUQOR8vln8E=; b=UMRAaMoDSRIcZYXFUg+ul79XI4He4kull42g6N+FcgLr2lQrCYkdkRiXW/waxZrSM8 zk8wtDZObw8J1dnSwr6CLn97Kf6oHa4pf+ZFLS15MQFhtq3Vsr5hLEQuoXTCIzFx+pO1 EJzxWnk0JsknTjDDXHjQc6YZfYWHIRH0r/4yPihMe6p4FxHKtdsWs+Nbb7u5m4yjN9cr l2pi8b0uRRxHq+3sJshxn7v+zXFH/sM2rxAWoyQxSJSzUhPcI0FENrRgDNyKYvC9qF7Z 79ZoW2FLvMUwoRUIdan4P0rgSeXzEAj341vjRD6XKqXMcWrdfdHtshcm2Cpf81RXVafu SMxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706616715; x=1707221515; 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=TwUYhoaMGkQI89BvsFruBOH5ISWv4+v8oUQOR8vln8E=; b=pIxAkTSSvni7ULL6hnD+2i8rcYmH392ij7g5pk8wX6zuaFAiYYzy9jAiUhqOlf4Ipy hQPwoFOis04wMb3nS4vUENgWpYs8K9IvB8YH4x1GYH0gCOVIsVynXDgr1ForppOuUWtf Qas0AhDmfFvmyNLZNlqydjcEpveZ7nDfAgdoFdwDdqwuZnSwgKioxidXyqoBZNIg4u9k yQNCb/CGviBNDuPxxPhgTNSmmUtQUJzfHiHivUPpcgBRDZmsw+7FTsluTA3p1NqtNmIu xmvyC0e+9ekjls/qiwX94NBRrZGpymR+GwR5JCrWDHxST4aNiBi8MQN/iD1lTIMgcYQw RyFw== X-Gm-Message-State: AOJu0Yx4950KtxmB/JMPl0zgFk2bb6lo+PHEovZzaVkHEXHs1A6Rl37w EzTBr17OLAmzjuoPnWX0lNK2xR1xEGA4sCfM43aJTJbtdAdh6IemgVDKa4/0Q0Tj3pwL1MBN1yX fDw== X-Google-Smtp-Source: AGHT+IErG5vyrEH3DNgITLHORwAEyZyNHDo8s2y+8bnpwJlTiR0oYWAHBwNYOzUpseBXWigXuNQybg== X-Received: by 2002:a05:600c:3143:b0:40e:b195:6bdb with SMTP id h3-20020a05600c314300b0040eb1956bdbmr7935945wmo.2.1706616714825; Tue, 30 Jan 2024 04:11:54 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:11:54 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Kushal Pal Subject: [COMMITTED 090/101] gccrs: Fix inconsistent formatting Date: Tue, 30 Jan 2024 13:07:46 +0100 Message-ID: <20240130121026.807464-93-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.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, T_SCC_BODY_TEXT_LINE 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: , Reply-To: arthur.cohen@embecosm.com Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Enclose const in single quotes. gcc/testsuite/ChangeLog: * rust/compile/const_trait_fn.rs: Enclose const in single quotes. Signed-off-by: Kushal Pal --- gcc/rust/checks/errors/rust-ast-validation.cc | 2 +- gcc/testsuite/rust/compile/const_trait_fn.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/rust/checks/errors/rust-ast-validation.cc b/gcc/rust/checks/errors/rust-ast-validation.cc index 0ed5d060894..ccb071f74b0 100644 --- a/gcc/rust/checks/errors/rust-ast-validation.cc +++ b/gcc/rust/checks/errors/rust-ast-validation.cc @@ -149,7 +149,7 @@ ASTValidation::visit (AST::TraitFunctionDecl &decl) "functions in traits cannot be declared %"); if (qualifiers.is_const ()) rust_error_at (decl.get_identifier ().get_locus (), ErrorCode::E0379, - "functions in traits cannot be declared const"); + "functions in traits cannot be declared %"); } } diff --git a/gcc/testsuite/rust/compile/const_trait_fn.rs b/gcc/testsuite/rust/compile/const_trait_fn.rs index cff2f5f096e..41bba3b5335 100644 --- a/gcc/testsuite/rust/compile/const_trait_fn.rs +++ b/gcc/testsuite/rust/compile/const_trait_fn.rs @@ -1,4 +1,4 @@ trait Osterkz { const fn x(); - // { dg-error "functions in traits cannot be declared const .E0379." "" { target *-*-* } .-1 } + // { dg-error "functions in traits cannot be declared .const." "" { target *-*-* } .-1 } }