remove the NLL pass (it is now invoked by mir borrowck)

This commit is contained in:
Niko Matsakis 2017-10-30 16:19:24 -04:00
parent bf57a230eb
commit 7675ea997a
2 changed files with 2 additions and 24 deletions

View File

@ -1003,7 +1003,6 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
passes.push_pass(MIR_VALIDATED, mir::transform::qualify_consts::QualifyAndPromoteConstants);
passes.push_pass(MIR_VALIDATED, mir::transform::simplify::SimplifyCfg::new("qualify-consts"));
passes.push_pass(MIR_VALIDATED, mir::transform::nll::NLL);
// borrowck runs between MIR_VALIDATED and MIR_OPTIMIZED.

View File

@ -8,9 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use rustc::ty::{self, RegionKind, TyCtxt};
use rustc::ty::{self, RegionKind};
use rustc::mir::{Location, Mir};
use rustc::mir::transform::{MirPass, MirSource};
use rustc::mir::transform::MirSource;
use rustc::infer::InferCtxt;
use rustc::util::nodemap::FxHashMap;
use rustc_data_structures::indexed_vec::Idx;
@ -29,27 +29,6 @@ use self::region_infer::RegionInferenceContext;
mod renumber;
// MIR Pass for non-lexical lifetimes
pub struct NLL;
impl MirPass for NLL {
fn run_pass<'a, 'tcx>(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
source: MirSource,
input_mir: &mut Mir<'tcx>,
) {
if !tcx.sess.opts.debugging_opts.nll {
return;
}
tcx.infer_ctxt().enter(|ref infcx| {
let mut mir = input_mir.clone();
let _ = compute_regions(infcx, source, &mut mir);
});
}
}
/// Computes the (non-lexical) regions from the input MIR.
///
/// This may result in errors being reported.