Do not run AST borrowck when -Zborrowck=mir

This commit is contained in:
Santiago Pastorino 2018-07-05 15:14:34 -03:00
parent 0e31e2fa9b
commit 25266c1840
No known key found for this signature in database
GPG key ID: 88C941CDA1D46432
6 changed files with 29 additions and 14 deletions

View file

@ -1279,7 +1279,11 @@ where
middle::liveness::check_crate(tcx)
});
time(sess, "borrow checking", || borrowck::check_crate(tcx));
time(sess, "borrow checking", || {
if tcx.use_ast_borrowck() {
borrowck::check_crate(tcx);
}
});
time(sess,
"MIR borrow checking",