]> git.lizzy.rs Git - rust.git/blob - tests/ui/span/dropck_arr_cycle_checked.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / span / dropck_arr_cycle_checked.stderr
1 error[E0597]: `b2` does not live long enough
2   --> $DIR/dropck_arr_cycle_checked.rs:93:24
3    |
4 LL |     let (b1, b2, b3);
5    |              -- binding `b2` declared here
6 ...
7 LL |     b1.a[0].v.set(Some(&b2));
8    |                        ^^^ borrowed value does not live long enough
9 ...
10 LL | }
11    | -
12    | |
13    | `b2` dropped here while still borrowed
14    | borrow might be used here, when `b1` is dropped and runs the destructor for type `B<'_>`
15    |
16    = note: values in a scope are dropped in the opposite order they are defined
17
18 error[E0597]: `b3` does not live long enough
19   --> $DIR/dropck_arr_cycle_checked.rs:95:24
20    |
21 LL |     let (b1, b2, b3);
22    |                  -- binding `b3` declared here
23 ...
24 LL |     b1.a[1].v.set(Some(&b3));
25    |                        ^^^ borrowed value does not live long enough
26 ...
27 LL | }
28    | -
29    | |
30    | `b3` dropped here while still borrowed
31    | borrow might be used here, when `b1` is dropped and runs the destructor for type `B<'_>`
32    |
33    = note: values in a scope are dropped in the opposite order they are defined
34
35 error[E0597]: `b1` does not live long enough
36   --> $DIR/dropck_arr_cycle_checked.rs:99:24
37    |
38 LL |     let (b1, b2, b3);
39    |          -- binding `b1` declared here
40 ...
41 LL |     b3.a[0].v.set(Some(&b1));
42    |                        ^^^ borrowed value does not live long enough
43 ...
44 LL | }
45    | -
46    | |
47    | `b1` dropped here while still borrowed
48    | borrow might be used here, when `b1` is dropped and runs the destructor for type `B<'_>`
49
50 error: aborting due to 3 previous errors
51
52 For more information about this error, try `rustc --explain E0597`.