fork/rust

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

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
1.3 KiB41 linesraw
1error[E0308]: mismatched types
2  --> $DIR/regions-bounds.rs:9:12
3   |
4LL |     return e;
5   |            ^ lifetime mismatch
6   |
7   = note: expected struct `TupleStruct<'b>`
8              found struct `TupleStruct<'a>`
9note: the lifetime `'a` as defined on the function body at 8:10...
10  --> $DIR/regions-bounds.rs:8:10
11   |
12LL | fn a_fn1<'a,'b>(e: TupleStruct<'a>) -> TupleStruct<'b> {
13   |          ^^
14note: ...does not necessarily outlive the lifetime `'b` as defined on the function body at 8:13
15  --> $DIR/regions-bounds.rs:8:13
16   |
17LL | fn a_fn1<'a,'b>(e: TupleStruct<'a>) -> TupleStruct<'b> {
18   |             ^^
19
20error[E0308]: mismatched types
21  --> $DIR/regions-bounds.rs:13:12
22   |
23LL |     return e;
24   |            ^ lifetime mismatch
25   |
26   = note: expected struct `Struct<'b>`
27              found struct `Struct<'a>`
28note: the lifetime `'a` as defined on the function body at 12:10...
29  --> $DIR/regions-bounds.rs:12:10
30   |
31LL | fn a_fn3<'a,'b>(e: Struct<'a>) -> Struct<'b> {
32   |          ^^
33note: ...does not necessarily outlive the lifetime `'b` as defined on the function body at 12:13
34  --> $DIR/regions-bounds.rs:12:13
35   |
36LL | fn a_fn3<'a,'b>(e: Struct<'a>) -> Struct<'b> {
37   |             ^^
38
39error: aborting due to 2 previous errors
40
41For more information about this error, try `rustc --explain E0308`.