Skip to content

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

Open
GuillaumeGomez wants to merge 6 commits into
rust-lang:mainfrom
GuillaumeGomez:forbid-test-rustdoc-html
Open

Prevent --test to be used in rustdoc-html testsuite#162030
GuillaumeGomez wants to merge 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
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 Bot pushed a commit that referenced this pull request Sep 4, 2026
Rollup of 27 pull requests

Successful merges:

 - #159074 ([PAC] FnAbi, llvm.ptrauth.resign and Session API change (2/8))
 - #159792 (A more readable debug map for IndexMaps)
 - #160745 (make closures act like MaybeDangling)
 - #161940 (Promote `wasm32-wasip3` to a tier 2 target)
 - #162030 (Prevent `--test` to be used in `rustdoc-html` testsuite)
 - #162072 (Add new Tier-3 target: `powerpc64-sony-ps3`)
 - #162179 (type system const items via direct rhs)
 - #162262 (Avoid manually instantiating some binders in error reporting with `-Znext-solver`)
 - #162277 (Introduce `rustc_middle::middel::resolve`)
 - #162285 (box: fixup map/try_map deallocate calls)
 - #162286 (string: don't unwind prematurely)
 - #162289 (alloc: a bunch of safety comments)
 - #162290 (abby test DSL: AliasTyOutlivesViaEnv)
 - #162292 (Update `askama` version to `0.16.1`)
 - #160509 (Remove `RegionExt`; move methods to `Region` in `rustc_type_ir`)
 - #160906 (Suggest usize instead of placeholder type for array length constants)
 - #160936 (traits: Represent live alias arguments as bitsets)
 - #161400 (Improve diagnostics for references to closures)
 - #161656 (Suggest mutable references for FnMut closure arguments)
 - #161711 (Add more splat fn type tests)
 - #161786 (Make `tcx.def_id_partial_cmp` public)
 - #161953 (sanitizers: Implicitly disable mutually exclusive sanitizers)
 - #162155 (add suggestion for `rustc_allowed_through_unstable_modules` attribute)
 - #162212 (Implement `Rng` for `Box`)
 - #162246 (Fix incorrect meta span)
 - #162266 (std: fix typo)
 - #162291 (Add regression test from 1.98.1)
@JonathanBrouwer

Copy link
Copy Markdown
Member

💔 I suspect this PR failed tests as part of a rollup
@bors r-

After fixing the problem, consider running a try job for the failed job before re-approving.

Link to failure: #162308 (comment)

@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 4, 2026
@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
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