Auto merge of #135167 - mzacho:depth-limit-const-eval-query, r=oli-obk
Depth limit const eval query Currently the const-eval query doesn't have a recursion limit or timeout, causing the complier to freeze in an infinite loop, see #125718. This PR depth limits the `eval_to_const_value_raw` query (with the [`recursion_limit`](https://doc.rust-lang.org/reference/attributes/limits.html) attribute) and improves the diagnostics for query overflow errors, so spans are reported for other dep kinds than `layout_of` (e.g. `eval_to_const_value_raw`). fixes #125718 fixes #114192
This commit is contained in:
commit
3ff1b6410e
13 changed files with 76 additions and 33 deletions
|
@ -1243,6 +1243,7 @@ rustc_queries! {
|
|||
"simplifying constant for the type system `{}`",
|
||||
key.value.display(tcx)
|
||||
}
|
||||
depth_limit
|
||||
cache_on_disk_if { true }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue