Skip to content

rustdoc: search results show promising result, but referent page doesn't contain the named method. #66164

Closed
@nathan-at-least

Description

@nathan-at-least

Summary: I search API docs, see a promising result, follow that result to a page, that page does not have the method nor description text that was in the search result. Verified in local docs and officially hosted docs.rs docs.

Details:

I originally filed this issue in the tokio repo thinking it was an API doc bug on their part. Someone suggested it's a rust-doc bug, so here I am. The original issue has a fair amount of detail: tokio-rs/tokio#1738

Reproduction:

I haven't literally tested this yet, but I believe it's on the right track:

$ cargo new docbugdemo
$ cd ./docbugdemo
$ echo 'tokio = "0.2.0-alpha.6" >> Cargo.toml
$ cargo doc --open

-then search for next or _::next, and follow the top hit. On the resulting page use browser find-in-page-search for "next". Observe 0 hits. View the source of that module, use browser find-in-page for "next". Observe 0 hits.

Investigation:

I'm missing a lot of context here with both rust-doc and tokio API, but I wonder if some of these could be contributors to the bug:

  • tokio re-exports a lot.
  • Maybe tokio defines multiple different _ traits or types in different modules?
  • Maybe the name _ happens to confuse rust-doc.

Related Issues:
I searched this repo with label:T-rustdoc search and scanned for duplicates/related items. I believe this bug is unique.

Two relevant results:

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions