From 3da609fe57f345989bd791e5bcac6866865f4a96 Mon Sep 17 00:00:00 2001 From: Alex Burka Date: Tue, 15 Dec 2015 21:35:11 -0500 Subject: [PATCH] add tests for #26873 --- src/test/run-pass/issue-26873-multifile.rs | 16 ++++++++++ src/test/run-pass/issue-26873-onefile.rs | 31 +++++++++++++++++++ .../run-pass/issue_26873_multifile/A/B.rs | 14 +++++++++ .../run-pass/issue_26873_multifile/A/C.rs | 16 ++++++++++ .../run-pass/issue_26873_multifile/A/mod.rs | 15 +++++++++ .../run-pass/issue_26873_multifile/mod.rs | 14 +++++++++ 6 files changed, 106 insertions(+) create mode 100644 src/test/run-pass/issue-26873-multifile.rs create mode 100644 src/test/run-pass/issue-26873-onefile.rs create mode 100644 src/test/run-pass/issue_26873_multifile/A/B.rs create mode 100644 src/test/run-pass/issue_26873_multifile/A/C.rs create mode 100644 src/test/run-pass/issue_26873_multifile/A/mod.rs create mode 100644 src/test/run-pass/issue_26873_multifile/mod.rs 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 0000000000000..aa525ae95192e --- /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 or the MIT license +// , 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 0000000000000..a9a04fd889455 --- /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 or the MIT license +// , 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 0000000000000..8917a98b8cf3f --- /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 or the MIT license +// , 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 0000000000000..64aaf9c279865 --- /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 or the MIT license +// , 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 0000000000000..a2aeb1cc43f98 --- /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 or the MIT license +// , 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 0000000000000..3643b94e31a85 --- /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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +mod A; + +use self::A::*; +