1
Fork 0

rustc_metadata: don't die with --test because CFG_VERSION is missing.

This commit is contained in:
Eduard Burtescu 2016-09-18 14:05:49 +03:00
parent a23b8cafec
commit 564f2ee33c

View file

@ -26,8 +26,12 @@ use syntax_pos::{self, Span};
use std::marker::PhantomData;
#[cfg(not(test))]
pub const RUSTC_VERSION: &'static str = concat!("rustc ", env!("CFG_VERSION"));
#[cfg(test)]
pub const RUSTC_VERSION: &'static str = "rustc 0.0.0-unit-test";
/// Metadata encoding version.
/// NB: increment this if you change the format of metadata such that
/// the rustc version can't be found to compare with `RUSTC_VERSION`.