Bug 1426116 - Update Cargo lockfiles and re-vendor rust dependencies. r=jrmuizel
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 08 Jan 2018 09:19:27 -0500
changeset 450027 e37afa9046edcb8420af55c2a3be121c8581a1d9
parent 450026 7855af69185d01ce76917801ace0b104422447a3
child 450028 39f6c70f793e37f848df39de892852d1460fcb67
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1426116
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1426116 - Update Cargo lockfiles and re-vendor rust dependencies. r=jrmuizel MozReview-Commit-ID: Gz8YEswHQu0
third_party/rust/serde/.cargo-checksum.json
third_party/rust/serde/Cargo.toml
third_party/rust/serde/src/de/ignored_any.rs
third_party/rust/serde/src/de/impls.rs
third_party/rust/serde/src/de/mod.rs
third_party/rust/serde/src/de/value.rs
third_party/rust/serde/src/export.rs
third_party/rust/serde/src/lib.rs
third_party/rust/serde/src/private/de.rs
third_party/rust/serde/src/private/ser.rs
third_party/rust/serde/src/ser/impls.rs
third_party/rust/serde/src/ser/impossible.rs
third_party/rust/serde/src/ser/mod.rs
third_party/rust/serde_derive/.cargo-checksum.json
third_party/rust/serde_derive/Cargo.toml
third_party/rust/serde_derive/src/bound.rs
third_party/rust/serde_derive/src/de.rs
third_party/rust/serde_derive/src/fragment.rs
third_party/rust/serde_derive/src/lib.rs
third_party/rust/serde_derive/src/ser.rs
third_party/rust/serde_derive_internals/.cargo-checksum.json
third_party/rust/serde_derive_internals/Cargo.toml
third_party/rust/serde_derive_internals/src/ast.rs
third_party/rust/serde_derive_internals/src/attr.rs
third_party/rust/serde_derive_internals/src/case.rs
third_party/rust/serde_derive_internals/src/check.rs
third_party/rust/serde_derive_internals/src/ctxt.rs
third_party/rust/serde_derive_internals/src/lib.rs
toolkit/library/gtest/rust/Cargo.lock
toolkit/library/rust/Cargo.lock
--- a/third_party/rust/serde/.cargo-checksum.json
+++ b/third_party/rust/serde/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"f98dcc6eedbfb307be98a2d8ca49d3cc10a76a08e7d7dfa2f6ec69987f0c679d","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"7dc6376a88195594cd6b43cb891aad10f57144ff737178b55d046aa04739b43a","src/de/from_primitive.rs":"28ec3ab1c430cf27d632b642ccfccb6d055eeb9fb576e7e446ba24c66f507fb4","src/de/ignored_any.rs":"1b5ee592f5ae58d69e321144d4397f149c047e327529d0b880e1a5285e781a35","src/de/impls.rs":"d220ded8bebc3367c3a0ac1360b59be1b435df40be65a5b688a6ba8108e96bea","src/de/mod.rs":"b8fd19e4a2d40369cb85e3ed6bc5197800c06b2271a846ed6e9b0cb7af41c5f0","src/de/utf8.rs":"956b124b7ce98353cb781b56e43a6fed2e67f1389d35b7a468d5be75b1485853","src/de/value.rs":"fe31174cc41035a1b53d4657b6cae6f3bcb660be39eccaae281a6e3705655578","src/export.rs":"7477f5bd345ca9e0b8d56bccdc62484e42a92fc6cd909bf17fb6e05cd1eb7946","src/lib.rs":"f549fbbd92b2e5e946a327eadf18216b9fe076f569bd623a32872797dc9eb4bc","src/macros.rs":"e1d542b1dac2c1d1f9d5ada7cc5b6639767fc67851421cc3adfb942a7cf750b6","src/private/de.rs":"15b82edcadaa60e748bf6ee0e0e14464cf945f39cb7493d3c1684cc34f6594b6","src/private/macros.rs":"6861a4f332ea24d0ed5db1c28fe3105d2716523902f045c0bbbd439ebf9e44de","src/private/mod.rs":"bcd7c54838e139475c23a323678e20eccbe88c0be93f7977f7675cead4d3b6ed","src/private/ser.rs":"eec5aecf077cebf4dc3fdbe83780f716bf33d311806ee59ce42a0c53c2f92211","src/ser/impls.rs":"dc5219e898d67c9422fef81d1f36d25ea92341c5ad3d976c0017886f371a8d51","src/ser/impossible.rs":"35bd09bb517b28eda0048b0622eb5a0313d5aebf37c03b5a44dbca200d0a9ac8","src/ser/mod.rs":"3d92794f13c8d90c2ebc33716bd6e4d4dde552c6f7de42dfaf9967d8a9ab7d10"},"package":null}
\ No newline at end of file
+{"files":{"Cargo.toml":"b5e865ec105f4f546fecdf164172e670b2b82a2533700f556cc1c1c246a4ce14","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"7dc6376a88195594cd6b43cb891aad10f57144ff737178b55d046aa04739b43a","src/de/from_primitive.rs":"28ec3ab1c430cf27d632b642ccfccb6d055eeb9fb576e7e446ba24c66f507fb4","src/de/ignored_any.rs":"864eaefef0aaae36daf0c2bdee08165dabbf60710f3217142d5e280c0a35c1fe","src/de/impls.rs":"e0d8b5255afb175daf720dd5b1072d2d1888fce6790de57fe51d8d2b51fc1603","src/de/mod.rs":"2984925d7844816cacc290067db049766912d1393732d9df280e6ba020582afc","src/de/utf8.rs":"956b124b7ce98353cb781b56e43a6fed2e67f1389d35b7a468d5be75b1485853","src/de/value.rs":"463e107e9ce9a56cc22901aeb60edbf0d10b144ca03dcdb78988d68f6c96022b","src/export.rs":"dd08253f225862aa5009b27900e04187480c96562c35205b71b36b2ac64c4cce","src/lib.rs":"d8411e8311ec29d8d7184556e014a11f03fe84af26f64daeaf34ad449310084d","src/macros.rs":"e1d542b1dac2c1d1f9d5ada7cc5b6639767fc67851421cc3adfb942a7cf750b6","src/private/de.rs":"55403af32b5b4112ab2203c1598bb033308f8c59ed5c4b5f4730dc2f26d3808d","src/private/macros.rs":"6861a4f332ea24d0ed5db1c28fe3105d2716523902f045c0bbbd439ebf9e44de","src/private/mod.rs":"bcd7c54838e139475c23a323678e20eccbe88c0be93f7977f7675cead4d3b6ed","src/private/ser.rs":"fed0c80a55a214c9bf411fe591f8f99562b01fcd27dfe968f6cc9d694a9c60b2","src/ser/impls.rs":"7eb99e5a74a3fcbb611a6ad762d1915a0ae1f5bb7a95f54115936db3bdde32ca","src/ser/impossible.rs":"009dce92e20bd25335db7d747c595111f5eb8d21dda0f6c75bccf0d0608c5751","src/ser/mod.rs":"b0b970c9e4987db7fbd7bc3bb9f32448e2de864c6596829922cf8fe131dae23d"},"package":"db99f3919e20faa51bb2996057f5031d8685019b5a06139b1ce761da671b8526"}
\ No newline at end of file
--- a/third_party/rust/serde/Cargo.toml
+++ b/third_party/rust/serde/Cargo.toml
@@ -1,68 +1,44 @@
+# 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 = "serde"
-version = "1.0.23" # remember to update html_root_url
+version = "1.0.27"
 authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
-license = "MIT/Apache-2.0"
+include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
 description = "A generic serialization/deserialization framework"
 homepage = "https://serde.rs"
-repository = "https://github.com/serde-rs/serde"
 documentation = "https://docs.serde.rs/serde/"
+readme = "README.md"
 keywords = ["serde", "serialization", "no_std"]
 categories = ["encoding"]
-readme = "README.md"
-include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
-
-[badges]
-travis-ci = { repository = "serde-rs/serde" }
-appveyor = { repository = "serde-rs/serde" }
-
-[dependencies]
-serde_derive = { version = "1.0", optional = true, path = "../serde_derive" }
-
-[dev-dependencies]
-serde_derive = { version = "1.0", path = "../serde_derive" }
-
-
-### FEATURES #################################################################
+license = "MIT/Apache-2.0"
+repository = "https://github.com/serde-rs/serde"
+[dependencies.serde_derive]
+version = "1.0"
+optional = true
+[dev-dependencies.serde_derive]
+version = "1.0"
 
 [features]
+alloc = ["unstable"]
 default = ["std"]
-
-# Re-export the derive(Serialize, Deserialize) macros. This is specifically
-# intended for library crates that provide optional Serde impls behind a Cargo
-# cfg of their own. All other crates should depend on serde_derive directly.
-#
-# Please refer to the long comment above the line `pub use serde_derive::*` in
-# src/lib.rs before enabling this feature. If you think you need this feature
-# and your use case does not precisely match the one described in the comment,
-# please open an issue to let us know about your use case.
 derive = ["serde_derive"]
-
-# Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
-# Requires a dependency on the Rust standard library.
+playground = ["serde_derive"]
+rc = []
 std = []
+unstable = []
+[badges.appveyor]
+repository = "serde-rs/serde"
 
-# Provide impls for types that require unstable functionality. For tracking and
-# discussion of unstable functionality please refer to this issue:
-#
-#    https://github.com/serde-rs/serde/issues/812
-unstable = []
-
-# Provide impls for types in the Rust core allocation and collections library
-# including String, Box<T>, Vec<T>, and Cow<T>. This is a subset of std but may
-# be enabled without depending on all of std.
-#
-# Requires a dependency on the unstable core allocation library:
-#
-#    https://doc.rust-lang.org/alloc/
-alloc = ["unstable"]
-
-# Opt into impls for Rc<T> and Arc<T>. Serializing and deserializing these types
-# does not preserve identity and may result in multiple copies of the same data.
-# Be sure that this is what you want before enabling this feature.
-rc = []
-
-# Get serde_derive picked up by the Integer 32 playground. Not public API.
-#
-#    http://play.integer32.com/
-playground = ["serde_derive"]
+[badges.travis-ci]
+repository = "serde-rs/serde"
--- a/third_party/rust/serde/src/de/ignored_any.rs
+++ b/third_party/rust/serde/src/de/ignored_any.rs
@@ -3,17 +3,17 @@
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 use lib::*;
 
-use de::{Deserialize, Deserializer, Visitor, SeqAccess, MapAccess, Error};
+use de::{Deserialize, Deserializer, Error, MapAccess, SeqAccess, Visitor};
 
 /// An efficient way of discarding data from a deserializer.
 ///
 /// Think of this like `serde_json::Value` in that it can be deserialized from
 /// any type, except that it does not store any information about the data that
 /// gets deserialized.
 ///
 /// ```rust
--- a/third_party/rust/serde/src/de/impls.rs
+++ b/third_party/rust/serde/src/de/impls.rs
@@ -10,17 +10,17 @@ use lib::*;
 
 use de::{Deserialize, Deserializer, EnumAccess, Error, SeqAccess, Unexpected, VariantAccess,
          Visitor};
 
 #[cfg(any(feature = "std", feature = "alloc"))]
 use de::MapAccess;
 
 use de::from_primitive::FromPrimitive;
-use private::de::DeserializeFromSeed;
+use private::de::InPlaceSeed;
 
 #[cfg(any(feature = "std", feature = "alloc"))]
 use private::de::size_hint;
 
 ////////////////////////////////////////////////////////////////////////////////
 
 struct UnitVisitor;
 
@@ -47,17 +47,16 @@ impl<'de> Deserialize<'de> for () {
         deserializer.deserialize_unit(UnitVisitor)
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 
 struct BoolVisitor;
 
-
 impl<'de> Visitor<'de> for BoolVisitor {
     type Value = bool;
 
     fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
         formatter.write_str("a boolean")
     }
 
     fn visit_bool<E>(self, v: bool) -> Result<bool, E>
@@ -208,17 +207,17 @@ impl<'de> Deserialize<'de> for char {
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 
 #[cfg(any(feature = "std", feature = "alloc"))]
 struct StringVisitor;
 #[cfg(any(feature = "std", feature = "alloc"))]
-struct StringFromVisitor<'a>(&'a mut String);
+struct StringInPlaceVisitor<'a>(&'a mut String);
 
 #[cfg(any(feature = "std", feature = "alloc"))]
 impl<'de> Visitor<'de> for StringVisitor {
     type Value = String;
 
     fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
         formatter.write_str("a string")
     }
@@ -248,23 +247,26 @@ impl<'de> Visitor<'de> for StringVisitor
     }
 
     fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<String, E>
     where
         E: Error,
     {
         match String::from_utf8(v) {
             Ok(s) => Ok(s),
-            Err(e) => Err(Error::invalid_value(Unexpected::Bytes(&e.into_bytes()), &self),),
+            Err(e) => Err(Error::invalid_value(
+                Unexpected::Bytes(&e.into_bytes()),
+                &self,
+            )),
         }
     }
 }
 
 #[cfg(any(feature = "std", feature = "alloc"))]
-impl<'a, 'de> Visitor<'de> for StringFromVisitor<'a> {
+impl<'a, 'de> Visitor<'de> for StringInPlaceVisitor<'a> {
     type Value = ();
 
     fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
         formatter.write_str("a string")
     }
 
     fn visit_str<E>(self, v: &str) -> Result<(), E>
     where
@@ -301,35 +303,38 @@ impl<'a, 'de> Visitor<'de> for StringFro
     where
         E: Error,
     {
         match String::from_utf8(v) {
             Ok(s) => {
                 *self.0 = s;
                 Ok(())
             }
-            Err(e) => Err(Error::invalid_value(Unexpected::Bytes(&e.into_bytes()), &self),),
+            Err(e) => Err(Error::invalid_value(
+                Unexpected::Bytes(&e.into_bytes()),
+                &self,
+            )),
         }
     }
 }
 
 #[cfg(any(feature = "std", feature = "alloc"))]
 impl<'de> Deserialize<'de> for String {
     fn deserialize<D>(deserializer: D) -> Result<String, D::Error>
     where
         D: Deserializer<'de>,
     {
         deserializer.deserialize_string(StringVisitor)
     }
 
-    fn deserialize_from<D>(&mut self, deserializer: D) -> Result<(), D::Error>
+    fn deserialize_in_place<D>(deserializer: D, place: &mut Self) -> Result<(), D::Error>
     where
         D: Deserializer<'de>,
     {
-        deserializer.deserialize_string(StringFromVisitor(self))
+        deserializer.deserialize_string(StringInPlaceVisitor(place))
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 
 struct StrVisitor;
 
 impl<'a> Visitor<'a> for StrVisitor {
@@ -480,17 +485,16 @@ macro_rules! forwarded_impl {
 #[cfg(all(feature = "std", feature = "unstable"))]
 forwarded_impl!((), Box<CStr>, CString::into_boxed_c_str);
 
 ////////////////////////////////////////////////////////////////////////////////
 
 struct OptionVisitor<T> {
     marker: PhantomData<T>,
 }
-struct OptionFromVisitor<'a, T: 'a>(&'a mut Option<T>);
 
 impl<'de, T> Visitor<'de> for OptionVisitor<T>
 where
     T: Deserialize<'de>,
 {
     type Value = Option<T>;
 
     fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
@@ -517,106 +521,66 @@ where
     fn visit_some<D>(self, deserializer: D) -> Result<Option<T>, D::Error>
     where
         D: Deserializer<'de>,
     {
         T::deserialize(deserializer).map(Some)
     }
 }
 
-impl<'a, 'de, T> Visitor<'de> for OptionFromVisitor<'a, T>
-where
-    T: Deserialize<'de>,
-{
-    type Value = ();
-
-    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
-        formatter.write_str("option")
-    }
-
-    #[inline]
-    fn visit_unit<E>(self) -> Result<(), E>
-    where
-        E: Error,
-    {
-        *self.0 = None;
-        Ok(())
-    }
-
-    #[inline]
-    fn visit_none<E>(self) -> Result<(), E>
-    where
-        E: Error,
-    {
-        *self.0 = None;
-        Ok(())
-    }
-
-    #[inline]
-    fn visit_some<D>(self, deserializer: D) -> Result<(), D::Error>
-    where
-        D: Deserializer<'de>,
-    {
-        // The some enum's repr is opaque, so we can't play cute tricks with
-        // its tag to build this in place unconditionally.
-        //
-        // FIXME: investigate whether branching on the old value being Some to
-        // deserialize_from the value is profitable (probably data-dependent?)
-        *self.0 = try!(T::deserialize(deserializer).map(Some));
-        Ok(())
-    }
-}
-
 impl<'de, T> Deserialize<'de> for Option<T>
 where
     T: Deserialize<'de>,
 {
     fn deserialize<D>(deserializer: D) -> Result<Option<T>, D::Error>
     where
         D: Deserializer<'de>,
     {
-        deserializer.deserialize_option(OptionVisitor { marker: PhantomData })
+        deserializer.deserialize_option(OptionVisitor {
+            marker: PhantomData,
+        })
     }
 
-    fn deserialize_from<D>(&mut self, deserializer: D) -> Result<(), D::Error>
-    where
-        D: Deserializer<'de>,
-    {
-        deserializer.deserialize_option(OptionFromVisitor(self))
-    }
+    // The Some variant's repr is opaque, so we can't play cute tricks with its
+    // tag to have deserialize_in_place build the content in place unconditionally.
+    //
+    // FIXME: investigate whether branching on the old value being Some to
+    // deserialize_in_place the value is profitable (probably data-dependent?)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 
-struct PhantomDataVisitor<T> {
+struct PhantomDataVisitor<T: ?Sized> {
     marker: PhantomData<T>,
 }
 
-impl<'de, T> Visitor<'de> for PhantomDataVisitor<T> {
+impl<'de, T: ?Sized> Visitor<'de> for PhantomDataVisitor<T> {
     type Value = PhantomData<T>;
 
     fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
         formatter.write_str("unit")
     }
 
     #[inline]
     fn visit_unit<E>(self) -> Result<PhantomData<T>, E>
     where
         E: Error,
     {
         Ok(PhantomData)
     }
 }
 
-impl<'de, T> Deserialize<'de> for PhantomData<T> {
+impl<'de, T: ?Sized> Deserialize<'de> for PhantomData<T> {
     fn deserialize<D>(deserializer: D) -> Result<PhantomData<T>, D::Error>
     where
         D: Deserializer<'de>,
     {
-        let visitor = PhantomDataVisitor { marker: PhantomData };
+        let visitor = PhantomDataVisitor {
+            marker: PhantomData,
+        };
         deserializer.deserialize_unit_struct("PhantomData", visitor)
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 
 #[cfg(any(feature = "std", feature = "alloc"))]
 macro_rules! seq_impl {
@@ -667,23 +631,23 @@ macro_rules! seq_impl {
                         Ok(values)
                     }
                 }
 
                 let visitor = SeqVisitor { marker: PhantomData };
                 deserializer.deserialize_seq(visitor)
             }
 
-            fn deserialize_from<D>(&mut self, deserializer: D) -> Result<(), D::Error>
+            fn deserialize_in_place<D>(deserializer: D, place: &mut Self) -> Result<(), D::Error>
             where
                 D: Deserializer<'de>,
             {
-                struct SeqVisitor<'a, T: 'a $(, $typaram: 'a)*>(&'a mut $ty<T $(, $typaram)*>);
+                struct SeqInPlaceVisitor<'a, T: 'a $(, $typaram: 'a)*>(&'a mut $ty<T $(, $typaram)*>);
 
-                impl<'a, 'de, T $(, $typaram)*> Visitor<'de> for SeqVisitor<'a, T $(, $typaram)*>
+                impl<'a, 'de, T $(, $typaram)*> Visitor<'de> for SeqInPlaceVisitor<'a, T $(, $typaram)*>
                 where
                     T: Deserialize<'de> $(+ $tbound1 $(+ $tbound2)*)*,
                     $($typaram: $bound1 $(+ $bound2)*,)*
                 {
                     type Value = ();
 
                     fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
                         formatter.write_str("a sequence")
@@ -701,25 +665,25 @@ macro_rules! seq_impl {
                         while let Some(value) = try!($access.next_element()) {
                             $insert(&mut self.0, value);
                         }
 
                         Ok(())
                     }
                 }
 
-                deserializer.deserialize_seq(SeqVisitor(self))
+                deserializer.deserialize_seq(SeqInPlaceVisitor(place))
             }
         }
     }
 }
 
 // Dummy impl of reserve
 #[cfg(any(feature = "std", feature = "alloc"))]
-fn nop_reserve<T, U>(_x: T, _y: U) { }
+fn nop_reserve<T>(_seq: T, _n: usize) {}
 
 #[cfg(any(feature = "std", feature = "alloc"))]
 seq_impl!(
     BinaryHeap<T: Ord>,
     seq,
     BinaryHeap::new(),
     BinaryHeap::clear,
     BinaryHeap::with_capacity(size_hint::cautious(seq.size_hint())),
@@ -739,17 +703,18 @@ seq_impl!(
 #[cfg(any(feature = "std", feature = "alloc"))]
 seq_impl!(
     LinkedList<T>,
     seq,
     LinkedList::new(),
     LinkedList::clear,
     LinkedList::new(),
     nop_reserve,
-    LinkedList::push_back);
+    LinkedList::push_back
+);
 
 #[cfg(feature = "std")]
 seq_impl!(
     HashSet<T: Eq + Hash, S: BuildHasher + Default>,
     seq,
     HashSet::with_hasher(S::default()),
     HashSet::clear,
     HashSet::with_capacity_and_hasher(size_hint::cautious(seq.size_hint()), S::default()),
@@ -759,38 +724,42 @@ seq_impl!(
 #[cfg(any(feature = "std", feature = "alloc"))]
 seq_impl!(
     Vec<T>,
     seq,
     Vec::new(),
     Vec::clear,
     Vec::with_capacity(size_hint::cautious(seq.size_hint())),
     Vec::reserve,
-    Vec::push);
+    Vec::push
+);
 
 #[cfg(any(feature = "std", feature = "alloc"))]
 seq_impl!(
     VecDeque<T>,
     seq,
     VecDeque::new(),
     VecDeque::clear,
     VecDeque::with_capacity(size_hint::cautious(seq.size_hint())),
     VecDeque::reserve,
-    VecDeque::push_back);
+    VecDeque::push_back
+);
 
 ////////////////////////////////////////////////////////////////////////////////
 
 struct ArrayVisitor<A> {
     marker: PhantomData<A>,
 }
-struct ArrayFromVisitor<'a, A: 'a>(&'a mut A);
+struct ArrayInPlaceVisitor<'a, A: 'a>(&'a mut A);
 
 impl<A> ArrayVisitor<A> {
     fn new() -> Self {
-        ArrayVisitor { marker: PhantomData }
+        ArrayVisitor {
+            marker: PhantomData,
+        }
     }
 }
 
 impl<'de, T> Visitor<'de> for ArrayVisitor<[T; 0]> {
     type Value = [T; 0];
 
     fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
         formatter.write_str("an empty array")
@@ -839,34 +808,34 @@ macro_rules! array_impls {
                             None => return Err(Error::invalid_length($n, &self)),
                         };
                     )+
 
                     Ok([$($name),+])
                 }
             }
 
-            impl<'a, 'de, T> Visitor<'de> for ArrayFromVisitor<'a, [T; $len]>
+            impl<'a, 'de, T> Visitor<'de> for ArrayInPlaceVisitor<'a, [T; $len]>
             where
                 T: Deserialize<'de>,
             {
                 type Value = ();
 
                 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
                     formatter.write_str(concat!("an array of length ", $len))
                 }
 
                 #[inline]
                 fn visit_seq<A>(self, mut seq: A) -> Result<(), A::Error>
                 where
                     A: SeqAccess<'de>,
                 {
                     let mut fail_idx = None;
                     for (idx, dest) in self.0[..].iter_mut().enumerate() {
-                        if try!(seq.next_element_seed(DeserializeFromSeed(dest))).is_none() {
+                        if try!(seq.next_element_seed(InPlaceSeed(dest))).is_none() {
                             fail_idx = Some(idx);
                             break;
                         }
                     }
                     if let Some(idx) = fail_idx {
                         return Err(Error::invalid_length(idx, &self));
                     }
                     Ok(())
@@ -879,21 +848,21 @@ macro_rules! array_impls {
             {
                 fn deserialize<D>(deserializer: D) -> Result<[T; $len], D::Error>
                 where
                     D: Deserializer<'de>,
                 {
                     deserializer.deserialize_tuple($len, ArrayVisitor::<[T; $len]>::new())
                 }
 
-                fn deserialize_from<D>(&mut self, deserializer: D) -> Result<(), D::Error>
+                fn deserialize_in_place<D>(deserializer: D, place: &mut Self) -> Result<(), D::Error>
                 where
                     D: Deserializer<'de>,
                 {
-                    deserializer.deserialize_tuple($len, ArrayFromVisitor(self))
+                    deserializer.deserialize_tuple($len, ArrayInPlaceVisitor(place))
                 }
             }
         )+
     }
 }
 
 array_impls! {
     1 => (0 a)
@@ -968,46 +937,46 @@ macro_rules! tuple_impls {
                             Ok(($($name,)+))
                         }
                     }
 
                     deserializer.deserialize_tuple($len, TupleVisitor { marker: PhantomData })
                 }
 
                 #[inline]
-                fn deserialize_from<D>(&mut self, deserializer: D) -> Result<(), D::Error>
+                fn deserialize_in_place<D>(deserializer: D, place: &mut Self) -> Result<(), D::Error>
                 where
                     D: Deserializer<'de>,
                 {
-                    struct TupleVisitor<'a, $($name: 'a,)+>(&'a mut ($($name,)+));
+                    struct TupleInPlaceVisitor<'a, $($name: 'a,)+>(&'a mut ($($name,)+));
 
-                    impl<'a, 'de, $($name: Deserialize<'de>),+> Visitor<'de> for TupleVisitor<'a, $($name,)+> {
+                    impl<'a, 'de, $($name: Deserialize<'de>),+> Visitor<'de> for TupleInPlaceVisitor<'a, $($name,)+> {
                         type Value = ();
 
                         fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
                             formatter.write_str(concat!("a tuple of size ", $len))
                         }
 
                         #[inline]
                         #[allow(non_snake_case)]
                         fn visit_seq<A>(self, mut seq:                                                                      A) -> Result<(), A::Error>
                         where
                             A: SeqAccess<'de>,
                         {
                             $(
-                                if try!(seq.next_element_seed(DeserializeFromSeed(&mut (self.0).$n))).is_none() {
+                                if try!(seq.next_element_seed(InPlaceSeed(&mut (self.0).$n))).is_none() {
                                     return Err(Error::invalid_length($n, &self));
                                 }
                             )+
 
                             Ok(())
                         }
                     }
 
-                    deserializer.deserialize_tuple($len, TupleVisitor(self))
+                    deserializer.deserialize_tuple($len, TupleInPlaceVisitor(place))
                 }
             }
         )+
     }
 }
 
 tuple_impls! {
     1  => (0 T0)
@@ -1297,17 +1266,22 @@ impl<'de> Deserialize<'de> for net::Sock
         }
     }
 }
 
 #[cfg(feature = "std")]
 parse_socket_impl!(net::SocketAddrV4, net::SocketAddrV4::new);
 
 #[cfg(feature = "std")]
-parse_socket_impl!(net::SocketAddrV6, |ip, port| net::SocketAddrV6::new(ip, port, 0, 0));
+parse_socket_impl!(net::SocketAddrV6, |ip, port| net::SocketAddrV6::new(
+    ip,
+    port,
+    0,
+    0
+));
 
 ////////////////////////////////////////////////////////////////////////////////
 
 #[cfg(feature = "std")]
 struct PathVisitor;
 
 #[cfg(feature = "std")]
 impl<'a> Visitor<'a> for PathVisitor {
@@ -1408,33 +1382,35 @@ impl<'de> Visitor<'de> for OsStringVisit
     fn visit_enum<A>(self, data: A) -> Result<OsString, A::Error>
     where
         A: EnumAccess<'de>,
     {
         use std::os::unix::ffi::OsStringExt;
 
         match try!(data.variant()) {
             (OsStringKind::Unix, v) => v.newtype_variant().map(OsString::from_vec),
-            (OsStringKind::Windows, _) => Err(Error::custom("cannot deserialize Windows OS string on Unix",),),
+            (OsStringKind::Windows, _) => Err(Error::custom(
+                "cannot deserialize Windows OS string on Unix",
+            )),
         }
     }
 
     #[cfg(windows)]
     fn visit_enum<A>(self, data: A) -> Result<OsString, A::Error>
     where
         A: EnumAccess<'de>,
     {
         use std::os::windows::ffi::OsStringExt;
 
         match try!(data.variant()) {
-            (OsStringKind::Windows, v) => {
-                v.newtype_variant::<Vec<u16>>()
-                    .map(|vec| OsString::from_wide(&vec))
-            }
-            (OsStringKind::Unix, _) => Err(Error::custom("cannot deserialize Unix OS string on Windows",),),
+            (OsStringKind::Windows, v) => v.newtype_variant::<Vec<u16>>()
+                .map(|vec| OsString::from_wide(&vec)),
+            (OsStringKind::Unix, _) => Err(Error::custom(
+                "cannot deserialize Unix OS string on Windows",
+            )),
         }
     }
 }
 
 #[cfg(all(feature = "std", any(unix, windows)))]
 impl<'de> Deserialize<'de> for OsString {
     fn deserialize<D>(deserializer: D) -> Result<OsString, D::Error>
     where
@@ -1750,23 +1726,27 @@ impl<'de> Deserialize<'de> for SystemTim
                 A: MapAccess<'de>,
             {
                 let mut secs: Option<u64> = None;
                 let mut nanos: Option<u32> = None;
                 while let Some(key) = try!(map.next_key()) {
                     match key {
                         Field::Secs => {
                             if secs.is_some() {
-                                return Err(<A::Error as Error>::duplicate_field("secs_since_epoch"));
+                                return Err(<A::Error as Error>::duplicate_field(
+                                    "secs_since_epoch",
+                                ));
                             }
                             secs = Some(try!(map.next_value()));
                         }
                         Field::Nanos => {
                             if nanos.is_some() {
-                                return Err(<A::Error as Error>::duplicate_field("nanos_since_epoch"));
+                                return Err(<A::Error as Error>::duplicate_field(
+                                    "nanos_since_epoch",
+                                ));
                             }
                             nanos = Some(try!(map.next_value()));
                         }
                     }
                 }
                 let secs = match secs {
                     Some(secs) => secs,
                     None => return Err(<A::Error as Error>::missing_field("secs_since_epoch")),
@@ -1920,17 +1900,23 @@ where
                     Some(end) => end,
                     None => return Err(<A::Error as Error>::missing_field("end")),
                 };
                 Ok(start..end)
             }
         }
 
         const FIELDS: &'static [&'static str] = &["start", "end"];
-        deserializer.deserialize_struct("Range", FIELDS, RangeVisitor { phantom: PhantomData })
+        deserializer.deserialize_struct(
+            "Range",
+            FIELDS,
+            RangeVisitor {
+                phantom: PhantomData,
+            },
+        )
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 
 #[cfg(feature = "unstable")]
 impl<'de, T> Deserialize<'de> for NonZero<T>
 where
@@ -1985,19 +1971,20 @@ where
 
                     fn visit_u32<E>(self, value: u32) -> Result<Field, E>
                     where
                         E: Error,
                     {
                         match value {
                             0 => Ok(Field::Ok),
                             1 => Ok(Field::Err),
-                            _ => {
-                                Err(Error::invalid_value(Unexpected::Unsigned(value as u64), &self),)
-                            }
+                            _ => Err(Error::invalid_value(
+                                Unexpected::Unsigned(value as u64),
+                                &self,
+                            )),
                         }
                     }
 
                     fn visit_str<E>(self, value: &str) -> Result<Field, E>
                     where
                         E: Error,
                     {
                         match value {
@@ -2009,24 +1996,22 @@ where
 
                     fn visit_bytes<E>(self, value: &[u8]) -> Result<Field, E>
                     where
                         E: Error,
                     {
                         match value {
                             b"Ok" => Ok(Field::Ok),
                             b"Err" => Ok(Field::Err),
-                            _ => {
-                                match str::from_utf8(value) {
-                                    Ok(value) => Err(Error::unknown_variant(value, VARIANTS)),
-                                    Err(_) => {
-                                        Err(Error::invalid_value(Unexpected::Bytes(value), &self))
-                                    }
+                            _ => match str::from_utf8(value) {
+                                Ok(value) => Err(Error::unknown_variant(value, VARIANTS)),
+                                Err(_) => {
+                                    Err(Error::invalid_value(Unexpected::Bytes(value), &self))
                                 }
-                            }
+                            },
                         }
                     }
                 }
 
                 deserializer.deserialize_identifier(FieldVisitor)
             }
         }
 
@@ -2060,17 +2045,17 @@ where
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 
 #[cfg(feature = "std")]
 impl<'de, T> Deserialize<'de> for Wrapping<T>
 where
-    T: Deserialize<'de>
+    T: Deserialize<'de>,
 {
     fn deserialize<D>(deserializer: D) -> Result<Wrapping<T>, D::Error>
     where
         D: Deserializer<'de>,
     {
         Deserialize::deserialize(deserializer).map(Wrapping)
     }
 }
--- a/third_party/rust/serde/src/de/mod.rs
+++ b/third_party/rust/serde/src/de/mod.rs
@@ -513,29 +513,29 @@ pub trait Deserialize<'de>: Sized {
     /// have been overwritten. Although whatever state that is will be
     /// memory-safe.
     ///
     /// This is generally useful when repeateadly deserializing values that
     /// are processed one at a time, where the value of `self` doesn't matter
     /// when the next deserialization occurs.
     ///
     /// If you manually implement this, your recursive deserializations should
-    /// use `deserialize_from`.
-    ///
-    /// TODO: example
+    /// use `deserialize_in_place`.
     ///
-    /// ```
-    /// // Something with a loop that returns on error.
-    ///
-    /// ```
-    fn deserialize_from<D>(&mut self, deserializer: D) -> Result<(), D::Error>
-        where D: Deserializer<'de>
+    /// This method is stable and an official public API, but hidden from the
+    /// documentation because it is almost never what newbies are looking for.
+    /// Showing it in rustdoc would cause it to be featured more prominently
+    /// than it deserves.
+    #[doc(hidden)]
+    fn deserialize_in_place<D>(deserializer: D, place: &mut Self) -> Result<(), D::Error>
+    where
+        D: Deserializer<'de>,
     {
         // Default implementation just delegates to `deserialize` impl.
-        *self = Deserialize::deserialize(deserializer)?;
+        *place = Deserialize::deserialize(deserializer)?;
         Ok(())
     }
 }
 
 /// A data structure that can be deserialized without borrowing any data from
 /// the deserializer.
 ///
 /// This is primarily useful for trait bounds on functions. For example a
@@ -1102,17 +1102,19 @@ pub trait Deserializer<'de>: Sized {
     ///
     /// The default implementation of this method returns `true`. Data formats
     /// may override this to `false` to request a compact form for types that
     /// support one. Note that modifying this method to change a format from
     /// human-readable to compact or vice versa should be regarded as a breaking
     /// change, as a value serialized in human-readable mode is not required to
     /// deserialize from the same data in compact mode.
     #[inline]
-    fn is_human_readable(&self) -> bool { true }
+    fn is_human_readable(&self) -> bool {
+        true
+    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 
 /// This trait represents a visitor that walks through a deserializer.
 ///
 /// ```rust
 /// # use std::fmt;
--- a/third_party/rust/serde/src/de/value.rs
+++ b/third_party/rust/serde/src/de/value.rs
@@ -32,17 +32,17 @@
 //!     }
 //! }
 //! #
 //! # fn main() {}
 //! ```
 
 use lib::*;
 
-use de::{self, IntoDeserializer, Expected, SeqAccess};
+use de::{self, Expected, IntoDeserializer, SeqAccess};
 use private::de::size_hint;
 use ser;
 use self::private::{First, Second};
 
 ////////////////////////////////////////////////////////////////////////////////
 
 /// A minimal representation of all possible errors that can occur using the
 /// `IntoDeserializer` trait.
@@ -57,17 +57,19 @@ type ErrorImpl = Box<str>;
 type ErrorImpl = ();
 
 impl de::Error for Error {
     #[cfg(any(feature = "std", feature = "alloc"))]
     fn custom<T>(msg: T) -> Self
     where
         T: Display,
     {
-        Error { err: msg.to_string().into_boxed_str() }
+        Error {
+            err: msg.to_string().into_boxed_str(),
+        }
     }
 
     #[cfg(not(any(feature = "std", feature = "alloc")))]
     fn custom<T>(msg: T) -> Self
     where
         T: Display,
     {
         let _ = msg;
@@ -107,17 +109,19 @@ impl error::Error for Error {
 
 impl<'de, E> IntoDeserializer<'de, E> for ()
 where
     E: de::Error,
 {
     type Deserializer = UnitDeserializer<E>;
 
     fn into_deserializer(self) -> UnitDeserializer<E> {
-        UnitDeserializer { marker: PhantomData }
+        UnitDeserializer {
+            marker: PhantomData,
+        }
     }
 }
 
 /// A deserializer holding a `()`.
 #[derive(Clone, Debug)]
 pub struct UnitDeserializer<E> {
     marker: PhantomData<E>,
 }
@@ -653,17 +657,20 @@ where
         while self.iter.next().is_some() {
             remaining += 1;
         }
         if remaining == 0 {
             Ok(())
         } else {
             // First argument is the number of elements in the data, second
             // argument is the number of elements expected by the Deserialize.
-            Err(de::Error::invalid_length(self.count + remaining, &ExpectedInSeq(self.count)),)
+            Err(de::Error::invalid_length(
+                self.count + remaining,
+                &ExpectedInSeq(self.count),
+            ))
         }
     }
 }
 
 impl<'de, I, T, E> de::Deserializer<'de> for SeqDeserializer<I, E>
 where
     I: Iterator<Item = T>,
     T: IntoDeserializer<'de, E>,
@@ -847,17 +854,20 @@ where
         while self.iter.next().is_some() {
             remaining += 1;
         }
         if remaining == 0 {
             Ok(())
         } else {
             // First argument is the number of elements in the data, second
             // argument is the number of elements expected by the Deserialize.
-            Err(de::Error::invalid_length(self.count + remaining, &ExpectedInMap(self.count)),)
+            Err(de::Error::invalid_length(
+                self.count + remaining,
+                &ExpectedInMap(self.count),
+            ))
         }
     }
 }
 
 impl<'de, I, E> MapDeserializer<'de, I, E>
 where
     I: Iterator,
     I::Item: private::Pair,
@@ -896,21 +906,17 @@ where
     where
         V: de::Visitor<'de>,
     {
         let value = try!(visitor.visit_seq(&mut self));
         try!(self.end());
         Ok(value)
     }
 
-    fn deserialize_tuple<V>(
-        self,
-        len: usize,
-        visitor: V,
-    ) -> Result<V::Value, Self::Error>
+    fn deserialize_tuple<V>(self, len: usize, visitor: V) -> Result<V::Value, Self::Error>
     where
         V: de::Visitor<'de>,
     {
         let _ = len;
         self.deserialize_seq(visitor)
     }
 
     forward_to_deserialize_any! {
@@ -1218,52 +1224,66 @@ mod private {
     use de::{self, Unexpected};
 
     #[derive(Clone, Debug)]
     pub struct UnitOnly<E> {
         marker: PhantomData<E>,
     }
 
     pub fn unit_only<T, E>(t: T) -> (T, UnitOnly<E>) {
-        (t, UnitOnly { marker: PhantomData })
+        (
+            t,
+            UnitOnly {
+                marker: PhantomData,
+            },
+        )
     }
 
     impl<'de, E> de::VariantAccess<'de> for UnitOnly<E>
     where
         E: de::Error,
     {
         type Error = E;
 
         fn unit_variant(self) -> Result<(), Self::Error> {
             Ok(())
         }
 
         fn newtype_variant_seed<T>(self, _seed: T) -> Result<T::Value, Self::Error>
         where
             T: de::DeserializeSeed<'de>,
         {
-            Err(de::Error::invalid_type(Unexpected::UnitVariant, &"newtype variant"),)
+            Err(de::Error::invalid_type(
+                Unexpected::UnitVariant,
+                &"newtype variant",
+            ))
         }
 
         fn tuple_variant<V>(self, _len: usize, _visitor: V) -> Result<V::Value, Self::Error>
         where
             V: de::Visitor<'de>,
         {
-            Err(de::Error::invalid_type(Unexpected::UnitVariant, &"tuple variant"),)
+            Err(de::Error::invalid_type(
+                Unexpected::UnitVariant,
+                &"tuple variant",
+            ))
         }
 
         fn struct_variant<V>(
             self,
             _fields: &'static [&'static str],
             _visitor: V,
         ) -> Result<V::Value, Self::Error>
         where
             V: de::Visitor<'de>,
         {
-            Err(de::Error::invalid_type(Unexpected::UnitVariant, &"struct variant"),)
+            Err(de::Error::invalid_type(
+                Unexpected::UnitVariant,
+                &"struct variant",
+            ))
         }
     }
 
     /// Avoid having to restate the generic types on `MapDeserializer`. The
     /// `Iterator::Item` contains enough information to figure out K and V.
     pub trait Pair {
         type First;
         type Second;
--- a/third_party/rust/serde/src/export.rs
+++ b/third_party/rust/serde/src/export.rs
@@ -7,17 +7,17 @@
 // except according to those terms.
 
 pub use lib::clone::Clone;
 pub use lib::convert::{From, Into};
 pub use lib::default::Default;
 pub use lib::fmt::{self, Formatter};
 pub use lib::marker::PhantomData;
 pub use lib::option::Option::{self, None, Some};
-pub use lib::result::Result::{self, Ok, Err};
+pub use lib::result::Result::{self, Err, Ok};
 
 pub use self::string::from_utf8_lossy;
 
 mod string {
     use lib::*;
 
     #[cfg(any(feature = "std", feature = "alloc"))]
     pub fn from_utf8_lossy(bytes: &[u8]) -> Cow<str> {
--- a/third_party/rust/serde/src/lib.rs
+++ b/third_party/rust/serde/src/lib.rs
@@ -74,40 +74,31 @@
 //! [Envy]: https://github.com/softprops/envy
 //! [Redis]: https://github.com/OneSignal/serde-redis
 //! [Cargo]: http://doc.crates.io/manifest.html
 //! [redis-rs]: https://crates.io/crates/redis
 
 ////////////////////////////////////////////////////////////////////////////////
 
 // Serde types in rustdoc of other crates get linked to here.
-#![doc(html_root_url = "https://docs.rs/serde/1.0.23")]
-
+#![doc(html_root_url = "https://docs.rs/serde/1.0.27")]
 // Support using Serde without the standard library!
 #![cfg_attr(not(feature = "std"), no_std)]
-
 // Unstable functionality only if the user asks for it. For tracking and
 // discussion of these features please refer to this issue:
 //
 //    https://github.com/serde-rs/serde/issues/812
 #![cfg_attr(feature = "unstable", feature(nonzero, specialization))]
 #![cfg_attr(feature = "alloc", feature(alloc))]
-
 #![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))]
 // Whitelisted clippy lints
-#![cfg_attr(feature = "cargo-clippy", allow(
-    cast_lossless,
-    const_static_lifetime,
-    doc_markdown,
-    linkedlist,
-    needless_pass_by_value,
-    type_complexity,
-    unreadable_literal,
-    zero_prefixed_literal,
-))]
+#![cfg_attr(feature = "cargo-clippy",
+            allow(cast_lossless, const_static_lifetime, doc_markdown, linkedlist,
+                  needless_pass_by_value, type_complexity, unreadable_literal,
+                  zero_prefixed_literal))]
 // Whitelisted clippy_pedantic lints
 #![cfg_attr(feature = "cargo-clippy", allow(
 // integer and float ser/de requires these sorts of casts
     cast_possible_truncation,
     cast_possible_wrap,
     cast_precision_loss,
     cast_sign_loss,
 // simplifies some macros
@@ -120,17 +111,16 @@
     stutter,
     use_self,
 // not practical
     missing_docs_in_private_items,
 // alternative is not stable
     empty_enum,
     use_debug,
 ))]
-
 // Blacklisted Rust lints.
 #![deny(missing_docs, unused_imports)]
 
 ////////////////////////////////////////////////////////////////////////////////
 
 #[cfg(feature = "alloc")]
 extern crate alloc;
 
@@ -144,18 +134,18 @@ mod lib {
     mod core {
         #[cfg(feature = "std")]
         pub use std::*;
         #[cfg(not(feature = "std"))]
         pub use core::*;
     }
 
     pub use self::core::{cmp, iter, mem, ops, slice, str};
-    pub use self::core::{i8, i16, i32, i64, isize};
-    pub use self::core::{u8, u16, u32, u64, usize};
+    pub use self::core::{isize, i16, i32, i64, i8};
+    pub use self::core::{usize, u16, u32, u64, u8};
     pub use self::core::{f32, f64};
 
     pub use self::core::cell::{Cell, RefCell};
     pub use self::core::clone::{self, Clone};
     pub use self::core::convert::{self, From, Into};
     pub use self::core::default::{self, Default};
     pub use self::core::fmt::{self, Debug, Display};
     pub use self::core::marker::{self, PhantomData};
@@ -188,29 +178,29 @@ mod lib {
     pub use alloc::rc::Rc;
 
     #[cfg(all(feature = "rc", feature = "std"))]
     pub use std::sync::Arc;
     #[cfg(all(feature = "rc", feature = "alloc", not(feature = "std")))]
     pub use alloc::arc::Arc;
 
     #[cfg(feature = "std")]
-    pub use std::collections::{BinaryHeap, BTreeMap, BTreeSet, LinkedList, VecDeque};
+    pub use std::collections::{BTreeMap, BTreeSet, BinaryHeap, LinkedList, VecDeque};
     #[cfg(all(feature = "alloc", not(feature = "std")))]
-    pub use alloc::{BinaryHeap, BTreeMap, BTreeSet, LinkedList, VecDeque};
+    pub use alloc::{BTreeMap, BTreeSet, BinaryHeap, LinkedList, VecDeque};
 
     #[cfg(feature = "std")]
     pub use std::{error, net};
 
     #[cfg(feature = "std")]
     pub use std::collections::{HashMap, HashSet};
     #[cfg(feature = "std")]
-    pub use std::ffi::{CString, CStr, OsString, OsStr};
+    pub use std::ffi::{CStr, CString, OsStr, OsString};
     #[cfg(feature = "std")]
-    pub use std::hash::{Hash, BuildHasher};
+    pub use std::hash::{BuildHasher, Hash};
     #[cfg(feature = "std")]
     pub use std::io::Write;
     #[cfg(feature = "std")]
     pub use std::num::Wrapping;
     #[cfg(feature = "std")]
     pub use std::path::{Path, PathBuf};
     #[cfg(feature = "std")]
     pub use std::time::{Duration, SystemTime, UNIX_EPOCH};
--- a/third_party/rust/serde/src/private/de.rs
+++ b/third_party/rust/serde/src/private/de.rs
@@ -3,26 +3,26 @@
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 use lib::*;
 
-use de::{Deserialize, Deserializer, DeserializeSeed, IntoDeserializer, Error, Visitor};
+use de::{Deserialize, DeserializeSeed, Deserializer, Error, IntoDeserializer, Visitor};
 
 #[cfg(any(feature = "std", feature = "alloc"))]
 use de::Unexpected;
 
 #[cfg(any(feature = "std", feature = "alloc"))]
-pub use self::content::{Content, ContentRefDeserializer, ContentDeserializer,
-                        TaggedContentVisitor, TagOrContentField, TagOrContentFieldVisitor,
-                        TagContentOtherField, TagContentOtherFieldVisitor,
-                        InternallyTaggedUnitVisitor, UntaggedUnitVisitor};
+pub use self::content::{Content, ContentDeserializer, ContentRefDeserializer,
+                        InternallyTaggedUnitVisitor, TagContentOtherField,
+                        TagContentOtherFieldVisitor, TagOrContentField, TagOrContentFieldVisitor,
+                        TaggedContentVisitor, UntaggedUnitVisitor};
 
 /// If the missing field is of type `Option<T>` then treat is as `None`,
 /// otherwise it is an error.
 pub fn missing_field<'de, V, E>(field: &'static str) -> Result<V, E>
 where
     V: Deserialize<'de>,
     E: Error,
 {
@@ -115,17 +115,20 @@ where
         }
 
         fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<Self::Value, E>
         where
             E: Error,
         {
             match String::from_utf8(v) {
                 Ok(s) => Ok(Cow::Owned(s)),
-                Err(e) => Err(Error::invalid_value(Unexpected::Bytes(&e.into_bytes()), &self),),
+                Err(e) => Err(Error::invalid_value(
+                    Unexpected::Bytes(&e.into_bytes()),
+                    &self,
+                )),
             }
         }
     }
 
     deserializer.deserialize_str(CowStrVisitor)
 }
 
 #[cfg(any(feature = "std", feature = "alloc"))]
@@ -220,18 +223,18 @@ mod content {
     // worry about backward compatibility for the `untagged` and `tag` attributes
     // rather than for this entire mechanism.
     //
     // This issue is tracking making some of this stuff public:
     // https://github.com/serde-rs/serde/issues/741
 
     use lib::*;
 
-    use de::{self, Deserialize, DeserializeSeed, Deserializer, Visitor, SeqAccess, MapAccess,
-             EnumAccess, Unexpected};
+    use de::{self, Deserialize, DeserializeSeed, Deserializer, EnumAccess, MapAccess, SeqAccess,
+             Unexpected, Visitor};
     use super::size_hint;
 
     /// Used from generated code to buffer the contents of the Deserializer when
     /// deserializing untagged enums and internally tagged enums.
     ///
     /// Not public API. Use serde-value instead.
     #[derive(Debug)]
     pub enum Content<'de> {
@@ -497,17 +500,19 @@ mod content {
             }
             Ok(Content::Map(vec))
         }
 
         fn visit_enum<V>(self, _visitor: V) -> Result<Self::Value, V::Error>
         where
             V: EnumAccess<'de>,
         {
-            Err(de::Error::custom("untagged and internally tagged enums do not support enum input",),)
+            Err(de::Error::custom(
+                "untagged and internally tagged enums do not support enum input",
+            ))
         }
     }
 
     /// This is the type of the map keys in an internally tagged enum.
     ///
     /// Not public API.
     pub enum TagOrContent<'de> {
         Tag,
@@ -516,17 +521,20 @@ mod content {
 
     struct TagOrContentVisitor<'de> {
         name: &'static str,
         value: PhantomData<TagOrContent<'de>>,
     }
 
     impl<'de> TagOrContentVisitor<'de> {
         fn new(name: &'static str) -> Self {
-            TagOrContentVisitor { name: name, value: PhantomData }
+            TagOrContentVisitor {
+                name: name,
+                value: PhantomData,
+            }
         }
     }
 
     impl<'de> DeserializeSeed<'de> for TagOrContentVisitor<'de> {
         type Value = TagOrContent<'de>;
 
         fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
         where
@@ -553,17 +561,19 @@ mod content {
                 .visit_bool(value)
                 .map(TagOrContent::Content)
         }
 
         fn visit_i8<F>(self, value: i8) -> Result<Self::Value, F>
         where
             F: de::Error,
         {
-            ContentVisitor::new().visit_i8(value).map(TagOrContent::Content)
+            ContentVisitor::new()
+                .visit_i8(value)
+                .map(TagOrContent::Content)
         }
 
         fn visit_i16<F>(self, value: i16) -> Result<Self::Value, F>
         where
             F: de::Error,
         {
             ContentVisitor::new()
                 .visit_i16(value)
@@ -587,17 +597,19 @@ mod content {
                 .visit_i64(value)
                 .map(TagOrContent::Content)
         }
 
         fn visit_u8<F>(self, value: u8) -> Result<Self::Value, F>
         where
             F: de::Error,
         {
-            ContentVisitor::new().visit_u8(value).map(TagOrContent::Content)
+            ContentVisitor::new()
+                .visit_u8(value)
+                .map(TagOrContent::Content)
         }
 
         fn visit_u16<F>(self, value: u16) -> Result<Self::Value, F>
         where
             F: de::Error,
         {
             ContentVisitor::new()
                 .visit_u16(value)
@@ -726,24 +738,28 @@ mod content {
                     .map(TagOrContent::Content)
             }
         }
 
         fn visit_unit<F>(self) -> Result<Self::Value, F>
         where
             F: de::Error,
         {
-            ContentVisitor::new().visit_unit().map(TagOrContent::Content)
+            ContentVisitor::new()
+                .visit_unit()
+                .map(TagOrContent::Content)
         }
 
         fn visit_none<F>(self) -> Result<Self::Value, F>
         where
             F: de::Error,
         {
-            ContentVisitor::new().visit_none().map(TagOrContent::Content)
+            ContentVisitor::new()
+                .visit_none()
+                .map(TagOrContent::Content)
         }
 
         fn visit_some<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
         where
             D: Deserializer<'de>,
         {
             ContentVisitor::new()
                 .visit_some(deserializer)
@@ -856,41 +872,36 @@ mod content {
         }
 
         fn visit_map<M>(self, mut map: M) -> Result<Self::Value, M::Error>
         where
             M: MapAccess<'de>,
         {
             let mut tag = None;
             let mut vec = Vec::with_capacity(size_hint::cautious(map.size_hint()));
-            while let Some(k) =
-                try!(map.next_key_seed(TagOrContentVisitor::new(self.tag_name))) {
+            while let Some(k) = try!(map.next_key_seed(TagOrContentVisitor::new(self.tag_name))) {
                 match k {
                     TagOrContent::Tag => {
                         if tag.is_some() {
                             return Err(de::Error::duplicate_field(self.tag_name));
                         }
                         tag = Some(try!(map.next_value()));
                     }
                     TagOrContent::Content(k) => {
                         let v = try!(map.next_value());
                         vec.push((k, v));
                     }
                 }
             }
             match tag {
                 None => Err(de::Error::missing_field(self.tag_name)),
-                Some(tag) => {
-                    Ok(
-                        TaggedContent {
-                            tag: tag,
-                            content: Content::Map(vec),
-                        },
-                    )
-                }
+                Some(tag) => Ok(TaggedContent {
+                    tag: tag,
+                    content: Content::Map(vec),
+                }),
             }
         }
     }
 
     /// Used by generated code to deserialize an adjacently tagged enum.
     ///
     /// Not public API.
     pub enum TagOrContentField {
@@ -962,17 +973,21 @@ mod content {
             deserializer.deserialize_str(self)
         }
     }
 
     impl<'de> Visitor<'de> for TagContentOtherFieldVisitor {
         type Value = TagContentOtherField;
 
         fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
-            write!(formatter, "{:?}, {:?}, or other ignored fields", self.tag, self.content)
+            write!(
+                formatter,
+                "{:?}, {:?}, or other ignored fields",
+                self.tag, self.content
+            )
         }
 
         fn visit_str<E>(self, field: &str) -> Result<Self::Value, E>
         where
             E: de::Error,
         {
             if field == self.tag {
                 Ok(TagContentOtherField::Tag)
@@ -1026,20 +1041,18 @@ mod content {
                 Content::Seq(v) => {
                     let seq = v.into_iter().map(ContentDeserializer::new);
                     let mut seq_visitor = de::value::SeqDeserializer::new(seq);
                     let value = try!(visitor.visit_seq(&mut seq_visitor));
                     try!(seq_visitor.end());
                     Ok(value)
                 }
                 Content::Map(v) => {
-                    let map = v.into_iter().map(|(k, v)| {
-                                                    (ContentDeserializer::new(k),
-                                                    ContentDeserializer::new(v))
-                                                });
+                    let map = v.into_iter()
+                        .map(|(k, v)| (ContentDeserializer::new(k), ContentDeserializer::new(v)));
                     let mut map_visitor = de::value::MapDeserializer::new(map);
                     let value = try!(visitor.visit_map(&mut map_visitor));
                     try!(map_visitor.end());
                     Ok(value)
                 }
             }
         }
 
@@ -1076,54 +1089,51 @@ mod content {
             V: Visitor<'de>,
         {
             let (variant, value) = match self.content {
                 Content::Map(value) => {
                     let mut iter = value.into_iter();
                     let (variant, value) = match iter.next() {
                         Some(v) => v,
                         None => {
-                            return Err(
-                                de::Error::invalid_value(
-                                    de::Unexpected::Map,
-                                    &"map with a single key",
-                                ),
-                            );
+                            return Err(de::Error::invalid_value(
+                                de::Unexpected::Map,
+                                &"map with a single key",
+                            ));
                         }
                     };
                     // enums are encoded in json as maps with a single key:value pair
                     if iter.next().is_some() {
-                        return Err(
-                            de::Error::invalid_value(
-                                de::Unexpected::Map,
-                                &"map with a single key",
-                            ),
-                        );
+                        return Err(de::Error::invalid_value(
+                            de::Unexpected::Map,
+                            &"map with a single key",
+                        ));
                     }
                     (variant, Some(value))
                 }
                 s @ Content::String(_) | s @ Content::Str(_) => (s, None),
                 other => {
-                    return Err(de::Error::invalid_type(other.unexpected(), &"string or map"),);
+                    return Err(de::Error::invalid_type(
+                        other.unexpected(),
+                        &"string or map",
+                    ));
                 }
             };
 
-            visitor.visit_enum(
-                EnumDeserializer {
-                    variant: variant,
-                    value: value,
-                    err: PhantomData,
-                },
-            )
+            visitor.visit_enum(EnumDeserializer {
+                variant: variant,
+                value: value,
+                err: PhantomData,
+            })
         }
 
         fn deserialize_unit_struct<V>(
             self,
             _name: &'static str,
-            visitor: V
+            visitor: V,
         ) -> Result<V::Value, Self::Error>
         where
             V: Visitor<'de>,
         {
             match self.content {
                 // As a special case, allow deserializing untagged newtype
                 // variant containing unit struct.
                 //
@@ -1211,32 +1221,39 @@ mod content {
         }
 
         fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value, E>
         where
             T: de::DeserializeSeed<'de>,
         {
             match self.value {
                 Some(value) => seed.deserialize(ContentDeserializer::new(value)),
-                None => {
-                    Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"newtype variant"),)
-                }
+                None => Err(de::Error::invalid_type(
+                    de::Unexpected::UnitVariant,
+                    &"newtype variant",
+                )),
             }
         }
 
         fn tuple_variant<V>(self, _len: usize, visitor: V) -> Result<V::Value, Self::Error>
         where
             V: de::Visitor<'de>,
         {
             match self.value {
                 Some(Content::Seq(v)) => {
                     de::Deserializer::deserialize_any(SeqDeserializer::new(v), visitor)
                 }
-                Some(other) => Err(de::Error::invalid_type(other.unexpected(), &"tuple variant"),),
-                None => Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"tuple variant"),),
+                Some(other) => Err(de::Error::invalid_type(
+                    other.unexpected(),
+                    &"tuple variant",
+                )),
+                None => Err(de::Error::invalid_type(
+                    de::Unexpected::UnitVariant,
+                    &"tuple variant",
+                )),
             }
         }
 
         fn struct_variant<V>(
             self,
             _fields: &'static [&'static str],
             visitor: V,
         ) -> Result<V::Value, Self::Error>
@@ -1245,18 +1262,24 @@ mod content {
         {
             match self.value {
                 Some(Content::Map(v)) => {
                     de::Deserializer::deserialize_any(MapDeserializer::new(v), visitor)
                 }
                 Some(Content::Seq(v)) => {
                     de::Deserializer::deserialize_any(SeqDeserializer::new(v), visitor)
                 }
-                Some(other) => Err(de::Error::invalid_type(other.unexpected(), &"struct variant"),),
-                _ => Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"struct variant"),),
+                Some(other) => Err(de::Error::invalid_type(
+                    other.unexpected(),
+                    &"struct variant",
+                )),
+                _ => Err(de::Error::invalid_type(
+                    de::Unexpected::UnitVariant,
+                    &"struct variant",
+                )),
             }
         }
     }
 
     struct SeqDeserializer<'de, E>
     where
         E: de::Error,
     {
@@ -1314,20 +1337,17 @@ mod content {
     {
         type Error = E;
 
         fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
         where
             T: de::DeserializeSeed<'de>,
         {
             match self.iter.next() {
-                Some(value) => {
-                    seed.deserialize(ContentDeserializer::new(value))
-                        .map(Some)
-                }
+                Some(value) => seed.deserialize(ContentDeserializer::new(value)).map(Some),
                 None => Ok(None),
             }
         }
 
         fn size_hint(&self) -> Option<usize> {
             size_hint::from_bounds(&self.iter)
         }
     }
@@ -1453,22 +1473,22 @@ mod content {
                 Content::Seq(ref v) => {
                     let seq = v.into_iter().map(ContentRefDeserializer::new);
                     let mut seq_visitor = de::value::SeqDeserializer::new(seq);
                     let value = try!(visitor.visit_seq(&mut seq_visitor));
                     try!(seq_visitor.end());
                     Ok(value)
                 }
                 Content::Map(ref v) => {
-                    let map = v.into_iter()
-                        .map(
-                            |&(ref k, ref v)| {
-                                (ContentRefDeserializer::new(k), ContentRefDeserializer::new(v))
-                            },
-                        );
+                    let map = v.into_iter().map(|&(ref k, ref v)| {
+                        (
+                            ContentRefDeserializer::new(k),
+                            ContentRefDeserializer::new(v),
+                        )
+                    });
                     let mut map_visitor = de::value::MapDeserializer::new(map);
                     let value = try!(visitor.visit_map(&mut map_visitor));
                     try!(map_visitor.end());
                     Ok(value)
                 }
             }
         }
 
@@ -1501,48 +1521,45 @@ mod content {
             V: Visitor<'de>,
         {
             let (variant, value) = match *self.content {
                 Content::Map(ref value) => {
                     let mut iter = value.into_iter();
                     let &(ref variant, ref value) = match iter.next() {
                         Some(v) => v,
                         None => {
-                            return Err(
-                                de::Error::invalid_value(
-                                    de::Unexpected::Map,
-                                    &"map with a single key",
-                                ),
-                            );
+                            return Err(de::Error::invalid_value(
+                                de::Unexpected::Map,
+                                &"map with a single key",
+                            ));
                         }
                     };
                     // enums are encoded in json as maps with a single key:value pair
                     if iter.next().is_some() {
-                        return Err(
-                            de::Error::invalid_value(
-                                de::Unexpected::Map,
-                                &"map with a single key",
-                            ),
-                        );
+                        return Err(de::Error::invalid_value(
+                            de::Unexpected::Map,
+                            &"map with a single key",
+                        ));
                     }
                     (variant, Some(value))
                 }
                 ref s @ Content::String(_) | ref s @ Content::Str(_) => (s, None),
                 ref other => {
-                    return Err(de::Error::invalid_type(other.unexpected(), &"string or map"),);
+                    return Err(de::Error::invalid_type(
+                        other.unexpected(),
+                        &"string or map",
+                    ));
                 }
             };
 
-            visitor.visit_enum(
-                EnumRefDeserializer {
-                    variant: variant,
-                    value: value,
-                    err: PhantomData,
-                },
-            )
+            visitor.visit_enum(EnumRefDeserializer {
+                variant: variant,
+                value: value,
+                err: PhantomData,
+            })
         }
 
         forward_to_deserialize_any! {
             bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
             byte_buf unit unit_struct seq tuple tuple_struct map struct
             identifier ignored_any
         }
     }
@@ -1608,32 +1625,39 @@ mod content {
         }
 
         fn newtype_variant_seed<T>(self, seed: T) -> Result<T::Value, E>
         where
             T: de::DeserializeSeed<'de>,
         {
             match self.value {
                 Some(value) => seed.deserialize(ContentRefDeserializer::new(value)),
-                None => {
-                    Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"newtype variant"),)
-                }
+                None => Err(de::Error::invalid_type(
+                    de::Unexpected::UnitVariant,
+                    &"newtype variant",
+                )),
             }
         }
 
         fn tuple_variant<V>(self, _len: usize, visitor: V) -> Result<V::Value, Self::Error>
         where
             V: de::Visitor<'de>,
         {
             match self.value {
                 Some(&Content::Seq(ref v)) => {
                     de::Deserializer::deserialize_any(SeqRefDeserializer::new(v), visitor)
                 }
-                Some(other) => Err(de::Error::invalid_type(other.unexpected(), &"tuple variant"),),
-                None => Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"tuple variant"),),
+                Some(other) => Err(de::Error::invalid_type(
+                    other.unexpected(),
+                    &"tuple variant",
+                )),
+                None => Err(de::Error::invalid_type(
+                    de::Unexpected::UnitVariant,
+                    &"tuple variant",
+                )),
             }
         }
 
         fn struct_variant<V>(
             self,
             _fields: &'static [&'static str],
             visitor: V,
         ) -> Result<V::Value, Self::Error>
@@ -1642,18 +1666,24 @@ mod content {
         {
             match self.value {
                 Some(&Content::Map(ref v)) => {
                     de::Deserializer::deserialize_any(MapRefDeserializer::new(v), visitor)
                 }
                 Some(&Content::Seq(ref v)) => {
                     de::Deserializer::deserialize_any(SeqRefDeserializer::new(v), visitor)
                 }
-                Some(other) => Err(de::Error::invalid_type(other.unexpected(), &"struct variant"),),
-                _ => Err(de::Error::invalid_type(de::Unexpected::UnitVariant, &"struct variant"),),
+                Some(other) => Err(de::Error::invalid_type(
+                    other.unexpected(),
+                    &"struct variant",
+                )),
+                _ => Err(de::Error::invalid_type(
+                    de::Unexpected::UnitVariant,
+                    &"struct variant",
+                )),
             }
         }
     }
 
     struct SeqRefDeserializer<'a, 'de: 'a, E>
     where
         E: de::Error,
     {
@@ -1711,20 +1741,18 @@ mod content {
     {
         type Error = E;
 
         fn next_element_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
         where
             T: de::DeserializeSeed<'de>,
         {
             match self.iter.next() {
-                Some(value) => {
-                    seed.deserialize(ContentRefDeserializer::new(value))
-                        .map(Some)
-                }
+                Some(value) => seed.deserialize(ContentRefDeserializer::new(value))
+                    .map(Some),
                 None => Ok(None),
             }
         }
 
         fn size_hint(&self) -> Option<usize> {
             size_hint::from_bounds(&self.iter)
         }
     }
@@ -1759,18 +1787,17 @@ mod content {
 
         fn next_key_seed<T>(&mut self, seed: T) -> Result<Option<T::Value>, Self::Error>
         where
             T: de::DeserializeSeed<'de>,
         {
             match self.iter.next() {
                 Some(&(ref key, ref value)) => {
                     self.value = Some(value);
-                    seed.deserialize(ContentRefDeserializer::new(key))
-                        .map(Some)
+                    seed.deserialize(ContentRefDeserializer::new(key)).map(Some)
                 }
                 None => Ok(None),
             }
         }
 
         fn next_value_seed<T>(&mut self, seed: T) -> Result<T::Value, Self::Error>
         where
             T: de::DeserializeSeed<'de>,
@@ -1846,17 +1873,21 @@ mod content {
             }
         }
     }
 
     impl<'de, 'a> Visitor<'de> for InternallyTaggedUnitVisitor<'a> {
         type Value = ();
 
         fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
-            write!(formatter, "unit variant {}::{}", self.type_name, self.variant_name)
+            write!(
+                formatter,
+                "unit variant {}::{}",
+                self.type_name, self.variant_name
+            )
         }
 
         fn visit_seq<S>(self, _: S) -> Result<(), S::Error>
         where
             S: SeqAccess<'de>,
         {
             Ok(())
         }
@@ -1886,17 +1917,21 @@ mod content {
             }
         }
     }
 
     impl<'de, 'a> Visitor<'de> for UntaggedUnitVisitor<'a> {
         type Value = ();
 
         fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
-            write!(formatter, "unit variant {}::{}", self.type_name, self.variant_name)
+            write!(
+                formatter,
+                "unit variant {}::{}",
+                self.type_name, self.variant_name
+            )
         }
 
         fn visit_unit<E>(self) -> Result<(), E>
         where
             E: de::Error,
         {
             Ok(())
         }
@@ -2005,24 +2040,25 @@ where
 
     forward_to_deserialize_any! {
         bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 char str string bytes
         byte_buf option unit unit_struct newtype_struct seq tuple tuple_struct
         map struct enum identifier ignored_any
     }
 }
 
-/// A DeserializeSeed helper for implementing deserialize_from Visitors.
+/// A DeserializeSeed helper for implementing deserialize_in_place Visitors.
 ///
-/// Wraps a mutable reference and calls deserialize_from on it.
-pub struct DeserializeFromSeed<'a, T: 'a>(pub &'a mut T);
+/// Wraps a mutable reference and calls deserialize_in_place on it.
+pub struct InPlaceSeed<'a, T: 'a>(pub &'a mut T);
 
-impl<'a, 'de, T> DeserializeSeed<'de> for DeserializeFromSeed<'a, T>
-    where T: Deserialize<'de>,
+impl<'a, 'de, T> DeserializeSeed<'de> for InPlaceSeed<'a, T>
+where
+    T: Deserialize<'de>,
 {
     type Value = ();
     fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
     where
         D: Deserializer<'de>,
     {
-       self.0.deserialize_from(deserializer)
+        T::deserialize_in_place(deserializer, self.0)
     }
 }
--- a/third_party/rust/serde/src/private/ser.rs
+++ b/third_party/rust/serde/src/private/ser.rs
@@ -3,20 +3,20 @@
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 use lib::*;
 
-use ser::{self, Serialize, Serializer, SerializeMap, SerializeStruct, Impossible};
+use ser::{self, Impossible, Serialize, SerializeMap, SerializeStruct, Serializer};
 
 #[cfg(any(feature = "std", feature = "alloc"))]
-use self::content::{SerializeTupleVariantAsMapValue, SerializeStructVariantAsMapValue};
+use self::content::{SerializeStructVariantAsMapValue, SerializeTupleVariantAsMapValue};
 
 /// Used to check that serde(getter) attributes return the expected type.
 /// Not public API.
 pub fn constrain<T: ?Sized>(t: &T) -> &T {
     t
 }
 
 /// Not public API.
@@ -27,25 +27,23 @@ pub fn serialize_tagged_newtype<S, T>(
     tag: &'static str,
     variant_name: &'static str,
     value: &T,
 ) -> Result<S::Ok, S::Error>
 where
     S: Serializer,
     T: Serialize,
 {
-    value.serialize(
-        TaggedSerializer {
-            type_ident: type_ident,
-            variant_ident: variant_ident,
-            tag: tag,
-            variant_name: variant_name,
-            delegate: serializer,
-        },
-    )
+    value.serialize(TaggedSerializer {
+        type_ident: type_ident,
+        variant_ident: variant_ident,
+        tag: tag,
+        variant_name: variant_name,
+        delegate: serializer,
+    })
 }
 
 struct TaggedSerializer<S> {
     type_ident: &'static str,
     variant_ident: &'static str,
     tag: &'static str,
     variant_name: &'static str,
     delegate: S,
@@ -87,23 +85,20 @@ impl Display for Unsupported {
     }
 }
 
 impl<S> TaggedSerializer<S>
 where
     S: Serializer,
 {
     fn bad_type(self, what: Unsupported) -> S::Error {
-        ser::Error::custom(
-            format_args!(
+        ser::Error::custom(format_args!(
             "cannot serialize tagged newtype variant {}::{} containing {}",
-            self.type_ident,
-            self.variant_ident,
-            what),
-        )
+            self.type_ident, self.variant_ident, what
+        ))
     }
 }
 
 impl<S> Serializer for TaggedSerializer<S>
 where
     S: Serializer,
 {
     type Ok = S::Ok;
@@ -276,17 +271,21 @@ where
         _: &'static str,
         _: u32,
         inner_variant: &'static str,
         len: usize,
     ) -> Result<Self::SerializeTupleVariant, Self::Error> {
         let mut map = try!(self.delegate.serialize_map(Some(2)));
         try!(map.serialize_entry(self.tag, self.variant_name));
         try!(map.serialize_key(inner_variant));
-        Ok(SerializeTupleVariantAsMapValue::new(map, inner_variant, len),)
+        Ok(SerializeTupleVariantAsMapValue::new(
+            map,
+            inner_variant,
+            len,
+        ))
     }
 
     fn serialize_map(self, len: Option<usize>) -> Result<Self::SerializeMap, Self::Error> {
         let mut map = try!(self.delegate.serialize_map(len.map(|len| len + 1)));
         try!(map.serialize_entry(self.tag, self.variant_name));
         Ok(map)
     }
 
@@ -319,17 +318,21 @@ where
         _: &'static str,
         _: u32,
         inner_variant: &'static str,
         len: usize,
     ) -> Result<Self::SerializeStructVariant, Self::Error> {
         let mut map = try!(self.delegate.serialize_map(Some(2)));
         try!(map.serialize_entry(self.tag, self.variant_name));
         try!(map.serialize_key(inner_variant));
-        Ok(SerializeStructVariantAsMapValue::new(map, inner_variant, len),)
+        Ok(SerializeStructVariantAsMapValue::new(
+            map,
+            inner_variant,
+            len,
+        ))
     }
 
     #[cfg(not(any(feature = "std", feature = "alloc")))]
     fn collect_str<T: ?Sized>(self, _: &T) -> Result<Self::Ok, Self::Error>
     where
         T: Display,
     {
         Err(self.bad_type(Unsupported::String))
@@ -397,17 +400,20 @@ mod content {
             T: Serialize,
         {
             let value = try!(value.serialize(ContentSerializer::<M::Error>::new()));
             self.fields.push(value);
             Ok(())
         }
 
         fn end(mut self) -> Result<M::Ok, M::Error> {
-            try!(self.map.serialize_value(&Content::TupleStruct(self.name, self.fields)));
+            try!(
+                self.map
+                    .serialize_value(&Content::TupleStruct(self.name, self.fields))
+            );
             self.map.end()
         }
     }
 
     pub struct SerializeStructVariantAsMapValue<M> {
         map: M,
         name: &'static str,
         fields: Vec<(&'static str, Content)>,
@@ -439,17 +445,20 @@ mod content {
             T: Serialize,
         {
             let value = try!(value.serialize(ContentSerializer::<M::Error>::new()));
             self.fields.push((key, value));
             Ok(())
         }
 
         fn end(mut self) -> Result<M::Ok, M::Error> {
-            try!(self.map.serialize_value(&Content::Struct(self.name, self.fields)));
+            try!(
+                self.map
+                    .serialize_value(&Content::Struct(self.name, self.fields))
+            );
             self.map.end()
         }
     }
 
     #[derive(Debug)]
     enum Content {
         Bool(bool),
 
@@ -480,17 +489,22 @@ mod content {
         NewtypeVariant(&'static str, u32, &'static str, Box<Content>),
 
         Seq(Vec<Content>),
         Tuple(Vec<Content>),
         TupleStruct(&'static str, Vec<Content>),
         TupleVariant(&'static str, u32, &'static str, Vec<Content>),
         Map(Vec<(Content, Content)>),
         Struct(&'static str, Vec<(&'static str, Content)>),
-        StructVariant(&'static str, u32, &'static str, Vec<(&'static str, Content)>),
+        StructVariant(
+            &'static str,
+            u32,
+            &'static str,
+            Vec<(&'static str, Content)>,
+        ),
     }
 
     impl Serialize for Content {
         fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
         where
             S: Serializer,
         {
             match *self {
@@ -682,129 +696,116 @@ mod content {
         fn serialize_newtype_struct<T: ?Sized>(
             self,
             name: &'static str,
             value: &T,
         ) -> Result<Content, E>
         where
             T: Serialize,
         {
-            Ok(Content::NewtypeStruct(name, Box::new(try!(value.serialize(self)))),)
+            Ok(Content::NewtypeStruct(
+                name,
+                Box::new(try!(value.serialize(self))),
+            ))
         }
 
         fn serialize_newtype_variant<T: ?Sized>(
             self,
             name: &'static str,
             variant_index: u32,
             variant: &'static str,
             value: &T,
         ) -> Result<Content, E>
         where
             T: Serialize,
         {
-            Ok(
-                Content::NewtypeVariant(
-                    name,
-                    variant_index,
-                    variant,
-                    Box::new(try!(value.serialize(self))),
-                ),
-            )
+            Ok(Content::NewtypeVariant(
+                name,
+                variant_index,
+                variant,
+                Box::new(try!(value.serialize(self))),
+            ))
         }
 
         fn serialize_seq(self, len: Option<usize>) -> Result<Self::SerializeSeq, E> {
-            Ok(
-                SerializeSeq {
-                    elements: Vec::with_capacity(len.unwrap_or(0)),
-                    error: PhantomData,
-                },
-            )
+            Ok(SerializeSeq {
+                elements: Vec::with_capacity(len.unwrap_or(0)),
+                error: PhantomData,
+            })
         }
 
         fn serialize_tuple(self, len: usize) -> Result<Self::SerializeTuple, E> {
-            Ok(
-                SerializeTuple {
-                    elements: Vec::with_capacity(len),
-                    error: PhantomData,
-                },
-            )
+            Ok(SerializeTuple {
+                elements: Vec::with_capacity(len),
+                error: PhantomData,
+            })
         }
 
         fn serialize_tuple_struct(
             self,
             name: &'static str,
             len: usize,
         ) -> Result<Self::SerializeTupleStruct, E> {
-            Ok(
-                SerializeTupleStruct {
-                    name: name,
-                    fields: Vec::with_capacity(len),
-                    error: PhantomData,
-                },
-            )
+            Ok(SerializeTupleStruct {
+                name: name,
+                fields: Vec::with_capacity(len),
+                error: PhantomData,
+            })
         }
 
         fn serialize_tuple_variant(
             self,
             name: &'static str,
             variant_index: u32,
             variant: &'static str,
             len: usize,
         ) -> Result<Self::SerializeTupleVariant, E> {
-            Ok(
-                SerializeTupleVariant {
-                    name: name,
-                    variant_index: variant_index,
-                    variant: variant,
-                    fields: Vec::with_capacity(len),
-                    error: PhantomData,
-                },
-            )
+            Ok(SerializeTupleVariant {
+                name: name,
+                variant_index: variant_index,
+                variant: variant,
+                fields: Vec::with_capacity(len),
+                error: PhantomData,
+            })
         }
 
         fn serialize_map(self, len: Option<usize>) -> Result<Self::SerializeMap, E> {
-            Ok(
-                SerializeMap {
-                    entries: Vec::with_capacity(len.unwrap_or(0)),
-                    key: None,
-                    error: PhantomData,
-                },
-            )
+            Ok(SerializeMap {
+                entries: Vec::with_capacity(len.unwrap_or(0)),
+                key: None,
+                error: PhantomData,
+            })
         }
 
         fn serialize_struct(
             self,
             name: &'static str,
             len: usize,
         ) -> Result<Self::SerializeStruct, E> {
-            Ok(
-                SerializeStruct {
-                    name: name,
-                    fields: Vec::with_capacity(len),
-                    error: PhantomData,
-                },
-            )
+            Ok(SerializeStruct {
+                name: name,
+                fields: Vec::with_capacity(len),
+                error: PhantomData,
+            })
         }
 
         fn serialize_struct_variant(
             self,
             name: &'static str,
             variant_index: u32,
             variant: &'static str,
             len: usize,
         ) -> Result<Self::SerializeStructVariant, E> {
-            Ok(
-                SerializeStructVariant {
-                    name: name,
-                    variant_index: variant_index,
-                    variant: variant,
-                    fields: Vec::with_capacity(len),
-                    error: PhantomData,
-                },
-            )
+            Ok(SerializeStructVariant {
+                name: name,
+                variant_index: variant_index,
+                variant: variant,
+                fields: Vec::with_capacity(len),
+                error: PhantomData,
+            })
         }
     }
 
     struct SerializeSeq<E> {
         elements: Vec<Content>,
         error: PhantomData<E>,
     }
 
@@ -902,17 +903,22 @@ mod content {
             T: Serialize,
         {
             let value = try!(value.serialize(ContentSerializer::<E>::new()));
             self.fields.push(value);
             Ok(())
         }
 
         fn end(self) -> Result<Content, E> {
-            Ok(Content::TupleVariant(self.name, self.variant_index, self.variant, self.fields),)
+            Ok(Content::TupleVariant(
+                self.name,
+                self.variant_index,
+                self.variant,
+                self.fields,
+            ))
         }
     }
 
     struct SerializeMap<E> {
         entries: Vec<(Content, Content)>,
         key: Option<Content>,
         error: PhantomData<E>,
     }
@@ -1008,12 +1014,17 @@ mod content {
             T: Serialize,
         {
             let value = try!(value.serialize(ContentSerializer::<E>::new()));
             self.fields.push((key, value));
             Ok(())
         }
 
         fn end(self) -> Result<Content, E> {
-            Ok(Content::StructVariant(self.name, self.variant_index, self.variant, self.fields),)
+            Ok(Content::StructVariant(
+                self.name,
+                self.variant_index,
+                self.variant,
+                self.fields,
+            ))
         }
     }
 }
--- a/third_party/rust/serde/src/ser/impls.rs
+++ b/third_party/rust/serde/src/ser/impls.rs
@@ -106,17 +106,17 @@ where
             Some(ref value) => serializer.serialize_some(value),
             None => serializer.serialize_none(),
         }
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 
-impl<T> Serialize for PhantomData<T> {
+impl<T: ?Sized> Serialize for PhantomData<T> {
     #[inline]
     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
     where
         S: Serializer,
     {
         serializer.serialize_unit_struct("PhantomData")
     }
 }
@@ -459,17 +459,18 @@ impl Serialize for Duration {
 
 #[cfg(feature = "std")]
 impl Serialize for SystemTime {
     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
     where
         S: Serializer,
     {
         use super::SerializeStruct;
-        let duration_since_epoch = self.duration_since(UNIX_EPOCH).expect("SystemTime must be later than UNIX_EPOCH");
+        let duration_since_epoch = self.duration_since(UNIX_EPOCH)
+            .expect("SystemTime must be later than UNIX_EPOCH");
         let mut state = try!(serializer.serialize_struct("SystemTime", 2));
         try!(state.serialize_field("secs_since_epoch", &duration_since_epoch.as_secs()));
         try!(state.serialize_field("nanos_since_epoch", &duration_since_epoch.subsec_nanos()));
         state.end()
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -508,20 +509,22 @@ impl Serialize for net::IpAddr {
     {
         if serializer.is_human_readable() {
             match *self {
                 net::IpAddr::V4(ref a) => a.serialize(serializer),
                 net::IpAddr::V6(ref a) => a.serialize(serializer),
             }
         } else {
             match *self {
-                net::IpAddr::V4(ref a) =>
-                    serializer.serialize_newtype_variant("IpAddr", 0, "V4", a),
-                net::IpAddr::V6(ref a) =>
-                    serializer.serialize_newtype_variant("IpAddr", 1, "V6", a),
+                net::IpAddr::V4(ref a) => {
+                    serializer.serialize_newtype_variant("IpAddr", 0, "V4", a)
+                }
+                net::IpAddr::V6(ref a) => {
+                    serializer.serialize_newtype_variant("IpAddr", 1, "V6", a)
+                }
             }
         }
     }
 }
 
 #[cfg(feature = "std")]
 impl Serialize for net::Ipv4Addr {
     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
@@ -562,20 +565,22 @@ impl Serialize for net::SocketAddr {
     {
         if serializer.is_human_readable() {
             match *self {
                 net::SocketAddr::V4(ref addr) => addr.serialize(serializer),
                 net::SocketAddr::V6(ref addr) => addr.serialize(serializer),
             }
         } else {
             match *self {
-                net::SocketAddr::V4(ref addr) =>
-                    serializer.serialize_newtype_variant("SocketAddr", 0, "V4", addr),
-                net::SocketAddr::V6(ref addr) =>
-                    serializer.serialize_newtype_variant("SocketAddr", 1, "V6", addr),
+                net::SocketAddr::V4(ref addr) => {
+                    serializer.serialize_newtype_variant("SocketAddr", 0, "V4", addr)
+                }
+                net::SocketAddr::V6(ref addr) => {
+                    serializer.serialize_newtype_variant("SocketAddr", 1, "V6", addr)
+                }
             }
         }
     }
 }
 
 #[cfg(feature = "std")]
 impl Serialize for net::SocketAddrV4 {
     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
@@ -595,17 +600,20 @@ impl Serialize for net::SocketAddrV4 {
 #[cfg(feature = "std")]
 impl Serialize for net::SocketAddrV6 {
     fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
     where
         S: Serializer,
     {
         if serializer.is_human_readable() {
             const MAX_LEN: usize = 47;
-            debug_assert_eq!(MAX_LEN, "[1001:1002:1003:1004:1005:1006:1007:1008]:65000".len());
+            debug_assert_eq!(
+                MAX_LEN,
+                "[1001:1002:1003:1004:1005:1006:1007:1008]:65000".len()
+            );
             serialize_display_bounded_length!(self, MAX_LEN, serializer)
         } else {
             (self.ip(), self.port()).serialize(serializer)
         }
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/third_party/rust/serde/src/ser/impossible.rs
+++ b/third_party/rust/serde/src/ser/impossible.rs
@@ -5,18 +5,18 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 //! This module contains `Impossible` serializer and its implementations.
 
 use lib::*;
 
-use ser::{self, Serialize, SerializeSeq, SerializeTuple, SerializeTupleStruct,
-          SerializeTupleVariant, SerializeMap, SerializeStruct, SerializeStructVariant};
+use ser::{self, Serialize, SerializeMap, SerializeSeq, SerializeStruct, SerializeStructVariant,
+          SerializeTuple, SerializeTupleStruct, SerializeTupleVariant};
 
 /// Helper type for implementing a `Serializer` that does not support
 /// serializing one of the compound types.
 ///
 /// This type cannot be instantiated, but implements every one of the traits
 /// corresponding to the [`Serializer`] compound types: [`SerializeSeq`],
 /// [`SerializeTuple`], [`SerializeTupleStruct`], [`SerializeTupleVariant`],
 /// [`SerializeMap`], [`SerializeStruct`], and [`SerializeStructVariant`].
--- a/third_party/rust/serde/src/ser/mod.rs
+++ b/third_party/rust/serde/src/ser/mod.rs
@@ -1407,17 +1407,19 @@ pub trait Serializer: Sized {
     ///
     /// The default implementation of this method returns `true`. Data formats
     /// may override this to `false` to request a compact form for types that
     /// support one. Note that modifying this method to change a format from
     /// human-readable to compact or vice versa should be regarded as a breaking
     /// change, as a value serialized in human-readable mode is not required to
     /// deserialize from the same data in compact mode.
     #[inline]
-    fn is_human_readable(&self) -> bool { true }
+    fn is_human_readable(&self) -> bool {
+        true
+    }
 }
 
 /// Returned from `Serializer::serialize_seq`.
 ///
 /// ```rust
 /// # use std::marker::PhantomData;
 /// #
 /// # struct Vec<T>(PhantomData<T>);
--- a/third_party/rust/serde_derive/.cargo-checksum.json
+++ b/third_party/rust/serde_derive/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"972517c9f00568bfc6806f09dad62aa94ed9f86afe35b4ab0e8d30f1600a04c5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"7dc6376a88195594cd6b43cb891aad10f57144ff737178b55d046aa04739b43a","src/bound.rs":"4999df0c898ae4d5f0fdcd7a6365edabd5101027d67224ce54901c1653060f15","src/de.rs":"6783ba15e53f5d494c9af609474fa15d99d5e76bb0fea71e4d85829f3eeec2d0","src/fragment.rs":"f1642a1c2abbc36191206a5ec8077e314bdc20a420d7649e4bec3a69d555f78d","src/lib.rs":"49832577d7d7451cb6aedab7fdb1c9013e4ad0b8962d0d5d0936e69c9c9fc7ce","src/ser.rs":"e10042683c58f5eb833d9811ed3c2115e93f412188ac6f116c063851584fbec5"},"package":null}
\ No newline at end of file
+{"files":{"Cargo.toml":"f4d63b1c5051b3e0e32fe70dabff07245e8d7e89381b1ed99789072083453201","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"7dc6376a88195594cd6b43cb891aad10f57144ff737178b55d046aa04739b43a","src/bound.rs":"a10e5a103ce3866f8701e80c429106aa6b67b8250026ed2c0d36977748d4cc97","src/de.rs":"991ec19db1b486c2e91bce3f097f8f247ab6122eb8900a2c9267fa9c9e493417","src/fragment.rs":"5a63181171d4d05cea9f28d8ed27a550bc8ac176ee90a911a0598fbe340eec1a","src/lib.rs":"40817849b19a73459fbe5955cf22fb73f634e54df53bb309a0b6e4750b310ea6","src/ser.rs":"0ca344ccbe227f99bb875fe583b97757beb8233dc39acb1836782937c9036bd6"},"package":null}
\ No newline at end of file
--- a/third_party/rust/serde_derive/Cargo.toml
+++ b/third_party/rust/serde_derive/Cargo.toml
@@ -1,31 +1,31 @@
 [package]
 name = "serde_derive"
-version = "1.0.23" # remember to update html_root_url
+version = "1.0.27" # remember to update html_root_url
 authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
 license = "MIT/Apache-2.0"
 description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
 homepage = "https://serde.rs"
 repository = "https://github.com/serde-rs/serde"
 documentation = "https://serde.rs/codegen.html"
 keywords = ["serde", "serialization", "no_std"]
 readme = "README.md"
 include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
 
 [badges]
 travis-ci = { repository = "serde-rs/serde" }
 
 [features]
 default = []
-deserialize_from = []
+deserialize_in_place = []
 
 [lib]
 name = "serde_derive"
 proc-macro = true
 
 [dependencies]
 quote = "0.3.8"
-serde_derive_internals = { version = "=0.17.0", default-features = false, path = "../serde_derive_internals" }
+serde_derive_internals = { version = "=0.19.0", default-features = false, path = "../serde_derive_internals" }
 syn = { version = "0.11", features = ["visit"] }
 
 [dev-dependencies]
 serde = { version = "1.0", path = "../serde" }
--- a/third_party/rust/serde_derive/src/bound.rs
+++ b/third_party/rust/serde_derive/src/bound.rs
@@ -22,24 +22,20 @@ macro_rules! path {
 // Remove the default from every type parameter because in the generated impls
 // they look like associated types: "error: associated type bindings are not
 // allowed here".
 pub fn without_defaults(generics: &syn::Generics) -> syn::Generics {
     syn::Generics {
         ty_params: generics
             .ty_params
             .iter()
-            .map(
-                |ty_param| {
-                    syn::TyParam {
-                        default: None,
-                        ..ty_param.clone()
-                    }
-                },
-            )
+            .map(|ty_param| syn::TyParam {
+                default: None,
+                ..ty_param.clone()
+            })
             .collect(),
         ..generics.clone()
     }
 }
 
 pub fn with_where_predicates(
     generics: &syn::Generics,
     predicates: &[syn::WherePredicate],
@@ -132,119 +128,107 @@ where
         .map(|ty_param| ty_param.ident.clone())
         .collect();
 
     let mut visitor = FindTyParams {
         all_ty_params: all_ty_params,
         relevant_ty_params: HashSet::new(),
     };
     match cont.body {
-        Body::Enum(_, ref variants) => {
-            for variant in variants.iter() {
-                let relevant_fields = variant
-                    .fields
-                    .iter()
-                    .filter(|field| filter(&field.attrs, Some(&variant.attrs)));
-                for field in relevant_fields {
-                    visit::walk_ty(&mut visitor, field.ty);
-                }
+        Body::Enum(_, ref variants) => for variant in variants.iter() {
+            let relevant_fields = variant
+                .fields
+                .iter()
+                .filter(|field| filter(&field.attrs, Some(&variant.attrs)));
+            for field in relevant_fields {
+                visit::walk_ty(&mut visitor, field.ty);
             }
-        }
+        },
         Body::Struct(_, ref fields) => {
             for field in fields.iter().filter(|field| filter(&field.attrs, None)) {
                 visit::walk_ty(&mut visitor, field.ty);
             }
         }
     }
 
     let new_predicates = generics
         .ty_params
         .iter()
         .map(|ty_param| ty_param.ident.clone())
         .filter(|id| visitor.relevant_ty_params.contains(id))
-        .map(
-            |id| {
-                syn::WherePredicate::BoundPredicate(
-                    syn::WhereBoundPredicate {
-                        bound_lifetimes: Vec::new(),
-                        // the type parameter that is being bounded e.g. T
-                        bounded_ty: syn::Ty::Path(None, id.into()),
-                        // the bound e.g. Serialize
-                        bounds: vec![
-                            syn::TyParamBound::Trait(
-                                syn::PolyTraitRef {
-                                    bound_lifetimes: Vec::new(),
-                                    trait_ref: bound.clone(),
-                                },
-                                syn::TraitBoundModifier::None,
-                            ),
-                        ],
-                    },
-                )
-            },
-        );
+        .map(|id| {
+            syn::WherePredicate::BoundPredicate(syn::WhereBoundPredicate {
+                bound_lifetimes: Vec::new(),
+                // the type parameter that is being bounded e.g. T
+                bounded_ty: syn::Ty::Path(None, id.into()),
+                // the bound e.g. Serialize
+                bounds: vec![
+                    syn::TyParamBound::Trait(
+                        syn::PolyTraitRef {
+                            bound_lifetimes: Vec::new(),
+                            trait_ref: bound.clone(),
+                        },
+                        syn::TraitBoundModifier::None,
+                    ),
+                ],
+            })
+        });
 
     let mut generics = generics.clone();
     generics.where_clause.predicates.extend(new_predicates);
     generics
 }
 
 pub fn with_self_bound(
     cont: &Container,
     generics: &syn::Generics,
     bound: &syn::Path,
 ) -> syn::Generics {
     let mut generics = generics.clone();
     generics
         .where_clause
         .predicates
-        .push(
-            syn::WherePredicate::BoundPredicate(
-                syn::WhereBoundPredicate {
-                    bound_lifetimes: Vec::new(),
-                    // the type that is being bounded e.g. MyStruct<'a, T>
-                    bounded_ty: type_of_item(cont),
-                    // the bound e.g. Default
-                    bounds: vec![
-                        syn::TyParamBound::Trait(
-                            syn::PolyTraitRef {
-                                bound_lifetimes: Vec::new(),
-                                trait_ref: bound.clone(),
-                            },
-                            syn::TraitBoundModifier::None,
-                        ),
-                    ],
-                },
-            ),
-        );
+        .push(syn::WherePredicate::BoundPredicate(
+            syn::WhereBoundPredicate {
+                bound_lifetimes: Vec::new(),
+                // the type that is being bounded e.g. MyStruct<'a, T>
+                bounded_ty: type_of_item(cont),
+                // the bound e.g. Default
+                bounds: vec![
+                    syn::TyParamBound::Trait(
+                        syn::PolyTraitRef {
+                            bound_lifetimes: Vec::new(),
+                            trait_ref: bound.clone(),
+                        },
+                        syn::TraitBoundModifier::None,
+                    ),
+                ],
+            },
+        ));
     generics
 }
 
 pub fn with_lifetime_bound(generics: &syn::Generics, lifetime: &str) -> syn::Generics {
     let mut generics = generics.clone();
 
     for lifetime_def in &mut generics.lifetimes {
         lifetime_def.bounds.push(syn::Lifetime::new(lifetime));
     }
 
     for ty_param in &mut generics.ty_params {
         ty_param
             .bounds
             .push(syn::TyParamBound::Region(syn::Lifetime::new(lifetime)));
     }
 
-    generics
-        .lifetimes
-        .push(
-            syn::LifetimeDef {
-                attrs: Vec::new(),
-                lifetime: syn::Lifetime::new(lifetime),
-                bounds: Vec::new(),
-            },
-        );
+    generics.lifetimes.push(syn::LifetimeDef {
+        attrs: Vec::new(),
+        lifetime: syn::Lifetime::new(lifetime),
+        bounds: Vec::new(),
+    });
 
     generics
 }
 
 fn type_of_item(cont: &Container) -> syn::Ty {
     syn::Ty::Path(
         None,
         syn::Path {
--- a/third_party/rust/serde_derive/src/de.rs
+++ b/third_party/rust/serde_derive/src/de.rs
@@ -2,72 +2,65 @@
 //
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 use syn::{self, Ident};
-use quote::{self, Tokens, ToTokens};
+use quote::{self, ToTokens, Tokens};
 
 use bound;
-use fragment::{Fragment, Expr, Stmts, Match};
-use internals::ast::{Body, Container, Field, Repr, Style, Variant};
+use fragment::{Expr, Fragment, Match, Stmts};
+use internals::ast::{Body, Container, Field, Style, Variant};
 use internals::{self, attr};
 
+#[cfg(feature = "deserialize_in_place")]
+use internals::ast::Repr;
+
+
 use std::collections::BTreeSet;
 
 pub fn expand_derive_deserialize(input: &syn::DeriveInput) -> Result<Tokens, String> {
     let ctxt = internals::Ctxt::new();
     let cont = Container::from_ast(&ctxt, input);
     try!(ctxt.check());
 
     let ident = &cont.ident;
     let params = Parameters::new(&cont);
     let (de_impl_generics, _, ty_generics, where_clause) = split_with_de_lifetime(&params);
     let dummy_const = Ident::new(format!("_IMPL_DESERIALIZE_FOR_{}", ident));
-    let main_body = Stmts(deserialize_body(&cont, &params));
+    let body = Stmts(deserialize_body(&cont, &params));
     let delife = params.borrowed.de_lifetime();
 
     let impl_block = if let Some(remote) = cont.attrs.remote() {
         let vis = &input.vis;
         quote! {
             impl #de_impl_generics #ident #ty_generics #where_clause {
                 #vis fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<#remote #ty_generics, __D::Error>
                     where __D: _serde::Deserializer<#delife>
                 {
-                    #main_body
+                    #body
                 }
             }
         }
     } else {
-        let from_body = deserialize_from_body(&cont, &params);
-        let from_impl = from_body.map(|from_body| {
-            let from_body = Stmts(from_body);
-
-            quote! {
-                fn deserialize_from<__D>(&mut self, __deserializer: __D) -> _serde::export::Result<(), __D::Error>
-                    where __D: _serde::Deserializer<#delife>
-                {
-                    #from_body
-                }
-            }
-        });
+        let fn_deserialize_in_place = deserialize_in_place_body(&cont, &params);
 
         quote! {
             #[automatically_derived]
             impl #de_impl_generics _serde::Deserialize<#delife> for #ident #ty_generics #where_clause {
                 fn deserialize<__D>(__deserializer: __D) -> _serde::export::Result<Self, __D::Error>
                     where __D: _serde::Deserializer<#delife>
                 {
-                    #main_body
+                    #body
                 }
 
-                #from_impl
+                #fn_deserialize_in_place
             }
         }
     };
 
     let generated = quote! {
         #[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
         const #dummy_const: () = {
             extern crate serde as _serde;
@@ -136,18 +129,17 @@ fn build_generics(cont: &Container, borr
 
     match cont.attrs.de_bound() {
         Some(predicates) => bound::with_where_predicates(&generics, predicates),
         None => {
             let generics = match *cont.attrs.default() {
                 attr::Default::Default => {
                     bound::with_self_bound(cont, &generics, &path!(_serde::export::Default))
                 }
-                attr::Default::None |
-                attr::Default::Path(_) => generics,
+                attr::Default::None | attr::Default::Path(_) => generics,
             };
 
             let delife = borrowed.de_lifetime();
             let generics = bound::with_bound(
                 cont,
                 &generics,
                 needs_deserialize_bound,
                 &path!(_serde::Deserialize<#delife>),
@@ -163,20 +155,18 @@ fn build_generics(cont: &Container, borr
     }
 }
 
 // Fields with a `skip_deserializing` or `deserialize_with` attribute are not
 // deserialized by us so we do not generate a bound. Fields with a `bound`
 // attribute specify their own bound so we do not generate one. All other fields
 // may need a `T: Deserialize` bound where T is the type of the field.
 fn needs_deserialize_bound(field: &attr::Field, variant: Option<&attr::Variant>) -> bool {
-    !field.skip_deserializing() &&
-    field.deserialize_with().is_none() &&
-    field.de_bound().is_none() &&
-    variant.map_or(true, |variant| variant.deserialize_with().is_none())
+    !field.skip_deserializing() && field.deserialize_with().is_none() && field.de_bound().is_none()
+        && variant.map_or(true, |variant| variant.deserialize_with().is_none())
 }
 
 // Fields with a `default` attribute (not `default=...`), and fields with a
 // `skip_deserializing` attribute that do not also have `default=...`.
 fn requires_default(field: &attr::Field, _variant: Option<&attr::Variant>) -> bool {
     field.default() == &attr::Default::Default
 }
 
@@ -191,23 +181,21 @@ impl BorrowedLifetimes {
         match *self {
             BorrowedLifetimes::Borrowed(_) => syn::Lifetime::new("'de"),
             BorrowedLifetimes::Static => syn::Lifetime::new("'static"),
         }
     }
 
     fn de_lifetime_def(&self) -> Option<syn::LifetimeDef> {
         match *self {
-            BorrowedLifetimes::Borrowed(ref bounds) => {
-                Some(syn::LifetimeDef {
-                    attrs: Vec::new(),
-                    lifetime: syn::Lifetime::new("'de"),
-                    bounds: bounds.iter().cloned().collect(),
-                })
-            }
+            BorrowedLifetimes::Borrowed(ref bounds) => Some(syn::LifetimeDef {
+                attrs: Vec::new(),
+                lifetime: syn::Lifetime::new("'de"),
+                bounds: bounds.iter().cloned().collect(),
+            }),
             BorrowedLifetimes::Static => None,
         }
     }
 }
 
 // The union of lifetimes borrowed by each field of the container.
 //
 // These turn into bounds on the `'de` lifetime of the Deserialize impl. If
@@ -238,18 +226,17 @@ fn deserialize_body(cont: &Container, pa
         match cont.body {
             Body::Enum(_, ref variants) => deserialize_enum(params, variants, &cont.attrs),
             Body::Struct(Style::Struct, ref fields) => {
                 if fields.iter().any(|field| field.ident.is_none()) {
                     panic!("struct has unnamed fields");
                 }
                 deserialize_struct(None, params, fields, &cont.attrs, None, Untagged::No)
             }
-            Body::Struct(Style::Tuple, ref fields) |
-            Body::Struct(Style::Newtype, ref fields) => {
+            Body::Struct(Style::Tuple, ref fields) | Body::Struct(Style::Newtype, ref fields) => {
                 if fields.iter().any(|field| field.ident.is_some()) {
                     panic!("tuple struct has named fields");
                 }
                 deserialize_tuple(None, params, fields, &cont.attrs, None)
             }
             Body::Struct(Style::Unit, _) => deserialize_unit_struct(params, &cont.attrs),
         }
     } else {
@@ -257,37 +244,65 @@ fn deserialize_body(cont: &Container, pa
             Body::Enum(_, ref variants) => {
                 deserialize_custom_identifier(params, variants, &cont.attrs)
             }
             Body::Struct(_, _) => unreachable!("checked in serde_derive_internals"),
         }
     }
 }
 
-#[cfg(feature = "deserialize_from")]
-fn deserialize_from_body(cont: &Container, params: &Parameters) -> Option<Fragment> {
-    if let (None, attr::Identifier::No) = (cont.attrs.from_type(), cont.attrs.identifier()) {
-        match cont.body {
-            Body::Enum(ref repr, ref variants) => deserialize_from_enum(params, repr, variants, &cont.attrs),
-            Body::Struct(Style::Struct, ref fields) => {
-                deserialize_from_struct(None, params, fields, &cont.attrs, None, Untagged::No)
+#[cfg(feature = "deserialize_in_place")]
+fn deserialize_in_place_body(cont: &Container, params: &Parameters) -> Option<Stmts> {
+    // Only remote derives have getters, and we do not generate
+    // deserialize_in_place for remote derives.
+    assert!(!params.has_getter);
+
+    if cont.attrs.from_type().is_some() || cont.attrs.identifier().is_some()
+        || cont.body
+            .all_fields()
+            .all(|f| f.attrs.deserialize_with().is_some())
+    {
+        return None;
+    }
+
+    let code = match cont.body {
+        Body::Struct(Style::Struct, ref fields) => {
+            deserialize_struct_in_place(None, params, fields, &cont.attrs, None, Untagged::No)
+        }
+        Body::Struct(Style::Tuple, ref fields) | Body::Struct(Style::Newtype, ref fields) => {
+            deserialize_tuple_in_place(None, params, fields, &cont.attrs, None)
+        }
+        Body::Enum(ref repr, ref variants) => {
+            if let Some(x) = deserialize_enum_in_place(params, repr, variants, &cont.attrs) {
+                x
+            } else {
+                return None;
             }
-            Body::Struct(Style::Tuple, ref fields) |
-            Body::Struct(Style::Newtype, ref fields) => {
-                deserialize_from_tuple(None, params, fields, &cont.attrs, None)
-            }
-            Body::Struct(Style::Unit, _) => None,
+        }
+        Body::Struct(Style::Unit, _) => {
+            return None;
         }
-    }  else {
-        None
-    }
+    };
+
+    let delife = params.borrowed.de_lifetime();
+    let stmts = Stmts(code);
+
+    let fn_deserialize_in_place = quote_block! {
+        fn deserialize_in_place<__D>(__deserializer: __D, __place: &mut Self) -> _serde::export::Result<(), __D::Error>
+            where __D: _serde::Deserializer<#delife>
+        {
+            #stmts
+        }
+    };
+
+    Some(Stmts(fn_deserialize_in_place))
 }
 
-#[cfg(not(feature = "deserialize_from"))]
-fn deserialize_from_body(_cont: &Container, _params: &Parameters) -> Option<Fragment> {
+#[cfg(not(feature = "deserialize_in_place"))]
+fn deserialize_in_place_body(_cont: &Container, _params: &Parameters) -> Option<Stmts> {
     None
 }
 
 fn deserialize_from(from_type: &syn::Ty) -> Fragment {
     quote_block! {
         _serde::export::Result::map(
             <#from_type as _serde::Deserialize>::deserialize(__deserializer),
             _serde::export::From::from)
@@ -325,17 +340,18 @@ fn deserialize_unit_struct(params: &Para
 fn deserialize_tuple(
     variant_ident: Option<&syn::Ident>,
     params: &Parameters,
     fields: &[Field],
     cattrs: &attr::Container,
     deserializer: Option<Tokens>,
 ) -> Fragment {
     let this = &params.this;
-    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
+    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) =
+        split_with_de_lifetime(params);
     let delife = params.borrowed.de_lifetime();
 
     // If there are getters (implying private fields), construct the local type
     // and use an `Into` conversion to get the remote type. If there are no
     // getters then construct the target type directly.
     let construct = if params.has_getter {
         let local = &params.local;
         quote!(#local)
@@ -376,19 +392,17 @@ fn deserialize_tuple(
     } else if nfields == 1 {
         let type_name = cattrs.name().deserialize_name();
         quote!(_serde::Deserializer::deserialize_newtype_struct(__deserializer, #type_name, #visitor_expr))
     } else {
         let type_name = cattrs.name().deserialize_name();
         quote!(_serde::Deserializer::deserialize_tuple_struct(__deserializer, #type_name, #nfields, #visitor_expr))
     };
 
-    let all_skipped = fields
-        .iter()
-        .all(|field| field.attrs.skip_deserializing());
+    let all_skipped = fields.iter().all(|field| field.attrs.skip_deserializing());
     let visitor_var = if all_skipped {
         quote!(_)
     } else {
         quote!(mut __seq)
     };
 
     quote_block! {
         struct __Visitor #de_impl_generics #where_clause {
@@ -412,69 +426,56 @@ fn deserialize_tuple(
                 #visit_seq
             }
         }
 
         #dispatch
     }
 }
 
-#[cfg(feature = "deserialize_from")]
-fn deserialize_from_tuple(
+#[cfg(feature = "deserialize_in_place")]
+fn deserialize_tuple_in_place(
     variant_ident: Option<&syn::Ident>,
     params: &Parameters,
     fields: &[Field],
     cattrs: &attr::Container,
     deserializer: Option<Tokens>,
-) -> Option<Fragment> {
+) -> Fragment {
     let this = &params.this;
-    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
+    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) =
+        split_with_de_lifetime(params);
     let delife = params.borrowed.de_lifetime();
 
-    // If there are getters (implying private fields), construct the local type
-    // and use an `Into` conversion to get the remote type. If there are no
-    // getters then construct the target type directly.
-    let construct = if params.has_getter {
-        let local = &params.local;
-        quote!(#local)
-    } else {
-        quote!(#this)
-    };
-
     let is_enum = variant_ident.is_some();
-    let type_path = match variant_ident {
-        Some(variant_ident) => quote!(#construct::#variant_ident),
-        None => construct,
-    };
     let expecting = match variant_ident {
         Some(variant_ident) => format!("tuple variant {}::{}", params.type_name(), variant_ident),
         None => format!("tuple struct {}", params.type_name()),
     };
 
     let nfields = fields.len();
 
     let visit_newtype_struct = if !is_enum && nfields == 1 {
-        Some(deserialize_from_newtype_struct(&type_path, params, &fields[0]))
+        Some(deserialize_newtype_struct_in_place(params, &fields[0]))
     } else {
         None
     };
 
-    let visit_seq = Stmts(deserialize_from_seq(params, fields, is_enum, cattrs));
+    let visit_seq = Stmts(deserialize_seq_in_place(params, fields, is_enum, cattrs));
 
     let visitor_expr = if is_enum {
         quote! {
             __Visitor {
-                dest: this,
+                place: this,
                 lifetime: _serde::export::PhantomData,
             }
         }
     } else {
         quote! {
             __Visitor {
-                dest: self,
+                place: __place,
                 lifetime: _serde::export::PhantomData,
             }
         }
     };
 
     let dispatch = if let Some(deserializer) = deserializer {
         quote!(_serde::Deserializer::deserialize_tuple(#deserializer, #nfields, #visitor_expr))
     } else if is_enum {
@@ -482,56 +483,51 @@ fn deserialize_from_tuple(
     } else if nfields == 1 {
         let type_name = cattrs.name().deserialize_name();
         quote!(_serde::Deserializer::deserialize_newtype_struct(__deserializer, #type_name, #visitor_expr))
     } else {
         let type_name = cattrs.name().deserialize_name();
         quote!(_serde::Deserializer::deserialize_tuple_struct(__deserializer, #type_name, #nfields, #visitor_expr))
     };
 
-    let all_skipped = fields
-        .iter()
-        .all(|field| field.attrs.skip_deserializing());
+    let all_skipped = fields.iter().all(|field| field.attrs.skip_deserializing());
     let visitor_var = if all_skipped {
         quote!(_)
     } else {
         quote!(mut __seq)
     };
 
-    if params.has_getter {
-        None
-    } else {
-        let de_from_impl_generics = de_impl_generics.with_dest();
-        let de_from_ty_generics = de_ty_generics.with_dest();
-        let dest_life = dest_lifetime();
-        Some(quote_block! {
-            struct __Visitor #de_from_impl_generics #where_clause {
-                dest: &#dest_life mut #this #ty_generics,
-                lifetime: _serde::export::PhantomData<&#delife ()>,
+    let in_place_impl_generics = de_impl_generics.in_place();
+    let in_place_ty_generics = de_ty_generics.in_place();
+    let place_life = place_lifetime();
+
+    quote_block! {
+        struct __Visitor #in_place_impl_generics #where_clause {
+            place: &#place_life mut #this #ty_generics,
+            lifetime: _serde::export::PhantomData<&#delife ()>,
+        }
+
+        impl #in_place_impl_generics _serde::de::Visitor<#delife> for __Visitor #in_place_ty_generics #where_clause {
+            type Value = ();
+
+            fn expecting(&self, formatter: &mut _serde::export::Formatter) -> _serde::export::fmt::Result {
+                _serde::export::Formatter::write_str(formatter, #expecting)
             }
 
-            impl #de_from_impl_generics _serde::de::Visitor<#delife> for __Visitor #de_from_ty_generics #where_clause {
-                type Value = ();
-
-                fn expecting(&self, formatter: &mut _serde::export::Formatter) -> _serde::export::fmt::Result {
-                    _serde::export::Formatter::write_str(formatter, #expecting)
-                }
-
-                #visit_newtype_struct
+            #visit_newtype_struct
 
-                #[inline]
-                fn visit_seq<__A>(self, #visitor_var: __A) -> _serde::export::Result<Self::Value, __A::Error>
-                    where __A: _serde::de::SeqAccess<#delife>
-                {
-                    #visit_seq
-                }
+            #[inline]
+            fn visit_seq<__A>(self, #visitor_var: __A) -> _serde::export::Result<Self::Value, __A::Error>
+                where __A: _serde::de::SeqAccess<#delife>
+            {
+                #visit_seq
             }
+        }
 
-            #dispatch
-        })
+        #dispatch
     }
 }
 
 fn deserialize_seq(
     type_path: &Tokens,
     params: &Parameters,
     fields: &[Field],
     is_struct: bool,
@@ -541,52 +537,50 @@ fn deserialize_seq(
 
     let deserialized_count = fields
         .iter()
         .filter(|field| !field.attrs.skip_deserializing())
         .count();
     let expecting = format!("tuple of {} elements", deserialized_count);
 
     let mut index_in_seq = 0usize;
-    let let_values = vars.clone().zip(fields)
-        .map(|(var, field)| {
-            if field.attrs.skip_deserializing() {
-                let default = Expr(expr_is_missing(&field, cattrs));
-                quote! {
-                    let #var = #default;
+    let let_values = vars.clone().zip(fields).map(|(var, field)| {
+        if field.attrs.skip_deserializing() {
+            let default = Expr(expr_is_missing(&field, cattrs));
+            quote! {
+                let #var = #default;
+            }
+        } else {
+            let visit = match field.attrs.deserialize_with() {
+                None => {
+                    let field_ty = &field.ty;
+                    quote!(try!(_serde::de::SeqAccess::next_element::<#field_ty>(&mut __seq)))
                 }
-            } else {
-                let visit = match field.attrs.deserialize_with() {
-                    None => {
-                        let field_ty = &field.ty;
-                        quote!(try!(_serde::de::SeqAccess::next_element::<#field_ty>(&mut __seq)))
-                    }
-                    Some(path) => {
-                        let (wrapper, wrapper_ty) = wrap_deserialize_field_with(
-                            params, field.ty, path);
-                        quote!({
-                            #wrapper
-                            _serde::export::Option::map(
-                                try!(_serde::de::SeqAccess::next_element::<#wrapper_ty>(&mut __seq)),
-                                |__wrap| __wrap.value)
-                        })
+                Some(path) => {
+                    let (wrapper, wrapper_ty) = wrap_deserialize_field_with(params, field.ty, path);
+                    quote!({
+                        #wrapper
+                        _serde::export::Option::map(
+                            try!(_serde::de::SeqAccess::next_element::<#wrapper_ty>(&mut __seq)),
+                            |__wrap| __wrap.value)
+                    })
+                }
+            };
+            let assign = quote! {
+                let #var = match #visit {
+                    _serde::export::Some(__value) => __value,
+                    _serde::export::None => {
+                        return _serde::export::Err(_serde::de::Error::invalid_length(#index_in_seq, &#expecting));
                     }
                 };
-                let assign = quote! {
-                    let #var = match #visit {
-                        _serde::export::Some(__value) => __value,
-                        _serde::export::None => {
-                            return _serde::export::Err(_serde::de::Error::invalid_length(#index_in_seq, &#expecting));
-                        }
-                    };
-                };
-                index_in_seq += 1;
-                assign
-            }
-        });
+            };
+            index_in_seq += 1;
+            assign
+        }
+    });
 
     let mut result = if is_struct {
         let names = fields.iter().map(|f| &f.ident);
         quote! {
             #type_path { #( #names: #vars ),* }
         }
     } else {
         quote! {
@@ -596,89 +590,128 @@ fn deserialize_seq(
 
     if params.has_getter {
         let this = &params.this;
         result = quote! {
             _serde::export::Into::<#this>::into(#result)
         };
     }
 
+    let let_default = match *cattrs.default() {
+        attr::Default::Default => Some(quote!(
+            let __default: Self::Value = _serde::export::Default::default();
+        )),
+        attr::Default::Path(ref path) => Some(quote!(
+            let __default: Self::Value = #path();
+        )),
+        attr::Default::None => {
+            // We don't need the default value, to prevent an unused variable warning
+            // we'll leave the line empty.
+            None
+        }
+    };
+
     quote_block! {
+        #let_default
         #(#let_values)*
         _serde::export::Ok(#result)
     }
 }
 
-#[cfg(feature = "deserialize_from")]
-fn deserialize_from_seq(
+#[cfg(feature = "deserialize_in_place")]
+fn deserialize_seq_in_place(
     params: &Parameters,
     fields: &[Field],
     increment_fields: bool,
     cattrs: &attr::Container,
 ) -> Fragment {
-    // For enums there's a secret `tag` field at the start which we shouldn't touch, 
+    // For enums there's a secret `tag` field at the start which we shouldn't touch,
     // so we need to bump all the indices up by 1.
     let index_names = if increment_fields {
         (0..fields.len())
     } else {
         (1..fields.len() + 1)
     };
     let vars = index_names.map(field_i as fn(_) -> _);
 
     let deserialized_count = fields
         .iter()
         .filter(|field| !field.attrs.skip_deserializing())
         .count();
     let expecting = format!("tuple of {} elements", deserialized_count);
 
     let mut index_in_seq = 0usize;
-    let write_values = vars.clone().zip(fields).enumerate()
+    let write_values = vars.clone()
+        .zip(fields)
+        .enumerate()
         .map(|(field_index, (_, field))| {
             // If there's no field name, assume we're a tuple-struct and use a numeric index
-            let field_name = field.ident.clone()
+            let field_name = field
+                .ident
+                .clone()
                 .unwrap_or_else(|| Ident::new(field_index.to_string()));
 
             if field.attrs.skip_deserializing() {
                 let default = Expr(expr_is_missing(&field, cattrs));
                 quote! {
-                    self.dest.#field_name = #default;
+                    self.place.#field_name = #default;
                 }
             } else {
-                let handle_none = quote! {
-                    if visit.is_none() {
-                        return _serde::export::Err(_serde::de::Error::invalid_length(#index_in_seq, &#expecting));
-                    }
+                let return_invalid_length = quote! {
+                    return _serde::export::Err(_serde::de::Error::invalid_length(#index_in_seq, &#expecting));
                 };
                 let write = match field.attrs.deserialize_with() {
                     None => {
                         quote! {
-                            let visit = try!(_serde::de::SeqAccess::next_element_seed(&mut __seq,
-                                _serde::private::de::DeserializeFromSeed(&mut self.dest.#field_name)));
-                            #handle_none
+                            if let _serde::export::None = try!(_serde::de::SeqAccess::next_element_seed(&mut __seq,
+                                _serde::private::de::InPlaceSeed(&mut self.place.#field_name)))
+                            {
+                                #return_invalid_length
+                            }
                         }
                     }
                     Some(path) => {
-                        let (wrapper, wrapper_ty) = wrap_deserialize_field_with(
-                            params, field.ty, path);
+                        let (wrapper, wrapper_ty) =
+                            wrap_deserialize_field_with(params, field.ty, path);
                         quote!({
                             #wrapper
-                            let visit = _serde::export::Option::map(
-                                try!(_serde::de::SeqAccess::next_element::<#wrapper_ty>(&mut __seq)),
-                                |__wrap| __wrap.value);
-                            #handle_none
-                            self.dest.#field_name = visit.unwrap();
+                            match try!(_serde::de::SeqAccess::next_element::<#wrapper_ty>(&mut __seq)) {
+                                _serde::export::Some(__wrap) => {
+                                    self.place.#field_name = __wrap.value;
+                                }
+                                _serde::export::None => {
+                                    #return_invalid_length
+                                }
+                            }
                         })
                     }
                 };
                 index_in_seq += 1;
                 write
             }
         });
 
+    let this = &params.this;
+    let (_, ty_generics, _) = params.generics.split_for_impl();
+    let let_default = match *cattrs.default() {
+        attr::Default::Default => Some(quote!(
+            let __default: #this #ty_generics  = _serde::export::Default::default();
+        )),
+        attr::Default::Path(ref path) => Some(quote!(
+            let __default: #this #ty_generics  = #path();
+        )),
+        attr::Default::None => {
+            // We don't need the default value, to prevent an unused variable warning
+            // we'll leave the line empty.
+            None
+        }
+    };
+
     quote_block! {
+        #let_default
         #(#write_values)*
         _serde::export::Ok(())
     }
 }
 
 fn deserialize_newtype_struct(type_path: &Tokens, params: &Parameters, field: &Field) -> Tokens {
     let delife = params.borrowed.de_lifetime();
 
@@ -711,69 +744,29 @@ fn deserialize_newtype_struct(type_path:
         fn visit_newtype_struct<__E>(self, __e: __E) -> _serde::export::Result<Self::Value, __E::Error>
             where __E: _serde::Deserializer<#delife>
         {
             _serde::export::Ok(#result)
         }
     }
 }
 
-#[cfg(feature = "deserialize_from")]
-fn deserialize_from_newtype_struct(
-    type_path: &Tokens,
-    params: &Parameters,
-    field: &Field
-) -> Tokens {
+#[cfg(feature = "deserialize_in_place")]
+fn deserialize_newtype_struct_in_place(params: &Parameters, field: &Field) -> Tokens {
+    // We do not generate deserialize_in_place if every field has a deserialize_with.
+    assert!(field.attrs.deserialize_with().is_none());
+
     let delife = params.borrowed.de_lifetime();
 
-    // FIXME: can we reject this condition earlier so we don't have to handle it?
-    // If there's conversions that we need to do, we can't do this properly.
-    if field.attrs.deserialize_with().is_some() || params.has_getter {
-        let value = match field.attrs.deserialize_with() {
-            None => {
-                let field_ty = &field.ty;
-                quote! {
-                    try!(<#field_ty as _serde::Deserialize>::deserialize(__e))
-                }
-            }
-            Some(path) => {
-                let (wrapper, wrapper_ty) = wrap_deserialize_field_with(params, field.ty, path);
-                quote!({
-                    #wrapper
-                    try!(<#wrapper_ty as _serde::Deserialize>::deserialize(__e)).value
-                })
-            }
-        };
-
-        let mut result = quote!(#type_path(#value));
-        if params.has_getter {
-            let this = &params.this;
-            result = quote! {
-                _serde::export::Into::<#this>::into(#result)
-            };
-        }
-
-        quote! {
-            #[inline]
-            fn visit_newtype_struct<__E>(self, __e: __E) -> _serde::export::Result<Self::Value, __E::Error>
-                where __E: _serde::Deserializer<#delife>
-            {
-                *self.dest = #result;
-                _serde::export::Ok(())
-            }
-        }
-    } else {
-        // No conversions, just recurse on the field.
-        quote! {
-            #[inline]
-            fn visit_newtype_struct<__E>(self, __e: __E) -> _serde::export::Result<Self::Value, __E::Error>
-                where __E: _serde::Deserializer<#delife>
-            {
-                _serde::Deserialize::deserialize_from(&mut self.dest.0, __e)
-            }
+    quote! {
+        #[inline]
+        fn visit_newtype_struct<__E>(self, __e: __E) -> _serde::export::Result<Self::Value, __E::Error>
+            where __E: _serde::Deserializer<#delife>
+        {
+            _serde::Deserialize::deserialize_in_place(__e, &mut self.place.0)
         }
     }
 }
 
 enum Untagged {
     Yes,
     No,
 }
@@ -784,17 +777,18 @@ fn deserialize_struct(
     fields: &[Field],
     cattrs: &attr::Container,
     deserializer: Option<Tokens>,
     untagged: Untagged,
 ) -> Fragment {
     let is_enum = variant_ident.is_some();
 
     let this = &params.this;
-    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
+    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) =
+        split_with_de_lifetime(params);
     let delife = params.borrowed.de_lifetime();
 
     // If there are getters (implying private fields), construct the local type
     // and use an `Into` conversion to get the remote type. If there are no
     // getters then construct the target type directly.
     let construct = if params.has_getter {
         let local = &params.local;
         quote!(#local)
@@ -835,38 +829,34 @@ fn deserialize_struct(
         }
     } else {
         let type_name = cattrs.name().deserialize_name();
         quote! {
             _serde::Deserializer::deserialize_struct(__deserializer, #type_name, FIELDS, #visitor_expr)
         }
     };
 
-    let all_skipped = fields
-        .iter()
-        .all(|field| field.attrs.skip_deserializing());
+    let all_skipped = fields.iter().all(|field| field.attrs.skip_deserializing());
     let visitor_var = if all_skipped {
         quote!(_)
     } else {
         quote!(mut __seq)
     };
 
     // untagged struct variants do not get a visit_seq method
     let visit_seq = match untagged {
         Untagged::Yes => None,
-        Untagged::No => {
-            Some(quote! {
-                #[inline]
-                fn visit_seq<__A>(self, #visitor_var: __A) -> _serde::export::Result<Self::Value, __A::Error>
-                    where __A: _serde::de::SeqAccess<#delife>
-                {
-                    #visit_seq
-                }
-            })
-        }
+        Untagged::No => Some(quote! {
+            #[inline]
+            fn visit_seq<__A>(self, #visitor_var: __A) -> _serde::export::Result<Self::Value, __A::Error>
+                where __A: _serde::de::SeqAccess<#delife>
+            {
+                #visit_seq
+            }
+        }),
     };
 
     quote_block! {
         #field_visitor
 
         struct __Visitor #de_impl_generics #where_clause {
             marker: _serde::export::PhantomData<#this #ty_generics>,
             lifetime: _serde::export::PhantomData<&#delife ()>,
@@ -890,47 +880,48 @@ fn deserialize_struct(
         }
 
         #fields_stmt
 
         #dispatch
     }
 }
 
-#[cfg(feature = "deserialize_from")]
-fn deserialize_from_struct(
+#[cfg(feature = "deserialize_in_place")]
+fn deserialize_struct_in_place(
     variant_ident: Option<&syn::Ident>,
     params: &Parameters,
     fields: &[Field],
     cattrs: &attr::Container,
     deserializer: Option<Tokens>,
     untagged: Untagged,
-) -> Option<Fragment> {
+) -> Fragment {
     let is_enum = variant_ident.is_some();
 
     let this = &params.this;
-    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
+    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) =
+        split_with_de_lifetime(params);
     let delife = params.borrowed.de_lifetime();
 
     let expecting = match variant_ident {
         Some(variant_ident) => format!("struct variant {}::{}", params.type_name(), variant_ident),
         None => format!("struct {}", params.type_name()),
     };
 
-    let visit_seq = Stmts(deserialize_from_seq(params, fields, false, cattrs));
+    let visit_seq = Stmts(deserialize_seq_in_place(params, fields, false, cattrs));
 
     let (field_visitor, fields_stmt, visit_map) =
-        deserialize_from_struct_visitor(params, fields, cattrs);
+        deserialize_struct_in_place_visitor(params, fields, cattrs);
     let field_visitor = Stmts(field_visitor);
     let fields_stmt = Stmts(fields_stmt);
     let visit_map = Stmts(visit_map);
 
     let visitor_expr = quote! {
         __Visitor {
-            dest: self,
+            place: __place,
             lifetime: _serde::export::PhantomData,
         }
     };
     let dispatch = if let Some(deserializer) = deserializer {
         quote! {
             _serde::Deserializer::deserialize_any(#deserializer, #visitor_expr)
         }
     } else if is_enum {
@@ -939,79 +930,68 @@ fn deserialize_from_struct(
         }
     } else {
         let type_name = cattrs.name().deserialize_name();
         quote! {
             _serde::Deserializer::deserialize_struct(__deserializer, #type_name, FIELDS, #visitor_expr)
         }
     };
 
-
-    let all_skipped = fields
-        .iter()
-        .all(|field| field.attrs.skip_deserializing());
+    let all_skipped = fields.iter().all(|field| field.attrs.skip_deserializing());
     let visitor_var = if all_skipped {
         quote!(_)
     } else {
         quote!(mut __seq)
     };
 
     // untagged struct variants do not get a visit_seq method
     let visit_seq = match untagged {
         Untagged::Yes => None,
-        Untagged::No => {
-            Some(quote! {
-                #[inline]
-                fn visit_seq<__A>(self, #visitor_var: __A) -> _serde::export::Result<Self::Value, __A::Error>
-                    where __A: _serde::de::SeqAccess<#delife>
-                {
-                    #visit_seq
-                }
-            })
-
-        }
+        Untagged::No => Some(quote! {
+            #[inline]
+            fn visit_seq<__A>(self, #visitor_var: __A) -> _serde::export::Result<Self::Value, __A::Error>
+                where __A: _serde::de::SeqAccess<#delife>
+            {
+                #visit_seq
+            }
+        }),
     };
 
-    if params.has_getter {
-        None
-    } else {
-        let de_from_impl_generics = de_impl_generics.with_dest();
-        let de_from_ty_generics = de_ty_generics.with_dest();
-        let dest_life = dest_lifetime();
+    let in_place_impl_generics = de_impl_generics.in_place();
+    let in_place_ty_generics = de_ty_generics.in_place();
+    let place_life = place_lifetime();
+
+    quote_block! {
+        #field_visitor
 
-        Some(quote_block! {
-            #field_visitor
+        struct __Visitor #in_place_impl_generics #where_clause {
+            place: &#place_life mut #this #ty_generics,
+            lifetime: _serde::export::PhantomData<&#delife ()>,
+        }
 
-            struct __Visitor #de_from_impl_generics #where_clause {
-                dest: &#dest_life mut #this #ty_generics,
-                lifetime: _serde::export::PhantomData<&#delife ()>,
+        impl #in_place_impl_generics _serde::de::Visitor<#delife> for __Visitor #in_place_ty_generics #where_clause {
+            type Value = ();
+
+            fn expecting(&self, formatter: &mut _serde::export::Formatter) -> _serde::export::fmt::Result {
+                _serde::export::Formatter::write_str(formatter, #expecting)
             }
 
-            impl #de_from_impl_generics _serde::de::Visitor<#delife> for __Visitor #de_from_ty_generics #where_clause {
-                type Value = ();
-
-                fn expecting(&self, formatter: &mut _serde::export::Formatter) -> _serde::export::fmt::Result {
-                    _serde::export::Formatter::write_str(formatter, #expecting)
-                }
-
-                #visit_seq
+            #visit_seq
 
-                #[inline]
-                #[allow(unreachable_code)]
-                fn visit_map<__A>(self, mut __map: __A) -> _serde::export::Result<Self::Value, __A::Error>
-                    where __A: _serde::de::MapAccess<#delife>
-                {
-                    #visit_map
-                }
+            #[inline]
+            fn visit_map<__A>(self, mut __map: __A) -> _serde::export::Result<Self::Value, __A::Error>
+                where __A: _serde::de::MapAccess<#delife>
+            {
+                #visit_map
             }
-
-            #fields_stmt
+        }
 
-            #dispatch
-        })
+        #fields_stmt
+
+        #dispatch
     }
 }
 
 fn deserialize_enum(
     params: &Parameters,
     variants: &[Variant],
     cattrs: &attr::Container,
 ) -> Fragment {
@@ -1023,74 +1003,81 @@ fn deserialize_enum(
         attr::EnumTag::Adjacent {
             ref tag,
             ref content,
         } => deserialize_adjacently_tagged_enum(params, variants, cattrs, tag, content),
         attr::EnumTag::None => deserialize_untagged_enum(params, variants, cattrs),
     }
 }
 
-#[cfg(feature = "deserialize_from")]
-fn deserialize_from_enum(
+#[cfg(feature = "deserialize_in_place")]
+fn deserialize_enum_in_place(
     params: &Parameters,
     repr: &Repr,
     variants: &[Variant],
     cattrs: &attr::Container,
 ) -> Option<Fragment> {
     match *cattrs.tag() {
-        attr::EnumTag::External => deserialize_from_externally_tagged_enum(params, repr, variants, cattrs),
+        attr::EnumTag::External => deserialize_externally_tagged_enum_in_place(params, repr, variants, cattrs),
         _ => None,
     }
 }
 
 fn deserialize_externally_tagged_enum(
     params: &Parameters,
     variants: &[Variant],
     cattrs: &attr::Container,
 ) -> Fragment {
     let this = &params.this;
-    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
+    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) =
+        split_with_de_lifetime(params);
     let delife = params.borrowed.de_lifetime();
 
     let type_name = cattrs.name().deserialize_name();
 
     let expecting = format!("enum {}", params.type_name());
 
     let variant_names_idents: Vec<_> = variants
         .iter()
         .enumerate()
         .filter(|&(_, variant)| !variant.attrs.skip_deserializing())
-        .map(|(i, variant)| (variant.attrs.name().deserialize_name(), field_i(i)),)
+        .map(|(i, variant)| (variant.attrs.name().deserialize_name(), field_i(i)))
         .collect();
 
     let variants_stmt = {
         let variant_names = variant_names_idents.iter().map(|&(ref name, _)| name);
         quote! {
             const VARIANTS: &'static [&'static str] = &[ #(#variant_names),* ];
         }
     };
 
-    let variant_visitor = Stmts(deserialize_generated_identifier(variant_names_idents, cattrs, true),);
+    let variant_visitor = Stmts(deserialize_generated_identifier(
+        variant_names_idents,
+        cattrs,
+        true,
+    ));
 
     // Match arms to extract a variant from a string
     let variant_arms = variants
         .iter()
         .enumerate()
         .filter(|&(_, variant)| !variant.attrs.skip_deserializing())
-        .map(
-            |(i, variant)| {
-                let variant_name = field_i(i);
-
-                let block = Match(deserialize_externally_tagged_variant(params, variant, cattrs),);
+        .map(|(i, variant)| {
+            let variant_name = field_i(i);
 
-                quote! {
-                    (__Field::#variant_name, __variant) => #block
-                }
-            },
-        );
+            let block = Match(deserialize_externally_tagged_variant(
+                params,
+                variant,
+                cattrs,
+            ));
+
+            quote! {
+                (__Field::#variant_name, __variant) => #block
+            }
+        });
 
     let all_skipped = variants
         .iter()
         .all(|variant| variant.attrs.skip_deserializing());
     let match_variant = if all_skipped {
         // This is an empty enum like `enum Impossible {}` or an enum in which
         // all variants have `#[serde(skip_deserializing)]`.
         quote! {
@@ -1136,33 +1123,33 @@ fn deserialize_externally_tagged_enum(
         _serde::Deserializer::deserialize_enum(__deserializer, #type_name, VARIANTS,
                                                __Visitor {
                                                    marker: _serde::export::PhantomData::<#this #ty_generics>,
                                                    lifetime: _serde::export::PhantomData,
                                                })
     }
 }
 
-#[cfg(feature = "deserialize_from")]
-fn deserialize_from_externally_tagged_enum(
+#[cfg(feature = "deserialize_in_place")]
+fn deserialize_externally_tagged_enum_in_place(
     params: &Parameters,
     repr: &Repr,
     variants: &[Variant],
     cattrs: &attr::Container,
 ) -> Option<Fragment> {
     let int_repr = repr.get_stable_rust_enum_layout().map(|int_repr| {
         let int_repr = Ident::new(int_repr);
         quote!(#[repr(#int_repr)])
     });
-    
+
     let unit_variant = variants.iter().position(|variant| is_unit(variant));
     let non_unit_variant = variants.iter().enumerate().find(|&(_, variant)| !is_unit(variant));
-    
+
     // We need an int_repr, unit variant, and a non-unit variant to proceed
-    if int_repr.is_none() || unit_variant.is_none() || non_unit_variant.is_none() { 
+    if int_repr.is_none() || unit_variant.is_none() || non_unit_variant.is_none() {
         return None;
     }
 
     let unit_index = unit_variant.unwrap();
     let (non_unit_index, non_unit_variant) = non_unit_variant.unwrap();
     let int_repr = int_repr.unwrap();
 
     let this = &params.this;
@@ -1210,17 +1197,17 @@ fn deserialize_from_externally_tagged_en
                 let variant_name = field_i(i);
                 sub_params.this = syn::Path::from(variant_name.clone());
 
                 let this_decl = if is_unit(variant) {
                     None
                 } else {
                     Some(quote!(let this = &mut repr.#variant_name;))
                 };
-                let block = Stmts(deserialize_from_externally_tagged_variant(&sub_params, variant, cattrs));
+                let block = Stmts(deserialize_externally_tagged_variant_in_place(&sub_params, variant, cattrs));
                 quote! {
                     (__Field::#variant_name, __variant) => {
                         {
                             #this_decl
                             #block;
                         }
                         #tag_access = __Tag::#variant_name;
                         _serde::export::Result::Ok(())
@@ -1241,20 +1228,20 @@ fn deserialize_from_externally_tagged_en
             // let _serde::export::Err(__err) = _serde::de::EnumAccess::variant::<__Field>(__data);
             // _serde::export::Err(__err)
             _serde::export::Result::map(
                 _serde::de::EnumAccess::variant::<__Field>(__data),
                 |(__impossible, _)| match __impossible {})
         }
     } else {
         let unit_field = field_i(unit_index);
-        
+
         quote! {
             unsafe {
-                let repr = ::std::mem::transmute::<&mut #this #ty_generics, &mut __EnumRepr>(self.dest);
+                let repr = ::std::mem::transmute::<&mut #this #ty_generics, &mut __EnumRepr>(self.place);
                 #tag_access = __Tag::#unit_field;
                 match try!(_serde::de::EnumAccess::variant(__data)) {
                     #(#variant_arms_from)*
                 }
             }
         }
     };
 
@@ -1277,17 +1264,17 @@ fn deserialize_from_externally_tagged_en
         .enumerate()
         .map(
             |(i, _variant)| {
                 let variant_name = field_i(i);
 
                 quote!(#variant_name)
             }
         );
-    
+
 
     let repr_payloads = variants
         .iter()
         .enumerate()
         .filter_map(
             |(i, variant)| {
                 let variant_name = field_i(i);
                 match variant.style {
@@ -1324,17 +1311,17 @@ fn deserialize_from_externally_tagged_en
                                 #(#fields),*
 
                             );
                         };
                         Some(payload)
                     }
                     Style::Unit => None,
                 }
-                
+
             }
         );
 
     let raw_repr = quote! {
         #[repr(C)]
         #[allow(non_camel_case_types)]
         union __EnumRepr #ty_generics {
             #(#repr_cases),*
@@ -1345,25 +1332,25 @@ fn deserialize_from_externally_tagged_en
         #[allow(non_camel_case_types)]
         enum __Tag {
             #(#tag_cases),*
         }
 
         #(#repr_payloads)*
     };
 
-    let de_from_impl_generics = de_impl_generics.with_dest();
-    let de_from_ty_generics = de_ty_generics.with_dest();
-    let dest_life = dest_lifetime();
+    let de_from_impl_generics = de_impl_generics.in_place();
+    let de_from_ty_generics = de_ty_generics.in_place();
+    let dest_life = place_lifetime();
 
     Some(quote_block! {
         #variant_visitor
 
         struct __Visitor #de_from_impl_generics #where_clause {
-            dest: &#dest_life mut #this #ty_generics,
+            place: &#dest_life mut #this #ty_generics,
             lifetime: _serde::export::PhantomData<&#delife ()>,
         }
 
         impl #de_from_impl_generics _serde::de::Visitor<#delife> for __Visitor #de_from_ty_generics #where_clause {
             type Value = ();
 
             fn expecting(&self, formatter: &mut _serde::export::Formatter) -> _serde::export::fmt::Result {
                 _serde::export::Formatter::write_str(formatter, #expecting)
@@ -1377,56 +1364,63 @@ fn deserialize_from_externally_tagged_en
                 #match_variant_from
             }
         }
 
         #variants_stmt
 
         _serde::Deserializer::deserialize_enum(__deserializer, #type_name, VARIANTS,
                                                __Visitor {
-                                                   dest: self,
+                                                   place: __place,
                                                    lifetime: _serde::export::PhantomData,
                                                })
     })
 }
 
 fn deserialize_internally_tagged_enum(
     params: &Parameters,
     variants: &[Variant],
     cattrs: &attr::Container,
     tag: &str,
 ) -> Fragment {
     let variant_names_idents: Vec<_> = variants
         .iter()
         .enumerate()
         .filter(|&(_, variant)| !variant.attrs.skip_deserializing())
-        .map(|(i, variant)| (variant.attrs.name().deserialize_name(), field_i(i)),)
+        .map(|(i, variant)| (variant.attrs.name().deserialize_name(), field_i(i)))
         .collect();
 
     let variants_stmt = {
         let variant_names = variant_names_idents.iter().map(|&(ref name, _)| name);
         quote! {
             const VARIANTS: &'static [&'static str] = &[ #(#variant_names),* ];
         }
     };
 
-    let variant_visitor = Stmts(deserialize_generated_identifier(variant_names_idents, cattrs, true),);
+    let variant_visitor = Stmts(deserialize_generated_identifier(
+        variant_names_idents,
+        cattrs,
+        true,
+    ));
 
     // Match arms to extract a variant from a string
-    let variant_arms = variants.iter()
+    let variant_arms = variants
+        .iter()
         .enumerate()
         .filter(|&(_, variant)| !variant.attrs.skip_deserializing())
         .map(|(i, variant)| {
             let variant_name = field_i(i);
 
             let block = Match(deserialize_internally_tagged_variant(
                 params,
                 variant,
                 cattrs,
-                quote!(_serde::private::de::ContentDeserializer::<__D::Error>::new(__tagged.content)),
+                quote!(
+                    _serde::private::de::ContentDeserializer::<__D::Error>::new(__tagged.content)
+                ),
             ));
 
             quote! {
                 __Field::#variant_name => #block
             }
         });
 
     quote_block! {
@@ -1447,57 +1441,58 @@ fn deserialize_internally_tagged_enum(
 fn deserialize_adjacently_tagged_enum(
     params: &Parameters,
     variants: &[Variant],
     cattrs: &attr::Container,
     tag: &str,
     content: &str,
 ) -> Fragment {
     let this = &params.this;
-    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
+    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) =
+        split_with_de_lifetime(params);
     let delife = params.borrowed.de_lifetime();
 
     let variant_names_idents: Vec<_> = variants
         .iter()
         .enumerate()
         .filter(|&(_, variant)| !variant.attrs.skip_deserializing())
-        .map(|(i, variant)| (variant.attrs.name().deserialize_name(), field_i(i)),)
+        .map(|(i, variant)| (variant.attrs.name().deserialize_name(), field_i(i)))
         .collect();
 
     let variants_stmt = {
         let variant_names = variant_names_idents.iter().map(|&(ref name, _)| name);
         quote! {
             const VARIANTS: &'static [&'static str] = &[ #(#variant_names),* ];
         }
     };
 
-    let variant_visitor = Stmts(deserialize_generated_identifier(variant_names_idents, cattrs, true),);
+    let variant_visitor = Stmts(deserialize_generated_identifier(
+        variant_names_idents,
+        cattrs,
+        true,
+    ));
 
     let ref variant_arms: Vec<_> = variants
         .iter()
         .enumerate()
         .filter(|&(_, variant)| !variant.attrs.skip_deserializing())
-        .map(
-            |(i, variant)| {
-                let variant_index = field_i(i);
+        .map(|(i, variant)| {
+            let variant_index = field_i(i);
 
-                let block = Match(
-                    deserialize_untagged_variant(
-                        params,
-                        variant,
-                        cattrs,
-                        quote!(__deserializer),
-                    ),
-                );
+            let block = Match(deserialize_untagged_variant(
+                params,
+                variant,
+                cattrs,
+                quote!(__deserializer),
+            ));
 
-                quote! {
-                    __Field::#variant_index => #block
-                }
-            },
-        )
+            quote! {
+                __Field::#variant_index => #block
+            }
+        })
         .collect();
 
     let expecting = format!("adjacently tagged enum {}", params.type_name());
     let type_name = cattrs.name().deserialize_name();
     let deny_unknown_fields = cattrs.deny_unknown_fields();
 
     // If unknown fields are allowed, we pick the visitor that can step over
     // those. Otherwise we pick the visitor that fails on unknown keys.
@@ -1516,35 +1511,31 @@ fn deserialize_adjacently_tagged_enum(
 
     let mut missing_content = quote! {
         _serde::export::Err(<__A::Error as _serde::de::Error>::missing_field(#content))
     };
     if variants.iter().any(is_unit) {
         let fallthrough = if variants.iter().all(is_unit) {
             None
         } else {
-            Some(
-                quote! {
-                    _ => #missing_content
-                },
-            )
+            Some(quote! {
+                _ => #missing_content
+            })
         };
         let arms = variants
             .iter()
             .enumerate()
-            .filter(|&(_, variant)| !variant.attrs.skip_deserializing() && is_unit(variant),)
-            .map(
-                |(i, variant)| {
-                    let variant_index = field_i(i);
-                    let variant_ident = &variant.ident;
-                    quote! {
-                        __Field::#variant_index => _serde::export::Ok(#this::#variant_ident),
-                    }
-                },
-            );
+            .filter(|&(_, variant)| !variant.attrs.skip_deserializing() && is_unit(variant))
+            .map(|(i, variant)| {
+                let variant_index = field_i(i);
+                let variant_ident = &variant.ident;
+                quote! {
+                    __Field::#variant_index => _serde::export::Ok(#this::#variant_ident),
+                }
+            });
         missing_content = quote! {
             match __field {
                 #(#arms)*
                 #fallthrough
             }
         };
     }
 
@@ -1553,39 +1544,37 @@ fn deserialize_adjacently_tagged_enum(
         try!(_serde::de::MapAccess::next_key_seed(&mut __map, #tag_or_content))
     };
 
     // When allowing unknown fields, we want to transparently step through keys
     // we don't care about until we find `tag`, `content`, or run out of keys.
     let next_relevant_key = if deny_unknown_fields {
         next_key
     } else {
-        quote! {
-            {
-                let mut __rk : _serde::export::Option<_serde::private::de::TagOrContentField> = _serde::export::None;
-                while let _serde::export::Some(__k) = #next_key {
-                    match __k {
-                        _serde::private::de::TagContentOtherField::Other => {
-                            try!(_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map));
-                            continue;
-                        },
-                        _serde::private::de::TagContentOtherField::Tag => {
-                            __rk = _serde::export::Some(_serde::private::de::TagOrContentField::Tag);
-                            break;
-                        }
-                        _serde::private::de::TagContentOtherField::Content => {
-                            __rk = _serde::export::Some(_serde::private::de::TagOrContentField::Content);
-                            break;
-                        }
+        quote!({
+            let mut __rk : _serde::export::Option<_serde::private::de::TagOrContentField> = _serde::export::None;
+            while let _serde::export::Some(__k) = #next_key {
+                match __k {
+                    _serde::private::de::TagContentOtherField::Other => {
+                        try!(_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map));
+                        continue;
+                    },
+                    _serde::private::de::TagContentOtherField::Tag => {
+                        __rk = _serde::export::Some(_serde::private::de::TagOrContentField::Tag);
+                        break;
+                    }
+                    _serde::private::de::TagContentOtherField::Content => {
+                        __rk = _serde::export::Some(_serde::private::de::TagOrContentField::Content);
+                        break;
                     }
                 }
+            }
 
-                __rk
-            }
-        }
+            __rk
+        })
     };
 
     // Step through remaining keys, looking for duplicates of previously-seen
     // keys. When unknown fields are denied, any key that isn't a duplicate will
     // at this point immediately produce an error.
     let visit_remaining_keys = quote! {
         match #next_relevant_key {
             _serde::export::Some(_serde::private::de::TagOrContentField::Tag) => {
@@ -1737,35 +1726,35 @@ fn deserialize_adjacently_tagged_enum(
 fn deserialize_untagged_enum(
     params: &Parameters,
     variants: &[Variant],
     cattrs: &attr::Container,
 ) -> Fragment {
     let attempts = variants
         .iter()
         .filter(|variant| !variant.attrs.skip_deserializing())
-        .map(
-            |variant| {
-                Expr(deserialize_untagged_variant(
+        .map(|variant| {
+            Expr(deserialize_untagged_variant(
                 params,
                 variant,
                 cattrs,
                 quote!(_serde::private::de::ContentRefDeserializer::<__D::Error>::new(&__content)),
             ))
-            },
-        );
+        });
 
     // TODO this message could be better by saving the errors from the failed
     // attempts. The heuristic used by TOML was to count the number of fields
     // processed before an error, and use the error that happened after the
     // largest number of fields. I'm not sure I like that. Maybe it would be
     // better to save all the errors and combine them into one message that
     // explains why none of the variants matched.
-    let fallthrough_msg =
-        format!("data did not match any variant of untagged enum {}", params.type_name());
+    let fallthrough_msg = format!(
+        "data did not match any variant of untagged enum {}",
+        params.type_name()
+    );
 
     quote_block! {
         let __content = try!(<_serde::private::de::Content as _serde::Deserialize>::deserialize(__deserializer));
 
         #(
             if let _serde::export::Ok(__ok) = #attempts {
                 return _serde::export::Ok(__ok);
             }
@@ -1801,24 +1790,29 @@ fn deserialize_externally_tagged_variant
             }
         }
         Style::Newtype => {
             deserialize_externally_tagged_newtype_variant(variant_ident, params, &variant.fields[0])
         }
         Style::Tuple => {
             deserialize_tuple(Some(variant_ident), params, &variant.fields, cattrs, None)
         }
-        Style::Struct => {
-            deserialize_struct(Some(variant_ident), params, &variant.fields, cattrs, None, Untagged::No)
-        }
+        Style::Struct => deserialize_struct(
+            Some(variant_ident),
+            params,
+            &variant.fields,
+            cattrs,
+            None,
+            Untagged::No,
+        ),
     }
 }
 
-#[cfg(feature = "deserialize_from")]
-fn deserialize_from_externally_tagged_variant(
+#[cfg(feature = "deserialize_in_place")]
+fn deserialize_externally_tagged_variant_in_place(
     params: &Parameters,
     variant: &Variant,
     cattrs: &attr::Container,
 ) -> Fragment {
     if let Some(_path) = variant.attrs.deserialize_with() {
         unimplemented!()
         /*
         let (wrapper, wrapper_ty, unwrap_fn) =
@@ -1835,20 +1829,20 @@ fn deserialize_from_externally_tagged_va
 
     match variant.style {
         Style::Unit => {
             quote_block! {
                 try!(_serde::de::VariantAccess::unit_variant(__variant));
             }
         }
         Style::Newtype => {
-            deserialize_from_externally_tagged_newtype_variant(variant_ident, params, &variant.fields[0])
+            deserialize_externally_tagged_newtype_variant_in_place(variant_ident, params, &variant.fields[0])
         }
         Style::Tuple => {
-            deserialize_from_tuple(Some(variant_ident), params, &variant.fields, cattrs, None).expect("???")
+            deserialize_tuple_in_place(Some(variant_ident), params, &variant.fields, cattrs, None)
         }
         Style::Struct => {
             unimplemented!()
             // deserialize_struct(None, params, &variant.fields, cattrs, None, Untagged::No).0
         }
     }
 }
 
@@ -1869,34 +1863,30 @@ fn deserialize_internally_tagged_variant
             let this = &params.this;
             let type_name = params.type_name();
             let variant_name = variant.ident.as_ref();
             quote_block! {
                 try!(_serde::Deserializer::deserialize_any(#deserializer, _serde::private::de::InternallyTaggedUnitVisitor::new(#type_name, #variant_name)));
                 _serde::export::Ok(#this::#variant_ident)
             }
         }
-        Style::Newtype => {
-            deserialize_untagged_newtype_variant(
-                variant_ident,
-                params,
-                &variant.fields[0],
-                deserializer,
-            )
-        }
-        Style::Struct => {
-            deserialize_struct(
-                Some(variant_ident),
-                params,
-                &variant.fields,
-                cattrs,
-                Some(deserializer),
-                Untagged::No,
-            )
-        }
+        Style::Newtype => deserialize_untagged_newtype_variant(
+            variant_ident,
+            params,
+            &variant.fields[0],
+            deserializer,
+        ),
+        Style::Struct => deserialize_struct(
+            Some(variant_ident),
+            params,
+            &variant.fields,
+            cattrs,
+            Some(deserializer),
+            Untagged::No,
+        ),
         Style::Tuple => unreachable!("checked in serde_derive_internals"),
     }
 }
 
 fn deserialize_untagged_variant(
     params: &Parameters,
     variant: &Variant,
     cattrs: &attr::Container,
@@ -1923,43 +1913,37 @@ fn deserialize_untagged_variant(
                 _serde::export::Result::map(
                     _serde::Deserializer::deserialize_any(
                         #deserializer,
                         _serde::private::de::UntaggedUnitVisitor::new(#type_name, #variant_name)
                     ),
                     |()| #this::#variant_ident)
             }
         }
-        Style::Newtype => {
-            deserialize_untagged_newtype_variant(
-                variant_ident,
-                params,
-                &variant.fields[0],
-                deserializer,
-            )
-        }
-        Style::Tuple => {
-            deserialize_tuple(
-                Some(variant_ident),
-                params,
-                &variant.fields,
-                cattrs,
-                Some(deserializer),
-            )
-        }
-        Style::Struct => {
-            deserialize_struct(
-                Some(variant_ident),
-                params,
-                &variant.fields,
-                cattrs,
-                Some(deserializer),
-                Untagged::Yes,
-            )
-        }
+        Style::Newtype => deserialize_untagged_newtype_variant(
+            variant_ident,
+            params,
+            &variant.fields[0],
+            deserializer,
+        ),
+        Style::Tuple => deserialize_tuple(
+            Some(variant_ident),
+            params,
+            &variant.fields,
+            cattrs,
+            Some(deserializer),
+        ),
+        Style::Struct => deserialize_struct(
+            Some(variant_ident),
+            params,
+            &variant.fields,
+            cattrs,
+            Some(deserializer),
+            Untagged::Yes,
+        ),
     }
 }
 
 fn deserialize_externally_tagged_newtype_variant(
     variant_ident: &syn::Ident,
     params: &Parameters,
     field: &Field,
 ) -> Fragment {
@@ -1980,26 +1964,27 @@ fn deserialize_externally_tagged_newtype
                 _serde::export::Result::map(
                     _serde::de::VariantAccess::newtype_variant::<#wrapper_ty>(__variant),
                     |__wrapper| #this::#variant_ident(__wrapper.value))
             }
         }
     }
 }
 
-fn deserialize_from_externally_tagged_newtype_variant(
+#[cfg(feature = "deserialize_in_place")]
+fn deserialize_externally_tagged_newtype_variant_in_place(
     _variant_ident: &syn::Ident,
     params: &Parameters,
     field: &Field,
 ) -> Fragment {
     let _this = &params.this;
     match field.attrs.deserialize_with() {
         None => {
             quote_expr! {
-                try!(_serde::de::VariantAccess::newtype_variant_seed(__variant, _serde::private::de::DeserializeFromSeed(&mut this.1)));
+                try!(_serde::de::VariantAccess::newtype_variant_seed(__variant, _serde::private::de::InPlaceSeed(&mut this.1)));
             }
         }
         Some(_path) => {
             unimplemented!();
             /*
             let (wrapper, wrapper_ty) = wrap_deserialize_field_with(params, field.ty, path);
             quote_block! {
                 #wrapper
@@ -2051,17 +2036,22 @@ fn deserialize_generated_identifier(
     let (ignore_variant, fallthrough) = if is_variant || cattrs.deny_unknown_fields() {
         (None, None)
     } else {
         let ignore_variant = quote!(__ignore,);
         let fallthrough = quote!(_serde::export::Ok(__Field::__ignore));
         (Some(ignore_variant), Some(fallthrough))
     };
 
-    let visitor_impl = Stmts(deserialize_identifier(this, &fields, is_variant, fallthrough),);
+    let visitor_impl = Stmts(deserialize_identifier(
+        this,
+        &fields,
+        is_variant,
+        fallthrough,
+    ));
 
     quote_block! {
         #[allow(non_camel_case_types)]
         enum __Field {
             #(#field_idents,)*
             #ignore_variant
         }
 
@@ -2117,17 +2107,22 @@ fn deserialize_custom_identifier(
             (variants, None)
         }
     } else {
         (variants, None)
     };
 
     let names_idents: Vec<_> = ordinary
         .iter()
-        .map(|variant| (variant.attrs.name().deserialize_name(), variant.ident.clone()),)
+        .map(|variant| {
+            (
+                variant.attrs.name().deserialize_name(),
+                variant.ident.clone(),
+            )
+        })
         .collect();
 
     let names = names_idents.iter().map(|&(ref name, _)| name);
 
     let names_const = if fallthrough.is_some() {
         None
     } else if is_variant {
         let variants = quote! {
@@ -2136,20 +2131,25 @@ fn deserialize_custom_identifier(
         Some(variants)
     } else {
         let fields = quote! {
             const FIELDS: &'static [&'static str] = &[ #(#names),* ];
         };
         Some(fields)
     };
 
-    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
+    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) =
+        split_with_de_lifetime(params);
     let delife = params.borrowed.de_lifetime();
-    let visitor_impl =
-        Stmts(deserialize_identifier(this.clone(), &names_idents, is_variant, fallthrough),);
+    let visitor_impl = Stmts(deserialize_identifier(
+        this.clone(),
+        &names_idents,
+        is_variant,
+        fallthrough,
+    ));
 
     quote_block! {
         #names_const
 
         struct __FieldVisitor #de_impl_generics #where_clause {
             marker: _serde::export::PhantomData<#this #ty_generics>,
             lifetime: _serde::export::PhantomData<&#delife ()>,
         }
@@ -2173,31 +2173,27 @@ fn deserialize_identifier(
     fields: &[(String, Ident)],
     is_variant: bool,
     fallthrough: Option<Tokens>,
 ) -> Fragment {
     let field_strs = fields.iter().map(|&(ref name, _)| name);
     let field_bytes = fields.iter().map(|&(ref name, _)| quote::ByteStr(name));
 
     let constructors: &Vec<_> = &fields
-                                     .iter()
-                                     .map(|&(_, ref ident)| quote!(#this::#ident))
-                                     .collect();
+        .iter()
+        .map(|&(_, ref ident)| quote!(#this::#ident))
+        .collect();
 
     let expecting = if is_variant {
         "variant identifier"
     } else {
         "field identifier"
     };
 
-    let index_expecting = if is_variant {
-        "variant"
-    } else {
-        "field"
-    };
+    let index_expecting = if is_variant { "variant" } else { "field" };
 
     let variant_indices = 0u64..;
     let fallthrough_msg = format!("{} index 0 <= i < {}", index_expecting, fields.len());
     let visit_index = quote! {
         fn visit_u64<__E>(self, __value: u64) -> _serde::export::Result<Self::Value, __E>
             where __E: _serde::de::Error
         {
             match __value {
@@ -2271,17 +2267,17 @@ fn deserialize_struct_visitor(
     params: &Parameters,
     fields: &[Field],
     cattrs: &attr::Container,
 ) -> (Fragment, Fragment, Fragment) {
     let field_names_idents: Vec<_> = fields
         .iter()
         .enumerate()
         .filter(|&(_, field)| !field.attrs.skip_deserializing())
-        .map(|(i, field)| (field.attrs.name().deserialize_name(), field_i(i)),)
+        .map(|(i, field)| (field.attrs.name().deserialize_name(), field_i(i)))
         .collect();
 
     let fields_stmt = {
         let field_names = field_names_idents.iter().map(|&(ref name, _)| name);
         quote_block! {
             const FIELDS: &'static [&'static str] = &[ #(#field_names),* ];
         }
     };
@@ -2305,41 +2301,39 @@ fn deserialize_map(
         .enumerate()
         .map(|(i, field)| (field, field_i(i)))
         .collect();
 
     // Declare each field that will be deserialized.
     let let_values = fields_names
         .iter()
         .filter(|&&(field, _)| !field.attrs.skip_deserializing())
-        .map(
-            |&(field, ref name)| {
-                let field_ty = &field.ty;
-                quote! {
-                    let mut #name: _serde::export::Option<#field_ty> = _serde::export::None;
-                }
-            },
-        );
+        .map(|&(field, ref name)| {
+            let field_ty = &field.ty;
+            quote! {
+                let mut #name: _serde::export::Option<#field_ty> = _serde::export::None;
+            }
+        });
 
     // Match arms to extract a value for a field.
-    let value_arms = fields_names.iter()
+    let value_arms = fields_names
+        .iter()
         .filter(|&&(field, _)| !field.attrs.skip_deserializing())
         .map(|&(field, ref name)| {
             let deser_name = field.attrs.name().deserialize_name();
 
             let visit = match field.attrs.deserialize_with() {
                 None => {
                     let field_ty = &field.ty;
                     quote! {
                         try!(_serde::de::MapAccess::next_value::<#field_ty>(&mut __map))
                     }
                 }
                 Some(path) => {
-                    let (wrapper, wrapper_ty) = wrap_deserialize_field_with(
-                        params, field.ty, path);
+                    let (wrapper, wrapper_ty) = wrap_deserialize_field_with(params, field.ty, path);
                     quote!({
                         #wrapper
                         try!(_serde::de::MapAccess::next_value::<#wrapper_ty>(&mut __map)).value
                     })
                 }
             };
             quote! {
                 __Field::#name => {
@@ -2355,19 +2349,17 @@ fn deserialize_map(
     let ignored_arm = if cattrs.deny_unknown_fields() {
         None
     } else {
         Some(quote! {
             _ => { let _ = try!(_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map)); }
         })
     };
 
-    let all_skipped = fields
-        .iter()
-        .all(|field| field.attrs.skip_deserializing());
+    let all_skipped = fields.iter().all(|field| field.attrs.skip_deserializing());
     let match_keys = if cattrs.deny_unknown_fields() && all_skipped {
         quote! {
             // FIXME: Once we drop support for Rust 1.15:
             // let _serde::export::None::<__Field> = try!(_serde::de::MapAccess::next_key(&mut __map));
             _serde::export::Option::map(
                 try!(_serde::de::MapAccess::next_key::<__Field>(&mut __map)),
                 |__impossible| match __impossible {});
         }
@@ -2380,61 +2372,44 @@ fn deserialize_map(
                 }
             }
         }
     };
 
     let extract_values = fields_names
         .iter()
         .filter(|&&(field, _)| !field.attrs.skip_deserializing())
-        .map(
-            |&(field, ref name)| {
-                let missing_expr = Match(expr_is_missing(&field, cattrs));
-
-                quote! {
-                    let #name = match #name {
-                        _serde::export::Some(#name) => #name,
-                        _serde::export::None => #missing_expr
-                    };
-                }
-            },
-        );
+        .map(|&(field, ref name)| {
+            let missing_expr = Match(expr_is_missing(&field, cattrs));
 
-    let result = fields_names
-        .iter()
-        .map(
-            |&(field, ref name)| {
-                let ident = field
-                    .ident
-                    .clone()
-                    .expect("struct contains unnamed fields");
-                if field.attrs.skip_deserializing() {
-                    let value = Expr(expr_is_missing(&field, cattrs));
-                    quote!(#ident: #value)
-                } else {
-                    quote!(#ident: #name)
-                }
-            },
-        );
+            quote! {
+                let #name = match #name {
+                    _serde::export::Some(#name) => #name,
+                    _serde::export::None => #missing_expr
+                };
+            }
+        });
+
+    let result = fields_names.iter().map(|&(field, ref name)| {
+        let ident = field.ident.clone().expect("struct contains unnamed fields");
+        if field.attrs.skip_deserializing() {
+            let value = Expr(expr_is_missing(&field, cattrs));
+            quote!(#ident: #value)
+        } else {
+            quote!(#ident: #name)
+        }
+    });
 
     let let_default = match *cattrs.default() {
-        attr::Default::Default => {
-            Some(
-                quote!(
-                let __default: Self::Value = _serde::export::Default::default();
-            ),
-            )
-        }
-        attr::Default::Path(ref path) => {
-            Some(
-                quote!(
-                let __default: Self::Value = #path();
-            ),
-            )
-        }
+        attr::Default::Default => Some(quote!(
+            let __default: Self::Value = _serde::export::Default::default();
+        )),
+        attr::Default::Path(ref path) => Some(quote!(
+            let __default: Self::Value = #path();
+        )),
         attr::Default::None => {
             // We don't need the default value, to prevent an unused variable warning
             // we'll leave the line empty.
             None
         }
     };
 
     let mut result = quote!(#struct_path { #(#result),* });
@@ -2453,87 +2428,85 @@ fn deserialize_map(
         #let_default
 
         #(#extract_values)*
 
         _serde::export::Ok(#result)
     }
 }
 
-#[cfg(feature = "deserialize_from")]
-fn deserialize_from_struct_visitor(
+#[cfg(feature = "deserialize_in_place")]
+fn deserialize_struct_in_place_visitor(
     params: &Parameters,
     fields: &[Field],
     cattrs: &attr::Container,
 ) -> (Fragment, Fragment, Fragment) {
     let field_names_idents: Vec<_> = fields
         .iter()
         .enumerate()
         .filter(|&(_, field)| !field.attrs.skip_deserializing())
-        .map(|(i, field)| (field.attrs.name().deserialize_name(), field_i(i)),)
+        .map(|(i, field)| (field.attrs.name().deserialize_name(), field_i(i)))
         .collect();
 
     let fields_stmt = {
         let field_names = field_names_idents.iter().map(|&(ref name, _)| name);
         quote_block! {
             const FIELDS: &'static [&'static str] = &[ #(#field_names),* ];
         }
     };
 
     let field_visitor = deserialize_generated_identifier(field_names_idents, cattrs, false);
 
-    let visit_map = deserialize_from_map(params, fields, cattrs);
+    let visit_map = deserialize_map_in_place(params, fields, cattrs);
 
     (field_visitor, fields_stmt, visit_map)
 }
 
-#[cfg(feature = "deserialize_from")]
-fn deserialize_from_map(
+#[cfg(feature = "deserialize_in_place")]
+fn deserialize_map_in_place(
     params: &Parameters,
     fields: &[Field],
     cattrs: &attr::Container,
 ) -> Fragment {
     // Create the field names for the fields.
     let fields_names: Vec<_> = fields
         .iter()
         .enumerate()
         .map(|(i, field)| (field, field_i(i)))
         .collect();
 
-    // For deserialize_from, declare booleans for each field that will be deserialized.
+    // For deserialize_in_place, declare booleans for each field that will be deserialized.
     let let_flags = fields_names
         .iter()
         .filter(|&&(field, _)| !field.attrs.skip_deserializing())
-        .map(
-            |&(_, ref name)| {
-                quote! {
-                    let mut #name: bool = false;
-                }
-            },
-        );
+        .map(|&(_, ref name)| {
+            quote! {
+                let mut #name: bool = false;
+            }
+        });
 
     // Match arms to extract a value for a field.
-    let value_arms_from = fields_names.iter()
+    let value_arms_from = fields_names
+        .iter()
         .filter(|&&(field, _)| !field.attrs.skip_deserializing())
         .map(|&(field, ref name)| {
             let deser_name = field.attrs.name().deserialize_name();
             let field_name = &field.ident;
 
             let visit = match field.attrs.deserialize_with() {
                 None => {
                     quote! {
-                        try!(_serde::de::MapAccess::next_value_seed(&mut __map, _serde::private::de::DeserializeFromSeed(&mut self.dest.#field_name)))
+                        try!(_serde::de::MapAccess::next_value_seed(&mut __map, _serde::private::de::InPlaceSeed(&mut self.place.#field_name)))
                     }
                 }
                 Some(path) => {
-                    let (wrapper, wrapper_ty) = wrap_deserialize_field_with(
-                        params, field.ty, path);
+                    let (wrapper, wrapper_ty) = wrap_deserialize_field_with(params, field.ty, path);
                     quote!({
                         #wrapper
-                        self.dest.#field_name = try!(_serde::de::MapAccess::next_value::<#wrapper_ty>(&mut __map)).value
+                        self.place.#field_name = try!(_serde::de::MapAccess::next_value::<#wrapper_ty>(&mut __map)).value
                     })
                 }
             };
             quote! {
                 __Field::#name => {
                     if #name {
                         return _serde::export::Err(<__A::Error as _serde::de::Error>::duplicate_field(#deser_name));
                     }
@@ -2547,19 +2520,17 @@ fn deserialize_from_map(
     let ignored_arm = if cattrs.deny_unknown_fields() {
         None
     } else {
         Some(quote! {
             _ => { let _ = try!(_serde::de::MapAccess::next_value::<_serde::de::IgnoredAny>(&mut __map)); }
         })
     };
 
-    let all_skipped = fields
-        .iter()
-        .all(|field| field.attrs.skip_deserializing());
+    let all_skipped = fields.iter().all(|field| field.attrs.skip_deserializing());
 
     let match_keys = if cattrs.deny_unknown_fields() && all_skipped {
         quote! {
             // FIXME: Once we drop support for Rust 1.15:
             // let _serde::export::None::<__Field> = try!(_serde::de::MapAccess::next_key(&mut __map));
             _serde::export::Option::map(
                 try!(_serde::de::MapAccess::next_key::<__Field>(&mut __map)),
                 |__impossible| match __impossible {});
@@ -2573,46 +2544,49 @@ fn deserialize_from_map(
                 }
             }
         }
     };
 
     let check_flags = fields_names
         .iter()
         .filter(|&&(field, _)| !field.attrs.skip_deserializing())
-        .map(
-            |&(field, ref name)| {
-                let missing_expr = Expr(expr_is_missing(&field, cattrs));
-                let field_name = &field.ident;
+        .map(|&(field, ref name)| {
+            let missing_expr = expr_is_missing(&field, cattrs);
+            // If missing_expr unconditionally returns an error, don't try
+            // to assign its value to self.place. Maybe this could be handled
+            // more elegantly.
+            if missing_expr.as_ref().as_str().starts_with("return ") {
+                let missing_expr = Stmts(missing_expr);
                 quote! {
                     if !#name {
-                        self.dest.#field_name = #missing_expr;
+                        #missing_expr;
+                    }
+                }
+            } else {
+                let field_name = &field.ident;
+                let missing_expr = Expr(missing_expr);
+                quote! {
+                    if !#name {
+                        self.place.#field_name = #missing_expr;
                     };
                 }
-            },
-        );
+            }
+        });
 
     let this = &params.this;
-    let (_, _, ty_generics, _) = split_with_de_lifetime(params,);
+    let (_, _, ty_generics, _) = split_with_de_lifetime(params);
 
     let let_default = match *cattrs.default() {
-        attr::Default::Default => {
-            Some(
-                quote!(
-                let __default: #this #ty_generics = _serde::export::Default::default();
-            ),
-            )
-        }
-        attr::Default::Path(ref path) => {
-            Some(
-                quote!(
-                let __default: #this #ty_generics = #path();
-            ),
-            )
-        }
+        attr::Default::Default => Some(quote!(
+            let __default: #this #ty_generics = _serde::export::Default::default();
+        )),
+        attr::Default::Path(ref path) => Some(quote!(
+            let __default: #this #ty_generics = #path();
+        )),
         attr::Default::None => {
             // We don't need the default value, to prevent an unused variable warning
             // we'll leave the line empty.
             None
         }
     };
 
     quote_block! {
@@ -2635,17 +2609,18 @@ fn field_i(i: usize) -> Ident {
 /// This function wraps the expression in `#[serde(deserialize_with = "...")]`
 /// in a trait to prevent it from accessing the internal `Deserialize` state.
 fn wrap_deserialize_with(
     params: &Parameters,
     value_ty: Tokens,
     deserialize_with: &syn::Path,
 ) -> (Tokens, Tokens) {
     let this = &params.this;
-    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) = split_with_de_lifetime(params,);
+    let (de_impl_generics, de_ty_generics, ty_generics, where_clause) =
+        split_with_de_lifetime(params);
     let delife = params.borrowed.de_lifetime();
 
     let wrapper = quote! {
         struct __DeserializeWith #de_impl_generics #where_clause {
             value: #value_ty,
             phantom: _serde::export::PhantomData<#this #ty_generics>,
             lifetime: _serde::export::PhantomData<&#delife ()>,
         }
@@ -2686,50 +2661,39 @@ fn wrap_deserialize_variant_with(
 
     let field_tys = variant.fields.iter().map(|field| field.ty);
     let (wrapper, wrapper_ty) =
         wrap_deserialize_with(params, quote!((#(#field_tys),*)), deserialize_with);
 
     let field_access = (0..variant.fields.len()).map(|n| Ident::new(format!("{}", n)));
     let unwrap_fn = match variant.style {
         Style::Struct => {
-            let field_idents = variant.fields.iter().map(|field| field.ident.as_ref().unwrap());
-            quote! {
-                {
-                    |__wrap| {
-                        #this::#variant_ident { #(#field_idents: __wrap.value.#field_access),* }
-                    }
+            let field_idents = variant
+                .fields
+                .iter()
+                .map(|field| field.ident.as_ref().unwrap());
+            quote!({
+                |__wrap| {
+                    #this::#variant_ident { #(#field_idents: __wrap.value.#field_access),* }
                 }
-            }
+            })
         }
-        Style::Tuple => {
-            quote! {
-                {
-                    |__wrap| {
-                        #this::#variant_ident(#(__wrap.value.#field_access),*)
-                    }
-                }
+        Style::Tuple => quote!({
+            |__wrap| {
+                #this::#variant_ident(#(__wrap.value.#field_access),*)
             }
-        }
-        Style::Newtype => {
-            quote! {
-                {
-                    |__wrap| {
-                        #this::#variant_ident(__wrap.value)
-                    }
-                }
+        }),
+        Style::Newtype => quote!({
+            |__wrap| {
+                #this::#variant_ident(__wrap.value)
             }
-        }
-        Style::Unit => {
-            quote! {
-                {
-                    |__wrap| { #this::#variant_ident }
-                }
-            }
-        }
+        }),
+        Style::Unit => quote!({
+            |__wrap| { #this::#variant_ident }
+        }),
     };
 
     (wrapper, wrapper_ty, unwrap_fn)
 }
 
 fn expr_is_missing(field: &Field, cattrs: &attr::Container) -> Fragment {
     match *field.attrs.default() {
         attr::Default::Default => {
@@ -2737,18 +2701,17 @@ fn expr_is_missing(field: &Field, cattrs
         }
         attr::Default::Path(ref path) => {
             return quote_expr!(#path());
         }
         attr::Default::None => { /* below */ }
     }
 
     match *cattrs.default() {
-        attr::Default::Default |
-        attr::Default::Path(_) => {
+        attr::Default::Default | attr::Default::Path(_) => {
             let ident = &field.ident;
             return quote_expr!(__default.#ident);
         }
         attr::Default::None => { /* below */ }
     }
 
     let name = field.attrs.name().deserialize_name();
     match field.attrs.deserialize_with() {
@@ -2761,106 +2724,110 @@ fn expr_is_missing(field: &Field, cattrs
             quote_expr! {
                 return _serde::export::Err(<__A::Error as _serde::de::Error>::missing_field(#name))
             }
         }
     }
 }
 
 struct DeImplGenerics<'a>(&'a Parameters);
-#[cfg(feature = "deserialize_from")]
-struct DeFromImplGenerics<'a>(&'a Parameters);
+#[cfg(feature = "deserialize_in_place")]
+struct InPlaceImplGenerics<'a>(&'a Parameters);
 
 impl<'a> ToTokens for DeImplGenerics<'a> {
     fn to_tokens(&self, tokens: &mut Tokens) {
         let mut generics = self.0.generics.clone();
         if let Some(de_lifetime) = self.0.borrowed.de_lifetime_def() {
             generics.lifetimes.insert(0, de_lifetime);
         }
         let (impl_generics, _, _) = generics.split_for_impl();
         impl_generics.to_tokens(tokens);
     }
 }
 
-#[cfg(feature = "deserialize_from")]
-impl<'a> ToTokens for DeFromImplGenerics<'a> {
+#[cfg(feature = "deserialize_in_place")]
+impl<'a> ToTokens for InPlaceImplGenerics<'a> {
     fn to_tokens(&self, tokens: &mut Tokens) {
-        let dest_lifetime = dest_lifetime();
+        let place_lifetime = place_lifetime();
         let mut generics = self.0.generics.clone();
 
-        // Add lifetime for `&'dest mut Self, and `'a: 'dest`
+        // Add lifetime for `&'place mut Self, and `'a: 'place`
         for lifetime in &mut generics.lifetimes {
-            lifetime.bounds.push(dest_lifetime.lifetime.clone());
+            lifetime.bounds.push(place_lifetime.lifetime.clone());
         }
         for generic in &mut generics.ty_params {
-            generic.bounds.push(syn::TyParamBound::Region(dest_lifetime.lifetime.clone()));
+            generic
+                .bounds
+                .push(syn::TyParamBound::Region(place_lifetime.lifetime.clone()));
         }
-        generics.lifetimes.insert(0, dest_lifetime);
+        generics.lifetimes.insert(0, place_lifetime);
         if let Some(de_lifetime) = self.0.borrowed.de_lifetime_def() {
             generics.lifetimes.insert(0, de_lifetime);
         }
         let (impl_generics, _, _) = generics.split_for_impl();
         impl_generics.to_tokens(tokens);
     }
 }
 
-#[cfg(feature = "deserialize_from")]
+#[cfg(feature = "deserialize_in_place")]
 impl<'a> DeImplGenerics<'a> {
-    fn with_dest(&self) -> DeFromImplGenerics<'a> {
-        DeFromImplGenerics(self.0)
+    fn in_place(self) -> InPlaceImplGenerics<'a> {
+        InPlaceImplGenerics(self.0)
     }
 }
 
 struct DeTyGenerics<'a>(&'a Parameters);
-#[cfg(feature = "deserialize_from")]
-struct DeFromTyGenerics<'a>(&'a Parameters);
+#[cfg(feature = "deserialize_in_place")]
+struct InPlaceTyGenerics<'a>(&'a Parameters);
 
 impl<'a> ToTokens for DeTyGenerics<'a> {
     fn to_tokens(&self, tokens: &mut Tokens) {
         let mut generics = self.0.generics.clone();
         if self.0.borrowed.de_lifetime_def().is_some() {
-            generics
-                .lifetimes
-                .insert(0, syn::LifetimeDef::new("'de"));
+            generics.lifetimes.insert(0, syn::LifetimeDef::new("'de"));
         }
         let (_, ty_generics, _) = generics.split_for_impl();
         ty_generics.to_tokens(tokens);
     }
 }
 
-#[cfg(feature = "deserialize_from")]
-impl<'a> ToTokens for DeFromTyGenerics<'a> {
+#[cfg(feature = "deserialize_in_place")]
+impl<'a> ToTokens for InPlaceTyGenerics<'a> {
     fn to_tokens(&self, tokens: &mut Tokens) {
         let mut generics = self.0.generics.clone();
-        generics.lifetimes.insert(0, dest_lifetime());
+        generics.lifetimes.insert(0, place_lifetime());
 
         if self.0.borrowed.de_lifetime_def().is_some() {
-            generics
-                .lifetimes
-                .insert(0, syn::LifetimeDef::new("'de"));
+            generics.lifetimes.insert(0, syn::LifetimeDef::new("'de"));
         }
         let (_, ty_generics, _) = generics.split_for_impl();
         ty_generics.to_tokens(tokens);
     }
 }
 
-#[cfg(feature = "deserialize_from")]
+#[cfg(feature = "deserialize_in_place")]
 impl<'a> DeTyGenerics<'a> {
-    fn with_dest(&self) -> DeFromTyGenerics<'a> {
-        DeFromTyGenerics(self.0)
+    fn in_place(self) -> InPlaceTyGenerics<'a> {
+        InPlaceTyGenerics(self.0)
     }
 }
 
-#[cfg(feature = "deserialize_from")]
-fn dest_lifetime() -> syn::LifetimeDef {
-    syn::LifetimeDef::new("'dest")
+#[cfg(feature = "deserialize_in_place")]
+fn place_lifetime() -> syn::LifetimeDef {
+    syn::LifetimeDef::new("'place")
 }
 
-fn split_with_de_lifetime(params: &Parameters,)
-    -> (DeImplGenerics, DeTyGenerics, syn::TyGenerics, &syn::WhereClause) {
+fn split_with_de_lifetime(
+    params: &Parameters,
+) -> (
+    DeImplGenerics,
+    DeTyGenerics,
+    syn::TyGenerics,
+    &syn::WhereClause,
+) {
     let de_impl_generics = DeImplGenerics(&params);
     let de_ty_generics = DeTyGenerics(&params);
     let (_, ty_generics, where_clause) = params.generics.split_for_impl();
     (de_impl_generics, de_ty_generics, ty_generics, where_clause)
 }
 
 fn is_unit(variant: &Variant) -> bool {
     match variant.style {
--- a/third_party/rust/serde_derive/src/fragment.rs
+++ b/third_party/rust/serde_derive/src/fragment.rs
@@ -1,17 +1,17 @@
 // Copyright 2017 Serde Developers
 //
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use quote::{Tokens, ToTokens};
+use quote::{ToTokens, Tokens};
 
 pub enum Fragment {
     /// Tokens that can be used as an expression.
     Expr(Tokens),
     /// Tokens that can be used inside a block. The surrounding curly braces are
     /// not part of these tokens.
     Block(Tokens),
 }
@@ -68,8 +68,17 @@ impl ToTokens for Match {
             Fragment::Block(ref block) => {
                 out.append("{");
                 block.to_tokens(out);
                 out.append("}");
             }
         }
     }
 }
+
+impl AsRef<Tokens> for Fragment {
+    fn as_ref(&self) -> &Tokens {
+        match *self {
+            Fragment::Expr(ref expr) => expr,
+            Fragment::Block(ref block) => block,
+        }
+    }
+}
--- a/third_party/rust/serde_derive/src/lib.rs
+++ b/third_party/rust/serde_derive/src/lib.rs
@@ -17,27 +17,25 @@
 //! #
 //! # fn main() {}
 //! ```
 //!
 //! Please refer to [https://serde.rs/derive.html] for how to set this up.
 //!
 //! [https://serde.rs/derive.html]: https://serde.rs/derive.html
 
-#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.23")]
-
+#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.27")]
 #![cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))]
 #![cfg_attr(feature = "cargo-clippy", allow(used_underscore_binding))]
-
 // The `quote!` macro requires deep recursion.
 #![recursion_limit = "192"]
 
-extern crate syn;
 #[macro_use]
 extern crate quote;
+extern crate syn;
 
 extern crate serde_derive_internals as internals;
 
 extern crate proc_macro;
 use proc_macro::TokenStream;
 
 #[macro_use]
 mod bound;
--- a/third_party/rust/serde_derive/src/ser.rs
+++ b/third_party/rust/serde_derive/src/ser.rs
@@ -5,17 +5,17 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 use syn::{self, Ident};
 use quote::Tokens;
 
 use bound;
-use fragment::{Fragment, Stmts, Match};
+use fragment::{Fragment, Match, Stmts};
 use internals::ast::{Body, Container, Field, Style, Variant};
 use internals::{attr, Ctxt};
 
 use std::u32;
 
 pub fn expand_derive_serialize(input: &syn::DeriveInput) -> Result<Tokens, String> {
     let ctxt = Ctxt::new();
     let cont = Container::from_ast(&ctxt, input);
@@ -127,37 +127,33 @@ impl Parameters {
 fn build_generics(cont: &Container) -> syn::Generics {
     let generics = bound::without_defaults(cont.generics);
 
     let generics =
         bound::with_where_predicates_from_fields(cont, &generics, attr::Field::ser_bound);
 
     match cont.attrs.ser_bound() {
         Some(predicates) => bound::with_where_predicates(&generics, predicates),
-        None => {
-            bound::with_bound(
-                cont,
-                &generics,
-                needs_serialize_bound,
-                &path!(_serde::Serialize),
-            )
-        }
+        None => bound::with_bound(
+            cont,
+            &generics,
+            needs_serialize_bound,
+            &path!(_serde::Serialize),
+        ),
     }
 }
 
 // Fields with a `skip_serializing` or `serialize_with` attribute, or which
 // belong to a variant with a `serialize_with` attribute, are not serialized by
 // us so we do not generate a bound. Fields with a `bound` attribute specify
 // their own bound so we do not generate one. All other fields may need a `T:
 // Serialize` bound where T is the type of the field.
 fn needs_serialize_bound(field: &attr::Field, variant: Option<&attr::Variant>) -> bool {
-    !field.skip_serializing() &&
-    field.serialize_with().is_none() &&
-    field.ser_bound().is_none() &&
-    variant.map_or(true, |variant| variant.serialize_with().is_none())
+    !field.skip_serializing() && field.serialize_with().is_none() && field.ser_bound().is_none()
+        && variant.map_or(true, |variant| variant.serialize_with().is_none())
 }
 
 fn serialize_body(cont: &Container, params: &Parameters) -> Fragment {
     if let Some(into_type) = cont.attrs.into_type() {
         serialize_into(params, into_type)
     } else {
         match cont.body {
             Body::Enum(_, ref variants) => serialize_enum(params, variants, &cont.attrs),
@@ -254,26 +250,24 @@ fn serialize_struct(params: &Parameters,
     let mut serialized_fields = fields
         .iter()
         .filter(|&field| !field.attrs.skip_serializing())
         .peekable();
 
     let let_mut = mut_if(serialized_fields.peek().is_some());
 
     let len = serialized_fields
-        .map(
-            |field| match field.attrs.skip_serializing_if() {
-                None => quote!(1),
-                Some(path) => {
-                    let ident = field.ident.clone().expect("struct has unnamed fields");
-                    let field_expr = get_field(params, field, ident);
-                    quote!(if #path(#field_expr) { 0 } else { 1 })
-                }
-            },
-        )
+        .map(|field| match field.attrs.skip_serializing_if() {
+            None => quote!(1),
+            Some(path) => {
+                let ident = field.ident.clone().expect("struct has unnamed fields");
+                let field_expr = get_field(params, field, ident);
+                quote!(if #path(#field_expr) { 0 } else { 1 })
+            }
+        })
         .fold(quote!(0), |sum, expr| quote!(#sum + #expr));
 
     quote_block! {
         let #let_mut __serde_state = try!(_serde::Serializer::serialize_struct(__serializer, #type_name, #len));
         #(#serialize_fields)*
         _serde::ser::SerializeStruct::end(__serde_state)
     }
 }
@@ -281,21 +275,19 @@ fn serialize_struct(params: &Parameters,
 fn serialize_enum(params: &Parameters, variants: &[Variant], cattrs: &attr::Container) -> Fragment {
     assert!(variants.len() as u64 <= u32::MAX as u64);
 
     let self_var = &params.self_var;
 
     let arms: Vec<_> = variants
         .iter()
         .enumerate()
-        .map(
-            |(variant_index, variant)| {
-                serialize_variant(params, variant, variant_index as u32, cattrs)
-            },
-        )
+        .map(|(variant_index, variant)| {
+            serialize_variant(params, variant, variant_index as u32, cattrs)
+        })
         .collect();
 
     quote_expr! {
         match *#self_var {
             #(#arms)*
         }
     }
 }
@@ -316,23 +308,17 @@ fn serialize_variant(
             variant_ident
         );
         let skipped_err = quote! {
             _serde::export::Err(_serde::ser::Error::custom(#skipped_msg))
         };
         let fields_pat = match variant.style {
             Style::Unit => quote!(),
             Style::Newtype | Style::Tuple => quote!((..)),
-            Style::Struct => {
-                quote!(
-                    {
-                        ..
-                    }
-                )
-            }
+            Style::Struct => quote!({ .. }),
         };
         quote! {
             #this::#variant_ident #fields_pat => #skipped_err,
         }
     } else {
         // variant wasn't skipped
         let case = match variant.style {
             Style::Unit => {
@@ -351,44 +337,36 @@ fn serialize_variant(
                 quote! {
                     #this::#variant_ident(#(ref #field_names),*)
                 }
             }
             Style::Struct => {
                 let fields = variant
                     .fields
                     .iter()
-                    .map(
-                        |f| {
-                            f.ident
-                                .clone()
-                                .expect("struct variant has unnamed fields")
-                        },
-                    );
+                    .map(|f| f.ident.clone().expect("struct variant has unnamed fields"));
                 quote! {
                     #this::#variant_ident { #(ref #fields),* }
                 }
             }
         };
 
-        let body = Match(
-            match *cattrs.tag() {
-                attr::EnumTag::External => {
-                    serialize_externally_tagged_variant(params, variant, variant_index, cattrs)
-                }
-                attr::EnumTag::Internal { ref tag } => {
-                    serialize_internally_tagged_variant(params, variant, cattrs, tag)
-                }
-                attr::EnumTag::Adjacent {
-                    ref tag,
-                    ref content,
-                } => serialize_adjacently_tagged_variant(params, variant, cattrs, tag, content),
-                attr::EnumTag::None => serialize_untagged_variant(params, variant, cattrs),
-            },
-        );
+        let body = Match(match *cattrs.tag() {
+            attr::EnumTag::External => {
+                serialize_externally_tagged_variant(params, variant, variant_index, cattrs)
+            }
+            attr::EnumTag::Internal { ref tag } => {
+                serialize_internally_tagged_variant(params, variant, cattrs, tag)
+            }
+            attr::EnumTag::Adjacent {
+                ref tag,
+                ref content,
+            } => serialize_adjacently_tagged_variant(params, variant, cattrs, tag, content),
+            attr::EnumTag::None => serialize_untagged_variant(params, variant, cattrs),
+        });
 
         quote! {
             #case => #body
         }
     }
 }
 
 fn serialize_externally_tagged_variant(
@@ -436,38 +414,34 @@ fn serialize_externally_tagged_variant(
                     __serializer,
                     #type_name,
                     #variant_index,
                     #variant_name,
                     #field_expr,
                 )
             }
         }
-        Style::Tuple => {
-            serialize_tuple_variant(
-                TupleVariant::ExternallyTagged {
-                    type_name: type_name,
-                    variant_index: variant_index,
-                    variant_name: variant_name,
-                },
-                params,
-                &variant.fields,
-            )
-        }
-        Style::Struct => {
-            serialize_struct_variant(
-                StructVariant::ExternallyTagged {
-                    variant_index: variant_index,
-                    variant_name: variant_name,
-                },
-                params,
-                &variant.fields,
-                &type_name,
-            )
-        }
+        Style::Tuple => serialize_tuple_variant(
+            TupleVariant::ExternallyTagged {
+                type_name: type_name,
+                variant_index: variant_index,
+                variant_name: variant_name,
+            },
+            params,
+            &variant.fields,
+        ),
+        Style::Struct => serialize_struct_variant(
+            StructVariant::ExternallyTagged {
+                variant_index: variant_index,
+                variant_name: variant_name,
+            },
+            params,
+            &variant.fields,
+            &type_name,
+        ),
     }
 }
 
 fn serialize_internally_tagged_variant(
     params: &Parameters,
     variant: &Variant,
     cattrs: &attr::Container,
     tag: &str,
@@ -515,113 +489,97 @@ fn serialize_internally_tagged_variant(
                     #enum_ident_str,
                     #variant_ident_str,
                     #tag,
                     #variant_name,
                     #field_expr,
                 )
             }
         }
-        Style::Struct => {
-            serialize_struct_variant(
-                StructVariant::InternallyTagged {
-                    tag: tag,
-                    variant_name: variant_name,
-                },
-                params,
-                &variant.fields,
-                &type_name,
-            )
-        }
+        Style::Struct => serialize_struct_variant(
+            StructVariant::InternallyTagged {
+                tag: tag,
+                variant_name: variant_name,
+            },
+            params,
+            &variant.fields,
+            &type_name,
+        ),
         Style::Tuple => unreachable!("checked in serde_derive_internals"),
     }
 }
 
 fn serialize_adjacently_tagged_variant(
     params: &Parameters,
     variant: &Variant,
     cattrs: &attr::Container,
     tag: &str,
     content: &str,
 ) -> Fragment {
     let this = &params.this;
     let type_name = cattrs.name().serialize_name();
     let variant_name = variant.attrs.name().serialize_name();
 
-    let inner = Stmts(
-        if let Some(path) = variant.attrs.serialize_with() {
-            let ser = wrap_serialize_variant_with(params, path, &variant);
-            quote_expr! {
-                _serde::Serialize::serialize(#ser, __serializer)
+    let inner = Stmts(if let Some(path) = variant.attrs.serialize_with() {
+        let ser = wrap_serialize_variant_with(params, path, &variant);
+        quote_expr! {
+            _serde::Serialize::serialize(#ser, __serializer)
+        }
+    } else {
+        match variant.style {
+            Style::Unit => {
+                return quote_block! {
+                    let mut __struct = try!(_serde::Serializer::serialize_struct(
+                        __serializer, #type_name, 1));
+                    try!(_serde::ser::SerializeStruct::serialize_field(
+                        &mut __struct, #tag, #variant_name));
+                    _serde::ser::SerializeStruct::end(__struct)
+                };
             }
-        } else {
-            match variant.style {
-                Style::Unit => {
-                    return quote_block! {
-                        let mut __struct = try!(_serde::Serializer::serialize_struct(
-                            __serializer, #type_name, 1));
-                        try!(_serde::ser::SerializeStruct::serialize_field(
-                            &mut __struct, #tag, #variant_name));
-                        _serde::ser::SerializeStruct::end(__struct)
-                    };
+            Style::Newtype => {
+                let field = &variant.fields[0];
+                let mut field_expr = quote!(__field0);
+                if let Some(path) = field.attrs.serialize_with() {
+                    field_expr = wrap_serialize_field_with(params, field.ty, path, field_expr);
                 }
-                Style::Newtype => {
-                    let field = &variant.fields[0];
-                    let mut field_expr = quote!(__field0);
-                    if let Some(path) = field.attrs.serialize_with() {
-                        field_expr = wrap_serialize_field_with(params, field.ty, path, field_expr);
-                    }
 
-                    quote_expr! {
-                        _serde::Serialize::serialize(#field_expr, __serializer)
-                    }
-                }
-                Style::Tuple => {
-                    serialize_tuple_variant(TupleVariant::Untagged, params, &variant.fields)
-                }
-                Style::Struct => {
-                    serialize_struct_variant(
-                        StructVariant::Untagged,
-                        params,
-                        &variant.fields,
-                        &variant_name,
-                    )
+                quote_expr! {
+                    _serde::Serialize::serialize(#field_expr, __serializer)
                 }
             }
-        },
-    );
+            Style::Tuple => {
+                serialize_tuple_variant(TupleVariant::Untagged, params, &variant.fields)
+            }
+            Style::Struct => serialize_struct_variant(
+                StructVariant::Untagged,
+                params,
+                &variant.fields,
+                &variant_name,
+            ),
+        }
+    });
 
     let fields_ty = variant.fields.iter().map(|f| &f.ty);
     let ref fields_ident: Vec<_> = match variant.style {
         Style::Unit => {
             if variant.attrs.serialize_with().is_some() {
                 vec![]
             } else {
                 unreachable!()
             }
         }
         Style::Newtype => vec![Ident::new("__field0")],
-        Style::Tuple => {
-            (0..variant.fields.len())
-                .map(|i| Ident::new(format!("__field{}", i)))
-                .collect()
-        }
-        Style::Struct => {
-            variant
-                .fields
-                .iter()
-                .map(
-                    |f| {
-                        f.ident
-                            .clone()
-                            .expect("struct variant has unnamed fields")
-                    },
-                )
-                .collect()
-        }
+        Style::Tuple => (0..variant.fields.len())
+            .map(|i| Ident::new(format!("__field{}", i)))
+            .collect(),
+        Style::Struct => variant
+            .fields
+            .iter()
+            .map(|f| f.ident.clone().expect("struct variant has unnamed fields"))
+            .collect(),
     };
 
     let (_, ty_generics, where_clause) = params.generics.split_for_impl();
 
     let wrapper_generics = if let Style::Unit = variant.style {
         params.generics.clone()
     } else {
         bound::with_lifetime_bound(&params.generics, "'__a")
@@ -748,62 +706,58 @@ fn serialize_tuple_variant(
     }
 }
 
 enum StructVariant<'a> {
     ExternallyTagged {
         variant_index: u32,
         variant_name: String,
     },
-    InternallyTagged { tag: &'a str, variant_name: String },
+    InternallyTagged {
+        tag: &'a str,
+        variant_name: String,
+    },
     Untagged,
 }
 
 fn serialize_struct_variant<'a>(
     context: StructVariant<'a>,
     params: &Parameters,
     fields: &[Field],
     name: &str,
 ) -> Fragment {
     let (method, skip_method) = match context {
-        StructVariant::ExternallyTagged { .. } => {
-            (
-                quote!(_serde::ser::SerializeStructVariant::serialize_field),
-                quote!(_serde::ser::SerializeStructVariant::skip_field),
-            )
-        }
-        StructVariant::InternallyTagged { .. } |
-        StructVariant::Untagged => {
-            (
-                quote!(_serde::ser::SerializeStruct::serialize_field),
-                quote!(_serde::ser::SerializeStruct::skip_field),
-            )
-        }
+        StructVariant::ExternallyTagged { .. } => (
+            quote!(_serde::ser::SerializeStructVariant::serialize_field),
+            quote!(_serde::ser::SerializeStructVariant::skip_field),
+        ),
+        StructVariant::InternallyTagged { .. } | StructVariant::Untagged => (
+            quote!(_serde::ser::SerializeStruct::serialize_field),
+            quote!(_serde::ser::SerializeStruct::skip_field),
+        ),
     };
 
     let serialize_fields = serialize_struct_visitor(fields, params, true, method, skip_method);
 
     let mut serialized_fields = fields
         .iter()
         .filter(|&field| !field.attrs.skip_serializing())
         .peekable();
 
     let let_mut = mut_if(serialized_fields.peek().is_some());
 
     let len = serialized_fields
-        .map(
-            |field| {
-                let ident = field.ident.clone().expect("struct has unnamed fields");
+        .map(|field| {
+            let ident = field.ident.clone().expect("struct has unnamed fields");
 
-                match field.attrs.skip_serializing_if() {
-                    Some(path) => quote!(if #path(#ident) { 0 } else { 1 }),
-                    None => quote!(1),
-                }
-            },
-        )
+            match field.attrs.skip_serializing_if() {
+                Some(path) => quote!(if #path(#ident) { 0 } else { 1 }),
+                None => quote!(1),
+            }
+        })
         .fold(quote!(0), |sum, expr| quote!(#sum + #expr));
 
     match context {
         StructVariant::ExternallyTagged {
             variant_index,
             variant_name,
         } => {
             quote_block! {
@@ -852,125 +806,127 @@ fn serialize_tuple_struct_visitor(
     fields: &[Field],
     params: &Parameters,
     is_enum: bool,
     func: Tokens,
 ) -> Vec<Tokens> {
     fields
         .iter()
         .enumerate()
-        .map(
-            |(i, field)| {
-                let mut field_expr = if is_enum {
-                    let id = Ident::new(format!("__field{}", i));
-                    quote!(#id)
-                } else {
-                    get_field(params, field, i)
-                };
+        .map(|(i, field)| {
+            let mut field_expr = if is_enum {
+                let id = Ident::new(format!("__field{}", i));
+                quote!(#id)
+            } else {
+                get_field(params, field, i)
+            };
 
-                let skip = field
-                    .attrs
-                    .skip_serializing_if()
-                    .map(|path| quote!(#path(#field_expr)));
+            let skip = field
+                .attrs
+                .skip_serializing_if()
+                .map(|path| quote!(#path(#field_expr)));
 
-                if let Some(path) = field.attrs.serialize_with() {
-                    field_expr = wrap_serialize_field_with(params, field.ty, path, field_expr);
-                }
+            if let Some(path) = field.attrs.serialize_with() {
+                field_expr = wrap_serialize_field_with(params, field.ty, path, field_expr);
+            }
 
-                let ser = quote! {
-                    try!(#func(&mut __serde_state, #field_expr));
-                };
+            let ser = quote! {
+                try!(#func(&mut __serde_state, #field_expr));
+            };
 
-                match skip {
-                    None => ser,
-                    Some(skip) => quote!(if !#skip { #ser }),
-                }
-            },
-        )
+            match skip {
+                None => ser,
+                Some(skip) => quote!(if !#skip { #ser }),
+            }
+        })
         .collect()
 }
 
 fn serialize_struct_visitor(
     fields: &[Field],
     params: &Parameters,
     is_enum: bool,
     func: Tokens,
     skip_func: Tokens,
 ) -> Vec<Tokens> {
     fields
         .iter()
         .filter(|&field| !field.attrs.skip_serializing())
-        .map(
-            |field| {
-                let field_ident = field.ident.clone().expect("struct has unnamed field");
-                let mut field_expr = if is_enum {
-                    quote!(#field_ident)
-                } else {
-                    get_field(params, field, field_ident)
-                };
+        .map(|field| {
+            let field_ident = field.ident.clone().expect("struct has unnamed field");
+            let mut field_expr = if is_enum {
+                quote!(#field_ident)
+            } else {
+                get_field(params, field, field_ident)
+            };
 
-                let key_expr = field.attrs.name().serialize_name();
+            let key_expr = field.attrs.name().serialize_name();
 
-                let skip = field
-                    .attrs
-                    .skip_serializing_if()
-                    .map(|path| quote!(#path(#field_expr)));
+            let skip = field
+                .attrs
+                .skip_serializing_if()
+                .map(|path| quote!(#path(#field_expr)));
 
-                if let Some(path) = field.attrs.serialize_with() {
-                    field_expr = wrap_serialize_field_with(params, field.ty, path, field_expr);
-                }
+            if let Some(path) = field.attrs.serialize_with() {
+                field_expr = wrap_serialize_field_with(params, field.ty, path, field_expr);
+            }
 
-                let ser = quote! {
-                    try!(#func(&mut __serde_state, #key_expr, #field_expr));
-                };
+            let ser = quote! {
+                try!(#func(&mut __serde_state, #key_expr, #field_expr));
+            };
 
-                match skip {
-                    None => ser,
-                    Some(skip) => {
-                        quote! {
-                            if !#skip {
-                                #ser
-                            } else {
-                                try!(#skip_func(&mut __serde_state, #key_expr));
-                            }
+            match skip {
+                None => ser,
+                Some(skip) => {
+                    quote! {
+                        if !#skip {
+                            #ser
+                        } else {
+                            try!(#skip_func(&mut __serde_state, #key_expr));
                         }
                     }
                 }
-            },
-        )
+            }
+        })
         .collect()
 }
 
 fn wrap_serialize_field_with(
     params: &Parameters,
     field_ty: &syn::Ty,
     serialize_with: &syn::Path,
     field_expr: Tokens,
 ) -> Tokens {
-    wrap_serialize_with(params,
-                        serialize_with,
-                        &[field_ty],
-                        &[quote!(#field_expr)])
+    wrap_serialize_with(params, serialize_with, &[field_ty], &[quote!(#field_expr)])
 }
 
 fn wrap_serialize_variant_with(
     params: &Parameters,
     serialize_with: &syn::Path,
     variant: &Variant,
 ) -> Tokens {
     let field_tys: Vec<_> = variant.fields.iter().map(|field| field.ty).collect();
-    let field_exprs: Vec<_> = variant.fields.iter()
+    let field_exprs: Vec<_> = variant
+        .fields
+        .iter()
         .enumerate()
         .map(|(i, field)| {
-            let id = field.ident.as_ref().map_or_else(|| Ident::new(format!("__field{}", i)),
-                                                      |id| id.clone());
+            let id = field
+                .ident
+                .as_ref()
+                .map_or_else(|| Ident::new(format!("__field{}", i)), |id| id.clone());
             quote!(#id)
         })
         .collect();
-    wrap_serialize_with(params, serialize_with, field_tys.as_slice(), field_exprs.as_slice())
+    wrap_serialize_with(
+        params,
+        serialize_with,
+        field_tys.as_slice(),
+        field_exprs.as_slice(),
+    )
 }
 
 fn wrap_serialize_with(
     params: &Parameters,
     serialize_with: &syn::Path,
     field_tys: &[&syn::Ty],
     field_exprs: &[Tokens],
 ) -> Tokens {
@@ -1009,17 +965,21 @@ fn wrap_serialize_with(
 
 // Serialization of an empty struct results in code like:
 //
 //     let mut __serde_state = try!(serializer.serialize_struct("S", 0));
 //     _serde::ser::SerializeStruct::end(__serde_state)
 //
 // where we want to omit the `mut` to avoid a warning.
 fn mut_if(is_mut: bool) -> Option<Tokens> {
-    if is_mut { Some(quote!(mut)) } else { None }
+    if is_mut {
+        Some(quote!(mut))
+    } else {
+        None
+    }
 }
 
 fn get_field<I>(params: &Parameters, field: &Field, ident: I) -> Tokens
 where
     I: Into<Ident>,
 {
     let self_var = &params.self_var;
     match (params.is_remote, field.attrs.getter()) {
--- a/third_party/rust/serde_derive_internals/.cargo-checksum.json
+++ b/third_party/rust/serde_derive_internals/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"0435204d95404e25ee07fa3169ddf5eef26bde3fce03f4e63e9e55774d620199","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"7dc6376a88195594cd6b43cb891aad10f57144ff737178b55d046aa04739b43a","src/ast.rs":"bc9936766227f78bf34cf003d271ffd70ad056e1272caafc1b185bdd32cc46bb","src/attr.rs":"51c92750f7b490a2c46950a68b5491d83181815d98e0fe3db102369b1ca9fe6e","src/case.rs":"be3288491dae43ca53643cb8409431e5e65ccf39c69c8047676e89c997827b0c","src/check.rs":"e976c9bac0daa334b2c82c6a91ac472235c7a1d91c5fe0deb2a83fe71b7c0663","src/ctxt.rs":"98eab1acd3de8617b516d1de7d5d870bb1d2a1c1aca258a4cca2bde3f8df88e4","src/lib.rs":"f242433bcb42c2360b8887d6e9f1b286a332080f1f0a081de06b0c061b563348"},"package":null}
\ No newline at end of file
+{"files":{"Cargo.toml":"714507185f11d1717d52710ca58df5c6427a808590543bb3b33e9b05bb8bbf92","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"7dc6376a88195594cd6b43cb891aad10f57144ff737178b55d046aa04739b43a","src/ast.rs":"803beccc3b527f926596acfe555fcc0069beebb23ffe1fb8cc0d2faac44fa8f7","src/attr.rs":"af9afd1a768db4d272ff13ff06412eae8d5edc57be0a29b396de8895499436c1","src/case.rs":"8d50d3db3c74c569c75bcf4b285d21bf176940a2efae0656bef769334d62793c","src/check.rs":"dd9d9723bd4d21787cdcff00d6b672f16276088ff0373d20e3fb3eca61580518","src/ctxt.rs":"e842cc73bfd648f14f3bad73e3db321d6cd0f94d255d59e81ed768486fe5deda","src/lib.rs":"5546043bf2cc6d81c1f323df0bd391ad53125f759f217e46e18d035df422b981"},"package":null}
\ No newline at end of file
--- a/third_party/rust/serde_derive_internals/Cargo.toml
+++ b/third_party/rust/serde_derive_internals/Cargo.toml
@@ -1,11 +1,11 @@
 [package]
 name = "serde_derive_internals"
-version = "0.17.0" # remember to update html_root_url
+version = "0.19.0" # remember to update html_root_url
 authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
 license = "MIT/Apache-2.0"
 description = "AST representation used by Serde derive macros. Unstable."
 homepage = "https://serde.rs"
 repository = "https://github.com/serde-rs/serde"
 documentation = "https://docs.serde.rs/serde_derive_internals/"
 keywords = ["serde", "serialization"]
 readme = "README.md"
--- a/third_party/rust/serde_derive_internals/src/ast.rs
+++ b/third_party/rust/serde_derive_internals/src/ast.rs
@@ -50,39 +50,36 @@ pub enum Style {
     Unit,
 }
 
 impl<'a> Container<'a> {
     pub fn from_ast(cx: &Ctxt, item: &'a syn::DeriveInput) -> Container<'a> {
         let attrs = attr::Container::from_ast(cx, item);
 
         let mut body = match item.body {
-            syn::Body::Enum(ref variants) => enum_from_ast(cx, item, variants),
+            syn::Body::Enum(ref variants) => {
+                let (repr, variants) = enum_from_ast(cx, item, variants, &attrs.default());
+                Body::Enum(repr, variants)
+            }
             syn::Body::Struct(ref variant_data) => {
-                let (style, fields) = struct_from_ast(cx, variant_data, None);
+                let (style, fields) = struct_from_ast(cx, variant_data, None, &attrs.default());
                 Body::Struct(style, fields)
             }
         };
 
         match body {
-            Body::Enum(_, ref mut variants) => {
-                for ref mut variant in variants {
-                    variant.attrs.rename_by_rule(attrs.rename_all());
-                    for ref mut field in &mut variant.fields {
-                        field.attrs.rename_by_rule(variant.attrs.rename_all());
-                    }
+            Body::Enum(_, ref mut variants) => for ref mut variant in variants {
+                variant.attrs.rename_by_rule(attrs.rename_all());
+                for ref mut field in &mut variant.fields {
+                    field.attrs.rename_by_rule(variant.attrs.rename_all());
                 }
-
-                
-            }
-            Body::Struct(_, ref mut fields) => {
-                for field in fields {
-                    field.attrs.rename_by_rule(attrs.rename_all());
-                }
-            }
+            },
+            Body::Struct(_, ref mut fields) => for field in fields {
+                field.attrs.rename_by_rule(attrs.rename_all());
+            },
         }
 
         let item = Container {
             ident: item.ident.clone(),
             attrs: attrs,
             body: body,
             generics: &item.generics,
         };
@@ -121,23 +118,29 @@ impl Repr {
         if !self.c_repr && self.other_repr {
             None
         } else {
             self.int_repr
         }
     }
 }
 
-fn enum_from_ast<'a>(cx: &Ctxt, item: &'a syn::DeriveInput, variants: &'a [syn::Variant]) -> Body<'a> {
+fn enum_from_ast<'a>(
+    cx: &Ctxt, 
+    item: &'a syn::DeriveInput, 
+    variants: &'a [syn::Variant], 
+    container_default: &attr::Default
+) -> (Repr, Vec<Variant<'a>>) {
     let variants = variants
         .iter()
         .map(
             |variant| {
                 let attrs = attr::Variant::from_ast(cx, variant);
-                let (style, fields) = struct_from_ast(cx, &variant.data, Some(&attrs));
+                let (style, fields) = 
+                    struct_from_ast(cx, &variant.data, Some(&attrs), container_default);
                 Variant {
                     ident: variant.ident.clone(),
                     attrs: attrs,
                     style: style,
                     fields: fields,
                 }
             },
         )
@@ -157,57 +160,70 @@ fn enum_from_ast<'a>(cx: &Ctxt, item: &'
         if let syn::MetaItem::List(ref ident, ref vals) = attr.value {
             if *ident == "repr" {
                 // has_repr = true;
                 for repr in vals {
                     if let syn::NestedMetaItem::MetaItem(syn::MetaItem::Word(ref repr)) = *repr {
                         if repr == "C" {
                             c_repr = true;
                         } else if let Some(int_type) = INT_TYPES.iter().cloned().find(|int_type| repr == int_type) {
-                            if int_repr.is_some() { 
+                            if int_repr.is_some() {
                                 // This shouldn't happen, but we shouldn't crash if we see it.
                                 // So just treat the enum as having a mysterious other repr,
                                 // which makes us discard any attempt to optimize based on layout.
-                                other_repr = true; 
+                                other_repr = true;
                             }
                             int_repr = Some(int_type);
                         } else {
                             other_repr = true;
                         }
                     } else {
                         panic!("impossible repr? {:?}", repr);
                     }
                 }
             }
         }
     }
 
     let repr = Repr { int_repr, c_repr, other_repr };
 
-    Body::Enum(repr, variants)
+    (repr, variants)
 }
 
-fn struct_from_ast<'a>(cx: &Ctxt, data: &'a syn::VariantData, attrs: Option<&attr::Variant>) -> (Style, Vec<Field<'a>>) {
+fn struct_from_ast<'a>(
+    cx: &Ctxt,
+    data: &'a syn::VariantData,
+    attrs: Option<&attr::Variant>,
+    container_default: &attr::Default,
+) -> (Style, Vec<Field<'a>>) {
     match *data {
-        syn::VariantData::Struct(ref fields) => (Style::Struct, fields_from_ast(cx, fields, attrs)),
-        syn::VariantData::Tuple(ref fields) if fields.len() == 1 => {
-            (Style::Newtype, fields_from_ast(cx, fields, attrs))
-        }
-        syn::VariantData::Tuple(ref fields) => (Style::Tuple, fields_from_ast(cx, fields, attrs)),
+        syn::VariantData::Struct(ref fields) => (
+            Style::Struct,
+            fields_from_ast(cx, fields, attrs, container_default),
+        ),
+        syn::VariantData::Tuple(ref fields) if fields.len() == 1 => (
+            Style::Newtype,
+            fields_from_ast(cx, fields, attrs, container_default),
+        ),
+        syn::VariantData::Tuple(ref fields) => (
+            Style::Tuple,
+            fields_from_ast(cx, fields, attrs, container_default),
+        ),
         syn::VariantData::Unit => (Style::Unit, Vec::new()),
     }
 }
 
-fn fields_from_ast<'a>(cx: &Ctxt, fields: &'a [syn::Field], attrs: Option<&attr::Variant>) -> Vec<Field<'a>> {
+fn fields_from_ast<'a>(
+    cx: &Ctxt,
+    fields: &'a [syn::Field],
+    attrs: Option<&attr::Variant>,
+    container_default: &attr::Default,
+) -> Vec<Field<'a>> {
     fields
         .iter()
         .enumerate()
-        .map(
-            |(i, field)| {
-                Field {
-                    ident: field.ident.clone(),
-                    attrs: attr::Field::from_ast(cx, i, field, attrs),
-                    ty: &field.ty,
-                }
-            },
-        )
+        .map(|(i, field)| Field {
+            ident: field.ident.clone(),
+            attrs: attr::Field::from_ast(cx, i, field, attrs, container_default),
+            ty: &field.ty,
+        })
         .collect()
 }
--- a/third_party/rust/serde_derive_internals/src/attr.rs
+++ b/third_party/rust/serde_derive_internals/src/attr.rs
@@ -159,16 +159,25 @@ pub enum Identifier {
     /// `#[serde(other)]` and is a newtype variant.
     Field,
 
     /// This enum represents the variants of an enum. All of the variants must
     /// be unit variants.
     Variant,
 }
 
+impl Identifier {
+    pub fn is_some(self) -> bool {
+        match self {
+            Identifier::No => false,
+            Identifier::Field | Identifier::Variant => true,
+        }
+    }
+}
+
 impl Container {
     /// Extract out the `#[serde(...)]` attributes from an item.
     pub fn from_ast(cx: &Ctxt, item: &syn::DeriveInput) -> Self {
         let mut ser_name = Attr::none(cx, "rename");
         let mut de_name = Attr::none(cx, "rename");
         let mut deny_unknown_fields = BoolAttr::none(cx, "deny_unknown_fields");
         let mut default = Attr::none(cx, "default");
         let mut rename_all = Attr::none(cx, "rename_all");
@@ -202,90 +211,83 @@ impl Container {
                         }
                     }
 
                     // Parse `#[serde(rename_all = "foo")]`
                     MetaItem(NameValue(ref name, ref lit)) if name == "rename_all" => {
                         if let Ok(s) = get_string_from_lit(cx, name.as_ref(), name.as_ref(), lit) {
                             match RenameRule::from_str(&s) {
                                 Ok(rename_rule) => rename_all.set(rename_rule),
-                                Err(()) => {
-                                    cx.error(format!("unknown rename rule for #[serde(rename_all \
-                                                      = {:?})]",
-                                                     s))
-                                }
+                                Err(()) => cx.error(format!(
+                                    "unknown rename rule for #[serde(rename_all \
+                                     = {:?})]",
+                                    s
+                                )),
                             }
                         }
                     }
 
                     // Parse `#[serde(deny_unknown_fields)]`
                     MetaItem(Word(ref name)) if name == "deny_unknown_fields" => {
                         deny_unknown_fields.set_true();
                     }
 
                     // Parse `#[serde(default)]`
-                    MetaItem(Word(ref name)) if name == "default" => {
-                        match item.body {
-                            syn::Body::Struct(syn::VariantData::Struct(_)) => {
-                                default.set(Default::Default);
-                            }
-                            _ => {
-                                cx.error(
-                                    "#[serde(default)] can only be used on structs \
-                                          with named fields",
-                                )
-                            }
+                    MetaItem(Word(ref name)) if name == "default" => match item.body {
+                        syn::Body::Struct(syn::VariantData::Struct(_)) => {
+                            default.set(Default::Default);
                         }
-                    }
+                        _ => cx.error(
+                            "#[serde(default)] can only be used on structs \
+                             with named fields",
+                        ),
+                    },
 
                     // Parse `#[serde(default = "...")]`
                     MetaItem(NameValue(ref name, ref lit)) if name == "default" => {
                         if let Ok(path) = parse_lit_into_path(cx, name.as_ref(), lit) {
                             match item.body {
                                 syn::Body::Struct(syn::VariantData::Struct(_)) => {
                                     default.set(Default::Path(path));
                                 }
-                                _ => {
-                                    cx.error(
-                                        "#[serde(default = \"...\")] can only be used \
-                                              on structs with named fields",
-                                    )
-                                }
+                                _ => cx.error(
+                                    "#[serde(default = \"...\")] can only be used \
+                                     on structs with named fields",
+                                ),
                             }
                         }
                     }
 
                     // Parse `#[serde(bound = "D: Serialize")]`
                     MetaItem(NameValue(ref name, ref lit)) if name == "bound" => {
                         if let Ok(where_predicates) =
-                            parse_lit_into_where(cx, name.as_ref(), name.as_ref(), lit) {
+                            parse_lit_into_where(cx, name.as_ref(), name.as_ref(), lit)
+                        {
                             ser_bound.set(where_predicates.clone());
                             de_bound.set(where_predicates);
                         }
                     }
 
                     // Parse `#[serde(bound(serialize = "D: Serialize", deserialize = "D: Deserialize"))]`
                     MetaItem(List(ref name, ref meta_items)) if name == "bound" => {
                         if let Ok((ser, de)) = get_where_predicates(cx, meta_items) {
                             ser_bound.set_opt(ser);
                             de_bound.set_opt(de);
                         }
                     }
 
                     // Parse `#[serde(untagged)]`
-                    MetaItem(Word(ref name)) if name == "untagged" => {
-                        match item.body {
-                            syn::Body::Enum(_) => {
-                                untagged.set_true();
-                            }
-                            syn::Body::Struct(_) => {
-                                cx.error("#[serde(untagged)] can only be used on enums")
-                            }
+                    MetaItem(Word(ref name)) if name == "untagged" => match item.body {
+                        syn::Body::Enum(_) => {
+                            untagged.set_true();
                         }
-                    }
+                        syn::Body::Struct(_) => {
+                            cx.error("#[serde(untagged)] can only be used on enums")
+                        }
+                    },
 
                     // Parse `#[serde(tag = "type")]`
                     MetaItem(NameValue(ref name, ref lit)) if name == "tag" => {
                         if let Ok(s) = get_string_from_lit(cx, name.as_ref(), name.as_ref(), lit) {
                             match item.body {
                                 syn::Body::Enum(_) => {
                                     internal_tag.set(s);
                                 }
@@ -298,22 +300,20 @@ impl Container {
 
                     // Parse `#[serde(content = "c")]`
                     MetaItem(NameValue(ref name, ref lit)) if name == "content" => {
                         if let Ok(s) = get_string_from_lit(cx, name.as_ref(), name.as_ref(), lit) {
                             match item.body {
                                 syn::Body::Enum(_) => {
                                     content.set(s);
                                 }
-                                syn::Body::Struct(_) => {
-                                    cx.error(
-                                        "#[serde(content = \"...\")] can only be used on \
-                                              enums",
-                                    )
-                                }
+                                syn::Body::Struct(_) => cx.error(
+                                    "#[serde(content = \"...\")] can only be used on \
+                                     enums",
+                                ),
                             }
                         }
                     }
 
                     // Parse `#[serde(from = "Type")]
                     MetaItem(NameValue(ref name, ref lit)) if name == "from" => {
                         if let Ok(from_ty) = parse_lit_into_ty(cx, name.as_ref(), lit) {
                             from_type.set_opt(Some(from_ty));
@@ -340,18 +340,20 @@ impl Container {
                     }
 
                     // Parse `#[serde(variant_identifier)]`
                     MetaItem(Word(ref name)) if name == "variant_identifier" => {
                         variant_identifier.set_true();
                     }
 
                     MetaItem(ref meta_item) => {
-                        cx.error(format!("unknown serde container attribute `{}`",
-                                         meta_item.name()));
+                        cx.error(format!(
+                            "unknown serde container attribute `{}`",
+                            meta_item.name()
+                        ));
                     }
 
                     Literal(_) => {
                         cx.error("unexpected literal in serde container attribute");
                     }
                 }
             }
         }
@@ -429,67 +431,64 @@ fn decide_tag(
     match (untagged.get(), internal_tag.get(), content.get()) {
         (false, None, None) => EnumTag::External,
         (true, None, None) => EnumTag::None,
         (false, Some(tag), None) => {
             // Check that there are no tuple variants.
             if let syn::Body::Enum(ref variants) = item.body {
                 for variant in variants {
                     match variant.data {
-                        syn::VariantData::Struct(_) |
-                        syn::VariantData::Unit => {}
+                        syn::VariantData::Struct(_) | syn::VariantData::Unit => {}
                         syn::VariantData::Tuple(ref fields) => {
                             if fields.len() != 1 {
                                 cx.error(
                                     "#[serde(tag = \"...\")] cannot be used with tuple \
-                                        variants",
+                                     variants",
                                 );
                                 break;
                             }
                         }
                     }
                 }
             }
             EnumTag::Internal { tag: tag }
         }
         (true, Some(_), None) => {
             cx.error("enum cannot be both untagged and internally tagged");
             EnumTag::External // doesn't matter, will error
         }
         (false, None, Some(_)) => {
-            cx.error("#[serde(tag = \"...\", content = \"...\")] must be used together",);
+            cx.error("#[serde(tag = \"...\", content = \"...\")] must be used together");
             EnumTag::External
         }
         (true, None, Some(_)) => {
             cx.error("untagged enum cannot have #[serde(content = \"...\")]");
             EnumTag::External
         }
-        (false, Some(tag), Some(content)) => {
-            EnumTag::Adjacent {
-                tag: tag,
-                content: content,
-            }
-        }
+        (false, Some(tag), Some(content)) => EnumTag::Adjacent {
+            tag: tag,
+            content: content,
+        },
         (true, Some(_), Some(_)) => {
-            cx.error("untagged enum cannot have #[serde(tag = \"...\", content = \"...\")]",);
+            cx.error("untagged enum cannot have #[serde(tag = \"...\", content = \"...\")]");
             EnumTag::External
         }
     }
 }
 
 fn decide_identifier(
     cx: &Ctxt,
     item: &syn::DeriveInput,
     field_identifier: BoolAttr,
     variant_identifier: BoolAttr,
 ) -> Identifier {
     match (&item.body, field_identifier.get(), variant_identifier.get()) {
         (_, false, false) => Identifier::No,
         (_, true, true) => {
-            cx.error("`field_identifier` and `variant_identifier` cannot both be set",);
+            cx.error("`field_identifier` and `variant_identifier` cannot both be set");
             Identifier::No
         }
         (&syn::Body::Struct(_), true, false) => {
             cx.error("`field_identifier` can only be used on an enum");
             Identifier::No
         }
         (&syn::Body::Struct(_), false, true) => {
             cx.error("`variant_identifier` can only be used on an enum");
@@ -546,21 +545,21 @@ impl Variant {
                         }
                     }
 
                     // Parse `#[serde(rename_all = "foo")]`
                     MetaItem(NameValue(ref name, ref lit)) if name == "rename_all" => {
                         if let Ok(s) = get_string_from_lit(cx, name.as_ref(), name.as_ref(), lit) {
                             match RenameRule::from_str(&s) {
                                 Ok(rename_rule) => rename_all.set(rename_rule),
-                                Err(()) => {
-                                    cx.error(format!("unknown rename rule for #[serde(rename_all \
-                                                      = {:?})]",
-                                                     s))
-                                }
+                                Err(()) => cx.error(format!(
+                                    "unknown rename rule for #[serde(rename_all \
+                                     = {:?})]",
+                                    s
+                                )),
                             }
                         }
                     }
 
                     // Parse `#[serde(skip_deserializing)]`
                     MetaItem(Word(ref name)) if name == "skip_deserializing" => {
                         skip_deserializing.set_true();
                     }
@@ -597,29 +596,30 @@ impl Variant {
                     // Parse `#[serde(deserialize_with = "...")]`
                     MetaItem(NameValue(ref name, ref lit)) if name == "deserialize_with" => {
                         if let Ok(path) = parse_lit_into_path(cx, name.as_ref(), lit) {
                             deserialize_with.set(path);
                         }
                     }
 
                     // Defer `#[serde(borrow)]` and `#[serde(borrow = "'a + 'b")]`
-                    MetaItem(ref mi) if mi.name() == "borrow" => {
-                        match variant.data {
-                            syn::VariantData::Tuple(ref fields) if fields.len() == 1 => {
-                                borrow.set(mi.clone());
-                            }
-                            _ => {
-                                cx.error("#[serde(borrow)] may only be used on newtype variants");
-                            }
+                    MetaItem(ref mi) if mi.name() == "borrow" => match variant.data {
+                        syn::VariantData::Tuple(ref fields) if fields.len() == 1 => {
+                            borrow.set(mi.clone());
                         }
-                    }
+                        _ => {
+                            cx.error("#[serde(borrow)] may only be used on newtype variants");
+                        }
+                    },
 
                     MetaItem(ref meta_item) => {
-                        cx.error(format!("unknown serde variant attribute `{}`", meta_item.name()));
+                        cx.error(format!(
+                            "unknown serde variant attribute `{}`",
+                            meta_item.name()
+                        ));
                     }
 
                     Literal(_) => {
                         cx.error("unexpected literal in serde variant attribute");
                     }
                 }
             }
         }
@@ -709,17 +709,23 @@ pub enum Default {
     /// The default is given by `std::default::Default::default()`.
     Default,
     /// The default is given by this function.
     Path(syn::Path),
 }
 
 impl Field {
     /// Extract out the `#[serde(...)]` attributes from a struct field.
-    pub fn from_ast(cx: &Ctxt, index: usize, field: &syn::Field, attrs: Option<&Variant>) -> Self {
+    pub fn from_ast(
+        cx: &Ctxt,
+        index: usize,
+        field: &syn::Field,
+        attrs: Option<&Variant>,
+        container_default: &Default,
+    ) -> Self {
         let mut ser_name = Attr::none(cx, "rename");
         let mut de_name = Attr::none(cx, "rename");
         let mut skip_serializing = BoolAttr::none(cx, "skip_serializing");
         let mut skip_deserializing = BoolAttr::none(cx, "skip_deserializing");
         let mut skip_serializing_if = Attr::none(cx, "skip_serializing_if");
         let mut default = Attr::none(cx, "default");
         let mut serialize_with = Attr::none(cx, "serialize_with");
         let mut deserialize_with = Attr::none(cx, "deserialize_with");
@@ -734,17 +740,22 @@ impl Field {
         };
 
         let variant_borrow = attrs
             .map(|variant| &variant.borrow)
             .unwrap_or(&None)
             .as_ref()
             .map(|borrow| vec![MetaItem(borrow.clone())]);
 
-        for meta_items in field.attrs.iter().filter_map(get_serde_meta_items).chain(variant_borrow) {
+        for meta_items in field
+            .attrs
+            .iter()
+            .filter_map(get_serde_meta_items)
+            .chain(variant_borrow)
+        {
             for meta_item in meta_items {
                 match meta_item {
                     // Parse `#[serde(rename = "foo")]`
                     MetaItem(NameValue(ref name, ref lit)) if name == "rename" => {
                         if let Ok(s) = get_string_from_lit(cx, name.as_ref(), name.as_ref(), lit) {
                             ser_name.set(s.clone());
                             de_name.set(s);
                         }
@@ -779,17 +790,17 @@ impl Field {
                     MetaItem(Word(ref name)) if name == "skip_deserializing" => {
                         skip_deserializing.set_true();
                     }
 
                     // Parse `#[serde(skip)]`
                     MetaItem(Word(ref name)) if name == "skip" => {
                         skip_serializing.set_true();
                         skip_deserializing.set_true();
-                    },
+                    }
 
                     // Parse `#[serde(skip_serializing_if = "...")]`
                     MetaItem(NameValue(ref name, ref lit)) if name == "skip_serializing_if" => {
                         if let Ok(path) = parse_lit_into_path(cx, name.as_ref(), lit) {
                             skip_serializing_if.set(path);
                         }
                     }
 
@@ -817,17 +828,18 @@ impl Field {
                             de_path.segments.push("deserialize".into());
                             deserialize_with.set(de_path);
                         }
                     }
 
                     // Parse `#[serde(bound = "D: Serialize")]`
                     MetaItem(NameValue(ref name, ref lit)) if name == "bound" => {
                         if let Ok(where_predicates) =
-                            parse_lit_into_where(cx, name.as_ref(), name.as_ref(), lit) {
+                            parse_lit_into_where(cx, name.as_ref(), name.as_ref(), lit)
+                        {
                             ser_bound.set(where_predicates.clone());
                             de_bound.set(where_predicates);
                         }
                     }
 
                     // Parse `#[serde(bound(serialize = "D: Serialize", deserialize = "D: Deserialize"))]`
                     MetaItem(List(ref name, ref meta_items)) if name == "bound" => {
                         if let Ok((ser, de)) = get_where_predicates(cx, meta_items) {
@@ -844,51 +856,52 @@ impl Field {
                     }
 
                     // Parse `#[serde(borrow = "'a + 'b")]`
                     MetaItem(NameValue(ref name, ref lit)) if name == "borrow" => {
                         if let Ok(lifetimes) = parse_lit_into_lifetimes(cx, name.as_ref(), lit) {
                             if let Ok(borrowable) = borrowable_lifetimes(cx, &ident, &field.ty) {
                                 for lifetime in &lifetimes {
                                     if !borrowable.contains(lifetime) {
-                                        cx.error(
-                                            format!(
-                                                "field `{}` does not have lifetime {}",
-                                                ident,
-                                                lifetime.ident
-                                            ),
-                                        );
+                                        cx.error(format!(
+                                            "field `{}` does not have lifetime {}",
+                                            ident, lifetime.ident
+                                        ));
                                     }
                                 }
                                 borrowed_lifetimes.set(lifetimes);
                             }
                         }
                     }
 
                     // Parse `#[serde(getter = "...")]`
                     MetaItem(NameValue(ref name, ref lit)) if name == "getter" => {
                         if let Ok(path) = parse_lit_into_path(cx, name.as_ref(), lit) {
                             getter.set(path);
                         }
                     }
 
                     MetaItem(ref meta_item) => {
-                        cx.error(format!("unknown serde field attribute `{}`", meta_item.name()),);
+                        cx.error(format!(
+                            "unknown serde field attribute `{}`",
+                            meta_item.name()
+                        ));
                     }
 
                     Literal(_) => {
                         cx.error("unexpected literal in serde field attribute");
                     }
                 }
             }
         }
 
-        // Is skip_deserializing, initialize the field to Default::default()
-        // unless a different default is specified by `#[serde(default = "...")]`
-        if skip_deserializing.0.value.is_some() {
+        // Is skip_deserializing, initialize the field to Default::default() unless a different
+        // default is specified by `#[serde(default = "...")]` on ourselves or our container (e.g.
+        // the struct we are in).
+        if container_default == &Default::None && skip_deserializing.0.value.is_some() {
             default.set_if_none(Default::Default);
         }
 
         let mut borrowed_lifetimes = borrowed_lifetimes.get().unwrap_or_default();
         if !borrowed_lifetimes.is_empty() {
             // Cow<str> and Cow<[u8]> never borrow by default:
             //
             //     impl<'de, 'a, T: ?Sized> Deserialize<'de> for Cow<'a, T>
@@ -1013,23 +1026,21 @@ where
 
             MetaItem(NameValue(ref name, ref lit)) if name == "deserialize" => {
                 if let Ok(v) = f(cx, attr_name, name.as_ref(), lit) {
                     de_item.set(v);
                 }
             }
 
             _ => {
-                cx.error(
-                    format!(
-                        "malformed {0} attribute, expected `{0}(serialize = ..., \
-                                  deserialize = ...)`",
-                        attr_name
-                    ),
-                );
+                cx.error(format!(
+                    "malformed {0} attribute, expected `{0}(serialize = ..., \
+                     deserialize = ...)`",
+                    attr_name
+                ));
                 return Err(());
             }
         }
     }
 
     Ok((ser_item.get(), de_item.get()))
 }
 
@@ -1055,23 +1066,20 @@ fn get_string_from_lit(
     cx: &Ctxt,
     attr_name: &str,
     meta_item_name: &str,
     lit: &syn::Lit,
 ) -> Result<String, ()> {
     if let syn::Lit::Str(ref s, _) = *lit {
         Ok(s.clone())
     } else {
-        cx.error(
-            format!(
-                "expected serde {} attribute to be a string: `{} = \"...\"`",
-                attr_name,
-                meta_item_name
-            ),
-        );
+        cx.error(format!(
+            "expected serde {} attribute to be a string: `{} = \"...\"`",
+            attr_name, meta_item_name
+        ));
         Err(())
     }
 }
 
 fn parse_lit_into_path(cx: &Ctxt, attr_name: &str, lit: &syn::Lit) -> Result<syn::Path, ()> {
     let string = try!(get_string_from_lit(cx, attr_name, attr_name, lit));
     syn::parse_path(&string).map_err(|err| cx.error(err))
 }
@@ -1092,21 +1100,22 @@ fn parse_lit_into_where(
     syn::parse_where_clause(&where_string)
         .map(|wh| wh.predicates)
         .map_err(|err| cx.error(err))
 }
 
 fn parse_lit_into_ty(cx: &Ctxt, attr_name: &str, lit: &syn::Lit) -> Result<syn::Ty, ()> {
     let string = try!(get_string_from_lit(cx, attr_name, attr_name, lit));
 
-    syn::parse_type(&string).map_err(
-        |_| {
-            cx.error(format!("failed to parse type: {} = {:?}", attr_name, string),)
-        },
-    )
+    syn::parse_type(&string).map_err(|_| {
+        cx.error(format!(
+            "failed to parse type: {} = {:?}",
+            attr_name, string
+        ))
+    })
 }
 
 // Parses a string literal like "'a + 'b + 'c" containing a nonempty list of
 // lifetimes separated by `+`.
 fn parse_lit_into_lifetimes(
     cx: &Ctxt,
     attr_name: &str,
     lit: &syn::Lit,
@@ -1127,17 +1136,17 @@ fn parse_lit_into_lifetimes(
             for lifetime in o {
                 if !set.insert(lifetime.clone()) {
                     cx.error(format!("duplicate borrowed lifetime `{}`", lifetime.ident));
                 }
             }
             return Ok(set);
         }
     }
-    Err(cx.error(format!("failed to parse borrowed lifetimes: {:?}", string)),)
+    Err(cx.error(format!("failed to parse borrowed lifetimes: {:?}", string)))
 }
 
 // Whether the type looks like it might be `std::borrow::Cow<T>` where elem="T".
 // This can have false negatives and false positives.
 //
 // False negative:
 //
 //     use std::borrow::Cow as Pig;
@@ -1171,18 +1180,18 @@ fn is_cow(ty: &syn::Ty, elem: &str) -> b
         }
     };
     let params = match seg.parameters {
         syn::PathParameters::AngleBracketed(ref params) => params,
         _ => {
             return false;
         }
     };
-    seg.ident == "Cow" && params.lifetimes.len() == 1 &&
-    params.types == vec![syn::parse_type(elem).unwrap()] && params.bindings.is_empty()
+    seg.ident == "Cow" && params.lifetimes.len() == 1
+        && params.types == vec![syn::parse_type(elem).unwrap()] && params.bindings.is_empty()
 }
 
 // Whether the type looks like it might be `&T` where elem="T". This can have
 // false negatives and false positives.
 //
 // False negative:
 //
 //     type Yarn = str;
@@ -1198,18 +1207,18 @@ fn is_cow(ty: &syn::Ty, elem: &str) -> b
 //
 //     #[derive(Deserialize)]
 //     struct S<'a> {
 //         r: &'a str,
 //     }
 fn is_rptr(ty: &syn::Ty, elem: &str) -> bool {
     match *ty {
         syn::Ty::Rptr(Some(_), ref mut_ty) => {
-            mut_ty.mutability == syn::Mutability::Immutable &&
-            mut_ty.ty == syn::parse_type(elem).unwrap()
+            mut_ty.mutability == syn::Mutability::Immutable
+                && mut_ty.ty == syn::parse_type(elem).unwrap()
         }
         _ => false,
     }
 }
 
 // All lifetimes that this type could borrow from a Deserializer.
 //
 // For example a type `S<'a, 'b>` could borrow `'a` and `'b`. On the other hand
@@ -1220,57 +1229,53 @@ fn is_rptr(ty: &syn::Ty, elem: &str) -> 
 fn borrowable_lifetimes(
     cx: &Ctxt,
     name: &str,
     ty: &syn::Ty,
 ) -> Result<BTreeSet<syn::Lifetime>, ()> {
     let mut lifetimes = BTreeSet::new();
     collect_lifetimes(ty, &mut lifetimes);
     if lifetimes.is_empty() {
-        Err(cx.error(format!("field `{}` has no lifetimes to borrow", name)),)
+        Err(cx.error(format!("field `{}` has no lifetimes to borrow", name)))
     } else {
         Ok(lifetimes)
     }
 }
 
 fn collect_lifetimes(ty: &syn::Ty, out: &mut BTreeSet<syn::Lifetime>) {
     match *ty {
-        syn::Ty::Slice(ref elem) |
-        syn::Ty::Array(ref elem, _) |
-        syn::Ty::Paren(ref elem) => {
+        syn::Ty::Slice(ref elem) | syn::Ty::Array(ref elem, _) | syn::Ty::Paren(ref elem) => {
             collect_lifetimes(elem, out);
         }
         syn::Ty::Ptr(ref elem) => {
             collect_lifetimes(&elem.ty, out);
         }
         syn::Ty::Rptr(ref lifetime, ref elem) => {
             out.extend(lifetime.iter().cloned());
             collect_lifetimes(&elem.ty, out);
         }
-        syn::Ty::Tup(ref elems) => {
-            for elem in elems {
-                collect_lifetimes(elem, out);
-            }
-        }
+        syn::Ty::Tup(ref elems) => for elem in elems {
+            collect_lifetimes(elem, out);
+        },
         syn::Ty::Path(ref qself, ref path) => {
             if let Some(ref qself) = *qself {
                 collect_lifetimes(&qself.ty, out);
             }
             for seg in &path.segments {
                 if let syn::PathParameters::AngleBracketed(ref params) = seg.parameters {
                     out.extend(params.lifetimes.iter().cloned());
                     for ty in &params.types {
                         collect_lifetimes(ty, out);
                     }
                     for binding in &params.bindings {
                         collect_lifetimes(&binding.ty, out);
                     }
                 }
             }
         }
-        syn::Ty::BareFn(_) |
-        syn::Ty::Never |
-        syn::Ty::TraitObject(_) |
-        syn::Ty::ImplTrait(_) |
-        syn::Ty::Infer |
-        syn::Ty::Mac(_) => {}
+        syn::Ty::BareFn(_)
+        | syn::Ty::Never
+        | syn::Ty::TraitObject(_)
+        | syn::Ty::ImplTrait(_)
+        | syn::Ty::Infer
+        | syn::Ty::Mac(_) => {}
     }
 }
--- a/third_party/rust/serde_derive_internals/src/case.rs
+++ b/third_party/rust/serde_derive_internals/src/case.rs
@@ -15,55 +15,61 @@ use std::str::FromStr;
 use self::RenameRule::*;
 
 #[derive(Debug, PartialEq)]
 pub enum RenameRule {
     /// Don't apply a default rename rule.
     None,
     /// Rename direct children to "lowercase" style.
     LowerCase,
+    /// Rename direct children to "UPPERCASE" style.
+    UPPERCASE,
     /// Rename direct children to "PascalCase" style, as typically used for enum variants.
     PascalCase,
     /// Rename direct children to "camelCase" style.
     CamelCase,
     /// Rename direct children to "snake_case" style, as commonly used for fields.
     SnakeCase,
     /// Rename direct children to "SCREAMING_SNAKE_CASE" style, as commonly used for constants.
     ScreamingSnakeCase,
     /// Rename direct children to "kebab-case" style.
     KebabCase,
     /// Rename direct children to "SCREAMING-KEBAB-CASE" style.
-    ScreamingKebabCase
+    ScreamingKebabCase,
 }
 
 impl RenameRule {
     pub fn apply_to_variant(&self, variant: &str) -> String {
         match *self {
             None | PascalCase => variant.to_owned(),
             LowerCase => variant.to_ascii_lowercase(),
+            UPPERCASE => variant.to_ascii_uppercase(),
             CamelCase => variant[..1].to_ascii_lowercase() + &variant[1..],
             SnakeCase => {
                 let mut snake = String::new();
                 for (i, ch) in variant.char_indices() {
                     if i > 0 && ch.is_uppercase() {
                         snake.push('_');
                     }
                     snake.push(ch.to_ascii_lowercase());
                 }
                 snake
             }
             ScreamingSnakeCase => SnakeCase.apply_to_variant(variant).to_ascii_uppercase(),
             KebabCase => SnakeCase.apply_to_variant(variant).replace('_', "-"),
-            ScreamingKebabCase => ScreamingSnakeCase.apply_to_variant(variant).replace('_', "-")
+            ScreamingKebabCase => ScreamingSnakeCase
+                .apply_to_variant(variant)
+                .replace('_', "-"),
         }
     }
 
     pub fn apply_to_field(&self, field: &str) -> String {
         match *self {
             None | LowerCase | SnakeCase => field.to_owned(),
+            UPPERCASE => field.to_ascii_uppercase(),
             PascalCase => {
                 let mut pascal = String::new();
                 let mut capitalize = true;
                 for ch in field.chars() {
                     if ch == '_' {
                         capitalize = true;
                     } else if capitalize {
                         pascal.push(ch.to_ascii_uppercase());
@@ -75,68 +81,106 @@ impl RenameRule {
                 pascal
             }
             CamelCase => {
                 let pascal = PascalCase.apply_to_field(field);
                 pascal[..1].to_ascii_lowercase() + &pascal[1..]
             }
             ScreamingSnakeCase => field.to_ascii_uppercase(),
             KebabCase => field.replace('_', "-"),
-            ScreamingKebabCase => ScreamingSnakeCase.apply_to_field(field).replace('_', "-")
+            ScreamingKebabCase => ScreamingSnakeCase.apply_to_field(field).replace('_', "-"),
         }
     }
 }
 
 impl FromStr for RenameRule {
     type Err = ();
 
     fn from_str(rename_all_str: &str) -> Result<Self, Self::Err> {
         match rename_all_str {
             "lowercase" => Ok(LowerCase),
+            "UPPERCASE" => Ok(UPPERCASE),
             "PascalCase" => Ok(PascalCase),
             "camelCase" => Ok(CamelCase),
             "snake_case" => Ok(SnakeCase),
             "SCREAMING_SNAKE_CASE" => Ok(ScreamingSnakeCase),
             "kebab-case" => Ok(KebabCase),
             "SCREAMING-KEBAB-CASE" => Ok(ScreamingKebabCase),
             _ => Err(()),
         }
     }
 }
 
 #[test]
 fn rename_variants() {
-    for &(original, lower, camel, snake, screaming, kebab, screaming_kebab) in
-        &[
-            ("Outcome", "outcome", "outcome", "outcome", "OUTCOME", "outcome", "OUTCOME"),
-            ("VeryTasty", "verytasty", "veryTasty", "very_tasty", "VERY_TASTY", "very-tasty", "VERY-TASTY"),
-            ("A", "a", "a", "a", "A", "a", "A"),
-            ("Z42", "z42", "z42", "z42", "Z42", "z42", "Z42"),
-        ] {
+    for &(original, lower, upper, camel, snake, screaming, kebab, screaming_kebab) in &[
+        (
+            "Outcome",
+            "outcome",
+            "OUTCOME",
+            "outcome",
+            "outcome",
+            "OUTCOME",
+            "outcome",
+            "OUTCOME",
+        ),
+        (
+            "VeryTasty",
+            "verytasty",
+            "VERYTASTY",
+            "veryTasty",
+            "very_tasty",
+            "VERY_TASTY",
+            "very-tasty",
+            "VERY-TASTY",
+        ),
+        ("A", "a", "A", "a", "a", "A", "a", "A"),
+        ("Z42", "z42", "Z42", "z42", "z42", "Z42", "z42", "Z42"),
+    ] {
         assert_eq!(None.apply_to_variant(original), original);
         assert_eq!(LowerCase.apply_to_variant(original), lower);
+        assert_eq!(UPPERCASE.apply_to_variant(original), upper);
         assert_eq!(PascalCase.apply_to_variant(original), original);
         assert_eq!(CamelCase.apply_to_variant(original), camel);
         assert_eq!(SnakeCase.apply_to_variant(original), snake);
         assert_eq!(ScreamingSnakeCase.apply_to_variant(original), screaming);
         assert_eq!(KebabCase.apply_to_variant(original), kebab);
-        assert_eq!(ScreamingKebabCase.apply_to_variant(original), screaming_kebab);
+        assert_eq!(
+            ScreamingKebabCase.apply_to_variant(original),
+            screaming_kebab
+        );
     }
 }
 
 #[test]
 fn rename_fields() {
-    for &(original, pascal, camel, screaming, kebab, screaming_kebab) in
-        &[
-            ("outcome", "Outcome", "outcome", "OUTCOME", "outcome", "OUTCOME"),
-            ("very_tasty", "VeryTasty", "veryTasty", "VERY_TASTY", "very-tasty", "VERY-TASTY"),
-            ("a", "A", "a", "A", "a", "A"),
-            ("z42", "Z42", "z42", "Z42", "z42", "Z42"),
-        ] {
+    for &(original, upper, pascal, camel, screaming, kebab, screaming_kebab) in &[
+        (
+            "outcome",
+            "OUTCOME",
+            "Outcome",
+            "outcome",
+            "OUTCOME",
+            "outcome",
+            "OUTCOME",
+        ),
+        (
+            "very_tasty",
+            "VERY_TASTY",
+            "VeryTasty",
+            "veryTasty",
+            "VERY_TASTY",
+            "very-tasty",
+            "VERY-TASTY",
+        ),
+        ("a", "A", "A", "a", "A", "a", "A"),
+        ("z42", "Z42", "Z42", "z42", "Z42", "z42", "Z42"),
+    ] {
         assert_eq!(None.apply_to_field(original), original);
+        assert_eq!(UPPERCASE.apply_to_field(original), upper);
         assert_eq!(PascalCase.apply_to_field(original), pascal);
         assert_eq!(CamelCase.apply_to_field(original), camel);
         assert_eq!(SnakeCase.apply_to_field(original), original);
         assert_eq!(ScreamingSnakeCase.apply_to_field(original), screaming);
         assert_eq!(KebabCase.apply_to_field(original), kebab);
         assert_eq!(ScreamingKebabCase.apply_to_field(original), screaming_kebab);
     }
 }
--- a/third_party/rust/serde_derive_internals/src/check.rs
+++ b/third_party/rust/serde_derive_internals/src/check.rs
@@ -26,17 +26,17 @@ fn check_getter(cx: &Ctxt, cont: &Contai
             if cont.body.has_getter() {
                 cx.error("#[serde(getter = \"...\")] is not allowed in an enum");
             }
         }
         Body::Struct(_, _) => {
             if cont.body.has_getter() && cont.attrs.remote().is_none() {
                 cx.error(
                     "#[serde(getter = \"...\")] can only be used in structs \
-                          that have #[serde(remote = \"...\")]",
+                     that have #[serde(remote = \"...\")]",
                 );
             }
         }
     }
 }
 
 /// The `other` attribute must be used at most once and it must be the last
 /// variant of an enum that has the `field_identifier` attribute.
@@ -48,20 +48,23 @@ fn check_identifier(cx: &Ctxt, cont: &Co
     let variants = match cont.body {
         Body::Enum(_, ref variants) => variants,
         Body::Struct(_, _) => {
             return;
         }
     };
 
     for (i, variant) in variants.iter().enumerate() {
-        match (variant.style, cont.attrs.identifier(), variant.attrs.other()) {
+        match (
+            variant.style,
+            cont.attrs.identifier(),
+            variant.attrs.other(),
+        ) {
             // The `other` attribute may only be used in a field_identifier.
-            (_, Identifier::Variant, true) |
-            (_, Identifier::No, true) => {
+            (_, Identifier::Variant, true) | (_, Identifier::No, true) => {
                 cx.error("#[serde(other)] may only be used inside a field_identifier");
             }
 
             // Variant with `other` attribute must be the last one.
             (Style::Unit, Identifier::Field, true) => {
                 if i < variants.len() - 1 {
                     cx.error("#[serde(other)] must be the last variant");
                 }
@@ -104,49 +107,65 @@ fn check_variant_skip_attrs(cx: &Ctxt, c
         Body::Struct(_, _) => {
             return;
         }
     };
 
     for variant in variants.iter() {
         if variant.attrs.serialize_with().is_some() {
             if variant.attrs.skip_serializing() {
-                cx.error(format!("variant `{}` cannot have both #[serde(serialize_with)] and \
-                                  #[serde(skip_serializing)]", variant.ident));
+                cx.error(format!(
+                    "variant `{}` cannot have both #[serde(serialize_with)] and \
+                     #[serde(skip_serializing)]",
+                    variant.ident
+                ));
             }
 
             for (i, field) in variant.fields.iter().enumerate() {
-                let ident = field.ident.as_ref().map_or_else(|| format!("{}", i),
-                                                             |ident| format!("`{}`", ident));
+                let ident = field
+                    .ident
+                    .as_ref()
+                    .map_or_else(|| format!("{}", i), |ident| format!("`{}`", ident));
 
                 if field.attrs.skip_serializing() {
-                    cx.error(format!("variant `{}` cannot have both #[serde(serialize_with)] and \
-                                      a field {} marked with #[serde(skip_serializing)]",
-                                     variant.ident, ident));
+                    cx.error(format!(
+                        "variant `{}` cannot have both #[serde(serialize_with)] and \
+                         a field {} marked with #[serde(skip_serializing)]",
+                        variant.ident, ident
+                    ));
                 }
 
                 if field.attrs.skip_serializing_if().is_some() {
-                    cx.error(format!("variant `{}` cannot have both #[serde(serialize_with)] and \
-                                      a field {} marked with #[serde(skip_serializing_if)]",
-                                     variant.ident, ident));
+                    cx.error(format!(
+                        "variant `{}` cannot have both #[serde(serialize_with)] and \
+                         a field {} marked with #[serde(skip_serializing_if)]",
+                        variant.ident, ident
+                    ));
                 }
             }
         }
 
         if variant.attrs.deserialize_with().is_some() {
             if variant.attrs.skip_deserializing() {
-                cx.error(format!("variant `{}` cannot have both #[serde(deserialize_with)] and \
-                                  #[serde(skip_deserializing)]", variant.ident));
+                cx.error(format!(
+                    "variant `{}` cannot have both #[serde(deserialize_with)] and \
+                     #[serde(skip_deserializing)]",
+                    variant.ident
+                ));
             }
 
             for (i, field) in variant.fields.iter().enumerate() {
                 if field.attrs.skip_deserializing() {
-                    let ident = field.ident.as_ref().map_or_else(|| format!("{}", i),
-                                                                 |ident| format!("`{}`", ident));
+                    let ident = field
+                        .ident
+                        .as_ref()
+                        .map_or_else(|| format!("{}", i), |ident| format!("`{}`", ident));
 
-                    cx.error(format!("variant `{}` cannot have both #[serde(deserialize_with)] \
-                                      and a field {} marked with #[serde(skip_deserializing)]",
-                                     variant.ident, ident));
+                    cx.error(format!(
+                        "variant `{}` cannot have both #[serde(deserialize_with)] \
+                         and a field {} marked with #[serde(skip_deserializing)]",
+                        variant.ident, ident
+                    ));
                 }
             }
         }
     }
 }
--- a/third_party/rust/serde_derive_internals/src/ctxt.rs
+++ b/third_party/rust/serde_derive_internals/src/ctxt.rs
@@ -11,17 +11,19 @@ use std::cell::RefCell;
 
 #[derive(Default)]
 pub struct Ctxt {
     errors: RefCell<Option<Vec<String>>>,
 }
 
 impl Ctxt {
     pub fn new() -> Self {
-        Ctxt { errors: RefCell::new(Some(Vec::new())) }
+        Ctxt {
+            errors: RefCell::new(Some(Vec::new())),
+        }
     }
 
     pub fn error<T: Display>(&self, msg: T) {
         self.errors
             .borrow_mut()
             .as_mut()
             .unwrap()
             .push(msg.to_string());
--- a/third_party/rust/serde_derive_internals/src/lib.rs
+++ b/third_party/rust/serde_derive_internals/src/lib.rs
@@ -1,17 +1,17 @@
 // Copyright 2017 Serde Developers
 //
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![doc(html_root_url = "https://docs.rs/serde_derive_internals/0.17.0")]
+#![doc(html_root_url = "https://docs.rs/serde_derive_internals/0.19.0")]
 
 extern crate syn;
 #[macro_use]
 extern crate synom;
 
 pub mod ast;
 pub mod attr;
 
--- a/toolkit/library/gtest/rust/Cargo.lock
+++ b/toolkit/library/gtest/rust/Cargo.lock
@@ -12,17 +12,17 @@ version = "0.10.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "app_units"
 version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "arrayvec"
 version = "0.4.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -51,18 +51,18 @@ dependencies = [
  "bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "cubeb-core 0.1.0",
  "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "memmap 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "mio 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "mio-uds 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
- "serde_derive 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)",
 ]
 
 [[package]]
 name = "audioipc-client"
 version = "0.1.0"
 dependencies = [
  "audioipc 0.1.0",
  "cubeb-backend 0.2.0",
@@ -95,26 +95,26 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "bincode"
 version = "0.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bincode"
 version = "0.9.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bindgen"
 version = "0.31.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -388,18 +388,18 @@ dependencies = [
 name = "dwrote"
 version = "0.4.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
- "serde_derive 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)",
  "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "either"
 version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
@@ -445,17 +445,17 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "euclid"
 version = "0.16.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "fallible"
 version = "0.0.1"
 dependencies = [
  "hashglobe 0.1.0",
  "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1141,36 +1141,33 @@ dependencies = [
 
 [[package]]
 name = "semver-parser"
 version = "0.7.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "serde"
-version = "1.0.23"
-source = "git+https://github.com/gankro/serde?branch=deserialize_from_enums3#fc6117367ef974fb2d3b2017c21c375d34823415"
-dependencies = [
- "serde_derive 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
-]
+version = "1.0.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "serde_derive"
-version = "1.0.23"
-source = "git+https://github.com/gankro/serde?branch=deserialize_from_enums3#fc6117367ef974fb2d3b2017c21c375d34823415"
+version = "1.0.27"
+source = "git+https://github.com/gankro/serde?branch=deserialize_from_enums4#93e24f268ab99c0df10e2183587284e02ca30e9e"
 dependencies = [
  "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive_internals 0.17.0 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde_derive_internals 0.19.0 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)",
  "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "serde_derive_internals"
-version = "0.17.0"
-source = "git+https://github.com/gankro/serde?branch=deserialize_from_enums3#fc6117367ef974fb2d3b2017c21c375d34823415"
+version = "0.19.0"
+source = "git+https://github.com/gankro/serde?branch=deserialize_from_enums4#93e24f268ab99c0df10e2183587284e02ca30e9e"
 dependencies = [
  "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "synom 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo_arc"
 version = "0.0.1"
@@ -1489,18 +1486,18 @@ dependencies = [
  "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bincode 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwrote 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
- "serde_derive 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)",
  "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "webrender_bindings"
 version = "0.1.0"
 dependencies = [
  "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1655,19 +1652,19 @@ dependencies = [
 "checksum redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "ab105df655884ede59d45b7070c8a65002d921461ee813a024558ca16030eea0"
 "checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b"
 "checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"
 "checksum runloop 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d79b4b604167921892e84afbbaad9d5ad74e091bf6c511d9dbfb0593f09fabd"
 "checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7"
 "checksum scopeguard 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c79eb2c3ac4bc2507cda80e7f3ac5b88bd8eae4c0914d5663e6a8933994be918"
 "checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537"
 "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
-"checksum serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)" = "<none>"
-"checksum serde_derive 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)" = "<none>"
-"checksum serde_derive_internals 0.17.0 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)" = "<none>"
+"checksum serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "db99f3919e20faa51bb2996057f5031d8685019b5a06139b1ce761da671b8526"
+"checksum serde_derive 1.0.27 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)" = "<none>"
+"checksum serde_derive_internals 0.19.0 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)" = "<none>"
 "checksum simd 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a94d14a2ae1f1f110937de5fb69e494372560181c7e1739a097fcc2cee37ba0"
 "checksum siphasher 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ffc669b726f2bc9a3bcff66e5e23b56ba6bf70e22a34c3d7b6d0b3450b65b84"
 "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23"
 "checksum smallbitvec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "79b776f00dfe01df905fa3b2eaa1659522e99e3fc4a7b1334171622205c4bdcf"
 "checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9"
 "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
 "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
 "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
--- a/toolkit/library/rust/Cargo.lock
+++ b/toolkit/library/rust/Cargo.lock
@@ -12,17 +12,17 @@ version = "0.10.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "app_units"
 version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "arrayvec"
 version = "0.4.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -51,18 +51,18 @@ dependencies = [
  "bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "cubeb-core 0.1.0",
  "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "memmap 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "mio 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "mio-uds 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
- "serde_derive 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)",
 ]
 
 [[package]]
 name = "audioipc-client"
 version = "0.1.0"
 dependencies = [
  "audioipc 0.1.0",
  "cubeb-backend 0.2.0",
@@ -95,26 +95,26 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "bincode"
 version = "0.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bincode"
 version = "0.9.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bindgen"
 version = "0.31.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -388,18 +388,18 @@ dependencies = [
 name = "dwrote"
 version = "0.4.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
- "serde_derive 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)",
  "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "either"
 version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
@@ -445,17 +445,17 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "euclid"
 version = "0.16.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "fallible"
 version = "0.0.1"
 dependencies = [
  "hashglobe 0.1.0",
  "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1129,36 +1129,33 @@ dependencies = [
 
 [[package]]
 name = "semver-parser"
 version = "0.7.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "serde"
-version = "1.0.23"
-source = "git+https://github.com/gankro/serde?branch=deserialize_from_enums3#fc6117367ef974fb2d3b2017c21c375d34823415"
-dependencies = [
- "serde_derive 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
-]
+version = "1.0.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "serde_derive"
-version = "1.0.23"
-source = "git+https://github.com/gankro/serde?branch=deserialize_from_enums3#fc6117367ef974fb2d3b2017c21c375d34823415"
+version = "1.0.27"
+source = "git+https://github.com/gankro/serde?branch=deserialize_from_enums4#93e24f268ab99c0df10e2183587284e02ca30e9e"
 dependencies = [
  "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive_internals 0.17.0 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde_derive_internals 0.19.0 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)",
  "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "serde_derive_internals"
-version = "0.17.0"
-source = "git+https://github.com/gankro/serde?branch=deserialize_from_enums3#fc6117367ef974fb2d3b2017c21c375d34823415"
+version = "0.19.0"
+source = "git+https://github.com/gankro/serde?branch=deserialize_from_enums4#93e24f268ab99c0df10e2183587284e02ca30e9e"
 dependencies = [
  "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "synom 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "servo_arc"
 version = "0.0.1"
@@ -1501,18 +1498,18 @@ dependencies = [
  "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bincode 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwrote 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
- "serde_derive 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)",
+ "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.27 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)",
  "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "webrender_bindings"
 version = "0.1.0"
 dependencies = [
  "app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1667,19 +1664,19 @@ dependencies = [
 "checksum redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "ab105df655884ede59d45b7070c8a65002d921461ee813a024558ca16030eea0"
 "checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b"
 "checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"
 "checksum runloop 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d79b4b604167921892e84afbbaad9d5ad74e091bf6c511d9dbfb0593f09fabd"
 "checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7"
 "checksum scopeguard 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c79eb2c3ac4bc2507cda80e7f3ac5b88bd8eae4c0914d5663e6a8933994be918"
 "checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537"
 "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
-"checksum serde 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)" = "<none>"
-"checksum serde_derive 1.0.23 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)" = "<none>"
-"checksum serde_derive_internals 0.17.0 (git+https://github.com/gankro/serde?branch=deserialize_from_enums3)" = "<none>"
+"checksum serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "db99f3919e20faa51bb2996057f5031d8685019b5a06139b1ce761da671b8526"
+"checksum serde_derive 1.0.27 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)" = "<none>"
+"checksum serde_derive_internals 0.19.0 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)" = "<none>"
 "checksum simd 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a94d14a2ae1f1f110937de5fb69e494372560181c7e1739a097fcc2cee37ba0"
 "checksum siphasher 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ffc669b726f2bc9a3bcff66e5e23b56ba6bf70e22a34c3d7b6d0b3450b65b84"
 "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23"
 "checksum smallbitvec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "79b776f00dfe01df905fa3b2eaa1659522e99e3fc4a7b1334171622205c4bdcf"
 "checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9"
 "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
 "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
 "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"