Remove crate_name from DocContext

tcx.crate_name is the appropriate way to retrieve the crate name.
This commit is contained in:
Mark Rousskov
2019-08-10 13:44:23 -04:00
parent 19c85a8f8a
commit 00d7bc7688
3 changed files with 8 additions and 13 deletions

View File

@@ -46,8 +46,6 @@ pub struct DocContext<'tcx> {
pub tcx: TyCtxt<'tcx>,
pub resolver: Rc<RefCell<interface::BoxedResolver>>,
/// The stack of module NodeIds up till this point
pub crate_name: Option<String>,
pub cstore: Lrc<CStore>,
/// Later on moved into `html::render::CACHE_KEY`
pub renderinfo: RefCell<RenderInfo>,
@@ -332,7 +330,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
file_loader: None,
diagnostic_output: DiagnosticOutput::Default,
stderr: None,
crate_name: crate_name.clone(),
crate_name,
lint_caps,
};
@@ -372,7 +370,6 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
let ctxt = DocContext {
tcx,
resolver,
crate_name,
cstore: compiler.cstore().clone(),
external_traits: Default::default(),
active_extern_traits: Default::default(),