diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-19 18:03:36 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-19 18:03:36 +0000 |
commit | 1c296d54e3dcc36c1a778873f26035000a352ba2 (patch) | |
tree | 0a6ce660ee32080287284c93bffaaaada91f3584 /crates/ra_hir/src/ty/tests/data/struct_generics.txt | |
parent | bade91db081a3465dea3547ab8ab669f78fde9dc (diff) | |
parent | 5f3509e140d19b989db418a00ac6778c622cde5d (diff) |
Merge #576
576: Beginnings of generics r=matklad a=flodiebold
This implements the beginnings of the generics infrastructure; generic parameters for structs work and are correctly substituted in fields. Functions and methods aren't handled at all yet (as the tests show).
The name resolution in `ty` really needs refactoring now, I hope to do that next ;)
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/tests/data/struct_generics.txt')
-rw-r--r-- | crates/ra_hir/src/ty/tests/data/struct_generics.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests/data/struct_generics.txt b/crates/ra_hir/src/ty/tests/data/struct_generics.txt new file mode 100644 index 000000000..1024a39a9 --- /dev/null +++ b/crates/ra_hir/src/ty/tests/data/struct_generics.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | [36; 38) 'a1': A<u32> | ||
2 | [48; 49) 'i': i32 | ||
3 | [56; 147) '{ ...3.x; }': () | ||
4 | [62; 64) 'a1': A<u32> | ||
5 | [62; 66) 'a1.x': u32 | ||
6 | [76; 78) 'a2': A<i32> | ||
7 | [81; 91) 'A { x: i }': A<i32> | ||
8 | [88; 89) 'i': i32 | ||
9 | [97; 99) 'a2': A<i32> | ||
10 | [97; 101) 'a2.x': i32 | ||
11 | [111; 113) 'a3': A<i128> | ||
12 | [116; 134) 'A::<i1...x: 1 }': A<i128> | ||
13 | [131; 132) '1': i128 | ||
14 | [140; 142) 'a3': A<i128> | ||
15 | [140; 144) 'a3.x': i128 | ||