aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/tests/traits.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src/tests/traits.rs')
-rw-r--r--crates/ra_hir_ty/src/tests/traits.rs1494
1 files changed, 747 insertions, 747 deletions
diff --git a/crates/ra_hir_ty/src/tests/traits.rs b/crates/ra_hir_ty/src/tests/traits.rs
index 961be4abd..646e1715c 100644
--- a/crates/ra_hir_ty/src/tests/traits.rs
+++ b/crates/ra_hir_ty/src/tests/traits.rs
@@ -259,16 +259,16 @@ fn test() {
259} 259}
260"#), 260"#),
261 @r###" 261 @r###"
262 86..87 't': T 262 85..86 't': T
263 92..94 '{}': () 263 91..93 '{}': ()
264 105..144 '{ ...(s); }': () 264 104..143 '{ ...(s); }': ()
265 115..116 's': S<u32> 265 114..115 's': S<u32>
266 119..120 'S': S<u32>(u32) -> S<u32> 266 118..119 'S': S<u32>(u32) -> S<u32>
267 119..129 'S(unknown)': S<u32> 267 118..128 'S(unknown)': S<u32>
268 121..128 'unknown': u32 268 120..127 'unknown': u32
269 135..138 'foo': fn foo<S<u32>>(S<u32>) 269 134..137 'foo': fn foo<S<u32>>(S<u32>)
270 135..141 'foo(s)': () 270 134..140 'foo(s)': ()
271 139..140 's': S<u32> 271 138..139 's': S<u32>
272 "### 272 "###
273 ); 273 );
274} 274}
@@ -287,17 +287,17 @@ fn test() {
287} 287}
288"#), 288"#),
289 @r###" 289 @r###"
290 87..88 't': T 290 86..87 't': T
291 98..100 '{}': () 291 97..99 '{}': ()
292 111..163 '{ ...(s); }': () 292 110..162 '{ ...(s); }': ()
293 121..122 's': S<u32> 293 120..121 's': S<u32>
294 125..126 'S': S<u32>(u32) -> S<u32> 294 124..125 'S': S<u32>(u32) -> S<u32>
295 125..135 'S(unknown)': S<u32> 295 124..134 'S(unknown)': S<u32>
296 127..134 'unknown': u32 296 126..133 'unknown': u32
297 145..146 'x': u32 297 144..145 'x': u32
298 154..157 'foo': fn foo<u32, S<u32>>(S<u32>) -> u32 298 153..156 'foo': fn foo<u32, S<u32>>(S<u32>) -> u32
299 154..160 'foo(s)': u32 299 153..159 'foo(s)': u32
300 158..159 's': S<u32> 300 157..158 's': S<u32>
301 "### 301 "###
302 ); 302 );
303} 303}
@@ -315,12 +315,12 @@ trait Trait {
315} 315}
316"#), 316"#),
317 @r###" 317 @r###"
318 27..31 'self': &Self 318 26..30 'self': &Self
319 53..57 'self': &Self 319 52..56 'self': &Self
320 62..97 '{ ... }': () 320 61..96 '{ ... }': ()
321 76..77 'x': i64 321 75..76 'x': i64
322 80..84 'self': &Self 322 79..83 'self': &Self
323 80..90 'self.foo()': i64 323 79..89 'self.foo()': i64
324 "### 324 "###
325 ); 325 );
326} 326}
@@ -339,12 +339,12 @@ trait Trait: SuperTrait {
339} 339}
340"#), 340"#),
341 @r###" 341 @r###"
342 32..36 'self': &Self 342 31..35 'self': &Self
343 86..90 'self': &Self 343 85..89 'self': &Self
344 95..130 '{ ... }': () 344 94..129 '{ ... }': ()
345 109..110 'x': i64 345 108..109 'x': i64
346 113..117 'self': &Self 346 112..116 'self': &Self
347 113..123 'self.foo()': i64 347 112..122 'self.foo()': i64
348 "### 348 "###
349 ); 349 );
350} 350}
@@ -366,15 +366,15 @@ fn test<T: Iterable>() {
366} 366}
367"#), 367"#),
368 @r###" 368 @r###"
369 108..261 '{ ...ter; }': () 369 107..260 '{ ...ter; }': ()
370 118..119 'x': u32 370 117..118 'x': u32
371 145..146 '1': u32 371 144..145 '1': u32
372 156..157 'y': Iterable::Item<T> 372 155..156 'y': Iterable::Item<T>
373 183..192 'no_matter': Iterable::Item<T> 373 182..191 'no_matter': Iterable::Item<T>
374 202..203 'z': Iterable::Item<T> 374 201..202 'z': Iterable::Item<T>
375 215..224 'no_matter': Iterable::Item<T> 375 214..223 'no_matter': Iterable::Item<T>
376 234..235 'a': Iterable::Item<T> 376 233..234 'a': Iterable::Item<T>
377 249..258 'no_matter': Iterable::Item<T> 377 248..257 'no_matter': Iterable::Item<T>
378 "### 378 "###
379 ); 379 );
380} 380}
@@ -398,25 +398,25 @@ fn test() {
398} 398}
399"#), 399"#),
400 @r###" 400 @r###"
401 106..107 't': T 401 105..106 't': T
402 123..125 '{}': () 402 122..124 '{}': ()
403 147..148 't': T 403 146..147 't': T
404 178..180 '{}': () 404 177..179 '{}': ()
405 202..203 't': T 405 201..202 't': T
406 221..223 '{}': () 406 220..222 '{}': ()
407 234..300 '{ ...(S); }': () 407 233..299 '{ ...(S); }': ()
408 244..245 'x': u32 408 243..244 'x': u32
409 248..252 'foo1': fn foo1<S>(S) -> <S as Iterable>::Item 409 247..251 'foo1': fn foo1<S>(S) -> <S as Iterable>::Item
410 248..255 'foo1(S)': u32 410 247..254 'foo1(S)': u32
411 253..254 'S': S 411 252..253 'S': S
412 265..266 'y': u32 412 264..265 'y': u32
413 269..273 'foo2': fn foo2<S>(S) -> <S as Iterable>::Item 413 268..272 'foo2': fn foo2<S>(S) -> <S as Iterable>::Item
414 269..276 'foo2(S)': u32 414 268..275 'foo2(S)': u32
415 274..275 'S': S 415 273..274 'S': S
416 286..287 'z': u32 416 285..286 'z': u32
417 290..294 'foo3': fn foo3<S>(S) -> <S as Iterable>::Item 417 289..293 'foo3': fn foo3<S>(S) -> <S as Iterable>::Item
418 290..297 'foo3(S)': u32 418 289..296 'foo3(S)': u32
419 295..296 'S': S 419 294..295 'S': S
420 "### 420 "###
421 ); 421 );
422} 422}
@@ -433,9 +433,9 @@ fn test<T: Iterable<Item=u32>>() {
433} 433}
434"#), 434"#),
435 @r###" 435 @r###"
436 67..100 '{ ...own; }': () 436 66..99 '{ ...own; }': ()
437 77..78 'y': u32 437 76..77 'y': u32
438 90..97 'unknown': u32 438 89..96 'unknown': u32
439 "### 439 "###
440 ); 440 );
441} 441}
@@ -448,13 +448,13 @@ const A: u32 = 1 + 1;
448static B: u64 = { let x = 1; x }; 448static B: u64 = { let x = 1; x };
449"#), 449"#),
450 @r###" 450 @r###"
451 16..17 '1': u32 451 15..16 '1': u32
452 16..21 '1 + 1': u32 452 15..20 '1 + 1': u32
453 20..21 '1': u32 453 19..20 '1': u32
454 39..55 '{ let ...1; x }': u64 454 38..54 '{ let ...1; x }': u64
455 45..46 'x': u64 455 44..45 'x': u64
456 49..50 '1': u64 456 48..49 '1': u64
457 52..53 'x': u64 457 51..52 'x': u64
458 "### 458 "###
459 ); 459 );
460} 460}
@@ -471,17 +471,17 @@ fn test() -> u64 {
471} 471}
472"#), 472"#),
473 @r###" 473 @r###"
474 38..87 '{ ... a.1 }': u64 474 37..86 '{ ... a.1 }': u64
475 48..49 'a': S 475 47..48 'a': S
476 52..53 'S': S(i32, u64) -> S 476 51..52 'S': S(i32, u64) -> S
477 52..59 'S(4, 6)': S 477 51..58 'S(4, 6)': S
478 54..55 '4': i32 478 53..54 '4': i32
479 57..58 '6': u64 479 56..57 '6': u64
480 69..70 'b': i32 480 68..69 'b': i32
481 73..74 'a': S 481 72..73 'a': S
482 73..76 'a.0': i32 482 72..75 'a.0': i32
483 82..83 'a': S 483 81..82 'a': S
484 82..85 'a.1': u64 484 81..84 'a.1': u64
485 "### 485 "###
486 ); 486 );
487} 487}
@@ -498,24 +498,24 @@ fn test() -> u64 {
498} 498}
499"#), 499"#),
500 @r###" 500 @r###"
501 44..102 '{ ...0(2) }': u64 501 43..101 '{ ...0(2) }': u64
502 54..55 'a': S 502 53..54 'a': S
503 58..59 'S': S(fn(u32) -> u64) -> S 503 57..58 'S': S(fn(u32) -> u64) -> S
504 58..68 'S(|i| 2*i)': S 504 57..67 'S(|i| 2*i)': S
505 60..67 '|i| 2*i': |u32| -> u64 505 59..66 '|i| 2*i': |u32| -> u64
506 61..62 'i': u32 506 60..61 'i': u32
507 64..65 '2': u32 507 63..64 '2': u32
508 64..67 '2*i': u32 508 63..66 '2*i': u32
509 66..67 'i': u32 509 65..66 'i': u32
510 78..79 'b': u64 510 77..78 'b': u64
511 82..83 'a': S 511 81..82 'a': S
512 82..85 'a.0': fn(u32) -> u64 512 81..84 'a.0': fn(u32) -> u64
513 82..88 'a.0(4)': u64 513 81..87 'a.0(4)': u64
514 86..87 '4': u32 514 85..86 '4': u32
515 94..95 'a': S 515 93..94 'a': S
516 94..97 'a.0': fn(u32) -> u64 516 93..96 'a.0': fn(u32) -> u64
517 94..100 'a.0(2)': u64 517 93..99 'a.0(2)': u64
518 98..99 '2': u32 518 97..98 '2': u32
519 "### 519 "###
520 ); 520 );
521} 521}
@@ -946,34 +946,34 @@ fn test(x: impl Trait<u64>, y: &impl Trait<u32>) {
946} 946}
947"#, true), 947"#, true),
948 @r###" 948 @r###"
949 30..34 'self': &Self 949 29..33 'self': &Self
950 55..59 'self': &Self 950 54..58 'self': &Self
951 78..79 'x': impl Trait<u16> 951 77..78 'x': impl Trait<u16>
952 98..100 '{}': () 952 97..99 '{}': ()
953 155..156 'x': impl Trait<u64> 953 154..155 'x': impl Trait<u64>
954 175..176 'y': &impl Trait<u32> 954 174..175 'y': &impl Trait<u32>
955 196..324 '{ ...2(); }': () 955 195..323 '{ ...2(); }': ()
956 202..203 'x': impl Trait<u64> 956 201..202 'x': impl Trait<u64>
957 209..210 'y': &impl Trait<u32> 957 208..209 'y': &impl Trait<u32>
958 220..221 'z': S<u16> 958 219..220 'z': S<u16>
959 224..225 'S': S<u16>(u16) -> S<u16> 959 223..224 'S': S<u16>(u16) -> S<u16>
960 224..228 'S(1)': S<u16> 960 223..227 'S(1)': S<u16>
961 226..227 '1': u16 961 225..226 '1': u16
962 234..237 'bar': fn bar(S<u16>) 962 233..236 'bar': fn bar(S<u16>)
963 234..240 'bar(z)': () 963 233..239 'bar(z)': ()
964 238..239 'z': S<u16> 964 237..238 'z': S<u16>
965 246..247 'x': impl Trait<u64> 965 245..246 'x': impl Trait<u64>
966 246..253 'x.foo()': u64 966 245..252 'x.foo()': u64
967 259..260 'y': &impl Trait<u32> 967 258..259 'y': &impl Trait<u32>
968 259..266 'y.foo()': u32 968 258..265 'y.foo()': u32
969 272..273 'z': S<u16> 969 271..272 'z': S<u16>
970 272..279 'z.foo()': u16 970 271..278 'z.foo()': u16
971 285..286 'x': impl Trait<u64> 971 284..285 'x': impl Trait<u64>
972 285..293 'x.foo2()': i64 972 284..292 'x.foo2()': i64
973 299..300 'y': &impl Trait<u32> 973 298..299 'y': &impl Trait<u32>
974 299..307 'y.foo2()': i64 974 298..306 'y.foo2()': i64
975 313..314 'z': S<u16> 975 312..313 'z': S<u16>
976 313..321 'z.foo2()': i64 976 312..320 'z.foo2()': i64
977 "### 977 "###
978 ); 978 );
979} 979}
@@ -1007,39 +1007,39 @@ fn test() {
1007} 1007}
1008"#, true), 1008"#, true),
1009 @r###" 1009 @r###"
1010 156..157 'x': impl Trait 1010 155..156 'x': impl Trait
1011 176..187 '{ loop {} }': T 1011 175..186 '{ loop {} }': T
1012 178..185 'loop {}': ! 1012 177..184 'loop {}': !
1013 183..185 '{}': () 1013 182..184 '{}': ()
1014 200..201 'x': impl Trait 1014 199..200 'x': impl Trait
1015 220..231 '{ loop {} }': T 1015 219..230 '{ loop {} }': T
1016 222..229 'loop {}': ! 1016 221..228 'loop {}': !
1017 227..229 '{}': () 1017 226..228 '{}': ()
1018 301..510 '{ ... i32 }': () 1018 300..509 '{ ... i32 }': ()
1019 307..315 'Foo::bar': fn bar<{unknown}, {unknown}>(S) -> {unknown} 1019 306..314 'Foo::bar': fn bar<{unknown}, {unknown}>(S) -> {unknown}
1020 307..318 'Foo::bar(S)': {unknown} 1020 306..317 'Foo::bar(S)': {unknown}
1021 316..317 'S': S 1021 315..316 'S': S
1022 324..339 '<F as Foo>::bar': fn bar<F, {unknown}>(S) -> {unknown} 1022 323..338 '<F as Foo>::bar': fn bar<F, {unknown}>(S) -> {unknown}
1023 324..342 '<F as ...bar(S)': {unknown} 1023 323..341 '<F as ...bar(S)': {unknown}
1024 340..341 'S': S 1024 339..340 'S': S
1025 348..354 'F::bar': fn bar<F, {unknown}>(S) -> {unknown} 1025 347..353 'F::bar': fn bar<F, {unknown}>(S) -> {unknown}
1026 348..357 'F::bar(S)': {unknown} 1026 347..356 'F::bar(S)': {unknown}
1027 355..356 'S': S 1027 354..355 'S': S
1028 363..378 'Foo::bar::<u32>': fn bar<{unknown}, u32>(S) -> u32 1028 362..377 'Foo::bar::<u32>': fn bar<{unknown}, u32>(S) -> u32
1029 363..381 'Foo::b...32>(S)': u32 1029 362..380 'Foo::b...32>(S)': u32
1030 379..380 'S': S 1030 378..379 'S': S
1031 387..409 '<F as ...:<u32>': fn bar<F, u32>(S) -> u32 1031 386..408 '<F as ...:<u32>': fn bar<F, u32>(S) -> u32
1032 387..412 '<F as ...32>(S)': u32 1032 386..411 '<F as ...32>(S)': u32
1033 410..411 'S': S 1033 409..410 'S': S
1034 419..422 'foo': fn foo<{unknown}>(S) -> {unknown} 1034 418..421 'foo': fn foo<{unknown}>(S) -> {unknown}
1035 419..425 'foo(S)': {unknown} 1035 418..424 'foo(S)': {unknown}
1036 423..424 'S': S 1036 422..423 'S': S
1037 431..441 'foo::<u32>': fn foo<u32>(S) -> u32 1037 430..440 'foo::<u32>': fn foo<u32>(S) -> u32
1038 431..444 'foo::<u32>(S)': u32 1038 430..443 'foo::<u32>(S)': u32
1039 442..443 'S': S 1039 441..442 'S': S
1040 450..465 'foo::<u32, i32>': fn foo<u32>(S) -> u32 1040 449..464 'foo::<u32, i32>': fn foo<u32>(S) -> u32
1041 450..468 'foo::<...32>(S)': u32 1041 449..467 'foo::<...32>(S)': u32
1042 466..467 'S': S 1042 465..466 'S': S
1043 "### 1043 "###
1044 ); 1044 );
1045} 1045}
@@ -1064,24 +1064,24 @@ fn test() {
1064} 1064}
1065"#, true), 1065"#, true),
1066 @r###" 1066 @r###"
1067 88..92 'self': F<T> 1067 87..91 'self': F<T>
1068 94..95 'x': impl Trait 1068 93..94 'x': impl Trait
1069 119..130 '{ loop {} }': (T, U) 1069 118..129 '{ loop {} }': (T, U)
1070 121..128 'loop {}': ! 1070 120..127 'loop {}': !
1071 126..128 '{}': () 1071 125..127 '{}': ()
1072 144..284 '{ ...ored }': () 1072 143..283 '{ ...ored }': ()
1073 150..151 'F': F<{unknown}> 1073 149..150 'F': F<{unknown}>
1074 150..158 'F.foo(S)': ({unknown}, {unknown}) 1074 149..157 'F.foo(S)': ({unknown}, {unknown})
1075 156..157 'S': S 1075 155..156 'S': S
1076 164..172 'F::<u32>': F<u32> 1076 163..171 'F::<u32>': F<u32>
1077 164..179 'F::<u32>.foo(S)': (u32, {unknown}) 1077 163..178 'F::<u32>.foo(S)': (u32, {unknown})
1078 177..178 'S': S 1078 176..177 'S': S
1079 185..193 'F::<u32>': F<u32> 1079 184..192 'F::<u32>': F<u32>
1080 185..207 'F::<u3...32>(S)': (u32, i32) 1080 184..206 'F::<u3...32>(S)': (u32, i32)
1081 205..206 'S': S 1081 204..205 'S': S
1082 213..221 'F::<u32>': F<u32> 1082 212..220 'F::<u32>': F<u32>
1083 213..240 'F::<u3...32>(S)': (u32, i32) 1083 212..239 'F::<u3...32>(S)': (u32, i32)
1084 238..239 'S': S 1084 237..238 'S': S
1085 "### 1085 "###
1086 ); 1086 );
1087} 1087}
@@ -1100,13 +1100,13 @@ fn test() {
1100} 1100}
1101"#, true), 1101"#, true),
1102 @r###" 1102 @r###"
1103 23..24 'x': impl Trait 1103 22..23 'x': impl Trait
1104 38..49 '{ loop {} }': () 1104 37..48 '{ loop {} }': ()
1105 40..47 'loop {}': ! 1105 39..46 'loop {}': !
1106 45..47 '{}': () 1106 44..46 '{}': ()
1107 91..124 '{ ...foo; }': () 1107 90..123 '{ ...foo; }': ()
1108 101..102 'f': fn(S) 1108 100..101 'f': fn(S)
1109 118..121 'foo': fn foo(S) 1109 117..120 'foo': fn foo(S)
1110 "### 1110 "###
1111 ); 1111 );
1112} 1112}
@@ -1134,29 +1134,29 @@ fn test(x: impl Trait<u64>, y: &impl Trait<u64>) {
1134} 1134}
1135"#), 1135"#),
1136 @r###" 1136 @r###"
1137 30..34 'self': &Self 1137 29..33 'self': &Self
1138 55..59 'self': &Self 1138 54..58 'self': &Self
1139 99..101 '{}': () 1139 98..100 '{}': ()
1140 111..112 'x': impl Trait<u64> 1140 110..111 'x': impl Trait<u64>
1141 131..132 'y': &impl Trait<u64> 1141 130..131 'y': &impl Trait<u64>
1142 152..269 '{ ...2(); }': () 1142 151..268 '{ ...2(); }': ()
1143 158..159 'x': impl Trait<u64> 1143 157..158 'x': impl Trait<u64>
1144 165..166 'y': &impl Trait<u64> 1144 164..165 'y': &impl Trait<u64>
1145 176..177 'z': impl Trait<u64> 1145 175..176 'z': impl Trait<u64>
1146 180..183 'bar': fn bar() -> impl Trait<u64> 1146 179..182 'bar': fn bar() -> impl Trait<u64>
1147 180..185 'bar()': impl Trait<u64> 1147 179..184 'bar()': impl Trait<u64>
1148 191..192 'x': impl Trait<u64> 1148 190..191 'x': impl Trait<u64>
1149 191..198 'x.foo()': u64 1149 190..197 'x.foo()': u64
1150 204..205 'y': &impl Trait<u64> 1150 203..204 'y': &impl Trait<u64>
1151 204..211 'y.foo()': u64 1151 203..210 'y.foo()': u64
1152 217..218 'z': impl Trait<u64> 1152 216..217 'z': impl Trait<u64>
1153 217..224 'z.foo()': u64 1153 216..223 'z.foo()': u64
1154 230..231 'x': impl Trait<u64> 1154 229..230 'x': impl Trait<u64>
1155 230..238 'x.foo2()': i64 1155 229..237 'x.foo2()': i64
1156 244..245 'y': &impl Trait<u64> 1156 243..244 'y': &impl Trait<u64>
1157 244..252 'y.foo2()': i64 1157 243..251 'y.foo2()': i64
1158 258..259 'z': impl Trait<u64> 1158 257..258 'z': impl Trait<u64>
1159 258..266 'z.foo2()': i64 1159 257..265 'z.foo2()': i64
1160 "### 1160 "###
1161 ); 1161 );
1162} 1162}
@@ -1177,16 +1177,16 @@ fn test() {
1177} 1177}
1178"#), 1178"#),
1179 @r###" 1179 @r###"
1180 30..34 'self': &Self 1180 29..33 'self': &Self
1181 72..83 '{ loop {} }': ! 1181 71..82 '{ loop {} }': !
1182 74..81 'loop {}': ! 1182 73..80 'loop {}': !
1183 79..81 '{}': () 1183 78..80 '{}': ()
1184 95..130 '{ ...o(); }': () 1184 94..129 '{ ...o(); }': ()
1185 105..106 'a': impl Trait<u64> 1185 104..105 'a': impl Trait<u64>
1186 109..112 'bar': fn bar() -> impl Trait<u64> 1186 108..111 'bar': fn bar() -> impl Trait<u64>
1187 109..114 'bar()': impl Trait<u64> 1187 108..113 'bar()': impl Trait<u64>
1188 120..121 'a': impl Trait<u64> 1188 119..120 'a': impl Trait<u64>
1189 120..127 'a.foo()': u64 1189 119..126 'a.foo()': u64
1190 "### 1190 "###
1191 ); 1191 );
1192} 1192}
@@ -1215,37 +1215,37 @@ fn test() {
1215} 1215}
1216"#), 1216"#),
1217 @r###" 1217 @r###"
1218 50..54 'self': &mut Self 1218 49..53 'self': &mut Self
1219 102..106 'self': &Self 1219 101..105 'self': &Self
1220 185..196 '{ loop {} }': ({unknown}, {unknown}) 1220 184..195 '{ loop {} }': ({unknown}, {unknown})
1221 187..194 'loop {}': ! 1221 186..193 'loop {}': !
1222 192..194 '{}': () 1222 191..193 '{}': ()
1223 207..208 't': T 1223 206..207 't': T
1224 269..280 '{ loop {} }': ({unknown}, {unknown}) 1224 268..279 '{ loop {} }': ({unknown}, {unknown})
1225 271..278 'loop {}': ! 1225 270..277 'loop {}': !
1226 276..278 '{}': () 1226 275..277 '{}': ()
1227 292..414 '{ ...o(); }': () 1227 291..413 '{ ...o(); }': ()
1228 302..308 '(a, b)': (impl Iterator<Item = impl Trait<u32>>, impl Trait<u64>) 1228 301..307 '(a, b)': (impl Iterator<Item = impl Trait<u32>>, impl Trait<u64>)
1229 303..304 'a': impl Iterator<Item = impl Trait<u32>> 1229 302..303 'a': impl Iterator<Item = impl Trait<u32>>
1230 306..307 'b': impl Trait<u64> 1230 305..306 'b': impl Trait<u64>
1231 311..314 'bar': fn bar() -> (impl Iterator<Item = impl Trait<u32>>, impl Trait<u64>) 1231 310..313 'bar': fn bar() -> (impl Iterator<Item = impl Trait<u32>>, impl Trait<u64>)
1232 311..316 'bar()': (impl Iterator<Item = impl Trait<u32>>, impl Trait<u64>) 1232 310..315 'bar()': (impl Iterator<Item = impl Trait<u32>>, impl Trait<u64>)
1233 322..323 'a': impl Iterator<Item = impl Trait<u32>> 1233 321..322 'a': impl Iterator<Item = impl Trait<u32>>
1234 322..330 'a.next()': impl Trait<u32> 1234 321..329 'a.next()': impl Trait<u32>
1235 322..336 'a.next().foo()': u32 1235 321..335 'a.next().foo()': u32
1236 342..343 'b': impl Trait<u64> 1236 341..342 'b': impl Trait<u64>
1237 342..349 'b.foo()': u64 1237 341..348 'b.foo()': u64
1238 359..365 '(c, d)': (impl Iterator<Item = impl Trait<u128>>, impl Trait<u128>) 1238 358..364 '(c, d)': (impl Iterator<Item = impl Trait<u128>>, impl Trait<u128>)
1239 360..361 'c': impl Iterator<Item = impl Trait<u128>> 1239 359..360 'c': impl Iterator<Item = impl Trait<u128>>
1240 363..364 'd': impl Trait<u128> 1240 362..363 'd': impl Trait<u128>
1241 368..371 'baz': fn baz<u128>(u128) -> (impl Iterator<Item = impl Trait<u128>>, impl Trait<u128>) 1241 367..370 'baz': fn baz<u128>(u128) -> (impl Iterator<Item = impl Trait<u128>>, impl Trait<u128>)
1242 368..378 'baz(1u128)': (impl Iterator<Item = impl Trait<u128>>, impl Trait<u128>) 1242 367..377 'baz(1u128)': (impl Iterator<Item = impl Trait<u128>>, impl Trait<u128>)
1243 372..377 '1u128': u128 1243 371..376 '1u128': u128
1244 384..385 'c': impl Iterator<Item = impl Trait<u128>> 1244 383..384 'c': impl Iterator<Item = impl Trait<u128>>
1245 384..392 'c.next()': impl Trait<u128> 1245 383..391 'c.next()': impl Trait<u128>
1246 384..398 'c.next().foo()': u128 1246 383..397 'c.next().foo()': u128
1247 404..405 'd': impl Trait<u128> 1247 403..404 'd': impl Trait<u128>
1248 404..411 'd.foo()': u128 1248 403..410 'd.foo()': u128
1249 "### 1249 "###
1250 ); 1250 );
1251} 1251}
@@ -1273,29 +1273,29 @@ fn test(x: dyn Trait<u64>, y: &dyn Trait<u64>) {
1273} 1273}
1274"#), 1274"#),
1275 @r###" 1275 @r###"
1276 30..34 'self': &Self 1276 29..33 'self': &Self
1277 55..59 'self': &Self 1277 54..58 'self': &Self
1278 98..100 '{}': () 1278 97..99 '{}': ()
1279 110..111 'x': dyn Trait<u64> 1279 109..110 'x': dyn Trait<u64>
1280 129..130 'y': &dyn Trait<u64> 1280 128..129 'y': &dyn Trait<u64>
1281 149..266 '{ ...2(); }': () 1281 148..265 '{ ...2(); }': ()
1282 155..156 'x': dyn Trait<u64> 1282 154..155 'x': dyn Trait<u64>
1283 162..163 'y': &dyn Trait<u64> 1283 161..162 'y': &dyn Trait<u64>
1284 173..174 'z': dyn Trait<u64> 1284 172..173 'z': dyn Trait<u64>
1285 177..180 'bar': fn bar() -> dyn Trait<u64> 1285 176..179 'bar': fn bar() -> dyn Trait<u64>
1286 177..182 'bar()': dyn Trait<u64> 1286 176..181 'bar()': dyn Trait<u64>
1287 188..189 'x': dyn Trait<u64> 1287 187..188 'x': dyn Trait<u64>
1288 188..195 'x.foo()': u64 1288 187..194 'x.foo()': u64
1289 201..202 'y': &dyn Trait<u64> 1289 200..201 'y': &dyn Trait<u64>
1290 201..208 'y.foo()': u64 1290 200..207 'y.foo()': u64
1291 214..215 'z': dyn Trait<u64> 1291 213..214 'z': dyn Trait<u64>
1292 214..221 'z.foo()': u64 1292 213..220 'z.foo()': u64
1293 227..228 'x': dyn Trait<u64> 1293 226..227 'x': dyn Trait<u64>
1294 227..235 'x.foo2()': i64 1294 226..234 'x.foo2()': i64
1295 241..242 'y': &dyn Trait<u64> 1295 240..241 'y': &dyn Trait<u64>
1296 241..249 'y.foo2()': i64 1296 240..248 'y.foo2()': i64
1297 255..256 'z': dyn Trait<u64> 1297 254..255 'z': dyn Trait<u64>
1298 255..263 'z.foo2()': i64 1298 254..262 'z.foo2()': i64
1299 "### 1299 "###
1300 ); 1300 );
1301} 1301}
@@ -1321,17 +1321,17 @@ fn test(s: S<u32, i32>) {
1321} 1321}
1322"#), 1322"#),
1323 @r###" 1323 @r###"
1324 33..37 'self': &Self 1324 32..36 'self': &Self
1325 103..107 'self': &S<T, U> 1325 102..106 'self': &S<T, U>
1326 129..140 '{ loop {} }': &dyn Trait<T, U> 1326 128..139 '{ loop {} }': &dyn Trait<T, U>
1327 131..138 'loop {}': ! 1327 130..137 'loop {}': !
1328 136..138 '{}': () 1328 135..137 '{}': ()
1329 176..180 'self': &Self 1329 175..179 'self': &Self
1330 252..253 's': S<u32, i32> 1330 251..252 's': S<u32, i32>
1331 268..290 '{ ...z(); }': () 1331 267..289 '{ ...z(); }': ()
1332 274..275 's': S<u32, i32> 1332 273..274 's': S<u32, i32>
1333 274..281 's.bar()': &dyn Trait<u32, i32> 1333 273..280 's.bar()': &dyn Trait<u32, i32>
1334 274..287 's.bar().baz()': (u32, i32) 1334 273..286 's.bar().baz()': (u32, i32)
1335 "### 1335 "###
1336 ); 1336 );
1337} 1337}
@@ -1355,22 +1355,22 @@ fn test(x: Trait, y: &Trait) -> u64 {
1355} 1355}
1356"#), 1356"#),
1357 @r###" 1357 @r###"
1358 27..31 'self': &Self 1358 26..30 'self': &Self
1359 61..63 '{}': () 1359 60..62 '{}': ()
1360 73..74 'x': dyn Trait 1360 72..73 'x': dyn Trait
1361 83..84 'y': &dyn Trait 1361 82..83 'y': &dyn Trait
1362 101..176 '{ ...o(); }': () 1362 100..175 '{ ...o(); }': ()
1363 107..108 'x': dyn Trait 1363 106..107 'x': dyn Trait
1364 114..115 'y': &dyn Trait 1364 113..114 'y': &dyn Trait
1365 125..126 'z': dyn Trait 1365 124..125 'z': dyn Trait
1366 129..132 'bar': fn bar() -> dyn Trait 1366 128..131 'bar': fn bar() -> dyn Trait
1367 129..134 'bar()': dyn Trait 1367 128..133 'bar()': dyn Trait
1368 140..141 'x': dyn Trait 1368 139..140 'x': dyn Trait
1369 140..147 'x.foo()': u64 1369 139..146 'x.foo()': u64
1370 153..154 'y': &dyn Trait 1370 152..153 'y': &dyn Trait
1371 153..160 'y.foo()': u64 1371 152..159 'y.foo()': u64
1372 166..167 'z': dyn Trait 1372 165..166 'z': dyn Trait
1373 166..173 'z.foo()': u64 1373 165..172 'z.foo()': u64
1374 "### 1374 "###
1375 ); 1375 );
1376} 1376}
@@ -1384,13 +1384,13 @@ fn test(a: impl Trait + 'lifetime, b: impl 'lifetime, c: impl (Trait), d: impl (
1384} 1384}
1385"#), 1385"#),
1386 @r###" 1386 @r###"
1387 24..25 'a': impl Trait + {error} 1387 23..24 'a': impl Trait + {error}
1388 51..52 'b': impl {error} 1388 50..51 'b': impl {error}
1389 70..71 'c': impl Trait 1389 69..70 'c': impl Trait
1390 87..88 'd': impl {error} 1390 86..87 'd': impl {error}
1391 108..109 'e': impl {error} 1391 107..108 'e': impl {error}
1392 124..125 'f': impl Trait + {error} 1392 123..124 'f': impl Trait + {error}
1393 148..151 '{ }': () 1393 147..150 '{ }': ()
1394 "### 1394 "###
1395 ); 1395 );
1396} 1396}
@@ -1439,41 +1439,41 @@ fn test<T: Trait<Type = u32>>(x: T, y: impl Trait<Type = i64>) {
1439} 1439}
1440"#), 1440"#),
1441 @r###" 1441 @r###"
1442 50..51 't': T 1442 49..50 't': T
1443 78..80 '{}': () 1443 77..79 '{}': ()
1444 112..113 't': T 1444 111..112 't': T
1445 123..125 '{}': () 1445 122..124 '{}': ()
1446 155..156 't': T 1446 154..155 't': T
1447 166..169 '{t}': T 1447 165..168 '{t}': T
1448 167..168 't': T 1448 166..167 't': T
1449 257..258 'x': T 1449 256..257 'x': T
1450 263..264 'y': impl Trait<Type = i64> 1450 262..263 'y': impl Trait<Type = i64>
1451 290..398 '{ ...r>); }': () 1451 289..397 '{ ...r>); }': ()
1452 296..299 'get': fn get<T>(T) -> <T as Trait>::Type 1452 295..298 'get': fn get<T>(T) -> <T as Trait>::Type
1453 296..302 'get(x)': u32 1453 295..301 'get(x)': u32
1454 300..301 'x': T 1454 299..300 'x': T
1455 308..312 'get2': fn get2<u32, T>(T) -> u32 1455 307..311 'get2': fn get2<u32, T>(T) -> u32
1456 308..315 'get2(x)': u32 1456 307..314 'get2(x)': u32
1457 313..314 'x': T 1457 312..313 'x': T
1458 321..324 'get': fn get<impl Trait<Type = i64>>(impl Trait<Type = i64>) -> <impl Trait<Type = i64> as Trait>::Type 1458 320..323 'get': fn get<impl Trait<Type = i64>>(impl Trait<Type = i64>) -> <impl Trait<Type = i64> as Trait>::Type
1459 321..327 'get(y)': i64 1459 320..326 'get(y)': i64
1460 325..326 'y': impl Trait<Type = i64> 1460 324..325 'y': impl Trait<Type = i64>
1461 333..337 'get2': fn get2<i64, impl Trait<Type = i64>>(impl Trait<Type = i64>) -> i64 1461 332..336 'get2': fn get2<i64, impl Trait<Type = i64>>(impl Trait<Type = i64>) -> i64
1462 333..340 'get2(y)': i64 1462 332..339 'get2(y)': i64
1463 338..339 'y': impl Trait<Type = i64> 1463 337..338 'y': impl Trait<Type = i64>
1464 346..349 'get': fn get<S<u64>>(S<u64>) -> <S<u64> as Trait>::Type 1464 345..348 'get': fn get<S<u64>>(S<u64>) -> <S<u64> as Trait>::Type
1465 346..357 'get(set(S))': u64 1465 345..356 'get(set(S))': u64
1466 350..353 'set': fn set<S<u64>>(S<u64>) -> S<u64> 1466 349..352 'set': fn set<S<u64>>(S<u64>) -> S<u64>
1467 350..356 'set(S)': S<u64> 1467 349..355 'set(S)': S<u64>
1468 354..355 'S': S<u64> 1468 353..354 'S': S<u64>
1469 363..367 'get2': fn get2<u64, S<u64>>(S<u64>) -> u64 1469 362..366 'get2': fn get2<u64, S<u64>>(S<u64>) -> u64
1470 363..375 'get2(set(S))': u64 1470 362..374 'get2(set(S))': u64
1471 368..371 'set': fn set<S<u64>>(S<u64>) -> S<u64> 1471 367..370 'set': fn set<S<u64>>(S<u64>) -> S<u64>
1472 368..374 'set(S)': S<u64> 1472 367..373 'set(S)': S<u64>
1473 372..373 'S': S<u64> 1473 371..372 'S': S<u64>
1474 381..385 'get2': fn get2<str, S<str>>(S<str>) -> str 1474 380..384 'get2': fn get2<str, S<str>>(S<str>) -> str
1475 381..395 'get2(S::<str>)': str 1475 380..394 'get2(S::<str>)': str
1476 386..394 'S::<str>': S<str> 1476 385..393 'S::<str>': S<str>
1477 "### 1477 "###
1478 ); 1478 );
1479} 1479}
@@ -1538,11 +1538,11 @@ fn test<T: Trait1<Type = u32>>(x: T) {
1538} 1538}
1539"#), 1539"#),
1540 @r###" 1540 @r###"
1541 62..66 'self': Self 1541 61..65 'self': Self
1542 164..165 'x': T 1542 163..164 'x': T
1543 170..186 '{ ...o(); }': () 1543 169..185 '{ ...o(); }': ()
1544 176..177 'x': T 1544 175..176 'x': T
1545 176..183 'x.foo()': u32 1545 175..182 'x.foo()': u32
1546 "### 1546 "###
1547 ); 1547 );
1548} 1548}
@@ -1584,15 +1584,15 @@ fn test<T: Trait1, U: Trait2>(x: T, y: U) {
1584} 1584}
1585"#), 1585"#),
1586 @r###" 1586 @r###"
1587 50..54 'self': &Self 1587 49..53 'self': &Self
1588 63..65 '{}': () 1588 62..64 '{}': ()
1589 182..183 'x': T 1589 181..182 'x': T
1590 188..189 'y': U 1590 187..188 'y': U
1591 194..223 '{ ...o(); }': () 1591 193..222 '{ ...o(); }': ()
1592 200..201 'x': T 1592 199..200 'x': T
1593 200..207 'x.foo()': u32 1593 199..206 'x.foo()': u32
1594 213..214 'y': U 1594 212..213 'y': U
1595 213..220 'y.foo()': u32 1595 212..219 'y.foo()': u32
1596 "### 1596 "###
1597 ); 1597 );
1598} 1598}
@@ -1613,12 +1613,12 @@ fn test(x: &impl Trait1) {
1613} 1613}
1614"#), 1614"#),
1615 @r###" 1615 @r###"
1616 50..54 'self': &Self 1616 49..53 'self': &Self
1617 63..65 '{}': () 1617 62..64 '{}': ()
1618 116..117 'x': &impl Trait1 1618 115..116 'x': &impl Trait1
1619 133..149 '{ ...o(); }': () 1619 132..148 '{ ...o(); }': ()
1620 139..140 'x': &impl Trait1 1620 138..139 'x': &impl Trait1
1621 139..146 'x.foo()': u32 1621 138..145 'x.foo()': u32
1622 "### 1622 "###
1623 ); 1623 );
1624} 1624}
@@ -1636,10 +1636,10 @@ fn test<T: A>(x: T) {
1636} 1636}
1637"#), 1637"#),
1638 @r###" 1638 @r###"
1639 44..45 'x': T 1639 43..44 'x': T
1640 50..66 '{ ...o(); }': () 1640 49..65 '{ ...o(); }': ()
1641 56..57 'x': T 1641 55..56 'x': T
1642 56..63 'x.foo()': {unknown} 1642 55..62 'x.foo()': {unknown}
1643 "### 1643 "###
1644 ); 1644 );
1645} 1645}
@@ -1663,17 +1663,17 @@ fn test() {
1663} 1663}
1664"#), 1664"#),
1665 @r###" 1665 @r###"
1666 103..104 't': T 1666 102..103 't': T
1667 114..116 '{}': () 1667 113..115 '{}': ()
1668 146..147 't': T 1668 145..146 't': T
1669 157..160 '{t}': T 1669 156..159 '{t}': T
1670 158..159 't': T 1670 157..158 't': T
1671 259..280 '{ ...S)); }': () 1671 258..279 '{ ...S)); }': ()
1672 265..269 'get2': fn get2<u64, S<u64>>(S<u64>) -> u64 1672 264..268 'get2': fn get2<u64, S<u64>>(S<u64>) -> u64
1673 265..277 'get2(set(S))': u64 1673 264..276 'get2(set(S))': u64
1674 270..273 'set': fn set<S<u64>>(S<u64>) -> S<u64> 1674 269..272 'set': fn set<S<u64>>(S<u64>) -> S<u64>
1675 270..276 'set(S)': S<u64> 1675 269..275 'set(S)': S<u64>
1676 274..275 'S': S<u64> 1676 273..274 'S': S<u64>
1677 "### 1677 "###
1678 ); 1678 );
1679} 1679}
@@ -1693,15 +1693,15 @@ fn test<F: FnOnce(u32, u64) -> u128>(f: F) {
1693} 1693}
1694"#), 1694"#),
1695 @r###" 1695 @r###"
1696 57..61 'self': Self 1696 56..60 'self': Self
1697 63..67 'args': Args 1697 62..66 'args': Args
1698 150..151 'f': F 1698 149..150 'f': F
1699 156..184 '{ ...2)); }': () 1699 155..183 '{ ...2)); }': ()
1700 162..163 'f': F 1700 161..162 'f': F
1701 162..181 'f.call...1, 2))': u128 1701 161..180 'f.call...1, 2))': u128
1702 174..180 '(1, 2)': (u32, u64) 1702 173..179 '(1, 2)': (u32, u64)
1703 175..176 '1': u32 1703 174..175 '1': u32
1704 178..179 '2': u64 1704 177..178 '2': u64
1705 "### 1705 "###
1706 ); 1706 );
1707} 1707}
@@ -1742,24 +1742,24 @@ fn test() {
1742} 1742}
1743"#), 1743"#),
1744 @r###" 1744 @r###"
174575..79 'self': Self 1745 74..78 'self': Self
174681..85 'args': Args 1746 80..84 'args': Args
1747140..144 'self': &Self 1747 139..143 'self': &Self
1748244..248 'self': &Bar<F> 1748 243..247 'self': &Bar<F>
1749261..263 '{}': () 1749 260..262 '{}': ()
1750347..351 'self': Opt<T> 1750 346..350 'self': Opt<T>
1751353..354 'f': F 1751 352..353 'f': F
1752369..371 '{}': () 1752 368..370 '{}': ()
1753385..501 '{ ...(f); }': () 1753 384..500 '{ ...(f); }': ()
1754395..398 'bar': Bar<fn(u8) -> u32> 1754 394..397 'bar': Bar<fn(u8) -> u32>
1755424..427 'bar': Bar<fn(u8) -> u32> 1755 423..426 'bar': Bar<fn(u8) -> u32>
1756424..433 'bar.foo()': {unknown} 1756 423..432 'bar.foo()': {unknown}
1757444..447 'opt': Opt<u8> 1757 443..446 'opt': Opt<u8>
1758466..467 'f': fn(u8) -> u32 1758 465..466 'f': fn(u8) -> u32
1759488..491 'opt': Opt<u8> 1759 487..490 'opt': Opt<u8>
1760488..498 'opt.map(f)': Opt<FnOnce::Output<fn(u8) -> u32, (u8,)>> 1760 487..497 'opt.map(f)': Opt<FnOnce::Output<fn(u8) -> u32, (u8,)>>
1761496..497 'f': fn(u8) -> u32 1761 495..496 'f': fn(u8) -> u32
1762"### 1762 "###
1763 ); 1763 );
1764} 1764}
1765 1765
@@ -1808,32 +1808,32 @@ fn test() {
1808} 1808}
1809"#), 1809"#),
1810 @r###" 1810 @r###"
1811 65..69 'self': &Self 1811 64..68 'self': &Self
1812 166..170 'self': Self 1812 165..169 'self': Self
1813 172..176 'args': Args 1813 171..175 'args': Args
1814 240..244 'self': &Foo 1814 239..243 'self': &Foo
1815 255..257 '{}': () 1815 254..256 '{}': ()
1816 335..336 'f': F 1816 334..335 'f': F
1817 355..357 '{}': () 1817 354..356 '{}': ()
1818 444..690 '{ ...o(); }': () 1818 443..689 '{ ...o(); }': ()
1819 454..459 'lazy1': Lazy<Foo, || -> Foo> 1819 453..458 'lazy1': Lazy<Foo, || -> Foo>
1820 476..485 'Lazy::new': fn new<Foo, || -> Foo>(|| -> Foo) -> Lazy<Foo, || -> Foo> 1820 475..484 'Lazy::new': fn new<Foo, || -> Foo>(|| -> Foo) -> Lazy<Foo, || -> Foo>
1821 476..493 'Lazy::...| Foo)': Lazy<Foo, || -> Foo> 1821 475..492 'Lazy::...| Foo)': Lazy<Foo, || -> Foo>
1822 486..492 '|| Foo': || -> Foo 1822 485..491 '|| Foo': || -> Foo
1823 489..492 'Foo': Foo 1823 488..491 'Foo': Foo
1824 503..505 'r1': usize 1824 502..504 'r1': usize
1825 508..513 'lazy1': Lazy<Foo, || -> Foo> 1825 507..512 'lazy1': Lazy<Foo, || -> Foo>
1826 508..519 'lazy1.foo()': usize 1826 507..518 'lazy1.foo()': usize
1827 561..576 'make_foo_fn_ptr': fn() -> Foo 1827 560..575 'make_foo_fn_ptr': fn() -> Foo
1828 592..603 'make_foo_fn': fn make_foo_fn() -> Foo 1828 591..602 'make_foo_fn': fn make_foo_fn() -> Foo
1829 613..618 'lazy2': Lazy<Foo, fn() -> Foo> 1829 612..617 'lazy2': Lazy<Foo, fn() -> Foo>
1830 635..644 'Lazy::new': fn new<Foo, fn() -> Foo>(fn() -> Foo) -> Lazy<Foo, fn() -> Foo> 1830 634..643 'Lazy::new': fn new<Foo, fn() -> Foo>(fn() -> Foo) -> Lazy<Foo, fn() -> Foo>
1831 635..661 'Lazy::...n_ptr)': Lazy<Foo, fn() -> Foo> 1831 634..660 'Lazy::...n_ptr)': Lazy<Foo, fn() -> Foo>
1832 645..660 'make_foo_fn_ptr': fn() -> Foo 1832 644..659 'make_foo_fn_ptr': fn() -> Foo
1833 671..673 'r2': {unknown} 1833 670..672 'r2': {unknown}
1834 676..681 'lazy2': Lazy<Foo, fn() -> Foo> 1834 675..680 'lazy2': Lazy<Foo, fn() -> Foo>
1835 676..687 'lazy2.foo()': {unknown} 1835 675..686 'lazy2.foo()': {unknown}
1836 550..552 '{}': () 1836 549..551 '{}': ()
1837 "### 1837 "###
1838 ); 1838 );
1839} 1839}
@@ -1860,32 +1860,32 @@ fn test() {
1860} 1860}
1861"#), 1861"#),
1862 @r###" 1862 @r###"
1863 148..152 'self': Option<T> 1863 147..151 'self': Option<T>
1864 154..155 'f': F 1864 153..154 'f': F
1865 173..175 '{}': () 1865 172..174 '{}': ()
1866 189..308 '{ ... 1); }': () 1866 188..307 '{ ... 1); }': ()
1867 199..200 'x': Option<u32> 1867 198..199 'x': Option<u32>
1868 203..215 'Option::Some': Some<u32>(u32) -> Option<u32> 1868 202..214 'Option::Some': Some<u32>(u32) -> Option<u32>
1869 203..221 'Option...(1u32)': Option<u32> 1869 202..220 'Option...(1u32)': Option<u32>
1870 216..220 '1u32': u32 1870 215..219 '1u32': u32
1871 227..228 'x': Option<u32> 1871 226..227 'x': Option<u32>
1872 227..243 'x.map(...v + 1)': Option<u32> 1872 226..242 'x.map(...v + 1)': Option<u32>
1873 233..242 '|v| v + 1': |u32| -> u32 1873 232..241 '|v| v + 1': |u32| -> u32
1874 234..235 'v': u32 1874 233..234 'v': u32
1875 237..238 'v': u32 1875 236..237 'v': u32
1876 237..242 'v + 1': u32 1876 236..241 'v + 1': u32
1877 241..242 '1': u32 1877 240..241 '1': u32
1878 249..250 'x': Option<u32> 1878 248..249 'x': Option<u32>
1879 249..265 'x.map(... 1u64)': Option<u64> 1879 248..264 'x.map(... 1u64)': Option<u64>
1880 255..264 '|_v| 1u64': |u32| -> u64 1880 254..263 '|_v| 1u64': |u32| -> u64
1881 256..258 '_v': u32 1881 255..257 '_v': u32
1882 260..264 '1u64': u64 1882 259..263 '1u64': u64
1883 275..276 'y': Option<i64> 1883 274..275 'y': Option<i64>
1884 292..293 'x': Option<u32> 1884 291..292 'x': Option<u32>
1885 292..305 'x.map(|_v| 1)': Option<i64> 1885 291..304 'x.map(|_v| 1)': Option<i64>
1886 298..304 '|_v| 1': |u32| -> i64 1886 297..303 '|_v| 1': |u32| -> i64
1887 299..301 '_v': u32 1887 298..300 '_v': u32
1888 303..304 '1': i64 1888 302..303 '1': i64
1889 "### 1889 "###
1890 ); 1890 );
1891} 1891}
@@ -1906,26 +1906,26 @@ fn test<F: FnOnce(u32) -> u64>(f: F) {
1906} 1906}
1907"#), 1907"#),
1908 @r###" 1908 @r###"
1909 73..74 'f': F 1909 72..73 'f': F
1910 79..155 '{ ...+ v; }': () 1910 78..154 '{ ...+ v; }': ()
1911 85..86 'f': F 1911 84..85 'f': F
1912 85..89 'f(1)': {unknown} 1912 84..88 'f(1)': {unknown}
1913 87..88 '1': i32 1913 86..87 '1': i32
1914 99..100 'g': |u64| -> i32 1914 98..99 'g': |u64| -> i32
1915 103..112 '|v| v + 1': |u64| -> i32 1915 102..111 '|v| v + 1': |u64| -> i32
1916 104..105 'v': u64 1916 103..104 'v': u64
1917 107..108 'v': u64 1917 106..107 'v': u64
1918 107..112 'v + 1': i32 1918 106..111 'v + 1': i32
1919 111..112 '1': i32 1919 110..111 '1': i32
1920 118..119 'g': |u64| -> i32 1920 117..118 'g': |u64| -> i32
1921 118..125 'g(1u64)': i32 1921 117..124 'g(1u64)': i32
1922 120..124 '1u64': u64 1922 119..123 '1u64': u64
1923 135..136 'h': |u128| -> u128 1923 134..135 'h': |u128| -> u128
1924 139..152 '|v| 1u128 + v': |u128| -> u128 1924 138..151 '|v| 1u128 + v': |u128| -> u128
1925 140..141 'v': u128 1925 139..140 'v': u128
1926 143..148 '1u128': u128 1926 142..147 '1u128': u128
1927 143..152 '1u128 + v': u128 1927 142..151 '1u128 + v': u128
1928 151..152 'v': u128 1928 150..151 'v': u128
1929 "### 1929 "###
1930 ); 1930 );
1931} 1931}
@@ -1958,54 +1958,54 @@ fn test() {
1958} 1958}
1959"#), 1959"#),
1960 @r###" 1960 @r###"
1961 95..96 'x': T 1961 94..95 'x': T
1962 101..102 'f': F 1962 100..101 'f': F
1963 112..114 '{}': () 1963 111..113 '{}': ()
1964 148..149 'f': F 1964 147..148 'f': F
1965 154..155 'x': T 1965 153..154 'x': T
1966 165..167 '{}': () 1966 164..166 '{}': ()
1967 202..206 'self': S 1967 201..205 'self': S
1968 254..258 'self': S 1968 253..257 'self': S
1969 260..261 'x': T 1969 259..260 'x': T
1970 266..267 'f': F 1970 265..266 'f': F
1971 277..279 '{}': () 1971 276..278 '{}': ()
1972 317..321 'self': S 1972 316..320 'self': S
1973 323..324 'f': F 1973 322..323 'f': F
1974 329..330 'x': T 1974 328..329 'x': T
1975 340..342 '{}': () 1975 339..341 '{}': ()
1976 356..515 '{ ... S); }': () 1976 355..514 '{ ... S); }': ()
1977 366..368 'x1': u64 1977 365..367 'x1': u64
1978 371..375 'foo1': fn foo1<S, u64, |S| -> u64>(S, |S| -> u64) -> u64 1978 370..374 'foo1': fn foo1<S, u64, |S| -> u64>(S, |S| -> u64) -> u64
1979 371..394 'foo1(S...hod())': u64 1979 370..393 'foo1(S...hod())': u64
1980 376..377 'S': S 1980 375..376 'S': S
1981 379..393 '|s| s.method()': |S| -> u64 1981 378..392 '|s| s.method()': |S| -> u64
1982 380..381 's': S 1982 379..380 's': S
1983 383..384 's': S 1983 382..383 's': S
1984 383..393 's.method()': u64 1984 382..392 's.method()': u64
1985 404..406 'x2': u64 1985 403..405 'x2': u64
1986 409..413 'foo2': fn foo2<S, u64, |S| -> u64>(|S| -> u64, S) -> u64 1986 408..412 'foo2': fn foo2<S, u64, |S| -> u64>(|S| -> u64, S) -> u64
1987 409..432 'foo2(|...(), S)': u64 1987 408..431 'foo2(|...(), S)': u64
1988 414..428 '|s| s.method()': |S| -> u64 1988 413..427 '|s| s.method()': |S| -> u64
1989 415..416 's': S 1989 414..415 's': S
1990 418..419 's': S 1990 417..418 's': S
1991 418..428 's.method()': u64 1991 417..427 's.method()': u64
1992 430..431 'S': S 1992 429..430 'S': S
1993 442..444 'x3': u64 1993 441..443 'x3': u64
1994 447..448 'S': S 1994 446..447 'S': S
1995 447..472 'S.foo1...hod())': u64 1995 446..471 'S.foo1...hod())': u64
1996 454..455 'S': S 1996 453..454 'S': S
1997 457..471 '|s| s.method()': |S| -> u64 1997 456..470 '|s| s.method()': |S| -> u64
1998 458..459 's': S 1998 457..458 's': S
1999 461..462 's': S 1999 460..461 's': S
2000 461..471 's.method()': u64 2000 460..470 's.method()': u64
2001 482..484 'x4': u64 2001 481..483 'x4': u64
2002 487..488 'S': S 2002 486..487 'S': S
2003 487..512 'S.foo2...(), S)': u64 2003 486..511 'S.foo2...(), S)': u64
2004 494..508 '|s| s.method()': |S| -> u64 2004 493..507 '|s| s.method()': |S| -> u64
2005 495..496 's': S 2005 494..495 's': S
2006 498..499 's': S 2006 497..498 's': S
2007 498..508 's.method()': u64 2007 497..507 's.method()': u64
2008 510..511 'S': S 2008 509..510 'S': S
2009 "### 2009 "###
2010 ); 2010 );
2011} 2011}
@@ -2080,18 +2080,18 @@ impl Trait for S2 {
2080} 2080}
2081"#, 2081"#,
2082 ), @r###" 2082 ), @r###"
2083 54..58 'self': &Self 2083 40..44 'self': &Self
2084 60..61 'x': Trait::Item<Self> 2084 46..47 'x': Trait::Item<Self>
2085 140..144 'self': &S 2085 126..130 'self': &S
2086 146..147 'x': u32 2086 132..133 'x': u32
2087 161..175 '{ let y = x; }': () 2087 147..161 '{ let y = x; }': ()
2088 167..168 'y': u32 2088 153..154 'y': u32
2089 171..172 'x': u32 2089 157..158 'x': u32
2090 242..246 'self': &S2 2090 228..232 'self': &S2
2091 248..249 'x': i32 2091 234..235 'x': i32
2092 265..279 '{ let y = x; }': () 2092 251..265 '{ let y = x; }': ()
2093 271..272 'y': i32 2093 257..258 'y': i32
2094 275..276 'x': i32 2094 261..262 'x': i32
2095 "###); 2095 "###);
2096} 2096}
2097 2097
@@ -2331,15 +2331,15 @@ impl TokenStream for Rustc {
2331} 2331}
2332"#), 2332"#),
2333 @r###" 2333 @r###"
2334 1062..1073 '{ loop {} }': T 2334 1061..1072 '{ loop {} }': T
2335 1064..1071 'loop {}': ! 2335 1063..1070 'loop {}': !
2336 1069..1071 '{}': () 2336 1068..1070 '{}': ()
2337 1137..1200 '{ ... }': T 2337 1136..1199 '{ ... }': T
2338 1151..1156 'group': G 2338 1150..1155 'group': G
2339 1172..1176 'make': fn make<G>() -> G 2339 1171..1175 'make': fn make<G>() -> G
2340 1172..1178 'make()': G 2340 1171..1177 'make()': G
2341 1188..1192 'make': fn make<T>() -> T 2341 1187..1191 'make': fn make<T>() -> T
2342 1188..1194 'make()': T 2342 1187..1193 'make()': T
2343 "### 2343 "###
2344 ); 2344 );
2345} 2345}
@@ -2366,37 +2366,37 @@ fn test() -> impl Trait<i32> {
2366} 2366}
2367"#, true), 2367"#, true),
2368 @r###" 2368 @r###"
2369 27..28 'x': impl Trait<u32> 2369 26..27 'x': impl Trait<u32>
2370 47..58 '{ loop {} }': () 2370 46..57 '{ loop {} }': ()
2371 49..56 'loop {}': ! 2371 48..55 'loop {}': !
2372 54..56 '{}': () 2372 53..55 '{}': ()
2373 69..70 'x': impl Trait<T> 2373 68..69 'x': impl Trait<T>
2374 92..103 '{ loop {} }': T 2374 91..102 '{ loop {} }': T
2375 94..101 'loop {}': ! 2375 93..100 'loop {}': !
2376 99..101 '{}': () 2376 98..100 '{}': ()
2377 172..183 '{ loop {} }': T 2377 171..182 '{ loop {} }': T
2378 174..181 'loop {}': ! 2378 173..180 'loop {}': !
2379 179..181 '{}': () 2379 178..180 '{}': ()
2380 214..310 '{ ...t()) }': S<{unknown}> 2380 213..309 '{ ...t()) }': S<{unknown}>
2381 224..226 's1': S<u32> 2381 223..225 's1': S<u32>
2382 229..230 'S': S<u32>(u32) -> S<u32> 2382 228..229 'S': S<u32>(u32) -> S<u32>
2383 229..241 'S(default())': S<u32> 2383 228..240 'S(default())': S<u32>
2384 231..238 'default': fn default<u32>() -> u32 2384 230..237 'default': fn default<u32>() -> u32
2385 231..240 'default()': u32 2385 230..239 'default()': u32
2386 247..250 'foo': fn foo(S<u32>) 2386 246..249 'foo': fn foo(S<u32>)
2387 247..254 'foo(s1)': () 2387 246..253 'foo(s1)': ()
2388 251..253 's1': S<u32> 2388 250..252 's1': S<u32>
2389 264..265 'x': i32 2389 263..264 'x': i32
2390 273..276 'bar': fn bar<i32>(S<i32>) -> i32 2390 272..275 'bar': fn bar<i32>(S<i32>) -> i32
2391 273..290 'bar(S(...lt()))': i32 2391 272..289 'bar(S(...lt()))': i32
2392 277..278 'S': S<i32>(i32) -> S<i32> 2392 276..277 'S': S<i32>(i32) -> S<i32>
2393 277..289 'S(default())': S<i32> 2393 276..288 'S(default())': S<i32>
2394 279..286 'default': fn default<i32>() -> i32 2394 278..285 'default': fn default<i32>() -> i32
2395 279..288 'default()': i32 2395 278..287 'default()': i32
2396 296..297 'S': S<{unknown}>({unknown}) -> S<{unknown}> 2396 295..296 'S': S<{unknown}>({unknown}) -> S<{unknown}>
2397 296..308 'S(default())': S<{unknown}> 2397 295..307 'S(default())': S<{unknown}>
2398 298..305 'default': fn default<{unknown}>() -> {unknown} 2398 297..304 'default': fn default<{unknown}>() -> {unknown}
2399 298..307 'default()': {unknown} 2399 297..306 'default()': {unknown}
2400 "### 2400 "###
2401 ); 2401 );
2402} 2402}
@@ -2430,15 +2430,15 @@ fn main() {
2430} 2430}
2431"#), 2431"#),
2432 @r###" 2432 @r###"
2433 147..149 '_v': F 2433 133..135 '_v': F
2434 192..195 '{ }': () 2434 178..181 '{ }': ()
2435 207..238 '{ ... }); }': () 2435 193..224 '{ ... }); }': ()
2436 213..223 'f::<(), _>': fn f<(), |&()| -> ()>(|&()| -> ()) 2436 199..209 'f::<(), _>': fn f<(), |&()| -> ()>(|&()| -> ())
2437 213..235 'f::<()... z; })': () 2437 199..221 'f::<()... z; })': ()
2438 224..234 '|z| { z; }': |&()| -> () 2438 210..220 '|z| { z; }': |&()| -> ()
2439 225..226 'z': &() 2439 211..212 'z': &()
2440 228..234 '{ z; }': () 2440 214..220 '{ z; }': ()
2441 230..231 'z': &() 2441 216..217 'z': &()
2442 "### 2442 "###
2443 ); 2443 );
2444} 2444}
@@ -2591,46 +2591,46 @@ fn main() {
2591} 2591}
2592"#), 2592"#),
2593 @r###" 2593 @r###"
2594 240..244 'self': Self 2594 226..230 'self': Self
2595 246..247 'f': F 2595 232..233 'f': F
2596 331..342 '{ loop {} }': FilterMap<Self, F> 2596 317..328 '{ loop {} }': FilterMap<Self, F>
2597 333..340 'loop {}': ! 2597 319..326 'loop {}': !
2598 338..340 '{}': () 2598 324..326 '{}': ()
2599 363..367 'self': Self 2599 349..353 'self': Self
2600 369..370 'f': F 2600 355..356 'f': F
2601 419..430 '{ loop {} }': () 2601 405..416 '{ loop {} }': ()
2602 421..428 'loop {}': ! 2602 407..414 'loop {}': !
2603 426..428 '{}': () 2603 412..414 '{}': ()
2604 539..543 'self': Self 2604 525..529 'self': Self
2605 868..872 'self': I 2605 854..858 'self': I
2606 879..899 '{ ... }': I 2606 865..885 '{ ... }': I
2607 889..893 'self': I 2607 875..879 'self': I
2608 958..969 '{ loop {} }': Vec<T> 2608 944..955 '{ loop {} }': Vec<T>
2609 960..967 'loop {}': ! 2609 946..953 'loop {}': !
2610 965..967 '{}': () 2610 951..953 '{}': ()
2611 1156..1287 '{ ... }); }': () 2611 1142..1273 '{ ... }); }': ()
2612 1162..1177 'Vec::<i32>::new': fn new<i32>() -> Vec<i32> 2612 1148..1163 'Vec::<i32>::new': fn new<i32>() -> Vec<i32>
2613 1162..1179 'Vec::<...:new()': Vec<i32> 2613 1148..1165 'Vec::<...:new()': Vec<i32>
2614 1162..1191 'Vec::<...iter()': IntoIter<i32> 2614 1148..1177 'Vec::<...iter()': IntoIter<i32>
2615 1162..1256 'Vec::<...one })': FilterMap<IntoIter<i32>, |i32| -> Option<u32>> 2615 1148..1242 'Vec::<...one })': FilterMap<IntoIter<i32>, |i32| -> Option<u32>>
2616 1162..1284 'Vec::<... y; })': () 2616 1148..1270 'Vec::<... y; })': ()
2617 1210..1255 '|x| if...None }': |i32| -> Option<u32> 2617 1196..1241 '|x| if...None }': |i32| -> Option<u32>
2618 1211..1212 'x': i32 2618 1197..1198 'x': i32
2619 1214..1255 'if x >...None }': Option<u32> 2619 1200..1241 'if x >...None }': Option<u32>
2620 1217..1218 'x': i32 2620 1203..1204 'x': i32
2621 1217..1222 'x > 0': bool 2621 1203..1208 'x > 0': bool
2622 1221..1222 '0': i32 2622 1207..1208 '0': i32
2623 1223..1241 '{ Some...u32) }': Option<u32> 2623 1209..1227 '{ Some...u32) }': Option<u32>
2624 1225..1229 'Some': Some<u32>(u32) -> Option<u32> 2624 1211..1215 'Some': Some<u32>(u32) -> Option<u32>
2625 1225..1239 'Some(x as u32)': Option<u32> 2625 1211..1225 'Some(x as u32)': Option<u32>
2626 1230..1231 'x': i32 2626 1216..1217 'x': i32
2627 1230..1238 'x as u32': u32 2627 1216..1224 'x as u32': u32
2628 1247..1255 '{ None }': Option<u32> 2628 1233..1241 '{ None }': Option<u32>
2629 1249..1253 'None': Option<u32> 2629 1235..1239 'None': Option<u32>
2630 1273..1283 '|y| { y; }': |u32| -> () 2630 1259..1269 '|y| { y; }': |u32| -> ()
2631 1274..1275 'y': u32 2631 1260..1261 'y': u32
2632 1277..1283 '{ y; }': () 2632 1263..1269 '{ y; }': ()
2633 1279..1280 'y': u32 2633 1265..1266 'y': u32
2634 "### 2634 "###
2635 ); 2635 );
2636} 2636}
@@ -2682,13 +2682,13 @@ fn test(x: &dyn Foo) {
2682} 2682}
2683"#, true), 2683"#, true),
2684 @r###" 2684 @r###"
2685 22..23 'x': &dyn Foo 2685 21..22 'x': &dyn Foo
2686 35..37 '{}': () 2686 34..36 '{}': ()
2687 47..48 'x': &dyn Foo 2687 46..47 'x': &dyn Foo
2688 60..75 '{ foo(x); }': () 2688 59..74 '{ foo(x); }': ()
2689 66..69 'foo': fn foo(&dyn Foo) 2689 65..68 'foo': fn foo(&dyn Foo)
2690 66..72 'foo(x)': () 2690 65..71 'foo(x)': ()
2691 70..71 'x': &dyn Foo 2691 69..70 'x': &dyn Foo
2692 "### 2692 "###
2693 ); 2693 );
2694} 2694}
@@ -2715,20 +2715,20 @@ fn test() {
2715} 2715}
2716"#, true), 2716"#, true),
2717 @r###" 2717 @r###"
2718 111..115 'self': &Self 2718 110..114 'self': &Self
2719 167..268 '{ ...t(); }': () 2719 166..267 '{ ...t(); }': ()
2720 173..179 'IsCopy': IsCopy 2720 172..178 'IsCopy': IsCopy
2721 173..186 'IsCopy.test()': bool 2721 172..185 'IsCopy.test()': bool
2722 192..199 'NotCopy': NotCopy 2722 191..198 'NotCopy': NotCopy
2723 192..206 'NotCopy.test()': {unknown} 2723 191..205 'NotCopy.test()': {unknown}
2724 212..228 '(IsCop...sCopy)': (IsCopy, IsCopy) 2724 211..227 '(IsCop...sCopy)': (IsCopy, IsCopy)
2725 212..235 '(IsCop...test()': bool 2725 211..234 '(IsCop...test()': bool
2726 213..219 'IsCopy': IsCopy 2726 212..218 'IsCopy': IsCopy
2727 221..227 'IsCopy': IsCopy 2727 220..226 'IsCopy': IsCopy
2728 241..258 '(IsCop...tCopy)': (IsCopy, NotCopy) 2728 240..257 '(IsCop...tCopy)': (IsCopy, NotCopy)
2729 241..265 '(IsCop...test()': {unknown} 2729 240..264 '(IsCop...test()': {unknown}
2730 242..248 'IsCopy': IsCopy 2730 241..247 'IsCopy': IsCopy
2731 250..257 'NotCopy': NotCopy 2731 249..256 'NotCopy': NotCopy
2732 "### 2732 "###
2733 ); 2733 );
2734} 2734}
@@ -2756,20 +2756,20 @@ fn test() {
2756} 2756}
2757"#, true), 2757"#, true),
2758 @r###" 2758 @r###"
2759 42..44 '{}': () 2759 41..43 '{}': ()
2760 61..62 'T': {unknown} 2760 60..61 'T': {unknown}
2761 69..71 '{}': () 2761 68..70 '{}': ()
2762 69..71: expected T, got () 2762 68..70: expected T, got ()
2763 146..150 'self': &Self 2763 145..149 'self': &Self
2764 202..282 '{ ...t(); }': () 2764 201..281 '{ ...t(); }': ()
2765 208..211 'foo': fn foo() 2765 207..210 'foo': fn foo()
2766 208..218 'foo.test()': bool 2766 207..217 'foo.test()': bool
2767 224..227 'bar': fn bar<{unknown}>({unknown}) -> {unknown} 2767 223..226 'bar': fn bar<{unknown}>({unknown}) -> {unknown}
2768 224..234 'bar.test()': bool 2768 223..233 'bar.test()': bool
2769 240..246 'Struct': Struct(usize) -> Struct 2769 239..245 'Struct': Struct(usize) -> Struct
2770 240..253 'Struct.test()': bool 2770 239..252 'Struct.test()': bool
2771 259..272 'Enum::Variant': Variant(usize) -> Enum 2771 258..271 'Enum::Variant': Variant(usize) -> Enum
2772 259..279 'Enum::...test()': bool 2772 258..278 'Enum::...test()': bool
2773 "### 2773 "###
2774 ); 2774 );
2775} 2775}
@@ -2791,17 +2791,17 @@ fn test(f1: fn(), f2: fn(usize) -> u8, f3: fn(u8, u8) -> &u8) {
2791} 2791}
2792"#, true), 2792"#, true),
2793 @r###" 2793 @r###"
2794 55..59 'self': &Self 2794 54..58 'self': &Self
2795 109..111 'f1': fn() 2795 108..110 'f1': fn()
2796 119..121 'f2': fn(usize) -> u8 2796 118..120 'f2': fn(usize) -> u8
2797 140..142 'f3': fn(u8, u8) -> &u8 2797 139..141 'f3': fn(u8, u8) -> &u8
2798 163..211 '{ ...t(); }': () 2798 162..210 '{ ...t(); }': ()
2799 169..171 'f1': fn() 2799 168..170 'f1': fn()
2800 169..178 'f1.test()': bool 2800 168..177 'f1.test()': bool
2801 184..186 'f2': fn(usize) -> u8 2801 183..185 'f2': fn(usize) -> u8
2802 184..193 'f2.test()': bool 2802 183..192 'f2.test()': bool
2803 199..201 'f3': fn(u8, u8) -> &u8 2803 198..200 'f3': fn(u8, u8) -> &u8
2804 199..208 'f3.test()': bool 2804 198..207 'f3.test()': bool
2805 "### 2805 "###
2806 ); 2806 );
2807} 2807}
@@ -2824,22 +2824,22 @@ fn test() {
2824} 2824}
2825"#, true), 2825"#, true),
2826 @r###" 2826 @r###"
2827 57..61 'self': &Self 2827 56..60 'self': &Self
2828 114..229 '{ ...ized }': () 2828 113..228 '{ ...ized }': ()
2829 120..123 '1u8': u8 2829 119..122 '1u8': u8
2830 120..130 '1u8.test()': bool 2830 119..129 '1u8.test()': bool
2831 136..151 '(*"foo").test()': {unknown} 2831 135..150 '(*"foo").test()': {unknown}
2832 137..143 '*"foo"': str 2832 136..142 '*"foo"': str
2833 138..143 '"foo"': &str 2833 137..142 '"foo"': &str
2834 170..180 '(1u8, 1u8)': (u8, u8) 2834 169..179 '(1u8, 1u8)': (u8, u8)
2835 170..187 '(1u8, ...test()': bool 2835 169..186 '(1u8, ...test()': bool
2836 171..174 '1u8': u8 2836 170..173 '1u8': u8
2837 176..179 '1u8': u8 2837 175..178 '1u8': u8
2838 193..206 '(1u8, *"foo")': (u8, str) 2838 192..205 '(1u8, *"foo")': (u8, str)
2839 193..213 '(1u8, ...test()': {unknown} 2839 192..212 '(1u8, ...test()': {unknown}
2840 194..197 '1u8': u8 2840 193..196 '1u8': u8
2841 199..205 '*"foo"': str 2841 198..204 '*"foo"': str
2842 200..205 '"foo"': &str 2842 199..204 '"foo"': &str
2843 "### 2843 "###
2844 ); 2844 );
2845} 2845}
@@ -2909,17 +2909,17 @@ fn infer_closure_arg() {
2909 "# 2909 "#
2910 ), 2910 ),
2911 @r###" 2911 @r###"
2912 137..259 '{ ... }': () 2912 52..126 '{ ...)(s) }': ()
2913 159..160 's': Option<i32> 2913 62..63 's': Option<i32>
2914 163..175 'Option::None': Option<i32> 2914 66..78 'Option::None': Option<i32>
2915 197..198 'f': |Option<i32>| -> () 2915 88..89 'f': |Option<i32>| -> ()
2916 201..220 '|x: Op...2>| {}': |Option<i32>| -> () 2916 92..111 '|x: Op...2>| {}': |Option<i32>| -> ()
2917 202..203 'x': Option<i32> 2917 93..94 'x': Option<i32>
2918 218..220 '{}': () 2918 109..111 '{}': ()
2919 238..245 '(&f)(s)': () 2919 117..124 '(&f)(s)': ()
2920 239..241 '&f': &|Option<i32>| -> () 2920 118..120 '&f': &|Option<i32>| -> ()
2921 240..241 'f': |Option<i32>| -> () 2921 119..120 'f': |Option<i32>| -> ()
2922 243..244 's': Option<i32> 2922 122..123 's': Option<i32>
2923 "### 2923 "###
2924 ); 2924 );
2925} 2925}
@@ -2958,17 +2958,17 @@ fn infer_fn_trait_arg() {
2958 "# 2958 "#
2959 ), 2959 ),
2960 @r###" 2960 @r###"
2961 183..187 'self': &Self 2961 101..105 'self': &Self
2962 189..193 'args': Args 2962 107..111 'args': Args
2963 350..354 'self': &Self 2963 220..224 'self': &Self
2964 356..360 'args': Args 2964 226..230 'args': Args
2965 515..516 'f': F 2965 313..314 'f': F
2966 597..663 '{ ... }': T 2966 359..389 '{ ...f(s) }': T
2967 619..620 's': Option<i32> 2967 369..370 's': Option<i32>
2968 623..627 'None': Option<i32> 2968 373..377 'None': Option<i32>
2969 645..646 'f': F 2969 383..384 'f': F
2970 645..649 'f(s)': T 2970 383..387 'f(s)': T
2971 647..648 's': Option<i32> 2971 385..386 's': Option<i32>
2972 "### 2972 "###
2973 ); 2973 );
2974} 2974}
@@ -3020,26 +3020,26 @@ fn infer_box_fn_arg() {
3020 "# 3020 "#
3021 ), 3021 ),
3022 @r###" 3022 @r###"
3023 182..186 'self': Self 3023 100..104 'self': Self
3024 188..192 'args': Args 3024 106..110 'args': Args
3025 356..360 'self': &Self 3025 214..218 'self': &Self
3026 622..626 'self': &Box<T> 3026 384..388 'self': &Box<T>
3027 634..685 '{ ... }': &T 3027 396..423 '{ ... }': &T
3028 656..667 '&self.inner': &*mut T 3028 406..417 '&self.inner': &*mut T
3029 657..661 'self': &Box<T> 3029 407..411 'self': &Box<T>
3030 657..667 'self.inner': *mut T 3030 407..417 'self.inner': *mut T
3031 812..957 '{ ... }': FnOnce::Output<dyn FnOnce<(&Option<i32>,)>, (&Option<i32>,)> 3031 478..575 '{ ...(&s) }': FnOnce::Output<dyn FnOnce<(&Option<i32>,)>, (&Option<i32>,)>
3032 834..835 's': Option<i32> 3032 488..489 's': Option<i32>
3033 838..850 'Option::None': Option<i32> 3033 492..504 'Option::None': Option<i32>
3034 872..873 'f': Box<dyn FnOnce<(&Option<i32>,)>> 3034 514..515 'f': Box<dyn FnOnce<(&Option<i32>,)>>
3035 907..920 'box (|ps| {})': Box<|{unknown}| -> ()> 3035 549..562 'box (|ps| {})': Box<|{unknown}| -> ()>
3036 912..919 '|ps| {}': |{unknown}| -> () 3036 554..561 '|ps| {}': |{unknown}| -> ()
3037 913..915 'ps': {unknown} 3037 555..557 'ps': {unknown}
3038 917..919 '{}': () 3038 559..561 '{}': ()
3039 938..939 'f': Box<dyn FnOnce<(&Option<i32>,)>> 3039 568..569 'f': Box<dyn FnOnce<(&Option<i32>,)>>
3040 938..943 'f(&s)': FnOnce::Output<dyn FnOnce<(&Option<i32>,)>, (&Option<i32>,)> 3040 568..573 'f(&s)': FnOnce::Output<dyn FnOnce<(&Option<i32>,)>, (&Option<i32>,)>
3041 940..942 '&s': &Option<i32> 3041 570..572 '&s': &Option<i32>
3042 941..942 's': Option<i32> 3042 571..572 's': Option<i32>
3043 "### 3043 "###
3044 ); 3044 );
3045} 3045}
@@ -3090,24 +3090,24 @@ fn infer_dyn_fn_output() {
3090 "# 3090 "#
3091 ), 3091 ),
3092 @r###" 3092 @r###"
3093 182..186 'self': Self 3093 100..104 'self': Self
3094 188..192 'args': Args 3094 106..110 'args': Args
3095 349..353 'self': &Self 3095 219..223 'self': &Self
3096 355..359 'args': Args 3096 225..229 'args': Args
3097 523..527 'self': &Self 3097 333..337 'self': &Self
3098 789..793 'self': &Box<T> 3098 503..507 'self': &Box<T>
3099 801..852 '{ ... }': &T 3099 515..542 '{ ... }': &T
3100 823..834 '&self.inner': &*mut T 3100 525..536 '&self.inner': &*mut T
3101 824..828 'self': &Box<T> 3101 526..530 'self': &Box<T>
3102 824..834 'self.inner': *mut T 3102 526..536 'self.inner': *mut T
3103 889..990 '{ ... }': () 3103 555..620 '{ ...f(); }': ()
3104 911..912 'f': Box<dyn Fn<(), Output = i32>> 3104 565..566 'f': Box<dyn Fn<(), Output = i32>>
3105 937..946 'box(|| 5)': Box<|| -> i32> 3105 591..600 'box(|| 5)': Box<|| -> i32>
3106 941..945 '|| 5': || -> i32 3106 595..599 '|| 5': || -> i32
3107 944..945 '5': i32 3107 598..599 '5': i32
3108 968..969 'x': FnOnce::Output<dyn Fn<(), Output = i32>, ()> 3108 610..611 'x': FnOnce::Output<dyn Fn<(), Output = i32>, ()>
3109 972..973 'f': Box<dyn Fn<(), Output = i32>> 3109 614..615 'f': Box<dyn Fn<(), Output = i32>>
3110 972..975 'f()': FnOnce::Output<dyn Fn<(), Output = i32>, ()> 3110 614..617 'f()': FnOnce::Output<dyn Fn<(), Output = i32>, ()>
3111 "### 3111 "###
3112 ); 3112 );
3113} 3113}