Skip to content

Commit 4f5fdb9

Browse files
remove outdated comment about goal inference invariance
1 parent a75e404 commit 4f5fdb9

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/solve/invariants.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,6 @@ types should still be equal to each other.
3535
Needed to prevent goals from succeeding in HIR typeck and then failing in MIR borrowck.
3636
If this invariant is broken MIR typeck ends up failing with an ICE.
3737

38-
### Applying inference results from a goal does not change its result ❌
39-
40-
TODO: this invariant is formulated in a weird way and needs to be elaborated.
41-
Pretty much: I would like this check to only fail if there's a solver bug:
42-
https://github.com/rust-lang/rust/blob/2ffeb4636b4ae376f716dc4378a7efb37632dc2d/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs#L391-L407
43-
44-
If we prove some goal/equate types/whatever, apply the resulting inference constraints,
45-
and then redo the original action, the result should be the same.
46-
47-
This unfortunately does not hold - at least in the new solver - due to a few annoying reasons.
48-
4938
### The trait solver has to be *locally sound*
5039

5140
This means that we must never return *success* for goals for which no `impl` exists. That would

0 commit comments

Comments
 (0)