aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-09 16:05:23 +0000
committerGitHub <[email protected]>2021-03-09 16:05:23 +0000
commitc2359608c926d4828f2b112e7069978449851d58 (patch)
treeccb62a1da7516ce170e6ddf8481154465c7abba5 /crates/hir/src
parent472641fc5beee1f998d46de70351bcb572d6226c (diff)
parent73b9937e4eea2633005e7d2814cb7990e5f20e8f (diff)
Merge #7944
7944: Selecting `&mut foo` completion now actually inserts `&mut` r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/hir/src')
-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