Skip to content

Conversation

modhanami
Copy link
Contributor

@modhanami modhanami commented Sep 15, 2025

Fixes #135629

Changes

  1. Add span to RecursionLimitReached
  2. Add ObligationCause parameter to struct_tail_raw
  3. Update call sites to pass nearby ObligationCause or create one
  4. Update affected .stderr
@rustbot
Copy link
Collaborator

rustbot commented Sep 15, 2025

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 15, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 15, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@modhanami modhanami force-pushed the add-struct-tail-recursion-limit-span branch from 38571c8 to b3e072a Compare September 15, 2025 15:02
@rustbot
Copy link
Collaborator

rustbot commented Sep 15, 2025

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.

@jieyouxu
Copy link
Member

r? compiler (reduced bandwidth during weekday)

@rustbot rustbot assigned fee1-dead and unassigned jieyouxu Sep 15, 2025
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@compiler-errors compiler-errors left a 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.

View changes since this review

@modhanami modhanami force-pushed the add-struct-tail-recursion-limit-span branch from b3e072a to f2998f3 Compare September 15, 2025 16:42
@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor

oli-obk commented Sep 15, 2025

Why did you pass a whole obligation cause? I think a span is sufficient here and a bit less heavy.

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

@modhanami
Copy link
Contributor Author

Since this PR is only using span, I should be applying @compiler-errors's suggestion, right?

@oli-obk
Copy link
Contributor

oli-obk commented Sep 16, 2025

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

@compiler-errors
Copy link
Member

don't let this be blocked on me in that case

r? oli-obk

@rustbot rustbot assigned oli-obk and unassigned compiler-errors Sep 16, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 16, 2025

oli-obk is not on the review rotation at the moment.
They may take a while to respond.

@modhanami modhanami force-pushed the add-struct-tail-recursion-limit-span branch from f2998f3 to 5bf8d13 Compare September 16, 2025 14:18
}

//~? ERROR reached the recursion limit finding the struct tail for `K`
//~? ERROR reached the recursion limit finding the struct tail for `Bottom`
Copy link
Contributor

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?

Copy link
Contributor Author

@modhanami modhanami Sep 16, 2025

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

  1. This file: Add span for struct tail recursion limit error #146597 (comment)
  2. Other files: Add span for struct tail recursion limit error #146597 (comment)
@oli-obk oli-obk added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 16, 2025
@modhanami modhanami force-pushed the add-struct-tail-recursion-limit-span branch from 5bf8d13 to 6912631 Compare September 16, 2025 16:06
@modhanami modhanami requested a review from oli-obk September 16, 2025 16:13
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 16, 2025
@oli-obk
Copy link
Contributor

oli-obk commented Sep 18, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 18, 2025

📌 Commit 6912631 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 18, 2025
bors added a commit that referenced this pull request Sep 18, 2025
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
@bors bors merged commit b7ab58e into rust-lang:master Sep 18, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Sep 18, 2025
rust-timer added a commit that referenced this pull request Sep 18, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

8 participants