Extend MIR inlining to all operand variants
This commit is contained in:
parent
3bc2ca7e4f
commit
8efafa18e5
1 changed files with 2 additions and 2 deletions
|
|
@ -94,8 +94,8 @@ impl<'a, 'tcx> Inliner<'a, 'tcx> {
|
|||
// Only consider direct calls to functions
|
||||
let terminator = bb_data.terminator();
|
||||
if let TerminatorKind::Call {
|
||||
func: Operand::Constant(ref f), .. } = terminator.kind {
|
||||
if let ty::FnDef(callee_def_id, substs) = f.ty.sty {
|
||||
func: ref op, .. } = terminator.kind {
|
||||
if let ty::FnDef(callee_def_id, substs) = op.ty(caller_mir, self.tcx).sty {
|
||||
if let Some(instance) = Instance::resolve(self.tcx,
|
||||
param_env,
|
||||
callee_def_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue