]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: resolver: Resolve macros too.
authorArthur Cohen <arthur.cohen@embecosm.com>
Sun, 23 Jul 2023 01:19:46 +0000 (03:19 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:00:27 +0000 (19:00 +0100)
gcc/rust/ChangeLog:

* resolve/rust-name-resolution-context.cc
(Resolver::insert): Do not call into `rust_unreachable` when resolving
macros anymore.

gcc/rust/resolve/rust-name-resolution-context.cc

index 98efdccda5615dbcada1c0fcdf44f58bfd55adfe..82771cdd923e43c8c2518416bb472b732d03d6d2 100644 (file)
@@ -30,9 +30,11 @@ NameResolutionContext::insert (Identifier name, NodeId id, Namespace ns)
       return values.insert (name, id);
     case Namespace::Types:
       return types.insert (name, id);
-    case Namespace::Labels:
     case Namespace::Macros:
+      return macros.insert (name, id);
+    case Namespace::Labels:
     default:
+      // return labels.insert (name, id);
       rust_unreachable ();
     }
 }