Separate witness type computation from the generator transform.
This commit is contained in:
parent
e2387ad484
commit
400cb9aa41
9 changed files with 304 additions and 31 deletions
|
@ -123,6 +123,7 @@ pub fn provide(providers: &mut Providers) {
|
|||
mir_drops_elaborated_and_const_checked,
|
||||
mir_for_ctfe,
|
||||
mir_for_ctfe_of_const_arg,
|
||||
mir_generator_witnesses: generator::mir_generator_witnesses,
|
||||
optimized_mir,
|
||||
is_mir_available,
|
||||
is_ctfe_mir_available: |tcx, did| is_mir_available(tcx, did),
|
||||
|
@ -425,6 +426,9 @@ fn mir_drops_elaborated_and_const_checked(
|
|||
return tcx.mir_drops_elaborated_and_const_checked(def);
|
||||
}
|
||||
|
||||
if tcx.generator_kind(def.did).is_some() {
|
||||
tcx.ensure().mir_generator_witnesses(def.did);
|
||||
}
|
||||
let mir_borrowck = tcx.mir_borrowck_opt_const_arg(def);
|
||||
|
||||
let is_fn_like = tcx.def_kind(def.did).is_fn_like();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue