summaryrefslogtreecommitdiffstats
path: root/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-85455.rs
blob: de9348f5397099bf5267a8426b28d084fd7bb47e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(unboxed_closures)]

trait SomeTrait<'a> {
    type Associated;
}

fn give_me_ice<T>() {
    callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
    //~^ ERROR the trait bound `for<'r> T: SomeTrait<'r>` is not satisfied [E0277]
}

fn callee<T: Fn<(&'static (),)>>() {
    println!("{}", std::any::type_name::<<T as FnOnce<(&'static (),)>>::Output>());
}

fn main() {
    give_me_ice::<()>();
}