diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-12-28 14:40:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-28 14:40:01 +0100 |
| commit | d07be1a304391efde577089c6f09b665fe4b1d15 (patch) | |
| tree | 194cce9b8c318b31272468279ce650b78a4daff9 /compiler/rustc_parse/src/errors.rs | |
| parent | c991c243b704b8895af15e971dd3a2ab5ee2aac1 (diff) | |
| parent | aff403cf689e30fdd20b96333d3a10db92086e4f (diff) | |
| download | rust-d07be1a304391efde577089c6f09b665fe4b1d15.tar.gz rust-d07be1a304391efde577089c6f09b665fe4b1d15.zip | |
Rollup merge of #106176 - compiler-errors:fn-kw-as-fn-trait, r=estebank
Recover `fn` keyword as `Fn` trait in bounds `impl fn()` -> `impl Fn()` Fixes #82515
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
| -rw-r--r-- | compiler/rustc_parse/src/errors.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs index 18a0bee9c2e..574591529f3 100644 --- a/compiler/rustc_parse/src/errors.rs +++ b/compiler/rustc_parse/src/errors.rs @@ -1229,3 +1229,11 @@ pub(crate) struct FnTypoWithImpl { #[suggestion(applicability = "maybe-incorrect", code = "impl", style = "verbose")] pub fn_span: Span, } + +#[derive(Diagnostic)] +#[diag(parse_expected_fn_path_found_fn_keyword)] +pub(crate) struct ExpectedFnPathFoundFnKeyword { + #[primary_span] + #[suggestion(applicability = "machine-applicable", code = "Fn", style = "verbose")] + pub fn_token_span: Span, +} |
