diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-12 21:18:14 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-12 21:18:14 +0000 |
commit | eb931c0d9e0877e573622253ae5b05563841037b (patch) | |
tree | 653ef81450a4d39c5b46f98c97c23fa8586dd7f8 /crates/ra_hir/src/code_model_impl/function | |
parent | e56072bfa3e5af69a4c293a38de6e1350ada3573 (diff) | |
parent | 1ed7fbfc1badd2c2a42b4dc2feb1b4bf7835d3ef (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/code_model_impl/function')
-rw-r--r-- | crates/ra_hir/src/code_model_impl/function/scope.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/code_model_impl/function/scope.rs b/crates/ra_hir/src/code_model_impl/function/scope.rs index ebf6edc1b..7d938c0dd 100644 --- a/crates/ra_hir/src/code_model_impl/function/scope.rs +++ b/crates/ra_hir/src/code_model_impl/function/scope.rs | |||
@@ -43,7 +43,7 @@ impl FnScopes { | |||
43 | scope_for: FxHashMap::default(), | 43 | scope_for: FxHashMap::default(), |
44 | }; | 44 | }; |
45 | let root = scopes.root_scope(); | 45 | let root = scopes.root_scope(); |
46 | scopes.add_params_bindings(root, body.args()); | 46 | scopes.add_params_bindings(root, body.params()); |
47 | compute_expr_scopes(body.body_expr(), &body, &mut scopes, root); | 47 | compute_expr_scopes(body.body_expr(), &body, &mut scopes, root); |
48 | scopes | 48 | scopes |
49 | } | 49 | } |