Wrong diagnostic when incorrectly using const generics in impl
block
#79598
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
C-bug
Category: This is a bug.
const-generics-bad-diagnostics
An error is correctly emitted, but is confusing, for `min_const_generics`.
F-const_generics
`#![feature(const_generics)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following incorrect code produces an incorrect diagnostic
The diagnostic produced is:
Confusingly
const
is shown as one of the expected items to replaceconst
.Of course, the user most likely meant to type:
Here's a playground reproducing the issue for convenience: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=27ae1b8286d97da1df8240f84062a339
The text was updated successfully, but these errors were encountered: