fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
2.9 KiB71 linesraw
1error[E0491]: in type `&'a WithAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
2  --> $DIR/regions-outlives-projection-container.rs:36:13
3   |
4LL |     let _x: &'a WithAssoc<TheType<'b>> = loop { };
5   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
6   |
7note: the pointer is valid for the lifetime `'a` as defined on the function body at 28:15
8  --> $DIR/regions-outlives-projection-container.rs:28:15
9   |
10LL | fn with_assoc<'a,'b>() {
11   |               ^^
12note: but the referenced data is only valid for the lifetime `'b` as defined on the function body at 28:18
13  --> $DIR/regions-outlives-projection-container.rs:28:18
14   |
15LL | fn with_assoc<'a,'b>() {
16   |                  ^^
17
18error[E0491]: in type `&'a WithoutAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
19  --> $DIR/regions-outlives-projection-container.rs:54:13
20   |
21LL |     let _x: &'a WithoutAssoc<TheType<'b>> = loop { };
22   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23   |
24note: the pointer is valid for the lifetime `'a` as defined on the function body at 50:18
25  --> $DIR/regions-outlives-projection-container.rs:50:18
26   |
27LL | fn without_assoc<'a,'b>() {
28   |                  ^^
29note: but the referenced data is only valid for the lifetime `'b` as defined on the function body at 50:21
30  --> $DIR/regions-outlives-projection-container.rs:50:21
31   |
32LL | fn without_assoc<'a,'b>() {
33   |                     ^^
34
35error[E0491]: in type `&'a WithAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
36  --> $DIR/regions-outlives-projection-container.rs:63:12
37   |
38LL |     call::<&'a WithAssoc<TheType<'b>>>();
39   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
40   |
41note: the pointer is valid for the lifetime `'a` as defined on the function body at 58:20
42  --> $DIR/regions-outlives-projection-container.rs:58:20
43   |
44LL | fn call_with_assoc<'a,'b>() {
45   |                    ^^
46note: but the referenced data is only valid for the lifetime `'b` as defined on the function body at 58:23
47  --> $DIR/regions-outlives-projection-container.rs:58:23
48   |
49LL | fn call_with_assoc<'a,'b>() {
50   |                       ^^
51
52error[E0491]: in type `&'a WithoutAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
53  --> $DIR/regions-outlives-projection-container.rs:70:12
54   |
55LL |     call::<&'a WithoutAssoc<TheType<'b>>>();
56   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57   |
58note: the pointer is valid for the lifetime `'a` as defined on the function body at 67:23
59  --> $DIR/regions-outlives-projection-container.rs:67:23
60   |
61LL | fn call_without_assoc<'a,'b>() {
62   |                       ^^
63note: but the referenced data is only valid for the lifetime `'b` as defined on the function body at 67:26
64  --> $DIR/regions-outlives-projection-container.rs:67:26
65   |
66LL | fn call_without_assoc<'a,'b>() {
67   |                          ^^
68
69error: aborting due to 4 previous errors
70
71For more information about this error, try `rustc --explain E0491`.