This code:
|
if let TerminatorKind::Call { |
|
func: Operand::Constant(ref f), .. } = terminator.kind { |
should not pattern-match on func, but rather call its ty method to get its type.
What this means is that let f = foo; f(); should inline as well as foo() (but today it doesn't).
cc @nikomatsakis