Skip to content

Commit 270f6e2

Browse files
committed
epoch -> rust
1 parent 5d615a6 commit 270f6e2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/cargo/util/toml/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ pub struct TomlProject {
441441
license_file: Option<String>,
442442
repository: Option<String>,
443443
metadata: Option<toml::Value>,
444-
epoch: Option<String>,
444+
rust: Option<String>,
445445
}
446446

447447
#[derive(Debug, Deserialize, Serialize)]
@@ -717,14 +717,14 @@ impl TomlManifest {
717717
None | Some(VecStringOrBool::Bool(true)) => None,
718718
};
719719

720-
let epoch = if let Some(ref epoch) = project.epoch {
720+
let epoch = if let Some(ref epoch) = project.rust {
721721
features.require(Feature::epoch()).chain_err(|| {
722722
"epoches are unstable"
723723
})?;
724724
if let Ok(epoch) = epoch.parse() {
725725
epoch
726726
} else {
727-
bail!("the `epoch` key must be one of: `2015`, `2018`")
727+
bail!("the `rust` key must be one of: `2015`, `2018`")
728728
}
729729
} else {
730730
Epoch::Epoch2015

tests/package.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ fn test_epoch() {
897897
name = "foo"
898898
version = "0.0.1"
899899
authors = []
900-
epoch = "2018"
900+
rust = "2018"
901901
"#)
902902
.file("src/lib.rs", r#" "#)
903903
.build();
@@ -957,7 +957,7 @@ fn test_epoch_malformed() {
957957
name = "foo"
958958
version = "0.0.1"
959959
authors = []
960-
epoch = "chicken"
960+
rust = "chicken"
961961
"#)
962962
.file("src/lib.rs", r#" "#)
963963
.build();
@@ -970,7 +970,7 @@ fn test_epoch_malformed() {
970970
error: failed to parse manifest at `[..]`
971971
972972
Caused by:
973-
the `epoch` key must be one of: `2015`, `2018`
973+
the `rust` key must be one of: `2015`, `2018`
974974
")));
975975
}
976976

@@ -983,7 +983,7 @@ fn test_epoch_nightly() {
983983
name = "foo"
984984
version = "0.0.1"
985985
authors = []
986-
epoch = "2015"
986+
rust = "2015"
987987
"#)
988988
.file("src/lib.rs", r#" "#)
989989
.build();

0 commit comments

Comments
 (0)