@@ -141,8 +141,8 @@ impl<'infcx, 'tcx> InferCtxt<'infcx, 'tcx> {
141
141
142
142
match ( a. val ( ) , b. val ( ) ) {
143
143
(
144
- ty:: ConstKind :: Infer ( InferConst :: Var ( a_vid) ) ,
145
- ty:: ConstKind :: Infer ( InferConst :: Var ( b_vid) ) ,
144
+ & ty:: ConstKind :: Infer ( InferConst :: Var ( a_vid) ) ,
145
+ & ty:: ConstKind :: Infer ( InferConst :: Var ( b_vid) ) ,
146
146
) => {
147
147
self . inner
148
148
. borrow_mut ( )
@@ -158,11 +158,11 @@ impl<'infcx, 'tcx> InferCtxt<'infcx, 'tcx> {
158
158
bug ! ( "tried to combine ConstKind::Infer/ConstKind::Infer(InferConst::Var)" )
159
159
}
160
160
161
- ( ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) , _) => {
161
+ ( & ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) , _) => {
162
162
return self . unify_const_variable ( relation. param_env ( ) , vid, b, a_is_expected) ;
163
163
}
164
164
165
- ( _, ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) ) => {
165
+ ( _, & ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) ) => {
166
166
return self . unify_const_variable ( relation. param_env ( ) , vid, a, !a_is_expected) ;
167
167
}
168
168
( ty:: ConstKind :: Unevaluated ( ..) , _) if self . tcx . lazy_normalization ( ) => {
@@ -722,7 +722,7 @@ impl<'tcx> TypeRelation<'tcx> for Generalizer<'_, 'tcx> {
722
722
assert_eq ! ( c, c2) ; // we are abusing TypeRelation here; both LHS and RHS ought to be ==
723
723
724
724
match c. val ( ) {
725
- ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) => {
725
+ & ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) => {
726
726
let mut inner = self . infcx . inner . borrow_mut ( ) ;
727
727
let variable_table = & mut inner. const_unification_table ( ) ;
728
728
let var_value = variable_table. probe_value ( vid) ;
@@ -744,7 +744,7 @@ impl<'tcx> TypeRelation<'tcx> for Generalizer<'_, 'tcx> {
744
744
}
745
745
}
746
746
}
747
- ty:: ConstKind :: Unevaluated ( ty:: Unevaluated { def, substs, promoted } )
747
+ & ty:: ConstKind :: Unevaluated ( ty:: Unevaluated { def, substs, promoted } )
748
748
if self . tcx ( ) . lazy_normalization ( ) =>
749
749
{
750
750
assert_eq ! ( promoted, None ) ;
@@ -952,7 +952,7 @@ impl<'tcx> TypeRelation<'tcx> for ConstInferUnifier<'_, 'tcx> {
952
952
debug ! ( "ConstInferUnifier: c={:?}" , c) ;
953
953
954
954
match c. val ( ) {
955
- ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) => {
955
+ & ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) => {
956
956
// Check if the current unification would end up
957
957
// unifying `target_vid` with a const which contains
958
958
// an inference variable which is unioned with `target_vid`.
@@ -990,7 +990,7 @@ impl<'tcx> TypeRelation<'tcx> for ConstInferUnifier<'_, 'tcx> {
990
990
}
991
991
}
992
992
}
993
- ty:: ConstKind :: Unevaluated ( ty:: Unevaluated { def, substs, promoted } )
993
+ & ty:: ConstKind :: Unevaluated ( ty:: Unevaluated { def, substs, promoted } )
994
994
if self . tcx ( ) . lazy_normalization ( ) =>
995
995
{
996
996
assert_eq ! ( promoted, None ) ;
0 commit comments