@@ -98,7 +98,6 @@ mod outlives;
9898pub mod structured_errors;
9999mod variance;
100100
101- use rustc_errors:: ErrorGuaranteed ;
102101use rustc_hir as hir;
103102use rustc_middle:: middle;
104103use rustc_middle:: query:: Providers ;
@@ -156,11 +155,11 @@ pub fn provide(providers: &mut Providers) {
156155 hir_wf_check:: provide ( providers) ;
157156}
158157
159- pub fn check_crate ( tcx : TyCtxt < ' _ > ) -> Result < ( ) , ErrorGuaranteed > {
158+ pub fn check_crate ( tcx : TyCtxt < ' _ > ) {
160159 let _prof_timer = tcx. sess . timer ( "type_check_crate" ) ;
161160
162161 if tcx. features ( ) . rustc_attrs {
163- tcx. sess . time ( "outlives_testing" , || outlives:: test:: test_inferred_outlives ( tcx) ) ? ;
162+ tcx. sess . time ( "outlives_testing" , || outlives:: test:: test_inferred_outlives ( tcx) ) ;
164163 }
165164
166165 tcx. sess . time ( "coherence_checking" , || {
@@ -177,11 +176,11 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorGuaranteed> {
177176 } ) ;
178177
179178 if tcx. features ( ) . rustc_attrs {
180- tcx. sess . time ( "variance_testing" , || variance:: test:: test_variance ( tcx) ) ? ;
179+ tcx. sess . time ( "variance_testing" , || variance:: test:: test_variance ( tcx) ) ;
181180 }
182181
183182 if tcx. features ( ) . rustc_attrs {
184- collect:: test_opaque_hidden_types ( tcx) ? ;
183+ collect:: test_opaque_hidden_types ( tcx) ;
185184 }
186185
187186 // Make sure we evaluate all static and (non-associated) const items, even if unused.
@@ -211,8 +210,6 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorGuaranteed> {
211210 } ) ;
212211
213212 tcx. ensure ( ) . check_unused_traits ( ( ) ) ;
214-
215- Ok ( ( ) )
216213}
217214
218215/// A quasi-deprecated helper used in rustdoc and clippy to get
0 commit comments