From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 68B2B3857C5C for ; Tue, 30 Jan 2024 12:11:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 68B2B3857C5C 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 68B2B3857C5C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::431 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616683; cv=none; b=FTTm+eIEMczYLVt9SI/evzUtcr3wN28beOZBfK8hxbDtymI0qGBOJWx+LW7JffMAewqNPkz39wW25Qnp2hLwwcWJt1OLDoXQSbXDVJtnwrttTmAZ8gcOu1xw5Q/WMamsLZSqb1tRk2rYzcLpvCuM7BesLa2GrJG8q83MxLdzmf0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616683; c=relaxed/simple; bh=1KM3XOTx+OBcvNua9Q22Alm6XZ8f/oURA1H2XudK80E=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dswR/Itxc9xoZ1XSNsXt3qioH9j4JtpI83bv6X2AV2YZzMepX7BptKZ7WrMQN0IznlTfzcXOoTwjZ3lBbvGzGzlKyK2/6QeHM8qux4CqGlz9eE8uFi457fwLAdaF/Ddn8McldeyWYZc76tIF8j3j+PCkx26KleiD4k5CvmtlhJQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-33ae2d80b70so1859889f8f.0 for ; Tue, 30 Jan 2024 04:11:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1706616672; x=1707221472; 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=1hI5ul/nN/WJfM/4k9bug7luwoQK7BhQuffp06BUC/0=; b=WhvYiUsrhiePsiVChXhEDl984fdKOLstfJtXfVCoX7IUdir7/iPKEb87w4dTj/W08O oSXFNHPxALqt4fN9GKFiEFiqIRdvpzVSxjJxaToXqLljUIaDsysrcx6UqOytD9Oi7E55 fEbMqmU2b6p7JKJ6VS0YK8t5FnS+MJk7MNXfXuqdzPUYqFZ+zYK6fL+PgLdLwfunmJ79 Pw3Ww7pXspIchyV59xqhnTQ0D1LGuKT9F0yxg20DTIHS8XgfREL13T7oTf7SW5Dh1tab JBbatIDec+bluU17c6kOb9PE1RZ7XoDgZXd3AI+Mt/CB6qfypTBe7wahKArp3z931HIM 9keg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706616672; x=1707221472; 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=1hI5ul/nN/WJfM/4k9bug7luwoQK7BhQuffp06BUC/0=; b=ESDUm8M8WwQ1qQjCBCoo8ZioLhixEzLH+iRYov3e9AwchQmxswKOWDlfaCl+jGHZXy ZIDNihru65+U0uAA7cQWtwv5YOFpQiwqKhhzoVVQJKKwfQHuWP7rS28+c1nU8jDMFaUc Cxory+ICBmB9Ae2Ki3D+1fvjOaFLL+28h72sxYovznfC2MSiiZTzX+K+qtqgvZg22BRW NetVQTE4/MdJfHRRtbCRdutWGTrSFvgsviKwf7jDl5ulIF9nVvjyFIL7BZtJtKfTd2G2 wlZJQRWukg+NEvLXwV7BqrxxshOX6ot+O+IHFfgEVjoBM9AYmPPeOEZwtlV6h/SduYIy kCLA== X-Gm-Message-State: AOJu0YwoE9ajQq71296VSs1Uu4s4CO9vdBz1WdPq3ei09pi2C5ZQmz2A WE/fhRE5aSnfjn2KnXDkJ3F8sr4H/QZkSJXJ0Fa1i71jiuXHAnfSoQgVCc9bQElytlqTfdA/chm MwA== X-Google-Smtp-Source: AGHT+IFaWiS3fy4PQNSl0sVhrofmki4uNoSITVFsRJDrPif5+AwnAwImlQ07RHYa3t5wAkziYoxE/w== X-Received: by 2002:adf:cd10:0:b0:33a:e52b:b70a with SMTP id w16-20020adfcd10000000b0033ae52bb70amr5674810wrm.52.1706616672281; Tue, 30 Jan 2024 04:11:12 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:11:11 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Pierre-Emmanuel Patry Subject: [COMMITTED 029/101] gccrs: Add a list of weak keyword Date: Tue, 30 Jan 2024 13:06:45 +0100 Message-ID: <20240130121026.807464-32-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> Reply-To: arthur.cohen@embecosm.com MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=ham 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: Pierre-Emmanuel Patry Retrieving a weak keyword value is done using raw values. Introducing a list of weak keywords means this could change. gcc/rust/ChangeLog: * util/rust-keyword-values.h (class WeakKeywords): Add new class with weak keyword constexpr. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/util/rust-keyword-values.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gcc/rust/util/rust-keyword-values.h b/gcc/rust/util/rust-keyword-values.h index 769b2100c41..4a6f1df525d 100644 --- a/gcc/rust/util/rust-keyword-values.h +++ b/gcc/rust/util/rust-keyword-values.h @@ -41,6 +41,20 @@ public: #undef RS_TOKEN }; +class WeakKeywords +{ +public: + static constexpr auto &AUTO = "auto"; + static constexpr auto &BUILTIN = "builtin"; + static constexpr auto &CATCH = "catch"; + static constexpr auto &DEFAULT = "default"; + static constexpr auto &GEN = "gen"; + static constexpr auto &MACRO_RULES = "macro_rules"; + static constexpr auto &RAW = "raw"; + static constexpr auto &UNION = "union"; + static constexpr auto &YEET = "yeet"; +}; + } // namespace Values } // namespace Rust -- 2.42.1