diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-11-26 15:32:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-26 15:32:19 +0100 |
| commit | 52fcafe87228bb21f12c0c0b6a4e366b9e47840b (patch) | |
| tree | 50ad8da6c7b85d81409491581b3ce30ecf4cde2e | |
| parent | 0d9a57d979e4978bbf59e17a82781ff4f1e7a4d7 (diff) | |
| parent | 259020c9324d40fccb889d7bb9e462fc28ffe75c (diff) | |
| download | rust-52fcafe87228bb21f12c0c0b6a4e366b9e47840b.tar.gz rust-52fcafe87228bb21f12c0c0b6a4e366b9e47840b.zip | |
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
| -rw-r--r-- | tests/ui/traits/solver-cycles/100347-recursive-enum-cow-slice.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/traits/solver-cycles/100347-recursive-enum-cow-slice.rs b/tests/ui/traits/solver-cycles/100347-recursive-enum-cow-slice.rs new file mode 100644 index 00000000000..26ae42b3e08 --- /dev/null +++ b/tests/ui/traits/solver-cycles/100347-recursive-enum-cow-slice.rs @@ -0,0 +1,11 @@ +//@ check-pass + +use std::borrow::Cow; + +#[derive(Clone)] +enum Test<'a> { + Int(u8), + Array(Cow<'a, [Test<'a>]>), +} + +fn main() {} |
