From 5f72f9dfc3f47bd59b4a6a3853cf0a6f373a1f91 Mon Sep 17 00:00:00 2001 From: Zachary S 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 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(){}