File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
compiler/rustc_interface/src Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -996,9 +996,12 @@ pub fn start_codegen<'tcx>(
996996 codegen_backend. codegen_crate ( tcx, metadata, need_metadata_module)
997997 } ) ;
998998
999- rustc_incremental:: assert_module_sources:: assert_module_sources ( tcx) ;
1000-
1001- rustc_symbol_mangling:: test:: report_symbol_names ( tcx) ;
999+ // Don't run these test assertions when not doing codegen. Compiletest tries to build
1000+ // build-fail tests in check mode first and expects it to not give an error in that case.
1001+ if tcx. sess . opts . output_types . should_codegen ( ) {
1002+ rustc_incremental:: assert_module_sources:: assert_module_sources ( tcx) ;
1003+ rustc_symbol_mangling:: test:: report_symbol_names ( tcx) ;
1004+ }
10021005
10031006 tcx. sess . time ( "assert_dep_graph" , || rustc_incremental:: assert_dep_graph ( tcx) ) ;
10041007 tcx. sess . time ( "serialize_dep_graph" , || rustc_incremental:: save_dep_graph ( tcx) ) ;
You can’t perform that action at this time.
0 commit comments