fn type_for_const(db: &dyn HirDatabase, def: ConstId) -> Binders<Ty> {
    let data = db.const_data(def);
    let generics = generics(db.upcast(), def.into());
    let resolver = def.resolver(db.upcast());
    let ctx =
        TyLoweringContext::new(db, &resolver).with_type_param_mode(TypeParamLoweringMode::Variable);

    Binders::new(generics.len(), Ty::from_hir(&ctx, &data.type_ref))
}
/// Build the declared type of a const.
Build the declared type of a const.
Build the declared type of a const .
fn type_for_const(db: &dyn HirDatabase, def: ConstId) -> Binders<Ty> {
    let data = db.const_data(def);
    let generics = generics(db.upcast(), def.into());
    let resolver = def.resolver(db.upcast());
    let ctx =
        TyLoweringContext::new(db, &resolver).with_type_param_mode(TypeParamLoweringMode::Variable);
    Binders::new(generics.len(), Ty::from_hir(&ctx, &data.type_ref))
}
fn type_for_const ( db : & dyn HirDatabase , def : ConstId ) -> Binders < Ty > { let data = db . const_data ( def ) ; let generics = generics ( db . upcast ( ) , def . into ( ) ) ; let resolver = def . resolver ( db . upcast ( ) ) ; let ctx = TyLoweringContext :: new ( db , & resolver ) . with_type_param_mode ( TypeParamLoweringMode :: Variable ) ; Binders :: new ( generics . len ( ) , Ty :: from_hir ( & ctx , & data . type_ref ) ) }
Build the declared type of a const.
Build the declared type of a const .
db
&dyn HirDatabase
def
ConstId