We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b84a52c commit 471334eCopy full SHA for 471334e
compiler/rustc_middle/src/ty/print/pretty.rs
@@ -890,10 +890,20 @@ pub trait PrettyPrinter<'tcx>:
890
if !first {
891
p!(", ");
892
}
893
- p!(
894
- write("{} = ", self.tcx().associated_item(assoc_item_def_id).ident),
895
- print(ty)
896
- );
+ p!(write("{} = ", self.tcx().associated_item(assoc_item_def_id).ident));
+
+ // Skip printing `<[generator@] as Generator<_>>::Return` from async blocks
+ match ty.skip_binder().kind() {
897
+ ty::Projection(ty::ProjectionTy { item_def_id, .. })
898
+ if Some(*item_def_id) == self.tcx().lang_items().generator_return() =>
899
+ {
900
+ p!("[async output]")
901
+ }
902
+ _ => {
903
+ p!(print(ty))
904
905
906
907
first = false;
908
909
0 commit comments