-
Notifications
You must be signed in to change notification settings - Fork 13k
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
suggest doubling recursion limit in more situations #39655
Conversation
|
||
error[E0055]: reached the recursion limit while auto-dereferencing I | ||
| | ||
= help: consider adding a `#[recursion_limit="20"]` attribute to your crate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This duplicate error shouldn't be here and yet it is. cc #38940 @jseyfried
fbaef50
to
422b789
Compare
422b789
to
b4993ec
Compare
r? |
src/libsyntax/ext/base.rs
Outdated
ei.callee.name())); | ||
err.note(&format!( | ||
"consider adding a `#![recursion_limit=\"{}\"]` attribute to your crate", | ||
suggested_limit)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be .help()
too or is there a reason it can't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think it can be.
44 | is_send::<A>(); | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: consider adding a `#![recursion_limit="20"]` attribute to your crate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need update to help
I think
Thanks. I'll |
80cd3cf
to
e1773cb
Compare
ei.callee.name())); | ||
err.help(&format!( | ||
"consider adding a `#![recursion_limit=\"{}\"]` attribute to your crate", | ||
suggested_limit)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should factor this code into some sort of helper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like it'd also be nice to make this into an error code ("recursion limit reached") with a note giving the specific details. That way, we could give an extended error description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where should I put the helper and diagnostic code? Note that the PR is split across libsyntax and librustc_typeck.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Can we only put diagnostic codes into rustc crates? I'm not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are diagnostic codes in libsyntax. Can I define it there and use the same one from librustc_typeck?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meh. I think we should improve this, but it's not that big a deal.
@bors r+ |
📌 Commit e1773cb has been approved by |
⌛ Testing commit e1773cb with merge f46ed40... |
💔 Test failed - status-appveyor |
e1773cb
to
6e259dc
Compare
Should be fixed. |
@bors r=nikomatsakis |
📌 Commit 6e259dc has been approved by |
⌛ Testing commit 6e259dc with merge 907f26d... |
…=nikomatsakis suggest doubling recursion limit in more situations Fixes rust-lang#38852. r? @bluss
@bors retry |
☀️ Test successful - status-appveyor, status-travis |
Fixes #38852.
r? @bluss