about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAlex Burka <aburka@seas.upenn.edu>2015-12-15 21:35:11 -0500
committerAlex Burka <aburka@seas.upenn.edu>2015-12-18 12:14:15 -0500
commit3da609fe57f345989bd791e5bcac6866865f4a96 (patch)
tree72759fb9ba9e4844d806ec40e96ef98fb2e94201 /src/test
parent9e63cecb10a3a22abed9c230c5daf268dc258bf3 (diff)
downloadrust-3da609fe57f345989bd791e5bcac6866865f4a96.tar.gz
rust-3da609fe57f345989bd791e5bcac6866865f4a96.zip
add tests for #26873
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/issue-26873-multifile.rs16
-rw-r--r--src/test/run-pass/issue-26873-onefile.rs31
-rw-r--r--src/test/run-pass/issue_26873_multifile/A/B.rs14
-rw-r--r--src/test/run-pass/issue_26873_multifile/A/C.rs16
-rw-r--r--src/test/run-pass/issue_26873_multifile/A/mod.rs15
-rw-r--r--src/test/run-pass/issue_26873_multifile/mod.rs14
6 files changed, 106 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-26873-multifile.rs b/src/test/run-pass/issue-26873-multifile.rs
new file mode 100644
index 00000000000..aa525ae9519
--- /dev/null
+++ b/src/test/run-pass/issue-26873-multifile.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+//
+// ignore-pretty
+
+mod issue_26873_multifile;
+
+fn main() {}
+
diff --git a/src/test/run-pass/issue-26873-onefile.rs b/src/test/run-pass/issue-26873-onefile.rs
new file mode 100644
index 00000000000..a9a04fd8894
--- /dev/null
+++ b/src/test/run-pass/issue-26873-onefile.rs
@@ -0,0 +1,31 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+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/src/test/run-pass/issue_26873_multifile/A/B.rs b/src/test/run-pass/issue_26873_multifile/A/B.rs
new file mode 100644
index 00000000000..8917a98b8cf
--- /dev/null
+++ b/src/test/run-pass/issue_26873_multifile/A/B.rs
@@ -0,0 +1,14 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use super::*;
+
+pub struct S;
+
diff --git a/src/test/run-pass/issue_26873_multifile/A/C.rs b/src/test/run-pass/issue_26873_multifile/A/C.rs
new file mode 100644
index 00000000000..64aaf9c2798
--- /dev/null
+++ b/src/test/run-pass/issue_26873_multifile/A/C.rs
@@ -0,0 +1,16 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use super::*;
+
+use super::B::S;
+
+pub struct T { i: i32 }
+
diff --git a/src/test/run-pass/issue_26873_multifile/A/mod.rs b/src/test/run-pass/issue_26873_multifile/A/mod.rs
new file mode 100644
index 00000000000..a2aeb1cc43f
--- /dev/null
+++ b/src/test/run-pass/issue_26873_multifile/A/mod.rs
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub mod B;
+pub mod C;
+
+pub use self::C::T;
+
diff --git a/src/test/run-pass/issue_26873_multifile/mod.rs b/src/test/run-pass/issue_26873_multifile/mod.rs
new file mode 100644
index 00000000000..3643b94e31a
--- /dev/null
+++ b/src/test/run-pass/issue_26873_multifile/mod.rs
@@ -0,0 +1,14 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod A;
+
+use self::A::*;
+