-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.Category: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.T-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.
Description
fn apply_to_3<F>(f: F) -> i32 where
F: Fn<i32, Output=i32> {
f(3)
}
doesn't compile, it's normal but, the error message isn't right:
error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
--> src/main.rs:12:8
|
12 | F: Fn<i32, Output=i32> {
| ^^ help: use parenthetical notation instead: `Fni32 -> i32`
|
= note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
Fni32 -> i32
is missing parentheses. And E0658 is not an error about Fn-family traits.
Metadata
Metadata
Assignees
Labels
A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.Category: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.T-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.