implement valtrees as the type-system representation for constant values
This commit is contained in:
@@ -531,8 +531,10 @@ fn inner_optimized_mir(tcx: TyCtxt<'_>, did: LocalDefId) -> Body<'_> {
|
||||
None => {}
|
||||
Some(other) => panic!("do not use `optimized_mir` for constants: {:?}", other),
|
||||
}
|
||||
debug!("about to call mir_drops_elaborated...");
|
||||
let mut body =
|
||||
tcx.mir_drops_elaborated_and_const_checked(ty::WithOptConstParam::unknown(did)).steal();
|
||||
debug!("body: {:#?}", body);
|
||||
run_optimization_passes(tcx, &mut body);
|
||||
|
||||
debug_assert!(!body.has_free_regions(), "Free regions in optimized MIR");
|
||||
|
||||
Reference in New Issue
Block a user