]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/repr_packed.stderr
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / tests / ui / closures / 2229_closure_analysis / repr_packed.stderr
1 error[E0658]: attributes on expressions are experimental
2   --> $DIR/repr_packed.rs:13:17
3    |
4 LL |     let mut c = #[rustc_capture_analysis]
5    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
8    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
9
10 error[E0658]: attributes on expressions are experimental
11   --> $DIR/repr_packed.rs:44:17
12    |
13 LL |     let mut c = #[rustc_capture_analysis]
14    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
15    |
16    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
17    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
18
19 error[E0658]: attributes on expressions are experimental
20   --> $DIR/repr_packed.rs:79:13
21    |
22 LL |     let c = #[rustc_capture_analysis]
23    |             ^^^^^^^^^^^^^^^^^^^^^^^^^
24    |
25    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
26    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
27
28 error: First Pass analysis includes:
29   --> $DIR/repr_packed.rs:16:5
30    |
31 LL | /     || {
32 LL | |
33 LL | |
34 LL | |         let z1: &u8 = &foo.x;
35 ...  |
36 LL | |         println!("({}, {})", z1, z2);
37 LL | |     };
38    | |_____^
39    |
40 note: Capturing foo[(0, 0)] -> ImmBorrow
41   --> $DIR/repr_packed.rs:19:24
42    |
43 LL |         let z1: &u8 = &foo.x;
44    |                        ^^^^^
45 note: Capturing foo[(1, 0)] -> MutBorrow
46   --> $DIR/repr_packed.rs:22:32
47    |
48 LL |         let z2: &mut u8 = &mut foo.y;
49    |                                ^^^^^
50
51 error: Min Capture analysis includes:
52   --> $DIR/repr_packed.rs:16:5
53    |
54 LL | /     || {
55 LL | |
56 LL | |
57 LL | |         let z1: &u8 = &foo.x;
58 ...  |
59 LL | |         println!("({}, {})", z1, z2);
60 LL | |     };
61    | |_____^
62    |
63 note: Min Capture foo[(0, 0)] -> ImmBorrow
64   --> $DIR/repr_packed.rs:19:24
65    |
66 LL |         let z1: &u8 = &foo.x;
67    |                        ^^^^^
68 note: Min Capture foo[(1, 0)] -> MutBorrow
69   --> $DIR/repr_packed.rs:22:32
70    |
71 LL |         let z2: &mut u8 = &mut foo.y;
72    |                                ^^^^^
73
74 error: First Pass analysis includes:
75   --> $DIR/repr_packed.rs:47:5
76    |
77 LL | /     || {
78 LL | |
79 LL | |
80 LL | |         let z1: &String = &foo.x;
81 ...  |
82 LL | |         println!("({}, {})", z1, z2);
83 LL | |     };
84    | |_____^
85    |
86 note: Capturing foo[] -> ImmBorrow
87   --> $DIR/repr_packed.rs:50:28
88    |
89 LL |         let z1: &String = &foo.x;
90    |                            ^^^^^
91 note: Capturing foo[] -> MutBorrow
92   --> $DIR/repr_packed.rs:52:33
93    |
94 LL |         let z2: &mut u16 = &mut foo.y;
95    |                                 ^^^^^
96
97 error: Min Capture analysis includes:
98   --> $DIR/repr_packed.rs:47:5
99    |
100 LL | /     || {
101 LL | |
102 LL | |
103 LL | |         let z1: &String = &foo.x;
104 ...  |
105 LL | |         println!("({}, {})", z1, z2);
106 LL | |     };
107    | |_____^
108    |
109 note: Min Capture foo[] -> MutBorrow
110   --> $DIR/repr_packed.rs:52:33
111    |
112 LL |         let z2: &mut u16 = &mut foo.y;
113    |                                 ^^^^^
114
115 error: First Pass analysis includes:
116   --> $DIR/repr_packed.rs:82:5
117    |
118 LL | /     || {
119 LL | |
120 LL | |
121 LL | |         println!("{}", foo.x);
122 ...  |
123 LL | |
124 LL | |     };
125    | |_____^
126    |
127 note: Capturing foo[] -> ImmBorrow
128   --> $DIR/repr_packed.rs:85:24
129    |
130 LL |         println!("{}", foo.x);
131    |                        ^^^^^
132 note: Capturing foo[(0, 0)] -> ByValue
133   --> $DIR/repr_packed.rs:89:18
134    |
135 LL |         let _z = foo.x;
136    |                  ^^^^^
137
138 error: Min Capture analysis includes:
139   --> $DIR/repr_packed.rs:82:5
140    |
141 LL | /     || {
142 LL | |
143 LL | |
144 LL | |         println!("{}", foo.x);
145 ...  |
146 LL | |
147 LL | |     };
148    | |_____^
149    |
150 note: Min Capture foo[] -> ByValue
151   --> $DIR/repr_packed.rs:85:24
152    |
153 LL |         println!("{}", foo.x);
154    |                        ^^^^^ foo[] used here
155 ...
156 LL |         let _z = foo.x;
157    |                  ^^^^^ foo[] captured as ByValue here
158
159 error: aborting due to 9 previous errors
160
161 For more information about this error, try `rustc --explain E0658`.