-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#[tailcall]
macro panics
#18
Comments
Hi there, any thoughts on this? |
There seems to be a bug affecting functions with only a single argument. 🙃 Until I get more time to look into this issue, you can work around the problem by adding a second dummy argument: use std::path::Path;
#[tailcall::tailcall]
fn recurse(n: u64, _d: ()) -> u64 {
let file = Path::new("src/main.rs");
let len = file.metadata().unwrap().len();
if n >= 1_000_000_000 {
n
} else {
recurse(len + n, ())
}
}
fn main() {
let res = recurse(1, ());
println!("Done: {res}");
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there, trying to test out the library, although it seems to be panicking. Here's the code I'm testing:
The compiler tells me:
Strangely, the message
expected tuple expression
can't be found in this repo, so is that coming from Rust itself? Thank you kindly.The text was updated successfully, but these errors were encountered: