https://gcc.gnu.org/g:325882f8849bf0bc1d55e464cbd2e4fc7050ca9e

commit r17-5139-g325882f8849bf0bc1d55e464cbd2e4fc7050ca9e
Author: Arthur Cohen <[email protected]>
Date:   Wed Sep 16 18:01:45 2026 +0200

    gccrs: nr2.0: Close out invalid resolution for unexported items
    
    Fixes Rust-GCC/gccrs#2259.
    
    This adds a testcase to make sure a regression isn't introduced later on.
    
    gcc/testsuite/ChangeLog:
    
            * rust/compile/issues/2259.rs: New test.

Diff:
---
 gcc/testsuite/rust/compile/issues/2259.rs | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gcc/testsuite/rust/compile/issues/2259.rs 
b/gcc/testsuite/rust/compile/issues/2259.rs
new file mode 100644
index 000000000000..2530b4a24eac
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issues/2259.rs
@@ -0,0 +1,18 @@
+#![feature(no_core)]
+#![no_core]
+
+pub mod foo {
+    pub fn bar() {}
+
+    #[macro_export]
+    macro_rules! qux {
+        () => {};
+    }
+}
+
+// is valid if this is uncommented
+// use foo::*;
+
+fn main() {
+    bar(); // { dg-error "Cannot find path .bar. in this scope" }
+}

Reply via email to