diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs index 945b4b0e4a6..8729b52ae8b 100644 --- a/crates/hir_ty/src/lib.rs +++ b/crates/hir_ty/src/lib.rs @@ -217,7 +217,6 @@ pub fn make_canonical>( pub struct CallableSig { params_and_return: Arc<[Ty]>, is_varargs: bool, - legacy_const_generics_indices: Arc<[u32]>, } has_interner!(CallableSig); @@ -228,11 +227,7 @@ pub type PolyFnSig = Binders; impl CallableSig { pub fn from_params_and_return(mut params: Vec, ret: Ty, is_varargs: bool) -> CallableSig { params.push(ret); - CallableSig { - params_and_return: params.into(), - is_varargs, - legacy_const_generics_indices: Arc::new([]), - } + CallableSig { params_and_return: params.into(), is_varargs } } pub fn from_fn_ptr(fn_ptr: &FnPointer) -> CallableSig { @@ -249,14 +244,9 @@ impl CallableSig { .map(|arg| arg.assert_ty_ref(Interner).clone()) .collect(), is_varargs: fn_ptr.sig.variadic, - legacy_const_generics_indices: Arc::new([]), } } - pub fn set_legacy_const_generics_indices(&mut self, indices: &[u32]) { - self.legacy_const_generics_indices = indices.into(); - } - pub fn to_fn_ptr(&self) -> FnPointer { FnPointer { num_binders: 0, @@ -287,11 +277,7 @@ impl Fold for CallableSig { ) -> Result { let vec = self.params_and_return.to_vec(); let folded = vec.fold_with(folder, outer_binder)?; - Ok(CallableSig { - params_and_return: folded.into(), - is_varargs: self.is_varargs, - legacy_const_generics_indices: self.legacy_const_generics_indices, - }) + Ok(CallableSig { params_and_return: folded.into(), is_varargs: self.is_varargs }) } } diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index 41bb94c5d55..d0226cec263 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs @@ -1364,10 +1364,7 @@ fn fn_sig_for_fn(db: &dyn HirDatabase, def: FunctionId) -> PolyFnSig { .with_type_param_mode(ParamLoweringMode::Variable); let ret = ctx_ret.lower_ty(&data.ret_type); let generics = generics(db.upcast(), def.into()); - let mut sig = CallableSig::from_params_and_return(params, ret, data.is_varargs()); - if !data.legacy_const_generics_indices.is_empty() { - sig.set_legacy_const_generics_indices(&data.legacy_const_generics_indices); - } + let sig = CallableSig::from_params_and_return(params, ret, data.is_varargs()); make_binders(db, &generics, sig) }