rustc_metadata: don't die with --test because CFG_VERSION is missing.
This commit is contained in:
parent
a23b8cafec
commit
564f2ee33c
1 changed files with 4 additions and 0 deletions
|
@ -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`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue