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
|
@ -95,9 +95,10 @@ pub(crate) type UnificationTable<'a, 'tcx, T> = ut::UnificationTable<
|
|||
/// This is used so that the region values inferred by HIR region solving are
|
||||
/// not exposed, and so that we can avoid doing work in HIR typeck that MIR
|
||||
/// typeck will also do.
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Copy, Clone, Debug, Default)]
|
||||
pub enum RegionckMode {
|
||||
/// The default mode: report region errors, don't erase regions.
|
||||
#[default]
|
||||
Solve,
|
||||
/// Erase the results of region after solving.
|
||||
Erase {
|
||||
|
@ -108,12 +109,6 @@ pub enum RegionckMode {
|
|||
},
|
||||
}
|
||||
|
||||
impl Default for RegionckMode {
|
||||
fn default() -> Self {
|
||||
RegionckMode::Solve
|
||||
}
|
||||
}
|
||||
|
||||
impl RegionckMode {
|
||||
/// Indicates that the MIR borrowck will repeat these region
|
||||
/// checks, so we should ignore errors if NLL is (unconditionally)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue