Skip to content

rustdoc: test ignoring rustc lints in CLI#156618

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
notriddle:rustdoc-lint-ignore-cli
Jul 11, 2026
Merged

rustdoc: test ignoring rustc lints in CLI#156618
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
notriddle:rustdoc-lint-ignore-cli

Conversation

@notriddle

Copy link
Copy Markdown
Contributor

This works, but I couldn't find any tests for it.

@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. labels May 15, 2026
@rustbot

rustbot commented May 15, 2026

Copy link
Copy Markdown
Collaborator

r? @lolbinarycat

rustbot has assigned @lolbinarycat.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: rustdoc
  • rustdoc expanded to 9 candidates
  • Random selection from GuillaumeGomez, fmease, lolbinarycat

@lolbinarycat

Copy link
Copy Markdown
Contributor

the commit/PR title seems backwards, shouldn't it be "rustdoc: test denying rustc lints via CLI"?

in which case, we're not actually testing that, since the entire point of the modified test is that the lint doesn't pass.

if you actually wanted to make sure lint flags for rustc lints work properly, you'd have to find an allow lint for a check-pass test, or a deny lint for a check-fail test.

@notriddle

Copy link
Copy Markdown
Contributor Author

Maybe I should title it: "rustdoc: test equivalent treatment of unused_imports on CLI and attr"? It's kind of long, but that's the real point of this test.

@lolbinarycat

Copy link
Copy Markdown
Contributor

My point is I don't think the test actually does a good job of doing that because that lint never fires. If for some reason rustdoc started ignoring -Dlintname arguments altogether, this test would not catch that.

@lolbinarycat

Copy link
Copy Markdown
Contributor

@rustbot author

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 7, 2026
@rustbot

rustbot commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@notriddle
notriddle force-pushed the rustdoc-lint-ignore-cli branch from 4aeda22 to 015e8af Compare July 9, 2026 23:01
@rustbot

rustbot commented Jul 9, 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.

@notriddle

Copy link
Copy Markdown
Contributor Author

Okay, I've written a new test that uses the missing_docs lint and actually tests the underlying functionality.

@@ -0,0 +1,8 @@
//@ revisions: deny allow

@lolbinarycat lolbinarycat Jul 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

needs a comment describing the purpose of the test.

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay, it's done.

@rust-log-analyzer

This comment has been minimized.

@notriddle
notriddle force-pushed the rustdoc-lint-ignore-cli branch from c561fb1 to 2200ed1 Compare July 11, 2026 04:13
@lolbinarycat

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 2200ed1 has been approved by lolbinarycat

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 Jul 11, 2026
rust-bors Bot pushed a commit that referenced this pull request Jul 11, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #159126 (Fix PR number in bootstrap's change tracker)
 - #155811 (Include AtomicU128/AtomicI128 in docs for any target)
 - #156968 (diagnostics: suggest generic_const_args for const ops)
 - #159012 (Shrink mir::Statement to 40 bytes)
 - #156618 (rustdoc: test ignoring rustc lints in CLI)
 - #158182 (std: use `OnceLock` for SGX argument storage)
 - #159114 (Add regression test for $-prefixed fragment specifier in repetition)
 - #158523 (Fix feature gate for `repr(simd)`)
 - #158876 (Fix multiple logic bugs in `Arc::make_mut`)
 - #158928 (std: fix Xous UDP send_to length mismatch and truncation)
 - #159060 (Look for the cdb architecture that corresponds to the target triple)
 - #159089 (riscv: update c-variadic test for LLVM changes)
 - #159093 (pretty-print: use inline asm's actual macro name)
 - #159122 (doc: use ptr::addr in offset_from docs)

Failed merges:

 - #158732 (Apply MCP 1003 and move diagnostics.rs into its own module)
@rust-bors
rust-bors Bot merged commit ce7f185 into rust-lang:main Jul 11, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 11, 2026
rust-timer added a commit that referenced this pull request Jul 11, 2026
Rollup merge of #156618 - notriddle:rustdoc-lint-ignore-cli, r=lolbinarycat

rustdoc: test ignoring rustc lints in CLI

This works, but I couldn't find any tests for it.
@notriddle
notriddle deleted the rustdoc-lint-ignore-cli branch July 11, 2026 21:33
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants