mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Cleanup auto-ref in completion
This commit is contained in:
parent
abc0ed36bd
commit
12fe301a0c
4 changed files with 87 additions and 30 deletions
|
@ -1614,10 +1614,9 @@ impl Type {
|
|||
}
|
||||
|
||||
pub fn remove_ref(&self) -> Option<Type> {
|
||||
if let Ty::Ref(.., substs) = &self.ty.value {
|
||||
Some(self.derived(substs[0].clone()))
|
||||
} else {
|
||||
None
|
||||
match &self.ty.value {
|
||||
Ty::Ref(.., substs) => Some(self.derived(substs[0].clone())),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue