Make sure to record deps from cached task in new solver on first run

This commit is contained in:
Michael Goulet 2024-12-03 22:47:08 +00:00
parent 3f089971ff
commit 988f28d442
4 changed files with 22 additions and 10 deletions

View file

@ -1400,10 +1400,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
where
OP: FnOnce(&mut Self) -> R,
{
let (result, dep_node) =
self.tcx().dep_graph.with_anon_task(self.tcx(), dep_kinds::TraitSelect, || op(self));
self.tcx().dep_graph.read_index(dep_node);
(result, dep_node)
self.tcx().dep_graph.with_anon_task(self.tcx(), dep_kinds::TraitSelect, || op(self))
}
/// filter_impls filters candidates that have a positive impl for a negative