Skip to content

Commit

Permalink
Replace meaningless placeholder with one of the legit expr variants
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 27, 2022
1 parent 5796d98 commit a9759cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2868,7 +2868,8 @@ pub(crate) mod parsing {
}
for part in float_repr.split('.') {
let index = crate::parse_str(part).map_err(|err| Error::new(float.span(), err))?;
let base = mem::replace(e, Expr::__TestExhaustive(crate::private(())));
let meaningless_placeholder = Expr::Verbatim(TokenStream::new());
let base = mem::replace(e, meaningless_placeholder);
*e = Expr::Field(ExprField {
attrs: Vec::new(),
base: Box::new(base),
Expand Down

0 comments on commit a9759cf

Please sign in to comment.