rust/tests/ui/imports/issue-38293.rs
2023-01-11 09:32:08 +00:00

16 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`
}