Skip to content

Commit 7675ea9

Browse files
committed
remove the NLL pass (it is now invoked by mir borrowck)
1 parent bf57a23 commit 7675ea9

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

src/librustc_driver/driver.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,6 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
10031003

10041004
passes.push_pass(MIR_VALIDATED, mir::transform::qualify_consts::QualifyAndPromoteConstants);
10051005
passes.push_pass(MIR_VALIDATED, mir::transform::simplify::SimplifyCfg::new("qualify-consts"));
1006-
passes.push_pass(MIR_VALIDATED, mir::transform::nll::NLL);
10071006

10081007
// borrowck runs between MIR_VALIDATED and MIR_OPTIMIZED.
10091008

src/librustc_mir/transform/nll/mod.rs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use rustc::ty::{self, RegionKind, TyCtxt};
11+
use rustc::ty::{self, RegionKind};
1212
use rustc::mir::{Location, Mir};
13-
use rustc::mir::transform::{MirPass, MirSource};
13+
use rustc::mir::transform::MirSource;
1414
use rustc::infer::InferCtxt;
1515
use rustc::util::nodemap::FxHashMap;
1616
use rustc_data_structures::indexed_vec::Idx;
@@ -29,27 +29,6 @@ use self::region_infer::RegionInferenceContext;
2929

3030
mod renumber;
3131

32-
// MIR Pass for non-lexical lifetimes
33-
pub struct NLL;
34-
35-
impl MirPass for NLL {
36-
fn run_pass<'a, 'tcx>(
37-
&self,
38-
tcx: TyCtxt<'a, 'tcx, 'tcx>,
39-
source: MirSource,
40-
input_mir: &mut Mir<'tcx>,
41-
) {
42-
if !tcx.sess.opts.debugging_opts.nll {
43-
return;
44-
}
45-
46-
tcx.infer_ctxt().enter(|ref infcx| {
47-
let mut mir = input_mir.clone();
48-
let _ = compute_regions(infcx, source, &mut mir);
49-
});
50-
}
51-
}
52-
5332
/// Computes the (non-lexical) regions from the input MIR.
5433
///
5534
/// This may result in errors being reported.

0 commit comments

Comments
 (0)