提交 7675ea99 编写于 作者: N Niko Matsakis

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

上级 bf57a230
......@@ -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.
......
......@@ -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 @@
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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册