From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 96E753858287 for ; Tue, 30 Jan 2024 12:10:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 96E753858287 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 96E753858287 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616660; cv=none; b=lRvIfH3SDAgSj7dC0g8cj0qfI0smhkGBpCxDadn6KelCQJYrTLgJxh13JYpWgjVhG1jZ23Ol/+4yv1e7tjI4+Ef89OEaZkDob3J2iQhMFiKR9+aD1peVRALnIR8lfsxCK/CfQZGHsnmEAssz1y5Uu3jNDqpagVlOIWZe+vLVLXM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706616660; c=relaxed/simple; bh=r7Xw6S9uiZHpaFXwHJMOWWkHAsI/4DoCI7SPFiU7adk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=AX1uIaPtCPVUPvqGZIK70PnVu3khYrSZPwQb447PPer9g8Ow1aUaDw4orul3Pbd5xX42PvX2GGQE9StEw88mHri6+kgh/3ufMW4Tnjt+//z2dNk1KWHiqcLwQSS6kvNcL0A9Cfw+jBxceud4ICfS4+VeFf0VhqJp3t6Dn2D4U2s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-33ae5e7d787so2237718f8f.1 for ; Tue, 30 Jan 2024 04:10:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1706616655; x=1707221455; 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=UFUj8oXvszxBtgA1dFNDIG0cvROUwhGsgQytSRWEMVs=; b=cfmyxD/8WAaQvsx3ejiU2hKlSLBcUoHK0JRSXFuIjs77Z5mcP//d1f6zcMGMpm2wyX pmn8pd3EldgZXmaVFRjw/LAayjHIQLxSjcHw0Cbltn9KntC6X3W7pEr0f4eplVPpzCTh ENYNgNDIV62Xu61miPCoONWMQ7bLtKA9094jKWFK6kQML5oifSpivqX4FDcjYHTfUgmy Ke73Yti1OAmCqyEPNJNKhwYHDhumYkvJb9E35bHGC/8uiff4WNppnM37/q7oJzi4fAKr Wy9cQtnLPEShnYvipjbKExRGbW2jG2COF0PeCd+erXKPSgxriCduc7Kj6KuAzXIA/uZo O/QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706616655; x=1707221455; 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=UFUj8oXvszxBtgA1dFNDIG0cvROUwhGsgQytSRWEMVs=; b=KdIBilgaL1sL6ctLbtCaIQV2++pjnWAimhnDE1BjsqQfvDqYFcROXNNidHt3xZbYmo jImFUxK0XswP9GdyJoI9kI225soEjsEvzILecBZTpKDsYYHRc5Qom7ctzmcaQEF0PuWb QUjnm6D1/e49p986iao/2zzPUriaF9eXsKxjDoCXZ7MriFhasap4fkwyfKEaqSmNTtYH 2eh6tw0/ainEQjEhfRL1LfllQCMqoVFultMe7IPCfFf0GGWx4qOX0mWEq2xJMCNez/Wh x5TVgiA+G5s00X5y3mYrnciwC6Ymnlom5TxAuZt3LDpoBH9sMfLh4XKTHx5e30fW8LsE LZNQ== X-Gm-Message-State: AOJu0YwoDzQK0PNnVaK7mkQ+oazP/+CgWy9YJie19evd2Pl+fZ0EPr4l KqVmDUiPsU69ZaABHeomeeOE3+ykEW1A1LdxuWJsks9UUVj8vj4zL+t2Nh/H/A== X-Google-Smtp-Source: AGHT+IEs12hxacHOQKcOvZGwVnsEARTSm91THiSd/m0uNG8VpGMuP9+Vl4DlPGBfGEahtxlSE8ogXA== X-Received: by 2002:adf:e40d:0:b0:339:5951:801d with SMTP id g13-20020adfe40d000000b003395951801dmr5999535wrm.6.1706616655391; Tue, 30 Jan 2024 04:10:55 -0800 (PST) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id f9-20020a056000036900b00339307d9d31sm10569894wrf.112.2024.01.30.04.10.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:10:54 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Arthur Cohen Subject: [COMMITTED 007/101] gccrs: rib: Add Namespace enum Date: Tue, 30 Jan 2024 13:06:23 +0100 Message-ID: <20240130121026.807464-10-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: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-rib.h: Add Namespace enum. --- gcc/rust/resolve/rust-rib.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gcc/rust/resolve/rust-rib.h b/gcc/rust/resolve/rust-rib.h index 37bd90f1f75..4ffd00a5d6c 100644 --- a/gcc/rust/resolve/rust-rib.h +++ b/gcc/rust/resolve/rust-rib.h @@ -27,6 +27,31 @@ namespace Rust { namespace Resolver2_0 { +/** + +pub enum Namespace { + /// The type namespace includes `struct`s, `enum`s, `union`s, `trait`s, and +`mod`s + /// (and, by extension, crates). + /// + /// Note that the type namespace includes other items; this is not an + /// exhaustive list. + TypeNS, + /// The value namespace includes `fn`s, `const`s, `static`s, and local +variables (including function arguments). ValueNS, + /// The macro namespace includes `macro_rules!` macros, declarative `macro`s, + /// procedural macros, attribute macros, `derive` macros, and non-macro +attributes + /// like `#[inline]` and `#[rustfmt::skip]`. + MacroNS, +} + +*/ + +// FIXME: There's no `labels` namespace, not sure if we need one or how to keep +// one +// FIXME: And where are things like loop labels kept? + /** * All namespaces that Rust's name resolution needs to handle */ -- 2.42.1