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