Recover dyn
and impl
after for<...>
This commit is contained in:
parent
85b8450466
commit
a8a2ee4e8f
5 changed files with 95 additions and 3 deletions
|
@ -2828,3 +2828,23 @@ pub(crate) struct GenericArgsInPatRequireTurbofishSyntax {
|
|||
)]
|
||||
pub suggest_turbofish: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_transpose_dyn_or_impl)]
|
||||
pub(crate) struct TransposeDynOrImpl<'a> {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
pub kw: &'a str,
|
||||
#[subdiagnostic]
|
||||
pub sugg: TransposeDynOrImplSugg<'a>,
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
#[multipart_suggestion(parse_suggestion, applicability = "machine-applicable")]
|
||||
pub(crate) struct TransposeDynOrImplSugg<'a> {
|
||||
#[suggestion_part(code = "")]
|
||||
pub removal_span: Span,
|
||||
#[suggestion_part(code = "{kw} ")]
|
||||
pub insertion_span: Span,
|
||||
pub kw: &'a str,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue