Skip to content

Passing --disable-per-crate-search to rustdoc disables search altogether #66816

Description

@jyn514

docs.rs ran into this this morning, see rust-lang/docs.rs#497.

This seems to have been caused by #66298, which disabled the search bar by default. The logic to reenable search was a little buggy - getSearchElement() looks for an element with the 'search' id, but that ID is not set when --disable-per-crate-search is enabled.

Steps to replicate:

cat '/// Hello, world!
fn main() {
}' > tmp.rs
rustdoc +nightly -Zunstable-options --disable-per-crate-search tmp.rs
xdg-open doc/tmp/index.html

cc @QuietMisdreavus @GuillaumeGomez

Activity

  1. added
    C-bugCategory: This is a bug.
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    on Nov 27, 2019
  2. GuillaumeGomez commented on Nov 27, 2019

    @GuillaumeGomez
    Member

    I'll try to take a look tomorrow.

  3. added
    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
    on Aug 26, 2020
  4. added 2 commits that reference this issue on Aug 29, 2020
  5. added 2 commits that reference this issue on Aug 31, 2020
  6. added a commit that references this issue on Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.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