]> git.lizzy.rs Git - rust.git/blob - tests/ui/where-clauses/higher-ranked-fn-type.rs
Rollup merge of #105806 - mejrs:eager2, r=davidtwco
[rust.git] / tests / ui / where-clauses / higher-ranked-fn-type.rs
1 // revisions: quiet verbose
2 // [verbose]compile-flags: -Zverbose
3
4 #![allow(unused_parens)]
5
6 trait Foo {
7     type Assoc;
8 }
9
10 fn called()
11 where
12     for<'b> fn(&'b ()): Foo,
13 {
14 }
15
16 fn caller()
17 where
18     (for<'a> fn(&'a ())): Foo,
19 {
20     called()
21     //[quiet]~^ ERROR the trait bound `for<'b> fn(&'b ()): Foo` is not satisfied
22     //[verbose]~^^ ERROR the trait bound `for<Region(
23 }
24
25 fn main() {}