Skip to content

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

Closed
@nathan-at-least

Description

@nathan-at-least

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-docsTopic: documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions