Rollup merge of #129542 - zachs18:cow-self-test, r=compiler-errors

Add regression test for #129541

(maybe?) closes #129541 by adding a test that the code in question continues to compile.
This commit is contained in:
Guillaume Gomez 2024-09-20 15:45:44 +02:00 committed by GitHub
commit 5c60185c53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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(){}