diff --git a/Cargo.lock b/Cargo.lock index b5ca27a38..cc08e3f2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,7 +3,7 @@ name = "cargo" version = "0.1.0" dependencies = [ "curl 0.1.0 (git+https://github.com/carllerche/curl-rust)", - "docopt 0.6.12 (git+https://github.com/docopt/docopt.rs)", + "docopt 0.6.13 (git+https://github.com/docopt/docopt.rs)", "flate2 0.1.0 (git+https://github.com/alexcrichton/flate2-rs)", "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs)", "glob 0.1.0 (git+https://github.com/rust-lang/glob)", @@ -11,24 +11,24 @@ dependencies = [ "registry 0.1.0", "semver 0.1.3 (git+https://github.com/rust-lang/semver)", "tar 0.1.0 (git+https://github.com/alexcrichton/tar-rs)", - "time 0.1.0 (git+https://github.com/rust-lang/time)", - "toml 0.1.2 (git+https://github.com/alexcrichton/toml-rs)", - "url 0.1.0 (git+https://github.com/servo/rust-url)", + "time 0.1.1 (git+https://github.com/rust-lang/time)", + "toml 0.1.4 (git+https://github.com/alexcrichton/toml-rs)", + "url 0.2.2 (git+https://github.com/servo/rust-url)", ] [[package]] name = "curl" version = "0.1.0" -source = "git+https://github.com/carllerche/curl-rust#5d0f5c8848e3cf1e12480a1923ae888e24d58f63" +source = "git+https://github.com/carllerche/curl-rust#6f007b4967ec12e36937dcb081abe0bdb3bcc508" dependencies = [ "curl-sys 0.1.0 (git+https://github.com/carllerche/curl-rust)", - "url 0.1.0 (git+https://github.com/servo/rust-url)", + "url 0.2.2 (git+https://github.com/servo/rust-url)", ] [[package]] name = "curl-sys" version = "0.1.0" -source = "git+https://github.com/carllerche/curl-rust#5d0f5c8848e3cf1e12480a1923ae888e24d58f63" +source = "git+https://github.com/carllerche/curl-rust#6f007b4967ec12e36937dcb081abe0bdb3bcc508" dependencies = [ "libz-sys 0.1.0 (git+https://github.com/alexcrichton/libz-sys)", "openssl-sys 0.2.2 (git+https://github.com/sfackler/rust-openssl)", @@ -37,13 +37,13 @@ dependencies = [ [[package]] name = "docopt" -version = "0.6.12" -source = "git+https://github.com/docopt/docopt.rs#938d640720d91529252adddc79d020714cba7346" +version = "0.6.13" +source = "git+https://github.com/docopt/docopt.rs#38cc4572bef4dc5cbcb7526500aa14d1898c426d" [[package]] name = "flate2" version = "0.1.0" -source = "git+https://github.com/alexcrichton/flate2-rs#861f52e4c71681f96605dd65cb7c1c9f6e6ecc3c" +source = "git+https://github.com/alexcrichton/flate2-rs#5cf5e4f57166053590a7f63507f65da72d4e74eb" dependencies = [ "miniz-sys 0.1.0 (git+https://github.com/alexcrichton/flate2-rs)", ] @@ -51,7 +51,7 @@ dependencies = [ [[package]] name = "gcc" version = "0.1.0" -source = "git+https://github.com/alexcrichton/gcc-rs#d32b24466d3e0094cef1c1809a04d7a28536f0e0" +source = "git+https://github.com/alexcrichton/gcc-rs#3caf7309ef72644cd56a9d3a6f515ae553683176" [[package]] name = "gcc" @@ -61,17 +61,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "git2" version = "0.0.1" -source = "git+https://github.com/alexcrichton/git2-rs#a20191dde5d482debb90b5913f03a58ca73720e2" +source = "git+https://github.com/alexcrichton/git2-rs#53785d74f5199455501c4ece0c9dd325a01db894" dependencies = [ "libgit2-sys 0.0.1 (git+https://github.com/alexcrichton/git2-rs)", - "time 0.1.0 (git+https://github.com/rust-lang/time)", - "url 0.1.0 (git+https://github.com/servo/rust-url)", + "time 0.1.1 (git+https://github.com/rust-lang/time)", + "url 0.2.2 (git+https://github.com/servo/rust-url)", ] [[package]] name = "glob" version = "0.1.0" -source = "git+https://github.com/rust-lang/glob#923126289064ded89f028d14dc2f28bb347ae178" +source = "git+https://github.com/rust-lang/glob#6b26e61315196f198ce9f6553912c0378e399153" [[package]] name = "hamcrest" @@ -81,7 +81,7 @@ source = "git+https://github.com/carllerche/hamcrest-rust.git#2b9bd6cdae5dcf08ac [[package]] name = "libgit2-sys" version = "0.0.1" -source = "git+https://github.com/alexcrichton/git2-rs#a20191dde5d482debb90b5913f03a58ca73720e2" +source = "git+https://github.com/alexcrichton/git2-rs#53785d74f5199455501c4ece0c9dd325a01db894" dependencies = [ "libssh2-sys 0.0.1 (git+https://github.com/alexcrichton/ssh2-rs)", "openssl-sys 0.2.2 (git+https://github.com/sfackler/rust-openssl)", @@ -91,7 +91,7 @@ dependencies = [ [[package]] name = "libssh2-sys" version = "0.0.1" -source = "git+https://github.com/alexcrichton/ssh2-rs#490f91fb9e90bf4e305f1a23a051228c59e60eaf" +source = "git+https://github.com/alexcrichton/ssh2-rs#982dc47a45a5a2d66ea092ee6bb9503ddcbf36d9" dependencies = [ "libz-sys 0.1.0 (git+https://github.com/alexcrichton/libz-sys)", "openssl-sys 0.2.2 (git+https://github.com/sfackler/rust-openssl)", @@ -101,15 +101,15 @@ dependencies = [ [[package]] name = "libz-sys" version = "0.1.0" -source = "git+https://github.com/alexcrichton/libz-sys#5622ae17a0262af56055b71f0d74fa5ee91d3a41" +source = "git+https://github.com/alexcrichton/libz-sys#6c19f1309966ce5959ec0472a4730f457136f687" dependencies = [ - "pkg-config 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.1.0 (git+https://github.com/alexcrichton/pkg-config-rs)", ] [[package]] name = "miniz-sys" version = "0.1.0" -source = "git+https://github.com/alexcrichton/flate2-rs#861f52e4c71681f96605dd65cb7c1c9f6e6ecc3c" +source = "git+https://github.com/alexcrichton/flate2-rs#5cf5e4f57166053590a7f63507f65da72d4e74eb" dependencies = [ "gcc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -117,7 +117,7 @@ dependencies = [ [[package]] name = "openssl-sys" version = "0.2.2" -source = "git+https://github.com/sfackler/rust-openssl#fd680e8a336f8870a411a3047c45b47ee72beb37" +source = "git+https://github.com/sfackler/rust-openssl#6cdd2cf577434ca3473c217e8a272ee965ef131f" dependencies = [ "pkg-config 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -142,28 +142,28 @@ dependencies = [ [[package]] name = "semver" version = "0.1.3" -source = "git+https://github.com/rust-lang/semver#29212953f839337c672d185dde74e14b5dfb1f46" +source = "git+https://github.com/rust-lang/semver#9ea3324350693954d3e5d10d43e240db224deff9" [[package]] name = "tar" version = "0.1.0" -source = "git+https://github.com/alexcrichton/tar-rs#d54cc716e6d809498941f38d8ab0759543402abe" +source = "git+https://github.com/alexcrichton/tar-rs#c431eeae10c0ad008a252127ffa599df5ab2c0ca" [[package]] name = "time" -version = "0.1.0" -source = "git+https://github.com/rust-lang/time#afab521f3b91658a3ba2d3e877b7e01699733bef" +version = "0.1.1" +source = "git+https://github.com/rust-lang/time#c1c02adb74c6d9424541ae88ceb61de698b10eeb" dependencies = [ "gcc 0.1.0 (git+https://github.com/alexcrichton/gcc-rs)", ] [[package]] name = "toml" -version = "0.1.2" -source = "git+https://github.com/alexcrichton/toml-rs#1e35b001094b20d2452adff305e418591d4000fb" +version = "0.1.4" +source = "git+https://github.com/alexcrichton/toml-rs#25e10a82565d81b5243304c835d868a12b179557" [[package]] name = "url" -version = "0.1.0" -source = "git+https://github.com/servo/rust-url#9f05a0108025a1c9002e8977a42dce764895d170" +version = "0.2.2" +source = "git+https://github.com/servo/rust-url#bdda3a7bb946e5f85dd3daeefb54c06fffa8350c" diff --git a/src/cargo/lib.rs b/src/cargo/lib.rs index 54269d2b0..e2b99336e 100644 --- a/src/cargo/lib.rs +++ b/src/cargo/lib.rs @@ -3,7 +3,6 @@ #![feature(macro_rules, phase)] #![feature(default_type_params)] -#![feature(if_let)] #![deny(bad_style)] extern crate libc; diff --git a/src/cargo/ops/lockfile.rs b/src/cargo/ops/lockfile.rs index 631ad09ad..5b914e4f1 100644 --- a/src/cargo/ops/lockfile.rs +++ b/src/cargo/ops/lockfile.rs @@ -22,7 +22,7 @@ pub fn load_lockfile(path: &Path, sid: &SourceId) -> CargoResult let s = try!(f.read_to_string()); - let table = toml::Table(try!(cargo_toml::parse(s.as_slice(), path))); + let table = toml::Value::Table(try!(cargo_toml::parse(s.as_slice(), path))); let mut d = toml::Decoder::new(table); let v: resolver::EncodableResolve = Decodable::decode(&mut d).unwrap(); Ok(Some(try!(v.to_resolve(sid)))) @@ -67,7 +67,7 @@ pub fn write_lockfile(dst: &Path, resolve: &Resolve) -> CargoResult<()> { Ok(()) } -fn emit_package(dep: &toml::TomlTable, out: &mut String) { +fn emit_package(dep: &toml::Table, out: &mut String) { out.push_str(format!("name = {}\n", lookup(dep, "name")).as_slice()); out.push_str(format!("version = {}\n", lookup(dep, "version")).as_slice()); @@ -91,6 +91,6 @@ fn emit_package(dep: &toml::TomlTable, out: &mut String) { } } -fn lookup<'a>(table: &'a toml::TomlTable, key: &str) -> &'a toml::Value { +fn lookup<'a>(table: &'a toml::Table, key: &str) -> &'a toml::Value { table.get(&key.to_string()).expect(format!("Didn't find {}", key).as_slice()) } diff --git a/src/cargo/util/config.rs b/src/cargo/util/config.rs index c7f070388..840af09e0 100644 --- a/src/cargo/util/config.rs +++ b/src/cargo/util/config.rs @@ -146,17 +146,17 @@ impl> Encodable for ConfigValue { impl ConfigValue { fn from_toml(path: &Path, toml: toml::Value) -> CargoResult { match toml { - toml::String(val) => Ok(CV::String(val, path.clone())), - toml::Boolean(b) => Ok(CV::Boolean(b, path.clone())), - toml::Array(val) => { + toml::Value::String(val) => Ok(CV::String(val, path.clone())), + toml::Value::Boolean(b) => Ok(CV::Boolean(b, path.clone())), + toml::Value::Array(val) => { Ok(CV::List(try!(val.into_iter().map(|toml| { match toml { - toml::String(val) => Ok((val, path.clone())), + toml::Value::String(val) => Ok((val, path.clone())), _ => Err(internal("")), } }).collect::>()))) } - toml::Table(val) => { + toml::Value::Table(val) => { Ok(CV::Table(try!(val.into_iter().map(|(key, value)| { let value = raw_try!(CV::from_toml(path, value)); Ok((key, value)) @@ -235,13 +235,15 @@ impl ConfigValue { fn into_toml(self) -> toml::Value { match self { - CV::Boolean(s, _) => toml::Boolean(s), - CV::String(s, _) => toml::String(s), - CV::List(l) => toml::Array(l.into_iter().map(|(s, _)| toml::String(s)) - .collect()), - CV::Table(l) => toml::Table(l.into_iter() - .map(|(k, v)| (k, v.into_toml())) - .collect()), + CV::Boolean(s, _) => toml::Value::Boolean(s), + CV::String(s, _) => toml::Value::String(s), + CV::List(l) => toml::Value::Array(l + .into_iter() + .map(|(s, _)| toml::Value::String(s)) + .collect()), + CV::Table(l) => toml::Value::Table(l.into_iter() + .map(|(k, v)| (k, v.into_toml())) + .collect()), } } } @@ -261,7 +263,7 @@ pub fn all_configs(pwd: Path) -> CargoResult t, Err(e) => return Err(human(format!("{} is not a valid \ @@ -128,7 +128,7 @@ pub fn to_manifest(contents: &[u8], fn add_unused_keys(m: &mut Manifest, toml: &toml::Value, key: String) { match *toml { - toml::Table(ref table) => { + toml::Value::Table(ref table) => { for (k, v) in table.iter() { add_unused_keys(m, v, if key.len() == 0 { k.clone() @@ -137,7 +137,7 @@ pub fn to_manifest(contents: &[u8], }) } } - toml::Array(ref arr) => { + toml::Value::Array(ref arr) => { for v in arr.iter() { add_unused_keys(m, v, key.clone()); } @@ -147,7 +147,7 @@ pub fn to_manifest(contents: &[u8], } } -pub fn parse(toml: &str, file: &Path) -> CargoResult { +pub fn parse(toml: &str, file: &Path) -> CargoResult { let mut parser = toml::Parser::new(toml.as_slice()); match parser.parse() { Some(toml) => return Ok(toml), diff --git a/src/rustversion.txt b/src/rustversion.txt index d0f00f0d5..1ff25f20e 100644 --- a/src/rustversion.txt +++ b/src/rustversion.txt @@ -1 +1 @@ -2014-12-02 +2014-12-06