aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/lib.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2018-12-28 13:34:00 +0000
committerFlorian Diebold <[email protected]>2019-01-04 18:10:47 +0000
commitae9530addc4c5e9bbfd5c0287d3c3adb2de95e40 (patch)
tree42919bcc1ef1d439a04718aefe2fdc2fe3456afd /crates/ra_hir/src/lib.rs
parent226e31dae94f2c72f5cf650564e521b792793629 (diff)
Add HIR for impl blocks
Since we need to be able to go from def to containing impl block, as well as the other direction, and to find all impls for a certain type, a design similar to the one for modules, where we collect all impls for the whole crate and keep them in an arena, seemed fitting. The ImplBlock type, which provides the public interface, then consists only of an Arc to the arena containing all impls, and the index into it.
Diffstat (limited to 'crates/ra_hir/src/lib.rs')
-rw-r--r--crates/ra_hir/src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs
index 344b543b6..2abcec441 100644
--- a/crates/ra_hir/src/lib.rs
+++ b/crates/ra_hir/src/lib.rs
@@ -31,6 +31,7 @@ mod function;
31mod adt; 31mod adt;
32mod type_ref; 32mod type_ref;
33mod ty; 33mod ty;
34mod impl_block;
34 35
35use crate::{ 36use crate::{
36 db::HirDatabase, 37 db::HirDatabase,
@@ -48,6 +49,7 @@ pub use self::{
48 function::{Function, FnScopes}, 49 function::{Function, FnScopes},
49 adt::{Struct, Enum}, 50 adt::{Struct, Enum},
50 ty::Ty, 51 ty::Ty,
52 impl_block::{ImplBlock, ImplItem},
51}; 53};
52 54
53pub use self::function::FnSignatureInfo; 55pub use self::function::FnSignatureInfo;