MIR inlining should work with any ty::FnDef
callee operand, not just constants.
#54193
Labels
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
This code:
rust/src/librustc_mir/transform/inline.rs
Lines 96 to 97 in 994cdd9
should not pattern-match on
func
, but rather call itsty
method to get its type.What this means is that
let f = foo; f();
should inline as well asfoo()
(but today it doesn't).cc @nikomatsakis
The text was updated successfully, but these errors were encountered: