Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/utils.rs')
| -rw-r--r-- | crates/hir-ty/src/utils.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/hir-ty/src/utils.rs b/crates/hir-ty/src/utils.rs index 89d89fe223..b90f4e4d7f 100644 --- a/crates/hir-ty/src/utils.rs +++ b/crates/hir-ty/src/utils.rs @@ -3,7 +3,7 @@ use std::{hash::Hash, iter}; -use base_db::CrateId; +use base_db::Crate; use chalk_ir::{ fold::{FallibleTypeFolder, Shift}, DebruijnIndex, @@ -34,10 +34,7 @@ use crate::{ TraitRefExt, Ty, WhereClause, }; -pub(crate) fn fn_traits( - db: &dyn DefDatabase, - krate: CrateId, -) -> impl Iterator<Item = TraitId> + '_ { +pub(crate) fn fn_traits(db: &dyn DefDatabase, krate: Crate) -> impl Iterator<Item = TraitId> + '_ { [LangItem::Fn, LangItem::FnMut, LangItem::FnOnce] .into_iter() .filter_map(move |lang| db.lang_item(krate, lang)) |