]> git.lizzy.rs Git - rust.git/commitdiff
Merge #306
authorbors[bot] <bors[bot]@users.noreply.github.com>
Fri, 21 Dec 2018 10:04:00 +0000 (10:04 +0000)
committerbors[bot] <bors[bot]@users.noreply.github.com>
Fri, 21 Dec 2018 10:04:00 +0000 (10:04 +0000)
306: Finish weird exprs r=DJMcNab a=DJMcNab

Fix #290.

Note that I'm not certain my use of `p.nth(1) == Ident` is entirely consistent with `libsyntax` - in the original, [`is_union_item`](https://github.com/rust-lang/rust/blob/9622f9dc4745eb59fd229477f453ae83e8044db9/src/libsyntax/parse/parser.rs#L4593-L4596) uses `t.is_ident() && !t.is_reserved_ident()`, whereas we effectively only do `is_ident`. However, I cannot find the definition of `is_reserved_ident` (even searching the rust repository only gives uses, no definitions), so this will have to do unless someone else can find it :|.

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>

Trivial merge