File tree 3 files changed +6
-8
lines changed
rustc_incremental/src/persist
3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -56,16 +56,14 @@ where
56
56
}
57
57
Err ( err) if err. kind ( ) == io:: ErrorKind :: NotFound => ( ) ,
58
58
Err ( err) => {
59
- sess. dcx ( ) . emit_err ( errors:: DeleteOld { name, path : path_buf, err } ) ;
60
- return ;
59
+ sess. dcx ( ) . emit_fatal ( errors:: DeleteOld { name, path : path_buf, err } ) ;
61
60
}
62
61
}
63
62
64
63
let mut encoder = match FileEncoder :: new ( & path_buf) {
65
64
Ok ( encoder) => encoder,
66
65
Err ( err) => {
67
- sess. dcx ( ) . emit_err ( errors:: CreateNew { name, path : path_buf, err } ) ;
68
- return ;
66
+ sess. dcx ( ) . emit_fatal ( errors:: CreateNew { name, path : path_buf, err } ) ;
69
67
}
70
68
} ;
71
69
81
79
debug ! ( "save: data written to disk successfully" ) ;
82
80
}
83
81
Err ( ( path, err) ) => {
84
- sess. dcx ( ) . emit_err ( errors:: WriteNew { name, path, err } ) ;
82
+ sess. dcx ( ) . emit_fatal ( errors:: WriteNew { name, path, err } ) ;
85
83
}
86
84
}
87
85
}
Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ impl Compiler {
332
332
// the global context.
333
333
_timer = Some ( self . sess . timer ( "free_global_ctxt" ) ) ;
334
334
if let Err ( ( path, error) ) = queries. finish ( ) {
335
- self . sess . dcx ( ) . emit_err ( errors:: FailedWritingFile { path : & path, error } ) ;
335
+ self . sess . dcx ( ) . emit_fatal ( errors:: FailedWritingFile { path : & path, error } ) ;
336
336
}
337
337
338
338
ret
Original file line number Diff line number Diff line change @@ -2241,12 +2241,12 @@ pub fn encode_metadata(tcx: TyCtxt<'_>, path: &Path) {
2241
2241
// If we forget this, compilation can succeed with an incomplete rmeta file,
2242
2242
// causing an ICE when the rmeta file is read by another compilation.
2243
2243
if let Err ( ( path, err) ) = ecx. opaque . finish ( ) {
2244
- tcx. dcx ( ) . emit_err ( FailWriteFile { path : & path, err } ) ;
2244
+ tcx. dcx ( ) . emit_fatal ( FailWriteFile { path : & path, err } ) ;
2245
2245
}
2246
2246
2247
2247
let file = ecx. opaque . file ( ) ;
2248
2248
if let Err ( err) = encode_root_position ( file, root. position . get ( ) ) {
2249
- tcx. dcx ( ) . emit_err ( FailWriteFile { path : ecx. opaque . path ( ) , err } ) ;
2249
+ tcx. dcx ( ) . emit_fatal ( FailWriteFile { path : ecx. opaque . path ( ) , err } ) ;
2250
2250
}
2251
2251
2252
2252
// Record metadata size for self-profiling
You can’t perform that action at this time.
0 commit comments