Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise the default recursion limit to 128 #62450

Merged
merged 1 commit into from
Jul 10, 2019
Merged

Conversation

nagisa
Copy link
Member

@nagisa nagisa commented Jul 6, 2019

The previous limit of 64 is being (just) barely hit by genuine code out there, which is causing issues like #62059 to rear their end.

Ideally, we wouldn’t have such arbitrary limits at all, but while we do, it makes a lot of sense to just raise this limit whenever genuine use-cases end up hitting it.

r? @pnkfelix

Fixes #62059

@nagisa nagisa added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 6, 2019
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 6, 2019
@nagisa nagisa added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 6, 2019
@nagisa
Copy link
Member Author

nagisa commented Jul 6, 2019

Beta-nominated because low-risk and, I believe, the relevant regression has made its way into beta. I haven’t verified though.

@matklad
Copy link
Member

matklad commented Jul 6, 2019

Ideally, we wouldn’t have such arbitrary limits at all.

At least in IDE, one definitely wants to limit the amount of work the compiler can do in the worst case: in IDEs, pathological short code that causes a lot of computation is both more problematic (one does not simply ctrl+c a hang-up IDE) and more common (because iDE is exposed to broken and weird code).

In the limit, perfectly responsive iDE should be a primitive-recursive function that is limited by fuel :)

@pnkfelix
Copy link
Member

pnkfelix commented Jul 9, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Jul 9, 2019

📌 Commit 7e40df3 has been approved by pnkfelix

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 9, 2019
@pnkfelix
Copy link
Member

pnkfelix commented Jul 9, 2019

@bors rollup

Centril added a commit to Centril/rust that referenced this pull request Jul 9, 2019
Raise the default recursion limit to 128

The previous limit of 64 is being (just) barely hit by genuine code out there, which is causing issues like rust-lang#62059 to rear their end.

Ideally, we wouldn’t have such arbitrary limits at all, but while we do, it makes a lot of sense to just raise this limit whenever genuine use-cases end up hitting it.

r? @pnkfelix

Fixes rust-lang#62059
Centril added a commit to Centril/rust that referenced this pull request Jul 9, 2019
Raise the default recursion limit to 128

The previous limit of 64 is being (just) barely hit by genuine code out there, which is causing issues like rust-lang#62059 to rear their end.

Ideally, we wouldn’t have such arbitrary limits at all, but while we do, it makes a lot of sense to just raise this limit whenever genuine use-cases end up hitting it.

r? @pnkfelix

Fixes rust-lang#62059
bors added a commit that referenced this pull request Jul 9, 2019
Rollup of 9 pull requests

Successful merges:

 - #62417 (Fix ICEs when `Self` is used in type aliases)
 - #62450 (Raise the default recursion limit to 128)
 - #62470 (Prevent shrinking of "crate select" element on Firefox)
 - #62515 (cli: make help output for -l and -L consistent)
 - #62520 (Regression test for issue 42574.)
 - #62526 (normalize use of backticks in compiler messages for libsyntax/feature_gate.rs)
 - #62527 (clarify that debug_assert does not completely omits the code)
 - #62535 (ci: Configure $CI_JOB_NAME correctly)
 - #62541 (Add spastorino for rustc-guide toolstate)

Failed merges:

r? @ghost
@bors bors merged commit 7e40df3 into rust-lang:master Jul 10, 2019
@nikomatsakis
Copy link
Contributor

fwiw if we incorporate chalk we remove this particular arbitrary limit, at least in trait solving (though we still have some notion of maximum size of types we have to enforce) =)

@pnkfelix
Copy link
Member

discussed at T-compiler meeting. Accepted for beta backport.

@pnkfelix pnkfelix added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jul 11, 2019
@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 22, 2019
bors added a commit that referenced this pull request Jul 22, 2019
[beta] Rollup backports

Cherry picked:

* rustc_target: avoid negative register counts in the SysV x86_64 ABI. #62380
* Fix ICEs when `Self` is used in type aliases #62417
* Raise the default recursion limit to 128 #62450
* Handle errors during error recovery gracefully #62604
* Correctly break out of recovery loop #62607
* Cancel unemitted diagnostics during error recovery #62666
* ci: pin awscli dependencies #62856
* Ensure that checkout is with \n line endings #62564

Rolled up:

* [beta] Backport #62615 #62793
* [beta] Fix #62660 #62792

r? @ghost
bors added a commit that referenced this pull request Jul 22, 2019
[beta] Rollup backports

Cherry picked:

* rustc_target: avoid negative register counts in the SysV x86_64 ABI. #62380
* Fix ICEs when `Self` is used in type aliases #62417
* Raise the default recursion limit to 128 #62450
* Handle errors during error recovery gracefully #62604
* Correctly break out of recovery loop #62607
* Cancel unemitted diagnostics during error recovery #62666
* ci: pin awscli dependencies #62856
* Ensure that checkout is with \n line endings #62564

Rolled up:

* [beta] Backport #62615 #62793
* [beta] Fix #62660 #62792

r? @ghost
vlad20012 added a commit to intellij-rust/intellij-rust that referenced this pull request May 30, 2022
The limit has been raised in Rustc a long time ago:
rust-lang/rust#62450

This affects macro expansion depth and trait solving depth
vlad20012 added a commit to intellij-rust/intellij-rust that referenced this pull request May 30, 2022
The limit has been raised in Rustc a long time ago:
rust-lang/rust#62450

This affects macro expansion depth and trait solving depth
bors bot added a commit to intellij-rust/intellij-rust that referenced this pull request May 30, 2022
8885: Raise the default recursion limit from 64 to 128 r=vlad20012 a=vlad20012

The limit has been raised in Rustc a long time ago: rust-lang/rust#62450

This affects max macro expansion depth and max trait solving depth.

changelog: Expand macros up to 128 nesting depth

Co-authored-by: vlad20012 <[email protected]>
yopox pushed a commit to Kobzol/intellij-rust that referenced this pull request Feb 27, 2023
The limit has been raised in Rustc a long time ago:
rust-lang/rust#62450

This affects macro expansion depth and trait solving depth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rustdoc recursion limit issue
7 participants