@@ -66,7 +66,7 @@ use rustc_middle::query::Providers;
66
66
use rustc_middle:: traits;
67
67
use rustc_middle:: ty:: { self , Ty , TyCtxt } ;
68
68
use rustc_session:: config;
69
- use rustc_span:: def_id:: { DefId , LocalDefId } ;
69
+ use rustc_span:: def_id:: LocalDefId ;
70
70
use rustc_span:: Span ;
71
71
72
72
rustc_fluent_macro:: fluent_messages! { "../messages.ftl" }
@@ -84,21 +84,6 @@ macro_rules! type_error_struct {
84
84
} )
85
85
}
86
86
87
- fn has_typeck_results ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> bool {
88
- // Closures' typeck results come from their outermost function,
89
- // as they are part of the same "inference environment".
90
- let typeck_root_def_id = tcx. typeck_root_def_id ( def_id) ;
91
- if typeck_root_def_id != def_id {
92
- return tcx. has_typeck_results ( typeck_root_def_id) ;
93
- }
94
-
95
- if let Some ( def_id) = def_id. as_local ( ) {
96
- tcx. hir_node_by_def_id ( def_id) . body_id ( ) . is_some ( )
97
- } else {
98
- false
99
- }
100
- }
101
-
102
87
fn used_trait_imports ( tcx : TyCtxt < ' _ > , def_id : LocalDefId ) -> & UnordSet < LocalDefId > {
103
88
& tcx. typeck ( def_id) . used_trait_imports
104
89
}
@@ -429,11 +414,5 @@ fn fatally_break_rust(tcx: TyCtxt<'_>, span: Span) -> ! {
429
414
430
415
pub fn provide ( providers : & mut Providers ) {
431
416
method:: provide ( providers) ;
432
- * providers = Providers {
433
- typeck,
434
- diagnostic_only_typeck,
435
- has_typeck_results,
436
- used_trait_imports,
437
- ..* providers
438
- } ;
417
+ * providers = Providers { typeck, diagnostic_only_typeck, used_trait_imports, ..* providers } ;
439
418
}
0 commit comments