Skip to content

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

Closed
@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

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

Issue actions