graydon/rust — Issue #1215: foo(...)->f as b should be tail callable if both are aliases of the same type
Author: boggle
Created: 2011-11-23 01:02:21+00:00
State: open

Imagine a tail call { be foo() as int } where foo() returns an i32 and on the current arch it is known that ints 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