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/generics_in_patterns.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/generics_in_patterns.txt')
-rw-r--r-- | crates/ra_hir/src/ty/tests/data/generics_in_patterns.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests/data/generics_in_patterns.txt b/crates/ra_hir/src/ty/tests/data/generics_in_patterns.txt new file mode 100644 index 000000000..1b01ef19e --- /dev/null +++ b/crates/ra_hir/src/ty/tests/data/generics_in_patterns.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | [79; 81) 'a1': A<u32> | ||
2 | [91; 92) 'o': Option<u64> | ||
3 | [107; 244) '{ ... }; }': () | ||
4 | [117; 128) 'A { x: x2 }': A<u32> | ||
5 | [124; 126) 'x2': u32 | ||
6 | [131; 133) 'a1': A<u32> | ||
7 | [143; 161) 'A::<i6...: x3 }': A<i64> | ||
8 | [157; 159) 'x3': i64 | ||
9 | [164; 174) 'A { x: 1 }': A<i64> | ||
10 | [171; 172) '1': i64 | ||
11 | [180; 241) 'match ... }': u64 | ||
12 | [186; 187) 'o': Option<u64> | ||
13 | [198; 213) 'Option::Some(t)': Option<u64> | ||
14 | [211; 212) 't': u64 | ||
15 | [217; 218) 't': u64 | ||
16 | [228; 229) '_': Option<u64> | ||
17 | [233; 234) '1': u64 | ||