]> git.lizzy.rs Git - rust.git/blob - src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-85455.rs
Rollup merge of #94839 - TaKO8Ki:suggest-using-double-colon-for-struct-field-type...
[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 `T: SomeTrait<'_>` is not satisfied [E0277]
10     //~| ERROR the trait bound `T: SomeTrait<'_>` is not satisfied [E0277]
11 }
12
13 fn callee<T: Fn<(&'static (),)>>() {
14     println!("{}", std::any::type_name::<<T as FnOnce<(&'static (),)>>::Output>());
15 }
16
17 fn main() {
18     give_me_ice::<()>();
19 }