diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-12 13:52:30 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-12 13:52:30 +0000 |
commit | 55f3ff241a2105d2903266703474acbd24a85e84 (patch) | |
tree | d953d49eac9da39748afabd512b5390875e18ba1 /crates/ra_hir/src/source_binder.rs | |
parent | 6149ee30ef9a379f642c8a645cea13f32c4f3d84 (diff) | |
parent | fe00db72b91d266a61b0541bca59e38e5f2a703c (diff) |
Merge #2222
2222: Remove owner from Body r=matklad a=matklad
cc @flodiebold
I do this so that it's easier to move lowering code to another crate (owner is the only thing that tethers Body to the rest of the code), but it's interesting that this is a net reduction of lines. I think this might be considered an evidence that it's a good idea to not add "parent pointers" / parent ids to data structures, and instead add them to `ctx` objects which are used when building data structures
bors r+
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index fe4211819..f28e9c931 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -150,7 +150,7 @@ impl SourceAnalyzer { | |||
150 | None => scope_for(&scopes, &source_map, &node), | 150 | None => scope_for(&scopes, &source_map, &node), |
151 | Some(offset) => scope_for_offset(&scopes, &source_map, file_id.into(), offset), | 151 | Some(offset) => scope_for_offset(&scopes, &source_map, file_id.into(), offset), |
152 | }; | 152 | }; |
153 | let resolver = expr::resolver_for_scope(def.body(db), db, scope); | 153 | let resolver = expr::resolver_for_scope(db, def, scope); |
154 | SourceAnalyzer { | 154 | SourceAnalyzer { |
155 | resolver, | 155 | resolver, |
156 | body_owner: Some(def), | 156 | body_owner: Some(def), |