From 401399fbb6225caa75b2008daaa9dc284a268076 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 29 Nov 2024 13:13:04 -0800 Subject: [PATCH] Add test of attr precedence inside subexpression ---- test_fixup stdout ---- thread 'test_fixup' panicked at tests/test_expr.rs:716:9: original: (# [attr] thing) . field reconstructed: # [attr] thing . field --- tests/test_expr.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_expr.rs b/tests/test_expr.rs index f01fcb8ce2..6dd876221d 100644 --- a/tests/test_expr.rs +++ b/tests/test_expr.rs @@ -702,6 +702,7 @@ fn test_fixup() { quote! { (..) += () }, quote! { (1 < 2) == (3 < 4) }, quote! { { (let _ = ()) } }, + quote! { (#[attr] thing).field }, ] { let original: Expr = syn::parse2(tokens).unwrap();