- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team
Description
fn main() {
    use self::inner::A;
    mod inner {
        pub struct A;
    }
}<anon>:2:9: 2:14 error: unresolved import `self::inner::A`. Maybe a missing `extern crate inner`?
<anon>:2     use self::inner::A;
                 ^~~~~
This works, so I'm assuming the issue is that self doesn't behave correctly inside of an anonymous module:
fn main() {
    mod inner {
        pub struct A;
    }
    inner::A;
}Metadata
Metadata
Assignees
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team