Skip to content

Don't emit rustdoc missing_doc_code_examples lint on impl items#154048

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
GuillaumeGomez:missing_doc_code_examples-improvement
Mar 20, 2026
Merged

Don't emit rustdoc missing_doc_code_examples lint on impl items#154048
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
GuillaumeGomez:missing_doc_code_examples-improvement

Conversation

@GuillaumeGomez
Copy link
Member

@lolbinarycat realized in this comment that we weren't testing some cases for the missing_doc_code_examples lint. Turns out that it was not handling this case well. =D

So in short: missing_doc_code_examples lint should not be emitted on impl items and this PR fixes that.

r? @lolbinarycat

@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 Mar 18, 2026
@lolbinarycat lolbinarycat added the relnotes Marks issues that should be documented in the release notes of the next release. label Mar 19, 2026
@lolbinarycat
Copy link
Contributor

Seems straightforward, orphan rule means there should be no weird re-export case to test, lints are semver-exempt, and this is nightly anyways.

My only concern is that the documentation for this feature doesn't specify how impls are handled at all, which it probably should, but that's a preexisting issue, so it can get addressed in a seperate PR.

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 19, 2026

📌 Commit 6d3b780 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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 19, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 19, 2026
…amples-improvement, r=lolbinarycat

Don't emit rustdoc `missing_doc_code_examples` lint on impl items

@lolbinarycat realized in [this comment](rust-lang#153964 (comment)) that we weren't testing some cases for the `missing_doc_code_examples` lint. Turns out that it was not handling this case well. =D

So in short: `missing_doc_code_examples` lint should not be emitted on impl items and this PR fixes that.

r? @lolbinarycat
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 19, 2026
…amples-improvement, r=lolbinarycat

Don't emit rustdoc `missing_doc_code_examples` lint on impl items

@lolbinarycat realized in [this comment](rust-lang#153964 (comment)) that we weren't testing some cases for the `missing_doc_code_examples` lint. Turns out that it was not handling this case well. =D

So in short: `missing_doc_code_examples` lint should not be emitted on impl items and this PR fixes that.

r? @lolbinarycat
rust-bors bot pushed a commit that referenced this pull request Mar 20, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #152909 (sess: `-Zbranch-protection` is a target modifier)
 - #153556 (`impl` restriction lowering)
 - #154048 (Don't emit rustdoc `missing_doc_code_examples` lint on impl items)
 - #153992 (bootstrap: Optionally print a backtrace if a command fails)
 - #154019 (two smaller feature cleanups)
 - #154059 (tests: Activate `must_not_suspend` test for `MutexGuard` dropped before `await`)
 - #154075 (Rewrite `query_ensure_result`.)
 - #154082 (Updates derive_where and removes workaround)
 - #154084 (Preserve braces around `self` in use tree pretty printing)
 - #154086 (Insert space after float literal ending with `.` in pretty printer)
 - #154087 (Fix whitespace after fragment specifiers in macro pretty printing)
 - #154109 (tests: Add regression test for async closures involving HRTBs)
rust-bors bot pushed a commit that referenced this pull request Mar 20, 2026
Rollup of 15 pull requests

Successful merges:

 - #152909 (sess: `-Zbranch-protection` is a target modifier)
 - #153556 (`impl` restriction lowering)
 - #154048 (Don't emit rustdoc `missing_doc_code_examples` lint on impl items)
 - #150935 (Introduce #[diagnostic::on_move(message)])
 - #152973 (remove -Csoft-float)
 - #153862 (Rename `cycle_check` to `find_cycle`)
 - #153992 (bootstrap: Optionally print a backtrace if a command fails)
 - #154019 (two smaller feature cleanups)
 - #154059 (tests: Activate `must_not_suspend` test for `MutexGuard` dropped before `await`)
 - #154075 (Rewrite `query_ensure_result`.)
 - #154082 (Updates derive_where and removes workaround)
 - #154084 (Preserve braces around `self` in use tree pretty printing)
 - #154086 (Insert space after float literal ending with `.` in pretty printer)
 - #154087 (Fix whitespace after fragment specifiers in macro pretty printing)
 - #154109 (tests: Add regression test for async closures involving HRTBs)
@rust-bors rust-bors bot merged commit 319df85 into rust-lang:main Mar 20, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotes Marks issues that should be documented in the release notes of the next release. 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.

3 participants