1
Fork 0

Stabilize param_attrs in Rust 1.39.0

This commit is contained in:
Caio 2019-08-29 20:44:30 -03:00
parent 34e82a7b79
commit 299d696b91
23 changed files with 133 additions and 244 deletions

View file

@ -979,7 +979,7 @@ impl<'a> Parser<'a> {
is_name_required: impl Fn(&token::Token) -> bool,
) -> PResult<'a, Param> {
let lo = self.token.span;
let attrs = self.parse_param_attributes()?;
let attrs = self.parse_outer_attributes()?;
if let Some(mut param) = self.parse_self_param()? {
param.attrs = attrs.into();
return self.recover_bad_self_param(param, is_trait_item);
@ -1362,7 +1362,7 @@ impl<'a> Parser<'a> {
/// Returns the parsed optional self parameter with attributes and whether a self
/// shortcut was used.
fn parse_self_parameter_with_attrs(&mut self) -> PResult<'a, Option<Param>> {
let attrs = self.parse_param_attributes()?;
let attrs = self.parse_outer_attributes()?;
let param_opt = self.parse_self_param()?;
Ok(param_opt.map(|mut param| {
param.attrs = attrs.into();