From b01261528655a27c57ff9a229702cba1b660743a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Rakic?= Date: Fri, 30 Jun 2023 13:18:11 +0000 Subject: [PATCH] extend Polonius options helpers --- compiler/rustc_session/src/config.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index e8ae969861e..e03b66f293e 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -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) + } }