mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-02 21:17:39 +00:00
Merge #1359
1359: don't poison mutex around chalk r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
1e6b45b05a
@ -1,5 +1,6 @@
|
|||||||
use std::sync::{Arc, Mutex};
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use parking_lot::Mutex;
|
||||||
use ra_syntax::{SyntaxNode, TreeArc, SmolStr, ast};
|
use ra_syntax::{SyntaxNode, TreeArc, SmolStr, ast};
|
||||||
use ra_db::{SourceDatabase, salsa};
|
use ra_db::{SourceDatabase, salsa};
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
//! Trait solving using Chalk.
|
//! Trait solving using Chalk.
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use parking_lot::Mutex;
|
||||||
use rustc_hash::FxHashSet;
|
use rustc_hash::FxHashSet;
|
||||||
use log::debug;
|
use log::debug;
|
||||||
use chalk_ir::cast::Cast;
|
use chalk_ir::cast::Cast;
|
||||||
@ -61,7 +62,7 @@ fn solve(
|
|||||||
let context = ChalkContext { db, krate };
|
let context = ChalkContext { db, krate };
|
||||||
let solver = db.solver(krate);
|
let solver = db.solver(krate);
|
||||||
debug!("solve goal: {:?}", goal);
|
debug!("solve goal: {:?}", goal);
|
||||||
let solution = solver.lock().unwrap().solve_with_fuel(&context, goal, Some(1000));
|
let solution = solver.lock().solve_with_fuel(&context, goal, Some(1000));
|
||||||
debug!("solve({:?}) => {:?}", goal, solution);
|
debug!("solve({:?}) => {:?}", goal, solution);
|
||||||
solution
|
solution
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user