Skip to content

'Mismatched type' error doesn't use aliased type names #25694

Closed
@kornelski

Description

@kornelski
type mytype = f32;

fn main() {
    let foo: mytype = 1usize;
}

fails with:

expected f32,
found usize

but I'd expect it to say something along the lines:

expected mytype (f32)
found usize

(The problem has been mentioned in comments of #3417)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions