extend Polonius options helpers

This commit is contained in:
Rémy Rakic 2023-06-30 13:18:11 +00:00
parent a946fabd48
commit b012615286

View File

@ -3427,7 +3427,7 @@ pub enum Polonius {
/// Legacy version, using datalog and the `polonius-engine` crate. Historical value for `-Zpolonius`.
Legacy,
/// In-tree experimentation
/// In-tree prototype, extending the NLL infrastructure.
Next,
}
@ -3442,4 +3442,9 @@ impl Polonius {
pub fn is_legacy_enabled(&self) -> bool {
matches!(self, Polonius::Legacy)
}
/// Returns whether the "next" version of polonius is enabled
pub fn is_next_enabled(&self) -> bool {
matches!(self, Polonius::Next)
}
}