mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Use bitflags to compress function properties
Very minor savings, only 1 MB or so
This commit is contained in:
parent
f7e6b186e1
commit
ee4b5a34d8
11 changed files with 120 additions and 71 deletions
|
@ -832,7 +832,7 @@ impl Function {
|
|||
}
|
||||
|
||||
pub fn self_param(self, db: &dyn HirDatabase) -> Option<SelfParam> {
|
||||
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue