diff options
Diffstat (limited to 'crates/hir_ty/src/tests/simple.rs')
-rw-r--r-- | crates/hir_ty/src/tests/simple.rs | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/crates/hir_ty/src/tests/simple.rs b/crates/hir_ty/src/tests/simple.rs index 0eefd70f2..8b09f2e4a 100644 --- a/crates/hir_ty/src/tests/simple.rs +++ b/crates/hir_ty/src/tests/simple.rs | |||
@@ -11,7 +11,7 @@ fn test() { | |||
11 | let x = box 1; | 11 | let x = box 1; |
12 | let t = (x, box x, box &1, box [1]); | 12 | let t = (x, box x, box &1, box [1]); |
13 | t; | 13 | t; |
14 | } //^ (Box<i32>, Box<Box<i32>>, Box<&i32>, Box<[i32; _]>) | 14 | } //^ (Box<i32>, Box<Box<i32>>, Box<&i32>, Box<[i32; 1]>) |
15 | 15 | ||
16 | //- /std.rs crate:std | 16 | //- /std.rs crate:std |
17 | #[prelude_import] use prelude::*; | 17 | #[prelude_import] use prelude::*; |
@@ -36,7 +36,7 @@ fn test() { | |||
36 | let x = box 1; | 36 | let x = box 1; |
37 | let t = (x, box x, box &1, box [1]); | 37 | let t = (x, box x, box &1, box [1]); |
38 | t; | 38 | t; |
39 | } //^ (Box<i32, {unknown}>, Box<Box<i32, {unknown}>, {unknown}>, Box<&i32, {unknown}>, Box<[i32; _], {unknown}>) | 39 | } //^ (Box<i32, {unknown}>, Box<Box<i32, {unknown}>, {unknown}>, Box<&i32, {unknown}>, Box<[i32; 1], {unknown}>) |
40 | 40 | ||
41 | //- /std.rs crate:std | 41 | //- /std.rs crate:std |
42 | #[prelude_import] use prelude::*; | 42 | #[prelude_import] use prelude::*; |
@@ -1266,55 +1266,55 @@ fn infer_array() { | |||
1266 | 8..9 'x': &str | 1266 | 8..9 'x': &str |
1267 | 17..18 'y': isize | 1267 | 17..18 'y': isize |
1268 | 27..292 '{ ... []; }': () | 1268 | 27..292 '{ ... []; }': () |
1269 | 37..38 'a': [&str; _] | 1269 | 37..38 'a': [&str; 1] |
1270 | 41..44 '[x]': [&str; _] | 1270 | 41..44 '[x]': [&str; 1] |
1271 | 42..43 'x': &str | 1271 | 42..43 'x': &str |
1272 | 54..55 'b': [[&str; _]; _] | 1272 | 54..55 'b': [[&str; 1]; 2] |
1273 | 58..64 '[a, a]': [[&str; _]; _] | 1273 | 58..64 '[a, a]': [[&str; 1]; 2] |
1274 | 59..60 'a': [&str; _] | 1274 | 59..60 'a': [&str; 1] |
1275 | 62..63 'a': [&str; _] | 1275 | 62..63 'a': [&str; 1] |
1276 | 74..75 'c': [[[&str; _]; _]; _] | 1276 | 74..75 'c': [[[&str; 1]; 2]; 2] |
1277 | 78..84 '[b, b]': [[[&str; _]; _]; _] | 1277 | 78..84 '[b, b]': [[[&str; 1]; 2]; 2] |
1278 | 79..80 'b': [[&str; _]; _] | 1278 | 79..80 'b': [[&str; 1]; 2] |
1279 | 82..83 'b': [[&str; _]; _] | 1279 | 82..83 'b': [[&str; 1]; 2] |
1280 | 95..96 'd': [isize; _] | 1280 | 95..96 'd': [isize; 4] |
1281 | 99..111 '[y, 1, 2, 3]': [isize; _] | 1281 | 99..111 '[y, 1, 2, 3]': [isize; 4] |
1282 | 100..101 'y': isize | 1282 | 100..101 'y': isize |
1283 | 103..104 '1': isize | 1283 | 103..104 '1': isize |
1284 | 106..107 '2': isize | 1284 | 106..107 '2': isize |
1285 | 109..110 '3': isize | 1285 | 109..110 '3': isize |
1286 | 121..122 'd': [isize; _] | 1286 | 121..122 'd': [isize; 4] |
1287 | 125..137 '[1, y, 2, 3]': [isize; _] | 1287 | 125..137 '[1, y, 2, 3]': [isize; 4] |
1288 | 126..127 '1': isize | 1288 | 126..127 '1': isize |
1289 | 129..130 'y': isize | 1289 | 129..130 'y': isize |
1290 | 132..133 '2': isize | 1290 | 132..133 '2': isize |
1291 | 135..136 '3': isize | 1291 | 135..136 '3': isize |
1292 | 147..148 'e': [isize; _] | 1292 | 147..148 'e': [isize; 1] |
1293 | 151..154 '[y]': [isize; _] | 1293 | 151..154 '[y]': [isize; 1] |
1294 | 152..153 'y': isize | 1294 | 152..153 'y': isize |
1295 | 164..165 'f': [[isize; _]; _] | 1295 | 164..165 'f': [[isize; 4]; 2] |
1296 | 168..174 '[d, d]': [[isize; _]; _] | 1296 | 168..174 '[d, d]': [[isize; 4]; 2] |
1297 | 169..170 'd': [isize; _] | 1297 | 169..170 'd': [isize; 4] |
1298 | 172..173 'd': [isize; _] | 1298 | 172..173 'd': [isize; 4] |
1299 | 184..185 'g': [[isize; _]; _] | 1299 | 184..185 'g': [[isize; 1]; 2] |
1300 | 188..194 '[e, e]': [[isize; _]; _] | 1300 | 188..194 '[e, e]': [[isize; 1]; 2] |
1301 | 189..190 'e': [isize; _] | 1301 | 189..190 'e': [isize; 1] |
1302 | 192..193 'e': [isize; _] | 1302 | 192..193 'e': [isize; 1] |
1303 | 205..206 'h': [i32; _] | 1303 | 205..206 'h': [i32; 2] |
1304 | 209..215 '[1, 2]': [i32; _] | 1304 | 209..215 '[1, 2]': [i32; 2] |
1305 | 210..211 '1': i32 | 1305 | 210..211 '1': i32 |
1306 | 213..214 '2': i32 | 1306 | 213..214 '2': i32 |
1307 | 225..226 'i': [&str; _] | 1307 | 225..226 'i': [&str; 2] |
1308 | 229..239 '["a", "b"]': [&str; _] | 1308 | 229..239 '["a", "b"]': [&str; 2] |
1309 | 230..233 '"a"': &str | 1309 | 230..233 '"a"': &str |
1310 | 235..238 '"b"': &str | 1310 | 235..238 '"b"': &str |
1311 | 250..251 'b': [[&str; _]; _] | 1311 | 250..251 'b': [[&str; 1]; 2] |
1312 | 254..264 '[a, ["b"]]': [[&str; _]; _] | 1312 | 254..264 '[a, ["b"]]': [[&str; 1]; 2] |
1313 | 255..256 'a': [&str; _] | 1313 | 255..256 'a': [&str; 1] |
1314 | 258..263 '["b"]': [&str; _] | 1314 | 258..263 '["b"]': [&str; 1] |
1315 | 259..262 '"b"': &str | 1315 | 259..262 '"b"': &str |
1316 | 274..275 'x': [u8; _] | 1316 | 274..275 'x': [u8; _] |
1317 | 287..289 '[]': [u8; _] | 1317 | 287..289 '[]': [u8; 0] |
1318 | "#]], | 1318 | "#]], |
1319 | ); | 1319 | ); |
1320 | } | 1320 | } |
@@ -2429,20 +2429,20 @@ fn infer_operator_overload() { | |||
2429 | 394..395 '1': i32 | 2429 | 394..395 '1': i32 |
2430 | 406..408 'V2': V2([f32; _]) -> V2 | 2430 | 406..408 'V2': V2([f32; _]) -> V2 |
2431 | 406..416 'V2([x, y])': V2 | 2431 | 406..416 'V2([x, y])': V2 |
2432 | 409..415 '[x, y]': [f32; _] | 2432 | 409..415 '[x, y]': [f32; 2] |
2433 | 410..411 'x': f32 | 2433 | 410..411 'x': f32 |
2434 | 413..414 'y': f32 | 2434 | 413..414 'y': f32 |
2435 | 436..519 '{ ... vb; }': () | 2435 | 436..519 '{ ... vb; }': () |
2436 | 446..448 'va': V2 | 2436 | 446..448 'va': V2 |
2437 | 451..453 'V2': V2([f32; _]) -> V2 | 2437 | 451..453 'V2': V2([f32; _]) -> V2 |
2438 | 451..465 'V2([0.0, 1.0])': V2 | 2438 | 451..465 'V2([0.0, 1.0])': V2 |
2439 | 454..464 '[0.0, 1.0]': [f32; _] | 2439 | 454..464 '[0.0, 1.0]': [f32; 2] |
2440 | 455..458 '0.0': f32 | 2440 | 455..458 '0.0': f32 |
2441 | 460..463 '1.0': f32 | 2441 | 460..463 '1.0': f32 |
2442 | 475..477 'vb': V2 | 2442 | 475..477 'vb': V2 |
2443 | 480..482 'V2': V2([f32; _]) -> V2 | 2443 | 480..482 'V2': V2([f32; _]) -> V2 |
2444 | 480..494 'V2([0.0, 1.0])': V2 | 2444 | 480..494 'V2([0.0, 1.0])': V2 |
2445 | 483..493 '[0.0, 1.0]': [f32; _] | 2445 | 483..493 '[0.0, 1.0]': [f32; 2] |
2446 | 484..487 '0.0': f32 | 2446 | 484..487 '0.0': f32 |
2447 | 489..492 '1.0': f32 | 2447 | 489..492 '1.0': f32 |
2448 | 505..506 'r': V2 | 2448 | 505..506 'r': V2 |
@@ -2593,8 +2593,8 @@ fn test() { | |||
2593 | 658..661 'vec': Vec<i32, Global> | 2593 | 658..661 'vec': Vec<i32, Global> |
2594 | 664..679 '<[_]>::into_vec': fn into_vec<i32, Global>(Box<[i32], Global>) -> Vec<i32, Global> | 2594 | 664..679 '<[_]>::into_vec': fn into_vec<i32, Global>(Box<[i32], Global>) -> Vec<i32, Global> |
2595 | 664..691 '<[_]>:...1i32])': Vec<i32, Global> | 2595 | 664..691 '<[_]>:...1i32])': Vec<i32, Global> |
2596 | 680..690 'box [1i32]': Box<[i32; _], Global> | 2596 | 680..690 'box [1i32]': Box<[i32; 1], Global> |
2597 | 684..690 '[1i32]': [i32; _] | 2597 | 684..690 '[1i32]': [i32; 1] |
2598 | 685..689 '1i32': i32 | 2598 | 685..689 '1i32': i32 |
2599 | "#]], | 2599 | "#]], |
2600 | ) | 2600 | ) |