explain why we don't need to run type-checker when NLL is enabled
This commit is contained in:
parent
2370b60529
commit
bcd996857e
@ -1585,6 +1585,8 @@ impl MirPass for TypeckMir {
|
|||||||
let id = tcx.hir.as_local_node_id(def_id).unwrap();
|
let id = tcx.hir.as_local_node_id(def_id).unwrap();
|
||||||
debug!("run_pass: {:?}", def_id);
|
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() {
|
if tcx.sess.nll() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user