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