fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
2.2 KiB58 linesraw
1error: implementation of `Foo` is not general enough
2  --> $DIR/issue-54302-cases.rs:63:5
3   |
4LL | / trait Foo<'x, T> {
5LL | |     fn foo(self) -> &'x T;
6LL | | }
7   | |_- trait `Foo` defined here
8...
9LL |       <u32 as RefFoo<u32>>::ref_foo(a)
10   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
11   |
12   = note: `Foo<'static, u32>` would have to be implemented for the type `&'0 u32`, for any lifetime `'0`...
13   = note: ...but `Foo<'_, u32>` is actually implemented for the type `&'1 u32`, for some specific lifetime `'1`
14
15error: implementation of `Foo` is not general enough
16  --> $DIR/issue-54302-cases.rs:69:5
17   |
18LL | / trait Foo<'x, T> {
19LL | |     fn foo(self) -> &'x T;
20LL | | }
21   | |_- trait `Foo` defined here
22...
23LL |       <i32 as RefFoo<i32>>::ref_foo(a)
24   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
25   |
26   = note: `Foo<'static, i32>` would have to be implemented for the type `&'0 i32`, for any lifetime `'0`...
27   = note: ...but `Foo<'_, i32>` is actually implemented for the type `&'1 i32`, for some specific lifetime `'1`
28
29error: implementation of `Foo` is not general enough
30  --> $DIR/issue-54302-cases.rs:75:5
31   |
32LL | / trait Foo<'x, T> {
33LL | |     fn foo(self) -> &'x T;
34LL | | }
35   | |_- trait `Foo` defined here
36...
37LL |       <u64 as RefFoo<u64>>::ref_foo(a)
38   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
39   |
40   = note: `Foo<'static, u64>` would have to be implemented for the type `&'0 u64`, for any lifetime `'0`...
41   = note: ...but `Foo<'_, u64>` is actually implemented for the type `&'1 u64`, for some specific lifetime `'1`
42
43error: implementation of `Foo` is not general enough
44  --> $DIR/issue-54302-cases.rs:81:5
45   |
46LL | / trait Foo<'x, T> {
47LL | |     fn foo(self) -> &'x T;
48LL | | }
49   | |_- trait `Foo` defined here
50...
51LL |       <i64 as RefFoo<i64>>::ref_foo(a)
52   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
53   |
54   = note: `Foo<'static, i64>` would have to be implemented for the type `&'0 i64`, for any lifetime `'0`...
55   = note: ...but `Foo<'_, i64>` is actually implemented for the type `&'1 i64`, for some specific lifetime `'1`
56
57error: aborting due to 4 previous errors
58