@@ -560,7 +560,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
560
560
expr : & ' hir hir:: Expr < ' hir > ,
561
561
overall_span : Span ,
562
562
) -> & ' 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) ) ;
564
564
self . expr_call ( overall_span, constructor, std:: slice:: from_ref ( expr) )
565
565
}
566
566
@@ -614,7 +614,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
614
614
// Resume argument type: `ResumeTy`
615
615
let unstable_span =
616
616
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) ;
618
618
let input_ty = hir:: Ty {
619
619
hir_id : self . next_id ( ) ,
620
620
kind : hir:: TyKind :: Path ( resume_ty) ,
@@ -818,19 +818,16 @@ impl<'hir> LoweringContext<'_, 'hir> {
818
818
span,
819
819
hir:: LangItem :: PinNewUnchecked ,
820
820
arena_vec ! [ self ; ref_mut_awaitee] ,
821
- Some ( expr_hir_id) ,
822
821
) ;
823
822
let get_context = self . expr_call_lang_item_fn_mut (
824
823
gen_future_span,
825
824
hir:: LangItem :: GetContext ,
826
825
arena_vec ! [ self ; task_context] ,
827
- Some ( expr_hir_id) ,
828
826
) ;
829
827
let call = self . expr_call_lang_item_fn (
830
828
span,
831
829
hir:: LangItem :: FuturePoll ,
832
830
arena_vec ! [ self ; new_unchecked, get_context] ,
833
- Some ( expr_hir_id) ,
834
831
) ;
835
832
self . arena . alloc ( self . expr_unsafe ( call) )
836
833
} ;
@@ -843,12 +840,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
843
840
let ( x_pat, x_pat_hid) = self . pat_ident ( gen_future_span, x_ident) ;
844
841
let x_expr = self . expr_ident ( gen_future_span, x_ident, x_pat_hid) ;
845
842
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) ;
852
844
let break_x = self . with_loop_scope ( loop_node_id, move |this| {
853
845
let expr_break =
854
846
hir:: ExprKind :: Break ( this. lower_loop_destination ( None ) , Some ( x_expr) ) ;
@@ -859,12 +851,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
859
851
860
852
// `::std::task::Poll::Pending => {}`
861
853
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 , & [ ] ) ;
868
855
let empty_block = self . expr_block_empty ( span) ;
869
856
self . arm ( pending_pat, empty_block)
870
857
} ;
@@ -922,7 +909,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
922
909
span,
923
910
hir:: LangItem :: IntoFutureIntoFuture ,
924
911
arena_vec ! [ self ; expr] ,
925
- Some ( expr_hir_id) ,
926
912
) ;
927
913
928
914
// match <into_future_expr> {
@@ -1379,8 +1365,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1379
1365
fn lower_expr_range_closed ( & mut self , span : Span , e1 : & Expr , e2 : & Expr ) -> hir:: ExprKind < ' hir > {
1380
1366
let e1 = self . lower_expr_mut ( e1) ;
1381
1367
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) ) ;
1384
1369
let fn_expr = self . arena . alloc ( self . expr ( span, hir:: ExprKind :: Path ( fn_path) ) ) ;
1385
1370
hir:: ExprKind :: Call ( fn_expr, arena_vec ! [ self ; e1, e2] )
1386
1371
}
@@ -1421,7 +1406,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1421
1406
) ;
1422
1407
1423
1408
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) ) ) ,
1425
1410
fields,
1426
1411
None ,
1427
1412
)
@@ -1590,7 +1575,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
1590
1575
head_span,
1591
1576
hir:: LangItem :: IteratorNext ,
1592
1577
arena_vec ! [ self ; ref_mut_iter] ,
1593
- None ,
1594
1578
) ;
1595
1579
let arms = arena_vec ! [ self ; none_arm, some_arm] ;
1596
1580
@@ -1619,7 +1603,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
1619
1603
head_span,
1620
1604
hir:: LangItem :: IntoIterIntoIter ,
1621
1605
arena_vec ! [ self ; head] ,
1622
- None ,
1623
1606
)
1624
1607
} ;
1625
1608
@@ -1675,7 +1658,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
1675
1658
unstable_span,
1676
1659
hir:: LangItem :: TryTraitBranch ,
1677
1660
arena_vec ! [ self ; sub_expr] ,
1678
- None ,
1679
1661
)
1680
1662
} ;
1681
1663
@@ -1880,9 +1862,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
1880
1862
span : Span ,
1881
1863
lang_item : hir:: LangItem ,
1882
1864
args : & ' hir [ hir:: Expr < ' hir > ] ,
1883
- hir_id : Option < hir:: HirId > ,
1884
1865
) -> 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) ) ;
1886
1867
self . expr_call_mut ( span, path, args)
1887
1868
}
1888
1869
@@ -1891,21 +1872,12 @@ impl<'hir> LoweringContext<'_, 'hir> {
1891
1872
span : Span ,
1892
1873
lang_item : hir:: LangItem ,
1893
1874
args : & ' hir [ hir:: Expr < ' hir > ] ,
1894
- hir_id : Option < hir:: HirId > ,
1895
1875
) -> & ' 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) )
1897
1877
}
1898
1878
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) ) ) )
1909
1881
}
1910
1882
1911
1883
/// `<LangItem>::name`
@@ -1918,7 +1890,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1918
1890
let path = hir:: ExprKind :: Path ( hir:: QPath :: TypeRelative (
1919
1891
self . arena . alloc ( self . ty (
1920
1892
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) ) ) ,
1922
1894
) ) ,
1923
1895
self . arena . alloc ( hir:: PathSegment :: new (
1924
1896
Ident :: new ( name, span) ,
0 commit comments