about summary refs log tree commit diff
path: root/tests/ui/traits/non_lifetime_binders/universe-error1.rs
blob: b4e8e3a8aada660db0f50ddddadd494c929c9b5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#![feature(sized_hierarchy)]
#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete

use std::marker::PointeeSized;

trait Other<U: PointeeSized>: PointeeSized {}

impl<U: PointeeSized> Other<U> for U {}

#[rustfmt::skip]
fn foo<U: PointeeSized>()
where
    for<T> T: Other<U> {}

fn bar() {
    foo::<_>();
    //~^ ERROR the trait bound `T: Other<_>` is not satisfied
}

fn main() {}