@@ -639,7 +639,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
639
639
self . lower_span ( span) ,
640
640
Some ( self . allow_gen_future . clone ( ) ) ,
641
641
) ;
642
- let resume_ty = hir :: QPath :: LangItem ( hir:: LangItem :: ResumeTy , unstable_span) ;
642
+ let resume_ty = self . make_lang_item_qpath ( hir:: LangItem :: ResumeTy , unstable_span) ;
643
643
let input_ty = hir:: Ty {
644
644
hir_id : self . next_id ( ) ,
645
645
kind : hir:: TyKind :: Path ( resume_ty) ,
@@ -777,7 +777,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
777
777
self . lower_span ( span) ,
778
778
Some ( self . allow_gen_future . clone ( ) ) ,
779
779
) ;
780
- let resume_ty = hir :: QPath :: LangItem ( hir:: LangItem :: ResumeTy , unstable_span) ;
780
+ let resume_ty = self . make_lang_item_qpath ( hir:: LangItem :: ResumeTy , unstable_span) ;
781
781
let input_ty = hir:: Ty {
782
782
hir_id : self . next_id ( ) ,
783
783
kind : hir:: TyKind :: Path ( resume_ty) ,
@@ -2116,11 +2116,9 @@ impl<'hir> LoweringContext<'_, 'hir> {
2116
2116
lang_item : hir:: LangItem ,
2117
2117
name : Symbol ,
2118
2118
) -> hir:: Expr < ' hir > {
2119
+ let qpath = self . make_lang_item_qpath ( lang_item, self . lower_span ( span) ) ;
2119
2120
let path = hir:: ExprKind :: Path ( hir:: QPath :: TypeRelative (
2120
- self . arena . alloc ( self . ty (
2121
- span,
2122
- hir:: TyKind :: Path ( hir:: QPath :: LangItem ( lang_item, self . lower_span ( span) ) ) ,
2123
- ) ) ,
2121
+ self . arena . alloc ( self . ty ( span, hir:: TyKind :: Path ( qpath) ) ) ,
2124
2122
self . arena . alloc ( hir:: PathSegment :: new (
2125
2123
Ident :: new ( name, span) ,
2126
2124
self . next_id ( ) ,
0 commit comments