Skip to content

Commit d98a72c

Browse files
Update to new rustdoc APIs
1 parent 6a36b3f commit d98a72c

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

src/librustdoc/clean/types.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ use crate::clean::inline;
3737
use crate::clean::types::Type::{QPath, ResolvedPath};
3838
use crate::clean::Clean;
3939
use crate::core::DocContext;
40-
use crate::doctree;
4140
use crate::formats::cache::Cache;
4241
use crate::formats::item_type::ItemType;
4342
use crate::html::render::cache::ExternalLocation;

src/librustdoc/formats/renderer.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use rustc_middle::ty;
1+
use rustc_middle::ty::TyCtxt;
22
use rustc_span::edition::Edition;
33

44
use crate::clean;
@@ -21,7 +21,7 @@ crate trait FormatRenderer<'tcx>: Clone {
2121
render_info: RenderInfo,
2222
edition: Edition,
2323
cache: Cache,
24-
tcx: ty::TyCtxt<'tcx>,
24+
tcx: TyCtxt<'tcx>,
2525
) -> Result<(Self, clean::Crate), Error>;
2626

2727
/// Renders a single non-module item. This means no recursive sub-item rendering is required.
@@ -69,9 +69,6 @@ crate fn run_format<'tcx, T: FormatRenderer<'tcx>>(
6969
.extra_verbose_generic_activity("create_renderer", T::descr())
7070
.run(|| T::init(krate, options, render_info, edition, cache, tcx))?;
7171

72-
let (mut format_renderer, mut krate) =
73-
T::init(krate, options, render_info, edition, cache, tcx)?;
74-
7572
let mut item = match krate.module.take() {
7673
Some(i) => i,
7774
None => return Ok(()),

src/librustdoc/html/render/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
394394
_render_info: RenderInfo,
395395
edition: Edition,
396396
mut cache: Cache,
397-
tcx: ty::TyCtxt<'tcx>,
397+
tcx: TyCtxt<'tcx>,
398398
) -> Result<(Self, clean::Crate), Error> {
399399
// need to save a copy of the options for rendering the index page
400400
let md_opts = options.clone();

src/librustdoc/json/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
136136
_render_info: RenderInfo,
137137
_edition: Edition,
138138
cache: Cache,
139-
tcx: ty::TyCtxt<'tcx>,
139+
tcx: TyCtxt<'tcx>,
140140
) -> Result<(Self, clean::Crate), Error> {
141141
debug!("Initializing json renderer");
142142
Ok((

0 commit comments

Comments
 (0)