Skip to content

MIR inlining should work with any ty::FnDef callee operand, not just constants. #54193

Closed
@eddyb

Description

@eddyb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions