Closed jrr45 closed 2 years ago
That's this assertion in Binders<T>::substitute()
https://github.com/rust-lang/chalk/blob/60bbf5408cb6050ef62c98fb75400f95f664ccb2/chalk-ir/src/lib.rs#L2249
```
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `1`,
right: `0`', /home/wilco/p/rust/chalk/chalk-ir/src/lib.rs:2249:9
stack backtrace:
0: rust_begin_unwind
at /rustc/bb8c2f41174caceec00c28bc6c5c20ae9f9a175c/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/bb8c2f41174caceec00c28bc6c5c20ae9f9a175c/library/core/src/panicking.rs:142:14
2: core::panicking::assert_failed_inner
3: core::panicking::assert_failed
at /rustc/bb8c2f41174caceec00c28bc6c5c20ae9f9a175c/library/core/src/panicking.rs:181:5
4: chalk_ir::Binders::read_upgrade::{{closure}}
at /home/wilco/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.16.1/src/derived/slot.rs:218:13
10: salsa::runtime::Runtime::execute_query_implementation
at /home/wilco/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.16.1/src/runtime.rs:330:21
11: salsa::derived::slot::Slot
::read_upgrade
at /home/wilco/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.16.1/src/derived/slot.rs:215:26
12: salsa::derived::slot::Slot
::read
at /home/wilco/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.16.1/src/derived/slot.rs:148:9
13:
>::try_fetch
at /home/wilco/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.16.1/src/derived.rs:170:13
14: salsa::QueryTable
::try_get
at /home/wilco/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.16.1/src/lib.rs:494:9
15: salsa::QueryTable
::get
at /home/wilco/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.16.1/src/lib.rs:490:9
16:
Also happens when you load the program from a file.
Using the interactive commands, creating the program
then calling "lowered" causes chalk to panic. The same does not seem to happen by creating a test and using "lowering_success" with the same program.