epoch -> rust
authorManish Goregaokar <manishsmail@gmail.com>
Tue, 6 Feb 2018 17:33:30 +0000 (09:33 -0800)
committerManish Goregaokar <manishsmail@gmail.com>
Tue, 6 Feb 2018 17:33:30 +0000 (09:33 -0800)
src/cargo/util/toml/mod.rs
tests/package.rs

index e66ac74943b8f4e2acbf20f1537488c192baf155..c33aaef93e9af27e906f671a12e756998e654068 100644 (file)
@@ -441,7 +441,7 @@ pub struct TomlProject {
     license_file: Option<String>,
     repository: Option<String>,
     metadata: Option<toml::Value>,
-    epoch: Option<String>,
+    rust: Option<String>,
 }
 
 #[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
index 4f10b9e531ebe6910c8d563c08d8cc312925198d..f49a56193aac98b6e6d7a329324f357c260d3f4f 100644 (file)
@@ -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();