diff --git a/src/librustc_mir/borrow_check/nll/type_check/mod.rs b/src/librustc_mir/borrow_check/nll/type_check/mod.rs index eafb12fab964..d57b8e78f18a 100644 --- a/src/librustc_mir/borrow_check/nll/type_check/mod.rs +++ b/src/librustc_mir/borrow_check/nll/type_check/mod.rs @@ -1585,6 +1585,8 @@ impl MirPass for TypeckMir { let id = tcx.hir.as_local_node_id(def_id).unwrap(); debug!("run_pass: {:?}", def_id); + // When NLL is enabled, the borrow checker runs the typeck + // itself, so we don't need this MIR pass anymore. if tcx.sess.nll() { return; }