]> git.lizzy.rs Git - rust.git/blob - tests/ui/span/vec-must-not-hide-type-from-dropck.stderr
Auto merge of #103659 - clubby789:improve-partialord-derive, r=nagisa
[rust.git] / tests / ui / span / vec-must-not-hide-type-from-dropck.stderr
1 error[E0597]: `c2` does not live long enough
2   --> $DIR/vec-must-not-hide-type-from-dropck.rs:117:24
3    |
4 LL |     let (mut c1, mut c2);
5    |                  ------ binding `c2` declared here
6 ...
7 LL |     c1.v[0].v.set(Some(&c2));
8    |                        ^^^ borrowed value does not live long enough
9 ...
10 LL | }
11    | -
12    | |
13    | `c2` dropped here while still borrowed
14    | borrow might be used here, when `c1` is dropped and runs the destructor for type `C<'_>`
15    |
16    = note: values in a scope are dropped in the opposite order they are defined
17
18 error[E0597]: `c1` does not live long enough
19   --> $DIR/vec-must-not-hide-type-from-dropck.rs:119:24
20    |
21 LL |     let (mut c1, mut c2);
22    |          ------ binding `c1` declared here
23 ...
24 LL |     c2.v[0].v.set(Some(&c1));
25    |                        ^^^ borrowed value does not live long enough
26 LL |
27 LL | }
28    | -
29    | |
30    | `c1` dropped here while still borrowed
31    | borrow might be used here, when `c1` is dropped and runs the destructor for type `C<'_>`
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0597`.