Commit 77de5f0
authored
Rollup merge of rust-lang#110618 - compiler-errors:eval-ctxt-tainted, r=BoxyUwU
Track if EvalCtxt has been tainted, make sure it can't be used to make query responses after
Just some additional protection against missing probes or strange candidate assembly behavior in the new solver.
For background, we don't ever want to call `evaluate_added_goals_and_make_canonical_response` if a previous call to `try_evaluate_added_goals` has bailed with `NoSolution`, since our nested goals are left in an undefined state at that point. This most commonly suggests a missing `EvalCtxt::probe`, but could also signify some other shenanigans like dropping a `QueryResult` on the floor without properly `?`'ing it.
r? `@lcnr`File tree
2 files changed
+22
-0
lines changed- compiler/rustc_trait_selection/src/solve
- eval_ctxt
2 files changed
+22
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
60 | 68 | | |
61 | 69 | | |
62 | 70 | | |
| |||
121 | 129 | | |
122 | 130 | | |
123 | 131 | | |
| 132 | + | |
124 | 133 | | |
125 | 134 | | |
126 | 135 | | |
| |||
172 | 181 | | |
173 | 182 | | |
174 | 183 | | |
| 184 | + | |
175 | 185 | | |
176 | 186 | | |
177 | 187 | | |
| |||
391 | 401 | | |
392 | 402 | | |
393 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
394 | 408 | | |
395 | 409 | | |
396 | 410 | | |
| |||
404 | 418 | | |
405 | 419 | | |
406 | 420 | | |
| 421 | + | |
407 | 422 | | |
408 | 423 | | |
409 | 424 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
| |||
0 commit comments