Skip to content

Commit

Permalink
No need for helper in trailer_expr attribute handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Apr 21, 2021
1 parent 1e3ce84 commit bc09668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/expr.rs
Expand Up @@ -1524,15 +1524,15 @@ pub(crate) mod parsing {
// <atom> ? ...
#[cfg(feature = "full")]
fn trailer_expr(
outer_attrs: Vec<Attribute>,
mut attrs: Vec<Attribute>,
input: ParseStream,
allow_struct: AllowStruct,
) -> Result<Expr> {
let atom = atom_expr(input, allow_struct)?;
let mut e = trailer_helper(input, atom)?;

let inner_attrs = e.replace_attrs(Vec::new());
let attrs = private::attrs(outer_attrs, inner_attrs);
attrs.extend(inner_attrs);
e.replace_attrs(attrs);
Ok(e)
}
Expand Down

0 comments on commit bc09668

Please sign in to comment.