From patchwork Wed Feb 21 13:15:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 86164 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8637A385842A for ; Wed, 21 Feb 2024 13:20:16 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id 141383858419 for ; Wed, 21 Feb 2024 13:16:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 141383858419 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 141383858419 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::530 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708521388; cv=none; b=xgT3SdDLGX0ix9xW6gS9tmmRrxVgtz9GoD/08YvlI7J2bH1npgVRNRIqg1WivhKJG4u3F2UVYvjtV5II5xiWEs0qk0iDm5gTjoh/V6fUXW/l2Xb9r+QdV19YGktz4NRVZeQbh0dllj2Y6DbCEXMrzrhwrNtrzXKKXbx4y4RIUmo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708521388; c=relaxed/simple; bh=emGT+vYqPYLTLRwjW8vTTlOHoYTk3vN9hdOh/25oR/c=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=pGBC8wMM8LleiCtJJfBaKhDOtmKFDoipubYp4L+Tkij3RBV4k7JRPxZf/gDxQL3lizcioL8is7Vz3OZ4ijnK/FHleV7D/gMp57Xj7smW2d/MX5tH5YEaiD1TLE0CeeNKrvfILHTxDZT02JCGeT/qJOmTqk7XKVh6BQYVBUzjC8M= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5648d92919dso991685a12.1 for ; Wed, 21 Feb 2024 05:16:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1708521385; x=1709126185; 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=ExgnLVRQgw+zm9U0+skZBQsv33DgtbpeE+hEwqVnxmo=; b=U+3LHW9h8ADOAJFxCgVFMdj0L2Fa+IoNaz1StLwcbWjhgzmUkDFIxzTBnRolo0e5gO m6dXqhQGOMAyFjoYXvf/UydlcDaAvlkZvemzP1ARfboGhwnUUQIZ4531SaoWmxpVQkD6 Yv/w896m+hzeCtRrAT/SqM+hJOY62f15KNHTZTpCs+YHQrELVEAbONkjo6tw2HBVYLV8 q/jJOSTb9Cp3Z+yCEvNO8yD9ukx4wtNt5eqvY5nabRLDIGY3FCoehXMAuxMd5eNKUOOZ YvbBhCpojW+0fGxDsnRUBq0mkNT8CbqXWJ5iXSw8LBoRavqgtRdcGH7oz3RCCyF3RVrx nR2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708521385; x=1709126185; 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=ExgnLVRQgw+zm9U0+skZBQsv33DgtbpeE+hEwqVnxmo=; b=Jhpjm1ZPftKqQN10CyZGYoMq4HyaoF+law9FjYO0uts/Abg4Jv+/tzpWFw6TBFTf6j CluKvH/WqAy9V2ISUDeopKO5Nd08Z25zbsT7Ffo/Qy3bHt1W4gx8p6M8Xo7sfYb6VvDh LteOHIB+KZWelFo6BAgrRTZ+byZcbps6hUpHlCuzben0dIUIwXGeQKRPVYdnDAX8779z S3+kc2TckPZsikS2r3AViOhSocsScChWTBWLouvRSmNluGO/snboy5W2PT/px8/p6H6+ AV182sPnN485XKQOE6kjwayklYBmlmM98ovsQnWPf4Ew2B9ZxP3hDChiEhzmPJrmHqCC ZcgQ== X-Gm-Message-State: AOJu0YzOrXsNOpgvPc/l9u2nQFlLYhBI0HNI1xe1MTf6s9ZPp9sQx7Zg kD20x5RvDDK8ukFWLzzOzN4yrjdNHLC5sfzvrKcagWfFr5DYtd3D4INRN2zbipoLMq96jLO6hEs = X-Google-Smtp-Source: AGHT+IEKhCAzzx8AZ1Zlb5A95e8gMT8e2et0K9MKdEI1tYQcrnqHuktUlBdh3EE99Pvlc46D6Ixx4g== X-Received: by 2002:a17:906:16d6:b0:a3e:4576:b25a with SMTP id t22-20020a17090616d600b00a3e4576b25amr7343153ejd.18.1708521385594; Wed, 21 Feb 2024 05:16:25 -0800 (PST) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id m12-20020a170906160c00b00a3d0a094574sm4927074ejd.66.2024.02.21.05.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 05:16:25 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Arthur Cohen Subject: [COMMITTED 4/9] gccrs: expand: Fix formatting for "macro not found" error Date: Wed, 21 Feb 2024 14:15:22 +0100 Message-ID: <20240221131636.3336103-7-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20240221131636.3336103-2-arthur.cohen@embecosm.com> References: <20240221131636.3336103-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=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+patchwork=sourceware.org@gcc.gnu.org From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-macro-expand.h (struct MacroExpander): Nitpick: fix formatting of emitted error. --- gcc/rust/expand/rust-macro-expand.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/rust/expand/rust-macro-expand.h b/gcc/rust/expand/rust-macro-expand.h index f18e8e24a1d..896cdc6dcc8 100644 --- a/gcc/rust/expand/rust-macro-expand.h +++ b/gcc/rust/expand/rust-macro-expand.h @@ -414,7 +414,7 @@ struct MacroExpander = mappings->lookup_derive_proc_macro_invocation (path); if (!macro.has_value ()) { - rust_error_at (path.get_locus (), "Macro not found"); + rust_error_at (path.get_locus (), "macro not found"); return AST::Fragment::create_error (); } @@ -437,7 +437,7 @@ struct MacroExpander = mappings->lookup_bang_proc_macro_invocation (invocation); if (!macro.has_value ()) { - rust_error_at (invocation.get_locus (), "Macro not found"); + rust_error_at (invocation.get_locus (), "macro not found"); return AST::Fragment::create_error (); } @@ -459,7 +459,7 @@ struct MacroExpander = mappings->lookup_attribute_proc_macro_invocation (path); if (!macro.has_value ()) { - rust_error_at (path.get_locus (), "Macro not found"); + rust_error_at (path.get_locus (), "macro not found"); return AST::Fragment::create_error (); }