Skip to content
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

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

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

Comments

Projects
None yet
5 participants
@kornelski
Copy link
Contributor

kornelski commented May 21, 2015

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)

@ebfull

This comment has been minimized.

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.

@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented May 31, 2017

Closing in favor of #17164.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.