diff options
| author | Michael Howell <michael@notriddle.com> | 2024-07-24 13:34:18 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2024-08-20 16:54:04 -0700 |
| commit | bead042d5e8831a2648efbebac3cf62c6a87fdea (patch) | |
| tree | e96d7306b41bd25191a34f264f4bd726c42937d6 /src | |
| parent | 12a3c42cccd18d5fadcbad44c3c5442e4aca1a13 (diff) | |
| download | rust-bead042d5e8831a2648efbebac3cf62c6a87fdea.tar.gz rust-bead042d5e8831a2648efbebac3cf62c6a87fdea.zip | |
rustdoc: add test case for modnav position when TOC is off
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/render/context.rs | 7 | ||||
| -rw-r--r-- | src/librustdoc/html/render/sidebar.rs | 11 |
2 files changed, 7 insertions, 11 deletions
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 { |
