commit | c29b9890819403fd5fc86369c619033fd8cb89fb | [log] [tgz] |
---|---|---|
author | David Tolnay <dtolnay@gmail.com> | Wed Dec 27 22:58:14 2017 -0500 |
committer | David Tolnay <dtolnay@gmail.com> | Wed Dec 27 22:58:14 2017 -0500 |
tree | 428e8bf3112973451404470d467923bf3009d860 | |
parent | 80ed55fef9dac1241291527d9cd8285a5d2c7f73 [diff] [blame] |
Keep the span of negative sign in pat
diff --git a/src/expr.rs b/src/expr.rs index 1344b07..50ec407 100644 --- a/src/expr.rs +++ b/src/expr.rs
@@ -2218,9 +2218,9 @@ | syn!(ExprPath) => { ExprKind::Path } ) >> - (if neg.is_some() { + (if let Some(neg) = neg { ExprKind::Unary(ExprUnary { - op: UnOp::Neg(<Token![-]>::default()), + op: UnOp::Neg(neg), expr: Box::new(v.into()) }).into() } else {