]> git.lizzy.rs Git - rust.git/blob - tests/ui/higher-rank-trait-bounds/hrtb-higher-ranker-supertraits.stderr
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / higher-rank-trait-bounds / hrtb-higher-ranker-supertraits.stderr
1 error[E0277]: the trait bound `for<'tcx> F: Foo<'tcx>` is not satisfied
2   --> $DIR/hrtb-higher-ranker-supertraits.rs:18:26
3    |
4 LL |     want_foo_for_any_tcx(f);
5    |     -------------------- ^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F`
6    |     |
7    |     required by a bound introduced by this call
8    |
9 note: required by a bound in `want_foo_for_any_tcx`
10   --> $DIR/hrtb-higher-ranker-supertraits.rs:22:15
11    |
12 LL | fn want_foo_for_any_tcx<F>(f: &F)
13    |    -------------------- required by a bound in this
14 LL |     where F : for<'tcx> Foo<'tcx>
15    |               ^^^^^^^^^^^^^^^^^^^ required by this bound in `want_foo_for_any_tcx`
16 help: consider further restricting this bound
17    |
18 LL |     where F : Foo<'x> + for<'tcx> Foo<'tcx>
19    |                       +++++++++++++++++++++
20
21 error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied
22   --> $DIR/hrtb-higher-ranker-supertraits.rs:35:26
23    |
24 LL |     want_bar_for_any_ccx(b);
25    |     -------------------- ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B`
26    |     |
27    |     required by a bound introduced by this call
28    |
29 note: required by a bound in `want_bar_for_any_ccx`
30   --> $DIR/hrtb-higher-ranker-supertraits.rs:39:15
31    |
32 LL | fn want_bar_for_any_ccx<B>(b: &B)
33    |    -------------------- required by a bound in this
34 LL |     where B : for<'ccx> Bar<'ccx>
35    |               ^^^^^^^^^^^^^^^^^^^ required by this bound in `want_bar_for_any_ccx`
36 help: consider further restricting this bound
37    |
38 LL |     where B : Bar<'x> + for<'ccx> Bar<'ccx>
39    |                       +++++++++++++++++++++
40
41 error: aborting due to 2 previous errors
42
43 For more information about this error, try `rustc --explain E0277`.