summaryrefslogtreecommitdiffstats
path: root/tests/ui/imports/issue-26873-multifile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/ui/imports/issue-26873-multifile
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/imports/issue-26873-multifile')
-rw-r--r--tests/ui/imports/issue-26873-multifile/A/B.rs4
-rw-r--r--tests/ui/imports/issue-26873-multifile/A/C.rs6
-rw-r--r--tests/ui/imports/issue-26873-multifile/A/mod.rs5
-rw-r--r--tests/ui/imports/issue-26873-multifile/compiletest-ignore-dir0
-rw-r--r--tests/ui/imports/issue-26873-multifile/issue-26873-multifile.rs11
-rw-r--r--tests/ui/imports/issue-26873-multifile/issue-26873-onefile.rs25
-rw-r--r--tests/ui/imports/issue-26873-multifile/mod.rs4
7 files changed, 55 insertions, 0 deletions
diff --git a/tests/ui/imports/issue-26873-multifile/A/B.rs b/tests/ui/imports/issue-26873-multifile/A/B.rs
new file mode 100644
index 000000000..ab7b0d816
--- /dev/null
+++ b/tests/ui/imports/issue-26873-multifile/A/B.rs
@@ -0,0 +1,4 @@
+// run-pass
+use super::*;
+
+pub struct S;
diff --git a/tests/ui/imports/issue-26873-multifile/A/C.rs b/tests/ui/imports/issue-26873-multifile/A/C.rs
new file mode 100644
index 000000000..b287283df
--- /dev/null
+++ b/tests/ui/imports/issue-26873-multifile/A/C.rs
@@ -0,0 +1,6 @@
+// run-pass
+use super::*;
+
+use super::B::S;
+
+pub struct T { i: i32 }
diff --git a/tests/ui/imports/issue-26873-multifile/A/mod.rs b/tests/ui/imports/issue-26873-multifile/A/mod.rs
new file mode 100644
index 000000000..0f18772bf
--- /dev/null
+++ b/tests/ui/imports/issue-26873-multifile/A/mod.rs
@@ -0,0 +1,5 @@
+// run-pass
+pub mod B;
+pub mod C;
+
+pub use self::C::T;
diff --git a/tests/ui/imports/issue-26873-multifile/compiletest-ignore-dir b/tests/ui/imports/issue-26873-multifile/compiletest-ignore-dir
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/ui/imports/issue-26873-multifile/compiletest-ignore-dir
diff --git a/tests/ui/imports/issue-26873-multifile/issue-26873-multifile.rs b/tests/ui/imports/issue-26873-multifile/issue-26873-multifile.rs
new file mode 100644
index 000000000..da2acf6c9
--- /dev/null
+++ b/tests/ui/imports/issue-26873-multifile/issue-26873-multifile.rs
@@ -0,0 +1,11 @@
+// run-pass
+#![allow(dead_code)]
+#![allow(unused_imports)]
+#![allow(non_snake_case)]
+
+// ignore-pretty issue #37195
+
+#[path = "issue-26873-multifile/mod.rs"]
+mod multifile;
+
+fn main() {}
diff --git a/tests/ui/imports/issue-26873-multifile/issue-26873-onefile.rs b/tests/ui/imports/issue-26873-multifile/issue-26873-onefile.rs
new file mode 100644
index 000000000..f06c6499e
--- /dev/null
+++ b/tests/ui/imports/issue-26873-multifile/issue-26873-onefile.rs
@@ -0,0 +1,25 @@
+// run-pass
+#![allow(dead_code)]
+#![allow(unused_imports)]
+#![allow(non_snake_case)]
+
+mod A {
+ pub mod B {
+ use super::*;
+
+ pub struct S;
+ }
+
+ pub mod C {
+ use super::*;
+ use super::B::S;
+
+ pub struct T;
+ }
+
+ pub use self::C::T;
+}
+
+use A::*;
+
+fn main() {}
diff --git a/tests/ui/imports/issue-26873-multifile/mod.rs b/tests/ui/imports/issue-26873-multifile/mod.rs
new file mode 100644
index 000000000..a1ba53f91
--- /dev/null
+++ b/tests/ui/imports/issue-26873-multifile/mod.rs
@@ -0,0 +1,4 @@
+// run-pass
+mod A;
+
+use self::A::*;