Skip to content

impl Trait for module yields weird error message #8763

Closed
@jdm

Description

@jdm
mod a {
}

trait A {
}

impl A for a {
}

fn main() {
}
/tmp/foo.rs:7:11: 7:12 error: found value name used as a type: def_mod({crate: 0, node: 1})
/tmp/foo.rs:7 impl A for a {
                         ^

We could do better here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions