Don't call closure_by_move_body_def_id on FnOnce async closures in MIR validation
This commit is contained in:
parent
f827364a95
commit
5cf117ed05
5 changed files with 24 additions and 8 deletions
|
@ -326,7 +326,7 @@ fn mir_promoted(
|
|||
tcx.ensure_with_value().has_ffi_unwind_calls(def);
|
||||
|
||||
// the `by_move_body` query uses the raw mir, so make sure it is run.
|
||||
if tcx.needs_coroutine_by_move_body_def_id(def) {
|
||||
if tcx.needs_coroutine_by_move_body_def_id(def.to_def_id()) {
|
||||
tcx.ensure_with_value().coroutine_by_move_body_def_id(def);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue