Skip to content
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

Inconsistent API doc generation: missing _::next referent in search. #1738

Closed
nathan-at-least opened this issue Nov 6, 2019 · 3 comments
Closed
Labels
T-docs Topic: documentation

Comments

@nathan-at-least
Copy link

Version

Declared dependency: tokio = { version = "=0.2.0-alpha.6", features = ["process"] }

$ cargo tree | grep tokio
└── tokio v0.2.0-alpha.6
    ├── tokio-codec v0.2.0-alpha.6
    │   └── tokio-io v0.2.0-alpha.6
    ├── tokio-executor v0.2.0-alpha.6
    │   ├── tokio-sync v0.2.0-alpha.6
    ├── tokio-fs v0.2.0-alpha.6
    │   ├── tokio-executor v0.2.0-alpha.6 (*)
    │   ├── tokio-io v0.2.0-alpha.6 (*)
    │   └── tokio-sync v0.2.0-alpha.6 (*)
    ├── tokio-io v0.2.0-alpha.6 (*)
    ├── tokio-macros v0.2.0-alpha.6
    ├── tokio-net v0.2.0-alpha.6
    │   ├── tokio-codec v0.2.0-alpha.6 (*)
    │   ├── tokio-executor v0.2.0-alpha.6 (*)
    │   ├── tokio-io v0.2.0-alpha.6 (*)
    │   ├── tokio-sync v0.2.0-alpha.6 (*)
    ├── tokio-sync v0.2.0-alpha.6 (*)
    ├── tokio-timer v0.3.0-alpha.6
    │   ├── tokio-executor v0.2.0-alpha.6 (*)
    │   └── tokio-sync v0.2.0-alpha.6 (*)

Platform

$ uname -a
Linux penguin 4.19.69-06666-g6c4f8cbba24e #1 SMP PREEMPT Fri Sep 6 22:15:24 PDT 2019 x86_64 GNU/Linux

Description

Summary: Generated documentation shows a promising search result for _::next which links to a page without any information about such a method.

Details:

When I search for next or _::next in either my locally generated cargo doc or https://docs.rs/tokio I see a promising search result that says:

tokio::prelude::_::next Create a future that resolves the next item in the…

However, in both my local docs and the docs.rs site, when I click that link, I'm taken to a page for trait _ : Future and there is no next method anywhere. In fact, the entire page does not have the string "next" according to my browser.

You can see the search here: https://docs.rs/tokio/0.2.0-alpha.6/tokio/?search=next

image

You can see the search referent here: https://docs.rs/tokio/0.2.0-alpha.6/tokio/prelude/trait._.html#method.next

image

Other Investigation:

  • I also spot checked early versions of the 0.2.0 series on docs.rs and it has the same behavior.
  • I used the "src" link for the referent page and used browser find-in-page to see if there was a next method defined in code which was somehow hidden from doc gen.

Bug Source:

This may be a bug in tokio RPC docs, a bug in rust's api doc toolchain, or a combination of the two. I'm filing this issue here, but if this is a doc toolchain bug, I will gladly pursue that in the right toolchain issue tracker.

How I got here:

I'm trying to learn how to iterate asynchronously over the items in a Stream and 0.2.0 is my first dive into tokio. I failed to find how to consume a Stream from API docs and googling. A friend pointed me towards _::next search. (I consider there to be a documentation clarity bug/improvement request about Stream that I will file separately.)

@sfackler
Copy link
Contributor

sfackler commented Nov 6, 2019

This is a rustdoc bug, so it should probably be filed on the rust-lang/rust repo.

@nathan-at-least
Copy link
Author

@sfackler Gotcha. I will do that now.

@hawkw
Copy link
Member

hawkw commented Nov 15, 2019

I'm closing this, since it's a RustDoc bug rather than a Tokio bug.

@hawkw hawkw closed this as completed Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-docs Topic: documentation
Projects
None yet
Development

No branches or pull requests

3 participants