1
Fork 0

Add UnwindAction::Terminate

This commit is contained in:
Gary Guo 2022-10-10 22:40:40 +01:00
parent 5e6ed132fa
commit 0a5dac3062
16 changed files with 126 additions and 121 deletions

View file

@ -1663,8 +1663,12 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
}
self.assert_iscleanup(body, ctxt, unwind, true);
}
UnwindAction::Continue => (),
UnwindAction::Unreachable => (),
UnwindAction::Continue => {
if is_cleanup {
span_mirbug!(self, ctxt, "unwind on cleanup block")
}
}
UnwindAction::Unreachable | UnwindAction::Terminate => (),
}
}