Incorrect hints for Fn
type on stable and incorrect suggestions on nightly
#67100
Labels
A-closures
Area: Closures (`|…| { … }`)
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
currently produces on stable
note: wrap the F in a closure with no arguments: || { /* code */ }
- ???where F: std::ops::Fn<()>
- incorrectFn
syntaxOn nightly situation is more interesting:
-- help: consider further restricting this bound: F: std::ops::Fn<()> +
has missing type and incorrectFn
syntax (Fn()
is correct)(Playground)
The text was updated successfully, but these errors were encountered: