Rollup merge of #133473 - Enselic:cow, r=nnethercote

tests: Add regression test for recursive enum with Cow and Clone

I could not find any existing test. `git grep "(Cow<'[^>]\+\["` gave no hits before this tests.

Closes #100347
This commit is contained in:
Guillaume Gomez 2024-11-26 15:32:19 +01:00 committed by GitHub
commit 52fcafe872
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,11 @@
//@ check-pass
use std::borrow::Cow;
#[derive(Clone)]
enum Test<'a> {
Int(u8),
Array(Cow<'a, [Test<'a>]>),
}
fn main() {}