mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Highlight mutable statics as mutable
This commit is contained in:
parent
4578154b60
commit
11c0a5bb60
7 changed files with 56 additions and 13 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue