]> git.lizzy.rs Git - rust.git/blob - tests/ui/span/issue-24805-dropck-trait-has-items.stderr
Auto merge of #106925 - imWildCat:imWildCat/remove-hardcoded-ios-macbi-target-version...
[rust.git] / tests / 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 |     let (_d, d1);
5    |              -- binding `d1` declared here
6 LL |     d1 = D_HasSelfMethod(1);
7 LL |     _d = D_HasSelfMethod(&d1);
8    |                          ^^^ borrowed value does not live long enough
9 LL | }
10    | -
11    | |
12    | `d1` dropped here while still borrowed
13    | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_HasSelfMethod`
14    |
15    = note: values in a scope are dropped in the opposite order they are defined
16
17 error[E0597]: `d1` does not live long enough
18   --> $DIR/issue-24805-dropck-trait-has-items.rs:43:33
19    |
20 LL |     let (_d, d1);
21    |              -- binding `d1` declared here
22 LL |     d1 = D_HasMethodWithSelfArg(1);
23 LL |     _d = D_HasMethodWithSelfArg(&d1);
24    |                                 ^^^ borrowed value does not live long enough
25 LL | }
26    | -
27    | |
28    | `d1` dropped here while still borrowed
29    | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_HasMethodWithSelfArg`
30    |
31    = note: values in a scope are dropped in the opposite order they are defined
32
33 error[E0597]: `d1` does not live long enough
34   --> $DIR/issue-24805-dropck-trait-has-items.rs:49:20
35    |
36 LL |     let (_d, d1);
37    |              -- binding `d1` declared here
38 LL |     d1 = D_HasType(1);
39 LL |     _d = D_HasType(&d1);
40    |                    ^^^ borrowed value does not live long enough
41 LL | }
42    | -
43    | |
44    | `d1` dropped here while still borrowed
45    | borrow might be used here, when `_d` is dropped and runs the `Drop` code for type `D_HasType`
46    |
47    = note: values in a scope are dropped in the opposite order they are defined
48
49 error: aborting due to 3 previous errors
50
51 For more information about this error, try `rustc --explain E0597`.