diff options
Diffstat (limited to 'crates/ra_hir/src/code_model_api.rs')
-rw-r--r-- | crates/ra_hir/src/code_model_api.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index 882208ec1..5d8cf57b6 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs | |||
@@ -189,7 +189,7 @@ impl Module { | |||
189 | } | 189 | } |
190 | } | 190 | } |
191 | 191 | ||
192 | pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { | 192 | pub(crate) fn resolver(&self, db: &impl HirDatabase) -> Resolver { |
193 | let def_map = db.crate_def_map(self.krate); | 193 | let def_map = db.crate_def_map(self.krate); |
194 | Resolver::default().push_module_scope(def_map, self.module_id) | 194 | Resolver::default().push_module_scope(def_map, self.module_id) |
195 | } | 195 | } |
@@ -313,7 +313,7 @@ impl Struct { | |||
313 | 313 | ||
314 | // FIXME move to a more general type | 314 | // FIXME move to a more general type |
315 | /// Builds a resolver for type references inside this struct. | 315 | /// Builds a resolver for type references inside this struct. |
316 | pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { | 316 | pub(crate) fn resolver(&self, db: &impl HirDatabase) -> Resolver { |
317 | // take the outer scope... | 317 | // take the outer scope... |
318 | let r = self.module(db).resolver(db); | 318 | let r = self.module(db).resolver(db); |
319 | // ...and add generic params, if present | 319 | // ...and add generic params, if present |
@@ -373,7 +373,7 @@ impl Enum { | |||
373 | 373 | ||
374 | // FIXME: move to a more general type | 374 | // FIXME: move to a more general type |
375 | /// Builds a resolver for type references inside this struct. | 375 | /// Builds a resolver for type references inside this struct. |
376 | pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { | 376 | pub(crate) fn resolver(&self, db: &impl HirDatabase) -> Resolver { |
377 | // take the outer scope... | 377 | // take the outer scope... |
378 | let r = self.module(db).resolver(db); | 378 | let r = self.module(db).resolver(db); |
379 | // ...and add generic params, if present | 379 | // ...and add generic params, if present |
@@ -459,7 +459,7 @@ impl DefWithBody { | |||
459 | } | 459 | } |
460 | 460 | ||
461 | /// Builds a resolver for code inside this item. | 461 | /// Builds a resolver for code inside this item. |
462 | pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { | 462 | pub(crate) fn resolver(&self, db: &impl HirDatabase) -> Resolver { |
463 | match *self { | 463 | match *self { |
464 | DefWithBody::Const(ref c) => c.resolver(db), | 464 | DefWithBody::Const(ref c) => c.resolver(db), |
465 | DefWithBody::Function(ref f) => f.resolver(db), | 465 | DefWithBody::Function(ref f) => f.resolver(db), |
@@ -549,7 +549,7 @@ impl Function { | |||
549 | 549 | ||
550 | // FIXME: move to a more general type for 'body-having' items | 550 | // FIXME: move to a more general type for 'body-having' items |
551 | /// Builds a resolver for code inside this item. | 551 | /// Builds a resolver for code inside this item. |
552 | pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { | 552 | pub(crate) fn resolver(&self, db: &impl HirDatabase) -> Resolver { |
553 | // take the outer scope... | 553 | // take the outer scope... |
554 | let r = self | 554 | let r = self |
555 | .impl_block(db) | 555 | .impl_block(db) |
@@ -602,7 +602,7 @@ impl Const { | |||
602 | 602 | ||
603 | // FIXME: move to a more general type for 'body-having' items | 603 | // FIXME: move to a more general type for 'body-having' items |
604 | /// Builds a resolver for code inside this item. | 604 | /// Builds a resolver for code inside this item. |
605 | pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { | 605 | pub(crate) fn resolver(&self, db: &impl HirDatabase) -> Resolver { |
606 | // take the outer scope... | 606 | // take the outer scope... |
607 | let r = self | 607 | let r = self |
608 | .impl_block(db) | 608 | .impl_block(db) |
@@ -654,7 +654,7 @@ impl Static { | |||
654 | } | 654 | } |
655 | 655 | ||
656 | /// Builds a resolver for code inside this item. | 656 | /// Builds a resolver for code inside this item. |
657 | pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { | 657 | pub(crate) fn resolver(&self, db: &impl HirDatabase) -> Resolver { |
658 | // take the outer scope... | 658 | // take the outer scope... |
659 | self.module(db).resolver(db) | 659 | self.module(db).resolver(db) |
660 | } | 660 | } |
@@ -736,7 +736,7 @@ impl TypeAlias { | |||
736 | } | 736 | } |
737 | 737 | ||
738 | /// Builds a resolver for the type references in this type alias. | 738 | /// Builds a resolver for the type references in this type alias. |
739 | pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { | 739 | pub(crate) fn resolver(&self, db: &impl HirDatabase) -> Resolver { |
740 | // take the outer scope... | 740 | // take the outer scope... |
741 | let r = self | 741 | let r = self |
742 | .impl_block(db) | 742 | .impl_block(db) |