update TypeFlags
to deal with missing ct substs
This commit is contained in:
parent
cc47998e28
commit
ab9108b70f
44 changed files with 305 additions and 166 deletions
|
@ -239,10 +239,10 @@ fn mir_build(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) -> Body<'_
|
|||
// The exception is `body.user_type_annotations`, which is used unmodified
|
||||
// by borrow checking.
|
||||
debug_assert!(
|
||||
!(body.local_decls.has_free_regions()
|
||||
|| body.basic_blocks().has_free_regions()
|
||||
|| body.var_debug_info.has_free_regions()
|
||||
|| body.yield_ty().has_free_regions()),
|
||||
!(body.local_decls.has_free_regions(tcx)
|
||||
|| body.basic_blocks().has_free_regions(tcx)
|
||||
|| body.var_debug_info.has_free_regions(tcx)
|
||||
|| body.yield_ty().has_free_regions(tcx)),
|
||||
"Unexpected free regions in MIR: {:?}",
|
||||
body,
|
||||
);
|
||||
|
@ -755,6 +755,7 @@ fn construct_error<'a, 'tcx>(
|
|||
cfg.terminate(START_BLOCK, source_info, TerminatorKind::Unreachable);
|
||||
|
||||
let mut body = Body::new(
|
||||
tcx,
|
||||
MirSource::item(def.did.to_def_id()),
|
||||
cfg.basic_blocks,
|
||||
source_scopes,
|
||||
|
@ -843,6 +844,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
}
|
||||
|
||||
Body::new(
|
||||
self.tcx,
|
||||
MirSource::item(self.def_id),
|
||||
self.cfg.basic_blocks,
|
||||
self.source_scopes,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue