Skip to main content

call

Macro call 

Source
call!() { /* proc-macro */ }
Expand description

Marks an explicit stack-safe tail-call site inside a #[tailcall] function.

The macro expects either a direct function call or a method call on self, such as:

tailcall::call! { factorial_inner(acc * input, input - 1) }
tailcall::call! { self.is_odd(x - 1) }

It expands to the hidden helper generated by the #[tailcall] attribute. Depending on the surrounding function, that helper may execute through the thunk runtime or be optimized away into direct loop lowering. The call site itself must remain in tail position.