Impl Fold for CallableSig
This commit is contained in:
parent
7e541e69b1
commit
b24e6f6030
@ -35,6 +35,7 @@ use std::sync::Arc;
|
||||
use base_db::salsa;
|
||||
use chalk_ir::{
|
||||
cast::{CastTo, Caster},
|
||||
fold::Fold,
|
||||
interner::HasInterner,
|
||||
UintTy,
|
||||
};
|
||||
@ -203,6 +204,23 @@ impl CallableSig {
|
||||
}
|
||||
}
|
||||
|
||||
impl Fold<Interner> for CallableSig {
|
||||
type Result = CallableSig;
|
||||
|
||||
fn fold_with<'i>(
|
||||
self,
|
||||
folder: &mut dyn chalk_ir::fold::Folder<'i, Interner>,
|
||||
outer_binder: DebruijnIndex,
|
||||
) -> chalk_ir::Fallible<Self::Result>
|
||||
where
|
||||
Interner: 'i,
|
||||
{
|
||||
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 })
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
|
||||
pub enum ImplTraitId {
|
||||
ReturnTypeImplTrait(hir_def::FunctionId, u16),
|
||||
|
Loading…
x
Reference in New Issue
Block a user