diff options
Diffstat (limited to 'src/librustc/infer/region_constraints/mod.rs')
| -rw-r--r-- | src/librustc/infer/region_constraints/mod.rs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/librustc/infer/region_constraints/mod.rs b/src/librustc/infer/region_constraints/mod.rs index 525ae03dfaf..46b12d01829 100644 --- a/src/librustc/infer/region_constraints/mod.rs +++ b/src/librustc/infer/region_constraints/mod.rs @@ -149,7 +149,7 @@ pub struct Verify<'tcx> { pub bound: VerifyBound<'tcx>, } -#[derive(Copy, Clone, PartialEq, Eq)] +#[derive(Copy, Clone, PartialEq, Eq, Hash)] pub enum GenericKind<'tcx> { Param(ty::ParamTy), Projection(ty::ProjectionTy<'tcx>), @@ -345,8 +345,8 @@ impl<'tcx> RegionConstraintCollector<'tcx> { RegionConstraintCollector { var_infos: VarInfos::default(), data: RegionConstraintData::default(), - lubs: FxHashMap(), - glbs: FxHashMap(), + lubs: Default::default(), + glbs: Default::default(), bound_count: 0, undo_log: Vec::new(), unification_table: ut::UnificationTable::new(), @@ -749,7 +749,7 @@ impl<'tcx> RegionConstraintCollector<'tcx> { a // LUB(a,a) = a } - _ => self.combine_vars(tcx, Lub, a, b, origin.clone()), + _ => self.combine_vars(tcx, Lub, a, b, origin), } } @@ -771,7 +771,7 @@ impl<'tcx> RegionConstraintCollector<'tcx> { a // GLB(a,a) = a } - _ => self.combine_vars(tcx, Glb, a, b, origin.clone()), + _ => self.combine_vars(tcx, Glb, a, b, origin), } } @@ -833,10 +833,6 @@ impl<'tcx> RegionConstraintCollector<'tcx> { ty::RePlaceholder(placeholder) => placeholder.universe, ty::ReClosureBound(vid) | ty::ReVar(vid) => self.var_universe(vid), ty::ReLateBound(..) => bug!("universe(): encountered bound region {:?}", region), - ty::ReCanonical(..) => bug!( - "region_universe(): encountered canonical region {:?}", - region - ), } } |
