From aa45561183493f274b78ca6be6b841bbc4b29e0d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 27 Nov 2019 09:42:55 +0300 Subject: Crate -> CrateId --- crates/ra_hir/src/ty/traits.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_hir/src/ty/traits.rs') diff --git a/crates/ra_hir/src/ty/traits.rs b/crates/ra_hir/src/ty/traits.rs index 637e21e9c..39b489a4c 100644 --- a/crates/ra_hir/src/ty/traits.rs +++ b/crates/ra_hir/src/ty/traits.rs @@ -8,7 +8,7 @@ use ra_db::{impl_intern_key, salsa, CrateId}; use ra_prof::profile; use rustc_hash::FxHashSet; -use crate::{db::HirDatabase, Crate, ImplBlock, TypeAlias}; +use crate::{db::HirDatabase, ImplBlock, TypeAlias}; use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; @@ -18,7 +18,7 @@ pub(crate) mod chalk; #[derive(Debug, Clone)] pub struct TraitSolver { - krate: Crate, + krate: CrateId, inner: Arc>>, } @@ -60,12 +60,12 @@ const CHALK_SOLVER_MAX_SIZE: usize = 4; #[derive(Debug, Copy, Clone)] struct ChalkContext<'a, DB> { db: &'a DB, - krate: Crate, + krate: CrateId, } pub(crate) fn trait_solver_query( db: &(impl HirDatabase + salsa::Database), - krate: Crate, + krate: CrateId, ) -> TraitSolver { db.salsa_runtime().report_untracked_read(); // krate parameter is just so we cache a unique solver per crate @@ -176,7 +176,7 @@ impl TypeWalk for ProjectionPredicate { /// Solve a trait goal using Chalk. pub(crate) fn trait_solve_query( db: &impl HirDatabase, - krate: Crate, + krate: CrateId, goal: Canonical>, ) -> Option { let _p = profile("trait_solve_query"); -- cgit v1.2.3