Highlight mutable statics as mutable

This commit is contained in:
Matthew Jasper 2020-05-10 16:08:28 +01:00
parent 4578154b60
commit 11c0a5bb60
7 changed files with 56 additions and 13 deletions

View file

@ -678,6 +678,10 @@ impl Static {
pub fn name(self, db: &dyn HirDatabase) -> Option<Name> {
db.static_data(self.id).name.clone()
}
pub fn is_mut(self, db: &dyn HirDatabase) -> bool {
db.static_data(self.id).mutable
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]