Skip to content

Generic argument span for function type is incorrect #53534

Closed
@varkor

Description

@varkor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions