Skip to content

Show full type path for type mismatch same type #22331

@A4-Tacks

Description

@A4-Tacks
mod foo {
    pub struct S;
}
mod bar {
    pub struct S;
}
fn test(_: foo::S) {
    test(bar::S);
}

Output expected S, found S (rust-analyzer E0308)

If expected==found, outputting expected foo::S, found bar::S would be even better

Furthermore, expected Vec<S>, found Vec<S> -> expected Vec<foo::S>, found Vec<bar::S>

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsdiagnostics / error reportingC-featureCategory: feature request

    Type

    No type
    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