refactor MirPass to always require a tcx
This commit is contained in:
parent
41c892f5e1
commit
030b237476
6 changed files with 36 additions and 22 deletions
|
|
@ -126,6 +126,7 @@ pub mod mir {
|
|||
pub mod repr;
|
||||
pub mod tcx;
|
||||
pub mod visit;
|
||||
pub mod transform;
|
||||
pub mod mir_map;
|
||||
}
|
||||
|
||||
|
|
|
|||
16
src/librustc/mir/transform.rs
Normal file
16
src/librustc/mir/transform.rs
Normal 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>);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue