diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-08-17 14:06:50 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-30 12:36:42 +0100 |
commit | f7d8356a6ea2952574487596e66185a96a7f5d58 (patch) | |
tree | f793be80be9e29e6b1bb933c75a5e684aa967ed6 | |
parent | c5925f349231155e48fa649f47b3c699ef4ba3b0 (diff) | |
download | gcc-f7d8356a6ea2952574487596e66185a96a7f5d58.zip gcc-f7d8356a6ea2952574487596e66185a96a7f5d58.tar.gz gcc-f7d8356a6ea2952574487596e66185a96a7f5d58.tar.bz2 |
gccrs: rib: Add Namespace enum
gcc/rust/ChangeLog:
* resolve/rust-rib.h: Add Namespace enum.
-rw-r--r-- | gcc/rust/resolve/rust-rib.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-rib.h b/gcc/rust/resolve/rust-rib.h index 37bd90f..4ffd00a 100644 --- a/gcc/rust/resolve/rust-rib.h +++ b/gcc/rust/resolve/rust-rib.h @@ -28,6 +28,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 */ // TODO: Move to `rust-forever-stack.h`? |