|
1 | | -error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'s` due to conflicting requirements |
| 1 | +error: implementation of `Foo` is not general enough |
2 | 2 | --> $DIR/issue-54302-cases.rs:63:5 |
3 | 3 | | |
4 | 4 | LL | <u32 as RefFoo<u32>>::ref_foo(a) |
5 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
6 | 6 | | |
7 | | - = note: first, the lifetime cannot outlive lifetime RePlaceholder(Placeholder { universe: U2, name: BrNamed(crate0:DefIndex(1:27), 'a) })... |
8 | | - = note: ...but the lifetime must also be valid for the static lifetime... |
9 | | - = note: ...so that the types are compatible: |
10 | | - expected Foo<'static, u32> |
11 | | - found Foo<'_, u32> |
| 7 | + = note: `&'0 u32` must implement `Foo<'static, u32>` for any lifetime `'0` |
| 8 | + = note: but `&'1 _` only implements `Foo<'_, _>` for some lifetime `'1` |
12 | 9 |
|
13 | | -error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'s` due to conflicting requirements |
| 10 | +error: implementation of `Foo` is not general enough |
14 | 11 | --> $DIR/issue-54302-cases.rs:69:5 |
15 | 12 | | |
16 | 13 | LL | <i32 as RefFoo<i32>>::ref_foo(a) |
17 | 14 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
18 | 15 | | |
19 | | - = note: first, the lifetime cannot outlive lifetime RePlaceholder(Placeholder { universe: U2, name: BrNamed(crate0:DefIndex(1:27), 'a) })... |
20 | | - = note: ...but the lifetime must also be valid for the static lifetime... |
21 | | - = note: ...so that the types are compatible: |
22 | | - expected Foo<'static, i32> |
23 | | - found Foo<'_, i32> |
| 16 | + = note: `&'0 i32` must implement `Foo<'static, i32>` for any lifetime `'0` |
| 17 | + = note: but `&'1 _` only implements `Foo<'_, _>` for some lifetime `'1` |
24 | 18 |
|
25 | | -error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'s` due to conflicting requirements |
| 19 | +error: implementation of `Foo` is not general enough |
26 | 20 | --> $DIR/issue-54302-cases.rs:75:5 |
27 | 21 | | |
28 | 22 | LL | <u64 as RefFoo<u64>>::ref_foo(a) |
29 | 23 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
30 | 24 | | |
31 | | - = note: first, the lifetime cannot outlive lifetime RePlaceholder(Placeholder { universe: U2, name: BrNamed(crate0:DefIndex(1:27), 'a) })... |
32 | | - = note: ...but the lifetime must also be valid for the static lifetime... |
33 | | - = note: ...so that the types are compatible: |
34 | | - expected Foo<'static, u64> |
35 | | - found Foo<'_, u64> |
| 25 | + = note: `&'0 u64` must implement `Foo<'static, u64>` for any lifetime `'0` |
| 26 | + = note: but `&'1 _` only implements `Foo<'_, _>` for some lifetime `'1` |
36 | 27 |
|
37 | | -error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'s` due to conflicting requirements |
| 28 | +error: implementation of `Foo` is not general enough |
38 | 29 | --> $DIR/issue-54302-cases.rs:81:5 |
39 | 30 | | |
40 | 31 | LL | <i64 as RefFoo<i64>>::ref_foo(a) |
41 | 32 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
42 | 33 | | |
43 | | - = note: first, the lifetime cannot outlive lifetime RePlaceholder(Placeholder { universe: U2, name: BrNamed(crate0:DefIndex(1:27), 'a) })... |
44 | | - = note: ...but the lifetime must also be valid for the static lifetime... |
45 | | - = note: ...so that the types are compatible: |
46 | | - expected Foo<'static, i64> |
47 | | - found Foo<'_, i64> |
| 34 | + = note: `&'0 i64` must implement `Foo<'static, i64>` for any lifetime `'0` |
| 35 | + = note: but `&'1 _` only implements `Foo<'_, _>` for some lifetime `'1` |
48 | 36 |
|
49 | 37 | error: aborting due to 4 previous errors |
50 | 38 |
|
51 | | -For more information about this error, try `rustc --explain E0495`. |
0 commit comments