mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
extend Polonius options helpers
This commit is contained in:
parent
a946fabd48
commit
b012615286
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user