fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.0 KiB26 linesraw
1error[E0597]: `local` does not live long enough
2  --> $DIR/local-outlives-static-via-hrtb.rs:24:28
3   |
4LL |     assert_static_via_hrtb(&local);
5   |     -----------------------^^^^^^-
6   |     |                      |
7   |     |                      borrowed value does not live long enough
8   |     argument requires that `local` is borrowed for `'static`
9LL |     assert_static_via_hrtb_with_assoc_type(&&local);
10LL | }
11   | - `local` dropped here while still borrowed
12
13error[E0597]: `local` does not live long enough
14  --> $DIR/local-outlives-static-via-hrtb.rs:25:45
15   |
16LL |     assert_static_via_hrtb_with_assoc_type(&&local);
17   |     ----------------------------------------^^^^^^-
18   |     |                                       |
19   |     |                                       borrowed value does not live long enough
20   |     argument requires that `local` is borrowed for `'static`
21LL | }
22   | - `local` dropped here while still borrowed
23
24error: aborting due to 2 previous errors
25
26For more information about this error, try `rustc --explain E0597`.