-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.Diagnostics: An error or lint that doesn't give enough information about the problem at hand.F-const_generics`#![feature(const_generics)]``#![feature(const_generics)]`const-generics-bad-diagnosticsAn error is correctly emitted, but is confusing, for `min_const_generics`.An error is correctly emitted, but is confusing, for `min_const_generics`.
Description
At the moment, we simply emit errors like:
error[E0282]: type annotations needed
--> $DIR/method-chain.rs:21:33
|
LL | Foo.bar().bar().bar().bar().baz();
| ^^^
|
= note: cannot infer the value of the const parameter `N`
It would be good to suggest to the user how to fix this, like with uninferred type arguments.
estebank
Metadata
Metadata
Assignees
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.Diagnostics: An error or lint that doesn't give enough information about the problem at hand.F-const_generics`#![feature(const_generics)]``#![feature(const_generics)]`const-generics-bad-diagnosticsAn error is correctly emitted, but is confusing, for `min_const_generics`.An error is correctly emitted, but is confusing, for `min_const_generics`.