Skip to content

Misleading error message on use of FnOnce<(T, U), Output=V> #26970

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
llogiq opened this issue Jul 11, 2015 · 6 comments
Closed

Misleading error message on use of FnOnce<(T, U), Output=V> #26970

llogiq opened this issue Jul 11, 2015 · 6 comments
Labels
A-closures Area: Closures (`|…| { … }`) A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@llogiq
Copy link
Contributor

llogiq commented Jul 11, 2015

This stack overflow question shows that if one tries to declare a FnOnce<(T, U), Output=V> (which should be a FnOnce(T, U) -> V), the error message is quite misleading.

@steveklabnik steveklabnik added the A-diagnostics Area: Messages for errors, warnings, and lints label Jul 11, 2015
@steveklabnik steveklabnik changed the title [unstable] Misleading error message on use of FnOnce<(T, U), Output=V> Misleading error message on use of FnOnce<(T, U), Output=V> Jul 11, 2015
@steveklabnik steveklabnik added the A-closures Area: Closures (`|…| { … }`) label Jul 11, 2015
@llogiq
Copy link
Contributor Author

llogiq commented Jul 13, 2015

Thanks, @steveklabnik!

@arielb1
Copy link
Contributor

arielb1 commented Jul 13, 2015

I think we just have to write a better message in --explain. cc @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

I'm on it!

@GuillaumeGomez
Copy link
Member

When #27350 will be merged, it should be good (I hope !).

@llogiq
Copy link
Contributor Author

llogiq commented Jul 28, 2015

I just "tested" the commit (in the sense of reading and understanding it) successfully. 😄
@GuillaumeGomez Keep up the good work!

@arielb1
Copy link
Contributor

arielb1 commented Jul 28, 2015

The error is E0215 here.

arielb1 pushed a commit to arielb1/rust that referenced this issue Jul 28, 2015
This also calls the right API, which e.g. prevents a suggestion
for #![feature(unboxed_closures)] on stable.

Fixes rust-lang#26970
bors added a commit that referenced this issue Jul 29, 2015
This also calls the right API, which e.g. prevents a suggestion
for #![feature(unboxed_closures)] on stable.

Fixes #26970 

r? @steveklabnik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-closures Area: Closures (`|…| { … }`) A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

4 participants