From b45b9489bb3fb918fbe267154f8dcf4fee61854d Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sat, 5 Nov 2022 18:25:41 +0000 Subject: Compute generator sizes with -Zprint_type_sizes --- compiler/rustc_ty_utils/src/layout.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/rustc_ty_utils/src') diff --git a/compiler/rustc_ty_utils/src/layout.rs b/compiler/rustc_ty_utils/src/layout.rs index fbc055b5d23..1c65bec6964 100644 --- a/compiler/rustc_ty_utils/src/layout.rs +++ b/compiler/rustc_ty_utils/src/layout.rs @@ -826,6 +826,12 @@ fn record_layout_for_printing_outlined<'tcx>( return; } + ty::Generator(..) => { + debug!("print-type-size t: `{:?}` record generator", layout.ty); + record(DataTypeKind::Generator, false, None, vec![]); + return; + } + _ => { debug!("print-type-size t: `{:?}` skip non-nominal", layout.ty); return; -- cgit 1.4.1-3-g733a5