@@ -560,7 +560,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
560560 expr : & ' hir hir:: Expr < ' hir > ,
561561 overall_span : Span ,
562562 ) -> & ' hir hir:: Expr < ' hir > {
563- let constructor = self . arena . alloc ( self . expr_lang_item_path ( method_span, lang_item, None ) ) ;
563+ let constructor = self . arena . alloc ( self . expr_lang_item_path ( method_span, lang_item) ) ;
564564 self . expr_call ( overall_span, constructor, std:: slice:: from_ref ( expr) )
565565 }
566566
@@ -614,7 +614,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
614614 // Resume argument type: `ResumeTy`
615615 let unstable_span =
616616 self . mark_span_with_reason ( DesugaringKind :: Async , span, self . allow_gen_future . clone ( ) ) ;
617- let resume_ty = hir:: QPath :: LangItem ( hir:: LangItem :: ResumeTy , unstable_span, None ) ;
617+ let resume_ty = hir:: QPath :: LangItem ( hir:: LangItem :: ResumeTy , unstable_span) ;
618618 let input_ty = hir:: Ty {
619619 hir_id : self . next_id ( ) ,
620620 kind : hir:: TyKind :: Path ( resume_ty) ,
@@ -818,19 +818,16 @@ impl<'hir> LoweringContext<'_, 'hir> {
818818 span,
819819 hir:: LangItem :: PinNewUnchecked ,
820820 arena_vec ! [ self ; ref_mut_awaitee] ,
821- Some ( expr_hir_id) ,
822821 ) ;
823822 let get_context = self . expr_call_lang_item_fn_mut (
824823 gen_future_span,
825824 hir:: LangItem :: GetContext ,
826825 arena_vec ! [ self ; task_context] ,
827- Some ( expr_hir_id) ,
828826 ) ;
829827 let call = self . expr_call_lang_item_fn (
830828 span,
831829 hir:: LangItem :: FuturePoll ,
832830 arena_vec ! [ self ; new_unchecked, get_context] ,
833- Some ( expr_hir_id) ,
834831 ) ;
835832 self . arena . alloc ( self . expr_unsafe ( call) )
836833 } ;
@@ -843,12 +840,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
843840 let ( x_pat, x_pat_hid) = self . pat_ident ( gen_future_span, x_ident) ;
844841 let x_expr = self . expr_ident ( gen_future_span, x_ident, x_pat_hid) ;
845842 let ready_field = self . single_pat_field ( gen_future_span, x_pat) ;
846- let ready_pat = self . pat_lang_item_variant (
847- span,
848- hir:: LangItem :: PollReady ,
849- ready_field,
850- Some ( expr_hir_id) ,
851- ) ;
843+ let ready_pat = self . pat_lang_item_variant ( span, hir:: LangItem :: PollReady , ready_field) ;
852844 let break_x = self . with_loop_scope ( loop_node_id, move |this| {
853845 let expr_break =
854846 hir:: ExprKind :: Break ( this. lower_loop_destination ( None ) , Some ( x_expr) ) ;
@@ -859,12 +851,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
859851
860852 // `::std::task::Poll::Pending => {}`
861853 let pending_arm = {
862- let pending_pat = self . pat_lang_item_variant (
863- span,
864- hir:: LangItem :: PollPending ,
865- & [ ] ,
866- Some ( expr_hir_id) ,
867- ) ;
854+ let pending_pat = self . pat_lang_item_variant ( span, hir:: LangItem :: PollPending , & [ ] ) ;
868855 let empty_block = self . expr_block_empty ( span) ;
869856 self . arm ( pending_pat, empty_block)
870857 } ;
@@ -922,7 +909,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
922909 span,
923910 hir:: LangItem :: IntoFutureIntoFuture ,
924911 arena_vec ! [ self ; expr] ,
925- Some ( expr_hir_id) ,
926912 ) ;
927913
928914 // match <into_future_expr> {
@@ -1379,8 +1365,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
13791365 fn lower_expr_range_closed ( & mut self , span : Span , e1 : & Expr , e2 : & Expr ) -> hir:: ExprKind < ' hir > {
13801366 let e1 = self . lower_expr_mut ( e1) ;
13811367 let e2 = self . lower_expr_mut ( e2) ;
1382- let fn_path =
1383- hir:: QPath :: LangItem ( hir:: LangItem :: RangeInclusiveNew , self . lower_span ( span) , None ) ;
1368+ let fn_path = hir:: QPath :: LangItem ( hir:: LangItem :: RangeInclusiveNew , self . lower_span ( span) ) ;
13841369 let fn_expr = self . arena . alloc ( self . expr ( span, hir:: ExprKind :: Path ( fn_path) ) ) ;
13851370 hir:: ExprKind :: Call ( fn_expr, arena_vec ! [ self ; e1, e2] )
13861371 }
@@ -1421,7 +1406,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
14211406 ) ;
14221407
14231408 hir:: ExprKind :: Struct (
1424- self . arena . alloc ( hir:: QPath :: LangItem ( lang_item, self . lower_span ( span) , None ) ) ,
1409+ self . arena . alloc ( hir:: QPath :: LangItem ( lang_item, self . lower_span ( span) ) ) ,
14251410 fields,
14261411 None ,
14271412 )
@@ -1590,7 +1575,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
15901575 head_span,
15911576 hir:: LangItem :: IteratorNext ,
15921577 arena_vec ! [ self ; ref_mut_iter] ,
1593- None ,
15941578 ) ;
15951579 let arms = arena_vec ! [ self ; none_arm, some_arm] ;
15961580
@@ -1619,7 +1603,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
16191603 head_span,
16201604 hir:: LangItem :: IntoIterIntoIter ,
16211605 arena_vec ! [ self ; head] ,
1622- None ,
16231606 )
16241607 } ;
16251608
@@ -1675,7 +1658,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
16751658 unstable_span,
16761659 hir:: LangItem :: TryTraitBranch ,
16771660 arena_vec ! [ self ; sub_expr] ,
1678- None ,
16791661 )
16801662 } ;
16811663
@@ -1880,9 +1862,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
18801862 span : Span ,
18811863 lang_item : hir:: LangItem ,
18821864 args : & ' hir [ hir:: Expr < ' hir > ] ,
1883- hir_id : Option < hir:: HirId > ,
18841865 ) -> hir:: Expr < ' hir > {
1885- let path = self . arena . alloc ( self . expr_lang_item_path ( span, lang_item, hir_id ) ) ;
1866+ let path = self . arena . alloc ( self . expr_lang_item_path ( span, lang_item) ) ;
18861867 self . expr_call_mut ( span, path, args)
18871868 }
18881869
@@ -1891,21 +1872,12 @@ impl<'hir> LoweringContext<'_, 'hir> {
18911872 span : Span ,
18921873 lang_item : hir:: LangItem ,
18931874 args : & ' hir [ hir:: Expr < ' hir > ] ,
1894- hir_id : Option < hir:: HirId > ,
18951875 ) -> & ' hir hir:: Expr < ' hir > {
1896- self . arena . alloc ( self . expr_call_lang_item_fn_mut ( span, lang_item, args, hir_id ) )
1876+ self . arena . alloc ( self . expr_call_lang_item_fn_mut ( span, lang_item, args) )
18971877 }
18981878
1899- fn expr_lang_item_path (
1900- & mut self ,
1901- span : Span ,
1902- lang_item : hir:: LangItem ,
1903- hir_id : Option < hir:: HirId > ,
1904- ) -> hir:: Expr < ' hir > {
1905- self . expr (
1906- span,
1907- hir:: ExprKind :: Path ( hir:: QPath :: LangItem ( lang_item, self . lower_span ( span) , hir_id) ) ,
1908- )
1879+ fn expr_lang_item_path ( & mut self , span : Span , lang_item : hir:: LangItem ) -> hir:: Expr < ' hir > {
1880+ self . expr ( span, hir:: ExprKind :: Path ( hir:: QPath :: LangItem ( lang_item, self . lower_span ( span) ) ) )
19091881 }
19101882
19111883 /// `<LangItem>::name`
@@ -1918,7 +1890,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
19181890 let path = hir:: ExprKind :: Path ( hir:: QPath :: TypeRelative (
19191891 self . arena . alloc ( self . ty (
19201892 span,
1921- hir:: TyKind :: Path ( hir:: QPath :: LangItem ( lang_item, self . lower_span ( span) , None ) ) ,
1893+ hir:: TyKind :: Path ( hir:: QPath :: LangItem ( lang_item, self . lower_span ( span) ) ) ,
19221894 ) ) ,
19231895 self . arena . alloc ( hir:: PathSegment :: new (
19241896 Ident :: new ( name, span) ,
0 commit comments