Skip to content

Commit f1d9ba8

Browse files
authored
Rollup merge of #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 #129541 for details. Closes #107481
2 parents 5192810 + 7fc4b96 commit f1d9ba8

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)