@@ -334,10 +334,12 @@ pub fn check_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>)
334
334
335
335
} ) ?;
336
336
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
+ }
341
343
342
344
tcx. sess . track_errors ( || {
343
345
time ( tcx. sess , "impl wf inference" , ||
@@ -349,10 +351,12 @@ pub fn check_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>)
349
351
coherence:: check_coherence ( tcx) ) ;
350
352
} ) ?;
351
353
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
+ }
356
360
357
361
time ( tcx. sess , "wf checking" , || check:: check_wf_new ( tcx) ) ?;
358
362
0 commit comments