1
- error[E0495 ]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements
1
+ error[E0477 ]: the type `&'b ()` does not fulfill the required lifetime
2
2
--> $DIR/unsatisfied-outlives-bound.rs:9:5
3
3
|
4
4
LL | type Item<'a> = &'b ();
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^
6
6
|
7
- note: first, the lifetime cannot outlive the lifetime `'b` as defined on the impl at 8:6...
8
- --> $DIR/unsatisfied-outlives-bound.rs:8:6
9
- |
10
- LL | impl<'b> ATy for &'b () {
11
- | ^^
12
- note: ...so that the types are compatible
13
- --> $DIR/unsatisfied-outlives-bound.rs:9:5
14
- |
15
- LL | type Item<'a> = &'b ();
16
- | ^^^^^^^^^^^^^^^^^^^^^^^
17
- = note: expected `ATy`
18
- found `ATy`
19
- note: but, the lifetime must be valid for the lifetime `'a` as defined on the associated item at 9:15...
7
+ note: type must outlive the lifetime `'a` as defined on the associated item at 9:15
20
8
--> $DIR/unsatisfied-outlives-bound.rs:9:15
21
9
|
22
10
LL | type Item<'a> = &'b ();
23
11
| ^^
24
- note: ...so that the type `&()` will meet its required lifetime bounds
25
- --> $DIR/unsatisfied-outlives-bound.rs:9:5
26
- |
27
- LL | type Item<'a> = &'b ();
28
- | ^^^^^^^^^^^^^^^^^^^^^^^
29
12
30
13
error[E0477]: the type `&'a ()` does not fulfill the required lifetime
31
14
--> $DIR/unsatisfied-outlives-bound.rs:18:5
@@ -37,5 +20,4 @@ LL | type Item<'a> = &'a ();
37
20
38
21
error: aborting due to 2 previous errors
39
22
40
- Some errors have detailed explanations: E0477, E0495.
41
- For more information about an error, try `rustc --explain E0477`.
23
+ For more information about this error, try `rustc --explain E0477`.
0 commit comments