diff options
| author | bors <bors@rust-lang.org> | 2022-09-05 16:21:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-05 16:21:40 +0000 |
| commit | b44197abb0b3ffe4908892e1e08ab1cd721ff3b9 (patch) | |
| tree | b6fb0e22306ad314d139ff05bfc3137c2cc7265a /compiler/rustc_ast_lowering/src/expr.rs | |
| parent | 2dc703fd6e3aaaf343828cc7dd1aec192d24c628 (diff) | |
| parent | 9cde34e1807208493b3975c155e0c5389820a8ce (diff) | |
| download | rust-b44197abb0b3ffe4908892e1e08ab1cd721ff3b9.tar.gz rust-b44197abb0b3ffe4908892e1e08ab1cd721ff3b9.zip | |
Auto merge of #101261 - TaKO8Ki:separate-receiver-from-arguments-in-hir, r=cjgillot
Separate the receiver from arguments in HIR Related to #100232 cc `@cjgillot`
Diffstat (limited to 'compiler/rustc_ast_lowering/src/expr.rs')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/expr.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs index 22245692d13..9de7962bee3 100644 --- a/compiler/rustc_ast_lowering/src/expr.rs +++ b/compiler/rustc_ast_lowering/src/expr.rs @@ -68,10 +68,10 @@ impl<'hir> LoweringContext<'_, 'hir> { ParenthesizedGenericArgs::Err, ImplTraitContext::Disallowed(ImplTraitPosition::Path), )); - let args = self.arena.alloc_from_iter( - [&*receiver].into_iter().chain(args.iter()).map(|x| self.lower_expr_mut(x)), - ); - hir::ExprKind::MethodCall(hir_seg, args, self.lower_span(span)) + let receiver = self.lower_expr(receiver); + let args = + self.arena.alloc_from_iter(args.iter().map(|x| self.lower_expr_mut(x))); + hir::ExprKind::MethodCall(hir_seg, receiver, args, self.lower_span(span)) } ExprKind::Binary(binop, ref lhs, ref rhs) => { let binop = self.lower_binop(binop); |
