From 6b7ca2fcf2ebbba705f7a98c00bd56b5348ee9d7 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 8 Sep 2022 10:52:51 +1000 Subject: Box `ExprKind::{Closure,MethodCall}`, and `QSelf` in expressions, types, and patterns. --- compiler/rustc_builtin_macros/src/assert/context.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'compiler/rustc_builtin_macros/src/assert/context.rs') diff --git a/compiler/rustc_builtin_macros/src/assert/context.rs b/compiler/rustc_builtin_macros/src/assert/context.rs index f72cd14bea0..4b57bdfbc8f 100644 --- a/compiler/rustc_builtin_macros/src/assert/context.rs +++ b/compiler/rustc_builtin_macros/src/assert/context.rs @@ -3,8 +3,8 @@ use rustc_ast::{ ptr::P, token, tokenstream::{DelimSpan, TokenStream, TokenTree}, - BinOpKind, BorrowKind, Expr, ExprKind, ItemKind, MacArgs, MacCall, MacDelimiter, Mutability, - Path, PathSegment, Stmt, StructRest, UnOp, UseTree, UseTreeKind, DUMMY_NODE_ID, + BinOpKind, BorrowKind, Expr, ExprKind, ItemKind, MacArgs, MacCall, MacDelimiter, MethodCall, + Mutability, Path, PathSegment, Stmt, StructRest, UnOp, UseTree, UseTreeKind, DUMMY_NODE_ID, }; use rustc_ast_pretty::pprust; use rustc_data_structures::fx::FxHashSet; @@ -242,9 +242,9 @@ impl<'cx, 'a> Context<'cx, 'a> { self.manage_cond_expr(prefix); self.manage_cond_expr(suffix); } - ExprKind::MethodCall(_, _,ref mut local_exprs, _) => { - for local_expr in local_exprs.iter_mut() { - self.manage_cond_expr(local_expr); + ExprKind::MethodCall(ref mut call) => { + for arg in call.args.iter_mut() { + self.manage_cond_expr(arg); } } ExprKind::Path(_, Path { ref segments, .. }) if let &[ref path_segment] = &segments[..] => { @@ -296,7 +296,7 @@ impl<'cx, 'a> Context<'cx, 'a> { | ExprKind::Block(_, _) | ExprKind::Box(_) | ExprKind::Break(_, _) - | ExprKind::Closure(_, _, _, _, _, _, _) + | ExprKind::Closure(_) | ExprKind::ConstBlock(_) | ExprKind::Continue(_) | ExprKind::Err @@ -442,12 +442,12 @@ fn expr_addr_of_mut(cx: &ExtCtxt<'_>, sp: Span, e: P) -> P { fn expr_method_call( cx: &ExtCtxt<'_>, - path: PathSegment, + seg: PathSegment, receiver: P, args: Vec>, span: Span, ) -> P { - cx.expr(span, ExprKind::MethodCall(path, receiver, args, span)) + cx.expr(span, ExprKind::MethodCall(Box::new(MethodCall { seg, receiver, args, span }))) } fn expr_paren(cx: &ExtCtxt<'_>, sp: Span, e: P) -> P { -- cgit 1.4.1-3-g733a5