Add function to manually fulfill lint expectations (RFC 2383)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user