/// We currently don't model lifetimes, but Chalk does. So, we have to insert a
/// fake lifetime here, because Chalks built-in logic may expect it to be there.
We currently don't model lifetimes, but Chalk does. So, we have to insert a
fake lifetime here, because Chalks built-in logic may expect it to be there.
We currently don ' t model lifetimes but Chalk does . So we have to insert a fake lifetime here because Chalks built - in logic may expect it to be there .
fn ref_to_chalk(
    db: &dyn HirDatabase,
    mutability: Mutability,
    subst: Substs,
) -> chalk_ir::Ty<Interner> {
    let arg = subst[0].clone().to_chalk(db);
    let lifetime = LIFETIME_PLACEHOLDER.to_lifetime(&Interner);
    chalk_ir::ApplicationTy {
        name: TypeName::Ref(mutability.to_chalk(db)),
        substitution: chalk_ir::Substitution::from(
            &Interner,
            vec![lifetime.cast(&Interner), arg.cast(&Interner)],
        ),
    }
    .intern(&Interner)
}
fn ref_to_chalk ( db : & dyn HirDatabase , mutability : Mutability , subst : Substs , ) -> chalk_ir :: Ty < Interner > { let arg = subst [ 0 ] . clone ( ) . to_chalk ( db ) ; let lifetime = LIFETIME_PLACEHOLDER . to_lifetime ( & Interner ) ; chalk_ir :: ApplicationTy { name : TypeName :: Ref ( mutability . to_chalk ( db ) ) , substitution : chalk_ir :: Substitution :: from ( & Interner , vec ! [ lifetime cast ( Interner ) arg cast ( Interner ) ] , ) , } . intern ( & Interner ) }
We currently don't model lifetimes, but Chalk does.
We currently don ' t model lifetimes but Chalk does .
db
&dyn HirDatabase
mutability
Mutability
subst
Substs