aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/tests
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-12 21:18:14 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-12 21:18:14 +0000
commiteb931c0d9e0877e573622253ae5b05563841037b (patch)
tree653ef81450a4d39c5b46f98c97c23fa8586dd7f8 /crates/ra_hir/src/ty/tests
parente56072bfa3e5af69a4c293a38de6e1350ada3573 (diff)
parent1ed7fbfc1badd2c2a42b4dc2feb1b4bf7835d3ef (diff)
Merge #505
505: Inherent methods r=matklad a=flodiebold This adds resolution, type checking and completion for inherent methods. The main open question here is the caching, I think. I'm not sure whether we should be caching method resolutions in a more fine grained way (currently we just build a hash map of types -> impl blocks, and iterate through all potential impl blocks when looking for a method). Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/tests')
-rw-r--r--crates/ra_hir/src/ty/tests/data/inherent_method.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests/data/inherent_method.txt b/crates/ra_hir/src/ty/tests/data/inherent_method.txt
new file mode 100644
index 000000000..6e6f70357
--- /dev/null
+++ b/crates/ra_hir/src/ty/tests/data/inherent_method.txt
@@ -0,0 +1,18 @@
1[32; 36) 'self': A
2[38; 39) 'x': u32
3[53; 55) '{}': ()
4[103; 107) 'self': &A
5[109; 110) 'x': u64
6[124; 126) '{}': ()
7[144; 145) 'a': A
8[150; 198) '{ ...(1); }': ()
9[156; 157) 'a': A
10[156; 164) 'a.foo(1)': i32
11[162; 163) '1': u32
12[170; 181) '(&a).bar(1)': i64
13[171; 173) '&a': &A
14[172; 173) 'a': A
15[179; 180) '1': u64
16[187; 188) 'a': A
17[187; 195) 'a.bar(1)': i64
18[193; 194) '1': u64