diff options
author | Florian Diebold <[email protected]> | 2018-12-25 16:17:39 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2018-12-25 19:36:06 +0000 |
commit | 2870effd5c69941bbf32a44c0ee6d9d42e0b038d (patch) | |
tree | bf2c5ff08e6f316c1d9d629ae3595e6f7c069e5d /crates/ra_hir/src/ty/tests/data | |
parent | b96d3612390e070936a176571c946ad0cafa69a9 (diff) |
Implement reference / pointer types
- parse them
- infer types of & and * expressions
Diffstat (limited to 'crates/ra_hir/src/ty/tests/data')
-rw-r--r-- | crates/ra_hir/src/ty/tests/data/0001_basics.txt | 4 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/tests/data/0005_refs.txt | 23 |
2 files changed, 25 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty/tests/data/0001_basics.txt b/crates/ra_hir/src/ty/tests/data/0001_basics.txt index 0c46f243a..212e92e00 100644 --- a/crates/ra_hir/src/ty/tests/data/0001_basics.txt +++ b/crates/ra_hir/src/ty/tests/data/0001_basics.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | [33; 34) 'd': [unknown] | 1 | [33; 34) 'd': &[unknown] |
2 | [88; 94) '1isize': [unknown] | 2 | [88; 94) '1isize': [unknown] |
3 | [48; 49) 'a': u32 | 3 | [48; 49) 'a': u32 |
4 | [55; 56) 'b': isize | 4 | [55; 56) 'b': isize |
@@ -10,4 +10,4 @@ | |||
10 | [17; 18) 'b': isize | 10 | [17; 18) 'b': isize |
11 | [100; 106) '"test"': [unknown] | 11 | [100; 106) '"test"': [unknown] |
12 | [42; 121) '{ ...f32; }': () | 12 | [42; 121) '{ ...f32; }': () |
13 | [69; 70) 'd': [unknown] | 13 | [69; 70) 'd': &[unknown] |
diff --git a/crates/ra_hir/src/ty/tests/data/0005_refs.txt b/crates/ra_hir/src/ty/tests/data/0005_refs.txt new file mode 100644 index 000000000..296e955c1 --- /dev/null +++ b/crates/ra_hir/src/ty/tests/data/0005_refs.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | [115; 117) '&b': &&mut u32 | ||
2 | [88; 94) '&mut a': &mut &u32 | ||
3 | [146; 147) 'd': *mut u32 | ||
4 | [145; 147) '*d': u32 | ||
5 | [65; 66) 'a': &u32 | ||
6 | [46; 47) 'd': *mut u32 | ||
7 | [59; 150) '{ ... *d; }': () | ||
8 | [116; 117) 'b': &mut u32 | ||
9 | [131; 132) 'c': *const u32 | ||
10 | [130; 132) '*c': u32 | ||
11 | [72; 74) '*a': u32 | ||
12 | [107; 109) '*b': u32 | ||
13 | [108; 109) 'b': &mut u32 | ||
14 | [9; 10) 'a': &u32 | ||
15 | [18; 19) 'b': &mut u32 | ||
16 | [93; 94) 'a': &u32 | ||
17 | [100; 101) 'b': &mut u32 | ||
18 | [81; 82) 'a': &u32 | ||
19 | [80; 82) '&a': &&u32 | ||
20 | [73; 74) 'a': &u32 | ||
21 | [123; 124) 'c': *const u32 | ||
22 | [31; 32) 'c': *const u32 | ||
23 | [138; 139) 'd': *mut u32 | ||