From ee4b5a34d8aa789ebc521926123fba79eebe5981 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sat, 3 Apr 2021 20:58:42 +0200 Subject: Use bitflags to compress function properties Very minor savings, only 1 MB or so --- crates/hir/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/hir/src/lib.rs') 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 { } pub fn self_param(self, db: &dyn HirDatabase) -> Option { - if !db.function_data(self.id).has_self_param { + if !db.function_data(self.id).has_self_param() { return None; } Some(SelfParam { func: self.id }) @@ -864,7 +864,7 @@ impl Function { } pub fn is_unsafe(self, db: &dyn HirDatabase) -> bool { - db.function_data(self.id).qualifier.is_unsafe + db.function_data(self.id).is_unsafe() } pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) { @@ -878,7 +878,7 @@ impl Function { /// /// This is false in the case of required (not provided) trait methods. pub fn has_body(self, db: &dyn HirDatabase) -> bool { - db.function_data(self.id).has_body + db.function_data(self.id).has_body() } /// A textual representation of the HIR of this function for debugging purposes. -- cgit v1.2.3