Skip to content

Commit a8591a5

Browse files
committed
deps: Update syntex_syntax to 0.29.1
1 parent 65bc5c2 commit a8591a5

12 files changed

+230
-213
lines changed

Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ regex = "0.1.41"
2121
term = "0.2.11"
2222
strings = "0.0.1"
2323
diff = "0.1.8"
24-
syntex_syntax = "0.23.0"
24+
syntex_syntax = "0.29.1"
2525
log = "0.3.2"
2626
env_logger = "0.3.1"
2727
getopts = "0.2"

src/chains.rs

+21-21
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub fn rewrite_chain(mut expr: &ast::Expr,
9494

9595
let fits_single_line = !veto_single_line &&
9696
match subexpr_list[0].node {
97-
ast::Expr_::ExprMethodCall(ref method_name, ref types, ref expressions)
97+
ast::ExprKind::MethodCall(ref method_name, ref types, ref expressions)
9898
if context.config.chains_overflow_last => {
9999
let len = rewrites.len();
100100
let (init, last) = rewrites.split_at_mut(len - 1);
@@ -150,28 +150,28 @@ pub fn rewrite_chain(mut expr: &ast::Expr,
150150
// parens, braces and brackets in its idiomatic formatting.
151151
fn is_block_expr(expr: &ast::Expr, repr: &str) -> bool {
152152
match expr.node {
153-
ast::Expr_::ExprStruct(..) |
154-
ast::Expr_::ExprWhile(..) |
155-
ast::Expr_::ExprWhileLet(..) |
156-
ast::Expr_::ExprIf(..) |
157-
ast::Expr_::ExprIfLet(..) |
158-
ast::Expr_::ExprBlock(..) |
159-
ast::Expr_::ExprLoop(..) |
160-
ast::Expr_::ExprForLoop(..) |
161-
ast::Expr_::ExprMatch(..) => repr.contains('\n'),
162-
ast::Expr_::ExprParen(ref expr) |
163-
ast::Expr_::ExprBinary(_, _, ref expr) |
164-
ast::Expr_::ExprIndex(_, ref expr) |
165-
ast::Expr_::ExprUnary(_, ref expr) => is_block_expr(expr, repr),
153+
ast::ExprKind::Struct(..) |
154+
ast::ExprKind::While(..) |
155+
ast::ExprKind::WhileLet(..) |
156+
ast::ExprKind::If(..) |
157+
ast::ExprKind::IfLet(..) |
158+
ast::ExprKind::Block(..) |
159+
ast::ExprKind::Loop(..) |
160+
ast::ExprKind::ForLoop(..) |
161+
ast::ExprKind::Match(..) => repr.contains('\n'),
162+
ast::ExprKind::Paren(ref expr) |
163+
ast::ExprKind::Binary(_, _, ref expr) |
164+
ast::ExprKind::Index(_, ref expr) |
165+
ast::ExprKind::Unary(_, ref expr) => is_block_expr(expr, repr),
166166
_ => false,
167167
}
168168
}
169169

170170
fn pop_expr_chain(expr: &ast::Expr) -> Option<&ast::Expr> {
171171
match expr.node {
172-
ast::Expr_::ExprMethodCall(_, _, ref expressions) => Some(&expressions[0]),
173-
ast::Expr_::ExprTupField(ref subexpr, _) |
174-
ast::Expr_::ExprField(ref subexpr, _) => Some(subexpr),
172+
ast::ExprKind::MethodCall(_, _, ref expressions) => Some(&expressions[0]),
173+
ast::ExprKind::TupField(ref subexpr, _) |
174+
ast::ExprKind::Field(ref subexpr, _) => Some(subexpr),
175175
_ => None,
176176
}
177177
}
@@ -183,7 +183,7 @@ fn rewrite_chain_expr(expr: &ast::Expr,
183183
offset: Indent)
184184
-> Option<String> {
185185
match expr.node {
186-
ast::Expr_::ExprMethodCall(ref method_name, ref types, ref expressions) => {
186+
ast::ExprKind::MethodCall(ref method_name, ref types, ref expressions) => {
187187
let inner = &RewriteContext { block_indent: offset, ..*context };
188188
rewrite_method_call(method_name.node,
189189
types,
@@ -193,15 +193,15 @@ fn rewrite_chain_expr(expr: &ast::Expr,
193193
width,
194194
offset)
195195
}
196-
ast::Expr_::ExprField(_, ref field) => {
196+
ast::ExprKind::Field(_, ref field) => {
197197
let s = format!(".{}", field.node);
198198
if s.len() <= width {
199199
Some(s)
200200
} else {
201201
None
202202
}
203203
}
204-
ast::Expr_::ExprTupField(_, ref field) => {
204+
ast::ExprKind::TupField(_, ref field) => {
205205
let s = format!(".{}", field.node);
206206
if s.len() <= width {
207207
Some(s)
@@ -216,7 +216,7 @@ fn rewrite_chain_expr(expr: &ast::Expr,
216216
// Determines we can continue formatting a given expression on the same line.
217217
fn is_continuable(expr: &ast::Expr) -> bool {
218218
match expr.node {
219-
ast::Expr_::ExprPath(..) => true,
219+
ast::ExprKind::Path(..) => true,
220220
_ => false,
221221
}
222222
}

0 commit comments

Comments
 (0)