@@ -141,8 +141,8 @@ impl<'infcx, 'tcx> InferCtxt<'infcx, 'tcx> {
141141
142142 match ( a. val ( ) , b. val ( ) ) {
143143 (
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) ) ,
146146 ) => {
147147 self . inner
148148 . borrow_mut ( )
@@ -158,11 +158,11 @@ impl<'infcx, 'tcx> InferCtxt<'infcx, 'tcx> {
158158 bug ! ( "tried to combine ConstKind::Infer/ConstKind::Infer(InferConst::Var)" )
159159 }
160160
161- ( ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) , _) => {
161+ ( & ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) , _) => {
162162 return self . unify_const_variable ( relation. param_env ( ) , vid, b, a_is_expected) ;
163163 }
164164
165- ( _, ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) ) => {
165+ ( _, & ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) ) => {
166166 return self . unify_const_variable ( relation. param_env ( ) , vid, a, !a_is_expected) ;
167167 }
168168 ( ty:: ConstKind :: Unevaluated ( ..) , _) if self . tcx . lazy_normalization ( ) => {
@@ -722,7 +722,7 @@ impl<'tcx> TypeRelation<'tcx> for Generalizer<'_, 'tcx> {
722722 assert_eq ! ( c, c2) ; // we are abusing TypeRelation here; both LHS and RHS ought to be ==
723723
724724 match c. val ( ) {
725- ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) => {
725+ & ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) => {
726726 let mut inner = self . infcx . inner . borrow_mut ( ) ;
727727 let variable_table = & mut inner. const_unification_table ( ) ;
728728 let var_value = variable_table. probe_value ( vid) ;
@@ -744,7 +744,7 @@ impl<'tcx> TypeRelation<'tcx> for Generalizer<'_, 'tcx> {
744744 }
745745 }
746746 }
747- ty:: ConstKind :: Unevaluated ( ty:: Unevaluated { def, substs, promoted } )
747+ & ty:: ConstKind :: Unevaluated ( ty:: Unevaluated { def, substs, promoted } )
748748 if self . tcx ( ) . lazy_normalization ( ) =>
749749 {
750750 assert_eq ! ( promoted, None ) ;
@@ -952,7 +952,7 @@ impl<'tcx> TypeRelation<'tcx> for ConstInferUnifier<'_, 'tcx> {
952952 debug ! ( "ConstInferUnifier: c={:?}" , c) ;
953953
954954 match c. val ( ) {
955- ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) => {
955+ & ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) => {
956956 // Check if the current unification would end up
957957 // unifying `target_vid` with a const which contains
958958 // an inference variable which is unioned with `target_vid`.
@@ -990,7 +990,7 @@ impl<'tcx> TypeRelation<'tcx> for ConstInferUnifier<'_, 'tcx> {
990990 }
991991 }
992992 }
993- ty:: ConstKind :: Unevaluated ( ty:: Unevaluated { def, substs, promoted } )
993+ & ty:: ConstKind :: Unevaluated ( ty:: Unevaluated { def, substs, promoted } )
994994 if self . tcx ( ) . lazy_normalization ( ) =>
995995 {
996996 assert_eq ! ( promoted, None ) ;
0 commit comments