From 60a1abe4c5b6399e62144fc94d236b6f7eefcdf0 Mon Sep 17 00:00:00 2001 From: Noah Lev Date: Mon, 27 Dec 2021 18:39:35 -0800 Subject: [PATCH] Rename `rustdoc::html::render::cache` to `search_index` The old name wasn't very clear, while the new one makes it clear that this is the code responsible for creating the search index. --- src/librustdoc/clean/types.rs | 2 +- src/librustdoc/formats/cache.rs | 2 +- src/librustdoc/html/format.rs | 2 +- src/librustdoc/html/render/context.rs | 2 +- src/librustdoc/html/render/mod.rs | 2 +- src/librustdoc/html/render/{cache.rs => search_index.rs} | 0 src/librustdoc/json/mod.rs | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) rename src/librustdoc/html/render/{cache.rs => search_index.rs} (100%) diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index fe32b75d668c..f0e6d4315648 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -38,7 +38,7 @@ use crate::clean::Clean; use crate::core::DocContext; use crate::formats::cache::Cache; use crate::formats::item_type::ItemType; -use crate::html::render::cache::ExternalLocation; +use crate::html::render::search_index::ExternalLocation; use crate::html::render::Context; crate use self::FnRetTy::*; diff --git a/src/librustdoc/formats/cache.rs b/src/librustdoc/formats/cache.rs index 5813062ceab7..8a5c8651f999 100644 --- a/src/librustdoc/formats/cache.rs +++ b/src/librustdoc/formats/cache.rs @@ -12,7 +12,7 @@ use crate::fold::DocFolder; use crate::formats::item_type::ItemType; use crate::formats::Impl; use crate::html::markdown::short_markdown_summary; -use crate::html::render::cache::{get_index_search_type, ExternalLocation}; +use crate::html::render::search_index::{get_index_search_type, ExternalLocation}; use crate::html::render::IndexItem; /// This cache is used to store information about the [`clean::Crate`] being diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 3a2effa625cf..f7396f758b10 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -24,7 +24,7 @@ use rustc_target::spec::abi::Abi; use crate::clean::{self, utils::find_nearest_parent_module, ExternalCrate, ItemId, PrimitiveType}; use crate::formats::item_type::ItemType; use crate::html::escape::Escape; -use crate::html::render::cache::ExternalLocation; +use crate::html::render::search_index::ExternalLocation; use crate::html::render::Context; use super::url_parts_builder::UrlPartsBuilder; diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index 45a436c44871..6729129027f5 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -13,8 +13,8 @@ use rustc_span::edition::Edition; use rustc_span::source_map::FileName; use rustc_span::symbol::sym; -use super::cache::{build_index, ExternalLocation}; use super::print_item::{full_path, item_path, print_item}; +use super::search_index::{build_index, ExternalLocation}; use super::templates; use super::write_shared::write_shared; use super::{ diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index eb606178d244..3e7711181f73 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -23,7 +23,7 @@ //! These threads are not parallelized (they haven't been a bottleneck yet), and //! both occur before the crate is rendered. -crate mod cache; +crate mod search_index; #[cfg(test)] mod tests; diff --git a/src/librustdoc/html/render/cache.rs b/src/librustdoc/html/render/search_index.rs similarity index 100% rename from src/librustdoc/html/render/cache.rs rename to src/librustdoc/html/render/search_index.rs diff --git a/src/librustdoc/json/mod.rs b/src/librustdoc/json/mod.rs index 0031e3915fa4..01641bae3845 100644 --- a/src/librustdoc/json/mod.rs +++ b/src/librustdoc/json/mod.rs @@ -24,7 +24,7 @@ use crate::config::RenderOptions; use crate::error::Error; use crate::formats::cache::Cache; use crate::formats::FormatRenderer; -use crate::html::render::cache::ExternalLocation; +use crate::html::render::search_index::ExternalLocation; use crate::json::conversions::{from_item_id, IntoWithTcx}; #[derive(Clone)]