Construct body for by-move coroutine closure output
This commit is contained in:
parent
fc4fff4038
commit
427896dd7e
24 changed files with 233 additions and 15 deletions
|
@ -307,6 +307,10 @@ fn mir_const(tcx: TyCtxt<'_>, def: LocalDefId) -> &Steal<Body<'_>> {
|
|||
&Lint(check_packed_ref::CheckPackedRef),
|
||||
&Lint(check_const_item_mutation::CheckConstItemMutation),
|
||||
&Lint(function_item_references::FunctionItemReferences),
|
||||
// If this is an async closure's output coroutine, generate
|
||||
// by-move and by-mut bodies if needed. We do this first so
|
||||
// they can be optimized in lockstep with their parent bodies.
|
||||
&coroutine::ByMoveBody,
|
||||
// What we need to do constant evaluation.
|
||||
&simplify::SimplifyCfg::Initial,
|
||||
&rustc_peek::SanityCheck, // Just a lint
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue