aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-08-10 11:13:39 +0100
committerFlorian Diebold <[email protected]>2019-08-12 20:43:00 +0100
commit11b9845afd1daa845ac9d541fd22f1fdf53436c8 (patch)
tree02255a7e45efad49bf5c5652c70330298d159082 /crates/ra_hir/src/ty
parent6265497523469990ce39e6817423c35a17055a54 (diff)
Improve debug logging a bit
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r--crates/ra_hir/src/ty/traits.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/ty/traits.rs b/crates/ra_hir/src/ty/traits.rs
index 0769e6e17..fde5d8a47 100644
--- a/crates/ra_hir/src/ty/traits.rs
+++ b/crates/ra_hir/src/ty/traits.rs
@@ -7,7 +7,7 @@ use parking_lot::Mutex;
7use ra_prof::profile; 7use ra_prof::profile;
8use rustc_hash::FxHashSet; 8use rustc_hash::FxHashSet;
9 9
10use super::{Canonical, GenericPredicate, ProjectionTy, TraitRef, Ty}; 10use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty};
11use crate::{db::HirDatabase, Crate, ImplBlock, Trait}; 11use crate::{db::HirDatabase, Crate, ImplBlock, Trait};
12 12
13use self::chalk::{from_chalk, ToChalk}; 13use self::chalk::{from_chalk, ToChalk};
@@ -61,7 +61,6 @@ fn solve(
61) -> Option<chalk_solve::Solution> { 61) -> Option<chalk_solve::Solution> {
62 let context = ChalkContext { db, krate }; 62 let context = ChalkContext { db, krate };
63 let solver = db.trait_solver(krate); 63 let solver = db.trait_solver(krate);
64 debug!("solve goal: {:?}", goal);
65 let solution = solver.lock().solve(&context, goal); 64 let solution = solver.lock().solve(&context, goal);
66 debug!("solve({:?}) => {:?}", goal, solution); 65 debug!("solve({:?}) => {:?}", goal, solution);
67 solution 66 solution
@@ -120,10 +119,11 @@ pub struct ProjectionPredicate {
120pub(crate) fn trait_solve_query( 119pub(crate) fn trait_solve_query(
121 db: &impl HirDatabase, 120 db: &impl HirDatabase,
122 krate: Crate, 121 krate: Crate,
123 trait_ref: Canonical<InEnvironment<Obligation>>, 122 goal: Canonical<InEnvironment<Obligation>>,
124) -> Option<Solution> { 123) -> Option<Solution> {
125 let _p = profile("trait_solve_query"); 124 let _p = profile("trait_solve_query");
126 let canonical = trait_ref.to_chalk(db).cast(); 125 debug!("trait_solve_query({})", goal.value.value.display(db));
126 let canonical = goal.to_chalk(db).cast();
127 // We currently don't deal with universes (I think / hope they're not yet 127 // We currently don't deal with universes (I think / hope they're not yet
128 // relevant for our use cases?) 128 // relevant for our use cases?)
129 let u_canonical = chalk_ir::UCanonical { canonical, universes: 1 }; 129 let u_canonical = chalk_ir::UCanonical { canonical, universes: 1 };