Description
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 confuserust-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:
- rustdoc: Pain points of reexports #24305 - umbrella issue about re-exports which may encompass this bug. I know
tokio
has many re-exports but I'm not certain yet if that's an issue here. - Rustdoc search result links to 404 #63435 - maybe this bug has a similar cause but slightly different conditions?