public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8531] gccrs: rib: Add Namespace enum
@ 2024-01-30 11:57 Arthur Cohen
0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-30 11:57 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:f7d8356a6ea2952574487596e66185a96a7f5d58
commit r14-8531-gf7d8356a6ea2952574487596e66185a96a7f5d58
Author: Arthur Cohen <arthur.cohen@embecosm.com>
Date: Thu Aug 17 14:06:50 2023 +0200
gccrs: rib: Add Namespace enum
gcc/rust/ChangeLog:
* resolve/rust-rib.h: Add Namespace enum.
Diff:
---
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 37bd90f1f75e..4ffd00a5d6c3 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
*/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-30 11:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 11:57 [gcc r14-8531] gccrs: rib: Add Namespace enum Arthur Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).