aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r--crates/hir_ty/src/lib.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs
index 5cbb9a3cc..117d69f01 100644
--- a/crates/hir_ty/src/lib.rs
+++ b/crates/hir_ty/src/lib.rs
@@ -726,11 +726,11 @@ impl Ty {
726 726
727 pub fn callable_sig(&self, db: &dyn HirDatabase) -> Option<FnSig> { 727 pub fn callable_sig(&self, db: &dyn HirDatabase) -> Option<FnSig> {
728 match self { 728 match self {
729 &Ty::FnPtr { is_varargs, substs: ref parameters, .. } => { 729 Ty::FnPtr { is_varargs, substs: parameters, .. } => {
730 Some(FnSig::from_fn_ptr_substs(&parameters, is_varargs)) 730 Some(FnSig::from_fn_ptr_substs(&parameters, *is_varargs))
731 } 731 }
732 &Ty::FnDef(def, ref parameters) => { 732 Ty::FnDef(def, parameters) => {
733 let sig = db.callable_item_signature(def); 733 let sig = db.callable_item_signature(*def);
734 Some(sig.subst(&parameters)) 734 Some(sig.subst(&parameters))
735 } 735 }
736 Ty::Closure { substs: parameters, .. } => { 736 Ty::Closure { substs: parameters, .. } => {
@@ -783,7 +783,6 @@ impl Ty {
783 | Ty::AssociatedType(_, substs) 783 | Ty::AssociatedType(_, substs)
784 | Ty::ForeignType(_, substs) 784 | Ty::ForeignType(_, substs)
785 | Ty::Closure { substs, .. } => Some(substs), 785 | Ty::Closure { substs, .. } => Some(substs),
786
787 _ => None, 786 _ => None,
788 } 787 }
789 } 788 }
@@ -802,7 +801,6 @@ impl Ty {
802 | Ty::AssociatedType(_, substs) 801 | Ty::AssociatedType(_, substs)
803 | Ty::ForeignType(_, substs) 802 | Ty::ForeignType(_, substs)
804 | Ty::Closure { substs, .. } => Some(substs), 803 | Ty::Closure { substs, .. } => Some(substs),
805
806 _ => None, 804 _ => None,
807 } 805 }
808 } 806 }