diff --git a/src/test/compile-fail/issue-25396.rs b/src/test/compile-fail/issue-25396.rs index bf26a591b4b5..3ada57c99930 100644 --- a/src/test/compile-fail/issue-25396.rs +++ b/src/test/compile-fail/issue-25396.rs @@ -11,14 +11,14 @@ use foo::baz; use bar::baz; //~ ERROR a module named `baz` has already been imported -use bar::Quux; //~ ERROR a trait named `Quux` has already been imported use foo::Quux; +use bar::Quux; //~ ERROR a trait named `Quux` has already been imported -use foo::blah; //~ ERROR a type named `blah` has already been imported -use bar::blah; +use foo::blah; +use bar::blah; //~ ERROR a type named `blah` has already been imported -use foo::WOMP; //~ ERROR a value named `WOMP` has already been imported -use bar::WOMP; +use foo::WOMP; +use bar::WOMP; //~ ERROR a value named `WOMP` has already been imported fn main() {} diff --git a/src/test/run-pass/issue-4865-2.rs b/src/test/run-pass/issue-4865-2.rs new file mode 100644 index 000000000000..cd435bf64731 --- /dev/null +++ b/src/test/run-pass/issue-4865-2.rs @@ -0,0 +1,27 @@ +// 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 use hello::*; + +pub mod say { + pub fn hello() { println!("hello"); } +} + +pub mod hello { + use say; + + pub fn hello() { + say::hello(); + } +} + +fn main() { + hello(); +} diff --git a/src/test/run-pass/issue-4865-3.rs b/src/test/run-pass/issue-4865-3.rs new file mode 100644 index 000000000000..0ed3a2335872 --- /dev/null +++ b/src/test/run-pass/issue-4865-3.rs @@ -0,0 +1,22 @@ +// 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 a { + use b::*; +} + +pub mod b { + use a::*; +} + +use a::*; + +fn main() { +}