1
Fork 0

optimize un_derefer

This commit is contained in:
ouz-a 2022-07-24 14:40:43 +03:00
parent b4c3a2af7b
commit 09134982e5
7 changed files with 26 additions and 27 deletions

View file

@ -21,7 +21,7 @@ pub struct RemoveUninitDrops;
impl<'tcx> MirPass<'tcx> for RemoveUninitDrops {
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
let param_env = tcx.param_env(body.source.def_id());
let Ok(move_data) = MoveData::gather_moves(body, tcx, param_env) else {
let Ok((_,move_data)) = MoveData::gather_moves(body, tcx, param_env) else {
// We could continue if there are move errors, but there's not much point since our
// init data isn't complete.
return;