explain why we don't need to run type-checker when NLL is enabled

This commit is contained in:
Niko Matsakis 2018-02-23 10:42:12 -05:00
parent 2370b60529
commit bcd996857e

View File

@ -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;
}