From 3f3d0c57ac66b4fa42a3f10209dd1fde29c5ce57 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 27 Sep 2024 10:29:10 -0700 Subject: [PATCH] Add regression test for issue 1738 --- tests/test_expr.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_expr.rs b/tests/test_expr.rs index d20cce8d6..f79e4fafd 100644 --- a/tests/test_expr.rs +++ b/tests/test_expr.rs @@ -642,6 +642,12 @@ fn test_assign_range_precedence() { syn::parse_str::("() .. () += ()").unwrap_err(); } +#[test] +fn test_chained_comparison() { + // https://github.com/dtolnay/syn/issues/1738 + let _ = syn::parse_str::("a = a < a <"); +} + #[test] fn test_fixup() { struct FlattenParens;