Skip to content

error for recursion limit should give instructions for increasing it #34565

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

Closed
durka opened this issue Jun 29, 2016 · 5 comments
Closed

error for recursion limit should give instructions for increasing it #34565

durka opened this issue Jun 29, 2016 · 5 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@durka
Copy link
Contributor

durka commented Jun 29, 2016

I thought it used to do this, but I could be making it up.

@nagisa
Copy link
Member

nagisa commented Jun 29, 2016

We still do, however there many different cases where such recursion error may happen. I’m not sure setting #[recursion_limit="256"] would do anything for, say, trait instantiation recursion thing.

@durka
Copy link
Contributor Author

durka commented Jun 29, 2016

It doesn't (anymore?) if you exceed the limit during macro expansion.
On Jun 29, 2016 18:35, "Simonas Kazlauskas" notifications@github.com
wrote:

We still do, however there many different recursion limits. I’m not sure
setting #[recursion_limit="256"] would do anything for, say, trait
instantiation recursion thing.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#34565 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAC3n3bcm46cnJ-7BJILgC-28m51sYuiks5qQvMWgaJpZM4JBnW8
.

@durka
Copy link
Contributor Author

durka commented Jun 30, 2016

I'm talking about this one to be clear.

@nagisa
Copy link
Member

nagisa commented Jun 30, 2016

IMO the optimal fix would be to introduce a helper function or macro in a form of

check_recursion_limit!(..., current_depth, error_msg, fmt_args)

and use it everywhere where we currently emit recursion error.

@apasel422 apasel422 added the A-diagnostics Area: Messages for errors, warnings, and lints label Jul 1, 2016
@steveklabnik steveklabnik removed the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 9, 2017
@durka
Copy link
Contributor Author

durka commented Mar 15, 2017

Fixed by #39655 (re: #34565 (comment), see #40198).

@durka durka closed this as completed Mar 15, 2017
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

4 participants