Skip to content

Search bar not working with cargo doc --open #70781

Closed
@icy-ux

Description

@icy-ux

Problem
The search bar isn't working when I do cargo doc --open using Firefox. Normally I can type in method or struct name in the search bar at the top, and it will search the libraries associated with the project (as well as the project) and return links to appropriate documentation. Instead, when I click the search bar nothing happens, and I can't type anything in the search bar.

The browser dev tools indicate this is because of a ReferenceError: E is not defined in the javascript in target/doc/search-index.js:16

This does not happen with every project. A test project created with very few dependencies resulted the search bar working fine, and I haven't been able to determine whether it is a particular dependency which is causing the problem

Steps

  1. Execute cargo doc --open
  2. Switch to the (newly-opened) Firefox window
  3. Try to use the search bar

Possible Solution(s)
Unknown

Notes

Output of cargo version:

$ cargo version
cargo 1.42.0 (86334295e 2020-01-31)
$ rustup --version
rustup 1.21.1 (7832b2ebe 2019-12-20)
$ rustc --version
rustc 1.42.0 (b8cedc004 2020-03-09)

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