Skip to content

Strange error message on impl name resolution error #16144

Closed
@kmcallister

Description

@kmcallister
struct Foo;

mod bar {
    impl Foo {
        fn f() { }
    }
}

gives

baz.rs:4:10: 4:13 error: found module name used as a type: impl bar::Foo::Foo (id=7)
baz.rs:4     impl Foo {

when the actual issue is that one should write impl super::Foo or similar.

rustc 0.11.0 (49bc17b 2014-07-07 17:16:34 +0000)

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