]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/2229_closure_analysis/migrations/precise.stderr
Add additional migrations to handle auto-traits and clone traits
[rust.git] / src / test / ui / closures / 2229_closure_analysis / migrations / precise.stderr
1 error: drop order affected for closure because of `capture_disjoint_fields`
2   --> $DIR/precise.rs:19:13
3    |
4 LL |       let c = || {
5    |  _____________^
6 LL | |
7 LL | |
8 LL | |         let _t = t.0;
9 LL | |         let _t = &t.1;
10 LL | |     };
11    | |_____^
12    |
13 note: the lint level is defined here
14   --> $DIR/precise.rs:3:9
15    |
16 LL | #![deny(disjoint_capture_migration)]
17    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
18 help: add a dummy let to cause `t` to be fully captured
19    |
20 LL |     let c = || { let _ = &t; 
21 LL |
22 LL |
23 LL |         let _t = t.0;
24 LL |         let _t = &t.1;
25 LL |     };
26    |
27
28 error: drop order affected for closure because of `capture_disjoint_fields`
29   --> $DIR/precise.rs:42:13
30    |
31 LL |       let c = || {
32    |  _____________^
33 LL | |
34 LL | |
35 LL | |         let _x = u.0.0;
36 LL | |         let _x = u.0.1;
37 LL | |         let _x = u.1.0;
38 LL | |     };
39    | |_____^
40    |
41 help: add a dummy let to cause `u` to be fully captured
42    |
43 LL |     let c = || { let _ = &u; 
44 LL |
45 LL |
46 LL |         let _x = u.0.0;
47 LL |         let _x = u.0.1;
48 LL |         let _x = u.1.0;
49  ...
50
51 error: aborting due to 2 previous errors
52