pub(crate) fn trait_environment<'db>( db: &'db dyn HirDatabase, def: GenericDefId, ) -> ParamEnv<'db>