summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_mir_dataflow/src/framework/direction.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/framework/direction.rs')
-rw-r--r--compiler/rustc_mir_dataflow/src/framework/direction.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/compiler/rustc_mir_dataflow/src/framework/direction.rs b/compiler/rustc_mir_dataflow/src/framework/direction.rs
index 2ae3ae02f..c8fe1af66 100644
--- a/compiler/rustc_mir_dataflow/src/framework/direction.rs
+++ b/compiler/rustc_mir_dataflow/src/framework/direction.rs
@@ -1,4 +1,4 @@
-use rustc_middle::mir::{self, BasicBlock, Location, SwitchTargets};
+use rustc_middle::mir::{self, BasicBlock, Location, SwitchTargets, UnwindAction};
use rustc_middle::ty::TyCtxt;
use std::ops::RangeInclusive;
@@ -474,15 +474,14 @@ impl Direction for Forward {
{
use mir::TerminatorKind::*;
match bb_data.terminator().kind {
- Return | Resume | Abort | GeneratorDrop | Unreachable => {}
+ Return | Resume | Terminate | GeneratorDrop | Unreachable => {}
Goto { target } => propagate(target, exit_state),
- Assert { target, cleanup: unwind, expected: _, msg: _, cond: _ }
+ Assert { target, unwind, expected: _, msg: _, cond: _ }
| Drop { target, unwind, place: _ }
- | DropAndReplace { target, unwind, value: _, place: _ }
| FalseUnwind { real_target: target, unwind } => {
- if let Some(unwind) = unwind {
+ if let UnwindAction::Cleanup(unwind) = unwind {
propagate(unwind, exit_state);
}
@@ -504,7 +503,7 @@ impl Direction for Forward {
}
Call {
- cleanup,
+ unwind,
destination,
target,
func: _,
@@ -512,7 +511,7 @@ impl Direction for Forward {
from_hir_call: _,
fn_span: _,
} => {
- if let Some(unwind) = cleanup {
+ if let UnwindAction::Cleanup(unwind) = unwind {
propagate(unwind, exit_state);
}
@@ -534,9 +533,9 @@ impl Direction for Forward {
options: _,
line_spans: _,
destination,
- cleanup,
+ unwind,
} => {
- if let Some(unwind) = cleanup {
+ if let UnwindAction::Cleanup(unwind) = unwind {
propagate(unwind, exit_state);
}