@@ -375,7 +375,6 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
375
375
override_queries : Some ( |_sess, local_providers, external_providers| {
376
376
local_providers. lint_mod = |_, _| { } ;
377
377
external_providers. lint_mod = |_, _| { } ;
378
- //let old_typeck = local_providers.typeck_tables_of;
379
378
local_providers. typeck_tables_of = move |tcx, def_id| {
380
379
// Closures' tables come from their outermost function,
381
380
// as they are part of the same "inference environment".
@@ -389,8 +388,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
389
388
let body = hir. body ( hir. body_owned_by ( hir. as_local_hir_id ( def_id) ) ) ;
390
389
debug ! ( "visiting body for {:?}" , def_id) ;
391
390
EmitIgnoredResolutionErrors :: new ( & tcx. sess , hir) . visit_body ( body) ;
392
- rustc_typeck:: check:: typeck_tables_of ( tcx, def_id)
393
- //DEFAULT_TYPECK.with(|typeck| typeck(tcx, def_id))
391
+ DEFAULT_TYPECK . with ( |typeck| typeck ( tcx, def_id) )
394
392
} ;
395
393
} ) ,
396
394
registry : rustc_driver:: diagnostics_registry ( ) ,
@@ -596,13 +594,11 @@ use rustc_hir::{
596
594
} ;
597
595
use rustc_middle:: hir:: map:: Map ;
598
596
599
- /*
600
597
thread_local ! ( static DEFAULT_TYPECK : for <' tcx> fn ( rustc_middle:: ty:: TyCtxt <' tcx>, rustc_span:: def_id:: LocalDefId ) -> & ' tcx rustc_middle:: ty:: TypeckTables <' tcx> = {
601
598
let mut providers = rustc_middle:: ty:: query:: Providers :: default ( ) ;
602
599
rustc_typeck:: provide( & mut providers) ;
603
600
providers. typeck_tables_of
604
601
} ) ;
605
- */
606
602
607
603
/// Due to https://github.com/rust-lang/rust/pull/73566,
608
604
/// the name resolution pass may find errors that are never emitted.
0 commit comments