From: Arthur Cohen <[email protected]>

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.
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: 
https://github.com/Rust-GCC/gccrs/commit/bd7540d5893bbe8d821dff75de1a06580637c654

The commit has been mentioned in the following issue(s):
 - Rust-GCC/gccrs#2259: https://github.com/Rust-GCC/gccrs/issues/2259

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4902

 gcc/testsuite/rust/compile/issues/2259.rs | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 gcc/testsuite/rust/compile/issues/2259.rs

diff --git a/gcc/testsuite/rust/compile/issues/2259.rs 
b/gcc/testsuite/rust/compile/issues/2259.rs
new file mode 100644
index 000000000..2530b4a24
--- /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" }
+}

base-commit: d955d57e7141bfa58402bd88d5e9c845af245a41
-- 
2.55.0

Reply via email to