From 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:39 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_mir_dataflow/src/framework/direction.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'compiler/rustc_mir_dataflow/src/framework/direction.rs') 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); } -- cgit v1.2.3