aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-03-09 15:06:08 +0000
committerAleksey Kladov <[email protected]>2021-03-09 15:06:08 +0000
commit12fe301a0cbe4ffecdabae1c9b827e740e3ce027 (patch)
treee1442b7be6fb8728b473a3e73d63c6445a211586 /crates/hir
parentabc0ed36bdf4975dc9c5fb2ddd3f960ad2db5494 (diff)
Cleanup auto-ref in completion
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/lib.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index d5a3d9034..641ea4221 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -1614,10 +1614,9 @@ impl Type {
1614 } 1614 }
1615 1615
1616 pub fn remove_ref(&self) -> Option<Type> { 1616 pub fn remove_ref(&self) -> Option<Type> {
1617 if let Ty::Ref(.., substs) = &self.ty.value { 1617 match &self.ty.value {
1618 Some(self.derived(substs[0].clone())) 1618 Ty::Ref(.., substs) => Some(self.derived(substs[0].clone())),
1619 } else { 1619 _ => None,
1620 None
1621 } 1620 }
1622 } 1621 }
1623 1622