about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/traits/sized-coniductive.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/traits/sized-coniductive.rs b/tests/ui/traits/sized-coniductive.rs
new file mode 100644
index 00000000000..5f63b166f98
--- /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(){}