]> git.lizzy.rs Git - rust.git/blob - src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-85455.rs
don't normalize wf predicates
[rust.git] / src / test / ui / higher-rank-trait-bounds / normalize-under-binder / issue-85455.rs
1 #![feature(unboxed_closures)]
2
3 trait SomeTrait<'a> {
4     type Associated;
5 }
6
7 fn give_me_ice<T>() {
8     callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
9     //~^ ERROR the trait bound `for<'r> T: SomeTrait<'r>` is not satisfied [E0277]
10 }
11
12 fn callee<T: Fn<(&'static (),)>>() {
13     println!("{}", std::any::type_name::<<T as FnOnce<(&'static (),)>>::Output>());
14 }
15
16 fn main() {
17     give_me_ice::<()>();
18 }