blob: 89bd79ac2991e16a06df7751bbceeee0b6d8aa3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#![feature(generic_associated_types)]
trait PointerFamily {
type Pointer<T>;
}
struct Rc<T>(Box<T>);
struct RcFamily;
impl PointerFamily for RcFamily {
type Pointer<T> = Rc<T>;
}
#[allow(dead_code)]
enum Node<T, P: PointerFamily> where P::Pointer<Node<T, P>>: Sized {
Cons(P::Pointer<Node<T, P>>),
}
fn main() {
let _list: <RcFamily as PointerFamily>::Pointer<Node<i32, RcFamily>>;
//~^ ERROR overflow evaluating the requirement `Node<i32, RcFamily>: Sized`
}
|