Skip to content

Commit bcd9968

Browse files
committed
explain why we don't need to run type-checker when NLL is enabled
1 parent 2370b60 commit bcd9968

File tree

1 file changed

+2
-0
lines changed
  • src/librustc_mir/borrow_check/nll/type_check

1 file changed

+2
-0
lines changed

src/librustc_mir/borrow_check/nll/type_check/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1585,6 +1585,8 @@ impl MirPass for TypeckMir {
15851585
let id = tcx.hir.as_local_node_id(def_id).unwrap();
15861586
debug!("run_pass: {:?}", def_id);
15871587

1588+
// When NLL is enabled, the borrow checker runs the typeck
1589+
// itself, so we don't need this MIR pass anymore.
15881590
if tcx.sess.nll() {
15891591
return;
15901592
}

0 commit comments

Comments
 (0)