diff --git a/src/librustc_parse/parser/item.rs b/src/librustc_parse/parser/item.rs index 7f15c403e9af9..82600c354e9f8 100644 --- a/src/librustc_parse/parser/item.rs +++ b/src/librustc_parse/parser/item.rs @@ -70,16 +70,15 @@ impl<'a> Parser<'a> { /// Parses one of the items allowed by the flags. fn parse_item_implementation( &mut self, - attrs: Vec, + mut attrs: Vec, macros_allowed: bool, attributes_allowed: bool, ) -> PResult<'a, Option>> { maybe_whole!(self, NtItem, |item| { - let mut item = item.into_inner(); - let mut attrs = attrs; + let mut item = item; mem::swap(&mut item.attrs, &mut attrs); item.attrs.extend(attrs); - Some(P(item)) + Some(item) }); let lo = self.token.span;