2 #![allow(unused_variables)]
3 pub trait Parameters { type SelfRef; }
5 struct RP<'a> { _marker: std::marker::PhantomData<&'a ()> }
8 impl<'a> Parameters for RP<'a> { type SelfRef = &'a X<RP<'a>>; }
9 impl Parameters for BP { type SelfRef = Box<X<BP>>; }
12 pub enum X<P: Parameters> {
14 SameAgain(P::SelfRef, Y)
18 let bnil: Box<X<BP>> = Box::new(X::Nothing);
19 let bx: Box<X<BP>> = Box::new(X::SameAgain(bnil, Y));
20 let rnil: X<RP> = X::Nothing;
21 let rx: X<RP> = X::SameAgain(&rnil, Y);