mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
17 lines
314 B
Rust
17 lines
314 B
Rust
// Test that `fn foo::bar::{self}` only imports `bar` in the type namespace.
|
|
|
|
mod foo {
|
|
pub fn f() { }
|
|
}
|
|
use foo::f::{self}; //~ ERROR unresolved import `foo::f`
|
|
|
|
mod bar {
|
|
pub fn baz() {}
|
|
pub mod baz {}
|
|
}
|
|
use bar::baz::{self};
|
|
|
|
fn main() {
|
|
baz(); //~ ERROR expected function, found module `baz`
|
|
}
|