Skip to content

1.18.0 and nightly ICE on invalid code: attempted to bump the parser past EOF (may be stuck in a loop)  #43196

Closed
@zhendongsu

Description

@zhendongsu
$ rustc --version
rustc 1.20.0-nightly (bf0a9e0b4 2017-07-10)
$ 
$ rustc tmp.rs
error: expected expression, found `<eof>`
 --> tmp.rs:1:26
  |
1 | fn main () { let x = | } |
  |                          ^

error: internal compiler error: attempted to bump the parser past EOF (may be stuck in a loop)
 --> tmp.rs:1:26
  |
1 | fn main () { let x = | } |
  |                          ^

error: aborting due to 2 previous errors

$ 
$ rustc-1.18.0 tmp.rs
error: expected expression, found `<eof>`
 --> tmp.rs:1:26
  |
1 | fn main () { let x = | } |
  |                          ^

error: internal compiler error: attempted to bump the parser past EOF (may be stuck in a loop)
 --> tmp.rs:1:26
  |
1 | fn main () { let x = | } |
  |                          ^

error: aborting due to 2 previous errors

$ 
$ cat tmp.rs
fn main () { let x = | } |
$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions