@@ -153,6 +153,10 @@ pub trait MirPass<'tcx> {
153
153
to_profiler_name ( self . name ( ) )
154
154
}
155
155
156
+ fn min_mir_opt_level ( & self ) -> usize {
157
+ 0
158
+ }
159
+
156
160
/// Returns `true` if this pass is enabled with the current combination of compiler flags.
157
161
fn is_enabled ( & self , _sess : & Session ) -> bool {
158
162
true
@@ -443,9 +447,8 @@ pub struct Body<'tcx> {
443
447
/// If `-Cinstrument-coverage` is not active, or if an individual function
444
448
/// is not eligible for coverage, then this should always be `None`.
445
449
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,
449
452
}
450
453
451
454
impl < ' tcx > Body < ' tcx > {
@@ -460,7 +463,6 @@ impl<'tcx> Body<'tcx> {
460
463
span : Span ,
461
464
coroutine : Option < Box < CoroutineInfo < ' tcx > > > ,
462
465
tainted_by_errors : Option < ErrorGuaranteed > ,
463
- optimization_disabled : bool ,
464
466
) -> Self {
465
467
// We need `arg_count` locals, and one for the return place.
466
468
assert ! (
@@ -490,7 +492,6 @@ impl<'tcx> Body<'tcx> {
490
492
tainted_by_errors,
491
493
coverage_info_hi : None ,
492
494
function_coverage_info : None ,
493
- optimization_disabled,
494
495
} ;
495
496
body. is_polymorphic = body. has_non_region_param ( ) ;
496
497
body
@@ -522,7 +523,6 @@ impl<'tcx> Body<'tcx> {
522
523
tainted_by_errors : None ,
523
524
coverage_info_hi : None ,
524
525
function_coverage_info : None ,
525
- optimization_disabled : false ,
526
526
} ;
527
527
body. is_polymorphic = body. has_non_region_param ( ) ;
528
528
body
0 commit comments