diff options
| author | Michael Goulet <michael@errs.io> | 2024-03-24 20:06:05 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-03-24 20:06:05 -0400 |
| commit | 847fd88df724280880c705848ba1a120ce15e020 (patch) | |
| tree | e24749bc49a6b80791f1ad9d27ca7911ad9e3df9 /compiler/rustc_ty_utils/src | |
| parent | 0824b300eb0dae5d9ed59719d3f2732016683d66 (diff) | |
Always use tcx.coroutine_layout over calling optimized_mir directly
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/layout.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ty_utils/src/layout.rs b/compiler/rustc_ty_utils/src/layout.rs index 9c3d39307b2..85ac6071a08 100644 --- a/compiler/rustc_ty_utils/src/layout.rs +++ b/compiler/rustc_ty_utils/src/layout.rs @@ -1072,7 +1072,7 @@ fn variant_info_for_coroutine<'tcx>( return (vec![], None); }; - let coroutine = cx.tcx.optimized_mir(def_id).coroutine_layout().unwrap(); + let coroutine = cx.tcx.coroutine_layout(def_id).unwrap(); let upvar_names = cx.tcx.closure_saved_names_of_captured_variables(def_id); let mut upvars_size = Size::ZERO; |
