Allow multiple imports in a single statement
Like so: import foo::{bar, baz};
Issue #817
This commit is contained in:
parent
c4ce463f37
commit
cd54e77720
10 changed files with 155 additions and 3 deletions
15
src/test/run-pass/import-from-native.rs
Normal file
15
src/test/run-pass/import-from-native.rs
Normal 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();
|
||||
}
|
||||
11
src/test/run-pass/import-from.rs
Normal file
11
src/test/run-pass/import-from.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import spam::{ham, eggs};
|
||||
|
||||
mod spam {
|
||||
fn ham() {}
|
||||
fn eggs() {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
ham();
|
||||
eggs();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue