We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bf42c8 commit 10d0109Copy full SHA for 10d0109
compiler/rustc_session/src/session.rs
@@ -641,7 +641,10 @@ impl Session {
641
self.opts.debugging_opts.binary_dep_depinfo
642
}
643
pub fn mir_opt_level(&self) -> usize {
644
- self.opts.debugging_opts.mir_opt_level.unwrap_or(1)
+ self.opts
645
+ .debugging_opts
646
+ .mir_opt_level
647
+ .unwrap_or_else(|| if self.opts.optimize != config::OptLevel::No { 2 } else { 1 })
648
649
650
/// Gets the features enabled for the current compilation session.
0 commit comments