-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
Problem
intra doc links towards parent crate succeed when generating docs for the parent crate but creates warnings like:
warning: `[Device]` cannot be resolved, ignoring it.
--> /home/rukai2/Projects/Crates/wgpu/wgpu/wgpu-types/src/lib.rs:343:18
|
343 | /// Describes a [`Device`].
| ^^^^^^^^ cannot be resolved, ignoring
|
= note: `#[warn(intra_doc_link_resolution_failure)]` on by default
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
But we can see here that it succeeds: https://wgpu.rs/doc/wgpu/struct.DeviceDescriptor.html
Steps
- create a crate A
- create a crate B that depends on A and reexports types from A (specify as local path dependency, issue does not occur with git)
- a type in A contains intra doc links to types in B, which is then reexported by B. (only succeeds when reexported)
- run cargo +nightly doc on crate B
- This actually succeeds, which is great. Unfortunately it also creates warnings, that the type cannot be resolved.
Notes
Output of cargo version
: cargo 1.46.0-nightly (089cbb80b 2020-06-15)
A workaround PR for this issue was made for wgpu gfx-rs/wgpu#748
This issue is kind of obscure, so I wouldnt be surprised if the best solution is for the user to just add an allow for the warning, but figured I would make an issue in case its useful.
Metadata
Metadata
Assignees
Labels
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.