Skip to content

Attribute documentation for cfg_attr, path, feature, doc, should_panic, expect, ignore, and used#159798

Open
kantnero wants to merge 3 commits into
rust-lang:mainfrom
kantnero:attribute-documentation
Open

Attribute documentation for cfg_attr, path, feature, doc, should_panic, expect, ignore, and used#159798
kantnero wants to merge 3 commits into
rust-lang:mainfrom
kantnero:attribute-documentation

Conversation

@kantnero

Copy link
Copy Markdown
Contributor

Documents the cfg_attr, path, feature, doc, should_panic, expect, ignore, and used

Part of #157604

r? @GuillaumeGomez
cc @fmease @traviscross

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 23, 2026
@rustbot

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

@rustbot

This comment has been minimized.

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 23, 2026
@rust-log-analyzer

This comment has been minimized.

…c, expect, ignore, and used

Signed-off-by: Emmanuel Ugwu <emmanuelugwu121@gmail.com>
@kantnero
kantnero force-pushed the attribute-documentation branch from d5001d5 to 34f55b4 Compare July 23, 2026 22:25
@rustbot rustbot removed has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 23, 2026
@rust-log-analyzer

This comment has been minimized.

Signed-off-by: Emmanuel Ugwu <emmanuelugwu121@gmail.com>
@rust-log-analyzer

This comment has been minimized.

Signed-off-by: Emmanuel Ugwu <emmanuelugwu121@gmail.com>
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
[TIMING:end] tool::ToolBuild { build_compiler: Compiler { stage: 0, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu, tool: "linkchecker", path: "src/tools/linkchecker", mode: ToolBootstrap, source_type: InTree, extra_features: [], allow_features: "", cargo_args: [], artifact_kind: Binary } -- 0.135
[TIMING:end] tool::Linkchecker { compiler: Compiler { stage: 0, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu } -- 0.000
##[group]Testing stage1 Linkcheck (aarch64-unknown-linux-gnu)
core/attribute.feature.html:9: broken link - `/checkout/obj/build/aarch64-unknown-linux-gnu/unstable-book/the-unstable-book.html`
core/attribute.doc.html:21: broken link - `/checkout/obj/build/aarch64-unknown-linux-gnu/rustdoc/write-documentation/the-doc-attribute.html`
std/attribute.feature.html:9: broken link - `/checkout/obj/build/aarch64-unknown-linux-gnu/unstable-book/the-unstable-book.html`
std/attribute.doc.html:21: broken link - `/checkout/obj/build/aarch64-unknown-linux-gnu/rustdoc/write-documentation/the-doc-attribute.html`
checked links in: 25.0s
number of HTML files scanned: 62485
number of HTML redirects found: 22210
number of links checked: 2982686
number of links ignored due to external: 184493
number of links ignored due to exceptions: 31
number of intra doc links ignored: 9
errors found: 4
found some broken links
NOTE: if you are adding or renaming a markdown file in a mdBook, don't forget to register the page in SUMMARY.md
Command `/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools-bin/linkchecker /checkout/obj/build/aarch64-unknown-linux-gnu/doc` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1637:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:202:77

Command has failed. Rerun with -v to see more details.
Bootstrap failed while executing `--stage 2 test --skip tidy --skip library/stdarch/crates/intrinsic-test --skip src/tools/rust-analyzer --skip tests --skip library --skip tidyselftest`
Currently active steps:
test::Linkcheck { host: aarch64-unknown-linux-gnu } at src/bootstrap/src/core/build_steps/test.rs:139
Build completed unsuccessfully in 0:32:44
  local time: Fri Jul 24 14:09:34 UTC 2026

@fmease

fmease commented Jul 25, 2026

Copy link
Copy Markdown
Member

Meta note:

Instead of trying to add docs for more and more attributes at once in one PR, I think it would be more helpful & generally better to split your efforts into several smaller PRs going forward which each contain a small set of related attributes / just one attribute instead of a large mixed bag.

That would make it a lot easier for reviewers since they wouldn't have to wade through 100 comments like in #158664 and context-switch constantly within the same PR. Consequently, it would mean your PRs can get merged a lot faster.

Re. you closing #158664 I guess that was due to git / GitHub issues? In case it wasn't though, I want to say that it makes it harder to follow the progress & discussions for specific attributes since they're now spread across several PRs (one has 100 comments as I've already mentioned), esp. since there's no link from the old to the new PR.


In any case, thanks for working on this!

@kantnero

Copy link
Copy Markdown
Contributor Author

@fmease
Thanks, makes sense I'll split future PRs into smaller ones.

Initially sent the PR in twos, but I created each one before the last had merged, every new PR ended up showing the previous PR's changes too, not just its own. Diffs got confusing, so I just merged them into one PR against main instead.

Going forward I'll wait for each one to merge before opening the next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants