Skip to content

Commit

Permalink
rustc_metadata: don't die with --test because CFG_VERSION is missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Sep 20, 2016
1 parent a23b8ca commit 564f2ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/librustc_metadata/schema.rs
Expand Up @@ -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`.
Expand Down

0 comments on commit 564f2ee

Please sign in to comment.