refactor MirPass to always require a tcx

This commit is contained in:
Oliver Schneider 2016-02-05 09:35:00 +01:00 committed by Oliver 'ker' Schneider
parent 41c892f5e1
commit 030b237476
6 changed files with 36 additions and 22 deletions

View file

@ -126,6 +126,7 @@ pub mod mir {
pub mod repr;
pub mod tcx;
pub mod visit;
pub mod transform;
pub mod mir_map;
}

View file

@ -0,0 +1,16 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use mir::repr::Mir;
use middle::ty::ctxt;
pub trait MirPass {
fn run_on_mir<'tcx>(&mut self, mir: &mut Mir<'tcx>, tcx: &ctxt<'tcx>);
}