suggest fix for attempted integer identifier in patterns

This commit is contained in:
Ezra Shaw
2023-01-13 14:14:26 +13:00
parent 61a415be59
commit 1babece1e8
8 changed files with 99 additions and 4 deletions

View File

@@ -770,6 +770,8 @@ pub(crate) struct PatternNotCovered<'s, 'tcx> {
#[subdiagnostic]
pub let_suggestion: Option<SuggestLet>,
#[subdiagnostic]
pub misc_suggestion: Option<MiscPatternSuggestion>,
#[subdiagnostic]
pub res_defined_here: Option<ResDefinedHere>,
}
@@ -848,3 +850,16 @@ pub enum SuggestLet {
count: usize,
},
}
#[derive(Subdiagnostic)]
pub enum MiscPatternSuggestion {
#[suggestion(
mir_build_suggest_attempted_int_lit,
code = "_",
applicability = "maybe-incorrect"
)]
AttemptedIntegerLiteral {
#[primary_span]
start_span: Span,
},
}