summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generic-associated-types/issue-87750.rs
blob: 0a11a0f3ae0e44cd06569651e9abf49f5443ecef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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`
}