diff options
| author | bors <bors@rust-lang.org> | 2016-03-10 20:37:04 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-03-10 20:37:04 -0800 |
| commit | 2b9438a4ecac26fa9c4bcdf5957bd97eb07f17dc (patch) | |
| tree | 367900eef40f59b1615ad66d248ddd5cae289965 | |
| parent | c6a6053112122451bcb39f8d24d6cc86f5a28536 (diff) | |
| parent | fd4e7a0e1a0b027465c4ea8a652f0166d2b4df85 (diff) | |
| download | rust-2b9438a4ecac26fa9c4bcdf5957bd97eb07f17dc.tar.gz rust-2b9438a4ecac26fa9c4bcdf5957bd97eb07f17dc.zip | |
Auto merge of #32121 - GuillaumeGomez:help_e0514, r=cmr
Add help for E0514 I fixed #30622. r? @arielb1
| -rw-r--r-- | src/librustc_metadata/creader.rs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/librustc_metadata/creader.rs b/src/librustc_metadata/creader.rs index 35d7a0d4b9c..d05728d11cd 100644 --- a/src/librustc_metadata/creader.rs +++ b/src/librustc_metadata/creader.rs @@ -259,14 +259,16 @@ impl<'a> CrateReader<'a> { metadata: &MetadataBlob) { let crate_rustc_version = decoder::crate_rustc_version(metadata.as_slice()); if crate_rustc_version != Some(rustc_version()) { - span_fatal!(self.sess, span, E0514, - "the crate `{}` has been compiled with {}, which is \ - incompatible with this version of rustc", - name, - crate_rustc_version - .as_ref().map(|s| &**s) - .unwrap_or("an old version of rustc") - ); + let mut err = struct_span_fatal!(self.sess, span, E0514, + "the crate `{}` has been compiled with {}, which is \ + incompatible with this version of rustc", + name, + crate_rustc_version + .as_ref().map(|s| &**s) + .unwrap_or("an old version of rustc")); + err.fileline_help(span, "consider removing the compiled binaries and recompiling \ + with your current version of rustc"); + err.emit(); } } |
