-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Implement RFC 3631: add rustdoc doc_cfg features #138907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
Noted! And that will be a nice improvement, thanks! Just one thing left for the cfg expansion missing: |
Do you mean like in #138515? :) |
You're my hero! Gonna need to handle this new attribute then. :) |
4a05a52
to
3d2eef1
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #138923) made this pull request unmergeable. Please resolve the merge conflicts. |
d88598f
to
db25eea
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #138927) made this pull request unmergeable. Please resolve the merge conflicts. |
b8cb424
to
b581ce1
Compare
This comment has been minimized.
This comment has been minimized.
b581ce1
to
1cb7fac
Compare
This comment has been minimized.
This comment has been minimized.
71369a1
to
fbee8a9
Compare
This comment has been minimized.
This comment has been minimized.
It looks like the issue with building the latest docs originated from rust-lang/rust#138907 getting into effect at docs.rs.
It looks like the issue with building the latest docs originated from rust-lang/rust#138907 getting into effect at docs.rs.
`doc_auto_cfg` has been removed in the latest nightly, see rust-lang/rust#138907. This feature was merged into `doc_cfg`. This fixes the rustdoc build in the latest nightly toolchain with docsrs feature enabled.
doc_auto_cfg was merged into doc_cfg in rust-lang/rust#138907
Since rust-lang/rust#138907 was merged.
`doc_auto_cfg` has been removed in the latest nightly, see rust-lang/rust#138907. This feature was merged into `doc_cfg`. This fixes the rustdoc build in the latest nightly toolchain with docsrs feature enabled.
It looks like the issue with building the latest docs originated from rust-lang/rust#138907 getting into effect at docs.rs.
Rust nightly removed this: ``` error[E0557]: feature has been removed --> internal/interpreter/lib.rs:4:38 | 4 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] | ^^^^^^^^^^^^ feature has been removed | = note: removed in CURRENT_RUSTC_VERSION; see <rust-lang/rust#138907> for more information = note: merged into `doc_cfg` ```
the `doc_auto_cfg` feature has been merged into `doc_cfg` [1], and this is breaking building vm-memory documentation on docs.rs [2]. [1]: rust-lang/rust#138907 [2]: https://docs.rs/crate/vm-memory/0.17.0/builds/2564760 Signed-off-by: Patrick Roy <[email protected]>
Rust nightly removed this: ``` error[E0557]: feature has been removed --> internal/interpreter/lib.rs:4:38 | 4 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] | ^^^^^^^^^^^^ feature has been removed | = note: removed in CURRENT_RUSTC_VERSION; see <rust-lang/rust#138907> for more information = note: merged into `doc_cfg` ```
reference: rust-lang/rust#138907 Signed-off-by: Tomasz Pietrek <[email protected]>
reference: rust-lang/rust#138907 Signed-off-by: Tomasz Pietrek <[email protected]>
See rust-lang/rust#138907, also see [#linebender > Cargo doc failures in linebender repos](https://xi.zulipchat.com/#narrow/channel/419691-linebender/topic/Cargo.20doc.20failures.20in.20linebender.20repos/with/542106544).
`doc_auto_cfg` has been removed from the current Rust version, which caused rustdoc breakages. See rust-lang/rust#138907
doc_auto_cfg was merged into doc_cfg in rust-lang/rust#138907
- fix some links - replace doc_auto_cfg with doc_cfg as instructed by the failed docs.rs run [INFO] [stderr] 253 | #![cfg_attr(iroh_docsrs, feature(doc_auto_cfg))] [INFO] [stderr] | ^^^^^^^^^^^^ feature has been removed [INFO] [stderr] | [INFO] [stderr] = note: removed in CURRENT_RUSTC_VERSION; see <rust-lang/rust#138907> for more information [INFO] [stderr] = note: merged into `doc_cfg`
## Description Try to fix docs.rs docs generation - fix some links - replace doc_auto_cfg with doc_cfg as instructed by the failed docs.rs run [INFO] [stderr] 253 | #![cfg_attr(iroh_docsrs, feature(doc_auto_cfg))] [INFO] [stderr] | ^^^^^^^^^^^^ feature has been removed [INFO] [stderr] | [INFO] [stderr] = note: removed in CURRENT_RUSTC_VERSION; see <rust-lang/rust#138907> for more information [INFO] [stderr] = note: merged into `doc_cfg` ## Breaking Changes None ## Notes & open questions Not sure how to test this. ## Change checklist <!-- Remove any that are not relevant. --> - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented. - [ ] List all breaking changes in the above "Breaking Changes" section. - [ ] Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are: - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc) - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip) - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs) - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe) - [ ] [`sendme`](https://github.com/n0-computer/sendme)
## Description Try to fix docs.rs docs generation - fix some links - replace doc_auto_cfg with doc_cfg as instructed by the failed docs.rs run [INFO] [stderr] 253 | #![cfg_attr(iroh_docsrs, feature(doc_auto_cfg))] [INFO] [stderr] | ^^^^^^^^^^^^ feature has been removed [INFO] [stderr] | [INFO] [stderr] = note: removed in CURRENT_RUSTC_VERSION; see <rust-lang/rust#138907> for more information [INFO] [stderr] = note: merged into `doc_cfg` ## Breaking Changes None ## Notes & open questions Not sure how to test this. ## Change checklist <!-- Remove any that are not relevant. --> - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented. - [ ] List all breaking changes in the above "Breaking Changes" section. - [ ] Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are: - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc) - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip) - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs) - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe) - [ ] [`sendme`](https://github.com/n0-computer/sendme)
Implementation of rust-lang/rfcs#3631.
This implementation actually resulted in a lot of simplifications:
cfg
computation is now done in one place:propagate_doc_cfg.rs
. Because (trait)impl
s are not retrieved at the same time as the other items, we cannot perform this computation in the clean process, it needs to be after.cfg
inheritance, we can keep track of them in one place (inpropagate_doc_cfg.rs
), meaning we don't need to copy an item's attributes to its children anymore. Only exception: impl items. For them we clone onlycfg
attributes.propagate_doc_cfg.rs
is also now much simpler, much less need to keep track of parents, since everything we need is handled by the newCfgInfo
type.Cfg::simplify_with
could either be removed or at least used directly intopropagate_doc_cfg.rs
when we computecfg
s. Considering how big the PR already is, I'll do it in a follow-up.I didn't remove the
doc_cfg*
features in this PR because some dependencies used inrustc
(likestdarch
) are using it, so we need to have a nightly released with this PR before I can switch to the new feature.r? ghost