Closed
Description
This does not work:
use foo::Bar;
fn main() {
impl Bar {
fn boop(&self) -> bool {
true
}
}
let y = Bar {y: 8};
println!("{}", y.boop());
}
mod foo {
pub struct Bar {
y: int,
}
}
It results in:
module_name_used_type.rs:10:13: 10:16 error: `Bar` does not name a structure
module_name_used_type.rs:10 let y = Bar {y: 8};
^~~
Changing "impl Bar" to "impl ::foo::Bar" on line 3 does work, however. Is this the intended behavior?
Metadata
Metadata
Assignees
Labels
No labels