Skip to content

Commit 1682f9d

Browse files
committed
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: 🤦 (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.)
2 parents 469a6f9 + fbb099e commit 1682f9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir/borrow_check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn mir_borrowck<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) {
5050
debug!("run query mir_borrowck: {}", tcx.node_path_str(src.item_id()));
5151

5252
let mir: &Mir<'tcx> = &mir.borrow();
53-
if !tcx.has_attr(def_id, "rustc_mir_borrowck") || !tcx.sess.opts.debugging_opts.borrowck_mir {
53+
if !tcx.has_attr(def_id, "rustc_mir_borrowck") && !tcx.sess.opts.debugging_opts.borrowck_mir {
5454
return;
5555
}
5656

0 commit comments

Comments
 (0)