Suggest [tail @ ..] on [..tail] and [...tail] where tail is unresolved

This commit is contained in:
León Orell Valerian Liehr 2024-02-03 01:32:01 +01:00
parent 4e3eed4892
commit 285d8c225d
No known key found for this signature in database
GPG key ID: D17A07215F68E713
5 changed files with 112 additions and 20 deletions

View file

@ -800,3 +800,17 @@ pub(crate) struct UnexpectedResChangeTyToConstParamSugg {
#[applicability]
pub applicability: Applicability,
}
#[derive(Subdiagnostic)]
#[suggestion(
resolve_unexpected_res_use_at_op_in_slice_pat_with_range_sugg,
code = "{snippet}",
applicability = "maybe-incorrect",
style = "verbose"
)]
pub(crate) struct UnexpectedResUseAtOpInSlicePatWithRangeSugg {
#[primary_span]
pub span: Span,
pub ident: Ident,
pub snippet: String,
}