2014-10-19 01:46:08 -05:00
|
|
|
mod m2 {
|
|
|
|
pub enum Foo {
|
|
|
|
A,
|
2015-01-08 04:54:35 -06:00
|
|
|
B(isize),
|
|
|
|
C { a: isize },
|
2014-10-19 01:46:08 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
pub fn foo() {}
|
|
|
|
pub fn bar(&self) {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod m {
|
|
|
|
pub use m2::Foo::*;
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
use m2::Foo::*;
|
|
|
|
|
2017-01-11 16:18:08 -06:00
|
|
|
foo(); //~ ERROR cannot find function `foo` in this scope
|
|
|
|
m::foo(); //~ ERROR cannot find function `foo` in module `m`
|
|
|
|
bar(); //~ ERROR cannot find function `bar` in this scope
|
|
|
|
m::bar(); //~ ERROR cannot find function `bar` in module `m`
|
2014-10-19 01:46:08 -05:00
|
|
|
}
|