Skip to content

[crater] check fallout of reserving unknown doc attributes - #163699

Draft
mejrs wants to merge 2 commits into
rust-lang:mainfrom
mejrs:reserve_doc_attrs
Draft

mejrs wants to merge 2 commits into
rust-lang:mainfrom
mejrs:reserve_doc_attrs

Conversation

@mejrs

@mejrs mejrs commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

View all comments

currently, it is always a (theoretical) breaking change to feature gate something like #[doc(new_doc_attr)], because that would previously compile with a "unused" warnings.

I'm curious what the fallout of this is and I also have some ideas for new doc attributes, for which I'd like to know whether the name is available.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 3, 2026
@mejrs

mejrs commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 3, 2026
[crater] check fallout of reserving unknown doc attributes
@rust-bors

rust-bors Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: fb2ae76 (fb2ae767043b99e76f81c9c92fd25cd4100d980d)
Base parent: d6b6dc7 (d6b6dc7982ef5d9117d96d018dfd83098d0471a1)

@mejrs

mejrs commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

@craterbot check

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-163699 created and queued.
🤖 Automatically detected try build fb2ae76
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 3, 2026
@notriddle

notriddle commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

For the record, we tried making invalid doc attributes a hard error, but too much existing code was broken. That's why we made it a lint in the first place. #151865

@mejrs
mejrs force-pushed the reserve_doc_attrs branch from 2447676 to f4acea6 Compare October 3, 2026 18:23
@mejrs

mejrs commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

Ah, that regression is orthogonal to this, though.

Let's also crater a fix for #161984 while I'm at it.

@craterbot cancel
@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 3, 2026
[crater] check fallout of reserving unknown doc attributes
@craterbot

Copy link
Copy Markdown
Collaborator

🗑️ Experiment pr-163699 deleted!

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Oct 3, 2026
@rust-bors

rust-bors Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f3df2fe (f3df2feb79b2422c028f78855ec6ffe2e212d7cc)
Base parent: db8f076 (db8f076d2619ce2585b0380dda06e8da25a40da4)

@mejrs

mejrs commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

@craterbot check

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-163699 created and queued.
🤖 Automatically detected try build f3df2fe
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 3, 2026
@rust-bors

rust-bors Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #163842) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

@theemathas theemathas mentioned this pull request Oct 11, 2026
@theemathas

Copy link
Copy Markdown
Contributor

Crater rollup in #164148

@craterbot abort

@craterbot

Copy link
Copy Markdown
Collaborator

🗑️ Experiment pr-163699 deleted!

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Oct 11, 2026
@theemathas

Copy link
Copy Markdown
Contributor

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-163699 created and queued.
🤖 Automatically detected try build f3df2fe
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 18, 2026
@craterbot

Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-163699 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot

Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-163699 is completed!
📊 971 regressed and 0 fixed (28882 total)
📊 1118 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-163699/retry-regressed-list.txt ↩

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Oct 19, 2026
@notriddle

notriddle commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

I looked at the results, and found:

crate error
KeystoneHQ/rust-numext reserved doc attribute hide
SergioBenitez/Pear/4b68055 reserved doc attribute hiden
async-coap-uri-0.1.0 reserved doc attribute unstable
bugadani/embedded-layout reserved doc attribute hide
edi-0.2.0 reserved doc attribute skip
ethox-0.0.2 reserved doc attribute shown
evegfx-0.6.0 reserved doc attribute hide
foldu/cfgen/d730b5dc14d289b855615d382c04a06766337795 reserved doc attribute hide
futures-io-0.2.0/0.2.1/-preview-0.2.2 reserved doc attribute html_rnoot_url
futures-io-0.2.1 reserved doc attribute html_rnoot_url
gtmpl-0.5.7/0.6.0 reserved doc attribute inlne
harfbuzz_rs-1.0.0/1.0.1/1.1.1/1.2.0 reserved doc attribute hide
lyon_algorithms-0.11.2/0.13.1/0.13.4/0.14.0/0.15.0/0.15.1/0.16.0 reserved doc attribute Hidden
monadicus/snarkVM reserved doc attribute hide
nical/lyon reserved doc attribute Hidden
numext-fixed-uint-core-0.1.6 reserved doc attribute hide
oracle-0.3.3 reserved doc attribute hide
otel-arrow-dfe-pdata-0.61.0 reserved doc attribute otlp_qualified_name
pea2pea-0.16.4 reserved doc attribute hide
pear-0.2.0 reserved doc attribute hiden
scipr-lab/zexe reserved doc attribute hideen
smoltcp-0.4.0/0.6.0/0.7.0 reserved doc attribute shown
swc_ecma_transforms_base-0.2.9 reserved doc attribute hideen
tinytemplate-1.0.1/1.0.2/1.0.3/1.0.4 reserved doc attribute Hidden
topo-0.9.4 reserved doc attribute hiddent
vial-0.1.0/0.1.9 reserved doc attribute Hidden
wzhd/rstcp reserved doc attribute shown
zeroable-0.2.0 reserved doc attribute noinline

Sorted in order of most common keyword:

count keyword
9 hide
4 Hidden
3 shown
2 html_rnoot_url
2 hiden
2 hideen
1 unstable
1 skip
1 otlp_qualified_name
1 noinline
1 inlne
1 hiddent

@mejrs

mejrs commented Oct 26, 2026 •

Copy link
Copy Markdown
Member Author

I'm leaning towards just linting on all of those that are clearly typos, but implementing an error for everything else:

  • unstable can reasonably gain actual meaning at some point
  • otlp_qualified_name is blatant misuse of the doc attribute, (to convey information from a macro to a parser?) they could use a doc comment or a custom tool attribute instead
  • and everything else

@fmease fmease added S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. C-crater Category: Issues tracking / PRs primarily containing crater runs and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 3, 2026

This branch has not been deployed

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) C-crater Category: Issues tracking / PRs primarily containing crater runs S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

6 participants