We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5951cd3 + d154bef commit 011fb23Copy full SHA for 011fb23
src/librustc_parse/parser/item.rs
@@ -70,16 +70,15 @@ impl<'a> Parser<'a> {
70
/// Parses one of the items allowed by the flags.
71
fn parse_item_implementation(
72
&mut self,
73
- attrs: Vec<Attribute>,
+ mut attrs: Vec<Attribute>,
74
macros_allowed: bool,
75
attributes_allowed: bool,
76
) -> PResult<'a, Option<P<Item>>> {
77
maybe_whole!(self, NtItem, |item| {
78
- let mut item = item.into_inner();
79
- let mut attrs = attrs;
+ let mut item = item;
80
mem::swap(&mut item.attrs, &mut attrs);
81
item.attrs.extend(attrs);
82
- Some(P(item))
+ Some(item)
83
});
84
85
let lo = self.token.span;
0 commit comments