about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-12-19 08:08:53 +0000
committerbors <bors@rust-lang.org>2015-12-19 08:08:53 +0000
commitfec739bee2211cfd92dcb41ea3894eaabefcf4a0 (patch)
tree1fe7736d2abcb90ed53fc9d3c984d9326db5c64c /src
parent67a2d1f34f917b6e583440b0a86767b2ff8e4d4f (diff)
parent3da609fe57f345989bd791e5bcac6866865f4a96 (diff)
downloadrust-fec739bee2211cfd92dcb41ea3894eaabefcf4a0.tar.gz
rust-fec739bee2211cfd92dcb41ea3894eaabefcf4a0.zip
Auto merge of #30408 - durka:issue-26873, r=alexcrichton
I think we can close #26873 with these tests.
Diffstat (limited to 'src')
-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::*;
+