diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-12-11 01:37:17 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-12-23 03:01:29 +0000 |
| commit | 1f82b45b6a42eca19a9dc48402abdc02574f791d (patch) | |
| tree | ce418466d0d65b18070a26934ea86a16cbe71829 /compiler/rustc_session/src/config.rs | |
| parent | e108481f74ff123ad98a63bd107a18d13035b275 (diff) | |
| download | rust-1f82b45b6a42eca19a9dc48402abdc02574f791d.tar.gz rust-1f82b45b6a42eca19a9dc48402abdc02574f791d.zip | |
Use `#[derive(Default)]` instead of manually implementing it
Diffstat (limited to 'compiler/rustc_session/src/config.rs')
| -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 047e920e688..5c36c986490 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -168,9 +168,10 @@ pub struct CoverageOptions { } /// Controls whether branch coverage or MC/DC coverage is enabled. -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Default)] pub enum CoverageLevel { /// Instrument for coverage at the MIR block level. + #[default] Block, /// Also instrument branch points (includes block coverage). Branch, @@ -195,12 +196,6 @@ pub enum CoverageLevel { Mcdc, } -impl Default for CoverageLevel { - fn default() -> Self { - Self::Block - } -} - /// Settings for `-Z instrument-xray` flag. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] pub struct InstrumentXRay { |
