]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Remove abort on wildcard patterns
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 11 Aug 2025 21:06:12 +0000 (23:06 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 30 Oct 2025 19:58:37 +0000 (20:58 +0100)
gcc/rust/ChangeLog:

* resolve/rust-early-name-resolver-2.0.cc (Early::finalize_rebind_import):
Do not abort on wildcard patterns.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/resolve/rust-early-name-resolver-2.0.cc

index 4fd1dd265b63cec51fa1248bf78bac8cce9dee9c..0f1766c18158838bee6e3de5e3a12192672518f7 100644 (file)
@@ -447,8 +447,8 @@ Early::finalize_rebind_import (const Early::ImportPair &mapping)
        break;
       }
     case AST::UseTreeRebind::NewBindType::WILDCARD:
-      rust_unreachable ();
-      break;
+      // We don't want to insert it into the trie
+      return;
     }
 
   for (auto &&definition : data.definitions ())