From bead042d5e8831a2648efbebac3cf62c6a87fdea Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Wed, 24 Jul 2024 13:34:18 -0700 Subject: rustdoc: add test case for modnav position when TOC is off --- src/librustdoc/html/render/context.rs | 7 ++----- src/librustdoc/html/render/sidebar.rs | 11 +++++------ 2 files changed, 7 insertions(+), 11 deletions(-) (limited to 'src/librustdoc/html/render') diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index 510da99c9ef..72fa9ef706c 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -14,12 +14,9 @@ use rustc_span::edition::Edition; use rustc_span::{sym, FileName, Symbol}; use super::print_item::{full_path, item_path, print_item}; +use super::sidebar::{print_sidebar, sidebar_module_like, ModuleLike, Sidebar}; use super::write_shared::write_shared; -use super::{ - collect_spans_and_sources, scrape_examples_help, - sidebar::{print_sidebar, sidebar_module_like, ModuleLike, Sidebar}, - AllTypes, LinkFromSrc, StylePath, -}; +use super::{collect_spans_and_sources, scrape_examples_help, AllTypes, LinkFromSrc, StylePath}; use crate::clean::types::ExternalLocation; use crate::clean::utils::has_doc_flag; use crate::clean::{self, ExternalCrate}; diff --git a/src/librustdoc/html/render/sidebar.rs b/src/librustdoc/html/render/sidebar.rs index 351a23b880d..fe64739731c 100644 --- a/src/librustdoc/html/render/sidebar.rs +++ b/src/librustdoc/html/render/sidebar.rs @@ -7,13 +7,12 @@ use rustc_hir::def::CtorKind; use rustc_hir::def_id::DefIdSet; use rustc_middle::ty::{self, TyCtxt}; -use crate::{ - clean, - formats::{item_type::ItemType, Impl}, - html::{format::Buffer, markdown::IdMap, markdown::MarkdownWithToc}, -}; - use super::{item_ty_to_section, Context, ItemSection}; +use crate::clean; +use crate::formats::item_type::ItemType; +use crate::formats::Impl; +use crate::html::format::Buffer; +use crate::html::markdown::{IdMap, MarkdownWithToc}; #[derive(Clone, Copy)] pub(crate) enum ModuleLike { -- cgit 1.4.1-3-g733a5