Skip to content

rustdoc: Small doc_cfg messages improvements - #161105

Merged
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
GuillaumeGomez:improve-cfg-message
Aug 15, 2026
Merged

rustdoc: Small doc_cfg messages improvements#161105
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
GuillaumeGomez:improve-cfg-message

Conversation

@GuillaumeGomez

@GuillaumeGomez GuillaumeGomez commented Aug 14, 2026

Copy link
Copy Markdown
Member

Fixes #145075.

I was writing a regression test for #145075 which was already fixed, saw it was looking like this:

image

So I made some small changes to improve the wording. Now it looks like this:

image

r? @Urgau

@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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Aug 14, 2026
@rustbot

This comment has been minimized.

CfgEntry::Any(a, _) | CfgEntry::All(a, _) => {
a.is_empty() || matches!(a.as_slice(), [a] if omit_preposition(&a))
}
CfgEntry::Not(a, _) => omit_preposition(a),

@Urgau Urgau Aug 14, 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.

Could you add a test for this Not branch.

View changes since the review

Comment thread src/librustdoc/clean/cfg.rs Outdated
true
}
}
CfgEntry::Not(a, _) => !should_append_only_to_description(a),

@Urgau Urgau Aug 14, 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.

@rust-log-analyzer

This comment has been minimized.

@rustbot

rustbot commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

At some point, I'll implement the full "cleanup" to replace cases like not(all(any(true))) by false since it's completely doable. :)

@Urgau Urgau 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.

@Urgau

Urgau commented Aug 14, 2026

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 97fdee6 has been approved by Urgau

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 Aug 14, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 15, 2026
…, r=Urgau

rustdoc: Small `doc_cfg` messages improvements

Fixes rust-lang#145075.

I was writing a regression test for rust-lang#145075 which was already fixed, saw it was looking like this:

<img width="242" height="247" alt="image" src="https://github.com/user-attachments/assets/421e6b4b-698f-4a01-93d9-022eb346d73c" />

So I made some small changes to improve the wording. Now it looks like this:

<img width="242" height="247" alt="image" src="https://github.com/user-attachments/assets/c950dd68-a760-4f18-b974-555e05fcfd78" />

r? @Urgau
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 15, 2026
…, r=Urgau

rustdoc: Small `doc_cfg` messages improvements

Fixes rust-lang#145075.

I was writing a regression test for rust-lang#145075 which was already fixed, saw it was looking like this:

<img width="242" height="247" alt="image" src="https://github.com/user-attachments/assets/421e6b4b-698f-4a01-93d9-022eb346d73c" />

So I made some small changes to improve the wording. Now it looks like this:

<img width="242" height="247" alt="image" src="https://github.com/user-attachments/assets/c950dd68-a760-4f18-b974-555e05fcfd78" />

r? @Urgau
rust-bors Bot pushed a commit that referenced this pull request Aug 15, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #161111 (Take bors try-perf branch into account in verify-channel.sh)
 - #158504 (Stabilize `extern "custom"`)
 - #161030 (mailmap: fix nia's gazillion emails)
 - #161105 (rustdoc: Small `doc_cfg` messages improvements)
rust-bors Bot pushed a commit that referenced this pull request Aug 15, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #161111 (Take bors try-perf branch into account in verify-channel.sh)
 - #158504 (Stabilize `extern "custom"`)
 - #161030 (mailmap: fix nia's gazillion emails)
 - #161105 (rustdoc: Small `doc_cfg` messages improvements)
 - #161123 (bootstrap: Clean up some inconsistent imports and paths)
@rust-bors
rust-bors Bot merged commit 6f0ad15 into rust-lang:main Aug 15, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 15, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 15, 2026
Rollup merge of #161105 - GuillaumeGomez:improve-cfg-message, r=Urgau

rustdoc: Small `doc_cfg` messages improvements

Fixes #145075.

I was writing a regression test for #145075 which was already fixed, saw it was looking like this:

<img width="242" height="247" alt="image" src="https://github.com/user-attachments/assets/421e6b4b-698f-4a01-93d9-022eb346d73c" />

So I made some small changes to improve the wording. Now it looks like this:

<img width="242" height="247" alt="image" src="https://github.com/user-attachments/assets/c950dd68-a760-4f18-b974-555e05fcfd78" />

r? @Urgau
rust-timer added a commit that referenced this pull request Aug 15, 2026
Rollup merge of #161105 - GuillaumeGomez:improve-cfg-message, r=Urgau

rustdoc: Small `doc_cfg` messages improvements

Fixes #145075.

I was writing a regression test for #145075 which was already fixed, saw it was looking like this:

<img width="242" height="247" alt="image" src="https://github.com/user-attachments/assets/421e6b4b-698f-4a01-93d9-022eb346d73c" />

So I made some small changes to improve the wording. Now it looks like this:

<img width="242" height="247" alt="image" src="https://github.com/user-attachments/assets/c950dd68-a760-4f18-b974-555e05fcfd78" />

r? @Urgau
@GuillaumeGomez
GuillaumeGomez deleted the improve-cfg-message branch August 15, 2026 17:57
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. 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.

doc_cfg / doc_auto_cfg thinks any(true) and any(all()) are available nowhere

4 participants