fix #105366, suggest impl in the scenario of typo with fn

This commit is contained in:
yukang 2022-12-10 01:31:34 +08:00
parent 7701a7e7d4
commit b70a869d8f
6 changed files with 66 additions and 2 deletions

View file

@ -1221,3 +1221,11 @@ pub(crate) struct UnexpectedIfWithIf(
#[suggestion(applicability = "machine-applicable", code = " ", style = "verbose")]
pub Span,
);
#[derive(Diagnostic)]
#[diag(parse_maybe_fn_typo_with_impl)]
pub(crate) struct FnTypoWithImpl {
#[primary_span]
#[suggestion(applicability = "maybe-incorrect", code = "impl", style = "verbose")]
pub fn_span: Span,
}