Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix resolve tests and add some more.
The precedent resolve modification changed the order in which imports are handled, so 2 tests needed to be updated.
- Loading branch information
Showing
5 changed files
with
104 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2012-2014 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. | ||
|
||
#![allow(unused_imports, dead_code)] | ||
|
||
mod bar { | ||
pub use self::middle::*; | ||
|
||
mod middle { | ||
pub use self::baz::Baz; | ||
|
||
mod baz { | ||
pub enum Baz { | ||
Baz1, | ||
Baz2 | ||
} | ||
} | ||
} | ||
} | ||
|
||
mod foo { | ||
use bar::Baz::{Baz1, Baz2}; | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// 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 b::{B}; | ||
pub use self::inner::A; | ||
|
||
mod inner { | ||
pub struct A; | ||
} | ||
} | ||
|
||
mod b { | ||
use a::{A}; | ||
pub use self::inner::B; | ||
|
||
mod inner { | ||
pub struct B; | ||
} | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// 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::fn_b; | ||
use c::*; | ||
|
||
pub fn fn_a(){ | ||
} | ||
} | ||
|
||
pub mod b { | ||
use a::fn_a; | ||
use c::*; | ||
|
||
pub fn fn_b(){ | ||
} | ||
} | ||
|
||
pub mod c{ | ||
pub fn fn_c(){ | ||
} | ||
} | ||
|
||
use a::fn_a; | ||
use b::fn_b; | ||
|
||
fn main() { | ||
} |