Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUpdate syn and bump version #229
Conversation
| @@ -27,20 +29,18 @@ pub fn expand(from: &Path, to: &Path) { | |||
|
|
|||
| struct MatchByte { | |||
| expr: syn::Expr, | |||
| arms: Vec<syn::Arm>, | |||
| _comma: Token![,], | |||
| arms: Punctuated<syn::Arm, Option<Token![,]>>, | |||
This comment has been minimized.
This comment has been minimized.
dtolnay
Oct 16, 2018
•
The Arm parser will always eat a trailing comma if there is one, so the one here will always be None (unless the user writes a double comma, which we would want to reject). https://github.com/dtolnay/syn/blob/0.15.12/src/expr.rs#L2777-L2781. The comma will go in https://docs.rs/syn/0.15/syn/struct.Arm.html#structfield.comma.
I would recommend parsing these as Vec<Arm> as seen in https://github.com/dtolnay/syn/blob/0.15.12/src/expr.rs#L1898-L1901.
| @@ -27,20 +29,18 @@ pub fn expand(from: &Path, to: &Path) { | |||
|
|
|||
| struct MatchByte { | |||
| expr: syn::Expr, | |||
| arms: Vec<syn::Arm>, | |||
| _comma: Token![,], | |||
This comment has been minimized.
This comment has been minimized.
|
|
|
@bors-servo r+ |
|
|
Update syn and bump version <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/229) <!-- Reviewable:end -->
|
|
Update syn - servo/html5ever#353 - servo/rust-cssparser#229 - servo/webrender#3264 - servo/media#162 - rust-lang/rust-bindgen#1409 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22085) <!-- Reviewable:end -->
Eijebong commentedOct 16, 2018
•
edited by larsbergstrom
This change is