Skip to content

Commit c1a0312

Browse files
authored
Unrolled build for rust-lang#133488
Rollup merge of rust-lang#133488 - Enselic:recurse-2, r=BoxyUwU tests: Add regression test for self referential structs with cow as last field Making compilation pass for this code was retroactively stabilized via FCP in 1.79. The code does not compile in 1.78. See rust-lang#129541 for details. Closes rust-lang#107481
2 parents e48ddd8 + 7fc4b96 commit c1a0312

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Regression test for #107481
2+
3+
//@ check-pass
4+
5+
use std::{borrow::Cow, collections::HashMap};
6+
7+
#[derive(Clone)]
8+
struct Foo<'a>(Cow<'a, [Self]>);
9+
10+
#[derive(Clone)]
11+
struct Bar<'a>(Cow<'a, HashMap<String, Self>>);
12+
13+
#[derive(Clone)]
14+
struct Baz<'a>(Cow<'a, Vec<Self>>);
15+
16+
#[derive(Clone)]
17+
struct Qux<'a>(Cow<'a, Box<Self>>);
18+
19+
fn main() {}

0 commit comments

Comments
 (0)