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

Generic argument span for function type is incorrect #53534

Closed
varkor opened this issue Aug 20, 2018 · 0 comments
Closed

Generic argument span for function type is incorrect #53534

varkor opened this issue Aug 20, 2018 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug.

Comments

@varkor
Copy link
Member

varkor commented Aug 20, 2018

error[E0244]: wrong number of type arguments: expected 0, found 1
--> $DIR/unboxed-closure-sugar-wrong-trait.rs:15:13
|
LL | fn f<F:Trait(isize) -> isize>(x: F) {}
| ^^^^^^^^^^^^^^^^ unexpected type argument

The unexpected type argument here should be just isize (it should end at the )). This syntax is just for function arguments, so it's probably something to do with the desugaring.

@varkor varkor added A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. labels Aug 20, 2018
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 22, 2018
Point at the trait argument when using unboxed closure

Fix rust-lang#53534.

r? @varkor
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 C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

1 participant