]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/destructure_patterns.stderr
Rollup merge of #107442 - lukas-code:slice-panics, r=cuviper
[rust.git] / tests / ui / closures / 2229_closure_analysis / destructure_patterns.stderr
1 error[E0658]: attributes on expressions are experimental
2   --> $DIR/destructure_patterns.rs:10:13
3    |
4 LL |     let 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/destructure_patterns.rs:38:13
12    |
13 LL |     let 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/destructure_patterns.rs:58: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/destructure_patterns.rs:13:5
30    |
31 LL | /     || {
32 LL | |
33 LL | |
34 LL | |         let [a, b, .., e] = arr;
35 ...  |
36 LL | |         assert_eq!(e, "E");
37 LL | |     };
38    | |_____^
39    |
40 note: Capturing arr[Index] -> ByValue
41   --> $DIR/destructure_patterns.rs:16:29
42    |
43 LL |         let [a, b, .., e] = arr;
44    |                             ^^^
45 note: Capturing arr[Index] -> ByValue
46   --> $DIR/destructure_patterns.rs:16:29
47    |
48 LL |         let [a, b, .., e] = arr;
49    |                             ^^^
50 note: Capturing arr[Index] -> ByValue
51   --> $DIR/destructure_patterns.rs:16:29
52    |
53 LL |         let [a, b, .., e] = arr;
54    |                             ^^^
55
56 error: Min Capture analysis includes:
57   --> $DIR/destructure_patterns.rs:13:5
58    |
59 LL | /     || {
60 LL | |
61 LL | |
62 LL | |         let [a, b, .., e] = arr;
63 ...  |
64 LL | |         assert_eq!(e, "E");
65 LL | |     };
66    | |_____^
67    |
68 note: Min Capture arr[] -> ByValue
69   --> $DIR/destructure_patterns.rs:16:29
70    |
71 LL |         let [a, b, .., e] = arr;
72    |                             ^^^
73
74 error: First Pass analysis includes:
75   --> $DIR/destructure_patterns.rs:41:5
76    |
77 LL | /     || {
78 LL | |
79 LL | |
80 LL | |         let Point { x: ref mut x, y: _, id: moved_id } = p;
81 ...  |
82 LL | |         println!("{}, {}", x, moved_id);
83 LL | |     };
84    | |_____^
85    |
86 note: Capturing p[(0, 0)] -> MutBorrow
87   --> $DIR/destructure_patterns.rs:44:58
88    |
89 LL |         let Point { x: ref mut x, y: _, id: moved_id } = p;
90    |                                                          ^
91 note: Capturing p[(2, 0)] -> ByValue
92   --> $DIR/destructure_patterns.rs:44:58
93    |
94 LL |         let Point { x: ref mut x, y: _, id: moved_id } = p;
95    |                                                          ^
96
97 error: Min Capture analysis includes:
98   --> $DIR/destructure_patterns.rs:41:5
99    |
100 LL | /     || {
101 LL | |
102 LL | |
103 LL | |         let Point { x: ref mut x, y: _, id: moved_id } = p;
104 ...  |
105 LL | |         println!("{}, {}", x, moved_id);
106 LL | |     };
107    | |_____^
108    |
109 note: Min Capture p[(0, 0)] -> MutBorrow
110   --> $DIR/destructure_patterns.rs:44:58
111    |
112 LL |         let Point { x: ref mut x, y: _, id: moved_id } = p;
113    |                                                          ^
114 note: Min Capture p[(2, 0)] -> ByValue
115   --> $DIR/destructure_patterns.rs:44:58
116    |
117 LL |         let Point { x: ref mut x, y: _, id: moved_id } = p;
118    |                                                          ^
119
120 error: First Pass analysis includes:
121   --> $DIR/destructure_patterns.rs:61:5
122    |
123 LL | /     || {
124 LL | |
125 LL | |
126 LL | |         let (ref mut x, ref ref_str, (moved_s, _)) = t;
127 ...  |
128 LL | |         println!("{}, {} {}", x, ref_str, moved_s);
129 LL | |     };
130    | |_____^
131    |
132 note: Capturing t[(0, 0)] -> MutBorrow
133   --> $DIR/destructure_patterns.rs:64:54
134    |
135 LL |         let (ref mut x, ref ref_str, (moved_s, _)) = t;
136    |                                                      ^
137 note: Capturing t[(1, 0)] -> ImmBorrow
138   --> $DIR/destructure_patterns.rs:64:54
139    |
140 LL |         let (ref mut x, ref ref_str, (moved_s, _)) = t;
141    |                                                      ^
142 note: Capturing t[(2, 0),(0, 0)] -> ByValue
143   --> $DIR/destructure_patterns.rs:64:54
144    |
145 LL |         let (ref mut x, ref ref_str, (moved_s, _)) = t;
146    |                                                      ^
147
148 error: Min Capture analysis includes:
149   --> $DIR/destructure_patterns.rs:61:5
150    |
151 LL | /     || {
152 LL | |
153 LL | |
154 LL | |         let (ref mut x, ref ref_str, (moved_s, _)) = t;
155 ...  |
156 LL | |         println!("{}, {} {}", x, ref_str, moved_s);
157 LL | |     };
158    | |_____^
159    |
160 note: Min Capture t[(0, 0)] -> MutBorrow
161   --> $DIR/destructure_patterns.rs:64:54
162    |
163 LL |         let (ref mut x, ref ref_str, (moved_s, _)) = t;
164    |                                                      ^
165 note: Min Capture t[(1, 0)] -> ImmBorrow
166   --> $DIR/destructure_patterns.rs:64:54
167    |
168 LL |         let (ref mut x, ref ref_str, (moved_s, _)) = t;
169    |                                                      ^
170 note: Min Capture t[(2, 0),(0, 0)] -> ByValue
171   --> $DIR/destructure_patterns.rs:64:54
172    |
173 LL |         let (ref mut x, ref ref_str, (moved_s, _)) = t;
174    |                                                      ^
175
176 error: aborting due to 9 previous errors
177
178 For more information about this error, try `rustc --explain E0658`.