@@ -153,6 +153,10 @@ pub trait MirPass<'tcx> {
153153 to_profiler_name ( self . name ( ) )
154154 }
155155
156+ fn min_mir_opt_level ( & self ) -> usize {
157+ 0
158+ }
159+
156160 /// Returns `true` if this pass is enabled with the current combination of compiler flags.
157161 fn is_enabled ( & self , _sess : & Session ) -> bool {
158162 true
@@ -443,9 +447,8 @@ pub struct Body<'tcx> {
443447 /// If `-Cinstrument-coverage` is not active, or if an individual function
444448 /// is not eligible for coverage, then this should always be `None`.
445449 pub function_coverage_info : Option < Box < coverage:: FunctionCoverageInfo > > ,
446-
447- /// Whether optimization is disabled by `#[optimize(none)]`
448- pub optimization_disabled : bool ,
450+ // /// Whether optimization is disabled by `#[optimize(none)]`
451+ // pub optimization_disabled: bool,
449452}
450453
451454impl < ' tcx > Body < ' tcx > {
@@ -460,7 +463,6 @@ impl<'tcx> Body<'tcx> {
460463 span : Span ,
461464 coroutine : Option < Box < CoroutineInfo < ' tcx > > > ,
462465 tainted_by_errors : Option < ErrorGuaranteed > ,
463- optimization_disabled : bool ,
464466 ) -> Self {
465467 // We need `arg_count` locals, and one for the return place.
466468 assert ! (
@@ -490,7 +492,6 @@ impl<'tcx> Body<'tcx> {
490492 tainted_by_errors,
491493 coverage_info_hi : None ,
492494 function_coverage_info : None ,
493- optimization_disabled,
494495 } ;
495496 body. is_polymorphic = body. has_non_region_param ( ) ;
496497 body
@@ -522,7 +523,6 @@ impl<'tcx> Body<'tcx> {
522523 tainted_by_errors : None ,
523524 coverage_info_hi : None ,
524525 function_coverage_info : None ,
525- optimization_disabled : false ,
526526 } ;
527527 body. is_polymorphic = body. has_non_region_param ( ) ;
528528 body
0 commit comments