File tree Expand file tree Collapse file tree 17 files changed +36
-9
lines changed Expand file tree Collapse file tree 17 files changed +36
-9
lines changed Original file line number Diff line number Diff line change @@ -484,8 +484,8 @@ impl<'a> Builder<'a> {
484
484
} else {
485
485
PathBuf :: from ( "/path/to/nowhere/rustdoc/not/required" )
486
486
} )
487
- . env ( "TEST_MIRI" , self . config . test_miri . to_string ( ) ) ;
488
-
487
+ . env ( "TEST_MIRI" , self . config . test_miri . to_string ( ) )
488
+ . env ( "RUSTC_ERROR_METADATA_DST" , self . extended_error_dir ( ) ) ;
489
489
if let Some ( n) = self . config . rust_codegen_units {
490
490
cargo. env ( "RUSTC_CODEGEN_UNITS" , n. to_string ( ) ) ;
491
491
}
Original file line number Diff line number Diff line change @@ -975,7 +975,8 @@ impl Step for ErrorIndex {
975
975
build. run ( builder. tool_cmd ( Tool :: ErrorIndex )
976
976
. arg ( "markdown" )
977
977
. arg ( & output)
978
- . env ( "CFG_BUILD" , & build. build ) ) ;
978
+ . env ( "CFG_BUILD" , & build. build )
979
+ . env ( "RUSTC_ERROR_METADATA_DST" , build. extended_error_dir ( ) ) ) ;
979
980
980
981
markdown_test ( builder, compiler, & output) ;
981
982
}
Original file line number Diff line number Diff line change @@ -671,7 +671,8 @@ impl Step for ErrorIndex {
671
671
index. arg ( out. join ( "error-index.html" ) ) ;
672
672
673
673
// FIXME: shouldn't have to pass this env var
674
- index. env ( "CFG_BUILD" , & build. build ) ;
674
+ index. env ( "CFG_BUILD" , & build. build )
675
+ . env ( "RUSTC_ERROR_METADATA_DST" , build. extended_error_dir ( ) ) ;
675
676
676
677
build. run ( & mut index) ;
677
678
}
Original file line number Diff line number Diff line change @@ -718,6 +718,11 @@ impl Build {
718
718
self . config . python . as_ref ( ) . unwrap ( )
719
719
}
720
720
721
+ /// Temporary directory that extended error information is emitted to.
722
+ fn extended_error_dir ( & self ) -> PathBuf {
723
+ self . out . join ( "tmp/extended-error-metadata" )
724
+ }
725
+
721
726
/// Tests whether the `compiler` compiling for `target` should be forced to
722
727
/// use a stage1 compiler instead.
723
728
///
Original file line number Diff line number Diff line change @@ -175,4 +175,5 @@ fn noop() {
175
175
176
176
177
177
// Build the diagnostics array at the end so that the metadata includes error use sites.
178
+ #[ cfg( not( stage0) ) ] // remove after the next snapshot
178
179
__build_diagnostic_array ! { librustc, DIAGNOSTICS }
Original file line number Diff line number Diff line change @@ -56,4 +56,5 @@ pub fn provide(providers: &mut Providers) {
56
56
}
57
57
58
58
// Build the diagnostics array at the end so that the metadata includes error use sites.
59
+ #[ cfg( not( stage0) ) ] // remove after the next snapshot
59
60
__build_diagnostic_array ! { librustc_const_eval, DIAGNOSTICS }
Original file line number Diff line number Diff line change @@ -1268,6 +1268,14 @@ fn exit_on_err() -> ! {
1268
1268
panic ! ( ) ;
1269
1269
}
1270
1270
1271
+ #[ cfg( stage0) ]
1272
+ pub fn diagnostics_registry ( ) -> errors:: registry:: Registry {
1273
+ use errors:: registry:: Registry ;
1274
+
1275
+ Registry :: new ( & [ ] )
1276
+ }
1277
+
1278
+ #[ cfg( not( stage0) ) ]
1271
1279
pub fn diagnostics_registry ( ) -> errors:: registry:: Registry {
1272
1280
use errors:: registry:: Registry ;
1273
1281
Original file line number Diff line number Diff line change @@ -58,4 +58,5 @@ pub mod cstore;
58
58
pub mod dynamic_lib;
59
59
pub mod locator;
60
60
61
+ #[ cfg( not( stage0) ) ] // remove after the next snapshot
61
62
__build_diagnostic_array ! { librustc_metadata, DIAGNOSTICS }
Original file line number Diff line number Diff line change @@ -79,4 +79,5 @@ pub fn provide(providers: &mut Providers) {
79
79
providers. const_eval = interpret:: const_eval_provider;
80
80
}
81
81
82
+ #[ cfg( not( stage0) ) ] // remove after the next snapshot
82
83
__build_diagnostic_array ! { librustc_mir, DIAGNOSTICS }
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ mod mir_stats;
45
45
pub mod no_asm;
46
46
pub mod static_recursion;
47
47
48
+ #[ cfg( not( stage0) ) ] // remove after the next snapshot
48
49
__build_diagnostic_array ! { librustc_passes, DIAGNOSTICS }
49
50
50
51
pub fn provide ( providers : & mut Providers ) {
You can’t perform that action at this time.
0 commit comments