Skip to content

pub use into the top-level crate module does not work #6745

Closed
@mzabaluev

Description

@mzabaluev

While #4202 has been fixed, a yet simpler case is still reproducible in current incoming.
If I have a crate def.rs with these definitions:

pub use inner::A;

mod inner {
    pub struct A;

    impl A {
        pub fn f() {
        }
    }
}

Then use.rs that uses the crate of def.rs:

extern mod def;

fn main() {
    def::A::f();
}

Compilation of use.rs fails:

use.rs:4:4: 4:13 error: not a module `A`
use.rs:4     def::A::f();
             ^~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions