diff options
| author | Andrew Zhogin <andrew.zhogin@gmail.com> | 2025-05-11 20:58:52 +0700 |
|---|---|---|
| committer | Andrew Zhogin <andrew.zhogin@gmail.com> | 2025-05-11 23:53:13 +0700 |
| commit | ba80d820e5b4fb975f12eabac19e2a9c264a3afb (patch) | |
| tree | 184f6bd1bcce74b5774ef7e01d3292671fbb2a9c /compiler/rustc_ty_utils/src | |
| parent | 16c1c54a2921d5ace22e4a71c0ba7d4ef4b8aec7 (diff) | |
Return value of coroutine_layout fn changed to Result with LayoutError
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/layout.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_ty_utils/src/layout.rs b/compiler/rustc_ty_utils/src/layout.rs index 908fcb14cb2..ad57555bd24 100644 --- a/compiler/rustc_ty_utils/src/layout.rs +++ b/compiler/rustc_ty_utils/src/layout.rs @@ -492,9 +492,7 @@ fn layout_of_uncached<'tcx>( ty::Coroutine(def_id, args) => { use rustc_middle::ty::layout::PrimitiveExt as _; - let Some(info) = tcx.coroutine_layout(def_id, args) else { - return Err(error(cx, LayoutError::Unknown(ty))); - }; + let info = tcx.coroutine_layout(def_id, args)?; let local_layouts = info .field_tys |
