aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-06-01 09:00:00 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-06-01 09:00:00 +0100
commit1e6b45b05ae378b9e376fcf02ecef15aa7dd1b6b (patch)
treeb77d629e6ea965cbcfe2e916b3ac815c006f1a04
parent35e79bf4225949d3666551246bf85f8198707e3c (diff)
parentf89d34be6a93263d7fa506bba6da1d1d7de237bc (diff)
Merge #1359
1359: don't poison mutex around chalk r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
-rw-r--r--crates/ra_hir/src/db.rs3
-rw-r--r--crates/ra_hir/src/ty/traits.rs5
2 files changed, 5 insertions, 3 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs
index 11cdf9c34..d84e1598b 100644
--- a/crates/ra_hir/src/db.rs
+++ b/crates/ra_hir/src/db.rs
@@ -1,5 +1,6 @@
1use std::sync::{Arc, Mutex}; 1use std::sync::Arc;
2 2
3use parking_lot::Mutex;
3use ra_syntax::{SyntaxNode, TreeArc, SmolStr, ast}; 4use ra_syntax::{SyntaxNode, TreeArc, SmolStr, ast};
4use ra_db::{SourceDatabase, salsa}; 5use ra_db::{SourceDatabase, salsa};
5 6
diff --git a/crates/ra_hir/src/ty/traits.rs b/crates/ra_hir/src/ty/traits.rs
index fc90f56d5..db78f25ca 100644
--- a/crates/ra_hir/src/ty/traits.rs
+++ b/crates/ra_hir/src/ty/traits.rs
@@ -1,6 +1,7 @@
1//! Trait solving using Chalk. 1//! Trait solving using Chalk.
2use std::sync::{Arc, Mutex}; 2use std::sync::Arc;
3 3
4use parking_lot::Mutex;
4use rustc_hash::FxHashSet; 5use rustc_hash::FxHashSet;
5use log::debug; 6use log::debug;
6use chalk_ir::cast::Cast; 7use chalk_ir::cast::Cast;
@@ -61,7 +62,7 @@ fn solve(
61 let context = ChalkContext { db, krate }; 62 let context = ChalkContext { db, krate };
62 let solver = db.solver(krate); 63 let solver = db.solver(krate);
63 debug!("solve goal: {:?}", goal); 64 debug!("solve goal: {:?}", goal);
64 let solution = solver.lock().unwrap().solve_with_fuel(&context, goal, Some(1000)); 65 let solution = solver.lock().solve_with_fuel(&context, goal, Some(1000));
65 debug!("solve({:?}) => {:?}", goal, solution); 66 debug!("solve({:?}) => {:?}", goal, solution);
66 solution 67 solution
67} 68}