Simplify the optimize_mir
query
This commit is contained in:
parent
1f5fb3e056
commit
eb4e94b2e5
3 changed files with 11 additions and 19 deletions
|
@ -439,7 +439,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn optimized_mir_opt_const_arg(
|
||||
pub fn optimized_mir_or_const_arg_mir(
|
||||
self,
|
||||
def: ty::WithOptConstParam<DefId>,
|
||||
) -> &'tcx Body<'tcx> {
|
||||
|
|
|
@ -3018,7 +3018,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
| DefKind::AnonConst => self.mir_for_ctfe_opt_const_arg(def),
|
||||
// If the caller wants `mir_for_ctfe` they should not be using `instance_mir`, so
|
||||
// we'll assume const fn also wants the optimized version.
|
||||
_ => self.optimized_mir_opt_const_arg(def),
|
||||
_ => self.optimized_mir_or_const_arg_mir(def),
|
||||
},
|
||||
ty::InstanceDef::VtableShim(..)
|
||||
| ty::InstanceDef::ReifyShim(..)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue