summaryrefslogtreecommitdiff
path: root/tests/ui/traits/non_lifetime_binders/universe-error1.rs
blob: eadee6b711e52be7a844d82b9ce721153d2b3f81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete

trait Other<U: ?Sized> {}

impl<U: ?Sized> Other<U> for U {}

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

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

fn main() {}