Open
Description
With three crates:
- Crate C export a public struct
- Crate B depends on crate C and export a public struct with doc linking to the crate C pub item
- Crate A reexport everything from crate B
When building doc for crate A, the intra doc link will not work without a warning.
This is what's happening in Bevy on the doc for DefaultPlugins
(bevyengine/bevy#3654).
I managed to write a UI test reproducing the issue: mockersf@1c4d478
Test failure message
14: @has check failed
`XPATH PATTERN` did not match
// @has 'issue_zzzz/struct.Reexported.html' '//div[@class="docblock"]/p/a[@href="../issue_zzzz_internal/struct.Internal.html"]' 'issue_zzzz_internal::Internal'
Encountered 1 errors
Ideally I would like the link to work. I'm guessing it's something about the external crate not being in context for link resolution when it's not explicitly used, but it seems it is later on as the link is correct for the struct definition. I tried to follow the code to where the context could be different between the two but didn't manage to find it.
If it's not possible, would it be OK to issue a warning?
Meta
Reproduced with rust 1.57, 1.58, nightly 1bd4fdc 2022-01-12 and 256721e