summaryrefslogtreecommitdiffstats
path: root/tests/ui/imports/issue-38293.rs
blob: 3b1393600ba87a18cee49602ed1029b0a9234f81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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`
}