1
Fork 0

Do not report errors from move path builder.

This commit is contained in:
Camille GILLOT 2023-09-30 15:14:07 +00:00
parent a8e56d0b0b
commit 8d535070a2
11 changed files with 305 additions and 172 deletions

View file

@ -24,11 +24,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 {
// We could continue if there are move errors, but there's not much point since our
// init data isn't complete.
return;
};
let move_data = MoveData::gather_moves(body, tcx, param_env);
let mdpe = MoveDataParamEnv { move_data, param_env };
let mut maybe_inits = MaybeInitializedPlaces::new(tcx, body, &mdpe)