Skip to content

Commit a0fa204

Browse files
Ignore local kind in MIR dataflow
1 parent e0249ad commit a0fa204

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/librustc_borrowck/borrowck/mir/dataflow/sanity_check.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use syntax::ast;
1313
use syntax_pos::Span;
1414

1515
use rustc::ty::{self, TyCtxt};
16-
use rustc::mir::repr::{self, Mir, LocalKind};
16+
use rustc::mir::repr::{self, Mir};
1717
use rustc_data_structures::indexed_vec::Idx;
1818

1919
use super::super::gather_moves::{MovePathIndex, LookupResult};
@@ -73,15 +73,8 @@ fn each_block<'a, 'tcx, O>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
7373
};
7474
assert!(args.len() == 1);
7575
let peek_arg_lval = match args[0] {
76-
repr::Operand::Consume(ref lval) => match *lval {
77-
repr::Lvalue::Local(local) if mir.local_kind(local) == LocalKind::Temp => {
78-
Some(lval)
79-
}
80-
_ => None
81-
},
82-
repr::Operand::Constant(_) => {
83-
None
84-
}
76+
repr::Operand::Consume(ref lval @ repr::Lvalue::Local(_)) => Some(lval),
77+
_ => None,
8578
};
8679

8780
let peek_arg_lval = match peek_arg_lval {

0 commit comments

Comments
 (0)