summaryrefslogtreecommitdiffstats
path: root/tests/ui/namespace/auxiliary
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/namespace/auxiliary
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/namespace/auxiliary')
-rw-r--r--tests/ui/namespace/auxiliary/namespace-mix.rs66
-rw-r--r--tests/ui/namespace/auxiliary/namespaced_enums.rs10
2 files changed, 76 insertions, 0 deletions
diff --git a/tests/ui/namespace/auxiliary/namespace-mix.rs b/tests/ui/namespace/auxiliary/namespace-mix.rs
new file mode 100644
index 000000000..fb39d29f8
--- /dev/null
+++ b/tests/ui/namespace/auxiliary/namespace-mix.rs
@@ -0,0 +1,66 @@
+pub mod c {
+ pub struct S {}
+ pub struct TS();
+ pub struct US;
+ pub enum E {
+ V {},
+ TV(),
+ UV,
+ }
+
+ pub struct Item;
+}
+
+pub mod xm1 {
+ pub use ::c::*;
+ pub type S = ::c::Item;
+}
+pub mod xm2 {
+ pub use ::c::*;
+ pub const S: ::c::Item = ::c::Item;
+}
+
+pub mod xm3 {
+ pub use ::c::*;
+ pub type TS = ::c::Item;
+}
+pub mod xm4 {
+ pub use ::c::*;
+ pub const TS: ::c::Item = ::c::Item;
+}
+
+pub mod xm5 {
+ pub use ::c::*;
+ pub type US = ::c::Item;
+}
+pub mod xm6 {
+ pub use ::c::*;
+ pub const US: ::c::Item = ::c::Item;
+}
+
+pub mod xm7 {
+ pub use ::c::E::*;
+ pub type V = ::c::Item;
+}
+pub mod xm8 {
+ pub use ::c::E::*;
+ pub const V: ::c::Item = ::c::Item;
+}
+
+pub mod xm9 {
+ pub use ::c::E::*;
+ pub type TV = ::c::Item;
+}
+pub mod xmA {
+ pub use ::c::E::*;
+ pub const TV: ::c::Item = ::c::Item;
+}
+
+pub mod xmB {
+ pub use ::c::E::*;
+ pub type UV = ::c::Item;
+}
+pub mod xmC {
+ pub use ::c::E::*;
+ pub const UV: ::c::Item = ::c::Item;
+}
diff --git a/tests/ui/namespace/auxiliary/namespaced_enums.rs b/tests/ui/namespace/auxiliary/namespaced_enums.rs
new file mode 100644
index 000000000..d3548c76c
--- /dev/null
+++ b/tests/ui/namespace/auxiliary/namespaced_enums.rs
@@ -0,0 +1,10 @@
+pub enum Foo {
+ A,
+ B(isize),
+ C { a: isize },
+}
+
+impl Foo {
+ pub fn foo() {}
+ pub fn bar(&self) {}
+}