Skip to content

Commit

Permalink
Add test of parentheses needed in call of field
Browse files Browse the repository at this point in the history
    ---- test_fixup stdout ----
    thread 'test_fixup' panicked at tests/test_expr.rs:717:9:
    original: (self . f) ()
    reconstructed: self . f ()
  • Loading branch information
dtolnay committed Nov 29, 2024
1 parent 1cf735e commit 0e5c568
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ fn test_fixup() {
quote! { (1 < 2) == (3 < 4) },
quote! { { (let _ = ()) } },
quote! { (#[attr] thing).field },
quote! { (self.f)() },
] {
let original: Expr = syn::parse2(tokens).unwrap();

Expand Down

0 comments on commit 0e5c568

Please sign in to comment.