From 259020c9324d40fccb889d7bb9e462fc28ffe75c Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Mon, 25 Nov 2024 20:30:28 +0100 Subject: [PATCH] tests: Add regression test for recursive enum with Cow and Clone --- .../solver-cycles/100347-recursive-enum-cow-slice.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/ui/traits/solver-cycles/100347-recursive-enum-cow-slice.rs diff --git a/tests/ui/traits/solver-cycles/100347-recursive-enum-cow-slice.rs b/tests/ui/traits/solver-cycles/100347-recursive-enum-cow-slice.rs new file mode 100644 index 0000000000000..26ae42b3e082f --- /dev/null +++ b/tests/ui/traits/solver-cycles/100347-recursive-enum-cow-slice.rs @@ -0,0 +1,11 @@ +//@ check-pass + +use std::borrow::Cow; + +#[derive(Clone)] +enum Test<'a> { + Int(u8), + Array(Cow<'a, [Test<'a>]>), +} + +fn main() {}