fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
1.5 KiB42 linesraw
1error[E0597]: `d1` does not live long enough
2  --> $DIR/issue-24805-dropck-trait-has-items.rs:37:26
3   |
4LL |     _d = D_HasSelfMethod(&d1);
5   |                          ^^^ borrowed value does not live long enough
6LL | }
7   | -
8   | |
9   | `d1` dropped here while still borrowed
10   | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_HasSelfMethod`
11   |
12   = note: values in a scope are dropped in the opposite order they are defined
13
14error[E0597]: `d1` does not live long enough
15  --> $DIR/issue-24805-dropck-trait-has-items.rs:43:33
16   |
17LL |     _d = D_HasMethodWithSelfArg(&d1);
18   |                                 ^^^ borrowed value does not live long enough
19LL | }
20   | -
21   | |
22   | `d1` dropped here while still borrowed
23   | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_HasMethodWithSelfArg`
24   |
25   = note: values in a scope are dropped in the opposite order they are defined
26
27error[E0597]: `d1` does not live long enough
28  --> $DIR/issue-24805-dropck-trait-has-items.rs:49:20
29   |
30LL |     _d = D_HasType(&d1);
31   |                    ^^^ borrowed value does not live long enough
32LL | }
33   | -
34   | |
35   | `d1` dropped here while still borrowed
36   | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_HasType`
37   |
38   = note: values in a scope are dropped in the opposite order they are defined
39
40error: aborting due to 3 previous errors
41
42For more information about this error, try `rustc --explain E0597`.