about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-03-28 20:50:42 -0700
committerbors <bors@rust-lang.org>2016-03-28 20:50:42 -0700
commita11129701c873d96fe0816e4c8b55510efebe96e (patch)
treec1461e5f0660b146394122ef80a5ada344646d85 /src/rustllvm/RustWrapper.cpp
parentcad964a62655110753d73527df7ad808a235fc84 (diff)
parent221d0fbad0b201ef9264d3c9a30cd8c143ed51b2 (diff)
downloadrust-a11129701c873d96fe0816e4c8b55510efebe96e.tar.gz
rust-a11129701c873d96fe0816e4c8b55510efebe96e.zip
Auto merge of #32479 - eddyb:eof-not-even-twice, r=nikomatsakis
Prevent bumping the parser past the EOF.

Makes `Parser::bump` after EOF into an ICE, forcing callers to avoid repeated EOF bumps.
This ICE is intended to break infinite loops where EOF wasn't stopping the loop.

For example, the handling of EOF in `parse_trait_items`' recovery loop fixes #32446.
But even without this specific fix, the ICE is triggered, which helps diagnosis and UX.

This is a `[breaking-change]` for plugins authors who eagerly eat multiple EOFs.
See https://github.com/docopt/docopt.rs/pull/171 for such an example and the necessary fix.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions