- Notifications
You must be signed in to change notification settings - Fork 13.9k
Add span for struct tail recursion limit error #146597
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
Add span for struct tail recursion limit error #146597
Conversation
38571c8
to b3e072a
Compare This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
r? compiler (reduced bandwidth during weekday) |
This comment has been minimized.
This comment has been minimized.
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.
Why did you pass a whole obligation cause? I think a span is sufficient here and a bit less heavy.
b3e072a
to f2998f3
Compare This comment has been minimized.
This comment has been minimized.
Because I asked for this without fully explaining my reasoning. If most sites have obligation causes, then passing a reference to them seemed less annoying than just the span, and could allow emitting the rest of the obligation cause code to give more context where available |
Since this PR is only using span, I should be applying @compiler-errors's suggestion, right? |
Works for me if that gets it unblocked, but not my preference So: yea do that and we'll land it and I'll figure out whether to use obligation causes on my own time |
don't let this be blocked on me in that case r? oli-obk |
|
f2998f3
to 5bf8d13
Compare } | ||
| ||
//~? ERROR reached the recursion limit finding the struct tail for `K` | ||
//~? ERROR reached the recursion limit finding the struct tail for `Bottom` |
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.
why did you move from //~?
to pointing them at the first line in the file, even though nothing in the output changed? Is the json different and thus suggesting this to be done?
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 was suggested to move //~?
to point at the first line in many files. I'm not sure why or whether it is expected.
From rust-log-analyzer
5bf8d13
to 6912631
Compare @bors r+ rollup |
Rollup of 6 pull requests Successful merges: - #146434 (c-variadic: allow c-variadic inherent and trait methods) - #146487 (Improve `core::num` coverage) - #146597 (Add span for struct tail recursion limit error) - #146622 (Add regression test for issue #91831) - #146717 (Clean up universe evaluation during type test evaluation) - #146723 (Include patch in release notes) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #146597 - modhanami:add-struct-tail-recursion-limit-span, r=oli-obk Add span for struct tail recursion limit error Fixes #135629 Changes 1. Add span to RecursionLimitReached 2. Add ObligationCause parameter to struct_tail_raw 4. Update call sites to pass nearby ObligationCause or create one 5. Update affected .stderr
Fixes #135629
Changes