Skip to content

Commit

Permalink
Add cast tests that should fail to parse
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 14, 2022
1 parent fd6f0bf commit 097b3a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,9 @@ fn test_closure_vs_rangefull() {
}
"###);
}

#[test]
fn test_postfix_operator_after_cast() {
syn::parse_str::<Expr>("|| &x as T[0]").unwrap(); // FIXME
syn::parse_str::<Expr>("|| () as ()()").unwrap(); // FIXME
}

0 comments on commit 097b3a2

Please sign in to comment.