Plumb through rustc_lint_defs::Level as enum rather than string.
This commit is contained in:
committed by
Jeremy Fitzhardinge
parent
39f2f18463
commit
0529a13b5d
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user