Extract mir_opt_level to a method and use Option to be able to know if the value is provided or not
This commit is contained in:
parent
409920873c
commit
8152da22a1
14 changed files with 34 additions and 29 deletions
|
@ -28,7 +28,7 @@ pub struct ConstGoto;
|
|||
|
||||
impl<'tcx> MirPass<'tcx> for ConstGoto {
|
||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
if tcx.sess.opts.debugging_opts.mir_opt_level < 3 {
|
||||
if tcx.sess.mir_opt_level() < 3 {
|
||||
return;
|
||||
}
|
||||
trace!("Running ConstGoto on {:?}", body.source);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue