aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/lib.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index d5a3d9034..caf4c3395 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -1296,13 +1296,7 @@ impl Local {
1296 1296
1297 pub fn is_mut(self, db: &dyn HirDatabase) -> bool { 1297 pub fn is_mut(self, db: &dyn HirDatabase) -> bool {
1298 let body = db.body(self.parent.into()); 1298 let body = db.body(self.parent.into());
1299 match &body[self.pat_id] { 1299 matches!(&body[self.pat_id], Pat::Bind { mode: BindingAnnotation::Mutable, .. })
1300 Pat::Bind { mode, .. } => match mode {
1301 BindingAnnotation::Mutable | BindingAnnotation::RefMut => true,
1302 _ => false,
1303 },
1304 _ => false,
1305 }
1306 } 1300 }
1307 1301
1308 pub fn parent(self, _db: &dyn HirDatabase) -> DefWithBody { 1302 pub fn parent(self, _db: &dyn HirDatabase) -> DefWithBody {