diff options
| author | Michael Goulet <michael@errs.io> | 2022-12-27 06:14:40 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-12-27 06:14:46 +0000 |
| commit | aff403cf689e30fdd20b96333d3a10db92086e4f (patch) | |
| tree | 026a00919d467b4b9ccd637c6e460301b3fd1c53 /compiler/rustc_parse/src/errors.rs | |
| parent | caa64e5b5e7605a1c1428b2a402021bef83f3e1e (diff) | |
| download | rust-aff403cf689e30fdd20b96333d3a10db92086e4f.tar.gz rust-aff403cf689e30fdd20b96333d3a10db92086e4f.zip | |
Recover `fn` keyword as `Fn` trait in bounds
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, +} |
