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
|
@ -30,6 +30,7 @@
|
|||
#![feature(bool_to_option)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(derive_default_enum)]
|
||||
#![feature(discriminant_kind)]
|
||||
#![feature(exhaustive_patterns)]
|
||||
#![feature(if_let_guard)]
|
||||
|
|
|
@ -2263,10 +2263,11 @@ impl<'tcx> TyS<'tcx> {
|
|||
/// a miscompilation or unsoundness.
|
||||
///
|
||||
/// When in doubt, use `VarianceDiagInfo::default()`
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub enum VarianceDiagInfo<'tcx> {
|
||||
/// No additional information - this is the default.
|
||||
/// We will not add any additional information to error messages.
|
||||
#[default]
|
||||
None,
|
||||
/// We switched our variance because a type occurs inside
|
||||
/// the generic argument of a mutable reference or pointer
|
||||
|
@ -2301,9 +2302,3 @@ impl<'tcx> VarianceDiagInfo<'tcx> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> Default for VarianceDiagInfo<'tcx> {
|
||||
fn default() -> Self {
|
||||
Self::None
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue