@@ -66,7 +66,7 @@ use rustc_middle::query::Providers;
6666use rustc_middle:: traits;
6767use rustc_middle:: ty:: { self , Ty , TyCtxt } ;
6868use rustc_session:: config;
69- use rustc_span:: def_id:: { DefId , LocalDefId } ;
69+ use rustc_span:: def_id:: LocalDefId ;
7070use rustc_span:: Span ;
7171
7272rustc_fluent_macro:: fluent_messages! { "../messages.ftl" }
@@ -84,21 +84,6 @@ macro_rules! type_error_struct {
8484 } )
8585}
8686
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-
10287fn used_trait_imports ( tcx : TyCtxt < ' _ > , def_id : LocalDefId ) -> & UnordSet < LocalDefId > {
10388 & tcx. typeck ( def_id) . used_trait_imports
10489}
@@ -429,11 +414,5 @@ fn fatally_break_rust(tcx: TyCtxt<'_>, span: Span) -> ! {
429414
430415pub fn provide ( providers : & mut Providers ) {
431416 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 } ;
439418}
0 commit comments