1
Fork 0

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