Skip to content

Commit

Permalink
slight Default cleanup for option
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Oct 20, 2023
1 parent fa45efa commit d9c213c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3420,9 +3420,10 @@ impl DumpMonoStatsFormat {

/// `-Zpolonius` values, enabling the borrow checker polonius analysis, and which version: legacy,
/// or future prototype.
#[derive(Clone, Copy, PartialEq, Hash, Debug)]
#[derive(Clone, Copy, PartialEq, Hash, Debug, Default)]
pub enum Polonius {
/// The default value: disabled.
#[default]
Off,

/// Legacy version, using datalog and the `polonius-engine` crate. Historical value for `-Zpolonius`.
Expand All @@ -3432,12 +3433,6 @@ pub enum Polonius {
Next,
}

impl Default for Polonius {
fn default() -> Self {
Polonius::Off
}
}

impl Polonius {
/// Returns whether the legacy version of polonius is enabled
pub fn is_legacy_enabled(&self) -> bool {
Expand Down

0 comments on commit d9c213c

Please sign in to comment.