Diagnostics do not consider lifetime parameters to be "generics" #128583
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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
The text was updated successfully, but these errors were encountered: