diff options
Diffstat (limited to 'tests/ui/where-clauses/higher-ranked-fn-type.rs')
-rw-r--r-- | tests/ui/where-clauses/higher-ranked-fn-type.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.rs b/tests/ui/where-clauses/higher-ranked-fn-type.rs new file mode 100644 index 000000000..c19e75eb7 --- /dev/null +++ b/tests/ui/where-clauses/higher-ranked-fn-type.rs @@ -0,0 +1,25 @@ +// revisions: quiet verbose +// [verbose]compile-flags: -Zverbose + +#![allow(unused_parens)] + +trait Foo { + type Assoc; +} + +fn called() +where + for<'b> fn(&'b ()): Foo, +{ +} + +fn caller() +where + (for<'a> fn(&'a ())): Foo, +{ + called() + //[quiet]~^ ERROR the trait bound `for<'b> fn(&'b ()): Foo` is not satisfied + //[verbose]~^^ ERROR the trait bound `for<Region( +} + +fn main() {} |