Skip to content

Commit

Permalink
explain why we don't need to run type-checker when NLL is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Feb 23, 2018
1 parent 2370b60 commit bcd9968
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustc_mir/borrow_check/nll/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bcd9968

Please sign in to comment.