Use recursion_limit for const eval stack limit#66726
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
72ceae3 to
feb35d4
Compare
|
(I just want to note that apparently I am failing at git/rebase currently, so the commit is weird and misbehaving.) |
1116b09 to
69a13f2
Compare
|
(There, commit should be fixed.) |
69a13f2 to
0aebfc8
Compare
|
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
|
Looks like you will have to adjust some UI tests. The approach LGTM, but I'd also like to hear @oli-obk's opinion. |
|
r? @oli-obk then |
|
lgtm modulo tests |
0af8b0d to
52426ab
Compare
|
I believe other changes caused the two failing UI tests to output a recursive requirement warning rather than a depth limit exceeded, so the tests don't need updating anymore. I did manage to get "most" of a bless run done. EDIT: found the change: #66294 |
|
@bors r+ |
|
📌 Commit 52426ab has been approved by |
|
🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened |
Use recursion_limit for const eval stack limit cc rust-lang/miri#643 @orium @RalfJung I'm really not certain how exactly to handle this change, but it looks like it's that simple. Reuse `recursion_limit` ("The maximum recursion limit for potentially infinitely recursive operations such as auto-dereference and monomorphization") which is configurable by the user for the const evaluation stack frame limit. The other option is to make `const_eval_stack_frame_limit` configurable in the same way as `recursion_limit` (but I'm not sure how to do that and it'd be a bigger change). Fixes rust-lang/miri#643.
Rollup of 9 pull requests Successful merges: - #66503 (More useful test error messages on should_panic(expected=...) mismatch) - #66662 (Miri: run panic-catching tests in liballoc) - #66679 (Improve lifetime errors with implicit trait object lifetimes) - #66726 (Use recursion_limit for const eval stack limit) - #66790 (Do `min_const_fn` checks for `SetDiscriminant`s target) - #66832 (const_prop: detect and avoid catching Miri errors that require allocation) - #66880 (Add long error code explanation message for E0203) - #66890 (Format liballoc with rustfmt) - #66896 (pass Queries to compiler callbacks) Failed merges: r? @ghost
cc rust-lang/miri#643 @orium @RalfJung
I'm really not certain how exactly to handle this change, but it looks like it's that simple.
Reuse
recursion_limit("The maximum recursion limit for potentially infinitely recursive operations such as auto-dereference and monomorphization") which is configurable by the user for the const evaluation stack frame limit.The other option is to make
const_eval_stack_frame_limitconfigurable in the same way asrecursion_limit(but I'm not sure how to do that and it'd be a bigger change).Fixes rust-lang/miri#643.