File tree 1 file changed +6
-18
lines changed
compiler/rustc_infer/src/infer
1 file changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -892,28 +892,16 @@ impl<'tcx> InferCtxt<'tcx> {
892
892
ty:: Const :: new_var ( self . tcx , vid)
893
893
}
894
894
895
- pub fn next_const_var_id ( & self , origin : ConstVariableOrigin ) -> ConstVid {
896
- self . inner
897
- . borrow_mut ( )
898
- . const_unification_table ( )
899
- . new_key ( ConstVariableValue :: Unknown { origin, universe : self . universe ( ) } )
900
- . vid
901
- }
902
-
903
- fn next_int_var_id ( & self ) -> IntVid {
904
- self . inner . borrow_mut ( ) . int_unification_table ( ) . new_key ( ty:: IntVarValue :: Unknown )
905
- }
906
-
907
895
pub fn next_int_var ( & self ) -> Ty < ' tcx > {
908
- Ty :: new_int_var ( self . tcx , self . next_int_var_id ( ) )
909
- }
910
-
911
- fn next_float_var_id ( & self ) -> FloatVid {
912
- self . inner . borrow_mut ( ) . float_unification_table ( ) . new_key ( ty:: FloatVarValue :: Unknown )
896
+ let next_int_var_id =
897
+ self . inner . borrow_mut ( ) . int_unification_table ( ) . new_key ( ty:: IntVarValue :: Unknown ) ;
898
+ Ty :: new_int_var ( self . tcx , next_int_var_id)
913
899
}
914
900
915
901
pub fn next_float_var ( & self ) -> Ty < ' tcx > {
916
- Ty :: new_float_var ( self . tcx , self . next_float_var_id ( ) )
902
+ let next_float_var_id =
903
+ self . inner . borrow_mut ( ) . float_unification_table ( ) . new_key ( ty:: FloatVarValue :: Unknown ) ;
904
+ Ty :: new_float_var ( self . tcx , next_float_var_id)
917
905
}
918
906
919
907
/// Creates a fresh region variable with the next available index.
You can’t perform that action at this time.
0 commit comments