aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-03 21:47:29 +0100
committerFlorian Diebold <[email protected]>2021-04-04 12:16:39 +0100
commit505ca65216e7d1ea87a235170106338272b36a10 (patch)
treedcf58be28ea09b845f4083db69b8741d3234c3a3 /crates/hir_ty/src
parentac8fee006a4858230fe22dfdb5647a3d0e19bb64 (diff)
Remove CallableSig::from_substs
Diffstat (limited to 'crates/hir_ty/src')
-rw-r--r--crates/hir_ty/src/lib.rs12
1 files changed, 1 insertions, 11 deletions
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs
index b37566958..27ebb7b7c 100644
--- a/crates/hir_ty/src/lib.rs
+++ b/crates/hir_ty/src/lib.rs
@@ -754,7 +754,7 @@ impl CallableSig {
754 754
755 pub fn from_fn_ptr(fn_ptr: &FnPointer) -> CallableSig { 755 pub fn from_fn_ptr(fn_ptr: &FnPointer) -> CallableSig {
756 CallableSig { 756 CallableSig {
757 // FIXME: what to do about lifetime params? 757 // FIXME: what to do about lifetime params? -> return PolyFnSig
758 params_and_return: fn_ptr 758 params_and_return: fn_ptr
759 .substs 759 .substs
760 .clone() 760 .clone()
@@ -767,16 +767,6 @@ impl CallableSig {
767 } 767 }
768 } 768 }
769 769
770 pub fn from_substs(substs: &Substitution) -> CallableSig {
771 CallableSig {
772 params_and_return: substs
773 .iter(&Interner)
774 .map(|arg| arg.assert_ty_ref(&Interner).clone())
775 .collect(),
776 is_varargs: false,
777 }
778 }
779
780 pub fn params(&self) -> &[Ty] { 770 pub fn params(&self) -> &[Ty] {
781 &self.params_and_return[0..self.params_and_return.len() - 1] 771 &self.params_and_return[0..self.params_and_return.len() - 1]
782 } 772 }