Skip to main content Module sources Copy item path Source use std::cell::Cell ; π use std::cell::RefCell ; π use std::ffi::OsStr ; π use std::path::Component ; π use std::path::Path ; π use std::path::PathBuf ; π use std::fmt ; π use std::fs ; π use askama::Template; π use askama::Template; π use rustc_data_structures::fx::FxHashSet; π use rustc_data_structures::fx::FxIndexMap; π use rustc_hir::def_id::LOCAL_CRATE; π use rustc_middle::ty::TyCtxt; π use rustc_session::Session; π use rustc_span::FileName; π use rustc_span::RealFileName; π use rustc_span::RemapPathScopeComponents; π use tracing::info; π use super::render::Context ; π use super::highlight ; π use super::layout ; π use crate::clean ; π use crate::clean::utils::has_doc_flag ; π use crate::docfs::PathError ; π use crate::error::Error ; π use crate::visit::DocVisitor ; π LocalSourcesCollector π ScrapedInfo π ScrapedSource π Source π SourceCollector π Helper struct to render all source code to HTML pages SourceContext π clean_path π Takes a path to a source file and cleans the path to it. This canonicalizes
things like β..β to components which preserve the βtop downβ hierarchy of a
static HTML tree. Each component in the cleaned path will be passed as an
argument to f. The very last component of the path (ie the file name) is ignored.
If a .. is encountered, the parent closure will be called to allow the callee to
handle it. collect_local_sources π filename_real_and_local π print_src π Wrapper struct to render the source code of a file. This will do things like
adding line numbers to the left-hand side. render π