From 662fc3861cfe3ac1b8ec0a08845192a8221e861a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 9 Jul 2023 18:01:33 -0700 Subject: [PATCH] Add test of const-generic unit struct where-clause edge case Closes #2501. --- test_suite/tests/test_gen.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test_suite/tests/test_gen.rs b/test_suite/tests/test_gen.rs index 9d21a1137..de0ad900b 100644 --- a/test_suite/tests/test_gen.rs +++ b/test_suite/tests/test_gen.rs @@ -760,6 +760,10 @@ fn test_gen() { #[serde(serialize_with = "vec_first_element")] vec: Vec, } + + #[derive(Deserialize)] + #[serde(bound(deserialize = "[&'de str; N]: Copy"))] + struct GenericUnitStruct; } //////////////////////////////////////////////////////////////////////////