aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/snapshots/tests__infer_associated_method_generics.snap
diff options
context:
space:
mode:
authorVille Penttinen <[email protected]>2019-02-21 10:04:14 +0000
committerVille Penttinen <[email protected]>2019-02-21 10:25:55 +0000
commit816971ebc9207c5fb5779d448613dd171c27f398 (patch)
treefe49d209a852bb1b4a51eea9d40449dcf2845209 /crates/ra_hir/src/ty/snapshots/tests__infer_associated_method_generics.snap
parentc84561bb624280b84eb2fe6c6b2a6b9fe3f1dbf7 (diff)
Implement basic support for Associated Methods and Constants
This is done in `infer_path_expr`. When `Resolver::resolve_path` returns `PartiallyResolved`, we use the returned `Resolution` together with the given `segment_index` to check if we can find something matching the segment at segment_index in the impls for that particular type.
Diffstat (limited to 'crates/ra_hir/src/ty/snapshots/tests__infer_associated_method_generics.snap')
-rw-r--r--crates/ra_hir/src/ty/snapshots/tests__infer_associated_method_generics.snap16
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_associated_method_generics.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_associated_method_generics.snap
new file mode 100644
index 000000000..fe5d6590e
--- /dev/null
+++ b/crates/ra_hir/src/ty/snapshots/tests__infer_associated_method_generics.snap
@@ -0,0 +1,16 @@
1---
2created: "2019-02-21T10:25:18.568887300Z"
3creator: [email protected]
4source: crates/ra_hir/src/ty/tests.rs
5expression: "&result"
6---
7[64; 67) 'val': T
8[82; 109) '{ ... }': Gen<T>
9[92; 103) 'Gen { val }': Gen<T>
10[98; 101) 'val': T
11[123; 155) '{ ...32); }': ()
12[133; 134) 'a': Gen<[unknown]>
13[137; 146) 'Gen::make': fn make<[unknown]>(T) -> Gen<T>
14[137; 152) 'Gen::make(0u32)': Gen<[unknown]>
15[147; 151) '0u32': u32
16