about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-08-22 22:41:29 +0000
committerbors <bors@rust-lang.org>2017-08-22 22:41:29 +0000
commit1682f9d099ef223e8026340b6040a1697a30ef94 (patch)
tree948806ba98ca0c60113da7cc7443b6fb995a488d
parent469a6f9bd9aef394c5cff6b3bc41b8c520f9515b (diff)
parentfbb099edca7003b86e98e1f41800ea35e030e657 (diff)
downloadrust-1682f9d099ef223e8026340b6040a1697a30ef94.tar.gz
rust-1682f9d099ef223e8026340b6040a1697a30ef94.zip
Auto merge of #44032 - pnkfelix:mir-borrowck-fix-orisnotand, r=eddyb
Fix logic error in test guarding prototype MIR borrowck code.

Fix logic error in test guarding prototype MIR borrowck code.

tl;dr: :facepalm:

(This crept in during the shift from a transform to a query (#44009); I didn't notice because my muscle memory was still always passing `-Z mir-borrowck`, while my test cases *also* had the `#[rustc_mir_borrowck]` attribute attached to them.)
-rw-r--r--src/librustc_mir/borrow_check.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/borrow_check.rs b/src/librustc_mir/borrow_check.rs
index 5ae3bee3267..eda2bacb11f 100644
--- a/src/librustc_mir/borrow_check.rs
+++ b/src/librustc_mir/borrow_check.rs
@@ -50,7 +50,7 @@ fn mir_borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) {
     debug!("run query mir_borrowck: {}", tcx.node_path_str(src.item_id()));
 
     let mir: &Mir<'tcx> = &mir.borrow();
-    if !tcx.has_attr(def_id, "rustc_mir_borrowck") || !tcx.sess.opts.debugging_opts.borrowck_mir {
+    if !tcx.has_attr(def_id, "rustc_mir_borrowck") && !tcx.sess.opts.debugging_opts.borrowck_mir {
         return;
     }