]> git.proxmox.com Git - rustc.git/blob - src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / regions / regions-assoc-type-region-bound-in-trait-not-met.stderr
1 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
2 --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:14:10
3 |
4 LL | impl<'a> Foo<'static> for &'a i32 {
5 | ^^^^^^^^^^^^
6 |
7 note: first, the lifetime cannot outlive the lifetime `'a` as defined on the impl at 14:6...
8 --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:14:6
9 |
10 LL | impl<'a> Foo<'static> for &'a i32 {
11 | ^^
12 note: ...so that the types are compatible
13 --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:14:10
14 |
15 LL | impl<'a> Foo<'static> for &'a i32 {
16 | ^^^^^^^^^^^^
17 = note: expected `Foo<'static>`
18 found `Foo<'static>`
19 = note: but, the lifetime must be valid for the static lifetime...
20 note: ...so that the type `&i32` will meet its required lifetime bounds
21 --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:14:10
22 |
23 LL | impl<'a> Foo<'static> for &'a i32 {
24 | ^^^^^^^^^^^^
25
26 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
27 --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:19:13
28 |
29 LL | impl<'a,'b> Foo<'b> for &'a i64 {
30 | ^^^^^^^
31 |
32 note: first, the lifetime cannot outlive the lifetime `'a` as defined on the impl at 19:6...
33 --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:19:6
34 |
35 LL | impl<'a,'b> Foo<'b> for &'a i64 {
36 | ^^
37 note: ...so that the types are compatible
38 --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:19:13
39 |
40 LL | impl<'a,'b> Foo<'b> for &'a i64 {
41 | ^^^^^^^
42 = note: expected `Foo<'b>`
43 found `Foo<'_>`
44 note: but, the lifetime must be valid for the lifetime `'b` as defined on the impl at 19:9...
45 --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:19:9
46 |
47 LL | impl<'a,'b> Foo<'b> for &'a i64 {
48 | ^^
49 note: ...so that the type `&i32` will meet its required lifetime bounds
50 --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:19:13
51 |
52 LL | impl<'a,'b> Foo<'b> for &'a i64 {
53 | ^^^^^^^
54
55 error: aborting due to 2 previous errors
56
57 For more information about this error, try `rustc --explain E0495`.