suggest fix for attempted integer identifier in patterns
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user