Skip to content

foo(...)->f as b should be tail callable if both are aliases of the same type #1215

Closed
@boggle

Description

@boggle

Imagine a tail call { be foo() as int } where foo() returns an i32 and on the current arch it is known that integers are 32 bit wide.

In this case, it should be ok to drop the cast and tail-call foo().

The idea for this came up when rewriting std::math, cf

https://github.com/boggle/rust/blob/libmath/src/lib/math.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions