]> git.proxmox.com Git - rustc.git/blob - tests/ui/specialization/issue-35376.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / specialization / issue-35376.rs
1 // check-pass
2 #![feature(specialization)]
3 //~^ WARN the feature `specialization` is incomplete
4
5 fn main() {}
6
7 pub trait Alpha<T> { }
8
9 pub trait Beta {
10 type Event;
11 }
12
13 pub trait Delta {
14 type Handle;
15 fn process(&self);
16 }
17
18 pub struct Parent<A, T>(A, T);
19
20 impl<A, T> Delta for Parent<A, T>
21 where A: Alpha<T::Handle>,
22 T: Delta,
23 T::Handle: Beta<Event = <Handle as Beta>::Event> {
24 type Handle = Handle;
25 default fn process(&self) {
26 unimplemented!()
27 }
28 }
29
30 impl<A, T> Delta for Parent<A, T>
31 where A: Alpha<T::Handle> + Alpha<Handle>,
32 T: Delta,
33 T::Handle: Beta<Event = <Handle as Beta>::Event> {
34 fn process(&self) {
35 unimplemented!()
36 }
37 }
38
39 pub struct Handle;
40
41 impl Beta for Handle {
42 type Event = ();
43 }