os-rust/tests/ui/span/issue-24895-copy-clone-dropck.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
652 B
Text
Raw Normal View History

2017-05-27 19:58:52 +02:00
error[E0597]: `d1` does not live long enough
--> $DIR/issue-24895-copy-clone-dropck.rs:27:14
|
2023-01-15 03:06:44 +00:00
LL | let (d2, d1);
| -- binding `d1` declared here
LL | d1 = D(34, "d1");
2018-02-23 03:42:32 +03:00
LL | d2 = D(S(&d1, "inner"), "d2");
| ^^^ borrowed value does not live long enough
2018-02-23 03:42:32 +03:00
LL | }
| -
| |
| `d1` dropped here while still borrowed
| borrow might be used here, when `d2` is dropped and runs the `Drop` code for type `D`
|
= note: values in a scope are dropped in the opposite order they are defined
error: aborting due to 1 previous error
2018-03-03 15:59:40 +01:00
For more information about this error, try `rustc --explain E0597`.