File tree Expand file tree Collapse file tree 1 file changed +1
-25
lines changed
compiler/rustc_middle/src/ty/print Expand file tree Collapse file tree 1 file changed +1
-25
lines changed Original file line number Diff line number Diff line change @@ -1210,30 +1210,6 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
1210
1210
}
1211
1211
1212
1212
for ( assoc_item_def_id, term) in assoc_items {
1213
- // Skip printing `<{coroutine@} as Coroutine<_>>::Return` from async blocks,
1214
- // unless we can find out what coroutine return type it comes from.
1215
- let term = if let Some ( ty) = term. skip_binder ( ) . as_type ( )
1216
- && let ty:: Alias ( ty:: Projection , proj) = ty. kind ( )
1217
- && let Some ( assoc) = tcx. opt_associated_item ( proj. def_id )
1218
- && assoc
1219
- . trait_container ( tcx)
1220
- . is_some_and ( |def_id| tcx. is_lang_item ( def_id, LangItem :: Coroutine ) )
1221
- && assoc. opt_name ( ) == Some ( rustc_span:: sym:: Return )
1222
- {
1223
- if let ty:: Coroutine ( _, args) = args. type_at ( 0 ) . kind ( ) {
1224
- let return_ty = args. as_coroutine ( ) . return_ty ( ) ;
1225
- if !return_ty. is_ty_var ( ) {
1226
- return_ty. into ( )
1227
- } else {
1228
- continue ;
1229
- }
1230
- } else {
1231
- continue ;
1232
- }
1233
- } else {
1234
- term. skip_binder ( )
1235
- } ;
1236
-
1237
1213
if first {
1238
1214
p ! ( "<" ) ;
1239
1215
first = false ;
@@ -1243,7 +1219,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
1243
1219
1244
1220
p ! ( write( "{} = " , tcx. associated_item( assoc_item_def_id) . name( ) ) ) ;
1245
1221
1246
- match term. kind ( ) {
1222
+ match term. skip_binder ( ) . kind ( ) {
1247
1223
TermKind :: Ty ( ty) => p ! ( print( ty) ) ,
1248
1224
TermKind :: Const ( c) => p ! ( print( c) ) ,
1249
1225
} ;
You can’t perform that action at this time.
0 commit comments