Update tests and add some more.
This commit is contained in:
parent
b69bf1153d
commit
751675938e
3 changed files with 54 additions and 5 deletions
|
|
@ -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() {}
|
||||
|
||||
|
|
|
|||
27
src/test/run-pass/issue-4865-2.rs
Normal file
27
src/test/run-pass/issue-4865-2.rs
Normal file
|
|
@ -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 <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 use hello::*;
|
||||
|
||||
pub mod say {
|
||||
pub fn hello() { println!("hello"); }
|
||||
}
|
||||
|
||||
pub mod hello {
|
||||
use say;
|
||||
|
||||
pub fn hello() {
|
||||
say::hello();
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
hello();
|
||||
}
|
||||
22
src/test/run-pass/issue-4865-3.rs
Normal file
22
src/test/run-pass/issue-4865-3.rs
Normal file
|
|
@ -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 <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 a {
|
||||
use b::*;
|
||||
}
|
||||
|
||||
pub mod b {
|
||||
use a::*;
|
||||
}
|
||||
|
||||
use a::*;
|
||||
|
||||
fn main() {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue