From 270f6e28a028fd8b24b56c17fb509ab275860612 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Tue, 6 Feb 2018 09:33:30 -0800 Subject: [PATCH] epoch -> rust --- src/cargo/util/toml/mod.rs | 6 +++--- tests/package.rs | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cargo/util/toml/mod.rs b/src/cargo/util/toml/mod.rs index e66ac74943b..c33aaef93e9 100644 --- a/src/cargo/util/toml/mod.rs +++ b/src/cargo/util/toml/mod.rs @@ -441,7 +441,7 @@ pub struct TomlProject { license_file: Option, repository: Option, metadata: Option, - epoch: Option, + rust: Option, } #[derive(Debug, Deserialize, Serialize)] @@ -717,14 +717,14 @@ impl TomlManifest { None | Some(VecStringOrBool::Bool(true)) => None, }; - let epoch = if let Some(ref epoch) = project.epoch { + let epoch = if let Some(ref epoch) = project.rust { features.require(Feature::epoch()).chain_err(|| { "epoches are unstable" })?; if let Ok(epoch) = epoch.parse() { epoch } else { - bail!("the `epoch` key must be one of: `2015`, `2018`") + bail!("the `rust` key must be one of: `2015`, `2018`") } } else { Epoch::Epoch2015 diff --git a/tests/package.rs b/tests/package.rs index 4f10b9e531e..f49a56193aa 100644 --- a/tests/package.rs +++ b/tests/package.rs @@ -897,7 +897,7 @@ fn test_epoch() { name = "foo" version = "0.0.1" authors = [] - epoch = "2018" + rust = "2018" "#) .file("src/lib.rs", r#" "#) .build(); @@ -957,7 +957,7 @@ fn test_epoch_malformed() { name = "foo" version = "0.0.1" authors = [] - epoch = "chicken" + rust = "chicken" "#) .file("src/lib.rs", r#" "#) .build(); @@ -970,7 +970,7 @@ fn test_epoch_malformed() { error: failed to parse manifest at `[..]` Caused by: - the `epoch` key must be one of: `2015`, `2018` + the `rust` key must be one of: `2015`, `2018` "))); } @@ -983,7 +983,7 @@ fn test_epoch_nightly() { name = "foo" version = "0.0.1" authors = [] - epoch = "2015" + rust = "2015" "#) .file("src/lib.rs", r#" "#) .build();