Skip to content

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Oct 14, 2025

Fixes #143009.
Fixes #143858.

Supersedes #143900.

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 Oct 14, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 14, 2025

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

@GuillaumeGomez
Copy link
Member Author

Let's see if it works like that, otherwise I'll add some cfg(bootstrap) around. Locally with stage 2 it worked fine.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

Ah right, forgot to fix std doc examples.

@GuillaumeGomez
Copy link
Member Author

Checking all previously failing CIs.

@bors try jobs=armhf-gnu,test-various,x86_64-gnu-aux

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 15, 2025
[rustdoc] Correctly handle `should_panic` doctest attribute and fix `--no-run` test flag on the 2024 edition

try-job: armhf-gnu
try-job: test-various
try-job: x86_64-gnu-aux
@rust-bors
Copy link

rust-bors bot commented Oct 15, 2025

💔 Test for 0c093af failed: CI. Failed jobs:

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

So the error comes from the fact that should_panic is ignored on some platforms by libtest and rustdoc didn't do this check. I added it as well.

Let's try again.

@bors try jobs=armhf-gnu,test-various,x86_64-gnu-aux

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 16, 2025
[rustdoc] Correctly handle `should_panic` doctest attribute and fix `--no-run` test flag on the 2024 edition

try-job: armhf-gnu
try-job: test-various
try-job: x86_64-gnu-aux
@rust-bors
Copy link

rust-bors bot commented Oct 16, 2025

💔 Test for 7103c01 failed: CI. Failed jobs:

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

@bors try jobs=armhf-gnu,test-various,x86_64-gnu-aux

rust-bors bot added a commit that referenced this pull request Oct 16, 2025
[rustdoc] Correctly handle `should_panic` doctest attribute and fix `--no-run` test flag on the 2024 edition

try-job: armhf-gnu
try-job: test-various
try-job: x86_64-gnu-aux
@rust-bors

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Oct 16, 2025

💔 Test for 38c3e03 failed: CI. Failed jobs:

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

@bors try jobs=test-various

rust-bors bot added a commit that referenced this pull request Oct 16, 2025
[rustdoc] Correctly handle `should_panic` doctest attribute and fix `--no-run` test flag on the 2024 edition

try-job: test-various
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Oct 16, 2025

💔 Test for c5583f8 failed: CI. Failed jobs:

@GuillaumeGomez
Copy link
Member Author

Not ready yet! Just more cleanups before my next attempt: if should_panic (and not compile_fail), then we compile a binary with libtest to ensure we can actually run this test and if so, we call the other code.

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-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.

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

4 participants