File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -652,22 +652,23 @@ impl TypeRelation<'tcx> for Generalizer<'_, 'tcx> {
652652 debug ! ( "generalize: consts c={:?}" , c) ;
653653 match c. val {
654654 ty:: ConstKind :: Infer ( InferConst :: Var ( vid) ) => {
655- let mut inner = self . infcx . inner . borrow_mut ( ) ;
656- let variable_table = & mut inner. const_unification_table ( ) ;
657- let var_value = variable_table. probe_value ( vid) ;
655+ let var_value =
656+ self . infcx . inner . borrow_mut ( ) . const_unification_table ( ) . probe_value ( vid) ;
658657 match var_value. val {
659- ConstVariableValue :: Known { value : u } => {
660- drop ( inner) ;
661- self . relate ( & u, & u)
662- }
658+ ConstVariableValue :: Known { value : u } => self . relate ( & u, & u) ,
663659 ConstVariableValue :: Unknown { universe } => {
664660 if self . for_universe . can_name ( universe) {
665661 Ok ( c)
666662 } else {
667- let new_var_id = variable_table. new_key ( ConstVarValue {
668- origin : var_value. origin ,
669- val : ConstVariableValue :: Unknown { universe : self . for_universe } ,
670- } ) ;
663+ let new_var_id =
664+ self . infcx . inner . borrow_mut ( ) . const_unification_table ( ) . new_key (
665+ ConstVarValue {
666+ origin : var_value. origin ,
667+ val : ConstVariableValue :: Unknown {
668+ universe : self . for_universe ,
669+ } ,
670+ } ,
671+ ) ;
671672 Ok ( self . tcx ( ) . mk_const_var ( new_var_id, c. ty ) )
672673 }
673674 }
You can’t perform that action at this time.
0 commit comments