Plumb through rustc_lint_defs::Level as enum rather than string.
This commit is contained in:
parent
39f2f18463
commit
0529a13b5d
5 changed files with 19 additions and 9 deletions
|
@ -214,6 +214,13 @@ impl Level {
|
|||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_error(self) -> bool {
|
||||
match self {
|
||||
Level::Allow | Level::Expect(_) | Level::Warn | Level::ForceWarn => false,
|
||||
Level::Deny | Level::Forbid => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Specification of a single lint.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue