-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
Code
fn repro(a: impl Fn() -> impl Drop) {}
Current output
error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in `Fn` trait return types
--> src/lib.rs:1:26
|
1 | fn repro(a: impl Fn() -> impl Drop) {}
| ^^^^^^^^^
Desired output
I believe this message should mention the newly-stabilized possibilities of RPITIT. For example, this is not a function or an inherent method:
trait Moo {
fn moo() -> impl Drop;
}
Rationale and extra context
No response
Other cases
My gut tells me that there are other errors with the same now-incorrect subset of locations.
Anything else?
Seen in nightly (2024-01-04 f688dd6)
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.