diff options
Diffstat (limited to 'crates/ra_hir_ty/src/lib.rs')
-rw-r--r-- | crates/ra_hir_ty/src/lib.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs index 0ef5ca78f..7698cb0d4 100644 --- a/crates/ra_hir_ty/src/lib.rs +++ b/crates/ra_hir_ty/src/lib.rs | |||
@@ -767,15 +767,6 @@ impl Ty { | |||
767 | } | 767 | } |
768 | } | 768 | } |
769 | 769 | ||
770 | pub fn as_callable(&self) -> Option<(CallableDefId, &Substs)> { | ||
771 | match self { | ||
772 | Ty::Apply(ApplicationTy { ctor: TypeCtor::FnDef(callable_def), parameters }) => { | ||
773 | Some((*callable_def, parameters)) | ||
774 | } | ||
775 | _ => None, | ||
776 | } | ||
777 | } | ||
778 | |||
779 | pub fn is_never(&self) -> bool { | 770 | pub fn is_never(&self) -> bool { |
780 | matches!(self, Ty::Apply(ApplicationTy { ctor: TypeCtor::Never, .. })) | 771 | matches!(self, Ty::Apply(ApplicationTy { ctor: TypeCtor::Never, .. })) |
781 | } | 772 | } |
@@ -807,7 +798,7 @@ impl Ty { | |||
807 | } | 798 | } |
808 | } | 799 | } |
809 | 800 | ||
810 | fn callable_sig(&self, db: &dyn HirDatabase) -> Option<FnSig> { | 801 | pub fn callable_sig(&self, db: &dyn HirDatabase) -> Option<FnSig> { |
811 | match self { | 802 | match self { |
812 | Ty::Apply(a_ty) => match a_ty.ctor { | 803 | Ty::Apply(a_ty) => match a_ty.ctor { |
813 | TypeCtor::FnPtr { is_varargs, .. } => { | 804 | TypeCtor::FnPtr { is_varargs, .. } => { |