diff options
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r-- | crates/hir/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 29010191b..eb19e4b51 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -832,7 +832,7 @@ impl Function { | |||
832 | } | 832 | } |
833 | 833 | ||
834 | pub fn self_param(self, db: &dyn HirDatabase) -> Option<SelfParam> { | 834 | pub fn self_param(self, db: &dyn HirDatabase) -> Option<SelfParam> { |
835 | if !db.function_data(self.id).has_self_param { | 835 | if !db.function_data(self.id).has_self_param() { |
836 | return None; | 836 | return None; |
837 | } | 837 | } |
838 | Some(SelfParam { func: self.id }) | 838 | Some(SelfParam { func: self.id }) |
@@ -864,7 +864,7 @@ impl Function { | |||
864 | } | 864 | } |
865 | 865 | ||
866 | pub fn is_unsafe(self, db: &dyn HirDatabase) -> bool { | 866 | pub fn is_unsafe(self, db: &dyn HirDatabase) -> bool { |
867 | db.function_data(self.id).qualifier.is_unsafe | 867 | db.function_data(self.id).is_unsafe() |
868 | } | 868 | } |
869 | 869 | ||
870 | pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) { | 870 | pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) { |
@@ -878,7 +878,7 @@ impl Function { | |||
878 | /// | 878 | /// |
879 | /// This is false in the case of required (not provided) trait methods. | 879 | /// This is false in the case of required (not provided) trait methods. |
880 | pub fn has_body(self, db: &dyn HirDatabase) -> bool { | 880 | pub fn has_body(self, db: &dyn HirDatabase) -> bool { |
881 | db.function_data(self.id).has_body | 881 | db.function_data(self.id).has_body() |
882 | } | 882 | } |
883 | 883 | ||
884 | /// A textual representation of the HIR of this function for debugging purposes. | 884 | /// A textual representation of the HIR of this function for debugging purposes. |