Skip to content

Commit 7c63014

Browse files
committed
liveness: Remove unused fallthrough_ln
1 parent b3342b4 commit 7c63014

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/librustc_passes/liveness.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@
8383
//!
8484
//! - `exit_ln`: a live node that is generated to represent every 'exit' from
8585
//! the function, whether it be by explicit return, panic, or other means.
86-
//!
87-
//! - `fallthrough_ln`: a live node that represents a fallthrough
8886
8987
use self::LiveNodeKind::*;
9088
use self::VarKind::*;
@@ -638,7 +636,6 @@ impl RWUTable {
638636
#[derive(Copy, Clone)]
639637
struct Specials {
640638
exit_ln: LiveNode,
641-
fallthrough_ln: LiveNode,
642639
}
643640

644641
const ACC_READ: u32 = 1;
@@ -668,7 +665,6 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
668665
// an implicit return
669666
let specials = Specials {
670667
exit_ln: ir.add_live_node(ExitNode),
671-
fallthrough_ln: ir.add_live_node(ExitNode),
672668
};
673669

674670
let tables = ir.tcx.typeck_tables_of(def_id);
@@ -897,12 +893,8 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
897893
fn compute(&mut self, body: &hir::Expr<'_>) -> LiveNode {
898894
debug!("compute: using id for body, {:?}", body);
899895

900-
// the fallthrough exit is only for those cases where we do not
901-
// explicitly return:
902896
let s = self.s;
903-
self.init_from_succ(s.fallthrough_ln, s.exit_ln);
904-
905-
let entry_ln = self.propagate_through_expr(body, s.fallthrough_ln);
897+
let entry_ln = self.propagate_through_expr(body, s.exit_ln);
906898

907899
// hack to skip the loop unless debug! is enabled:
908900
debug!(

0 commit comments

Comments
 (0)