fn generic_implements_goal(
    db: &dyn HirDatabase,
    env: Arc<TraitEnvironment>,
    trait_: TraitId,
    self_ty: Canonical<Ty>,
) -> Canonical<InEnvironment<super::Obligation>> {
    let num_vars = self_ty.num_vars;
    let substs = super::Substs::build_for_def(db, trait_)
        .push(self_ty.value)
        .fill_with_bound_vars(DebruijnIndex::INNERMOST, num_vars)
        .build();
    let num_vars = substs.len() - 1 + self_ty.num_vars;
    let trait_ref = TraitRef { trait_, substs };
    let obligation = super::Obligation::Trait(trait_ref);
    Canonical { num_vars, value: InEnvironment::new(env, obligation) }
}
/// This creates Substs for a trait with the given Self type and type variables
/// for all other parameters, to query Chalk with it.
This creates Substs for a trait with the given Self type and type variables
for all other parameters, to query Chalk with it.
This creates Substs for a trait with the given Self type and type variables for all other parameters to query Chalk with it .
fn generic_implements_goal(
    db: &dyn HirDatabase,
    env: Arc<TraitEnvironment>,
    trait_: TraitId,
    self_ty: Canonical<Ty>,
) -> Canonical<InEnvironment<super::Obligation>> {
    let num_vars = self_ty.num_vars;
    let substs = super::Substs::build_for_def(db, trait_)
        .push(self_ty.value)
        .fill_with_bound_vars(DebruijnIndex::INNERMOST, num_vars)
        .build();
    let num_vars = substs.len() - 1 + self_ty.num_vars;
    let trait_ref = TraitRef { trait_, substs };
    let obligation = super::Obligation::Trait(trait_ref);
    Canonical { num_vars, value: InEnvironment::new(env, obligation) }
}
fn generic_implements_goal ( db : & dyn HirDatabase , env : Arc < TraitEnvironment > , trait_ : TraitId , self_ty : Canonical < Ty > , ) -> Canonical < InEnvironment < super :: Obligation > > { let num_vars = self_ty . num_vars ; let substs = super :: Substs :: build_for_def ( db , trait_ ) . push ( self_ty . value ) . fill_with_bound_vars ( DebruijnIndex :: INNERMOST , num_vars ) . build ( ) ; let num_vars = substs . len ( ) - 1 + self_ty . num_vars ; let trait_ref = TraitRef { trait_ , substs } ; let obligation = super :: Obligation :: Trait ( trait_ref ) ; Canonical { num_vars , value : InEnvironment :: new ( env , obligation ) } }
This creates Substs for a trait with the given Self type and type variables
for all other parameters, to query Chalk with it.
This creates Substs for a trait with the given Self type and type variables for all other parameters to query Chalk with it .
db
&dyn HirDatabase
env
Arc<TraitEnvironment>
trait_
TraitId
self_ty
Canonical<Ty>
db
&dyn HirDatabase
env
Arc<TraitEnvironment>
trait_
TraitId
self_ty
Canonical<Ty>