diff options
author | Aleksey Kladov <[email protected]> | 2019-12-20 14:58:20 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-20 15:52:02 +0000 |
commit | 1b8ce5b37b597679796b3ebc57afd55af49449b0 (patch) | |
tree | 25851606a456296568234cd3b4f9a81ba3921a14 /crates/ra_hir_def/src/nameres | |
parent | 030e540ad19046e2037981ec8e15a6800b86bbe9 (diff) |
Move impls to ItemScope
Diffstat (limited to 'crates/ra_hir_def/src/nameres')
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/tests/macros.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index ea6ce5f97..c4f6bcd95 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs | |||
@@ -667,7 +667,7 @@ where | |||
667 | let impl_id = | 667 | let impl_id = |
668 | ImplLoc { container, ast_id: AstId::new(self.file_id, ast_id) } | 668 | ImplLoc { container, ast_id: AstId::new(self.file_id, ast_id) } |
669 | .intern(self.def_collector.db); | 669 | .intern(self.def_collector.db); |
670 | self.def_collector.def_map.modules[self.module_id].impls.push(impl_id) | 670 | self.def_collector.def_map.modules[self.module_id].scope.impls.push(impl_id) |
671 | } | 671 | } |
672 | } | 672 | } |
673 | } | 673 | } |
diff --git a/crates/ra_hir_def/src/nameres/tests/macros.rs b/crates/ra_hir_def/src/nameres/tests/macros.rs index cfa4ecb1a..d104f5993 100644 --- a/crates/ra_hir_def/src/nameres/tests/macros.rs +++ b/crates/ra_hir_def/src/nameres/tests/macros.rs | |||
@@ -610,7 +610,7 @@ fn expand_derive() { | |||
610 | struct Foo; | 610 | struct Foo; |
611 | ", | 611 | ", |
612 | ); | 612 | ); |
613 | assert_eq!(map.modules[map.root].impls.len(), 1); | 613 | assert_eq!(map.modules[map.root].scope.impls().len(), 1); |
614 | } | 614 | } |
615 | 615 | ||
616 | #[test] | 616 | #[test] |
@@ -622,5 +622,5 @@ fn expand_multiple_derive() { | |||
622 | struct Foo; | 622 | struct Foo; |
623 | ", | 623 | ", |
624 | ); | 624 | ); |
625 | assert_eq!(map.modules[map.root].impls.len(), 2); | 625 | assert_eq!(map.modules[map.root].scope.impls().len(), 2); |
626 | } | 626 | } |