Open QuineDot opened 3 months ago
The error used to say "type arguments" instead of "generic arguments" which was accurate at the time. It presumably changed in 1.54 in anticipation of const
generics and/or the ability to intermix generic const
and types, which I believe both stabilized in 1.59. (Prior to that const
parameters had to come after type parameters.)
This is the PR. Looks like before it was "lifetime", "type", "const" and after it was "lifetime", "generic".
Code
Current output
Desired output
Rationale and extra context
Lifetimes parameters are also generic parameters, so the statement that the example has 3 generic arguments is counterfactual. For function items in particular, early-bound lifetimes are also generic parameters of the function item type.
See this URLO topic for an example of someone who understands the distinction between late and early lifetime parameters being confused by the current diagnostic (being mislead that a function's lifetime parameter was late bound because it "only had 2 generic parameters" based on the diagnostic).
Other cases
Rust Version
Anything else?
No response