aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-03 20:01:03 +0100
committerGitHub <[email protected]>2021-04-03 20:01:03 +0100
commitb78f1a0a4d90276c7bd99bd0e5ac6959578be76a (patch)
tree9e5444bdd56ad6725525764d9f35a20f927b2209 /crates/hir/src/lib.rs
parente2213a503ec4c602eb976dccb9d34b56d9c6aba3 (diff)
parentee4b5a34d8aa789ebc521926123fba79eebe5981 (diff)
Merge #8315
8315: Try to reduce ItemTree size further r=jonas-schievink a=jonas-schievink This was mostly a failed experiment, but still seems like the right thing to do. Memory reduction is mostly negligible. bors r+ Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r--crates/hir/src/lib.rs6
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.