From 5f72f9dfc3f47bd59b4a6a3853cf0a6f373a1f91 Mon Sep 17 00:00:00 2001
From: Zachary S <zasample18+github@gmail.com>
Date: Tue, 10 Sep 2024 23:59:24 -0500
Subject: [PATCH] Regression test for #129541

---
 tests/ui/traits/sized-coniductive.rs | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 tests/ui/traits/sized-coniductive.rs

diff --git a/tests/ui/traits/sized-coniductive.rs b/tests/ui/traits/sized-coniductive.rs
new file mode 100644
index 0000000000000..5f63b166f988b
--- /dev/null
+++ b/tests/ui/traits/sized-coniductive.rs
@@ -0,0 +1,14 @@
+//@ check-pass
+// https://github.com/rust-lang/rust/issues/129541
+
+#[derive(Clone)]
+struct Test {
+    field: std::borrow::Cow<'static, [Self]>,
+}
+
+#[derive(Clone)]
+struct Hello {
+    a: <[Hello] as std::borrow::ToOwned>::Owned,
+}
+
+fn main(){}