@@ -639,7 +639,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
639639 self . lower_span ( span) ,
640640 Some ( self . allow_gen_future . clone ( ) ) ,
641641 ) ;
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) ;
643643 let input_ty = hir:: Ty {
644644 hir_id : self . next_id ( ) ,
645645 kind : hir:: TyKind :: Path ( resume_ty) ,
@@ -777,7 +777,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
777777 self . lower_span ( span) ,
778778 Some ( self . allow_gen_future . clone ( ) ) ,
779779 ) ;
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) ;
781781 let input_ty = hir:: Ty {
782782 hir_id : self . next_id ( ) ,
783783 kind : hir:: TyKind :: Path ( resume_ty) ,
@@ -2116,11 +2116,9 @@ impl<'hir> LoweringContext<'_, 'hir> {
21162116 lang_item : hir:: LangItem ,
21172117 name : Symbol ,
21182118 ) -> hir:: Expr < ' hir > {
2119+ let qpath = self . make_lang_item_qpath ( lang_item, self . lower_span ( span) ) ;
21192120 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) ) ) ,
21242122 self . arena . alloc ( hir:: PathSegment :: new (
21252123 Ident :: new ( name, span) ,
21262124 self . next_id ( ) ,
0 commit comments