@@ -16,7 +16,7 @@ use rustc_interface::interface;
16
16
use rustc_middle:: hir:: map:: Map ;
17
17
use rustc_middle:: middle:: cstore:: CrateStore ;
18
18
use rustc_middle:: middle:: privacy:: AccessLevels ;
19
- use rustc_middle:: ty:: { self , Ty , TyCtxt } ;
19
+ use rustc_middle:: ty:: { Ty , TyCtxt } ;
20
20
use rustc_resolve as resolve;
21
21
use rustc_session:: config:: { self , CrateType , ErrorOutputType } ;
22
22
use rustc_session:: lint;
@@ -391,12 +391,6 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
391
391
} ;
392
392
// In case typeck does end up being called, don't ICE in case there were name resolution errors
393
393
providers. typeck_tables_of = move |tcx, def_id| {
394
- thread_local ! ( static DEFAULT_TYPECK : for <' tcx> fn ( TyCtxt <' tcx>, LocalDefId ) -> & ' tcx ty:: TypeckTables <' tcx> = {
395
- let mut providers = ty:: query:: Providers :: default ( ) ;
396
- rustc_typeck:: provide( & mut providers) ;
397
- providers. typeck_tables_of
398
- } ) ;
399
-
400
394
// Closures' tables come from their outermost function,
401
395
// as they are part of the same "inference environment".
402
396
// This avoids emitting errors for the parent twice (see similar code in `typeck_tables_of_with_fallback`)
@@ -409,7 +403,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
409
403
let body = hir. body ( hir. body_owned_by ( hir. as_local_hir_id ( def_id) ) ) ;
410
404
debug ! ( "visiting body for {:?}" , def_id) ;
411
405
EmitIgnoredResolutionErrors :: new ( tcx) . visit_body ( body) ;
412
- DEFAULT_TYPECK . with ( |typeck| typeck ( tcx, def_id) )
406
+ ( rustc_interface :: DEFAULT_QUERY_PROVIDERS . typeck_tables_of ) ( tcx, def_id)
413
407
} ;
414
408
} ) ,
415
409
registry : rustc_driver:: diagnostics_registry ( ) ,
0 commit comments