fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
1.0 KiB30 linesraw
1error[E0597]: `bomb` does not live long enough
2  --> $DIR/dropck_misc_variants.rs:23:36
3   |
4LL |     _w = Wrap::<&[&str]>(NoisyDrop(&bomb));
5   |                                    ^^^^^ borrowed value does not live long enough
6LL | }
7   | -
8   | |
9   | `bomb` dropped here while still borrowed
10   | borrow might be used here, when `_w` is dropped and runs the destructor for type `Wrap<&[&str]>`
11   |
12   = note: values in a scope are dropped in the opposite order they are defined
13
14error[E0597]: `v` does not live long enough
15  --> $DIR/dropck_misc_variants.rs:31:27
16   |
17LL |         let u = NoisyDrop(&v);
18   |                           ^^ borrowed value does not live long enough
19...
20LL | }
21   | -
22   | |
23   | `v` dropped here while still borrowed
24   | borrow might be used here, when `_w` is dropped and runs the destructor for closure
25   |
26   = note: values in a scope are dropped in the opposite order they are defined
27
28error: aborting due to 2 previous errors
29
30For more information about this error, try `rustc --explain E0597`.