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
|
@ -640,6 +640,9 @@ impl Session {
|
|||
pub fn binary_dep_depinfo(&self) -> bool {
|
||||
self.opts.debugging_opts.binary_dep_depinfo
|
||||
}
|
||||
pub fn mir_opt_level(&self) -> usize {
|
||||
self.opts.debugging_opts.mir_opt_level.unwrap_or(1)
|
||||
}
|
||||
|
||||
/// Gets the features enabled for the current compilation session.
|
||||
/// DO NOT USE THIS METHOD if there is a TyCtxt available, as it circumvents
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue