Bug 1511811 - Revendor Rust dependencies.
☠☠ backed out by f713c586d397 ☠ ☠
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sun, 02 Dec 2018 12:15:47 -0500
changeset 449236 d2c99742610827141e7c50a5da9692449fcbc6b3
parent 449235 ddd573878432219c10221750858afb4688f9da3b
child 449237 7bc486fbd1952be76b2b0d5571669b980be7f03d
push id35153
push userbtara@mozilla.com
push dateMon, 03 Dec 2018 21:49:46 +0000
treeherdermozilla-central@df64b0b461fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1511811
milestone65.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 1511811 - Revendor Rust dependencies.
Cargo.lock
third_party/rust/bindgen/.cargo-checksum.json
third_party/rust/bindgen/Cargo.toml
third_party/rust/bindgen/README.md
third_party/rust/bindgen/src/callbacks.rs
third_party/rust/bindgen/src/clang.rs
third_party/rust/bindgen/src/codegen/helpers.rs
third_party/rust/bindgen/src/codegen/impl_debug.rs
third_party/rust/bindgen/src/codegen/impl_partialeq.rs
third_party/rust/bindgen/src/codegen/mod.rs
third_party/rust/bindgen/src/codegen/struct_layout.rs
third_party/rust/bindgen/src/features.rs
third_party/rust/bindgen/src/ir/annotations.rs
third_party/rust/bindgen/src/ir/context.rs
third_party/rust/bindgen/src/ir/function.rs
third_party/rust/bindgen/src/ir/item.rs
third_party/rust/bindgen/src/ir/objc.rs
third_party/rust/bindgen/src/ir/ty.rs
third_party/rust/bindgen/src/ir/var.rs
third_party/rust/bindgen/src/lib.rs
third_party/rust/cssparser-macros/.cargo-checksum.json
third_party/rust/cssparser-macros/Cargo.toml
third_party/rust/cssparser-macros/lib.rs
third_party/rust/cssparser/.cargo-checksum.json
third_party/rust/cssparser/Cargo.toml
third_party/rust/cssparser/build/match_byte.rs
third_party/rust/cstr/.cargo-checksum.json
third_party/rust/cstr/Cargo.toml
third_party/rust/darling/.cargo-checksum.json
third_party/rust/darling/CHANGELOG.md
third_party/rust/darling/Cargo.toml
third_party/rust/darling/README.md
third_party/rust/darling/examples/automatic_bounds.rs
third_party/rust/darling/examples/consume_fields.rs
third_party/rust/darling/examples/fallible_read.rs
third_party/rust/darling/examples/supports_struct.rs
third_party/rust/darling/src/lib.rs
third_party/rust/darling/src/macros_public.rs
third_party/rust/darling/tests/accrue_errors.rs
third_party/rust/darling/tests/computed_bound.rs
third_party/rust/darling/tests/custom_bound.rs
third_party/rust/darling/tests/defaults.rs
third_party/rust/darling/tests/enums_newtype.rs
third_party/rust/darling/tests/enums_struct.rs
third_party/rust/darling/tests/enums_unit.rs
third_party/rust/darling/tests/error.rs
third_party/rust/darling/tests/from_generics.rs
third_party/rust/darling/tests/from_type_param.rs
third_party/rust/darling/tests/from_type_param_default.rs
third_party/rust/darling/tests/from_variant.rs
third_party/rust/darling/tests/generics.rs
third_party/rust/darling/tests/happy_path.rs
third_party/rust/darling/tests/multiple.rs
third_party/rust/darling/tests/newtype.rs
third_party/rust/darling/tests/skip.rs
third_party/rust/darling/tests/split_declaration.rs
third_party/rust/darling/tests/supports.rs
third_party/rust/darling_core/.cargo-checksum.json
third_party/rust/darling_core/Cargo.toml
third_party/rust/darling_core/src/ast.rs
third_party/rust/darling_core/src/ast/data.rs
third_party/rust/darling_core/src/ast/generics.rs
third_party/rust/darling_core/src/ast/mod.rs
third_party/rust/darling_core/src/codegen/attr_extractor.rs
third_party/rust/darling_core/src/codegen/default_expr.rs
third_party/rust/darling_core/src/codegen/error.rs
third_party/rust/darling_core/src/codegen/field.rs
third_party/rust/darling_core/src/codegen/fmi_impl.rs
third_party/rust/darling_core/src/codegen/from_derive_impl.rs
third_party/rust/darling_core/src/codegen/from_field.rs
third_party/rust/darling_core/src/codegen/from_meta_impl.rs
third_party/rust/darling_core/src/codegen/from_type_param.rs
third_party/rust/darling_core/src/codegen/from_variant_impl.rs
third_party/rust/darling_core/src/codegen/mod.rs
third_party/rust/darling_core/src/codegen/outer_from_impl.rs
third_party/rust/darling_core/src/codegen/trait_impl.rs
third_party/rust/darling_core/src/codegen/variant.rs
third_party/rust/darling_core/src/codegen/variant_data.rs
third_party/rust/darling_core/src/error.rs
third_party/rust/darling_core/src/from_derive_input.rs
third_party/rust/darling_core/src/from_field.rs
third_party/rust/darling_core/src/from_generic_param.rs
third_party/rust/darling_core/src/from_generics.rs
third_party/rust/darling_core/src/from_meta.rs
third_party/rust/darling_core/src/from_meta_item.rs
third_party/rust/darling_core/src/from_type_param.rs
third_party/rust/darling_core/src/from_variant.rs
third_party/rust/darling_core/src/lib.rs
third_party/rust/darling_core/src/macros.rs
third_party/rust/darling_core/src/macros_private.rs
third_party/rust/darling_core/src/macros_public.rs
third_party/rust/darling_core/src/options/core.rs
third_party/rust/darling_core/src/options/forward_attrs.rs
third_party/rust/darling_core/src/options/from_derive.rs
third_party/rust/darling_core/src/options/from_field.rs
third_party/rust/darling_core/src/options/from_meta.rs
third_party/rust/darling_core/src/options/from_meta_item.rs
third_party/rust/darling_core/src/options/from_type_param.rs
third_party/rust/darling_core/src/options/from_variant.rs
third_party/rust/darling_core/src/options/input_field.rs
third_party/rust/darling_core/src/options/input_variant.rs
third_party/rust/darling_core/src/options/mod.rs
third_party/rust/darling_core/src/options/outer_from.rs
third_party/rust/darling_core/src/options/shape.rs
third_party/rust/darling_core/src/usage/generics_ext.rs
third_party/rust/darling_core/src/usage/ident_set.rs
third_party/rust/darling_core/src/usage/lifetimes.rs
third_party/rust/darling_core/src/usage/mod.rs
third_party/rust/darling_core/src/usage/options.rs
third_party/rust/darling_core/src/usage/type_params.rs
third_party/rust/darling_core/src/util/ident_list.rs
third_party/rust/darling_core/src/util/ident_string.rs
third_party/rust/darling_core/src/util/ignored.rs
third_party/rust/darling_core/src/util/mod.rs
third_party/rust/darling_core/src/util/over_ride.rs
third_party/rust/darling_core/src/util/with_original.rs
third_party/rust/darling_macro/.cargo-checksum.json
third_party/rust/darling_macro/Cargo.toml
third_party/rust/darling_macro/src/lib.rs
third_party/rust/fnv/.cargo-checksum.json
third_party/rust/fnv/Cargo.toml
third_party/rust/fnv/LICENSE-APACHE
third_party/rust/fnv/LICENSE-MIT
third_party/rust/fnv/README.md
third_party/rust/fnv/lib.rs
third_party/rust/syn/.cargo-checksum.json
third_party/rust/syn/Cargo.toml
third_party/rust/syn/README.md
third_party/rust/syn/src/attr.rs
third_party/rust/syn/src/error.rs
third_party/rust/syn/src/export.rs
third_party/rust/syn/src/expr.rs
third_party/rust/syn/src/ext.rs
third_party/rust/syn/src/gen/fold.rs
third_party/rust/syn/src/gen/visit.rs
third_party/rust/syn/src/gen/visit_mut.rs
third_party/rust/syn/src/generics.rs
third_party/rust/syn/src/group.rs
third_party/rust/syn/src/item.rs
third_party/rust/syn/src/keyword.rs
third_party/rust/syn/src/lib.rs
third_party/rust/syn/src/lit.rs
third_party/rust/syn/src/lookahead.rs
third_party/rust/syn/src/macros.rs
third_party/rust/syn/src/parse.rs
third_party/rust/syn/src/parse_macro_input.rs
third_party/rust/syn/src/parse_quote.rs
third_party/rust/syn/src/path.rs
third_party/rust/syn/src/spanned.rs
third_party/rust/syn/src/thread.rs
third_party/rust/syn/src/token.rs
third_party/rust/syn/src/tt.rs
third_party/rust/syn/src/ty.rs
third_party/rust/synstructure-0.8.1/.cargo-checksum.json
third_party/rust/synstructure-0.8.1/Cargo.toml
third_party/rust/synstructure-0.8.1/LICENSE
third_party/rust/synstructure-0.8.1/README.md
third_party/rust/synstructure-0.8.1/src/lib.rs
third_party/rust/synstructure-0.8.1/src/macros.rs
third_party/rust/which/.cargo-checksum.json
third_party/rust/which/Cargo.toml
third_party/rust/which/README.md
third_party/rust/which/appveyor.yml
third_party/rust/which/src/checker.rs
third_party/rust/which/src/error.rs
third_party/rust/which/src/finder.rs
third_party/rust/which/src/helper.rs
third_party/rust/which/src/lib.rs
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -155,17 +155,17 @@ dependencies = [
  "cc 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "baldrdash"
 version = "0.1.0"
 dependencies = [
- "bindgen 0.43.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bindgen 0.44.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cranelift-codegen 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cranelift-wasm 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "target-lexicon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -176,17 +176,17 @@ dependencies = [
  "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bench-collections-gtest"
 version = "0.1.0"
 dependencies = [
- "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "binary-space-partition"
 version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
@@ -209,30 +209,30 @@ version = "1.0.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)",
  "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "bindgen"
-version = "0.43.0"
+version = "0.44.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "cexpr 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "clang-sys 0.26.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "which 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "binjs_meta"
 version = "0.4.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "Inflector 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -580,46 +580,46 @@ name = "crossbeam-utils"
 version = "0.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "cssparser"
-version = "0.25.0"
+version = "0.25.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "cssparser-macros 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser-macros 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "dtoa-short 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
  "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "procedural-masquerade 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "cssparser-macros"
-version = "0.3.3"
+version = "0.3.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "procedural-masquerade 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "cstr"
-version = "0.1.3"
+version = "0.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "cstr-macros 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "procedural-masquerade 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "cstr-macros"
@@ -672,42 +672,43 @@ source = "registry+https://github.com/ru
 dependencies = [
  "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
  "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
  "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "darling"
-version = "0.4.0"
+version = "0.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "darling_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "darling_macro 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "darling_core 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "darling_macro 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "darling_core"
-version = "0.4.0"
+version = "0.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
+ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "ident_case 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "darling_macro"
-version = "0.4.0"
+version = "0.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "darling_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "darling_core 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "devd-rs"
 version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -857,17 +858,17 @@ dependencies = [
 
 [[package]]
 name = "failure_derive"
 version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.15.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "fake-simd"
 version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
@@ -890,17 +891,17 @@ version = "1.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "miniz_oxide_c_api 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "fnv"
-version = "1.0.5"
+version = "1.0.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "foreign-types"
 version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -983,18 +984,18 @@ dependencies = [
  "zip 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "geckoservo"
 version = "0.0.1"
 dependencies = [
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cstr 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "malloc_size_of 0.0.1",
  "nsstring 0.1.0",
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.20.0",
  "servo_arc 0.1.1",
@@ -1097,17 +1098,17 @@ dependencies = [
 
 [[package]]
 name = "h2"
 version = "0.1.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "http 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
@@ -1120,17 +1121,17 @@ dependencies = [
 ]
 
 [[package]]
 name = "http"
 version = "0.1.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "httparse"
 version = "1.2.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
@@ -1208,17 +1209,17 @@ dependencies = [
 name = "itoa"
 version = "0.4.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "js"
 version = "0.1.4"
 dependencies = [
- "bindgen 0.43.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bindgen 0.44.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "mozjs_sys 0.0.0",
  "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1232,17 +1233,17 @@ dependencies = [
  "mozilla-central-workspace-hack 0.1.0",
 ]
 
 [[package]]
 name = "jsrust_shared"
 version = "0.1.0"
 dependencies = [
  "baldrdash 0.1.0",
- "bindgen 0.43.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bindgen 0.44.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "kernel32-sys"
 version = "0.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1412,34 +1413,34 @@ dependencies = [
  "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "malloc_size_of"
 version = "0.0.1"
 dependencies = [
  "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.19.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "hashglobe 0.1.0",
  "selectors 0.20.0",
  "servo_arc 0.1.1",
  "smallbitvec 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "thin-slice 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "malloc_size_of_derive"
 version = "0.0.1"
 dependencies = [
- "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "synstructure 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "matches"
 version = "0.1.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -2171,25 +2172,25 @@ dependencies = [
 
 [[package]]
 name = "scroll_derive"
 version = "0.9.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.15.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "selectors"
 version = "0.20.0"
 dependencies = [
  "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
  "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
  "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "servo_arc 0.1.1",
  "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2227,17 +2228,17 @@ dependencies = [
 
 [[package]]
 name = "serde_derive"
 version = "1.0.80"
 source = "git+https://github.com/servo/serde?branch=deserialize_from_enums9#e0cc925c259cb74ce41377e4fe02713adfa6d836"
 dependencies = [
  "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.15.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "serde_json"
 version = "1.0.26"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2354,21 +2355,21 @@ source = "registry+https://github.com/ru
 
 [[package]]
 name = "style"
 version = "0.0.1"
 dependencies = [
  "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "bindgen 0.43.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bindgen 0.44.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.19.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "fallible 0.0.1",
  "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "hashglobe 0.1.0",
  "itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2402,43 +2403,44 @@ dependencies = [
  "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "style_derive"
 version = "0.0.1"
 dependencies = [
- "darling 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "synstructure 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "darling 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "style_traits"
 version = "0.0.1"
 dependencies = [
  "app_units 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.19.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "malloc_size_of 0.0.1",
  "malloc_size_of_derive 0.0.1",
  "selectors 0.20.0",
  "servo_arc 0.1.1",
 ]
 
 [[package]]
 name = "stylo_tests"
 version = "0.0.1"
 dependencies = [
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cstr 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "geckoservo 0.0.1",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "malloc_size_of 0.0.1",
  "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.20.0",
@@ -2465,43 +2467,32 @@ source = "registry+https://github.com/ru
 dependencies = [
  "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "syn"
-version = "0.15.7"
+version = "0.15.22"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "synstructure"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "synstructure"
 version = "0.10.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "proc-macro2 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "syn 0.15.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "target-lexicon"
 version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
@@ -2995,19 +2986,20 @@ dependencies = [
  "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "thread_profiler 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "uuid 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "webrender 0.57.2",
 ]
 
 [[package]]
 name = "which"
-version = "1.0.3"
+version = "2.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
+ "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "winapi"
 version = "0.2.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
@@ -3125,17 +3117,17 @@ dependencies = [
 "checksum ascii-canvas 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b385d69402821a1c254533a011a312531cbcc0e3e24f19bbb4747a5a2daf37e2"
 "checksum atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb2dcb6e6d35f20276943cc04bb98e538b348d525a04ac79c10021561d202f21"
 "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
 "checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a"
 "checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0"
 "checksum base64 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "85415d2594767338a74a30c1d370b2f3262ec1b4ed2d7bba5b3faf4de40467d9"
 "checksum binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88ceb0d16c4fd0e42876e298d7d3ce3780dd9ebdcbe4199816a32c77e08597ff"
 "checksum bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bda13183df33055cbb84b847becce220d392df502ebe7a4a78d7021771ed94d0"
-"checksum bindgen 0.43.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41df015ccbc22b038641bd84d0aeeff01e0a4c0714ed35ed0e9a3dd8ad8d732"
+"checksum bindgen 0.44.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d8de1946c252145e09ed00ea90a8685fce15b8f94bb4dc1a0daaf2a9b375be61"
 "checksum binjs_meta 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "430239e4551e42b80fa5d92322ac80ea38c9dda56e5d5582e057e2288352b71a"
 "checksum bit-set 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6f1efcc46c18245a69c38fcc5cc650f16d3a59d034f3106e9ed63748f695730a"
 "checksum bit-vec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4440d5cb623bb7390ae27fec0bb6c61111969860f8e3ae198bfa0663645e67cf"
 "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
 "checksum bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80b13e2ab064ff3aa0bdbf1eff533f9822dc37899821f5f98c67f263eab51707"
 "checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400"
 "checksum block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab"
 "checksum boxfnonce 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8380105befe91099e6f69206164072c05bc92427ff6aa8a5171388317346dd75"
@@ -3168,27 +3160,27 @@ dependencies = [
 "checksum cranelift-wasm 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5022a3a3d1044fdc8c97909b5e8d701884982dcfb43885034d004cfdd9b7d577"
 "checksum crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd5d02c0aac6bd68393ed69e00bbc2457f3e89075c6349db7189618dc4ddc1d7"
 "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3"
 "checksum crossbeam-deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fe8153ef04a7594ded05b427ffad46ddeaf22e63fd48d42b3e1e3bb4db07cae7"
 "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150"
 "checksum crossbeam-epoch 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2af0e75710d6181e234c8ecc79f14a97907850a541b13b0be1dd10992f2e4620"
 "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
 "checksum crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d636a8b3bcc1b409d7ffd3facef8f21dcb4009626adbd0c5e6c4305c07253c7b"
-"checksum cssparser 0.25.0 (registry+https://github.com/rust-lang/crates.io-index)" = "730363a45c4e248d4f21d3e5c1156d1a9cdec0855056c0d9539e814bc59865c3"
-"checksum cssparser-macros 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f3a5383ae18dbfdeb569ed62019f5bddb2a95cd2d3833313c475a0d014777805"
-"checksum cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b6557bdb1dc9647eae1cf7f5601b14cd45fc3c7ccf2df618387416fe542da6ea"
+"checksum cssparser 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa4c7e7b72ef04e94e80cec7a4bd795fc2a67a9ce627bc684cf95dd89711d972"
+"checksum cssparser-macros 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b16e382d9b983fdb9ac6a36b37fdeb84ce3ea81f749febfee3463cfa7f24275e"
+"checksum cstr 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bc6b738cea084b0bf479106e0089d58d8c3dbc35d1fef3c485e19e20ea47d252"
 "checksum cstr-macros 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0472c17c83d3ec1af32fb6ee2b3ad56ae0b6e69355d63d1d30602055c34324a8"
 "checksum cubeb 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8a3502aafa1bf95c524f65d2ba46d8741700c6a8a9543ea52c6da3d8b69a2896"
 "checksum cubeb-backend 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdcac95519416d9ec814db2dc40e6293e7da25b906023d93f48b87f0587ab138"
 "checksum cubeb-core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37f7b20f757a4e4b6aa28863236551bff77682dc6db192eba15af615492b5445"
 "checksum cubeb-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "653b9e245d35dbe2a2da7c4586275cee75ff656ddeb02d4a73b4afdfa6d67502"
-"checksum darling 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2a78af487e4eb8f4421a1770687b328af6bb4494ca93435210678c6eea875c11"
-"checksum darling_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b315f49c7b6db3708bca6e6913c194581a44ec619b7a39e131d4dd63733a3698"
-"checksum darling_macro 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eb69a38fdeaeaf3db712e1df170de67ee9dfc24fb88ca3e9d21e703ec25a4d8e"
+"checksum darling 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f000e7b03a0083a30e1f10b1428a530849c21e72b338fa76869b5dbc4b045bf"
+"checksum darling_core 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "86bc5ce438f4b703755d12f59bbf0a16c642766d4534e922db47569dbdd0b998"
+"checksum darling_macro 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9973050ba46be2a2935a7b316147f41a808ac604b8f0fef6eba77fd47a89daeb"
 "checksum devd-rs 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e7c9ac481c38baf400d3b732e4a06850dfaa491d1b6379a249d9d40d14c2434c"
 "checksum diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3c2b69f912779fbb121ceb775d74d51e915af17aaebc38d28a592843a2dd0a3a"
 "checksum digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90"
 "checksum dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "88972de891f6118092b643d85a0b28e0678e0f948d7f879aa32f2d5aafe97d2a"
 "checksum docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d8acd393692c503b168471874953a2531df0e9ab77d0b6bbc582395743300a4a"
 "checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab"
 "checksum dtoa-short 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "068d4026697c1a18f0b0bb8cfcad1b0c151b90d8edb9bf4c235ad68128920d1d"
 "checksum dwrote 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7b46afd0d0bbbea88fc083ea293e40865e26a75ec9d38cf5d05a23ac3e2ffe02"
@@ -3199,17 +3191,17 @@ dependencies = [
 "checksum env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0561146661ae44c579e993456bc76d11ce1e0c7d745e57b2fa7146b6e49fa2ad"
 "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
 "checksum euclid 0.19.3 (registry+https://github.com/rust-lang/crates.io-index)" = "600657e7e5c03bfbccdc68721bc3b5abcb761553973387124eae9c9e4f02c210"
 "checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7"
 "checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596"
 "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
 "checksum fixedbitset 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "85cb8fec437468d86dc7c83ca7cfc933341d561873275f22dd5eedefa63a6478"
 "checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909"
-"checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344"
+"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
 "checksum foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ebc04f19019fff1f2d627b5581574ead502f80c48c88900575a46e0840fe5d0"
 "checksum freetype 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b659e75b7a7338fe75afd7f909fc2b71937845cffb6ebe54ba2e50f13d8e903d"
 "checksum fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
 "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
 "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
 "checksum futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)" = "884dbe32a6ae4cd7da5c6db9b78114449df9953b8d490c9d7e1b51720b922c62"
 "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4"
 "checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
@@ -3338,19 +3330,18 @@ dependencies = [
 "checksum string 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00caf261d6f90f588f8450b8e1230fa0d5be49ee6140fdfbcb55335aff350970"
 "checksum string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25d70109977172b127fe834e5449e5ab1740b9ba49fa18a2020f509174f25423"
 "checksum string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eea1eee654ef80933142157fdad9dd8bc43cf7c74e999e369263496f04ff4da"
 "checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc"
 "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
 "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
 "checksum syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "91b52877572087400e83d24b9178488541e3d535259e04ff17a63df1e5ceff59"
 "checksum syn 0.14.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4e4b5274d4a0a3d2749d5c158dc64d3403e60554dc61194648787ada5212473d"
-"checksum syn 0.15.7 (registry+https://github.com/rust-lang/crates.io-index)" = "455a6ec9b368f8c479b0ae5494d13b22dc00990d2f00d68c9dc6a2dc4f17f210"
+"checksum syn 0.15.22 (registry+https://github.com/rust-lang/crates.io-index)" = "ae8b29eb5210bc5cf63ed6149cbf9adfc82ac0be023d8735c176ee74a2db4da7"
 "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
-"checksum synstructure 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "98cad891cd238c98e1f0aec9f7c0f620aa696e4e5f7daba56ac67b5e86a6b049"
 "checksum target-lexicon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4af5e2227f0b887d591d3724b796a96eff04226104d872f5b3883fcd427d64b9"
 "checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6"
 "checksum term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1"
 "checksum term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209"
 "checksum termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "adc4587ead41bf016f11af03e55a624c06568b5a19db4e90fde573d805074f83"
 "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
 "checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693"
 "checksum thin-slice 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
@@ -3386,17 +3377,17 @@ dependencies = [
 "checksum uuid 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e1436e58182935dcd9ce0add9ea0b558e8a87befe01c1a301e6020aeb0876363"
 "checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b"
 "checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c"
 "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
 "checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369"
 "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3"
 "checksum wasmparser 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b4e0f66e314a8e63ff5c3cc5103f7d0a3de9ee98bb61a960adcf7f1d9debd2f"
 "checksum webidl 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0f807f7488d680893f7188aa09d7672a3a0a8461975a098a2edf0a52e3fee29"
-"checksum which 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4be6cfa54dab45266e98b5d7be2f8ce959ddd49abd141a05d52dce4b07f803bb"
+"checksum which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164"
 "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
 "checksum winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)" = "<none>"
 "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
 "checksum winapi-i686-pc-windows-gnu 0.4.0 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)" = "<none>"
 "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)" = "<none>"
 "checksum wincolor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb06499a3a4d44302791052df005d5232b927ed1a9658146d842165c4de7767"
 "checksum winreg 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a27a759395c1195c4cc5cda607ef6f8f6498f64e78f7900f5de0a127a424704a"
 "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
--- a/third_party/rust/bindgen/.cargo-checksum.json
+++ b/third_party/rust/bindgen/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"d6ee9689e1d4ece0423949f53cfd91c6c1f53e9246e559e3c6e9093d691a4229","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"630d1a1d123c131bad0fec23173e263ba8ecc064b5cd8446d4cab7ffd197db45","build.rs":"032a1c51963894a421b0535f9227796d88768ac5f665a81d2edced69dc6d106a","src/callbacks.rs":"9d41b7848cea37e8741fa7bc947ba58a83647824b1a0bbe7ff75012c412eab13","src/clang.rs":"b25f8d455e3cd89d416a4c5e55d828db9691f4def82109c1dd12457e5ca2c13c","src/codegen/bitfield_unit.rs":"88b0604322dc449fc9284850eadc1f5d14b42fa747d4258bae0b6b9535f52dfd","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"2c890c96a1a6b72ada63593cb544f005476fb176d7181553713e83710dc8eefd","src/codegen/impl_debug.rs":"43b977b8d16073d021977ce57f3c22eb5b1083493905ae19a171e2271939f574","src/codegen/impl_partialeq.rs":"671dd0eac712bf8281e11a7b3e545a443c6e9e2c8ee7fbebeb03c76667ca206b","src/codegen/mod.rs":"a1bfb972bed101b735d3ac19fa1080bd3a8d4e38e11b4adf34ca413982e2fe5e","src/codegen/struct_layout.rs":"b77f03dfbbed408a5fa6e693560aea8dc902fe7d10d847ce39122e6961078515","src/extra_assertions.rs":"449549c4a7a50c3f0b06332452b2fb6c9b23f31ca8e5e1656fe6c7f21e8ef7fa","src/features.rs":"be74e03d4f00582fa8970439da52057b04204b450193833953ed84772933bd46","src/ir/analysis/derive_copy.rs":"b7e12cdc74937909529e4cefe9f43b3ee0a5590f07392b73481811ac9fddedd2","src/ir/analysis/derive_debug.rs":"cf9346ecb3afd4e94094a2723e4d76c76c55f42a13dc1d5ec6564d25d3a46cf4","src/ir/analysis/derive_default.rs":"87332eccd5accbfbf7fad2e1511be4f8945b0538ae3e0628c8af17d16068691f","src/ir/analysis/derive_hash.rs":"521ea1dbe221755042a95e8e8dcb594e427e54be2eb869c61ebbdb27fec5aa77","src/ir/analysis/derive_partialeq_or_partialord.rs":"3c5d051f69401fe50b56143143eca3e71674d6a87d0013c31745b75d0f3d584f","src/ir/analysis/has_destructor.rs":"d9aaaceba580b48eb0df4e5537b34b417c51ccdfeb8f6b72484f3bf4992317fe","src/ir/analysis/has_float.rs":"5f7ee1b834978817041d884fee4648b31ecb66c62aafb8e7a9a17e5ac434bfe5","src/ir/analysis/has_type_param_in_array.rs":"abf74468b923c015aaf67599e50857267516010472819a79ca494fe02dd6ac93","src/ir/analysis/has_vtable.rs":"37765e954ef792e369a58ccfe1d827a00fe9bce680466da1d6523671b94b6c92","src/ir/analysis/mod.rs":"ea5ace45c77e855674bb565ba0fef556f60e3293b0ddcf11d3a5a6ec15ab0648","src/ir/analysis/sizedness.rs":"4f788bff0ceb0e008d70145510340ab636e5203787316f0be41f789ce9b2f73d","src/ir/analysis/template_params.rs":"6554dd1240142ec0e7299e678b696725f5cba99243d1c3d1cbf58d4764082fd6","src/ir/annotations.rs":"ef106afcbe6084c18bd13a37ee3c1cdc9596bfb055db8c773d81f8f15fec3208","src/ir/comment.rs":"1b068d5834da7360aec4cb80d9c55219cedbb2ae8b9727a39ec7d156c88fe0b5","src/ir/comp.rs":"7b22f3ff19ca45a6fbfe7ea015109d43f4ddf65b33b47b1c37829fcb87cdff9b","src/ir/context.rs":"7fde495a0b97f332a2018a6ee7b1cbac46e8dee68f2a3956a2a95e26e970c266","src/ir/derive.rs":"19601e76528d6cce8e04a66572e75da4e9efdecc4d60a983fc68c11958e9f3ec","src/ir/dot.rs":"d01f1621ab67e368d854a82bd6bb0b8dd52f3c2c733de8eaf81aece9543818cb","src/ir/enum_ty.rs":"9cc242d6b3c1866665594e8b306860ee39c0ea42d22198d46b7fded473fe3e84","src/ir/function.rs":"44603a952b5f5f3074f4f9b4995e88b28906e22830865533469f42071af61aa9","src/ir/int.rs":"07e0c7dbd2dd977177fae3acd2a14adf271c6cf9ff4b57cddc11d50734fd4801","src/ir/item.rs":"0ec5cec91551e01069451265fcf755cb54608bc2dfa770e770769eef0f2ba080","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"e722edffcd34914b534813da5af6fe8ba69927a54e0ec88ae1733f5ddf0e50b1","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"828a890acdc8b10c44e69e2ed4a4f5d8c0e734606d3a8cc71658dcf43a49acf4","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"a7e72e4fb85a1328f17a5428c7bc7f1c51326299833f82252770bebf99d1a9a1","src/ir/var.rs":"5c0caaa505faef18e334c6198b3634b6f390d14cf9da629226cd78617fd3594b","src/lib.rs":"b94a374ef78f6b6cd2b0676efcd67a16800730b28374155b54387a55774aed6e","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"a4b4028542d6292363fc97621c704bf1b4e7eb149e9cb86b52e30aad0be13b99","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"c417889726b5e3325f9375551bf23fd54c9b40020151c364741ea6126ede386b","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"b41df015ccbc22b038641bd84d0aeeff01e0a4c0714ed35ed0e9a3dd8ad8d732"}
\ No newline at end of file
+{"files":{"Cargo.toml":"2dc33b3636721ad992f5c9a50dd8e673e68746826d0b825b23d40e5e98329696","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"0b50adc1da2d15211d61cab2ff8b9f1e8eccc37ae25695ba7a0c21b77389aa4c","build.rs":"032a1c51963894a421b0535f9227796d88768ac5f665a81d2edced69dc6d106a","src/callbacks.rs":"b24d7982332c6a35928f134184ddf4072fe4545a45546b97b9b0e0c1fbb77c08","src/clang.rs":"ae7b7d992e1a85c9d813257aa3cab2f93a287fd58bf178e8dce427648bf51000","src/codegen/bitfield_unit.rs":"88b0604322dc449fc9284850eadc1f5d14b42fa747d4258bae0b6b9535f52dfd","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"dcd9f57b80ccf4a46874123ee0d5511c2b06390382eb6fdf88a06e56c04b21d9","src/codegen/impl_debug.rs":"19a8f75a1513efb523f33fd02246976e81842d38f249261b0d1a671365f78caf","src/codegen/impl_partialeq.rs":"d40d9ee2849c4d3d557b033c4d3af5e6de4a44347f67c0f016198086338811af","src/codegen/mod.rs":"3f673a7b17b289af66990cc132421c0385d852da6b404ac2ffe53b33c53c2aba","src/codegen/struct_layout.rs":"43132726f981b2d90f957fa6a0909fe48c07ca3e19b83886f24c876a33c61848","src/extra_assertions.rs":"449549c4a7a50c3f0b06332452b2fb6c9b23f31ca8e5e1656fe6c7f21e8ef7fa","src/features.rs":"5fe97362ab406a09422473b8f94603832130ecab10dc4df8feebaebc1793ac1b","src/ir/analysis/derive_copy.rs":"b7e12cdc74937909529e4cefe9f43b3ee0a5590f07392b73481811ac9fddedd2","src/ir/analysis/derive_debug.rs":"cf9346ecb3afd4e94094a2723e4d76c76c55f42a13dc1d5ec6564d25d3a46cf4","src/ir/analysis/derive_default.rs":"87332eccd5accbfbf7fad2e1511be4f8945b0538ae3e0628c8af17d16068691f","src/ir/analysis/derive_hash.rs":"521ea1dbe221755042a95e8e8dcb594e427e54be2eb869c61ebbdb27fec5aa77","src/ir/analysis/derive_partialeq_or_partialord.rs":"3c5d051f69401fe50b56143143eca3e71674d6a87d0013c31745b75d0f3d584f","src/ir/analysis/has_destructor.rs":"d9aaaceba580b48eb0df4e5537b34b417c51ccdfeb8f6b72484f3bf4992317fe","src/ir/analysis/has_float.rs":"5f7ee1b834978817041d884fee4648b31ecb66c62aafb8e7a9a17e5ac434bfe5","src/ir/analysis/has_type_param_in_array.rs":"abf74468b923c015aaf67599e50857267516010472819a79ca494fe02dd6ac93","src/ir/analysis/has_vtable.rs":"37765e954ef792e369a58ccfe1d827a00fe9bce680466da1d6523671b94b6c92","src/ir/analysis/mod.rs":"ea5ace45c77e855674bb565ba0fef556f60e3293b0ddcf11d3a5a6ec15ab0648","src/ir/analysis/sizedness.rs":"4f788bff0ceb0e008d70145510340ab636e5203787316f0be41f789ce9b2f73d","src/ir/analysis/template_params.rs":"6554dd1240142ec0e7299e678b696725f5cba99243d1c3d1cbf58d4764082fd6","src/ir/annotations.rs":"39a5ab19f4d5dfa617577e4a0d0d2b67b5369d480c7cca4b14d172458c9843f0","src/ir/comment.rs":"1b068d5834da7360aec4cb80d9c55219cedbb2ae8b9727a39ec7d156c88fe0b5","src/ir/comp.rs":"7b22f3ff19ca45a6fbfe7ea015109d43f4ddf65b33b47b1c37829fcb87cdff9b","src/ir/context.rs":"12f584e20af7c6074a07d66aa9efbe38d9bef211e3011ccc558d392e98ce6af9","src/ir/derive.rs":"19601e76528d6cce8e04a66572e75da4e9efdecc4d60a983fc68c11958e9f3ec","src/ir/dot.rs":"d01f1621ab67e368d854a82bd6bb0b8dd52f3c2c733de8eaf81aece9543818cb","src/ir/enum_ty.rs":"9cc242d6b3c1866665594e8b306860ee39c0ea42d22198d46b7fded473fe3e84","src/ir/function.rs":"33292992af5513e9814fb9d39a6ebf12934fc8887db3d9f49ff6aa9ec47d8573","src/ir/int.rs":"07e0c7dbd2dd977177fae3acd2a14adf271c6cf9ff4b57cddc11d50734fd4801","src/ir/item.rs":"8de5fe624696c170aa3d96105acd365a19eebfaa3ac1aa451a147960c3a88018","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"e722edffcd34914b534813da5af6fe8ba69927a54e0ec88ae1733f5ddf0e50b1","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"557531c8cbb2da37045c11fd5af667ef2bbd790212e232d261359d98fa871abf","src/ir/template.rs":"c0f8570b927dfd6a421fc4ce3094ec837a3ed936445225dbfac961e8e0842ae5","src/ir/traversal.rs":"ea751379a5aec02f93f8d2c61e18232776b1f000dbeae64b9a7195ba21a19dd6","src/ir/ty.rs":"1068a7e4916d69b5034a76c47b67e6257db906cc16dad6d8af4bdb39ad52cd84","src/ir/var.rs":"92b08b8abab9caa23a0ff5121b7ad0165b6f356dd7d51a687826c9428967c082","src/lib.rs":"70f9100949cac6f603324dc91e01e14b2649190d183a647ad1686e9f75a1312d","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"a4b4028542d6292363fc97621c704bf1b4e7eb149e9cb86b52e30aad0be13b99","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"c417889726b5e3325f9375551bf23fd54c9b40020151c364741ea6126ede386b","src/time.rs":"3b763e6fee51d0eb01228dfe28bc28a9f692aff73b2a7b90a030902e0238fca6"},"package":"d8de1946c252145e09ed00ea90a8685fce15b8f94bb4dc1a0daaf2a9b375be61"}
\ No newline at end of file
--- a/third_party/rust/bindgen/Cargo.toml
+++ b/third_party/rust/bindgen/Cargo.toml
@@ -7,28 +7,28 @@
 #
 # 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 = "bindgen"
-version = "0.43.0"
+version = "0.44.0"
 authors = ["Jyun-Yan You <jyyou.tw@gmail.com>", "Emilio Cobos Álvarez <emilio@crisal.io>", "Nick Fitzgerald <fitzgen@gmail.com>", "The Servo project developers"]
 build = "build.rs"
 include = ["LICENSE", "README.md", "Cargo.toml", "build.rs", "src/*.rs", "src/**/*.rs"]
 description = "Automatically generates Rust FFI bindings to C and C++ libraries."
-homepage = "https://rust-lang-nursery.github.io/rust-bindgen/"
+homepage = "https://rust-lang.github.io/rust-bindgen/"
 documentation = "https://docs.rs/bindgen"
 readme = "README.md"
 keywords = ["bindings", "ffi", "code-generation"]
 categories = ["external-ffi-bindings", "development-tools::ffi"]
 license = "BSD-3-Clause"
-repository = "https://github.com/rust-lang-nursery/rust-bindgen"
+repository = "https://github.com/rust-lang/rust-bindgen"
 
 [lib]
 path = "src/lib.rs"
 
 [[bin]]
 name = "bindgen"
 path = "src/main.rs"
 doc = false
@@ -44,42 +44,42 @@ version = "0.1.0"
 [dependencies.clang-sys]
 version = "0.26"
 features = ["runtime", "clang_6_0"]
 
 [dependencies.clap]
 version = "2"
 
 [dependencies.env_logger]
-version = "0.5"
+version = "0.6"
 optional = true
 
 [dependencies.lazy_static]
 version = "1"
 
 [dependencies.log]
 version = "0.4"
 optional = true
 
 [dependencies.peeking_take_while]
 version = "0.1.2"
 
 [dependencies.proc-macro2]
-version = "0.3.2, < 0.3.6"
+version = "0.4"
 default-features = false
 
 [dependencies.quote]
-version = "0.5"
+version = "0.6"
 default-features = false
 
 [dependencies.regex]
 version = "1.0"
 
 [dependencies.which]
-version = "1.0.2"
+version = "2.0"
 [dev-dependencies.clap]
 version = "2"
 
 [dev-dependencies.diff]
 version = "0.1"
 
 [dev-dependencies.shlex]
 version = "0.1"
@@ -90,9 +90,9 @@ logging = ["env_logger", "log"]
 static = []
 testing_only_docs = []
 testing_only_extra_assertions = []
 testing_only_libclang_3_8 = []
 testing_only_libclang_3_9 = []
 testing_only_libclang_4 = []
 testing_only_libclang_5 = []
 [badges.travis-ci]
-repository = "rust-lang-nursery/rust-bindgen"
+repository = "rust-lang/rust-bindgen"
--- a/third_party/rust/bindgen/README.md
+++ b/third_party/rust/bindgen/README.md
@@ -1,12 +1,10 @@
 # `bindgen`
 
-[`impl period`](https://blog.rust-lang.org/2017/09/18/impl-future-for-rust.html) has been started! Join us at [Gitter.im](https://gitter.im/rust-impl-period/WG-dev-tools-bindgen).
-
 **`bindgen` automatically generates Rust FFI bindings to C (and some C++) libraries.**
 
 For example, given the C header `doggo.h`:
 
 ```c
 typedef struct Doggo {
     int many;
     char wow;
@@ -29,17 +27,17 @@ pub struct Doggo {
 
 extern "C" {
     pub fn eleven_out_of_ten_majestic_af(pupper: *mut Doggo);
 }
 ```
 
 ## Users Guide
 
-[πŸ“š Read the `bindgen` users guide here! πŸ“š](https://rust-lang-nursery.github.io/rust-bindgen)
+[πŸ“š Read the `bindgen` users guide here! πŸ“š](https://rust-lang.github.io/rust-bindgen)
 
 ## API Reference
 
 [API reference documentation is on docs.rs](https://docs.rs/bindgen)
 
 ## Contributing
 
 [See `CONTRIBUTING.md` for hacking on `bindgen`!](./CONTRIBUTING.md)
--- a/third_party/rust/bindgen/src/callbacks.rs
+++ b/third_party/rust/bindgen/src/callbacks.rs
@@ -30,16 +30,21 @@ pub trait ParseCallbacks: fmt::Debug + U
     }
 
     /// The integer kind an integer macro should have, given a name and the
     /// value of that macro, or `None` if you want the default to be chosen.
     fn int_macro(&self, _name: &str, _value: i64) -> Option<IntKind> {
         None
     }
 
+    /// This will be run on every string macro. The callback can not influence the further
+    /// treatment of the macro, but may use the value to generate additional code or configuration.
+    fn str_macro(&self, _name: &str, _value: &[u8]) {
+    }
+
     /// This function should return whether, given an enum variant
     /// name, and value, this enum variant will forcibly be a constant.
     fn enum_variant_behavior(
         &self,
         _enum_name: Option<&str>,
         _original_variant_name: &str,
         _variant_value: EnumVariantValue,
     ) -> Option<EnumVariantCustomBehavior> {
@@ -50,9 +55,14 @@ pub trait ParseCallbacks: fmt::Debug + U
     fn enum_variant_name(
         &self,
         _enum_name: Option<&str>,
         _original_variant_name: &str,
         _variant_value: EnumVariantValue,
     ) -> Option<String> {
         None
     }
+
+    /// Allows to rename an item, replacing `_original_item_name`.
+    fn item_name(&self, _original_item_name: &str) -> Option<String> {
+        None
+    }
 }
--- a/third_party/rust/bindgen/src/clang.rs
+++ b/third_party/rust/bindgen/src/clang.rs
@@ -494,16 +494,41 @@ impl Cursor {
             if self.kind() == CXCursor_EnumConstantDecl {
                 Some(clang_getEnumConstantDeclUnsignedValue(self.x) as u64)
             } else {
                 None
             }
         }
     }
 
+    /// Does this cursor have the given simple attribute?
+    ///
+    /// Note that this will only work for attributes that don't have an existing libclang
+    /// CursorKind, e.g. pure, const, etc.
+    pub fn has_simple_attr(&self, attr: &str) -> bool {
+        let mut found_attr = false;
+        self.visit(|cur| {
+            if cur.kind() == CXCursor_UnexposedAttr {
+                found_attr = cur.tokens().map(|tokens| {
+                    tokens.iter().any(|t| {
+                        t.kind == CXToken_Identifier && t.spelling == attr
+                    })
+                }).unwrap_or(false);
+
+                if found_attr {
+                    return CXChildVisit_Break;
+                }
+            }
+
+            CXChildVisit_Continue
+        });
+
+        found_attr
+    }
+
     /// Given that this cursor's referent is a `typedef`, get the `Type` that is
     /// being aliased.
     pub fn typedef_type(&self) -> Option<Type> {
         let inner = Type {
             x: unsafe { clang_getTypedefDeclUnderlyingType(self.x) },
         };
 
         if inner.is_valid() { Some(inner) } else { None }
--- a/third_party/rust/bindgen/src/codegen/helpers.rs
+++ b/third_party/rust/bindgen/src/codegen/helpers.rs
@@ -1,108 +1,110 @@
 //! Helpers for code generation that don't need macro expansion.
 
 use ir::context::BindgenContext;
 use ir::layout::Layout;
-use quote;
-use proc_macro2::{Term, Span};
+use proc_macro2::{self, Ident, Span};
+use quote::TokenStreamExt;
 
 pub mod attributes {
-    use quote;
-    use proc_macro2::{Term, Span};
+    use proc_macro2::{self, Ident, Span};
 
-    pub fn repr(which: &str) -> quote::Tokens {
-        let which = Term::new(which, Span::call_site());
+    pub fn repr(which: &str) -> proc_macro2::TokenStream {
+        let which = Ident::new(which, Span::call_site());
         quote! {
             #[repr( #which )]
         }
     }
 
-    pub fn repr_list(which_ones: &[&str]) -> quote::Tokens {
-        let which_ones = which_ones.iter().cloned().map(|one| Term::new(one, Span::call_site()));
+    pub fn repr_list(which_ones: &[&str]) -> proc_macro2::TokenStream {
+        let which_ones = which_ones.iter().cloned().map(|one| Ident::new(one, Span::call_site()));
         quote! {
             #[repr( #( #which_ones ),* )]
         }
     }
 
-    pub fn derives(which_ones: &[&str]) -> quote::Tokens {
-        let which_ones = which_ones.iter().cloned().map(|one| Term::new(one, Span::call_site()));
+    pub fn derives(which_ones: &[&str]) -> proc_macro2::TokenStream {
+        let which_ones = which_ones.iter().cloned().map(|one| Ident::new(one, Span::call_site()));
         quote! {
             #[derive( #( #which_ones ),* )]
         }
     }
 
-    pub fn inline() -> quote::Tokens {
+    pub fn inline() -> proc_macro2::TokenStream {
         quote! {
             #[inline]
         }
     }
 
-    pub fn doc(comment: String) -> quote::Tokens {
-        // Doc comments are already preprocessed into nice `///` formats by the
-        // time they get here. Just make sure that we have newlines around it so
-        // that nothing else gets wrapped into the comment.
-        let mut tokens = quote! {};
-        tokens.append(Term::new("\n", Span::call_site()));
-        tokens.append(Term::new(&comment, Span::call_site()));
-        tokens.append(Term::new("\n", Span::call_site()));
-        tokens
+    pub fn must_use() -> proc_macro2::TokenStream {
+        quote! {
+            #[must_use]
+        }
     }
 
-    pub fn link_name(name: &str) -> quote::Tokens {
+    pub fn doc(comment: String) -> proc_macro2::TokenStream {
+        use std::str::FromStr;
+
+        // NOTE(emilio): By this point comments are already preprocessed and in
+        // `///` form. Quote turns them into `#[doc]` comments, but oh well.
+        proc_macro2::TokenStream::from_str(&comment).unwrap()
+    }
+
+    pub fn link_name(name: &str) -> proc_macro2::TokenStream {
         // LLVM mangles the name by default but it's already mangled.
         // Prefixing the name with \u{1} should tell LLVM to not mangle it.
         let name = format!("\u{1}{}", name);
         quote! {
             #[link_name = #name]
         }
     }
 }
 
 /// Generates a proper type for a field or type with a given `Layout`, that is,
 /// a type with the correct size and alignment restrictions.
-pub fn blob(ctx: &BindgenContext, layout: Layout) -> quote::Tokens {
+pub fn blob(ctx: &BindgenContext, layout: Layout) -> proc_macro2::TokenStream {
     let opaque = layout.opaque();
 
     // FIXME(emilio, #412): We fall back to byte alignment, but there are
     // some things that legitimately are more than 8-byte aligned.
     //
     // Eventually we should be able to `unwrap` here, but...
     let ty_name = match opaque.known_rust_type_for_array(ctx) {
         Some(ty) => ty,
         None => {
             warn!("Found unknown alignment on code generation!");
             "u8"
         }
     };
 
-    let ty_name = Term::new(ty_name, Span::call_site());
+    let ty_name = Ident::new(ty_name, Span::call_site());
 
     let data_len = opaque.array_size(ctx).unwrap_or(layout.size);
 
     if data_len == 1 {
         quote! {
             #ty_name
         }
     } else {
         quote! {
             [ #ty_name ; #data_len ]
         }
     }
 }
 
 /// Integer type of the same size as the given `Layout`.
-pub fn integer_type(ctx: &BindgenContext, layout: Layout) -> Option<quote::Tokens> {
+pub fn integer_type(ctx: &BindgenContext, layout: Layout) -> Option<proc_macro2::TokenStream> {
     let name = Layout::known_type_for_size(ctx, layout.size)?;
-    let name = Term::new(name, Span::call_site());
+    let name = Ident::new(name, Span::call_site());
     Some(quote! { #name })
 }
 
 /// Generates a bitfield allocation unit type for a type with the given `Layout`.
-pub fn bitfield_unit(ctx: &BindgenContext, layout: Layout) -> quote::Tokens {
+pub fn bitfield_unit(ctx: &BindgenContext, layout: Layout) -> proc_macro2::TokenStream {
     let mut tokens = quote! {};
 
     if ctx.options().enable_cxx_namespaces {
         tokens.append_all(quote! { root:: });
     }
 
     let align = match layout.align {
         n if n >= 8 => quote! { u64 },
@@ -119,20 +121,19 @@ pub fn bitfield_unit(ctx: &BindgenContex
     tokens
 }
 
 pub mod ast_ty {
     use ir::context::BindgenContext;
     use ir::function::FunctionSig;
     use ir::layout::Layout;
     use ir::ty::FloatKind;
-    use quote;
     use proc_macro2;
 
-    pub fn raw_type(ctx: &BindgenContext, name: &str) -> quote::Tokens {
+    pub fn raw_type(ctx: &BindgenContext, name: &str) -> proc_macro2::TokenStream {
         let ident = ctx.rust_ident_raw(name);
         match ctx.options().ctypes_prefix {
             Some(ref prefix) => {
                 let prefix = ctx.rust_ident_raw(prefix.as_str());
                 quote! {
                     #prefix::#ident
                 }
             }
@@ -141,17 +142,17 @@ pub mod ast_ty {
             },
         }
     }
 
     pub fn float_kind_rust_type(
         ctx: &BindgenContext,
         fk: FloatKind,
         layout: Option<Layout>,
-    ) -> quote::Tokens {
+    ) -> proc_macro2::TokenStream {
         // TODO: we probably should take the type layout into account more
         // often?
         //
         // Also, maybe this one shouldn't be the default?
         match (fk, ctx.options().convert_floats) {
             (FloatKind::Float, true) => quote! { f32 },
             (FloatKind::Double, true) => quote! { f64 },
             (FloatKind::Float, false) => raw_type(ctx, "c_float"),
@@ -181,46 +182,46 @@ pub mod ast_ty {
                     quote! { u128 }
                 } else {
                     quote! { [u64; 2] }
                 }
             }
         }
     }
 
-    pub fn int_expr(val: i64) -> quote::Tokens {
+    pub fn int_expr(val: i64) -> proc_macro2::TokenStream {
         // Don't use quote! { #val } because that adds the type suffix.
         let val = proc_macro2::Literal::i64_unsuffixed(val);
         quote!(#val)
     }
 
-    pub fn uint_expr(val: u64) -> quote::Tokens {
+    pub fn uint_expr(val: u64) -> proc_macro2::TokenStream {
         // Don't use quote! { #val } because that adds the type suffix.
         let val = proc_macro2::Literal::u64_unsuffixed(val);
         quote!(#val)
     }
 
-    pub fn byte_array_expr(bytes: &[u8]) -> quote::Tokens {
+    pub fn byte_array_expr(bytes: &[u8]) -> proc_macro2::TokenStream {
         let mut bytes: Vec<_> = bytes.iter().cloned().collect();
         bytes.push(0);
         quote! { [ #(#bytes),* ] }
     }
 
-    pub fn cstr_expr(mut string: String) -> quote::Tokens {
+    pub fn cstr_expr(mut string: String) -> proc_macro2::TokenStream {
         string.push('\0');
         let b = proc_macro2::Literal::byte_string(&string.as_bytes());
         quote! {
             #b
         }
     }
 
     pub fn float_expr(
         ctx: &BindgenContext,
         f: f64,
-    ) -> Result<quote::Tokens, ()> {
+    ) -> Result<proc_macro2::TokenStream, ()> {
         if f.is_finite() {
             let val = proc_macro2::Literal::f64_unsuffixed(f);
 
             return Ok(quote!(#val));
         }
 
         let prefix = ctx.trait_prefix();
 
@@ -244,17 +245,17 @@ pub mod ast_ty {
 
         warn!("Unknown non-finite float number: {:?}", f);
         return Err(());
     }
 
     pub fn arguments_from_signature(
         signature: &FunctionSig,
         ctx: &BindgenContext,
-    ) -> Vec<quote::Tokens> {
+    ) -> Vec<proc_macro2::TokenStream> {
         let mut unnamed_arguments = 0;
         signature
             .argument_types()
             .iter()
             .map(|&(ref name, _ty)| {
                 match *name {
                     Some(ref name) => {
                         let name = ctx.rust_ident(name);
--- a/third_party/rust/bindgen/src/codegen/impl_debug.rs
+++ b/third_party/rust/bindgen/src/codegen/impl_debug.rs
@@ -1,21 +1,21 @@
 use ir::comp::{BitfieldUnit, CompKind, Field, FieldData, FieldMethods};
 use ir::context::BindgenContext;
 use ir::derive::CanTriviallyDeriveDebug;
 use ir::item::{HasTypeParamInArray, IsOpaque, Item, ItemCanonicalName};
 use ir::ty::{RUST_DERIVE_IN_ARRAY_LIMIT, TypeKind};
-use quote;
+use proc_macro2;
 
 pub fn gen_debug_impl(
     ctx: &BindgenContext,
     fields: &[Field],
     item: &Item,
     kind: CompKind,
-) -> quote::Tokens {
+) -> proc_macro2::TokenStream {
     let struct_name = item.canonical_name(ctx);
     let mut format_string = format!("{} {{{{ ", struct_name);
     let mut tokens = vec![];
 
     if item.is_opaque(ctx, &()) {
         format_string.push_str("opaque");
     } else {
         match kind {
@@ -58,43 +58,43 @@ pub trait ImplDebug<'a> {
     type Extra;
 
     /// Generate a format string snippet to be included in the larger `impl Debug`
     /// format string, and the code to get the format string's interpolation values.
     fn impl_debug(
         &self,
         ctx: &BindgenContext,
         extra: Self::Extra,
-    ) -> Option<(String, Vec<quote::Tokens>)>;
+    ) -> Option<(String, Vec<proc_macro2::TokenStream>)>;
 }
 
 impl<'a> ImplDebug<'a> for FieldData {
     type Extra = ();
 
     fn impl_debug(
         &self,
         ctx: &BindgenContext,
         _: Self::Extra,
-    ) -> Option<(String, Vec<quote::Tokens>)> {
+    ) -> Option<(String, Vec<proc_macro2::TokenStream>)> {
         if let Some(name) = self.name() {
             ctx.resolve_item(self.ty()).impl_debug(ctx, name)
         } else {
             None
         }
     }
 }
 
 impl<'a> ImplDebug<'a> for BitfieldUnit {
     type Extra = ();
 
     fn impl_debug(
         &self,
         ctx: &BindgenContext,
         _: Self::Extra,
-    ) -> Option<(String, Vec<quote::Tokens>)> {
+    ) -> Option<(String, Vec<proc_macro2::TokenStream>)> {
         let mut format_string = String::new();
         let mut tokens = vec![];
         for (i, bitfield) in self.bitfields().iter().enumerate() {
             if i > 0 {
                 format_string.push_str(", ");
             }
 
             if let Some(bitfield_name) = bitfield.name() {
@@ -113,17 +113,17 @@ impl<'a> ImplDebug<'a> for BitfieldUnit 
 
 impl<'a> ImplDebug<'a> for Item {
     type Extra = &'a str;
 
     fn impl_debug(
         &self,
         ctx: &BindgenContext,
         name: &str,
-    ) -> Option<(String, Vec<quote::Tokens>)> {
+    ) -> Option<(String, Vec<proc_macro2::TokenStream>)> {
         let name_ident = ctx.rust_ident(name);
 
         // We don't know if blacklisted items `impl Debug` or not, so we can't
         // add them to the format string we're building up.
         if !ctx.whitelisted_items().contains(&self.id()) {
             return None;
         }
 
@@ -131,18 +131,18 @@ impl<'a> ImplDebug<'a> for Item {
             Some(ty) => ty,
             None => {
                 return None;
             }
         };
 
         fn debug_print(
             name: &str,
-            name_ident: quote::Tokens,
-        ) -> Option<(String, Vec<quote::Tokens>)> {
+            name_ident: proc_macro2::TokenStream,
+        ) -> Option<(String, Vec<proc_macro2::TokenStream>)> {
             Some((
                 format!("{}: {{:?}}", name),
                 vec![quote! {
                     self.#name_ident
                 }],
             ))
         }
 
--- a/third_party/rust/bindgen/src/codegen/impl_partialeq.rs
+++ b/third_party/rust/bindgen/src/codegen/impl_partialeq.rs
@@ -1,24 +1,23 @@
 
 use ir::comp::{CompInfo, CompKind, Field, FieldMethods};
 use ir::context::BindgenContext;
 use ir::item::{IsOpaque, Item};
 use ir::ty::{TypeKind, RUST_DERIVE_IN_ARRAY_LIMIT};
-use quote;
 use proc_macro2;
 
 /// Generate a manual implementation of `PartialEq` trait for the
 /// specified compound type.
 pub fn gen_partialeq_impl(
     ctx: &BindgenContext,
     comp_info: &CompInfo,
     item: &Item,
-    ty_for_impl: &quote::Tokens,
-) -> Option<quote::Tokens> {
+    ty_for_impl: &proc_macro2::TokenStream,
+) -> Option<proc_macro2::TokenStream> {
     let mut tokens = vec![];
 
     if item.is_opaque(ctx, &()) {
         tokens.push(quote! {
             &self._bindgen_opaque_blob[..] == &other._bindgen_opaque_blob[..]
         });
     } else if comp_info.kind() == CompKind::Union {
         assert!(!ctx.options().rust_features().untagged_union);
@@ -66,18 +65,18 @@ pub fn gen_partialeq_impl(
 
     Some(quote! {
         fn eq(&self, other: & #ty_for_impl) -> bool {
             #( #tokens )&&*
         }
     })
 }
 
-fn gen_field(ctx: &BindgenContext, ty_item: &Item, name: &str) -> quote::Tokens {
-    fn quote_equals(name_ident: proc_macro2::Term) -> quote::Tokens {
+fn gen_field(ctx: &BindgenContext, ty_item: &Item, name: &str) -> proc_macro2::TokenStream {
+    fn quote_equals(name_ident: proc_macro2::Ident) -> proc_macro2::TokenStream {
         quote! { self.#name_ident == other.#name_ident }
     }
 
     let name_ident = ctx.rust_ident(name);
     let ty = ty_item.expect_type();
 
     match *ty.kind() {
         TypeKind::Void |
--- a/third_party/rust/bindgen/src/codegen/mod.rs
+++ b/third_party/rust/bindgen/src/codegen/mod.rs
@@ -32,65 +32,66 @@ use ir::item::{IsOpaque, Item, ItemCanon
 use ir::item_kind::ItemKind;
 use ir::layout::Layout;
 use ir::module::Module;
 use ir::objc::{ObjCInterface, ObjCMethod};
 use ir::template::{AsTemplateParam, TemplateInstantiation, TemplateParameters};
 use ir::ty::{Type, TypeKind};
 use ir::var::Var;
 
-use quote;
-use proc_macro2::{self, Term, Span};
+use quote::TokenStreamExt;
+use proc_macro2::{self, Ident, Span};
 
 use std;
 use std::borrow::Cow;
 use std::cell::Cell;
 use std::collections::{HashSet, VecDeque};
 use std::collections::hash_map::{Entry, HashMap};
 use std::fmt::Write;
 use std::iter;
 use std::ops;
+use std::str::FromStr;
 
 // Name of type defined in constified enum module
 pub static CONSTIFIED_ENUM_MODULE_REPR_NAME: &'static str = "Type";
 
-fn top_level_path(ctx: &BindgenContext, item: &Item) -> Vec<quote::Tokens> {
+fn top_level_path(ctx: &BindgenContext, item: &Item) -> Vec<proc_macro2::TokenStream> {
     let mut path = vec![quote! { self }];
 
     if ctx.options().enable_cxx_namespaces {
         for _ in 0..item.codegen_depth(ctx) {
             path.push(quote! { super });
         }
     }
 
     path
 }
 
-fn root_import(ctx: &BindgenContext, module: &Item) -> quote::Tokens {
+fn root_import(ctx: &BindgenContext, module: &Item) -> proc_macro2::TokenStream {
     assert!(ctx.options().enable_cxx_namespaces, "Somebody messed it up");
     assert!(module.is_module());
 
     let mut path = top_level_path(ctx, module);
 
     let root = ctx.root_module().canonical_name(ctx);
     let root_ident = ctx.rust_ident(&root);
     path.push(quote! { #root_ident });
 
 
     let mut tokens = quote! {};
-    tokens.append_separated(path, Term::new("::", Span::call_site()));
+    tokens.append_separated(path, quote!(::));
 
     quote! {
         #[allow(unused_imports)]
         use #tokens ;
     }
 }
 
 struct CodegenResult<'a> {
-    items: Vec<quote::Tokens>,
+    items: Vec<proc_macro2::TokenStream>,
 
     /// A monotonic counter used to add stable unique id's to stuff that doesn't
     /// need to be referenced by anything.
     codegen_id: &'a Cell<usize>,
 
     /// Whether a bindgen union has been generated at least once.
     saw_bindgen_union: bool,
 
@@ -207,17 +208,17 @@ impl<'a> CodegenResult<'a> {
     fn seen_var(&self, name: &str) -> bool {
         self.vars_seen.contains(name)
     }
 
     fn saw_var(&mut self, name: &str) {
         self.vars_seen.insert(name.into());
     }
 
-    fn inner<F>(&mut self, cb: F) -> Vec<quote::Tokens>
+    fn inner<F>(&mut self, cb: F) -> Vec<proc_macro2::TokenStream>
     where
         F: FnOnce(&mut Self),
     {
         let mut new = Self::new(self.codegen_id);
 
         cb(&mut new);
 
         self.saw_union |= new.saw_union;
@@ -226,56 +227,56 @@ impl<'a> CodegenResult<'a> {
         self.saw_block |= new.saw_block;
         self.saw_bitfield_unit |= new.saw_bitfield_unit;
 
         new.items
     }
 }
 
 impl<'a> ops::Deref for CodegenResult<'a> {
-    type Target = Vec<quote::Tokens>;
+    type Target = Vec<proc_macro2::TokenStream>;
 
     fn deref(&self) -> &Self::Target {
         &self.items
     }
 }
 
 impl<'a> ops::DerefMut for CodegenResult<'a> {
     fn deref_mut(&mut self) -> &mut Self::Target {
         &mut self.items
     }
 }
 
 /// A trait to convert a rust type into a pointer, optionally const, to the same
 /// type.
 trait ToPtr {
-    fn to_ptr(self, is_const: bool) -> quote::Tokens;
+    fn to_ptr(self, is_const: bool) -> proc_macro2::TokenStream;
 }
 
-impl ToPtr for quote::Tokens {
-    fn to_ptr(self, is_const: bool) -> quote::Tokens {
+impl ToPtr for proc_macro2::TokenStream {
+    fn to_ptr(self, is_const: bool) -> proc_macro2::TokenStream {
         if is_const {
             quote! { *const #self }
         } else {
             quote! { *mut #self }
         }
     }
 }
 
-/// An extension trait for `quote::Tokens` that lets us append any implicit
+/// An extension trait for `proc_macro2::TokenStream` that lets us append any implicit
 /// template parameters that exist for some type, if necessary.
 trait AppendImplicitTemplateParams {
     fn append_implicit_template_params(
         &mut self,
         ctx: &BindgenContext,
         item: &Item,
     );
 }
 
-impl AppendImplicitTemplateParams for quote::Tokens {
+impl AppendImplicitTemplateParams for proc_macro2::TokenStream {
     fn append_implicit_template_params(
         &mut self,
         ctx: &BindgenContext,
         item: &Item,
     ) {
         let item = item.id()
             .into_resolver()
             .through_type_refs()
@@ -434,20 +435,17 @@ impl CodeGenerator for Module {
         let mut found_any = false;
         let inner_items = result.inner(|result| {
             result.push(root_import(ctx, item));
 
             let path = item.namespace_aware_canonical_path(ctx).join("::");
             if let Some(raw_lines) = ctx.options().module_lines.get(&path) {
                 for raw_line in raw_lines {
                     found_any = true;
-                    // FIXME(emilio): The use of `Term` is an abuse, but we abuse it
-                    // in a bunch more places.
-                    let line = Term::new(raw_line, Span::call_site());
-                    result.push(quote! { #line });
+                    result.push(proc_macro2::TokenStream::from_str(raw_line).unwrap());
                 }
             }
 
             codegen_self(result, &mut found_any);
         });
 
         // Don't bother creating an empty module.
         if !found_any {
@@ -661,29 +659,30 @@ impl CodeGenerator for Type {
             }
             TypeKind::Comp(ref ci) => ci.codegen(ctx, result, item),
             TypeKind::TemplateAlias(inner, _) |
             TypeKind::Alias(inner) => {
                 let inner_item = inner.into_resolver()
                     .through_type_refs()
                     .resolve(ctx);
                 let name = item.canonical_name(ctx);
+                let path = item.canonical_path(ctx);
 
                 {
                     let through_type_aliases = inner.into_resolver()
                         .through_type_refs()
                         .through_type_aliases()
                         .resolve(ctx);
 
                     // Try to catch the common pattern:
                     //
                     // typedef struct foo { ... } foo;
                     //
                     // here, and also other more complex cases like #946.
-                    if through_type_aliases.canonical_name(ctx) == name {
+                    if through_type_aliases.canonical_path(ctx) == path {
                         return;
                     }
                 }
 
                 // If this is a known named type, disallow generating anything
                 // for it too.
                 let spelling = self.name().expect("Unnamed alias?");
                 if utils::type_from_named(ctx, spelling).is_some() {
@@ -750,17 +749,17 @@ impl CodeGenerator for Type {
                     }) &&
                     outer_params.is_empty() &&
                     inner_item.expect_type().canonical_type(ctx).is_enum()
                 {
                     tokens.append_all(quote! {
                         pub use
                     });
                     let path = top_level_path(ctx, item);
-                    tokens.append_separated(path, Term::new("::", Span::call_site()));
+                    tokens.append_separated(path, quote!(::));
                     tokens.append_all(quote! {
                         :: #inner_rust_type  as #rust_name ;
                     });
                     result.push(tokens);
                     return;
                 }
 
                 tokens.append_all(quote! {
@@ -862,17 +861,17 @@ impl<'a> ItemCanonicalName for Vtable<'a
 
 impl<'a> TryToRustTy for Vtable<'a> {
     type Extra = ();
 
     fn try_to_rust_ty(
         &self,
         ctx: &BindgenContext,
         _: &(),
-    ) -> error::Result<quote::Tokens> {
+    ) -> error::Result<proc_macro2::TokenStream> {
         let name = ctx.rust_ident(self.canonical_name(ctx));
         Ok(quote! {
             #name
         })
     }
 }
 
 impl CodeGenerator for TemplateInstantiation {
@@ -957,18 +956,18 @@ trait FieldCodegen<'a> {
         accessor_kind: FieldAccessorKind,
         parent: &CompInfo,
         result: &mut CodegenResult,
         struct_layout: &mut StructLayoutTracker,
         fields: &mut F,
         methods: &mut M,
         extra: Self::Extra,
     ) where
-        F: Extend<quote::Tokens>,
-        M: Extend<quote::Tokens>;
+        F: Extend<proc_macro2::TokenStream>,
+        M: Extend<proc_macro2::TokenStream>;
 }
 
 impl<'a> FieldCodegen<'a> for Field {
     type Extra = ();
 
     fn codegen<F, M>(
         &self,
         ctx: &BindgenContext,
@@ -977,18 +976,18 @@ impl<'a> FieldCodegen<'a> for Field {
         accessor_kind: FieldAccessorKind,
         parent: &CompInfo,
         result: &mut CodegenResult,
         struct_layout: &mut StructLayoutTracker,
         fields: &mut F,
         methods: &mut M,
         _: (),
     ) where
-        F: Extend<quote::Tokens>,
-        M: Extend<quote::Tokens>,
+        F: Extend<proc_macro2::TokenStream>,
+        M: Extend<proc_macro2::TokenStream>,
     {
         match *self {
             Field::DataMember(ref data) => {
                 data.codegen(
                     ctx,
                     fields_should_be_private,
                     codegen_depth,
                     accessor_kind,
@@ -1029,26 +1028,27 @@ impl<'a> FieldCodegen<'a> for FieldData 
         accessor_kind: FieldAccessorKind,
         parent: &CompInfo,
         result: &mut CodegenResult,
         struct_layout: &mut StructLayoutTracker,
         fields: &mut F,
         methods: &mut M,
         _: (),
     ) where
-        F: Extend<quote::Tokens>,
-        M: Extend<quote::Tokens>,
+        F: Extend<proc_macro2::TokenStream>,
+        M: Extend<proc_macro2::TokenStream>,
     {
         // Bitfields are handled by `FieldCodegen` implementations for
         // `BitfieldUnit` and `Bitfield`.
         assert!(self.bitfield_width().is_none());
 
         let field_item = self.ty().into_resolver().through_type_refs().resolve(ctx);
         let field_ty = field_item.expect_type();
         let mut ty = self.ty().to_rust_ty_or_opaque(ctx, &());
+        ty.append_implicit_template_params(ctx, field_item);
 
         // NB: If supported, we use proper `union` types.
         let ty = if parent.is_union() && !parent.can_be_rust_union(ctx) {
             if ctx.options().enable_cxx_namespaces {
                 quote! {
                     root::__BindgenUnionField<#ty>
                 }
             } else {
@@ -1066,17 +1066,16 @@ impl<'a> FieldCodegen<'a> for FieldData 
                     root::__IncompleteArrayField<#inner>
                 }
             } else {
                 quote! {
                     __IncompleteArrayField<#inner>
                 }
             }
         } else {
-            ty.append_implicit_template_params(ctx, field_item);
             ty
         };
 
         let mut field = quote! {};
         if ctx.options().generate_comments {
             if let Some(raw_comment) = self.comment() {
                 let comment =
                     comment::preprocess(raw_comment, codegen_depth + 1);
@@ -1164,18 +1163,18 @@ impl<'a> FieldCodegen<'a> for FieldData 
                 }
             }
         }));
     }
 }
 
 impl BitfieldUnit {
     /// Get the constructor name for this bitfield unit.
-    fn ctor_name(&self) -> quote::Tokens {
-        let ctor_name = Term::new(&format!("new_bitfield_{}", self.nth()), Span::call_site());
+    fn ctor_name(&self) -> proc_macro2::TokenStream {
+        let ctor_name = Ident::new(&format!("new_bitfield_{}", self.nth()), Span::call_site());
         quote! {
             #ctor_name
         }
     }
 }
 
 impl Bitfield {
     /// Extend an under construction bitfield unit constructor with this
@@ -1183,19 +1182,19 @@ impl Bitfield {
     ///
     /// 1. Adding a parameter with this bitfield's name and its type.
     ///
     /// 2. Setting the relevant bits on the `__bindgen_bitfield_unit` variable
     ///    that's being constructed.
     fn extend_ctor_impl(
         &self,
         ctx: &BindgenContext,
-        param_name: quote::Tokens,
-        mut ctor_impl: quote::Tokens,
-    ) -> quote::Tokens {
+        param_name: proc_macro2::TokenStream,
+        mut ctor_impl: proc_macro2::TokenStream,
+    ) -> proc_macro2::TokenStream {
         let bitfield_ty = ctx.resolve_type(self.ty());
         let bitfield_ty_layout = bitfield_ty.layout(ctx).expect(
             "Bitfield without layout? Gah!",
         );
         let bitfield_int_ty = helpers::blob(ctx, bitfield_ty_layout);
 
         let offset = self.offset_into_unit();
         let width = self.width() as u8;
@@ -1229,18 +1228,18 @@ impl<'a> FieldCodegen<'a> for BitfieldUn
         accessor_kind: FieldAccessorKind,
         parent: &CompInfo,
         result: &mut CodegenResult,
         struct_layout: &mut StructLayoutTracker,
         fields: &mut F,
         methods: &mut M,
         _: (),
     ) where
-        F: Extend<quote::Tokens>,
-        M: Extend<quote::Tokens>,
+        F: Extend<proc_macro2::TokenStream>,
+        M: Extend<proc_macro2::TokenStream>,
     {
         result.saw_bitfield_unit();
 
         let field_ty = {
             let ty = helpers::bitfield_unit(ctx, self.layout());
             if parent.is_union() && !parent.can_be_rust_union(ctx) {
                 if ctx.options().enable_cxx_namespaces {
                     quote! {
@@ -1327,26 +1326,26 @@ impl<'a> FieldCodegen<'a> for BitfieldUn
 
         struct_layout.saw_bitfield_unit(self.layout());
     }
 }
 
 fn bitfield_getter_name(
     ctx: &BindgenContext,
     bitfield: &Bitfield,
-) -> quote::Tokens {
+) -> proc_macro2::TokenStream {
     let name = bitfield.getter_name();
     let name = ctx.rust_ident_raw(name);
     quote! { #name }
 }
 
 fn bitfield_setter_name(
     ctx: &BindgenContext,
     bitfield: &Bitfield,
-) -> quote::Tokens {
+) -> proc_macro2::TokenStream {
     let setter = bitfield.setter_name();
     let setter = ctx.rust_ident_raw(setter);
     quote! { #setter }
 }
 
 impl<'a> FieldCodegen<'a> for Bitfield {
     type Extra = (&'a str, &'a mut bool);
 
@@ -1358,23 +1357,23 @@ impl<'a> FieldCodegen<'a> for Bitfield {
         _accessor_kind: FieldAccessorKind,
         parent: &CompInfo,
         _result: &mut CodegenResult,
         _struct_layout: &mut StructLayoutTracker,
         _fields: &mut F,
         methods: &mut M,
         (unit_field_name, bitfield_representable_as_int): (&'a str, &mut bool),
     ) where
-        F: Extend<quote::Tokens>,
-        M: Extend<quote::Tokens>,
+        F: Extend<proc_macro2::TokenStream>,
+        M: Extend<proc_macro2::TokenStream>,
     {
         let prefix = ctx.trait_prefix();
         let getter_name = bitfield_getter_name(ctx, self);
         let setter_name = bitfield_setter_name(ctx, self);
-        let unit_field_ident = Term::new(unit_field_name, Span::call_site());
+        let unit_field_ident = Ident::new(unit_field_name, Span::call_site());
 
         let bitfield_ty_item = ctx.resolve_item(self.ty());
         let bitfield_ty = bitfield_ty_item.expect_type();
 
         let bitfield_ty_layout = bitfield_ty.layout(ctx).expect(
             "Bitfield without layout? Gah!",
         );
         let bitfield_int_ty = match helpers::integer_type(ctx, bitfield_ty_layout) {
@@ -1758,16 +1757,18 @@ impl CodeGenerator for CompInfo {
                 ctx.options().impl_partialeq &&
                 ctx.lookup_can_derive_partialeq_or_partialord(item.id()) == CanDerive::ArrayTooLarge;
         }
 
         if item.can_derive_eq(ctx) {
             derives.push("Eq");
         }
 
+        derives.extend(item.annotations().derives().iter().map(String::as_str));
+
         if !derives.is_empty() {
             attributes.push(attributes::derives(&derives))
         }
 
         let mut tokens = if is_union && self.can_be_rust_union(ctx) {
             quote! {
                 #( #attributes )*
                 pub union #canonical_ident
@@ -1797,31 +1798,31 @@ impl CodeGenerator for CompInfo {
         }
 
         // NOTE: Some unexposed attributes (like alignment attributes) may
         // affect layout, so we're bad and pray to the gods for avoid sending
         // all the tests to shit when parsing things like max_align_t.
         if self.found_unknown_attr() {
             warn!(
                 "Type {} has an unknown attribute that may affect layout",
-                canonical_ident.as_str()
+                canonical_ident
             );
         }
 
         if all_template_params.is_empty() {
             if !is_opaque {
                 for var in self.inner_vars() {
                     ctx.resolve_item(*var).codegen(ctx, result, &());
                 }
             }
 
             if ctx.options().layout_tests && !self.is_forward_declaration() {
                 if let Some(layout) = layout {
                     let fn_name =
-                        format!("bindgen_test_layout_{}", canonical_ident.as_str());
+                        format!("bindgen_test_layout_{}", canonical_ident);
                     let fn_name = ctx.rust_ident_raw(fn_name);
                     let prefix = ctx.trait_prefix();
                     let size_of_expr = quote! {
                         ::#prefix::mem::size_of::<#canonical_ident>()
                     };
                     let align_of_expr = quote! {
                         ::#prefix::mem::align_of::<#canonical_ident>()
                     };
@@ -1873,17 +1874,17 @@ impl CodeGenerator for CompInfo {
                                                     &(*(::#prefix::ptr::null::<#canonical_ident>())).#field_name as *const _ as usize
                                                 },
                                                 #field_offset,
                                                 concat!("Offset of field: ", stringify!(#canonical_ident), "::", stringify!(#field_name))
                                             );
                                         })
                                     })
                                 })
-                                .collect::<Vec<quote::Tokens>>();
+                                .collect::<Vec<proc_macro2::TokenStream>>();
 
                             asserts
                         };
 
                     let item = quote! {
                         #[test]
                         fn #fn_name() {
                             assert_eq!(#size_of_expr,
@@ -2013,28 +2014,28 @@ impl CodeGenerator for CompInfo {
         }
     }
 }
 
 trait MethodCodegen {
     fn codegen_method<'a>(
         &self,
         ctx: &BindgenContext,
-        methods: &mut Vec<quote::Tokens>,
+        methods: &mut Vec<proc_macro2::TokenStream>,
         method_names: &mut HashMap<String, usize>,
         result: &mut CodegenResult<'a>,
         parent: &CompInfo,
     );
 }
 
 impl MethodCodegen for Method {
     fn codegen_method<'a>(
         &self,
         ctx: &BindgenContext,
-        methods: &mut Vec<quote::Tokens>,
+        methods: &mut Vec<proc_macro2::TokenStream>,
         method_names: &mut HashMap<String, usize>,
         result: &mut CodegenResult<'a>,
         _parent: &CompInfo,
     ) {
         assert!({
             let cc = &ctx.options().codegen_config;
             match self.kind() {
                 MethodKind::Constructor => cc.constructors(),
@@ -2148,19 +2149,23 @@ impl MethodCodegen for Method {
 
         let block = quote! {
             #( #stmts );*
         };
 
         let mut attrs = vec![];
         attrs.push(attributes::inline());
 
+        if signature.must_use() && ctx.options().rust_features().must_use_function {
+            attrs.push(attributes::must_use());
+        }
+
         let name = ctx.rust_ident(&name);
         methods.push(quote! {
-            #[inline]
+            #(#attrs)*
             pub unsafe fn #name ( #( #args ),* ) #ret {
                 #block
             }
         });
     }
 }
 
 /// A helper type that represents different enum variations.
@@ -2225,34 +2230,34 @@ impl std::str::FromStr for EnumVariation
     }
 }
 
 
 /// A helper type to construct different enum variations.
 enum EnumBuilder<'a> {
     Rust {
         codegen_depth: usize,
-        attrs: Vec<quote::Tokens>,
-        ident: Term,
-        tokens: quote::Tokens,
+        attrs: Vec<proc_macro2::TokenStream>,
+        ident: Ident,
+        tokens: proc_macro2::TokenStream,
         emitted_any_variants: bool,
     },
     Bitfield {
         codegen_depth: usize,
         canonical_name: &'a str,
-        tokens: quote::Tokens,
+        tokens: proc_macro2::TokenStream,
     },
     Consts {
-        variants: Vec<quote::Tokens>,
+        variants: Vec<proc_macro2::TokenStream>,
         codegen_depth: usize,
     },
     ModuleConsts {
         codegen_depth: usize,
         module_name: &'a str,
-        module_items: Vec<quote::Tokens>,
+        module_items: Vec<proc_macro2::TokenStream>,
     },
 }
 
 impl<'a> EnumBuilder<'a> {
     /// Returns the depth of the code generation for a variant of this enum.
     fn codegen_depth(&self) -> usize {
         match *self {
             EnumBuilder::Rust { codegen_depth, .. } |
@@ -2261,22 +2266,22 @@ impl<'a> EnumBuilder<'a> {
             EnumBuilder::Consts { codegen_depth, .. } => codegen_depth,
         }
     }
 
     /// Create a new enum given an item builder, a canonical name, a name for
     /// the representation, and which variation it should be generated as.
     fn new(
         name: &'a str,
-        attrs: Vec<quote::Tokens>,
-        repr: quote::Tokens,
+        attrs: Vec<proc_macro2::TokenStream>,
+        repr: proc_macro2::TokenStream,
         enum_variation: EnumVariation,
         enum_codegen_depth: usize,
     ) -> Self {
-        let ident = Term::new(name, Span::call_site());
+        let ident = Ident::new(name, Span::call_site());
 
         match enum_variation {
             EnumVariation::Bitfield => {
                 EnumBuilder::Bitfield {
                     codegen_depth: enum_codegen_depth,
                     canonical_name: name,
                     tokens: quote! {
                         #( #attrs )*
@@ -2304,17 +2309,17 @@ impl<'a> EnumBuilder<'a> {
                             pub type #ident = #repr;
                         }
                     ],
                     codegen_depth: enum_codegen_depth,
                 }
             }
 
             EnumVariation::ModuleConsts => {
-                let ident = Term::new(CONSTIFIED_ENUM_MODULE_REPR_NAME, Span::call_site());
+                let ident = Ident::new(CONSTIFIED_ENUM_MODULE_REPR_NAME, Span::call_site());
                 let type_definition = quote! {
                     #( #attrs )*
                     pub type #ident = #repr;
                 };
 
                 EnumBuilder::ModuleConsts {
                     codegen_depth: enum_codegen_depth + 1,
                     module_name: name,
@@ -2325,17 +2330,17 @@ impl<'a> EnumBuilder<'a> {
     }
 
     /// Add a variant to this enum.
     fn with_variant<'b>(
         self,
         ctx: &BindgenContext,
         variant: &EnumVariant,
         mangling_prefix: Option<&str>,
-        rust_ty: quote::Tokens,
+        rust_ty: proc_macro2::TokenStream,
         result: &mut CodegenResult<'b>,
         is_ty_named: bool,
     ) -> Self {
         let variant_name = ctx.rust_mangle(variant.name());
         let expr = match variant.val() {
             EnumVariantValue::Signed(v) => helpers::ast_ty::int_expr(v),
             EnumVariantValue::Unsigned(v) => helpers::ast_ty::uint_expr(v),
         };
@@ -2427,19 +2432,19 @@ impl<'a> EnumBuilder<'a> {
                 }
             }
         }
     }
 
     fn build<'b>(
         self,
         ctx: &BindgenContext,
-        rust_ty: quote::Tokens,
+        rust_ty: proc_macro2::TokenStream,
         result: &mut CodegenResult<'b>,
-    ) -> quote::Tokens {
+    ) -> proc_macro2::TokenStream {
         match self {
             EnumBuilder::Rust { attrs, ident, tokens, emitted_any_variants, .. } => {
                 let variants = if !emitted_any_variants {
                     quote!(__bindgen_cannot_repr_c_on_empty_enum = 0)
                 } else {
                     tokens
                 };
 
@@ -2600,33 +2605,33 @@ impl CodeGenerator for Enum {
 
             attrs.push(attributes::derives(&derives));
         }
 
         fn add_constant<'a>(
             ctx: &BindgenContext,
             enum_: &Type,
             // Only to avoid recomputing every time.
-            enum_canonical_name: &Term,
+            enum_canonical_name: &Ident,
             // May be the same as "variant" if it's because the
             // enum is unnamed and we still haven't seen the
             // value.
-            variant_name: &str,
-            referenced_name: &Term,
-            enum_rust_ty: quote::Tokens,
+            variant_name: &Ident,
+            referenced_name: &Ident,
+            enum_rust_ty: proc_macro2::TokenStream,
             result: &mut CodegenResult<'a>,
         ) {
             let constant_name = if enum_.name().is_some() {
                 if ctx.options().prepend_enum_name {
-                    format!("{}_{}", enum_canonical_name.as_str(), variant_name)
+                    format!("{}_{}", enum_canonical_name, variant_name)
                 } else {
-                    variant_name.into()
+                    format!("{}", variant_name)
                 }
             } else {
-                variant_name.into()
+                format!("{}", variant_name)
             };
             let constant_name = ctx.rust_ident(constant_name);
 
             result.push(quote! {
                 pub const #constant_name : #enum_rust_ty =
                     #enum_canonical_name :: #referenced_name ;
             });
         }
@@ -2640,17 +2645,17 @@ impl CodeGenerator for Enum {
             &name,
             attrs,
             repr,
             variation,
             item.codegen_depth(ctx),
         );
 
         // A map where we keep a value -> variant relation.
-        let mut seen_values = HashMap::<_, Term>::new();
+        let mut seen_values = HashMap::<_, Ident>::new();
         let enum_rust_ty = item.to_rust_ty_or_opaque(ctx, &());
         let is_toplevel = item.is_toplevel(ctx);
 
         // Used to mangle the constants we generate in the unnamed-enum case.
         let parent_canonical_name = if is_toplevel {
             None
         } else {
             Some(item.parent_id().canonical_name(ctx))
@@ -2712,17 +2717,17 @@ impl CodeGenerator for Enum {
                                         #enum_canonical_name :: #existing_variant_name ;
                                 }
                             });
                         } else {
                             add_constant(
                                 ctx,
                                 enum_ty,
                                 &ident,
-                                &*mangled_name,
+                                &Ident::new(&*mangled_name, Span::call_site()),
                                 existing_variant_name,
                                 enum_rust_ty.clone(),
                                 result,
                             );
                         }
                     } else {
                         builder = builder.with_variant(
                             ctx,
@@ -2753,31 +2758,31 @@ impl CodeGenerator for Enum {
                         variant.force_constification()
                     {
                         let mangled_name = if is_toplevel {
                             variant_name.clone()
                         } else {
                             let parent_name =
                                 parent_canonical_name.as_ref().unwrap();
 
-                            Term::new(
+                            Ident::new(
                                 &format!(
                                     "{}_{}",
                                     parent_name,
-                                    variant_name.as_str()
+                                    variant_name
                                 ),
                                 Span::call_site()
                             )
                         };
 
                         add_constant(
                             ctx,
                             enum_ty,
                             &ident,
-                            mangled_name.as_str(),
+                            &mangled_name,
                             &variant_name,
                             enum_rust_ty.clone(),
                             result,
                         );
                     }
 
                     entry.insert(variant_name);
                 }
@@ -2804,17 +2809,17 @@ trait TryToOpaque {
         extra: &Self::Extra,
     ) -> error::Result<Layout>;
 
     /// Do not override this provided trait method.
     fn try_to_opaque(
         &self,
         ctx: &BindgenContext,
         extra: &Self::Extra,
-    ) -> error::Result<quote::Tokens> {
+    ) -> error::Result<proc_macro2::TokenStream> {
         self.try_get_layout(ctx, extra).map(|layout| {
             helpers::blob(ctx, layout)
         })
     }
 }
 
 /// Infallible conversion of an IR thing to an opaque blob.
 ///
@@ -2831,17 +2836,17 @@ trait ToOpaque: TryToOpaque {
         self.try_get_layout(ctx, extra)
             .unwrap_or_else(|_| Layout::for_size(ctx, 1))
     }
 
     fn to_opaque(
         &self,
         ctx: &BindgenContext,
         extra: &Self::Extra,
-    ) -> quote::Tokens {
+    ) -> proc_macro2::TokenStream {
         let layout = self.get_layout(ctx, extra);
         helpers::blob(ctx, layout)
     }
 }
 
 impl<T> ToOpaque for T
 where
     T: TryToOpaque,
@@ -2857,46 +2862,46 @@ where
 /// alignment. That is the responsibility of the `TryToOpaque` trait.
 trait TryToRustTy {
     type Extra;
 
     fn try_to_rust_ty(
         &self,
         ctx: &BindgenContext,
         extra: &Self::Extra,
-    ) -> error::Result<quote::Tokens>;
+    ) -> error::Result<proc_macro2::TokenStream>;
 }
 
 /// Fallible conversion to a Rust type or an opaque blob with the correct size
 /// and alignment.
 ///
 /// Don't implement this directly. Instead implement `TryToRustTy` and
 /// `TryToOpaque`, and then leverage the blanket impl for this trait below.
 trait TryToRustTyOrOpaque: TryToRustTy + TryToOpaque {
     type Extra;
 
     fn try_to_rust_ty_or_opaque(
         &self,
         ctx: &BindgenContext,
         extra: &<Self as TryToRustTyOrOpaque>::Extra,
-    ) -> error::Result<quote::Tokens>;
+    ) -> error::Result<proc_macro2::TokenStream>;
 }
 
 impl<E, T> TryToRustTyOrOpaque for T
 where
     T: TryToRustTy<Extra = E>
         + TryToOpaque<Extra = E>,
 {
     type Extra = E;
 
     fn try_to_rust_ty_or_opaque(
         &self,
         ctx: &BindgenContext,
         extra: &E,
-    ) -> error::Result<quote::Tokens> {
+    ) -> error::Result<proc_macro2::TokenStream> {
         self.try_to_rust_ty(ctx, extra).or_else(
             |_| if let Ok(layout) =
                 self.try_get_layout(ctx, extra)
             {
                 Ok(helpers::blob(ctx, layout))
             } else {
                 Err(error::Error::NoLayoutForOpaqueBlob)
             },
@@ -2923,30 +2928,30 @@ where
 /// type for a C++ construct.
 trait ToRustTyOrOpaque: TryToRustTy + ToOpaque {
     type Extra;
 
     fn to_rust_ty_or_opaque(
         &self,
         ctx: &BindgenContext,
         extra: &<Self as ToRustTyOrOpaque>::Extra,
-    ) -> quote::Tokens;
+    ) -> proc_macro2::TokenStream;
 }
 
 impl<E, T> ToRustTyOrOpaque for T
 where
     T: TryToRustTy<Extra = E> + ToOpaque<Extra = E>,
 {
     type Extra = E;
 
     fn to_rust_ty_or_opaque(
         &self,
         ctx: &BindgenContext,
         extra: &E,
-    ) -> quote::Tokens {
+    ) -> proc_macro2::TokenStream {
         self.try_to_rust_ty(ctx, extra).unwrap_or_else(|_| {
             self.to_opaque(ctx, extra)
         })
     }
 }
 
 impl<T> TryToOpaque for T
 where
@@ -2968,17 +2973,17 @@ where
     T: Copy + Into<ItemId>
 {
     type Extra = ();
 
     fn try_to_rust_ty(
         &self,
         ctx: &BindgenContext,
         _: &(),
-    ) -> error::Result<quote::Tokens> {
+    ) -> error::Result<proc_macro2::TokenStream> {
         ctx.resolve_item((*self).into()).try_to_rust_ty(ctx, &())
     }
 }
 
 impl TryToOpaque for Item {
     type Extra = ();
 
     fn try_get_layout(
@@ -2992,17 +2997,17 @@ impl TryToOpaque for Item {
 
 impl TryToRustTy for Item {
     type Extra = ();
 
     fn try_to_rust_ty(
         &self,
         ctx: &BindgenContext,
         _: &(),
-    ) -> error::Result<quote::Tokens> {
+    ) -> error::Result<proc_macro2::TokenStream> {
         self.kind().expect_type().try_to_rust_ty(ctx, self)
     }
 }
 
 impl TryToOpaque for Type {
     type Extra = Item;
 
     fn try_get_layout(
@@ -3016,17 +3021,17 @@ impl TryToOpaque for Type {
 
 impl TryToRustTy for Type {
     type Extra = Item;
 
     fn try_to_rust_ty(
         &self,
         ctx: &BindgenContext,
         item: &Item,
-    ) -> error::Result<quote::Tokens> {
+    ) -> error::Result<proc_macro2::TokenStream> {
         use self::helpers::ast_ty::*;
 
         match *self.kind() {
             TypeKind::Void => Ok(raw_type(ctx, "c_void")),
             // TODO: we should do something smart with nullptr, or maybe *const
             // c_void is enough?
             TypeKind::NullPtr => {
                 Ok(raw_type(ctx, "c_void").to_ptr(true))
@@ -3118,17 +3123,17 @@ impl TryToRustTy for Type {
             TypeKind::Array(item, len) | TypeKind::Vector(item, len) => {
                 let ty = item.try_to_rust_ty(ctx, &())?;
                 Ok(quote! {
                     [ #ty ; #len ]
                 })
             }
             TypeKind::Enum(..) => {
                 let path = item.namespace_aware_canonical_path(ctx);
-                let path = Term::new(&path.join("::"), Span::call_site());
+                let path = proc_macro2::TokenStream::from_str(&path.join("::")).unwrap();
                 Ok(quote!(#path))
             }
             TypeKind::TemplateInstantiation(ref inst) => {
                 inst.try_to_rust_ty(ctx, item)
             }
             TypeKind::ResolvedTypeRef(inner) => inner.try_to_rust_ty(ctx, &()),
             TypeKind::TemplateAlias(..) |
             TypeKind::Alias(..) |
@@ -3221,29 +3226,29 @@ impl TryToOpaque for TemplateInstantiati
 
 impl TryToRustTy for TemplateInstantiation {
     type Extra = Item;
 
     fn try_to_rust_ty(
         &self,
         ctx: &BindgenContext,
         item: &Item,
-    ) -> error::Result<quote::Tokens> {
+    ) -> error::Result<proc_macro2::TokenStream> {
         if self.is_opaque(ctx, item) {
             return Err(error::Error::InstantiationOfOpaqueType);
         }
 
         let def = self.template_definition()
             .into_resolver()
             .through_type_refs()
             .resolve(ctx);
 
         let mut ty = quote! {};
         let def_path = def.namespace_aware_canonical_path(ctx);
-        ty.append_separated(def_path.into_iter().map(|p| ctx.rust_ident(p)), Term::new("::", Span::call_site()));
+        ty.append_separated(def_path.into_iter().map(|p| ctx.rust_ident(p)), quote!(::));
 
         let def_params = def.self_template_params(ctx);
         if def_params.is_empty() {
             // This can happen if we generated an opaque type for a partial
             // template specialization, and we've hit an instantiation of
             // that partial specialization.
             extra_assert!(
                 def.is_opaque(ctx, &())
@@ -3285,26 +3290,26 @@ impl TryToRustTy for TemplateInstantiati
 
 impl TryToRustTy for FunctionSig {
     type Extra = ();
 
     fn try_to_rust_ty(
         &self,
         ctx: &BindgenContext,
         _: &(),
-    ) -> error::Result<quote::Tokens> {
+    ) -> error::Result<proc_macro2::TokenStream> {
         // TODO: we might want to consider ignoring the reference return value.
         let ret = utils::fnsig_return_ty(ctx, &self);
         let arguments = utils::fnsig_arguments(ctx, &self);
         let abi = self.abi();
 
         match abi {
             Abi::ThisCall if !ctx.options().rust_features().thiscall_abi => {
                 warn!("Skipping function with thiscall ABI that isn't supported by the configured Rust target");
-                Ok(quote::Tokens::new())
+                Ok(proc_macro2::TokenStream::new())
             }
             _ => {
                 Ok(quote! {
                     unsafe extern #abi fn ( #( #arguments ),* ) #ret
                 })
             }
         }
     }
@@ -3368,33 +3373,39 @@ impl CodeGenerator for Function {
             _ => panic!("Signature kind is not a Function: {:?}", signature),
         };
 
         let args = utils::fnsig_arguments(ctx, signature);
         let ret = utils::fnsig_return_ty(ctx, signature);
 
         let mut attributes = vec![];
 
+        if signature.must_use() && ctx.options().rust_features().must_use_function {
+            attributes.push(attributes::must_use());
+        }
+
         if let Some(comment) = item.comment(ctx) {
             attributes.push(attributes::doc(comment));
         }
 
-        if let Some(mangled) = mangled_name {
-            attributes.push(attributes::link_name(mangled));
-        } else if name != canonical_name {
-            attributes.push(attributes::link_name(name));
-        }
-
         // Handle overloaded functions by giving each overload its own unique
         // suffix.
         let times_seen = result.overload_number(&canonical_name);
         if times_seen > 0 {
             write!(&mut canonical_name, "{}", times_seen).unwrap();
         }
 
+        if let Some(mangled) = mangled_name {
+            if canonical_name != mangled {
+                attributes.push(attributes::link_name(mangled));
+            }
+        } else if name != canonical_name {
+            attributes.push(attributes::link_name(name));
+        }
+
         let abi = match signature.abi() {
             Abi::ThisCall if !ctx.options().rust_features().thiscall_abi => {
                 warn!("Skipping function with thiscall ABI that isn't supported by the configured Rust target");
                 return;
             }
             Abi::Win64 if signature.is_variadic() => {
                 warn!("Skipping variadic function with Win64 ABI that isn't supported");
                 return;
@@ -3420,17 +3431,17 @@ impl CodeGenerator for Function {
 }
 
 
 fn objc_method_codegen(
     ctx: &BindgenContext,
     method: &ObjCMethod,
     class_name: Option<&str>,
     prefix: &str,
-) -> (quote::Tokens, quote::Tokens) {
+) -> (proc_macro2::TokenStream, proc_macro2::TokenStream) {
     let signature = method.signature();
     let fn_args = utils::fnsig_arguments(ctx, signature);
     let fn_ret = utils::fnsig_return_ty(ctx, signature);
 
     let sig = if method.is_class_method() {
         let fn_args = fn_args.clone();
         quote! {
             ( #( #fn_args ),* ) #fn_ret
@@ -3534,17 +3545,17 @@ impl CodeGenerator for ObjCInterface {
         };
 
         result.push(trait_block);
         result.push(impl_block);
         result.saw_objc();
     }
 }
 
-pub(crate) fn codegen(context: BindgenContext) -> (Vec<quote::Tokens>, BindgenOptions) {
+pub(crate) fn codegen(context: BindgenContext) -> (Vec<proc_macro2::TokenStream>, BindgenOptions) {
     context.gen(|context| {
         let _t = context.timer("codegen");
         let counter = Cell::new(0);
         let mut result = CodegenResult::new(&counter);
 
         debug!("codegen: {:?}", context.options());
 
         let codegen_items = context.codegen_items();
@@ -3570,32 +3581,32 @@ pub(crate) fn codegen(context: BindgenCo
 }
 
 mod utils {
     use super::{ToRustTyOrOpaque, error};
     use ir::context::BindgenContext;
     use ir::function::FunctionSig;
     use ir::item::{Item, ItemCanonicalPath};
     use ir::ty::TypeKind;
-    use quote;
-    use proc_macro2::{Term, Span};
+    use proc_macro2;
     use std::mem;
-
-    pub fn prepend_bitfield_unit_type(result: &mut Vec<quote::Tokens>) {
-        let bitfield_unit_type = Term::new(include_str!("./bitfield_unit.rs"), Span::call_site());
+    use std::str::FromStr;
+
+    pub fn prepend_bitfield_unit_type(result: &mut Vec<proc_macro2::TokenStream>) {
+        let bitfield_unit_type = proc_macro2::TokenStream::from_str(include_str!("./bitfield_unit.rs")).unwrap();
         let bitfield_unit_type = quote!(#bitfield_unit_type);
 
         let items = vec![bitfield_unit_type];
         let old_items = mem::replace(result, items);
         result.extend(old_items);
     }
 
     pub fn prepend_objc_header(
         ctx: &BindgenContext,
-        result: &mut Vec<quote::Tokens>,
+        result: &mut Vec<proc_macro2::TokenStream>,
     ) {
         let use_objc = if ctx.options().objc_extern_crate {
             quote! {
                 #[macro_use]
                 extern crate objc;
             }
         } else {
             quote! {
@@ -3610,17 +3621,17 @@ mod utils {
 
         let items = vec![use_objc, id_type];
         let old_items = mem::replace(result, items);
         result.extend(old_items.into_iter());
     }
 
     pub fn prepend_block_header(
         ctx: &BindgenContext,
-        result: &mut Vec<quote::Tokens>,
+        result: &mut Vec<proc_macro2::TokenStream>,
     ) {
         let use_block = if ctx.options().block_extern_crate {
             quote! {
                 extern crate block;
             }
         } else {
             quote! {
                 use block;
@@ -3629,17 +3640,17 @@ mod utils {
 
         let items = vec![use_block];
         let old_items = mem::replace(result, items);
         result.extend(old_items.into_iter());
     }
 
     pub fn prepend_union_types(
         ctx: &BindgenContext,
-        result: &mut Vec<quote::Tokens>,
+        result: &mut Vec<proc_macro2::TokenStream>,
     ) {
         let prefix = ctx.trait_prefix();
 
         // TODO(emilio): The fmt::Debug impl could be way nicer with
         // std::intrinsics::type_name, but...
         let union_field_decl = quote! {
             #[repr(C)]
             pub struct __BindgenUnionField<T>(::#prefix::marker::PhantomData<T>);
@@ -3728,17 +3739,17 @@ mod utils {
                          union_field_eq_impl];
 
         let old_items = mem::replace(result, items);
         result.extend(old_items.into_iter());
     }
 
     pub fn prepend_incomplete_array_types(
         ctx: &BindgenContext,
-        result: &mut Vec<quote::Tokens>,
+        result: &mut Vec<proc_macro2::TokenStream>,
     ) {
         let prefix = ctx.trait_prefix();
 
         let incomplete_array_decl = quote! {
             #[repr(C)]
             #[derive(Default)]
             pub struct __IncompleteArrayField<T>(
                 ::#prefix::marker::PhantomData<T>);
@@ -3801,17 +3812,17 @@ mod utils {
                          incomplete_array_clone_impl,
                          incomplete_array_copy_impl];
 
         let old_items = mem::replace(result, items);
         result.extend(old_items.into_iter());
     }
 
     pub fn prepend_complex_type(
-        result: &mut Vec<quote::Tokens>,
+        result: &mut Vec<proc_macro2::TokenStream>,
     ) {
         let complex_type = quote! {
             #[derive(PartialEq, Copy, Clone, Hash, Debug, Default)]
             #[repr(C)]
             pub struct __BindgenComplex<T> {
                 pub re: T,
                 pub im: T
             }
@@ -3820,38 +3831,34 @@ mod utils {
         let items = vec![complex_type];
         let old_items = mem::replace(result, items);
         result.extend(old_items.into_iter());
     }
 
     pub fn build_path(
         item: &Item,
         ctx: &BindgenContext,
-    ) -> error::Result<quote::Tokens> {
-        use proc_macro2::{Term, Span};
-
+    ) -> error::Result<proc_macro2::TokenStream> {
         let path = item.namespace_aware_canonical_path(ctx);
-        let path = Term::new(&path.join("::"), Span::call_site());
-        let tokens = quote! {#path};
-        //tokens.append_separated(path, "::");
+        let tokens = proc_macro2::TokenStream::from_str(&path.join("::")).unwrap();
 
         Ok(tokens)
     }
 
-    fn primitive_ty(ctx: &BindgenContext, name: &str) -> quote::Tokens {
+    fn primitive_ty(ctx: &BindgenContext, name: &str) -> proc_macro2::TokenStream {
         let ident = ctx.rust_ident_raw(name);
         quote! {
             #ident
         }
     }
 
     pub fn type_from_named(
         ctx: &BindgenContext,
         name: &str,
-    ) -> Option<quote::Tokens> {
+    ) -> Option<proc_macro2::TokenStream> {
         // FIXME: We could use the inner item to check this is really a
         // primitive type but, who the heck overrides these anyway?
         Some(match name {
             "int8_t" => primitive_ty(ctx, "i8"),
             "uint8_t" => primitive_ty(ctx, "u8"),
             "int16_t" => primitive_ty(ctx, "i16"),
             "uint16_t" => primitive_ty(ctx, "u16"),
             "int32_t" => primitive_ty(ctx, "i32"),
@@ -3864,32 +3871,32 @@ mod utils {
             "intptr_t" | "ptrdiff_t" | "ssize_t" => primitive_ty(ctx, "isize"),
             _ => return None,
         })
     }
 
     pub fn fnsig_return_ty(
         ctx: &BindgenContext,
         sig: &FunctionSig,
-    ) -> quote::Tokens {
+    ) -> proc_macro2::TokenStream {
         let return_item = ctx.resolve_item(sig.return_type());
         if let TypeKind::Void = *return_item.kind().expect_type().kind() {
             quote! { }
         } else {
             let ret_ty = return_item.to_rust_ty_or_opaque(ctx, &());
             quote! {
                 -> #ret_ty
             }
         }
     }
 
     pub fn fnsig_arguments(
         ctx: &BindgenContext,
         sig: &FunctionSig,
-    ) -> Vec<quote::Tokens> {
+    ) -> Vec<proc_macro2::TokenStream> {
         use super::ToPtr;
 
         let mut unnamed_arguments = 0;
         let mut args = sig.argument_types().iter().map(|&(ref name, ty)| {
             let arg_item = ctx.resolve_item(ty);
             let arg_ty = arg_item.kind().expect_type();
 
             // From the C90 standard[1]:
@@ -3942,17 +3949,17 @@ mod utils {
         }
 
         args
     }
 
     pub fn fnsig_block(
         ctx: &BindgenContext,
         sig: &FunctionSig,
-    ) -> quote::Tokens {
+    ) -> proc_macro2::TokenStream {
         let args = sig.argument_types().iter().map(|&(_, ty)| {
             let arg_item = ctx.resolve_item(ty);
 
             arg_item.to_rust_ty_or_opaque(ctx, &())
         });
 
         let return_item = ctx.resolve_item(sig.return_type());
         let ret_ty = if let TypeKind::Void = *return_item.kind().expect_type().kind() {
--- a/third_party/rust/bindgen/src/codegen/struct_layout.rs
+++ b/third_party/rust/bindgen/src/codegen/struct_layout.rs
@@ -1,18 +1,17 @@
 //! Helpers for code generation that need struct layout
 
 use super::helpers;
 
 use ir::comp::CompInfo;
 use ir::context::BindgenContext;
 use ir::layout::Layout;
 use ir::ty::{Type, TypeKind};
-use quote;
-use proc_macro2::{Term, Span};
+use proc_macro2::{self, Ident, Span};
 use std::cmp;
 
 /// Trace the layout of struct.
 #[derive(Debug)]
 pub struct StructLayoutTracker<'a> {
     name: &'a str,
     ctx: &'a BindgenContext,
     comp: &'a CompInfo,
@@ -149,17 +148,17 @@ impl<'a> StructLayoutTracker<'a> {
 
     /// Add a padding field if necessary for a given new field _before_ adding
     /// that field.
     pub fn pad_field(
         &mut self,
         field_name: &str,
         field_ty: &Type,
         field_offset: Option<usize>,
-    ) -> Option<quote::Tokens> {
+    ) -> Option<proc_macro2::TokenStream> {
         let mut field_layout = field_ty.layout(self.ctx)?;
 
         if let TypeKind::Array(inner, len) =
             *field_ty.canonical_type(self.ctx).kind()
         {
             // FIXME(emilio): As an _ultra_ hack, we correct the layout returned
             // by arrays of structs that have a bigger alignment than what we
             // can support.
@@ -231,17 +230,17 @@ impl<'a> StructLayoutTracker<'a> {
             field_name,
             self.latest_offset - field_layout.size,
             self.latest_offset
         );
 
         padding_layout.map(|layout| self.padding_field(layout))
     }
 
-    pub fn pad_struct(&mut self, layout: Layout) -> Option<quote::Tokens> {
+    pub fn pad_struct(&mut self, layout: Layout) -> Option<proc_macro2::TokenStream> {
         debug!(
             "pad_struct:\n\tself = {:#?}\n\tlayout = {:#?}",
             self,
             layout
         );
 
         if layout.size < self.latest_offset {
             error!(
@@ -305,23 +304,23 @@ impl<'a> StructLayoutTracker<'a> {
         // repr(align).
         repr_align || layout.align <= self.ctx.target_pointer_size()
     }
 
     fn padding_bytes(&self, layout: Layout) -> usize {
         align_to(self.latest_offset, layout.align) - self.latest_offset
     }
 
-    fn padding_field(&mut self, layout: Layout) -> quote::Tokens {
+    fn padding_field(&mut self, layout: Layout) -> proc_macro2::TokenStream {
         let ty = helpers::blob(self.ctx, layout);
         let padding_count = self.padding_count;
 
         self.padding_count += 1;
 
-        let padding_field_name = Term::new(&format!("__bindgen_padding_{}", padding_count), Span::call_site());
+        let padding_field_name = Ident::new(&format!("__bindgen_padding_{}", padding_count), Span::call_site());
 
         self.max_field_align = cmp::max(self.max_field_align, layout.align);
 
         quote! {
             pub #padding_field_name : #ty ,
         }
     }
 
--- a/third_party/rust/bindgen/src/features.rs
+++ b/third_party/rust/bindgen/src/features.rs
@@ -93,16 +93,18 @@ macro_rules! rust_target_base {
             /// Rust stable 1.20
             => Stable_1_20 => 1.20;
             /// Rust stable 1.21
             => Stable_1_21 => 1.21;
             /// Rust stable 1.25
             => Stable_1_25 => 1.25;
             /// Rust stable 1.26
             => Stable_1_26 => 1.26;
+            /// Rust stable 1.27
+            => Stable_1_27 => 1.27;
             /// Nightly rust
             => Nightly => nightly;
         );
     }
 }
 
 rust_target_base!(rust_target_def);
 rust_target_base!(rust_target_values_def);
@@ -173,16 +175,20 @@ rust_feature_def!(
     Stable_1_25 {
         /// repr(align) ([PR](https://github.com/rust-lang/rust/pull/47006))
         => repr_align;
     }
     Stable_1_26 {
         /// [i128 / u128 support](https://doc.rust-lang.org/std/primitive.i128.html)
         => i128_and_u128;
     }
+    Stable_1_27 {
+        /// `must_use` attribute on functions ([PR](https://github.com/rust-lang/rust/pull/48925))
+        => must_use_function;
+    }
     Nightly {
         /// `thiscall` calling convention ([Tracking issue](https://github.com/rust-lang/rust/issues/42202))
         => thiscall_abi;
     }
 );
 
 impl Default for RustFeatures {
     fn default() -> Self {
--- a/third_party/rust/bindgen/src/ir/annotations.rs
+++ b/third_party/rust/bindgen/src/ir/annotations.rs
@@ -53,16 +53,18 @@ pub struct Annotations {
     ///     Bar = 0, /**< <div rustbindgen constant></div> */
     ///     Baz = 0,
     /// };
     /// ```
     ///
     /// In that case, bindgen will generate a constant for `Bar` instead of
     /// `Baz`.
     constify_enum_variant: bool,
+    /// List of explicit derives for this type.
+    derives: Vec<String>,
 }
 
 fn parse_accessor(s: &str) -> FieldAccessorKind {
     match s {
         "false" => FieldAccessorKind::None,
         "unsafe" => FieldAccessorKind::Unsafe,
         "immutable" => FieldAccessorKind::Immutable,
         _ => FieldAccessorKind::Regular,
@@ -74,16 +76,17 @@ impl Default for Annotations {
         Annotations {
             opaque: false,
             hide: false,
             use_instead_of: None,
             disallow_copy: false,
             private_fields: None,
             accessor_kind: None,
             constify_enum_variant: false,
+            derives: vec![],
         }
     }
 }
 
 impl Annotations {
     /// Construct new annotations for the given cursor and its bindgen comments
     /// (if any).
     pub fn new(cursor: &clang::Cursor) -> Option<Annotations> {
@@ -125,16 +128,21 @@ impl Annotations {
     /// };
     /// ```
     ///
     /// That is, code for `Foo` is used to generate `Bar`.
     pub fn use_instead_of(&self) -> Option<&[String]> {
         self.use_instead_of.as_ref().map(|s| &**s)
     }
 
+    /// The list of derives that have been specified in this annotation.
+    pub fn derives(&self) -> &[String] {
+        &self.derives
+    }
+
     /// Should we avoid implementing the `Copy` trait?
     pub fn disallow_copy(&self) -> bool {
         self.disallow_copy
     }
 
     /// Should the fields be private?
     pub fn private_fields(&self) -> Option<bool> {
         self.private_fields
@@ -160,16 +168,19 @@ impl Annotations {
                     "hide" => self.hide = true,
                     "nocopy" => self.disallow_copy = true,
                     "replaces" => {
                         self.use_instead_of =
                             Some(
                                 attr.value.split("::").map(Into::into).collect(),
                             )
                     }
+                    "derive" => {
+                        self.derives.push(attr.value)
+                    }
                     "private" => {
                         self.private_fields = Some(attr.value != "false")
                     }
                     "accessor" => {
                         self.accessor_kind = Some(parse_accessor(&attr.value))
                     }
                     "constant" => self.constify_enum_variant = true,
                     _ => {}
--- a/third_party/rust/bindgen/src/ir/context.rs
+++ b/third_party/rust/bindgen/src/ir/context.rs
@@ -5,31 +5,31 @@ use super::analysis::{CannotDeriveCopy, 
                       HasTypeParameterInArray, HasVtableAnalysis,
                       HasVtableResult, HasDestructorAnalysis,
                       UsedTemplateParameters, HasFloat, SizednessAnalysis,
                       SizednessResult, analyze};
 use super::derive::{CanDeriveCopy, CanDeriveDebug, CanDeriveDefault,
                     CanDeriveHash, CanDerivePartialOrd, CanDeriveOrd,
                     CanDerivePartialEq, CanDeriveEq, CanDerive};
 use super::int::IntKind;
-use super::item::{IsOpaque, Item, ItemAncestors, ItemCanonicalPath, ItemSet};
+use super::item::{IsOpaque, Item, ItemAncestors, ItemSet};
 use super::item_kind::ItemKind;
 use super::module::{Module, ModuleKind};
 use super::template::{TemplateInstantiation, TemplateParameters};
 use super::traversal::{self, Edge, ItemTraversal};
 use super::ty::{FloatKind, Type, TypeKind};
 use super::function::Function;
 use super::super::time::Timer;
 use BindgenOptions;
 use callbacks::ParseCallbacks;
 use cexpr;
 use clang::{self, Cursor};
 use clang_sys;
 use parse::ClangItemParser;
-use proc_macro2::{Term, Span};
+use proc_macro2::{Ident, Span};
 use std::borrow::Cow;
 use std::cell::Cell;
 use std::collections::{HashMap, HashSet, hash_map};
 use std::collections::btree_map::{self, BTreeMap};
 use std::iter::IntoIterator;
 use std::mem;
 
 /// An identifier for some kind of IR item.
@@ -917,29 +917,29 @@ If you encounter an error missing from t
             s = s.replace("$", "_");
             s.push_str("_");
             return Cow::Owned(s);
         }
         Cow::Borrowed(name)
     }
 
     /// Returns a mangled name as a rust identifier.
-    pub fn rust_ident<S>(&self, name: S) -> Term
+    pub fn rust_ident<S>(&self, name: S) -> Ident
     where
         S: AsRef<str>
     {
         self.rust_ident_raw(self.rust_mangle(name.as_ref()))
     }
 
     /// Returns a mangled name as a rust identifier.
-    pub fn rust_ident_raw<T>(&self, name: T) -> Term
+    pub fn rust_ident_raw<T>(&self, name: T) -> Ident
     where
         T: AsRef<str>
     {
-        Term::new(name.as_ref(), Span::call_site())
+        Ident::new(name.as_ref(), Span::call_site())
     }
 
     /// Iterate over all items that have been defined.
     pub fn items<'a>(&'a self) -> btree_map::Iter<'a, ItemId, Item> {
         self.items.iter()
     }
 
     /// Have we collected all unresolved type references yet?
@@ -1102,17 +1102,17 @@ If you encounter an error missing from t
             match *ty.kind() {
                 TypeKind::Comp(..) |
                 TypeKind::TemplateAlias(..) |
                 TypeKind::Enum(..) |
                 TypeKind::Alias(..) => {}
                 _ => continue,
             }
 
-            let path = item.canonical_path(self);
+            let path = item.path_for_whitelisting(self);
             let replacement = self.replacements.get(&path[1..]);
 
             if let Some(replacement) = replacement {
                 if replacement != id {
                     // We set this just after parsing the annotation. It's
                     // very unlikely, but this can happen.
                     if self.items.get(replacement).is_some() {
                         replacements.push((id.expect_type_id(self), replacement.expect_type_id(self)));
@@ -2155,26 +2155,31 @@ If you encounter an error missing from t
         &self,
         cursor: &clang::Cursor,
     ) -> (Option<String>, ModuleKind) {
         assert_eq!(
             cursor.kind(),
             ::clang_sys::CXCursor_Namespace,
             "Be a nice person"
         );
+
+        let mut module_name = None;
+        let spelling = cursor.spelling();
+        if !spelling.is_empty()
+        {
+            module_name = Some(spelling)
+        }
+
         let tokens = match cursor.tokens() {
             Some(tokens) => tokens,
-            None => return (None, ModuleKind::Normal),
+            None => return (module_name, ModuleKind::Normal),
         };
-
         let mut iter = tokens.iter();
         let mut kind = ModuleKind::Normal;
         let mut found_namespace_keyword = false;
-        let mut module_name = None;
-
         while let Some(token) = iter.next() {
             match &*token.spelling {
                 "inline" => {
                     assert!(!found_namespace_keyword);
                     assert!(kind != ModuleKind::Inline);
                     kind = ModuleKind::Inline;
                 }
                 // The double colon allows us to handle nested namespaces like
@@ -2190,17 +2195,19 @@ If you encounter an error missing from t
                 "namespace" | "::" => {
                     found_namespace_keyword = true;
                 }
                 "{" => {
                     assert!(found_namespace_keyword);
                     break;
                 }
                 name if found_namespace_keyword => {
-                    module_name = Some(name.to_owned());
+                    if module_name.is_none() {
+                        module_name = Some(name.to_owned());
+                    }
                     break;
                 }
                 _ => {
                     panic!(
                         "Unknown token while processing namespace: {:?}",
                         token
                     );
                 }
@@ -2295,34 +2302,34 @@ If you encounter an error missing from t
                         }
 
                     // If this is a type that explicitly replaces another, we assume
                     // you know what you're doing.
                     if item.annotations().use_instead_of().is_some() {
                         return true;
                     }
 
-                    let name = item.canonical_path(self)[1..].join("::");
+                    let name = item.path_for_whitelisting(self)[1..].join("::");
                     debug!("whitelisted_items: testing {:?}", name);
                     match *item.kind() {
                         ItemKind::Module(..) => true,
                         ItemKind::Function(_) => {
                             self.options().whitelisted_functions.matches(&name)
                         }
                         ItemKind::Var(_) => {
                             self.options().whitelisted_vars.matches(&name)
                         }
                         ItemKind::Type(ref ty) => {
                             if self.options().whitelisted_types.matches(&name) {
                                 return true;
                             }
 
                             let parent = self.resolve_item(item.parent_id());
                             if parent.is_module() {
-                                let mut prefix_path = parent.canonical_path(self);
+                                let mut prefix_path = parent.path_for_whitelisting(self);
 
                                 // Unnamed top-level enums are special and we
                                 // whitelist them via the `whitelisted_vars` filter,
                                 // since they're effectively top-level constants,
                                 // and there's no way for them to be referenced
                                 // consistently.
                                 if let TypeKind::Enum(ref enum_) = *ty.kind() {
                                     if ty.name().is_none() &&
@@ -2381,17 +2388,17 @@ If you encounter an error missing from t
         };
 
         self.whitelisted = Some(whitelisted);
         self.codegen_items = Some(codegen_items);
     }
 
     /// Convenient method for getting the prefix to use for most traits in
     /// codegen depending on the `use_core` option.
-    pub fn trait_prefix(&self) -> Term {
+    pub fn trait_prefix(&self) -> Ident {
         if self.options().use_core {
             self.rust_ident_raw("core")
         } else {
             self.rust_ident_raw("std")
         }
     }
 
     /// Call if a bindgen complex is generated
@@ -2558,29 +2565,29 @@ If you encounter an error missing from t
 
         // Look up the computed value for whether the item with `id` has
         // float or not.
         self.has_float.as_ref().unwrap().contains(&id.into())
     }
 
     /// Check if `--no-partialeq` flag is enabled for this item.
     pub fn no_partialeq_by_name(&self, item: &Item) -> bool {
-        let name = item.canonical_path(self)[1..].join("::");
+        let name = item.path_for_whitelisting(self)[1..].join("::");
         self.options().no_partialeq_types.matches(&name)
     }
 
     /// Check if `--no-copy` flag is enabled for this item.
     pub fn no_copy_by_name(&self, item: &Item) -> bool {
-        let name = item.canonical_path(self)[1..].join("::");
+        let name = item.path_for_whitelisting(self)[1..].join("::");
         self.options().no_copy_types.matches(&name)
     }
 
     /// Check if `--no-hash` flag is enabled for this item.
     pub fn no_hash_by_name(&self, item: &Item) -> bool {
-        let name = item.canonical_path(self)[1..].join("::");
+        let name = item.path_for_whitelisting(self)[1..].join("::");
         self.options().no_hash_types.matches(&name)
     }
 }
 
 /// A builder struct for configuring item resolution options.
 #[derive(Debug, Copy, Clone)]
 pub struct ItemResolver {
     id: ItemId,
--- a/third_party/rust/bindgen/src/ir/function.rs
+++ b/third_party/rust/bindgen/src/ir/function.rs
@@ -7,16 +7,18 @@ use super::item::Item;
 use super::traversal::{EdgeKind, Trace, Tracer};
 use super::ty::TypeKind;
 use clang;
 use clang_sys::{self, CXCallingConv};
 use ir::derive::{CanTriviallyDeriveDebug, CanTriviallyDeriveHash,
                  CanTriviallyDerivePartialEqOrPartialOrd, CanDerive};
 use parse::{ClangItemParser, ClangSubItemParser, ParseError, ParseResult};
 use quote;
+use quote::TokenStreamExt;
+use proc_macro2;
 use std::io;
 
 const RUST_DERIVE_FUNPTR_LIMIT: usize = 12;
 
 /// What kind of a function are we looking at?
 #[derive(Debug, Copy, Clone, PartialEq)]
 pub enum FunctionKind {
     /// A plain, free function.
@@ -187,17 +189,17 @@ impl Abi {
         match *self {
             Abi::Unknown(..) => true,
             _ => false,
         }
     }
 }
 
 impl quote::ToTokens for Abi {
-    fn to_tokens(&self, tokens: &mut quote::Tokens) {
+    fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
         tokens.append_all(match *self {
             Abi::C => quote! { "C" },
             Abi::Stdcall => quote! { "stdcall" },
             Abi::Fastcall => quote! { "fastcall" },
             Abi::ThisCall => quote! { "thiscall" },
             Abi::Aapcs => quote! { "aapcs" },
             Abi::Win64 => quote! { "win64" },
             Abi::Unknown(cc) => panic!(
@@ -216,16 +218,19 @@ pub struct FunctionSig {
 
     /// The type of the arguments, optionally with the name of the argument when
     /// declared.
     argument_types: Vec<(Option<String>, TypeId)>,
 
     /// Whether this function is variadic.
     is_variadic: bool,
 
+    /// Whether this function's return value must be used.
+    must_use: bool,
+
     /// The ABI of this function.
     abi: Abi,
 }
 
 fn get_abi(cc: CXCallingConv) -> Abi {
     use clang_sys::*;
     match cc {
         CXCallingConv_Default => Abi::C,
@@ -303,24 +308,26 @@ pub fn cursor_mangling(
 
     Some(mangling)
 }
 
 impl FunctionSig {
     /// Construct a new function signature.
     pub fn new(
         return_type: TypeId,
-        arguments: Vec<(Option<String>, TypeId)>,
+        argument_types: Vec<(Option<String>, TypeId)>,
         is_variadic: bool,
+        must_use: bool,
         abi: Abi,
     ) -> Self {
         FunctionSig {
-            return_type: return_type,
-            argument_types: arguments,
-            is_variadic: is_variadic,
+            return_type,
+            argument_types,
+            is_variadic,
+            must_use,
             abi: abi,
         }
     }
 
     /// Construct a new function signature from the given Clang type.
     pub fn from_ty(
         ty: &clang::Type,
         cursor: &clang::Cursor,
@@ -382,16 +389,17 @@ impl FunctionSig {
                         args.push((name, ty));
                     }
                     CXChildVisit_Continue
                 });
                 args
             }
         };
 
+        let must_use = cursor.has_simple_attr("warn_unused_result");
         let is_method = cursor.kind() == CXCursor_CXXMethod;
         let is_constructor = cursor.kind() == CXCursor_Constructor;
         let is_destructor = cursor.kind() == CXCursor_Destructor;
         if (is_constructor || is_destructor || is_method) &&
             cursor.lexical_parent() != cursor.semantic_parent()
         {
             // Only parse constructors once.
             return Err(ParseError::Continue);
@@ -453,17 +461,17 @@ impl FunctionSig {
             }
         }
         let abi = get_abi(call_conv);
 
         if abi.is_unknown() {
             warn!("Unknown calling convention: {:?}", call_conv);
         }
 
-        Ok(Self::new(ret.into(), args, ty.is_variadic(), abi))
+        Ok(Self::new(ret.into(), args, ty.is_variadic(), must_use, abi))
     }
 
     /// Get this function signature's return type.
     pub fn return_type(&self) -> TypeId {
         self.return_type
     }
 
     /// Get this function signature's argument (name, type) pairs.
@@ -479,16 +487,21 @@ impl FunctionSig {
     /// Is this function signature variadic?
     pub fn is_variadic(&self) -> bool {
         // Clang reports some functions as variadic when they *might* be
         // variadic. We do the argument check because rust doesn't codegen well
         // variadic functions without an initial argument.
         self.is_variadic && !self.argument_types.is_empty()
     }
 
+    /// Must this function's return value be used?
+    pub fn must_use(&self) -> bool {
+        self.must_use
+    }
+
     /// Are function pointers with this signature able to derive Rust traits?
     /// Rust only supports deriving traits for function pointers with a limited
     /// number of parameters and a couple ABIs.
     ///
     /// For more details, see:
     ///
     /// * https://github.com/rust-lang-nursery/rust-bindgen/issues/547,
     /// * https://github.com/rust-lang/rust/issues/38848,
@@ -557,21 +570,17 @@ impl ClangSubItemParser for Function {
             }
 
             // Add a suffix to avoid colliding with constructors. This would be
             // technically fine (since we handle duplicated functions/methods),
             // but seems easy enough to handle it here.
             name.push_str("_destructor");
         }
 
-        let mut mangled_name = cursor_mangling(context, &cursor);
-        if mangled_name.as_ref() == Some(&name) {
-            mangled_name = None;
-        }
-
+        let mangled_name = cursor_mangling(context, &cursor);
         let comment = cursor.raw_comment();
 
         let function = Self::new(name, mangled_name, sig, comment, kind, linkage);
         Ok(ParseResult::New(function, Some(cursor)))
     }
 }
 
 impl Trace for FunctionSig {
--- a/third_party/rust/bindgen/src/ir/item.rs
+++ b/third_party/rust/bindgen/src/ir/item.rs
@@ -630,17 +630,17 @@ impl Item {
         debug_assert!(
             ctx.in_codegen_phase(),
             "You're not supposed to call this yet"
         );
         if self.annotations.hide() {
             return true;
         }
 
-        let path = self.canonical_path(ctx);
+        let path = self.path_for_whitelisting(ctx);
         let name = path[1..].join("::");
         ctx.options().blacklisted_items.matches(&name) ||
         match self.kind {
             ItemKind::Type(..) => {
                 ctx.options().blacklisted_types.matches(&name) ||
                     ctx.is_replaced_type(&path, self.id)
             }
             ItemKind::Function(..) => {
@@ -870,16 +870,24 @@ impl Item {
         names.reverse();
 
         if !base_name.is_empty() {
             names.push(base_name);
         }
 
         let name = names.join("_");
 
+        let name = if opt.user_mangled == UserMangled::Yes {
+            ctx.parse_callbacks()
+                .and_then(|callbacks| callbacks.item_name(&name))
+                .unwrap_or(name)
+        } else {
+            name
+        };
+
         ctx.rust_mangle(&name).into_owned()
     }
 
     /// The exposed id that represents an unique id among the siblings of a
     /// given item.
     pub fn exposed_id(&self, ctx: &BindgenContext) -> String {
         // Only use local ids for enums, classes, structs and union types.  All
         // other items use their global id.
@@ -962,16 +970,54 @@ impl Item {
                     FunctionKind::Method(MethodKind::VirtualDestructor { ..  }) => cc.destructors(),
                     FunctionKind::Method(MethodKind::Static) |
                     FunctionKind::Method(MethodKind::Normal) |
                     FunctionKind::Method(MethodKind::Virtual { .. }) => cc.methods(),
                 }
             }
         }
     }
+
+    /// Returns the path we should use for whitelisting / blacklisting, which
+    /// doesn't include user-mangling.
+    pub fn path_for_whitelisting(&self, ctx: &BindgenContext) -> Vec<String> {
+        self.compute_path(ctx, UserMangled::No)
+    }
+
+    fn compute_path(&self, ctx: &BindgenContext, mangled: UserMangled) -> Vec<String> {
+        if let Some(path) = self.annotations().use_instead_of() {
+            let mut ret =
+                vec![ctx.resolve_item(ctx.root_module()).name(ctx).get()];
+            ret.extend_from_slice(path);
+            return ret;
+        }
+
+        let target = ctx.resolve_item(self.name_target(ctx));
+        let mut path: Vec<_> = target
+            .ancestors(ctx)
+            .chain(iter::once(ctx.root_module().into()))
+            .map(|id| ctx.resolve_item(id))
+            .filter(|item| {
+                item.id() == target.id() ||
+                    item.as_module().map_or(false, |module| {
+                        !module.is_inline() ||
+                            ctx.options().conservative_inline_namespaces
+                    })
+            })
+            .map(|item| {
+                ctx.resolve_item(item.name_target(ctx))
+                    .name(ctx)
+                    .within_namespaces()
+                    .user_mangled(mangled)
+                    .get()
+            })
+            .collect();
+        path.reverse();
+        path
+    }
 }
 
 impl<T> IsOpaque for T
 where
     T: Copy + Into<ItemId>
 {
     type Extra = ();
 
@@ -989,17 +1035,17 @@ impl IsOpaque for Item {
 
     fn is_opaque(&self, ctx: &BindgenContext, _: &()) -> bool {
         debug_assert!(
             ctx.in_codegen_phase(),
             "You're not supposed to call this yet"
         );
         self.annotations.opaque() ||
             self.as_type().map_or(false, |ty| ty.is_opaque(ctx, self)) ||
-            ctx.opaque_by_name(&self.canonical_path(ctx))
+            ctx.opaque_by_name(&self.path_for_whitelisting(ctx))
     }
 }
 
 impl<T> HasVtable for T
 where
     T: Copy + Into<ItemId>
 {
     fn has_vtable(&self, ctx: &BindgenContext) -> bool {
@@ -1309,17 +1355,18 @@ impl ClangItemParser for Item {
             // We whitelist cursors here known to be unhandled, to prevent being
             // too noisy about this.
             match cursor.kind() {
                 CXCursor_MacroDefinition |
                 CXCursor_MacroExpansion |
                 CXCursor_UsingDeclaration |
                 CXCursor_UsingDirective |
                 CXCursor_StaticAssert |
-                CXCursor_InclusionDirective => {
+                CXCursor_InclusionDirective |
+                CXCursor_FunctionTemplate => {
                     debug!(
                         "Unhandled cursor kind {:?}: {:?}",
                         cursor.kind(),
                         cursor
                     );
                 }
                 _ => {
                     // ignore toplevel operator overloads
@@ -1810,70 +1857,61 @@ impl ItemCanonicalPath for Item {
         if self.is_constified_enum_module(ctx) {
             path.push(CONSTIFIED_ENUM_MODULE_REPR_NAME.into());
         }
 
         return path;
     }
 
     fn canonical_path(&self, ctx: &BindgenContext) -> Vec<String> {
-        if let Some(path) = self.annotations().use_instead_of() {
-            let mut ret =
-                vec![ctx.resolve_item(ctx.root_module()).name(ctx).get()];
-            ret.extend_from_slice(path);
-            return ret;
-        }
+        self.compute_path(ctx, UserMangled::Yes)
+    }
+}
 
-        let target = ctx.resolve_item(self.name_target(ctx));
-        let mut path: Vec<_> = target
-            .ancestors(ctx)
-            .chain(iter::once(ctx.root_module().into()))
-            .map(|id| ctx.resolve_item(id))
-            .filter(|item| {
-                item.id() == target.id() ||
-                    item.as_module().map_or(false, |module| {
-                        !module.is_inline() ||
-                            ctx.options().conservative_inline_namespaces
-                    })
-            })
-            .map(|item| {
-                ctx.resolve_item(item.name_target(ctx))
-                    .name(ctx)
-                    .within_namespaces()
-                    .get()
-            })
-            .collect();
-        path.reverse();
-        path
-    }
+/// Whether to use the user-mangled name (mangled by the `item_name` callback or
+/// not.
+///
+/// Most of the callers probably want just yes, but the ones dealing with
+/// whitelisting and blacklisting don't.
+#[derive(Copy, Clone, Debug, PartialEq)]
+enum UserMangled {
+    No,
+    Yes,
 }
 
 /// Builder struct for naming variations, which hold inside different
 /// flags for naming options.
 #[derive(Debug)]
 pub struct NameOptions<'a> {
     item: &'a Item,
     ctx: &'a BindgenContext,
     within_namespaces: bool,
+    user_mangled: UserMangled,
 }
 
 impl<'a> NameOptions<'a> {
     /// Construct a new `NameOptions`
     pub fn new(item: &'a Item, ctx: &'a BindgenContext) -> Self {
         NameOptions {
             item: item,
             ctx: ctx,
             within_namespaces: false,
+            user_mangled: UserMangled::Yes,
         }
     }
 
     /// Construct the name without the item's containing C++ namespaces mangled
     /// into it. In other words, the item's name within the item's namespace.
     pub fn within_namespaces(&mut self) -> &mut Self {
         self.within_namespaces = true;
         self
     }
 
+    fn user_mangled(&mut self, user_mangled: UserMangled) -> &mut Self {
+        self.user_mangled = user_mangled;
+        self
+    }
+
     /// Construct a name `String`
     pub fn get(&self) -> String {
         self.item.real_canonical_name(self.ctx, self)
     }
 }
--- a/third_party/rust/bindgen/src/ir/objc.rs
+++ b/third_party/rust/bindgen/src/ir/objc.rs
@@ -7,18 +7,17 @@ use super::ty::TypeKind;
 use clang;
 use clang_sys::CXChildVisit_Continue;
 use clang_sys::CXCursor_ObjCCategoryDecl;
 use clang_sys::CXCursor_ObjCClassMethodDecl;
 use clang_sys::CXCursor_ObjCClassRef;
 use clang_sys::CXCursor_ObjCInstanceMethodDecl;
 use clang_sys::CXCursor_ObjCProtocolDecl;
 use clang_sys::CXCursor_ObjCProtocolRef;
-use quote;
-use proc_macro2::{Term, Span};
+use proc_macro2::{TokenStream, Ident, Span};
 
 /// Objective C interface as used in TypeKind
 ///
 /// Also protocols and categories are parsed as this type
 #[derive(Debug)]
 pub struct ObjCInterface {
     /// The name
     /// like, NSObject
@@ -208,21 +207,21 @@ impl ObjCMethod {
     }
 
     /// Is this a class method?
     pub fn is_class_method(&self) -> bool {
         self.is_class_method
     }
 
     /// Formats the method call
-    pub fn format_method_call(&self, args: &[quote::Tokens]) -> quote::Tokens {
+    pub fn format_method_call(&self, args: &[TokenStream]) -> TokenStream {
         let split_name: Vec<_> = self.name
             .split(':')
             .filter(|p| !p.is_empty())
-            .map(|name| Term::new(name, Span::call_site()))
+            .map(|name| Ident::new(name, Span::call_site()))
             .collect();
 
         // No arguments
         if args.len() == 0 && split_name.len() == 1 {
             let name = &split_name[0];
             return quote! {
                 #name
             };
@@ -238,17 +237,17 @@ impl ObjCMethod {
         }
 
         // Get arguments without type signatures to pass to `msg_send!`
         let mut args_without_types = vec![];
         for arg in args.iter() {
             let arg = arg.to_string();
             let name_and_sig: Vec<&str> = arg.split(' ').collect();
             let name = name_and_sig[0];
-            args_without_types.push(Term::new(name, Span::call_site()))
+            args_without_types.push(Ident::new(name, Span::call_site()))
         };
 
         let args = split_name
             .into_iter()
             .zip(args_without_types)
             .map(|(arg, arg_val)| quote! { #arg : #arg_val });
 
         quote! {
--- a/third_party/rust/bindgen/src/ir/ty.rs
+++ b/third_party/rust/bindgen/src/ir/ty.rs
@@ -1179,16 +1179,19 @@ impl Type {
                 CXType_ObjCSel => TypeKind::ObjCSel,
                 CXType_ObjCClass |
                 CXType_ObjCInterface => {
                     let interface = ObjCInterface::from_ty(&location, ctx)
                         .expect("Not a valid objc interface?");
                     name = interface.rust_name();
                     TypeKind::ObjCInterface(interface)
                 }
+                CXType_Dependent => {
+                    return Err(ParseError::Continue);
+                }
                 _ => {
                     error!(
                         "unsupported type: kind = {:?}; ty = {:?}; at {:?}",
                         ty.kind(),
                         ty,
                         location
                     );
                     return Err(ParseError::Continue);
--- a/third_party/rust/bindgen/src/ir/var.rs
+++ b/third_party/rust/bindgen/src/ir/var.rs
@@ -194,16 +194,19 @@ impl ClangSubItemParser for Var {
                         (TypeKind::Int(IntKind::U8), VarType::Char(c))
                     }
                     EvalResult::Str(val) => {
                         let char_ty = Item::builtin_type(
                             TypeKind::Int(IntKind::U8),
                             true,
                             ctx,
                         );
+                        if let Some(callbacks) = ctx.parse_callbacks() {
+                            callbacks.str_macro(&name, &val);
+                        }
                         (TypeKind::Pointer(char_ty), VarType::String(val))
                     }
                     EvalResult::Int(Wrapping(value)) => {
                         let kind = ctx.parse_callbacks()
                             .and_then(|c| c.int_macro(&name, value))
                             .unwrap_or_else(|| default_macro_constant_type(value));
 
                         (TypeKind::Int(kind), VarType::Int(value))
--- a/third_party/rust/bindgen/src/lib.rs
+++ b/third_party/rust/bindgen/src/lib.rs
@@ -426,17 +426,17 @@ impl Builder {
             output_vector.push("--ignore-functions".into());
         }
 
         output_vector.push("--generate".into());
 
         //Temporary placeholder for below 4 options
         let mut options: Vec<String> = Vec::new();
         if self.options.codegen_config.functions() {
-            options.push("function".into());
+            options.push("functions".into());
         }
         if self.options.codegen_config.types() {
             options.push("types".into());
         }
         if self.options.codegen_config.vars() {
             options.push("vars".into());
         }
         if self.options.codegen_config.methods() {
@@ -1670,17 +1670,17 @@ fn ensure_libclang_is_loaded() {
 
     clang_sys::set_library(Some(LIBCLANG.clone()));
 }
 
 /// Generated Rust bindings.
 #[derive(Debug)]
 pub struct Bindings {
     options: BindgenOptions,
-    module: quote::Tokens,
+    module: proc_macro2::TokenStream,
 }
 
 impl Bindings {
     /// Generate bindings for the given options.
     pub(crate) fn generate(
         mut options: BindgenOptions,
     ) -> Result<Bindings, ()> {
         ensure_libclang_is_loaded();
@@ -1858,17 +1858,17 @@ impl Bindings {
             return Ok(Cow::Borrowed(source));
         }
 
         let rustfmt = match self.options.rustfmt_path {
             Some(ref p) => Cow::Borrowed(p),
             None => {
                 let path = which::which("rustfmt")
                     .map_err(|e| {
-                        io::Error::new(io::ErrorKind::Other, e.to_owned())
+                        io::Error::new(io::ErrorKind::Other, format!("{}", e))
                     })?;
 
                 Cow::Owned(path)
             }
         };
 
         let mut cmd = Command::new(&*rustfmt);
 
@@ -2048,17 +2048,17 @@ fn commandline_flag_unit_test_function()
     //Test 1
     let bindings = ::builder();
     let command_line_flags = bindings.command_line_flags();
 
     let test_cases = vec![
         "--rust-target",
         "--no-derive-default",
         "--generate",
-        "function,types,vars,methods,constructors,destructors",
+        "functions,types,vars,methods,constructors,destructors",
     ].iter()
         .map(|&x| x.into())
         .collect::<Vec<String>>();
 
     assert!(test_cases.iter().all(
         |ref x| command_line_flags.contains(x),
     ));
 
@@ -2069,17 +2069,17 @@ fn commandline_flag_unit_test_function()
         .whitelist_function("safe_function");
 
     let command_line_flags = bindings.command_line_flags();
     let test_cases = vec![
         "--rust-target",
         "input_header",
         "--no-derive-default",
         "--generate",
-        "function,types,vars,methods,constructors,destructors",
+        "functions,types,vars,methods,constructors,destructors",
         "--whitelist-type",
         "Distinct_Type",
         "--whitelist-function",
         "safe_function",
     ].iter()
         .map(|&x| x.into())
         .collect::<Vec<String>>();
     println!("{:?}", command_line_flags);
--- a/third_party/rust/cssparser-macros/.cargo-checksum.json
+++ b/third_party/rust/cssparser-macros/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"a359c50f2f1777724b126573a568b3e94ad2674f645fae321ddf4b4293cef4cc","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","lib.rs":"218edca3cc07d460a65b6f937b77024a13ccca9d9d62ee715eeeb8dff8859f04"},"package":"f3a5383ae18dbfdeb569ed62019f5bddb2a95cd2d3833313c475a0d014777805"}
\ No newline at end of file
+{"files":{"Cargo.toml":"865ab5a711a4fea88adf215f7c0207f1ad2ee80c310229f6d2a5770d2ff36486","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","lib.rs":"66c99e9dd05190f31f59ccfd3f9558540f94a501e88849bcaf09191f9f3323da"},"package":"b16e382d9b983fdb9ac6a36b37fdeb84ce3ea81f749febfee3463cfa7f24275e"}
\ No newline at end of file
--- a/third_party/rust/cssparser-macros/Cargo.toml
+++ b/third_party/rust/cssparser-macros/Cargo.toml
@@ -7,33 +7,33 @@
 #
 # 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 = "cssparser-macros"
-version = "0.3.3"
+version = "0.3.5"
 authors = ["Simon Sapin <simon.sapin@exyr.org>"]
 description = "Procedural macros for cssparser"
 documentation = "https://docs.rs/cssparser-macros/"
 license = "MPL-2.0"
 repository = "https://github.com/servo/rust-cssparser"
 
 [lib]
 path = "lib.rs"
 proc-macro = true
 [dependencies.phf_codegen]
 version = "0.7"
 
 [dependencies.proc-macro2]
-version = "0.3"
+version = "0.4"
 
 [dependencies.procedural-masquerade]
 version = "0.1"
 
 [dependencies.quote]
-version = "0.5"
+version = "0.6"
 
 [dependencies.syn]
-version = "0.13"
+version = "0.15.12"
 features = ["full", "extra-traits"]
--- a/third_party/rust/cssparser-macros/lib.rs
+++ b/third_party/rust/cssparser-macros/lib.rs
@@ -5,16 +5,17 @@
 #[macro_use] extern crate procedural_masquerade;
 extern crate phf_codegen;
 extern crate proc_macro;
 extern crate proc_macro2;
 #[macro_use] extern crate quote;
 extern crate syn;
 
 #[allow(unused_imports)] use std::ascii::AsciiExt;
+use quote::TokenStreamExt;
 use std::iter;
 use proc_macro2::{TokenStream, TokenTree};
 
 define_proc_macros! {
     /// Input: the arms of a `match` expression.
     ///
     /// Output: a `MAX_LENGTH` constant with the length of the longest string pattern.
     ///
--- a/third_party/rust/cssparser/.cargo-checksum.json
+++ b/third_party/rust/cssparser/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"47497bde56f31c8a24665d840fbe5b03f14324dd06a68f907e419f8e7a855186","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"c5781e673335f37ed3d7acb119f8ed33efdf6eb75a7094b7da2abe0c3230adb8","build.rs":"310d6d7b1931ff783a8aa1a4c6baee87b4c9130c858e4694ef69cc96df5e38dc","build/match_byte.rs":"31905ae3dba69fa82c1f13069df4cd056bb340d59ee5d177679425f105f203cf","docs/404.html":"025861f76f8d1f6d67c20ab624c6e418f4f824385e2dd8ad8732c4ea563c6a2e","docs/index.html":"025861f76f8d1f6d67c20ab624c6e418f4f824385e2dd8ad8732c4ea563c6a2e","src/color.rs":"c60f1b0ab7a2a6213e434604ee33f78e7ef74347f325d86d0b9192d8225ae1cc","src/cow_rc_str.rs":"541216f8ef74ee3cc5cbbc1347e5f32ed66588c401851c9a7d68b867aede1de0","src/from_bytes.rs":"331fe63af2123ae3675b61928a69461b5ac77799fff3ce9978c55cf2c558f4ff","src/lib.rs":"a474ee88ef8f73fcb7b7272d426e5eafb4ad10d104797a5a188d1676c8180972","src/macros.rs":"adb9773c157890381556ea83d7942dcc676f99eea71abbb6afeffee1e3f28960","src/nth.rs":"5c70fb542d1376cddab69922eeb4c05e4fcf8f413f27563a2af50f72a47c8f8c","src/parser.rs":"a4ec0bd1b5eab6632cf1985701a7ea641fe7f7bbcc0a2bd33f924ae6228591a5","src/rules_and_declarations.rs":"622ce07c117a511d40ce595602d4f4730659a59273388f28553d1a2b0fac92ce","src/serializer.rs":"3e2dfc60613f885cb6f99abfc854fde2a1e00de507431bd2e51178b61abfd69b","src/size_of_tests.rs":"e5f63c8c18721cc3ff7a5407e84f9889ffa10e66da96e8510a696c3e00ad72d5","src/tests.rs":"9d08b3943d453664e01d58e307f79345e240f9f9ce6f8d36a842eff37155563e","src/tokenizer.rs":"adcf5811955e8df57a519e3d1e44fe3afeb5afeb1076daeb8d36fed1abcf1327","src/unicode_range.rs":"ae159d2ebe4123a6666e18dc0362f89b475240a6b7ed5fb6fe21b9e7a4139da8"},"package":"730363a45c4e248d4f21d3e5c1156d1a9cdec0855056c0d9539e814bc59865c3"}
\ No newline at end of file
+{"files":{"Cargo.toml":"4df819c1722208c604087cad01b5d2f3ce3ea8ef06d1ec31e8bf94d2c9290bd0","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"c5781e673335f37ed3d7acb119f8ed33efdf6eb75a7094b7da2abe0c3230adb8","build.rs":"310d6d7b1931ff783a8aa1a4c6baee87b4c9130c858e4694ef69cc96df5e38dc","build/match_byte.rs":"6f7ec4235c9f2da403ea0be9339661ecd8e1f5e1c788cf88a41448b1080c59b8","docs/404.html":"025861f76f8d1f6d67c20ab624c6e418f4f824385e2dd8ad8732c4ea563c6a2e","docs/index.html":"025861f76f8d1f6d67c20ab624c6e418f4f824385e2dd8ad8732c4ea563c6a2e","src/color.rs":"c60f1b0ab7a2a6213e434604ee33f78e7ef74347f325d86d0b9192d8225ae1cc","src/cow_rc_str.rs":"541216f8ef74ee3cc5cbbc1347e5f32ed66588c401851c9a7d68b867aede1de0","src/from_bytes.rs":"331fe63af2123ae3675b61928a69461b5ac77799fff3ce9978c55cf2c558f4ff","src/lib.rs":"a474ee88ef8f73fcb7b7272d426e5eafb4ad10d104797a5a188d1676c8180972","src/macros.rs":"adb9773c157890381556ea83d7942dcc676f99eea71abbb6afeffee1e3f28960","src/nth.rs":"5c70fb542d1376cddab69922eeb4c05e4fcf8f413f27563a2af50f72a47c8f8c","src/parser.rs":"a4ec0bd1b5eab6632cf1985701a7ea641fe7f7bbcc0a2bd33f924ae6228591a5","src/rules_and_declarations.rs":"622ce07c117a511d40ce595602d4f4730659a59273388f28553d1a2b0fac92ce","src/serializer.rs":"3e2dfc60613f885cb6f99abfc854fde2a1e00de507431bd2e51178b61abfd69b","src/size_of_tests.rs":"e5f63c8c18721cc3ff7a5407e84f9889ffa10e66da96e8510a696c3e00ad72d5","src/tests.rs":"9d08b3943d453664e01d58e307f79345e240f9f9ce6f8d36a842eff37155563e","src/tokenizer.rs":"adcf5811955e8df57a519e3d1e44fe3afeb5afeb1076daeb8d36fed1abcf1327","src/unicode_range.rs":"ae159d2ebe4123a6666e18dc0362f89b475240a6b7ed5fb6fe21b9e7a4139da8"},"package":"aa4c7e7b72ef04e94e80cec7a4bd795fc2a67a9ce627bc684cf95dd89711d972"}
\ No newline at end of file
--- a/third_party/rust/cssparser/Cargo.toml
+++ b/third_party/rust/cssparser/Cargo.toml
@@ -7,17 +7,17 @@
 #
 # 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 = "cssparser"
-version = "0.25.0"
+version = "0.25.1"
 authors = ["Simon Sapin <simon.sapin@exyr.org>"]
 build = "build.rs"
 exclude = ["src/css-parsing-tests/**", "src/big-data-url.css"]
 description = "Rust implementation of CSS Syntax Level 3"
 documentation = "https://docs.rs/cssparser/"
 readme = "README.md"
 keywords = ["css", "syntax", "parser"]
 license = "MPL-2.0"
@@ -60,14 +60,14 @@ version = "0.7"
 version = "0.3"
 [build-dependencies.proc-macro2]
 version = "0.4"
 
 [build-dependencies.quote]
 version = "0.6"
 
 [build-dependencies.syn]
-version = "0.14"
+version = "0.15.12"
 features = ["extra-traits", "fold", "full"]
 
 [features]
 bench = []
 dummy_match_byte = []
--- a/third_party/rust/cssparser/build/match_byte.rs
+++ b/third_party/rust/cssparser/build/match_byte.rs
@@ -3,16 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use quote::ToTokens;
 use std::fs::File;
 use std::io::{Read, Write};
 use std::path::Path;
 use syn;
 use syn::fold::Fold;
+use syn::parse::{Parse, ParseStream, Result};
 
 use proc_macro2::{Span, TokenStream};
 
 struct MatchByteParser {
 }
 
 pub fn expand(from: &Path, to: &Path) {
     let mut source = String::new();
@@ -25,27 +26,33 @@ pub fn expand(from: &Path, to: &Path) {
     File::create(to).unwrap().write_all(code.as_bytes()).unwrap();
 }
 
 struct MatchByte {
     expr: syn::Expr,
     arms: Vec<syn::Arm>,
 }
 
-impl syn::synom::Synom for MatchByte {
-    named!(parse -> Self, do_parse!(
-        expr: syn!(syn::Expr) >>
-        punct!(,) >>
-        arms: many0!(syn!(syn::Arm)) >> (
-            MatchByte {
-                expr,
+impl Parse for MatchByte {
+    fn parse(input: ParseStream) -> Result<Self> {
+        Ok(MatchByte {
+            expr: {
+                let expr = input.parse()?;
+                input.parse::<Token![,]>()?;
+                expr
+            },
+            arms: {
+                let mut arms = Vec::new();
+                while !input.is_empty() {
+                    arms.push(input.call(syn::Arm::parse)?);
+                }
                 arms
             }
-        )
-    ));
+        })
+    }
 }
 
 fn get_byte_from_expr_lit(expr: &Box<syn::Expr>) -> u8 {
     match **expr {
         syn::Expr::Lit(syn::ExprLit { ref lit, .. }) => {
             if let syn::Lit::Byte(ref byte) = *lit {
                 byte.value()
             }
--- a/third_party/rust/cstr/.cargo-checksum.json
+++ b/third_party/rust/cstr/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"6906aff00530782954ae2e4ef4a64cf7fc0b6ddbe4557464815921bd4b966d17","LICENSE":"2c6fc9268c3b765da5bf34fe4909425437f61be05674c2516c7f8cf1251c20aa","src/lib.rs":"01e21fd1789ccbaab8d4d46cfcfc4b1997ffae3598cb83db0852f613b93f17b1"},"package":"b6557bdb1dc9647eae1cf7f5601b14cd45fc3c7ccf2df618387416fe542da6ea"}
\ No newline at end of file
+{"files":{"Cargo.toml":"d3256841708e7347bcb56e045f68581a434f3b9e1d39b316a5a0f83ac5e975c1","LICENSE":"2c6fc9268c3b765da5bf34fe4909425437f61be05674c2516c7f8cf1251c20aa","src/lib.rs":"01e21fd1789ccbaab8d4d46cfcfc4b1997ffae3598cb83db0852f613b93f17b1"},"package":"bc6b738cea084b0bf479106e0089d58d8c3dbc35d1fef3c485e19e20ea47d252"}
\ No newline at end of file
--- a/third_party/rust/cstr/Cargo.toml
+++ b/third_party/rust/cstr/Cargo.toml
@@ -7,19 +7,19 @@
 #
 # 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 = "cstr"
-version = "0.1.3"
+version = "0.1.4"
 authors = ["Xidorn Quan <me@upsuper.org>"]
 description = "Macro for building static CStr reference"
 keywords = ["macro", "cstr"]
 license = "MIT"
 repository = "https://github.com/upsuper/cstr"
 [dependencies.cstr-macros]
-version = "0.1.2"
+version = "0.1.3"
 
 [dependencies.procedural-masquerade]
 version = "0.1"
--- a/third_party/rust/darling/.cargo-checksum.json
+++ b/third_party/rust/darling/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"CHANGELOG.md":"d7322023ffc58d041c542f8de0f43167f34ba4fdacc9a5014308d97055f7b729","Cargo.toml":"c1d8f7f99c24eb373e5aefaf3c678eea57d72552fdbb3547872b62b0d28aa07f","LICENSE":"8ea93490d74a5a1b1af3ff71d786271b3f1e5f0bea79ac16e02ec533cef040d6","README.md":"7e05868f02bae698ee3193b86e86f25faa4dbc63661062e1d3f7bff590cfb313","examples/consume_fields.rs":"f32d3873b61e22b1ded500571ec7120420b4825ee7f807d07409e3a257407add","examples/fallible_read.rs":"4e2d558f8a77c4fffa79bde5a6c48df3dbc932822e7bc7cf0a903d1ea38b8d6f","publish.sh":"42795a155247c69402f8c4c917c9874a06dfde5a7606c8b59fc4e9ccd34233dd","src/lib.rs":"c13e19cd0363784d9ec3605bafcaf74648594fb419162143c4ecc3308a8ec695","tests/accrue_errors.rs":"7a995118cfa75ac90accf9a35e17b07a00e8528c8ccc5dd8700ba7b4c59393c1","tests/custom_bound.rs":"cca7c557ac0a2efd9554d31f0df9a98c4f6f01b9f211107846732cc1fe9f7856","tests/enums_newtype.rs":"328ebbbb4aa540f06f13158dff22cf9d98d45dba2331f75e4aa169d348397b76","tests/enums_struct.rs":"560a8bfdea9eca7f8c2024bc8740e71ef1a0681cea36b098ceadba520fad8640","tests/enums_unit.rs":"5e9458af9d695706e181b6622dcbc8b80b9eae33dcc1f15da7eecfd3e7037777","tests/error.rs":"69d12e969555fc1d72990d7596b54adcb469da95f1f257d0273f31bc9c855db5","tests/from_variant.rs":"af60c9dec64e80e2ac3beafb942d8edc1100a1342bb97378e6a35f878dd1fb50","tests/generics.rs":"3d884d65cb6b57d4bc4b3f7c39f321b2df3cd339fa15db5b66dc7c97ef84df17","tests/happy_path.rs":"5143dbf33b59fcab94be61affefddf485857f1a5cb3d45d5583463423d417cdf","tests/multiple.rs":"20e1c5110449db46df68c5a4cdb6e0c4c0e9a6b47451fe73f1523a1cf730196d","tests/newtype.rs":"a8709857e2067bc01b388a11230db5764c9e5fe2341c98d6c819adc01472b988","tests/skip.rs":"e34034c6b5fae80c8cf2caa762a41ab3d971f8af50f1022e68ba299218477892","tests/split_declaration.rs":"d55219ec0dce001ccd1975f0b4fbe0f5e8c5792a1ddf2de5a210d380bc6761e0","tests/supports.rs":"1131c2afd42e20e4a39f922758cbb8d7c5a0167ae41f9cd1cd14b40db055cd10"},"package":"2a78af487e4eb8f4421a1770687b328af6bb4494ca93435210678c6eea875c11"}
\ No newline at end of file
+{"files":{"CHANGELOG.md":"06091817afa317ff86efb9aee3fa8d165358150a92c6369e4ab2958765c14af8","Cargo.toml":"82b023db972c6554f198cc926eaca456f945d6ac2cdc4df65cdeb5b186a1ced0","LICENSE":"8ea93490d74a5a1b1af3ff71d786271b3f1e5f0bea79ac16e02ec533cef040d6","README.md":"f70d772dd28cd14fc817c71d343b07ec8bfbe02dfe8d3e999a0185c6ef8731ec","examples/automatic_bounds.rs":"2716da31a5beed954da77866779ef77600686688a8890fefa7e23db628358104","examples/consume_fields.rs":"abcdd6a919a95a5c295e8d362db0367ab171fe3c8a80b23d83701765cd902d2d","examples/fallible_read.rs":"e06d5c045d3a47c0e00d3c77ed3aa1a1d5173d2c3f462dc1967379db3094af4c","examples/supports_struct.rs":"f2d84a4377e555ed7535e563c9593bd6a398a63b42f7da72381eea2fccec229f","publish.sh":"42795a155247c69402f8c4c917c9874a06dfde5a7606c8b59fc4e9ccd34233dd","src/lib.rs":"07da20edb52c4aba30f2b680b28ca96cf995859566b0db3b1d2e0ee967249a18","src/macros_public.rs":"3ed7eb99f309d9cd600d3a09ff4dcf5cc5d787fb49e8e5ead6bb00e31e5e6793","tests/accrue_errors.rs":"f873acf2a13dba88f508c3eb118d14e36515bf94b7ee914ddec2ae1eb55e381f","tests/computed_bound.rs":"2313da96a250b5948ca06bf86cb7158b55a59eba75334aa8ba27a46b28ede6b5","tests/custom_bound.rs":"4dd3e8fd76734d8f262e857773f53a820229ad6e10fe6fbbbe1f636c7da9eab0","tests/defaults.rs":"b544be90d18be26305a757e8468bf8735356889b59c167294d118e32ee7f82ea","tests/enums_newtype.rs":"723c761eab356f577e804a5e07f5efa244f70fb7525d20fceb1bc3852c8d742e","tests/enums_struct.rs":"e0097d7f947cf9e4612c9450c55ea5075c7f6fcbbf8cac7176449d92eebc9343","tests/enums_unit.rs":"8c075d5897b60b58cb71d6306e7fdd80851f5a147ae3010ba70ea100007364a3","tests/error.rs":"f989a43fad47d61d75da2bc78af6c51bac549f39f14f87a804eea226308ece32","tests/from_generics.rs":"79230ad21e8482cf6e6ceb0c74303bc0cdf77fbb951f46a6ba1006ecf1248fd5","tests/from_type_param.rs":"4369737a9d4c21cfa8595a9159cd5d98d02af3445d8b4085654ad4ce8e8bba3f","tests/from_type_param_default.rs":"a5ee72f22540004e755445c37dd4c425ef12beef496896d608695bae964afe7f","tests/from_variant.rs":"2e804326302a62b979eae963e88f0a2cdb6a21ee9667407c361d178f8c0aadba","tests/generics.rs":"3c0f43b39a8f319b8318e409d3836c7235892ae4f50f5986ea80f69b80a4080b","tests/happy_path.rs":"13cf6cd5f87920d90762fd08e45d9f0bb378563e1c92cf5ffb3ba78decdc4969","tests/multiple.rs":"b76172c396a89414b1669eec2bf854c79a7215fd3b6977123b81591ac6761670","tests/newtype.rs":"c45842fd764174a6a8177851e15445d344ab93bf2124b5f77213780d1306adea","tests/skip.rs":"fd936a5eff92c0a49b0a900e6fcda6b7a10a83dd4096ae2000201ccb3f66a738","tests/split_declaration.rs":"b191ed446bf7b8fdf1d41059354adb4b155523507f37b0d36aed3347617a2492","tests/supports.rs":"acb53d4d810dcd3e46763db13234e4fb42e425cfde2516d9bf5d7b690be72dcc"},"package":"7f000e7b03a0083a30e1f10b1428a530849c21e72b338fa76869b5dbc4b045bf"}
\ No newline at end of file
--- a/third_party/rust/darling/CHANGELOG.md
+++ b/third_party/rust/darling/CHANGELOG.md
@@ -1,12 +1,42 @@
 # Changelog
 
-## Unreleased Features
-_None_
+## v0.8.0
+- Update dependency on `syn` to 0.15 [#44](https://github.com/darling/pull/44). Thanks to @hcpl
+
+## v0.7.0 (July 24, 2018)
+- Update dependencies on `syn` and `proc-macro2`
+- Add `util::IdentString`, which acts as an Ident or its string equivalent
+
+## v0.6.3 (May 22, 2018)
+- Add support for `Uses*` traits in where predicates
+
+## v0.6.2 (May 22, 2018)
+- Add `usage` module for tracking type param and lifetime usage in generic declarations
+  - Add `UsesTypeParams` and `CollectsTypeParams` traits [#37](https://github.com/darling/issues/37)
+  - Add `UsesLifetimes` and `CollectLifetimes` traits [#41](https://github.com/darling/pull/41)
+- Don't add `FromMeta` bounds to type parameters only used by skipped fields [#40](https://github.com/darling/pull/40)
+
+## v0.6.1 (May 17, 2018)
+- Fix an issue where the `syn` update broke shape validation [#36](https://github.com/TedDriggs/darling/issues/36)
+
+## v0.6.0 (May 15, 2018)
+
+### Breaking Changes
+- Renamed `FromMetaItem` to `FromMeta`, and renamed `from_meta_item` method to `from_meta`
+- Added dedicated `derive(FromMetaItem)` which panics and redirects users to `FromMeta`
+
+## v0.5.0 (May 10, 2018)
+- Add `ast::Generics` and `ast::GenericParam` to work with generics in a manner similar to `ast::Data`
+- Add `ast::GenericParamExt` to support alternate representations of generic parameters
+- Add `util::WithOriginal` to get a parsed representation and syn's own struct for a syntax block
+- Add `FromGenerics` and `FromGenericParam` traits (without derive support)
+- Change generated code for `generics` magic field to invoke `FromGenerics` trait during parsing
+- Add `FromTypeParam` trait [#30](https://github.com/TedDriggs/darling/pull/30). Thanks to @upsuper
 
 ## v0.4.0 (April 5, 2018)
 - Update dependencies on `proc-macro`, `quote`, and `syn` [#26](https://github.com/TedDriggs/darling/pull/26). Thanks to @hcpl
 
 ## v0.3.3 (April 2, 2018)
 **YANKED**
 
 ## v0.3.2 (March 13, 2018)
@@ -31,9 +61,9 @@
 
 - Add `impl FromMetaItem` for integer types [#15](https://github.com/TedDriggs/darling/pull/15)
 
 ## v0.2.0 (June 18, 2017)
 
 - Added support for returning multiple errors from parsing [#5](https://github.com/TedDriggs/darling/pull/5)
 - Derived impls no longer return on first error [#5](https://github.com/TedDriggs/darling/pull/5)
 - Removed default types for `V` and `F` from `ast::Body`
-- Enum variants are automatically converted to snake_case [#12](https://github.com/TedDriggs/darling/pull/12)
\ No newline at end of file
+- Enum variants are automatically converted to snake_case [#12](https://github.com/TedDriggs/darling/pull/12)
--- a/third_party/rust/darling/Cargo.toml
+++ b/third_party/rust/darling/Cargo.toml
@@ -7,27 +7,30 @@
 #
 # 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 = "darling"
-version = "0.4.0"
+version = "0.8.0"
 authors = ["Ted Driggs <ted.driggs@outlook.com>"]
 description = "A proc-macro library for reading attributes into structs when\nimplementing custom derives.\n"
-documentation = "https://docs.rs/darling/0.4.0"
+documentation = "https://docs.rs/darling/0.8.0"
 readme = "README.md"
 license = "MIT"
 repository = "https://github.com/TedDriggs/darling"
 [dependencies.darling_core]
-version = "=0.4.0"
+version = "=0.8.0"
 
 [dependencies.darling_macro]
-version = "=0.4.0"
+version = "=0.8.0"
+[dev-dependencies.proc-macro2]
+version = "0.4"
+
 [dev-dependencies.quote]
-version = "0.5"
+version = "0.6"
 
 [dev-dependencies.syn]
-version = "0.13"
+version = "0.15"
 [badges.travis-ci]
 repository = "TedDriggs/darling"
--- a/third_party/rust/darling/README.md
+++ b/third_party/rust/darling/README.md
@@ -4,28 +4,28 @@ Darling
 [![Build Status](https://travis-ci.org/TedDriggs/darling.svg?branch=master)](https://travis-ci.org/TedDriggs/darling)
 [![Latest Version](https://img.shields.io/crates/v/darling.svg)](https://crates.io/crates/darling)
 
 `darling` is a crate for proc macro authors, which enables parsing attributes into structs. It is heavily inspired by `serde` both in its internals and in its API.
 
 # Usage
 `darling` provides a set of traits which can be derived or manually implemented.
 
-1. `FromMetaItem` is used to extract values from a meta-item in an attribute. Implementations are likely reusable for many libraries, much like `FromStr` or `serde::Deserialize`. Trait implementations are provided for primitives, some std types, and some `syn` types.
+1. `FromMeta` is used to extract values from a meta-item in an attribute. Implementations are likely reusable for many libraries, much like `FromStr` or `serde::Deserialize`. Trait implementations are provided for primitives, some std types, and some `syn` types.
 1. `FromDeriveInput` is implemented or derived by each proc-macro crate which depends on `darling`. This is the root for input parsing; it gets access to the identity, generics, and visibility of the target type, and can specify which attribute names should be parsed or forwarded from the input AST.
 1. `FromField` is implemented or derived by each proc-macro crate which depends on `darling`. Structs deriving this trait will get access to the identity (if it exists), type, and visibility of the field.
 
 # Example
 
 ```rust,ignore
 #[macro_use]
 extern crate darling;
 extern crate syn;
 
-#[derive(Default, FromMetaItem)]
+#[derive(Default, FromMeta)]
 #[darling(default)]
 pub struct Lorem {
     #[darling(rename = "sit")]
     ipsum: bool,
     dolor: Option<String>,
 }
 
 #[derive(FromDeriveInput)]
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling/examples/automatic_bounds.rs
@@ -0,0 +1,77 @@
+#[macro_use]
+extern crate darling;
+
+extern crate syn;
+
+use darling::FromDeriveInput;
+
+#[derive(FromMeta, PartialEq, Eq, Debug)]
+enum Volume {
+    Whisper,
+    Talk,
+    Shout,
+}
+
+/// A more complex example showing the ability to skip at a field or struct
+/// level while still tracking which type parameters need to be bounded.
+/// This can be seen by expanding this example using `cargo expand`.
+#[derive(FromMeta)]
+#[allow(dead_code)]
+enum Emphasis<T> {
+    Constant(Volume),
+    Variable(darling::util::IdentList),
+    #[darling(skip)]
+    PerPhoneme(Option<T>),
+    Strided {
+        #[darling(skip)]
+        step: Vec<T>,
+        #[darling(multiple)]
+        volume: Vec<Volume>,
+    },
+}
+
+#[derive(FromDeriveInput)]
+#[darling(attributes(speak))]
+struct SpeakingOptions<T, U> {
+    max_volume: U,
+    #[darling(skip, default)]
+    additional_data: Vec<T>,
+}
+
+#[derive(Default)]
+struct Phoneme {
+    #[allow(dead_code)]
+    first: String,
+}
+
+// This is probably the holy grail for `darling`'s own internal use-case:
+// Auto-apply `Default` bound to skipped *field* types in `where` clause.
+impl<T, U> Default for SpeakingOptions<T, U>
+where
+    Vec<T>: Default,
+    U: Default,
+{
+    fn default() -> Self {
+        Self {
+            max_volume: Default::default(),
+            additional_data: Default::default(),
+        }
+    }
+}
+
+fn main() {
+    let derive_input = syn::parse_str(
+        r#"
+        #[derive(Speak)]
+        #[speak(max_volume = "shout")]
+        enum HtmlElement {
+            Div(String)
+        }
+    "#,
+    ).unwrap();
+
+    let parsed: SpeakingOptions<Phoneme, Volume> =
+        FromDeriveInput::from_derive_input(&derive_input).unwrap();
+    assert_eq!(parsed.max_volume, Volume::Shout);
+    assert_eq!(parsed.additional_data.len(), 0);
+}
--- a/third_party/rust/darling/examples/consume_fields.rs
+++ b/third_party/rust/darling/examples/consume_fields.rs
@@ -1,39 +1,40 @@
 //! This example shows how to do struct and field parsing using darling.
 
 #[macro_use]
 extern crate darling;
-
+extern crate proc_macro2;
 #[macro_use]
 extern crate quote;
 extern crate syn;
 
 use darling::ast;
 use darling::FromDeriveInput;
-use quote::{Tokens, ToTokens};
+use proc_macro2::TokenStream;
+use quote::ToTokens;
 use syn::parse_str;
 
 /// A speaking volume. Deriving `FromMeta` will cause this to be usable
 /// as a string value for a meta-item key.
-#[derive(Debug, Clone, Copy, FromMetaItem)]
+#[derive(Debug, Clone, Copy, FromMeta)]
 #[darling(default)]
 enum Volume {
     Normal,
     Whisper,
     Shout,
 }
 
 impl Default for Volume {
     fn default() -> Self {
         Volume::Normal
     }
 }
 
-/// Support parsing from a full derive input. Unlike FromMetaItem, this isn't
+/// Support parsing from a full derive input. Unlike FromMeta, this isn't
 /// composable; each darling-dependent crate should have its own struct to handle
 /// when its trait is derived.
 #[derive(Debug, FromDeriveInput)]
 // This line says that we want to process all attributes declared with `my_trait`,
 // and that darling should panic if this receiver is given an enum.
 #[darling(attributes(my_trait), supports(struct_any))]
 struct MyInputReceiver {
     /// The struct ident.
@@ -49,17 +50,17 @@ struct MyInputReceiver {
 
     /// The Input Receiver demands a volume, so use `Volume::Normal` if the
     /// caller doesn't provide one.
     #[darling(default)]
     volume: Volume,
 }
 
 impl ToTokens for MyInputReceiver {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         let MyInputReceiver {
             ref ident,
             ref generics,
             ref data,
             volume,
         } = *self;
 
         let (imp, ty, wher) = generics.split_for_impl();
@@ -73,50 +74,52 @@ impl ToTokens for MyInputReceiver {
             .iter()
             .enumerate()
             .map(|(i, f)| {
                 // We have to preformat the ident in this case so we can fall back
                 // to the field index for unnamed fields. It's not easy to read,
                 // unfortunately.
                 format!(
                     "{} = {{}}",
-                    f.ident.as_ref().map(|v| format!("{}", v)).unwrap_or_else(
-                        || {
-                            format!("{}", i)
-                        },
-                    )
+                    f.ident
+                        .as_ref()
+                        .map(|v| format!("{}", v))
+                        .unwrap_or_else(|| format!("{}", i))
                 )
             })
             .collect::<Vec<_>>()
             .join(", ");
 
         // Generate the actual values to fill the format string.
         let field_list = fields
             .into_iter()
             .enumerate()
             .map(|(i, f)| {
                 let field_volume = f.volume.unwrap_or(volume);
 
                 // This works with named or indexed fields, so we'll fall back to the index so we can
                 // write the output as a key-value pair.
-                let field_ident = f.ident.as_ref().map(|v| quote!(#v)).unwrap_or_else(|| quote!(#i));
+                let field_ident = f.ident
+                    .as_ref()
+                    .map(|v| quote!(#v))
+                    .unwrap_or_else(|| quote!(#i));
 
                 match field_volume {
                     Volume::Normal => quote!(self.#field_ident),
                     Volume::Shout => {
                         quote!(::std::string::ToString::to_string(&self.#field_ident).to_uppercase())
                     }
                     Volume::Whisper => {
                         quote!(::std::string::ToString::to_string(&self.#field_ident).to_lowercase())
                     }
                 }
             })
             .collect::<Vec<_>>();
 
-        tokens.append_all(quote! {
+        tokens.extend(quote! {
             impl #imp Speak for #ident #ty #wher {
                 fn speak(&self, writer: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                     write!(#fmt_string, #(#field_list),*)
                 }
             }
         });
     }
 }
@@ -147,22 +150,25 @@ pub struct Foo {
 
     baz: i64,
 }"#;
 
     let parsed = parse_str(input).unwrap();
     let receiver = MyInputReceiver::from_derive_input(&parsed).unwrap();
     let tokens = quote!(#receiver);
 
-    println!(r#"
+    println!(
+        r#"
 INPUT:
 
 {}
 
 PARSED AS:
 
 {:?}
 
 EMITS:
 
 {}
-    "#, input, receiver, tokens);
+    "#,
+        input, receiver, tokens
+    );
 }
--- a/third_party/rust/darling/examples/fallible_read.rs
+++ b/third_party/rust/darling/examples/fallible_read.rs
@@ -5,17 +5,17 @@
 //! 1. Using `Result<T, syn::Meta>` to attempt a recovery in imperative code
 //! 1. Using the `map` darling meta-item to post-process the receiver before returning.
 
 #[macro_use]
 extern crate darling;
 
 extern crate syn;
 
-use darling::{FromDeriveInput, FromMetaItem};
+use darling::{FromDeriveInput, FromMeta};
 use syn::parse_str;
 
 #[derive(Debug, FromDeriveInput)]
 #[darling(attributes(my_trait), map = "MyInputReceiver::autocorrect")]
 pub struct MyInputReceiver {
     /// This field must be present and a string or else parsing will panic.
     name: String,
 
@@ -31,24 +31,28 @@ pub struct MyInputReceiver {
 }
 
 impl MyInputReceiver {
     /// This function will be called by `darling` _after_ it's finished parsing the
     /// input but before returning to the caller. This is a good place to initialize
     /// skipped fields or to perform corrections that don't lend themselves to being
     /// done elsewhere.
     fn autocorrect(self) -> Self {
-        let Self { name, frequency, amplitude } = self;
+        let Self {
+            name,
+            frequency,
+            amplitude,
+        } = self;
 
         // Amplitude doesn't have a sign, so if we received a negative number then
         // we'll go ahead and make it positive.
         let amplitude = match amplitude {
             Ok(amp) => amp,
             Err(mi) => {
-                let val: i64 = if let Ok(v) = FromMetaItem::from_meta_item(&mi) {
+                let val: i64 = if let Ok(v) = FromMeta::from_meta(&mi) {
                     v
                 } else {
                     panic!(format!("amplitude should have been an integer"))
                 };
 
                 val.abs() as u64
             }
         };
@@ -64,18 +68,21 @@ impl MyInputReceiver {
 fn main() {
     let input = r#"#[derive(MyTrait)]
 #[my_trait(name="Jon", amplitude = "-1", frequency = "1")]
 pub struct Foo;"#;
 
     let parsed = parse_str(input).unwrap();
     let receiver = MyInputReceiver::from_derive_input(&parsed).unwrap();
 
-    println!(r#"
+    println!(
+        r#"
 INPUT:
 
 {}
 
 PARSED AS:
 
 {:?}
-    "#, input, receiver);
+    "#,
+        input, receiver
+    );
 }
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling/examples/supports_struct.rs
@@ -0,0 +1,63 @@
+#[macro_use]
+extern crate darling;
+
+extern crate syn;
+
+use darling::{ast, util, FromDeriveInput};
+use syn::{Ident, Type};
+
+#[derive(Debug, FromField)]
+#[darling(attributes(lorem))]
+pub struct LoremField {
+    ident: Option<Ident>,
+    ty: Type,
+    #[darling(default)]
+    skip: bool,
+}
+
+#[derive(Debug, FromDeriveInput)]
+#[darling(attributes(lorem), supports(struct_named))]
+pub struct Lorem {
+    ident: Ident,
+    data: ast::Data<util::Ignored, LoremField>,
+}
+
+fn main() {
+    let good_input = r#"#[derive(Lorem)]
+pub struct Foo {
+    #[lorem(skip)]
+    bar: bool,
+
+    baz: i64,
+}"#;
+
+    let bad_input = r#"#[derive(Lorem)]
+    pub struct BadFoo(String, u32);"#;
+
+    let parsed = syn::parse_str(good_input).unwrap();
+    let receiver = Lorem::from_derive_input(&parsed).unwrap();
+    let wrong_shape_parsed = syn::parse_str(bad_input).unwrap();
+    let wrong_shape = Lorem::from_derive_input(&wrong_shape_parsed)
+        .expect_err("Shape was wrong");
+
+    println!(
+        r#"
+INPUT:
+
+{}
+
+PARSED AS:
+
+{:?}
+
+BAD INPUT:
+
+{}
+
+PRODUCED ERROR:
+
+{}
+    "#,
+        good_input, receiver, bad_input, wrong_shape
+    );
+}
--- a/third_party/rust/darling/src/lib.rs
+++ b/third_party/rust/darling/src/lib.rs
@@ -1,80 +1,98 @@
 //! # Darling
 //! Darling is a tool for declarative attribute parsing in proc macro implementations.
 //!
 //!
 //! ## Design
 //! Darling takes considerable design inspiration from [`serde`]. A data structure that can be
-//! read from any attribute implements `FromMetaItem` (or has an implementation automatically 
-//! generated using `derive`). Any crate can provide `FromMetaItem` implementations, even one not
+//! read from any attribute implements `FromMeta` (or has an implementation automatically
+//! generated using `derive`). Any crate can provide `FromMeta` implementations, even one not
 //! specifically geared towards proc-macro authors.
 //!
-//! Proc-macro crates should provide their own structs which implement or derive `FromDeriveInput` and
-//! `FromField` to gather settings relevant to their operation.
+//! Proc-macro crates should provide their own structs which implement or derive `FromDeriveInput`,
+//! `FromField`, `FromVariant`, `FromGenerics`, _et alia_ to gather settings relevant to their operation.
 //!
 //! ## Attributes
 //! There are a number of attributes that `darling` exposes to enable finer-grained control over the code
 //! it generates.
 //!
 //! * **Field renaming**: You can use `#[darling(rename="new_name")]` on a field to change the name Darling looks for.
 //!   You can also use `#[darling(rename_all="...")]` at the struct or enum level to apply a casing rule to all fields or variants.
 //! * **Map function**: You can use `#[darling(map="path::to::function")]` to run code on a field before its stored in the struct.
 //! * **Default values**: You can use `#[darling(default)]` at the type or field level to use that type's default value to fill
 //!   in values not specified by the caller.
 //! * **Skipped fields**: You can skip a variant or field using `#[darling(skip)]`. Fields marked with this will fall back to
 //!   `Default::default()` for their value, but you can override that with an explicit default or a value from the type-level default.
 //!
 //! ## Forwarded Fields
-//! The traits `FromDeriveInput` and `FromField` support forwarding fields from the input AST directly 
-//! to the derived struct. These fields are matched up by identifier **before** `rename` attribute values are
-//! considered. The deriving struct is responsible for making sure the types of fields it does declare match this
-//! table.
+//! All derivable traits except `FromMeta` support forwarding some fields from the input AST to the derived struct.
+//! These fields are matched up by identifier **before** `rename` attribute values are considered,
+//! allowing you to use their names for your own properties.
+//! The deriving struct is responsible for making sure the types of fields it chooses to declare are compatible with this table.
 //!
 //! A deriving struct is free to include or exclude any of the fields below.
 //!
 //! ### `FromDeriveInput`
 //! |Field name|Type|Meaning|
 //! |---|---|---|
 //! |`ident`|`syn::Ident`|The identifier of the passed-in type|
 //! |`vis`|`syn::Visibility`|The visibility of the passed-in type|
-//! |`generics`|`syn::Generics`|The generics of the passed-in type|
-//! |`body`|`darling::ast::Data`|The body of the passed-in type|
+//! |`generics`|`T: darling::FromGenerics`|The generics of the passed-in type. This can be `syn::Generics`, `darling::ast::Generics`, or any compatible type.|
+//! |`data`|`darling::ast::Data`|The body of the passed-in type|
 //! |`attrs`|`Vec<syn::Attribute>`|The forwarded attributes from the passed in type. These are controlled using the `forward_attrs` attribute.|
 //!
 //! ### `FromField`
 //! |Field name|Type|Meaning|
 //! |---|---|---|
 //! |`ident`|`syn::Ident`|The identifier of the passed-in field|
 //! |`vis`|`syn::Visibility`|The visibility of the passed-in field|
 //! |`ty`|`syn::Type`|The type of the passed-in field|
 //! |`attrs`|`Vec<syn::Attribute>`|The forwarded attributes from the passed in field. These are controlled using the `forward_attrs` attribute.|
+//!
+//! ### `FromTypeParam`
+//! |Field name|Type|Meaning|
+//! |---|---|---|
+//! |`ident`|`syn::Ident`|The identifier of the passed-in type param|
+//! |`bounds`|`Vec<syn::TypeParamBound>`|The bounds applied to the type param|
+//! |`default`|`Option<syn::Type>`|The default type of the parameter, if one exists|
+//! |`attrs`|`Vec<syn::Attribute>`|The forwarded attributes from the passed in type param. These are controlled using the `forward_attrs` attribute.|
 
 extern crate core;
 extern crate darling_core;
 
 #[allow(unused_imports)]
 #[macro_use]
 extern crate darling_macro;
 
 #[doc(hidden)]
 pub use darling_macro::*;
 
 #[doc(inline)]
-pub use darling_core::{FromMetaItem, FromDeriveInput, FromField, FromVariant};
+pub use darling_core::{FromDeriveInput, FromField, FromGenericParam, FromGenerics, FromMeta,
+                       FromTypeParam, FromVariant};
+
+#[doc(inline)]
+pub use darling_core::{Error, Result};
 
 #[doc(inline)]
-pub use darling_core::{Result, Error};
+pub use darling_core::{ast, error, usage, util};
 
-#[doc(inline)]
-pub use darling_core::{ast, error, util};
+// XXX exported so that `ExtractAttribute::extractor` can convert a path into tokens.
+// This is likely to change in the future, so only generated code should depend on this export.
+#[doc(hidden)]
+pub use darling_core::ToTokens;
 
 /// Core/std trait re-exports. This should help produce generated code which doesn't
 /// depend on `std` unnecessarily, and avoids problems caused by aliasing `std` or any
 /// of the referenced types.
 #[doc(hidden)]
-pub mod export {    
-    pub use ::core::convert::From;
-    pub use ::core::option::Option::{self, Some, None};
-    pub use ::core::result::Result::{self, Ok, Err};
-    pub use ::core::default::Default;
-    pub use ::std::vec::Vec;
+pub mod export {
+    pub use core::convert::From;
+    pub use core::default::Default;
+    pub use core::option::Option::{self, None, Some};
+    pub use core::result::Result::{self, Err, Ok};
+    pub use std::vec::Vec;
+    pub use std::string::ToString;
 }
+
+#[macro_use]
+mod macros_public;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling/src/macros_public.rs
@@ -0,0 +1,98 @@
+//! Macros that should be exported from both `darling_core` and `darling`.
+//! Note that these are **sym-linked** into the main code, and so cannot declare on items that are exported differently
+//! in `darling_core` vs. `darling`.
+
+/// Generator for `UsesTypeParam` impls that unions the used type parameters of the selected fields.
+///
+/// # Usage
+/// The macro takes the type implementing the trait as the first argument, then a comma-separated list of
+/// fields for the rest of its arguments.
+///
+/// The type of each passed-in field must implement `UsesTypeParams`, or the resulting code won't compile.
+///
+/// ```rust
+/// # extern crate syn;
+/// #
+/// # #[macro_use]
+/// # extern crate darling_core;
+/// #
+/// struct MyField {
+///     ty: syn::Type,
+/// }
+///
+/// uses_type_params!(MyField, ty);
+///
+/// fn main() {
+///     // no test run
+/// }
+/// ```
+///
+/// `darling` cannot derive this trait automatically, as it doesn't know which information extracted from
+/// proc-macro input is meant to constitute "using" the type parameter, but crate consumers should
+/// implement it by hand or using the macro.
+#[macro_export]
+macro_rules! uses_type_params {
+    ($impl_type:ty, $accessor:ident) => {
+        impl $crate::usage::UsesTypeParams for $impl_type {
+            fn uses_type_params<'gen>(
+                &self,
+                options: &$crate::usage::Options,
+                type_set: &'gen $crate::usage::IdentSet
+            ) -> $crate::usage::IdentRefSet<'gen> {
+                self.$accessor.uses_type_params(options, type_set)
+            }
+        }
+    };
+    ($impl_type:ty, $first:ident, $($field:ident),+) => {
+        impl $crate::usage::UsesTypeParams for $impl_type {
+            fn uses_type_params<'gen>(
+                &self,
+                options: &$crate::usage::Options,
+                type_set: &'gen $crate::usage::IdentSet
+            ) -> $crate::usage::IdentRefSet<'gen> {
+                let mut hits = self.$first.uses_type_params(options, type_set);
+                $(
+                    hits.extend(self.$field.uses_type_params(options, type_set));
+                )*
+                hits
+            }
+        }
+    };
+}
+
+/// Generator for `UsesLifetimes` impls that unions the used lifetimes of the selected fields.
+///
+/// # Usage
+/// The macro takes the type implementing the trait as the first argument, then a comma-separated list of
+/// fields for the rest of its arguments.
+///
+/// The type of each passed-in field must implement `UsesLifetimes`, or the resulting code won't compile.
+#[macro_export]
+macro_rules! uses_lifetimes {
+    ($impl_type:ty, $accessor:ident) => {
+        impl $crate::usage::UsesLifetimes for $impl_type {
+            fn uses_lifetimes<'gen>(
+                &self,
+                options: &$crate::usage::Options,
+                type_set: &'gen $crate::usage::LifetimeSet
+            ) -> $crate::usage::LifetimeRefSet<'gen> {
+                self.$accessor.uses_lifetimes(options, type_set)
+            }
+        }
+    };
+    ($impl_type:ty, $first:ident, $($field:ident),+) => {
+        impl $crate::usage::UsesLifetimes for $impl_type {
+            fn uses_lifetimes<'gen>(
+                &self,
+                options: &$crate::usage::Options,
+                type_set: &'gen $crate::usage::LifetimeSet
+            ) -> $crate::usage::LifetimeRefSet<'gen> {
+                let mut hits = self.$first.uses_lifetimes(options, type_set);
+                $(
+                    hits.extend(self.$field.uses_lifetimes(options, type_set));
+                )*
+                hits
+            }
+        }
+    };
+}
--- a/third_party/rust/darling/tests/accrue_errors.rs
+++ b/third_party/rust/darling/tests/accrue_errors.rs
@@ -11,99 +11,104 @@ use darling::FromDeriveInput;
 #[derive(Debug, FromDeriveInput)]
 #[darling(attributes(accrue))]
 struct Lorem {
     ipsum: String,
     dolor: Dolor,
     data: ast::Data<(), LoremField>,
 }
 
-#[derive(Debug, FromMetaItem)]
+#[derive(Debug, FromMeta)]
 struct Dolor {
-    sit: bool
+    sit: bool,
 }
 
 #[derive(Debug, FromField)]
 #[darling(attributes(accrue))]
 struct LoremField {
     ident: Option<syn::Ident>,
     aliased_as: syn::Ident,
 }
 
 #[test]
 fn bad_type_and_missing_fields() {
-    let input = syn::parse_str(r#"
+    let input = syn::parse_str(
+        r#"
     #[accrue(ipsum = true, dolor(amet = "Hi"))]
     pub struct NonConforming {
         foo: ()
     }
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let s_result: ::darling::Error = Lorem::from_derive_input(&input).unwrap_err();
     //assert_eq!(3, s_result.len());
     let err = s_result.flatten();
     println!("{}", err);
     assert_eq!(3, err.len());
 }
 
 #[test]
 fn body_only_issues() {
-    let input = syn::parse_str(r#"
+    let input = syn::parse_str(
+        r#"
     #[accrue(ipsum = "Hello", dolor(sit))]
     pub struct NonConforming {
         foo: (),
         bar: bool,
     }
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let s_err: ::darling::Error = Lorem::from_derive_input(&input).unwrap_err();
     println!("{:?}", s_err);
     assert_eq!(2, s_err.len());
 }
 
-#[derive(Debug, FromMetaItem)]
+#[derive(Debug, FromMeta)]
 enum Week {
     Monday,
-    Tuesday {
-        morning: bool,
-        afternoon: String,
-    },
+    Tuesday { morning: bool, afternoon: String },
     Wednesday(Dolor),
 }
 
 #[derive(Debug, FromDeriveInput)]
 #[darling(attributes(accrue))]
 struct Month {
-    schedule: Week
+    schedule: Week,
 }
 
 #[test]
 fn error_in_enum_fields() {
-    let input = syn::parse_str(r#"
+    let input = syn::parse_str(
+        r#"
     #[accrue(schedule(tuesday(morning = "yes")))]
     pub struct NonConforming {
         foo: (),
         bar: bool,
     }
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let s_err: ::darling::Error = Month::from_derive_input(&input).unwrap_err();
     assert_eq!(2, s_err.len());
     let err = s_err.flatten();
     // TODO add tests to check location path is correct
     println!("{}", err);
 }
 
 #[test]
 fn error_in_newtype_variant() {
-    let input = syn::parse_str(r#"
+    let input = syn::parse_str(
+        r#"
     #[accrue(schedule(wednesday(sit = "yes")))]
     pub struct NonConforming {
         foo: (),
         bar: bool,
     }
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let s_err: ::darling::Error = Month::from_derive_input(&input).unwrap_err();
     assert_eq!(1, s_err.len());
     println!("{}", s_err);
     println!("{}", s_err.flatten());
 }
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling/tests/computed_bound.rs
@@ -0,0 +1,46 @@
+#[macro_use]
+extern crate darling;
+extern crate syn;
+
+use darling::FromDeriveInput;
+
+fn parse<T: FromDeriveInput>(src: &str) -> T {
+    let ast = syn::parse_str(src).unwrap();
+    FromDeriveInput::from_derive_input(&ast).unwrap()
+}
+
+#[derive(FromMeta, PartialEq, Eq, Debug)]
+enum Volume {
+    Whisper,
+    Talk,
+    Shout,
+}
+
+#[derive(FromDeriveInput)]
+#[darling(attributes(speak))]
+struct SpeakingOptions<T: Default, U> {
+    max_volume: U,
+    #[darling(skip)]
+    #[allow(dead_code)]
+    additional_data: T,
+}
+
+#[derive(Default)]
+struct Phoneme {
+    #[allow(dead_code)]
+    first: String,
+}
+
+#[test]
+fn skipped_field() {
+    let parsed: SpeakingOptions<Phoneme, Volume> = parse(
+        r#"
+        #[derive(Speak)]
+        #[speak(max_volume = "shout")]
+        enum HtmlElement {
+            Div(String)
+        }
+    "#,
+    );
+    assert_eq!(parsed.max_volume, Volume::Shout);
+}
--- a/third_party/rust/darling/tests/custom_bound.rs
+++ b/third_party/rust/darling/tests/custom_bound.rs
@@ -1,25 +1,25 @@
 #[macro_use]
 extern crate darling;
 extern crate syn;
 
 use std::ops::Add;
 
-#[derive(Debug, Clone, FromMetaItem)]
-#[darling(bound = "T: FromMetaItem + Add")]
+#[derive(Debug, Clone, FromMeta)]
+#[darling(bound = "T: FromMeta + Add")]
 struct Wrapper<T>(pub T);
 
 impl<T: Add> Add for Wrapper<T> {
     type Output = Wrapper<<T as Add>::Output>;
     fn add(self, rhs: Self) -> Wrapper<<T as Add>::Output> {
         Wrapper(self.0 + rhs.0)
     }
 }
 
 #[derive(Debug, FromDeriveInput)]
-#[darling(attributes(hello), bound = "Wrapper<T>: Add, T: FromMetaItem")]
+#[darling(attributes(hello), bound = "Wrapper<T>: Add, T: FromMeta")]
 struct Foo<T> {
     lorem: Wrapper<T>,
 }
 
 #[test]
 fn expansion() {}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling/tests/defaults.rs
@@ -0,0 +1,32 @@
+#[macro_use]
+extern crate darling;
+#[macro_use]
+extern crate quote;
+#[macro_use]
+extern crate syn;
+
+use darling::FromDeriveInput;
+
+mod foo {
+    pub mod bar {
+        pub fn init() -> String {
+            String::from("hello")
+        }
+    }
+}
+
+#[derive(FromDeriveInput)]
+#[darling(attributes(speak))]
+pub struct SpeakerOpts {
+    #[darling(default="foo::bar::init")]
+    first_word: String,
+}
+
+#[test]
+fn path_default() {
+    let speaker: SpeakerOpts = FromDeriveInput::from_derive_input(&parse_quote! {
+        struct Foo;
+    }).expect("Unit struct with no attrs should parse");
+
+    assert_eq!(speaker.first_word, "hello");
+}
\ No newline at end of file
--- a/third_party/rust/darling/tests/enums_newtype.rs
+++ b/third_party/rust/darling/tests/enums_newtype.rs
@@ -1,24 +1,24 @@
 #[macro_use]
 extern crate darling;
 
 use darling::FromDeriveInput;
 
 extern crate syn;
 
-#[derive(Debug, Default, PartialEq, Eq, FromMetaItem)]
+#[derive(Debug, Default, PartialEq, Eq, FromMeta)]
 #[darling(default)]
 pub struct Amet {
     hello: bool,
     world: String,
 }
 
-#[derive(Debug, PartialEq, Eq, FromMetaItem)]
-#[darling(rename_all="snake_case")]
+#[derive(Debug, PartialEq, Eq, FromMeta)]
+#[darling(rename_all = "snake_case")]
 pub enum Lorem {
     Ipsum(bool),
     Dolor(String),
     Sit(Amet),
 }
 
 #[derive(Debug, PartialEq, Eq, FromDeriveInput)]
 #[darling(attributes(hello))]
@@ -29,63 +29,76 @@ pub struct Holder {
 impl PartialEq<Lorem> for Holder {
     fn eq(&self, other: &Lorem) -> bool {
         self.lorem == *other
     }
 }
 
 #[test]
 fn bool_word() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[hello(lorem(ipsum))]
         pub struct Bar;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let pr = Holder::from_derive_input(&di).unwrap();
     assert_eq!(pr, Lorem::Ipsum(true));
 }
 
 #[test]
 fn bool_literal() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[hello(lorem(ipsum = false))]
         pub struct Bar;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let pr = Holder::from_derive_input(&di).unwrap();
     assert_eq!(pr, Lorem::Ipsum(false));
 }
 
 #[test]
 fn string_literal() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[hello(lorem(dolor = "Hello"))]
         pub struct Bar;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let pr = Holder::from_derive_input(&di).unwrap();
     assert_eq!(pr, Lorem::Dolor("Hello".to_string()));
 }
 
 #[test]
 fn struct_nested() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[hello(lorem(sit(world = "Hello", hello = false)))]
         pub struct Bar;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let pr = Holder::from_derive_input(&di).unwrap();
-    assert_eq!(pr, Lorem::Sit(Amet {
-        hello: false,
-        world: "Hello".to_string(),
-    }));
+    assert_eq!(
+        pr,
+        Lorem::Sit(Amet {
+            hello: false,
+            world: "Hello".to_string(),
+        })
+    );
 }
 
 #[test]
 #[should_panic]
 fn format_mismatch() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[hello(lorem(dolor(world = "Hello", hello = false)))]
         pub struct Bar;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     Holder::from_derive_input(&di).unwrap();
 }
--- a/third_party/rust/darling/tests/enums_struct.rs
+++ b/third_party/rust/darling/tests/enums_struct.rs
@@ -1,23 +1,16 @@
 //! Test expansion of enums which have struct variants.
 
 #[macro_use]
 extern crate darling;
 extern crate syn;
 
-#[derive(Debug, FromMetaItem)]
-#[darling(rename_all="snake_case")]
+#[derive(Debug, FromMeta)]
+#[darling(rename_all = "snake_case")]
 enum Message {
-    Hello {
-        user: String,
-        silent: bool
-    },
+    Hello { user: String, silent: bool },
     Ping,
-    Goodbye {
-        user: String,
-    }
+    Goodbye { user: String },
 }
 
 #[test]
-fn expansion() {
-    
-}
\ No newline at end of file
+fn expansion() {}
--- a/third_party/rust/darling/tests/enums_unit.rs
+++ b/third_party/rust/darling/tests/enums_unit.rs
@@ -1,18 +1,16 @@
 //! Test expansion of enum variants which have no associated data.
 
 #[macro_use]
 extern crate darling;
 extern crate syn;
 
-#[derive(Debug, FromMetaItem)]
-#[darling(rename_all="snake_case")]
+#[derive(Debug, FromMeta)]
+#[darling(rename_all = "snake_case")]
 enum Pattern {
     Owned,
     Immutable,
-    Mutable
+    Mutable,
 }
 
 #[test]
-fn expansion() {
-
-}
\ No newline at end of file
+fn expansion() {}
--- a/third_party/rust/darling/tests/error.rs
+++ b/third_party/rust/darling/tests/error.rs
@@ -1,16 +1,16 @@
 //! In case of bad input, parsing should fail. The error should have locations set in derived implementations.
 #[macro_use]
 extern crate darling;
 extern crate syn;
 
 use darling::FromDeriveInput;
 
-#[derive(Debug, FromMetaItem)]
+#[derive(Debug, FromMeta)]
 struct Dolor {
     #[darling(rename = "amet")]
     sit: bool,
     world: bool,
 }
 
 #[derive(Debug, FromDeriveInput)]
 #[darling(from_ident, attributes(hello))]
@@ -28,25 +28,29 @@ impl From<syn::Ident> for Lorem {
                 world: true,
             },
         }
     }
 }
 
 #[test]
 fn parsing_fail() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[hello(ipsum(amet = "yes", world = false))]
         pub struct Foo;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     println!("{}", Lorem::from_derive_input(&di).unwrap_err());
 }
 
 #[test]
 fn missing_field() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[hello(ipsum(amet = true))]
         pub struct Foo;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     println!("{}", Lorem::from_derive_input(&di).unwrap_err());
 }
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling/tests/from_generics.rs
@@ -0,0 +1,186 @@
+//! Tests for `FromGenerics`, and - indirectly - `FromGenericParam`.
+//! These tests assume `FromTypeParam` is working and only look at whether the wrappers for magic
+//! fields are working as expected.
+
+#[macro_use]
+extern crate darling;
+extern crate syn;
+
+use darling::ast::{self, GenericParamExt};
+use darling::util::{Ignored, WithOriginal};
+use darling::{FromDeriveInput, Result};
+
+#[derive(FromDeriveInput)]
+#[darling(attributes(lorem))]
+struct MyReceiver {
+    pub ident: syn::Ident,
+    pub generics: ast::Generics<ast::GenericParam<MyTypeParam>>,
+}
+
+#[derive(FromTypeParam)]
+#[darling(attributes(lorem))]
+struct MyTypeParam {
+    pub ident: syn::Ident,
+    #[darling(default)]
+    pub foo: bool,
+    #[darling(default)]
+    pub bar: Option<String>,
+}
+
+fn fdi<T: FromDeriveInput>(src: &str) -> Result<T> {
+    FromDeriveInput::from_derive_input(&syn::parse_str(src).expect("Source parses"))
+}
+
+/// Verify that `ast::Generics` is populated correctly when there is no generics declaration
+#[test]
+fn no_generics() {
+    let rec: MyReceiver = fdi("struct Baz;").expect("Input is well-formed");
+    assert!(rec.generics.where_clause.is_none());
+    assert_eq!(rec.generics.params.len(), 0);
+}
+
+#[test]
+fn expand_some() {
+    let rec: MyReceiver = fdi(r#"
+        struct Baz<
+            'a,
+            #[lorem(foo)] T,
+            #[lorem(bar = "x")] U: Eq + ?Sized
+        >(&'a T, U);
+    "#)
+        .expect("Input is well-formed");
+    assert!(rec.generics.where_clause.is_none());
+
+    // Make sure we've preserved the lifetime def, though we don't do anything with it.
+    assert!(rec.generics.params[0].as_lifetime_def().is_some());
+
+    let mut ty_param_iter = rec.generics.type_params();
+
+    let first = ty_param_iter
+        .next()
+        .expect("type_params should not be empty");
+    assert!(first.bar.is_none());
+    assert!(first.foo);
+    assert_eq!(first.ident, "T");
+
+    let second = ty_param_iter
+        .next()
+        .expect("type_params should have a second value");
+    assert_eq!(
+        second
+            .bar
+            .as_ref()
+            .expect("Second type param should set bar"),
+        "x"
+    );
+    assert_eq!(second.foo, false);
+    assert_eq!(second.ident, "U");
+}
+
+/// Verify ≀0.4.1 behavior - where `generics` had to be `syn::Generics` - keeps working.
+#[test]
+fn passthrough() {
+    #[derive(FromDeriveInput)]
+    struct PassthroughReceiver {
+        pub generics: syn::Generics,
+    }
+
+    let rec: PassthroughReceiver = fdi(r#"
+        struct Baz<
+            'a,
+            #[lorem(foo)] T,
+            #[lorem(bar = "x")] U: Eq + ?Sized
+        >(&'a T, U);
+    "#)
+        .expect("Input is well-formed");
+
+    let mut type_param_iter = rec.generics.type_params();
+    assert!(type_param_iter.next().is_some());
+}
+
+/// Verify that `where_clause` is passed through when it exists.
+/// As of 0.4.1, there is no `FromWhereClause` trait, so other types aren't supported
+/// for that field.
+#[test]
+fn where_clause() {
+    let rec: MyReceiver = fdi(r#"
+        struct Baz<
+            'a,
+            #[lorem(foo)] T,
+            #[lorem(bar = "x")] U: Eq + ?Sized
+        >(&'a T, U) where T: Into<String>;
+    "#)
+        .expect("Input is well-formed");
+
+    assert!(rec.generics.where_clause.is_some());
+}
+
+/// Test that `WithOriginal` works for generics.
+#[test]
+fn with_original() {
+    #[derive(FromDeriveInput)]
+    struct WorigReceiver {
+        generics: WithOriginal<ast::Generics<ast::GenericParam<MyTypeParam>>, syn::Generics>,
+    }
+
+    let rec: WorigReceiver = fdi(r#"
+        struct Baz<
+            'a,
+            #[lorem(foo)] T,
+            #[lorem(bar = "x")] U: Eq + ?Sized
+        >(&'a T, U) where T: Into<String>;
+    "#)
+        .expect("Input is well-formed");
+
+    // Make sure we haven't lost anything in the conversion
+    assert_eq!(rec.generics.parsed.params.len(), 3);
+    assert_eq!(
+        rec.generics
+            .original
+            .params
+            .iter()
+            .collect::<Vec<_>>()
+            .len(),
+        3
+    );
+
+    let parsed_t: &MyTypeParam = rec.generics.parsed.params[1]
+        .as_type_param()
+        .expect("Second argument should be type param");
+
+    // Make sure the first type param in each case is T
+    assert_eq!(parsed_t.ident, "T");
+    assert_eq!(
+        rec.generics
+            .original
+            .type_params()
+            .next()
+            .expect("First type param should exist")
+            .ident,
+        "T"
+    );
+
+    // Make sure we actually parsed the first type param
+    assert!(parsed_t.foo);
+    assert!(parsed_t.bar.is_none());
+}
+
+/// Make sure generics can be ignored
+#[test]
+fn ignored() {
+    #[derive(FromDeriveInput)]
+    struct IgnoredReceiver {
+        generics: Ignored,
+    }
+
+    let rec: IgnoredReceiver = fdi(r#"
+        struct Baz<
+            'a,
+            #[lorem(foo)] T,
+            #[lorem(bar = "x")] U: Eq + ?Sized
+        >(&'a T, U) where T: Into<String>;
+    "#)
+        .expect("Input is well-formed");
+
+    assert_eq!(Ignored, rec.generics);
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling/tests/from_type_param.rs
@@ -0,0 +1,63 @@
+#[macro_use]
+extern crate darling;
+extern crate syn;
+
+use darling::FromTypeParam;
+use syn::{DeriveInput, GenericParam, Ident, TypeParam};
+
+#[darling(attributes(lorem), from_ident)]
+#[derive(FromTypeParam)]
+struct Lorem {
+    ident: Ident,
+    bounds: Vec<syn::TypeParamBound>,
+    foo: bool,
+    bar: Option<String>,
+}
+
+impl From<Ident> for Lorem {
+    fn from(ident: Ident) -> Self {
+        Lorem {
+            ident,
+            foo: false,
+            bar: None,
+            bounds: Default::default(),
+        }
+    }
+}
+
+fn extract_type(param: &GenericParam) -> &TypeParam {
+    match *param {
+        GenericParam::Type(ref ty) => ty,
+        _ => unreachable!("Not a type param"),
+    }
+}
+
+#[test]
+fn expand_many() {
+    let di: DeriveInput = syn::parse_str(
+        r#"
+        struct Baz<
+            #[lorem(foo)] T,
+            #[lorem(bar = "x")] U: Eq + ?Sized
+        >(T, U);
+    "#,
+    ).unwrap();
+    let params = di.generics.params;
+
+    {
+        let ty = extract_type(&params[0]);
+        let lorem = Lorem::from_type_param(ty).unwrap();
+        assert_eq!(lorem.ident, "T");
+        assert_eq!(lorem.foo, true);
+        assert_eq!(lorem.bar, None);
+    }
+
+    {
+        let ty = extract_type(&params[1]);
+        let lorem = Lorem::from_type_param(ty).unwrap();
+        assert_eq!(lorem.ident, "U");
+        assert_eq!(lorem.foo, false);
+        assert_eq!(lorem.bar, Some("x".to_string()));
+        assert_eq!(lorem.bounds.len(), 2);
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling/tests/from_type_param_default.rs
@@ -0,0 +1,58 @@
+#[macro_use]
+extern crate darling;
+extern crate syn;
+
+use darling::FromTypeParam;
+use syn::{DeriveInput, GenericParam, TypeParam};
+
+#[darling(attributes(lorem), default)]
+#[derive(Default, FromTypeParam)]
+struct Lorem {
+    foo: bool,
+    bar: Option<String>,
+    default: Option<syn::Type>,
+}
+
+fn extract_type(param: &GenericParam) -> &TypeParam {
+    match *param {
+        GenericParam::Type(ref ty) => ty,
+        _ => unreachable!("Not a type param"),
+    }
+}
+
+#[test]
+fn expand_many() {
+    let di: DeriveInput = syn::parse_str(
+        r#"
+        struct Baz<
+            #[lorem(foo)] T,
+            #[lorem(bar = "x")] U: Eq + ?Sized,
+            #[lorem(foo = false)] V = (),
+        >(T, U, V);
+    "#,
+    ).unwrap();
+    let params = di.generics.params;
+
+    {
+        let ty = extract_type(&params[0]);
+        let lorem = Lorem::from_type_param(ty).unwrap();
+        assert_eq!(lorem.foo, true);
+        assert_eq!(lorem.bar, None);
+    }
+
+    {
+        let ty = extract_type(&params[1]);
+        let lorem = Lorem::from_type_param(ty).unwrap();
+        assert_eq!(lorem.foo, false);
+        assert_eq!(lorem.bar, Some("x".to_string()));
+        assert!(lorem.default.is_none());
+    }
+
+    {
+        let ty = extract_type(&params[2]);
+        let lorem = Lorem::from_type_param(ty).unwrap();
+        assert_eq!(lorem.foo, false);
+        assert_eq!(lorem.bar, None);
+        assert!(lorem.default.is_some());
+    }
+}
--- a/third_party/rust/darling/tests/from_variant.rs
+++ b/third_party/rust/darling/tests/from_variant.rs
@@ -19,11 +19,9 @@ impl From<syn::Ident> for Lorem {
             into: Default::default(),
             skip: Default::default(),
             fields: darling::ast::Style::Unit.into(),
         }
     }
 }
 
 #[test]
-fn expansion() {
-
-}
\ No newline at end of file
+fn expansion() {}
--- a/third_party/rust/darling/tests/generics.rs
+++ b/third_party/rust/darling/tests/generics.rs
@@ -1,25 +1,26 @@
 #[macro_use]
 extern crate darling;
 extern crate syn;
 
 use darling::FromDeriveInput;
 
-#[derive(Debug, Clone, FromMetaItem)]
+#[derive(Debug, Clone, FromMeta)]
 struct Wrapper<T>(pub T);
 
 #[derive(Debug, FromDeriveInput)]
 #[darling(attributes(hello))]
 struct Foo<T> {
     lorem: Wrapper<T>,
 }
 
 #[test]
 fn expansion() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[hello(lorem = "Hello")]
         pub struct Foo;
-    "#)
-        .unwrap();
+    "#,
+    ).unwrap();
 
     let _parsed = Foo::<String>::from_derive_input(&di).unwrap();
 }
--- a/third_party/rust/darling/tests/happy_path.rs
+++ b/third_party/rust/darling/tests/happy_path.rs
@@ -3,68 +3,78 @@ extern crate darling;
 
 #[macro_use]
 extern crate syn;
 #[macro_use]
 extern crate quote;
 
 use darling::FromDeriveInput;
 
-#[derive(Default, FromMetaItem, PartialEq, Debug)]
+#[derive(Default, FromMeta, PartialEq, Debug)]
 #[darling(default)]
 struct Lorem {
     ipsum: bool,
     dolor: Option<String>,
 }
 
 #[derive(FromDeriveInput, PartialEq, Debug)]
 #[darling(attributes(darling_demo))]
 struct Core {
     ident: syn::Ident,
     vis: syn::Visibility,
     generics: syn::Generics,
-    lorem: Lorem
+    lorem: Lorem,
 }
 
 #[derive(FromDeriveInput, PartialEq, Debug)]
 #[darling(attributes(darling_demo))]
 struct TraitCore {
     ident: syn::Ident,
     generics: syn::Generics,
     lorem: Lorem,
 }
 
 #[test]
 fn simple() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[derive(Foo)]
         #[darling_demo(lorem(ipsum))]
         pub struct Bar;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
-    assert_eq!(Core::from_derive_input(&di).unwrap(), Core {
-        ident: syn::Ident::from("Bar"),
-        vis: parse_quote!(pub),
-        generics: Default::default(),
-        lorem: Lorem {
-            ipsum: true,
-            dolor: None,
+    assert_eq!(
+        Core::from_derive_input(&di).unwrap(),
+        Core {
+            ident: parse_quote!(Bar),
+            vis: parse_quote!(pub),
+            generics: Default::default(),
+            lorem: Lorem {
+                ipsum: true,
+                dolor: None,
+            },
         }
-    });
+    );
 }
 
 #[test]
 fn trait_type() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[derive(Foo)]
         #[darling_demo(lorem(dolor = "hello"))]
         pub struct Bar;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
-    assert_eq!(TraitCore::from_derive_input(&di).unwrap(), TraitCore {
-        ident: syn::Ident::from("Bar"),
-        generics: Default::default(),
-        lorem: Lorem {
-            ipsum: false,
-            dolor: Some("hello".to_owned()),
+    assert_eq!(
+        TraitCore::from_derive_input(&di).unwrap(),
+        TraitCore {
+            ident: parse_quote!(Bar),
+            generics: Default::default(),
+            lorem: Lorem {
+                ipsum: false,
+                dolor: Some("hello".to_owned()),
+            }
         }
-    });
+    );
 }
--- a/third_party/rust/darling/tests/multiple.rs
+++ b/third_party/rust/darling/tests/multiple.rs
@@ -7,24 +7,29 @@ use darling::FromDeriveInput;
 #[derive(FromDeriveInput)]
 #[darling(attributes(hello))]
 #[allow(dead_code)]
 struct Lorem {
     ident: syn::Ident,
     ipsum: Ipsum,
 }
 
-#[derive(FromMetaItem)]
+#[derive(FromMeta)]
 struct Ipsum {
     #[darling(multiple)]
     dolor: Vec<String>,
 }
 
 #[test]
 fn expand_many() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[hello(ipsum(dolor = "Hello", dolor = "World"))]
         pub struct Baz;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let lorem: Lorem = Lorem::from_derive_input(&di).unwrap();
-    assert_eq!(lorem.ipsum.dolor, vec!["Hello".to_string(), "World".to_string()]);
+    assert_eq!(
+        lorem.ipsum.dolor,
+        vec!["Hello".to_string(), "World".to_string()]
+    );
 }
--- a/third_party/rust/darling/tests/newtype.rs
+++ b/third_party/rust/darling/tests/newtype.rs
@@ -1,30 +1,32 @@
-//! A newtype struct should be able to derive `FromMetaItem` if its member implements it.
+//! A newtype struct should be able to derive `FromMeta` if its member implements it.
 
 #[macro_use]
 extern crate darling;
 
 extern crate syn;
 
 use darling::FromDeriveInput;
 
-#[derive(Debug, FromMetaItem, PartialEq, Eq)]
+#[derive(Debug, FromMeta, PartialEq, Eq)]
 struct Lorem(bool);
 
 #[derive(Debug, FromDeriveInput)]
 #[darling(attributes(newtype))]
 struct DemoContainer {
-    lorem: Lorem
+    lorem: Lorem,
 }
 
 #[test]
 fn generated() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[derive(Baz)]
         #[newtype(lorem = false)]
         pub struct Foo;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let c = DemoContainer::from_derive_input(&di).unwrap();
 
     assert_eq!(c.lorem, Lorem(false));
 }
--- a/third_party/rust/darling/tests/skip.rs
+++ b/third_party/rust/darling/tests/skip.rs
@@ -11,36 +11,41 @@ use darling::FromDeriveInput;
 pub struct Lorem {
     ipsum: String,
 
     #[darling(skip)]
     dolor: u8,
 }
 
 /// Verify variant-level and field-level skip work correctly for enums.
-#[derive(Debug, FromMetaItem)]
+#[derive(Debug, FromMeta)]
 pub enum Sit {
     Amet(bool),
 
     #[darling(skip)]
     Foo {
         hello: bool,
     },
 
     Bar {
         hello: bool,
         #[darling(skip)]
-        world: u8
-    }
+        world: u8,
+    },
 }
 
 #[test]
 fn verify_skipped_field_not_required() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[skip_test(ipsum = "Hello")]
         struct Baz;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
-    assert_eq!(Lorem::from_derive_input(&di).unwrap(), Lorem {
-        ipsum: "Hello".to_string(),
-        dolor: 0,
-    });
+    assert_eq!(
+        Lorem::from_derive_input(&di).unwrap(),
+        Lorem {
+            ipsum: "Hello".to_string(),
+            dolor: 0,
+        }
+    );
 }
--- a/third_party/rust/darling/tests/split_declaration.rs
+++ b/third_party/rust/darling/tests/split_declaration.rs
@@ -13,49 +13,67 @@ use darling::{Error, FromDeriveInput};
 #[darling(attributes(split))]
 struct Lorem {
     foo: String,
     bar: bool,
 }
 
 #[test]
 fn split_attributes_accrue_to_instance() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[split(foo = "Hello")]
         #[split(bar)]
         pub struct Foo;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let parsed = Lorem::from_derive_input(&di).unwrap();
-    assert_eq!(parsed, Lorem {
-        foo: "Hello".to_string(),
-        bar: true,
-    });
+    assert_eq!(
+        parsed,
+        Lorem {
+            foo: "Hello".to_string(),
+            bar: true,
+        }
+    );
 }
 
 #[test]
 fn duplicates_across_split_attrs_error() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[split(foo = "Hello")]
         #[split(foo = "World", bar)]
         pub struct Foo;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let pr = Lorem::from_derive_input(&di);
-    assert_eq!(pr.unwrap_err().to_string(), Error::duplicate_field("foo").to_string());
+    assert_eq!(
+        pr.unwrap_err().to_string(),
+        Error::duplicate_field("foo").to_string()
+    );
 }
 
 #[test]
 fn multiple_errors_accrue_to_instance() {
-    let di = syn::parse_str(r#"
+    let di = syn::parse_str(
+        r#"
         #[split(foo = "Hello")]
         #[split(foo = "World")]
         pub struct Foo;
-    "#).unwrap();
+    "#,
+    ).unwrap();
 
     let pr = Lorem::from_derive_input(&di);
     let err: Error = pr.unwrap_err();
     assert_eq!(2, err.len());
     let mut errs = err.into_iter();
-    assert_eq!(errs.next().unwrap().to_string(), Error::duplicate_field("foo").to_string());
-    assert_eq!(errs.next().unwrap().to_string(), Error::missing_field("bar").to_string());
+    assert_eq!(
+        errs.next().unwrap().to_string(),
+        Error::duplicate_field("foo").to_string()
+    );
+    assert_eq!(
+        errs.next().unwrap().to_string(),
+        Error::missing_field("bar").to_string()
+    );
     assert!(errs.next().is_none());
 }
--- a/third_party/rust/darling/tests/supports.rs
+++ b/third_party/rust/darling/tests/supports.rs
@@ -1,45 +1,88 @@
 #[macro_use]
 extern crate darling;
 extern crate syn;
 
 use darling::ast;
 use darling::FromDeriveInput;
 
-#[derive(Debug,FromDeriveInput)]
+#[derive(Debug, FromDeriveInput)]
 #[darling(attributes(from_variants), supports(enum_any))]
 pub struct Container {
     data: ast::Data<Variant, ()>,
 }
 
 #[derive(Default, Debug, FromVariant)]
 #[darling(default, attributes(from_variants), supports(newtype, unit))]
 pub struct Variant {
     into: Option<bool>,
     skip: Option<bool>,
 }
 
-#[test]
-fn expansion() {
-    let di = syn::parse_str(r#"
+#[derive(Debug, FromDeriveInput)]
+#[darling(attributes(from_struct), supports(struct_named))]
+pub struct StructContainer {
+    data: ast::Data<(), syn::Field>,
+}
+
+mod source {
+    use syn::{self, DeriveInput};
+
+    pub fn newtype_enum() -> DeriveInput {
+        syn::parse_str(
+            r#"
         enum Hello {
             World(bool),
             String(String),
         }
-    "#).unwrap();
+    "#,
+        ).unwrap()
+    }
 
-    Container::from_derive_input(&di).unwrap();
-}
-
-#[test]
-fn unsupported_shape() {
-    let di = syn::parse_str(r#"
+    pub fn named_field_enum() -> DeriveInput {
+        syn::parse_str(
+            r#"
         enum Hello {
             Foo(u16),
             World {
                 name: String
             },
         }
-    "#).unwrap();
+    "#,
+        ).unwrap()
+    }
+
+    pub fn named_struct() -> DeriveInput {
+        syn::parse_str(
+            r#"
+        struct Hello {
+            world: bool,
+        }
+    "#,
+        ).unwrap()
+    }
+
+    pub fn tuple_struct() -> DeriveInput {
+        syn::parse_str("struct Hello(String, bool);").unwrap()
+    }
+}
 
-    Container::from_derive_input(&di).unwrap_err();
+#[test]
+fn enum_newtype_or_unit() {
+    // Should pass
+    Container::from_derive_input(&source::newtype_enum()).unwrap();
+
+    // Should error
+    Container::from_derive_input(&source::named_field_enum()).unwrap_err();
+    Container::from_derive_input(&source::named_struct()).unwrap_err();
 }
+
+#[test]
+fn struct_named() {
+    // Should pass
+    StructContainer::from_derive_input(&source::named_struct()).unwrap();
+
+    // Should fail
+    StructContainer::from_derive_input(&source::tuple_struct()).unwrap_err();
+    StructContainer::from_derive_input(&source::named_field_enum()).unwrap_err();
+    StructContainer::from_derive_input(&source::newtype_enum()).unwrap_err();
+}
--- a/third_party/rust/darling_core/.cargo-checksum.json
+++ b/third_party/rust/darling_core/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"06561e115990be3f278ed12704d0eb575c971242cbdfe8ebb32a8132280e054e","src/ast.rs":"2538b41e2a579c0a5a49e02f911120ffff39d48dfc0d80570a5fcfe95c971794","src/codegen/default_expr.rs":"28d750fb5ed3a6344007bf545c48e4d9a15c175209903d4009efc0de257adf2e","src/codegen/error.rs":"2a1bde9a20c664f26c6a0017e35ddf82885a31b8be42a628ea5549013b1eab44","src/codegen/field.rs":"ad8355c7bb87269c7dcc1d27695b0f8de410b546625d33d5a219fbadf85f8230","src/codegen/fmi_impl.rs":"89a66b24d7527989dd90ca71d9409fd8cdcf3a659fa1a670448032a4b384e83c","src/codegen/from_derive_impl.rs":"36507c9eddd354a50f96cd28e737c914be494c83ae61202b533524a9d90a2ca9","src/codegen/from_field.rs":"586866442f6628fd055f139b018a8c5c13e3aea20954ec741517aa9ab731c163","src/codegen/from_variant_impl.rs":"d42ecd82d3159aa7ee89ed81ed355c927dea9df2a298cf1db0c486699b77eac2","src/codegen/mod.rs":"46cdb1b4a76eb2e56f01e2c9e2879aed9b1c21ecbed42575a2eeccabf446a27a","src/codegen/outer_from_impl.rs":"2314c1594bd63e682ebd4a4b4954b2b9f16aa50b1422c05568bce97ae29f9727","src/codegen/trait_impl.rs":"715ce9dcb82d855e9dd8f2a70599bc3c5328acde70c92b7db5bd4c276598a7d0","src/codegen/variant.rs":"294045aefcfcb54e8b9536d6d91251a46115271869578b3212ae36ae76883b18","src/codegen/variant_data.rs":"efdee90d7e9acce39672024502ceb0616bc162d11e59d255fcbcd23f00f80806","src/error.rs":"55f33c960123799e1ccb27676d780751c0b62d1f52ccb9a2ac69cea4acfe55db","src/from_derive_input.rs":"ea55cc1b2bc17495d36fb616f7cd7aa78e4b74ea7c8554eed9d392ee853700c3","src/from_field.rs":"b42c2fc037aebdd55f195d722ba20075d3e095f03e89890a0d37d406d6419d87","src/from_meta_item.rs":"996ccec9dca998ff41f65bb346e5cc75952af5d61339c6951bebdbf8db1212c5","src/from_variant.rs":"2baeb09c8a95ff606d9d5ca8992f10bbad9c4925590332af1a8b5bdae54ebae8","src/lib.rs":"58b910cecc1f1962c2d6059db384f065099547c34631d9ddcc35099db8e16405","src/macros.rs":"ef249cd9ca593aac423b4242df1c39c31610438da094c21562d74a7e5823c700","src/options/core.rs":"689067ee0901714e53caeef5d5634c4bc02f52ff06e3ff286410eecaca665734","src/options/forward_attrs.rs":"35a83a4ae695872413d964d9050e35a0075c8386c286d291b1ecf1779f9ba8a3","src/options/from_derive.rs":"502e18c3d9f90d7a4cebc8c6b60181ab6068958a0ba2e70fe645528dee34b231","src/options/from_field.rs":"7222be5e62026184169f12adb08403abc89d66c53e678f8d8b43afaeceed9e4f","src/options/from_meta_item.rs":"cbc2d747e9e35e0d68b26c9f1592914bb4924cac01a6cdaf9137f643a72b551a","src/options/from_variant.rs":"6f8538da3fb61e614552839ee32bc479d33b5227d7f9d9b357d8d05146b96dac","src/options/input_field.rs":"6d43c2907694c4187e9f182f7945fc769ce210cde8eb1b4a336dea2a7fce3710","src/options/input_variant.rs":"2fc064fb87a73542a012a31aa5fd9702cf58b52a1bf37dabbfa7fb2e758ff9cc","src/options/mod.rs":"ceefde4d1dba9b5f3822f667c34a6eb963e5a899973475456bfe7939177f0e19","src/options/outer_from.rs":"3125aad9f8c033727fd3ef4ef1e1881c77fa52463f78342c408bf135e8533037","src/options/shape.rs":"118af560da80a46d6e3f8980c3d9b4863319d224a8b2985520901bfea0eba531","src/util/ident_list.rs":"11b5008380ace89d5745cdd83b73a2841c5382f05d3a8942ba998a7e4d6abb31","src/util/ignored.rs":"66e2e3201e17e8fffe2f249a4327b8178a20304624a47c0149fe8dd5e05d187c","src/util/mod.rs":"0c9ee0ba8ec03ca654fd298bd0d82588f224e3743227e6cba2beba4ab2f4dee4","src/util/over_ride.rs":"f63637ff73b3f377a4b1c38714a0f108b98ff40a96dd3ffbebb1e4ecc7523813"},"package":"b315f49c7b6db3708bca6e6913c194581a44ec619b7a39e131d4dd63733a3698"}
\ No newline at end of file
+{"files":{"Cargo.toml":"f7061460abe53907c290c7975f49077a6c698e4acc9034d3e904c63a224dbd21","src/ast/data.rs":"c95e469d870f7918e77707da0e9e5e945e205e640bf34637355ef863b6efb28f","src/ast/generics.rs":"3bdfe1abdbee64f5aaa9b189dc5c58e222568f196ed206e9d6d91ea5f29673e7","src/ast/mod.rs":"58a58eeb1db7682e5994732cc8eb04088f6ca662805460ef443cf089e5c24e2c","src/codegen/attr_extractor.rs":"d13a3ba16f3a93f4a540421bb9df54a8f74cc6ee0e9e769b78b6c8045f285408","src/codegen/default_expr.rs":"60f23b77ddf80da70ec92fd0d8cb5a97143535df85eafa0e47943ac797ec46d2","src/codegen/error.rs":"50d0a1a2a392560ca10d3eb622ba745612761bf18846404742bd30caf2436228","src/codegen/field.rs":"d8b20dd1dda2c5591f5dcd4a2e5b8442ffae3daa23378323a81a682637080ea1","src/codegen/from_derive_impl.rs":"2a1e331d205db9334218b800760afcb64539fa2b25b0b2b014586b49b5b25882","src/codegen/from_field.rs":"af6f848ed7c6d2274e15d6307b011a1b8bcba66172ef68b0e665c9b4ae85157d","src/codegen/from_meta_impl.rs":"a937808b081e5d8bd16020fea8da0461e7e45872516cc0ee9e8a8cc957858a76","src/codegen/from_type_param.rs":"48493227f4a81fe1a533bd958b89207d56b1c70f754a2a28fb0e9eb9114a9aeb","src/codegen/from_variant_impl.rs":"3d9b10d60e3eb969946bbd210ce93a43375b9c8d3ffa827c7e87ab9235e2c3f3","src/codegen/mod.rs":"2dc3ee7f18177b2ef9c27c4f0cabc5bbd49f970abdba28a0539d81c70d81b6e2","src/codegen/outer_from_impl.rs":"059c3c05e4d6c7ba3876d23855ccbffa9e6158e7af7f6dc619b4d9770587f161","src/codegen/trait_impl.rs":"0e479f9e5b7253a3da2f77fd0bd63ea44a08a27dba2bd7dd992f05dc40b1d2a2","src/codegen/variant.rs":"3bc37ceb0e3dbf7eb02d7b66178adb3b165a24e92afa3295c012cf2f091d7328","src/codegen/variant_data.rs":"2467651663bfbb0ab35370b421d456948b053c26d0a23581a6c91ae7789b2db3","src/error.rs":"77436dc9a30172e94c434bdb61e3620ce37b2d64848a4fa19daba6e9c9329c95","src/from_derive_input.rs":"b2a04fefa4e14684061c819387ea0384297c67c7f50d5d0959aa69ab19075e76","src/from_field.rs":"f667924422ab4ab8d8b16ebfd42f61e74864cfaa80e96b49de5d1e1287e3d1d3","src/from_generic_param.rs":"49c5a8335eb0a9010998c5600c95c89440f7febe03265afb625d818dbc883d92","src/from_generics.rs":"7285b0fd213507e87c1da413cd1bc9eeada485d4a8f9d19630848d02a4d41c4a","src/from_meta.rs":"daa3d9a82b2f659147572f7d0e7fdef38139583e61e8319986098a4a73106453","src/from_type_param.rs":"9b611f276871002ade78146266fde3b6f9101b360082681a2fa2dafc16431f84","src/from_variant.rs":"70a23b5b4cb93c7e5a498fe9d16420b9b93bd69c1376d7703bc7cefd9417d159","src/lib.rs":"ea8f2d28793e4c0e367c4905e55e405417fbee9eb7ef0577f883b91aee1b5a57","src/macros_private.rs":"ef249cd9ca593aac423b4242df1c39c31610438da094c21562d74a7e5823c700","src/macros_public.rs":"3ed7eb99f309d9cd600d3a09ff4dcf5cc5d787fb49e8e5ead6bb00e31e5e6793","src/options/core.rs":"2dfb29a85a68d5ed6dccc46fe521c46ea8483bcd5d73cf21dbf21a7163ec318a","src/options/forward_attrs.rs":"89d8294a2204d6c32e5f58b797c23f4b035a8ff424bcf1b1c7db973ada89a4bc","src/options/from_derive.rs":"c8e41d2779e570dadd76c28b9cc9dd9cee57d8ef027766b4b5f39460a29df5d1","src/options/from_field.rs":"0b06590092a5c13d5c8eedf4e2d0518d869206813f828a06c65605d6cb8decc4","src/options/from_meta.rs":"ef268f78480f1d3df4e56cbc630aa4013ab5128cbb4471c4e85e9ff5a3980e7b","src/options/from_type_param.rs":"80d1fa60bac5bb31d0895e321faf1b8af99e407d9594028a01704b424be1dd4c","src/options/from_variant.rs":"99d4b60e48f8feef9c1fc2414ac0a420e66551c14e40c4a718668cca8e1f8cb5","src/options/input_field.rs":"08a5c584ccbb96ca11d2e58572ee654c269672f81cd76f9e2f29c3c23577c998","src/options/input_variant.rs":"29c39072f250dae92acf362185f81ea3ceac210e556f861e6cc0c87b043764dd","src/options/mod.rs":"30aefb531716954bad2b484c321baa333ef1d7d07ca55a0430df26bf4c1afb15","src/options/outer_from.rs":"e60196f2b9ea3ae014eaf3444607c6cf2a227c8d8aa4a5d64f59454602a0a5e6","src/options/shape.rs":"f6c110134954c62377e81d17e3fe623a9750ca7eb99eab853add114180f55904","src/usage/generics_ext.rs":"340774fe43033680e6b494c76dd4f558ada7ca4f09e91f9e4d076f125a729fc2","src/usage/ident_set.rs":"30edb2f0a599284967e3c6b579da31e5f9b15f3dd67bc9a82d6335eb44133df0","src/usage/lifetimes.rs":"19a63490660eb416bbccd4be9c060079a630dd15d5fd23c39e3c6c8c5498e369","src/usage/mod.rs":"bcf0ffb2257aed3b7b2cdad91c0136743384f39ff8f61f25c195c73b8fcdf144","src/usage/options.rs":"0491c995aad0d55783b24cce8a4e40f0f4435988c54ce2ded34763ac9b199fcf","src/usage/type_params.rs":"5aecf7f89c4b0623010e4717f5b32388b06d15e8511fde7b72f1d72e88fd3cb0","src/util/ident_list.rs":"fb6314436435547c111539213b209abd8d2593c28331560b84468a03b52d7c44","src/util/ident_string.rs":"06441e502d3bad342e292e42d083aff9070735a93d45f204aee5ef5f0144fdd0","src/util/ignored.rs":"7c979fbef880498ff64efda7396e759d80bf77fb1c7df0313bed8e533a16c0e0","src/util/mod.rs":"027793775e7079ea425f45b9bdad8b8fa309defcee02bf8ee6b6c556ec016342","src/util/over_ride.rs":"e90b3aeb41dd3364753f3ee6f8c6bbd85bf51d51569bf048396ec6e7735c569f","src/util/with_original.rs":"a545b38ba9d624fdc939eb844f001b7fc4102717b1d3683b4cbd0aae00fa7ef2"},"package":"86bc5ce438f4b703755d12f59bbf0a16c642766d4534e922db47569dbdd0b998"}
\ No newline at end of file
--- a/third_party/rust/darling_core/Cargo.toml
+++ b/third_party/rust/darling_core/Cargo.toml
@@ -7,28 +7,31 @@
 #
 # 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 = "darling_core"
-version = "0.4.0"
+version = "0.8.0"
 authors = ["Ted Driggs <ted.driggs@outlook.com>"]
 description = "Helper crate for proc-macro library for reading attributes into structs when\nimplementing custom derives. Use https://crates.io/crates/darling in your code.\n"
 license = "MIT"
 repository = "https://github.com/TedDriggs/darling"
+[dependencies.fnv]
+version = "1.0.6"
+
 [dependencies.ident_case]
 version = "1.0.0"
 
 [dependencies.proc-macro2]
-version = "0.3"
+version = "0.4.2"
 
 [dependencies.quote]
-version = "0.5"
+version = "0.6"
 
 [dependencies.syn]
-version = "0.13"
+version = "0.15"
 features = ["extra-traits"]
 
 [features]
 default = ["syn/full"]
deleted file mode 100644
--- a/third_party/rust/darling_core/src/ast.rs
+++ /dev/null
@@ -1,290 +0,0 @@
-//! Utility types for working with the AST.
-
-use syn;
-
-use {Error, FromField, FromVariant, Result};
-
-/// A struct or enum body. 
-///
-/// `V` is the type which receives any encountered variants, and `F` receives struct fields.
-#[derive(Debug, Clone, PartialEq, Eq)]
-pub enum Data<V, F> {
-    Enum(Vec<V>),
-    Struct(Fields<F>),
-}
-
-#[deprecated(since="0.3", note="this has been renamed to Data")]
-pub type Body<V, F> = Data<V, F>;
-
-impl<V, F> Data<V, F> {
-    /// Creates an empty body of the same shape as the passed-in body.
-    pub fn empty_from(src: &syn::Data) -> Self {
-        match *src {
-            syn::Data::Enum(_) => Data::Enum(vec![]),
-            syn::Data::Struct(ref vd) => Data::Struct(Fields::empty_from(&vd.fields)),
-            syn::Data::Union(_) => unreachable!(),
-        }
-    }
-
-    /// Creates a new `Data<&'a V, &'a F>` instance from `Data<V, F>`.
-    pub fn as_ref<'a>(&'a self) -> Data<&'a V, &'a F> {
-        match *self {
-            Data::Enum(ref variants) => Data::Enum(variants.into_iter().collect()),
-            Data::Struct(ref data) => Data::Struct(data.as_ref()),
-        }
-    }
-
-    /// Applies a function `V -> U` on enum variants, if this is an enum.
-    pub fn map_enum_variants<T, U>(self, map: T) -> Data<U, F>
-        where T: FnMut(V) -> U
-    {
-        match self {
-            Data::Enum(v) => Data::Enum(v.into_iter().map(map).collect()),
-            Data::Struct(f) => Data::Struct(f),
-        }
-    }
-
-    /// Applies a function `F -> U` on struct fields, if this is a struct.
-    pub fn map_struct_fields<T, U>(self, map: T) -> Data<V, U>
-        where T: FnMut(F) -> U
-    {
-        match self {
-            Data::Enum(v) => Data::Enum(v),
-            Data::Struct(f) => Data::Struct(f.map(map)),
-        }
-    }
-
-    /// Applies a function to the `Fields` if this is a struct.
-    pub fn map_struct<T, U>(self, mut map: T) -> Data<V, U>
-        where T: FnMut(Fields<F>) -> Fields<U>
-    {
-        match self {
-            Data::Enum(v) => Data::Enum(v),
-            Data::Struct(f) => Data::Struct(map(f)),
-        }
-    }
-
-    /// Consumes the `Data`, returning `Fields<F>` if it was a struct.
-    pub fn take_struct(self) -> Option<Fields<F>> {
-        match self {
-            Data::Enum(_) => None,
-            Data::Struct(f) => Some(f),
-        }
-    }
-
-    /// Consumes the `Data`, returning `Vec<V>` if it was an enum.
-    pub fn take_enum(self) -> Option<Vec<V>> {
-        match self {
-            Data::Enum(v) => Some(v),
-            Data::Struct(_) => None,
-        }
-    }
-
-    /// Returns `true` if this instance is `Data::Enum`.
-    pub fn is_enum(&self) -> bool {
-        match *self {
-            Data::Enum(_) => true,
-            Data::Struct(_) => false,
-        }
-    }
-
-    /// Returns `true` if this instance is `Data::Struct`.
-    pub fn is_struct(&self) -> bool {
-        !self.is_enum()
-    }
-}
-
-impl<V: FromVariant, F: FromField> Data<V, F> {
-    /// Attempt to convert from a `syn::Data` instance.
-    pub fn try_from(body: &syn::Data) -> Result<Self> {
-        match *body {
-            syn::Data::Enum(ref data) => {
-                let mut items = Vec::with_capacity(data.variants.len());
-                let mut errors = Vec::new();
-                for v_result in data.variants.clone().into_iter().map(|v| FromVariant::from_variant(&v)) {
-                    match v_result {
-                        Ok(val) => items.push(val),
-                        Err(err) => errors.push(err)
-                    }
-                }
-
-                if !errors.is_empty() {
-                    Err(Error::multiple(errors))
-                } else {
-                    Ok(Data::Enum(items))
-                }
-            }
-            syn::Data::Struct(ref data) => Ok(Data::Struct(Fields::try_from(&data.fields)?)),
-            syn::Data::Union(_) => unreachable!(),
-        }
-    }
-}
-
-#[derive(Debug, Clone, PartialEq, Eq)]
-pub struct Fields<T> {
-    pub style: Style,
-    pub fields: Vec<T>,
-}
-
-#[deprecated(since="0.3", note="this has been renamed to Fields")]
-pub type VariantData<T> = Fields<T>;
-
-impl<T> Fields<T> {
-    pub fn empty_from(vd: &syn::Fields) -> Self {
-        Fields {
-            style: vd.into(),
-            fields: Vec::new(),
-        }
-    }
-
-    /// Splits the `Fields` into its style and fields for further processing.
-    /// Returns an empty `Vec` for `Unit` data.
-    pub fn split(self) -> (Style, Vec<T>) {
-        (self.style, self.fields)
-    }
-
-    /// Returns true if this variant's data makes it a newtype.
-    pub fn is_newtype(&self) -> bool {
-        self.style == Style::Tuple && self.fields.len() == 1
-    }
-
-    pub fn is_unit(&self) -> bool {
-        self.style.is_unit()
-    }
-
-    pub fn is_tuple(&self) -> bool {
-        self.style.is_tuple()
-    }
-
-    pub fn is_struct(&self) -> bool {
-        self.style.is_struct()
-    }
-
-    pub fn as_ref<'a>(&'a self) -> Fields<&'a T> {
-        Fields {
-            style: self.style,
-            fields: self.fields.iter().collect(),
-        }
-    }
-
-    pub fn map<F, U>(self, map: F) -> Fields<U> where F: FnMut(T) -> U {
-        Fields {
-            style: self.style,
-            fields: self.fields.into_iter().map(map).collect()
-        }
-    }
-}
-
-impl<F: FromField> Fields<F> {
-    pub fn try_from(fields: &syn::Fields) -> Result<Self> {
-        let (items, errors) = match *fields {
-            syn::Fields::Named(ref fields) => {
-                let mut items = Vec::with_capacity(fields.named.len());
-                let mut errors = Vec::new();
-
-                for field in &fields.named {
-                    let f_result = FromField::from_field(field);
-                    match f_result {
-                        Ok(val) => items.push(val),
-                        Err(err) => errors.push(if let Some(ref ident) = field.ident {
-                            err.at(ident.as_ref())
-                        } else {
-                            err
-                        })
-                    }
-                }
-
-                (items, errors)
-            }
-            syn::Fields::Unnamed(ref fields) => {
-                let mut items = Vec::with_capacity(fields.unnamed.len());
-                let mut errors = Vec::new();
-
-                for field in &fields.unnamed {
-                    let f_result = FromField::from_field(field);
-                    match f_result {
-                        Ok(val) => items.push(val),
-                        Err(err) => errors.push(if let Some(ref ident) = field.ident {
-                            err.at(ident.as_ref())
-                        } else {
-                            err
-                        })
-                    }
-                }
-
-                (items, errors)
-            }
-            syn::Fields::Unit => (vec![], vec![]),
-        };
-
-
-        if !errors.is_empty() {
-            Err(Error::multiple(errors))
-        } else {
-            Ok(Fields {
-                style: fields.into(),
-                fields: items,
-            })
-        }
-    }
-}
-
-impl<T> From<Style> for Fields<T> {
-    fn from(style: Style) -> Self {
-        Fields {
-            style,
-            fields: Vec::new(),
-        }
-    }
-}
-
-impl<T, U: Into<Vec<T>>> From<(Style, U)> for Fields<T> {
-    fn from((style, fields): (Style, U)) -> Self {
-        style.with_fields(fields)
-    }
-}
-
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
-pub enum Style {
-    Tuple,
-    Struct,
-    Unit,
-}
-
-impl Style {
-    pub fn is_unit(&self) -> bool {
-        *self == Style::Unit
-    }
-
-    pub fn is_tuple(&self) -> bool {
-        *self == Style::Tuple
-    }
-
-    pub fn is_struct(&self) -> bool {
-        *self == Style::Struct
-    }
-
-    /// Creates a new `Fields` of the specified style with the passed-in fields.
-    fn with_fields<T, U: Into<Vec<T>>>(self, fields: U) -> Fields<T> {
-        Fields {
-            style: self,
-            fields: fields.into(),
-        }
-    }
-}
-
-impl From<syn::Fields> for Style {
-    fn from(vd: syn::Fields) -> Self {
-        (&vd).into()
-    }
-}
-
-impl<'a> From<&'a syn::Fields> for Style {
-    fn from(vd: &syn::Fields) -> Self {
-        match *vd {
-            syn::Fields::Named(_) => Style::Struct,
-            syn::Fields::Unnamed(_) => Style::Tuple,
-            syn::Fields::Unit => Style::Unit,
-        }
-    }
-}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling_core/src/ast/data.rs
@@ -0,0 +1,352 @@
+use std::slice;
+
+use syn;
+
+use usage::{
+    self, IdentRefSet, IdentSet, LifetimeRefSet, LifetimeSet, UsesLifetimes, UsesTypeParams,
+};
+use {Error, FromField, FromVariant, Result};
+
+/// A struct or enum body.
+///
+/// `V` is the type which receives any encountered variants, and `F` receives struct fields.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub enum Data<V, F> {
+    Enum(Vec<V>),
+    Struct(Fields<F>),
+}
+
+#[deprecated(since = "0.3", note = "this has been renamed to Data")]
+pub type Body<V, F> = Data<V, F>;
+
+impl<V, F> Data<V, F> {
+    /// Creates an empty body of the same shape as the passed-in body.
+    pub fn empty_from(src: &syn::Data) -> Self {
+        match *src {
+            syn::Data::Enum(_) => Data::Enum(vec![]),
+            syn::Data::Struct(ref vd) => Data::Struct(Fields::empty_from(&vd.fields)),
+            syn::Data::Union(_) => unreachable!(),
+        }
+    }
+
+    /// Creates a new `Data<&'a V, &'a F>` instance from `Data<V, F>`.
+    pub fn as_ref<'a>(&'a self) -> Data<&'a V, &'a F> {
+        match *self {
+            Data::Enum(ref variants) => Data::Enum(variants.into_iter().collect()),
+            Data::Struct(ref data) => Data::Struct(data.as_ref()),
+        }
+    }
+
+    /// Applies a function `V -> U` on enum variants, if this is an enum.
+    pub fn map_enum_variants<T, U>(self, map: T) -> Data<U, F>
+    where
+        T: FnMut(V) -> U,
+    {
+        match self {
+            Data::Enum(v) => Data::Enum(v.into_iter().map(map).collect()),
+            Data::Struct(f) => Data::Struct(f),
+        }
+    }
+
+    /// Applies a function `F -> U` on struct fields, if this is a struct.
+    pub fn map_struct_fields<T, U>(self, map: T) -> Data<V, U>
+    where
+        T: FnMut(F) -> U,
+    {
+        match self {
+            Data::Enum(v) => Data::Enum(v),
+            Data::Struct(f) => Data::Struct(f.map(map)),
+        }
+    }
+
+    /// Applies a function to the `Fields` if this is a struct.
+    pub fn map_struct<T, U>(self, mut map: T) -> Data<V, U>
+    where
+        T: FnMut(Fields<F>) -> Fields<U>,
+    {
+        match self {
+            Data::Enum(v) => Data::Enum(v),
+            Data::Struct(f) => Data::Struct(map(f)),
+        }
+    }
+
+    /// Consumes the `Data`, returning `Fields<F>` if it was a struct.
+    pub fn take_struct(self) -> Option<Fields<F>> {
+        match self {
+            Data::Enum(_) => None,
+            Data::Struct(f) => Some(f),
+        }
+    }
+
+    /// Consumes the `Data`, returning `Vec<V>` if it was an enum.
+    pub fn take_enum(self) -> Option<Vec<V>> {
+        match self {
+            Data::Enum(v) => Some(v),
+            Data::Struct(_) => None,
+        }
+    }
+
+    /// Returns `true` if this instance is `Data::Enum`.
+    pub fn is_enum(&self) -> bool {
+        match *self {
+            Data::Enum(_) => true,
+            Data::Struct(_) => false,
+        }
+    }
+
+    /// Returns `true` if this instance is `Data::Struct`.
+    pub fn is_struct(&self) -> bool {
+        !self.is_enum()
+    }
+}
+
+impl<V: FromVariant, F: FromField> Data<V, F> {
+    /// Attempt to convert from a `syn::Data` instance.
+    pub fn try_from(body: &syn::Data) -> Result<Self> {
+        match *body {
+            syn::Data::Enum(ref data) => {
+                let mut items = Vec::with_capacity(data.variants.len());
+                let mut errors = Vec::new();
+                for v_result in data.variants
+                    .clone()
+                    .into_iter()
+                    .map(|v| FromVariant::from_variant(&v))
+                {
+                    match v_result {
+                        Ok(val) => items.push(val),
+                        Err(err) => errors.push(err),
+                    }
+                }
+
+                if !errors.is_empty() {
+                    Err(Error::multiple(errors))
+                } else {
+                    Ok(Data::Enum(items))
+                }
+            }
+            syn::Data::Struct(ref data) => Ok(Data::Struct(Fields::try_from(&data.fields)?)),
+            syn::Data::Union(_) => unreachable!(),
+        }
+    }
+}
+
+impl<V: UsesTypeParams, F: UsesTypeParams> UsesTypeParams for Data<V, F> {
+    fn uses_type_params<'a>(
+        &self,
+        options: &usage::Options,
+        type_set: &'a IdentSet,
+    ) -> IdentRefSet<'a> {
+        match *self {
+            Data::Struct(ref v) => v.uses_type_params(options, type_set),
+            Data::Enum(ref v) => v.uses_type_params(options, type_set),
+        }
+    }
+}
+
+impl<V: UsesLifetimes, F: UsesLifetimes> UsesLifetimes for Data<V, F> {
+    fn uses_lifetimes<'a>(
+        &self,
+        options: &usage::Options,
+        lifetimes: &'a LifetimeSet,
+    ) -> LifetimeRefSet<'a> {
+        match *self {
+            Data::Struct(ref v) => v.uses_lifetimes(options, lifetimes),
+            Data::Enum(ref v) => v.uses_lifetimes(options, lifetimes),
+        }
+    }
+}
+
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct Fields<T> {
+    pub style: Style,
+    pub fields: Vec<T>,
+}
+
+#[deprecated(since = "0.3", note = "this has been renamed to Fields")]
+pub type VariantData<T> = Fields<T>;
+
+impl<T> Fields<T> {
+    pub fn empty_from(vd: &syn::Fields) -> Self {
+        Fields {
+            style: vd.into(),
+            fields: Vec::new(),
+        }
+    }
+
+    /// Splits the `Fields` into its style and fields for further processing.
+    /// Returns an empty `Vec` for `Unit` data.
+    pub fn split(self) -> (Style, Vec<T>) {
+        (self.style, self.fields)
+    }
+
+    /// Returns true if this variant's data makes it a newtype.
+    pub fn is_newtype(&self) -> bool {
+        self.style == Style::Tuple && self.fields.len() == 1
+    }
+
+    pub fn is_unit(&self) -> bool {
+        self.style.is_unit()
+    }
+
+    pub fn is_tuple(&self) -> bool {
+        self.style.is_tuple()
+    }
+
+    pub fn is_struct(&self) -> bool {
+        self.style.is_struct()
+    }
+
+    pub fn as_ref<'a>(&'a self) -> Fields<&'a T> {
+        Fields {
+            style: self.style,
+            fields: self.fields.iter().collect(),
+        }
+    }
+
+    pub fn map<F, U>(self, map: F) -> Fields<U>
+    where
+        F: FnMut(T) -> U,
+    {
+        Fields {
+            style: self.style,
+            fields: self.fields.into_iter().map(map).collect(),
+        }
+    }
+
+    pub fn iter(&self) -> slice::Iter<T> {
+        self.fields.iter()
+    }
+}
+
+impl<F: FromField> Fields<F> {
+    pub fn try_from(fields: &syn::Fields) -> Result<Self> {
+        let (items, errors) = match *fields {
+            syn::Fields::Named(ref fields) => {
+                let mut items = Vec::with_capacity(fields.named.len());
+                let mut errors = Vec::new();
+
+                for field in &fields.named {
+                    let f_result = FromField::from_field(field);
+                    match f_result {
+                        Ok(val) => items.push(val),
+                        Err(err) => errors.push(if let Some(ref ident) = field.ident {
+                            err.at(ident)
+                        } else {
+                            err
+                        }),
+                    }
+                }
+
+                (items, errors)
+            }
+            syn::Fields::Unnamed(ref fields) => {
+                let mut items = Vec::with_capacity(fields.unnamed.len());
+                let mut errors = Vec::new();
+
+                for field in &fields.unnamed {
+                    let f_result = FromField::from_field(field);
+                    match f_result {
+                        Ok(val) => items.push(val),
+                        Err(err) => errors.push(if let Some(ref ident) = field.ident {
+                            err.at(ident)
+                        } else {
+                            err
+                        }),
+                    }
+                }
+
+                (items, errors)
+            }
+            syn::Fields::Unit => (vec![], vec![]),
+        };
+
+        if !errors.is_empty() {
+            Err(Error::multiple(errors))
+        } else {
+            Ok(Fields {
+                style: fields.into(),
+                fields: items,
+            })
+        }
+    }
+}
+
+impl<T> From<Style> for Fields<T> {
+    fn from(style: Style) -> Self {
+        Fields {
+            style,
+            fields: Vec::new(),
+        }
+    }
+}
+
+impl<T, U: Into<Vec<T>>> From<(Style, U)> for Fields<T> {
+    fn from((style, fields): (Style, U)) -> Self {
+        style.with_fields(fields)
+    }
+}
+
+impl<T: UsesTypeParams> UsesTypeParams for Fields<T> {
+    fn uses_type_params<'a>(
+        &self,
+        options: &usage::Options,
+        type_set: &'a IdentSet,
+    ) -> IdentRefSet<'a> {
+        self.fields.uses_type_params(options, type_set)
+    }
+}
+
+impl<T: UsesLifetimes> UsesLifetimes for Fields<T> {
+    fn uses_lifetimes<'a>(
+        &self,
+        options: &usage::Options,
+        lifetimes: &'a LifetimeSet,
+    ) -> LifetimeRefSet<'a> {
+        self.fields.uses_lifetimes(options, lifetimes)
+    }
+}
+
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum Style {
+    Tuple,
+    Struct,
+    Unit,
+}
+
+impl Style {
+    pub fn is_unit(&self) -> bool {
+        *self == Style::Unit
+    }
+
+    pub fn is_tuple(&self) -> bool {
+        *self == Style::Tuple
+    }
+
+    pub fn is_struct(&self) -> bool {
+        *self == Style::Struct
+    }
+
+    /// Creates a new `Fields` of the specified style with the passed-in fields.
+    fn with_fields<T, U: Into<Vec<T>>>(self, fields: U) -> Fields<T> {
+        Fields {
+            style: self,
+            fields: fields.into(),
+        }
+    }
+}
+
+impl From<syn::Fields> for Style {
+    fn from(vd: syn::Fields) -> Self {
+        (&vd).into()
+    }
+}
+
+impl<'a> From<&'a syn::Fields> for Style {
+    fn from(vd: &syn::Fields) -> Self {
+        match *vd {
+            syn::Fields::Named(_) => Style::Struct,
+            syn::Fields::Unnamed(_) => Style::Tuple,
+            syn::Fields::Unit => Style::Unit,
+        }
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling_core/src/ast/generics.rs
@@ -0,0 +1,194 @@
+//! Types for working with generics
+
+use std::iter::Iterator;
+use std::slice::Iter;
+
+use syn;
+
+use {FromGenericParam, FromGenerics, FromTypeParam, Result};
+
+/// Extension trait for `GenericParam` to support getting values by variant.
+///
+/// # Usage
+/// `darling::ast::Generics` needs a way to test its params array in order to iterate over type params.
+/// Rather than require callers to use `darling::ast::GenericParam` in all cases, this trait makes that
+/// polymorphic.
+pub trait GenericParamExt {
+    /// The type this GenericParam uses to represent type params and their bounds
+    type TypeParam;
+    type LifetimeDef;
+    type ConstParam;
+
+    /// If this GenericParam is a type param, get the underlying value.
+    fn as_type_param(&self) -> Option<&Self::TypeParam> {
+        None
+    }
+
+    /// If this GenericParam is a lifetime, get the underlying value.
+    fn as_lifetime_def(&self) -> Option<&Self::LifetimeDef> {
+        None
+    }
+
+    /// If this GenericParam is a const param, get the underlying value.
+    fn as_const_param(&self) -> Option<&Self::ConstParam> {
+        None
+    }
+}
+
+impl GenericParamExt for syn::GenericParam {
+    type TypeParam = syn::TypeParam;
+    type LifetimeDef = syn::LifetimeDef;
+    type ConstParam = syn::ConstParam;
+
+    fn as_type_param(&self) -> Option<&Self::TypeParam> {
+        if let syn::GenericParam::Type(ref val) = *self {
+            Some(val)
+        } else {
+            None
+        }
+    }
+
+    fn as_lifetime_def(&self) -> Option<&Self::LifetimeDef> {
+        if let syn::GenericParam::Lifetime(ref val) = *self {
+            Some(val)
+        } else {
+            None
+        }
+    }
+
+    fn as_const_param(&self) -> Option<&Self::ConstParam> {
+        if let syn::GenericParam::Const(ref val) = *self {
+            Some(val)
+        } else {
+            None
+        }
+    }
+}
+
+impl GenericParamExt for syn::TypeParam {
+    type TypeParam = syn::TypeParam;
+    type LifetimeDef = ();
+    type ConstParam = ();
+
+    fn as_type_param(&self) -> Option<&Self::TypeParam> {
+        Some(self)
+    }
+}
+
+/// A mirror of `syn::GenericParam` which is generic over all its contents.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub enum GenericParam<T = syn::TypeParam, L = syn::LifetimeDef, C = syn::ConstParam> {
+    Type(T),
+    Lifetime(L),
+    Const(C),
+}
+
+impl<T: FromTypeParam> FromTypeParam for GenericParam<T> {
+    fn from_type_param(type_param: &syn::TypeParam) -> Result<Self> {
+        Ok(GenericParam::Type(FromTypeParam::from_type_param(
+            type_param,
+        )?))
+    }
+}
+
+impl<T: FromTypeParam> FromGenericParam for GenericParam<T> {
+    fn from_generic_param(param: &syn::GenericParam) -> Result<Self> {
+        Ok(match *param {
+            syn::GenericParam::Type(ref ty) => {
+                GenericParam::Type(FromTypeParam::from_type_param(ty)?)
+            }
+            syn::GenericParam::Lifetime(ref val) => GenericParam::Lifetime(val.clone()),
+            syn::GenericParam::Const(ref val) => GenericParam::Const(val.clone()),
+        })
+    }
+}
+
+impl<T, L, C> GenericParamExt for GenericParam<T, L, C> {
+    type TypeParam = T;
+    type LifetimeDef = L;
+    type ConstParam = C;
+
+    fn as_type_param(&self) -> Option<&T> {
+        if let GenericParam::Type(ref val) = *self {
+            Some(val)
+        } else {
+            None
+        }
+    }
+
+    fn as_lifetime_def(&self) -> Option<&L> {
+        if let GenericParam::Lifetime(ref val) = *self {
+            Some(val)
+        } else {
+            None
+        }
+    }
+
+    fn as_const_param(&self) -> Option<&C> {
+        if let GenericParam::Const(ref val) = *self {
+            Some(val)
+        } else {
+            None
+        }
+    }
+}
+
+/// A mirror of the `syn::Generics` type which can contain arbitrary representations
+/// of params and where clauses.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct Generics<P, W = syn::WhereClause> {
+    pub params: Vec<P>,
+    pub where_clause: Option<W>,
+}
+
+impl<P, W> Generics<P, W> {
+    pub fn type_params<'a>(&'a self) -> TypeParams<'a, P> {
+        TypeParams(self.params.iter())
+    }
+}
+
+impl<P: FromGenericParam> FromGenerics for Generics<P> {
+    fn from_generics(generics: &syn::Generics) -> Result<Self> {
+        Ok(Generics {
+            params: generics
+                .params
+                .iter()
+                .map(FromGenericParam::from_generic_param)
+                .collect::<Result<Vec<P>>>()?,
+            where_clause: generics.where_clause.clone(),
+        })
+    }
+}
+
+pub struct TypeParams<'a, P: 'a>(Iter<'a, P>);
+
+impl<'a, P: GenericParamExt> Iterator for TypeParams<'a, P> {
+    type Item = &'a <P as GenericParamExt>::TypeParam;
+
+    fn next(&mut self) -> Option<Self::Item> {
+        let next = self.0.next();
+        match next {
+            None => None,
+            Some(v) => match v.as_type_param() {
+                Some(val) => Some(val),
+                None => self.next(),
+            },
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use syn;
+
+    use super::{GenericParam, Generics};
+    use FromGenerics;
+
+    #[test]
+    fn generics() {
+        let g: syn::Generics = parse_quote!(<T>);
+        let deified: Generics<GenericParam<syn::Ident>> = FromGenerics::from_generics(&g).unwrap();
+        assert!(deified.params.len() == 1);
+        assert!(deified.where_clause.is_none());
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling_core/src/ast/mod.rs
@@ -0,0 +1,7 @@
+//! Utility types for working with the AST.
+
+mod data;
+mod generics;
+
+pub use self::data::*;
+pub use self::generics::{GenericParam, GenericParamExt, Generics};
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling_core/src/codegen/attr_extractor.rs
@@ -0,0 +1,109 @@
+use proc_macro2::TokenStream;
+
+use options::ForwardAttrs;
+use util::IdentList;
+
+/// Infrastructure for generating an attribute extractor.
+pub trait ExtractAttribute {
+    /// A set of mutable declarations for all members of the implementing type.
+    fn local_declarations(&self) -> TokenStream;
+
+    /// A set of immutable declarations for all members of the implementing type.
+    /// This is used in the case where a deriving struct handles no attributes and therefore can
+    /// never change its default state.
+    fn immutable_declarations(&self) -> TokenStream;
+
+    /// Gets the list of attribute names that should be parsed by the extractor.
+    fn attr_names(&self) -> &IdentList;
+
+    fn forwarded_attrs(&self) -> Option<&ForwardAttrs>;
+
+    /// Gets the name used by the generated impl to return to the `syn` item passed as input.
+    fn param_name(&self) -> TokenStream;
+
+    /// Gets the core from-meta-item loop that should be used on matching attributes.
+    fn core_loop(&self) -> TokenStream;
+
+    fn declarations(&self) -> TokenStream {
+        if !self.attr_names().is_empty() {
+            self.local_declarations()
+        } else {
+            self.immutable_declarations()
+        }
+    }
+
+    /// Generates the main extraction loop.
+    fn extractor(&self) -> TokenStream {
+        let declarations = self.declarations();
+
+        let will_parse_any = !self.attr_names().is_empty();
+        let will_fwd_any = self.forwarded_attrs()
+            .map(|fa| !fa.is_empty())
+            .unwrap_or_default();
+
+        if !(will_parse_any || will_fwd_any) {
+            return quote! {
+                #declarations
+            };
+        }
+
+        let input = self.param_name();
+
+        // The block for parsing attributes whose names have been claimed by the target
+        // struct. If no attributes were claimed, this is a pass-through.
+        let parse_handled = if will_parse_any {
+            let attr_names = self.attr_names().to_strings();
+            let core_loop = self.core_loop();
+            quote!(
+                #(#attr_names)|* => {
+                    if let Some(::syn::Meta::List(ref __data)) = __attr.interpret_meta() {
+                        let __items = &__data.nested;
+
+                        #core_loop
+                    } else {
+                        // darling currently only supports list-style
+                        continue
+                    }
+                }
+            )
+        } else {
+            quote!()
+        };
+
+        // Specifies the behavior for unhandled attributes. They will either be silently ignored or
+        // forwarded to the inner struct for later analysis.
+        let forward_unhandled = if will_fwd_any {
+            forwards_to_local(self.forwarded_attrs().unwrap())
+        } else {
+            quote!(_ => continue)
+        };
+
+        quote!(
+            #declarations
+            use ::darling::ToTokens;
+            let mut __fwd_attrs: ::darling::export::Vec<::syn::Attribute> = vec![];
+
+            for __attr in &#input.attrs {
+                // Filter attributes based on name
+                match  ::darling::export::ToString::to_string(&__attr.path.clone().into_token_stream()).as_str() {
+                    #parse_handled
+                    #forward_unhandled
+                }
+            }
+        )
+    }
+}
+
+fn forwards_to_local(behavior: &ForwardAttrs) -> TokenStream {
+    let push_command = quote!(__fwd_attrs.push(__attr.clone()));
+    match *behavior {
+        ForwardAttrs::All => quote!(_ => #push_command),
+        ForwardAttrs::Only(ref idents) => {
+            let names = idents.to_strings();
+            quote!(
+                #(#names)|* => #push_command,
+                _ => continue,
+            )
+        }
+    }
+}
\ No newline at end of file
--- a/third_party/rust/darling_core/src/codegen/default_expr.rs
+++ b/third_party/rust/darling_core/src/codegen/default_expr.rs
@@ -1,9 +1,10 @@
-use quote::{Tokens, ToTokens};
+use proc_macro2::TokenStream;
+use quote::{TokenStreamExt, ToTokens};
 use syn::{Ident, Path};
 
 /// This will be in scope during struct initialization after option parsing.
 const DEFAULT_STRUCT_NAME: &str = "__default";
 
 /// The fallback value for a field or container.
 #[derive(Debug, Clone, PartialEq, Eq)]
 pub enum DefaultExpression<'a> {
@@ -16,30 +17,30 @@ pub enum DefaultExpression<'a> {
 
 impl<'a> DefaultExpression<'a> {
     pub fn as_declaration(&'a self) -> DefaultDeclaration<'a> {
         DefaultDeclaration(self)
     }
 }
 
 impl<'a> ToTokens for DefaultExpression<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         tokens.append_all(match *self {
             DefaultExpression::Inherit(ident) => {
                 let dsn = Ident::new(DEFAULT_STRUCT_NAME, ::proc_macro2::Span::call_site());
                 quote!(#dsn.#ident)
-            },
+            }
             DefaultExpression::Explicit(path) => quote!(#path()),
             DefaultExpression::Trait => quote!(::darling::export::Default::default()),
         });
     }
 }
 
 /// Used only by containers, this wrapper type generates code to declare the fallback instance.
 pub struct DefaultDeclaration<'a>(&'a DefaultExpression<'a>);
 
 impl<'a> ToTokens for DefaultDeclaration<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         let name = Ident::new(DEFAULT_STRUCT_NAME, ::proc_macro2::Span::call_site());
         let expr = self.0;
         tokens.append_all(quote!(let #name: Self = #expr;));
     }
 }
--- a/third_party/rust/darling_core/src/codegen/error.rs
+++ b/third_party/rust/darling_core/src/codegen/error.rs
@@ -1,55 +1,54 @@
-use quote::{Tokens, ToTokens};
+use proc_macro2::TokenStream;
+use quote::{TokenStreamExt, ToTokens};
 
 /// Declares the local variable into which errors will be accumulated.
 pub struct ErrorDeclaration {
-    __hidden: ()
+    __hidden: (),
 }
 
 impl ErrorDeclaration {
     pub fn new() -> Self {
-        ErrorDeclaration {
-            __hidden: ()
-        }
+        ErrorDeclaration { __hidden: () }
     }
 }
 
 impl ToTokens for ErrorDeclaration {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         tokens.append_all(quote! {
             let mut __errors = Vec::new();
         })
     }
 }
 
 /// Returns early if attribute or body parsing has caused any errors.
 pub struct ErrorCheck<'a> {
     location: Option<&'a str>,
-    __hidden: ()
+    __hidden: (),
 }
 
 impl<'a> ErrorCheck<'a> {
     pub fn new() -> Self {
         ErrorCheck {
             location: None,
-            __hidden: ()
+            __hidden: (),
         }
     }
 
     pub fn with_location(location: &'a str) -> Self {
         ErrorCheck {
             location: Some(location),
             __hidden: (),
         }
     }
 }
 
 impl<'a> ToTokens for ErrorCheck<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         let at_call = if let Some(ref s) = self.location {
             quote!(.at(#s))
         } else {
             quote!()
         };
 
         tokens.append_all(quote! {
             if !__errors.is_empty() {
--- a/third_party/rust/darling_core/src/codegen/field.rs
+++ b/third_party/rust/darling_core/src/codegen/field.rs
@@ -1,20 +1,22 @@
-use quote::{Tokens, ToTokens};
+use proc_macro2::TokenStream;
+use quote::{TokenStreamExt, ToTokens};
 use syn::{Ident, Path, Type};
 
 use codegen::DefaultExpression;
+use usage::{self, IdentRefSet, IdentSet, UsesTypeParams};
 
 /// Properties needed to generate code for a field in all the contexts
 /// where one may appear.
 #[derive(Debug, Clone, PartialEq, Eq)]
 pub struct Field<'a> {
     /// The name presented to the user of the library. This will appear
     /// in error messages and will be looked when parsing names.
-    pub name_in_attr: &'a str,
+    pub name_in_attr: String,
 
     /// The name presented to the author of the library. This will appear
     /// in the setters or temporary variables which contain the values.
     pub ident: &'a Ident,
 
     /// The type of the field in the input.
     pub ty: &'a Type,
     pub default_expression: Option<DefaultExpression<'a>>,
@@ -37,28 +39,38 @@ impl<'a> Field<'a> {
         Initializer(self)
     }
 
     pub fn as_presence_check(&'a self) -> CheckMissing<'a> {
         CheckMissing(self)
     }
 }
 
+impl<'a> UsesTypeParams for Field<'a> {
+    fn uses_type_params<'b>(
+        &self,
+        options: &usage::Options,
+        type_set: &'b IdentSet,
+    ) -> IdentRefSet<'b> {
+        self.ty.uses_type_params(options, type_set)
+    }
+}
+
 /// An individual field during variable declaration in the generated parsing method.
 pub struct Declaration<'a>(&'a Field<'a>, bool);
 
 impl<'a> Declaration<'a> {
     /// Creates a new declaration with the given field and mutability.
     pub fn new(field: &'a Field<'a>, mutable: bool) -> Self {
         Declaration(field, mutable)
     }
 }
 
 impl<'a> ToTokens for Declaration<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         let field: &Field = self.0;
         let ident = field.ident;
         let ty = field.ty;
 
         let mutable = if self.1 { quote!(mut) } else { quote!() };
 
         tokens.append_all(if field.multiple {
             // This is NOT mutable, as it will be declared mutable only temporarily.
@@ -68,20 +80,20 @@ impl<'a> ToTokens for Declaration<'a> {
         });
     }
 }
 
 /// Represents an individual field in the match.
 pub struct MatchArm<'a>(&'a Field<'a>);
 
 impl<'a> ToTokens for MatchArm<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         let field: &Field = self.0;
         if !field.skip {
-            let name_str = field.name_in_attr;
+            let name_str = &field.name_in_attr;
             let ident = field.ident;
             let with_path = &field.with_path;
 
             // Errors include the location of the bad input, so we compute that here.
             // Fields that take multiple values add the index of the error for convenience,
             // while single-value fields only expose the name in the input attribute.
             let location = if field.multiple {
                 // we use the local variable `len` here because location is accessed via
@@ -135,17 +147,17 @@ impl<'a> ToTokens for MatchArm<'a> {
         }
     }
 }
 
 /// Wrapper to generate initialization code for a field.
 pub struct Initializer<'a>(&'a Field<'a>);
 
 impl<'a> ToTokens for Initializer<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         let field: &Field = self.0;
         let ident = field.ident;
         tokens.append_all(if field.multiple {
             if let Some(ref expr) = field.default_expression {
                 quote!(#ident: if !#ident.is_empty() {
                     #ident
                 } else {
                     #expr
@@ -165,20 +177,20 @@ impl<'a> ToTokens for Initializer<'a> {
         });
     }
 }
 
 /// Creates an error if a field has no value and no default.
 pub struct CheckMissing<'a>(&'a Field<'a>);
 
 impl<'a> ToTokens for CheckMissing<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         if !self.0.multiple && self.0.default_expression.is_none() {
             let ident = self.0.ident;
-            let name_in_attr = self.0.name_in_attr;
+            let name_in_attr = &self.0.name_in_attr;
 
             tokens.append_all(quote! {
                 if !#ident.0 {
                     __errors.push(::darling::Error::missing_field(#name_in_attr));
                 }
             })
         }
     }
deleted file mode 100644
--- a/third_party/rust/darling_core/src/codegen/fmi_impl.rs
+++ /dev/null
@@ -1,116 +0,0 @@
-use quote::{Tokens, ToTokens};
-use syn;
-
-use ast::{Data, Style, Fields};
-use codegen::{Field, TraitImpl, OuterFromImpl, Variant};
-
-pub struct FmiImpl<'a> {
-    pub base: TraitImpl<'a>,
-}
-
-impl<'a> ToTokens for FmiImpl<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
-        let base = &self.base;
-
-        let impl_block = match base.data {
-            // Unit structs allow empty bodies only.
-            Data::Struct(ref vd) if vd.style.is_unit() => {
-                let ty_ident = base.ident;
-                quote!(
-                    fn from_word() -> ::darling::Result<Self> {
-                        Ok(#ty_ident)
-                    }
-                )
-            }
-
-            // Newtype structs proxy to the sole value they contain.
-            Data::Struct(Fields { ref fields, style: Style::Tuple, .. }) if fields.len() == 1 => {
-                let ty_ident = base.ident;
-                quote!(
-                    fn from_meta_item(__item: &::syn::Meta) -> ::darling::Result<Self> {
-                        Ok(#ty_ident(::darling::FromMetaItem::from_meta_item(__item)?))
-                    }
-                )
-            }
-            Data::Struct(Fields { style: Style::Tuple, .. }) => {
-                panic!("Multi-field tuples are not supported");
-            }
-            Data::Struct(ref data) => {
-                let inits = data.fields.iter().map(Field::as_initializer);
-                let declare_errors = base.declare_errors();
-                let require_fields = base.require_fields();
-                let check_errors = base.check_errors();
-                let decls = base.local_declarations();
-                let core_loop = base.core_loop();
-                let default = base.fallback_decl();
-                let map = base.map_fn();
-
-
-                quote!(
-                    fn from_list(__items: &[::syn::NestedMeta]) -> ::darling::Result<Self> {
-
-                        #decls
-
-                        #declare_errors
-
-                        #core_loop
-
-                        #require_fields
-
-                        #check_errors
-
-                        #default
-
-                        ::darling::export::Ok(Self {
-                            #(#inits),*
-                        }) #map
-                    }
-                )
-            }
-            Data::Enum(ref variants) => {
-                let unit_arms = variants.iter().map(Variant::as_unit_match_arm);
-                let struct_arms = variants.iter().map(Variant::as_data_match_arm);
-
-                quote!(
-                    fn from_list(__outer: &[::syn::NestedMeta]) -> ::darling::Result<Self> {
-                        // An enum must have exactly one value inside the parentheses if it's not a unit
-                        // match arm
-                        match __outer.len() {
-                            0 => ::darling::export::Err(::darling::Error::too_few_items(1)),
-                            1 => {
-                                if let ::syn::NestedMeta::Meta(ref __nested) = __outer[0] {
-                                    match __nested.name().as_ref() {
-                                        #(#struct_arms)*
-                                        __other => ::darling::export::Err(::darling::Error::unknown_value(__other))
-                                    }
-                                } else {
-                                    ::darling::export::Err(::darling::Error::unsupported_format("literal"))
-                                }
-                            }
-                            _ => ::darling::export::Err(::darling::Error::too_many_items(1)),
-                        }
-                    }
-
-                    fn from_string(lit: &str) -> ::darling::Result<Self> {
-                        match lit {
-                            #(#unit_arms)*
-                            __other => ::darling::export::Err(::darling::Error::unknown_value(__other))
-                        }
-                    }
-                )
-            }
-        };
-
-        self.wrap(impl_block, tokens);
-    }
-}
-
-impl<'a> OuterFromImpl<'a> for FmiImpl<'a> {
-    fn trait_path(&self) -> syn::Path {
-        path!(::darling::FromMetaItem)
-    }
-
-    fn base(&'a self) -> &'a TraitImpl<'a> {
-        &self.base
-    }
-}
--- a/third_party/rust/darling_core/src/codegen/from_derive_impl.rs
+++ b/third_party/rust/darling_core/src/codegen/from_derive_impl.rs
@@ -1,130 +1,146 @@
-use quote::{Tokens, ToTokens};
+use proc_macro2::TokenStream;
+use quote::ToTokens;
 use syn::{self, Ident};
 
 use ast::Data;
-use codegen::{TraitImpl, ExtractAttribute, OuterFromImpl};
+use codegen::{ExtractAttribute, OuterFromImpl, TraitImpl};
 use options::{ForwardAttrs, Shape};
+use util::IdentList;
 
 pub struct FromDeriveInputImpl<'a> {
     pub ident: Option<&'a Ident>,
     pub generics: Option<&'a Ident>,
     pub vis: Option<&'a Ident>,
     pub attrs: Option<&'a Ident>,
     pub data: Option<&'a Ident>,
     pub base: TraitImpl<'a>,
-    pub attr_names: Vec<&'a str>,
+    pub attr_names: &'a IdentList,
     pub forward_attrs: Option<&'a ForwardAttrs>,
-    pub from_ident: Option<bool>,
+    pub from_ident: bool,
     pub supports: Option<&'a Shape>,
 }
 
 impl<'a> ToTokens for FromDeriveInputImpl<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         let ty_ident = self.base.ident;
         let input = self.param_name();
         let map = self.base.map_fn();
 
         if let Data::Struct(ref data) = self.base.data {
             if data.is_newtype() {
-                self.wrap(quote!{
-                    fn from_derive_input(#input: &::syn::DeriveInput) -> ::darling::Result<Self> {
-                        ::darling::export::Ok(
-                            #ty_ident(::darling::FromDeriveInput::from_derive_input(#input)?)
-                        ) #map
-                    }
-                }, tokens);
+                self.wrap(
+                    quote!{
+                        fn from_derive_input(#input: &::syn::DeriveInput) -> ::darling::Result<Self> {
+                            ::darling::export::Ok(
+                                #ty_ident(::darling::FromDeriveInput::from_derive_input(#input)?)
+                            ) #map
+                        }
+                    },
+                    tokens,
+                );
 
                 return;
             }
         }
 
-        let passed_ident = self.ident.as_ref().map(|i| quote!(#i: #input.ident.clone(),));
+        let passed_ident = self.ident
+            .as_ref()
+            .map(|i| quote!(#i: #input.ident.clone(),));
         let passed_vis = self.vis.as_ref().map(|i| quote!(#i: #input.vis.clone(),));
-        let passed_generics = self.generics.as_ref().map(|i| quote!(#i: #input.generics.clone(),));
+        let passed_generics = self.generics
+            .as_ref()
+            .map(|i| quote!(#i: ::darling::FromGenerics::from_generics(&#input.generics)?,));
         let passed_attrs = self.attrs.as_ref().map(|i| quote!(#i: __fwd_attrs,));
-        let passed_body = self.data.as_ref().map(|i| quote!(#i: ::darling::ast::Data::try_from(&#input.data)?,));
+        let passed_body = self.data
+            .as_ref()
+            .map(|i| quote!(#i: ::darling::ast::Data::try_from(&#input.data)?,));
 
-        let supports = self.supports.map(|i| quote!{
-            #i
-            __validate_body(&#input.data)?;
+        let supports = self.supports.map(|i| {
+            quote!{
+                #i
+                __validate_body(&#input.data)?;
+            }
         });
 
         let inits = self.base.initializers();
-        let default = if let Some(true) = self.from_ident {
+        let default = if self.from_ident {
             quote!(let __default: Self = ::darling::export::From::from(#input.ident.clone());)
         } else {
             self.base.fallback_decl()
         };
 
         let grab_attrs = self.extractor();
 
         let declare_errors = self.base.declare_errors();
         let require_fields = self.base.require_fields();
         let check_errors = self.base.check_errors();
 
-        self.wrap(quote! {
-            fn from_derive_input(#input: &::syn::DeriveInput) -> ::darling::Result<Self> {
-                #declare_errors
-
-                #grab_attrs
+        self.wrap(
+            quote! {
+                fn from_derive_input(#input: &::syn::DeriveInput) -> ::darling::Result<Self> {
+                    #declare_errors
 
-                #supports
+                    #grab_attrs
+
+                    #supports
 
-                #require_fields
+                    #require_fields
 
-                #check_errors
+                    #check_errors
 
-                #default
+                    #default
 
-                ::darling::export::Ok(#ty_ident {
-                    #passed_ident
-                    #passed_generics
-                    #passed_vis
-                    #passed_attrs
-                    #passed_body
-                    #inits
-                }) #map
-            }
-        }, tokens);
+                    ::darling::export::Ok(#ty_ident {
+                        #passed_ident
+                        #passed_generics
+                        #passed_vis
+                        #passed_attrs
+                        #passed_body
+                        #inits
+                    }) #map
+                }
+            },
+            tokens,
+        );
     }
 }
 
 impl<'a> ExtractAttribute for FromDeriveInputImpl<'a> {
-    fn attr_names(&self) -> &[&str] {
-        self.attr_names.as_slice()
+    fn attr_names(&self) -> &IdentList {
+        &self.attr_names
     }
 
     fn forwarded_attrs(&self) -> Option<&ForwardAttrs> {
         self.forward_attrs
     }
 
-    fn param_name(&self) -> Tokens {
+    fn param_name(&self) -> TokenStream {
         quote!(__di)
     }
 
-    fn core_loop(&self) -> Tokens {
+    fn core_loop(&self) -> TokenStream {
         self.base.core_loop()
     }
 
-    fn local_declarations(&self) -> Tokens {
+    fn local_declarations(&self) -> TokenStream {
         self.base.local_declarations()
     }
 
-    fn immutable_declarations(&self) -> Tokens {
+    fn immutable_declarations(&self) -> TokenStream {
         self.base.immutable_declarations()
     }
 }
 
 impl<'a> OuterFromImpl<'a> for FromDeriveInputImpl<'a> {
     fn trait_path(&self) -> syn::Path {
         path!(::darling::FromDeriveInput)
     }
 
     fn trait_bound(&self) -> syn::Path {
-        path!(::darling::FromMetaItem)
+        path!(::darling::FromMeta)
     }
 
     fn base(&'a self) -> &'a TraitImpl<'a> {
         &self.base
     }
 }
--- a/third_party/rust/darling_core/src/codegen/from_field.rs
+++ b/third_party/rust/darling_core/src/codegen/from_field.rs
@@ -1,108 +1,115 @@
-use quote::{Tokens, ToTokens};
+use proc_macro2::TokenStream;
+use quote::ToTokens;
 use syn::{self, Ident};
 
-use codegen::{TraitImpl, ExtractAttribute, OuterFromImpl};
+use codegen::{ExtractAttribute, OuterFromImpl, TraitImpl};
 use options::ForwardAttrs;
+use util::IdentList;
 
 /// `impl FromField` generator. This is used for parsing an individual
 /// field and its attributes.
 pub struct FromFieldImpl<'a> {
     pub ident: Option<&'a Ident>,
     pub vis: Option<&'a Ident>,
     pub ty: Option<&'a Ident>,
     pub attrs: Option<&'a Ident>,
     pub base: TraitImpl<'a>,
-    pub attr_names: Vec<&'a str>,
+    pub attr_names: &'a IdentList,
     pub forward_attrs: Option<&'a ForwardAttrs>,
     pub from_ident: bool,
 }
 
 impl<'a> ToTokens for FromFieldImpl<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         let input = self.param_name();
 
         let error_declaration = self.base.declare_errors();
         let require_fields = self.base.require_fields();
         let error_check = self.base.check_errors();
 
         let initializers = self.base.initializers();
 
         let default = if self.from_ident {
             quote!(let __default: Self = ::darling::export::From::from(#input.ident.clone());)
         } else {
             self.base.fallback_decl()
         };
 
-        let passed_ident = self.ident.as_ref().map(|i| quote!(#i: #input.ident.clone(),));
+        let passed_ident = self.ident
+            .as_ref()
+            .map(|i| quote!(#i: #input.ident.clone(),));
         let passed_vis = self.vis.as_ref().map(|i| quote!(#i: #input.vis.clone(),));
         let passed_ty = self.ty.as_ref().map(|i| quote!(#i: #input.ty.clone(),));
         let passed_attrs = self.attrs.as_ref().map(|i| quote!(#i: __fwd_attrs,));
 
         // Determine which attributes to forward (if any).
         let grab_attrs = self.extractor();
         let map = self.base.map_fn();
 
-        self.wrap(quote!{
-            fn from_field(#input: &::syn::Field) -> ::darling::Result<Self> {
-                #error_declaration
+        self.wrap(
+            quote!{
+                fn from_field(#input: &::syn::Field) -> ::darling::Result<Self> {
+                    #error_declaration
 
-                #grab_attrs
+                    #grab_attrs
+
+                    #require_fields
 
-                #require_fields
+                    #error_check
 
-                #error_check
+                    #default
 
-                #default
+                    ::darling::export::Ok(Self {
+                        #passed_ident
+                        #passed_ty
+                        #passed_vis
+                        #passed_attrs
+                        #initializers
+                    }) #map
 
-                ::darling::export::Ok(Self {
-                    #passed_ident
-                    #passed_ty
-                    #passed_vis
-                    #passed_attrs
-                    #initializers
-                }) #map
-
-            }
-        }, tokens);
+                }
+            },
+            tokens,
+        );
     }
 }
 
 impl<'a> ExtractAttribute for FromFieldImpl<'a> {
-    fn attr_names(&self) -> &[&str] {
-        self.attr_names.as_slice()
+    fn attr_names(&self) -> &IdentList {
+        &self.attr_names
     }
 
     fn forwarded_attrs(&self) -> Option<&ForwardAttrs> {
         self.forward_attrs
     }
 
-    fn param_name(&self) -> Tokens {
+    fn param_name(&self) -> TokenStream {
         quote!(__field)
     }
 
-    fn core_loop(&self) -> Tokens {
+    fn core_loop(&self) -> TokenStream {
         self.base.core_loop()
     }
 
-    fn local_declarations(&self) -> Tokens {
+    fn local_declarations(&self) -> TokenStream {
         self.base.local_declarations()
     }
 
-    fn immutable_declarations(&self) -> Tokens {
+    fn immutable_declarations(&self) -> TokenStream {
         self.base.immutable_declarations()
     }
 }
 
 impl<'a> OuterFromImpl<'a> for FromFieldImpl<'a> {
     fn trait_path(&self) -> syn::Path {
         path!(::darling::FromField)
     }
 
     fn trait_bound(&self) -> syn::Path {
-        path!(::darling::FromMetaItem)
+        path!(::darling::FromMeta)
     }
 
     fn base(&'a self) -> &'a TraitImpl<'a> {
         &self.base
     }
-}
\ No newline at end of file
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling_core/src/codegen/from_meta_impl.rs
@@ -0,0 +1,124 @@
+use proc_macro2::TokenStream;
+use quote::ToTokens;
+use syn;
+
+use ast::{Data, Fields, Style};
+use codegen::{Field, OuterFromImpl, TraitImpl, Variant};
+
+pub struct FromMetaImpl<'a> {
+    pub base: TraitImpl<'a>,
+}
+
+impl<'a> ToTokens for FromMetaImpl<'a> {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
+        let base = &self.base;
+
+        let impl_block = match base.data {
+            // Unit structs allow empty bodies only.
+            Data::Struct(ref vd) if vd.style.is_unit() => {
+                let ty_ident = base.ident;
+                quote!(
+                    fn from_word() -> ::darling::Result<Self> {
+                        Ok(#ty_ident)
+                    }
+                )
+            }
+
+            // Newtype structs proxy to the sole value they contain.
+            Data::Struct(Fields {
+                ref fields,
+                style: Style::Tuple,
+                ..
+            }) if fields.len() == 1 =>
+            {
+                let ty_ident = base.ident;
+                quote!(
+                    fn from_meta(__item: &::syn::Meta) -> ::darling::Result<Self> {
+                        Ok(#ty_ident(::darling::FromMeta::from_meta(__item)?))
+                    }
+                )
+            }
+            Data::Struct(Fields {
+                style: Style::Tuple,
+                ..
+            }) => {
+                panic!("Multi-field tuples are not supported");
+            }
+            Data::Struct(ref data) => {
+                let inits = data.fields.iter().map(Field::as_initializer);
+                let declare_errors = base.declare_errors();
+                let require_fields = base.require_fields();
+                let check_errors = base.check_errors();
+                let decls = base.local_declarations();
+                let core_loop = base.core_loop();
+                let default = base.fallback_decl();
+                let map = base.map_fn();
+
+                quote!(
+                    fn from_list(__items: &[::syn::NestedMeta]) -> ::darling::Result<Self> {
+
+                        #decls
+
+                        #declare_errors
+
+                        #core_loop
+
+                        #require_fields
+
+                        #check_errors
+
+                        #default
+
+                        ::darling::export::Ok(Self {
+                            #(#inits),*
+                        }) #map
+                    }
+                )
+            }
+            Data::Enum(ref variants) => {
+                let unit_arms = variants.iter().map(Variant::as_unit_match_arm);
+                let struct_arms = variants.iter().map(Variant::as_data_match_arm);
+
+                quote!(
+                    fn from_list(__outer: &[::syn::NestedMeta]) -> ::darling::Result<Self> {
+                        // An enum must have exactly one value inside the parentheses if it's not a unit
+                        // match arm
+                        match __outer.len() {
+                            0 => ::darling::export::Err(::darling::Error::too_few_items(1)),
+                            1 => {
+                                if let ::syn::NestedMeta::Meta(ref __nested) = __outer[0] {
+                                    match __nested.name().to_string().as_ref() {
+                                        #(#struct_arms)*
+                                        __other => ::darling::export::Err(::darling::Error::unknown_value(__other))
+                                    }
+                                } else {
+                                    ::darling::export::Err(::darling::Error::unsupported_format("literal"))
+                                }
+                            }
+                            _ => ::darling::export::Err(::darling::Error::too_many_items(1)),
+                        }
+                    }
+
+                    fn from_string(lit: &str) -> ::darling::Result<Self> {
+                        match lit {
+                            #(#unit_arms)*
+                            __other => ::darling::export::Err(::darling::Error::unknown_value(__other))
+                        }
+                    }
+                )
+            }
+        };
+
+        self.wrap(impl_block, tokens);
+    }
+}
+
+impl<'a> OuterFromImpl<'a> for FromMetaImpl<'a> {
+    fn trait_path(&self) -> syn::Path {
+        path!(::darling::FromMeta)
+    }
+
+    fn base(&'a self) -> &'a TraitImpl<'a> {
+        &self.base
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling_core/src/codegen/from_type_param.rs
@@ -0,0 +1,114 @@
+use proc_macro2::TokenStream;
+use quote::ToTokens;
+use syn::{self, Ident};
+
+use codegen::{ExtractAttribute, OuterFromImpl, TraitImpl};
+use options::ForwardAttrs;
+use util::IdentList;
+
+pub struct FromTypeParamImpl<'a> {
+    pub base: TraitImpl<'a>,
+    pub ident: Option<&'a Ident>,
+    pub attrs: Option<&'a Ident>,
+    pub bounds: Option<&'a Ident>,
+    pub default: Option<&'a Ident>,
+    pub attr_names: &'a IdentList,
+    pub forward_attrs: Option<&'a ForwardAttrs>,
+    pub from_ident: bool,
+}
+
+impl<'a> ToTokens for FromTypeParamImpl<'a> {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
+        let input = self.param_name();
+
+        let error_declaration = self.base.declare_errors();
+        let grab_attrs = self.extractor();
+        let require_fields = self.base.require_fields();
+        let error_check = self.base.check_errors();
+
+        let default = if self.from_ident {
+            quote!(let __default: Self = ::darling::export::From::from(#input.ident.clone());)
+        } else {
+            self.base.fallback_decl()
+        };
+
+        let passed_ident = self.ident
+            .as_ref()
+            .map(|i| quote!(#i: #input.ident.clone(),));
+        let passed_attrs = self.attrs.as_ref().map(|i| quote!(#i: __fwd_attrs,));
+        let passed_bounds = self.bounds
+            .as_ref()
+            .map(|i| quote!(#i: #input.bounds.clone().into_iter().collect::<Vec<_>>(),));
+        let passed_default = self.default
+            .as_ref()
+            .map(|i| quote!(#i: #input.default.clone(),));
+        let initializers = self.base.initializers();
+
+        let map = self.base.map_fn();
+
+        self.wrap(
+            quote! {
+                fn from_type_param(#input: &::syn::TypeParam) -> ::darling::Result<Self> {
+                    #error_declaration
+
+                    #grab_attrs
+
+                    #require_fields
+
+                    #error_check
+
+                    #default
+
+                    ::darling::export::Ok(Self {
+                        #passed_ident
+                        #passed_bounds
+                        #passed_default
+                        #passed_attrs
+                        #initializers
+                    }) #map
+                }
+            },
+            tokens,
+        );
+    }
+}
+
+impl<'a> ExtractAttribute for FromTypeParamImpl<'a> {
+    fn attr_names(&self) -> &IdentList {
+        &self.attr_names
+    }
+
+    fn forwarded_attrs(&self) -> Option<&ForwardAttrs> {
+        self.forward_attrs
+    }
+
+    fn param_name(&self) -> TokenStream {
+        quote!(__type_param)
+    }
+
+    fn core_loop(&self) -> TokenStream {
+        self.base.core_loop()
+    }
+
+    fn local_declarations(&self) -> TokenStream {
+        self.base.local_declarations()
+    }
+
+    fn immutable_declarations(&self) -> TokenStream {
+        self.base.immutable_declarations()
+    }
+}
+
+impl<'a> OuterFromImpl<'a> for FromTypeParamImpl<'a> {
+    fn trait_path(&self) -> syn::Path {
+        path!(::darling::FromTypeParam)
+    }
+
+    fn trait_bound(&self) -> syn::Path {
+        path!(::darling::FromMeta)
+    }
+
+    fn base(&'a self) -> &'a TraitImpl<'a> {
+        &self.base
+    }
+}
--- a/third_party/rust/darling_core/src/codegen/from_variant_impl.rs
+++ b/third_party/rust/darling_core/src/codegen/from_variant_impl.rs
@@ -1,52 +1,61 @@
-use quote::{Tokens, ToTokens};
+use proc_macro2::TokenStream;
+use quote::ToTokens;
 use syn::{self, Ident};
 
 use codegen::{ExtractAttribute, OuterFromImpl, TraitImpl};
 use options::{DataShape, ForwardAttrs};
+use util::IdentList;
 
 pub struct FromVariantImpl<'a> {
     pub base: TraitImpl<'a>,
     pub ident: Option<&'a Ident>,
     pub fields: Option<&'a Ident>,
     pub attrs: Option<&'a Ident>,
-    pub attr_names: Vec<&'a str>,
+    pub attr_names: &'a IdentList,
     pub forward_attrs: Option<&'a ForwardAttrs>,
-    pub from_ident: Option<bool>,
+    pub from_ident: bool,
     pub supports: Option<&'a DataShape>,
 }
 
 impl<'a> ToTokens for FromVariantImpl<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         let input = self.param_name();
         let extractor = self.extractor();
-        let passed_ident = self.ident.as_ref().map(|i| quote!(#i: #input.ident.clone(),));
+        let passed_ident = self.ident
+            .as_ref()
+            .map(|i| quote!(#i: #input.ident.clone(),));
         let passed_attrs = self.attrs.as_ref().map(|i| quote!(#i: __fwd_attrs,));
-        let passed_fields = self.fields.as_ref().map(|i| quote!(#i: ::darling::ast::Fields::try_from(&#input.fields)?,));
+        let passed_fields = self.fields
+            .as_ref()
+            .map(|i| quote!(#i: ::darling::ast::Fields::try_from(&#input.fields)?,));
 
         let inits = self.base.initializers();
         let map = self.base.map_fn();
 
-        let default = if let Some(true) = self.from_ident {
+        let default = if self.from_ident {
             quote!(let __default: Self = ::darling::export::From::from(#input.ident.clone());)
         } else {
             self.base.fallback_decl()
         };
 
-        let supports = self.supports.map(|i| quote! {
-            #i
-            __validate_data(&#input.fields)?;
+        let supports = self.supports.map(|i| {
+            quote! {
+                #i
+                __validate_data(&#input.fields)?;
+            }
         });
 
         let error_declaration = self.base.declare_errors();
         let require_fields = self.base.require_fields();
         let error_check = self.base.check_errors();
 
-        self.wrap(quote!(
+        self.wrap(
+            quote!(
             fn from_variant(#input: &::syn::Variant) -> ::darling::Result<Self> {
                 #error_declaration
 
                 #extractor
 
                 #supports
 
                 #require_fields
@@ -57,52 +66,53 @@ impl<'a> ToTokens for FromVariantImpl<'a
 
                 ::darling::export::Ok(Self {
                     #passed_ident
                     #passed_attrs
                     #passed_fields
                     #inits
                 }) #map
             }
-        ), tokens);
+        ),
+            tokens,
+        );
     }
 }
 
 impl<'a> ExtractAttribute for FromVariantImpl<'a> {
-    fn local_declarations(&self) -> Tokens {
+    fn local_declarations(&self) -> TokenStream {
         self.base.local_declarations()
     }
 
-    fn immutable_declarations(&self) -> Tokens {
+    fn immutable_declarations(&self) -> TokenStream {
         self.base.immutable_declarations()
     }
 
-    fn attr_names(&self) -> &[&str] {
-        self.attr_names.as_slice()
+    fn attr_names(&self) -> &IdentList {
+        &self.attr_names
     }
 
     fn forwarded_attrs(&self) -> Option<&ForwardAttrs> {
         self.forward_attrs
     }
 
-    fn param_name(&self) -> Tokens {
+    fn param_name(&self) -> TokenStream {
         quote!(__variant)
     }
 
-    fn core_loop(&self) -> Tokens {
+    fn core_loop(&self) -> TokenStream {
         self.base.core_loop()
     }
 }
 
-
 impl<'a> OuterFromImpl<'a> for FromVariantImpl<'a> {
     fn trait_path(&self) -> syn::Path {
         path!(::darling::FromVariant)
     }
 
     fn trait_bound(&self) -> syn::Path {
-        path!(::darling::FromMetaItem)
+        path!(::darling::FromMeta)
     }
 
     fn base(&'a self) -> &'a TraitImpl<'a> {
         &self.base
     }
 }
--- a/third_party/rust/darling_core/src/codegen/mod.rs
+++ b/third_party/rust/darling_core/src/codegen/mod.rs
@@ -1,124 +1,29 @@
-use quote::Tokens;
 
+mod attr_extractor;
 mod default_expr;
 mod error;
 mod field;
-mod fmi_impl;
+mod from_meta_impl;
 mod from_derive_impl;
 mod from_field;
+mod from_type_param;
 mod from_variant_impl;
 mod outer_from_impl;
 mod trait_impl;
 mod variant;
 mod variant_data;
 
+pub(in codegen) use self::attr_extractor::ExtractAttribute;
 pub use self::default_expr::DefaultExpression;
 pub use self::field::Field;
-pub use self::fmi_impl::FmiImpl;
+pub use self::from_meta_impl::FromMetaImpl;
 pub use self::from_derive_impl::FromDeriveInputImpl;
 pub use self::from_field::FromFieldImpl;
+pub use self::from_type_param::FromTypeParamImpl;
 pub use self::from_variant_impl::FromVariantImpl;
 pub use self::outer_from_impl::OuterFromImpl;
 pub use self::trait_impl::TraitImpl;
 pub use self::variant::Variant;
 pub use self::variant_data::FieldsGen;
 
-use options::ForwardAttrs;
 
-/// Infrastructure for generating an attribute extractor.
-pub trait ExtractAttribute {
-    fn local_declarations(&self) -> Tokens;
-
-    fn immutable_declarations(&self) -> Tokens;
-
-    /// Gets the list of attribute names that should be parsed by the extractor.
-    fn attr_names(&self) -> &[&str];
-
-    fn forwarded_attrs(&self) -> Option<&ForwardAttrs>;
-
-    /// Gets the name used by the generated impl to return to the `syn` item passed as input.
-    fn param_name(&self) -> Tokens;
-
-    /// Gets the core from-meta-item loop that should be used on matching attributes.
-    fn core_loop(&self) -> Tokens;
-
-    fn declarations(&self) -> Tokens {
-        if !self.attr_names().is_empty() {
-            self.local_declarations()
-        } else {
-            self.immutable_declarations()
-        }
-    }
-
-    /// Generates the main extraction loop.
-    fn extractor(&self) -> Tokens {
-        let declarations = self.declarations();
-
-        let will_parse_any = !self.attr_names().is_empty();
-        let will_fwd_any = self.forwarded_attrs().map(|fa| !fa.is_empty()).unwrap_or_default();
-
-        if !(will_parse_any || will_fwd_any) {
-            return quote! {
-                #declarations
-            };
-        }
-
-        let input = self.param_name();
-
-        // The block for parsing attributes whose names have been claimed by the target
-        // struct. If no attributes were claimed, this is a pass-through.
-        let parse_handled = if will_parse_any {
-            let attr_names = self.attr_names();
-            let core_loop = self.core_loop();
-            quote!(
-                #(#attr_names)|* => {
-                    if let Some(::syn::Meta::List(ref __data)) = __attr.interpret_meta() {
-                        let __items = &__data.nested;
-
-                        #core_loop
-                    } else {
-                        // darling currently only supports list-style
-                        continue
-                    }
-                }
-            )
-        } else {
-            quote!()
-        };
-
-        // Specifies the behavior for unhandled attributes. They will either be silently ignored or
-        // forwarded to the inner struct for later analysis.
-        let forward_unhandled = if will_fwd_any {
-            forwards_to_local(self.forwarded_attrs().unwrap())
-        } else {
-            quote!(_ => continue)
-        };
-
-        quote!(
-            #declarations
-            let mut __fwd_attrs: ::darling::export::Vec<::syn::Attribute> = vec![];
-
-            for __attr in &#input.attrs {
-                // Filter attributes based on name
-                match __attr.path.segments.iter().map(|s| s.ident.as_ref()).collect::<Vec<&str>>().join("::").as_str() {
-                    #parse_handled
-                    #forward_unhandled
-                }
-            }
-        )
-    }
-}
-
-fn forwards_to_local(behavior: &ForwardAttrs) -> Tokens {
-    let push_command = quote!(__fwd_attrs.push(__attr.clone()));
-    match *behavior {
-        ForwardAttrs::All => quote!(_ => #push_command),
-        ForwardAttrs::Only(ref idents) => {
-            let names = idents.as_strs();
-            quote!(
-                #(#names)|* => #push_command,
-                _ => continue,
-            )
-        }
-    }
-}
--- a/third_party/rust/darling_core/src/codegen/outer_from_impl.rs
+++ b/third_party/rust/darling_core/src/codegen/outer_from_impl.rs
@@ -1,53 +1,60 @@
-use syn::{Generics, Path, TraitBound, TraitBoundModifier, TypeParamBound, GenericParam};
-use quote::{Tokens, ToTokens};
+use proc_macro2::TokenStream;
+use quote::{TokenStreamExt, ToTokens};
+use syn::{GenericParam, Generics, Path, TraitBound, TraitBoundModifier, TypeParamBound};
 
 use codegen::TraitImpl;
+use usage::IdentSet;
 
 /// Wrapper for "outer From" traits, such as `FromDeriveInput`, `FromVariant`, and `FromField`.
 pub trait OuterFromImpl<'a> {
     /// Gets the path of the trait being implemented.
     fn trait_path(&self) -> Path;
 
     fn base(&'a self) -> &'a TraitImpl<'a>;
 
     fn trait_bound(&self) -> Path {
         self.trait_path()
     }
 
-    fn wrap<T: ToTokens>(&'a self, body: T, tokens: &mut Tokens) {
+    fn wrap<T: ToTokens>(&'a self, body: T, tokens: &mut TokenStream) {
         let base = self.base();
         let trayt = self.trait_path();
         let ty_ident = base.ident;
-        let generics = compute_impl_bounds(self.trait_bound(), base.generics.clone());
+        // The type parameters used in non-skipped, non-magic fields.
+        // These must impl `FromMeta` unless they have custom bounds.
+        let used = base.used_type_params();
+        let generics = compute_impl_bounds(self.trait_bound(), base.generics.clone(), &used);
         let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
 
         tokens.append_all(quote!(
             impl #impl_generics #trayt for #ty_ident #ty_generics
                 #where_clause
             {
                 #body
             }
         ));
     }
 }
 
-fn compute_impl_bounds(bound: Path, mut generics: Generics) -> Generics {
+fn compute_impl_bounds(bound: Path, mut generics: Generics, applies_to: &IdentSet) -> Generics {
     if generics.params.is_empty() {
         return generics;
     }
 
     let added_bound = TypeParamBound::Trait(TraitBound {
-            paren_token: None,
-            modifier: TraitBoundModifier::None,
-            lifetimes: None,
-            path: bound,
-        });
+        paren_token: None,
+        modifier: TraitBoundModifier::None,
+        lifetimes: None,
+        path: bound,
+    });
 
     for mut param in generics.params.iter_mut() {
         if let &mut GenericParam::Type(ref mut typ) = param {
-            typ.bounds.push(added_bound.clone());
+            if applies_to.contains(&typ.ident) {
+                typ.bounds.push(added_bound.clone());
+            }
         }
     }
 
     generics
 }
--- a/third_party/rust/darling_core/src/codegen/trait_impl.rs
+++ b/third_party/rust/darling_core/src/codegen/trait_impl.rs
@@ -1,94 +1,149 @@
-use quote::Tokens;
+use proc_macro2::TokenStream;
 use syn::{Generics, Ident, Path, WherePredicate};
 
-use codegen::{DefaultExpression, Field, Variant, FieldsGen};
+use ast::{Data, Fields};
+use codegen::error::{ErrorCheck, ErrorDeclaration};
 use codegen::field;
-use codegen::error::{ErrorCheck, ErrorDeclaration};
-use ast::Data;
+use codegen::{DefaultExpression, Field, FieldsGen, Variant};
+use usage::{CollectTypeParams, IdentSet, Purpose};
 
 #[derive(Debug)]
 pub struct TraitImpl<'a> {
     pub ident: &'a Ident,
     pub generics: &'a Generics,
     pub data: Data<Variant<'a>, Field<'a>>,
     pub default: Option<DefaultExpression<'a>>,
     pub map: Option<&'a Path>,
     pub bound: Option<&'a [WherePredicate]>,
 }
 
 impl<'a> TraitImpl<'a> {
+    /// Get all declared type parameters.
+    pub fn declared_type_params(&self) -> IdentSet {
+        self.generics
+            .type_params()
+            .map(|tp| tp.ident.clone())
+            .collect()
+    }
+
+    /// Get the type parameters which are used by non-skipped fields.
+    pub fn used_type_params(&self) -> IdentSet {
+        self.type_params_matching(|f| !f.skip, |v| !v.skip)
+    }
+
+    /// Get the type parameters which are used by skipped fields.
+    pub fn skipped_type_params(&self) -> IdentSet {
+        self.type_params_matching(|f| f.skip, |v| v.skip)
+    }
+
+    fn type_params_matching<'b, F, V>(&'b self, field_filter: F, variant_filter: V) -> IdentSet
+    where
+        F: Fn(&&Field) -> bool,
+        V: Fn(&&Variant) -> bool,
+    {
+        let declared = self.declared_type_params();
+        match self.data {
+            Data::Struct(ref v) => self.type_params_in_fields(v, &field_filter, &declared),
+            Data::Enum(ref v) => v.iter().filter(variant_filter).fold(
+                Default::default(),
+                |mut state, variant| {
+                    state.extend(self.type_params_in_fields(
+                        &variant.data,
+                        &field_filter,
+                        &declared,
+                    ));
+                    state
+                },
+            ),
+        }
+    }
+
+    /// Get the type parameters of all fields in a set matching some filter
+    fn type_params_in_fields<'b, F>(
+        &'b self,
+        fields: &'b Fields<Field<'a>>,
+        field_filter: F,
+        declared: &IdentSet,
+    ) -> IdentSet
+    where
+        F: Fn(&&'b Field) -> bool,
+    {
+        fields
+            .iter()
+            .filter(field_filter)
+            .collect_type_params_cloned(&Purpose::BoundImpl.into(), declared)
+    }
+}
+
+impl<'a> TraitImpl<'a> {
     /// Gets the `let` declaration for errors accumulated during parsing.
     pub fn declare_errors(&self) -> ErrorDeclaration {
         ErrorDeclaration::new()
     }
 
     /// Gets the check which performs an early return if errors occurred during parsing.
     pub fn check_errors(&self) -> ErrorCheck {
         ErrorCheck::new()
     }
 
     /// Generate local variable declarations for all fields.
-    pub(in codegen) fn local_declarations(&self) -> Tokens {
+    pub(in codegen) fn local_declarations(&self) -> TokenStream {
         if let Data::Struct(ref vd) = self.data {
             let vdr = vd.as_ref().map(Field::as_declaration);
             let decls = vdr.fields.as_slice();
             quote!(#(#decls)*)
         } else {
             quote!()
         }
     }
 
     /// Generate immutable variable declarations for all fields.
-    pub(in codegen) fn immutable_declarations(&self) -> Tokens {
+    pub(in codegen) fn immutable_declarations(&self) -> TokenStream {
         if let Data::Struct(ref vd) = self.data {
             let vdr = vd.as_ref().map(|f| field::Declaration::new(f, false));
             let decls = vdr.fields.as_slice();
             quote!(#(#decls)*)
         } else {
             quote!()
         }
     }
 
-    pub(in codegen) fn map_fn(&self) -> Option<Tokens> {
+    pub(in codegen) fn map_fn(&self) -> Option<TokenStream> {
         self.map.as_ref().map(|path| quote!(.map(#path)))
     }
 
     /// Generate local variable declaration and initialization for instance from which missing fields will be taken.
-    pub(in codegen) fn fallback_decl(&self) -> Tokens {
+    pub(in codegen) fn fallback_decl(&self) -> TokenStream {
         let default = self.default.as_ref().map(DefaultExpression::as_declaration);
         quote!(#default)
     }
 
-    pub fn require_fields(&self) -> Tokens {
+    pub fn require_fields(&self) -> TokenStream {
         if let Data::Struct(ref vd) = self.data {
             let check_nones = vd.as_ref().map(Field::as_presence_check);
             let checks = check_nones.fields.as_slice();
             quote!(#(#checks)*)
         } else {
             quote!()
         }
     }
 
-    pub(in codegen) fn initializers(&self) -> Tokens {
+    pub(in codegen) fn initializers(&self) -> TokenStream {
         let foo = match self.data {
             Data::Enum(_) => panic!("Core loop on enums isn't supported"),
-            Data::Struct(ref data) => {
-                FieldsGen(data)
-            }
+            Data::Struct(ref data) => FieldsGen(data),
         };
 
         foo.initializers()
     }
 
     /// Generate the loop which walks meta items looking for property matches.
-    pub(in codegen) fn core_loop(&self) -> Tokens {
+    pub(in codegen) fn core_loop(&self) -> TokenStream {
         let foo = match self.data {
             Data::Enum(_) => panic!("Core loop on enums isn't supported"),
-            Data::Struct(ref data) => {
-                FieldsGen(data)
-            }
+            Data::Struct(ref data) => FieldsGen(data),
         };
 
         foo.core_loop()
     }
 }
--- a/third_party/rust/darling_core/src/codegen/variant.rs
+++ b/third_party/rust/darling_core/src/codegen/variant.rs
@@ -1,20 +1,22 @@
-use quote::{Tokens, ToTokens};
+use proc_macro2::TokenStream;
+use quote::{TokenStreamExt, ToTokens};
 use syn::Ident;
 
 use ast::Fields;
+use codegen::error::{ErrorCheck, ErrorDeclaration};
 use codegen::{Field, FieldsGen};
-use codegen::error::{ErrorCheck, ErrorDeclaration};
+use usage::{self, IdentRefSet, IdentSet, UsesTypeParams};
 
 /// An enum variant.
 #[derive(Debug, Clone, PartialEq, Eq)]
 pub struct Variant<'a> {
-    /// The name which will appear in code passed to the `FromMetaItem` input.
-    pub name_in_attr: &'a str,
+    /// The name which will appear in code passed to the `FromMeta` input.
+    pub name_in_attr: String,
 
     /// The name of the variant which will be returned for a given `name_in_attr`.
     pub variant_ident: &'a Ident,
 
     /// The name of the parent enum type.
     pub ty_ident: &'a Ident,
 
     pub data: Fields<Field<'a>>,
@@ -28,27 +30,37 @@ impl<'a> Variant<'a> {
         UnitMatchArm(self)
     }
 
     pub fn as_data_match_arm(&'a self) -> DataMatchArm<'a> {
         DataMatchArm(self)
     }
 }
 
+impl<'a> UsesTypeParams for Variant<'a> {
+    fn uses_type_params<'b>(
+        &self,
+        options: &usage::Options,
+        type_set: &'b IdentSet,
+    ) -> IdentRefSet<'b> {
+        self.data.uses_type_params(options, type_set)
+    }
+}
+
 pub struct UnitMatchArm<'a>(&'a Variant<'a>);
 
 impl<'a> ToTokens for UnitMatchArm<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         let val: &Variant<'a> = self.0;
 
         if val.skip {
             return;
         }
 
-        let name_in_attr = val.name_in_attr;
+        let name_in_attr = &val.name_in_attr;
 
         if val.data.is_unit() {
             let variant_ident = val.variant_ident;
             let ty_ident = val.ty_ident;
 
             tokens.append_all(quote!(
                 #name_in_attr => ::darling::export::Ok(#ty_ident::#variant_ident),
             ));
@@ -58,41 +70,40 @@ impl<'a> ToTokens for UnitMatchArm<'a> {
             ));
         }
     }
 }
 
 pub struct DataMatchArm<'a>(&'a Variant<'a>);
 
 impl<'a> ToTokens for DataMatchArm<'a> {
-    fn to_tokens(&self, tokens: &mut Tokens) {
+    fn to_tokens(&self, tokens: &mut TokenStream) {
         let val: &Variant<'a> = self.0;
 
         if val.skip {
             return;
         }
 
-        let name_in_attr = val.name_in_attr;
+        let name_in_attr = &val.name_in_attr;
         let variant_ident = val.variant_ident;
         let ty_ident = val.ty_ident;
 
         if val.data.is_unit() {
             tokens.append_all(quote!(
                 #name_in_attr => ::darling::export::Err(::darling::Error::unsupported_format("list")),
             ));
 
             return;
         }
 
-
         let vdg = FieldsGen(&val.data);
 
         if val.data.is_struct() {
             let declare_errors = ErrorDeclaration::new();
-            let check_errors = ErrorCheck::with_location(name_in_attr);
+            let check_errors = ErrorCheck::with_location(&name_in_attr);
             let require_fields = vdg.require_fields();
             let decls = vdg.declarations();
             let core_loop = vdg.core_loop();
             let inits = vdg.initializers();
 
             tokens.append_all(quote!(
                 #name_in_attr => {
                     if let ::syn::Meta::List(ref __data) = *__nested {
@@ -116,17 +127,17 @@ impl<'a> ToTokens for DataMatchArm<'a> {
                     }
                 }
             ));
         } else if val.data.is_newtype() {
             tokens.append_all(quote!(
                 #name_in_attr => {
                     ::darling::export::Ok(
                         #ty_ident::#variant_ident(
-                            ::darling::FromMetaItem::from_meta_item(__nested)
+                            ::darling::FromMeta::from_meta(__nested)
                                 .map_err(|e| e.at(#name_in_attr))?)
                     )
                 }
             ));
         } else {
             panic!("Match arms aren't supported for tuple variants yet");
         }
     }
--- a/third_party/rust/darling_core/src/codegen/variant_data.rs
+++ b/third_party/rust/darling_core/src/codegen/variant_data.rs
@@ -1,53 +1,59 @@
-use quote::Tokens;
+use proc_macro2::TokenStream;
 
+use ast::Fields;
 use ast::Style;
 use codegen::field;
 use codegen::Field;
-use ast::Fields;
 
 pub struct FieldsGen<'a>(pub &'a Fields<Field<'a>>);
 
 impl<'a> FieldsGen<'a> {
-    pub(in codegen) fn declarations(&self) -> Tokens {
+    pub(in codegen) fn declarations(&self) -> TokenStream {
         match *self.0 {
-            Fields { style: Style::Struct, ref fields } => {
+            Fields {
+                style: Style::Struct,
+                ref fields,
+            } => {
                 let vdr = fields.into_iter().map(Field::as_declaration);
                 quote!(#(#vdr)*)
             }
             _ => panic!("FieldsGen doesn't support tuples yet"),
         }
     }
 
     /// Generate the loop which walks meta items looking for property matches.
-    pub(in codegen) fn core_loop(&self) -> Tokens {
+    pub(in codegen) fn core_loop(&self) -> TokenStream {
         let arms: Vec<field::MatchArm> = self.0.as_ref().map(Field::as_match).fields;
 
         quote!(
             for __item in __items {
                 if let ::syn::NestedMeta::Meta(ref __inner) = *__item {
                     let __name = __inner.name().to_string();
                     match __name.as_str() {
                         #(#arms)*
                         __other => { __errors.push(::darling::Error::unknown_field(__other)); }
                     }
                 }
             }
         )
     }
 
-    pub fn require_fields(&self) -> Tokens {
+    pub fn require_fields(&self) -> TokenStream {
         match *self.0 {
-            Fields { style: Style::Struct, ref fields } => {
+            Fields {
+                style: Style::Struct,
+                ref fields,
+            } => {
                 let checks = fields.into_iter().map(Field::as_presence_check);
                 quote!(#(#checks)*)
             }
-            _ => panic!("FieldsGen doesn't support tuples for requirement checks")
+            _ => panic!("FieldsGen doesn't support tuples for requirement checks"),
         }
     }
 
-    pub(in codegen) fn initializers(&self) -> Tokens {
+    pub(in codegen) fn initializers(&self) -> TokenStream {
         let inits: Vec<_> = self.0.as_ref().map(Field::as_initializer).fields;
 
         quote!(#(#inits),*)
     }
 }
--- a/third_party/rust/darling_core/src/error.rs
+++ b/third_party/rust/darling_core/src/error.rs
@@ -46,16 +46,21 @@ impl Error {
     }
 
     /// Creates a new error for a field name that appears in the input but does not correspond
     /// to a known field.
     pub fn unknown_field(name: &str) -> Self {
         Error::new(ErrorKind::UnknownField(name.into()))
     }
 
+    /// Creates a new error for a struct or variant that does not adhere to the supported shape.
+    pub fn unsupported_shape(shape: &str) -> Self {
+        Error::new(ErrorKind::UnsupportedShape(shape.into()))
+    }
+
     pub fn unsupported_format(format: &str) -> Self {
         Error::new(ErrorKind::UnexpectedFormat(format.into()))
     }
 
     /// Creates a new error for a field which has an unexpected literal type.
     pub fn unexpected_type(ty: &str) -> Self {
         Error::new(ErrorKind::UnexpectedType(ty.into()))
     }
@@ -79,17 +84,19 @@ impl Error {
     /// Bundle a set of multiple errors into a single `Error` instance.
     ///
     /// # Panics
     /// This function will panic if `errors.is_empty() == true`.
     pub fn multiple(mut errors: Vec<Error>) -> Self {
         if errors.len() > 1 {
             Error::new(ErrorKind::Multiple(errors))
         } else if errors.len() == 1 {
-            errors.pop().expect("Error array of length 1 has a first item")
+            errors
+                .pop()
+                .expect("Error array of length 1 has a first item")
         } else {
             panic!("Can't deal with 0 errors")
         }
     }
 
     /// Recursively converts a tree of errors to a flattened list.
     pub fn flatten(self) -> Self {
         Error::multiple(self.to_vec())
@@ -163,21 +170,21 @@ impl fmt::Display for Error {
 
 impl IntoIterator for Error {
     type Item = Error;
     type IntoIter = IntoIter;
 
     fn into_iter(self) -> IntoIter {
         if let ErrorKind::Multiple(errors) = self.kind {
             IntoIter {
-                inner: IntoIterEnum::Multiple(errors.into_iter())
+                inner: IntoIterEnum::Multiple(errors.into_iter()),
             }
         } else {
             IntoIter {
-                inner: IntoIterEnum::Single(iter::once(self))
+                inner: IntoIterEnum::Single(iter::once(self)),
             }
         }
     }
 }
 
 enum IntoIterEnum {
     Single(iter::Once<Error>),
     Multiple(vec::IntoIter<Error>),
@@ -191,62 +198,65 @@ impl Iterator for IntoIterEnum {
             IntoIterEnum::Single(ref mut content) => content.next(),
             IntoIterEnum::Multiple(ref mut content) => content.next(),
         }
     }
 }
 
 /// An iterator that moves out of an `Error`.
 pub struct IntoIter {
-    inner: IntoIterEnum
+    inner: IntoIterEnum,
 }
 
 impl Iterator for IntoIter {
     type Item = Error;
 
     fn next(&mut self) -> Option<Error> {
         self.inner.next()
     }
 }
 
+type DeriveInputShape = String;
 type FieldName = String;
 type MetaFormat = String;
 
 #[derive(Debug)]
 // Don't want to publicly commit to ErrorKind supporting equality yet, but
 // not having it makes testing very difficult.
 #[cfg_attr(test, derive(Clone, PartialEq, Eq))]
 enum ErrorKind {
     /// An arbitrary error message.
     Custom(String),
     DuplicateField(FieldName),
     MissingField(FieldName),
+    UnsupportedShape(DeriveInputShape),
     UnknownField(FieldName),
     UnexpectedFormat(MetaFormat),
     UnexpectedType(String),
     UnknownValue(String),
     TooFewItems(usize),
     TooManyItems(usize),
     /// A set of errors.
     Multiple(Vec<Error>),
 
     // TODO make this variant take `!` so it can't exist
     #[doc(hidden)]
-    __NonExhaustive
+    __NonExhaustive,
 }
 
 impl ErrorKind {
     pub fn description(&self) -> &str {
         use self::ErrorKind::*;
 
         match *self {
             Custom(ref s) => s,
             DuplicateField(_) => "Duplicate field",
             MissingField(_) => "Missing field",
             UnknownField(_) => "Unexpected field",
+            UnsupportedShape(_) => "Unsupported shape",
             UnexpectedFormat(_) => "Unexpected meta-item format",
             UnexpectedType(_) => "Unexpected literal type",
             UnknownValue(_) => "Unknown literal value",
             TooFewItems(_) => "Too few items",
             TooManyItems(_) => "Too many items",
             Multiple(_) => "Multiple errors",
             __NonExhaustive => unreachable!(),
         }
@@ -266,16 +276,17 @@ impl fmt::Display for ErrorKind {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         use self::ErrorKind::*;
 
         match *self {
             Custom(ref s) => s.fmt(f),
             DuplicateField(ref field) => write!(f, "Duplicate field `{}`", field),
             MissingField(ref field) => write!(f, "Missing field `{}`", field),
             UnknownField(ref field) => write!(f, "Unexpected field `{}`", field),
+            UnsupportedShape(ref shape) => write!(f, "Unsupported shape `{}`", shape),
             UnexpectedFormat(ref format) => write!(f, "Unexpected meta-item format `{}`", format),
             UnexpectedType(ref ty) => write!(f, "Unexpected literal type `{}`", ty),
             UnknownValue(ref val) => write!(f, "Unknown literal value `{}`", val),
             TooFewItems(ref min) => write!(f, "Too few items: Expected at least {}", min),
             TooManyItems(ref max) => write!(f, "Too many items: Expected no more than {}", max),
             Multiple(ref items) if items.len() == 1 => items[0].fmt(f),
             Multiple(ref items) => {
                 write!(f, "Multiple errors: (")?;
@@ -286,17 +297,17 @@ impl fmt::Display for ErrorKind {
                     } else {
                         first = false;
                     }
 
                     item.fmt(f)?;
                 }
 
                 write!(f, ")")
-            },
+            }
             __NonExhaustive => unreachable!(),
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::Error;
@@ -306,18 +317,19 @@ mod tests {
         let err = Error::duplicate_field("hello").at("world");
         assert_eq!(err.clone().flatten(), err);
     }
 
     #[test]
     fn flatten_simple() {
         let err = Error::multiple(vec![
             Error::unknown_field("hello").at("world"),
-            Error::missing_field("hell_no").at("world")
-        ]).at("foo").flatten();
+            Error::missing_field("hell_no").at("world"),
+        ]).at("foo")
+            .flatten();
 
         assert!(err.location().is_empty());
 
         let mut err_iter = err.into_iter();
 
         let first = err_iter.next();
         assert!(first.is_some());
         assert_eq!(first.unwrap().location(), vec!["foo", "world"]);
@@ -335,29 +347,27 @@ mod tests {
         let err = Error::duplicate_field("hello");
         assert_eq!(1, err.len());
     }
 
     #[test]
     fn len_multiple() {
         let err = Error::multiple(vec![
             Error::duplicate_field("hello"),
-            Error::missing_field("hell_no")
+            Error::missing_field("hell_no"),
         ]);
         assert_eq!(2, err.len());
     }
 
     #[test]
     fn len_nested() {
         let err = Error::multiple(vec![
             Error::duplicate_field("hello"),
             Error::multiple(vec![
                 Error::duplicate_field("hi"),
                 Error::missing_field("bye"),
-                Error::multiple(vec![
-                    Error::duplicate_field("whatsup")
-                ])
-            ])
+                Error::multiple(vec![Error::duplicate_field("whatsup")]),
+            ]),
         ]);
 
         assert_eq!(4, err.len());
     }
 }
--- a/third_party/rust/darling_core/src/from_derive_input.rs
+++ b/third_party/rust/darling_core/src/from_derive_input.rs
@@ -18,9 +18,9 @@ impl FromDeriveInput for () {
         Ok(())
     }
 }
 
 impl FromDeriveInput for DeriveInput {
     fn from_derive_input(input: &DeriveInput) -> Result<Self> {
         Ok(input.clone())
     }
-}
\ No newline at end of file
+}
--- a/third_party/rust/darling_core/src/from_field.rs
+++ b/third_party/rust/darling_core/src/from_field.rs
@@ -30,9 +30,9 @@ impl FromField for syn::Visibility {
         Ok(field.vis.clone())
     }
 }
 
 impl FromField for Vec<syn::Attribute> {
     fn from_field(field: &Field) -> Result<Self> {
         Ok(field.attrs.clone())
     }
-}
\ No newline at end of file
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling_core/src/from_generic_param.rs
@@ -0,0 +1,21 @@
+use syn;
+
+use Result;
+
+/// Creates an instance by parsing a specific `syn::GenericParam`.
+/// This can be a type param, a lifetime, or a const param.
+pub trait FromGenericParam: Sized {
+    fn from_generic_param(param: &syn::GenericParam) -> Result<Self>;
+}
+
+impl FromGenericParam for () {
+    fn from_generic_param(_param: &syn::GenericParam) -> Result<Self> {
+        Ok(())
+    }
+}
+
+impl FromGenericParam for syn::GenericParam {
+    fn from_generic_param(param: &syn::GenericParam) -> Result<Self> {
+        Ok(param.clone())
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling_core/src/from_generics.rs
@@ -0,0 +1,27 @@
+use syn::Generics;
+
+use Result;
+
+/// Creates an instance by parsing an entire generics declaration, including the
+/// `where` clause.
+pub trait FromGenerics: Sized {
+    fn from_generics(generics: &Generics) -> Result<Self>;
+}
+
+impl FromGenerics for () {
+    fn from_generics(_generics: &Generics) -> Result<Self> {
+        Ok(())
+    }
+}
+
+impl FromGenerics for Generics {
+    fn from_generics(generics: &Generics) -> Result<Self> {
+        Ok(generics.clone())
+    }
+}
+
+impl<T: FromGenerics> FromGenerics for Result<T> {
+    fn from_generics(generics: &Generics) -> Result<Self> {
+        Ok(FromGenerics::from_generics(generics))
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/darling_core/src/from_meta.rs
@@ -0,0 +1,396 @@
+use std::cell::RefCell;
+use std::collections::hash_map::{Entry, HashMap};
+use std::rc::Rc;
+use std::sync::atomic::AtomicBool;
+use std::sync::Arc;
+
+use ident_case;
+use syn::{self, Lit, Meta, NestedMeta};
+
+use {Error, Result};
+
+/// Create an instance from an item in an attribute declaration.
+///
+/// # Implementing `FromMeta`
+/// * Do not take a dependency on the `ident` of the passed-in meta item. The ident will be set by the field name of the containing struct.
+/// * Implement only the `from_*` methods that you intend to support. The default implementations will return useful errors.
+///
+/// # Provided Implementations
+/// ## bool
+///
+/// * Word with no value specified - becomes `true`.
+/// * As a boolean literal, e.g. `foo = true`.
+/// * As a string literal, e.g. `foo = "true"`.
+///
+/// ## String
+/// * As a string literal, e.g. `foo = "hello"`.
+/// * As a raw string literal, e.g. `foo = r#"hello "world""#`.
+///
+/// ## ()
+/// * Word with no value specified, e.g. `foo`. This is best used with `Option`.
+///   See `darling::util::Flag` for a more strongly-typed alternative.
+///
+/// ## Option
+/// * Any format produces `Some`.
+///
+/// ## `Result<T, darling::Error>`
+/// * Allows for fallible parsing; will populate the target field with the result of the
+///   parse attempt.
+pub trait FromMeta: Sized {
+    fn from_nested_meta(item: &NestedMeta) -> Result<Self> {
+        match *item {
+            NestedMeta::Literal(ref lit) => Self::from_value(lit),
+            NestedMeta::Meta(ref mi) => Self::from_meta(mi),
+        }
+    }
+
+    /// Create an instance from a `syn::Meta` by dispatching to the format-appropriate
+    /// trait function. This generally should not be overridden by implementers.
+    fn from_meta(item: &Meta) -> Result<Self> {
+        match *item {
+            Meta::Word(_) => Self::from_word(),
+            Meta::List(ref value) => Self::from_list(
+                &value
+                    .nested
+                    .clone()
+                    .into_iter()
+