diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-01-22 21:17:32 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-01-27 10:05:06 +0100 |
| commit | d98a72c77bb4bbc58598a285446bde63b9b372c9 (patch) | |
| tree | 4b3cf4f6cdbeb72e5c02d819ca187e5d1d52f1d3 | |
| parent | 6a36b3f49d209a5321450d934f8a241d5cccbb0e (diff) | |
| download | rust-d98a72c77bb4bbc58598a285446bde63b9b372c9.tar.gz rust-d98a72c77bb4bbc58598a285446bde63b9b372c9.zip | |
Update to new rustdoc APIs
| -rw-r--r-- | src/librustdoc/clean/types.rs | 1 | ||||
| -rw-r--r-- | src/librustdoc/formats/renderer.rs | 7 | ||||
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/json/mod.rs | 2 |
4 files changed, 4 insertions, 8 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index 7f329511c34..46cdefb5a51 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -37,7 +37,6 @@ use crate::clean::inline; use crate::clean::types::Type::{QPath, ResolvedPath}; use crate::clean::Clean; use crate::core::DocContext; -use crate::doctree; use crate::formats::cache::Cache; use crate::formats::item_type::ItemType; use crate::html::render::cache::ExternalLocation; diff --git a/src/librustdoc/formats/renderer.rs b/src/librustdoc/formats/renderer.rs index 65e2187e4ae..6ecc4695dc8 100644 --- a/src/librustdoc/formats/renderer.rs +++ b/src/librustdoc/formats/renderer.rs @@ -1,4 +1,4 @@ -use rustc_middle::ty; +use rustc_middle::ty::TyCtxt; use rustc_span::edition::Edition; use crate::clean; @@ -21,7 +21,7 @@ crate trait FormatRenderer<'tcx>: Clone { render_info: RenderInfo, edition: Edition, cache: Cache, - tcx: ty::TyCtxt<'tcx>, + tcx: TyCtxt<'tcx>, ) -> Result<(Self, clean::Crate), Error>; /// 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>>( .extra_verbose_generic_activity("create_renderer", T::descr()) .run(|| T::init(krate, options, render_info, edition, cache, tcx))?; - let (mut format_renderer, mut krate) = - T::init(krate, options, render_info, edition, cache, tcx)?; - let mut item = match krate.module.take() { Some(i) => i, None => return Ok(()), diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index f4ff1f3b6d5..187e0ec0106 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -394,7 +394,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> { _render_info: RenderInfo, edition: Edition, mut cache: Cache, - tcx: ty::TyCtxt<'tcx>, + tcx: TyCtxt<'tcx>, ) -> Result<(Self, clean::Crate), Error> { // need to save a copy of the options for rendering the index page let md_opts = options.clone(); diff --git a/src/librustdoc/json/mod.rs b/src/librustdoc/json/mod.rs index 6b19e9885c7..029e752df9f 100644 --- a/src/librustdoc/json/mod.rs +++ b/src/librustdoc/json/mod.rs @@ -136,7 +136,7 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> { _render_info: RenderInfo, _edition: Edition, cache: Cache, - tcx: ty::TyCtxt<'tcx>, + tcx: TyCtxt<'tcx>, ) -> Result<(Self, clean::Crate), Error> { debug!("Initializing json renderer"); Ok(( |
