]> git.lizzy.rs Git - rust.git/commit
Recover out of an enum or struct's braced block.
authorGeoffry Song <goffrie@gmail.com>
Tue, 18 Oct 2016 04:47:58 +0000 (21:47 -0700)
committerGeoffry Song <goffrie@gmail.com>
Thu, 27 Oct 2016 02:27:14 +0000 (22:27 -0400)
commitc9036ccffe30e9b05dee68fc82cbc957c983c702
tree2e4974a33c1b89eaeec55b33f6f9c3557f99336d
parenta5b6a9fa8ad2e13adbfcc5f3f624d9252379d745
Recover out of an enum or struct's braced block.

If we encounter a syntax error inside of a braced block, then we should
fail by consuming the rest of the block if possible.
This implements such recovery for enums and structs.

Fixes #37113.
src/libsyntax/parse/parser.rs
src/test/parse-fail/issue-37113.rs [new file with mode: 0644]
src/test/parse-fail/recover-enum.rs [new file with mode: 0644]
src/test/parse-fail/recover-enum2.rs [new file with mode: 0644]
src/test/parse-fail/recover-struct.rs [new file with mode: 0644]