about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2016-09-27 00:24:49 +0200
committerJonas Schievink <jonasschievink@gmail.com>2016-09-27 00:32:08 +0200
commita0fa2048a8a7695ded7e932a6f7acf4182f9ef73 (patch)
tree7616aa3975b3e6e7aae10c3773c4ae1e108e4616
parente0249ad80025c6f88a2c7bd5d61fbaa3970c93c8 (diff)
downloadrust-a0fa2048a8a7695ded7e932a6f7acf4182f9ef73.tar.gz
rust-a0fa2048a8a7695ded7e932a6f7acf4182f9ef73.zip
Ignore local kind in MIR dataflow
-rw-r--r--src/librustc_borrowck/borrowck/mir/dataflow/sanity_check.rs13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/librustc_borrowck/borrowck/mir/dataflow/sanity_check.rs b/src/librustc_borrowck/borrowck/mir/dataflow/sanity_check.rs
index a6d8e1fa3c0..5e22d477c51 100644
--- a/src/librustc_borrowck/borrowck/mir/dataflow/sanity_check.rs
+++ b/src/librustc_borrowck/borrowck/mir/dataflow/sanity_check.rs
@@ -13,7 +13,7 @@ use syntax::ast;
 use syntax_pos::Span;
 
 use rustc::ty::{self, TyCtxt};
-use rustc::mir::repr::{self, Mir, LocalKind};
+use rustc::mir::repr::{self, Mir};
 use rustc_data_structures::indexed_vec::Idx;
 
 use super::super::gather_moves::{MovePathIndex, LookupResult};
@@ -73,15 +73,8 @@ fn each_block<'a, 'tcx, O>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     };
     assert!(args.len() == 1);
     let peek_arg_lval = match args[0] {
-        repr::Operand::Consume(ref lval) => match *lval {
-             repr::Lvalue::Local(local) if mir.local_kind(local) == LocalKind::Temp => {
-                 Some(lval)
-             }
-             _ => None
-        },
-        repr::Operand::Constant(_) => {
-            None
-        }
+        repr::Operand::Consume(ref lval @ repr::Lvalue::Local(_)) => Some(lval),
+        _ => None,
     };
 
     let peek_arg_lval = match peek_arg_lval {