Skip to content

[rustdoc] Correctly handle should_panic doctest attribute and fix --no-run test flag on the 2024 edition - #148444

Open
GuillaumeGomez wants to merge 7 commits into
rust-lang:mainfrom
GuillaumeGomez:fix-should_panic-2024
Open

GuillaumeGomez wants to merge 7 commits into
rust-lang:mainfrom
GuillaumeGomez:fix-should_panic-2024

Conversation

@GuillaumeGomez

@GuillaumeGomez GuillaumeGomez commented Nov 3, 2025 •

Copy link
Copy Markdown
Member

Fixes #143009.
Fixes #143858.

Supersedes #143900 and #147674.

Unlike #147674, this one doesn't try to fix should_panic for non-merged (ie pre-2024 edition or standalone) doctests.

For --no-run, we forgot to check the "global" options in the 2024 edition, fixed in the first commit.

For should_panic fix, the exit code check has been fixed.

r? @fmease

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 3, 2025
@rustbot

rustbot commented Nov 3, 2025

Copy link
Copy Markdown
Collaborator

fmease is currently at their maximum review capacity.
They may take a while to respond.

@GuillaumeGomez GuillaumeGomez changed the title Fix should panic 2024 [rustdoc] Correctly handle should_panic doctest attribute and fix --no-run test flag on the 2024 edition Nov 3, 2025
@bors

bors commented Nov 6, 2025

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #148560) made this pull request unmergeable. Please resolve the merge conflicts.

@rustbot

rustbot commented Nov 6, 2025

Copy link
Copy Markdown
Collaborator

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.

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Fixed merge conflicts.

@bors

bors commented Dec 12, 2025

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #149891) made this pull request unmergeable. Please resolve the merge conflicts.

@apiraino apiraino removed the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 14, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rustdoc --no-run runs when --edition=2024 is provided should_panic in doctests accepts crashes, aborts, std::process::exit

5 participants