Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update tests and add some more.
  • Loading branch information
elinorbgr committed Aug 5, 2015
1 parent b69bf11 commit 7516759
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/compile-fail/issue-25396.rs
Expand Up @@ -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() {}

Expand Down
27 changes: 27 additions & 0 deletions 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 <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 changes: 22 additions & 0 deletions 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 <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() {
}

0 comments on commit 7516759

Please sign in to comment.