mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
1f2a26e999
Postpone the evaluation of constant expressions that depend on inference variables Previously `delay_span_bug` calls were triggered once an inference variable was included in the substs of a constant that was to be evaluated. Some of these would merely have resulted in trait candidates being rejected, hence no real error was ever encountered, but the triggering of the `delay_span_bug` then caused an ICE in later stages of the compiler due to no error ever occurring. We now postpone the evaluation of these constants, so any trait obligation fulfillment will simply stall on this constant and the existing type inference machinery of the compiler handles any type errors if present. Fixes https://github.com/rust-lang/rust/issues/89320 Fixes https://github.com/rust-lang/rust/issues/89146 Fixes https://github.com/rust-lang/rust/issues/87964 Fixes https://github.com/rust-lang/rust/issues/87470 Fixes https://github.com/rust-lang/rust/issues/83288 Fixes https://github.com/rust-lang/rust/issues/83249 Fixes https://github.com/rust-lang/rust/issues/90654 I want to thank `@BoxyUwU` for cooperating on this and for providing some help. r? `@lcnr` maybe? |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |