diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2023-10-20 15:32:22 +0000 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2023-10-20 20:59:27 +0000 |
| commit | d9c213cd5e5b5ec480297960ca080ed5b493f4f1 (patch) | |
| tree | 8a3475ad1634d38a5a4d18f6938f7b440aa97c1f /compiler/rustc_session/src | |
| parent | fa45efaafbad50454f8de065be8c9fdea7d89094 (diff) | |
| download | rust-d9c213cd5e5b5ec480297960ca080ed5b493f4f1.tar.gz rust-d9c213cd5e5b5ec480297960ca080ed5b493f4f1.zip | |
slight Default cleanup for option
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index bbba800e840..ef0ad69c4a2 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -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`. @@ -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 { |
