Skip to content

Conversation

@GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Oct 28, 2025

Fixes #148184.

Problem was that in case an element inside the expansion's "original" element was not closed, this element would get its pending_exit field set to true, removing it when the next non-mergeable item gets pushed instead of being put inside it, and then next exit_elem would try to exit an empty class queue.

r? @notriddle

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Oct 28, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 28, 2025

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

Copy link
Member

@fmease fmease Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Currently reading through PR #146992 commit by commit to catch up.)

Quick side note: ElementStack ClassStack is not actually a stack, it's a tree!

Reading through this for the first time that's a bit confusing (moreso the resulting method names like enter_stack don't help me form an intuition (granted, it's 2AM for me rn and I'm only skimming the code) (was renamed in a later commit)).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, it used to be a tree, it's now a stack (always one child). :3

@GuillaumeGomez
Copy link
Member Author

r? @lolbinarycat

@rustbot rustbot assigned lolbinarycat and unassigned notriddle Nov 4, 2025
@yotamofek
Copy link
Contributor

Looks good!
r=me after fixing nit (or choosing to ignore it)

@GuillaumeGomez
Copy link
Member Author

Thanks for the review!

@bors r=yotamofek rollup

@bors
Copy link
Collaborator

bors commented Nov 6, 2025

📌 Commit 8442380 has been approved by yotamofek

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 Nov 6, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 6, 2025
…on, r=yotamofek

Fix invalid tag closing when leaving expansion "original code"

Fixes rust-lang#148184.

Problem was that in case an element inside the expansion's "original" element was not closed, this element would get its `pending_exit` field set to `true`, removing it when the next non-mergeable item gets pushed instead of being put inside it, and then next `exit_elem` would try to exit an empty class queue.

r? `@notriddle`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 6, 2025
…on, r=yotamofek

Fix invalid tag closing when leaving expansion "original code"

Fixes rust-lang#148184.

Problem was that in case an element inside the expansion's "original" element was not closed, this element would get its `pending_exit` field set to `true`, removing it when the next non-mergeable item gets pushed instead of being put inside it, and then next `exit_elem` would try to exit an empty class queue.

r? ``@notriddle``
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 6, 2025
…on, r=yotamofek

Fix invalid tag closing when leaving expansion "original code"

Fixes rust-lang#148184.

Problem was that in case an element inside the expansion's "original" element was not closed, this element would get its `pending_exit` field set to `true`, removing it when the next non-mergeable item gets pushed instead of being put inside it, and then next `exit_elem` would try to exit an empty class queue.

r? ````@notriddle````
bors added a commit that referenced this pull request Nov 6, 2025
Rollup of 7 pull requests

Successful merges:

 - #146861 (add extend_front to VecDeque with specialization like extend)
 - #148213 (Fix invalid tag closing when leaving expansion "original code")
 - #148292 (Un-shadow object bound candidate in `NormalizesTo` goal if self_ty is trait object)
 - #148528 (run-make tests: use edition 2024)
 - #148554 (Add regression test for issue 148542)
 - #148561 (Fix ICE from async closure variance)
 - #148563 (rustdoc-search: remove broken index special case)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7b766e0 into rust-lang:master Nov 6, 2025
11 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 6, 2025
rust-timer added a commit that referenced this pull request Nov 6, 2025
Rollup merge of #148213 - GuillaumeGomez:fix-exit-of-expansion, r=yotamofek

Fix invalid tag closing when leaving expansion "original code"

Fixes #148184.

Problem was that in case an element inside the expansion's "original" element was not closed, this element would get its `pending_exit` field set to `true`, removing it when the next non-mergeable item gets pushed instead of being put inside it, and then next `exit_elem` would try to exit an empty class queue.

r? ```@notriddle```
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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: exit_elem called on empty class stack

7 participants