@@ -877,7 +877,7 @@ impl<'a> LoweringContext<'a> {
877
877
878
878
let unstable_span = self . allow_internal_unstable ( CompilerDesugaringKind :: Async , span) ;
879
879
let gen_future = self . expr_std_path (
880
- unstable_span, & [ "future" , "future_from_generator " ] , None , ThinVec :: new ( ) ) ;
880
+ unstable_span, & [ "future" , "from_generator " ] , None , ThinVec :: new ( ) ) ;
881
881
hir:: ExprCall ( P ( gen_future) , hir_vec ! [ generator] )
882
882
}
883
883
@@ -1173,11 +1173,8 @@ impl<'a> LoweringContext<'a> {
1173
1173
let span = t. span ;
1174
1174
match itctx {
1175
1175
ImplTraitContext :: Existential ( fn_def_id) => {
1176
- // Set the name to `impl Bound1 + Bound2`
1177
- let exist_ty_name = Symbol :: intern ( & pprust:: ty_to_string ( t) ) ;
1178
1176
self . lower_existential_impl_trait (
1179
- span, fn_def_id, exist_ty_name,
1180
- |this| this. lower_param_bounds ( bounds, itctx) )
1177
+ span, fn_def_id, |this| this. lower_param_bounds ( bounds, itctx) )
1181
1178
}
1182
1179
ImplTraitContext :: Universal ( def_id) => {
1183
1180
let def_node_id = self . next_id ( ) . node_id ;
@@ -1245,7 +1242,6 @@ impl<'a> LoweringContext<'a> {
1245
1242
& mut self ,
1246
1243
span : Span ,
1247
1244
fn_def_id : DefId ,
1248
- exist_ty_name : Name ,
1249
1245
lower_bounds : impl FnOnce ( & mut LoweringContext ) -> hir:: GenericBounds ,
1250
1246
) -> hir:: Ty_ {
1251
1247
// We need to manually repeat the code of `next_id` because the lowering
@@ -1307,7 +1303,7 @@ impl<'a> LoweringContext<'a> {
1307
1303
let exist_ty_item = hir:: Item {
1308
1304
id : exist_ty_id. node_id ,
1309
1305
hir_id : exist_ty_id. hir_id ,
1310
- name : exist_ty_name ,
1306
+ name : keywords :: Invalid . name ( ) ,
1311
1307
attrs : Default :: default ( ) ,
1312
1308
node : exist_ty_item_kind,
1313
1309
vis : hir:: Visibility :: Inherited ,
@@ -2090,19 +2086,13 @@ impl<'a> LoweringContext<'a> {
2090
2086
lifetime_collector. output_lifetime
2091
2087
} ;
2092
2088
2093
- let output_ty_name_owned;
2094
- let ( output_ty_name, span) = match output {
2095
- FunctionRetTy :: Ty ( ty) => {
2096
- output_ty_name_owned = pprust:: ty_to_string ( ty) ;
2097
- ( & * output_ty_name_owned, ty. span )
2098
- } ,
2099
- FunctionRetTy :: Default ( span) => ( "()" , * span) ,
2089
+ let span = match output {
2090
+ FunctionRetTy :: Ty ( ty) => ty. span ,
2091
+ FunctionRetTy :: Default ( span) => * span,
2100
2092
} ;
2101
2093
2102
- // FIXME(cramertj) add lifetimes (see FIXME below) to the name
2103
- let exist_ty_name = Symbol :: intern ( & format ! ( "impl Future<Output = {}>" , output_ty_name) ) ;
2104
2094
let impl_trait_ty = self . lower_existential_impl_trait (
2105
- span, fn_def_id, exist_ty_name , |this| {
2095
+ span, fn_def_id, |this| {
2106
2096
let output_ty = match output {
2107
2097
FunctionRetTy :: Ty ( ty) =>
2108
2098
this. lower_ty ( ty, ImplTraitContext :: Existential ( fn_def_id) ) ,
0 commit comments