[tmp] Pass TyCtxt
through to the render backend
First actually useful step in https://github.com/rust-lang/rust/issues/76382 This doesn't yet compile because there's no way to get a `Lrc<Session>` from a TyCtxt, only a `&Session`.
This commit is contained in:
parent
79ab333cf0
commit
9221d4d1d3
4 changed files with 15 additions and 17 deletions
|
@ -14,6 +14,7 @@ use std::rc::Rc;
|
|||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_middle::ty;
|
||||
use rustc_session::Session;
|
||||
use rustc_span::edition::Edition;
|
||||
|
||||
|
@ -127,12 +128,12 @@ impl FormatRenderer for JsonRenderer {
|
|||
_render_info: RenderInfo,
|
||||
_edition: Edition,
|
||||
_cache: &mut Cache,
|
||||
sess: Lrc<Session>,
|
||||
tcx: ty::TyCtxt<'_>,
|
||||
) -> Result<(Self, clean::Crate), Error> {
|
||||
debug!("Initializing json renderer");
|
||||
Ok((
|
||||
JsonRenderer {
|
||||
sess,
|
||||
sess: tcx.sess,
|
||||
index: Rc::new(RefCell::new(FxHashMap::default())),
|
||||
out_path: options.output,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue