Allow multiple imports in a single statement

Like so: import foo::{bar, baz};

Issue #817
This commit is contained in:
Brian Anderson 2011-08-16 15:21:30 -07:00
parent c4ce463f37
commit cd54e77720
10 changed files with 155 additions and 3 deletions

View file

@ -0,0 +1,15 @@
mod spam {
fn ham() {}
fn eggs() {}
}
native "rust" mod rustrt {
import spam::{ham, eggs};
export ham;
export eggs;
}
fn main() {
rustrt::ham();
rustrt::eggs();
}

View file

@ -0,0 +1,11 @@
import spam::{ham, eggs};
mod spam {
fn ham() {}
fn eggs() {}
}
fn main() {
ham();
eggs();
}