@@ -67,7 +67,7 @@ use rustc_hir as hir;
6767use  rustc_hir:: lang_items:: LangItem ; 
6868use  rustc_hir:: { CoroutineDesugaring ,  CoroutineKind } ; 
6969use  rustc_index:: bit_set:: { BitMatrix ,  DenseBitSet ,  GrowableBitSet } ; 
70- use  rustc_index:: { Idx ,  IndexVec } ; 
70+ use  rustc_index:: { Idx ,  IndexVec ,  indexvec } ; 
7171use  rustc_middle:: mir:: visit:: { MutVisitor ,  MutatingUseContext ,  PlaceContext ,  Visitor } ; 
7272use  rustc_middle:: mir:: * ; 
7373use  rustc_middle:: ty:: util:: Discr ; 
@@ -289,7 +289,7 @@ impl<'tcx> TransformVisitor<'tcx> {
289289                let  poll_def_id = self . tcx . require_lang_item ( LangItem :: Poll ,  source_info. span ) ; 
290290                let  args = self . tcx . mk_args ( & [ self . old_ret_ty . into ( ) ] ) ; 
291291                let  ( variant_idx,  operands)  = if  is_return { 
292-                     ( ZERO ,  IndexVec :: from_raw ( vec ! [ val] ) )  // Poll::Ready(val) 
292+                     ( ZERO ,  indexvec ! [ val] )  // Poll::Ready(val) 
293293                }  else  { 
294294                    ( ONE ,  IndexVec :: new ( ) )  // Poll::Pending 
295295                } ; 
@@ -301,7 +301,7 @@ impl<'tcx> TransformVisitor<'tcx> {
301301                let  ( variant_idx,  operands)  = if  is_return { 
302302                    ( ZERO ,  IndexVec :: new ( ) )  // None 
303303                }  else  { 
304-                     ( ONE ,  IndexVec :: from_raw ( vec ! [ val] ) )  // Some(val) 
304+                     ( ONE ,  indexvec ! [ val] )  // Some(val) 
305305                } ; 
306306                make_aggregate_adt ( option_def_id,  variant_idx,  args,  operands) 
307307            } 
@@ -337,12 +337,7 @@ impl<'tcx> TransformVisitor<'tcx> {
337337                }  else  { 
338338                    ZERO  // CoroutineState::Yielded(val) 
339339                } ; 
340-                 make_aggregate_adt ( 
341-                     coroutine_state_def_id, 
342-                     variant_idx, 
343-                     args, 
344-                     IndexVec :: from_raw ( vec ! [ val] ) , 
345-                 ) 
340+                 make_aggregate_adt ( coroutine_state_def_id,  variant_idx,  args,  indexvec ! [ val] ) 
346341            } 
347342        } ; 
348343
@@ -1122,7 +1117,7 @@ fn return_poll_ready_assign<'tcx>(tcx: TyCtxt<'tcx>, source_info: SourceInfo) ->
11221117    } ) ) ; 
11231118    let  ready_val = Rvalue :: Aggregate ( 
11241119        Box :: new ( AggregateKind :: Adt ( poll_def_id,  VariantIdx :: from_usize ( 0 ) ,  args,  None ,  None ) ) , 
1125-         IndexVec :: from_raw ( vec ! [ val] ) , 
1120+         indexvec ! [ val] , 
11261121    ) ; 
11271122    Statement :: new ( source_info,  StatementKind :: Assign ( Box :: new ( ( Place :: return_place ( ) ,  ready_val) ) ) ) 
11281123} 
0 commit comments