diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-27 10:08:34 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-27 10:08:34 +0000 |
commit | 1d6dcef5c584d0dffdf5386eec993e41daad0210 (patch) | |
tree | 1e67675b7031115b1811863d0f186ad1f98b1fce /crates/ra_hir/src/ty/tests/data/0004_struct.txt | |
parent | 700165cf17290561dea511565278b9869ed61625 (diff) | |
parent | bc745a139674f289386f3081458793f756cab5b9 (diff) |
Merge #332
332: Struct types r=matklad a=flodiebold
Infer types for struct fields, and add basic field completions. There's also some code for enums, but I focused on getting structs working.
There's still ways to go before this becomes useful: There's no autoderef (or even reference types) and no inference for `self`, for example.
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/tests/data/0004_struct.txt')
-rw-r--r-- | crates/ra_hir/src/ty/tests/data/0004_struct.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests/data/0004_struct.txt b/crates/ra_hir/src/ty/tests/data/0004_struct.txt new file mode 100644 index 000000000..cc8f3665b --- /dev/null +++ b/crates/ra_hir/src/ty/tests/data/0004_struct.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | [86; 90) 'C(1)': [unknown] | ||
2 | [121; 122) 'B': [unknown] | ||
3 | [86; 87) 'C': [unknown] | ||
4 | [129; 130) '1': [unknown] | ||
5 | [107; 108) 'a': A | ||
6 | [127; 128) 'C': [unknown] | ||
7 | [139; 142) 'a.b': B | ||
8 | [114; 133) 'A { b:...C(1) }': A | ||
9 | [148; 151) 'a.c': C | ||
10 | [148; 149) 'a': A | ||
11 | [139; 140) 'a': A | ||
12 | [72; 154) '{ ...a.c; }': () | ||
13 | [96; 97) 'B': [unknown] | ||
14 | [88; 89) '1': [unknown] | ||
15 | [82; 83) 'c': [unknown] | ||
16 | [127; 131) 'C(1)': [unknown] | ||