fix #105366, suggest impl in the scenario of typo with fn
This commit is contained in:
parent
7701a7e7d4
commit
b70a869d8f
6 changed files with 66 additions and 2 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue