fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
1.7 KiB46 linesraw
1error: lifetime may not live long enough
2  --> $DIR/regions-outlives-projection-container.rs:36:13
3   |
4LL | fn with_assoc<'a,'b>() {
5   |               -- -- lifetime `'b` defined here
6   |               |
7   |               lifetime `'a` defined here
8...
9LL |     let _x: &'a WithAssoc<TheType<'b>> = loop { };
10   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a`
11
12error: lifetime may not live long enough
13  --> $DIR/regions-outlives-projection-container.rs:54:13
14   |
15LL | fn without_assoc<'a,'b>() {
16   |                  -- -- lifetime `'b` defined here
17   |                  |
18   |                  lifetime `'a` defined here
19...
20LL |     let _x: &'a WithoutAssoc<TheType<'b>> = loop { };
21   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a`
22
23error: lifetime may not live long enough
24  --> $DIR/regions-outlives-projection-container.rs:63:5
25   |
26LL | fn call_with_assoc<'a,'b>() {
27   |                    -- -- lifetime `'b` defined here
28   |                    |
29   |                    lifetime `'a` defined here
30...
31LL |     call::<&'a WithAssoc<TheType<'b>>>();
32   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'a`
33
34error: lifetime may not live long enough
35  --> $DIR/regions-outlives-projection-container.rs:70:5
36   |
37LL | fn call_without_assoc<'a,'b>() {
38   |                       -- -- lifetime `'b` defined here
39   |                       |
40   |                       lifetime `'a` defined here
41...
42LL |     call::<&'a WithoutAssoc<TheType<'b>>>();
43   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'a`
44
45error: aborting due to 4 previous errors
46