fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.6 KiB37 linesraw
1error[E0491]: in type `&'a WithHrAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
2  --> $DIR/regions-outlives-projection-container-hrtb.rs:30:12
3   |
4LL |     let _: &'a WithHrAssoc<TheType<'b>> = loop { };
5   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6   |
7note: the pointer is valid for the lifetime `'a` as defined on the function body at 27:15
8  --> $DIR/regions-outlives-projection-container-hrtb.rs:27: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 27:18
13  --> $DIR/regions-outlives-projection-container-hrtb.rs:27:18
14   |
15LL | fn with_assoc<'a,'b>() {
16   |                  ^^
17
18error[E0491]: in type `&'a WithHrAssocSub<TheType<'b>>`, reference has a longer lifetime than the data it references
19  --> $DIR/regions-outlives-projection-container-hrtb.rs:50:12
20   |
21LL |     let _: &'a WithHrAssocSub<TheType<'b>> = loop { };
22   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23   |
24note: the pointer is valid for the lifetime `'a` as defined on the function body at 46:19
25  --> $DIR/regions-outlives-projection-container-hrtb.rs:46:19
26   |
27LL | fn with_assoc_sub<'a,'b>() {
28   |                   ^^
29note: but the referenced data is only valid for the lifetime `'b` as defined on the function body at 46:22
30  --> $DIR/regions-outlives-projection-container-hrtb.rs:46:22
31   |
32LL | fn with_assoc_sub<'a,'b>() {
33   |                      ^^
34
35error: aborting due to 2 previous errors
36
37For more information about this error, try `rustc --explain E0491`.