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:
commit
5c60185c53
14
tests/ui/traits/sized-coniductive.rs
Normal file
14
tests/ui/traits/sized-coniductive.rs
Normal 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(){}
|
Loading…
Reference in New Issue
Block a user