Skip to content

Prevent --test to be used in rustdoc-html testsuite - #162030

Merged
rust-bors[bot] merged 6 commits into
rust-lang:mainfrom
GuillaumeGomez:forbid-test-rustdoc-html
Sep 6, 2026
Merged

Prevent --test to be used in rustdoc-html testsuite#162030
rust-bors[bot] merged 6 commits into
rust-lang:mainfrom
GuillaumeGomez:forbid-test-rustdoc-html

Conversation

@GuillaumeGomez

@GuillaumeGomez GuillaumeGomez commented Aug 30, 2026

Copy link
Copy Markdown
Member

View all comments

As promised.

CI will fail until #162014 is merged though.

r? @fmease

@rustbot

rustbot commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added the A-compiletest Area: The compiletest test runner label Aug 30, 2026
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 30, 2026
@fmease fmease added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 30, 2026

@fmease fmease left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

r=me once unblocked

As I've mentioned in #162014 (review) rejecting tests w/o any HtmlDocCk directives instead (someday in the future) might even be more helpful.

View changes since this review

pub(super) fn run_rustdoc_html_test(&self) {
assert!(self.variant.revision.is_none(), "revisions not supported in this test suite");

if self.props.compile_flags.iter().any(|s| s == "--test") {

@fmease fmease Aug 30, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For onlookers: We already do this sort of thing in compiletest, i.e., going through the compile flags to forbid certain ones (see --edition for example).

pub(super) fn run_rustdoc_html_test(&self) {
assert!(self.variant.revision.is_none(), "revisions not supported in this test suite");

if self.props.compile_flags.iter().any(|s| s == "--test") {

@fmease fmease Aug 30, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

People can accidentally bypass this check by using //@ doc-flags (for the record, you shouldn't use it for flags that are also supported by rustc but, oh well, that won't stop anyone).

Anyways, doesn't really matter. Feel free to implement or ignore that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oh good idea.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
GuillaumeGomez force-pushed the forbid-test-rustdoc-html branch from 3588207 to fa9cd5b Compare August 31, 2026 16:32
@rustbot rustbot added the T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. label Aug 31, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
GuillaumeGomez force-pushed the forbid-test-rustdoc-html branch from 8a20a9c to 5c99f49 Compare August 31, 2026 17:40
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Now we wait for #162014 to be merged.

@GuillaumeGomez
GuillaumeGomez force-pushed the forbid-test-rustdoc-html branch from 5c99f49 to 4e7bb82 Compare September 4, 2026 12:17
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot

rustbot commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

The run-make-support library was changed

cc @jieyouxu

@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Sep 4, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Ok let's go! =D

@bors r=fmease

@rust-bors

rust-bors Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

📋 This PR cannot be approved because it currently has the following label: S-blocked.

@GuillaumeGomez GuillaumeGomez removed the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Sep 4, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Ah right, removed the label. Let's go again!

@bors r=fmease

@rust-bors

rust-bors Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 98880a9 has been approved by fmease

It is now in the queue for this repository.

@rust-bors rust-bors Bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 4, 2026
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 4, 2026
…-html, r=fmease

Prevent `--test` to be used in `rustdoc-html` testsuite

As [promised](rust-lang#162014 (comment)).

CI will fail until rust-lang#162014 is merged though.

r? @fmease
@rust-bors

rust-bors Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#162308), which was unapproved.

View changes since this unapproval

@GuillaumeGomez
GuillaumeGomez force-pushed the forbid-test-rustdoc-html branch from 98880a9 to 5954af8 Compare September 5, 2026 16:08
@rustbot

rustbot commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main 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

Test passed locally. Rebased just in case.

@bors try jobs=i686-gnu-nopt-1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 5, 2026
Prevent `--test` to be used in `rustdoc-html` testsuite


try-job: i686-gnu-nopt-1
@rust-bors

rust-bors Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 4d3f1f7 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Ah damn, it was because of the cfgs. Limited the test to linux x86-64. Let's confirm it works:

@bors try jobs=i686-gnu-nopt-1

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 5, 2026
Prevent `--test` to be used in `rustdoc-html` testsuite


try-job: i686-gnu-nopt-1
@rust-bors

rust-bors Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: df89f48 (df89f48b7de9ef824cba3fc4ac0692a106630937)
Base parent: 546f07f (546f07f6ee18fa92e586e659ef888bbf0f99e6e7)

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

@bors r=fmease

@rust-bors

rust-bors Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c7d7c48 has been approved by fmease

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 5, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Sep 6, 2026
…-html, r=fmease

Prevent `--test` to be used in `rustdoc-html` testsuite

As [promised](rust-lang#162014 (comment)).

CI will fail until rust-lang#162014 is merged though.

r? @fmease
rust-bors Bot pushed a commit that referenced this pull request Sep 6, 2026
Rollup of 3 pull requests

Successful merges:

 - #161517 (coverage: Switch over to hybrid HIR-aware coverage spans )
 - #162030 (Prevent `--test` to be used in `rustdoc-html` testsuite)
 - #162329 (Suggest extra borrows for nested reference arguments)
@rust-bors
rust-bors Bot merged commit d6c2a03 into rust-lang:main Sep 6, 2026
14 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 6, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 6, 2026
Rollup merge of #162030 - GuillaumeGomez:forbid-test-rustdoc-html, r=fmease

Prevent `--test` to be used in `rustdoc-html` testsuite

As [promised](#162014 (comment)).

CI will fail until #162014 is merged though.

r? @fmease
@GuillaumeGomez
GuillaumeGomez deleted the forbid-test-rustdoc-html branch September 6, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.

5 participants