]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/issue-24805-dropck-trait-has-items.stderr
Rollup merge of #87922 - Manishearth:c-enum-target-spec, r=nagisa,eddyb
[rust.git] / src / test / ui / span / issue-24805-dropck-trait-has-items.stderr
1 error[E0597]: `d1` does not live long enough
2   --> $DIR/issue-24805-dropck-trait-has-items.rs:37:26
3    |
4 LL |     _d = D_HasSelfMethod(&d1);
5    |                          ^^^ borrowed value does not live long enough
6 LL | }
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
14 error[E0597]: `d1` does not live long enough
15   --> $DIR/issue-24805-dropck-trait-has-items.rs:43:33
16    |
17 LL |     _d = D_HasMethodWithSelfArg(&d1);
18    |                                 ^^^ borrowed value does not live long enough
19 LL | }
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
27 error[E0597]: `d1` does not live long enough
28   --> $DIR/issue-24805-dropck-trait-has-items.rs:49:20
29    |
30 LL |     _d = D_HasType(&d1);
31    |                    ^^^ borrowed value does not live long enough
32 LL | }
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
40 error: aborting due to 3 previous errors
41
42 For more information about this error, try `rustc --explain E0597`.