Skip to content

Commit d445519

Browse files
committed
w
1 parent 3279bcb commit d445519

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

compiler/rustc_type_ir/src/search_graph/tree.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,16 @@ impl<X: Cx> SearchTree<X> {
144144
NodeKind::CycleOnStack { entry_node_id: _, result: prev },
145145
NodeKind::CycleOnStack { entry_node_id: _, result: new },
146146
) => prev == new,
147-
_ => false,
147+
(&NodeKind::ProvisionalCacheHit { entry_node_id }, _) => {
148+
self.result_matches(entry_node_id, new)
149+
}
150+
(_, &NodeKind::ProvisionalCacheHit { entry_node_id }) => {
151+
self.result_matches(prev, entry_node_id)
152+
}
153+
result_matches => {
154+
tracing::debug!(?result_matches);
155+
false
156+
}
148157
}
149158
}
150159

tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.stderr

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ LL | impls_trait::<MultipleCandidates>();
1717
| ^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `MultipleCandidates`
1818
|
1919
= help: the trait `Trait` is implemented for `MultipleCandidates`
20+
note: required for `MultipleCandidates` to implement `Trait`
21+
--> $DIR/inductive-cycle-but-err.rs:43:6
22+
|
23+
LL | impl Trait for MultipleNested
24+
| ^^^^^ ^^^^^^^^^^^^^^
25+
...
26+
LL | MultipleCandidates: Trait,
27+
| ----- unsatisfied trait bound introduced here
28+
= note: 8 redundant requirements hidden
29+
= note: required for `MultipleCandidates` to implement `Trait`
2030
note: required by a bound in `impls_trait`
2131
--> $DIR/inductive-cycle-but-err.rs:51:19
2232
|

0 commit comments

Comments
 (0)