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

Infinite loop when let is in only token in function body #32537

Closed
kazagistar opened this issue Mar 27, 2016 · 1 comment
Closed

Infinite loop when let is in only token in function body #32537

kazagistar opened this issue Mar 27, 2016 · 1 comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@kazagistar
Copy link

This works fine in Stable, but is broken in Beta and Nightly:

fn main(){
    let
}

Playground link.

This is the output:

<anon>:3:1: 3:2 error: unexpected token: `<eof>`
<anon>:3 }
         ^
<anon>:3:1: 3:2 error: unexpected token: `<eof>`
<anon>:3 }
         ^
<anon>:3:1: 3:2 error: unexpected token: `<eof>`
<anon>:3 }
         ^

... <snip>

This keeps looping forever, or until the timeout on the playground.

In case it helps, here is the version info:

rustc 1.9.0-nightly (d5a91e695 2016-03-26)
binary: rustc
commit-hash: d5a91e69582b63f19192ad860df0f7a9a8530f56
commit-date: 2016-03-26
host: x86_64-apple-darwin
release: 1.9.0-nightly
@sfackler sfackler added regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 27, 2016
@alexcrichton
Copy link
Member

I think this has been fixed on nightly and is nominated for a backport, so closing.

Thanks for the report though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants