Skip to content

Commit

Permalink
Touch up parsing of field pats
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 24, 2023
1 parent ae9e865 commit e41f977
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,17 +543,17 @@ pub(crate) mod parsing {
Member::Unnamed(_) => unreachable!(),
};

let mut pat = Pat::Ident(PatIdent {
attrs: Vec::new(),
by_ref,
mutability,
ident: ident.clone(),
subpat: None,
});

if boxed.is_some() {
pat = Pat::Verbatim(verbatim::between(begin, input));
}
let pat = if boxed.is_some() {
Pat::Verbatim(verbatim::between(begin, input))
} else {
Pat::Ident(PatIdent {
attrs: Vec::new(),
by_ref,
mutability,
ident: ident.clone(),
subpat: None,
})
};

Ok(FieldPat {
attrs: Vec::new(),
Expand Down

0 comments on commit e41f977

Please sign in to comment.