Implement promotoe_local_to_const assist

This commit is contained in:
Lukas Wirth 2021-10-14 21:49:46 +02:00
parent f87debcf87
commit 06286ee90b
6 changed files with 280 additions and 11 deletions

View file

@ -1307,6 +1307,10 @@ impl Function {
db.function_data(self.id).is_unsafe()
}
pub fn is_const(self, db: &dyn HirDatabase) -> bool {
db.function_data(self.id).is_const()
}
pub fn is_async(self, db: &dyn HirDatabase) -> bool {
db.function_data(self.id).is_async()
}