Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing recover for typo'd const in const parameter definition #111941

Closed
BoxyUwU opened this issue May 25, 2023 · 0 comments · Fixed by #112029
Closed

missing recover for typo'd const in const parameter definition #111941

BoxyUwU opened this issue May 25, 2023 · 0 comments · Fixed by #112029
Labels
A-const-generics Area: const generics (parameters and arguments) A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@BoxyUwU
Copy link
Member

BoxyUwU commented May 25, 2023

Code

pub fn bar<Const N: u8>() {}

Current output

error: expected one of `,`, `:`, `=`, or `>`, found `N`
 --> src/lib.rs:1:18
  |
1 | pub fn bar<Const N: u8>() {}
  |                  ^ expected one of `,`, `:`, `=`, or `>`

Desired output

It should say that the `const` was typo'd as `Const` and should be `Const` preferably with a `help:` thing that shows the diff (and probably should be auto-fixable?)

Rationale and extra context

No response

Other cases

No response

Anything else?

No response

@BoxyUwU BoxyUwU added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-const-generics Area: const generics (parameters and arguments) labels May 25, 2023
@bors bors closed this as completed in 45ca2f7 May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant