From: Manish Goregaokar Date: Mon, 5 Feb 2018 15:28:17 +0000 (-0500) Subject: Feature gate epoches X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~3^2~10^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fa5be237c5268810c1a677a28a21fa227d0a54a7;p=cargo.git Feature gate epoches --- diff --git a/src/cargo/core/features.rs b/src/cargo/core/features.rs index 30c2b433f..10597e55e 100644 --- a/src/cargo/core/features.rs +++ b/src/cargo/core/features.rs @@ -146,6 +146,9 @@ features! { // Downloading packages from alternative registry indexes. [unstable] alternative_registries: bool, + + // Using epochs + [unstable] epoch: bool, } } diff --git a/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs index d2e47a692..623d794af 100644 --- a/src/cargo/util/toml/mod.rs +++ b/src/cargo/util/toml/mod.rs @@ -718,6 +718,9 @@ impl TomlManifest { }; let epoch = if let Some(ref epoch) = project.epoch { + features.require(Feature::epoch()).chain_err(|| { + "epoches are unstable" + })?; if let Ok(epoch) = epoch.parse() { epoch } else {