|
213 | 213 | //! metadata::loader or metadata::creader for all the juicy details!
|
214 | 214 |
|
215 | 215 | use cstore::MetadataBlob;
|
216 |
| -use schema::{METADATA_HEADER, RUSTC_VERSION}; |
| 216 | +use schema::{METADATA_HEADER, rustc_version}; |
217 | 217 |
|
218 | 218 | use rustc::hir::svh::Svh;
|
219 | 219 | use rustc::session::Session;
|
@@ -382,7 +382,7 @@ impl<'a> Context<'a> {
|
382 | 382 | }
|
383 | 383 | if !self.rejected_via_version.is_empty() {
|
384 | 384 | err.help(&format!("please recompile that crate using this compiler ({})",
|
385 |
| - RUSTC_VERSION)); |
| 385 | + rustc_version())); |
386 | 386 | let mismatches = self.rejected_via_version.iter();
|
387 | 387 | for (i, &CrateMismatch { ref path, ref got }) in mismatches.enumerate() {
|
388 | 388 | err.note(&format!("crate `{}` path #{}: {} compiled by {:?}",
|
@@ -597,9 +597,10 @@ impl<'a> Context<'a> {
|
597 | 597 |
|
598 | 598 | fn crate_matches(&mut self, metadata: &MetadataBlob, libpath: &Path) -> Option<Svh> {
|
599 | 599 | let root = metadata.get_root();
|
600 |
| - if root.rustc_version != RUSTC_VERSION { |
| 600 | + let rustc_version = rustc_version(); |
| 601 | + if root.rustc_version != rustc_version { |
601 | 602 | info!("Rejecting via version: expected {} got {}",
|
602 |
| - RUSTC_VERSION, root.rustc_version); |
| 603 | + rustc_version, root.rustc_version); |
603 | 604 | self.rejected_via_version.push(CrateMismatch {
|
604 | 605 | path: libpath.to_path_buf(),
|
605 | 606 | got: root.rustc_version
|
|
0 commit comments