add OR_PATTERNS_BACK_COMPAT lint
test: add more cases test: add comments refine msg
This commit is contained in:
parent
803ddb8359
commit
2c66e15468
7 changed files with 162 additions and 3 deletions
|
@ -709,6 +709,9 @@ pub trait LintContext: Sized {
|
|||
BuiltinLintDiagnostics::ProcMacroBackCompat(note) => {
|
||||
db.note(¬e);
|
||||
}
|
||||
BuiltinLintDiagnostics::OrPatternsBackCompat(span,suggestion) => {
|
||||
db.span_suggestion(span, "use pat2015 to preserve semantics", suggestion, Applicability::MachineApplicable);
|
||||
}
|
||||
}
|
||||
// Rewrap `db`, and pass control to the user.
|
||||
decorate(LintDiagnosticBuilder::new(db));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue