]> git.lizzy.rs Git - rust.git/blob - src/test/ui/self/self-in-typedefs.rs
Rollup merge of #90498 - joshtriplett:target-tier-policy-draft-updates, r=Mark-Simulacrum
[rust.git] / src / test / ui / self / self-in-typedefs.rs
1 // build-pass (FIXME(62277): could be check-pass?)
2 #![allow(dead_code)]
3
4 use std::mem::ManuallyDrop;
5
6 enum A<'a, T: 'a>
7 where
8     Self: Send, T: PartialEq<Self>
9 {
10     Foo(&'a Self),
11     Bar(T),
12 }
13
14 struct B<'a, T: 'a>
15 where
16     Self: Send, T: PartialEq<Self>
17 {
18     foo: &'a Self,
19     bar: T,
20 }
21
22 union C<'a, T: 'a>
23 where
24     Self: Send, T: PartialEq<Self>
25 {
26     foo: &'a Self,
27     bar: ManuallyDrop<T>,
28 }
29
30 union D<'a, T: 'a>
31 where
32     Self: Send, T: PartialEq<Self> + Copy
33 {
34     foo: &'a Self,
35     bar: T,
36 }
37
38 fn main() {}