Skip to content
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

Make tail call expr mandatory #1725

Merged
merged 1 commit into from
Aug 24, 2024
Merged

Make tail call expr mandatory #1725

merged 1 commit into from
Aug 24, 2024

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Aug 24, 2024

This was probably written just mirroring the grammar of return. But for become, the expression after the keyword is mandatory.

#![allow(incomplete_features)]
#![feature(explicit_tail_calls)]

fn repro() {
    become;
}
error: expected expression, found `;`
 --> src/lib.rs:5:11
  |
5 |     become;
  |           ^ expected expression

@dtolnay dtolnay merged commit 8f7365f into master Aug 24, 2024
29 checks passed
@dtolnay dtolnay deleted the tailcall branch August 24, 2024 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant