Repository navigation
Fix rustdoc link errors on rustc 1.99 and nightly - #8
Merged
Merged
Conversation
Rustdoc 1.99 resolves a module doc link in the scope of the module. An inline link with a crate path then fails the redundant_explicit_links lint. Nightly 1.101 flags more of these links. Module docs now use reference-style link definitions. Rustdoc 1.89 (the MSRV), 1.99 and nightly all resolve this form without a warning. The build docs of GroupNormalization and InstanceNormalization linked the private MIN_RANK constant. The docs now give the rank value. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
docworkflow fails on master. The workflow runscargo docwithRUSTDOCFLAGS="-D warnings"on the latest stable toolchain. Stable moved to rustc 1.99.0 on 2026-09-28.Rustdoc 1.99 resolves a link in a module doc (
//!) in the scope of that module. An inline link such as[`Optimizer`](crate::neural_network::traits::Optimizer)then failsrustdoc::redundant_explicit_links, because the label alone resolves to the same item. Nightly (1.101) flags more of these links, so stable 1.101 will break the workflow again.The build docs of
GroupNormalizationandInstanceNormalization(from #5) also link the privateMIN_RANKconstant. This failsrustdoc::private_intra_doc_links.Reproduction
Run on master (
403042f):RUSTDOCFLAGS="-D warnings" cargo +1.99.0 doc --all-features --no-depsFix
[`Optimizer`]in the text and//! [`Optimizer`]: crate::neural_network::traits::Optimizerat the end of the block. All 128 inline crate-path links in 41 module docs use this form now, not only the links that 1.99 flags.Cargo.toml) cannot resolve these labels in a module doc. The reference-style form resolves on all 3 toolchains.GroupNormalizationandInstanceNormalizationgive the rank value (2 and 3) in place of the private link.neural_network::errorwritesErroras code. The module doc of that module already links the type.No code changes.