File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -259,14 +259,16 @@ impl<'a> CrateReader<'a> {
259
259
metadata : & MetadataBlob ) {
260
260
let crate_rustc_version = decoder:: crate_rustc_version ( metadata. as_slice ( ) ) ;
261
261
if crate_rustc_version != Some ( rustc_version ( ) ) {
262
- span_fatal ! ( self . sess, span, E0514 ,
263
- "the crate `{}` has been compiled with {}, which is \
264
- incompatible with this version of rustc",
265
- name,
266
- crate_rustc_version
267
- . as_ref( ) . map( |s| & * * s)
268
- . unwrap_or( "an old version of rustc" )
269
- ) ;
262
+ let mut err = struct_span_fatal ! ( self . sess, span, E0514 ,
263
+ "the crate `{}` has been compiled with {}, which is \
264
+ incompatible with this version of rustc",
265
+ name,
266
+ crate_rustc_version
267
+ . as_ref( ) . map( |s| & * * s)
268
+ . unwrap_or( "an old version of rustc" ) ) ;
269
+ err. fileline_help ( span, "consider removing the compiled binaries and recompiling \
270
+ with your current version of rustc") ;
271
+ err. emit ( ) ;
270
272
}
271
273
}
272
274
You can’t perform that action at this time.
0 commit comments