Closed
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)