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

Rustc does not recommend raising the recursion limit #38852

Closed
bluss opened this issue Jan 5, 2017 · 3 comments
Closed

Rustc does not recommend raising the recursion limit #38852

bluss opened this issue Jan 5, 2017 · 3 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@bluss
Copy link
Member

bluss commented Jan 5, 2017

It used to be that when you reach the macro recursion limit, rustc would recommend raising it and give the attribute to do so. This has been lost.

Expected Result:

Diagnostic tells how to increase recursion limit.

Actual Result:

No note/help.

Reproduce (playground gist)

macro_rules! recurse {
    () => { };
    ($t:tt $($tail:tt)*) => { recurse!($($tail)*) };
}

fn main() {
    recurse!(0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9);
}
@bluss bluss added the A-diagnostics Area: Messages for errors, warnings, and lints label Jan 5, 2017
@bluss
Copy link
Member Author

bluss commented Jan 5, 2017

rust.godbolt.org doesn't show the help to raise the limit for historical Rust release, maybe I am mistaken that this is a regression.

@durka
Copy link
Contributor

durka commented Jan 5, 2017

There surely was a situation in which you could get the suggestion, and it won't regress because there is a test. But maybe it never showed up for macro evaluation?

@durka
Copy link
Contributor

durka commented Jan 5, 2017

I can work on this.

frewsxcv added a commit to frewsxcv/rust that referenced this issue Mar 2, 2017
…=nikomatsakis

suggest doubling recursion limit in more situations

Fixes rust-lang#38852.

r? @bluss
bors added a commit that referenced this issue Mar 2, 2017
suggest doubling recursion limit in more situations

Fixes #38852.

r? @bluss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

2 participants