Skip to content

Avoid linting doc_cfg as unused in rustc#155230

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
TaKO8Ki:fix-unused-features-doc-cfg
Apr 14, 2026
Merged

Avoid linting doc_cfg as unused in rustc#155230
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
TaKO8Ki:fix-unused-features-doc-cfg

Conversation

@TaKO8Ki
Copy link
Copy Markdown
Member

@TaKO8Ki TaKO8Ki commented Apr 13, 2026

Fixes #154487

pub(crate) fn propagate_doc_cfg(cr: Crate, cx: &mut DocContext<'_>) -> Crate {
if cx.tcx.features().doc_cfg() {
CfgPropagator { cx, cfg_info: CfgInfo::default(), impl_cfg_info: FxHashMap::default() }
.fold_crate(cr)
} else {
cr
}
}

@rustbot rustbot added 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. labels Apr 13, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 13, 2026

r? @adwinwhite

rustbot has assigned @adwinwhite.
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: compiler
  • compiler expanded to 69 candidates
  • Random selection from 12 candidates

@TaKO8Ki TaKO8Ki changed the title Do not lint doc_cfg as unused Avoid linting doc_cfg as unused in rustc Apr 13, 2026
@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Apr 13, 2026

r? me

@rustbot rustbot assigned Kivooeo and unassigned adwinwhite Apr 13, 2026
@@ -0,0 +1,8 @@
//@ check-pass
Copy link
Copy Markdown
Member

@Kivooeo Kivooeo Apr 13, 2026

Choose a reason for hiding this comment

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

View changes since the review

add a comment with link to an issue please

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.

I added the comment.

@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Apr 14, 2026

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 14, 2026

📌 Commit 5c80d90 has been approved by Kivooeo

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 Apr 14, 2026
rust-bors Bot pushed a commit that referenced this pull request Apr 14, 2026
Rollup of 3 pull requests

Successful merges:

 - #152530 (Use the term struct-like variant instead of anonymous structs for data of struct-like enum variants)
 - #155005 (preserve SIMD element type information)
 - #155230 (Avoid linting `doc_cfg` as unused in rustc)
@rust-bors rust-bors Bot merged commit ec3a6b4 into rust-lang:main Apr 14, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 14, 2026
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unused_features false positive on doc_cfg

4 participants