From 96dba9358c5ad24bc33eeb3a9a39a4868c331bcf Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 10 Apr 2018 09:11:31 -0400 Subject: [PATCH] s/`use_mir`/`use_mir_borrowck`/ --- src/librustc/infer/error_reporting/mod.rs | 2 +- src/librustc/ty/context.rs | 4 ++-- src/librustc_mir/borrow_check/mod.rs | 2 +- src/librustc_mir/borrow_check/nll/type_check/mod.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs index 254fba095e236..d8a2c95ab5904 100644 --- a/src/librustc/infer/error_reporting/mod.rs +++ b/src/librustc/infer/error_reporting/mod.rs @@ -303,7 +303,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> { ) { debug!("report_region_errors(): {} errors to start", errors.len()); - if will_later_be_reported_by_nll && self.tcx.use_mir() { + if will_later_be_reported_by_nll && self.tcx.use_mir_borrowck() { // With `#![feature(nll)]`, we want to present a nice user // experience, so don't even mention the errors from the // AST checker. diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index c4a34b4101aeb..4bd3318017c5b 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -1473,7 +1473,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { /// If true, we should use the MIR-based borrowck (we may *also* use /// the AST-based borrowck). - pub fn use_mir(self) -> bool { + pub fn use_mir_borrowck(self) -> bool { self.borrowck_mode().use_mir() } @@ -1508,7 +1508,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { pub fn emit_end_regions(self) -> bool { self.sess.opts.debugging_opts.emit_end_regions || self.sess.opts.debugging_opts.mir_emit_validate > 0 || - self.use_mir() + self.use_mir_borrowck() } #[inline] diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs index 22550319a1c63..a5e398bc80154 100644 --- a/src/librustc_mir/borrow_check/mod.rs +++ b/src/librustc_mir/borrow_check/mod.rs @@ -73,7 +73,7 @@ fn mir_borrowck<'a, 'tcx>( let input_mir = tcx.mir_validated(def_id); debug!("run query mir_borrowck: {}", tcx.item_path_str(def_id)); - if !tcx.has_attr(def_id, "rustc_mir_borrowck") && !tcx.use_mir() { + if !tcx.has_attr(def_id, "rustc_mir_borrowck") && !tcx.use_mir_borrowck() { return None; } 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 bdcff1a2d819c..5098e6a34f7e0 100644 --- a/src/librustc_mir/borrow_check/nll/type_check/mod.rs +++ b/src/librustc_mir/borrow_check/nll/type_check/mod.rs @@ -1596,7 +1596,7 @@ impl MirPass for TypeckMir { // When NLL is enabled, the borrow checker runs the typeck // itself, so we don't need this MIR pass anymore. - if tcx.use_mir() { + if tcx.use_mir_borrowck() { return; }