Suggest to set lint level on whole match
This commit is contained in:
parent
61d0fc7cf5
commit
f0e8330879
7 changed files with 84 additions and 52 deletions
|
@ -792,7 +792,14 @@ pub(crate) struct NonExhaustiveOmittedPattern<'tcx> {
|
|||
#[derive(LintDiagnostic)]
|
||||
#[diag(mir_build_non_exhaustive_omitted_pattern_lint_on_arm)]
|
||||
#[help]
|
||||
pub(crate) struct NonExhaustiveOmittedPatternLintOnArm;
|
||||
pub(crate) struct NonExhaustiveOmittedPatternLintOnArm {
|
||||
#[label]
|
||||
pub lint_span: Span,
|
||||
#[suggestion(code = "#[{lint_level}({lint_name})]\n", applicability = "maybe-incorrect")]
|
||||
pub suggest_lint_on_match: Option<Span>,
|
||||
pub lint_level: &'static str,
|
||||
pub lint_name: &'static str,
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
#[label(mir_build_uncovered)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue