[rust] Bump flate2 crate

This updates flate2 to 1.0.5, and adds the flate2-crc crate.

OSRB-104 #comment

Change-Id: Iee1777c668a3d505881ee52d1f4ca4836877b63b
diff --git a/rustc_deps/Cargo.lock b/rustc_deps/Cargo.lock
index 3e7ec90..3919854 100644
--- a/rustc_deps/Cargo.lock
+++ b/rustc_deps/Cargo.lock
@@ -366,14 +366,23 @@
 
 [[package]]
 name = "flate2"
-version = "1.0.4"
+version = "1.0.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
+ "flate2-crc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
+name = "flate2-crc"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
 name = "fnv"
 version = "1.0.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -403,7 +412,6 @@
  "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.19.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "font-rs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures-preview 0.3.0-alpha.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -431,7 +439,6 @@
  "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
  "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "structopt 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
- "structopt-derive 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
  "tempfile 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
  "timebomb 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1285,7 +1292,7 @@
 dependencies = [
  "bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "flate2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "plist 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1688,7 +1695,8 @@
 "checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596"
 "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
 "checksum filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a2df5c1a8c4be27e7707789dc42ae65976e60b394afd293d1419ab915833e646"
-"checksum flate2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3b0c7353385f92079524de3b7116cf99d73947c08a7472774e9b3b04bff3b901"
+"checksum flate2 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96971e4fc2737f211ec8236fe16ac67695838ca3e25567c07b4f837d1f8f829c"
+"checksum flate2-crc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8a792245eaed7747984647ce20582507985d69ccfacdddcb60bd5f451f21cbc5"
 "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
 "checksum font-rs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "33939d997b0ef798cc92c9cc49a535c9b085273e121cc8e8281561be1fd76cd2"
 "checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b"
diff --git a/rustc_deps/vendor/flate2-crc/.cargo-checksum.json b/rustc_deps/vendor/flate2-crc/.cargo-checksum.json
new file mode 100644
index 0000000..b8f8ab6
--- /dev/null
+++ b/rustc_deps/vendor/flate2-crc/.cargo-checksum.json
@@ -0,0 +1 @@
+{"files":{"Cargo.toml":"8855f9734e2c24c389e7a155edfda024bfc8654726667b9b694f78b7a2ef45bb","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","benches/run.rs":"bfacfe2570ca6daa0f9230b3de2b230ea2fafdbd48f5aaaac4d36318ef0c945d","build.rs":"4c6a55c1f60513c05d3d67c24615ab6ad0b3390a10776129e4b8eed3bc2469c4","src/lib.rs":"2029d7cad8513210a25162454b001927ced3a6806df2b6c4e943402971ac0086","src/other.rs":"5eecec3f2b8a40d6be837344375a4c2a862a3f1419e38e967c2ddf4e37376334","src/x86.rs":"2ac945cff18771604debdb4f82c04f62f0a7b56e138a437911172aadc73acbf9"},"package":"8a792245eaed7747984647ce20582507985d69ccfacdddcb60bd5f451f21cbc5"}
\ No newline at end of file
diff --git a/rustc_deps/vendor/flate2-crc/Cargo.toml b/rustc_deps/vendor/flate2-crc/Cargo.toml
new file mode 100644
index 0000000..0f9c08f
--- /dev/null
+++ b/rustc_deps/vendor/flate2-crc/Cargo.toml
@@ -0,0 +1,37 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
+[package]
+name = "flate2-crc"
+version = "0.1.1"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+description = "SIMD acceleration for CRC-32 checksums used in the gzip format\n"
+homepage = "https://github.com/alexcrichton/flate2-rs"
+documentation = "https://docs.rs/flate2-crc"
+license = "MIT/Apache-2.0"
+repository = "https://github.com/alexcrichton/flate2-rs/tree/flate2-crc"
+[dependencies.cfg-if]
+version = "0.1.6"
+[dev-dependencies.libz-sys]
+version = "1.0"
+
+[dev-dependencies.miniz-sys]
+version = "0.1"
+
+[dev-dependencies.quickcheck]
+version = "0.7"
+
+[dev-dependencies.rand]
+version = "0.6"
+
+[dev-dependencies.rayon]
+version = "1.0.3"
diff --git a/rustc_deps/vendor/flate2-crc/LICENSE-APACHE b/rustc_deps/vendor/flate2-crc/LICENSE-APACHE
new file mode 100644
index 0000000..16fe87b
--- /dev/null
+++ b/rustc_deps/vendor/flate2-crc/LICENSE-APACHE
@@ -0,0 +1,201 @@
+                              Apache License
+                        Version 2.0, January 2004
+                     http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   "License" shall mean the terms and conditions for use, reproduction,
+   and distribution as defined by Sections 1 through 9 of this document.
+
+   "Licensor" shall mean the copyright owner or entity authorized by
+   the copyright owner that is granting the License.
+
+   "Legal Entity" shall mean the union of the acting entity and all
+   other entities that control, are controlled by, or are under common
+   control with that entity. For the purposes of this definition,
+   "control" means (i) the power, direct or indirect, to cause the
+   direction or management of such entity, whether by contract or
+   otherwise, or (ii) ownership of fifty percent (50%) or more of the
+   outstanding shares, or (iii) beneficial ownership of such entity.
+
+   "You" (or "Your") shall mean an individual or Legal Entity
+   exercising permissions granted by this License.
+
+   "Source" form shall mean the preferred form for making modifications,
+   including but not limited to software source code, documentation
+   source, and configuration files.
+
+   "Object" form shall mean any form resulting from mechanical
+   transformation or translation of a Source form, including but
+   not limited to compiled object code, generated documentation,
+   and conversions to other media types.
+
+   "Work" shall mean the work of authorship, whether in Source or
+   Object form, made available under the License, as indicated by a
+   copyright notice that is included in or attached to the work
+   (an example is provided in the Appendix below).
+
+   "Derivative Works" shall mean any work, whether in Source or Object
+   form, that is based on (or derived from) the Work and for which the
+   editorial revisions, annotations, elaborations, or other modifications
+   represent, as a whole, an original work of authorship. For the purposes
+   of this License, Derivative Works shall not include works that remain
+   separable from, or merely link (or bind by name) to the interfaces of,
+   the Work and Derivative Works thereof.
+
+   "Contribution" shall mean any work of authorship, including
+   the original version of the Work and any modifications or additions
+   to that Work or Derivative Works thereof, that is intentionally
+   submitted to Licensor for inclusion in the Work by the copyright owner
+   or by an individual or Legal Entity authorized to submit on behalf of
+   the copyright owner. For the purposes of this definition, "submitted"
+   means any form of electronic, verbal, or written communication sent
+   to the Licensor or its representatives, including but not limited to
+   communication on electronic mailing lists, source code control systems,
+   and issue tracking systems that are managed by, or on behalf of, the
+   Licensor for the purpose of discussing and improving the Work, but
+   excluding communication that is conspicuously marked or otherwise
+   designated in writing by the copyright owner as "Not a Contribution."
+
+   "Contributor" shall mean Licensor and any individual or Legal Entity
+   on behalf of whom a Contribution has been received by Licensor and
+   subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   copyright license to reproduce, prepare Derivative Works of,
+   publicly display, publicly perform, sublicense, and distribute the
+   Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   (except as stated in this section) patent license to make, have made,
+   use, offer to sell, sell, import, and otherwise transfer the Work,
+   where such license applies only to those patent claims licensable
+   by such Contributor that are necessarily infringed by their
+   Contribution(s) alone or by combination of their Contribution(s)
+   with the Work to which such Contribution(s) was submitted. If You
+   institute patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Work
+   or a Contribution incorporated within the Work constitutes direct
+   or contributory patent infringement, then any patent licenses
+   granted to You under this License for that Work shall terminate
+   as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+   Work or Derivative Works thereof in any medium, with or without
+   modifications, and in Source or Object form, provided that You
+   meet the following conditions:
+
+   (a) You must give any other recipients of the Work or
+       Derivative Works a copy of this License; and
+
+   (b) You must cause any modified files to carry prominent notices
+       stating that You changed the files; and
+
+   (c) You must retain, in the Source form of any Derivative Works
+       that You distribute, all copyright, patent, trademark, and
+       attribution notices from the Source form of the Work,
+       excluding those notices that do not pertain to any part of
+       the Derivative Works; and
+
+   (d) If the Work includes a "NOTICE" text file as part of its
+       distribution, then any Derivative Works that You distribute must
+       include a readable copy of the attribution notices contained
+       within such NOTICE file, excluding those notices that do not
+       pertain to any part of the Derivative Works, in at least one
+       of the following places: within a NOTICE text file distributed
+       as part of the Derivative Works; within the Source form or
+       documentation, if provided along with the Derivative Works; or,
+       within a display generated by the Derivative Works, if and
+       wherever such third-party notices normally appear. The contents
+       of the NOTICE file are for informational purposes only and
+       do not modify the License. You may add Your own attribution
+       notices within Derivative Works that You distribute, alongside
+       or as an addendum to the NOTICE text from the Work, provided
+       that such additional attribution notices cannot be construed
+       as modifying the License.
+
+   You may add Your own copyright statement to Your modifications and
+   may provide additional or different license terms and conditions
+   for use, reproduction, or distribution of Your modifications, or
+   for any such Derivative Works as a whole, provided Your use,
+   reproduction, and distribution of the Work otherwise complies with
+   the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+   any Contribution intentionally submitted for inclusion in the Work
+   by You to the Licensor shall be under the terms and conditions of
+   this License, without any additional terms or conditions.
+   Notwithstanding the above, nothing herein shall supersede or modify
+   the terms of any separate license agreement you may have executed
+   with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+   names, trademarks, service marks, or product names of the Licensor,
+   except as required for reasonable and customary use in describing the
+   origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+   agreed to in writing, Licensor provides the Work (and each
+   Contributor provides its Contributions) on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied, including, without limitation, any warranties or conditions
+   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+   PARTICULAR PURPOSE. You are solely responsible for determining the
+   appropriateness of using or redistributing the Work and assume any
+   risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+   whether in tort (including negligence), contract, or otherwise,
+   unless required by applicable law (such as deliberate and grossly
+   negligent acts) or agreed to in writing, shall any Contributor be
+   liable to You for damages, including any direct, indirect, special,
+   incidental, or consequential damages of any character arising as a
+   result of this License or out of the use or inability to use the
+   Work (including but not limited to damages for loss of goodwill,
+   work stoppage, computer failure or malfunction, or any and all
+   other commercial damages or losses), even if such Contributor
+   has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+   the Work or Derivative Works thereof, You may choose to offer,
+   and charge a fee for, acceptance of support, warranty, indemnity,
+   or other liability obligations and/or rights consistent with this
+   License. However, in accepting such obligations, You may act only
+   on Your own behalf and on Your sole responsibility, not on behalf
+   of any other Contributor, and only if You agree to indemnify,
+   defend, and hold each Contributor harmless for any liability
+   incurred by, or claims asserted against, such Contributor by reason
+   of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+   To apply the Apache License to your work, attach the following
+   boilerplate notice, with the fields enclosed by brackets "[]"
+   replaced with your own identifying information. (Don't include
+   the brackets!)  The text should be enclosed in the appropriate
+   comment syntax for the file format. We also recommend that a
+   file or class name and description of purpose be included on the
+   same "printed page" as the copyright notice for easier
+   identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+	http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/rustc_deps/vendor/flate2-crc/LICENSE-MIT b/rustc_deps/vendor/flate2-crc/LICENSE-MIT
new file mode 100644
index 0000000..39e0ed6
--- /dev/null
+++ b/rustc_deps/vendor/flate2-crc/LICENSE-MIT
@@ -0,0 +1,25 @@
+Copyright (c) 2014 Alex Crichton
+
+Permission is hereby granted, free of charge, to any
+person obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the
+Software without restriction, including without
+limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software
+is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice
+shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/rustc_deps/vendor/flate2-crc/benches/run.rs b/rustc_deps/vendor/flate2-crc/benches/run.rs
new file mode 100644
index 0000000..ae49130
--- /dev/null
+++ b/rustc_deps/vendor/flate2-crc/benches/run.rs
@@ -0,0 +1,69 @@
+#![feature(test)]
+
+extern crate flate2_crc;
+extern crate rand;
+extern crate test;
+extern crate miniz_sys;
+extern crate libz_sys;
+
+use rand::{thread_rng, RngCore};
+
+fn flate2_crc(data: &[u8]) -> u32 {
+    flate2_crc::Hardware::detect().calculate(0, data, |crc, data| {
+        unsafe {
+            miniz_sys::mz_crc32(crc as u64, data.as_ptr(), data.len()) as u32
+        }
+    })
+}
+
+fn miniz(data: &[u8]) -> u32 {
+    unsafe {
+        miniz_sys::mz_crc32(0, data.as_ptr(), data.len()) as u32
+    }
+}
+
+fn zlib(data: &[u8]) -> u32 {
+    unsafe {
+        libz_sys::crc32(0, data.as_ptr(), data.len() as u32) as u32
+    }
+}
+
+macro_rules! benches {
+    ($($f:ident => ($small:ident, $medium:ident, $large:ident),)*) => ($(
+        #[bench]
+        fn $small(b: &mut test::Bencher) {
+            let mut rng = thread_rng();
+            let mut buf = vec![0u8; 8];
+            rng.fill_bytes(&mut buf);
+
+            b.bytes = 8;
+            b.iter(|| $f(&buf));
+        }
+
+        #[bench]
+        fn $medium(b: &mut test::Bencher) {
+            let mut rng = thread_rng();
+            let mut buf = vec![0u8; 65_000];
+            rng.fill_bytes(&mut buf);
+
+            b.bytes = 65_000;
+            b.iter(|| $f(&buf));
+        }
+
+        #[bench]
+        fn $large(b: &mut test::Bencher) {
+            let mut rng = thread_rng();
+            let mut buf = vec![0u8; 1_000_000];
+            rng.fill_bytes(&mut buf);
+
+            b.bytes = 1_000_000;
+            b.iter(|| $f(&buf));
+        }
+    )*)
+}
+
+benches! {
+    flate2_crc => (flate2_crc_8, flate2_crc_65000, flate2_crc_1000000),
+    miniz => (miniz_8, miniz_65000, miniz_1000000),
+    zlib => (zlib_8, zlib_65000, zlib_1000000),
+}
diff --git a/rustc_deps/vendor/flate2-crc/build.rs b/rustc_deps/vendor/flate2-crc/build.rs
new file mode 100644
index 0000000..d035620
--- /dev/null
+++ b/rustc_deps/vendor/flate2-crc/build.rs
@@ -0,0 +1,36 @@
+use std::env;
+use std::process::Command;
+use std::str;
+
+fn main() {
+    println!("cargo:rerun-if-changed=build.rs");
+
+    let minor = match rustc_minor_version() {
+        Some(n) => n,
+        None => return,
+    };
+
+    if minor >= 27 {
+        println!("cargo:rustc-cfg=simd");
+    }
+}
+
+fn rustc_minor_version() -> Option<u32> {
+    macro_rules! otry {
+        ($e:expr) => {
+            match $e {
+                Some(e) => e,
+                None => return None,
+            }
+        };
+    }
+    let rustc = otry!(env::var_os("RUSTC"));
+    let output = otry!(Command::new(rustc).arg("--version").output().ok());
+    let version = otry!(str::from_utf8(&output.stdout).ok());
+    let mut pieces = version.split('.');
+    if pieces.next() != Some("rustc 1") {
+        return None;
+    }
+    otry!(pieces.next()).parse().ok()
+}
+
diff --git a/rustc_deps/vendor/flate2-crc/src/lib.rs b/rustc_deps/vendor/flate2-crc/src/lib.rs
new file mode 100644
index 0000000..f221519
--- /dev/null
+++ b/rustc_deps/vendor/flate2-crc/src/lib.rs
@@ -0,0 +1,103 @@
+// Note that this isn't really intended to be a user-facing crate, that's
+// `flate2::Crc`
+
+#[macro_use]
+extern crate cfg_if;
+
+#[cfg(test)]
+#[macro_use]
+extern crate quickcheck;
+
+cfg_if! {
+    if #[cfg(not(simd))] {
+        mod other;
+        use self::other as imp;
+    } else if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
+        mod x86;
+        use self::x86 as imp;
+    } else {
+        mod other;
+        use self::other as imp;
+    }
+}
+
+#[derive(Debug)]
+pub struct Hardware(bool);
+
+impl Hardware {
+    #[inline]
+    pub fn detect() -> Hardware {
+        Hardware(imp::detect())
+    }
+
+    #[inline]
+    pub fn calculate(
+        &self,
+        crc: u32,
+        data: &[u8],
+        fallback: fn(u32, &[u8]) -> u32,
+    ) -> u32 {
+        if self.0 {
+            unsafe { imp::calculate(crc, data, fallback) }
+        } else {
+            fallback(crc, data)
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    extern crate miniz_sys;
+    extern crate rand;
+    extern crate rayon;
+
+    use self::rand::Rng;
+    use self::rayon::prelude::*;
+    use super::Hardware;
+
+    fn fallback(a: u32, b: &[u8]) -> u32 {
+        unsafe {
+            miniz_sys::mz_crc32(a as _, b.as_ptr(), b.len()) as u32
+        }
+    }
+
+    fn random_chunks(iters: usize, lo: usize, hi: usize) {
+        let hardware = Hardware::detect();
+
+        (0..iters)
+            .into_par_iter()
+            .for_each_with(Vec::new(), |data, _| {
+                let mut rng = rand::thread_rng();
+                let init = rng.gen::<u32>();
+                let len = rng.gen_range(lo, hi);
+                data.resize(len, 0u8);
+                rng.fill(&mut data[..]);
+
+                assert_eq!(
+                    fallback(init, &data),
+                    hardware.calculate(init, &data, fallback),
+                );
+            });
+    }
+
+    #[test]
+    fn random_small() {
+        random_chunks(1000, 0, 256);
+    }
+
+    #[test]
+    fn random_med() {
+        random_chunks(1000, 256, 16 * 1024);
+    }
+
+    #[test]
+    fn random_large() {
+        random_chunks(1000, 0, 1024 * 1024);
+    }
+
+    quickcheck! {
+        fn prop(crc: u32, xs: Vec<u8>) -> bool {
+            fallback(crc, &xs) == Hardware::detect().calculate(crc, &xs, fallback)
+        }
+    }
+}
diff --git a/rustc_deps/vendor/flate2-crc/src/other.rs b/rustc_deps/vendor/flate2-crc/src/other.rs
new file mode 100644
index 0000000..5e855aa
--- /dev/null
+++ b/rustc_deps/vendor/flate2-crc/src/other.rs
@@ -0,0 +1,12 @@
+#[inline]
+pub fn detect() -> bool {
+    false
+}
+
+pub unsafe fn calculate(
+    _crc: u32,
+    _data: &[u8],
+    _fallback: fn(u32, &[u8]) -> u32,
+) -> u32 {
+    panic!()
+}
diff --git a/rustc_deps/vendor/flate2-crc/src/x86.rs b/rustc_deps/vendor/flate2-crc/src/x86.rs
new file mode 100644
index 0000000..bf65957
--- /dev/null
+++ b/rustc_deps/vendor/flate2-crc/src/x86.rs
@@ -0,0 +1,160 @@
+//! SIMD-based implementation of crc-32 checksums for x86 hardware.
+//!
+//! This module is based on Intel's paper, "Fast CRC Computation for Generic
+//! Polynomials Using PCLMULQDQ Instruction". The code is quite analagous to the
+//! paper itself and only largely differs in one area. More information in the
+//! comments below!
+
+#![allow(non_upper_case_globals)]
+
+#[cfg(target_arch = "x86_64")]
+use std::arch::x86_64::*;
+#[cfg(target_arch = "x86")]
+use std::arch::x86::*;
+
+const K1: i64 = 0x154442bd4;
+const K2: i64 = 0x1c6e41596;
+const K3: i64 = 0x1751997d0;
+const K4: i64 = 0x0ccaa009e;
+const K5: i64 = 0x163cd6124;
+const K6: i64 = 0x1db710640;
+
+const P_x: i64 = 0x1DB710641;
+const U_prime: i64 = 0x1F7011641;
+
+pub fn detect() -> bool {
+    is_x86_feature_detected!("pclmulqdq") &&
+        is_x86_feature_detected!("sse2") &&
+        is_x86_feature_detected!("sse4.1")
+}
+
+unsafe fn debug(s: &str, a: __m128i) -> __m128i {
+    if false {
+        union A { a: __m128i, b: [u8; 16] }
+        let x = A { a }.b;
+        print!(" {:20} | ", s);
+        for x in x.iter() {
+            print!("{:02x} ", x);
+        }
+        println!();
+    }
+    return a
+}
+
+#[target_feature(enable = "pclmulqdq", enable = "sse2", enable = "sse4.1")]
+pub unsafe fn calculate(
+    crc: u32,
+    mut data: &[u8],
+    fallback: fn(u32, &[u8]) -> u32,
+) -> u32 {
+    // In theory we can accelerate smaller chunks too, but for now just rely on
+    // the fallback implementation as it's too much hassle and doesn't seem too
+    // beneficial.
+    if data.len() < 128 {
+        return fallback(crc, data)
+    }
+
+    // Step 1: fold by 4 loop
+    let mut x3 = get(&mut data);
+    let mut x2 = get(&mut data);
+    let mut x1 = get(&mut data);
+    let mut x0 = get(&mut data);
+
+    // fold in our initial value, part of the incremental crc checksum
+    x3 = _mm_xor_si128(x3, _mm_cvtsi32_si128(!crc as i32));
+
+    let k1k2 = _mm_set_epi64x(K2, K1);
+    while data.len() >= 64 {
+        x3 = reduce128(x3, get(&mut data), k1k2);
+        x2 = reduce128(x2, get(&mut data), k1k2);
+        x1 = reduce128(x1, get(&mut data), k1k2);
+        x0 = reduce128(x0, get(&mut data), k1k2);
+    }
+
+    let k3k4 = _mm_set_epi64x(K4, K3);
+    let mut x = reduce128(x3, x2, k3k4);
+    x = reduce128(x, x1, k3k4);
+    x = reduce128(x, x0, k3k4);
+
+    // Step 2: fold by 1 loop
+    while data.len() >= 16 {
+        x = reduce128(x, get(&mut data), k3k4);
+    }
+
+    debug("128 > 64 init", x);
+
+    // Perform step 3, reduction from 128 bits to 64 bits. This is
+    // significantly different from the paper and basically doesn't follow it
+    // at all. It's not really clear why, but implementations of this algorithm
+    // in Chrome/Linux diverge in the same way. It is beyond me why this is
+    // different than the paper, maybe the paper has like errata or something?
+    // Unclear.
+    //
+    // It's also not clear to me what's actually happening here and/or why, but
+    // algebraically what's happening is:
+    //
+    // x = (x[0:63] • K4) ^ x[64:127]           // 96 bit result
+    // x = ((x[0:31] as u64) • K5) ^ x[32:95]   // 64 bit result
+    //
+    // It's... not clear to me what's going on here. The paper itself is pretty
+    // vague on this part but definitely uses different constants at least.
+    // It's not clear to me, reading the paper, where the xor operations are
+    // happening or why things are shifting around. This implementation...
+    // appears to work though!
+    drop(K6);
+    let x = _mm_xor_si128(
+        _mm_clmulepi64_si128(x, k3k4, 0x10),
+        _mm_srli_si128(x, 8),
+    );
+    let x = _mm_xor_si128(
+        _mm_clmulepi64_si128(
+            _mm_and_si128(x, _mm_set_epi32(0, 0, 0, !0)),
+            _mm_set_epi64x(0, K5),
+            0x00,
+        ),
+        _mm_srli_si128(x, 4),
+    );
+    debug("128 > 64 xx", x);
+
+    // Perform a Barrett reduction from our now 64 bits to 32 bits. The
+    // algorithm for this is described at the end of the paper, and note that
+    // this also implements the "bit reflected input" variant.
+    let pu = _mm_set_epi64x(U_prime, P_x);
+
+    // T1(x) = ⌊(R(x) % x^32)⌋ • μ
+    let t1 = _mm_clmulepi64_si128(
+        _mm_and_si128(x, _mm_set_epi32(0, 0, 0, !0)),
+        pu,
+        0x10,
+    );
+    // T2(x) = ⌊(T1(x) % x^32)⌋ • P(x)
+    let t2 = _mm_clmulepi64_si128(
+        _mm_and_si128(t1, _mm_set_epi32(0, 0, 0, !0)),
+        pu,
+        0x00,
+    );
+    // We're doing the bit-reflected variant, so get the upper 32-bits of the
+    // 64-bit result instead of the lower 32-bits.
+    //
+    // C(x) = R(x) ^ T2(x) / x^32
+    let c = _mm_extract_epi32(_mm_xor_si128(x, t2), 1) as u32;
+
+    if data.len() > 0 {
+        fallback(!c, data)
+    } else {
+        !c
+    }
+}
+
+unsafe fn reduce128(a: __m128i, b: __m128i, keys: __m128i) -> __m128i {
+    let t1 = _mm_clmulepi64_si128(a, keys, 0x00);
+    let t2 = _mm_clmulepi64_si128(a, keys, 0x11);
+    _mm_xor_si128(_mm_xor_si128(b, t1), t2)
+}
+
+unsafe fn get(a: &mut &[u8]) -> __m128i {
+    debug_assert!(a.len() >= 16);
+    let r = _mm_loadu_si128(a.as_ptr() as *const __m128i);
+    *a = &a[16..];
+    return r
+}
diff --git a/rustc_deps/vendor/flate2/.cargo-checksum.json b/rustc_deps/vendor/flate2/.cargo-checksum.json
index a1010ce..81f76f9 100644
--- a/rustc_deps/vendor/flate2/.cargo-checksum.json
+++ b/rustc_deps/vendor/flate2/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"01897cf6527c394116e2b60014987ae536ee93f657c21ec0553029673de550a2","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"29b1dac7c214deaa3f4f8305102cbc166ac9015a2d3d641f3a539103a97b6c8a","appveyor.yml":"7293e690b6b1fb75cbab1f72ffc5077dd145c806282969b595cc1a82ce1a2e62","examples/deflatedecoder-bufread.rs":"286995f7fa968c3cb935f4a9436db035691112fd1999ad001fb17da1a76162be","examples/deflatedecoder-read.rs":"7d7347a31317d288291847369032cefad5688defe6043a3f0d2a72b8567eb056","examples/deflatedecoder-write.rs":"23723a260ac6916243089666d25e2d7c5fdf390fb2fa20d0c2a957647a0e1880","examples/deflateencoder-bufread.rs":"c9a798336ed81c104fc01c3620380bb3369af90a710a89b19c2402f25c25d375","examples/deflateencoder-read.rs":"3af2fe62fb464c2c38a16099c38ce6ce510356ac47de2fc8a8a46ad1660992d7","examples/deflateencoder-write.rs":"0c6d3590b925a731bdd7e4a899ff5783539a4f48f88a8d95e7acecde5d426521","examples/gzbuilder.rs":"d0fe0fc8b6f302f35af80f61d2cbb4e55b1d511f7894e06756bda0d53f9505f9","examples/gzdecoder-bufread.rs":"2ec57910cb86a03566476f9b65562c2bfc661c7e094fb5b847d84e4127b7dd8d","examples/gzdecoder-read.rs":"af29581f5eadd76f1079b3da73b5cd97557c1abe435014ecad4b3be22518a2bb","examples/gzdecoder-write.rs":"4b14123f9e2d5aa08d1d94fdc911ecc0728cdb9d68888ad2bfd34545975ab6a2","examples/gzencoder-bufread.rs":"ad79e9f8630359ed21b74a1431d49fdb08c0673df7b21e98d0cad05b29357460","examples/gzencoder-read.rs":"b37c7d18e58c916bdaff4d698cbfc7fe99c03b7d440eb386694a268dbc938134","examples/gzencoder-write.rs":"3dc712c3100caab0e29bd8c48314a964392cd2f2443e988dfbe5416909fb5e1d","examples/gzmultidecoder-bufread.rs":"b55840b1139c7351cff67320c88bc8f2e4e74eecc20ed617deb48d27c855a5a4","examples/gzmultidecoder-read.rs":"a5cd59f0ea2543ce8c6ac8a77128a9f9242b0eca27dfd82c7842a2d63930e874","examples/hello_world.txt":"d2a84f4b8b650937ec8f73cd8be2c74add5a911ba64df27458ed8229da804a26","examples/zlibdecoder-bufread.rs":"688999ef801a8ecccb741eb9a6e6a89fbc5c9857bc1fdffd4b613d4522f47407","examples/zlibdecoder-read.rs":"c8d414640ae3e7c356ac06ae3e3802ae88b2db7b40be4f567598335e90f969f4","examples/zlibdecoder-write.rs":"fd581a7bdfb992eba5b96c66eb9e143dabd6970762e8f92fd05215b1566f915c","examples/zlibencoder-bufread.rs":"667d3bdc83878e97d4faae6c820693339799989db1031e976dc52d7bc1e119ce","examples/zlibencoder-read.rs":"8f3e87c001a028f5f38495c1ca4b7b60a92429b0d93f783d7be5c02c4d0043e2","examples/zlibencoder-write.rs":"03e4559325a749ee378739ddc2fb9d43afcf3d60a7be714d0708ec590b2d50af","src/bufreader.rs":"7fc0b74ca751e9e11689d3e57abc3aadbda92f25f2a9a80fca009f43a112642d","src/crc.rs":"2f98a8b14e4e8f1ed6fadb87f62e2c5c23f6019847a1bd5275414bc92f4f061b","src/deflate/bufread.rs":"ed1b17ebeae9dd5549a5c6dfdc983f6b0becd8a588e4674ba36ec463f4b0aad5","src/deflate/mod.rs":"b9123e045fcb205d4f08cc76e904b67d83809349f5699e0ae95d924b73bb4050","src/deflate/read.rs":"8a579ab97396a22cb9196743753d7d6f1c4cc4e7c7ed8f86e4f2d3f6971796cb","src/deflate/write.rs":"3852f51611562237e35791b80dc450558949c173fa875d4b91e13c1d18cf23a7","src/ffi.rs":"de766ce6bfef61b54296a0418ca09330957e39c74042c6294d151743fe9d5cfb","src/gz/bufread.rs":"b5bf00737dee1b4ffdbe78436726a5a0b12272bf0eadb9e4ab5464bf47eccfd4","src/gz/mod.rs":"b37dde138590a047572f5cf3c5a3d3eaa9032ffb9b9a5dbe567c03bddf56f478","src/gz/read.rs":"d5e5d127a9083ee5ce5a162a2c03965b7fbabc1ca3e221d74bdd68349ba7a7ce","src/gz/write.rs":"3a510433f6f76004599a201a18790c5b2451c1742967665ba51513d79c4f3f0d","src/lib.rs":"74491cc75445e677413537bcd958f9284967d1c2c4f1d0f2ddb79981e844f507","src/mem.rs":"9e1a4f24b04fac9c4230bc93389997450f2dc24acd3c9df72d66dc9af3d516cb","src/zio.rs":"98133cafdc0014e075c14cd8a271cfd5e67a4ad4572e798f6f62bbe6425d0cff","src/zlib/bufread.rs":"8eff1bb0c2b557ca0428a087f81e5c93b6e5e71176930eb19fc73322a4b7092c","src/zlib/mod.rs":"7e565ec477d26e80eecd583148a21ba778ebb6eb625388f884f95fc623b3db4f","src/zlib/read.rs":"dd34b36a33257d428b449b41738dae79faf4d02955aea4be905fed313d3cf38f","src/zlib/write.rs":"abd3a640d09e82a890f66d18fd4618ad09d7e25c9e1c23fcd3532a7003d742b6","tests/corrupt-file.gz":"083dd284aa1621916a2d0f66ea048c8d3ba7a722b22d0d618722633f51e7d39c","tests/early-flush.rs":"5b12ab43ddb2dbc458b2fdf05fe2245bf8abea554756dfa7bc64a095adfde365","tests/empty-read.rs":"45477d316f77a048d747e9d18292abfec0cac667768385c8a061e18fd1240238","tests/good-file.gz":"87296963e53024a74752179ce7e54087565d358a85d3e65c3b37ef36eaa3d4a6","tests/good-file.txt":"bc4e03658a441fe2ad2df7cd2197144b87e41696f01e327b380e869cd9b485a0","tests/gunzip.rs":"18c2509e8795337faa955bd8429210217ecc6081e1647d3968d10e01ae876bb0","tests/multi.gz":"efa3341da052f95056314cc6920e02a3da15bdef30234b2552fb407812db5cc6","tests/multi.txt":"dbea9325179efe46ea2add94f7b6b745ca983fabb208dc6d34aa064623d7ee23","tests/tokio.rs":"1d256e3d38abc6a9dde87d9ec78dc94ab56670e102d64e2ed649a46ff0d4d615","tests/zero-write.rs":"ff8d0349a540b54363c55807c5fd7fbbdc363d08a536d35a3a40f0ce92c16489"},"package":"3b0c7353385f92079524de3b7116cf99d73947c08a7472774e9b3b04bff3b901"}
\ No newline at end of file
+{"files":{"Cargo.toml":"6e53b64533fc27fd1967108e9202368c882e1367e2901018bc308d2054eed37e","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"29b1dac7c214deaa3f4f8305102cbc166ac9015a2d3d641f3a539103a97b6c8a","appveyor.yml":"8a17ca59cbca250380fdcfa6b8750ab716ae1c60ffff67b7db49f2d51e3c8c90","examples/deflatedecoder-bufread.rs":"286995f7fa968c3cb935f4a9436db035691112fd1999ad001fb17da1a76162be","examples/deflatedecoder-read.rs":"7d7347a31317d288291847369032cefad5688defe6043a3f0d2a72b8567eb056","examples/deflatedecoder-write.rs":"23723a260ac6916243089666d25e2d7c5fdf390fb2fa20d0c2a957647a0e1880","examples/deflateencoder-bufread.rs":"c9a798336ed81c104fc01c3620380bb3369af90a710a89b19c2402f25c25d375","examples/deflateencoder-read.rs":"3af2fe62fb464c2c38a16099c38ce6ce510356ac47de2fc8a8a46ad1660992d7","examples/deflateencoder-write.rs":"0c6d3590b925a731bdd7e4a899ff5783539a4f48f88a8d95e7acecde5d426521","examples/gzbuilder.rs":"d0fe0fc8b6f302f35af80f61d2cbb4e55b1d511f7894e06756bda0d53f9505f9","examples/gzdecoder-bufread.rs":"2ec57910cb86a03566476f9b65562c2bfc661c7e094fb5b847d84e4127b7dd8d","examples/gzdecoder-read.rs":"af29581f5eadd76f1079b3da73b5cd97557c1abe435014ecad4b3be22518a2bb","examples/gzdecoder-write.rs":"4b14123f9e2d5aa08d1d94fdc911ecc0728cdb9d68888ad2bfd34545975ab6a2","examples/gzencoder-bufread.rs":"ad79e9f8630359ed21b74a1431d49fdb08c0673df7b21e98d0cad05b29357460","examples/gzencoder-read.rs":"b37c7d18e58c916bdaff4d698cbfc7fe99c03b7d440eb386694a268dbc938134","examples/gzencoder-write.rs":"3dc712c3100caab0e29bd8c48314a964392cd2f2443e988dfbe5416909fb5e1d","examples/gzmultidecoder-bufread.rs":"b55840b1139c7351cff67320c88bc8f2e4e74eecc20ed617deb48d27c855a5a4","examples/gzmultidecoder-read.rs":"a5cd59f0ea2543ce8c6ac8a77128a9f9242b0eca27dfd82c7842a2d63930e874","examples/hello_world.txt":"d2a84f4b8b650937ec8f73cd8be2c74add5a911ba64df27458ed8229da804a26","examples/zlibdecoder-bufread.rs":"688999ef801a8ecccb741eb9a6e6a89fbc5c9857bc1fdffd4b613d4522f47407","examples/zlibdecoder-read.rs":"c8d414640ae3e7c356ac06ae3e3802ae88b2db7b40be4f567598335e90f969f4","examples/zlibdecoder-write.rs":"fd581a7bdfb992eba5b96c66eb9e143dabd6970762e8f92fd05215b1566f915c","examples/zlibencoder-bufread.rs":"667d3bdc83878e97d4faae6c820693339799989db1031e976dc52d7bc1e119ce","examples/zlibencoder-read.rs":"8f3e87c001a028f5f38495c1ca4b7b60a92429b0d93f783d7be5c02c4d0043e2","examples/zlibencoder-write.rs":"03e4559325a749ee378739ddc2fb9d43afcf3d60a7be714d0708ec590b2d50af","src/bufreader.rs":"7fc0b74ca751e9e11689d3e57abc3aadbda92f25f2a9a80fca009f43a112642d","src/crc.rs":"eadeb704e214346bef80c6b5e40f91f5cb3a9d8eb6fdd2918445dc0f872053f1","src/deflate/bufread.rs":"ed1b17ebeae9dd5549a5c6dfdc983f6b0becd8a588e4674ba36ec463f4b0aad5","src/deflate/mod.rs":"b9123e045fcb205d4f08cc76e904b67d83809349f5699e0ae95d924b73bb4050","src/deflate/read.rs":"8a579ab97396a22cb9196743753d7d6f1c4cc4e7c7ed8f86e4f2d3f6971796cb","src/deflate/write.rs":"3852f51611562237e35791b80dc450558949c173fa875d4b91e13c1d18cf23a7","src/ffi.rs":"de766ce6bfef61b54296a0418ca09330957e39c74042c6294d151743fe9d5cfb","src/gz/bufread.rs":"b5bf00737dee1b4ffdbe78436726a5a0b12272bf0eadb9e4ab5464bf47eccfd4","src/gz/mod.rs":"b37dde138590a047572f5cf3c5a3d3eaa9032ffb9b9a5dbe567c03bddf56f478","src/gz/read.rs":"d5e5d127a9083ee5ce5a162a2c03965b7fbabc1ca3e221d74bdd68349ba7a7ce","src/gz/write.rs":"3a510433f6f76004599a201a18790c5b2451c1742967665ba51513d79c4f3f0d","src/lib.rs":"185051e27a8460de1a314109d1d476c807520c51850faf6a2ae03470b5208d10","src/mem.rs":"9e1a4f24b04fac9c4230bc93389997450f2dc24acd3c9df72d66dc9af3d516cb","src/zio.rs":"98133cafdc0014e075c14cd8a271cfd5e67a4ad4572e798f6f62bbe6425d0cff","src/zlib/bufread.rs":"8eff1bb0c2b557ca0428a087f81e5c93b6e5e71176930eb19fc73322a4b7092c","src/zlib/mod.rs":"7e565ec477d26e80eecd583148a21ba778ebb6eb625388f884f95fc623b3db4f","src/zlib/read.rs":"dd34b36a33257d428b449b41738dae79faf4d02955aea4be905fed313d3cf38f","src/zlib/write.rs":"abd3a640d09e82a890f66d18fd4618ad09d7e25c9e1c23fcd3532a7003d742b6","tests/corrupt-file.gz":"083dd284aa1621916a2d0f66ea048c8d3ba7a722b22d0d618722633f51e7d39c","tests/early-flush.rs":"5b12ab43ddb2dbc458b2fdf05fe2245bf8abea554756dfa7bc64a095adfde365","tests/empty-read.rs":"45477d316f77a048d747e9d18292abfec0cac667768385c8a061e18fd1240238","tests/good-file.gz":"87296963e53024a74752179ce7e54087565d358a85d3e65c3b37ef36eaa3d4a6","tests/good-file.txt":"bc4e03658a441fe2ad2df7cd2197144b87e41696f01e327b380e869cd9b485a0","tests/gunzip.rs":"18c2509e8795337faa955bd8429210217ecc6081e1647d3968d10e01ae876bb0","tests/multi.gz":"efa3341da052f95056314cc6920e02a3da15bdef30234b2552fb407812db5cc6","tests/multi.txt":"dbea9325179efe46ea2add94f7b6b745ca983fabb208dc6d34aa064623d7ee23","tests/tokio.rs":"74aca4cf9025ca4c4b0c7a3cf832acb6cbd2a84cdc6b80badb38423adb3cc890","tests/zero-write.rs":"ff8d0349a540b54363c55807c5fd7fbbdc363d08a536d35a3a40f0ce92c16489"},"package":"96971e4fc2737f211ec8236fe16ac67695838ca3e25567c07b4f837d1f8f829c"}
\ No newline at end of file
diff --git a/rustc_deps/vendor/flate2/Cargo.toml b/rustc_deps/vendor/flate2/Cargo.toml
index d4dd0eb..52f7968 100644
--- a/rustc_deps/vendor/flate2/Cargo.toml
+++ b/rustc_deps/vendor/flate2/Cargo.toml
@@ -12,7 +12,7 @@
 
 [package]
 name = "flate2"
-version = "1.0.4"
+version = "1.0.5"
 authors = ["Alex Crichton <alex@alexcrichton.com>"]
 description = "Bindings to miniz.c for DEFLATE compression and decompression exposed as\nReader/Writer streams. Contains bindings for zlib, deflate, and gzip-based\nstreams.\n"
 homepage = "https://github.com/alexcrichton/flate2-rs"
@@ -22,6 +22,9 @@
 categories = ["compression", "api-bindings"]
 license = "MIT/Apache-2.0"
 repository = "https://github.com/alexcrichton/flate2-rs"
+[dependencies.flate2-crc]
+version = "0.1"
+
 [dependencies.futures]
 version = "0.1"
 optional = true
@@ -50,7 +53,7 @@
 default-features = false
 
 [dev-dependencies.rand]
-version = "0.5"
+version = "0.6"
 
 [dev-dependencies.tokio-core]
 version = "0.1"
diff --git a/rustc_deps/vendor/flate2/appveyor.yml b/rustc_deps/vendor/flate2/appveyor.yml
index 0a140f7..f66ffed 100644
--- a/rustc_deps/vendor/flate2/appveyor.yml
+++ b/rustc_deps/vendor/flate2/appveyor.yml
@@ -20,5 +20,11 @@
 build: false
 
 test_script:
-  - cargo test --verbose --target %TARGET%
-  - cargo test --verbose --target %TARGET% --features tokio
+  - cargo test --target %TARGET%
+  - cargo test --target %TARGET% --features tokio
+  - cargo test --target %TARGET% --manifest-path flate2-crc/Cargo.toml
+  - cargo test --target %TARGET% --manifest-path flate2-crc/Cargo.toml --release
+
+branches:
+  only:
+    - master
diff --git a/rustc_deps/vendor/flate2/src/crc.rs b/rustc_deps/vendor/flate2/src/crc.rs
index 0d621a9..186d050 100644
--- a/rustc_deps/vendor/flate2/src/crc.rs
+++ b/rustc_deps/vendor/flate2/src/crc.rs
@@ -2,6 +2,8 @@
 
 use std::io::prelude::*;
 use std::io;
+
+use flate2_crc::Hardware;
 use libc;
 
 use ffi;
@@ -11,8 +13,9 @@
 /// [`CrcReader`]: struct.CrcReader.html
 #[derive(Debug)]
 pub struct Crc {
-    crc: libc::c_ulong,
+    crc: u32,
     amt: u32,
+    hardware: Hardware,
 }
 
 /// A wrapper around a [`Read`] that calculates the CRC.
@@ -27,10 +30,10 @@
 impl Crc {
     /// Create a new CRC.
     pub fn new() -> Crc {
-        Crc { crc: 0, amt: 0 }
+        Crc { crc: 0, amt: 0, hardware: Hardware::detect() }
     }
 
-    /// bla
+    /// Returns the current crc32 checksum.
     pub fn sum(&self) -> u32 {
         self.crc as u32
     }
@@ -44,7 +47,15 @@
     /// Update the CRC with the bytes in `data`.
     pub fn update(&mut self, data: &[u8]) {
         self.amt = self.amt.wrapping_add(data.len() as u32);
-        self.crc = unsafe { ffi::mz_crc32(self.crc, data.as_ptr(), data.len() as libc::size_t) };
+        self.crc = self.hardware.calculate(self.crc, data, |crc, data| {
+            unsafe {
+                ffi::mz_crc32(
+                    crc as libc::c_ulong,
+                    data.as_ptr(),
+                    data.len() as libc::size_t,
+                ) as u32
+            }
+        });
     }
 
     /// Reset the CRC.
@@ -57,10 +68,10 @@
     pub fn combine(&mut self, additional_crc: &Crc) {
         self.crc = unsafe {
             ffi::mz_crc32_combine(
-                self.crc as ::libc::c_ulong,
-                additional_crc.crc as ::libc::c_ulong,
-                additional_crc.amt as ::libc::off_t,
-            )
+                self.crc as libc::c_ulong,
+                additional_crc.crc as libc::c_ulong,
+                additional_crc.amt as libc::off_t,
+            ) as u32
         };
         self.amt += additional_crc.amt;
     }
diff --git a/rustc_deps/vendor/flate2/src/lib.rs b/rustc_deps/vendor/flate2/src/lib.rs
index 550e68b..163575d 100644
--- a/rustc_deps/vendor/flate2/src/lib.rs
+++ b/rustc_deps/vendor/flate2/src/lib.rs
@@ -79,6 +79,7 @@
 #![allow(trivial_numeric_casts)]
 #![cfg_attr(test, deny(warnings))]
 
+extern crate flate2_crc;
 #[cfg(feature = "tokio")]
 extern crate futures;
 #[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
diff --git a/rustc_deps/vendor/flate2/tests/tokio.rs b/rustc_deps/vendor/flate2/tests/tokio.rs
index 0ce1064..671c1aa 100644
--- a/rustc_deps/vendor/flate2/tests/tokio.rs
+++ b/rustc_deps/vendor/flate2/tests/tokio.rs
@@ -6,9 +6,10 @@
 extern crate tokio_core;
 extern crate tokio_io;
 
-use std::thread;
-use std::net::{Shutdown, TcpListener};
 use std::io::{Read, Write};
+use std::iter;
+use std::net::{Shutdown, TcpListener};
+use std::thread;
 
 use flate2::Compression;
 use flate2::read;
@@ -76,9 +77,9 @@
 
 #[test]
 fn echo_random() {
-    let v = thread_rng()
-        .gen_iter::<u8>()
+    let v = iter::repeat(())
         .take(1024 * 1024)
+        .map(|()| thread_rng().gen::<u8>())
         .collect::<Vec<_>>();
     let mut core = Core::new().unwrap();
     let listener = TcpListener::bind("127.0.0.1:0").unwrap();