File tree Expand file tree Collapse file tree 1 file changed +6
-18
lines changed
compiler/rustc_infer/src/infer Expand file tree Collapse file tree 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> {
892892 ty:: Const :: new_var ( self . tcx , vid)
893893 }
894894
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-
907895 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)
913899 }
914900
915901 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)
917905 }
918906
919907 /// Creates a fresh region variable with the next available index.
You can’t perform that action at this time.
0 commit comments