Update passes with new interface
This commit is contained in:
@@ -368,6 +368,10 @@ fn save_unreachable_coverage(
|
||||
pub struct SimplifyLocals;
|
||||
|
||||
impl<'tcx> MirPass<'tcx> for SimplifyLocals {
|
||||
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
|
||||
sess.mir_opt_level() > 0
|
||||
}
|
||||
|
||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
trace!("running SimplifyLocals on {:?}", body.source);
|
||||
simplify_locals(body, tcx);
|
||||
|
||||
Reference in New Issue
Block a user