Skip to content

Impl on type imported unqualified from different module #12729

Description

@huonw
pub struct Foo;

mod bar {
    use Foo;

    impl Foo {
        fn baz(&self) {}
    }
}
fn main() {}
qualified.rs:6:10: 6:13 error: found module name used as a type: impl bar::Foo::Foo (id=10)
qualified.rs:6     impl Foo {
                        ^~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions