Update passes with new interface
This commit is contained in:
@@ -10,6 +10,10 @@ use rustc_middle::ty::{self, TyCtxt};
|
||||
pub struct LowerSliceLenCalls;
|
||||
|
||||
impl<'tcx> MirPass<'tcx> for LowerSliceLenCalls {
|
||||
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
|
||||
sess.opts.mir_opt_level() > 0
|
||||
}
|
||||
|
||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
lower_slice_len_calls(tcx, body)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user