diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-04-29 11:27:54 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-29 11:27:54 +0530 |
| commit | 6da62a40f25c7baa26c7d6ca79b5ecc804c0c307 (patch) | |
| tree | ad69be89f23dee0b48f501761651993b920e96ab /compiler/rustc_codegen_cranelift/example/example.rs | |
| parent | 572c0d553f2bd1b934b08fe240310112369a5c76 (diff) | |
| parent | ee8942138a9ff0dedbe8575f0aacaea2ec78a51f (diff) | |
| download | rust-6da62a40f25c7baa26c7d6ca79b5ecc804c0c307.tar.gz rust-6da62a40f25c7baa26c7d6ca79b5ecc804c0c307.zip | |
Rollup merge of #110614 - compiler-errors:new-solver-overflow-response, r=lcnr
Clear response values for overflow in new solver
When we have an overflow, return a trivial query response. This fixes an ICE with the code described in #110544:
```rust
trait Trait {}
struct W<T>(T);
impl<T, U> Trait for W<(W<T>, W<U>)>
where
W<T>: Trait,
W<U>: Trait,
{}
fn impls<T: Trait>() {}
fn main() {
impls::<W<_>>()
}
```
Where, while proving `W<?0>: Trait`, we overflow but still apply the query response of `?0 = (W<?1>, W<?2>)`. Then while re-processing the query to validate that our evaluation result was stable, we get a different query response that looks like `?1 = (W<?3>, W<?4>), ?2 = (W<?5>, W<?6>)`, and so we trigger the ICE.
Also, by returning a trivial query response we also avoid the infinite-loop/OOM behavior of the old solver.
r? ``@lcnr``
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/example.rs')
0 files changed, 0 insertions, 0 deletions
