1
- warning: unnecessary lifetime parameter `'a`
2
- --> $DIR/unsatisfied-item-lifetime-bound.rs:4:12
3
- |
4
- LL | type Y<'a: 'static>;
5
- | ^^
6
- |
7
- = help: you can use the `'static` lifetime directly, in place of `'a`
8
- note: the lint level is defined here
9
- --> $DIR/unsatisfied-item-lifetime-bound.rs:1:9
10
- |
11
- LL | #![warn(unused_lifetimes)]
12
- | ^^^^^^^^^^^^^^^^
13
-
14
1
error[E0478]: lifetime bound not satisfied
15
- --> $DIR/unsatisfied-item-lifetime-bound.rs:14 :8
2
+ --> $DIR/unsatisfied-item-lifetime-bound.rs:11 :8
16
3
|
17
4
LL | f: <T as X>::Y<'a>,
18
5
| ^^^^^^^^^^^^^^^
19
6
|
20
7
note: lifetime parameter instantiated with the lifetime `'a` as defined here
21
- --> $DIR/unsatisfied-item-lifetime-bound.rs:13 :10
8
+ --> $DIR/unsatisfied-item-lifetime-bound.rs:10 :10
22
9
|
23
10
LL | struct B<'a, T: for<'r> X<Y<'r> = &'r ()>> {
24
11
| ^^
25
12
= note: but lifetime parameter must outlive the static lifetime
26
13
27
14
error[E0478]: lifetime bound not satisfied
28
- --> $DIR/unsatisfied-item-lifetime-bound.rs:19 :8
15
+ --> $DIR/unsatisfied-item-lifetime-bound.rs:16 :8
29
16
|
30
17
LL | f: <T as X>::Y<'a>,
31
18
| ^^^^^^^^^^^^^^^
32
19
|
33
20
note: lifetime parameter instantiated with the lifetime `'a` as defined here
34
- --> $DIR/unsatisfied-item-lifetime-bound.rs:18 :10
21
+ --> $DIR/unsatisfied-item-lifetime-bound.rs:15 :10
35
22
|
36
23
LL | struct C<'a, T: X> {
37
24
| ^^
38
25
= note: but lifetime parameter must outlive the static lifetime
39
26
40
27
error[E0478]: lifetime bound not satisfied
41
- --> $DIR/unsatisfied-item-lifetime-bound.rs:24 :8
28
+ --> $DIR/unsatisfied-item-lifetime-bound.rs:21 :8
42
29
|
43
30
LL | f: <() as X>::Y<'a>,
44
31
| ^^^^^^^^^^^^^^^^
45
32
|
46
33
note: lifetime parameter instantiated with the lifetime `'a` as defined here
47
- --> $DIR/unsatisfied-item-lifetime-bound.rs:23 :10
34
+ --> $DIR/unsatisfied-item-lifetime-bound.rs:20 :10
48
35
|
49
36
LL | struct D<'a> {
50
37
| ^^
51
38
= note: but lifetime parameter must outlive the static lifetime
52
39
53
40
error[E0478]: lifetime bound not satisfied
54
- --> $DIR/unsatisfied-item-lifetime-bound.rs:9 :18
41
+ --> $DIR/unsatisfied-item-lifetime-bound.rs:6 :18
55
42
|
56
43
LL | type Y<'a: 'static>;
57
44
| ------------------- definition of `Y` from trait
@@ -60,7 +47,7 @@ LL | type Y<'a> = &'a ();
60
47
| ^^^^^^
61
48
|
62
49
note: lifetime parameter instantiated with the lifetime `'a` as defined here
63
- --> $DIR/unsatisfied-item-lifetime-bound.rs:9 :12
50
+ --> $DIR/unsatisfied-item-lifetime-bound.rs:6 :12
64
51
|
65
52
LL | type Y<'a> = &'a ();
66
53
| ^^
@@ -70,6 +57,6 @@ help: copy the `where` clause predicates from the trait
70
57
LL | type Y<'a> = &'a () where 'a: 'static;
71
58
| +++++++++++++++++
72
59
73
- error: aborting due to 4 previous errors; 1 warning emitted
60
+ error: aborting due to 4 previous errors
74
61
75
62
For more information about this error, try `rustc --explain E0478`.
0 commit comments