Use derive_default_enum
in the compiler
This commit is contained in:
parent
936f2600b6
commit
7b103e7dd2
9 changed files with 17 additions and 31 deletions
|
@ -14,6 +14,7 @@
|
|||
#![feature(bool_to_option)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(drain_filter)]
|
||||
#![feature(derive_default_enum)]
|
||||
#![feature(hash_drain_filter)]
|
||||
#![feature(in_band_lifetimes)]
|
||||
#![feature(iter_zip)]
|
||||
|
|
|
@ -82,9 +82,14 @@ pub use self::chalk_fulfill::FulfillmentContext as ChalkFulfillmentContext;
|
|||
pub use rustc_infer::traits::*;
|
||||
|
||||
/// Whether to skip the leak check, as part of a future compatibility warning step.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
///
|
||||
/// The "default" for skip-leak-check corresponds to the current
|
||||
/// behavior (do not skip the leak check) -- not the behavior we are
|
||||
/// transitioning into.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Default)]
|
||||
pub enum SkipLeakCheck {
|
||||
Yes,
|
||||
#[default]
|
||||
No,
|
||||
}
|
||||
|
||||
|
@ -94,15 +99,6 @@ impl SkipLeakCheck {
|
|||
}
|
||||
}
|
||||
|
||||
/// The "default" for skip-leak-check corresponds to the current
|
||||
/// behavior (do not skip the leak check) -- not the behavior we are
|
||||
/// transitioning into.
|
||||
impl Default for SkipLeakCheck {
|
||||
fn default() -> Self {
|
||||
SkipLeakCheck::No
|
||||
}
|
||||
}
|
||||
|
||||
/// The mode that trait queries run in.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
pub enum TraitQueryMode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue