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