about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-05 00:37:58 +0100
committerGitHub <noreply@github.com>2021-12-05 00:37:58 +0100
commit1f2a26e999a4c8e3a053e95f62b1ee403b15faed (patch)
tree94c877d9923066b9f7e615547c4a4c7e529757e1 /compiler/rustc_codegen_llvm/src/builder.rs
parent29fe57def2693a3f9b4fcfbb1072b4b655700260 (diff)
parent37ed2db1e04e5b9dcdf833374d364b1f5e374fc3 (diff)
downloadrust-1f2a26e999a4c8e3a053e95f62b1ee403b15faed.tar.gz
rust-1f2a26e999a4c8e3a053e95f62b1ee403b15faed.zip
Rollup merge of #90023 - b-naber:postpone_const_eval_infer_vars, r=nikomatsakis
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?
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
0 files changed, 0 insertions, 0 deletions