From 505ca65216e7d1ea87a235170106338272b36a10 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 3 Apr 2021 22:47:29 +0200 Subject: Remove CallableSig::from_substs --- crates/hir_ty/src/lib.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'crates/hir_ty/src') 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 { pub fn from_fn_ptr(fn_ptr: &FnPointer) -> CallableSig { CallableSig { - // FIXME: what to do about lifetime params? + // FIXME: what to do about lifetime params? -> return PolyFnSig params_and_return: fn_ptr .substs .clone() @@ -767,16 +767,6 @@ impl CallableSig { } } - pub fn from_substs(substs: &Substitution) -> CallableSig { - CallableSig { - params_and_return: substs - .iter(&Interner) - .map(|arg| arg.assert_ty_ref(&Interner).clone()) - .collect(), - is_varargs: false, - } - } - pub fn params(&self) -> &[Ty] { &self.params_and_return[0..self.params_and_return.len() - 1] } -- cgit v1.2.3