]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/unsatified-item-lifetime-bound.stderr
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / ui / generic-associated-types / unsatified-item-lifetime-bound.stderr
1 warning: unnecessary lifetime parameter `'a`
2   --> $DIR/unsatified-item-lifetime-bound.rs:2:12
3    |
4 LL |     type Y<'a: 'static>;
5    |            ^^
6    |
7    = help: you can use the `'static` lifetime directly, in place of `'a`
8
9 error[E0478]: lifetime bound not satisfied
10   --> $DIR/unsatified-item-lifetime-bound.rs:11:8
11    |
12 LL |     f: <T as X>::Y<'a>,
13    |        ^^^^^^^^^^^^^^^
14    |
15 note: lifetime parameter instantiated with the lifetime `'a` as defined here
16   --> $DIR/unsatified-item-lifetime-bound.rs:10:10
17    |
18 LL | struct B<'a, T: for<'r> X<Y<'r> = &'r ()>> {
19    |          ^^
20    = note: but lifetime parameter must outlive the static lifetime
21
22 error[E0478]: lifetime bound not satisfied
23   --> $DIR/unsatified-item-lifetime-bound.rs:16:8
24    |
25 LL |     f: <T as X>::Y<'a>,
26    |        ^^^^^^^^^^^^^^^
27    |
28 note: lifetime parameter instantiated with the lifetime `'a` as defined here
29   --> $DIR/unsatified-item-lifetime-bound.rs:15:10
30    |
31 LL | struct C<'a, T: X> {
32    |          ^^
33    = note: but lifetime parameter must outlive the static lifetime
34
35 error[E0478]: lifetime bound not satisfied
36   --> $DIR/unsatified-item-lifetime-bound.rs:21:8
37    |
38 LL |     f: <() as X>::Y<'a>,
39    |        ^^^^^^^^^^^^^^^^
40    |
41 note: lifetime parameter instantiated with the lifetime `'a` as defined here
42   --> $DIR/unsatified-item-lifetime-bound.rs:20:10
43    |
44 LL | struct D<'a> {
45    |          ^^
46    = note: but lifetime parameter must outlive the static lifetime
47
48 error: aborting due to 3 previous errors; 1 warning emitted
49
50 For more information about this error, try `rustc --explain E0478`.