@@ -334,10 +334,12 @@ pub fn check_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>)
334334
335335 } ) ?;
336336
337- tcx. sess . track_errors ( || {
338- time ( tcx. sess , "outlives testing" , ||
339- outlives:: test:: test_inferred_outlives ( tcx) ) ;
340- } ) ?;
337+ if tcx. features ( ) . rustc_attrs {
338+ tcx. sess . track_errors ( || {
339+ time ( tcx. sess , "outlives testing" , ||
340+ outlives:: test:: test_inferred_outlives ( tcx) ) ;
341+ } ) ?;
342+ }
341343
342344 tcx. sess . track_errors ( || {
343345 time ( tcx. sess , "impl wf inference" , ||
@@ -349,10 +351,12 @@ pub fn check_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>)
349351 coherence:: check_coherence ( tcx) ) ;
350352 } ) ?;
351353
352- tcx. sess . track_errors ( || {
353- time ( tcx. sess , "variance testing" , ||
354- variance:: test:: test_variance ( tcx) ) ;
355- } ) ?;
354+ if tcx. features ( ) . rustc_attrs {
355+ tcx. sess . track_errors ( || {
356+ time ( tcx. sess , "variance testing" , ||
357+ variance:: test:: test_variance ( tcx) ) ;
358+ } ) ?;
359+ }
356360
357361 time ( tcx. sess , "wf checking" , || check:: check_wf_new ( tcx) ) ?;
358362
0 commit comments