librustc: Enforce that extern mod directives come first, then use directives, then items.

Resolve them in this order as well.
This commit is contained in:
Patrick Walton 2013-03-26 19:53:33 -07:00
parent 8b56a8380b
commit 0a4d0f37ca
14 changed files with 332 additions and 335 deletions

View file

@ -0,0 +1,6 @@
#[crate_type="lib"];
pub mod extern_mod_ordering_lib {
pub fn f() {}
}

View file

@ -0,0 +1,11 @@
// aux-build:extern_mod_ordering_lib.rs
// xfail-fast
extern mod extern_mod_ordering_lib;
use extern_mod_ordering_lib::extern_mod_ordering_lib;
fn main() {
extern_mod_ordering_lib::f();
}