Skip to content

Flood of unexpected token: <eof> errors triggered by foo(|_|) #32505

@0x7CFE

Description

@0x7CFE

The easiest way to reproduce the error is to compile the following code:

pub fn test() {
    foo(|_|)
}

After I try rustc report.rs -o test I get the following output:

report.rs:3:1: 3:2 error: unexpected token: `<eof>`
report.rs:3 }
            ^
report.rs:3:1: 3:2 error: unexpected token: `<eof>`
report.rs:3 }
            ^
report.rs:3:1: 3:2 error: unexpected token: `<eof>`
report.rs:3 }
            ^
(ad infinitum...)

I expect to get the single line error output, not the flood.

Meta

rustc 1.9.0-dev (10bdd80 2016-03-18)
binary: rustc
commit-hash: 10bdd80
commit-date: 2016-03-18
host: x86_64-unknown-linux-gnu
release: 1.9.0-dev

Activity

changed the title [-]Flood of unexpected token: `<eof>` errors in compiler output[/-] [+]Flood of unexpected token: `<eof>` errors triggered by foo(|_|)[/+] on Mar 26, 2016
0x7CFE

0x7CFE commented on Mar 26, 2016

@0x7CFE
Author

Looks like it is a fairly recent bug. It reproduces on the nightly build, yet version (rustc 1.7.0-beta.4 (5ed7d4e31 2016-02-26)) works ok.

I checked on my machine and through versions available at http://rust.godbolt.org/

nagisa

nagisa commented on Mar 26, 2016

@nagisa
Member

#32479 might help.

eddyb

eddyb commented on Mar 26, 2016

@eddyb
Member

@nagisa It's actually fixed on master.

added
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
on Mar 26, 2016
nikomatsakis

nikomatsakis commented on Apr 7, 2016

@nikomatsakis
Contributor

triage: P-low

self-assigned this
on Apr 7, 2016
added a commit that references this issue on Apr 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.P-lowLow priorityregression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @eddyb@nikomatsakis@nagisa@0x7CFE@rust-highfive

      Issue actions

        Flood of unexpected token: `<eof>` errors triggered by foo(|_|) · Issue #32505 · rust-lang/rust