Skip to content

Commit 547a4c5

Browse files
committed
extend Polonius options helpers
1 parent 52411ae commit 547a4c5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

compiler/rustc_session/src/config.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3377,7 +3377,7 @@ pub enum Polonius {
33773377
/// Legacy version, using datalog and the `polonius-engine` crate. Historical value for `-Zpolonius`.
33783378
Legacy,
33793379

3380-
/// In-tree experimentation
3380+
/// In-tree prototype, extending the NLL infrastructure.
33813381
Next,
33823382
}
33833383

@@ -3392,4 +3392,9 @@ impl Polonius {
33923392
pub fn is_legacy_enabled(&self) -> bool {
33933393
matches!(self, Polonius::Legacy)
33943394
}
3395+
3396+
/// Returns whether the "next" version of polonius is enabled
3397+
pub fn is_next_enabled(&self) -> bool {
3398+
matches!(self, Polonius::Next)
3399+
}
33953400
}

0 commit comments

Comments
 (0)