diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-05-29 04:03:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-29 04:03:01 +0200 |
| commit | 45ca2f732e18e42d3a95c79ace21b484205acdb1 (patch) | |
| tree | 7c3a73bfafcaa6f231c88fe6c3dc3f79b0aceee1 /compiler/rustc_hir_analysis/src/structured_errors.rs | |
| parent | 089677eb32af83318467325edbef9b64053df532 (diff) | |
| parent | 41f5a30690884578f697727c38139728131217ea (diff) | |
| download | rust-45ca2f732e18e42d3a95c79ace21b484205acdb1.tar.gz rust-45ca2f732e18e42d3a95c79ace21b484205acdb1.zip | |
Rollup merge of #112029 - jieyouxu:typo-const-in-const-param-def, r=cjgillot
Recover upon mistyped error on typo'd `const` in const param def
And add machine-applicable fix for the typo'd `const` keyword.
### Before
```
error: expected one of `,`, `:`, `=`, or `>`, found `N`
--> src/lib.rs:1:18
|
1 | pub fn bar<Const N: u8>() {}
| ^ expected one of `,`, `:`, `=`, or `>`
```
### After This PR
```
error: `const` keyword was mistyped as `Const`
--> test.rs:1:8
|
1 | fn bar<Const N: u8>() {}
| ^^^^^
|
help: use the `const` keyword
|
1 | fn bar<const N: u8>() {}
| ~~~~~
```
Fixes #111941.
Diffstat (limited to 'compiler/rustc_hir_analysis/src/structured_errors.rs')
0 files changed, 0 insertions, 0 deletions
