Add function to manually fulfill lint expectations (RFC 2383)
This commit is contained in:
parent
6c6388cd6c
commit
c8b4873cf9
2 changed files with 39 additions and 1 deletions
|
@ -229,6 +229,13 @@ impl Level {
|
|||
Level::Deny | Level::Forbid => true,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_expectation_id(&self) -> Option<LintExpectationId> {
|
||||
match self {
|
||||
Level::Expect(id) | Level::ForceWarn(Some(id)) => Some(*id),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Specification of a single lint.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue