fn print_expr_struct(
&mut self,
- qself: &Option<ast::QSelf>,
+ qself: &Option<P<ast::QSelf>>,
path: &ast::Path,
fields: &[ast::ExprField],
rest: &ast::StructRest,
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);
ast::ExprKind::AddrOf(k, m, ref expr) => {
self.print_expr_addr_of(k, m, expr);
}
- ast::ExprKind::Lit(ref lit) => {
- self.print_literal(lit);
+ ast::ExprKind::Lit(token_lit) => {
+ self.print_token_literal(token_lit, expr.span);
+ }
+ ast::ExprKind::IncludedBytes(ref bytes) => {
+ let lit = ast::Lit::from_included_bytes(bytes, expr.span);
+ self.print_literal(&lit)
}
ast::ExprKind::Cast(ref expr, ref ty) => {
let prec = AssocOp::As.precedence() as i8;
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