diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-01 09:00:00 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-01 09:00:00 +0100 |
commit | 1e6b45b05ae378b9e376fcf02ecef15aa7dd1b6b (patch) | |
tree | b77d629e6ea965cbcfe2e916b3ac815c006f1a04 | |
parent | 35e79bf4225949d3666551246bf85f8198707e3c (diff) | |
parent | f89d34be6a93263d7fa506bba6da1d1d7de237bc (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.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/traits.rs | 5 |
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 @@ | |||
1 | use std::sync::{Arc, Mutex}; | 1 | use std::sync::Arc; |
2 | 2 | ||
3 | use parking_lot::Mutex; | ||
3 | use ra_syntax::{SyntaxNode, TreeArc, SmolStr, ast}; | 4 | use ra_syntax::{SyntaxNode, TreeArc, SmolStr, ast}; |
4 | use ra_db::{SourceDatabase, salsa}; | 5 | use 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. |
2 | use std::sync::{Arc, Mutex}; | 2 | use std::sync::Arc; |
3 | 3 | ||
4 | use parking_lot::Mutex; | ||
4 | use rustc_hash::FxHashSet; | 5 | use rustc_hash::FxHashSet; |
5 | use log::debug; | 6 | use log::debug; |
6 | use chalk_ir::cast::Cast; | 7 | use 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 | } |