diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-23 23:59:22 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-23 23:59:22 +0100 |
commit | 471d44e72c54882cff2e00c662ee74d8c7c94234 (patch) | |
tree | 841871b66bc008a18a5a1053f5a33415c3a54ad9 /crates/ra_hir_ty/src/tests/patterns.rs | |
parent | 44cf263edf1c7e3b189ef5f1cfdf207dd28a0054 (diff) | |
parent | d016cb486738c1ab2574a322924183fa8a870b06 (diff) |
Merge #5014
5014: Use only one code-path for parsing fixtures r=matklad a=matklad
This removes leading newlines everywhere, shifting all ranges in tests
by one
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty/src/tests/patterns.rs')
-rw-r--r-- | crates/ra_hir_ty/src/tests/patterns.rs | 570 |
1 files changed, 285 insertions, 285 deletions
diff --git a/crates/ra_hir_ty/src/tests/patterns.rs b/crates/ra_hir_ty/src/tests/patterns.rs index fe62587c0..8fa296137 100644 --- a/crates/ra_hir_ty/src/tests/patterns.rs +++ b/crates/ra_hir_ty/src/tests/patterns.rs | |||
@@ -30,54 +30,54 @@ fn test(x: &i32) { | |||
30 | } | 30 | } |
31 | "#), | 31 | "#), |
32 | @r###" | 32 | @r###" |
33 | 9..10 'x': &i32 | 33 | 8..9 'x': &i32 |
34 | 18..369 '{ ...o_x; }': () | 34 | 17..368 '{ ...o_x; }': () |
35 | 28..29 'y': &i32 | 35 | 27..28 'y': &i32 |
36 | 32..33 'x': &i32 | 36 | 31..32 'x': &i32 |
37 | 43..45 '&z': &i32 | 37 | 42..44 '&z': &i32 |
38 | 44..45 'z': i32 | 38 | 43..44 'z': i32 |
39 | 48..49 'x': &i32 | 39 | 47..48 'x': &i32 |
40 | 59..60 'a': i32 | 40 | 58..59 'a': i32 |
41 | 63..64 'z': i32 | 41 | 62..63 'z': i32 |
42 | 74..80 '(c, d)': (i32, &str) | 42 | 73..79 '(c, d)': (i32, &str) |
43 | 75..76 'c': i32 | 43 | 74..75 'c': i32 |
44 | 78..79 'd': &str | 44 | 77..78 'd': &str |
45 | 83..95 '(1, "hello")': (i32, &str) | 45 | 82..94 '(1, "hello")': (i32, &str) |
46 | 84..85 '1': i32 | 46 | 83..84 '1': i32 |
47 | 87..94 '"hello"': &str | 47 | 86..93 '"hello"': &str |
48 | 102..152 'for (e... }': () | 48 | 101..151 'for (e... }': () |
49 | 106..112 '(e, f)': ({unknown}, {unknown}) | 49 | 105..111 '(e, f)': ({unknown}, {unknown}) |
50 | 107..108 'e': {unknown} | 50 | 106..107 'e': {unknown} |
51 | 110..111 'f': {unknown} | 51 | 109..110 'f': {unknown} |
52 | 116..125 'some_iter': {unknown} | 52 | 115..124 'some_iter': {unknown} |
53 | 126..152 '{ ... }': () | 53 | 125..151 '{ ... }': () |
54 | 140..141 'g': {unknown} | 54 | 139..140 'g': {unknown} |
55 | 144..145 'e': {unknown} | 55 | 143..144 'e': {unknown} |
56 | 158..205 'if let... }': () | 56 | 157..204 'if let... }': () |
57 | 165..170 '[val]': [{unknown}] | 57 | 164..169 '[val]': [{unknown}] |
58 | 166..169 'val': {unknown} | 58 | 165..168 'val': {unknown} |
59 | 173..176 'opt': [{unknown}] | 59 | 172..175 'opt': [{unknown}] |
60 | 177..205 '{ ... }': () | 60 | 176..204 '{ ... }': () |
61 | 191..192 'h': {unknown} | 61 | 190..191 'h': {unknown} |
62 | 195..198 'val': {unknown} | 62 | 194..197 'val': {unknown} |
63 | 215..221 'lambda': |u64, u64, i32| -> i32 | 63 | 214..220 'lambda': |u64, u64, i32| -> i32 |
64 | 224..256 '|a: u6...b; c }': |u64, u64, i32| -> i32 | 64 | 223..255 '|a: u6...b; c }': |u64, u64, i32| -> i32 |
65 | 225..226 'a': u64 | 65 | 224..225 'a': u64 |
66 | 233..234 'b': u64 | 66 | 232..233 'b': u64 |
67 | 236..237 'c': i32 | 67 | 235..236 'c': i32 |
68 | 244..256 '{ a + b; c }': i32 | 68 | 243..255 '{ a + b; c }': i32 |
69 | 246..247 'a': u64 | 69 | 245..246 'a': u64 |
70 | 246..251 'a + b': u64 | 70 | 245..250 'a + b': u64 |
71 | 250..251 'b': u64 | 71 | 249..250 'b': u64 |
72 | 253..254 'c': i32 | 72 | 252..253 'c': i32 |
73 | 267..279 'ref ref_to_x': &&i32 | 73 | 266..278 'ref ref_to_x': &&i32 |
74 | 282..283 'x': &i32 | 74 | 281..282 'x': &i32 |
75 | 293..302 'mut mut_x': &i32 | 75 | 292..301 'mut mut_x': &i32 |
76 | 305..306 'x': &i32 | 76 | 304..305 'x': &i32 |
77 | 316..336 'ref mu...f_to_x': &mut &i32 | 77 | 315..335 'ref mu...f_to_x': &mut &i32 |
78 | 339..340 'x': &i32 | 78 | 338..339 'x': &i32 |
79 | 350..351 'k': &mut &i32 | 79 | 349..350 'k': &mut &i32 |
80 | 354..366 'mut_ref_to_x': &mut &i32 | 80 | 353..365 'mut_ref_to_x': &mut &i32 |
81 | "### | 81 | "### |
82 | ); | 82 | ); |
83 | } | 83 | } |
@@ -97,47 +97,47 @@ fn test(x: &i32) { | |||
97 | } | 97 | } |
98 | "#, true), | 98 | "#, true), |
99 | @r###" | 99 | @r###" |
100 | 18..29 '{ loop {} }': T | 100 | 17..28 '{ loop {} }': T |
101 | 20..27 'loop {}': ! | 101 | 19..26 'loop {}': ! |
102 | 25..27 '{}': () | 102 | 24..26 '{}': () |
103 | 38..39 'x': &i32 | 103 | 37..38 'x': &i32 |
104 | 47..209 '{ ...) {} }': () | 104 | 46..208 '{ ...) {} }': () |
105 | 53..76 'if let...y() {}': () | 105 | 52..75 'if let...y() {}': () |
106 | 60..65 '"foo"': &str | 106 | 59..64 '"foo"': &str |
107 | 60..65 '"foo"': &str | 107 | 59..64 '"foo"': &str |
108 | 68..71 'any': fn any<&str>() -> &str | 108 | 67..70 'any': fn any<&str>() -> &str |
109 | 68..73 'any()': &str | 109 | 67..72 'any()': &str |
110 | 74..76 '{}': () | 110 | 73..75 '{}': () |
111 | 81..100 'if let...y() {}': () | 111 | 80..99 'if let...y() {}': () |
112 | 88..89 '1': i32 | 112 | 87..88 '1': i32 |
113 | 88..89 '1': i32 | 113 | 87..88 '1': i32 |
114 | 92..95 'any': fn any<i32>() -> i32 | 114 | 91..94 'any': fn any<i32>() -> i32 |
115 | 92..97 'any()': i32 | 115 | 91..96 'any()': i32 |
116 | 98..100 '{}': () | 116 | 97..99 '{}': () |
117 | 105..127 'if let...y() {}': () | 117 | 104..126 'if let...y() {}': () |
118 | 112..116 '1u32': u32 | 118 | 111..115 '1u32': u32 |
119 | 112..116 '1u32': u32 | 119 | 111..115 '1u32': u32 |
120 | 119..122 'any': fn any<u32>() -> u32 | 120 | 118..121 'any': fn any<u32>() -> u32 |
121 | 119..124 'any()': u32 | 121 | 118..123 'any()': u32 |
122 | 125..127 '{}': () | 122 | 124..126 '{}': () |
123 | 132..154 'if let...y() {}': () | 123 | 131..153 'if let...y() {}': () |
124 | 139..143 '1f32': f32 | 124 | 138..142 '1f32': f32 |
125 | 139..143 '1f32': f32 | 125 | 138..142 '1f32': f32 |
126 | 146..149 'any': fn any<f32>() -> f32 | 126 | 145..148 'any': fn any<f32>() -> f32 |
127 | 146..151 'any()': f32 | 127 | 145..150 'any()': f32 |
128 | 152..154 '{}': () | 128 | 151..153 '{}': () |
129 | 159..180 'if let...y() {}': () | 129 | 158..179 'if let...y() {}': () |
130 | 166..169 '1.0': f64 | 130 | 165..168 '1.0': f64 |
131 | 166..169 '1.0': f64 | 131 | 165..168 '1.0': f64 |
132 | 172..175 'any': fn any<f64>() -> f64 | 132 | 171..174 'any': fn any<f64>() -> f64 |
133 | 172..177 'any()': f64 | 133 | 171..176 'any()': f64 |
134 | 178..180 '{}': () | 134 | 177..179 '{}': () |
135 | 185..207 'if let...y() {}': () | 135 | 184..206 'if let...y() {}': () |
136 | 192..196 'true': bool | 136 | 191..195 'true': bool |
137 | 192..196 'true': bool | 137 | 191..195 'true': bool |
138 | 199..202 'any': fn any<bool>() -> bool | 138 | 198..201 'any': fn any<bool>() -> bool |
139 | 199..204 'any()': bool | 139 | 198..203 'any()': bool |
140 | 205..207 '{}': () | 140 | 204..206 '{}': () |
141 | "### | 141 | "### |
142 | ); | 142 | ); |
143 | } | 143 | } |
@@ -152,16 +152,16 @@ fn test(x: &i32) { | |||
152 | } | 152 | } |
153 | "#, true), | 153 | "#, true), |
154 | @r###" | 154 | @r###" |
155 | 9..10 'x': &i32 | 155 | 8..9 'x': &i32 |
156 | 18..76 '{ ...2 {} }': () | 156 | 17..75 '{ ...2 {} }': () |
157 | 24..46 'if let...u32 {}': () | 157 | 23..45 'if let...u32 {}': () |
158 | 31..36 '1..76': u32 | 158 | 30..35 '1..76': u32 |
159 | 39..43 '2u32': u32 | 159 | 38..42 '2u32': u32 |
160 | 44..46 '{}': () | 160 | 43..45 '{}': () |
161 | 51..74 'if let...u32 {}': () | 161 | 50..73 'if let...u32 {}': () |
162 | 58..64 '1..=76': u32 | 162 | 57..63 '1..=76': u32 |
163 | 67..71 '2u32': u32 | 163 | 66..70 '2u32': u32 |
164 | 72..74 '{}': () | 164 | 71..73 '{}': () |
165 | "### | 165 | "### |
166 | ); | 166 | ); |
167 | } | 167 | } |
@@ -178,19 +178,19 @@ fn test() { | |||
178 | } | 178 | } |
179 | "#), | 179 | "#), |
180 | @r###" | 180 | @r###" |
181 | 28..79 '{ ...(1); }': () | 181 | 27..78 '{ ...(1); }': () |
182 | 38..42 'A(n)': A<i32> | 182 | 37..41 'A(n)': A<i32> |
183 | 40..41 'n': &i32 | 183 | 39..40 'n': &i32 |
184 | 45..50 '&A(1)': &A<i32> | 184 | 44..49 '&A(1)': &A<i32> |
185 | 46..47 'A': A<i32>(i32) -> A<i32> | 185 | 45..46 'A': A<i32>(i32) -> A<i32> |
186 | 46..50 'A(1)': A<i32> | 186 | 45..49 'A(1)': A<i32> |
187 | 48..49 '1': i32 | 187 | 47..48 '1': i32 |
188 | 60..64 'A(n)': A<i32> | 188 | 59..63 'A(n)': A<i32> |
189 | 62..63 'n': &mut i32 | 189 | 61..62 'n': &mut i32 |
190 | 67..76 '&mut A(1)': &mut A<i32> | 190 | 66..75 '&mut A(1)': &mut A<i32> |
191 | 72..73 'A': A<i32>(i32) -> A<i32> | 191 | 71..72 'A': A<i32>(i32) -> A<i32> |
192 | 72..76 'A(1)': A<i32> | 192 | 71..75 'A(1)': A<i32> |
193 | 74..75 '1': i32 | 193 | 73..74 '1': i32 |
194 | "### | 194 | "### |
195 | ); | 195 | ); |
196 | } | 196 | } |
@@ -206,18 +206,18 @@ fn test() { | |||
206 | } | 206 | } |
207 | "#), | 207 | "#), |
208 | @r###" | 208 | @r###" |
209 | 11..57 '{ ...= v; }': () | 209 | 10..56 '{ ...= v; }': () |
210 | 21..22 'v': &(i32, &i32) | 210 | 20..21 'v': &(i32, &i32) |
211 | 25..33 '&(1, &2)': &(i32, &i32) | 211 | 24..32 '&(1, &2)': &(i32, &i32) |
212 | 26..33 '(1, &2)': (i32, &i32) | 212 | 25..32 '(1, &2)': (i32, &i32) |
213 | 27..28 '1': i32 | 213 | 26..27 '1': i32 |
214 | 30..32 '&2': &i32 | 214 | 29..31 '&2': &i32 |
215 | 31..32 '2': i32 | 215 | 30..31 '2': i32 |
216 | 43..50 '(_, &w)': (i32, &i32) | 216 | 42..49 '(_, &w)': (i32, &i32) |
217 | 44..45 '_': i32 | 217 | 43..44 '_': i32 |
218 | 47..49 '&w': &i32 | 218 | 46..48 '&w': &i32 |
219 | 48..49 'w': i32 | 219 | 47..48 'w': i32 |
220 | 53..54 'v': &(i32, &i32) | 220 | 52..53 'v': &(i32, &i32) |
221 | "### | 221 | "### |
222 | ); | 222 | ); |
223 | } | 223 | } |
@@ -242,30 +242,30 @@ fn test() { | |||
242 | } | 242 | } |
243 | "#), | 243 | "#), |
244 | @r###" | 244 | @r###" |
245 | 11..210 '{ ... } }': () | 245 | 10..209 '{ ... } }': () |
246 | 21..26 'slice': &[f64] | 246 | 20..25 'slice': &[f64] |
247 | 37..43 '&[0.0]': &[f64; _] | 247 | 36..42 '&[0.0]': &[f64; _] |
248 | 38..43 '[0.0]': [f64; _] | 248 | 37..42 '[0.0]': [f64; _] |
249 | 39..42 '0.0': f64 | 249 | 38..41 '0.0': f64 |
250 | 49..208 'match ... }': () | 250 | 48..207 'match ... }': () |
251 | 55..60 'slice': &[f64] | 251 | 54..59 'slice': &[f64] |
252 | 71..74 '&[]': &[f64] | 252 | 70..73 '&[]': &[f64] |
253 | 72..74 '[]': [f64] | 253 | 71..73 '[]': [f64] |
254 | 78..80 '{}': () | 254 | 77..79 '{}': () |
255 | 90..94 '&[a]': &[f64] | 255 | 89..93 '&[a]': &[f64] |
256 | 91..94 '[a]': [f64] | 256 | 90..93 '[a]': [f64] |
257 | 92..93 'a': f64 | 257 | 91..92 'a': f64 |
258 | 98..124 '{ ... }': () | 258 | 97..123 '{ ... }': () |
259 | 112..113 'a': f64 | 259 | 111..112 'a': f64 |
260 | 134..141 '&[b, c]': &[f64] | 260 | 133..140 '&[b, c]': &[f64] |
261 | 135..141 '[b, c]': [f64] | 261 | 134..140 '[b, c]': [f64] |
262 | 136..137 'b': f64 | 262 | 135..136 'b': f64 |
263 | 139..140 'c': f64 | 263 | 138..139 'c': f64 |
264 | 145..186 '{ ... }': () | 264 | 144..185 '{ ... }': () |
265 | 159..160 'b': f64 | 265 | 158..159 'b': f64 |
266 | 174..175 'c': f64 | 266 | 173..174 'c': f64 |
267 | 195..196 '_': &[f64] | 267 | 194..195 '_': &[f64] |
268 | 200..202 '{}': () | 268 | 199..201 '{}': () |
269 | "### | 269 | "### |
270 | ); | 270 | ); |
271 | } | 271 | } |
@@ -288,25 +288,25 @@ fn test() { | |||
288 | } | 288 | } |
289 | "#), | 289 | "#), |
290 | @r###" | 290 | @r###" |
291 | 11..180 '{ ... } }': () | 291 | 10..179 '{ ... } }': () |
292 | 21..24 'arr': [f64; _] | 292 | 20..23 'arr': [f64; _] |
293 | 37..47 '[0.0, 1.0]': [f64; _] | 293 | 36..46 '[0.0, 1.0]': [f64; _] |
294 | 38..41 '0.0': f64 | 294 | 37..40 '0.0': f64 |
295 | 43..46 '1.0': f64 | 295 | 42..45 '1.0': f64 |
296 | 53..178 'match ... }': () | 296 | 52..177 'match ... }': () |
297 | 59..62 'arr': [f64; _] | 297 | 58..61 'arr': [f64; _] |
298 | 73..81 '[1.0, a]': [f64; _] | 298 | 72..80 '[1.0, a]': [f64; _] |
299 | 74..77 '1.0': f64 | 299 | 73..76 '1.0': f64 |
300 | 74..77 '1.0': f64 | 300 | 73..76 '1.0': f64 |
301 | 79..80 'a': f64 | 301 | 78..79 'a': f64 |
302 | 85..111 '{ ... }': () | 302 | 84..110 '{ ... }': () |
303 | 99..100 'a': f64 | 303 | 98..99 'a': f64 |
304 | 121..127 '[b, c]': [f64; _] | 304 | 120..126 '[b, c]': [f64; _] |
305 | 122..123 'b': f64 | 305 | 121..122 'b': f64 |
306 | 125..126 'c': f64 | 306 | 124..125 'c': f64 |
307 | 131..172 '{ ... }': () | 307 | 130..171 '{ ... }': () |
308 | 145..146 'b': f64 | 308 | 144..145 'b': f64 |
309 | 160..161 'c': f64 | 309 | 159..160 'c': f64 |
310 | "### | 310 | "### |
311 | ); | 311 | ); |
312 | } | 312 | } |
@@ -339,31 +339,31 @@ fn test() { | |||
339 | } | 339 | } |
340 | "#), | 340 | "#), |
341 | @r###" | 341 | @r###" |
342 | 68..289 '{ ... d; }': () | 342 | 67..288 '{ ... d; }': () |
343 | 78..79 'e': E | 343 | 77..78 'e': E |
344 | 82..95 'E::A { x: 3 }': E | 344 | 81..94 'E::A { x: 3 }': E |
345 | 92..93 '3': usize | 345 | 91..92 '3': usize |
346 | 106..113 'S(y, z)': S | 346 | 105..112 'S(y, z)': S |
347 | 108..109 'y': u32 | 347 | 107..108 'y': u32 |
348 | 111..112 'z': E | 348 | 110..111 'z': E |
349 | 116..119 'foo': S | 349 | 115..118 'foo': S |
350 | 129..148 'E::A {..._var }': E | 350 | 128..147 'E::A {..._var }': E |
351 | 139..146 'new_var': usize | 351 | 138..145 'new_var': usize |
352 | 151..152 'e': E | 352 | 150..151 'e': E |
353 | 159..245 'match ... }': usize | 353 | 158..244 'match ... }': usize |
354 | 165..166 'e': E | 354 | 164..165 'e': E |
355 | 177..187 'E::A { x }': E | 355 | 176..186 'E::A { x }': E |
356 | 184..185 'x': usize | 356 | 183..184 'x': usize |
357 | 191..192 'x': usize | 357 | 190..191 'x': usize |
358 | 202..206 'E::B': E | 358 | 201..205 'E::B': E |
359 | 210..213 'foo': bool | 359 | 209..212 'foo': bool |
360 | 217..218 '1': usize | 360 | 216..217 '1': usize |
361 | 228..232 'E::B': E | 361 | 227..231 'E::B': E |
362 | 236..238 '10': usize | 362 | 235..237 '10': usize |
363 | 256..275 'ref d ...{ .. }': &E | 363 | 255..274 'ref d ...{ .. }': &E |
364 | 264..275 'E::A { .. }': E | 364 | 263..274 'E::A { .. }': E |
365 | 278..279 'e': E | 365 | 277..278 'e': E |
366 | 285..286 'd': &E | 366 | 284..285 'd': &E |
367 | "### | 367 | "### |
368 | ); | 368 | ); |
369 | } | 369 | } |
@@ -389,20 +389,20 @@ impl E { | |||
389 | } | 389 | } |
390 | "#), | 390 | "#), |
391 | @r###" | 391 | @r###" |
392 | 76..218 '{ ... }': () | 392 | 75..217 '{ ... }': () |
393 | 86..211 'match ... }': () | 393 | 85..210 'match ... }': () |
394 | 93..100 'loop {}': ! | 394 | 92..99 'loop {}': ! |
395 | 98..100 '{}': () | 395 | 97..99 '{}': () |
396 | 116..129 'Self::A { x }': E | 396 | 115..128 'Self::A { x }': E |
397 | 126..127 'x': usize | 397 | 125..126 'x': usize |
398 | 133..139 '{ x; }': () | 398 | 132..138 '{ x; }': () |
399 | 135..136 'x': usize | 399 | 134..135 'x': usize |
400 | 153..163 'Self::B(x)': E | 400 | 152..162 'Self::B(x)': E |
401 | 161..162 'x': usize | 401 | 160..161 'x': usize |
402 | 167..173 '{ x; }': () | 402 | 166..172 '{ x; }': () |
403 | 169..170 'x': usize | 403 | 168..169 'x': usize |
404 | 187..194 'Self::C': E | 404 | 186..193 'Self::C': E |
405 | 198..200 '{}': () | 405 | 197..199 '{}': () |
406 | "### | 406 | "### |
407 | ); | 407 | ); |
408 | } | 408 | } |
@@ -430,23 +430,23 @@ fn test(a1: A<u32>, o: Option<u64>) { | |||
430 | } | 430 | } |
431 | "#), | 431 | "#), |
432 | @r###" | 432 | @r###" |
433 | 79..81 'a1': A<u32> | 433 | 78..80 'a1': A<u32> |
434 | 91..92 'o': Option<u64> | 434 | 90..91 'o': Option<u64> |
435 | 107..244 '{ ... }; }': () | 435 | 106..243 '{ ... }; }': () |
436 | 117..128 'A { x: x2 }': A<u32> | 436 | 116..127 'A { x: x2 }': A<u32> |
437 | 124..126 'x2': u32 | 437 | 123..125 'x2': u32 |
438 | 131..133 'a1': A<u32> | 438 | 130..132 'a1': A<u32> |
439 | 143..161 'A::<i6...: x3 }': A<i64> | 439 | 142..160 'A::<i6...: x3 }': A<i64> |
440 | 157..159 'x3': i64 | 440 | 156..158 'x3': i64 |
441 | 164..174 'A { x: 1 }': A<i64> | 441 | 163..173 'A { x: 1 }': A<i64> |
442 | 171..172 '1': i64 | 442 | 170..171 '1': i64 |
443 | 180..241 'match ... }': u64 | 443 | 179..240 'match ... }': u64 |
444 | 186..187 'o': Option<u64> | 444 | 185..186 'o': Option<u64> |
445 | 198..213 'Option::Some(t)': Option<u64> | 445 | 197..212 'Option::Some(t)': Option<u64> |
446 | 211..212 't': u64 | 446 | 210..211 't': u64 |
447 | 217..218 't': u64 | 447 | 216..217 't': u64 |
448 | 228..229 '_': Option<u64> | 448 | 227..228 '_': Option<u64> |
449 | 233..234 '1': u64 | 449 | 232..233 '1': u64 |
450 | "### | 450 | "### |
451 | ); | 451 | ); |
452 | } | 452 | } |
@@ -470,27 +470,27 @@ fn test() { | |||
470 | } | 470 | } |
471 | "#, true), | 471 | "#, true), |
472 | @r###" | 472 | @r###" |
473 | 74..75 '1': usize | 473 | 73..74 '1': usize |
474 | 88..310 '{ ...atch }': () | 474 | 87..309 '{ ...atch }': () |
475 | 98..99 'a': Option<u32> | 475 | 97..98 'a': Option<u32> |
476 | 115..119 'None': Option<u32> | 476 | 114..118 'None': Option<u32> |
477 | 129..130 'b': Option<i64> | 477 | 128..129 'b': Option<i64> |
478 | 146..183 'match ... }': Option<i64> | 478 | 145..182 'match ... }': Option<i64> |
479 | 152..153 'a': Option<u32> | 479 | 151..152 'a': Option<u32> |
480 | 164..168 'None': Option<u32> | 480 | 163..167 'None': Option<u32> |
481 | 172..176 'None': Option<i64> | 481 | 171..175 'None': Option<i64> |
482 | 193..194 '_': () | 482 | 192..193 '_': () |
483 | 201..224 'match ... Foo }': Foo | 483 | 200..223 'match ... Foo }': Foo |
484 | 207..209 '()': () | 484 | 206..208 '()': () |
485 | 212..215 'Foo': Foo | 485 | 211..214 'Foo': Foo |
486 | 219..222 'Foo': Foo | 486 | 218..221 'Foo': Foo |
487 | 255..256 '_': () | 487 | 254..255 '_': () |
488 | 263..286 'match ... Bar }': usize | 488 | 262..285 'match ... Bar }': usize |
489 | 269..271 '()': () | 489 | 268..270 '()': () |
490 | 274..277 'Bar': usize | 490 | 273..276 'Bar': usize |
491 | 281..284 'Bar': usize | 491 | 280..283 'Bar': usize |
492 | 201..224: expected (), got Foo | 492 | 200..223: expected (), got Foo |
493 | 263..286: expected (), got usize | 493 | 262..285: expected (), got usize |
494 | "### | 494 | "### |
495 | ); | 495 | ); |
496 | } | 496 | } |
@@ -507,18 +507,18 @@ fn main() { | |||
507 | s if s.foo() => (), | 507 | s if s.foo() => (), |
508 | } | 508 | } |
509 | } | 509 | } |
510 | "#), @" | 510 | "#), @r###" |
511 | 28..32 'self': &S | 511 | 27..31 'self': &S |
512 | 42..51 '{ false }': bool | 512 | 41..50 '{ false }': bool |
513 | 44..49 'false': bool | 513 | 43..48 'false': bool |
514 | 65..116 '{ ... } }': () | 514 | 64..115 '{ ... } }': () |
515 | 71..114 'match ... }': () | 515 | 70..113 'match ... }': () |
516 | 77..78 'S': S | 516 | 76..77 'S': S |
517 | 89..90 's': S | 517 | 88..89 's': S |
518 | 94..95 's': S | 518 | 93..94 's': S |
519 | 94..101 's.foo()': bool | 519 | 93..100 's.foo()': bool |
520 | 105..107 '()': () | 520 | 104..106 '()': () |
521 | ") | 521 | "###) |
522 | } | 522 | } |
523 | 523 | ||
524 | #[test] | 524 | #[test] |
@@ -538,35 +538,35 @@ fn test() { | |||
538 | } | 538 | } |
539 | "#), | 539 | "#), |
540 | @r###" | 540 | @r###" |
541 | 94..95 't': T | 541 | 93..94 't': T |
542 | 100..101 'f': F | 542 | 99..100 'f': F |
543 | 111..122 '{ loop {} }': U | 543 | 110..121 '{ loop {} }': U |
544 | 113..120 'loop {}': ! | 544 | 112..119 'loop {}': ! |
545 | 118..120 '{}': () | 545 | 117..119 '{}': () |
546 | 134..233 '{ ... x); }': () | 546 | 133..232 '{ ... x); }': () |
547 | 140..143 'foo': fn foo<&(i32, &str), i32, |&(i32, &str)| -> i32>(&(i32, &str), |&(i32, &str)| -> i32) -> i32 | 547 | 139..142 'foo': fn foo<&(i32, &str), i32, |&(i32, &str)| -> i32>(&(i32, &str), |&(i32, &str)| -> i32) -> i32 |
548 | 140..167 'foo(&(...y)| x)': i32 | 548 | 139..166 'foo(&(...y)| x)': i32 |
549 | 144..153 '&(1, "a")': &(i32, &str) | 549 | 143..152 '&(1, "a")': &(i32, &str) |
550 | 145..153 '(1, "a")': (i32, &str) | 550 | 144..152 '(1, "a")': (i32, &str) |
551 | 146..147 '1': i32 | 551 | 145..146 '1': i32 |
552 | 149..152 '"a"': &str | 552 | 148..151 '"a"': &str |
553 | 155..166 '|&(x, y)| x': |&(i32, &str)| -> i32 | 553 | 154..165 '|&(x, y)| x': |&(i32, &str)| -> i32 |
554 | 156..163 '&(x, y)': &(i32, &str) | 554 | 155..162 '&(x, y)': &(i32, &str) |
555 | 157..163 '(x, y)': (i32, &str) | 555 | 156..162 '(x, y)': (i32, &str) |
556 | 158..159 'x': i32 | 556 | 157..158 'x': i32 |
557 | 161..162 'y': &str | 557 | 160..161 'y': &str |
558 | 165..166 'x': i32 | 558 | 164..165 'x': i32 |
559 | 204..207 'foo': fn foo<&(i32, &str), &i32, |&(i32, &str)| -> &i32>(&(i32, &str), |&(i32, &str)| -> &i32) -> &i32 | 559 | 203..206 'foo': fn foo<&(i32, &str), &i32, |&(i32, &str)| -> &i32>(&(i32, &str), |&(i32, &str)| -> &i32) -> &i32 |
560 | 204..230 'foo(&(...y)| x)': &i32 | 560 | 203..229 'foo(&(...y)| x)': &i32 |
561 | 208..217 '&(1, "a")': &(i32, &str) | 561 | 207..216 '&(1, "a")': &(i32, &str) |
562 | 209..217 '(1, "a")': (i32, &str) | 562 | 208..216 '(1, "a")': (i32, &str) |
563 | 210..211 '1': i32 | 563 | 209..210 '1': i32 |
564 | 213..216 '"a"': &str | 564 | 212..215 '"a"': &str |
565 | 219..229 '|(x, y)| x': |&(i32, &str)| -> &i32 | 565 | 218..228 '|(x, y)| x': |&(i32, &str)| -> &i32 |
566 | 220..226 '(x, y)': (i32, &str) | 566 | 219..225 '(x, y)': (i32, &str) |
567 | 221..222 'x': &i32 | 567 | 220..221 'x': &i32 |
568 | 224..225 'y': &&str | 568 | 223..224 'y': &&str |
569 | 228..229 'x': &i32 | 569 | 227..228 'x': &i32 |
570 | "### | 570 | "### |
571 | ); | 571 | ); |
572 | } | 572 | } |