Store concrete crate stores where possible
This commit is contained in:
parent
eb0bc64265
commit
5aec365cb9
19 changed files with 101 additions and 105 deletions
|
@ -13,6 +13,7 @@ use rustc::traits::{self, auto_trait as auto};
|
|||
use rustc::ty::{self, ToPredicate, TypeFoldable};
|
||||
use rustc::ty::subst::Subst;
|
||||
use rustc::infer::InferOk;
|
||||
use rustc::middle::cstore::CrateStore;
|
||||
use std::fmt::Debug;
|
||||
use syntax_pos::DUMMY_SP;
|
||||
|
||||
|
@ -20,13 +21,13 @@ use core::DocAccessLevels;
|
|||
|
||||
use super::*;
|
||||
|
||||
pub struct AutoTraitFinder<'a, 'tcx: 'a, 'rcx: 'a> {
|
||||
pub cx: &'a core::DocContext<'a, 'tcx, 'rcx>,
|
||||
pub struct AutoTraitFinder<'a, 'tcx: 'a, 'rcx: 'a, 'cstore: 'rcx> {
|
||||
pub cx: &'a core::DocContext<'a, 'tcx, 'rcx, 'cstore>,
|
||||
pub f: auto::AutoTraitFinder<'a, 'tcx>,
|
||||
}
|
||||
|
||||
impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
|
||||
pub fn new(cx: &'a core::DocContext<'a, 'tcx, 'rcx>) -> Self {
|
||||
impl<'a, 'tcx, 'rcx, 'cstore> AutoTraitFinder<'a, 'tcx, 'rcx, 'cstore> {
|
||||
pub fn new(cx: &'a core::DocContext<'a, 'tcx, 'rcx, 'cstore>) -> Self {
|
||||
let f = auto::AutoTraitFinder::new(&cx.tcx);
|
||||
|
||||
AutoTraitFinder { cx, f }
|
||||
|
|
|
@ -19,7 +19,7 @@ use syntax_pos::Span;
|
|||
use rustc::hir;
|
||||
use rustc::hir::def::{Def, CtorKind};
|
||||
use rustc::hir::def_id::DefId;
|
||||
use rustc::middle::cstore::LoadedMacro;
|
||||
use rustc::middle::cstore::{CrateStore, LoadedMacro};
|
||||
use rustc::ty;
|
||||
use rustc::util::nodemap::FxHashSet;
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ pub struct Crate {
|
|||
pub masked_crates: FxHashSet<CrateNum>,
|
||||
}
|
||||
|
||||
impl<'a, 'tcx, 'rcx> Clean<Crate> for visit_ast::RustdocVisitor<'a, 'tcx, 'rcx> {
|
||||
impl<'a, 'tcx, 'rcx, 'cstore> Clean<Crate> for visit_ast::RustdocVisitor<'a, 'tcx, 'rcx, 'cstore> {
|
||||
fn clean(&self, cx: &DocContext) -> Crate {
|
||||
use ::visit_lib::LibEmbargoVisitor;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue