about summary refs log tree commit diff
path: root/tests/ui/traits/non_lifetime_binders/unifying-placeholders-in-query-response-2.rs
blob: d900bd429e6ec389bb0b84625cdb4e54bd3cb604 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
//@ check-pass

#![feature(sized_hierarchy)]
#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete

use std::marker::PointeeSized;

trait Id: PointeeSized {
    type Output: PointeeSized;
}

impl<T: PointeeSized> Id for T {
    type Output = T;
}

trait Everyone: PointeeSized {}
impl<T: PointeeSized> Everyone for T {}

fn hello() where for<T> <T as Id>::Output: Everyone {}

fn main() {
    hello();
}