]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-87750.rs
Merge commit '5ff7b632a95bac6955611d85040859128902c580' into sync-rustfmt-subtree
[rust.git] / src / test / ui / generic-associated-types / issue-87750.rs
1 #![feature(generic_associated_types)]
2
3 trait PointerFamily {
4     type Pointer<T>;
5 }
6
7 struct Rc<T>(Box<T>);
8 struct RcFamily;
9
10 impl PointerFamily for RcFamily {
11     type Pointer<T> = Rc<T>;
12 }
13
14 #[allow(dead_code)]
15 enum Node<T, P: PointerFamily> where P::Pointer<Node<T, P>>: Sized {
16     Cons(P::Pointer<Node<T, P>>),
17 }
18
19 fn main() {
20     let _list: <RcFamily as PointerFamily>::Pointer<Node<i32, RcFamily>>;
21     //~^ ERROR overflow evaluating the requirement `Node<i32, RcFamily>: Sized`
22 }