Refactor unwind from Option to a new enum

This commit is contained in:
Gary Guo
2022-10-08 23:47:59 +01:00
parent 7f6edd3f15
commit daeb844e0c
39 changed files with 328 additions and 250 deletions

View File

@@ -125,7 +125,7 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
args,
destination,
target: _,
cleanup: _,
unwind: _,
from_hir_call: _,
fn_span: _,
} => {
@@ -135,7 +135,7 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
}
self.mutate_place(location, *destination, Deep);
}
TerminatorKind::Assert { cond, expected: _, msg, target: _, cleanup: _ } => {
TerminatorKind::Assert { cond, expected: _, msg, target: _, unwind: _ } => {
self.consume_operand(location, cond);
use rustc_middle::mir::AssertKind;
if let AssertKind::BoundsCheck { len, index } = msg {
@@ -173,7 +173,7 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
options: _,
line_spans: _,
destination: _,
cleanup: _,
unwind: _,
} => {
for op in operands {
match op {