diff options
| author | bors <bors@rust-lang.org> | 2019-08-28 03:42:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-08-28 03:42:00 +0000 |
| commit | bbd48e6f166739344528a5fff4f02516b77d7916 (patch) | |
| tree | 7b8fc3d13d81af2bf40dfd5701f1b2a24ad73c5a /src/libsyntax/parse/parser/expr.rs | |
| parent | b7178cbc0c950961dd130428905b65db61838951 (diff) | |
| parent | 97319b2b952c32ac1f0b36a834615b60b0376797 (diff) | |
| download | rust-bbd48e6f166739344528a5fff4f02516b77d7916.tar.gz rust-bbd48e6f166739344528a5fff4f02516b77d7916.zip | |
Auto merge of #63127 - kper:pr, r=nikomatsakis
Cleanup: Consistently use `Param` instead of `Arg` #62426 Fixes #62426
Diffstat (limited to 'src/libsyntax/parse/parser/expr.rs')
| -rw-r--r-- | src/libsyntax/parse/parser/expr.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/parse/parser/expr.rs b/src/libsyntax/parse/parser/expr.rs index f7c090b5135..5b9f0f1df67 100644 --- a/src/libsyntax/parse/parser/expr.rs +++ b/src/libsyntax/parse/parser/expr.rs @@ -7,7 +7,7 @@ use crate::maybe_recover_from_interpolated_ty_qpath; use crate::ptr::P; use crate::ast::{self, Attribute, AttrStyle, Ident, CaptureBy, BlockCheckMode}; use crate::ast::{Expr, ExprKind, RangeLimits, Label, Movability, IsAsync, Arm}; -use crate::ast::{Ty, TyKind, FunctionRetTy, Arg, FnDecl}; +use crate::ast::{Ty, TyKind, FunctionRetTy, Param, FnDecl}; use crate::ast::{BinOpKind, BinOp, UnOp}; use crate::ast::{Mac, AnonConst, Field}; @@ -1157,7 +1157,7 @@ impl<'a> Parser<'a> { &[&token::BinOp(token::Or), &token::OrOr], SeqSep::trailing_allowed(token::Comma), TokenExpectType::NoExpect, - |p| p.parse_fn_block_arg() + |p| p.parse_fn_block_param() )?.0; self.expect_or()?; args @@ -1172,10 +1172,10 @@ impl<'a> Parser<'a> { })) } - /// Parses an argument in a lambda header (e.g., `|arg, arg|`). - fn parse_fn_block_arg(&mut self) -> PResult<'a, Arg> { + /// Parses a parameter in a lambda header (e.g., `|arg, arg|`). + fn parse_fn_block_param(&mut self) -> PResult<'a, Param> { let lo = self.token.span; - let attrs = self.parse_arg_attributes()?; + let attrs = self.parse_param_attributes()?; let pat = self.parse_pat(PARAM_EXPECTED)?; let t = if self.eat(&token::Colon) { self.parse_ty()? @@ -1187,7 +1187,7 @@ impl<'a> Parser<'a> { }) }; let span = lo.to(self.token.span); - Ok(Arg { + Ok(Param { attrs: attrs.into(), ty: t, pat, |
