fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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