diff options
author | Ville Penttinen <[email protected]> | 2019-02-21 10:04:14 +0000 |
---|---|---|
committer | Ville Penttinen <[email protected]> | 2019-02-21 10:25:55 +0000 |
commit | 816971ebc9207c5fb5779d448613dd171c27f398 (patch) | |
tree | fe49d209a852bb1b4a51eea9d40449dcf2845209 /crates/ra_hir/src/ty/snapshots/tests__infer_associated_const.snap | |
parent | c84561bb624280b84eb2fe6c6b2a6b9fe3f1dbf7 (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_const.snap')
-rw-r--r-- | crates/ra_hir/src/ty/snapshots/tests__infer_associated_const.snap | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/snapshots/tests__infer_associated_const.snap b/crates/ra_hir/src/ty/snapshots/tests__infer_associated_const.snap new file mode 100644 index 000000000..14ab8ba96 --- /dev/null +++ b/crates/ra_hir/src/ty/snapshots/tests__infer_associated_const.snap | |||
@@ -0,0 +1,14 @@ | |||
1 | --- | ||
2 | created: "2019-02-20T11:04:56.553382800Z" | ||
3 | creator: [email protected] | ||
4 | source: crates/ra_hir/src/ty/tests.rs | ||
5 | expression: "&result" | ||
6 | --- | ||
7 | [227; 305) '{ ...:ID; }': () | ||
8 | [237; 238) 'x': u32 | ||
9 | [241; 252) 'Struct::FOO': u32 | ||
10 | [262; 263) 'y': u32 | ||
11 | [266; 275) 'Enum::BAR': u32 | ||
12 | [285; 286) 'z': u32 | ||
13 | [289; 302) 'TraitTest::ID': u32 | ||
14 | |||