Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kornelski opened this issue May 21, 2015 · 2 comments
Closed

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

kornelski opened this issue May 21, 2015 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@kornelski
Copy link
Contributor

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)

@Aatch Aatch added I-papercut A-diagnostics Area: Messages for errors, warnings, and lints labels May 22, 2015
@ebfull
Copy link
Contributor

ebfull commented Nov 9, 2015

Associated types act as type synonyms in the same sense, and it would be nice if error message included those where applicable as well.

@steveklabnik steveklabnik added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 9, 2017
@Mark-Simulacrum
Copy link
Member

Closing in favor of #17164.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants