1 // Test a trait (`Bar`) with a higher-ranked supertrait.
5 fn foo(&'tcx self) -> &'tcx isize;
11 fn bar(&'ccx self) -> &'ccx isize;
14 fn want_foo_for_some_tcx<'x,F>(f: &'x F)
17 want_foo_for_some_tcx(f);
18 want_foo_for_any_tcx(f); //~ ERROR not satisfied
21 fn want_foo_for_any_tcx<F>(f: &F)
22 where F : for<'tcx> Foo<'tcx>
24 want_foo_for_some_tcx(f);
25 want_foo_for_any_tcx(f);
28 fn want_bar_for_some_ccx<'x,B>(b: &B)
31 want_foo_for_some_tcx(b);
32 want_foo_for_any_tcx(b);
34 want_bar_for_some_ccx(b);
35 want_bar_for_any_ccx(b); //~ ERROR not satisfied
38 fn want_bar_for_any_ccx<B>(b: &B)
39 where B : for<'ccx> Bar<'ccx>
41 want_foo_for_some_tcx(b);
42 want_foo_for_any_tcx(b);
44 want_bar_for_some_ccx(b);
45 want_bar_for_any_ccx(b);