Box ExprKind::{Closure,MethodCall}
, and QSelf
in expressions, types, and patterns.
This commit is contained in:
parent
bebd57a960
commit
6b7ca2fcf2
37 changed files with 409 additions and 318 deletions
|
@ -121,7 +121,7 @@ impl<'a> State<'a> {
|
|||
|
||||
fn print_expr_struct(
|
||||
&mut self,
|
||||
qself: &Option<ast::QSelf>,
|
||||
qself: &Option<P<ast::QSelf>>,
|
||||
path: &ast::Path,
|
||||
fields: &[ast::ExprField],
|
||||
rest: &ast::StructRest,
|
||||
|
@ -307,8 +307,13 @@ impl<'a> State<'a> {
|
|||
ast::ExprKind::Call(ref func, ref args) => {
|
||||
self.print_expr_call(func, &args);
|
||||
}
|
||||
ast::ExprKind::MethodCall(ref segment, ref receiver, ref args, _) => {
|
||||
self.print_expr_method_call(segment, &receiver, &args);
|
||||
ast::ExprKind::MethodCall(box ast::MethodCall {
|
||||
ref seg,
|
||||
ref receiver,
|
||||
ref args,
|
||||
..
|
||||
}) => {
|
||||
self.print_expr_method_call(seg, &receiver, &args);
|
||||
}
|
||||
ast::ExprKind::Binary(op, ref lhs, ref rhs) => {
|
||||
self.print_expr_binary(op, lhs, rhs);
|
||||
|
@ -396,21 +401,21 @@ impl<'a> State<'a> {
|
|||
let empty = attrs.is_empty() && arms.is_empty();
|
||||
self.bclose(expr.span, empty);
|
||||
}
|
||||
ast::ExprKind::Closure(
|
||||
ast::ExprKind::Closure(box ast::Closure {
|
||||
ref binder,
|
||||
capture_clause,
|
||||
asyncness,
|
||||
movability,
|
||||
ref decl,
|
||||
ref fn_decl,
|
||||
ref body,
|
||||
_,
|
||||
) => {
|
||||
fn_decl_span: _,
|
||||
}) => {
|
||||
self.print_closure_binder(binder);
|
||||
self.print_movability(movability);
|
||||
self.print_asyncness(asyncness);
|
||||
self.print_capture_clause(capture_clause);
|
||||
|
||||
self.print_fn_params_and_ret(decl, true);
|
||||
self.print_fn_params_and_ret(fn_decl, true);
|
||||
self.space();
|
||||
self.print_expr(body);
|
||||
self.end(); // need to close a box
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue