Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

1946-intra-rustdoc-links issue #64193

Closed
olegnn opened this issue Sep 5, 2019 · 6 comments
Closed

1946-intra-rustdoc-links issue #64193

olegnn opened this issue Sep 5, 2019 · 6 comments
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@olegnn
Copy link
Contributor

olegnn commented Sep 5, 2019

Problem

Links created according to 1946-intra-rustdoc-links either don't work as expected or work with warning: `[...]` cannot be resolved, ignoring it....

Steps

  1. Go to https://rust-lang-nursery.github.io/futures-api-docs/0.3.0-alpha.18/futures/channel/mpsc/struct.TryRecvError.html.
  2. Click on try_next link.
    It won't work correctly, but if we
  3. git clone https://github.com/rust-lang-nursery/futures-rs
  4. cd futures-rs
  5. Change line
    from
    [`try_next`](Receiver::try_next)
    to
    [`try_next`](mpsc::Receiver::try_next())
    or to
    [`try_next`](futures_channel::mpsc::Receiver::try_next())
  6. After cargo +nightly doc
    we will get
    warning: `[mpsc::Receiver::try_next]` cannot be resolved, ignoring it...
    or
    warning: `[futures_channel::mpsc::Receiver::try_next]` cannot be resolved, ignoring it...
    respectively.

Meanwhile link will magically work.

Possible Solution(s)

It would be nice to remove incorrect warnings and make doc example work [or at least add warning for that case]. Thanks.

Notes

Output of cargo version:

cargo 1.39.0-nightly (22f7dd049 2019-08-27)

@ehuss ehuss transferred this issue from rust-lang/cargo Sep 5, 2019
@ehuss
Copy link
Contributor

ehuss commented Sep 5, 2019

Transferred to rust-lang/rust since this is a rustdoc issue.

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 6, 2019
@jonas-schievink jonas-schievink added A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. labels Sep 10, 2019
@tesuji
Copy link
Contributor

tesuji commented Jun 17, 2020

Link to the tracking issue of intra doc link: #43466

@jyn514
Copy link
Member

jyn514 commented Jun 26, 2020

Possible duplicate of #73699 (I know this issue came first but the other has a MCVE).

@jyn514
Copy link
Member

jyn514 commented Jul 18, 2020

Closing as duplicate of #73699: futures_rs is trying to link to the upstream crate futures_channel.

@Nemo157
Copy link
Member

Nemo157 commented Jul 20, 2020

This isn't related to #73699/#74481, it's just normal cross-crate inlining intradoc issues.

On futures-channel::mpsc::TryRecvError the link is correctly resolved, on futures::mpsc::TryRecvError it is not. I tried building with the latest nightly (rustdoc 1.46.0-nightly (346aec9b0 2020-07-11)) and it still doesn't work, @jyn514 are there still known cross-crate inlining issues, or should they all be fixed now? (:facepalm: that's not latest nightly, I forgot about the fallback for missing components and I have an entire screen-full of components installed so the messages disappear, I'll retest).

@Nemo157
Copy link
Member

Nemo157 commented Jul 20, 2020

Testing with actual latest nightly works 🎉 so this will be fixed for the next version published.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants