diff options
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 5a0bd0c19..2fd4ccb10 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -550,7 +550,7 @@ where | |||
550 | } | 550 | } |
551 | 551 | ||
552 | fn body(self, db: &impl HirDatabase) -> Arc<Body> { | 552 | fn body(self, db: &impl HirDatabase) -> Arc<Body> { |
553 | db.body_hir(self.into()) | 553 | db.body(self.into()) |
554 | } | 554 | } |
555 | 555 | ||
556 | fn body_source_map(self, db: &impl HirDatabase) -> Arc<BodySourceMap> { | 556 | fn body_source_map(self, db: &impl HirDatabase) -> Arc<BodySourceMap> { |
@@ -564,7 +564,7 @@ impl HasBody for DefWithBody { | |||
564 | } | 564 | } |
565 | 565 | ||
566 | fn body(self, db: &impl HirDatabase) -> Arc<Body> { | 566 | fn body(self, db: &impl HirDatabase) -> Arc<Body> { |
567 | db.body_hir(self) | 567 | db.body(self) |
568 | } | 568 | } |
569 | 569 | ||
570 | fn body_source_map(self, db: &impl HirDatabase) -> Arc<BodySourceMap> { | 570 | fn body_source_map(self, db: &impl HirDatabase) -> Arc<BodySourceMap> { |
@@ -666,7 +666,7 @@ impl Function { | |||
666 | } | 666 | } |
667 | 667 | ||
668 | pub fn body(self, db: &impl HirDatabase) -> Arc<Body> { | 668 | pub fn body(self, db: &impl HirDatabase) -> Arc<Body> { |
669 | db.body_hir(self.into()) | 669 | db.body(self.into()) |
670 | } | 670 | } |
671 | 671 | ||
672 | pub fn ty(self, db: &impl HirDatabase) -> Ty { | 672 | pub fn ty(self, db: &impl HirDatabase) -> Ty { |
@@ -1079,7 +1079,7 @@ pub struct Local { | |||
1079 | 1079 | ||
1080 | impl Local { | 1080 | impl Local { |
1081 | pub fn name(self, db: &impl HirDatabase) -> Option<Name> { | 1081 | pub fn name(self, db: &impl HirDatabase) -> Option<Name> { |
1082 | let body = db.body_hir(self.parent); | 1082 | let body = db.body(self.parent); |
1083 | match &body[self.pat_id] { | 1083 | match &body[self.pat_id] { |
1084 | Pat::Bind { name, .. } => Some(name.clone()), | 1084 | Pat::Bind { name, .. } => Some(name.clone()), |
1085 | _ => None, | 1085 | _ => None, |
@@ -1091,7 +1091,7 @@ impl Local { | |||
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | pub fn is_mut(self, db: &impl HirDatabase) -> bool { | 1093 | pub fn is_mut(self, db: &impl HirDatabase) -> bool { |
1094 | let body = db.body_hir(self.parent); | 1094 | let body = db.body(self.parent); |
1095 | match &body[self.pat_id] { | 1095 | match &body[self.pat_id] { |
1096 | Pat::Bind { mode, .. } => match mode { | 1096 | Pat::Bind { mode, .. } => match mode { |
1097 | BindingAnnotation::Mutable | BindingAnnotation::RefMut => true, | 1097 | BindingAnnotation::Mutable | BindingAnnotation::RefMut => true, |