diff options
| author | bors <bors@rust-lang.org> | 2025-05-18 16:46:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-05-18 16:46:11 +0000 |
| commit | 4455c8937007f3cc3c078375a335d86dbab391ce (patch) | |
| tree | d2991d2a17cfc33a4cb21be55f037e585ed6a695 /compiler/rustc_mir_transform/src/validate.rs | |
| parent | b53e5c9db04c89fa15c96f03ae2e0c538b598940 (diff) | |
| parent | 50b20b73dac7e5dcd05ae7763400bdae39040f15 (diff) | |
| download | rust-4455c8937007f3cc3c078375a335d86dbab391ce.tar.gz rust-4455c8937007f3cc3c078375a335d86dbab391ce.zip | |
Auto merge of #141232 - fmease:rollup-qr9mobf, r=fmease
Rollup of 8 pull requests Successful merges: - #138940 (Stabilize the avx512 target features) - #140490 (split `asm!` parsing and validation) - #140628 (std: stop using TLS in signal handler) - #140746 (name resolution for guard patterns) - #140926 (Return value of coroutine_layout fn changed to Result with LayoutError) - #141127 (bump windows crate for compiler,bootstrap and tools) - #141214 (Miri subtree update) - #141218 (gvn: avoid creating overlapping assignments) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src/validate.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/validate.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/validate.rs b/compiler/rustc_mir_transform/src/validate.rs index f541a32cd26..f8d1629b0e2 100644 --- a/compiler/rustc_mir_transform/src/validate.rs +++ b/compiler/rustc_mir_transform/src/validate.rs @@ -752,7 +752,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> { let layout = if def_id == self.caller_body.source.def_id() { self.caller_body .coroutine_layout_raw() - .or_else(|| self.tcx.coroutine_layout(def_id, args)) + .or_else(|| self.tcx.coroutine_layout(def_id, args).ok()) } else if self.tcx.needs_coroutine_by_move_body_def_id(def_id) && let ty::ClosureKind::FnOnce = args.as_coroutine().kind_ty().to_opt_closure_kind().unwrap() @@ -762,7 +762,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> { // Same if this is the by-move body of a coroutine-closure. self.caller_body.coroutine_layout_raw() } else { - self.tcx.coroutine_layout(def_id, args) + self.tcx.coroutine_layout(def_id, args).ok() }; let Some(layout) = layout else { |
