Skip to content

Commit

Permalink
Fix syn parsing's continue_parsing_early for assert/proof
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Hawblitzel committed Feb 6, 2025
1 parent 8e7820d commit 5e8df04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dependencies/syn/src/classify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ pub(crate) fn requires_comma_to_be_match_arm(expr: &Expr) -> bool {
| Expr::Const(_) => false,

// verus
| Expr::Assert(e) => e.body.is_none(),
| Expr::AssertForall(_) => false,
Expr::Assert(e) => e.body.is_none(),
Expr::AssertForall(_) => false,
Expr::Assume(_)
| Expr::RevealHide(_)
| Expr::View(_)
Expand Down
6 changes: 6 additions & 0 deletions dependencies/syn/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2313,6 +2313,12 @@ pub(crate) mod parsing {
| Expr::Unsafe(_)
| Expr::Const(_)
| Expr::Block(_) => false,

// verus
Expr::Assert(e) => e.body.is_none(),
Expr::AssertForall(_) => false,
Expr::Unary(e) if matches!(e.op, crate::op::UnOp::Proof(_)) => false,

_ => true,
}
}
Expand Down

0 comments on commit 5e8df04

Please sign in to comment.