Bug 1414254 - Vendor Rust dependencies r=jgraham draft
authorAndreas Tolfsen <ato@sny.no>
Fri, 03 Nov 2017 13:39:05 +0000
changeset 692716 b6c9c16604909d217a5b3cef60fe373cbb639234
parent 692715 221cf944419d42f95fa1d68ccbd5edf7bc9cd2ca
child 738831 f5d37e242f0558a3f81659797a30efb8027e5c82
push id87582
push userbmo:ato@sny.no
push dateFri, 03 Nov 2017 13:42:34 +0000
reviewersjgraham
bugs1414254
milestone58.0a1
Bug 1414254 - Vendor Rust dependencies r=jgraham MozReview-Commit-ID: CnT3DLl2KBR
third_party/rust/aho-corasick-0.6.2/.cargo-checksum.json
third_party/rust/aho-corasick-0.6.2/.travis.yml
third_party/rust/aho-corasick-0.6.2/COPYING
third_party/rust/aho-corasick-0.6.2/Cargo.toml
third_party/rust/aho-corasick-0.6.2/LICENSE-MIT
third_party/rust/aho-corasick-0.6.2/Makefile
third_party/rust/aho-corasick-0.6.2/README.md
third_party/rust/aho-corasick-0.6.2/UNLICENSE
third_party/rust/aho-corasick-0.6.2/benches/bench.rs
third_party/rust/aho-corasick-0.6.2/benches/random.txt
third_party/rust/aho-corasick-0.6.2/ctags.rust
third_party/rust/aho-corasick-0.6.2/examples/dict-search.rs
third_party/rust/aho-corasick-0.6.2/session.vim
third_party/rust/aho-corasick-0.6.2/src/autiter.rs
third_party/rust/aho-corasick-0.6.2/src/full.rs
third_party/rust/aho-corasick-0.6.2/src/lib.rs
third_party/rust/aho-corasick-0.6.2/src/main.rs
third_party/rust/base64-0.5.2/.cargo-checksum.json
third_party/rust/base64-0.5.2/Cargo.toml
third_party/rust/base64-0.5.2/LICENSE-APACHE
third_party/rust/base64-0.5.2/LICENSE-MIT
third_party/rust/base64-0.5.2/README.md
third_party/rust/base64-0.5.2/benches/benchmarks.rs
third_party/rust/base64-0.5.2/examples/make_tables.rs
third_party/rust/base64-0.5.2/src/lib.rs
third_party/rust/base64-0.5.2/src/tables.rs
third_party/rust/base64-0.5.2/tests/tests.rs
third_party/rust/bzip2-sys/.cargo-checksum.json
third_party/rust/bzip2-sys/Cargo.toml
third_party/rust/bzip2-sys/build.rs
third_party/rust/bzip2-sys/lib.rs
third_party/rust/cc/.cargo-checksum.json
third_party/rust/cc/.travis.yml
third_party/rust/cc/Cargo.toml
third_party/rust/cc/LICENSE-APACHE
third_party/rust/cc/LICENSE-MIT
third_party/rust/cc/README.md
third_party/rust/cc/appveyor.yml
third_party/rust/cc/src/bin/gcc-shim.rs
third_party/rust/cc/src/com.rs
third_party/rust/cc/src/lib.rs
third_party/rust/cc/src/registry.rs
third_party/rust/cc/src/setup_config.rs
third_party/rust/cc/src/winapi.rs
third_party/rust/cc/src/windows_registry.rs
third_party/rust/cc/tests/cc_env.rs
third_party/rust/cc/tests/support/mod.rs
third_party/rust/cc/tests/test.rs
third_party/rust/clap-2.24.2/.cargo-checksum.json
third_party/rust/clap-2.24.2/.clog.toml
third_party/rust/clap-2.24.2/.github/CONTRIBUTING.md
third_party/rust/clap-2.24.2/.github/ISSUE_TEMPLATE.md
third_party/rust/clap-2.24.2/.travis.yml
third_party/rust/clap-2.24.2/CHANGELOG.md
third_party/rust/clap-2.24.2/CONTRIBUTORS.md
third_party/rust/clap-2.24.2/Cargo.toml
third_party/rust/clap-2.24.2/LICENSE-MIT
third_party/rust/clap-2.24.2/README.md
third_party/rust/clap-2.24.2/appveyor.yml
third_party/rust/clap-2.24.2/clap-test.rs
third_party/rust/clap-2.24.2/index.html
third_party/rust/clap-2.24.2/justfile
third_party/rust/clap-2.24.2/rustfmt.toml
third_party/rust/clap-2.24.2/src/app/help.rs
third_party/rust/clap-2.24.2/src/app/macros.rs
third_party/rust/clap-2.24.2/src/app/meta.rs
third_party/rust/clap-2.24.2/src/app/mod.rs
third_party/rust/clap-2.24.2/src/app/parser.rs
third_party/rust/clap-2.24.2/src/app/settings.rs
third_party/rust/clap-2.24.2/src/app/usage.rs
third_party/rust/clap-2.24.2/src/app/validator.rs
third_party/rust/clap-2.24.2/src/args/any_arg.rs
third_party/rust/clap-2.24.2/src/args/arg.rs
third_party/rust/clap-2.24.2/src/args/arg_builder/base.rs
third_party/rust/clap-2.24.2/src/args/arg_builder/flag.rs
third_party/rust/clap-2.24.2/src/args/arg_builder/mod.rs
third_party/rust/clap-2.24.2/src/args/arg_builder/option.rs
third_party/rust/clap-2.24.2/src/args/arg_builder/positional.rs
third_party/rust/clap-2.24.2/src/args/arg_builder/switched.rs
third_party/rust/clap-2.24.2/src/args/arg_builder/valued.rs
third_party/rust/clap-2.24.2/src/args/arg_matcher.rs
third_party/rust/clap-2.24.2/src/args/arg_matches.rs
third_party/rust/clap-2.24.2/src/args/group.rs
third_party/rust/clap-2.24.2/src/args/macros.rs
third_party/rust/clap-2.24.2/src/args/matched_arg.rs
third_party/rust/clap-2.24.2/src/args/mod.rs
third_party/rust/clap-2.24.2/src/args/settings.rs
third_party/rust/clap-2.24.2/src/args/subcommand.rs
third_party/rust/clap-2.24.2/src/completions/bash.rs
third_party/rust/clap-2.24.2/src/completions/fish.rs
third_party/rust/clap-2.24.2/src/completions/macros.rs
third_party/rust/clap-2.24.2/src/completions/mod.rs
third_party/rust/clap-2.24.2/src/completions/powershell.rs
third_party/rust/clap-2.24.2/src/completions/shell.rs
third_party/rust/clap-2.24.2/src/completions/zsh.rs
third_party/rust/clap-2.24.2/src/errors.rs
third_party/rust/clap-2.24.2/src/fmt.rs
third_party/rust/clap-2.24.2/src/lib.rs
third_party/rust/clap-2.24.2/src/macros.rs
third_party/rust/clap-2.24.2/src/osstringext.rs
third_party/rust/clap-2.24.2/src/strext.rs
third_party/rust/clap-2.24.2/src/suggestions.rs
third_party/rust/clap-2.24.2/src/usage_parser.rs
third_party/rust/clap-2.25.0/.appveyor.yml
third_party/rust/clap-2.25.0/.cargo-checksum.json
third_party/rust/clap-2.25.0/.clog.toml
third_party/rust/clap-2.25.0/.github/CONTRIBUTING.md
third_party/rust/clap-2.25.0/.github/ISSUE_TEMPLATE.md
third_party/rust/clap-2.25.0/.mention-bot
third_party/rust/clap-2.25.0/.travis.yml
third_party/rust/clap-2.25.0/CHANGELOG.md
third_party/rust/clap-2.25.0/CONTRIBUTORS.md
third_party/rust/clap-2.25.0/Cargo.toml
third_party/rust/clap-2.25.0/LICENSE-MIT
third_party/rust/clap-2.25.0/README.md
third_party/rust/clap-2.25.0/clap-test.rs
third_party/rust/clap-2.25.0/index.html
third_party/rust/clap-2.25.0/justfile
third_party/rust/clap-2.25.0/rustfmt.toml
third_party/rust/clap-2.25.0/src/app/help.rs
third_party/rust/clap-2.25.0/src/app/macros.rs
third_party/rust/clap-2.25.0/src/app/meta.rs
third_party/rust/clap-2.25.0/src/app/mod.rs
third_party/rust/clap-2.25.0/src/app/parser.rs
third_party/rust/clap-2.25.0/src/app/settings.rs
third_party/rust/clap-2.25.0/src/app/usage.rs
third_party/rust/clap-2.25.0/src/app/validator.rs
third_party/rust/clap-2.25.0/src/args/any_arg.rs
third_party/rust/clap-2.25.0/src/args/arg.rs
third_party/rust/clap-2.25.0/src/args/arg_builder/base.rs
third_party/rust/clap-2.25.0/src/args/arg_builder/flag.rs
third_party/rust/clap-2.25.0/src/args/arg_builder/mod.rs
third_party/rust/clap-2.25.0/src/args/arg_builder/option.rs
third_party/rust/clap-2.25.0/src/args/arg_builder/positional.rs
third_party/rust/clap-2.25.0/src/args/arg_builder/switched.rs
third_party/rust/clap-2.25.0/src/args/arg_builder/valued.rs
third_party/rust/clap-2.25.0/src/args/arg_matcher.rs
third_party/rust/clap-2.25.0/src/args/arg_matches.rs
third_party/rust/clap-2.25.0/src/args/group.rs
third_party/rust/clap-2.25.0/src/args/macros.rs
third_party/rust/clap-2.25.0/src/args/matched_arg.rs
third_party/rust/clap-2.25.0/src/args/mod.rs
third_party/rust/clap-2.25.0/src/args/settings.rs
third_party/rust/clap-2.25.0/src/args/subcommand.rs
third_party/rust/clap-2.25.0/src/completions/bash.rs
third_party/rust/clap-2.25.0/src/completions/fish.rs
third_party/rust/clap-2.25.0/src/completions/macros.rs
third_party/rust/clap-2.25.0/src/completions/mod.rs
third_party/rust/clap-2.25.0/src/completions/powershell.rs
third_party/rust/clap-2.25.0/src/completions/shell.rs
third_party/rust/clap-2.25.0/src/completions/zsh.rs
third_party/rust/clap-2.25.0/src/errors.rs
third_party/rust/clap-2.25.0/src/fmt.rs
third_party/rust/clap-2.25.0/src/lib.rs
third_party/rust/clap-2.25.0/src/macros.rs
third_party/rust/clap-2.25.0/src/osstringext.rs
third_party/rust/clap-2.25.0/src/strext.rs
third_party/rust/clap-2.25.0/src/suggestions.rs
third_party/rust/clap-2.25.0/src/usage_parser.rs
third_party/rust/clap/.cargo-checksum.json
third_party/rust/clap/.github/ISSUE_TEMPLATE.md
third_party/rust/clap/.travis.yml
third_party/rust/clap/CHANGELOG.md
third_party/rust/clap/CONTRIBUTORS.md
third_party/rust/clap/Cargo.toml
third_party/rust/clap/README.md
third_party/rust/clap/SPONSORS.md
third_party/rust/clap/src/app/help.rs
third_party/rust/clap/src/app/macros.rs
third_party/rust/clap/src/app/mod.rs
third_party/rust/clap/src/app/parser.rs
third_party/rust/clap/src/app/settings.rs
third_party/rust/clap/src/app/validator.rs
third_party/rust/clap/src/args/any_arg.rs
third_party/rust/clap/src/args/arg.rs
third_party/rust/clap/src/args/arg_builder/flag.rs
third_party/rust/clap/src/args/arg_builder/option.rs
third_party/rust/clap/src/args/arg_builder/positional.rs
third_party/rust/clap/src/args/arg_builder/valued.rs
third_party/rust/clap/src/args/arg_matcher.rs
third_party/rust/clap/src/args/arg_matches.rs
third_party/rust/clap/src/completions/fish.rs
third_party/rust/clap/src/completions/zsh.rs
third_party/rust/clap/src/lib.rs
third_party/rust/clap/src/macros.rs
third_party/rust/clap/src/map.rs
third_party/rust/clap/src/suggestions.rs
third_party/rust/clap/src/usage_parser.rs
third_party/rust/flate2/.cargo-checksum.json
third_party/rust/flate2/.travis.yml
third_party/rust/flate2/Cargo.toml
third_party/rust/flate2/README.md
third_party/rust/flate2/appveyor.yml
third_party/rust/flate2/examples/deflatedecoder-bufread.rs
third_party/rust/flate2/examples/deflatedecoder-read.rs
third_party/rust/flate2/examples/deflatedecoder-write.rs
third_party/rust/flate2/examples/deflateencoder-bufread.rs
third_party/rust/flate2/examples/deflateencoder-read.rs
third_party/rust/flate2/examples/deflateencoder-write.rs
third_party/rust/flate2/examples/flatereadext.rs
third_party/rust/flate2/examples/gzbuilder.rs
third_party/rust/flate2/examples/gzdecoder-bufread.rs
third_party/rust/flate2/examples/gzdecoder-read.rs
third_party/rust/flate2/examples/gzencoder-bufread.rs
third_party/rust/flate2/examples/gzencoder-read.rs
third_party/rust/flate2/examples/gzencoder-write.rs
third_party/rust/flate2/examples/gzmultidecoder-bufread.rs
third_party/rust/flate2/examples/gzmultidecoder-read.rs
third_party/rust/flate2/examples/hello_world.txt
third_party/rust/flate2/examples/zlibdecoder-bufread.rs
third_party/rust/flate2/examples/zlibdecoder-read.rs
third_party/rust/flate2/examples/zlibdecoder-write.rs
third_party/rust/flate2/examples/zlibencoder-bufread.rs
third_party/rust/flate2/examples/zlibencoder-read.rs
third_party/rust/flate2/examples/zlibencoder-write.rs
third_party/rust/flate2/src/bufreader.rs
third_party/rust/flate2/src/crc.rs
third_party/rust/flate2/src/deflate.rs
third_party/rust/flate2/src/deflate/bufread.rs
third_party/rust/flate2/src/deflate/mod.rs
third_party/rust/flate2/src/deflate/read.rs
third_party/rust/flate2/src/deflate/write.rs
third_party/rust/flate2/src/ffi.rs
third_party/rust/flate2/src/gz.rs
third_party/rust/flate2/src/gz/bufread.rs
third_party/rust/flate2/src/gz/mod.rs
third_party/rust/flate2/src/gz/read.rs
third_party/rust/flate2/src/gz/write.rs
third_party/rust/flate2/src/lib.rs
third_party/rust/flate2/src/mem.rs
third_party/rust/flate2/src/zio.rs
third_party/rust/flate2/src/zlib.rs
third_party/rust/flate2/src/zlib/bufread.rs
third_party/rust/flate2/src/zlib/mod.rs
third_party/rust/flate2/src/zlib/read.rs
third_party/rust/flate2/src/zlib/write.rs
third_party/rust/flate2/tests/early-flush.rs
third_party/rust/flate2/tests/zero-write.rs
third_party/rust/gcc-0.3.42/.cargo-checksum.json
third_party/rust/gcc-0.3.42/.travis.yml
third_party/rust/gcc-0.3.42/Cargo.toml
third_party/rust/gcc-0.3.42/LICENSE-APACHE
third_party/rust/gcc-0.3.42/LICENSE-MIT
third_party/rust/gcc-0.3.42/README.md
third_party/rust/gcc-0.3.42/appveyor.yml
third_party/rust/gcc-0.3.42/src/bin/gcc-shim.rs
third_party/rust/gcc-0.3.42/src/lib.rs
third_party/rust/gcc-0.3.42/src/registry.rs
third_party/rust/gcc-0.3.42/src/windows_registry.rs
third_party/rust/gcc-0.3.42/tests/cc_env.rs
third_party/rust/gcc-0.3.42/tests/support/mod.rs
third_party/rust/gcc-0.3.42/tests/test.rs
third_party/rust/httparse-1.2.2/.cargo-checksum.json
third_party/rust/httparse-1.2.2/.travis.yml
third_party/rust/httparse-1.2.2/.travis_after.sh
third_party/rust/httparse-1.2.2/Cargo.toml
third_party/rust/httparse-1.2.2/LICENSE-APACHE
third_party/rust/httparse-1.2.2/LICENSE-MIT
third_party/rust/httparse-1.2.2/README.md
third_party/rust/httparse-1.2.2/benches/parse.rs
third_party/rust/httparse-1.2.2/src/iter.rs
third_party/rust/httparse-1.2.2/src/lib.rs
third_party/rust/hyper-0.10.10/.cargo-checksum.json
third_party/rust/hyper-0.10.10/Cargo.toml
third_party/rust/hyper-0.10.10/LICENSE
third_party/rust/hyper-0.10.10/build.rs
third_party/rust/hyper-0.10.10/src/buffer.rs
third_party/rust/hyper-0.10.10/src/client/mod.rs
third_party/rust/hyper-0.10.10/src/client/pool.rs
third_party/rust/hyper-0.10.10/src/client/proxy.rs
third_party/rust/hyper-0.10.10/src/client/request.rs
third_party/rust/hyper-0.10.10/src/client/response.rs
third_party/rust/hyper-0.10.10/src/error.rs
third_party/rust/hyper-0.10.10/src/header/common/accept.rs
third_party/rust/hyper-0.10.10/src/header/common/accept_charset.rs
third_party/rust/hyper-0.10.10/src/header/common/accept_encoding.rs
third_party/rust/hyper-0.10.10/src/header/common/accept_language.rs
third_party/rust/hyper-0.10.10/src/header/common/accept_ranges.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_credentials.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_headers.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_methods.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_origin.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_expose_headers.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_max_age.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_request_headers.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_request_method.rs
third_party/rust/hyper-0.10.10/src/header/common/allow.rs
third_party/rust/hyper-0.10.10/src/header/common/authorization.rs
third_party/rust/hyper-0.10.10/src/header/common/cache_control.rs
third_party/rust/hyper-0.10.10/src/header/common/connection.rs
third_party/rust/hyper-0.10.10/src/header/common/content_disposition.rs
third_party/rust/hyper-0.10.10/src/header/common/content_encoding.rs
third_party/rust/hyper-0.10.10/src/header/common/content_language.rs
third_party/rust/hyper-0.10.10/src/header/common/content_length.rs
third_party/rust/hyper-0.10.10/src/header/common/content_range.rs
third_party/rust/hyper-0.10.10/src/header/common/content_type.rs
third_party/rust/hyper-0.10.10/src/header/common/cookie.rs
third_party/rust/hyper-0.10.10/src/header/common/date.rs
third_party/rust/hyper-0.10.10/src/header/common/etag.rs
third_party/rust/hyper-0.10.10/src/header/common/expect.rs
third_party/rust/hyper-0.10.10/src/header/common/expires.rs
third_party/rust/hyper-0.10.10/src/header/common/from.rs
third_party/rust/hyper-0.10.10/src/header/common/host.rs
third_party/rust/hyper-0.10.10/src/header/common/if_match.rs
third_party/rust/hyper-0.10.10/src/header/common/if_modified_since.rs
third_party/rust/hyper-0.10.10/src/header/common/if_none_match.rs
third_party/rust/hyper-0.10.10/src/header/common/if_range.rs
third_party/rust/hyper-0.10.10/src/header/common/if_unmodified_since.rs
third_party/rust/hyper-0.10.10/src/header/common/last-event-id.rs
third_party/rust/hyper-0.10.10/src/header/common/last_modified.rs
third_party/rust/hyper-0.10.10/src/header/common/location.rs
third_party/rust/hyper-0.10.10/src/header/common/mod.rs
third_party/rust/hyper-0.10.10/src/header/common/origin.rs
third_party/rust/hyper-0.10.10/src/header/common/pragma.rs
third_party/rust/hyper-0.10.10/src/header/common/prefer.rs
third_party/rust/hyper-0.10.10/src/header/common/preference_applied.rs
third_party/rust/hyper-0.10.10/src/header/common/range.rs
third_party/rust/hyper-0.10.10/src/header/common/referer.rs
third_party/rust/hyper-0.10.10/src/header/common/referrer_policy.rs
third_party/rust/hyper-0.10.10/src/header/common/server.rs
third_party/rust/hyper-0.10.10/src/header/common/set_cookie.rs
third_party/rust/hyper-0.10.10/src/header/common/strict_transport_security.rs
third_party/rust/hyper-0.10.10/src/header/common/transfer_encoding.rs
third_party/rust/hyper-0.10.10/src/header/common/upgrade.rs
third_party/rust/hyper-0.10.10/src/header/common/user_agent.rs
third_party/rust/hyper-0.10.10/src/header/common/vary.rs
third_party/rust/hyper-0.10.10/src/header/internals/cell.rs
third_party/rust/hyper-0.10.10/src/header/internals/item.rs
third_party/rust/hyper-0.10.10/src/header/internals/mod.rs
third_party/rust/hyper-0.10.10/src/header/internals/vec_map.rs
third_party/rust/hyper-0.10.10/src/header/mod.rs
third_party/rust/hyper-0.10.10/src/header/parsing.rs
third_party/rust/hyper-0.10.10/src/header/shared/charset.rs
third_party/rust/hyper-0.10.10/src/header/shared/encoding.rs
third_party/rust/hyper-0.10.10/src/header/shared/entity.rs
third_party/rust/hyper-0.10.10/src/header/shared/httpdate.rs
third_party/rust/hyper-0.10.10/src/header/shared/mod.rs
third_party/rust/hyper-0.10.10/src/header/shared/quality_item.rs
third_party/rust/hyper-0.10.10/src/http/h1.rs
third_party/rust/hyper-0.10.10/src/http/message.rs
third_party/rust/hyper-0.10.10/src/http/mod.rs
third_party/rust/hyper-0.10.10/src/lib.rs
third_party/rust/hyper-0.10.10/src/method.rs
third_party/rust/hyper-0.10.10/src/mock.rs
third_party/rust/hyper-0.10.10/src/net.rs
third_party/rust/hyper-0.10.10/src/server/listener.rs
third_party/rust/hyper-0.10.10/src/server/mod.rs
third_party/rust/hyper-0.10.10/src/server/request.rs
third_party/rust/hyper-0.10.10/src/server/response.rs
third_party/rust/hyper-0.10.10/src/status.rs
third_party/rust/hyper-0.10.10/src/uri.rs
third_party/rust/hyper-0.10.10/src/version.rs
third_party/rust/isatty/.cargo-checksum.json
third_party/rust/isatty/.travis.yml
third_party/rust/isatty/Cargo.toml
third_party/rust/isatty/README.md
third_party/rust/isatty/appveyor.yml
third_party/rust/isatty/src/lib.rs
third_party/rust/lazy_static-0.2.2/.cargo-checksum.json
third_party/rust/lazy_static-0.2.2/.travis.yml
third_party/rust/lazy_static-0.2.2/Cargo.toml
third_party/rust/lazy_static-0.2.2/LICENSE
third_party/rust/lazy_static-0.2.2/README.md
third_party/rust/lazy_static-0.2.2/src/core_lazy.rs
third_party/rust/lazy_static-0.2.2/src/lazy.rs
third_party/rust/lazy_static-0.2.2/src/lib.rs
third_party/rust/lazy_static-0.2.2/src/nightly_lazy.rs
third_party/rust/lazy_static-0.2.2/tests/no_std.rs
third_party/rust/lazy_static-0.2.2/tests/test.rs
third_party/rust/libc-0.2.30/.cargo-checksum.json
third_party/rust/libc-0.2.30/.travis.yml
third_party/rust/libc-0.2.30/Cargo.toml
third_party/rust/libc-0.2.30/LICENSE-APACHE
third_party/rust/libc-0.2.30/LICENSE-MIT
third_party/rust/libc-0.2.30/README.md
third_party/rust/libc-0.2.30/appveyor.yml
third_party/rust/libc-0.2.30/ci/README.md
third_party/rust/libc-0.2.30/ci/android-accept-licenses.sh
third_party/rust/libc-0.2.30/ci/android-install-ndk.sh
third_party/rust/libc-0.2.30/ci/android-install-sdk.sh
third_party/rust/libc-0.2.30/ci/android-sysimage.sh
third_party/rust/libc-0.2.30/ci/docker/aarch64-linux-android/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/aarch64-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/arm-linux-androideabi/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/asmjs-unknown-emscripten/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/i686-linux-android/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/i686-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/i686-unknown-linux-musl/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/mips-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/mips-unknown-linux-musl/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/mipsel-unknown-linux-musl/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/powerpc-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/s390x-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/wasm32-unknown-emscripten/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/wasm32-unknown-emscripten/node-wrapper.sh
third_party/rust/libc-0.2.30/ci/docker/x86_64-linux-android/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/x86_64-rumprun-netbsd/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/x86_64-rumprun-netbsd/runtest.rs
third_party/rust/libc-0.2.30/ci/docker/x86_64-unknown-freebsd/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/x86_64-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.30/ci/docker/x86_64-unknown-linux-musl/Dockerfile
third_party/rust/libc-0.2.30/ci/dox.sh
third_party/rust/libc-0.2.30/ci/emscripten-entry.sh
third_party/rust/libc-0.2.30/ci/emscripten.sh
third_party/rust/libc-0.2.30/ci/ios/deploy_and_run_on_ios_simulator.rs
third_party/rust/libc-0.2.30/ci/landing-page-footer.html
third_party/rust/libc-0.2.30/ci/landing-page-head.html
third_party/rust/libc-0.2.30/ci/run-docker.sh
third_party/rust/libc-0.2.30/ci/run-qemu.sh
third_party/rust/libc-0.2.30/ci/run.sh
third_party/rust/libc-0.2.30/ci/runtest-android.rs
third_party/rust/libc-0.2.30/ci/style.rs
third_party/rust/libc-0.2.30/src/dox.rs
third_party/rust/libc-0.2.30/src/lib.rs
third_party/rust/libc-0.2.30/src/macros.rs
third_party/rust/libc-0.2.30/src/redox.rs
third_party/rust/libc-0.2.30/src/unix/bsd/apple/b32.rs
third_party/rust/libc-0.2.30/src/unix/bsd/apple/b64.rs
third_party/rust/libc-0.2.30/src/unix/bsd/apple/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/freebsdlike/dragonfly/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
third_party/rust/libc-0.2.30/src/unix/bsd/freebsdlike/freebsd/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/freebsdlike/freebsd/x86.rs
third_party/rust/libc-0.2.30/src/unix/bsd/freebsdlike/freebsd/x86_64.rs
third_party/rust/libc-0.2.30/src/unix/bsd/freebsdlike/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/netbsd/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/netbsd/other/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/openbsdlike/bitrig.rs
third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs
third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/openbsdlike/other/b32/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/openbsdlike/other/b64/mod.rs
third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/openbsdlike/other/mod.rs
third_party/rust/libc-0.2.30/src/unix/haiku/b32.rs
third_party/rust/libc-0.2.30/src/unix/haiku/b64.rs
third_party/rust/libc-0.2.30/src/unix/haiku/mod.rs
third_party/rust/libc-0.2.30/src/unix/mod.rs
third_party/rust/libc-0.2.30/src/unix/newlib/arm/mod.rs
third_party/rust/libc-0.2.30/src/unix/newlib/mod.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/android/b32/arm.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/android/b32/mod.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/android/b32/x86.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/android/b64/aarch64.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/android/b64/mod.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/android/b64/x86_64.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/android/mod.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/emscripten.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/mips/mips32.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/mips/mips64.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/mips/mod.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/mod.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b32/arm.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b32/mips.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b32/mod.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b32/x86.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b64/aarch64.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b64/mod.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b64/powerpc64.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b64/x86_64.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/mod.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b32/arm.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b32/mod.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b32/powerpc.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b32/x86.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b64/aarch64.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b64/mod.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b64/powerpc64.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b64/sparc64.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b64/x86_64.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/mod.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/linux/s390x.rs
third_party/rust/libc-0.2.30/src/unix/notbsd/mod.rs
third_party/rust/libc-0.2.30/src/unix/solaris/mod.rs
third_party/rust/libc-0.2.30/src/unix/uclibc/mips/mips32.rs
third_party/rust/libc-0.2.30/src/unix/uclibc/mips/mips64.rs
third_party/rust/libc-0.2.30/src/unix/uclibc/mips/mod.rs
third_party/rust/libc-0.2.30/src/unix/uclibc/mod.rs
third_party/rust/libc-0.2.30/src/unix/uclibc/x86_64/l4re.rs
third_party/rust/libc-0.2.30/src/unix/uclibc/x86_64/mod.rs
third_party/rust/libc-0.2.30/src/windows.rs
third_party/rust/log-0.3.6/.cargo-checksum.json
third_party/rust/log-0.3.6/.travis.yml
third_party/rust/log-0.3.6/Cargo.toml
third_party/rust/log-0.3.6/LICENSE-APACHE
third_party/rust/log-0.3.6/LICENSE-MIT
third_party/rust/log-0.3.6/README.md
third_party/rust/log-0.3.6/appveyor.yml
third_party/rust/log-0.3.6/src/lib.rs
third_party/rust/log-0.3.6/src/macros.rs
third_party/rust/log-0.3.6/tests/filters.rs
third_party/rust/mime-0.2.4/.cargo-checksum.json
third_party/rust/mime-0.2.4/.travis.yml
third_party/rust/mime-0.2.4/Cargo.toml
third_party/rust/mime-0.2.4/LICENSE
third_party/rust/mime-0.2.4/README.md
third_party/rust/mime-0.2.4/src/lib.rs
third_party/rust/miniz-sys/.cargo-checksum.json
third_party/rust/miniz-sys/Cargo.toml
third_party/rust/miniz-sys/build.rs
third_party/rust/miniz-sys/miniz.c
third_party/rust/num-integer-0.1.33/.cargo-checksum.json
third_party/rust/num-integer-0.1.33/Cargo.toml
third_party/rust/num-integer-0.1.33/LICENSE-APACHE
third_party/rust/num-integer-0.1.33/LICENSE-MIT
third_party/rust/num-integer-0.1.33/src/lib.rs
third_party/rust/num-integer/.cargo-checksum.json
third_party/rust/num-integer/Cargo.toml
third_party/rust/num-integer/src/lib.rs
third_party/rust/num-iter/.cargo-checksum.json
third_party/rust/num-iter/Cargo.toml
third_party/rust/num-traits-0.1.37/.cargo-checksum.json
third_party/rust/num-traits-0.1.37/Cargo.toml
third_party/rust/num-traits-0.1.37/LICENSE-APACHE
third_party/rust/num-traits-0.1.37/LICENSE-MIT
third_party/rust/num-traits-0.1.37/src/bounds.rs
third_party/rust/num-traits-0.1.37/src/cast.rs
third_party/rust/num-traits-0.1.37/src/float.rs
third_party/rust/num-traits-0.1.37/src/identities.rs
third_party/rust/num-traits-0.1.37/src/int.rs
third_party/rust/num-traits-0.1.37/src/lib.rs
third_party/rust/num-traits-0.1.37/src/ops/checked.rs
third_party/rust/num-traits-0.1.37/src/ops/mod.rs
third_party/rust/num-traits-0.1.37/src/ops/saturating.rs
third_party/rust/num-traits-0.1.37/src/ops/wrapping.rs
third_party/rust/num-traits-0.1.37/src/pow.rs
third_party/rust/num-traits-0.1.37/src/sign.rs
third_party/rust/num-traits-0.1.39/.cargo-checksum.json
third_party/rust/num-traits-0.1.39/Cargo.toml
third_party/rust/num-traits-0.1.39/LICENSE-APACHE
third_party/rust/num-traits-0.1.39/LICENSE-MIT
third_party/rust/num-traits-0.1.39/src/bounds.rs
third_party/rust/num-traits-0.1.39/src/cast.rs
third_party/rust/num-traits-0.1.39/src/float.rs
third_party/rust/num-traits-0.1.39/src/identities.rs
third_party/rust/num-traits-0.1.39/src/int.rs
third_party/rust/num-traits-0.1.39/src/lib.rs
third_party/rust/num-traits-0.1.39/src/ops/checked.rs
third_party/rust/num-traits-0.1.39/src/ops/mod.rs
third_party/rust/num-traits-0.1.39/src/ops/saturating.rs
third_party/rust/num-traits-0.1.39/src/ops/wrapping.rs
third_party/rust/num-traits-0.1.39/src/pow.rs
third_party/rust/num-traits-0.1.39/src/sign.rs
third_party/rust/num-traits/.cargo-checksum.json
third_party/rust/num-traits/Cargo.toml
third_party/rust/num-traits/src/float.rs
third_party/rust/num/.cargo-checksum.json
third_party/rust/num/.travis.yml
third_party/rust/num/Cargo.toml
third_party/rust/num/README.md
third_party/rust/num/bors.toml
third_party/rust/num/ci/test_full.sh
third_party/rust/num_cpus-1.2.1/.cargo-checksum.json
third_party/rust/num_cpus-1.2.1/.travis.yml
third_party/rust/num_cpus-1.2.1/Cargo.toml
third_party/rust/num_cpus-1.2.1/LICENSE-APACHE
third_party/rust/num_cpus-1.2.1/LICENSE-MIT
third_party/rust/num_cpus-1.2.1/README.md
third_party/rust/num_cpus-1.2.1/src/lib.rs
third_party/rust/num_cpus-1.6.2/.appveyor.yml
third_party/rust/num_cpus-1.6.2/.cargo-checksum.json
third_party/rust/num_cpus-1.6.2/.travis.yml
third_party/rust/num_cpus-1.6.2/Cargo.toml
third_party/rust/num_cpus-1.6.2/LICENSE-APACHE
third_party/rust/num_cpus-1.6.2/LICENSE-MIT
third_party/rust/num_cpus-1.6.2/README.md
third_party/rust/num_cpus-1.6.2/src/lib.rs
third_party/rust/regex-0.2.1/.cargo-checksum.json
third_party/rust/regex-0.2.1/.travis.yml
third_party/rust/regex-0.2.1/CHANGELOG.md
third_party/rust/regex-0.2.1/Cargo.toml
third_party/rust/regex-0.2.1/HACKING.md
third_party/rust/regex-0.2.1/LICENSE-APACHE
third_party/rust/regex-0.2.1/LICENSE-MIT
third_party/rust/regex-0.2.1/PERFORMANCE.md
third_party/rust/regex-0.2.1/README.md
third_party/rust/regex-0.2.1/appveyor.yml
third_party/rust/regex-0.2.1/ci/after_success.sh
third_party/rust/regex-0.2.1/ci/run-kcov
third_party/rust/regex-0.2.1/ci/run-shootout-test
third_party/rust/regex-0.2.1/ci/script.sh
third_party/rust/regex-0.2.1/examples/regexdna-input.txt
third_party/rust/regex-0.2.1/examples/regexdna-output.txt
third_party/rust/regex-0.2.1/examples/shootout-regex-dna-bytes.rs
third_party/rust/regex-0.2.1/examples/shootout-regex-dna-cheat.rs
third_party/rust/regex-0.2.1/examples/shootout-regex-dna-replace.rs
third_party/rust/regex-0.2.1/examples/shootout-regex-dna-single-cheat.rs
third_party/rust/regex-0.2.1/examples/shootout-regex-dna-single.rs
third_party/rust/regex-0.2.1/examples/shootout-regex-dna.rs
third_party/rust/regex-0.2.1/scripts/frequencies.py
third_party/rust/regex-0.2.1/scripts/regex-match-tests.py
third_party/rust/regex-0.2.1/scripts/unicode.py
third_party/rust/regex-0.2.1/src/backtrack.rs
third_party/rust/regex-0.2.1/src/compile.rs
third_party/rust/regex-0.2.1/src/dfa.rs
third_party/rust/regex-0.2.1/src/error.rs
third_party/rust/regex-0.2.1/src/exec.rs
third_party/rust/regex-0.2.1/src/expand.rs
third_party/rust/regex-0.2.1/src/freqs.rs
third_party/rust/regex-0.2.1/src/input.rs
third_party/rust/regex-0.2.1/src/lib.rs
third_party/rust/regex-0.2.1/src/literals.rs
third_party/rust/regex-0.2.1/src/pattern.rs
third_party/rust/regex-0.2.1/src/pikevm.rs
third_party/rust/regex-0.2.1/src/prog.rs
third_party/rust/regex-0.2.1/src/re_builder.rs
third_party/rust/regex-0.2.1/src/re_bytes.rs
third_party/rust/regex-0.2.1/src/re_plugin.rs
third_party/rust/regex-0.2.1/src/re_set.rs
third_party/rust/regex-0.2.1/src/re_trait.rs
third_party/rust/regex-0.2.1/src/re_unicode.rs
third_party/rust/regex-0.2.1/src/simd_accel/mod.rs
third_party/rust/regex-0.2.1/src/simd_accel/teddy128.rs
third_party/rust/regex-0.2.1/src/simd_fallback/mod.rs
third_party/rust/regex-0.2.1/src/simd_fallback/teddy128.rs
third_party/rust/regex-0.2.1/src/sparse.rs
third_party/rust/regex-0.2.1/src/testdata/LICENSE
third_party/rust/regex-0.2.1/src/testdata/README
third_party/rust/regex-0.2.1/src/testdata/basic.dat
third_party/rust/regex-0.2.1/src/testdata/nullsubexpr.dat
third_party/rust/regex-0.2.1/src/testdata/repetition.dat
third_party/rust/regex-0.2.1/src/utf8.rs
third_party/rust/regex-0.2.1/tests/api.rs
third_party/rust/regex-0.2.1/tests/api_str.rs
third_party/rust/regex-0.2.1/tests/bytes.rs
third_party/rust/regex-0.2.1/tests/crazy.rs
third_party/rust/regex-0.2.1/tests/flags.rs
third_party/rust/regex-0.2.1/tests/fowler.rs
third_party/rust/regex-0.2.1/tests/macros.rs
third_party/rust/regex-0.2.1/tests/macros_bytes.rs
third_party/rust/regex-0.2.1/tests/macros_str.rs
third_party/rust/regex-0.2.1/tests/misc.rs
third_party/rust/regex-0.2.1/tests/multiline.rs
third_party/rust/regex-0.2.1/tests/noparse.rs
third_party/rust/regex-0.2.1/tests/plugin.rs
third_party/rust/regex-0.2.1/tests/regression.rs
third_party/rust/regex-0.2.1/tests/replace.rs
third_party/rust/regex-0.2.1/tests/searcher.rs
third_party/rust/regex-0.2.1/tests/set.rs
third_party/rust/regex-0.2.1/tests/shortest_match.rs
third_party/rust/regex-0.2.1/tests/suffix_reverse.rs
third_party/rust/regex-0.2.1/tests/test_backtrack.rs
third_party/rust/regex-0.2.1/tests/test_backtrack_bytes.rs
third_party/rust/regex-0.2.1/tests/test_backtrack_utf8bytes.rs
third_party/rust/regex-0.2.1/tests/test_default.rs
third_party/rust/regex-0.2.1/tests/test_default_bytes.rs
third_party/rust/regex-0.2.1/tests/test_nfa.rs
third_party/rust/regex-0.2.1/tests/test_nfa_bytes.rs
third_party/rust/regex-0.2.1/tests/test_nfa_utf8bytes.rs
third_party/rust/regex-0.2.1/tests/test_plugin.rs
third_party/rust/regex-0.2.1/tests/unicode.rs
third_party/rust/regex-0.2.1/tests/word_boundary.rs
third_party/rust/regex-0.2.1/tests/word_boundary_ascii.rs
third_party/rust/regex-0.2.1/tests/word_boundary_unicode.rs
third_party/rust/regex-syntax-0.4.0/.cargo-checksum.json
third_party/rust/regex-syntax-0.4.0/Cargo.toml
third_party/rust/regex-syntax-0.4.0/src/lib.rs
third_party/rust/regex-syntax-0.4.0/src/literals.rs
third_party/rust/regex-syntax-0.4.0/src/parser.rs
third_party/rust/regex-syntax-0.4.0/src/properties.rs
third_party/rust/regex-syntax-0.4.0/src/unicode.rs
third_party/rust/rustc-serialize-0.3.22/.cargo-checksum.json
third_party/rust/rustc-serialize-0.3.22/.travis.yml
third_party/rust/rustc-serialize-0.3.22/Cargo.toml
third_party/rust/rustc-serialize-0.3.22/LICENSE-APACHE
third_party/rust/rustc-serialize-0.3.22/LICENSE-MIT
third_party/rust/rustc-serialize-0.3.22/README.md
third_party/rust/rustc-serialize-0.3.22/appveyor.yml
third_party/rust/rustc-serialize-0.3.22/benches/base64.rs
third_party/rust/rustc-serialize-0.3.22/benches/hex.rs
third_party/rust/rustc-serialize-0.3.22/benches/json.rs
third_party/rust/rustc-serialize-0.3.22/src/base64.rs
third_party/rust/rustc-serialize-0.3.22/src/collection_impls.rs
third_party/rust/rustc-serialize-0.3.22/src/hex.rs
third_party/rust/rustc-serialize-0.3.22/src/json.rs
third_party/rust/rustc-serialize-0.3.22/src/lib.rs
third_party/rust/rustc-serialize-0.3.22/src/serialize.rs
third_party/rust/rustc_version/.cargo-checksum.json
third_party/rust/rustc_version/.travis.yml
third_party/rust/rustc_version/Cargo.toml
third_party/rust/rustc_version/LICENSE-APACHE
third_party/rust/rustc_version/LICENSE-MIT
third_party/rust/rustc_version/README.md
third_party/rust/rustc_version/src/lib.rs
third_party/rust/semver-0.1.20/.cargo-checksum.json
third_party/rust/semver-0.1.20/.travis.yml
third_party/rust/semver-0.1.20/Cargo.toml
third_party/rust/semver-0.1.20/LICENSE-APACHE
third_party/rust/semver-0.1.20/LICENSE-MIT
third_party/rust/semver-0.1.20/README.md
third_party/rust/semver-0.1.20/src/lib.rs
third_party/rust/semver-0.1.20/src/version.rs
third_party/rust/semver-0.1.20/src/version_req.rs
third_party/rust/slog/.cargo-checksum.json
third_party/rust/slog/CHANGELOG.md
third_party/rust/slog/Cargo.toml
third_party/rust/slog/rusty-tags.vi
third_party/rust/slog/src/lib.rs
third_party/rust/textwrap-0.6.0/.appveyor.yml
third_party/rust/textwrap-0.6.0/.cargo-checksum.json
third_party/rust/textwrap-0.6.0/.travis.yml
third_party/rust/textwrap-0.6.0/Cargo.toml
third_party/rust/textwrap-0.6.0/LICENSE
third_party/rust/textwrap-0.6.0/README.md
third_party/rust/textwrap-0.6.0/benches/linear.rs
third_party/rust/textwrap-0.6.0/examples/layout.rs
third_party/rust/textwrap-0.6.0/examples/termwidth.rs
third_party/rust/textwrap-0.6.0/src/lib.rs
third_party/rust/textwrap/.appveyor.yml
third_party/rust/textwrap/.cargo-checksum.json
third_party/rust/textwrap/.rustfmt.toml
third_party/rust/textwrap/.travis.yml
third_party/rust/textwrap/Cargo.toml
third_party/rust/textwrap/README.md
third_party/rust/textwrap/benches/linear.rs
third_party/rust/textwrap/examples/layout.rs
third_party/rust/textwrap/examples/termwidth.rs
third_party/rust/textwrap/src/lib.rs
third_party/rust/textwrap/tests/version-numbers.rs
third_party/rust/thread-id-3.0.0/.appveyor.yml
third_party/rust/thread-id-3.0.0/.cargo-checksum.json
third_party/rust/thread-id-3.0.0/.travis.yml
third_party/rust/thread-id-3.0.0/Cargo.toml
third_party/rust/thread-id-3.0.0/license
third_party/rust/thread-id-3.0.0/readme.md
third_party/rust/thread-id-3.0.0/src/lib.rs
third_party/rust/unicase-1.4.0/.cargo-checksum.json
third_party/rust/unicase-1.4.0/.travis.yml
third_party/rust/unicase-1.4.0/Cargo.toml
third_party/rust/unicase-1.4.0/LICENSE
third_party/rust/unicase-1.4.0/README.md
third_party/rust/unicase-1.4.0/build.rs
third_party/rust/unicase-1.4.0/src/lib.rs
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"e17babe5ba0bdd19ec59a37b4a099fd4313bff58be63a2ff506075f9a97dc172","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"367c53caf576e1c811c77b5234f4d00ee23f5b1052d5e11bdc0c3153a8d9ae82","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","Makefile":"a45a128685a2ae7d4fa39d310786674417ee113055ef290a11f88002285865fc","README.md":"9bc60d2cec222b50f87c85cf9475349bb228a36f89796c5d6481c52560ddde3a","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","benches/bench.rs":"acf4844efadeafc7bc396c2b16f2a184e140b6c17d1084dbaf454196de2090cd","benches/random.txt":"9386fb3efedc7ffbd09fb49088347f1056bc2d90a861009fa2f804cdb714efcb","ctags.rust":"3d128d3cc59f702e68953ba2fe6c3f46bc6991fc575308db060482d5da0c79f3","examples/dict-search.rs":"30eb44b1a0b599507db4c23a90f74199faabc64a8ae1d603ecdf3bba7428eb1e","session.vim":"95cb1d7caf0ff7fbe76ec911988d908ddd883381c925ba64b537695bc9f021c4","src/autiter.rs":"dc8817af24825c356842c814d771868fb07b6965addf4780e8b9dea9718344a0","src/full.rs":"b83a9c8ff3ef611c316b68650915df2d7f361a49b59dab103dc2c5476f2d8303","src/lib.rs":"68bf2ed02d58bebee6f7f7579038f1e4b60a2c4acc334263cb837bcbe15ffe94","src/main.rs":"fc867cb5f0b02d0f49ecab06b72c05a247cbcf3bf9228c235de8e787bda7bef5"},"package":"0638fd549427caa90c499814196d1b9e3725eb4d15d7339d6de073a680ed0ca2"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/.travis.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-language: rust
-rust:
-  - 1.12.0
-  - stable
-  - beta
-  - nightly
-script:
-  - cargo build --verbose
-  - cargo test --verbose
-  - cargo doc
-  - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
-      cargo bench --verbose;
-    fi
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/COPYING
+++ /dev/null
@@ -1,3 +0,0 @@
-This project is dual-licensed under the Unlicense and MIT licenses.
-
-You may use this code under the terms of either license.
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/Cargo.toml
+++ /dev/null
@@ -1,47 +0,0 @@
-[package]
-name = "aho-corasick"
-version = "0.6.2"  #:version
-authors = ["Andrew Gallant <jamslam@gmail.com>"]
-description = "Fast multiple substring searching with finite state machines."
-documentation = "http://burntsushi.net/rustdoc/aho_corasick/"
-homepage = "https://github.com/BurntSushi/aho-corasick"
-repository = "https://github.com/BurntSushi/aho-corasick"
-readme = "README.md"
-keywords = ["string", "search", "text", "aho", "corasick"]
-license = "Unlicense/MIT"
-exclude = ["benches/sherlock.txt"]
-
-[lib]
-name = "aho_corasick"
-
-[[bin]]
-name = "aho-corasick-dot"
-test = false
-doc = false
-bench = false
-
-[dependencies]
-memchr = "1"
-
-[dev-dependencies]
-csv = "0.15"
-docopt = "0.7"
-memmap = "0.5"
-quickcheck = { version = "0.4", default-features = false }
-rand = "0.3"
-rustc-serialize = "0.3"
-
-[[bench]]
-name = "bench"
-path = "benches/bench.rs"
-test = false
-bench = true
-
-[profile.test]
-debug = true
-
-[profile.bench]
-debug = true
-
-[profile.release]
-debug = true
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/LICENSE-MIT
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Andrew Gallant
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-all:
-	echo Nothing to do...
-
-ctags:
-	ctags --recurse --options=ctags.rust --languages=Rust
-
-docs:
-	cargo doc
-	in-dir ./target/doc fix-perms
-	rscp ./target/doc/* gopher:~/www/burntsushi.net/rustdoc/
-
-push:
-	git push origin master
-	git push github master
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/README.md
+++ /dev/null
@@ -1,55 +0,0 @@
-This crate provides an implementation of the
-[Aho-Corasick](http://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm)
-algorithm. Its intended use case is for fast substring matching, particularly
-when matching multiple substrings in a search text. This is achieved by
-compiling the substrings into a finite state machine.
-
-This implementation provides optimal algorithmic time complexity. Construction
-of the finite state machine is `O(p)` where `p` is the length of the substrings
-concatenated. Matching against search text is `O(n + p + m)`, where `n` is
-the length of the search text and `m` is the number of matches.
-
-[![Build status](https://api.travis-ci.org/BurntSushi/aho-corasick.png)](https://travis-ci.org/BurntSushi/aho-corasick)
-[![](http://meritbadge.herokuapp.com/aho-corasick)](https://crates.io/crates/aho-corasick)
-
-Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
-
-
-### Documentation
-
-[http://burntsushi.net/rustdoc/aho_corasick/](http://burntsushi.net/rustdoc/aho_corasick/).
-
-
-### Example
-
-The documentation contains several examples, and there is a more complete
-example as a full program in `examples/dict-search.rs`.
-
-Here is a quick example showing simple substring matching:
-
-```rust
-use aho_corasick::{Automaton, AcAutomaton, Match};
-
-let aut = AcAutomaton::new(vec!["apple", "maple"]);
-let mut it = aut.find("I like maple apples.");
-assert_eq!(it.next(), Some(Match {
-    pati: 1,
-    start: 7,
-    end: 12,
-}));
-assert_eq!(it.next(), Some(Match {
-    pati: 0,
-    start: 13,
-    end: 18,
-}));
-assert_eq!(it.next(), None);
-```
-
-
-### Alternatives
-
-Aho-Corasick is useful for matching multiple substrings against many long
-strings. If your long string is fixed, then you might consider building a
-[suffix array](https://github.com/BurntSushi/suffix)
-of the search text (which takes `O(n)` time). Matches can then be found in
-`O(plogn)` time.
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/UNLICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-This is free and unencumbered software released into the public domain.
-
-Anyone is free to copy, modify, publish, use, compile, sell, or
-distribute this software, either in source code form or as a compiled
-binary, for any purpose, commercial or non-commercial, and by any
-means.
-
-In jurisdictions that recognize copyright laws, the author or authors
-of this software dedicate any and all copyright interest in the
-software to the public domain. We make this dedication for the benefit
-of the public at large and to the detriment of our heirs and
-successors. We intend this dedication to be an overt act of
-relinquishment in perpetuity of all present and future rights to this
-software under copyright law.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-For more information, please refer to <http://unlicense.org/>
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/benches/bench.rs
+++ /dev/null
@@ -1,339 +0,0 @@
-#![feature(test)]
-
-extern crate aho_corasick;
-extern crate test;
-
-use std::iter;
-
-use aho_corasick::{Automaton, AcAutomaton, Transitions};
-use test::Bencher;
-
-const HAYSTACK_RANDOM: &'static str = include_str!("random.txt");
-const HAYSTACK_SHERLOCK: &'static str = include_str!("sherlock.txt");
-
-fn bench_aut_no_match<P: AsRef<[u8]>, T: Transitions>(
-    b: &mut Bencher,
-    aut: AcAutomaton<P, T>,
-    haystack: &str,
-) {
-    b.bytes = haystack.len() as u64;
-    b.iter(|| assert!(aut.find(haystack).next().is_none()));
-}
-
-fn bench_box_aut_no_match<P: AsRef<[u8]>, T: Transitions>(
-    b: &mut Bencher,
-    aut: AcAutomaton<P, T>,
-    haystack: &str,
-) {
-    b.bytes = haystack.len() as u64;
-    let aut: &Automaton<P> = &aut;
-    b.iter(|| assert!(Automaton::find(&aut, haystack).next().is_none()));
-}
-
-fn bench_full_aut_no_match<P: AsRef<[u8]>, T: Transitions>(
-    b: &mut Bencher,
-    aut: AcAutomaton<P, T>,
-    haystack: &str,
-) {
-    let aut = aut.into_full();
-    b.bytes = haystack.len() as u64;
-    b.iter(|| assert!(aut.find(haystack).next().is_none()));
-}
-
-fn bench_full_aut_overlapping_no_match<P: AsRef<[u8]>, T: Transitions>(
-    b: &mut Bencher,
-    aut: AcAutomaton<P, T>,
-    haystack: &str,
-) {
-    let aut = aut.into_full();
-    b.bytes = haystack.len() as u64;
-    b.iter(|| assert!(aut.find_overlapping(haystack).count() == 0));
-}
-
-fn bench_naive_no_match<S>(b: &mut Bencher, needles: Vec<S>, haystack: &str)
-        where S: Into<String> {
-    b.bytes = haystack.len() as u64;
-    let needles: Vec<String> = needles.into_iter().map(Into::into).collect();
-    b.iter(|| assert!(!naive_find(&needles, haystack)));
-}
-
-fn haystack_same(letter: char) -> String {
-    iter::repeat(letter).take(10000).collect()
-}
-
-macro_rules! aut_benches {
-    ($prefix:ident, $aut:expr, $bench:expr) => {
-        mod $prefix {
-#![allow(unused_imports)]
-use aho_corasick::{Automaton, AcAutomaton, Sparse};
-use test::Bencher;
-
-use super::{
-    HAYSTACK_RANDOM, haystack_same,
-    bench_aut_no_match, bench_box_aut_no_match,
-    bench_full_aut_no_match, bench_full_aut_overlapping_no_match,
-};
-
-#[bench]
-fn ac_one_byte(b: &mut Bencher) {
-    let aut = $aut(vec!["a"]);
-    $bench(b, aut, &haystack_same('z'));
-}
-
-#[bench]
-fn ac_one_prefix_byte_no_match(b: &mut Bencher) {
-    let aut = $aut(vec!["zbc"]);
-    $bench(b, aut, &haystack_same('y'));
-}
-
-#[bench]
-fn ac_one_prefix_byte_every_match(b: &mut Bencher) {
-    // We lose the benefit of `memchr` because the first byte matches
-    // in every position in the haystack.
-    let aut = $aut(vec!["zbc"]);
-    $bench(b, aut, &haystack_same('z'));
-}
-
-#[bench]
-fn ac_one_prefix_byte_random(b: &mut Bencher) {
-    let aut = $aut(vec!["zbc\x00"]);
-    $bench(b, aut, HAYSTACK_RANDOM);
-}
-
-#[bench]
-fn ac_two_bytes(b: &mut Bencher) {
-    let aut = $aut(vec!["a", "b"]);
-    $bench(b, aut, &haystack_same('z'));
-}
-
-#[bench]
-fn ac_two_diff_prefix(b: &mut Bencher) {
-    let aut = $aut(vec!["abcdef", "bmnopq"]);
-    $bench(b, aut, &haystack_same('z'));
-}
-
-#[bench]
-fn ac_two_one_prefix_byte_every_match(b: &mut Bencher) {
-    let aut = $aut(vec!["zbcdef", "zmnopq"]);
-    $bench(b, aut, &haystack_same('z'));
-}
-
-#[bench]
-fn ac_two_one_prefix_byte_no_match(b: &mut Bencher) {
-    let aut = $aut(vec!["zbcdef", "zmnopq"]);
-    $bench(b, aut, &haystack_same('y'));
-}
-
-#[bench]
-fn ac_two_one_prefix_byte_random(b: &mut Bencher) {
-    let aut = $aut(vec!["zbcdef\x00", "zmnopq\x00"]);
-    $bench(b, aut, HAYSTACK_RANDOM);
-}
-
-#[bench]
-fn ac_ten_bytes(b: &mut Bencher) {
-    let aut = $aut(vec!["a", "b", "c", "d", "e",
-                        "f", "g", "h", "i", "j"]);
-    $bench(b, aut, &haystack_same('z'));
-}
-
-#[bench]
-fn ac_ten_diff_prefix(b: &mut Bencher) {
-    let aut = $aut(vec!["abcdef", "bbcdef", "cbcdef", "dbcdef",
-                        "ebcdef", "fbcdef", "gbcdef", "hbcdef",
-                        "ibcdef", "jbcdef"]);
-    $bench(b, aut, &haystack_same('z'));
-}
-
-#[bench]
-fn ac_ten_one_prefix_byte_every_match(b: &mut Bencher) {
-    let aut = $aut(vec!["zacdef", "zbcdef", "zccdef", "zdcdef",
-                        "zecdef", "zfcdef", "zgcdef", "zhcdef",
-                        "zicdef", "zjcdef"]);
-    $bench(b, aut, &haystack_same('z'));
-}
-
-#[bench]
-fn ac_ten_one_prefix_byte_no_match(b: &mut Bencher) {
-    let aut = $aut(vec!["zacdef", "zbcdef", "zccdef", "zdcdef",
-                        "zecdef", "zfcdef", "zgcdef", "zhcdef",
-                        "zicdef", "zjcdef"]);
-    $bench(b, aut, &haystack_same('y'));
-}
-
-#[bench]
-fn ac_ten_one_prefix_byte_random(b: &mut Bencher) {
-    let aut = $aut(vec!["zacdef\x00", "zbcdef\x00", "zccdef\x00",
-                        "zdcdef\x00", "zecdef\x00", "zfcdef\x00",
-                        "zgcdef\x00", "zhcdef\x00", "zicdef\x00",
-                        "zjcdef\x00"]);
-    $bench(b, aut, HAYSTACK_RANDOM);
-}
-        }
-    }
-}
-
-aut_benches!(dense, AcAutomaton::new, bench_aut_no_match);
-aut_benches!(dense_boxed, AcAutomaton::new, bench_box_aut_no_match);
-aut_benches!(sparse, AcAutomaton::<&str, Sparse>::with_transitions,
-             bench_aut_no_match);
-aut_benches!(full, AcAutomaton::new, bench_full_aut_no_match);
-aut_benches!(full_overlap, AcAutomaton::new, bench_full_aut_overlapping_no_match);
-
-// A naive multi-pattern search.
-// We use this to benchmark *throughput*, so it should never match anything.
-fn naive_find(needles: &[String], haystack: &str) -> bool {
-    for hi in 0..haystack.len() {
-        let rest = &haystack.as_bytes()[hi..];
-        for needle in needles {
-            let needle = needle.as_bytes();
-            if needle.len() > rest.len() {
-                continue;
-            }
-            if needle == &rest[..needle.len()] {
-                // should never happen in throughput benchmarks.
-                return true;
-            }
-        }
-    }
-    false
-}
-
-#[bench]
-fn naive_one_byte(b: &mut Bencher) {
-    bench_naive_no_match(b, vec!["a"], &haystack_same('z'));
-}
-
-#[bench]
-fn naive_one_prefix_byte_no_match(b: &mut Bencher) {
-    bench_naive_no_match(b, vec!["zbc"], &haystack_same('y'));
-}
-
-#[bench]
-fn naive_one_prefix_byte_every_match(b: &mut Bencher) {
-    bench_naive_no_match(b, vec!["zbc"], &haystack_same('z'));
-}
-
-#[bench]
-fn naive_one_prefix_byte_random(b: &mut Bencher) {
-    bench_naive_no_match(b, vec!["zbc\x00"], HAYSTACK_RANDOM);
-}
-
-#[bench]
-fn naive_two_bytes(b: &mut Bencher) {
-    bench_naive_no_match(b, vec!["a", "b"], &haystack_same('z'));
-}
-
-#[bench]
-fn naive_two_diff_prefix(b: &mut Bencher) {
-    bench_naive_no_match(b, vec!["abcdef", "bmnopq"], &haystack_same('z'));
-}
-
-#[bench]
-fn naive_two_one_prefix_byte_every_match(b: &mut Bencher) {
-    bench_naive_no_match(b, vec!["zbcdef", "zmnopq"], &haystack_same('z'));
-}
-
-#[bench]
-fn naive_two_one_prefix_byte_no_match(b: &mut Bencher) {
-    bench_naive_no_match(b, vec!["zbcdef", "zmnopq"], &haystack_same('y'));
-}
-
-#[bench]
-fn naive_two_one_prefix_byte_random(b: &mut Bencher) {
-    bench_naive_no_match(b, vec!["zbcdef\x00", "zmnopq\x00"], HAYSTACK_RANDOM);
-}
-
-#[bench]
-fn naive_ten_bytes(b: &mut Bencher) {
-    let needles = vec!["a", "b", "c", "d", "e",
-                       "f", "g", "h", "i", "j"];
-    bench_naive_no_match(b, needles, &haystack_same('z'));
-}
-
-#[bench]
-fn naive_ten_diff_prefix(b: &mut Bencher) {
-    let needles = vec!["abcdef", "bbcdef", "cbcdef", "dbcdef",
-                       "ebcdef", "fbcdef", "gbcdef", "hbcdef",
-                       "ibcdef", "jbcdef"];
-    bench_naive_no_match(b, needles, &haystack_same('z'));
-}
-
-#[bench]
-fn naive_ten_one_prefix_byte_every_match(b: &mut Bencher) {
-    let needles = vec!["zacdef", "zbcdef", "zccdef", "zdcdef",
-                       "zecdef", "zfcdef", "zgcdef", "zhcdef",
-                       "zicdef", "zjcdef"];
-    bench_naive_no_match(b, needles, &haystack_same('z'));
-}
-
-#[bench]
-fn naive_ten_one_prefix_byte_no_match(b: &mut Bencher) {
-    let needles = vec!["zacdef", "zbcdef", "zccdef", "zdcdef",
-                       "zecdef", "zfcdef", "zgcdef", "zhcdef",
-                       "zicdef", "zjcdef"];
-    bench_naive_no_match(b, needles, &haystack_same('y'));
-}
-
-#[bench]
-fn naive_ten_one_prefix_byte_random(b: &mut Bencher) {
-    let needles = vec!["zacdef\x00", "zbcdef\x00", "zccdef\x00",
-                       "zdcdef\x00", "zecdef\x00", "zfcdef\x00",
-                       "zgcdef\x00", "zhcdef\x00", "zicdef\x00",
-                       "zjcdef\x00"];
-    bench_naive_no_match(b, needles, HAYSTACK_RANDOM);
-}
-
-
-// The organization above is just awful. Let's start over...
-
-mod sherlock {
-    use aho_corasick::{Automaton, AcAutomaton};
-    use test::Bencher;
-    use super::HAYSTACK_SHERLOCK;
-
-    macro_rules! sherlock {
-        ($name:ident, $count:expr, $pats:expr) => {
-            #[bench]
-            fn $name(b: &mut Bencher) {
-                let haystack = HAYSTACK_SHERLOCK;
-                let aut = AcAutomaton::new($pats).into_full();
-                b.bytes = haystack.len() as u64;
-                b.iter(|| assert_eq!($count, aut.find(haystack).count()));
-            }
-        }
-    }
-
-    sherlock!(name_alt1, 158, vec!["Sherlock", "Street"]);
-
-    sherlock!(name_alt2, 558, vec!["Sherlock", "Holmes"]);
-
-    sherlock!(name_alt3, 740, vec![
-        "Sherlock", "Holmes", "Watson", "Irene", "Adler", "John", "Baker",
-    ]);
-
-    sherlock!(name_alt3_nocase, 1764, vec![
-        "ADL", "ADl", "AdL", "Adl", "BAK", "BAk", "BAK", "BaK", "Bak", "BaK",
-        "HOL", "HOl", "HoL", "Hol", "IRE", "IRe", "IrE", "Ire", "JOH", "JOh",
-        "JoH", "Joh", "SHE", "SHe", "ShE", "She", "WAT", "WAt", "WaT", "Wat",
-        "aDL", "aDl", "adL", "adl", "bAK", "bAk", "bAK", "baK", "bak", "baK",
-        "hOL", "hOl", "hoL", "hol", "iRE", "iRe", "irE", "ire", "jOH", "jOh",
-        "joH", "joh", "sHE", "sHe", "shE", "she", "wAT", "wAt", "waT", "wat",
-        "ſHE", "ſHe", "ſhE", "ſhe",
-    ]);
-
-    sherlock!(name_alt4, 582, vec!["Sher", "Hol"]);
-
-    sherlock!(name_alt4_nocase, 1307, vec![
-        "HOL", "HOl", "HoL", "Hol", "SHE", "SHe", "ShE", "She", "hOL", "hOl",
-        "hoL", "hol", "sHE", "sHe", "shE", "she", "ſHE", "ſHe", "ſhE", "ſhe",
-    ]);
-
-    sherlock!(name_alt5, 639, vec!["Sherlock", "Holmes", "Watson"]);
-
-    sherlock!(name_alt5_nocase, 1442, vec![
-        "HOL", "HOl", "HoL", "Hol", "SHE", "SHe", "ShE", "She", "WAT", "WAt",
-        "WaT", "Wat", "hOL", "hOl", "hoL", "hol", "sHE", "sHe", "shE", "she",
-        "wAT", "wAt", "waT", "wat", "ſHE", "ſHe", "ſhE", "ſhe",
-    ]);
-}
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/benches/random.txt
+++ /dev/null
@@ -1,513 +0,0 @@
-
-mnxnsynfvuugtbxsxbfxwreuspglnplefzwsp
-tacfqcwnmodnmgnyiuvqoco
-z
-
-qjuozfkexn
-zoaxzncje
-sldhqtmgxzyurfyzwazmmu
-bbeuv
-mzsrihycwcb
-xzfqozfmlnpmrzpxxxytqs
-xrg
-mcplby
-nmslhfgjowhzfxsvyddydnsyehdskbydbjksqtpet
-indvfw
-bvjvvw
-
-pddufodyqtyixbndtumndyz
-xjjhtuvmsxhuwqulqtjhqrdqrmtbcphvyuqllocrnkpfv
-zemshhz
-wss
-xewlrxfmgxnwgphcgefa
-mbgsgbzrtthxweimcqzcaaheurdmd
-osqefupespvh
-z
-tvvlakwzwjbrgjzfgubsmmonav
-pjdskxcfgapsm
-zqktqgkrcdrlskx
-zwwfebhguskho
-zlvvw
-czwm
-gojnpmboehlsazbexjjnuscqftrfufngygjdxcydib
-d
-afigycivicnknfxl
-ljuwuopctiftfwctxecwipjnljyef
-jonwbkodomzhqvlf
-jdkizhognqsdogunwedjsmsdzho
-zxvni
-oynfjf
-muvokjuqz
-azuwrwtuxzfopwrcex
-ixrjinlvxjmn
-blaegnmbhsgsbmebwazaeguugtkowexgnqtbfkldadddv
-tzabyoftyov
-ctbtqbzscxzviuvcigwuwusrdro
-ljynr
-gnnnyyxslrhsbj
-hhzlw
-hijalf
-rxlfqk
-mhaofforwznvmcgplinludpgkucpa
-gvvxsqqfmu
-xxqhoyosixjfhjuxpv
-faadjpvamjekreepizurntvwdynozfawsfawyms
-
-lcbutr
-aqyxvpozkjrecrkl
-lfmochahrr
-ptqyomjlwo
-vcmslulznx
-lmlsskcihrmxauztuarydlp
-beiqsrfnmvmlmybmwpektjbikvpggthpabqsgmjhnthvysuhwbigillugjsp
-dfsuegseffwcsnvsrqedytblbpzbfeyfsq
-kypvqctrkuds
-ylqeduokzgdqaxelhftxnxbidu
-bprzyayfopxdsmfhhfqowa
-ymiutdtlfaaxpbtaeslv
-ggago
-
-owpbicekdeykzfgcbgzobdvvrtetvcv
-xsrlgingstiez
-gyncqvq
-xasohmeiwyscpehctmzmsnjklg
-xsudghakxlw
-dzqlfptjogzpkvwuticcyugnyopypuqqc
-wlxshxbhdvuherumoppcc
-
-znyaptivzncvkpeyeipynqefjxjjcsgfqbnezeebtowdrbjaqjlbxwvyikrmxjwoxngqgvfpbniftnmszuxg
-umwpwwyvufy
-pallkjtnrmtauqxauewgygwkjjwebbkabhtxticxmxfujpxlrpzlrozfslkzfdsswlmmsbdgjwmjnummk
-dhsxylejzityahtqqzmohrpzjprrsraztpnuagtyzfjdekthvdogfidksrdppr
-ybc
-fyukknoqfnkllkwflwempjijxgo
-dltvlau
-rhvrvlwsribfctuzodfqkdczfzxnetqqzflnhiyl
-goxmcasmq
-wljbhwkpahdotqhhrbhqzijv
-lszewkgdmkezvgmbmllhpksdkoiwgkvqjmurshrptlctqsosuurndcuzjfwherotv
-dudxxihygxblhgchbgzyzffb
-eht
-fvwxvqoltdcsd
-rkuig
-e
-axhsacsmnicugul
-rubtdlhjqndxdzzwfnkuzy
-swxteuyxxsktkjgv
-hzwwodlqaq
-vxgecev
-qnwla
-vdxjuzpyoqhpmuunyffptopmeauhycs
-dkzo
-awrfzatzohslgvqlaezepmli
-qgxatixvpkkhvkumbwmwcagtgyfljdok
-amdnzstpvcqj
-xsrvwvhjirzfgkessve
-qezwbfltfbikbmoasvoflozsjhrljnszqiciuqmflrlqowwkoevuumh
-babskcvavmtvsxqsewirucwzajjcfcqwsydydqo
-ywfurpsl
-edacsjjkjjewkxfoh
-dcgkfpcjezurnuhiatrczcp
-xsatnimwbcciu
-grzmbrsvvcyigcbmcqfwiiknrohveubhyijxeyzfm
-kqyewccgcqrrrznwxmoztlyseagbpyho
-najju
-nis
-awgzdvfjkzlrsjcqfeacx
-oisuflfigrjaex
-desbdulyuwqxuxianyypybxwlql
-ekmqgspvqpftpwswayh
-egbyj
-fznzprhvnnwcxgcc
-wfdsueieosmugirxbymbpmfrspvrktjzguxm
-qkjrufshwnfwwpbhukdjlaqvljlgubmqmhnha
-hwqpudgnblhlxppbrmbznotteivuzguuwlhtkytky
-w
-yofkyzbpg
-cenolnfnllkvhikrpttcxgqxmufvorekjruyjxmr
-
-hyexmpjijgzumawp
-cdbevdilgopbzlo
-fivelagckslkugdxprjxkylizewcptwxfhomzuituujixchadmnjoktnqa
-csojvlinzmmkkfzqueamnuwkanzdzsavgohposbuoamoevehqrmcxdsuyelvvctoejzoertqormhaaxwofvjzekwt
-sbkghhnhutrvwtyjaxndzyjamrhx
-jjyqy
-majwbnrhveuhrsbbbjrwpwuplifeseylqh
-wyvutpxnkrnkuxxetjkkifpqb
-dyzucmbcvgnjeecm
-hz
-uhnuipthxrzkqluosvk
-lwqqzsdwiwvwaqfwlvubadlyizlo
-jbd
-oyzjeu
-kydjkbsqxnbfiuesc
-smeubjqrcxdvhsabzceyglqjzbfmoacmwvwjbhhxbr
-uabipgecujfdfxpmdzrscdyvefizabgspqjrrkmgjt
-xgvdgzryz
-lw
-uimob
-ifhn
-bqph
-ole
-g
-wt
-k
-yslzrkwkundxfdibwqvucemepqxlmlpyngabbeciuzhptpjdetyngrtxrdtzmvq
-ccwapidp
-
-bwvrgvmtshevrophy
-ni
-fdkplu
-mdykey
-i
-rhsrenoetdggpjb
-djmkplpeabsholx
-judxtub
-fooakqwvocvpcrvxqhvtmpvhkrecy
-uuxscjillynilbkrgt
-evtinrmilniguarqritpeipwochmdw
-sxaqzjybydyvnmmjtdcgkjnqfcklbfpkdfyewgcukqoiegyfp
-kg
-ovrwieqhy
-jcxqtkerzjwhs
-xeonglszbgypafhmqcaseimzjgebkvigbqwsayrnrprtuvhsxyitfqygohgorcdnufbcyvevvgzmjrgjqqquwkszplogx
-zdketqqv
-yebckucwayckeezfvtnavglpjh
-zorkfrwk
-pad
-xqaquxudybwtgixbfktinctfirjfdayh
-rieknj
-ebk
-qzbcfywfdmhsdruhopovemafijbscagllkmhmof
-
-asbsnbddlobwoqatfhkbhhsymzqxjuixwreheugvngmgcuqpkjhhfwpbarqaxrwgwnjbanljlds
-etevdvlc
-lqyjrnmenhn
-k
-tsf
-zczgeavcexh
-jlpuxywtsrvnvluruqhecjca
-ir
-rikrgkmhwaosodkxgcnrexfmdrszhnmutpvwztg
-bffjqovvkemctnsgeh
-weysbhzixiipfithjfsk
-usyzvaiyuhmksfluoirfbnsu
-o
-cgawpdakaszeafdtbdkqtlzkrpnoqomqvuaqcfmzgvfegovtfaonelpv
-izmrcjlk
-xmzemniyrzy
-knqexaafsdlimdamcrprlshq
-qkmqw
-dntgjwsibclvposdwjuklvtejjjdjibgpyynqpgprvvaetshhmvfkcpb
-otvazkrkklrxfotpopyjte
-fghkcnpi
-rulyaihsowvcgbzeiblhuhhfbmncqsuuqcxvseorn
-exirzfmojnxcoqom
-zsgpgtokun
-zvamxfocorganbtlafifwdqmqtsnktbwwtewborq
-
-cxlnaspjqvsitjyzyriqsuorjsrvzqenisprttudxntsbqrpjtdkxnwcwgjyxmgtqljcrmrbrmyvosojzlumcmjcgfjsdehec
-mvx
-mt
-mckr
-teulvroifk
-laaicc
-koufy
-bexmwsvyarnznebdfy
-ripvviosbqijsxnjilwddaqaqemzsdarnxmfooxghoypizwtbueo
-ljycycuqwfnzbambibqdixmkkvwtubepla
-cis
-kcg
-vmbbiuuoamenzepuagpfujevfstqtndjxjchdvycfrrrowochtjdmkklgnhf
-pmorrwguxkvdxpluatagaziin
-
-uwvzbmkmykjkmknzppklx
-pnzxuvsrjunqxercsnvayhykcazdeclomdsasgkpqpiufyfqsxhj
-yceizkddwojgweegcllaagpvrpo
-ek
-kuxxgbezqyxvfaxdwnqdgqsmneijunxzlwxkrs
-ldldbrxmvtjlqxifngmactzqcygkvuteffcmvphevilabgukatqakamjlridznodcvblvlogulmcixxfimh
-iuzjootuywjqklolzzhpeaynydjwtufjavbozxnzckuzdodkvkjfmhinelv
-swlfkcufscfcovmghqwcrtxjukwafoeogrkgubbqgwzm
-gjcylkwgzroubdssuqeykqjcmguso
-fzq
-srfvysoxtlylctp
-
-pbfeiuzwoyixews
-ocvvunfsjnrtklmuuzjojw
-xdjcnrpqhmpmpcwacpcdtmbsczvhllkqapzjuaf
-nfnuvjz
-fwnuiyqpn
-wshxxxpzzxp
-hibrxcfeqca
-
-wqhlllarl
-bukcbojv
-plrytapy
-xm
-vlgfqoyzdczqbbaxjwbjjevjhxgopuqvqcrj
-vpjqfbdnsdxlbuuiqocvrhap
-mgumjbvnnzgnrdru
-gcgzugazxdcamrhczfzhtmdjj
-uislwq
-vooai
-zjuqfmebuzsqngzekyajujkopvayxtdzvugwwucvlsbrnhitfotmhhmgddlzlvqrkcponictrfweuilfjiuoabkfdvpjiqjrrgi
-aptjfhmrnxaq
-hbs
-w
-mwmoxqvucwygunplzvxtxpk
-fgmqmtlorfzytjdzffsosfccnfwugrsrynuej
-rpmpenrhsxoefnblyumjqwvuyszyppnttuyvazjdug
-zdzxraxkroknkmqgvuoqeqdtvclsvvuwmdwzfugcpteohlogxubyoebvrzbqzklvehfcqadtdrkpubfhmokzwyosogepwragcpwxo
-ax
-dz
-de
-
-thvkdmnbdws
-
-ejmubw
-umvwkaubzurf
-wyxtxeluaoox
-wwbioobtgmkebxo
-miglgnafmdarzkeblyjctuayzyoeqnfnbtrcbymdzkzg
-loavxq
-kzhllgsenxlbgdbfzwbg
-yxflogzsohlcycbyzegeubfflouvtuatixhjvicjegltjiy
-jigqfjppafdiarc
-mcnmwtachgearonfcymvjbrnljjxmlzkudvzqsarnfysmxlfrtlvjxwvpdbhvwysnvcdozfcruhjwnucdzakkilmlfgjiolcatpfusm
-
-n
-pdjunfcz
-dc
-edxkkxabsbvmvifiinnoccki
-bc
-gwtwsvorwzfqpz
-exidmexstfflkhi
-s
-s
-c
-wtcjfywlayhpbqktcepoybowtkrmnumqsg
-ozclkgjdmdk
-jmegtbunyexurvfexhqptnqzie
-tkoenpagzwqfawlxvzaijsjqhmg
-swodqfjpdqcbkc
-ujokogocyaygdibgpglecis
-shlmdmgonvpuaxlhrymkxtiytmv
-brhk
-jmsyiuomiywxhegilycjprkyfgojdo
-
-wzdzrgpdiosdsvkcw
-odlnmsfnjrcsnflviwvawybpczdkzvdocpwrmavz
-p
-ubowamlskcqhdxuckrxa
-fawhntiwhmdwkddnahmtajqqazpdygttqivhdiodkcpcwv
-gmxujmmaufmbipaiulhurzkfdg
-eixjhmbaeoybiwk
-kumntgrgiofcmujlzbcopuobambsw
-mnjkqiyb
-iktwnsnv
-hfuzcl
-tqiyqvagbqgtowpjbedgjot
-dfemvamelxadkztogliizdtsddoboafawficudlefo
-raecmxiiibljryswntpfed
-mbwrtsebkeegw
-x
-epp
-he
-
-vnztrswhiusokqdkmsnpuswucvfhcthjbtam
-baxlwidsgbdpzvnlj
-tcbjjoadrzo
-aiidahyllzzsg
-
-igebuubweicbssgddpmqxunrawavuglmpxrtkqsvjjtscibqiejjfgfnovokodmqcqitlteiakooupvzkwucucrfdzjvjbqbkgutoybmpfvhbutigdxhfiqfplyciz
-cnrhbjdnjftwfwlwzrdkwhajgsizsi
-qfntnt
-okqyfnbresp
-asyg
-mjqdkdyggdxzwuzglays
-h
-ifaqcazoy
-fol
-vvsusbnugduxsceozmsarbp
-epjwtorx
-bwiuxxiyc
-cw
-bwogruhctwkfvbexjnwircykxyzjmats
-kygiochfwlpsvmxcgmtjrgvfdptd
-q
-qmpqe
-
-z
-jghffhqfoecmszunhxmzmzhlmbrvjabhrkihgjmvckhkfpaygjkg
-
-kfiyfgounmhlvhupswqdgws
-ezzdpyqucqoocsdcjtruqpokldfkmjhqzoynirybsifyaxnaxppthjoqy
-nwetlgzwrhkhtuubbkbepuhbllxspvagxrqokwnrhkbwdwtp
-hlazomrhqogoaxypqaszwfxxmutvbpuuvpdffuqskcbzlwyzcssnflkwiydoveyxjnzllzhyozbsa
-hwnitkwbxcyibbqsluuqywbk
-
-ozpfjsdrc
-yoepefuy
-lvmspzepnetra
-genbrcrmuqfvkaouvuymoxhcxotjjhk
-pcshyqgbmqdubsdajnyfqvxkqvywffzn
-ukhcbyzwslqeq
-otfrmcbnhbyffxqregqoufdxucjunwdhlqqeiiawbxlpqeyzzopfungrryqdykgizrhqodirvazm
-dhpfhzyq
-cloz
-eduupqifolfekve
-qiec
-ishnjukvomntmdthlkajxpiwk
-y
-axl
-tmyskjqkjsvumizlal
-wvvolwewsfxhhdieuagdcuhwsgqvswpbkdkpxskloalmr
-ryfmhe
-z
-mmbpgsyrfvzdatbjrjhuipwt
-llzwizmmuulgwocowwmugtaoewkhnqxparvtynlffffdfcocdbba
-
-pyczkzbmcgrdnxnmezsx
-gsqe
-mcocxcolcynhpecstsn
-opnpplkccobjuhtbhirpzfxuktmpsiwbvsgiaavvdge
-wpaldxzasnrbvtugjwytvtfttrh
-zxecurevkjiyxy
-wtnovebcmglkktic
-fdpwfgvlvovxrwh
-bmwgdullzy
-uzwhagxinwqifxjbcntqzqoxkmpqxhe
-jrfizsnwxwnnhb
-inapddlahrp
-
-ndtvkceobe
-buskgghihdjmjlwfc
-j
-rkvffxwtmzoeruhlsurwtnuh
-cbvkhfepkdishfpqvijzrpleuy
-jzdpxjhcgqnybssfegvrnpgyehdqpgjwudbwrjbavp
-xzzvgqdrdwajmdmj
-vfatwsxvwfdbdhnijdujoyotwvwjipuuetichcfmvgrsnjpqaaezjtkvc
-lbfoqgfshrtwgdqufwnfuitdrjydqctqixlzufkdbp
-zgau
-qefdpmtkecvtj
-kuphldkvnzdtpd
-dti
-fpd
-gfrliyegxsb
-i
-qsddsrmkyfgzrjeqnitmnypbcakh
-vfbvbrpuogzhzrbmklvhji
-nkz
-xlufbaoblbmeub
-alwuzxzmobwdukvwnkiwmuqhuxfhevogdnqtmxjptqznrk
-cngpoty
-
-ms
-qvenfg
-dmeaffm
-jycfgnanbmoamhmarkmjcagbp
-ysqmbhopgx
-jczbzgwedsp
-
-zxzwjrxcwdtleizjlvifjwgxiibezwxhtzywqdi
-mtgnlu
-xboxirdchurkfnklnpkapnqfxnhrxyseiujrznjm
-
-zm
-atddskbghcahlhql
-szshwzmmvu
-befdtpouamwhiisyybispkchpjhownatawjfbx
-
-ennkzbrlygd
-zbt
-upphzpdwzmlhhhbqvjsfmbnrar
-ddcs
-ipbxgzyudjyongtcyygncojdufnufqpdppgvq
-gc
-isu
-foa
-wf
-jdlvqxgfbowhohhyyngbcs
-zjuwjyucdwblatsnywaaoftlcamfbcnw
-lzrioesuhoeevczuwrnltmkahfwiu
-uicggfbddqltnjyxfltbnaekncnyxsit
-zkxsqkqrwrzrxgxbsgxatybfr
-
-ptvmfyxdcglbfipcguqthjygzqnpqssscukzawynidtchjrrxwuxifoe
-w
-ohu
-vg
-zagpowezvbniybgold
-lhqseqcxteiqtgnpanpvrmvvlltxh
-mtfnxn
-wyodtg
-
-rawpbgtpbaktqzmmpzxmrlwpvvmdsl
-widcfbirvswraukbmkhf
-vplrueuxomjkqrtjgyxjdkexttzyozawyq
-hrpbahllznvmjudzxpbbv
-tlavfrxygjfipkupwnbacltcfepeg
-icu
-otxcu
-aewazy
-hl
-
-fmrp
-qaacthwzohenzjr
-xbyebba
-rvkph
-mkhhmh
-swme
-zjmdoypaktglcyzobquunvthcdwegtbywpijxd
-jvkuhnxqc
-gibhqgjojsxt
-bodbktzomiqujtbstqiyquwvqgufphqstenxvddkvtdh
-bpusrxkfi
-zgp
-pmxvgamydyakituvvsucsuidrlznupcsinltmrahulhepxmhoqtfvpjkxzhrrinncuh
-jzgkjjhjqykzelaszvcwvvwbnzsxdeaerfnaravk
-ynanrqyrxo
-zsmuxofullob
-brklgrcqefdyoczy
-qkpls
-snhqumae
-iqdtzjadzzvnqvdvjfsaf
-nfqfdqiramueblxkaqxbbkxwywzgdbndjjiqk
-tc
-kp
-cpuckbjsxhtxmomfesgxdpz
-oseif
-ybhxbvyxrpkrexrhjzoaxxohrhsniewsrktjnaztn
-ggelspdzhzbchruhbjbjidgjwdlhdycetqaswh
-jkgivsngygkbqtlmoj
-dwpnanfvitxg
-ospxbwxp
-wgvmvrnjescemdoiralbkvemalifxnyhrbdgodml
-hjtsnkzknkplbzsiwmneefdkihnhsamjsrxggclyjqgpqltizi
-
-
-sykgbuypwwhweab
-nvdkkkskmtiwpoerkon
-sx
-sbyflwwiqylbskdlxesmylpaz
-dnwcjenaluwesyywfaezznwkdwpoesxpu
-kie
-dslccwfryol
-gfhomgfn
-zprjtfqvkotktzidmoyrivall
-bunvsqkysdelozemnjoeqfolruulpbipm
-ullyzfahpkhkja
-hwd
-kvyqtprpuulgsk
-zotbkcadnxmfvqmtlbxalhughceyfcibtzzj
-vvpjbgxygl
-hpic
-mhrqd
-dv
-thehuzdbaacoidjoljbysnqwrrxxplrdznmgiukkvjqbopb
-moszjt
-rmtbunktkywqirveeqfa
-kse
-wbfflnatgzobjrxghjgvcsyxoruenxhyomutbptswjajawqjpqafpdcstkiyjuilimecgejpqmyciolgcmdpcstzdozbmnza
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/ctags.rust
+++ /dev/null
@@ -1,11 +0,0 @@
---langdef=Rust
---langmap=Rust:.rs
---regex-Rust=/^[ \t]*(#\[[^\]]\][ \t]*)*(pub[ \t]+)?(extern[ \t]+)?("[^"]+"[ \t]+)?(unsafe[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\6/f,functions,function definitions/
---regex-Rust=/^[ \t]*(pub[ \t]+)?type[ \t]+([a-zA-Z0-9_]+)/\2/T,types,type definitions/
---regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/
---regex-Rust=/^[ \t]*(pub[ \t]+)?struct[ \t]+([a-zA-Z0-9_]+)/\2/s,structure names/
---regex-Rust=/^[ \t]*(pub[ \t]+)?mod[ \t]+([a-zA-Z0-9_]+)/\2/m,modules,module names/
---regex-Rust=/^[ \t]*(pub[ \t]+)?static[ \t]+([a-zA-Z0-9_]+)/\2/c,consts,static constants/
---regex-Rust=/^[ \t]*(pub[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\2/t,traits,traits/
---regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]+<.*>)?[ \t]+([a-zA-Z0-9_]+)/\3/i,impls,trait implementations/
---regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/examples/dict-search.rs
+++ /dev/null
@@ -1,151 +0,0 @@
-// This example demonstrates how to use the Aho-Corasick algorithm to rapidly
-// scan text for matches in a large dictionary of keywords. This example by
-// default reads your system's dictionary (~120,000 words).
-extern crate aho_corasick;
-extern crate csv;
-extern crate docopt;
-extern crate memmap;
-extern crate rustc_serialize;
-
-use std::error::Error;
-use std::fs::File;
-use std::io::{self, BufRead, Write};
-use std::process;
-
-use aho_corasick::{Automaton, AcAutomaton, Match};
-use docopt::Docopt;
-use memmap::{Mmap, Protection};
-
-static USAGE: &'static str = "
-Usage: dict-search [options] <input>
-       dict-search --help
-
-Options:
-    -d <path>, --dict <path>   Path to dictionary of keywords to search.
-                               [default: /usr/share/dict/words]
-    -m <len>, --min-len <len>  The minimum length for a keyword in UTF-8
-                               encoded bytes. [default: 5]
-    --overlapping              Report overlapping matches.
-    -c, --count                Show only the numebr of matches.
-    --memory-usage             Show memory usage of automaton.
-    --full                     Use fully expanded transition matrix.
-                               Warning: may use lots of memory.
-    -h, --help                 Show this usage message.
-";
-
-#[derive(Clone, Debug, RustcDecodable)]
-struct Args {
-    arg_input: String,
-    flag_dict: String,
-    flag_min_len: usize,
-    flag_overlapping: bool,
-    flag_memory_usage: bool,
-    flag_full: bool,
-    flag_count: bool,
-}
-
-fn main() {
-    let args: Args = Docopt::new(USAGE)
-                            .and_then(|d| d.decode())
-                            .unwrap_or_else(|e| e.exit());
-    match run(&args) {
-        Ok(()) => {}
-        Err(err) => {
-            writeln!(&mut io::stderr(), "{}", err).unwrap();
-            process::exit(1);
-        }
-    }
-}
-
-fn run(args: &Args) -> Result<(), Box<Error>> {
-    let aut = try!(build_automaton(&args.flag_dict, args.flag_min_len));
-    if args.flag_memory_usage {
-        let (bytes, states) = if args.flag_full {
-            let aut = aut.into_full();
-            (aut.heap_bytes(), aut.num_states())
-        } else {
-            (aut.heap_bytes(), aut.num_states())
-        };
-        println!("{} bytes, {} states", bytes, states);
-        return Ok(());
-    }
-
-    if args.flag_full {
-        let aut = aut.into_full();
-        if args.flag_overlapping {
-            if args.flag_count {
-                let mmap = Mmap::open_path(
-                    &args.arg_input, Protection::Read).unwrap();
-                let text = unsafe { mmap.as_slice() };
-                println!("{}", aut.find_overlapping(text).count());
-            } else {
-                let rdr = try!(File::open(&args.arg_input));
-                try!(write_matches(&aut, aut.stream_find_overlapping(rdr)));
-            }
-        } else {
-            if args.flag_count {
-                let mmap = Mmap::open_path(
-                    &args.arg_input, Protection::Read).unwrap();
-                let text = unsafe { mmap.as_slice() };
-                println!("{}", aut.find(text).count());
-            } else {
-                let rdr = try!(File::open(&args.arg_input));
-                try!(write_matches(&aut, aut.stream_find(rdr)));
-            }
-        }
-    } else {
-        if args.flag_overlapping {
-            if args.flag_count {
-                let mmap = Mmap::open_path(
-                    &args.arg_input, Protection::Read).unwrap();
-                let text = unsafe { mmap.as_slice() };
-                println!("{}", aut.find_overlapping(text).count());
-            } else {
-                let rdr = try!(File::open(&args.arg_input));
-                try!(write_matches(&aut, aut.stream_find_overlapping(rdr)));
-            }
-        } else {
-            if args.flag_count {
-                let mmap = Mmap::open_path(
-                    &args.arg_input, Protection::Read).unwrap();
-                let text = unsafe { mmap.as_slice() };
-                println!("{}", aut.find(text).count());
-            } else {
-                let rdr = try!(File::open(&args.arg_input));
-                try!(write_matches(&aut, aut.stream_find(rdr)));
-            }
-        }
-    }
-    Ok(())
-}
-
-fn write_matches<A, I>(aut: &A, it: I) -> Result<(), Box<Error>>
-        where A: Automaton<String>, I: Iterator<Item=io::Result<Match>> {
-    let mut wtr = csv::Writer::from_writer(io::stdout());
-    try!(wtr.write(["pattern", "start", "end"].iter()));
-    for m in it {
-        let m = try!(m);
-        try!(wtr.write([
-            aut.pattern(m.pati),
-            &m.start.to_string(),
-            &m.end.to_string(),
-        ].iter()));
-    }
-    try!(wtr.flush());
-    Ok(())
-}
-
-fn build_automaton(
-    dict_path: &str,
-    min_len: usize,
-) -> Result<AcAutomaton<String>, Box<Error>> {
-    let buf = io::BufReader::new(try!(File::open(dict_path)));
-    let mut lines = Vec::with_capacity(1 << 10);
-    for line in buf.lines() {
-        let line = try!(line);
-        if line.len() >= min_len {
-            lines.push(line);
-        }
-    }
-    Ok(AcAutomaton::with_transitions(lines))
-}
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/session.vim
+++ /dev/null
@@ -1,1 +0,0 @@
-au BufWritePost *.rs silent!make ctags > /dev/null 2>&1
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/src/autiter.rs
+++ /dev/null
@@ -1,503 +0,0 @@
-use std::io::{self, BufRead};
-use std::marker::PhantomData;
-
-use memchr::{memchr, memchr2, memchr3};
-
-use super::{ROOT_STATE, StateIdx};
-
-/// An abstraction over automatons and their corresponding iterators.
-/// The type parameter `P` is the type of the pattern that was used to
-/// construct this Automaton.
-pub trait Automaton<P> {
-    /// Return the next state given the current state and next character.
-    fn next_state(&self, si: StateIdx, b: u8) -> StateIdx;
-
-    /// Return true if and only if the given state and current pattern index
-    /// indicate a match.
-    fn has_match(&self, si: StateIdx, outi: usize) -> bool;
-
-    /// Build a match given the current state, pattern index and input index.
-    fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match;
-
-    /// Return the set of bytes that have transitions in the root state.
-    fn start_bytes(&self) -> &[u8];
-
-    /// Returns all of the patterns matched by this automaton.
-    ///
-    /// The order of the patterns is the order in which they were added.
-    fn patterns(&self) -> &[P];
-
-    /// Returns the pattern indexed at `i`.
-    ///
-    /// The index corresponds to the position at which the pattern was added
-    /// to the automaton, starting at `0`.
-    fn pattern(&self, i: usize) -> &P;
-
-    /// Return the number of patterns in the automaton.
-    #[inline]
-    fn len(&self) -> usize {
-        self.patterns().len()
-    }
-
-    /// Returns true if the automaton has no patterns.
-    #[inline]
-    fn is_empty(&self) -> bool {
-        self.len() == 0
-    }
-
-    /// Returns an iterator of non-overlapping matches in `s`.
-    fn find<'a, 's, Q: ?Sized + AsRef<[u8]>>(
-        &'a self,
-        s: &'s Q,
-    ) -> Matches<'a, 's, P, Self>
-    where Self: Sized {
-        Matches {
-            aut: self,
-            text: s.as_ref(),
-            texti: 0,
-            si: ROOT_STATE,
-            _m: PhantomData,
-        }
-    }
-
-    /// Returns an iterator of overlapping matches in `s`.
-    fn find_overlapping<'a, 's, Q: ?Sized + AsRef<[u8]>>(
-        &'a self,
-        s: &'s Q,
-    ) -> MatchesOverlapping<'a, 's, P, Self>
-    where Self: Sized {
-        MatchesOverlapping {
-            aut: self,
-            text: s.as_ref(),
-            texti: 0,
-            si: ROOT_STATE,
-            outi: 0,
-            _m: PhantomData,
-        }
-    }
-
-    /// Returns an iterator of non-overlapping matches in the given reader.
-    fn stream_find<'a, R: io::Read>(
-        &'a self,
-        rdr: R,
-    ) -> StreamMatches<'a, R, P, Self>
-    where Self: Sized {
-        StreamMatches {
-            aut: self,
-            buf: io::BufReader::new(rdr),
-            texti: 0,
-            si: ROOT_STATE,
-            _m: PhantomData,
-        }
-    }
-
-    /// Returns an iterator of overlapping matches in the given reader.
-    fn stream_find_overlapping<'a, R: io::Read>(
-        &'a self,
-        rdr: R,
-    ) -> StreamMatchesOverlapping<'a, R, P, Self>
-    where Self: Sized {
-        StreamMatchesOverlapping {
-            aut: self,
-            buf: io::BufReader::new(rdr),
-            texti: 0,
-            si: ROOT_STATE,
-            outi: 0,
-            _m: PhantomData,
-        }
-    }
-}
-
-impl<'a, P: AsRef<[u8]>, A: 'a + Automaton<P> + ?Sized>
-        Automaton<P> for &'a A {
-    fn next_state(&self, si: StateIdx, b: u8) -> StateIdx {
-        (**self).next_state(si, b)
-    }
-
-    fn has_match(&self, si: StateIdx, outi: usize) -> bool {
-        (**self).has_match(si, outi)
-    }
-
-    fn start_bytes(&self) -> &[u8] {
-        (**self).start_bytes()
-    }
-
-    fn patterns(&self) -> &[P] {
-        (**self).patterns()
-    }
-
-    fn pattern(&self, i: usize) -> &P {
-        (**self).pattern(i)
-    }
-
-    fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match {
-        (**self).get_match(si, outi, texti)
-    }
-}
-
-/// Records a match in the search text.
-#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
-pub struct Match {
-    /// The pattern index.
-    ///
-    /// This corresponds to the ordering in which the matched pattern was
-    /// added to the automaton, starting at `0`.
-    pub pati: usize,
-    /// The starting byte offset of the match in the search text.
-    pub start: usize,
-    /// The ending byte offset of the match in the search text.
-    ///
-    /// (This can be re-captiulated with `pati` and adding the pattern's
-    /// length to `start`, but it is convenient to have it here.)
-    pub end: usize,
-}
-
-/// An iterator of non-overlapping matches for in-memory text.
-///
-/// This iterator yields `Match` values.
-///
-/// `'a` is the lifetime of the automaton, `'s` is the lifetime of the
-/// search text, and `P` is the type of the Automaton's pattern.
-#[derive(Debug)]
-pub struct Matches<'a, 's, P, A: 'a + Automaton<P> + ?Sized> {
-    aut: &'a A,
-    text: &'s [u8],
-    texti: usize,
-    si: StateIdx,
-    _m: PhantomData<P>,
-}
-
-// When there's an initial lone start byte, it is usually worth it
-// to use `memchr` to skip along the input. The problem is that
-// the skipping function is called in the inner match loop, which
-// can be quite costly if the skipping condition is never met.
-// Therefore, we lift the case analysis outside of the inner loop at
-// the cost of repeating code.
-//
-// `step_to_match` is the version of the inner loop without skipping,
-// and `skip_to_match` is the version with skipping.
-#[inline(never)]
-fn step_to_match<P, A: Automaton<P> + ?Sized>(
-    aut: &A,
-    text: &[u8],
-    mut texti: usize,
-    mut si: StateIdx
-) -> Option<(usize, StateIdx)> {
-    while texti < text.len() {
-        si = aut.next_state(si, text[texti]);
-        if aut.has_match(si, 0) {
-            return Some((texti, si));
-        }
-        texti += 1;
-        if texti + 4 < text.len() {
-            si = aut.next_state(si, text[texti]);
-            if aut.has_match(si, 0) {
-                return Some((texti, si));
-            }
-            texti += 1;
-            si = aut.next_state(si, text[texti]);
-            if aut.has_match(si, 0) {
-                return Some((texti, si));
-            }
-            texti += 1;
-            si = aut.next_state(si, text[texti]);
-            if aut.has_match(si, 0) {
-                return Some((texti, si));
-            }
-            texti += 1;
-            si = aut.next_state(si, text[texti]);
-            if aut.has_match(si, 0) {
-                return Some((texti, si));
-            }
-            texti += 1;
-            si = aut.next_state(si, text[texti]);
-            if aut.has_match(si, 0) {
-                return Some((texti, si));
-            }
-            texti += 1;
-        }
-    }
-    None
-}
-
-fn skip_to_match<P, A: Automaton<P> + ?Sized, F: Fn(&A, &[u8], usize) -> usize>(
-    aut: &A,
-    text: &[u8],
-    mut texti: usize,
-    mut si: StateIdx,
-    skip: F,
-) -> Option<(usize, StateIdx)> {
-    if si == ROOT_STATE {
-        texti = skip(aut, text, texti);
-    }
-    while texti < text.len() {
-        si = aut.next_state(si, text[texti]);
-        if aut.has_match(si, 0) {
-            return Some((texti, si));
-        }
-        if si == ROOT_STATE {
-            texti = skip(aut, text, texti + 1);
-        } else {
-            texti += 1;
-        }
-    }
-    None
-}
-
-#[inline]
-fn skip1<P, A: Automaton<P> + ?Sized>(
-    aut: &A,
-    text: &[u8],
-    at: usize,
-) -> usize {
-    debug_assert!(aut.start_bytes().len() == 1);
-    let b = aut.start_bytes()[0];
-    match memchr(b, &text[at..]) {
-        None => text.len(),
-        Some(i) => at + i,
-    }
-}
-
-#[inline]
-fn skip2<P, A: Automaton<P> + ?Sized>(
-    aut: &A,
-    text: &[u8],
-    at: usize,
-) -> usize {
-    debug_assert!(aut.start_bytes().len() == 2);
-    let (b1, b2) = (aut.start_bytes()[0], aut.start_bytes()[1]);
-    match memchr2(b1, b2, &text[at..]) {
-        None => text.len(),
-        Some(i) => at + i,
-    }
-}
-
-#[inline]
-fn skip3<P, A: Automaton<P> + ?Sized>(
-    aut: &A,
-    text: &[u8],
-    at: usize,
-) -> usize {
-    debug_assert!(aut.start_bytes().len() == 3);
-    let (b1, b2, b3) = (
-        aut.start_bytes()[0], aut.start_bytes()[1], aut.start_bytes()[2],
-    );
-    match memchr3(b1, b2, b3, &text[at..]) {
-        None => text.len(),
-        Some(i) => at + i,
-    }
-}
-
-impl<'a, 's, P, A: Automaton<P> + ?Sized> Iterator for Matches<'a, 's, P, A> {
-    type Item = Match;
-
-    fn next(&mut self) -> Option<Match> {
-        if self.aut.start_bytes().len() == 1 {
-            let skip = skip_to_match(
-                self.aut, self.text, self.texti, self.si, skip1);
-            if let Some((texti, si)) = skip {
-                self.texti = texti + 1;
-                self.si = ROOT_STATE;
-                return Some(self.aut.get_match(si, 0, texti));
-            }
-        } else if self.aut.start_bytes().len() == 2 {
-            let skip = skip_to_match(
-                self.aut, self.text, self.texti, self.si, skip2);
-            if let Some((texti, si)) = skip {
-                self.texti = texti + 1;
-                self.si = ROOT_STATE;
-                return Some(self.aut.get_match(si, 0, texti));
-            }
-        } else if self.aut.start_bytes().len() == 3 {
-            let skip = skip_to_match(
-                self.aut, self.text, self.texti, self.si, skip3);
-            if let Some((texti, si)) = skip {
-                self.texti = texti + 1;
-                self.si = ROOT_STATE;
-                return Some(self.aut.get_match(si, 0, texti));
-            }
-        } else {
-            let step = step_to_match(self.aut, self.text, self.texti, self.si);
-            if let Some((texti, si)) = step {
-                self.texti = texti + 1;
-                self.si = ROOT_STATE;
-                return Some(self.aut.get_match(si, 0, texti));
-            }
-        }
-        None
-    }
-}
-
-/// An iterator of non-overlapping matches for streaming text.
-///
-/// This iterator yields `io::Result<Match>` values.
-///
-/// `'a` is the lifetime of the automaton, `R` is the type of the underlying
-/// `io::Read`er, and P is the type of the Automaton's pattern.
-#[derive(Debug)]
-pub struct StreamMatches<'a, R, P, A: 'a + Automaton<P> + ?Sized> {
-    aut: &'a A,
-    buf: io::BufReader<R>,
-    texti: usize,
-    si: StateIdx,
-    _m: PhantomData<P>,
-}
-
-impl<'a, R: io::Read, P, A: Automaton<P>>
-        Iterator for StreamMatches<'a, R, P, A> {
-    type Item = io::Result<Match>;
-
-    fn next(&mut self) -> Option<io::Result<Match>> {
-        let mut m = None;
-        let mut consumed = 0;
-'LOOP:  loop {
-            self.buf.consume(consumed);
-            let bs = match self.buf.fill_buf() {
-                Err(err) => return Some(Err(err)),
-                Ok(bs) if bs.len() == 0 => break,
-                Ok(bs) => bs,
-            };
-            consumed = bs.len(); // is shortened if we find a match
-            for (i, &b) in bs.iter().enumerate() {
-                self.si = self.aut.next_state(self.si, b);
-                if self.aut.has_match(self.si, 0) {
-                    m = Some(Ok(self.aut.get_match(self.si, 0, self.texti)));
-                    consumed = i + 1;
-                    self.texti += 1;
-                    self.si = ROOT_STATE;
-                    break 'LOOP;
-                }
-                self.texti += 1;
-            }
-        }
-        self.buf.consume(consumed);
-        m
-    }
-}
-
-/// An iterator of overlapping matches for in-memory text.
-///
-/// This iterator yields `Match` values.
-///
-/// `'a` is the lifetime of the automaton, `'s` is the lifetime of the
-/// search text, and `P` is the type of the Automaton's pattern.
-#[derive(Debug)]
-pub struct MatchesOverlapping<'a, 's, P, A: 'a + Automaton<P> + ?Sized> {
-    aut: &'a A,
-    text: &'s [u8],
-    texti: usize,
-    si: StateIdx,
-    outi: usize,
-    _m: PhantomData<P>,
-}
-
-impl<'a, 's, P, A: Automaton<P> + ?Sized>
-        Iterator for MatchesOverlapping<'a, 's, P, A> {
-    type Item = Match;
-
-    fn next(&mut self) -> Option<Match> {
-        if self.aut.has_match(self.si, self.outi) {
-            let m = self.aut.get_match(self.si, self.outi, self.texti);
-            self.outi += 1;
-            if !self.aut.has_match(self.si, self.outi) {
-                self.texti += 1;
-            }
-            return Some(m);
-        }
-
-        self.outi = 0;
-        if self.aut.start_bytes().len() == 1 {
-            let skip = skip_to_match(
-                self.aut, self.text, self.texti, self.si, skip1);
-            if let Some((texti, si)) = skip {
-                self.texti = texti;
-                self.si = si;
-                return self.next();
-            }
-        } else if self.aut.start_bytes().len() == 2 {
-            let skip = skip_to_match(
-                self.aut, self.text, self.texti, self.si, skip2);
-            if let Some((texti, si)) = skip {
-                self.texti = texti;
-                self.si = si;
-                return self.next();
-            }
-        } else if self.aut.start_bytes().len() == 3 {
-            let skip = skip_to_match(
-                self.aut, self.text, self.texti, self.si, skip3);
-            if let Some((texti, si)) = skip {
-                self.texti = texti;
-                self.si = si;
-                return self.next();
-            }
-        } else {
-            let step = step_to_match(self.aut, self.text, self.texti, self.si);
-            if let Some((texti, si)) = step {
-                self.texti = texti;
-                self.si = si;
-                return self.next();
-            }
-        }
-        None
-    }
-}
-
-/// An iterator of overlapping matches for streaming text.
-///
-/// This iterator yields `io::Result<Match>` values.
-///
-/// `'a` is the lifetime of the automaton, `R` is the type of the underlying
-/// `io::Read`er, and P is the type of the Automaton's pattern.
-#[derive(Debug)]
-pub struct StreamMatchesOverlapping<'a, R, P, A: 'a + Automaton<P> + ?Sized> {
-    aut: &'a A,
-    buf: io::BufReader<R>,
-    texti: usize,
-    si: StateIdx,
-    outi: usize,
-    _m: PhantomData<P>,
-}
-
-impl<'a, R: io::Read, P, A: Automaton<P> + ?Sized>
-        Iterator for StreamMatchesOverlapping<'a, R, P, A> {
-    type Item = io::Result<Match>;
-
-    fn next(&mut self) -> Option<io::Result<Match>> {
-        if self.aut.has_match(self.si, self.outi) {
-            let m = self.aut.get_match(self.si, self.outi, self.texti);
-            self.outi += 1;
-            if !self.aut.has_match(self.si, self.outi) {
-                self.texti += 1;
-            }
-            return Some(Ok(m));
-        }
-        let mut m = None;
-        let mut consumed = 0;
-        self.outi = 0;
-'LOOP:  loop {
-            self.buf.consume(consumed);
-            let bs = match self.buf.fill_buf() {
-                Err(err) => return Some(Err(err)),
-                Ok(bs) if bs.len() == 0 => break,
-                Ok(bs) => bs,
-            };
-            consumed = bs.len(); // is shortened if we find a match
-            for (i, &b) in bs.iter().enumerate() {
-                self.si = self.aut.next_state(self.si, b);
-                if self.aut.has_match(self.si, self.outi) {
-                    m = Some(Ok(self.aut.get_match(
-                        self.si, self.outi, self.texti)));
-                    consumed = i + 1;
-                    self.outi += 1;
-                    if !self.aut.has_match(self.si, self.outi) {
-                        self.texti += 1;
-                    }
-                    break 'LOOP;
-                }
-                self.texti += 1;
-            }
-        }
-        self.buf.consume(consumed);
-        m
-    }
-}
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/src/full.rs
+++ /dev/null
@@ -1,136 +0,0 @@
-use std::fmt;
-use std::mem;
-
-use super::{
-    FAIL_STATE,
-    StateIdx, AcAutomaton, Transitions, Match,
-    usize_bytes, vec_bytes,
-};
-use super::autiter::Automaton;
-
-/// A complete Aho-Corasick automaton.
-///
-/// This uses a single transition matrix that permits each input character
-/// to move to the next state with a single lookup in the matrix.
-///
-/// This is as fast as it gets, but it is guaranteed to use a lot of memory.
-/// Namely, it will use at least `4 * 256 * #states`, where the number of
-/// states is capped at length of all patterns concatenated.
-#[derive(Clone)]
-pub struct FullAcAutomaton<P> {
-    pats: Vec<P>,
-    trans: Vec<StateIdx>,  // row-major, where states are rows
-    out: Vec<Vec<usize>>, // indexed by StateIdx
-    start_bytes: Vec<u8>,
-}
-
-impl<P: AsRef<[u8]>> FullAcAutomaton<P> {
-    /// Build a new expanded Aho-Corasick automaton from an existing
-    /// Aho-Corasick automaton.
-    pub fn new<T: Transitions>(ac: AcAutomaton<P, T>) -> FullAcAutomaton<P> {
-        let mut fac = FullAcAutomaton {
-            pats: vec![],
-            trans: vec![FAIL_STATE; 256 * ac.states.len()],
-            out: vec![vec![]; ac.states.len()],
-            start_bytes: vec![],
-        };
-        fac.build_matrix(&ac);
-        fac.pats = ac.pats;
-        fac.start_bytes = ac.start_bytes;
-        fac
-    }
-
-    #[doc(hidden)]
-    pub fn memory_usage(&self) -> usize {
-        self.pats.iter()
-            .map(|p| vec_bytes() + p.as_ref().len())
-            .fold(0, |a, b| a + b)
-        + (4 * self.trans.len())
-        + self.out.iter()
-              .map(|v| vec_bytes() + (usize_bytes() * v.len()))
-              .fold(0, |a, b| a + b)
-        + self.start_bytes.len()
-    }
-
-    #[doc(hidden)]
-    pub fn heap_bytes(&self) -> usize {
-        self.pats.iter()
-            .map(|p| mem::size_of::<P>() + p.as_ref().len())
-            .fold(0, |a, b| a + b)
-        + (4 * self.trans.len())
-        + self.out.iter()
-              .map(|v| vec_bytes() + (usize_bytes() * v.len()))
-              .fold(0, |a, b| a + b)
-        + self.start_bytes.len()
-    }
-
-    fn set(&mut self, si: StateIdx, i: u8, goto: StateIdx) {
-        let ns = self.num_states();
-        self.trans[i as usize * ns + si as usize] = goto;
-    }
-
-    #[doc(hidden)]
-    #[inline]
-    pub fn num_states(&self) -> usize {
-        self.out.len()
-    }
-}
-
-impl<P: AsRef<[u8]>> Automaton<P> for FullAcAutomaton<P> {
-    #[inline]
-    fn next_state(&self, si: StateIdx, i: u8) -> StateIdx {
-        let at = i as usize * self.num_states() + si as usize;
-        unsafe { *self.trans.get_unchecked(at) }
-    }
-
-    #[inline]
-    fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match {
-        let pati = self.out[si as usize][outi];
-        let patlen = self.pats[pati].as_ref().len();
-        let start = texti + 1 - patlen;
-        Match {
-            pati: pati,
-            start: start,
-            end: start + patlen,
-        }
-    }
-
-    #[inline]
-    fn has_match(&self, si: StateIdx, outi: usize) -> bool {
-        unsafe { outi < self.out.get_unchecked(si as usize).len() }
-    }
-
-    #[inline]
-    fn start_bytes(&self) -> &[u8] {
-        &self.start_bytes
-    }
-
-    #[inline]
-    fn patterns(&self) -> &[P] {
-        &self.pats
-    }
-
-    #[inline]
-    fn pattern(&self, i: usize) -> &P {
-        &self.pats[i]
-    }
-}
-
-impl<P: AsRef<[u8]>> FullAcAutomaton<P> {
-    fn build_matrix<T: Transitions>(&mut self, ac: &AcAutomaton<P, T>) {
-        for (si, s) in ac.states.iter().enumerate().skip(1) {
-            for b in (0..256).map(|b| b as u8) {
-                self.set(si as StateIdx, b, ac.next_state(si as StateIdx, b));
-            }
-            for &pati in &s.out {
-                self.out[si].push(pati);
-            }
-        }
-    }
-}
-
-impl<P: AsRef<[u8]> + fmt::Debug> fmt::Debug for FullAcAutomaton<P> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "FullAcAutomaton({:?})", self.pats)
-    }
-}
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/src/lib.rs
+++ /dev/null
@@ -1,925 +0,0 @@
-/*!
-An implementation of the
-[Aho-Corasick string search algorithm](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm).
-
-The Aho-Corasick algorithm is principally useful when you need to search many
-large texts for a fixed (possibly large) set of keywords. In particular, the
-Aho-Corasick algorithm preprocesses the set of keywords by constructing a
-finite state machine. The search phase is then a quick linear scan through the
-text. Each character in the search text causes a state transition in the
-automaton. Matches are reported when the automaton enters a match state.
-
-# Examples
-
-The main type exposed by this crate is `AcAutomaton`, which can be constructed
-from an iterator of pattern strings:
-
-```rust
-use aho_corasick::{Automaton, AcAutomaton};
-
-let aut = AcAutomaton::new(vec!["apple", "maple"]);
-
-// AcAutomaton also implements `FromIterator`:
-let aut: AcAutomaton<&str> = ["apple", "maple"].iter().cloned().collect();
-```
-
-Finding matches can be done with `find`:
-
-```rust
-use aho_corasick::{Automaton, AcAutomaton, Match};
-
-let aut = AcAutomaton::new(vec!["apple", "maple"]);
-let mut it = aut.find("I like maple apples.");
-assert_eq!(it.next(), Some(Match {
-    pati: 1,
-    start: 7,
-    end: 12,
-}));
-assert_eq!(it.next(), Some(Match {
-    pati: 0,
-    start: 13,
-    end: 18,
-}));
-assert_eq!(it.next(), None);
-```
-
-Use `find_overlapping` if you want to report all matches, even if they
-overlap with each other.
-
-```rust
-use aho_corasick::{Automaton, AcAutomaton, Match};
-
-let aut = AcAutomaton::new(vec!["abc", "a"]);
-let matches: Vec<_> = aut.find_overlapping("abc").collect();
-assert_eq!(matches, vec![
-    Match { pati: 1, start: 0, end: 1}, Match { pati: 0, start: 0, end: 3 },
-]);
-
-// Regular `find` will report only one match:
-let matches: Vec<_> = aut.find("abc").collect();
-assert_eq!(matches, vec![Match { pati: 1, start: 0, end: 1}]);
-```
-
-Finally, there are also methods for finding matches on *streams*. Namely, the
-search text does not have to live in memory. It's useful to run this on files
-that can't fit into memory:
-
-```no_run
-use std::fs::File;
-
-use aho_corasick::{Automaton, AcAutomaton};
-
-let aut = AcAutomaton::new(vec!["foo", "bar", "baz"]);
-let rdr = File::open("search.txt").unwrap();
-for m in aut.stream_find(rdr) {
-    let m = m.unwrap(); // could be an IO error
-    println!("Pattern '{}' matched at: ({}, {})",
-             aut.pattern(m.pati), m.start, m.end);
-}
-```
-
-There is also `stream_find_overlapping`, which is just like `find_overlapping`,
-but it operates on streams.
-
-Please see `dict-search.rs` in this crate's `examples` directory for a more
-complete example. It creates a large automaton from a dictionary and can do a
-streaming match over arbitrarily large data.
-
-# Memory usage
-
-A key aspect of an Aho-Corasick implementation is how the state transitions
-are represented. The easiest way to make the automaton fast is to store a
-sparse 256-slot map in each state. It maps an input byte to a state index.
-This makes the matching loop extremely fast, since it translates to a simple
-pointer read.
-
-The problem is that as the automaton accumulates more states, you end up paying
-a `256 * 4` (`4` is for the `u32` state index) byte penalty for every state
-regardless of how many transitions it has.
-
-To solve this, only states near the root of the automaton have this sparse
-map representation. States near the leaves of the automaton use a dense mapping
-that requires a linear scan.
-
-(The specific limit currently set is `3`, so that states with a depth less than
-or equal to `3` are less memory efficient. The result is that the memory usage
-of the automaton stops growing rapidly past ~60MB, even for automatons with
-thousands of patterns.)
-
-If you'd like to opt for the less-memory-efficient-but-faster version, then
-you can construct an `AcAutomaton` with a `Sparse` transition strategy:
-
-```rust
-use aho_corasick::{Automaton, AcAutomaton, Match, Sparse};
-
-let aut = AcAutomaton::<&str, Sparse>::with_transitions(vec!["abc", "a"]);
-let matches: Vec<_> = aut.find("abc").collect();
-assert_eq!(matches, vec![Match { pati: 1, start: 0, end: 1}]);
-```
-*/
-
-#![deny(missing_docs)]
-
-extern crate memchr;
-#[cfg(test)] extern crate quickcheck;
-#[cfg(test)] extern crate rand;
-
-use std::collections::VecDeque;
-use std::fmt;
-use std::iter::FromIterator;
-use std::mem;
-
-pub use self::autiter::{
-    Automaton, Match,
-    Matches, MatchesOverlapping, StreamMatches, StreamMatchesOverlapping,
-};
-pub use self::full::FullAcAutomaton;
-
-// We're specifying paths explicitly so that we can use
-// these modules simultaneously from `main.rs`.
-// Should probably make just make `main.rs` a separate crate.
-#[path = "autiter.rs"]
-mod autiter;
-#[path = "full.rs"]
-mod full;
-
-/// The integer type used for the state index.
-///
-/// Limiting this to 32 bit integers can have a big impact on memory usage
-/// when using the `Sparse` transition representation.
-pub type StateIdx = u32;
-
-// Constants for special state indexes.
-const FAIL_STATE: u32 = 0;
-const ROOT_STATE: u32 = 1;
-
-// Limit the depth at which we use a sparse alphabet map. Once the limit is
-// reached, a dense set is used (and lookup becomes O(n)).
-//
-// This does have a performance hit, but the (straight forward) alternative
-// is to have a `256 * 4` byte overhead for every state.
-// Given that Aho-Corasick is typically used for dictionary searching, this
-// can lead to dramatic memory bloat.
-//
-// This limit should only be increased at your peril. Namely, in the worst
-// case, `256^DENSE_DEPTH_THRESHOLD * 4` corresponds to the memory usage in
-// bytes. A value of `1` gives us a good balance. This is also a happy point
-// in the benchmarks. A value of `0` gives considerably worse times on certain
-// benchmarks (e.g., `ac_ten_one_prefix_byte_every_match`) than even a value
-// of `1`. A value of `2` is slightly better than `1` and it looks like gains
-// level off at that point with not much observable difference when set to
-// `3`.
-//
-// Why not make this user configurable? Well, it doesn't make much sense
-// because we pay for it with case analysis in the matching loop. Increasing it
-// doesn't have much impact on performance (outside of pathological cases?).
-//
-// N.B. Someone else seems to have discovered an alternative, but I haven't
-// grokked it yet: https://github.com/mischasan/aho-corasick
-const DENSE_DEPTH_THRESHOLD: u32 = 1;
-
-/// An Aho-Corasick finite automaton.
-///
-/// The type parameter `P` is the type of the pattern that was used to
-/// construct this AcAutomaton.
-#[derive(Clone)]
-pub struct AcAutomaton<P, T=Dense> {
-    pats: Vec<P>,
-    states: Vec<State<T>>,
-    start_bytes: Vec<u8>,
-}
-
-#[derive(Clone)]
-struct State<T> {
-    out: Vec<usize>,
-    fail: StateIdx,
-    goto: T,
-    depth: u32,
-}
-
-impl<P: AsRef<[u8]>> AcAutomaton<P> {
-    /// Create a new automaton from an iterator of patterns.
-    ///
-    /// The patterns must be convertible to bytes (`&[u8]`) via the `AsRef`
-    /// trait.
-    pub fn new<I>(pats: I) -> AcAutomaton<P, Dense>
-            where I: IntoIterator<Item=P> {
-        AcAutomaton::with_transitions(pats)
-    }
-}
-
-impl<P: AsRef<[u8]>, T: Transitions> AcAutomaton<P, T> {
-    /// Create a new automaton from an iterator of patterns.
-    ///
-    /// This constructor allows one to choose the transition representation.
-    ///
-    /// The patterns must be convertible to bytes (`&[u8]`) via the `AsRef`
-    /// trait.
-    pub fn with_transitions<I>(pats: I) -> AcAutomaton<P, T>
-            where I: IntoIterator<Item=P> {
-        AcAutomaton {
-            pats: vec![], // filled in later, avoid wrath of borrow checker
-            states: vec![State::new(0), State::new(0)], // empty and root
-            start_bytes: vec![], // also filled in later
-        }.build(pats.into_iter().collect())
-    }
-
-    /// Build out the entire automaton into a single matrix.
-    ///
-    /// This will make searching as fast as possible at the expense of using
-    /// at least `4 * 256 * #states` bytes of memory.
-    pub fn into_full(self) -> FullAcAutomaton<P> {
-        FullAcAutomaton::new(self)
-    }
-
-    #[doc(hidden)]
-    pub fn num_states(&self) -> usize {
-        self.states.len()
-    }
-
-    #[doc(hidden)]
-    pub fn heap_bytes(&self) -> usize {
-        self.pats.iter()
-            .map(|p| mem::size_of::<P>() + p.as_ref().len())
-            .fold(0, |a, b| a + b)
-        + self.states.iter()
-              .map(|s| mem::size_of::<State<T>>() + s.heap_bytes())
-              .fold(0, |a, b| a + b)
-        + self.start_bytes.len()
-    }
-}
-
-impl<P: AsRef<[u8]>, T: Transitions> Automaton<P> for AcAutomaton<P, T> {
-    #[inline]
-    fn next_state(&self, mut si: StateIdx, b: u8) -> StateIdx {
-        loop {
-            let maybe_si = self.states[si as usize].goto(b);
-            if maybe_si != FAIL_STATE {
-                si = maybe_si;
-                break;
-            } else {
-                si = self.states[si as usize].fail;
-            }
-        }
-        si
-    }
-
-    #[inline]
-    fn get_match(&self, si: StateIdx, outi: usize, texti: usize) -> Match {
-        let pati = self.states[si as usize].out[outi];
-        let patlen = self.pats[pati].as_ref().len();
-        let start = texti + 1 - patlen;
-        Match {
-            pati: pati,
-            start: start,
-            end: start + patlen,
-        }
-    }
-
-    #[inline]
-    fn has_match(&self, si: StateIdx, outi: usize) -> bool {
-        outi < self.states[si as usize].out.len()
-    }
-
-    #[inline]
-    fn start_bytes(&self) -> &[u8] {
-        &self.start_bytes
-    }
-
-    #[inline]
-    fn patterns(&self) -> &[P] {
-        &self.pats
-    }
-
-    #[inline]
-    fn pattern(&self, i: usize) -> &P {
-        &self.pats[i]
-    }
-}
-
-// Below contains code for *building* the automaton. It's a reasonably faithful
-// translation of the description/psuedo-code from:
-// http://www.cs.uku.fi/~kilpelai/BSA05/lectures/slides04.pdf
-
-impl<P: AsRef<[u8]>, T: Transitions> AcAutomaton<P, T> {
-    // This is the first phase and builds the initial keyword tree.
-    fn build(mut self, pats: Vec<P>) -> AcAutomaton<P, T> {
-        for (pati, pat) in pats.iter().enumerate() {
-            if pat.as_ref().is_empty() {
-                continue;
-            }
-            let mut previ = ROOT_STATE;
-            for &b in pat.as_ref() {
-                if self.states[previ as usize].goto(b) != FAIL_STATE {
-                    previ = self.states[previ as usize].goto(b);
-                } else {
-                    let depth = self.states[previ as usize].depth + 1;
-                    let nexti = self.add_state(State::new(depth));
-                    self.states[previ as usize].set_goto(b, nexti);
-                    previ = nexti;
-                }
-            }
-            self.states[previ as usize].out.push(pati);
-        }
-        for c in (0..256).into_iter().map(|c| c as u8) {
-            if self.states[ROOT_STATE as usize].goto(c) == FAIL_STATE {
-                self.states[ROOT_STATE as usize].set_goto(c, ROOT_STATE);
-            } else {
-                self.start_bytes.push(c);
-            }
-        }
-        // If any of the start bytes are non-ASCII, then remove them all,
-        // because we don't want to be calling memchr on non-ASCII bytes.
-        // (Well, we could, but it requires being more clever. Simply using
-        // the prefix byte isn't good enough.)
-        if self.start_bytes.iter().any(|&b| b > 0x7F) {
-            self.start_bytes.clear();
-        }
-        self.pats = pats;
-        self.fill()
-    }
-
-    // The second phase that fills in the back links.
-    fn fill(mut self) -> AcAutomaton<P, T> {
-        // Fill up the queue with all non-root transitions out of the root
-        // node. Then proceed by breadth first traversal.
-        let mut q = VecDeque::new();
-        for c in (0..256).into_iter().map(|c| c as u8) {
-            let si = self.states[ROOT_STATE as usize].goto(c);
-            if si != ROOT_STATE {
-                q.push_front(si);
-            }
-        }
-        while let Some(si) = q.pop_back() {
-            for c in (0..256).into_iter().map(|c| c as u8) {
-                let u = self.states[si as usize].goto(c);
-                if u != FAIL_STATE {
-                    q.push_front(u);
-                    let mut v = self.states[si as usize].fail;
-                    while self.states[v as usize].goto(c) == FAIL_STATE {
-                        v = self.states[v as usize].fail;
-                    }
-                    let ufail = self.states[v as usize].goto(c);
-                    self.states[u as usize].fail = ufail;
-                    let ufail_out = self.states[ufail as usize].out.clone();
-                    self.states[u as usize].out.extend(ufail_out);
-                }
-            }
-        }
-        self
-    }
-
-    fn add_state(&mut self, state: State<T>) -> StateIdx {
-        let i = self.states.len();
-        self.states.push(state);
-        i as StateIdx
-    }
-}
-
-impl<T: Transitions> State<T> {
-    fn new(depth: u32) -> State<T> {
-        State {
-            out: vec![],
-            fail: 1,
-            goto: Transitions::new(depth),
-            depth: depth,
-        }
-    }
-
-    fn goto(&self, b: u8) -> StateIdx {
-        self.goto.goto(b)
-    }
-
-    fn set_goto(&mut self, b: u8, si: StateIdx) {
-        self.goto.set_goto(b, si);
-    }
-
-    fn heap_bytes(&self) -> usize {
-        (self.out.len() * usize_bytes())
-        + self.goto.heap_bytes()
-    }
-}
-
-/// An abstraction over state transition strategies.
-///
-/// This is an attempt to let the caller choose the space/time trade offs
-/// used for state transitions.
-///
-/// (It's possible that this interface is merely good enough for just the two
-/// implementations in this crate.)
-pub trait Transitions {
-    /// Return a new state at the given depth.
-    fn new(depth: u32) -> Self;
-    /// Return the next state index given the next character.
-    fn goto(&self, alpha: u8) -> StateIdx;
-    /// Set the next state index for the character given.
-    fn set_goto(&mut self, alpha: u8, si: StateIdx);
-    /// The memory use in bytes (on the heap) of this set of transitions.
-    fn heap_bytes(&self) -> usize;
-}
-
-/// State transitions that can be stored either sparsely or densely.
-///
-/// This uses less space but at the expense of slower matching.
-#[derive(Clone, Debug)]
-pub struct Dense(DenseChoice);
-
-#[derive(Clone, Debug)]
-enum DenseChoice {
-    Sparse(Vec<StateIdx>), // indexed by alphabet
-    Dense(Vec<(u8, StateIdx)>),
-}
-
-impl Transitions for Dense {
-    fn new(depth: u32) -> Dense {
-        if depth <= DENSE_DEPTH_THRESHOLD {
-            Dense(DenseChoice::Sparse(vec![0; 256]))
-        } else {
-            Dense(DenseChoice::Dense(vec![]))
-        }
-    }
-
-    fn goto(&self, b1: u8) -> StateIdx {
-        match self.0 {
-            DenseChoice::Sparse(ref m) => m[b1 as usize],
-            DenseChoice::Dense(ref m) => {
-                for &(b2, si) in m {
-                    if b1 == b2 {
-                        return si;
-                    }
-                }
-                FAIL_STATE
-            }
-        }
-    }
-
-    fn set_goto(&mut self, b: u8, si: StateIdx) {
-        match self.0 {
-            DenseChoice::Sparse(ref mut m) => m[b as usize] = si,
-            DenseChoice::Dense(ref mut m) => m.push((b, si)),
-        }
-    }
-
-    fn heap_bytes(&self) -> usize {
-        match self.0 {
-            DenseChoice::Sparse(ref m) => m.len() * 4,
-            DenseChoice::Dense(ref m) => m.len() * (1 + 4),
-        }
-    }
-}
-
-/// State transitions that are always sparse.
-///
-/// This can use enormous amounts of memory when there are many patterns,
-/// but matching is very fast.
-#[derive(Clone, Debug)]
-pub struct Sparse(Vec<StateIdx>);
-
-impl Transitions for Sparse {
-    fn new(_: u32) -> Sparse {
-        Sparse(vec![0; 256])
-    }
-
-    #[inline]
-    fn goto(&self, b: u8) -> StateIdx {
-        self.0[b as usize]
-    }
-
-    fn set_goto(&mut self, b: u8, si: StateIdx) {
-        self.0[b as usize] = si;
-    }
-
-    fn heap_bytes(&self) -> usize {
-        self.0.len() * 4
-    }
-}
-
-impl<S: AsRef<[u8]>> FromIterator<S> for AcAutomaton<S> {
-    /// Create an automaton from an iterator of strings.
-    fn from_iter<T>(it: T) -> AcAutomaton<S> where T: IntoIterator<Item=S> {
-        AcAutomaton::new(it)
-    }
-}
-
-// Provide some question debug impls for viewing automatons.
-// The custom impls mostly exist for special showing of sparse maps.
-
-impl<P: AsRef<[u8]> + fmt::Debug, T: Transitions>
-        fmt::Debug for AcAutomaton<P, T> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        use std::iter::repeat;
-
-        try!(writeln!(f, "{}", repeat('-').take(79).collect::<String>()));
-        try!(writeln!(f, "Patterns: {:?}", self.pats));
-        for (i, state) in self.states.iter().enumerate().skip(1) {
-            try!(writeln!(f, "{:3}: {}", i, state.debug(i == 1)));
-        }
-        write!(f, "{}", repeat('-').take(79).collect::<String>())
-    }
-}
-
-impl<T: Transitions> State<T> {
-    fn debug(&self, root: bool) -> String {
-        format!("State {{ depth: {:?}, out: {:?}, fail: {:?}, goto: {{{}}} }}",
-                self.depth, self.out, self.fail, self.goto_string(root))
-    }
-
-    fn goto_string(&self, root: bool) -> String {
-        use std::char::from_u32;
-
-        let mut goto = vec![];
-        for b in (0..256).map(|b| b as u8) {
-            let si = self.goto(b);
-            if (!root && si == FAIL_STATE) || (root && si == ROOT_STATE) {
-                continue;
-            }
-            goto.push(format!("{} => {}", from_u32(b as u32).unwrap(), si));
-        }
-        goto.join(", ")
-    }
-}
-
-impl<T: Transitions> fmt::Debug for State<T> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}", self.debug(false))
-    }
-}
-
-impl<T: Transitions> AcAutomaton<String, T> {
-    #[doc(hidden)]
-    pub fn dot(&self) -> String {
-        use std::fmt::Write;
-        let mut out = String::new();
-        macro_rules! w {
-            ($w:expr, $($tt:tt)*) => { {write!($w, $($tt)*)}.unwrap() }
-        }
-
-        w!(out, r#"
-digraph automaton {{
-    label=<<FONT POINT-SIZE="20">{}</FONT>>;
-    labelloc="l";
-    labeljust="l";
-    rankdir="LR";
-"#, self.pats.join(", "));
-        for (i, s) in self.states.iter().enumerate().skip(1) {
-            let i = i as u32;
-            if s.out.len() == 0 {
-                w!(out, "    {};\n", i);
-            } else {
-                w!(out, "    {} [peripheries=2];\n", i);
-            }
-            w!(out, "    {} -> {} [style=dashed];\n", i, s.fail);
-            for b in (0..256).map(|b| b as u8) {
-                let si = s.goto(b);
-                if si == FAIL_STATE || (i == ROOT_STATE && si == ROOT_STATE) {
-                    continue;
-                }
-                w!(out, "    {} -> {} [label={}];\n", i, si, b as char);
-            }
-        }
-        w!(out, "}}");
-        out
-    }
-}
-
-fn vec_bytes() -> usize {
-    usize_bytes() * 3
-}
-
-fn usize_bytes() -> usize {
-    let bits = usize::max_value().count_ones() as usize;
-    bits / 8
-}
-
-#[cfg(test)]
-mod tests {
-    use std::collections::HashSet;
-    use std::io;
-
-    use quickcheck::{Arbitrary, Gen, quickcheck};
-
-    use super::{Automaton, AcAutomaton, Match};
-
-    fn aut_find<S>(xs: &[S], haystack: &str) -> Vec<Match>
-            where S: Clone + AsRef<[u8]> {
-        AcAutomaton::new(xs.to_vec()).find(&haystack).collect()
-    }
-
-    fn aut_finds<S>(xs: &[S], haystack: &str) -> Vec<Match>
-            where S: Clone + AsRef<[u8]> {
-        let cur = io::Cursor::new(haystack.as_bytes());
-        AcAutomaton::new(xs.to_vec())
-            .stream_find(cur).map(|r| r.unwrap()).collect()
-    }
-
-    fn aut_findf<S>(xs: &[S], haystack: &str) -> Vec<Match>
-            where S: Clone + AsRef<[u8]> {
-        AcAutomaton::new(xs.to_vec()).into_full().find(haystack).collect()
-    }
-
-    fn aut_findfs<S>(xs: &[S], haystack: &str) -> Vec<Match>
-            where S: Clone + AsRef<[u8]> {
-        let cur = io::Cursor::new(haystack.as_bytes());
-        AcAutomaton::new(xs.to_vec())
-            .into_full()
-            .stream_find(cur).map(|r| r.unwrap()).collect()
-    }
-
-    fn aut_findo<S>(xs: &[S], haystack: &str) -> Vec<Match>
-            where S: Clone + AsRef<[u8]> {
-        AcAutomaton::new(xs.to_vec()).find_overlapping(haystack).collect()
-    }
-
-    fn aut_findos<S>(xs: &[S], haystack: &str) -> Vec<Match>
-            where S: Clone + AsRef<[u8]> {
-        let cur = io::Cursor::new(haystack.as_bytes());
-        AcAutomaton::new(xs.to_vec())
-            .stream_find_overlapping(cur).map(|r| r.unwrap()).collect()
-    }
-
-    fn aut_findfo<S>(xs: &[S], haystack: &str) -> Vec<Match>
-            where S: Clone + AsRef<[u8]> {
-        AcAutomaton::new(xs.to_vec())
-            .into_full().find_overlapping(haystack).collect()
-    }
-
-    fn aut_findfos<S>(xs: &[S], haystack: &str) -> Vec<Match>
-            where S: Clone + AsRef<[u8]> {
-        let cur = io::Cursor::new(haystack.as_bytes());
-        AcAutomaton::new(xs.to_vec())
-            .into_full()
-            .stream_find_overlapping(cur).map(|r| r.unwrap()).collect()
-    }
-
-    #[test]
-    fn one_pattern_one_match() {
-        let ns = vec!["a"];
-        let hay = "za";
-        let matches = vec![
-            Match { pati: 0, start: 1, end: 2 },
-        ];
-        assert_eq!(&aut_find(&ns, hay), &matches);
-        assert_eq!(&aut_finds(&ns, hay), &matches);
-        assert_eq!(&aut_findf(&ns, hay), &matches);
-        assert_eq!(&aut_findfs(&ns, hay), &matches);
-    }
-
-    #[test]
-    fn one_pattern_many_match() {
-        let ns = vec!["a"];
-        let hay = "zazazzzza";
-        let matches = vec![
-            Match { pati: 0, start: 1, end: 2 },
-            Match { pati: 0, start: 3, end: 4 },
-            Match { pati: 0, start: 8, end: 9 },
-        ];
-        assert_eq!(&aut_find(&ns, hay), &matches);
-        assert_eq!(&aut_finds(&ns, hay), &matches);
-        assert_eq!(&aut_findf(&ns, hay), &matches);
-        assert_eq!(&aut_findfs(&ns, hay), &matches);
-    }
-
-    #[test]
-    fn one_longer_pattern_one_match() {
-        let ns = vec!["abc"];
-        let hay = "zazabcz";
-        let matches = vec![ Match { pati: 0, start: 3, end: 6 } ];
-        assert_eq!(&aut_find(&ns, hay), &matches);
-        assert_eq!(&aut_finds(&ns, hay), &matches);
-        assert_eq!(&aut_findf(&ns, hay), &matches);
-        assert_eq!(&aut_findfs(&ns, hay), &matches);
-    }
-
-    #[test]
-    fn one_longer_pattern_many_match() {
-        let ns = vec!["abc"];
-        let hay = "zazabczzzzazzzabc";
-        let matches = vec![
-            Match { pati: 0, start: 3, end: 6 },
-            Match { pati: 0, start: 14, end: 17 },
-        ];
-        assert_eq!(&aut_find(&ns, hay), &matches);
-        assert_eq!(&aut_finds(&ns, hay), &matches);
-        assert_eq!(&aut_findf(&ns, hay), &matches);
-        assert_eq!(&aut_findfs(&ns, hay), &matches);
-    }
-
-    #[test]
-    fn many_pattern_one_match() {
-        let ns = vec!["a", "b"];
-        let hay = "zb";
-        let matches = vec![ Match { pati: 1, start: 1, end: 2 } ];
-        assert_eq!(&aut_find(&ns, hay), &matches);
-        assert_eq!(&aut_finds(&ns, hay), &matches);
-        assert_eq!(&aut_findf(&ns, hay), &matches);
-        assert_eq!(&aut_findfs(&ns, hay), &matches);
-    }
-
-    #[test]
-    fn many_pattern_many_match() {
-        let ns = vec!["a", "b"];
-        let hay = "zbzazzzzb";
-        let matches = vec![
-            Match { pati: 1, start: 1, end: 2 },
-            Match { pati: 0, start: 3, end: 4 },
-            Match { pati: 1, start: 8, end: 9 },
-        ];
-        assert_eq!(&aut_find(&ns, hay), &matches);
-        assert_eq!(&aut_finds(&ns, hay), &matches);
-        assert_eq!(&aut_findf(&ns, hay), &matches);
-        assert_eq!(&aut_findfs(&ns, hay), &matches);
-    }
-
-    #[test]
-    fn many_longer_pattern_one_match() {
-        let ns = vec!["abc", "xyz"];
-        let hay = "zazxyzz";
-        let matches = vec![ Match { pati: 1, start: 3, end: 6 } ];
-        assert_eq!(&aut_find(&ns, hay), &matches);
-        assert_eq!(&aut_finds(&ns, hay), &matches);
-        assert_eq!(&aut_findf(&ns, hay), &matches);
-        assert_eq!(&aut_findfs(&ns, hay), &matches);
-    }
-
-    #[test]
-    fn many_longer_pattern_many_match() {
-        let ns = vec!["abc", "xyz"];
-        let hay = "zazxyzzzzzazzzabcxyz";
-        let matches = vec![
-            Match { pati: 1, start: 3, end: 6 },
-            Match { pati: 0, start: 14, end: 17 },
-            Match { pati: 1, start: 17, end: 20 },
-        ];
-        assert_eq!(&aut_find(&ns, hay), &matches);
-        assert_eq!(&aut_finds(&ns, hay), &matches);
-        assert_eq!(&aut_findf(&ns, hay), &matches);
-        assert_eq!(&aut_findfs(&ns, hay), &matches);
-    }
-
-    #[test]
-    fn many_longer_pattern_overlap_one_match() {
-        let ns = vec!["abc", "bc"];
-        let hay = "zazabcz";
-        let matches = vec![
-            Match { pati: 0, start: 3, end: 6 },
-            Match { pati: 1, start: 4, end: 6 },
-        ];
-        assert_eq!(&aut_findo(&ns, hay), &matches);
-        assert_eq!(&aut_findos(&ns, hay), &matches);
-        assert_eq!(&aut_findfo(&ns, hay), &matches);
-        assert_eq!(&aut_findfos(&ns, hay), &matches);
-    }
-
-    #[test]
-    fn many_longer_pattern_overlap_one_match_reverse() {
-        let ns = vec!["abc", "bc"];
-        let hay = "xbc";
-        let matches = vec![ Match { pati: 1, start: 1, end: 3 } ];
-        assert_eq!(&aut_findo(&ns, hay), &matches);
-        assert_eq!(&aut_findos(&ns, hay), &matches);
-        assert_eq!(&aut_findfo(&ns, hay), &matches);
-        assert_eq!(&aut_findfos(&ns, hay), &matches);
-    }
-
-    #[test]
-    fn many_longer_pattern_overlap_many_match() {
-        let ns = vec!["abc", "bc", "c"];
-        let hay = "zzzabczzzbczzzc";
-        let matches = vec![
-            Match { pati: 0, start: 3, end: 6 },
-            Match { pati: 1, start: 4, end: 6 },
-            Match { pati: 2, start: 5, end: 6 },
-            Match { pati: 1, start: 9, end: 11 },
-            Match { pati: 2, start: 10, end: 11 },
-            Match { pati: 2, start: 14, end: 15 },
-        ];
-        assert_eq!(&aut_findo(&ns, hay), &matches);
-        assert_eq!(&aut_findos(&ns, hay), &matches);
-        assert_eq!(&aut_findfo(&ns, hay), &matches);
-        assert_eq!(&aut_findfos(&ns, hay), &matches);
-    }
-
-    #[test]
-    fn many_longer_pattern_overlap_many_match_reverse() {
-        let ns = vec!["abc", "bc", "c"];
-        let hay = "zzzczzzbczzzabc";
-        let matches = vec![
-            Match { pati: 2, start: 3, end: 4 },
-            Match { pati: 1, start: 7, end: 9 },
-            Match { pati: 2, start: 8, end: 9 },
-            Match { pati: 0, start: 12, end: 15 },
-            Match { pati: 1, start: 13, end: 15 },
-            Match { pati: 2, start: 14, end: 15 },
-        ];
-        assert_eq!(&aut_findo(&ns, hay), &matches);
-        assert_eq!(&aut_findos(&ns, hay), &matches);
-        assert_eq!(&aut_findfo(&ns, hay), &matches);
-        assert_eq!(&aut_findfos(&ns, hay), &matches);
-    }
-
-    #[test]
-    fn pattern_returns_original_type() {
-        let aut = AcAutomaton::new(vec!["apple", "maple"]);
-
-        // Explicitly given this type to assert that the thing returned
-        // from the function is our original type.
-        let pat: &str = aut.pattern(0);
-        assert_eq!(pat, "apple");
-
-        // Also check the return type of the `patterns` function.
-        let pats: &[&str] = aut.patterns();
-        assert_eq!(pats, &["apple", "maple"]);
-    }
-
-    // Quickcheck time.
-
-    // This generates very small ascii strings, which makes them more likely
-    // to interact in interesting ways with larger haystack strings.
-    #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
-    pub struct SmallAscii(String);
-
-    impl Arbitrary for SmallAscii {
-        fn arbitrary<G: Gen>(g: &mut G) -> SmallAscii {
-            use std::char::from_u32;
-            SmallAscii((0..2)
-                       .map(|_| from_u32(g.gen_range(97, 123)).unwrap())
-                       .collect())
-        }
-
-        fn shrink(&self) -> Box<Iterator<Item=SmallAscii>> {
-            Box::new(self.0.shrink().map(SmallAscii))
-        }
-    }
-
-    impl From<SmallAscii> for String {
-        fn from(s: SmallAscii) -> String { s.0 }
-    }
-
-    impl AsRef<[u8]> for SmallAscii {
-        fn as_ref(&self) -> &[u8] { self.0.as_ref() }
-    }
-
-    // This is the same arbitrary impl as `String`, except it has a bias toward
-    // ASCII characters.
-    #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
-    pub struct BiasAscii(String);
-
-    impl Arbitrary for BiasAscii {
-        fn arbitrary<G: Gen>(g: &mut G) -> BiasAscii {
-            use std::char::from_u32;
-            let size = { let s = g.size(); g.gen_range(0, s) };
-            let mut s = String::with_capacity(size);
-            for _ in 0..size {
-                if g.gen_weighted_bool(3) {
-                    s.push(char::arbitrary(g));
-                } else {
-                    for _ in 0..5 {
-                        s.push(from_u32(g.gen_range(97, 123)).unwrap());
-                    }
-                }
-            }
-            BiasAscii(s)
-        }
-
-        fn shrink(&self) -> Box<Iterator<Item=BiasAscii>> {
-            Box::new(self.0.shrink().map(BiasAscii))
-        }
-    }
-
-    fn naive_find<S>(xs: &[S], haystack: &str) -> Vec<Match>
-            where S: Clone + Into<String> {
-        let needles: Vec<String> =
-            xs.to_vec().into_iter().map(Into::into).collect();
-        let mut matches = vec![];
-        for hi in 0..haystack.len() {
-            for (pati, needle) in needles.iter().enumerate() {
-                let needle = needle.as_bytes();
-                if needle.len() == 0 || needle.len() > haystack.len() - hi {
-                    continue;
-                }
-                if needle == &haystack.as_bytes()[hi..hi+needle.len()] {
-                    matches.push(Match {
-                        pati: pati,
-                        start: hi,
-                        end: hi + needle.len(),
-                    });
-                }
-            }
-        }
-        matches
-    }
-
-    #[test]
-    fn qc_ac_equals_naive() {
-        fn prop(needles: Vec<SmallAscii>, haystack: BiasAscii) -> bool {
-            let aut_matches = aut_findo(&needles, &haystack.0);
-            let naive_matches = naive_find(&needles, &haystack.0);
-            // Ordering isn't always the same. I don't think we care, so do
-            // an unordered comparison.
-            let aset: HashSet<Match> = aut_matches.iter().cloned().collect();
-            let nset: HashSet<Match> = naive_matches.iter().cloned().collect();
-            aset == nset
-        }
-        quickcheck(prop as fn(Vec<SmallAscii>, BiasAscii) -> bool);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/aho-corasick-0.6.2/src/main.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-extern crate memchr;
-
-use std::env;
-
-use lib::AcAutomaton;
-
-#[allow(dead_code)]
-mod lib;
-
-fn main() {
-    let aut = AcAutomaton::new(env::args().skip(1));
-    println!("{}", aut.dot().trim());
-}
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{"Cargo.toml":"79fbb792e6c1d05c44188c808ef7120c592e50291a706fe0f669b8ac9a2ad5e5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0dd882e53de11566d50f8e8e2d5a651bcf3fabee4987d70f306233cf39094ba7","README.md":"b2da2fd61c4f3abf45127d183b61eb2dabc1c97cd191854987aa0328549a663f","benches/benchmarks.rs":"f0469f65f901c3e92fa506c0deb277fd136a7f968cae7cc4f030c0c15e52322f","examples/make_tables.rs":"3c80f2a8cdb204168cc1b60f8904d544b2da067b9e6a7b40ade5fb4a994b4175","src/lib.rs":"a3ac363513ae99a9b0049c19c92bc46b57ac9a0ebfd3317b7b387c5fbaa16a8a","src/tables.rs":"378743892907cde87c1a92e6afee2df36ce590311e61381b2cc0404b3e018039","tests/tests.rs":"dc2c293bae576cc596bdfb6ef783dc1d24d3bf992bf532caaebe1738cb0608cc"},"package":"30e93c03064e7590d0466209155251b90c22e37fab1daf2771582598b5827557"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/Cargo.toml
+++ /dev/null
@@ -1,21 +0,0 @@
-[package]
-name = "base64"
-version = "0.5.2"
-authors = ["Alice Maz <alice@alicemaz.com>", "Marshall Pierce <marshall@mpierce.org>"]
-description = "encodes and decodes base64 as bytes or utf8"
-repository = "https://github.com/alicemaz/rust-base64"
-documentation = "https://github.com/alicemaz/rust-base64/blob/master/README.md"
-readme = "README.md"
-keywords = ["base64", "utf8", "encode", "decode"]
-categories = ["encoding"]
-license = "MIT"
-
-[dependencies]
-byteorder = "1.0.0"
-
-[dev-dependencies]
-rand = "=0.3.15"
-
-[profile.bench]
-# Uncomment when using `perf record`
-#debug = true
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/LICENSE-MIT
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Alice Maz
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/README.md
+++ /dev/null
@@ -1,112 +0,0 @@
-[base64](https://crates.io/crates/base64)
-===
-
-It's base64. What more could anyone want?
-
-Example
----
-
-In Cargo.toml: `base64 = "~0.5.0"`
-
-```rust
-extern crate base64;
-
-use base64::{encode, decode};
-
-fn main() {
-    let a = b"hello world";
-    let b = "aGVsbG8gd29ybGQ=";
-
-    assert_eq!(encode(a), b);
-    assert_eq!(a, &decode(b).unwrap()[..]);
-}
-```
-
-API
----
-
-base64 exposes six functions:
-
-```rust
-fn encode<T: ?Sized + AsRef<[u8]>>(&T) -> String;
-fn decode<T: ?Sized + AsRef<[u8]>>(&T) -> Result<Vec<u8>, DecodeError>;
-fn encode_config<T: ?Sized + AsRef<[u8]>>(&T, Config) -> String;
-fn encode_config_buf<T: ?Sized + AsRef<[u8]>>(&T, Config, &mut String);
-fn decode_config<T: ?Sized + AsRef<[u8]>>(&T, Config) -> Result<Vec<u8>, DecodeError>;
-fn decode_config_buf<T: ?Sized + AsRef<[u8]>>(&T, Config, &mut Vec<u8>) -> Result<(), DecodeError>;
-```
-
-`STANDARD`, `URL_SAFE`, `URL_SAFE_NO_PAD`, and `MIME` configuation structs are provided for convenience. `encode` and `decode` are convenience wrappers for the `_config` functions called with the `STANDARD` config, and they are themselves wrappers of the `_buf` functions that allocate on the user's behalf. Encode produces valid padding absent a config that states otherwise; decode produces the same output for valid or omitted padding in all cases, but errors on invalid (superfluous) padding. Whitespace in the input to decode is an error for all modes except `MIME`, which disregards it ("whitespace" according to POSIX-locale `isspace`, meaning \n \r \f \t \v and space).
-
-`Config` exposes a constructor to allow custom combinations of character set, output padding, input whitespace permissiveness, linewrapping, and line ending character(s). The vast majority of usecases should be covered by the four provided, however.
-
-Purpose
----
-
-I have a fondness for small dependency footprints, ecosystems where you can pick and choose what functionality you need, and no more. Unix philosophy sort of thing I guess, many tiny utilities interoperating across a common interface. One time making a Twitter bot, I ran into the need to correctly pluralize arbitrary words. I found on npm a module that did nothing but pluralize words. Nothing else, just a couple of functions. I'd like for this to be that "just a couple of functions."
-
-Developing
----
-
-Benchmarks are in `benches/`. Running them requires nightly rust, but `rustup` makes it easy:
-
-```
-rustup run nightly cargo bench
-```
-
-Decoding is aided by some pre-calculated tables, which are generated by:
-
-```
-cargo run --example make_tables > src/tables.rs.tmp && mv src/tables.rs.tmp src/tables.rs
-```
-
-Profiling
----
-
-On Linux, you can use [perf](https://perf.wiki.kernel.org/index.php/Main_Page) for profiling. First, enable debug symbols in Cargo.toml. Don't commit this change, though, since it's usually not what you want (and costs some performance):
-
-```
-[profile.release]
-debug = true
-```
-
-Then compile the benchmarks. (Just re-run them and ^C once the benchmarks start running; all that's needed is to recompile them.)
-
-Run the benchmark binary with `perf` (shown here filtering to one particular benchmark, which will make the results easier to read). `perf` is only available to the root user on most systems as it fiddles with event counters in your CPU, so use `sudo`. We need to run the actual benchmark binary, hence the path into `target`. You can see the actual full path with `rustup run nightly cargo bench -v`; it will print out the commands it runs. If you use the exact path that `bench` outputs, make sure you get the one that's for the benchmarks, not the tests. You may also want to `cargo clean` so you have only one `benchmarks-` binary (they tend to accumulate).
-
-```
-sudo perf record target/release/deps/benchmarks-* --bench decode_10mib_reuse
-```
-
-Then analyze the results, again with perf:
-
-```
-sudo perf annotate -l
-```
-
-You'll see a bunch of interleaved rust source and assembly like this. The section with `lib.rs:327` is telling us that 4.02% of samples saw the `movzbl` aka bit shift as the active instruction. However, this percentage is not as exact as it seems due to a phenomenon called *skid*. Basically, a consequence of how fancy modern CPUs are is that this sort of instruction profiling is inherently inaccurate, especially in branch-heavy code.
-
-```
- lib.rs:322    0.70 :     10698:       mov    %rdi,%rax
-    2.82 :        1069b:       shr    $0x38,%rax
-         :                  if morsel == decode_tables::INVALID_VALUE {
-         :                      bad_byte_index = input_index;
-         :                      break;
-         :                  };
-         :                  accum = (morsel as u64) << 58;
- lib.rs:327    4.02 :     1069f:       movzbl (%r9,%rax,1),%r15d
-         :              // fast loop of 8 bytes at a time
-         :              while input_index < length_of_full_chunks {
-         :                  let mut accum: u64;
-         :
-         :                  let input_chunk = BigEndian::read_u64(&input_bytes[input_index..(input_index + 8)]);
-         :                  morsel = decode_table[(input_chunk >> 56) as usize];
- lib.rs:322    3.68 :     106a4:       cmp    $0xff,%r15
-         :                  if morsel == decode_tables::INVALID_VALUE {
-    0.00 :        106ab:       je     1090e <base64::decode_config_buf::hbf68a45fefa299c1+0x46e>
-```
-
-License
----
-
-This project is dual-licensed under MIT and Apache 2.0.
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/benches/benchmarks.rs
+++ /dev/null
@@ -1,230 +0,0 @@
-#![feature(test)]
-
-extern crate base64;
-extern crate test;
-extern crate rand;
-
-use base64::{decode, decode_config_buf, encode, encode_config_buf, STANDARD};
-
-use test::Bencher;
-use rand::Rng;
-
-#[bench]
-fn encode_3b(b: &mut Bencher) {
-    do_encode_bench(b, 3)
-}
-
-#[bench]
-fn encode_3b_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 3)
-}
-
-#[bench]
-fn encode_50b(b: &mut Bencher) {
-    do_encode_bench(b, 50)
-}
-
-#[bench]
-fn encode_50b_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 50)
-}
-
-#[bench]
-fn encode_100b(b: &mut Bencher) {
-    do_encode_bench(b, 100)
-}
-
-#[bench]
-fn encode_100b_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 100)
-}
-
-#[bench]
-fn encode_500b(b: &mut Bencher) {
-    do_encode_bench(b, 500)
-}
-
-#[bench]
-fn encode_500b_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 500)
-}
-
-#[bench]
-fn encode_3kib(b: &mut Bencher) {
-    do_encode_bench(b, 3 * 1024)
-}
-
-#[bench]
-fn encode_3kib_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 3 * 1024)
-}
-
-#[bench]
-fn encode_3mib(b: &mut Bencher) {
-    do_encode_bench(b, 3 * 1024 * 1024)
-}
-
-#[bench]
-fn encode_3mib_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 3 * 1024 * 1024)
-}
-
-#[bench]
-fn encode_10mib(b: &mut Bencher) {
-    do_encode_bench(b, 10 * 1024 * 1024)
-}
-
-#[bench]
-fn encode_10mib_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 10 * 1024 * 1024)
-}
-
-#[bench]
-fn encode_30mib(b: &mut Bencher) {
-    do_encode_bench(b, 30 * 1024 * 1024)
-}
-
-#[bench]
-fn encode_30mib_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 30 * 1024 * 1024)
-}
-
-#[bench]
-fn decode_3b(b: &mut Bencher) {
-    do_decode_bench(b, 3)
-}
-
-#[bench]
-fn decode_3b_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 3)
-}
-
-#[bench]
-fn decode_50b(b: &mut Bencher) {
-    do_decode_bench(b, 50)
-}
-
-#[bench]
-fn decode_50b_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 50)
-}
-
-#[bench]
-fn decode_100b(b: &mut Bencher) {
-    do_decode_bench(b, 100)
-}
-
-#[bench]
-fn decode_100b_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 100)
-}
-
-#[bench]
-fn decode_500b(b: &mut Bencher) {
-    do_decode_bench(b, 500)
-}
-
-#[bench]
-fn decode_500b_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 500)
-}
-
-#[bench]
-fn decode_3kib(b: &mut Bencher) {
-    do_decode_bench(b, 3 * 1024)
-}
-
-#[bench]
-fn decode_3kib_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 3 * 1024)
-}
-
-#[bench]
-fn decode_3mib(b: &mut Bencher) {
-    do_decode_bench(b, 3 * 1024 * 1024)
-}
-
-#[bench]
-fn decode_3mib_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 3 * 1024 * 1024)
-}
-
-#[bench]
-fn decode_10mib(b: &mut Bencher) {
-    do_decode_bench(b, 10 * 1024 * 1024)
-}
-
-#[bench]
-fn decode_10mib_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 10 * 1024 * 1024)
-}
-
-#[bench]
-fn decode_30mib(b: &mut Bencher) {
-    do_decode_bench(b, 30 * 1024 * 1024)
-}
-
-#[bench]
-fn decode_30mib_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 30 * 1024 * 1024)
-}
-
-fn do_decode_bench(b: &mut Bencher, size: usize) {
-    let mut v: Vec<u8> = Vec::with_capacity(size * 3 / 4);
-    fill(&mut v);
-    let encoded = encode(&v);
-
-    b.bytes = encoded.len() as u64;
-    b.iter(|| {
-        let orig = decode(&encoded);
-        test::black_box(&orig);
-    });
-}
-
-fn do_decode_bench_reuse_buf(b: &mut Bencher, size: usize) {
-    let mut v: Vec<u8> = Vec::with_capacity(size * 3 / 4);
-    fill(&mut v);
-    let encoded = encode(&v);
-
-    let mut buf = Vec::new();
-    b.bytes = encoded.len() as u64;
-    b.iter(|| {
-        decode_config_buf(&encoded, STANDARD, &mut buf).unwrap();
-        test::black_box(&buf);
-        buf.clear();
-    });
-}
-
-fn do_encode_bench(b: &mut Bencher, size: usize) {
-    let mut v: Vec<u8> = Vec::with_capacity(size);
-    fill(&mut v);
-
-    b.bytes = v.len() as u64;
-    b.iter(|| {
-        let e = encode(&v);
-        test::black_box(&e);
-    });
-}
-
-fn do_encode_bench_reuse_buf(b: &mut Bencher, size: usize) {
-    let mut v: Vec<u8> = Vec::with_capacity(size);
-    fill(&mut v);
-
-    let mut buf = String::new();
-
-    b.bytes = v.len() as u64;
-    b.iter(|| {
-        let e = encode_config_buf(&v, STANDARD, &mut buf);
-        test::black_box(&e);
-        buf.clear();
-    });
-}
-
-fn fill(v: &mut Vec<u8>) {
-    let cap = v.capacity();
-    // weak randomness is plenty; we just want to not be completely friendly to the branch predictor
-    let mut r = rand::weak_rng();
-    while v.len() < cap {
-        v.push(r.gen::<u8>());
-    }
-}
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/examples/make_tables.rs
+++ /dev/null
@@ -1,73 +0,0 @@
-use std::collections::HashMap;
-use std::iter::Iterator;
-
-fn main() {
-    println!("pub const INVALID_VALUE: u8 = 255;");
-
-    // A-Z
-    let standard_alphabet: Vec<u8> = (0x41..0x5B)
-        // a-z
-        .chain(0x61..0x7B)
-        // 0-9
-        .chain(0x30..0x3A)
-        // +
-        .chain(0x2B..0x2C)
-        // /
-        .chain(0x2F..0x30)
-        .collect();
-    print_encode_table(&standard_alphabet, "STANDARD_ENCODE", 0);
-    print_decode_table(&standard_alphabet, "STANDARD_DECODE", 0);
-
-    // A-Z
-    let url_alphabet: Vec<u8> = (0x41..0x5B)
-        // a-z
-        .chain(0x61..0x7B)
-        // 0-9
-        .chain(0x30..0x3A)
-        // -
-        .chain(0x2D..0x2E)
-        // _s
-        .chain(0x5F..0x60)
-        .collect();
-    print_encode_table(&url_alphabet, "URL_SAFE_ENCODE", 0);
-    print_decode_table(&url_alphabet, "URL_SAFE_DECODE", 0);
-
-}
-
-fn print_encode_table(alphabet: &[u8], const_name: &str, indent_depth: usize) {
-    println!("{:width$}pub const {}: &'static [u8; 64] = &[", "", const_name, width=indent_depth);
-
-    for (i, b) in alphabet.iter().enumerate() {
-        println!("{:width$}{}, // input {} (0x{:X}) => '{}' (0x{:X})", "",
-                 b, i, i, String::from_utf8(vec!(*b as u8)).unwrap(), b, width=indent_depth + 4);
-    }
-
-    println!("{:width$}];", "", width=indent_depth);
-}
-
-fn print_decode_table(alphabet: &[u8], const_name: &str, indent_depth: usize) {
-    // map of alphabet bytes to 6-bit morsels
-    let mut input_to_morsel = HashMap::<u8, u8>::new();
-
-    // standard base64 alphabet bytes, in order
-    for (morsel, ascii_byte) in alphabet.iter().enumerate() {
-        // truncation cast is fine here
-        let _ = input_to_morsel.insert(*ascii_byte, morsel as u8);
-    }
-
-    println!("{:width$}pub const {}: &'static [u8; 256] = &[", "", const_name, width=indent_depth);
-    for ascii_byte in 0..256 {
-        let (value, comment) = match input_to_morsel.get(&(ascii_byte as u8)) {
-            None => ("INVALID_VALUE".to_string(),
-                    format!("input {} (0x{:X})", ascii_byte, ascii_byte)),
-            Some(v) => (format!("{}", *v),
-                        format!("input {} (0x{:X} char '{}') => {} (0x{:X})",
-                                ascii_byte,
-                                ascii_byte,
-                                String::from_utf8(vec!(ascii_byte as u8)).unwrap(), *v, *v))
-        };
-
-        println!("{:width$}{}, // {}", "", value, comment, width=indent_depth + 4);
-    }
-    println!("{:width$}];", "", width=indent_depth);
-}
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/src/lib.rs
+++ /dev/null
@@ -1,675 +0,0 @@
-extern crate byteorder;
-
-use std::{fmt, error, str};
-
-use byteorder::{BigEndian, ByteOrder};
-
-mod tables;
-
-/// Available encoding character sets
-#[derive(Clone, Copy, Debug)]
-pub enum CharacterSet {
-    /// The standard character set (uses `+` and `/`)
-    Standard,
-    /// The URL safe character set (uses `-` and `_`)
-    UrlSafe
-}
-
-#[derive(Clone, Copy, Debug)]
-pub enum LineEnding {
-    LF,
-    CRLF,
-}
-
-#[derive(Clone, Copy, Debug)]
-pub enum LineWrap {
-    NoWrap,
-    Wrap(usize, LineEnding)
-}
-
-/// Contains configuration parameters for base64 encoding
-#[derive(Clone, Copy, Debug)]
-pub struct Config {
-    /// Character set to use
-    char_set: CharacterSet,
-    /// True to pad output with `=` characters
-    pad: bool,
-    /// Remove whitespace before decoding, at the cost of an allocation
-    strip_whitespace: bool,
-    /// ADT signifying whether to linewrap output, and if so by how many characters and with what ending
-    line_wrap: LineWrap,
-}
-
-impl Config {
-    pub fn new(char_set: CharacterSet,
-               pad: bool,
-               strip_whitespace: bool,
-               input_line_wrap: LineWrap) -> Config {
-        let line_wrap = match input_line_wrap  {
-            LineWrap::Wrap(0, _) => LineWrap::NoWrap,
-            _ => input_line_wrap,
-        };
-
-        Config {
-            char_set: char_set,
-            pad: pad,
-            strip_whitespace: strip_whitespace,
-            line_wrap: line_wrap,
-        }
-    }
-}
-
-pub static STANDARD: Config = Config {
-    char_set: CharacterSet::Standard,
-    pad: true,
-    strip_whitespace: false,
-    line_wrap: LineWrap::NoWrap,
-};
-
-pub static MIME: Config = Config {
-    char_set: CharacterSet::Standard,
-    pad: true,
-    strip_whitespace: true,
-    line_wrap: LineWrap::Wrap(76, LineEnding::CRLF),
-};
-
-pub static URL_SAFE: Config = Config {
-    char_set: CharacterSet::UrlSafe,
-    pad: true,
-    strip_whitespace: false,
-    line_wrap: LineWrap::NoWrap,
-};
-
-pub static URL_SAFE_NO_PAD: Config = Config {
-    char_set: CharacterSet::UrlSafe,
-    pad: false,
-    strip_whitespace: false,
-    line_wrap: LineWrap::NoWrap,
-};
-
-
-#[derive(Debug, PartialEq, Eq)]
-pub enum DecodeError {
-    InvalidByte(usize, u8),
-    InvalidLength,
-}
-
-impl fmt::Display for DecodeError {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            DecodeError::InvalidByte(index, byte) =>
-                write!(f, "Invalid byte {}, offset {}.", byte, index),
-            DecodeError::InvalidLength =>
-                write!(f, "Encoded text cannot have a 6-bit remainder.")
-        }
-    }
-}
-
-impl error::Error for DecodeError {
-    fn description(&self) -> &str {
-        match *self {
-            DecodeError::InvalidByte(_, _) => "invalid byte",
-            DecodeError::InvalidLength => "invalid length"
-        }
-    }
-
-    fn cause(&self) -> Option<&error::Error> {
-        None
-    }
-}
-
-///Encode arbitrary octets as base64.
-///Returns a String.
-///Convenience for `encode_config(input, base64::STANDARD);`.
-///
-///# Example
-///
-///```rust
-///extern crate base64;
-///
-///fn main() {
-///    let b64 = base64::encode(b"hello world");
-///    println!("{}", b64);
-///}
-///```
-pub fn encode<T: ?Sized + AsRef<[u8]>>(input: &T) -> String {
-    encode_config(input, STANDARD)
-}
-
-///Decode from string reference as octets.
-///Returns a Result containing a Vec<u8>.
-///Convenience `decode_config(input, base64::STANDARD);`.
-///
-///# Example
-///
-///```rust
-///extern crate base64;
-///
-///fn main() {
-///    let bytes = base64::decode("aGVsbG8gd29ybGQ=").unwrap();
-///    println!("{:?}", bytes);
-///}
-///```
-pub fn decode<T: ?Sized + AsRef<[u8]>>(input: &T) -> Result<Vec<u8>, DecodeError> {
-    decode_config(input, STANDARD)
-}
-
-///Encode arbitrary octets as base64.
-///Returns a String.
-///
-///# Example
-///
-///```rust
-///extern crate base64;
-///
-///fn main() {
-///    let b64 = base64::encode_config(b"hello world~", base64::STANDARD);
-///    println!("{}", b64);
-///
-///    let b64_url = base64::encode_config(b"hello internet~", base64::URL_SAFE);
-///    println!("{}", b64_url);
-///}
-///```
-pub fn encode_config<T: ?Sized + AsRef<[u8]>>(input: &T, config: Config) -> String {
-    let mut buf = match encoded_size(input.as_ref().len(), config) {
-        Some(n) => String::with_capacity(n),
-        None => panic!("integer overflow when calculating buffer size")
-    };
-
-    encode_config_buf(input, config, &mut buf);
-
-    buf
-}
-
-/// calculate the base64 encoded string size, including padding
-fn encoded_size(bytes_len: usize, config: Config) -> Option<usize> {
-    let printing_output_chars = bytes_len
-        .checked_add(2)
-        .map(|x| x / 3)
-        .and_then(|x| x.checked_mul(4));
-
-    //TODO this is subtly wrong but in a not dangerous way
-    //pushing patch with identical to previous behavior, then fixing
-    let line_ending_output_chars = match config.line_wrap {
-        LineWrap::NoWrap => Some(0),
-        LineWrap::Wrap(n, LineEnding::CRLF) =>
-            printing_output_chars.map(|y| y / n).and_then(|y| y.checked_mul(2)),
-        LineWrap::Wrap(n, LineEnding::LF) =>
-            printing_output_chars.map(|y| y / n),
-    };
-
-    printing_output_chars.and_then(|x|
-        line_ending_output_chars.and_then(|y| x.checked_add(y))
-    )
-}
-
-///Encode arbitrary octets as base64.
-///Writes into the supplied buffer to avoid allocations.
-///
-///# Example
-///
-///```rust
-///extern crate base64;
-///
-///fn main() {
-///    let mut buf = String::new();
-///    base64::encode_config_buf(b"hello world~", base64::STANDARD, &mut buf);
-///    println!("{}", buf);
-///
-///    buf.clear();
-///    base64::encode_config_buf(b"hello internet~", base64::URL_SAFE, &mut buf);
-///    println!("{}", buf);
-///}
-///```
-pub fn encode_config_buf<T: ?Sized + AsRef<[u8]>>(input: &T, config: Config, buf: &mut String) {
-    let input_bytes = input.as_ref();
-    let ref charset = match config.char_set {
-        CharacterSet::Standard => tables::STANDARD_ENCODE,
-        CharacterSet::UrlSafe => tables::URL_SAFE_ENCODE,
-    };
-
-    // reserve to make sure the memory we'll be writing to with unsafe is allocated
-    let resv_size = match encoded_size(input_bytes.len(), config) {
-        Some(n) => n,
-        None => panic!("integer overflow when calculating buffer size"),
-    };
-    buf.reserve(resv_size);
-
-    let orig_buf_len = buf.len();
-    let mut fast_loop_output_buf_len = orig_buf_len;
-
-    let input_chunk_len = 6;
-
-    let last_fast_index = input_bytes.len().saturating_sub(8);
-
-    // we're only going to insert valid utf8
-    let mut raw = unsafe { buf.as_mut_vec() };
-    // start at the first free part of the output buf
-    let mut output_ptr = unsafe { raw.as_mut_ptr().offset(orig_buf_len as isize) };
-    let mut input_index: usize = 0;
-    if input_bytes.len() >= 8 {
-        while input_index <= last_fast_index {
-            let input_chunk = BigEndian::read_u64(&input_bytes[input_index..(input_index + 8)]);
-
-            // strip off 6 bits at a time for the first 6 bytes
-            unsafe {
-                std::ptr::write(output_ptr, charset[((input_chunk >> 58) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(1), charset[((input_chunk >> 52) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(2), charset[((input_chunk >> 46) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(3), charset[((input_chunk >> 40) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(4), charset[((input_chunk >> 34) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(5), charset[((input_chunk >> 28) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(6), charset[((input_chunk >> 22) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(7), charset[((input_chunk >> 16) & 0x3F) as usize]);
-                output_ptr = output_ptr.offset(8);
-            }
-
-            input_index += input_chunk_len;
-            fast_loop_output_buf_len += 8;
-        }
-    }
-
-    unsafe {
-        // expand len to include the bytes we just wrote
-        raw.set_len(fast_loop_output_buf_len);
-    }
-
-    // encode the 0 to 7 bytes left after the fast loop
-
-    let rem = input_bytes.len() % 3;
-    let start_of_rem = input_bytes.len() - rem;
-
-    // start at the first index not handled by fast loop, which may be 0.
-    let mut leftover_index = input_index;
-
-    while leftover_index < start_of_rem {
-        raw.push(charset[(input_bytes[leftover_index] >> 2) as usize]);
-        raw.push(charset[((input_bytes[leftover_index] << 4 | input_bytes[leftover_index + 1] >> 4) & 0x3f) as usize]);
-        raw.push(charset[((input_bytes[leftover_index + 1] << 2 | input_bytes[leftover_index + 2] >> 6) & 0x3f) as usize]);
-        raw.push(charset[(input_bytes[leftover_index + 2] & 0x3f) as usize]);
-
-        leftover_index += 3;
-    }
-
-    if rem == 2 {
-        raw.push(charset[(input_bytes[start_of_rem] >> 2) as usize]);
-        raw.push(charset[((input_bytes[start_of_rem] << 4 | input_bytes[start_of_rem + 1] >> 4) & 0x3f) as usize]);
-        raw.push(charset[(input_bytes[start_of_rem + 1] << 2 & 0x3f) as usize]);
-    } else if rem == 1 {
-        raw.push(charset[(input_bytes[start_of_rem] >> 2) as usize]);
-        raw.push(charset[(input_bytes[start_of_rem] << 4 & 0x3f) as usize]);
-    }
-
-    if config.pad {
-        for _ in 0..((3 - rem) % 3) {
-            raw.push(0x3d);
-        }
-    }
-
-    //TODO FIXME this does the wrong thing for nonempty buffers
-    if orig_buf_len == 0 {
-        if let LineWrap::Wrap(line_size, line_end) = config.line_wrap {
-            let len = raw.len();
-            let mut i = 0;
-            let mut j = 0;
-
-            while i < len {
-                if i > 0 && i % line_size == 0 {
-                    match line_end {
-                        LineEnding::LF => { raw.insert(j, b'\n'); j += 1; }
-                        LineEnding::CRLF => { raw.insert(j, b'\r'); raw.insert(j + 1, b'\n'); j += 2; }
-                    }
-                }
-
-                i += 1;
-                j += 1;
-            }
-        }
-    }
-}
-
-///Decode from string reference as octets.
-///Returns a Result containing a Vec<u8>.
-///
-///# Example
-///
-///```rust
-///extern crate base64;
-///
-///fn main() {
-///    let bytes = base64::decode_config("aGVsbG8gd29ybGR+Cg==", base64::STANDARD).unwrap();
-///    println!("{:?}", bytes);
-///
-///    let bytes_url = base64::decode_config("aGVsbG8gaW50ZXJuZXR-Cg==", base64::URL_SAFE).unwrap();
-///    println!("{:?}", bytes_url);
-///}
-///```
-pub fn decode_config<T: ?Sized + AsRef<[u8]>>(input: &T, config: Config) -> Result<Vec<u8>, DecodeError> {
-    let mut buffer = Vec::<u8>::with_capacity(input.as_ref().len() * 4 / 3);
-
-    decode_config_buf(input, config, &mut buffer).map(|_| buffer)
-}
-
-///Decode from string reference as octets.
-///Writes into the supplied buffer to avoid allocation.
-///Returns a Result containing an empty tuple, aka ().
-///
-///# Example
-///
-///```rust
-///extern crate base64;
-///
-///fn main() {
-///    let mut buffer = Vec::<u8>::new();
-///    base64::decode_config_buf("aGVsbG8gd29ybGR+Cg==", base64::STANDARD, &mut buffer).unwrap();
-///    println!("{:?}", buffer);
-///
-///    buffer.clear();
-///
-///    base64::decode_config_buf("aGVsbG8gaW50ZXJuZXR-Cg==", base64::URL_SAFE, &mut buffer).unwrap();
-///    println!("{:?}", buffer);
-///}
-///```
-pub fn decode_config_buf<T: ?Sized + AsRef<[u8]>>(input: &T,
-                                                  config: Config,
-                                                  buffer: &mut Vec<u8>)
-                                                  -> Result<(), DecodeError> {
-    let mut input_copy;
-    let input_bytes = if config.strip_whitespace {
-        input_copy = Vec::<u8>::with_capacity(input.as_ref().len());
-        input_copy.extend(input.as_ref().iter().filter(|b| !b" \n\t\r\x0b\x0c".contains(b)));
-
-        input_copy.as_ref()
-    } else {
-        input.as_ref()
-    };
-
-    let ref decode_table = match config.char_set {
-        CharacterSet::Standard => tables::STANDARD_DECODE,
-        CharacterSet::UrlSafe => tables::URL_SAFE_DECODE,
-    };
-
-    buffer.reserve(input_bytes.len() * 3 / 4);
-
-    // the fast loop only handles complete chunks of 8 input bytes without padding
-    let chunk_len = 8;
-    let decoded_chunk_len = 6;
-    let remainder_len = input_bytes.len() % chunk_len;
-    let trailing_bytes_to_skip = if remainder_len == 0 {
-        // if input is a multiple of the chunk size, ignore the last chunk as it may have padding
-        chunk_len
-    } else {
-        remainder_len
-    };
-
-    let length_of_full_chunks = input_bytes.len().saturating_sub(trailing_bytes_to_skip);
-
-    let starting_output_index = buffer.len();
-    // Resize to hold decoded output from fast loop. Need the extra two bytes because
-    // we write a full 8 bytes for the last 6-byte decoded chunk and then truncate off two
-    let new_size = starting_output_index
-        + length_of_full_chunks / chunk_len * decoded_chunk_len
-        + (chunk_len - decoded_chunk_len);
-    buffer.resize(new_size, 0);
-
-    let mut output_index = starting_output_index;
-
-    {
-        let buffer_slice = buffer.as_mut_slice();
-
-        let mut input_index = 0;
-        // initial value is never used; always set if fast loop breaks
-        let mut bad_byte_index: usize = 0;
-        // a non-invalid value means it's not an error if fast loop never runs
-        let mut morsel: u8 = 0;
-
-        // fast loop of 8 bytes at a time
-        while input_index < length_of_full_chunks {
-            let mut accum: u64;
-
-            let input_chunk = BigEndian::read_u64(&input_bytes[input_index..(input_index + 8)]);
-            morsel = decode_table[(input_chunk >> 56) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index;
-                break;
-            };
-            accum = (morsel as u64) << 58;
-
-            morsel = decode_table[(input_chunk >> 48 & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 1;
-                break;
-            };
-            accum |= (morsel as u64) << 52;
-
-            morsel = decode_table[(input_chunk >> 40 & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 2;
-                break;
-            };
-            accum |= (morsel as u64) << 46;
-
-            morsel = decode_table[(input_chunk >> 32 & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 3;
-                break;
-            };
-            accum |= (morsel as u64) << 40;
-
-            morsel = decode_table[(input_chunk >> 24 & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 4;
-                break;
-            };
-            accum |= (morsel as u64) << 34;
-
-            morsel = decode_table[(input_chunk >> 16 & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 5;
-                break;
-            };
-            accum |= (morsel as u64) << 28;
-
-            morsel = decode_table[(input_chunk >> 8 & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 6;
-                break;
-            };
-            accum |= (morsel as u64) << 22;
-
-            morsel = decode_table[(input_chunk & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 7;
-                break;
-            };
-            accum |= (morsel as u64) << 16;
-
-            BigEndian::write_u64(&mut buffer_slice[(output_index)..(output_index + 8)],
-                                 accum);
-
-            output_index += 6;
-            input_index += chunk_len;
-        };
-
-        if morsel == tables::INVALID_VALUE {
-            // we got here from a break
-            return Err(DecodeError::InvalidByte(bad_byte_index, input_bytes[bad_byte_index]));
-        }
-    }
-
-    // Truncate off the last two bytes from writing the last u64.
-    // Unconditional because we added on the extra 2 bytes in the resize before the loop,
-    // so it will never underflow.
-    let new_len = buffer.len() - (chunk_len - decoded_chunk_len);
-    buffer.truncate(new_len);
-
-    // handle leftovers (at most 8 bytes, decoded to 6).
-    // Use a u64 as a stack-resident 8 bytes buffer.
-    let mut leftover_bits: u64 = 0;
-    let mut morsels_in_leftover = 0;
-    let mut padding_bytes = 0;
-    let mut first_padding_index: usize = 0;
-    for (i, b) in input_bytes[length_of_full_chunks..].iter().enumerate() {
-        // '=' padding
-        if *b == 0x3D {
-            // There can be bad padding in a few ways:
-            // 1 - Padding with non-padding characters after it
-            // 2 - Padding after zero or one non-padding characters before it
-            //     in the current quad.
-            // 3 - More than two characters of padding. If 3 or 4 padding chars
-            //     are in the same quad, that implies it will be caught by #2.
-            //     If it spreads from one quad to another, it will be caught by
-            //     #2 in the second quad.
-
-            if i % 4 < 2 {
-                // Check for case #2.
-                // TODO InvalidPadding error
-                return Err(DecodeError::InvalidByte(length_of_full_chunks + i, *b));
-            };
-
-            if padding_bytes == 0 {
-                first_padding_index = i;
-            };
-
-            padding_bytes += 1;
-            continue;
-        };
-
-        // Check for case #1.
-        // To make '=' handling consistent with the main loop, don't allow
-        // non-suffix '=' in trailing chunk either. Report error as first
-        // erroneous padding.
-        if padding_bytes > 0 {
-            return Err(DecodeError::InvalidByte(
-                length_of_full_chunks + first_padding_index, 0x3D));
-        };
-
-        // can use up to 8 * 6 = 48 bits of the u64, if last chunk has no padding.
-        // To minimize shifts, pack the leftovers from left to right.
-        let shift = 64 - (morsels_in_leftover + 1) * 6;
-        // tables are all 256 elements, cannot overflow from a u8 index
-        let morsel = decode_table[*b as usize];
-        if morsel == tables::INVALID_VALUE {
-            return Err(DecodeError::InvalidByte(length_of_full_chunks + i, *b));
-        };
-
-        leftover_bits |= (morsel as u64) << shift;
-        morsels_in_leftover += 1;
-    };
-
-    let leftover_bits_ready_to_append = match morsels_in_leftover {
-        0 => 0,
-        1 => return Err(DecodeError::InvalidLength),
-        2 => 8,
-        3 => 16,
-        4 => 24,
-        5 => return Err(DecodeError::InvalidLength),
-        6 => 32,
-        7 => 40,
-        8 => 48,
-        _ => panic!("Impossible: must only have 0 to 4 input bytes in last quad")
-    };
-
-    let mut leftover_bits_appended_to_buf = 0;
-    while leftover_bits_appended_to_buf < leftover_bits_ready_to_append {
-        // `as` simply truncates the higher bits, which is what we want here
-        let selected_bits = (leftover_bits >> (56 - leftover_bits_appended_to_buf)) as u8;
-        buffer.push(selected_bits);
-
-        leftover_bits_appended_to_buf += 8;
-    };
-
-    Ok(())
-}
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-
-    #[test]
-    fn encoded_size_correct() {
-        assert_eq!(Some(0), encoded_size(0, STANDARD));
-
-        assert_eq!(Some(4), encoded_size(1, STANDARD));
-        assert_eq!(Some(4), encoded_size(2, STANDARD));
-        assert_eq!(Some(4), encoded_size(3, STANDARD));
-
-        assert_eq!(Some(8), encoded_size(4, STANDARD));
-        assert_eq!(Some(8), encoded_size(5, STANDARD));
-        assert_eq!(Some(8), encoded_size(6, STANDARD));
-
-        assert_eq!(Some(12), encoded_size(7, STANDARD));
-        assert_eq!(Some(12), encoded_size(8, STANDARD));
-        assert_eq!(Some(12), encoded_size(9, STANDARD));
-
-        assert_eq!(Some(72), encoded_size(54, STANDARD));
-
-        assert_eq!(Some(76), encoded_size(55, STANDARD));
-        assert_eq!(Some(76), encoded_size(56, STANDARD));
-        assert_eq!(Some(76), encoded_size(57, STANDARD));
-
-        assert_eq!(Some(80), encoded_size(58, STANDARD));
-    }
-
-    #[test]
-    fn encoded_size_correct_mime() {
-        assert_eq!(Some(0), encoded_size(0, MIME));
-
-        assert_eq!(Some(4), encoded_size(1, MIME));
-        assert_eq!(Some(4), encoded_size(2, MIME));
-        assert_eq!(Some(4), encoded_size(3, MIME));
-
-        assert_eq!(Some(8), encoded_size(4, MIME));
-        assert_eq!(Some(8), encoded_size(5, MIME));
-        assert_eq!(Some(8), encoded_size(6, MIME));
-
-        assert_eq!(Some(12), encoded_size(7, MIME));
-        assert_eq!(Some(12), encoded_size(8, MIME));
-        assert_eq!(Some(12), encoded_size(9, MIME));
-
-        assert_eq!(Some(72), encoded_size(54, MIME));
-
-        assert_eq!(Some(78), encoded_size(55, MIME));
-        assert_eq!(Some(78), encoded_size(56, MIME));
-        assert_eq!(Some(78), encoded_size(57, MIME));
-
-        assert_eq!(Some(82), encoded_size(58, MIME));
-    }
-
-    #[test]
-    fn encoded_size_correct_lf() {
-        let config = Config::new(
-            CharacterSet::Standard,
-            true,
-            false,
-            LineWrap::Wrap(76, LineEnding::LF)
-        );
-
-        assert_eq!(Some(0), encoded_size(0, config));
-
-        assert_eq!(Some(4), encoded_size(1, config));
-        assert_eq!(Some(4), encoded_size(2, config));
-        assert_eq!(Some(4), encoded_size(3, config));
-
-        assert_eq!(Some(8), encoded_size(4, config));
-        assert_eq!(Some(8), encoded_size(5, config));
-        assert_eq!(Some(8), encoded_size(6, config));
-
-        assert_eq!(Some(12), encoded_size(7, config));
-        assert_eq!(Some(12), encoded_size(8, config));
-        assert_eq!(Some(12), encoded_size(9, config));
-
-        assert_eq!(Some(72), encoded_size(54, config));
-
-        assert_eq!(Some(77), encoded_size(55, config));
-        assert_eq!(Some(77), encoded_size(56, config));
-        assert_eq!(Some(77), encoded_size(57, config));
-
-        assert_eq!(Some(81), encoded_size(58, config));
-    }
-
-    #[test]
-    fn encoded_size_overflow() {
-        assert_eq!(None, encoded_size(std::usize::MAX, STANDARD));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/src/tables.rs
+++ /dev/null
@@ -1,649 +0,0 @@
-pub const INVALID_VALUE: u8 = 255;
-pub const STANDARD_ENCODE: &'static [u8; 64] = &[
-    65, // input 0 (0x0) => 'A' (0x41)
-    66, // input 1 (0x1) => 'B' (0x42)
-    67, // input 2 (0x2) => 'C' (0x43)
-    68, // input 3 (0x3) => 'D' (0x44)
-    69, // input 4 (0x4) => 'E' (0x45)
-    70, // input 5 (0x5) => 'F' (0x46)
-    71, // input 6 (0x6) => 'G' (0x47)
-    72, // input 7 (0x7) => 'H' (0x48)
-    73, // input 8 (0x8) => 'I' (0x49)
-    74, // input 9 (0x9) => 'J' (0x4A)
-    75, // input 10 (0xA) => 'K' (0x4B)
-    76, // input 11 (0xB) => 'L' (0x4C)
-    77, // input 12 (0xC) => 'M' (0x4D)
-    78, // input 13 (0xD) => 'N' (0x4E)
-    79, // input 14 (0xE) => 'O' (0x4F)
-    80, // input 15 (0xF) => 'P' (0x50)
-    81, // input 16 (0x10) => 'Q' (0x51)
-    82, // input 17 (0x11) => 'R' (0x52)
-    83, // input 18 (0x12) => 'S' (0x53)
-    84, // input 19 (0x13) => 'T' (0x54)
-    85, // input 20 (0x14) => 'U' (0x55)
-    86, // input 21 (0x15) => 'V' (0x56)
-    87, // input 22 (0x16) => 'W' (0x57)
-    88, // input 23 (0x17) => 'X' (0x58)
-    89, // input 24 (0x18) => 'Y' (0x59)
-    90, // input 25 (0x19) => 'Z' (0x5A)
-    97, // input 26 (0x1A) => 'a' (0x61)
-    98, // input 27 (0x1B) => 'b' (0x62)
-    99, // input 28 (0x1C) => 'c' (0x63)
-    100, // input 29 (0x1D) => 'd' (0x64)
-    101, // input 30 (0x1E) => 'e' (0x65)
-    102, // input 31 (0x1F) => 'f' (0x66)
-    103, // input 32 (0x20) => 'g' (0x67)
-    104, // input 33 (0x21) => 'h' (0x68)
-    105, // input 34 (0x22) => 'i' (0x69)
-    106, // input 35 (0x23) => 'j' (0x6A)
-    107, // input 36 (0x24) => 'k' (0x6B)
-    108, // input 37 (0x25) => 'l' (0x6C)
-    109, // input 38 (0x26) => 'm' (0x6D)
-    110, // input 39 (0x27) => 'n' (0x6E)
-    111, // input 40 (0x28) => 'o' (0x6F)
-    112, // input 41 (0x29) => 'p' (0x70)
-    113, // input 42 (0x2A) => 'q' (0x71)
-    114, // input 43 (0x2B) => 'r' (0x72)
-    115, // input 44 (0x2C) => 's' (0x73)
-    116, // input 45 (0x2D) => 't' (0x74)
-    117, // input 46 (0x2E) => 'u' (0x75)
-    118, // input 47 (0x2F) => 'v' (0x76)
-    119, // input 48 (0x30) => 'w' (0x77)
-    120, // input 49 (0x31) => 'x' (0x78)
-    121, // input 50 (0x32) => 'y' (0x79)
-    122, // input 51 (0x33) => 'z' (0x7A)
-    48, // input 52 (0x34) => '0' (0x30)
-    49, // input 53 (0x35) => '1' (0x31)
-    50, // input 54 (0x36) => '2' (0x32)
-    51, // input 55 (0x37) => '3' (0x33)
-    52, // input 56 (0x38) => '4' (0x34)
-    53, // input 57 (0x39) => '5' (0x35)
-    54, // input 58 (0x3A) => '6' (0x36)
-    55, // input 59 (0x3B) => '7' (0x37)
-    56, // input 60 (0x3C) => '8' (0x38)
-    57, // input 61 (0x3D) => '9' (0x39)
-    43, // input 62 (0x3E) => '+' (0x2B)
-    47, // input 63 (0x3F) => '/' (0x2F)
-];
-pub const STANDARD_DECODE: &'static [u8; 256] = &[
-    INVALID_VALUE, // input 0 (0x0)
-    INVALID_VALUE, // input 1 (0x1)
-    INVALID_VALUE, // input 2 (0x2)
-    INVALID_VALUE, // input 3 (0x3)
-    INVALID_VALUE, // input 4 (0x4)
-    INVALID_VALUE, // input 5 (0x5)
-    INVALID_VALUE, // input 6 (0x6)
-    INVALID_VALUE, // input 7 (0x7)
-    INVALID_VALUE, // input 8 (0x8)
-    INVALID_VALUE, // input 9 (0x9)
-    INVALID_VALUE, // input 10 (0xA)
-    INVALID_VALUE, // input 11 (0xB)
-    INVALID_VALUE, // input 12 (0xC)
-    INVALID_VALUE, // input 13 (0xD)
-    INVALID_VALUE, // input 14 (0xE)
-    INVALID_VALUE, // input 15 (0xF)
-    INVALID_VALUE, // input 16 (0x10)
-    INVALID_VALUE, // input 17 (0x11)
-    INVALID_VALUE, // input 18 (0x12)
-    INVALID_VALUE, // input 19 (0x13)
-    INVALID_VALUE, // input 20 (0x14)
-    INVALID_VALUE, // input 21 (0x15)
-    INVALID_VALUE, // input 22 (0x16)
-    INVALID_VALUE, // input 23 (0x17)
-    INVALID_VALUE, // input 24 (0x18)
-    INVALID_VALUE, // input 25 (0x19)
-    INVALID_VALUE, // input 26 (0x1A)
-    INVALID_VALUE, // input 27 (0x1B)
-    INVALID_VALUE, // input 28 (0x1C)
-    INVALID_VALUE, // input 29 (0x1D)
-    INVALID_VALUE, // input 30 (0x1E)
-    INVALID_VALUE, // input 31 (0x1F)
-    INVALID_VALUE, // input 32 (0x20)
-    INVALID_VALUE, // input 33 (0x21)
-    INVALID_VALUE, // input 34 (0x22)
-    INVALID_VALUE, // input 35 (0x23)
-    INVALID_VALUE, // input 36 (0x24)
-    INVALID_VALUE, // input 37 (0x25)
-    INVALID_VALUE, // input 38 (0x26)
-    INVALID_VALUE, // input 39 (0x27)
-    INVALID_VALUE, // input 40 (0x28)
-    INVALID_VALUE, // input 41 (0x29)
-    INVALID_VALUE, // input 42 (0x2A)
-    62, // input 43 (0x2B char '+') => 62 (0x3E)
-    INVALID_VALUE, // input 44 (0x2C)
-    INVALID_VALUE, // input 45 (0x2D)
-    INVALID_VALUE, // input 46 (0x2E)
-    63, // input 47 (0x2F char '/') => 63 (0x3F)
-    52, // input 48 (0x30 char '0') => 52 (0x34)
-    53, // input 49 (0x31 char '1') => 53 (0x35)
-    54, // input 50 (0x32 char '2') => 54 (0x36)
-    55, // input 51 (0x33 char '3') => 55 (0x37)
-    56, // input 52 (0x34 char '4') => 56 (0x38)
-    57, // input 53 (0x35 char '5') => 57 (0x39)
-    58, // input 54 (0x36 char '6') => 58 (0x3A)
-    59, // input 55 (0x37 char '7') => 59 (0x3B)
-    60, // input 56 (0x38 char '8') => 60 (0x3C)
-    61, // input 57 (0x39 char '9') => 61 (0x3D)
-    INVALID_VALUE, // input 58 (0x3A)
-    INVALID_VALUE, // input 59 (0x3B)
-    INVALID_VALUE, // input 60 (0x3C)
-    INVALID_VALUE, // input 61 (0x3D)
-    INVALID_VALUE, // input 62 (0x3E)
-    INVALID_VALUE, // input 63 (0x3F)
-    INVALID_VALUE, // input 64 (0x40)
-    0, // input 65 (0x41 char 'A') => 0 (0x0)
-    1, // input 66 (0x42 char 'B') => 1 (0x1)
-    2, // input 67 (0x43 char 'C') => 2 (0x2)
-    3, // input 68 (0x44 char 'D') => 3 (0x3)
-    4, // input 69 (0x45 char 'E') => 4 (0x4)
-    5, // input 70 (0x46 char 'F') => 5 (0x5)
-    6, // input 71 (0x47 char 'G') => 6 (0x6)
-    7, // input 72 (0x48 char 'H') => 7 (0x7)
-    8, // input 73 (0x49 char 'I') => 8 (0x8)
-    9, // input 74 (0x4A char 'J') => 9 (0x9)
-    10, // input 75 (0x4B char 'K') => 10 (0xA)
-    11, // input 76 (0x4C char 'L') => 11 (0xB)
-    12, // input 77 (0x4D char 'M') => 12 (0xC)
-    13, // input 78 (0x4E char 'N') => 13 (0xD)
-    14, // input 79 (0x4F char 'O') => 14 (0xE)
-    15, // input 80 (0x50 char 'P') => 15 (0xF)
-    16, // input 81 (0x51 char 'Q') => 16 (0x10)
-    17, // input 82 (0x52 char 'R') => 17 (0x11)
-    18, // input 83 (0x53 char 'S') => 18 (0x12)
-    19, // input 84 (0x54 char 'T') => 19 (0x13)
-    20, // input 85 (0x55 char 'U') => 20 (0x14)
-    21, // input 86 (0x56 char 'V') => 21 (0x15)
-    22, // input 87 (0x57 char 'W') => 22 (0x16)
-    23, // input 88 (0x58 char 'X') => 23 (0x17)
-    24, // input 89 (0x59 char 'Y') => 24 (0x18)
-    25, // input 90 (0x5A char 'Z') => 25 (0x19)
-    INVALID_VALUE, // input 91 (0x5B)
-    INVALID_VALUE, // input 92 (0x5C)
-    INVALID_VALUE, // input 93 (0x5D)
-    INVALID_VALUE, // input 94 (0x5E)
-    INVALID_VALUE, // input 95 (0x5F)
-    INVALID_VALUE, // input 96 (0x60)
-    26, // input 97 (0x61 char 'a') => 26 (0x1A)
-    27, // input 98 (0x62 char 'b') => 27 (0x1B)
-    28, // input 99 (0x63 char 'c') => 28 (0x1C)
-    29, // input 100 (0x64 char 'd') => 29 (0x1D)
-    30, // input 101 (0x65 char 'e') => 30 (0x1E)
-    31, // input 102 (0x66 char 'f') => 31 (0x1F)
-    32, // input 103 (0x67 char 'g') => 32 (0x20)
-    33, // input 104 (0x68 char 'h') => 33 (0x21)
-    34, // input 105 (0x69 char 'i') => 34 (0x22)
-    35, // input 106 (0x6A char 'j') => 35 (0x23)
-    36, // input 107 (0x6B char 'k') => 36 (0x24)
-    37, // input 108 (0x6C char 'l') => 37 (0x25)
-    38, // input 109 (0x6D char 'm') => 38 (0x26)
-    39, // input 110 (0x6E char 'n') => 39 (0x27)
-    40, // input 111 (0x6F char 'o') => 40 (0x28)
-    41, // input 112 (0x70 char 'p') => 41 (0x29)
-    42, // input 113 (0x71 char 'q') => 42 (0x2A)
-    43, // input 114 (0x72 char 'r') => 43 (0x2B)
-    44, // input 115 (0x73 char 's') => 44 (0x2C)
-    45, // input 116 (0x74 char 't') => 45 (0x2D)
-    46, // input 117 (0x75 char 'u') => 46 (0x2E)
-    47, // input 118 (0x76 char 'v') => 47 (0x2F)
-    48, // input 119 (0x77 char 'w') => 48 (0x30)
-    49, // input 120 (0x78 char 'x') => 49 (0x31)
-    50, // input 121 (0x79 char 'y') => 50 (0x32)
-    51, // input 122 (0x7A char 'z') => 51 (0x33)
-    INVALID_VALUE, // input 123 (0x7B)
-    INVALID_VALUE, // input 124 (0x7C)
-    INVALID_VALUE, // input 125 (0x7D)
-    INVALID_VALUE, // input 126 (0x7E)
-    INVALID_VALUE, // input 127 (0x7F)
-    INVALID_VALUE, // input 128 (0x80)
-    INVALID_VALUE, // input 129 (0x81)
-    INVALID_VALUE, // input 130 (0x82)
-    INVALID_VALUE, // input 131 (0x83)
-    INVALID_VALUE, // input 132 (0x84)
-    INVALID_VALUE, // input 133 (0x85)
-    INVALID_VALUE, // input 134 (0x86)
-    INVALID_VALUE, // input 135 (0x87)
-    INVALID_VALUE, // input 136 (0x88)
-    INVALID_VALUE, // input 137 (0x89)
-    INVALID_VALUE, // input 138 (0x8A)
-    INVALID_VALUE, // input 139 (0x8B)
-    INVALID_VALUE, // input 140 (0x8C)
-    INVALID_VALUE, // input 141 (0x8D)
-    INVALID_VALUE, // input 142 (0x8E)
-    INVALID_VALUE, // input 143 (0x8F)
-    INVALID_VALUE, // input 144 (0x90)
-    INVALID_VALUE, // input 145 (0x91)
-    INVALID_VALUE, // input 146 (0x92)
-    INVALID_VALUE, // input 147 (0x93)
-    INVALID_VALUE, // input 148 (0x94)
-    INVALID_VALUE, // input 149 (0x95)
-    INVALID_VALUE, // input 150 (0x96)
-    INVALID_VALUE, // input 151 (0x97)
-    INVALID_VALUE, // input 152 (0x98)
-    INVALID_VALUE, // input 153 (0x99)
-    INVALID_VALUE, // input 154 (0x9A)
-    INVALID_VALUE, // input 155 (0x9B)
-    INVALID_VALUE, // input 156 (0x9C)
-    INVALID_VALUE, // input 157 (0x9D)
-    INVALID_VALUE, // input 158 (0x9E)
-    INVALID_VALUE, // input 159 (0x9F)
-    INVALID_VALUE, // input 160 (0xA0)
-    INVALID_VALUE, // input 161 (0xA1)
-    INVALID_VALUE, // input 162 (0xA2)
-    INVALID_VALUE, // input 163 (0xA3)
-    INVALID_VALUE, // input 164 (0xA4)
-    INVALID_VALUE, // input 165 (0xA5)
-    INVALID_VALUE, // input 166 (0xA6)
-    INVALID_VALUE, // input 167 (0xA7)
-    INVALID_VALUE, // input 168 (0xA8)
-    INVALID_VALUE, // input 169 (0xA9)
-    INVALID_VALUE, // input 170 (0xAA)
-    INVALID_VALUE, // input 171 (0xAB)
-    INVALID_VALUE, // input 172 (0xAC)
-    INVALID_VALUE, // input 173 (0xAD)
-    INVALID_VALUE, // input 174 (0xAE)
-    INVALID_VALUE, // input 175 (0xAF)
-    INVALID_VALUE, // input 176 (0xB0)
-    INVALID_VALUE, // input 177 (0xB1)
-    INVALID_VALUE, // input 178 (0xB2)
-    INVALID_VALUE, // input 179 (0xB3)
-    INVALID_VALUE, // input 180 (0xB4)
-    INVALID_VALUE, // input 181 (0xB5)
-    INVALID_VALUE, // input 182 (0xB6)
-    INVALID_VALUE, // input 183 (0xB7)
-    INVALID_VALUE, // input 184 (0xB8)
-    INVALID_VALUE, // input 185 (0xB9)
-    INVALID_VALUE, // input 186 (0xBA)
-    INVALID_VALUE, // input 187 (0xBB)
-    INVALID_VALUE, // input 188 (0xBC)
-    INVALID_VALUE, // input 189 (0xBD)
-    INVALID_VALUE, // input 190 (0xBE)
-    INVALID_VALUE, // input 191 (0xBF)
-    INVALID_VALUE, // input 192 (0xC0)
-    INVALID_VALUE, // input 193 (0xC1)
-    INVALID_VALUE, // input 194 (0xC2)
-    INVALID_VALUE, // input 195 (0xC3)
-    INVALID_VALUE, // input 196 (0xC4)
-    INVALID_VALUE, // input 197 (0xC5)
-    INVALID_VALUE, // input 198 (0xC6)
-    INVALID_VALUE, // input 199 (0xC7)
-    INVALID_VALUE, // input 200 (0xC8)
-    INVALID_VALUE, // input 201 (0xC9)
-    INVALID_VALUE, // input 202 (0xCA)
-    INVALID_VALUE, // input 203 (0xCB)
-    INVALID_VALUE, // input 204 (0xCC)
-    INVALID_VALUE, // input 205 (0xCD)
-    INVALID_VALUE, // input 206 (0xCE)
-    INVALID_VALUE, // input 207 (0xCF)
-    INVALID_VALUE, // input 208 (0xD0)
-    INVALID_VALUE, // input 209 (0xD1)
-    INVALID_VALUE, // input 210 (0xD2)
-    INVALID_VALUE, // input 211 (0xD3)
-    INVALID_VALUE, // input 212 (0xD4)
-    INVALID_VALUE, // input 213 (0xD5)
-    INVALID_VALUE, // input 214 (0xD6)
-    INVALID_VALUE, // input 215 (0xD7)
-    INVALID_VALUE, // input 216 (0xD8)
-    INVALID_VALUE, // input 217 (0xD9)
-    INVALID_VALUE, // input 218 (0xDA)
-    INVALID_VALUE, // input 219 (0xDB)
-    INVALID_VALUE, // input 220 (0xDC)
-    INVALID_VALUE, // input 221 (0xDD)
-    INVALID_VALUE, // input 222 (0xDE)
-    INVALID_VALUE, // input 223 (0xDF)
-    INVALID_VALUE, // input 224 (0xE0)
-    INVALID_VALUE, // input 225 (0xE1)
-    INVALID_VALUE, // input 226 (0xE2)
-    INVALID_VALUE, // input 227 (0xE3)
-    INVALID_VALUE, // input 228 (0xE4)
-    INVALID_VALUE, // input 229 (0xE5)
-    INVALID_VALUE, // input 230 (0xE6)
-    INVALID_VALUE, // input 231 (0xE7)
-    INVALID_VALUE, // input 232 (0xE8)
-    INVALID_VALUE, // input 233 (0xE9)
-    INVALID_VALUE, // input 234 (0xEA)
-    INVALID_VALUE, // input 235 (0xEB)
-    INVALID_VALUE, // input 236 (0xEC)
-    INVALID_VALUE, // input 237 (0xED)
-    INVALID_VALUE, // input 238 (0xEE)
-    INVALID_VALUE, // input 239 (0xEF)
-    INVALID_VALUE, // input 240 (0xF0)
-    INVALID_VALUE, // input 241 (0xF1)
-    INVALID_VALUE, // input 242 (0xF2)
-    INVALID_VALUE, // input 243 (0xF3)
-    INVALID_VALUE, // input 244 (0xF4)
-    INVALID_VALUE, // input 245 (0xF5)
-    INVALID_VALUE, // input 246 (0xF6)
-    INVALID_VALUE, // input 247 (0xF7)
-    INVALID_VALUE, // input 248 (0xF8)
-    INVALID_VALUE, // input 249 (0xF9)
-    INVALID_VALUE, // input 250 (0xFA)
-    INVALID_VALUE, // input 251 (0xFB)
-    INVALID_VALUE, // input 252 (0xFC)
-    INVALID_VALUE, // input 253 (0xFD)
-    INVALID_VALUE, // input 254 (0xFE)
-    INVALID_VALUE, // input 255 (0xFF)
-];
-pub const URL_SAFE_ENCODE: &'static [u8; 64] = &[
-    65, // input 0 (0x0) => 'A' (0x41)
-    66, // input 1 (0x1) => 'B' (0x42)
-    67, // input 2 (0x2) => 'C' (0x43)
-    68, // input 3 (0x3) => 'D' (0x44)
-    69, // input 4 (0x4) => 'E' (0x45)
-    70, // input 5 (0x5) => 'F' (0x46)
-    71, // input 6 (0x6) => 'G' (0x47)
-    72, // input 7 (0x7) => 'H' (0x48)
-    73, // input 8 (0x8) => 'I' (0x49)
-    74, // input 9 (0x9) => 'J' (0x4A)
-    75, // input 10 (0xA) => 'K' (0x4B)
-    76, // input 11 (0xB) => 'L' (0x4C)
-    77, // input 12 (0xC) => 'M' (0x4D)
-    78, // input 13 (0xD) => 'N' (0x4E)
-    79, // input 14 (0xE) => 'O' (0x4F)
-    80, // input 15 (0xF) => 'P' (0x50)
-    81, // input 16 (0x10) => 'Q' (0x51)
-    82, // input 17 (0x11) => 'R' (0x52)
-    83, // input 18 (0x12) => 'S' (0x53)
-    84, // input 19 (0x13) => 'T' (0x54)
-    85, // input 20 (0x14) => 'U' (0x55)
-    86, // input 21 (0x15) => 'V' (0x56)
-    87, // input 22 (0x16) => 'W' (0x57)
-    88, // input 23 (0x17) => 'X' (0x58)
-    89, // input 24 (0x18) => 'Y' (0x59)
-    90, // input 25 (0x19) => 'Z' (0x5A)
-    97, // input 26 (0x1A) => 'a' (0x61)
-    98, // input 27 (0x1B) => 'b' (0x62)
-    99, // input 28 (0x1C) => 'c' (0x63)
-    100, // input 29 (0x1D) => 'd' (0x64)
-    101, // input 30 (0x1E) => 'e' (0x65)
-    102, // input 31 (0x1F) => 'f' (0x66)
-    103, // input 32 (0x20) => 'g' (0x67)
-    104, // input 33 (0x21) => 'h' (0x68)
-    105, // input 34 (0x22) => 'i' (0x69)
-    106, // input 35 (0x23) => 'j' (0x6A)
-    107, // input 36 (0x24) => 'k' (0x6B)
-    108, // input 37 (0x25) => 'l' (0x6C)
-    109, // input 38 (0x26) => 'm' (0x6D)
-    110, // input 39 (0x27) => 'n' (0x6E)
-    111, // input 40 (0x28) => 'o' (0x6F)
-    112, // input 41 (0x29) => 'p' (0x70)
-    113, // input 42 (0x2A) => 'q' (0x71)
-    114, // input 43 (0x2B) => 'r' (0x72)
-    115, // input 44 (0x2C) => 's' (0x73)
-    116, // input 45 (0x2D) => 't' (0x74)
-    117, // input 46 (0x2E) => 'u' (0x75)
-    118, // input 47 (0x2F) => 'v' (0x76)
-    119, // input 48 (0x30) => 'w' (0x77)
-    120, // input 49 (0x31) => 'x' (0x78)
-    121, // input 50 (0x32) => 'y' (0x79)
-    122, // input 51 (0x33) => 'z' (0x7A)
-    48, // input 52 (0x34) => '0' (0x30)
-    49, // input 53 (0x35) => '1' (0x31)
-    50, // input 54 (0x36) => '2' (0x32)
-    51, // input 55 (0x37) => '3' (0x33)
-    52, // input 56 (0x38) => '4' (0x34)
-    53, // input 57 (0x39) => '5' (0x35)
-    54, // input 58 (0x3A) => '6' (0x36)
-    55, // input 59 (0x3B) => '7' (0x37)
-    56, // input 60 (0x3C) => '8' (0x38)
-    57, // input 61 (0x3D) => '9' (0x39)
-    45, // input 62 (0x3E) => '-' (0x2D)
-    95, // input 63 (0x3F) => '_' (0x5F)
-];
-pub const URL_SAFE_DECODE: &'static [u8; 256] = &[
-    INVALID_VALUE, // input 0 (0x0)
-    INVALID_VALUE, // input 1 (0x1)
-    INVALID_VALUE, // input 2 (0x2)
-    INVALID_VALUE, // input 3 (0x3)
-    INVALID_VALUE, // input 4 (0x4)
-    INVALID_VALUE, // input 5 (0x5)
-    INVALID_VALUE, // input 6 (0x6)
-    INVALID_VALUE, // input 7 (0x7)
-    INVALID_VALUE, // input 8 (0x8)
-    INVALID_VALUE, // input 9 (0x9)
-    INVALID_VALUE, // input 10 (0xA)
-    INVALID_VALUE, // input 11 (0xB)
-    INVALID_VALUE, // input 12 (0xC)
-    INVALID_VALUE, // input 13 (0xD)
-    INVALID_VALUE, // input 14 (0xE)
-    INVALID_VALUE, // input 15 (0xF)
-    INVALID_VALUE, // input 16 (0x10)
-    INVALID_VALUE, // input 17 (0x11)
-    INVALID_VALUE, // input 18 (0x12)
-    INVALID_VALUE, // input 19 (0x13)
-    INVALID_VALUE, // input 20 (0x14)
-    INVALID_VALUE, // input 21 (0x15)
-    INVALID_VALUE, // input 22 (0x16)
-    INVALID_VALUE, // input 23 (0x17)
-    INVALID_VALUE, // input 24 (0x18)
-    INVALID_VALUE, // input 25 (0x19)
-    INVALID_VALUE, // input 26 (0x1A)
-    INVALID_VALUE, // input 27 (0x1B)
-    INVALID_VALUE, // input 28 (0x1C)
-    INVALID_VALUE, // input 29 (0x1D)
-    INVALID_VALUE, // input 30 (0x1E)
-    INVALID_VALUE, // input 31 (0x1F)
-    INVALID_VALUE, // input 32 (0x20)
-    INVALID_VALUE, // input 33 (0x21)
-    INVALID_VALUE, // input 34 (0x22)
-    INVALID_VALUE, // input 35 (0x23)
-    INVALID_VALUE, // input 36 (0x24)
-    INVALID_VALUE, // input 37 (0x25)
-    INVALID_VALUE, // input 38 (0x26)
-    INVALID_VALUE, // input 39 (0x27)
-    INVALID_VALUE, // input 40 (0x28)
-    INVALID_VALUE, // input 41 (0x29)
-    INVALID_VALUE, // input 42 (0x2A)
-    INVALID_VALUE, // input 43 (0x2B)
-    INVALID_VALUE, // input 44 (0x2C)
-    62, // input 45 (0x2D char '-') => 62 (0x3E)
-    INVALID_VALUE, // input 46 (0x2E)
-    INVALID_VALUE, // input 47 (0x2F)
-    52, // input 48 (0x30 char '0') => 52 (0x34)
-    53, // input 49 (0x31 char '1') => 53 (0x35)
-    54, // input 50 (0x32 char '2') => 54 (0x36)
-    55, // input 51 (0x33 char '3') => 55 (0x37)
-    56, // input 52 (0x34 char '4') => 56 (0x38)
-    57, // input 53 (0x35 char '5') => 57 (0x39)
-    58, // input 54 (0x36 char '6') => 58 (0x3A)
-    59, // input 55 (0x37 char '7') => 59 (0x3B)
-    60, // input 56 (0x38 char '8') => 60 (0x3C)
-    61, // input 57 (0x39 char '9') => 61 (0x3D)
-    INVALID_VALUE, // input 58 (0x3A)
-    INVALID_VALUE, // input 59 (0x3B)
-    INVALID_VALUE, // input 60 (0x3C)
-    INVALID_VALUE, // input 61 (0x3D)
-    INVALID_VALUE, // input 62 (0x3E)
-    INVALID_VALUE, // input 63 (0x3F)
-    INVALID_VALUE, // input 64 (0x40)
-    0, // input 65 (0x41 char 'A') => 0 (0x0)
-    1, // input 66 (0x42 char 'B') => 1 (0x1)
-    2, // input 67 (0x43 char 'C') => 2 (0x2)
-    3, // input 68 (0x44 char 'D') => 3 (0x3)
-    4, // input 69 (0x45 char 'E') => 4 (0x4)
-    5, // input 70 (0x46 char 'F') => 5 (0x5)
-    6, // input 71 (0x47 char 'G') => 6 (0x6)
-    7, // input 72 (0x48 char 'H') => 7 (0x7)
-    8, // input 73 (0x49 char 'I') => 8 (0x8)
-    9, // input 74 (0x4A char 'J') => 9 (0x9)
-    10, // input 75 (0x4B char 'K') => 10 (0xA)
-    11, // input 76 (0x4C char 'L') => 11 (0xB)
-    12, // input 77 (0x4D char 'M') => 12 (0xC)
-    13, // input 78 (0x4E char 'N') => 13 (0xD)
-    14, // input 79 (0x4F char 'O') => 14 (0xE)
-    15, // input 80 (0x50 char 'P') => 15 (0xF)
-    16, // input 81 (0x51 char 'Q') => 16 (0x10)
-    17, // input 82 (0x52 char 'R') => 17 (0x11)
-    18, // input 83 (0x53 char 'S') => 18 (0x12)
-    19, // input 84 (0x54 char 'T') => 19 (0x13)
-    20, // input 85 (0x55 char 'U') => 20 (0x14)
-    21, // input 86 (0x56 char 'V') => 21 (0x15)
-    22, // input 87 (0x57 char 'W') => 22 (0x16)
-    23, // input 88 (0x58 char 'X') => 23 (0x17)
-    24, // input 89 (0x59 char 'Y') => 24 (0x18)
-    25, // input 90 (0x5A char 'Z') => 25 (0x19)
-    INVALID_VALUE, // input 91 (0x5B)
-    INVALID_VALUE, // input 92 (0x5C)
-    INVALID_VALUE, // input 93 (0x5D)
-    INVALID_VALUE, // input 94 (0x5E)
-    63, // input 95 (0x5F char '_') => 63 (0x3F)
-    INVALID_VALUE, // input 96 (0x60)
-    26, // input 97 (0x61 char 'a') => 26 (0x1A)
-    27, // input 98 (0x62 char 'b') => 27 (0x1B)
-    28, // input 99 (0x63 char 'c') => 28 (0x1C)
-    29, // input 100 (0x64 char 'd') => 29 (0x1D)
-    30, // input 101 (0x65 char 'e') => 30 (0x1E)
-    31, // input 102 (0x66 char 'f') => 31 (0x1F)
-    32, // input 103 (0x67 char 'g') => 32 (0x20)
-    33, // input 104 (0x68 char 'h') => 33 (0x21)
-    34, // input 105 (0x69 char 'i') => 34 (0x22)
-    35, // input 106 (0x6A char 'j') => 35 (0x23)
-    36, // input 107 (0x6B char 'k') => 36 (0x24)
-    37, // input 108 (0x6C char 'l') => 37 (0x25)
-    38, // input 109 (0x6D char 'm') => 38 (0x26)
-    39, // input 110 (0x6E char 'n') => 39 (0x27)
-    40, // input 111 (0x6F char 'o') => 40 (0x28)
-    41, // input 112 (0x70 char 'p') => 41 (0x29)
-    42, // input 113 (0x71 char 'q') => 42 (0x2A)
-    43, // input 114 (0x72 char 'r') => 43 (0x2B)
-    44, // input 115 (0x73 char 's') => 44 (0x2C)
-    45, // input 116 (0x74 char 't') => 45 (0x2D)
-    46, // input 117 (0x75 char 'u') => 46 (0x2E)
-    47, // input 118 (0x76 char 'v') => 47 (0x2F)
-    48, // input 119 (0x77 char 'w') => 48 (0x30)
-    49, // input 120 (0x78 char 'x') => 49 (0x31)
-    50, // input 121 (0x79 char 'y') => 50 (0x32)
-    51, // input 122 (0x7A char 'z') => 51 (0x33)
-    INVALID_VALUE, // input 123 (0x7B)
-    INVALID_VALUE, // input 124 (0x7C)
-    INVALID_VALUE, // input 125 (0x7D)
-    INVALID_VALUE, // input 126 (0x7E)
-    INVALID_VALUE, // input 127 (0x7F)
-    INVALID_VALUE, // input 128 (0x80)
-    INVALID_VALUE, // input 129 (0x81)
-    INVALID_VALUE, // input 130 (0x82)
-    INVALID_VALUE, // input 131 (0x83)
-    INVALID_VALUE, // input 132 (0x84)
-    INVALID_VALUE, // input 133 (0x85)
-    INVALID_VALUE, // input 134 (0x86)
-    INVALID_VALUE, // input 135 (0x87)
-    INVALID_VALUE, // input 136 (0x88)
-    INVALID_VALUE, // input 137 (0x89)
-    INVALID_VALUE, // input 138 (0x8A)
-    INVALID_VALUE, // input 139 (0x8B)
-    INVALID_VALUE, // input 140 (0x8C)
-    INVALID_VALUE, // input 141 (0x8D)
-    INVALID_VALUE, // input 142 (0x8E)
-    INVALID_VALUE, // input 143 (0x8F)
-    INVALID_VALUE, // input 144 (0x90)
-    INVALID_VALUE, // input 145 (0x91)
-    INVALID_VALUE, // input 146 (0x92)
-    INVALID_VALUE, // input 147 (0x93)
-    INVALID_VALUE, // input 148 (0x94)
-    INVALID_VALUE, // input 149 (0x95)
-    INVALID_VALUE, // input 150 (0x96)
-    INVALID_VALUE, // input 151 (0x97)
-    INVALID_VALUE, // input 152 (0x98)
-    INVALID_VALUE, // input 153 (0x99)
-    INVALID_VALUE, // input 154 (0x9A)
-    INVALID_VALUE, // input 155 (0x9B)
-    INVALID_VALUE, // input 156 (0x9C)
-    INVALID_VALUE, // input 157 (0x9D)
-    INVALID_VALUE, // input 158 (0x9E)
-    INVALID_VALUE, // input 159 (0x9F)
-    INVALID_VALUE, // input 160 (0xA0)
-    INVALID_VALUE, // input 161 (0xA1)
-    INVALID_VALUE, // input 162 (0xA2)
-    INVALID_VALUE, // input 163 (0xA3)
-    INVALID_VALUE, // input 164 (0xA4)
-    INVALID_VALUE, // input 165 (0xA5)
-    INVALID_VALUE, // input 166 (0xA6)
-    INVALID_VALUE, // input 167 (0xA7)
-    INVALID_VALUE, // input 168 (0xA8)
-    INVALID_VALUE, // input 169 (0xA9)
-    INVALID_VALUE, // input 170 (0xAA)
-    INVALID_VALUE, // input 171 (0xAB)
-    INVALID_VALUE, // input 172 (0xAC)
-    INVALID_VALUE, // input 173 (0xAD)
-    INVALID_VALUE, // input 174 (0xAE)
-    INVALID_VALUE, // input 175 (0xAF)
-    INVALID_VALUE, // input 176 (0xB0)
-    INVALID_VALUE, // input 177 (0xB1)
-    INVALID_VALUE, // input 178 (0xB2)
-    INVALID_VALUE, // input 179 (0xB3)
-    INVALID_VALUE, // input 180 (0xB4)
-    INVALID_VALUE, // input 181 (0xB5)
-    INVALID_VALUE, // input 182 (0xB6)
-    INVALID_VALUE, // input 183 (0xB7)
-    INVALID_VALUE, // input 184 (0xB8)
-    INVALID_VALUE, // input 185 (0xB9)
-    INVALID_VALUE, // input 186 (0xBA)
-    INVALID_VALUE, // input 187 (0xBB)
-    INVALID_VALUE, // input 188 (0xBC)
-    INVALID_VALUE, // input 189 (0xBD)
-    INVALID_VALUE, // input 190 (0xBE)
-    INVALID_VALUE, // input 191 (0xBF)
-    INVALID_VALUE, // input 192 (0xC0)
-    INVALID_VALUE, // input 193 (0xC1)
-    INVALID_VALUE, // input 194 (0xC2)
-    INVALID_VALUE, // input 195 (0xC3)
-    INVALID_VALUE, // input 196 (0xC4)
-    INVALID_VALUE, // input 197 (0xC5)
-    INVALID_VALUE, // input 198 (0xC6)
-    INVALID_VALUE, // input 199 (0xC7)
-    INVALID_VALUE, // input 200 (0xC8)
-    INVALID_VALUE, // input 201 (0xC9)
-    INVALID_VALUE, // input 202 (0xCA)
-    INVALID_VALUE, // input 203 (0xCB)
-    INVALID_VALUE, // input 204 (0xCC)
-    INVALID_VALUE, // input 205 (0xCD)
-    INVALID_VALUE, // input 206 (0xCE)
-    INVALID_VALUE, // input 207 (0xCF)
-    INVALID_VALUE, // input 208 (0xD0)
-    INVALID_VALUE, // input 209 (0xD1)
-    INVALID_VALUE, // input 210 (0xD2)
-    INVALID_VALUE, // input 211 (0xD3)
-    INVALID_VALUE, // input 212 (0xD4)
-    INVALID_VALUE, // input 213 (0xD5)
-    INVALID_VALUE, // input 214 (0xD6)
-    INVALID_VALUE, // input 215 (0xD7)
-    INVALID_VALUE, // input 216 (0xD8)
-    INVALID_VALUE, // input 217 (0xD9)
-    INVALID_VALUE, // input 218 (0xDA)
-    INVALID_VALUE, // input 219 (0xDB)
-    INVALID_VALUE, // input 220 (0xDC)
-    INVALID_VALUE, // input 221 (0xDD)
-    INVALID_VALUE, // input 222 (0xDE)
-    INVALID_VALUE, // input 223 (0xDF)
-    INVALID_VALUE, // input 224 (0xE0)
-    INVALID_VALUE, // input 225 (0xE1)
-    INVALID_VALUE, // input 226 (0xE2)
-    INVALID_VALUE, // input 227 (0xE3)
-    INVALID_VALUE, // input 228 (0xE4)
-    INVALID_VALUE, // input 229 (0xE5)
-    INVALID_VALUE, // input 230 (0xE6)
-    INVALID_VALUE, // input 231 (0xE7)
-    INVALID_VALUE, // input 232 (0xE8)
-    INVALID_VALUE, // input 233 (0xE9)
-    INVALID_VALUE, // input 234 (0xEA)
-    INVALID_VALUE, // input 235 (0xEB)
-    INVALID_VALUE, // input 236 (0xEC)
-    INVALID_VALUE, // input 237 (0xED)
-    INVALID_VALUE, // input 238 (0xEE)
-    INVALID_VALUE, // input 239 (0xEF)
-    INVALID_VALUE, // input 240 (0xF0)
-    INVALID_VALUE, // input 241 (0xF1)
-    INVALID_VALUE, // input 242 (0xF2)
-    INVALID_VALUE, // input 243 (0xF3)
-    INVALID_VALUE, // input 244 (0xF4)
-    INVALID_VALUE, // input 245 (0xF5)
-    INVALID_VALUE, // input 246 (0xF6)
-    INVALID_VALUE, // input 247 (0xF7)
-    INVALID_VALUE, // input 248 (0xF8)
-    INVALID_VALUE, // input 249 (0xF9)
-    INVALID_VALUE, // input 250 (0xFA)
-    INVALID_VALUE, // input 251 (0xFB)
-    INVALID_VALUE, // input 252 (0xFC)
-    INVALID_VALUE, // input 253 (0xFD)
-    INVALID_VALUE, // input 254 (0xFE)
-    INVALID_VALUE, // input 255 (0xFF)
-];
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/tests/tests.rs
+++ /dev/null
@@ -1,696 +0,0 @@
-extern crate base64;
-extern crate rand;
-
-use rand::Rng;
-
-use base64::*;
-
-fn compare_encode(expected: &str, target: &[u8]) {
-    assert_eq!(expected, encode(target));
-}
-
-fn compare_decode(expected: &str, target: &str) {
-    assert_eq!(expected, String::from_utf8(decode(target).unwrap()).unwrap());
-    assert_eq!(expected, String::from_utf8(decode(target.as_bytes()).unwrap()).unwrap());
-}
-
-fn compare_decode_mime(expected: &str, target: &str) {
-    assert_eq!(expected, String::from_utf8(decode_config(target, MIME).unwrap()).unwrap());
-}
-
-fn push_rand(buf: &mut Vec<u8>, len: usize) {
-    let mut r = rand::weak_rng();
-
-    for _ in 0..len {
-        buf.push(r.gen::<u8>());
-    }
-}
-
-// generate every possible byte string recursively and test encode/decode roundtrip
-fn roundtrip_append_recurse(byte_buf: &mut Vec<u8>, str_buf: &mut String, remaining_bytes: usize) {
-    let orig_length = byte_buf.len();
-    for b in 0..256 {
-        byte_buf.push(b as u8);
-
-        if remaining_bytes > 1 {
-            roundtrip_append_recurse(byte_buf, str_buf, remaining_bytes - 1)
-        } else {
-            encode_config_buf(&byte_buf, STANDARD, str_buf);
-            let roundtrip_bytes = decode_config(&str_buf, STANDARD).unwrap();
-            assert_eq!(*byte_buf, roundtrip_bytes);
-
-            str_buf.clear();
-
-        }
-
-        byte_buf.truncate(orig_length);
-    }
-}
-
-// generate every possible byte string recursively and test encode/decode roundtrip with
-// padding removed
-fn roundtrip_append_recurse_strip_padding(byte_buf: &mut Vec<u8>, str_buf: &mut String,
-                                          remaining_bytes: usize) {
-    let orig_length = byte_buf.len();
-    for b in 0..256 {
-        byte_buf.push(b as u8);
-
-        if remaining_bytes > 1 {
-            roundtrip_append_recurse_strip_padding(byte_buf, str_buf, remaining_bytes - 1)
-        } else {
-            encode_config_buf(&byte_buf, STANDARD, str_buf);
-            {
-                let trimmed = str_buf.trim_right_matches('=');
-                let roundtrip_bytes = decode_config(&trimmed, STANDARD).unwrap();
-                assert_eq!(*byte_buf, roundtrip_bytes);
-            }
-            str_buf.clear();
-        }
-
-        byte_buf.truncate(orig_length);
-    }
-}
-
-// generate random contents of the specified length and test encode/decode roundtrip
-fn roundtrip_random(byte_buf: &mut Vec<u8>, str_buf: &mut String, byte_len: usize,
-                    approx_values_per_byte: u8, max_rounds: u64) {
-    let num_rounds = calculate_number_of_rounds(byte_len, approx_values_per_byte, max_rounds);
-    let mut r = rand::weak_rng();
-
-    for _ in 0..num_rounds {
-        byte_buf.clear();
-        str_buf.clear();
-        while byte_buf.len() < byte_len {
-            byte_buf.push(r.gen::<u8>());
-        }
-
-        encode_config_buf(&byte_buf, STANDARD, str_buf);
-        let roundtrip_bytes = decode_config(&str_buf, STANDARD).unwrap();
-
-        assert_eq!(*byte_buf, roundtrip_bytes);
-    }
-}
-
-// generate random contents of the specified length and test encode/decode roundtrip
-fn roundtrip_random_strip_padding(byte_buf: &mut Vec<u8>, str_buf: &mut String, byte_len: usize,
-                    approx_values_per_byte: u8, max_rounds: u64) {
-    // let the short ones be short but don't let it get too crazy large
-    let num_rounds = calculate_number_of_rounds(byte_len, approx_values_per_byte, max_rounds);
-    let mut r = rand::weak_rng();
-
-    for _ in 0..num_rounds {
-        byte_buf.clear();
-        str_buf.clear();
-        while byte_buf.len() < byte_len {
-            byte_buf.push(r.gen::<u8>());
-        }
-
-        encode_config_buf(&byte_buf, STANDARD, str_buf);
-        let trimmed = str_buf.trim_right_matches('=');
-        let roundtrip_bytes = decode_config(&trimmed, STANDARD).unwrap();
-
-        assert_eq!(*byte_buf, roundtrip_bytes);
-    }
-}
-
-fn calculate_number_of_rounds(byte_len: usize, approx_values_per_byte: u8, max: u64) -> u64 {
-    // don't overflow
-    let mut prod = approx_values_per_byte as u64;
-
-    for _ in 0..byte_len {
-        if prod > max {
-            return max;
-        }
-
-        prod = prod.saturating_mul(prod);
-    }
-
-    return prod;
-}
-
-//-------
-//decode
-
-#[test]
-fn decode_rfc4648_0() {
-    compare_decode("", "");
-}
-
-#[test]
-fn decode_rfc4648_1() {
-    compare_decode("f", "Zg==");
-}
-#[test]
-fn decode_rfc4648_1_just_a_bit_of_padding() {
-    // allows less padding than required
-    compare_decode("f", "Zg=");
-}
-
-#[test]
-fn decode_rfc4648_1_no_padding() {
-    compare_decode("f", "Zg");
-}
-
-#[test]
-fn decode_rfc4648_2() {
-    compare_decode("fo", "Zm8=");
-}
-
-#[test]
-fn decode_rfc4648_2_no_padding() {
-    compare_decode("fo", "Zm8");
-}
-
-#[test]
-fn decode_rfc4648_3() {
-    compare_decode("foo", "Zm9v");
-}
-
-#[test]
-fn decode_rfc4648_4() {
-    compare_decode("foob", "Zm9vYg==");
-}
-
-#[test]
-fn decode_rfc4648_4_no_padding() {
-    compare_decode("foob", "Zm9vYg");
-}
-
-#[test]
-fn decode_rfc4648_5() {
-    compare_decode("fooba", "Zm9vYmE=");
-}
-
-#[test]
-fn decode_rfc4648_5_no_padding() {
-    compare_decode("fooba", "Zm9vYmE");
-}
-
-#[test]
-fn decode_rfc4648_6() {
-    compare_decode("foobar", "Zm9vYmFy");
-}
-
-//this is a MAY in the rfc: https://tools.ietf.org/html/rfc4648#section-3.3
-#[test]
-fn decode_pad_inside_fast_loop_chunk_error() {
-    // can't PartialEq Base64Error, so we do this the hard way
-    match decode("YWxpY2U=====").unwrap_err() {
-        DecodeError::InvalidByte(offset, byte) => {
-            // since the first 8 bytes are handled in the fast loop, the
-            // padding is an error. Could argue that the *next* padding
-            // byte is technically the first erroneous one, but reporting
-            // that accurately is more complex and probably nobody cares
-            assert_eq!(7, offset);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_extra_pad_after_fast_loop_chunk_error() {
-    match decode("YWxpY2UABB===").unwrap_err() {
-        DecodeError::InvalidByte(offset, byte) => {
-            // extraneous third padding byte
-            assert_eq!(12, offset);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    };
-}
-
-
-//same
-#[test]
-fn decode_absurd_pad_error() {
-    match decode("==Y=Wx===pY=2U=====").unwrap_err() {
-        DecodeError::InvalidByte(size, byte) => {
-            assert_eq!(0, size);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_starts_with_padding_single_quad_error() {
-    match decode("====").unwrap_err() {
-        DecodeError::InvalidByte(offset, byte) => {
-            // with no real input, first padding byte is bogus
-            assert_eq!(0, offset);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_extra_padding_in_trailing_quad_returns_error() {
-    match decode("zzz==").unwrap_err() {
-        DecodeError::InvalidByte(size, byte) => {
-            // first unneeded padding byte
-            assert_eq!(4, size);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_extra_padding_in_trailing_quad_2_returns_error() {
-    match decode("zz===").unwrap_err() {
-        DecodeError::InvalidByte(size, byte) => {
-            // first unneeded padding byte
-            assert_eq!(4, size);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-
-#[test]
-fn decode_start_second_quad_with_padding_returns_error() {
-    match decode("zzzz=").unwrap_err() {
-        DecodeError::InvalidByte(size, byte) => {
-            // first unneeded padding byte
-            assert_eq!(4, size);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_padding_in_last_quad_followed_by_non_padding_returns_error() {
-    match decode("zzzz==z").unwrap_err() {
-        DecodeError::InvalidByte(size, byte) => {
-            assert_eq!(4, size);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_too_short_with_padding_error() {
-    match decode("z==").unwrap_err() {
-        DecodeError::InvalidByte(size, byte) => {
-            // first unneeded padding byte
-            assert_eq!(1, size);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_too_short_without_padding_error() {
-    match decode("z").unwrap_err() {
-        DecodeError::InvalidLength => {}
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_too_short_second_quad_without_padding_error() {
-    match decode("zzzzX").unwrap_err() {
-        DecodeError::InvalidLength => {}
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_error_for_bogus_char_in_right_position() {
-    for length in 1..25 {
-        for error_position in 0_usize..length {
-            let prefix: String = std::iter::repeat("A").take(error_position).collect();
-            let suffix: String = std::iter::repeat("B").take(length - error_position - 1).collect();
-
-            let input = prefix + "%" + &suffix;
-            assert_eq!(length, input.len(),
-                "length {} error position {}", length, error_position);
-
-            match decode(&input).unwrap_err() {
-                DecodeError::InvalidByte(size, byte) => {
-                    assert_eq!(error_position, size,
-                        "length {} error position {}", length, error_position);
-                    assert_eq!(0x25, byte);
-                }
-                _ => assert!(false)
-            }
-        }
-    }
-}
-
-#[test]
-fn decode_into_nonempty_buffer_doesnt_clobber_existing_contents() {
-    let mut orig_data = Vec::new();
-    let mut encoded_data = String::new();
-    let mut decoded_with_prefix = Vec::new();
-    let mut decoded_without_prefix = Vec::new();
-    let mut prefix = Vec::new();
-    for encoded_length in 0_usize..26 {
-        if encoded_length % 4 == 1 {
-            // can't have a lone byte in a quad of input
-            continue;
-        };
-
-        let raw_data_byte_triples = encoded_length / 4;
-        // 4 base64 bytes -> 3 input bytes, 3 -> 2, 2 -> 1, 0 -> 0
-        let raw_data_byte_leftovers = (encoded_length % 4).saturating_sub(1);
-
-        // we'll borrow buf to make some data to encode
-        orig_data.clear();
-        push_rand(&mut orig_data, raw_data_byte_triples * 3 + raw_data_byte_leftovers);
-
-        encoded_data.clear();
-        encode_config_buf(&orig_data, STANDARD, &mut encoded_data);
-
-        assert_eq!(encoded_length, encoded_data.trim_right_matches('=').len());
-
-        for prefix_length in 1..26 {
-            decoded_with_prefix.clear();
-            decoded_without_prefix.clear();
-            prefix.clear();
-
-            // fill the buf with a prefix
-            push_rand(&mut prefix, prefix_length);
-            decoded_with_prefix.resize(prefix_length, 0);
-            decoded_with_prefix.copy_from_slice(&prefix);
-
-            // decode into the non-empty buf
-            decode_config_buf(&encoded_data, STANDARD, &mut decoded_with_prefix).unwrap();
-            // also decode into the empty buf
-            decode_config_buf(&encoded_data, STANDARD, &mut decoded_without_prefix).unwrap();
-
-            assert_eq!(prefix_length + decoded_without_prefix.len(), decoded_with_prefix.len());
-
-            // append plain decode onto prefix
-            prefix.append(&mut decoded_without_prefix);
-
-            assert_eq!(prefix, decoded_with_prefix);
-        }
-    }
-}
-
-#[test]
-fn roundtrip_random_no_fast_loop() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-
-    for input_len in 0..9 {
-        roundtrip_random(&mut byte_buf, &mut str_buf, input_len, 4, 10000);
-    }
-}
-
-#[test]
-fn roundtrip_random_with_fast_loop() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-
-    for input_len in 9..26 {
-        roundtrip_random(&mut byte_buf, &mut str_buf, input_len, 4, 100000);
-    }
-}
-
-#[test]
-fn roundtrip_random_no_fast_loop_no_padding() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-
-    for input_len in 0..9 {
-        roundtrip_random_strip_padding(&mut byte_buf, &mut str_buf, input_len, 4, 10000);
-    }
-}
-
-#[test]
-fn roundtrip_random_with_fast_loop_no_padding() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-
-    for input_len in 9..26 {
-        roundtrip_random_strip_padding(&mut byte_buf, &mut str_buf, input_len, 4, 100000);
-    }
-}
-
-#[test]
-fn roundtrip_all_1_byte() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-    roundtrip_append_recurse(&mut byte_buf, &mut str_buf, 1);
-}
-
-#[test]
-fn roundtrip_all_1_byte_no_padding() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-    roundtrip_append_recurse_strip_padding(&mut byte_buf, &mut str_buf, 1);
-}
-
-#[test]
-fn roundtrip_all_2_byte() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-    roundtrip_append_recurse(&mut byte_buf, &mut str_buf, 2);
-}
-
-#[test]
-fn roundtrip_all_2_byte_no_padding() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-    roundtrip_append_recurse_strip_padding(&mut byte_buf, &mut str_buf, 2);
-}
-
-#[test]
-fn roundtrip_all_3_byte() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-    roundtrip_append_recurse(&mut byte_buf, &mut str_buf, 3);
-}
-
-#[test]
-fn roundtrip_random_4_byte() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-
-    roundtrip_random(&mut byte_buf, &mut str_buf, 4, 48, 10000);
-}
-
-//TODO like, write a thing to test every ascii val lol
-//prolly just yankput the 64 array and a 256 one later
-//is there a way to like, not have to write a fn every time
-//"hi test harness this should panic 192 times" would be nice
-//oh well whatever this is better done by a fuzzer
-
-//strip yr whitespace kids
-#[test]
-#[should_panic]
-fn decode_reject_space() {
-    assert!(decode("YWx pY2U=").is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_reject_tab() {
-    assert!(decode("YWx\tpY2U=").is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_reject_ff() {
-    assert!(decode("YWx\x0cpY2U=").is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_reject_vtab() {
-    assert!(decode("YWx\x0bpY2U=").is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_reject_nl() {
-    assert!(decode("YWx\npY2U=").is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_reject_crnl() {
-    assert!(decode("YWx\r\npY2U=").is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_reject_null() {
-    assert!(decode("YWx\0pY2U=").is_ok());
-}
-
-#[test]
-fn decode_mime_allow_space() {
-    assert!(decode_config("YWx pY2U=", MIME).is_ok());
-}
-
-#[test]
-fn decode_mime_allow_tab() {
-    assert!(decode_config("YWx\tpY2U=", MIME).is_ok());
-}
-
-#[test]
-fn decode_mime_allow_ff() {
-    assert!(decode_config("YWx\x0cpY2U=", MIME).is_ok());
-}
-
-#[test]
-fn decode_mime_allow_vtab() {
-    assert!(decode_config("YWx\x0bpY2U=", MIME).is_ok());
-}
-
-#[test]
-fn decode_mime_allow_nl() {
-    assert!(decode_config("YWx\npY2U=", MIME).is_ok());
-}
-
-#[test]
-fn decode_mime_allow_crnl() {
-    assert!(decode_config("YWx\r\npY2U=", MIME).is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_mime_reject_null() {
-    assert!(decode_config("YWx\0pY2U=", MIME).is_ok());
-}
-
-#[test]
-fn decode_mime_absurd_whitespace() {
-    compare_decode_mime("how could you let this happen",
-        "\n aG93I\n\nG\x0bNvd\r\nWxkI HlvdSB \tsZXQgdGh\rpcyBo\x0cYXBwZW4 =   ");
-}
-
-//-------
-//encode
-
-#[test]
-fn encode_rfc4648_0() {
-    compare_encode("", b"");
-}
-
-#[test]
-fn encode_rfc4648_1() {
-    compare_encode("Zg==", b"f");
-}
-
-#[test]
-fn encode_rfc4648_2() {
-    compare_encode("Zm8=", b"fo");
-}
-
-#[test]
-fn encode_rfc4648_3() {
-    compare_encode("Zm9v", b"foo");
-}
-
-#[test]
-fn encode_rfc4648_4() {
-    compare_encode("Zm9vYg==", b"foob");
-}
-
-#[test]
-fn encode_rfc4648_5() {
-    compare_encode("Zm9vYmE=", b"fooba");
-}
-
-#[test]
-fn encode_rfc4648_6() {
-    compare_encode("Zm9vYmFy", b"foobar");
-}
-
-#[test]
-fn encode_all_ascii() {
-    let mut ascii = Vec::<u8>::with_capacity(128);
-
-    for i in 0..128 {
-        ascii.push(i);
-    }
-
-    compare_encode("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn8=", &ascii);
-}
-
-#[test]
-fn encode_all_bytes() {
-    let mut bytes = Vec::<u8>::with_capacity(256);
-
-    for i in 0..255 {
-        bytes.push(i);
-    }
-    bytes.push(255); //bug with "overflowing" ranges?
-
-    compare_encode("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==", &bytes);
-}
-
-#[test]
-fn encode_all_bytes_url() {
-    let mut bytes = Vec::<u8>::with_capacity(256);
-
-    for i in 0..255 {
-        bytes.push(i);
-    }
-    bytes.push(255); //bug with "overflowing" ranges?
-
-    assert_eq!("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0-P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn-AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq-wsbKztLW2t7i5uru8vb6_wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t_g4eLj5OXm5-jp6uvs7e7v8PHy8_T19vf4-fr7_P3-_w==", encode_config(&bytes, URL_SAFE));
-}
-
-#[test]
-fn encode_into_nonempty_buffer_doesnt_clobber_existing_contents() {
-    let mut orig_data = Vec::new();
-    let mut encoded_with_prefix = String::new();
-    let mut encoded_without_prefix = String::new();
-    let mut prefix = String::new();
-    for orig_data_length in 0_usize..26 {
-        // we'll borrow buf to make some data to encode
-        orig_data.clear();
-        push_rand(&mut orig_data, orig_data_length);
-
-        for prefix_length in 1..26 {
-            encoded_with_prefix.clear();
-            encoded_without_prefix.clear();
-            prefix.clear();
-
-            for _ in 0..prefix_length {
-                prefix.push('~');
-            }
-
-            encoded_with_prefix.push_str(&prefix);
-
-            // encode into the non-empty buf
-            encode_config_buf(&orig_data, STANDARD, &mut encoded_with_prefix);
-            // also encode into the empty buf
-            encode_config_buf(&orig_data, STANDARD, &mut encoded_without_prefix);
-
-            assert_eq!(prefix_length + encoded_without_prefix.len(), encoded_with_prefix.len());
-
-            // append plain decode onto prefix
-            prefix.push_str(&mut encoded_without_prefix);
-
-            assert_eq!(prefix, encoded_with_prefix);
-        }
-    }
-}
-
-
-#[test]
-fn because_we_can() {
-    compare_decode("alice", "YWxpY2U=");
-    compare_decode("alice", &encode(b"alice"));
-    compare_decode("alice", &encode(&decode(&encode(b"alice")).unwrap()));
-}
-
-
-#[test]
-fn encode_url_safe_without_padding() {
-    let encoded = encode_config(b"alice", URL_SAFE_NO_PAD);
-    assert_eq!(&encoded, "YWxpY2U");
-    assert_eq!(String::from_utf8(decode(&encoded).unwrap()).unwrap(), "alice");
-}
--- a/third_party/rust/bzip2-sys/.cargo-checksum.json
+++ b/third_party/rust/bzip2-sys/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"6cbb5d3024e3efa72fd131b6f7c7cc46c3d91f50b945235153d865dfc1b4e874","build.rs":"20e799fb7820cd52352f77bd5d92c0d78a71bcba984eda1ddb1f68e615d8d242","bzip2-1.0.6/CHANGES":"cf9ea36ed7161f90be08940164de30d5426c236dabab5f396ae6fbf19bdb2b7b","bzip2-1.0.6/LICENSE":"4919cfb14a73cd64fcef67b107613970cf1659a09aa675dba31314f373bc7204","bzip2-1.0.6/Makefile":"5e5818994b515c1c930cdcafa1c551b7f43789c2b98e3a66a55c67a911f14075","bzip2-1.0.6/Makefile-libbz2_so":"959b4743758c96b1dc2978d15304f16aca0f49263abd4c590245fa3f82779349","bzip2-1.0.6/README":"52ba29d974c085ac7f33603b30aea9d5aed09c6eef0e4a5f6f53747cba22b079","bzip2-1.0.6/README.COMPILATION.PROBLEMS":"1b98d5e0a695949072bad62a55638bb8baf3f7caa840dbecb2c3aab249e18606","bzip2-1.0.6/README.XML.STUFF":"bfee8553918aec485e93a2f1df29275332f662110619f1c47ac020c926adf5ec","bzip2-1.0.6/blocksort.c":"5a87cc2624b4c676fdb595a3caad22cfe4f667e347c7dcc22ad39c64bc243471","bzip2-1.0.6/bz-common.xsl":"cceeb48f5ddf2bcac9cd196f67413466e70c9f801e1c508aaa1de574cbe71cbc","bzip2-1.0.6/bz-fo.xsl":"a25683b9893709d92ab61fb91c3bc6b1892498d9f43fd0c22b3917a3789cdc2d","bzip2-1.0.6/bz-html.xsl":"d45f09d996c464af6dabd9e8cb8a45799637c8f8562c8d6cad283896771ce455","bzip2-1.0.6/bzdiff":"ca96220d7df823031c028dbb32183e6a8e9e05737eda10b97ec9c3e01724d6cf","bzip2-1.0.6/bzdiff.1":"32d1a7cd115430398e58537532584ef2ab76343c9f094dcd1253d9c4c0f705bf","bzip2-1.0.6/bzgrep":"2855f1850e1281747d70d1409084ff156cd42eb07872ffadab610a59e90df869","bzip2-1.0.6/bzgrep.1":"924aa4a7c7c1467400181e4c0ee1b527db142b6399a717171f2351b72b5899df","bzip2-1.0.6/bzip.css":"2af2624c4d0d861d4ebb915a3e4e5b1dcd87adf289d389d5eb2507d08f71acc2","bzip2-1.0.6/bzip2.1":"ffbfa089a0576074cbc78957151587e2bb6a8f00ebadd56763db954dc7c1ebf9","bzip2-1.0.6/bzip2.1.preformatted":"49014439a6c5741fadba0473680bd75545aea9d089fe62024b4ccaba261ea390","bzip2-1.0.6/bzip2.c":"87aff50026000cbab8d7e7314bab83a980fd481c96005d8650f3df1c748d9fcf","bzip2-1.0.6/bzip2.txt":"89a673a8ae1caca7aece10e4ef66feb735b5f00642f0126fa97525402d47fb21","bzip2-1.0.6/bzip2recover.c":"9a55818d0984b7a23934e6dc760f653076b25a1ae5adcc8038828a44883688b9","bzip2-1.0.6/bzlib.c":"2ff7ee75f54a48632ce7200555d6064397c134e13d1cece200131bbc8f81a94b","bzip2-1.0.6/bzlib.h":"b360bfe8e0769adaa8ee6ae26324e26c40ccbdb557677a6b8ad506214984d2e8","bzip2-1.0.6/bzlib_private.h":"0cdc41a109e5f003a691a3b541c7c75ea44b5da82f91605b197124a598a79741","bzip2-1.0.6/bzmore":"836536d4c7469788c730355d59f8ae8d16ba07cb0754174878d99ed90f04448d","bzip2-1.0.6/bzmore.1":"ccfcf3f995e11adae3035e287252091bb72d165da21e0c385a4965d17c9051c7","bzip2-1.0.6/compress.c":"eaa8b0d57e61aa259938e5023e0afa33bf88146a6797c38409d1c6e72ae8ccbf","bzip2-1.0.6/crctable.c":"12cde199e167a5d48a8a463d1234d6ec345f77df2b11dcd025fe137da6eb53da","bzip2-1.0.6/decompress.c":"e703faddf69686cb5664be628da2e3c8c443acc16e2a137a0d546d4ededbf72e","bzip2-1.0.6/dlltest.c":"1568b2dd44d3007dd52bfb1bdf9f31ffc90706d260ec5a3504bc47dc32a040a1","bzip2-1.0.6/dlltest.dsp":"5073bbf71a35876e8f82e34c66ccc578552713d0798576d944d9ec7ab61070c8","bzip2-1.0.6/entities.xml":"a6c4afd00b4eefd58f20283126ef2ad8409088d0a9ac1c21c0fdbecefab2cc61","bzip2-1.0.6/format.pl":"2d6b195aa9071819c91774d1645d9529cce8dcc7284bd3dba6d45f5eca772f6d","bzip2-1.0.6/huffman.c":"faa54732e6148d5c5832c5cd7c1986c1ba25b6917354c42e0cd6a7370ca25056","bzip2-1.0.6/libbz2.def":"7c72d18c550afbf464c92aeb3869eb559c9faba5c7828546d1ec8620e9d5c7a3","bzip2-1.0.6/libbz2.dsp":"e92bc39a2fc6a8c7e095971a55e5779d4c255b4484d259914614ab49bf09db8f","bzip2-1.0.6/makefile.msc":"aa4179750a47298dd61dd296937735afb04cff81957852eaf491819c20e1f406","bzip2-1.0.6/manual.html":"1095e3779cdc417f99b8a5098ce3ec3e3ebf90f4871c3b07b91c151fd62735f0","bzip2-1.0.6/manual.ps":"739359fef76687f7ac4c82b2c7faceda08f1a3eb8c87c12196a36343a65a1884","bzip2-1.0.6/manual.xml":"762d5a25470181cee670025ee6b11b6ee23bc50344301b9a422771051c52963b","bzip2-1.0.6/mk251.c":"844eb2e4acb4de272927bd5b9ee1ad802458cbacb85ad249723b79fa383be79f","bzip2-1.0.6/randtable.c":"46d27493aa8f64bed44495e3fa30233a2938056b2b274410bd67aaf40b8ef5f6","bzip2-1.0.6/sample1.bz2":"d4b442283e085497c528c0122c7ec64bf12aac422b3faff57b97de3378b7a7a4","bzip2-1.0.6/sample1.ref":"af423164ec87f495f7d450fee9bdd418c12114cd305de2384fd20b91ba7994c2","bzip2-1.0.6/sample2.bz2":"c74d44033766ea66171f51bd2ce6e3ad9ce4e0749e03ee4bee3074ab2a4b9c7f","bzip2-1.0.6/sample2.ref":"316ad6713f2c05413e0b9eac132840d092674e7de4138251d3552f98671fcf9a","bzip2-1.0.6/sample3.bz2":"fc60721da6329daa4bfe5ef3b32d2de0bebac626ce8522ae033dc3a9296c7779","bzip2-1.0.6/sample3.ref":"6be9c2bd214924b18db0d57b9a14d6f4eeb0b276cd3a980aed91521cca3199dd","bzip2-1.0.6/spewG.c":"b6be093348cdb8c396dc71c0cd853370778690c2ca99cb84e54285c496fe1779","bzip2-1.0.6/unzcrash.c":"a2d7d39bbe2c2ec2515aafa99ef54ea3844cd3e9acfac6ce2247cc58e7a19ac9","bzip2-1.0.6/words0":"cb3ad1756ad30df2b53e4abc0cc5fa19f120de5582bee32481460cb6991d4b24","bzip2-1.0.6/words1":"199303545d9a074b351c9d58fe41032a65840eb9638a8a1be9aea6b63ce55a19","bzip2-1.0.6/words2":"953e874cc77023c5a61c16d71a27e789209c56996c943fb55dcc8092ca39259b","bzip2-1.0.6/words3":"6c9b45d0f7a9d5a1aee52016b48bef8171be2cda23cf18144ef1d5d36eceb260","bzip2-1.0.6/xmlproc.sh":"bb4ce53b6a94f89e72f8b8fcdc48f1499e6fab2b3d59384c693942cf55a579b6","lib.rs":"7ec965dd2e93f091d93e6e5a1c9034757f84fc6c35c886ea9328ecd834c52b6b"},"package":"98ce3fff84d4e90011f464bbdf48e3428f04270439f703868fd489d2aaedfc30"}
\ No newline at end of file
+{"files":{"Cargo.toml":"71f39cfc470fdc48e94a93923ad7fab02edfeb48af1fab76c5acbf1267541b99","build.rs":"392e22af499f0a5f4ccb921039165c9c14fc507af44738d88054397bf5481d73","bzip2-1.0.6/CHANGES":"cf9ea36ed7161f90be08940164de30d5426c236dabab5f396ae6fbf19bdb2b7b","bzip2-1.0.6/LICENSE":"4919cfb14a73cd64fcef67b107613970cf1659a09aa675dba31314f373bc7204","bzip2-1.0.6/Makefile":"5e5818994b515c1c930cdcafa1c551b7f43789c2b98e3a66a55c67a911f14075","bzip2-1.0.6/Makefile-libbz2_so":"959b4743758c96b1dc2978d15304f16aca0f49263abd4c590245fa3f82779349","bzip2-1.0.6/README":"52ba29d974c085ac7f33603b30aea9d5aed09c6eef0e4a5f6f53747cba22b079","bzip2-1.0.6/README.COMPILATION.PROBLEMS":"1b98d5e0a695949072bad62a55638bb8baf3f7caa840dbecb2c3aab249e18606","bzip2-1.0.6/README.XML.STUFF":"bfee8553918aec485e93a2f1df29275332f662110619f1c47ac020c926adf5ec","bzip2-1.0.6/blocksort.c":"5a87cc2624b4c676fdb595a3caad22cfe4f667e347c7dcc22ad39c64bc243471","bzip2-1.0.6/bz-common.xsl":"cceeb48f5ddf2bcac9cd196f67413466e70c9f801e1c508aaa1de574cbe71cbc","bzip2-1.0.6/bz-fo.xsl":"a25683b9893709d92ab61fb91c3bc6b1892498d9f43fd0c22b3917a3789cdc2d","bzip2-1.0.6/bz-html.xsl":"d45f09d996c464af6dabd9e8cb8a45799637c8f8562c8d6cad283896771ce455","bzip2-1.0.6/bzdiff":"ca96220d7df823031c028dbb32183e6a8e9e05737eda10b97ec9c3e01724d6cf","bzip2-1.0.6/bzdiff.1":"32d1a7cd115430398e58537532584ef2ab76343c9f094dcd1253d9c4c0f705bf","bzip2-1.0.6/bzgrep":"2855f1850e1281747d70d1409084ff156cd42eb07872ffadab610a59e90df869","bzip2-1.0.6/bzgrep.1":"924aa4a7c7c1467400181e4c0ee1b527db142b6399a717171f2351b72b5899df","bzip2-1.0.6/bzip.css":"2af2624c4d0d861d4ebb915a3e4e5b1dcd87adf289d389d5eb2507d08f71acc2","bzip2-1.0.6/bzip2.1":"ffbfa089a0576074cbc78957151587e2bb6a8f00ebadd56763db954dc7c1ebf9","bzip2-1.0.6/bzip2.1.preformatted":"49014439a6c5741fadba0473680bd75545aea9d089fe62024b4ccaba261ea390","bzip2-1.0.6/bzip2.c":"87aff50026000cbab8d7e7314bab83a980fd481c96005d8650f3df1c748d9fcf","bzip2-1.0.6/bzip2.txt":"89a673a8ae1caca7aece10e4ef66feb735b5f00642f0126fa97525402d47fb21","bzip2-1.0.6/bzip2recover.c":"9a55818d0984b7a23934e6dc760f653076b25a1ae5adcc8038828a44883688b9","bzip2-1.0.6/bzlib.c":"2ff7ee75f54a48632ce7200555d6064397c134e13d1cece200131bbc8f81a94b","bzip2-1.0.6/bzlib.h":"b360bfe8e0769adaa8ee6ae26324e26c40ccbdb557677a6b8ad506214984d2e8","bzip2-1.0.6/bzlib_private.h":"0cdc41a109e5f003a691a3b541c7c75ea44b5da82f91605b197124a598a79741","bzip2-1.0.6/bzmore":"836536d4c7469788c730355d59f8ae8d16ba07cb0754174878d99ed90f04448d","bzip2-1.0.6/bzmore.1":"ccfcf3f995e11adae3035e287252091bb72d165da21e0c385a4965d17c9051c7","bzip2-1.0.6/compress.c":"eaa8b0d57e61aa259938e5023e0afa33bf88146a6797c38409d1c6e72ae8ccbf","bzip2-1.0.6/crctable.c":"12cde199e167a5d48a8a463d1234d6ec345f77df2b11dcd025fe137da6eb53da","bzip2-1.0.6/decompress.c":"e703faddf69686cb5664be628da2e3c8c443acc16e2a137a0d546d4ededbf72e","bzip2-1.0.6/dlltest.c":"1568b2dd44d3007dd52bfb1bdf9f31ffc90706d260ec5a3504bc47dc32a040a1","bzip2-1.0.6/dlltest.dsp":"5073bbf71a35876e8f82e34c66ccc578552713d0798576d944d9ec7ab61070c8","bzip2-1.0.6/entities.xml":"a6c4afd00b4eefd58f20283126ef2ad8409088d0a9ac1c21c0fdbecefab2cc61","bzip2-1.0.6/format.pl":"2d6b195aa9071819c91774d1645d9529cce8dcc7284bd3dba6d45f5eca772f6d","bzip2-1.0.6/huffman.c":"faa54732e6148d5c5832c5cd7c1986c1ba25b6917354c42e0cd6a7370ca25056","bzip2-1.0.6/libbz2.def":"7c72d18c550afbf464c92aeb3869eb559c9faba5c7828546d1ec8620e9d5c7a3","bzip2-1.0.6/libbz2.dsp":"e92bc39a2fc6a8c7e095971a55e5779d4c255b4484d259914614ab49bf09db8f","bzip2-1.0.6/makefile.msc":"aa4179750a47298dd61dd296937735afb04cff81957852eaf491819c20e1f406","bzip2-1.0.6/manual.html":"1095e3779cdc417f99b8a5098ce3ec3e3ebf90f4871c3b07b91c151fd62735f0","bzip2-1.0.6/manual.ps":"739359fef76687f7ac4c82b2c7faceda08f1a3eb8c87c12196a36343a65a1884","bzip2-1.0.6/manual.xml":"762d5a25470181cee670025ee6b11b6ee23bc50344301b9a422771051c52963b","bzip2-1.0.6/mk251.c":"844eb2e4acb4de272927bd5b9ee1ad802458cbacb85ad249723b79fa383be79f","bzip2-1.0.6/randtable.c":"46d27493aa8f64bed44495e3fa30233a2938056b2b274410bd67aaf40b8ef5f6","bzip2-1.0.6/sample1.bz2":"d4b442283e085497c528c0122c7ec64bf12aac422b3faff57b97de3378b7a7a4","bzip2-1.0.6/sample1.ref":"af423164ec87f495f7d450fee9bdd418c12114cd305de2384fd20b91ba7994c2","bzip2-1.0.6/sample2.bz2":"c74d44033766ea66171f51bd2ce6e3ad9ce4e0749e03ee4bee3074ab2a4b9c7f","bzip2-1.0.6/sample2.ref":"316ad6713f2c05413e0b9eac132840d092674e7de4138251d3552f98671fcf9a","bzip2-1.0.6/sample3.bz2":"fc60721da6329daa4bfe5ef3b32d2de0bebac626ce8522ae033dc3a9296c7779","bzip2-1.0.6/sample3.ref":"6be9c2bd214924b18db0d57b9a14d6f4eeb0b276cd3a980aed91521cca3199dd","bzip2-1.0.6/spewG.c":"b6be093348cdb8c396dc71c0cd853370778690c2ca99cb84e54285c496fe1779","bzip2-1.0.6/unzcrash.c":"a2d7d39bbe2c2ec2515aafa99ef54ea3844cd3e9acfac6ce2247cc58e7a19ac9","bzip2-1.0.6/words0":"cb3ad1756ad30df2b53e4abc0cc5fa19f120de5582bee32481460cb6991d4b24","bzip2-1.0.6/words1":"199303545d9a074b351c9d58fe41032a65840eb9638a8a1be9aea6b63ce55a19","bzip2-1.0.6/words2":"953e874cc77023c5a61c16d71a27e789209c56996c943fb55dcc8092ca39259b","bzip2-1.0.6/words3":"6c9b45d0f7a9d5a1aee52016b48bef8171be2cda23cf18144ef1d5d36eceb260","bzip2-1.0.6/xmlproc.sh":"bb4ce53b6a94f89e72f8b8fcdc48f1499e6fab2b3d59384c693942cf55a579b6","lib.rs":"5b774454c318f44eb447aeeac862320161c6a125a3ca574dd703052dfa0c3f72"},"package":"2c5162604199bbb17690ede847eaa6120a3f33d5ab4dcc8e7c25b16d849ae79b"}
\ No newline at end of file
--- a/third_party/rust/bzip2-sys/Cargo.toml
+++ b/third_party/rust/bzip2-sys/Cargo.toml
@@ -1,26 +1,32 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
 [package]
-
 name = "bzip2-sys"
-version = "0.1.5"
+version = "0.1.6"
 authors = ["Alex Crichton <alex@alexcrichton.com>"]
+build = "build.rs"
 links = "bzip2"
-build = "build.rs"
+description = "Bindings to libbzip2 for bzip2 compression and decompression exposed as\nReader/Writer streams.\n"
+homepage = "https://github.com/alexcrichton/bzip2-rs"
+documentation = "https://docs.rs/bzip2-sys"
+categories = ["external-ffi-bindings"]
 license = "MIT/Apache-2.0"
 repository = "https://github.com/alexcrichton/bzip2-rs"
-homepage = "https://github.com/alexcrichton/bzip2-rs"
-documentation = "https://docs.rs/bzip2-sys"
-description = """
-Bindings to libbzip2 for bzip2 compression and decompression exposed as
-Reader/Writer streams.
-"""
-categories = ["external-ffi-bindings"]
 
 [lib]
 name = "bzip2_sys"
 path = "lib.rs"
-
-[dependencies]
-libc = "0.2"
-
-[build-dependencies]
-gcc = "0.3"
+[dependencies.libc]
+version = "0.2"
+[build-dependencies.cc]
+version = "1.0"
--- a/third_party/rust/bzip2-sys/build.rs
+++ b/third_party/rust/bzip2-sys/build.rs
@@ -1,14 +1,15 @@
-extern crate gcc;
+extern crate cc;
 
 use std::env;
 
 fn main() {
-    let mut cfg = gcc::Config::new();
+    let mut cfg = cc::Build::new();
+    cfg.warnings(false);
 
     if env::var("TARGET").unwrap().contains("windows") {
         cfg.define("_WIN32", None);
         cfg.define("BZ_EXPORT", None);
     }
 
     cfg.include("bzip2-1.0.6")
        .define("BZ_NO_STDIO", None)
--- a/third_party/rust/bzip2-sys/lib.rs
+++ b/third_party/rust/bzip2-sys/lib.rs
@@ -43,17 +43,17 @@ pub struct bz_stream {
 }
 
 macro_rules! abi_compat {
     ($(pub fn $name:ident($($arg:ident: $t:ty),*) -> $ret:ty,)*) => {
         #[cfg(windows)]
         extern "system" {
             $(pub fn $name($($arg: $t),*) -> $ret;)*
         }
-        #[cfg(unix)]
+        #[cfg(any(unix, target_os = "redox"))]
         extern {
             $(pub fn $name($($arg: $t),*) -> $ret;)*
         }
     }
 }
 
 abi_compat! {
     pub fn BZ2_bzCompressInit(stream: *mut bz_stream,
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/.cargo-checksum.json
@@ -0,0 +1,1 @@
+{"files":{".travis.yml":"3ca887c3f17391bd915265fbb6015b403263fbb13b9dedc8ea9ab8aa5c5ef163","Cargo.toml":"abe25a5fc35c2fe24c2f93b00f9488886310a3b7a25975984cc7030e826bb2e5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"d73ba5602263665e2d3987db4378787f6aa1e449b699a2530cee478acc7586dc","appveyor.yml":"ab45bfdcf2596f357225a54e730c34d518a8f3ad56c2ed33af682cfd45bddc02","src/bin/gcc-shim.rs":"d6be9137cb48b86891e7b263adbf492e1193ffe682db9ba4a88eb1079b874b58","src/com.rs":"0cb06f5db0fb70d27db0e5917ca337de6e7032119e6aabfea1bad9c719f5f34b","src/lib.rs":"164a360f504c7614be1f51dd9c76ef84bf8195e94ea5f1a914a90c1a036db6b8","src/registry.rs":"3876ef9573e3bbc050aef41a684b9a510cc1a91b15ae874fe032cf4377b4d116","src/setup_config.rs":"1a3eeb11c6847c31f2a4685b62ab35c76f0b6d5a17f7ed99e9df164283a771f7","src/winapi.rs":"cb5e6cab3eb570b0f97c660ca448ccfb5024262c0c7b245c181daad91a79f211","src/windows_registry.rs":"6de548aa94215e449f0e58e9a3b1702939d7c2f7b63a9040901c948bf138201d","tests/cc_env.rs":"7402315eea7ffa23b29b393c1de8e236294ede9de562ff0a562704a157135341","tests/support/mod.rs":"092551f9f6e3a999fa0aa02f93314aac0bda2b09268f948c423df56a43575e0b","tests/test.rs":"b1164258714e13173f3861126e97bedf1e29aa24618993c4eb0edd57c431dcc7"},"package":"a9b13a57efd6b30ecd6598ebdb302cca617930b5470647570468a65d12ef9719"}
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/.travis.yml
@@ -0,0 +1,48 @@
+language: rust
+rust:
+  - stable
+  - beta
+  - nightly
+matrix:
+  include:
+    # Minimum version supported
+    - rust: 1.13.0
+      install:
+      script: cargo build
+
+sudo: false
+install:
+  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then OS=unknown-linux-gnu; else OS=apple-darwin; fi
+  - export TARGET=$ARCH-$OS
+  - if [ -z "$NO_ADD" ]; then rustup target add $TARGET; fi
+before_script:
+  - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
+script:
+  - cargo build --verbose
+  - cargo test --verbose
+  - cargo test --verbose --features parallel
+  - cargo test --manifest-path cc-test/Cargo.toml --target $TARGET
+  - cargo test --manifest-path cc-test/Cargo.toml --target $TARGET --features parallel
+  - cargo test --manifest-path cc-test/Cargo.toml --target $TARGET --release
+  - cargo doc
+  - cargo clean && cargo build
+  - rustdoc --test README.md -L target/debug -L target/debug/deps
+after_success:
+  - travis-cargo --only nightly doc-upload
+env:
+  global:
+    secure: "CBtqrudgE0PS8x3kTr44jKbC2D4nfnmdYVecooNm0qnER4B4TSvZpZSQoCgKK6k4BYQuOSyFTOwYx6M79w39ZMOgyCP9ytB+tyMWL0/+ZuUQL04yVg4M5vd3oJMkOaXbvG56ncgPyFrseY+FPDg+mXAzvJk/nily37YXjkQj2D0="
+
+  matrix:
+    - ARCH=x86_64 NO_ADD=1
+    - ARCH=i686
+notifications:
+  email:
+    on_success: never
+os:
+  - linux
+  - osx
+addons:
+  apt:
+    packages:
+      - g++-multilib
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/Cargo.toml
@@ -0,0 +1,37 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
+[package]
+name = "cc"
+version = "1.0.3"
+authors = ["Alex Crichton <alex@alexcrichton.com>"]
+description = "A build-time dependency for Cargo build scripts to assist in invoking the native\nC compiler to compile native C code into a static archive to be linked into Rust\ncode.\n"
+homepage = "https://github.com/alexcrichton/cc-rs"
+documentation = "https://docs.rs/cc"
+readme = "README.md"
+keywords = ["build-dependencies"]
+categories = ["development-tools"]
+license = "MIT/Apache-2.0"
+repository = "https://github.com/alexcrichton/cc-rs"
+[dependencies.rayon]
+version = "0.8"
+optional = true
+[dev-dependencies.tempdir]
+version = "0.3"
+
+[features]
+parallel = ["rayon"]
+[badges.travis-ci]
+repository = "alexcrichton/cc-rs"
+
+[badges.appveyor]
+repository = "alexcrichton/cc-rs"
rename from third_party/rust/base64-0.5.2/LICENSE-APACHE
rename to third_party/rust/cc/LICENSE-APACHE
rename from third_party/rust/gcc-0.3.42/LICENSE-MIT
rename to third_party/rust/cc/LICENSE-MIT
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/README.md
@@ -0,0 +1,166 @@
+# cc-rs
+
+A library to compile C/C++/assembly into a Rust library/application.
+
+[![Build Status](https://travis-ci.org/alexcrichton/cc-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/cc-rs)
+[![Build status](https://ci.appveyor.com/api/projects/status/onu270iw98h81nwv?svg=true)](https://ci.appveyor.com/project/alexcrichton/cc-rs)
+
+[Documentation](https://docs.rs/cc)
+
+A simple library meant to be used as a build dependency with Cargo packages in
+order to build a set of C/C++ files into a static archive. This crate calls out
+to the most relevant compiler for a platform, for example using `cl` on MSVC.
+
+> **Note**: this crate was recently renamed from the `gcc` crate, so if you're
+> looking for the `gcc` crate you're in the right spot!
+
+## Using cc-rs
+
+First, you'll want to both add a build script for your crate (`build.rs`) and
+also add this crate to your `Cargo.toml` via:
+
+```toml
+[build-dependencies]
+cc = "1.0"
+```
+
+Next up, you'll want to write a build script like so:
+
+```rust,no_run
+// build.rs
+
+extern crate cc;
+
+fn main() {
+    cc::Build::new()
+        .file("foo.c")
+        .file("bar.c")
+        .compile("foo");
+}
+```
+
+And that's it! Running `cargo build` should take care of the rest and your Rust
+application will now have the C files `foo.c` and `bar.c` compiled into a file
+named libfoo.a. You can call the functions in Rust by declaring functions in
+your Rust code like so:
+
+```
+extern {
+    fn foo_function();
+    fn bar_function();
+}
+
+pub fn call() {
+    unsafe {
+        foo_function();
+        bar_function();
+    }
+}
+
+fn main() {
+    // ...
+}
+```
+
+## External configuration via environment variables
+
+To control the programs and flags used for building, the builder can set a
+number of different environment variables.
+
+* `CFLAGS` - a series of space separated flags passed to compilers. Note that
+             individual flags cannot currently contain spaces, so doing
+             something like: "-L=foo\ bar" is not possible.
+* `CC` - the actual C compiler used. Note that this is used as an exact
+         executable name, so (for example) no extra flags can be passed inside
+         this variable, and the builder must ensure that there aren't any
+         trailing spaces. This compiler must understand the `-c` flag. For
+         certain `TARGET`s, it also is assumed to know about other flags (most
+         common is `-fPIC`).
+* `AR` - the `ar` (archiver) executable to use to build the static library.
+
+Each of these variables can also be supplied with certain prefixes and suffixes,
+in the following prioritized order:
+
+1. `<var>_<target>` - for example, `CC_x86_64-unknown-linux-gnu`
+2. `<var>_<target_with_underscores>` - for example, `CC_x86_64_unknown_linux_gnu`
+3. `<build-kind>_<var>` - for example, `HOST_CC` or `TARGET_CFLAGS`
+4. `<var>` - a plain `CC`, `AR` as above.
+
+If none of these variables exist, cc-rs uses built-in defaults
+
+In addition to the the above optional environment variables, `cc-rs` has some
+functions with hard requirements on some variables supplied by [cargo's
+build-script driver][cargo] that it has the `TARGET`, `OUT_DIR`, `OPT_LEVEL`,
+and `HOST` variables.
+
+[cargo]: http://doc.crates.io/build-script.html#inputs-to-the-build-script
+
+## Optional features
+
+### Parallel
+
+Currently cc-rs supports parallel compilation (think `make -jN`) but this
+feature is turned off by default. To enable cc-rs to compile C/C++ in parallel,
+you can change your dependency to:
+
+```toml
+[build-dependencies]
+cc = { version = "1.0", features = ["parallel"] }
+```
+
+By default cc-rs will limit parallelism to `$NUM_JOBS`, or if not present it
+will limit it to the number of cpus on the machine. If you are using cargo,
+use `-jN` option of `build`, `test` and `run` commands as `$NUM_JOBS`
+is supplied by cargo.
+
+## Compile-time Requirements
+
+To work properly this crate needs access to a C compiler when the build script
+is being run. This crate does not ship a C compiler with it. The compiler
+required varies per platform, but there are three broad categories:
+
+* Unix platforms require `cc` to be the C compiler. This can be found by
+  installing cc/clang on Linux distributions and Xcode on OSX, for example.
+* Windows platforms targeting MSVC (e.g. your target triple ends in `-msvc`)
+  require `cl.exe` to be available and in `PATH`. This is typically found in
+  standard Visual Studio installations and the `PATH` can be set up by running
+  the appropriate developer tools shell.
+* Windows platforms targeting MinGW (e.g. your target triple ends in `-gnu`)
+  require `cc` to be available in `PATH`. We recommend the
+  [MinGW-w64](http://mingw-w64.org) distribution, which is using the
+  [Win-builds](http://win-builds.org) installation system.
+  You may also acquire it via
+  [MSYS2](http://msys2.github.io), as explained [here][msys2-help].  Make sure
+  to install the appropriate architecture corresponding to your installation of
+  rustc. GCC from older [MinGW](http://www.mingw.org) project is compatible
+  only with 32-bit rust compiler.
+
+[msys2-help]: http://github.com/rust-lang/rust#building-on-windows
+
+## C++ support
+
+`cc-rs` supports C++ libraries compilation by using the `cpp` method on
+`Build`:
+
+```rust,no_run
+extern crate cc;
+
+fn main() {
+    cc::Build::new()
+        .cpp(true) // Switch to C++ library compilation.
+        .file("foo.cpp")
+        .compile("libfoo.a");
+}
+```
+
+When using C++ library compilation switch, the `CXX` and `CXXFLAGS` env
+variables are used instead of `CC` and `CFLAGS` and the C++ standard library is
+linked to the crate target.
+
+## License
+
+`cc-rs` is primarily distributed under the terms of both the MIT license and
+the Apache License (Version 2.0), with portions covered by various BSD-like
+licenses.
+
+See LICENSE-APACHE, and LICENSE-MIT for details.
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/appveyor.yml
@@ -0,0 +1,55 @@
+environment:
+
+  # At the time this was added AppVeyor was having troubles with checking
+  # revocation of SSL certificates of sites like static.rust-lang.org and what
+  # we think is crates.io. The libcurl HTTP client by default checks for
+  # revocation on Windows and according to a mailing list [1] this can be
+  # disabled.
+  #
+  # The `CARGO_HTTP_CHECK_REVOKE` env var here tells cargo to disable SSL
+  # revocation checking on Windows in libcurl. Note, though, that rustup, which
+  # we're using to download Rust here, also uses libcurl as the default backend.
+  # Unlike Cargo, however, rustup doesn't have a mechanism to disable revocation
+  # checking. To get rustup working we set `RUSTUP_USE_HYPER` which forces it to
+  # use the Hyper instead of libcurl backend. Both Hyper and libcurl use
+  # schannel on Windows but it appears that Hyper configures it slightly
+  # differently such that revocation checking isn't turned on by default.
+  #
+  # [1]: https://curl.haxx.se/mail/lib-2016-03/0202.html
+  RUSTUP_USE_HYPER: 1
+  CARGO_HTTP_CHECK_REVOKE: false
+
+  matrix:
+  - TARGET: x86_64-pc-windows-msvc
+    ARCH: amd64
+    VS: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
+  - TARGET: x86_64-pc-windows-msvc
+    ARCH: amd64
+    VS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
+  - TARGET: i686-pc-windows-msvc
+    ARCH: x86
+    VS: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
+  - TARGET: i686-pc-windows-msvc
+    ARCH: x86
+    VS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
+  - TARGET: x86_64-pc-windows-gnu
+    MSYS_BITS: 64
+  - TARGET: i686-pc-windows-gnu
+    MSYS_BITS: 32
+install:
+  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
+  - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
+  - if defined VS call "%VS%" %ARCH%
+  - set PATH=%PATH%;C:\Program Files (x86)\Rust\bin
+  - if defined MSYS_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS_BITS%\bin
+  - rustc -V
+  - cargo -V
+
+build: false
+
+test_script:
+  - cargo test --target %TARGET%
+  - cargo test --features parallel --target %TARGET%
+  - cargo test --manifest-path cc-test/Cargo.toml --target %TARGET%
+  - cargo test --manifest-path cc-test/Cargo.toml --features parallel --target %TARGET%
+  - cargo test --manifest-path cc-test/Cargo.toml --release --target %TARGET%
rename from third_party/rust/gcc-0.3.42/src/bin/gcc-shim.rs
rename to third_party/rust/cc/src/bin/gcc-shim.rs
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/src/com.rs
@@ -0,0 +1,125 @@
+// Copyright © 2017 winapi-rs developers
+// Licensed under the Apache License, Version 2.0
+// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
+// All files in the project carrying such notice may not be copied, modified, or distributed
+// except according to those terms.
+
+#![allow(unused)]
+
+use std::ffi::{OsStr, OsString};
+use std::mem::forget;
+use std::ops::Deref;
+use std::os::windows::ffi::{OsStrExt, OsStringExt};
+use std::ptr::null_mut;
+use std::slice::from_raw_parts;
+use winapi::Interface;
+use winapi::BSTR;
+use winapi::CoInitializeEx;
+use winapi::COINIT_MULTITHREADED;
+use winapi::{SysFreeString, SysStringLen};
+use winapi::IUnknown;
+use winapi::{S_OK, S_FALSE, HRESULT};
+
+pub fn initialize() -> Result<(), HRESULT> {
+    let err = unsafe { CoInitializeEx(null_mut(), COINIT_MULTITHREADED) };
+    if err != S_OK && err != S_FALSE {
+        // S_FALSE just means COM is already initialized
+        return Err(err);
+    }
+    Ok(())
+}
+
+pub struct ComPtr<T>(*mut T) where T: Interface;
+impl<T> ComPtr<T> where T: Interface {
+    /// Creates a `ComPtr` to wrap a raw pointer.
+    /// It takes ownership over the pointer which means it does __not__ call `AddRef`.
+    /// `T` __must__ be a COM interface that inherits from `IUnknown`.
+    pub unsafe fn from_raw(ptr: *mut T) -> ComPtr<T> {
+        assert!(!ptr.is_null());
+        ComPtr(ptr)
+    }
+    /// Casts up the inheritance chain
+    pub fn up<U>(self) -> ComPtr<U> where T: Deref<Target=U>, U: Interface {
+        ComPtr(self.into_raw() as *mut U)
+    }
+    /// Extracts the raw pointer.
+    /// You are now responsible for releasing it yourself.
+    pub fn into_raw(self) -> *mut T {
+        let p = self.0;
+        forget(self);
+        p
+    }
+    /// For internal use only.
+    fn as_unknown(&self) -> &IUnknown {
+        unsafe { &*(self.0 as *mut IUnknown) }
+    }
+    /// Performs QueryInterface fun.
+    pub fn cast<U>(&self) -> Result<ComPtr<U>, i32> where U: Interface {
+        let mut obj = null_mut();
+        let err = unsafe { self.as_unknown().QueryInterface(&U::uuidof(), &mut obj) };
+        if err < 0 { return Err(err); }
+        Ok(unsafe { ComPtr::from_raw(obj as *mut U) })
+    }
+}
+impl<T> Deref for ComPtr<T> where T: Interface {
+    type Target = T;
+    fn deref(&self) -> &T {
+        unsafe { &*self.0 }
+    }
+}
+impl<T> Clone for ComPtr<T> where T: Interface {
+    fn clone(&self) -> Self {
+        unsafe {
+            self.as_unknown().AddRef();
+            ComPtr::from_raw(self.0)
+        }
+    }
+}
+impl<T> Drop for ComPtr<T> where T: Interface {
+    fn drop(&mut self) {
+        unsafe { self.as_unknown().Release(); }
+    }
+}
+pub struct BStr(BSTR);
+impl BStr {
+    pub unsafe fn from_raw(s: BSTR) -> BStr {
+        BStr(s)
+    }
+    pub fn to_osstring(&self) -> OsString {
+        let len = unsafe { SysStringLen(self.0) };
+        let slice = unsafe { from_raw_parts(self.0, len as usize) };
+        OsStringExt::from_wide(slice)
+    }
+}
+impl Drop for BStr {
+    fn drop(&mut self) {
+        unsafe { SysFreeString(self.0) };
+    }
+}
+
+pub trait ToWide {
+    fn to_wide(&self) -> Vec<u16>;
+    fn to_wide_null(&self) -> Vec<u16>;
+}
+impl<T> ToWide for T where T: AsRef<OsStr> {
+    fn to_wide(&self) -> Vec<u16> {
+        self.as_ref().encode_wide().collect()
+    }
+    fn to_wide_null(&self) -> Vec<u16> {
+        self.as_ref().encode_wide().chain(Some(0)).collect()
+    }
+}
+pub trait FromWide where Self: Sized {
+    fn from_wide(wide: &[u16]) -> Self;
+    fn from_wide_null(wide: &[u16]) -> Self {
+        let len = wide.iter().take_while(|&&c| c != 0).count();
+        Self::from_wide(&wide[..len])
+    }
+}
+impl FromWide for OsString {
+    fn from_wide(wide: &[u16]) -> OsString {
+        OsStringExt::from_wide(wide)
+    }
+}
+
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/src/lib.rs
@@ -0,0 +1,1888 @@
+//! A library for build scripts to compile custom C code
+//!
+//! This library is intended to be used as a `build-dependencies` entry in
+//! `Cargo.toml`:
+//!
+//! ```toml
+//! [build-dependencies]
+//! cc = "1.0"
+//! ```
+//!
+//! The purpose of this crate is to provide the utility functions necessary to
+//! compile C code into a static archive which is then linked into a Rust crate.
+//! Configuration is available through the `Build` struct.
+//!
+//! This crate will automatically detect situations such as cross compilation or
+//! other environment variables set by Cargo and will build code appropriately.
+//!
+//! The crate is not limited to C code, it can accept any source code that can
+//! be passed to a C or C++ compiler. As such, assembly files with extensions
+//! `.s` (gcc/clang) and `.asm` (MSVC) can also be compiled.
+//!
+//! [`Build`]: struct.Build.html
+//!
+//! # Parallelism
+//!
+//! To parallelize computation, enable the `parallel` feature for the crate.
+//!
+//! ```toml
+//! [build-dependencies]
+//! cc = { version = "1.0", features = ["parallel"] }
+//! ```
+//! To specify the max number of concurrent compilation jobs, set the `NUM_JOBS`
+//! environment variable to the desired amount.
+//!
+//! Cargo will also set this environment variable when executed with the `-jN` flag.
+//!
+//! If `NUM_JOBS` is not set, the `RAYON_NUM_THREADS` environment variable can
+//! also specify the build paralellism.
+//!
+//! # Examples
+//!
+//! Use the `Build` struct to compile `src/foo.c`:
+//!
+//! ```no_run
+//! extern crate cc;
+//!
+//! fn main() {
+//!     cc::Build::new()
+//!         .file("src/foo.c")
+//!         .define("FOO", Some("bar"))
+//!         .include("src")
+//!         .compile("foo");
+//! }
+//! ```
+
+#![doc(html_root_url = "https://docs.rs/cc/1.0")]
+#![cfg_attr(test, deny(warnings))]
+#![deny(missing_docs)]
+
+#[cfg(feature = "parallel")]
+extern crate rayon;
+
+use std::env;
+use std::ffi::{OsString, OsStr};
+use std::fs;
+use std::path::{PathBuf, Path};
+use std::process::{Command, Stdio, Child};
+use std::io::{self, BufReader, BufRead, Read, Write};
+use std::thread::{self, JoinHandle};
+
+#[cfg(feature = "parallel")]
+use std::sync::Mutex;
+
+// These modules are all glue to support reading the MSVC version from
+// the registry and from COM interfaces
+#[cfg(windows)]
+mod registry;
+#[cfg(windows)]
+#[macro_use]
+mod winapi;
+#[cfg(windows)]
+mod com;
+#[cfg(windows)]
+mod setup_config;
+
+pub mod windows_registry;
+
+/// A builder for compilation of a native static library.
+///
+/// A `Build` is the main type of the `cc` crate and is used to control all the
+/// various configuration options and such of a compile. You'll find more
+/// documentation on each method itself.
+#[derive(Clone, Debug)]
+pub struct Build {
+    include_directories: Vec<PathBuf>,
+    definitions: Vec<(String, Option<String>)>,
+    objects: Vec<PathBuf>,
+    flags: Vec<String>,
+    flags_supported: Vec<String>,
+    files: Vec<PathBuf>,
+    cpp: bool,
+    cpp_link_stdlib: Option<Option<String>>,
+    cpp_set_stdlib: Option<String>,
+    target: Option<String>,
+    host: Option<String>,
+    out_dir: Option<PathBuf>,
+    opt_level: Option<String>,
+    debug: Option<bool>,
+    env: Vec<(OsString, OsString)>,
+    compiler: Option<PathBuf>,
+    archiver: Option<PathBuf>,
+    cargo_metadata: bool,
+    pic: Option<bool>,
+    static_crt: Option<bool>,
+    shared_flag: Option<bool>,
+    static_flag: Option<bool>,
+    warnings_into_errors: bool,
+    warnings: bool,
+}
+
+/// Represents the types of errors that may occur while using cc-rs.
+#[derive(Clone, Debug)]
+enum ErrorKind {
+    /// Error occurred while performing I/O.
+    IOError,
+    /// Invalid architecture supplied.
+    ArchitectureInvalid,
+    /// Environment variable not found, with the var in question as extra info.
+    EnvVarNotFound,
+    /// Error occurred while using external tools (ie: invocation of compiler).
+    ToolExecError,
+    /// Error occurred due to missing external tools.
+    ToolNotFound,
+}
+
+/// Represents an internal error that occurred, with an explaination.
+#[derive(Clone, Debug)]
+pub struct Error {
+    /// Describes the kind of error that occurred.
+    kind: ErrorKind,
+    /// More explaination of error that occurred.
+    message: String,
+}
+
+impl Error {
+    fn new(kind: ErrorKind, message: &str) -> Error {
+        Error {
+            kind: kind,
+            message: message.to_owned(),
+        }
+    }
+}
+
+impl From<io::Error> for Error {
+    fn from(e: io::Error) -> Error {
+        Error::new(ErrorKind::IOError, &format!("{}", e))
+    }
+}
+
+/// Configuration used to represent an invocation of a C compiler.
+///
+/// This can be used to figure out what compiler is in use, what the arguments
+/// to it are, and what the environment variables look like for the compiler.
+/// This can be used to further configure other build systems (e.g. forward
+/// along CC and/or CFLAGS) or the `to_command` method can be used to run the
+/// compiler itself.
+#[derive(Clone, Debug)]
+pub struct Tool {
+    path: PathBuf,
+    cc_wrapper_path: Option<PathBuf>,
+    cc_wrapper_args: Vec<OsString>,
+    args: Vec<OsString>,
+    env: Vec<(OsString, OsString)>,
+    family: ToolFamily,
+}
+
+/// Represents the family of tools this tool belongs to.
+///
+/// Each family of tools differs in how and what arguments they accept.
+///
+/// Detection of a family is done on best-effort basis and may not accurately reflect the tool.
+#[derive(Copy, Clone, Debug, PartialEq)]
+enum ToolFamily {
+    /// Tool is GNU Compiler Collection-like.
+    Gnu,
+    /// Tool is Clang-like. It differs from the GCC in a sense that it accepts superset of flags
+    /// and its cross-compilation approach is different.
+    Clang,
+    /// Tool is the MSVC cl.exe.
+    Msvc,
+}
+
+impl ToolFamily {
+    /// What the flag to request debug info for this family of tools look like
+    fn debug_flag(&self) -> &'static str {
+        match *self {
+            ToolFamily::Msvc => "/Z7",
+            ToolFamily::Gnu | ToolFamily::Clang => "-g",
+        }
+    }
+
+    /// What the flag to include directories into header search path looks like
+    fn include_flag(&self) -> &'static str {
+        match *self {
+            ToolFamily::Msvc => "/I",
+            ToolFamily::Gnu | ToolFamily::Clang => "-I",
+        }
+    }
+
+    /// What the flag to request macro-expanded source output looks like
+    fn expand_flag(&self) -> &'static str {
+        match *self {
+            ToolFamily::Msvc => "/E",
+            ToolFamily::Gnu | ToolFamily::Clang => "-E",
+        }
+    }
+
+    /// What the flags to enable all warnings
+    fn warnings_flags(&self) -> &'static [&'static str] {
+        static MSVC_FLAGS: &'static [&'static str] = &["/W4"];
+        static GNU_CLANG_FLAGS: &'static [&'static str] = &["-Wall", "-Wextra"];
+
+        match *self {
+            ToolFamily::Msvc => &MSVC_FLAGS,
+            ToolFamily::Gnu | ToolFamily::Clang => &GNU_CLANG_FLAGS,
+        }
+    }
+
+    /// What the flag to turn warning into errors
+    fn warnings_to_errors_flag(&self) -> &'static str {
+        match *self {
+            ToolFamily::Msvc => "/WX",
+            ToolFamily::Gnu | ToolFamily::Clang => "-Werror",
+        }
+    }
+}
+
+impl Build {
+    /// Construct a new instance of a blank set of configuration.
+    ///
+    /// This builder is finished with the [`compile`] function.
+    ///
+    /// [`compile`]: struct.Build.html#method.compile
+    pub fn new() -> Build {
+        Build {
+            include_directories: Vec::new(),
+            definitions: Vec::new(),
+            objects: Vec::new(),
+            flags: Vec::new(),
+            flags_supported: Vec::new(),
+            files: Vec::new(),
+            shared_flag: None,
+            static_flag: None,
+            cpp: false,
+            cpp_link_stdlib: None,
+            cpp_set_stdlib: None,
+            target: None,
+            host: None,
+            out_dir: None,
+            opt_level: None,
+            debug: None,
+            env: Vec::new(),
+            compiler: None,
+            archiver: None,
+            cargo_metadata: true,
+            pic: None,
+            static_crt: None,
+            warnings: true,
+            warnings_into_errors: false,
+        }
+    }
+
+    /// Add a directory to the `-I` or include path for headers
+    ///
+    /// # Example
+    ///
+    /// ```no_run
+    /// use std::path::Path;
+    ///
+    /// let library_path = Path::new("/path/to/library");
+    ///
+    /// cc::Build::new()
+    ///     .file("src/foo.c")
+    ///     .include(library_path)
+    ///     .include("src")
+    ///     .compile("foo");
+    /// ```
+    pub fn include<P: AsRef<Path>>(&mut self, dir: P) -> &mut Build {
+        self.include_directories.push(dir.as_ref().to_path_buf());
+        self
+    }
+
+    /// Specify a `-D` variable with an optional value.
+    ///
+    /// # Example
+    ///
+    /// ```no_run
+    /// cc::Build::new()
+    ///     .file("src/foo.c")
+    ///     .define("FOO", "BAR")
+    ///     .define("BAZ", None)
+    ///     .compile("foo");
+    /// ```
+    pub fn define<'a, V: Into<Option<&'a str>>>(&mut self, var: &str, val: V) -> &mut Build {
+        self.definitions.push((
+            var.to_string(),
+            val.into().map(|s| s.to_string()),
+        ));
+        self
+    }
+
+    /// Add an arbitrary object file to link in
+    pub fn object<P: AsRef<Path>>(&mut self, obj: P) -> &mut Build {
+        self.objects.push(obj.as_ref().to_path_buf());
+        self
+    }
+
+    /// Add an arbitrary flag to the invocation of the compiler
+    ///
+    /// # Example
+    ///
+    /// ```no_run
+    /// cc::Build::new()
+    ///     .file("src/foo.c")
+    ///     .flag("-ffunction-sections")
+    ///     .compile("foo");
+    /// ```
+    pub fn flag(&mut self, flag: &str) -> &mut Build {
+        self.flags.push(flag.to_string());
+        self
+    }
+
+    fn ensure_check_file(&self) -> Result<PathBuf, Error> {
+        let out_dir = self.get_out_dir()?;
+        let src = if self.cpp {
+            out_dir.join("flag_check.cpp")
+        } else {
+            out_dir.join("flag_check.c")
+        };
+
+        if !src.exists() {
+            let mut f = fs::File::create(&src)?;
+            write!(f, "int main(void) {{ return 0; }}")?;
+        }
+
+        Ok(src)
+    }
+
+    fn is_flag_supported(&self, flag: &str) -> Result<bool, Error> {
+        let out_dir = self.get_out_dir()?;
+        let src = self.ensure_check_file()?;
+        let obj = out_dir.join("flag_check");
+        let target = self.get_target()?;
+        let mut cfg = Build::new();
+        cfg.flag(flag)
+            .target(&target)
+            .opt_level(0)
+            .host(&target)
+            .debug(false)
+            .cpp(self.cpp);
+        let compiler = cfg.try_get_compiler()?;
+        let mut cmd = compiler.to_command();
+        command_add_output_file(&mut cmd, &obj, target.contains("msvc"), false);
+
+        // We need to explicitly tell msvc not to link and create an exe
+        // in the root directory of the crate
+        if target.contains("msvc") {
+            cmd.arg("/c");
+        }
+
+        cmd.arg(&src);
+
+        let output = cmd.output()?;
+        Ok(output.stderr.is_empty())
+    }
+
+    /// Add an arbitrary flag to the invocation of the compiler if it supports it
+    ///
+    /// # Example
+    ///
+    /// ```no_run
+    /// cc::Build::new()
+    ///     .file("src/foo.c")
+    ///     .flag_if_supported("-Wlogical-op") // only supported by GCC
+    ///     .flag_if_supported("-Wunreachable-code") // only supported by clang
+    ///     .compile("foo");
+    /// ```
+    pub fn flag_if_supported(&mut self, flag: &str) -> &mut Build {
+        self.flags_supported.push(flag.to_string());
+        self
+    }
+
+    /// Set the `-shared` flag.
+    ///
+    /// When enabled, the compiler will produce a shared object which can
+    /// then be linked with other objects to form an executable.
+    ///
+    /// # Example
+    ///
+    /// ```no_run
+    /// cc::Build::new()
+    ///     .file("src/foo.c")
+    ///     .shared_flag(true)
+    ///     .compile("libfoo.so");
+    /// ```
+
+    pub fn shared_flag(&mut self, shared_flag: bool) -> &mut Build {
+        self.shared_flag = Some(shared_flag);
+        self
+    }
+
+    /// Set the `-static` flag.
+    ///
+    /// When enabled on systems that support dynamic linking, this prevents
+    /// linking with the shared libraries.
+    ///
+    /// # Example
+    ///
+    /// ```no_run
+    /// cc::Build::new()
+    ///     .file("src/foo.c")
+    ///     .shared_flag(true)
+    ///     .static_flag(true)
+    ///     .compile("foo");
+    /// ```
+    pub fn static_flag(&mut self, static_flag: bool) -> &mut Build {
+        self.static_flag = Some(static_flag);
+        self
+    }
+
+    /// Add a file which will be compiled
+    pub fn file<P: AsRef<Path>>(&mut self, p: P) -> &mut Build {
+        self.files.push(p.as_ref().to_path_buf());
+        self
+    }
+
+    /// Add files which will be compiled
+    pub fn files<P>(&mut self, p: P) -> &mut Build
+    where
+        P: IntoIterator,
+        P::Item: AsRef<Path>,
+    {
+        for file in p.into_iter() {
+            self.file(file);
+        }
+        self
+    }
+
+    /// Set C++ support.
+    ///
+    /// The other `cpp_*` options will only become active if this is set to
+    /// `true`.
+    pub fn cpp(&mut self, cpp: bool) -> &mut Build {
+        self.cpp = cpp;
+        self
+    }
+
+    /// Set warnings into errors flag.
+    ///
+    /// Disabled by default.
+    ///
+    /// Warning: turning warnings into errors only make sense
+    /// if you are a developer of the crate using cc-rs.
+    /// Some warnings only appear on some architecture or
+    /// specific version of the compiler. Any user of this crate,
+    /// or any other crate depending on it, could fail during
+    /// compile time.
+    ///
+    /// # Example
+    ///
+    /// ```no_run
+    /// cc::Build::new()
+    ///     .file("src/foo.c")
+    ///     .warnings_into_errors(true)
+    ///     .compile("libfoo.a");
+    /// ```
+    pub fn warnings_into_errors(&mut self, warnings_into_errors: bool) -> &mut Build {
+        self.warnings_into_errors = warnings_into_errors;
+        self
+    }
+
+    /// Set warnings flags.
+    ///
+    /// Adds some flags:
+    /// - "/Wall" for MSVC.
+    /// - "-Wall", "-Wextra" for GNU and Clang.
+    ///
+    /// Enabled by default.
+    ///
+    /// # Example
+    ///
+    /// ```no_run
+    /// cc::Build::new()
+    ///     .file("src/foo.c")
+    ///     .warnings(false)
+    ///     .compile("libfoo.a");
+    /// ```
+    pub fn warnings(&mut self, warnings: bool) -> &mut Build {
+        self.warnings = warnings;
+        self
+    }
+
+    /// Set the standard library to link against when compiling with C++
+    /// support.
+    ///
+    /// The default value of this property depends on the current target: On
+    /// OS X `Some("c++")` is used, when compiling for a Visual Studio based
+    /// target `None` is used and for other targets `Some("stdc++")` is used.
+    ///
+    /// A value of `None` indicates that no automatic linking should happen,
+    /// otherwise cargo will link against the specified library.
+    ///
+    /// The given library name must not contain the `lib` prefix.
+    ///
+    /// Common values:
+    /// - `stdc++` for GNU
+    /// - `c++` for Clang
+    ///
+    /// # Example
+    ///
+    /// ```no_run
+    /// cc::Build::new()
+    ///     .file("src/foo.c")
+    ///     .shared_flag(true)
+    ///     .cpp_link_stdlib("stdc++")
+    ///     .compile("libfoo.so");
+    /// ```
+    pub fn cpp_link_stdlib<'a, V: Into<Option<&'a str>>>(
+        &mut self,
+        cpp_link_stdlib: V,
+    ) -> &mut Build {
+        self.cpp_link_stdlib = Some(cpp_link_stdlib.into().map(|s| s.into()));
+        self
+    }
+
+    /// Force the C++ compiler to use the specified standard library.
+    ///
+    /// Setting this option will automatically set `cpp_link_stdlib` to the same
+    /// value.
+    ///
+    /// The default value of this option is always `None`.
+    ///
+    /// This option has no effect when compiling for a Visual Studio based
+    /// target.
+    ///
+    /// This option sets the `-stdlib` flag, which is only supported by some
+    /// compilers (clang, icc) but not by others (gcc). The library will not
+    /// detect which compiler is used, as such it is the responsibility of the
+    /// caller to ensure that this option is only used in conjuction with a
+    /// compiler which supports the `-stdlib` flag.
+    ///
+    /// A value of `None` indicates that no specific C++ standard library should
+    /// be used, otherwise `-stdlib` is added to the compile invocation.
+    ///
+    /// The given library name must not contain the `lib` prefix.
+    ///
+    /// Common values:
+    /// - `stdc++` for GNU
+    /// - `c++` for Clang
+    ///
+    /// # Example
+    ///
+    /// ```no_run
+    /// cc::Build::new()
+    ///     .file("src/foo.c")
+    ///     .cpp_set_stdlib("c++")
+    ///     .compile("libfoo.a");
+    /// ```
+    pub fn cpp_set_stdlib<'a, V: Into<Option<&'a str>>>(
+        &mut self,
+        cpp_set_stdlib: V,
+    ) -> &mut Build {
+        let cpp_set_stdlib = cpp_set_stdlib.into();
+        self.cpp_set_stdlib = cpp_set_stdlib.map(|s| s.into());
+        self.cpp_link_stdlib(cpp_set_stdlib);
+        self
+    }
+
+    /// Configures the target this configuration will be compiling for.
+    ///
+    /// This option is automatically scraped from the `TARGET` environment
+    /// variable by build scripts, so it's not required to call this function.
+    ///
+    /// # Example
+    ///
+    /// ```no_run
+    /// cc::Build::new()
+    ///     .file("src/foo.c")
+    ///     .target("aarch64-linux-android")
+    ///     .compile("foo");
+    /// ```
+    pub fn target(&mut self, target: &str) -> &mut Build {
+        self.target = Some(target.to_string());
+        self
+    }
+
+    /// Configures the host assumed by this configuration.
+    ///
+    /// This option is automatically scraped from the `HOST` environment
+    /// variable by build scripts, so it's not required to call this function.
+    ///
+    /// # Example
+    ///
+    /// ```no_run
+    /// cc::Build::new()
+    ///     .file("src/foo.c")
+    ///     .host("arm-linux-gnueabihf")
+    ///     .compile("foo");
+    /// ```
+    pub fn host(&mut self, host: &str) -> &mut Build {
+        self.host = Some(host.to_string());
+        self
+    }
+
+    /// Configures the optimization level of the generated object files.
+    ///
+    /// This option is automatically scraped from the `OPT_LEVEL` environment
+    /// variable by build scripts, so it's not required to call this function.
+    pub fn opt_level(&mut self, opt_level: u32) -> &mut Build {
+        self.opt_level = Some(opt_level.to_string());
+        self
+    }
+
+    /// Configures the optimization level of the generated object files.
+    ///
+    /// This option is automatically scraped from the `OPT_LEVEL` environment
+    /// variable by build scripts, so it's not required to call this function.
+    pub fn opt_level_str(&mut self, opt_level: &str) -> &mut Build {
+        self.opt_level = Some(opt_level.to_string());
+        self
+    }
+
+    /// Configures whether the compiler will emit debug information when
+    /// generating object files.
+    ///
+    /// This option is automatically scraped from the `PROFILE` environment
+    /// variable by build scripts (only enabled when the profile is "debug"), so
+    /// it's not required to call this function.
+    pub fn debug(&mut self, debug: bool) -> &mut Build {
+        self.debug = Some(debug);
+        self
+    }
+
+    /// Configures the output directory where all object files and static
+    /// libraries will be located.
+    ///
+    /// This option is automatically scraped from the `OUT_DIR` environment
+    /// variable by build scripts, so it's not required to call this function.
+    pub fn out_dir<P: AsRef<Path>>(&mut self, out_dir: P) -> &mut Build {
+        self.out_dir = Some(out_dir.as_ref().to_owned());
+        self
+    }
+
+    /// Configures the compiler to be used to produce output.
+    ///
+    /// This option is automatically determined from the target platform or a
+    /// number of environment variables, so it's not required to call this
+    /// function.
+    pub fn compiler<P: AsRef<Path>>(&mut self, compiler: P) -> &mut Build {
+        self.compiler = Some(compiler.as_ref().to_owned());
+        self
+    }
+
+    /// Configures the tool used to assemble archives.
+    ///
+    /// This option is automatically determined from the target platform or a
+    /// number of environment variables, so it's not required to call this
+    /// function.
+    pub fn archiver<P: AsRef<Path>>(&mut self, archiver: P) -> &mut Build {
+        self.archiver = Some(archiver.as_ref().to_owned());
+        self
+    }
+    /// Define whether metadata should be emitted for cargo allowing it to
+    /// automatically link the binary. Defaults to `true`.
+    ///
+    /// The emitted metadata is:
+    ///
+    ///  - `rustc-link-lib=static=`*compiled lib*
+    ///  - `rustc-link-search=native=`*target folder*
+    ///  - When target is MSVC, the ATL-MFC libs are added via `rustc-link-search=native=`
+    ///  - When C++ is enabled, the C++ stdlib is added via `rustc-link-lib`
+    ///
+    pub fn cargo_metadata(&mut self, cargo_metadata: bool) -> &mut Build {
+        self.cargo_metadata = cargo_metadata;
+        self
+    }
+
+    /// Configures whether the compiler will emit position independent code.
+    ///
+    /// This option defaults to `false` for `windows-gnu` targets and
+    /// to `true` for all other targets.
+    pub fn pic(&mut self, pic: bool) -> &mut Build {
+        self.pic = Some(pic);
+        self
+    }
+
+    /// Configures whether the /MT flag or the /MD flag will be passed to msvc build tools.
+    ///
+    /// This option defaults to `false`, and affect only msvc targets.
+    pub fn static_crt(&mut self, static_crt: bool) -> &mut Build {
+        self.static_crt = Some(static_crt);
+        self
+    }
+
+    #[doc(hidden)]
+    pub fn __set_env<A, B>(&mut self, a: A, b: B) -> &mut Build
+    where
+        A: AsRef<OsStr>,
+        B: AsRef<OsStr>,
+    {
+        self.env.push(
+            (a.as_ref().to_owned(), b.as_ref().to_owned()),
+        );
+        self
+    }
+
+    /// Run the compiler, generating the file `output`
+    ///
+    /// This will return a result instead of panicing; see compile() for the complete description.
+    pub fn try_compile(&self, output: &str) -> Result<(), Error> {
+        let (lib_name, gnu_lib_name) = if output.starts_with("lib") && output.ends_with(".a") {
+            (&output[3..output.len() - 2], output.to_owned())
+        } else {
+            let mut gnu = String::with_capacity(5 + output.len());
+            gnu.push_str("lib");
+            gnu.push_str(&output);
+            gnu.push_str(".a");
+            (output, gnu)
+        };
+        let dst = self.get_out_dir()?;
+
+        let mut objects = Vec::new();
+        let mut src_dst = Vec::new();
+        for file in self.files.iter() {
+            let obj = dst.join(file).with_extension("o");
+            let obj = if !obj.starts_with(&dst) {
+                dst.join(obj.file_name().ok_or_else(|| {
+                    Error::new(ErrorKind::IOError, "Getting object file details failed.")
+                })?)
+            } else {
+                obj
+            };
+
+            match obj.parent() {
+                Some(s) => fs::create_dir_all(s)?,
+                None => {
+                    return Err(Error::new(
+                        ErrorKind::IOError,
+                        "Getting object file details failed.",
+                    ))
+                }
+            };
+
+            src_dst.push((file.to_path_buf(), obj.clone()));
+            objects.push(obj);
+        }
+        self.compile_objects(&src_dst)?;
+        self.assemble(lib_name, &dst.join(gnu_lib_name), &objects)?;
+
+        if self.get_target()?.contains("msvc") {
+            let compiler = self.get_base_compiler()?;
+            let atlmfc_lib = compiler
+                .env()
+                .iter()
+                .find(|&&(ref var, _)| var.as_os_str() == OsStr::new("LIB"))
+                .and_then(|&(_, ref lib_paths)| {
+                    env::split_paths(lib_paths).find(|path| {
+                        let sub = Path::new("atlmfc/lib");
+                        path.ends_with(sub) || path.parent().map_or(false, |p| p.ends_with(sub))
+                    })
+                });
+
+            if let Some(atlmfc_lib) = atlmfc_lib {
+                self.print(&format!(
+                    "cargo:rustc-link-search=native={}",
+                    atlmfc_lib.display()
+                ));
+            }
+        }
+
+        self.print(&format!("cargo:rustc-link-lib=static={}", lib_name));
+        self.print(&format!("cargo:rustc-link-search=native={}", dst.display()));
+
+        // Add specific C++ libraries, if enabled.
+        if self.cpp {
+            if let Some(stdlib) = self.get_cpp_link_stdlib()? {
+                self.print(&format!("cargo:rustc-link-lib={}", stdlib));
+            }
+        }
+
+        Ok(())
+    }
+
+    /// Run the compiler, generating the file `output`
+    ///
+    /// The name `output` should be the name of the library.  For backwards compatibility,
+    /// the `output` may start with `lib` and end with `.a`.  The Rust compilier will create
+    /// the assembly with the lib prefix and .a extension.  MSVC will create a file without prefix,
+    /// ending with `.lib`.
+    ///
+    /// # Panics
+    ///
+    /// Panics if `output` is not formatted correctly or if one of the underlying
+    /// compiler commands fails. It can also panic if it fails reading file names
+    /// or creating directories.
+    pub fn compile(&self, output: &str) {
+        if let Err(e) = self.try_compile(output) {
+            fail(&e.message);
+        }
+    }
+
+    #[cfg(feature = "parallel")]
+    fn compile_objects(&self, objs: &[(PathBuf, PathBuf)]) -> Result<(), Error> {
+        use self::rayon::prelude::*;
+
+        let mut cfg = rayon::Configuration::new();
+        if let Ok(amt) = env::var("NUM_JOBS") {
+            if let Ok(amt) = amt.parse() {
+                cfg = cfg.num_threads(amt);
+            }
+        }
+        drop(rayon::initialize(cfg));
+
+        let results: Mutex<Vec<Result<(), Error>>> = Mutex::new(Vec::new());
+
+        objs.par_iter().with_max_len(1).for_each(
+            |&(ref src, ref dst)| {
+                let res = self.compile_object(src, dst);
+                results.lock().unwrap().push(res)
+            },
+        );
+
+        // Check for any errors and return the first one found.
+        for result in results.into_inner().unwrap().iter() {
+            if result.is_err() {
+                return result.clone();
+            }
+        }
+
+        Ok(())
+    }
+
+    #[cfg(not(feature = "parallel"))]
+    fn compile_objects(&self, objs: &[(PathBuf, PathBuf)]) -> Result<(), Error> {
+        for &(ref src, ref dst) in objs {
+            self.compile_object(src, dst)?;
+        }
+        Ok(())
+    }
+
+    fn compile_object(&self, file: &Path, dst: &Path) -> Result<(), Error> {
+        let is_asm = file.extension().and_then(|s| s.to_str()) == Some("asm");
+        let msvc = self.get_target()?.contains("msvc");
+        let (mut cmd, name) = if msvc && is_asm {
+            self.msvc_macro_assembler()?
+        } else {
+            let compiler = self.try_get_compiler()?;
+            let mut cmd = compiler.to_command();
+            for &(ref a, ref b) in self.env.iter() {
+                cmd.env(a, b);
+            }
+            (
+                cmd,
+                compiler
+                    .path
+                    .file_name()
+                    .ok_or_else(|| {
+                        Error::new(ErrorKind::IOError, "Failed to get compiler path.")
+                    })?
+                    .to_string_lossy()
+                    .into_owned(),
+            )
+        };
+        command_add_output_file(&mut cmd, dst, msvc, is_asm);
+        cmd.arg(if msvc { "/c" } else { "-c" });
+        cmd.arg(file);
+
+        run(&mut cmd, &name)?;
+        Ok(())
+    }
+
+    /// This will return a result instead of panicing; see expand() for the complete description.
+    pub fn try_expand(&self) -> Result<Vec<u8>, Error> {
+        let compiler = self.try_get_compiler()?;
+        let mut cmd = compiler.to_command();
+        for &(ref a, ref b) in self.env.iter() {
+            cmd.env(a, b);
+        }
+        cmd.arg(compiler.family.expand_flag());
+
+        assert!(
+            self.files.len() <= 1,
+            "Expand may only be called for a single file"
+        );
+
+        for file in self.files.iter() {
+            cmd.arg(file);
+        }
+
+        let name = compiler
+            .path
+            .file_name()
+            .ok_or_else(|| {
+                Error::new(ErrorKind::IOError, "Failed to get compiler path.")
+            })?
+            .to_string_lossy()
+            .into_owned();
+
+        Ok(run_output(&mut cmd, &name)?)
+    }
+
+    /// Run the compiler, returning the macro-expanded version of the input files.
+    ///
+    /// This is only relevant for C and C++ files.
+    ///
+    /// # Panics
+    /// Panics if more than one file is present in the config, or if compiler
+    /// path has an invalid file name.
+    ///
+    /// # Example
+    /// ```no_run
+    /// let out = cc::Build::new().file("src/foo.c").expand();
+    /// ```
+    pub fn expand(&self) -> Vec<u8> {
+        match self.try_expand() {
+            Err(e) => fail(&e.message),
+            Ok(v) => v,
+        }
+    }
+
+    /// Get the compiler that's in use for this configuration.
+    ///
+    /// This function will return a `Tool` which represents the culmination
+    /// of this configuration at a snapshot in time. The returned compiler can
+    /// be inspected (e.g. the path, arguments, environment) to forward along to
+    /// other tools, or the `to_command` method can be used to invoke the
+    /// compiler itself.
+    ///
+    /// This method will take into account all configuration such as debug
+    /// information, optimization level, include directories, defines, etc.
+    /// Additionally, the compiler binary in use follows the standard
+    /// conventions for this path, e.g. looking at the explicitly set compiler,
+    /// environment variables (a number of which are inspected here), and then
+    /// falling back to the default configuration.
+    ///
+    /// # Panics
+    ///
+    /// Panics if an error occurred while determining the architecture.
+    pub fn get_compiler(&self) -> Tool {
+        match self.try_get_compiler() {
+            Ok(tool) => tool,
+            Err(e) => fail(&e.message),
+        }
+    }
+
+    /// Get the compiler that's in use for this configuration.
+    ///
+    /// This will return a result instead of panicing; see get_compiler() for the complete description.
+    pub fn try_get_compiler(&self) -> Result<Tool, Error> {
+        let opt_level = self.get_opt_level()?;
+        let target = self.get_target()?;
+
+        let mut cmd = self.get_base_compiler()?;
+        let nvcc = cmd.path
+            .file_name()
+            .and_then(|p| p.to_str())
+            .map(|p| p.contains("nvcc"))
+            .unwrap_or(false);
+
+        // Non-target flags
+        // If the flag is not conditioned on target variable, it belongs here :)
+        match cmd.family {
+            ToolFamily::Msvc => {
+                cmd.args.push("/nologo".into());
+
+                let crt_flag = match self.static_crt {
+                    Some(true) => "/MT",
+                    Some(false) => "/MD",
+                    None => {
+                        let features =
+                            env::var("CARGO_CFG_TARGET_FEATURE").unwrap_or(String::new());
+                        if features.contains("crt-static") {
+                            "/MT"
+                        } else {
+                            "/MD"
+                        }
+                    }
+                };
+                cmd.args.push(crt_flag.into());
+
+                match &opt_level[..] {
+                    "z" | "s" => cmd.args.push("/Os".into()),
+                    "1" => cmd.args.push("/O1".into()),
+                    // -O3 is a valid value for gcc and clang compilers, but not msvc. Cap to /O2.
+                    "2" | "3" => cmd.args.push("/O2".into()),
+                    _ => {}
+                }
+            }
+            ToolFamily::Gnu | ToolFamily::Clang => {
+                // arm-linux-androideabi-gcc 4.8 shipped with Android NDK does
+                // not support '-Oz'
+                if opt_level == "z" && cmd.family != ToolFamily::Clang {
+                    cmd.args.push("-Os".into());
+                } else {
+                    cmd.args.push(format!("-O{}", opt_level).into());
+                }
+
+                if !nvcc {
+                    cmd.args.push("-ffunction-sections".into());
+                    cmd.args.push("-fdata-sections".into());
+                    if self.pic.unwrap_or(!target.contains("windows-gnu")) {
+                        cmd.args.push("-fPIC".into());
+                    }
+                } else if self.pic.unwrap_or(false) {
+                    cmd.args.push("-Xcompiler".into());
+                    cmd.args.push("\'-fPIC\'".into());
+                }
+            }
+        }
+        for arg in self.envflags(if self.cpp { "CXXFLAGS" } else { "CFLAGS" }) {
+            cmd.args.push(arg.into());
+        }
+
+        if self.get_debug() {
+            cmd.args.push(cmd.family.debug_flag().into());
+        }
+
+        // Target flags
+        match cmd.family {
+            ToolFamily::Clang => {
+                cmd.args.push(format!("--target={}", target).into());
+            }
+            ToolFamily::Msvc => {
+                if target.contains("i586") {
+                    cmd.args.push("/ARCH:IA32".into());
+                }
+            }
+            ToolFamily::Gnu => {
+                if target.contains("i686") || target.contains("i586") {
+                    cmd.args.push("-m32".into());
+                } else if target == "x86_64-unknown-linux-gnux32" {
+                    cmd.args.push("-mx32".into());
+                } else if target.contains("x86_64") || target.contains("powerpc64") {
+                    cmd.args.push("-m64".into());
+                }
+
+                if self.static_flag.is_none() && target.contains("musl") {
+                    cmd.args.push("-static".into());
+                }
+
+                // armv7 targets get to use armv7 instructions
+                if target.starts_with("armv7-") && target.contains("-linux-") {
+                    cmd.args.push("-march=armv7-a".into());
+                }
+
+                // On android we can guarantee some extra float instructions
+                // (specified in the android spec online)
+                if target.starts_with("armv7-linux-androideabi") {
+                    cmd.args.push("-march=armv7-a".into());
+                    cmd.args.push("-mthumb".into());
+                    cmd.args.push("-mfpu=vfpv3-d16".into());
+                    cmd.args.push("-mfloat-abi=softfp".into());
+                }
+
+                // For us arm == armv6 by default
+                if target.starts_with("arm-unknown-linux-") {
+                    cmd.args.push("-march=armv6".into());
+                    cmd.args.push("-marm".into());
+                }
+
+                // We can guarantee some settings for FRC
+                if target.starts_with("arm-frc-") {
+                    cmd.args.push("-march=armv7-a".into());
+                    cmd.args.push("-mcpu=cortex-a9".into());
+                    cmd.args.push("-mfpu=vfpv3".into());
+                    cmd.args.push("-mfloat-abi=softfp".into());
+                    cmd.args.push("-marm".into());
+                }
+
+                // Turn codegen down on i586 to avoid some instructions.
+                if target.starts_with("i586-unknown-linux-") {
+                    cmd.args.push("-march=pentium".into());
+                }
+
+                // Set codegen level for i686 correctly
+                if target.starts_with("i686-unknown-linux-") {
+                    cmd.args.push("-march=i686".into());
+                }
+
+                // Looks like `musl-gcc` makes is hard for `-m32` to make its way
+                // all the way to the linker, so we need to actually instruct the
+                // linker that we're generating 32-bit executables as well. This'll
+                // typically only be used for build scripts which transitively use
+                // these flags that try to compile executables.
+                if target == "i686-unknown-linux-musl" {
+                    cmd.args.push("-Wl,-melf_i386".into());
+                }
+
+                if target.starts_with("thumb") {
+                    cmd.args.push("-mthumb".into());
+
+                    if target.ends_with("eabihf") {
+                        cmd.args.push("-mfloat-abi=hard".into())
+                    }
+                }
+                if target.starts_with("thumbv6m") {
+                    cmd.args.push("-march=armv6s-m".into());
+                }
+                if target.starts_with("thumbv7em") {
+                    cmd.args.push("-march=armv7e-m".into());
+
+                    if target.ends_with("eabihf") {
+                        cmd.args.push("-mfpu=fpv4-sp-d16".into())
+                    }
+                }
+                if target.starts_with("thumbv7m") {
+                    cmd.args.push("-march=armv7-m".into());
+                }
+            }
+        }
+
+        if target.contains("-ios") {
+            // FIXME: potential bug. iOS is always compiled with Clang, but Gcc compiler may be
+            // detected instead.
+            self.ios_flags(&mut cmd)?;
+        }
+
+        if self.static_flag.unwrap_or(false) {
+            cmd.args.push("-static".into());
+        }
+        if self.shared_flag.unwrap_or(false) {
+            cmd.args.push("-shared".into());
+        }
+
+        if self.cpp {
+            match (self.cpp_set_stdlib.as_ref(), cmd.family) {
+                (None, _) => {}
+                (Some(stdlib), ToolFamily::Gnu) |
+                (Some(stdlib), ToolFamily::Clang) => {
+                    cmd.args.push(format!("-stdlib=lib{}", stdlib).into());
+                }
+                _ => {
+                    println!(
+                        "cargo:warning=cpp_set_stdlib is specified, but the {:?} compiler \
+                              does not support this option, ignored",
+                        cmd.family
+                    );
+                }
+            }
+        }
+
+        for directory in self.include_directories.iter() {
+            cmd.args.push(cmd.family.include_flag().into());
+            cmd.args.push(directory.into());
+        }
+
+        if self.warnings {
+            for flag in cmd.family.warnings_flags().iter() {
+                cmd.args.push(flag.into());
+            }
+        }
+
+        for flag in self.flags.iter() {
+            cmd.args.push(flag.into());
+        }
+
+        for flag in self.flags_supported.iter() {
+            if self.is_flag_supported(flag).unwrap_or(false) {
+                cmd.args.push(flag.into());
+            }
+        }
+
+        for &(ref key, ref value) in self.definitions.iter() {
+            let lead = if let ToolFamily::Msvc = cmd.family {
+                "/"
+            } else {
+                "-"
+            };
+            if let Some(ref value) = *value {
+                cmd.args.push(format!("{}D{}={}", lead, key, value).into());
+            } else {
+                cmd.args.push(format!("{}D{}", lead, key).into());
+            }
+        }
+
+        if self.warnings_into_errors {
+            cmd.args.push(cmd.family.warnings_to_errors_flag().into());
+        }
+
+        Ok(cmd)
+    }
+
+    fn msvc_macro_assembler(&self) -> Result<(Command, String), Error> {
+        let target = self.get_target()?;
+        let tool = if target.contains("x86_64") {
+            "ml64.exe"
+        } else {
+            "ml.exe"
+        };
+        let mut cmd = windows_registry::find(&target, tool).unwrap_or_else(|| self.cmd(tool));
+        for directory in self.include_directories.iter() {
+            cmd.arg("/I").arg(directory);
+        }
+        for &(ref key, ref value) in self.definitions.iter() {
+            if let Some(ref value) = *value {
+                cmd.arg(&format!("/D{}={}", key, value));
+            } else {
+                cmd.arg(&format!("/D{}", key));
+            }
+        }
+
+        if target.contains("i686") || target.contains("i586") {
+            cmd.arg("/safeseh");
+        }
+        for flag in self.flags.iter() {
+            cmd.arg(flag);
+        }
+
+        Ok((cmd, tool.to_string()))
+    }
+
+    fn assemble(&self, lib_name: &str, dst: &Path, objects: &[PathBuf]) -> Result<(), Error> {
+        // Delete the destination if it exists as the `ar` tool at least on Unix
+        // appends to it, which we don't want.
+        let _ = fs::remove_file(&dst);
+
+        let target = self.get_target()?;
+        if target.contains("msvc") {
+            let mut cmd = match self.archiver {
+                Some(ref s) => self.cmd(s),
+                None => {
+                    windows_registry::find(&target, "lib.exe").unwrap_or_else(
+                        || {
+                            self.cmd("lib.exe")
+                        },
+                    )
+                }
+            };
+            let mut out = OsString::from("/OUT:");
+            out.push(dst);
+            run(
+                cmd.arg(out).arg("/nologo").args(objects).args(
+                    &self.objects,
+                ),
+                "lib.exe",
+            )?;
+
+            // The Rust compiler will look for libfoo.a and foo.lib, but the
+            // MSVC linker will also be passed foo.lib, so be sure that both
+            // exist for now.
+            let lib_dst = dst.with_file_name(format!("{}.lib", lib_name));
+            let _ = fs::remove_file(&lib_dst);
+            match fs::hard_link(&dst, &lib_dst).or_else(|_| {
+                // if hard-link fails, just copy (ignoring the number of bytes written)
+                fs::copy(&dst, &lib_dst).map(|_| ())
+            }) {
+                Ok(_) => (),
+                Err(_) => {
+                    return Err(Error::new(
+                        ErrorKind::IOError,
+                        "Could not copy or create a hard-link to the generated lib file.",
+                    ))
+                }
+            };
+        } else {
+            let (mut ar, cmd) = self.get_ar()?;
+            run(
+                ar.arg("crs").arg(dst).args(objects).args(&self.objects),
+                &cmd,
+            )?;
+        }
+
+        Ok(())
+    }
+
+    fn ios_flags(&self, cmd: &mut Tool) -> Result<(), Error> {
+        enum ArchSpec {
+            Device(&'static str),
+            Simulator(&'static str),
+        }
+
+        let target = self.get_target()?;
+        let arch = target.split('-').nth(0).ok_or_else(|| {
+            Error::new(
+                ErrorKind::ArchitectureInvalid,
+                "Unknown architecture for iOS target.",
+            )
+        })?;
+        let arch = match arch {
+            "arm" | "armv7" | "thumbv7" => ArchSpec::Device("armv7"),
+            "armv7s" | "thumbv7s" => ArchSpec::Device("armv7s"),
+            "arm64" | "aarch64" => ArchSpec::Device("arm64"),
+            "i386" | "i686" => ArchSpec::Simulator("-m32"),
+            "x86_64" => ArchSpec::Simulator("-m64"),
+            _ => {
+                return Err(Error::new(
+                    ErrorKind::ArchitectureInvalid,
+                    "Unknown architecture for iOS target.",
+                ))
+            }
+        };
+
+        let sdk = match arch {
+            ArchSpec::Device(arch) => {
+                cmd.args.push("-arch".into());
+                cmd.args.push(arch.into());
+                cmd.args.push("-miphoneos-version-min=7.0".into());
+                "iphoneos"
+            }
+            ArchSpec::Simulator(arch) => {
+                cmd.args.push(arch.into());
+                cmd.args.push("-mios-simulator-version-min=7.0".into());
+                "iphonesimulator"
+            }
+        };
+
+        self.print(&format!("Detecting iOS SDK path for {}", sdk));
+        let sdk_path = self.cmd("xcrun")
+            .arg("--show-sdk-path")
+            .arg("--sdk")
+            .arg(sdk)
+            .stderr(Stdio::inherit())
+            .output()?
+            .stdout;
+
+        let sdk_path = match String::from_utf8(sdk_path) {
+            Ok(p) => p,
+            Err(_) => {
+                return Err(Error::new(
+                    ErrorKind::IOError,
+                    "Unable to determine iOS SDK path.",
+                ))
+            }
+        };
+
+        cmd.args.push("-isysroot".into());
+        cmd.args.push(sdk_path.trim().into());
+
+        Ok(())
+    }
+
+    fn cmd<P: AsRef<OsStr>>(&self, prog: P) -> Command {
+        let mut cmd = Command::new(prog);
+        for &(ref a, ref b) in self.env.iter() {
+            cmd.env(a, b);
+        }
+        cmd
+    }
+
+    fn get_base_compiler(&self) -> Result<Tool, Error> {
+        if let Some(ref c) = self.compiler {
+            return Ok(Tool::new(c.clone()));
+        }
+        let host = self.get_host()?;
+        let target = self.get_target()?;
+        let (env, msvc, gnu) = if self.cpp {
+            ("CXX", "cl.exe", "g++")
+        } else {
+            ("CC", "cl.exe", "gcc")
+        };
+
+        let default = if host.contains("solaris") {
+            // In this case, c++/cc unlikely to exist or be correct.
+            gnu
+        } else if self.cpp {
+            "c++"
+        } else {
+            "cc"
+        };
+
+        let tool_opt: Option<Tool> =
+            self.env_tool(env)
+                .map(|(tool, cc, args)| {
+                    let mut t = Tool::new(PathBuf::from(tool));
+                    if let Some(cc) = cc {
+                        t.cc_wrapper_path = Some(PathBuf::from(cc));
+                    }
+                    for arg in args {
+                        t.cc_wrapper_args.push(arg.into());
+                    }
+                    t
+                })
+                .or_else(|| {
+                    if target.contains("emscripten") {
+                        let tool = if self.cpp { "em++" } else { "emcc" };
+                        // Windows uses bat file so we have to be a bit more specific
+                        if cfg!(windows) {
+                            let mut t = Tool::new(PathBuf::from("cmd"));
+                            t.args.push("/c".into());
+                            t.args.push(format!("{}.bat", tool).into());
+                            Some(t)
+                        } else {
+                            Some(Tool::new(PathBuf::from(tool)))
+                        }
+                    } else {
+                        None
+                    }
+                })
+                .or_else(|| windows_registry::find_tool(&target, "cl.exe"));
+
+        let tool = match tool_opt {
+            Some(t) => t,
+            None => {
+                let compiler = if host.contains("windows") && target.contains("windows") {
+                    if target.contains("msvc") {
+                        msvc.to_string()
+                    } else {
+                        format!("{}.exe", gnu)
+                    }
+                } else if target.contains("android") {
+                    format!("{}-{}", target.replace("armv7", "arm"), gnu)
+                } else if self.get_host()? != target {
+                    // CROSS_COMPILE is of the form: "arm-linux-gnueabi-"
+                    let cc_env = self.getenv("CROSS_COMPILE");
+                    let cross_compile = cc_env.as_ref().map(|s| s.trim_right_matches('-'));
+                    let prefix = cross_compile.or(match &target[..] {
+                        "aarch64-unknown-linux-gnu" => Some("aarch64-linux-gnu"),
+                        "arm-unknown-linux-gnueabi" => Some("arm-linux-gnueabi"),
+                        "arm-frc-linux-gnueabi" => Some("arm-frc-linux-gnueabi"),
+                        "arm-unknown-linux-gnueabihf" => Some("arm-linux-gnueabihf"),
+                        "arm-unknown-linux-musleabi" => Some("arm-linux-musleabi"),
+                        "arm-unknown-linux-musleabihf" => Some("arm-linux-musleabihf"),
+                        "arm-unknown-netbsd-eabi" => Some("arm--netbsdelf-eabi"),
+                        "armv6-unknown-netbsd-eabihf" => Some("armv6--netbsdelf-eabihf"),
+                        "armv7-unknown-linux-gnueabihf" => Some("arm-linux-gnueabihf"),
+                        "armv7-unknown-linux-musleabihf" => Some("arm-linux-musleabihf"),
+                        "armv7-unknown-netbsd-eabihf" => Some("armv7--netbsdelf-eabihf"),
+                        "i686-pc-windows-gnu" => Some("i686-w64-mingw32"),
+                        "i686-unknown-linux-musl" => Some("musl"),
+                        "i686-unknown-netbsd" => Some("i486--netbsdelf"),
+                        "mips-unknown-linux-gnu" => Some("mips-linux-gnu"),
+                        "mipsel-unknown-linux-gnu" => Some("mipsel-linux-gnu"),
+                        "mips64-unknown-linux-gnuabi64" => Some("mips64-linux-gnuabi64"),
+                        "mips64el-unknown-linux-gnuabi64" => Some("mips64el-linux-gnuabi64"),
+                        "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
+                        "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
+                        "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
+                        "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
+                        "s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
+                        "sparc64-unknown-linux-gnu" => Some("sparc64-linux-gnu"),
+                        "sparc64-unknown-netbsd" => Some("sparc64--netbsd"),
+                        "sparcv9-sun-solaris" => Some("sparcv9-sun-solaris"),
+                        "thumbv6m-none-eabi" => Some("arm-none-eabi"),
+                        "thumbv7em-none-eabi" => Some("arm-none-eabi"),
+                        "thumbv7em-none-eabihf" => Some("arm-none-eabi"),
+                        "thumbv7m-none-eabi" => Some("arm-none-eabi"),
+                        "x86_64-pc-windows-gnu" => Some("x86_64-w64-mingw32"),
+                        "x86_64-rumprun-netbsd" => Some("x86_64-rumprun-netbsd"),
+                        "x86_64-unknown-linux-musl" => Some("musl"),
+                        "x86_64-unknown-netbsd" => Some("x86_64--netbsd"),
+                        _ => None,
+                    });
+                    match prefix {
+                        Some(prefix) => format!("{}-{}", prefix, gnu),
+                        None => default.to_string(),
+                    }
+                } else {
+                    default.to_string()
+                };
+                Tool::new(PathBuf::from(compiler))
+            }
+        };
+
+        Ok(tool)
+    }
+
+    fn get_var(&self, var_base: &str) -> Result<String, Error> {
+        let target = self.get_target()?;
+        let host = self.get_host()?;
+        let kind = if host == target { "HOST" } else { "TARGET" };
+        let target_u = target.replace("-", "_");
+        let res = self.getenv(&format!("{}_{}", var_base, target))
+            .or_else(|| self.getenv(&format!("{}_{}", var_base, target_u)))
+            .or_else(|| self.getenv(&format!("{}_{}", kind, var_base)))
+            .or_else(|| self.getenv(var_base));
+
+        match res {
+            Some(res) => Ok(res),
+            None => Err(Error::new(
+                ErrorKind::EnvVarNotFound,
+                &format!(
+                    "Could not find environment variable {}.",
+                    var_base
+                ),
+            )),
+        }
+    }
+
+    fn envflags(&self, name: &str) -> Vec<String> {
+        self.get_var(name)
+            .unwrap_or(String::new())
+            .split(|c: char| c.is_whitespace())
+            .filter(|s| !s.is_empty())
+            .map(|s| s.to_string())
+            .collect()
+    }
+
+
+    /// Returns compiler path, optional modifier name from whitelist, and arguments vec
+    fn env_tool(&self, name: &str) -> Option<(String, Option<String>, Vec<String>)> {
+        self.get_var(name).ok().map(|tool| {
+            let whitelist = ["ccache", "distcc", "sccache"];
+
+            for t in whitelist.iter() {
+                if tool.starts_with(t) && tool[t.len()..].starts_with(' ')  {
+                    let args = tool.split_whitespace().collect::<Vec<_>>();
+
+                    return (args[1].to_string(), Some(t.to_string()), args[2..].iter().map(|s| s.to_string()).collect());
+                }
+            }
+            (tool, None, Vec::new())
+        })
+    }
+
+    /// Returns the default C++ standard library for the current target: `libc++`
+    /// for OS X and `libstdc++` for anything else.
+    fn get_cpp_link_stdlib(&self) -> Result<Option<String>, Error> {
+        match self.cpp_link_stdlib.clone() {
+            Some(s) => Ok(s),
+            None => {
+                let target = self.get_target()?;
+                if target.contains("msvc") {
+                    Ok(None)
+                } else if target.contains("darwin") {
+                    Ok(Some("c++".to_string()))
+                } else if target.contains("freebsd") {
+                    Ok(Some("c++".to_string()))
+                } else {
+                    Ok(Some("stdc++".to_string()))
+                }
+            }
+        }
+    }
+
+    fn get_ar(&self) -> Result<(Command, String), Error> {
+        if let Some(ref p) = self.archiver {
+            let name = p.file_name().and_then(|s| s.to_str()).unwrap_or("ar");
+            return Ok((self.cmd(p), name.to_string()));
+        }
+        if let Ok(p) = self.get_var("AR") {
+            return Ok((self.cmd(&p), p));
+        }
+        let program = if self.get_target()?.contains("android") {
+            format!("{}-ar", self.get_target()?.replace("armv7", "arm"))
+        } else if self.get_target()?.contains("emscripten") {
+            // Windows use bat files so we have to be a bit more specific
+            if cfg!(windows) {
+                let mut cmd = self.cmd("cmd");
+                cmd.arg("/c").arg("emar.bat");
+                return Ok((cmd, "emar.bat".to_string()));
+            }
+
+            "emar".to_string()
+        } else {
+            "ar".to_string()
+        };
+        Ok((self.cmd(&program), program))
+    }
+
+    fn get_target(&self) -> Result<String, Error> {
+        match self.target.clone() {
+            Some(t) => Ok(t),
+            None => Ok(self.getenv_unwrap("TARGET")?),
+        }
+    }
+
+    fn get_host(&self) -> Result<String, Error> {
+        match self.host.clone() {
+            Some(h) => Ok(h),
+            None => Ok(self.getenv_unwrap("HOST")?),
+        }
+    }
+
+    fn get_opt_level(&self) -> Result<String, Error> {
+        match self.opt_level.as_ref().cloned() {
+            Some(ol) => Ok(ol),
+            None => Ok(self.getenv_unwrap("OPT_LEVEL")?),
+        }
+    }
+
+    fn get_debug(&self) -> bool {
+        self.debug.unwrap_or_else(|| match self.getenv("DEBUG") {
+            Some(s) => s != "false",
+            None => false,
+        })
+    }
+
+    fn get_out_dir(&self) -> Result<PathBuf, Error> {
+        match self.out_dir.clone() {
+            Some(p) => Ok(p),
+            None => Ok(env::var_os("OUT_DIR").map(PathBuf::from).ok_or_else(|| {
+                Error::new(
+                    ErrorKind::EnvVarNotFound,
+                    "Environment variable OUT_DIR not defined.",
+                )
+            })?),
+        }
+    }
+
+    fn getenv(&self, v: &str) -> Option<String> {
+        let r = env::var(v).ok();
+        self.print(&format!("{} = {:?}", v, r));
+        r
+    }
+
+    fn getenv_unwrap(&self, v: &str) -> Result<String, Error> {
+        match self.getenv(v) {
+            Some(s) => Ok(s),
+            None => Err(Error::new(
+                ErrorKind::EnvVarNotFound,
+                &format!(
+                    "Environment variable {} not defined.",
+                    v.to_string()
+                ),
+            )),
+        }
+    }
+
+    fn print(&self, s: &str) {
+        if self.cargo_metadata {
+            println!("{}", s);
+        }
+    }
+}
+
+impl Default for Build {
+    fn default() -> Build {
+        Build::new()
+    }
+}
+
+impl Tool {
+    fn new(path: PathBuf) -> Tool {
+        // Try to detect family of the tool from its name, falling back to Gnu.
+        let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
+            if fname.contains("clang") {
+                ToolFamily::Clang
+            } else if fname.contains("cl") && !fname.contains("uclibc") {
+                ToolFamily::Msvc
+            } else {
+                ToolFamily::Gnu
+            }
+        } else {
+            ToolFamily::Gnu
+        };
+        Tool {
+            path: path,
+            cc_wrapper_path: None,
+            cc_wrapper_args: Vec::new(),
+            args: Vec::new(),
+            env: Vec::new(),
+            family: family,
+        }
+    }
+
+    /// Converts this compiler into a `Command` that's ready to be run.
+    ///
+    /// This is useful for when the compiler needs to be executed and the
+    /// command returned will already have the initial arguments and environment
+    /// variables configured.
+    pub fn to_command(&self) -> Command {
+        let mut cmd = match self.cc_wrapper_path {
+            Some(ref cc_wrapper_path) => {
+                let mut cmd = Command::new(&cc_wrapper_path);
+                cmd.arg(&self.path);
+                cmd.args(&self.cc_wrapper_args);
+                cmd
+            },
+            None => Command::new(&self.path)
+        };
+        cmd.args(&self.args);
+        for &(ref k, ref v) in self.env.iter() {
+            cmd.env(k, v);
+        }
+        cmd
+    }
+
+    /// Returns the path for this compiler.
+    ///
+    /// Note that this may not be a path to a file on the filesystem, e.g. "cc",
+    /// but rather something which will be resolved when a process is spawned.
+    pub fn path(&self) -> &Path {
+        &self.path
+    }
+
+    /// Returns the default set of arguments to the compiler needed to produce
+    /// executables for the target this compiler generates.
+    pub fn args(&self) -> &[OsString] {
+        &self.args
+    }
+
+    /// Returns the set of environment variables needed for this compiler to
+    /// operate.
+    ///
+    /// This is typically only used for MSVC compilers currently.
+    pub fn env(&self) -> &[(OsString, OsString)] {
+        &self.env
+    }
+
+    /// Returns the compiler command in format of CC environment variable.
+    /// Or empty string if CC env was not present
+    ///
+    /// This is typically used by configure script
+    pub fn cc_env(&self) -> OsString {
+        match self.cc_wrapper_path {
+            Some(ref cc_wrapper_path) => {
+                let mut cc_env = cc_wrapper_path.as_os_str().to_owned();
+                cc_env.push(" ");
+                cc_env.push(self.path.to_path_buf().into_os_string());
+                for arg in self.cc_wrapper_args.iter() {
+                    cc_env.push(" ");
+                    cc_env.push(arg);
+                }
+                cc_env
+            },
+            None => {
+                OsString::from("")
+            }
+        }
+    }
+
+    /// Returns the compiler flags in format of CFLAGS environment variable.
+    /// Important here - this will not be CFLAGS from env, its internal gcc's flags to use as CFLAGS
+    /// This is typically used by configure script
+    pub fn cflags_env(&self) -> OsString {
+        let mut flags = OsString::new();
+        for (i, arg) in self.args.iter().enumerate() {
+            if i > 0 {
+                flags.push(" ");
+            }
+            flags.push(arg);
+        }
+        flags
+    }
+
+    /// Whether the tool is GNU Compiler Collection-like.
+    pub fn is_like_gnu(&self) -> bool {
+        self.family == ToolFamily::Gnu
+    }
+
+    /// Whether the tool is Clang-like.
+    pub fn is_like_clang(&self) -> bool {
+        self.family == ToolFamily::Clang
+    }
+
+    /// Whether the tool is MSVC-like.
+    pub fn is_like_msvc(&self) -> bool {
+        self.family == ToolFamily::Msvc
+    }
+}
+
+fn run(cmd: &mut Command, program: &str) -> Result<(), Error> {
+    let (mut child, print) = spawn(cmd, program)?;
+    let status = match child.wait() {
+        Ok(s) => s,
+        Err(_) => {
+            return Err(Error::new(
+                ErrorKind::ToolExecError,
+                &format!(
+                    "Failed to wait on spawned child process, command {:?} with args {:?}.",
+                    cmd,
+                    program
+                ),
+            ))
+        }
+    };
+    print.join().unwrap();
+    println!("{}", status);
+
+    if status.success() {
+        Ok(())
+    } else {
+        Err(Error::new(
+            ErrorKind::ToolExecError,
+            &format!(
+                "Command {:?} with args {:?} did not execute successfully (status code {}).",
+                cmd,
+                program,
+                status
+            ),
+        ))
+    }
+}
+
+fn run_output(cmd: &mut Command, program: &str) -> Result<Vec<u8>, Error> {
+    cmd.stdout(Stdio::piped());
+    let (mut child, print) = spawn(cmd, program)?;
+    let mut stdout = vec![];
+    child
+        .stdout
+        .take()
+        .unwrap()
+        .read_to_end(&mut stdout)
+        .unwrap();
+    let status = match child.wait() {
+        Ok(s) => s,
+        Err(_) => {
+            return Err(Error::new(
+                ErrorKind::ToolExecError,
+                &format!(
+                    "Failed to wait on spawned child process, command {:?} with args {:?}.",
+                    cmd,
+                    program
+                ),
+            ))
+        }
+    };
+    print.join().unwrap();
+    println!("{}", status);
+
+    if status.success() {
+        Ok(stdout)
+    } else {
+        Err(Error::new(
+            ErrorKind::ToolExecError,
+            &format!(
+                "Command {:?} with args {:?} did not execute successfully (status code {}).",
+                cmd,
+                program,
+                status
+            ),
+        ))
+    }
+}
+
+fn spawn(cmd: &mut Command, program: &str) -> Result<(Child, JoinHandle<()>), Error> {
+    println!("running: {:?}", cmd);
+
+    // Capture the standard error coming from these programs, and write it out
+    // with cargo:warning= prefixes. Note that this is a bit wonky to avoid
+    // requiring the output to be UTF-8, we instead just ship bytes from one
+    // location to another.
+    match cmd.stderr(Stdio::piped()).spawn() {
+        Ok(mut child) => {
+            let stderr = BufReader::new(child.stderr.take().unwrap());
+            let print = thread::spawn(move || for line in stderr.split(b'\n').filter_map(
+                |l| l.ok(),
+            )
+            {
+                print!("cargo:warning=");
+                std::io::stdout().write_all(&line).unwrap();
+                println!("");
+            });
+            Ok((child, print))
+        }
+        Err(ref e) if e.kind() == io::ErrorKind::NotFound => {
+            let extra = if cfg!(windows) {
+                " (see https://github.com/alexcrichton/cc-rs#compile-time-requirements \
+                   for help)"
+            } else {
+                ""
+            };
+            Err(Error::new(
+                ErrorKind::ToolNotFound,
+                &format!(
+                    "Failed to find tool. Is `{}` installed?{}",
+                    program,
+                    extra
+                ),
+            ))
+        }
+        Err(_) => Err(Error::new(
+            ErrorKind::ToolExecError,
+            &format!(
+                "Command {:?} with args {:?} failed to start.",
+                cmd,
+                program
+            ),
+        )),
+    }
+}
+
+fn fail(s: &str) -> ! {
+    panic!("\n\nInternal error occurred: {}\n\n", s)
+}
+
+
+fn command_add_output_file(cmd: &mut Command, dst: &Path, msvc: bool, is_asm: bool) {
+    if msvc && is_asm {
+        cmd.arg("/Fo").arg(dst);
+    } else if msvc {
+        let mut s = OsString::from("/Fo");
+        s.push(&dst);
+        cmd.arg(s);
+    } else {
+        cmd.arg("-o").arg(&dst);
+    }
+}
rename from third_party/rust/gcc-0.3.42/src/registry.rs
rename to third_party/rust/cc/src/registry.rs
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/src/setup_config.rs
@@ -0,0 +1,257 @@
+// Copyright © 2017 winapi-rs developers
+// Licensed under the Apache License, Version 2.0
+// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
+// All files in the project carrying such notice may not be copied, modified, or distributed
+// except according to those terms.
+
+#![allow(bad_style)]
+#![allow(unused)]
+
+use std::ffi::OsString;
+use std::ptr::null_mut;
+use winapi::Interface;
+use winapi::{LPFILETIME, ULONG};
+use winapi::S_FALSE;
+use winapi::BSTR;
+use winapi::LPCOLESTR;
+use winapi::{CLSCTX_ALL, CoCreateInstance};
+use winapi::LPSAFEARRAY;
+use winapi::{IUnknown, IUnknownVtbl};
+use winapi::{HRESULT, LCID, LPCWSTR, PULONGLONG};
+
+use com::{BStr, ComPtr};
+
+// Bindings to the Setup.Configuration stuff
+pub type InstanceState = u32;
+
+pub const eNone: InstanceState = 0;
+pub const eLocal: InstanceState = 1;
+pub const eRegistered: InstanceState = 2;
+pub const eNoRebootRequired: InstanceState = 4;
+pub const eComplete: InstanceState = -1i32 as u32;
+
+RIDL!{#[uuid(0xb41463c3, 0x8866, 0x43b5, 0xbc, 0x33, 0x2b, 0x06, 0x76, 0xf7, 0xf4, 0x2e)]
+interface ISetupInstance(ISetupInstanceVtbl): IUnknown(IUnknownVtbl) {
+    fn GetInstanceId(
+        pbstrInstanceId: *mut BSTR,
+    ) -> HRESULT,
+    fn GetInstallDate(
+        pInstallDate: LPFILETIME,
+    ) -> HRESULT,
+    fn GetInstallationName(
+        pbstrInstallationName: *mut BSTR,
+    ) -> HRESULT,
+    fn GetInstallationPath(
+        pbstrInstallationPath: *mut BSTR,
+    ) -> HRESULT,
+    fn GetInstallationVersion(
+        pbstrInstallationVersion: *mut BSTR,
+    ) -> HRESULT,
+    fn GetDisplayName(
+        lcid: LCID,
+        pbstrDisplayName: *mut BSTR,
+    ) -> HRESULT,
+    fn GetDescription(
+        lcid: LCID,
+        pbstrDescription: *mut BSTR,
+    ) -> HRESULT,
+    fn ResolvePath(
+        pwszRelativePath: LPCOLESTR,
+        pbstrAbsolutePath: *mut BSTR,
+    ) -> HRESULT,
+}}
+
+RIDL!{#[uuid(0x89143c9a, 0x05af, 0x49b0, 0xb7, 0x17, 0x72, 0xe2, 0x18, 0xa2, 0x18, 0x5c)]
+interface ISetupInstance2(ISetupInstance2Vtbl): ISetupInstance(ISetupInstanceVtbl) {
+    fn GetState(
+        pState: *mut InstanceState,
+    ) -> HRESULT,
+    fn GetPackages(
+        ppsaPackages: *mut LPSAFEARRAY,
+    ) -> HRESULT,
+    fn GetProduct(
+        ppPackage: *mut *mut ISetupPackageReference,
+    ) -> HRESULT,
+    fn GetProductPath(
+        pbstrProductPath: *mut BSTR,
+    ) -> HRESULT,
+}}
+
+RIDL!{#[uuid(0x6380bcff, 0x41d3, 0x4b2e, 0x8b, 0x2e, 0xbf, 0x8a, 0x68, 0x10, 0xc8, 0x48)]
+interface IEnumSetupInstances(IEnumSetupInstancesVtbl): IUnknown(IUnknownVtbl) {
+    fn Next(
+        celt: ULONG,
+        rgelt: *mut *mut ISetupInstance,
+        pceltFetched: *mut ULONG,
+    ) -> HRESULT,
+    fn Skip(
+        celt: ULONG,
+    ) -> HRESULT,
+    fn Reset() -> HRESULT,
+    fn Clone(
+        ppenum: *mut *mut IEnumSetupInstances,
+    ) -> HRESULT,
+}}
+
+RIDL!{#[uuid(0x42843719, 0xdb4c, 0x46c2, 0x8e, 0x7c, 0x64, 0xf1, 0x81, 0x6e, 0xfd, 0x5b)]
+interface ISetupConfiguration(ISetupConfigurationVtbl): IUnknown(IUnknownVtbl) {
+    fn EnumInstances(
+        ppEnumInstances: *mut *mut IEnumSetupInstances,
+    ) -> HRESULT,
+    fn GetInstanceForCurrentProcess(
+        ppInstance: *mut *mut ISetupInstance,
+    ) -> HRESULT,
+    fn GetInstanceForPath(
+        wzPath: LPCWSTR,
+        ppInstance: *mut *mut ISetupInstance,
+    ) -> HRESULT,
+}}
+
+RIDL!{#[uuid(0x26aab78c, 0x4a60, 0x49d6, 0xaf, 0x3b, 0x3c, 0x35, 0xbc, 0x93, 0x36, 0x5d)]
+interface ISetupConfiguration2(ISetupConfiguration2Vtbl):
+    ISetupConfiguration(ISetupConfigurationVtbl) {
+    fn EnumAllInstances(
+        ppEnumInstances: *mut *mut IEnumSetupInstances,
+    ) -> HRESULT,
+}}
+
+RIDL!{#[uuid(0xda8d8a16, 0xb2b6, 0x4487, 0xa2, 0xf1, 0x59, 0x4c, 0xcc, 0xcd, 0x6b, 0xf5)]
+interface ISetupPackageReference(ISetupPackageReferenceVtbl): IUnknown(IUnknownVtbl) {
+    fn GetId(
+        pbstrId: *mut BSTR,
+    ) -> HRESULT,
+    fn GetVersion(
+        pbstrVersion: *mut BSTR,
+    ) -> HRESULT,
+    fn GetChip(
+        pbstrChip: *mut BSTR,
+    ) -> HRESULT,
+    fn GetLanguage(
+        pbstrLanguage: *mut BSTR,
+    ) -> HRESULT,
+    fn GetBranch(
+        pbstrBranch: *mut BSTR,
+    ) -> HRESULT,
+    fn GetType(
+        pbstrType: *mut BSTR,
+    ) -> HRESULT,
+    fn GetUniqueId(
+        pbstrUniqueId: *mut BSTR,
+    ) -> HRESULT,
+}}
+
+RIDL!{#[uuid(0x42b21b78, 0x6192, 0x463e, 0x87, 0xbf, 0xd5, 0x77, 0x83, 0x8f, 0x1d, 0x5c)]
+interface ISetupHelper(ISetupHelperVtbl): IUnknown(IUnknownVtbl) {
+    fn ParseVersion(
+        pwszVersion: LPCOLESTR,
+        pullVersion: PULONGLONG,
+    ) -> HRESULT,
+    fn ParseVersionRange(
+        pwszVersionRange: LPCOLESTR,
+        pullMinVersion: PULONGLONG,
+        pullMaxVersion: PULONGLONG,
+    ) -> HRESULT,
+}}
+
+DEFINE_GUID!{CLSID_SetupConfiguration,
+    0x177f0c4a, 0x1cd3, 0x4de7, 0xa3, 0x2c, 0x71, 0xdb, 0xbb, 0x9f, 0xa3, 0x6d}
+
+// Safe wrapper around the COM interfaces
+pub struct SetupConfiguration(ComPtr<ISetupConfiguration>);
+
+impl SetupConfiguration {
+    pub fn new() -> Result<SetupConfiguration, i32> {
+        let mut obj = null_mut();
+        let err = unsafe { CoCreateInstance(
+            &CLSID_SetupConfiguration, null_mut(), CLSCTX_ALL,
+            &ISetupConfiguration::uuidof(), &mut obj,
+        ) };
+        if err < 0 { return Err(err); }
+        let obj = unsafe { ComPtr::from_raw(obj as *mut ISetupConfiguration) };
+        Ok(SetupConfiguration(obj))
+    }
+    pub fn get_instance_for_current_process(&self) -> Result<SetupInstance, i32> {
+        let mut obj = null_mut();
+        let err = unsafe { self.0.GetInstanceForCurrentProcess(&mut obj) };
+        if err < 0 { return Err(err); }
+        Ok(unsafe { SetupInstance::from_raw(obj) })
+    }
+    pub fn enum_instances(&self) -> Result<EnumSetupInstances, i32> {
+        let mut obj = null_mut();
+        let err = unsafe { self.0.EnumInstances(&mut obj) };
+        if err < 0 { return Err(err); }
+        Ok(unsafe { EnumSetupInstances::from_raw(obj) })
+    }
+    pub fn enum_all_instances(&self) -> Result<EnumSetupInstances, i32> {
+        let mut obj = null_mut();
+        let this = try!(self.0.cast::<ISetupConfiguration2>());
+        let err = unsafe { this.EnumAllInstances(&mut obj) };
+        if err < 0 { return Err(err); }
+        Ok(unsafe { EnumSetupInstances::from_raw(obj) })
+    }
+}
+
+pub struct SetupInstance(ComPtr<ISetupInstance>);
+
+impl SetupInstance {
+    pub unsafe fn from_raw(obj: *mut ISetupInstance) -> SetupInstance {
+        SetupInstance(ComPtr::from_raw(obj))
+    }
+    pub fn instance_id(&self) -> Result<OsString, i32> {
+        let mut s = null_mut();
+        let err = unsafe { self.0.GetInstanceId(&mut s) };
+        let bstr = unsafe { BStr::from_raw(s) };
+        if err < 0 { return Err(err); }
+        Ok(bstr.to_osstring())
+    }
+    pub fn installation_name(&self) -> Result<OsString, i32> {
+        let mut s = null_mut();
+        let err = unsafe { self.0.GetInstallationName(&mut s) };
+        let bstr = unsafe { BStr::from_raw(s) };
+        if err < 0 { return Err(err); }
+        Ok(bstr.to_osstring())
+    }
+    pub fn installation_path(&self) -> Result<OsString, i32> {
+        let mut s = null_mut();
+        let err = unsafe { self.0.GetInstallationPath(&mut s) };
+        let bstr = unsafe { BStr::from_raw(s) };
+        if err < 0 { return Err(err); }
+        Ok(bstr.to_osstring())
+    }
+    pub fn installation_version(&self) -> Result<OsString, i32> {
+        let mut s = null_mut();
+        let err = unsafe { self.0.GetInstallationVersion(&mut s) };
+        let bstr = unsafe { BStr::from_raw(s) };
+        if err < 0 { return Err(err); }
+        Ok(bstr.to_osstring())
+    }
+    pub fn product_path(&self) -> Result<OsString, i32> {
+        let mut s = null_mut();
+        let this = try!(self.0.cast::<ISetupInstance2>());
+        let err = unsafe { this.GetProductPath(&mut s) };
+        let bstr = unsafe { BStr::from_raw(s) };
+        if err < 0 { return Err(err); }
+        Ok(bstr.to_osstring())
+    }
+}
+
+pub struct EnumSetupInstances(ComPtr<IEnumSetupInstances>);
+
+impl EnumSetupInstances {
+    pub unsafe fn from_raw(obj: *mut IEnumSetupInstances) -> EnumSetupInstances {
+        EnumSetupInstances(ComPtr::from_raw(obj))
+    }
+}
+
+impl Iterator for EnumSetupInstances {
+    type Item = Result<SetupInstance, i32>;
+    fn next(&mut self) -> Option<Result<SetupInstance, i32>> {
+        let mut obj = null_mut();
+        let err = unsafe { self.0.Next(1, &mut obj, null_mut()) };
+        if err < 0 { return Some(Err(err)); }
+        if err == S_FALSE { return None; }
+        Some(Ok(unsafe { SetupInstance::from_raw(obj) }))
+    }
+}
+
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/src/winapi.rs
@@ -0,0 +1,214 @@
+// Copyright © 2015-2017 winapi-rs developers
+// Licensed under the Apache License, Version 2.0
+// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
+// All files in the project carrying such notice may not be copied, modified, or distributed
+// except according to those terms.
+
+#![allow(bad_style)]
+
+use std::os::raw;
+
+pub type wchar_t = u16;
+
+pub type UINT = raw::c_uint;
+pub type LPUNKNOWN = *mut IUnknown;
+pub type REFIID = *const IID;
+pub type IID = GUID;
+pub type REFCLSID = *const IID;
+pub type PVOID = *mut raw::c_void;
+pub type USHORT = raw::c_ushort;
+pub type ULONG = raw::c_ulong;
+pub type LONG = raw::c_long;
+pub type DWORD = u32;
+pub type LPVOID = *mut raw::c_void;
+pub type HRESULT = raw::c_long;
+pub type LPFILETIME = *mut FILETIME;
+pub type BSTR = *mut OLECHAR;
+pub type OLECHAR = WCHAR;
+pub type WCHAR = wchar_t;
+pub type LPCOLESTR = *const OLECHAR;
+pub type LCID = DWORD;
+pub type LPCWSTR = *const WCHAR;
+pub type PULONGLONG = *mut ULONGLONG;
+pub type ULONGLONG = u64;
+
+pub const S_OK: HRESULT = 0;
+pub const S_FALSE: HRESULT = 1;
+pub const COINIT_MULTITHREADED: u32 = 0x0;
+
+pub type CLSCTX = u32;
+
+pub const CLSCTX_INPROC_SERVER: CLSCTX = 0x1;
+pub const CLSCTX_INPROC_HANDLER: CLSCTX = 0x2;
+pub const CLSCTX_LOCAL_SERVER: CLSCTX = 0x4;
+pub const CLSCTX_REMOTE_SERVER: CLSCTX = 0x10;
+
+pub const CLSCTX_ALL: CLSCTX = CLSCTX_INPROC_SERVER |
+    CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER;
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct GUID {
+    pub Data1: raw::c_ulong,
+    pub Data2: raw::c_ushort,
+    pub Data3: raw::c_ushort,
+    pub Data4: [raw::c_uchar; 8],
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct FILETIME {
+    pub dwLowDateTime: DWORD,
+    pub dwHighDateTime: DWORD,
+}
+
+pub trait Interface {
+    fn uuidof() -> GUID;
+}
+
+#[link(name = "ole32")]
+#[link(name = "oleaut32")]
+extern { }
+
+extern "system" {
+    pub fn CoInitializeEx(pvReserved: LPVOID, dwCoInit: DWORD) -> HRESULT;
+    pub fn CoCreateInstance(rclsid: REFCLSID, pUnkOuter: LPUNKNOWN,
+                            dwClsContext: DWORD, riid: REFIID,
+                            ppv: *mut LPVOID) -> HRESULT;
+    pub fn SysFreeString(bstrString: BSTR);
+    pub fn SysStringLen(pbstr: BSTR) -> UINT;
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct SAFEARRAYBOUND {
+    pub cElements: ULONG,
+    pub lLbound: LONG,
+}
+
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct SAFEARRAY {
+    pub cDims: USHORT,
+    pub fFeatures: USHORT,
+    pub cbElements: ULONG,
+    pub cLocks: ULONG,
+    pub pvData: PVOID,
+    pub rgsabound: [SAFEARRAYBOUND; 1],
+}
+
+pub type LPSAFEARRAY = *mut SAFEARRAY;
+
+macro_rules! DEFINE_GUID {
+    (
+        $name:ident, $l:expr, $w1:expr, $w2:expr,
+        $b1:expr, $b2:expr, $b3:expr, $b4:expr, $b5:expr, $b6:expr, $b7:expr, $b8:expr
+    ) => {
+        pub const $name: $crate::winapi::GUID = $crate::winapi::GUID {
+            Data1: $l,
+            Data2: $w1,
+            Data3: $w2,
+            Data4: [$b1, $b2, $b3, $b4, $b5, $b6, $b7, $b8],
+        };
+    }
+}
+
+macro_rules! RIDL {
+    (#[uuid($($uuid:expr),+)]
+    interface $interface:ident ($vtbl:ident) {$(
+        fn $method:ident($($p:ident : $t:ty,)*) -> $rtr:ty,
+    )+}) => (
+        #[repr(C)]
+        pub struct $vtbl {
+            $(pub $method: unsafe extern "system" fn(
+                This: *mut $interface,
+                $($p: $t),*
+            ) -> $rtr,)+
+        }
+        #[repr(C)]
+        pub struct $interface {
+            pub lpVtbl: *const $vtbl,
+        }
+        RIDL!{@impl $interface {$(fn $method($($p: $t,)*) -> $rtr,)+}}
+        RIDL!{@uuid $interface $($uuid),+}
+    );
+    (#[uuid($($uuid:expr),+)]
+    interface $interface:ident ($vtbl:ident) : $pinterface:ident ($pvtbl:ident) {
+    }) => (
+        #[repr(C)]
+        pub struct $vtbl {
+            pub parent: $pvtbl,
+        }
+        #[repr(C)]
+        pub struct $interface {
+            pub lpVtbl: *const $vtbl,
+        }
+        RIDL!{@deref $interface $pinterface}
+        RIDL!{@uuid $interface $($uuid),+}
+    );
+    (#[uuid($($uuid:expr),+)]
+    interface $interface:ident ($vtbl:ident) : $pinterface:ident ($pvtbl:ident) {$(
+        fn $method:ident($($p:ident : $t:ty,)*) -> $rtr:ty,
+    )+}) => (
+        #[repr(C)]
+        pub struct $vtbl {
+            pub parent: $pvtbl,
+            $(pub $method: unsafe extern "system" fn(
+                This: *mut $interface,
+                $($p: $t,)*
+            ) -> $rtr,)+
+        }
+        #[repr(C)]
+        pub struct $interface {
+            pub lpVtbl: *const $vtbl,
+        }
+        RIDL!{@impl $interface {$(fn $method($($p: $t,)*) -> $rtr,)+}}
+        RIDL!{@deref $interface $pinterface}
+        RIDL!{@uuid $interface $($uuid),+}
+    );
+    (@deref $interface:ident $pinterface:ident) => (
+        impl ::std::ops::Deref for $interface {
+            type Target = $pinterface;
+            #[inline]
+            fn deref(&self) -> &$pinterface {
+                unsafe { &*(self as *const $interface as *const $pinterface) }
+            }
+        }
+    );
+    (@impl $interface:ident {$(
+        fn $method:ident($($p:ident : $t:ty,)*) -> $rtr:ty,
+    )+}) => (
+        impl $interface {
+            $(#[inline] pub unsafe fn $method(&self, $($p: $t,)*) -> $rtr {
+                ((*self.lpVtbl).$method)(self as *const _ as *mut _, $($p,)*)
+            })+
+        }
+    );
+    (@uuid $interface:ident
+        $l:expr, $w1:expr, $w2:expr,
+        $b1:expr, $b2:expr, $b3:expr, $b4:expr, $b5:expr, $b6:expr, $b7:expr, $b8:expr
+    ) => (
+        impl $crate::winapi::Interface for $interface {
+            #[inline]
+            fn uuidof() -> $crate::winapi::GUID {
+                $crate::winapi::GUID {
+                    Data1: $l,
+                    Data2: $w1,
+                    Data3: $w2,
+                    Data4: [$b1, $b2, $b3, $b4, $b5, $b6, $b7, $b8],
+                }
+            }
+        }
+    );
+}
+
+RIDL!{#[uuid(0x00000000, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46)]
+interface IUnknown(IUnknownVtbl) {
+    fn QueryInterface(
+        riid: REFIID,
+        ppvObject: *mut *mut raw::c_void,
+    ) -> HRESULT,
+    fn AddRef() -> ULONG,
+    fn Release() -> ULONG,
+}}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/src/windows_registry.rs
@@ -0,0 +1,634 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! A helper module to probe the Windows Registry when looking for
+//! windows-specific tools.
+
+use std::process::Command;
+
+use Tool;
+
+#[cfg(windows)]
+macro_rules! otry {
+    ($expr:expr) => (match $expr {
+        Some(val) => val,
+        None => return None,
+    })
+}
+
+/// Attempts to find a tool within an MSVC installation using the Windows
+/// registry as a point to search from.
+///
+/// The `target` argument is the target that the tool should work for (e.g.
+/// compile or link for) and the `tool` argument is the tool to find (e.g.
+/// `cl.exe` or `link.exe`).
+///
+/// This function will return `None` if the tool could not be found, or it will
+/// return `Some(cmd)` which represents a command that's ready to execute the
+/// tool with the appropriate environment variables set.
+///
+/// Note that this function always returns `None` for non-MSVC targets.
+pub fn find(target: &str, tool: &str) -> Option<Command> {
+    find_tool(target, tool).map(|c| c.to_command())
+}
+
+/// Similar to the `find` function above, this function will attempt the same
+/// operation (finding a MSVC tool in a local install) but instead returns a
+/// `Tool` which may be introspected.
+#[cfg(not(windows))]
+pub fn find_tool(_target: &str, _tool: &str) -> Option<Tool> {
+    None
+}
+
+/// Documented above.
+#[cfg(windows)]
+pub fn find_tool(target: &str, tool: &str) -> Option<Tool> {
+    use std::env;
+
+    // This logic is all tailored for MSVC, if we're not that then bail out
+    // early.
+    if !target.contains("msvc") {
+        return None;
+    }
+
+    // Looks like msbuild isn't located in the same location as other tools like
+    // cl.exe and lib.exe. To handle this we probe for it manually with
+    // dedicated registry keys.
+    if tool.contains("msbuild") {
+        return impl_::find_msbuild(target);
+    }
+
+    // If VCINSTALLDIR is set, then someone's probably already run vcvars and we
+    // should just find whatever that indicates.
+    if env::var_os("VCINSTALLDIR").is_some() {
+        return env::var_os("PATH")
+            .and_then(|path| env::split_paths(&path).map(|p| p.join(tool)).find(|p| p.exists()))
+            .map(|path| Tool::new(path.into()));
+    }
+
+    // Ok, if we're here, now comes the fun part of the probing. Default shells
+    // or shells like MSYS aren't really configured to execute `cl.exe` and the
+    // various compiler tools shipped as part of Visual Studio. Here we try to
+    // first find the relevant tool, then we also have to be sure to fill in
+    // environment variables like `LIB`, `INCLUDE`, and `PATH` to ensure that
+    // the tool is actually usable.
+
+    return impl_::find_msvc_15(tool, target)
+        .or_else(|| impl_::find_msvc_14(tool, target))
+        .or_else(|| impl_::find_msvc_12(tool, target))
+        .or_else(|| impl_::find_msvc_11(tool, target));
+}
+
+/// A version of Visual Studio
+#[derive(Debug, PartialEq, Eq, Copy, Clone)]
+pub enum VsVers {
+    /// Visual Studio 12 (2013)
+    Vs12,
+    /// Visual Studio 14 (2015)
+    Vs14,
+    /// Visual Studio 15 (2017)
+    Vs15,
+
+    /// Hidden variant that should not be matched on. Callers that want to
+    /// handle an enumeration of `VsVers` instances should always have a default
+    /// case meaning that it's a VS version they don't understand.
+    #[doc(hidden)]
+    #[allow(bad_style)]
+    __Nonexhaustive_do_not_match_this_or_your_code_will_break,
+}
+
+/// Find the most recent installed version of Visual Studio
+///
+/// This is used by the cmake crate to figure out the correct
+/// generator.
+#[cfg(not(windows))]
+pub fn find_vs_version() -> Result<VsVers, String> {
+    Err(format!("not windows"))
+}
+
+/// Documented above
+#[cfg(windows)]
+pub fn find_vs_version() -> Result<VsVers, String> {
+    use std::env;
+
+    match env::var("VisualStudioVersion") {
+        Ok(version) => {
+            match &version[..] {
+                "15.0" => Ok(VsVers::Vs15),
+                "14.0" => Ok(VsVers::Vs14),
+                "12.0" => Ok(VsVers::Vs12),
+                vers => Err(format!("\n\n\
+                                     unsupported or unknown VisualStudio version: {}\n\
+                                     if another version is installed consider running \
+                                     the appropriate vcvars script before building this \
+                                     crate\n\
+                                     ", vers)),
+            }
+        }
+        _ => {
+            // Check for the presense of a specific registry key
+            // that indicates visual studio is installed.
+            if impl_::has_msbuild_version("15.0") {
+                Ok(VsVers::Vs15)
+            } else if impl_::has_msbuild_version("14.0") {
+                Ok(VsVers::Vs14)
+            } else if impl_::has_msbuild_version("12.0") {
+                Ok(VsVers::Vs12)
+            } else {
+                Err(format!("\n\n\
+                             couldn't determine visual studio generator\n\
+                             if VisualStudio is installed, however, consider \
+                             running the appropriate vcvars script before building \
+                             this crate\n\
+                             "))
+            }
+        }
+    }
+}
+
+#[cfg(windows)]
+mod impl_ {
+    use std::env;
+    use std::ffi::OsString;
+    use std::mem;
+    use std::path::{Path, PathBuf};
+    use std::fs::File;
+    use std::io::Read;
+    use registry::{RegistryKey, LOCAL_MACHINE};
+    use com;
+    use setup_config::{SetupConfiguration, SetupInstance};
+
+    use Tool;
+
+    struct MsvcTool {
+        tool: PathBuf,
+        libs: Vec<PathBuf>,
+        path: Vec<PathBuf>,
+        include: Vec<PathBuf>,
+    }
+
+    impl MsvcTool {
+        fn new(tool: PathBuf) -> MsvcTool {
+            MsvcTool {
+                tool: tool,
+                libs: Vec::new(),
+                path: Vec::new(),
+                include: Vec::new(),
+            }
+        }
+
+        fn into_tool(self) -> Tool {
+            let MsvcTool { tool, libs, path, include } = self;
+            let mut tool = Tool::new(tool.into());
+            add_env(&mut tool, "LIB", libs);
+            add_env(&mut tool, "PATH", path);
+            add_env(&mut tool, "INCLUDE", include);
+            tool
+        }
+    }
+
+    // In MSVC 15 (2017) MS once again changed the scheme for locating
+    // the tooling.  Now we must go through some COM interfaces, which
+    // is super fun for Rust.
+    //
+    // Note that much of this logic can be found [online] wrt paths, COM, etc.
+    //
+    // [online]: https://blogs.msdn.microsoft.com/vcblog/2017/03/06/finding-the-visual-c-compiler-tools-in-visual-studio-2017/
+    pub fn find_msvc_15(tool: &str, target: &str) -> Option<Tool> {
+        otry!(com::initialize().ok());
+
+        let config = otry!(SetupConfiguration::new().ok());
+        let iter = otry!(config.enum_all_instances().ok());
+        for instance in iter {
+            let instance = otry!(instance.ok());
+            let tool = tool_from_vs15_instance(tool, target, &instance);
+            if tool.is_some() {
+                return tool;
+            }
+        }
+
+        None
+    }
+
+    fn tool_from_vs15_instance(tool: &str, target: &str,
+                               instance: &SetupInstance) -> Option<Tool> {
+        let (bin_path, host_dylib_path, lib_path, include_path) = otry!(vs15_vc_paths(target, instance));
+        let tool_path = bin_path.join(tool);
+        if !tool_path.exists() { return None };
+
+        let mut tool = MsvcTool::new(tool_path);
+        tool.path.push(host_dylib_path);
+        tool.libs.push(lib_path);
+        tool.include.push(include_path);
+
+        if let Some((atl_lib_path, atl_include_path)) = atl_paths(target, &bin_path) {
+            tool.libs.push(atl_lib_path);
+            tool.include.push(atl_include_path);
+        }
+
+        otry!(add_sdks(&mut tool, target));
+
+        Some(tool.into_tool())
+    }
+
+    fn vs15_vc_paths(target: &str, instance: &SetupInstance) -> Option<(PathBuf, PathBuf, PathBuf, PathBuf)> {
+        let instance_path: PathBuf = otry!(instance.installation_path().ok()).into();
+        let version_path = instance_path.join(r"VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt");
+        let mut version_file = otry!(File::open(version_path).ok());
+        let mut version = String::new();
+        otry!(version_file.read_to_string(&mut version).ok());
+        let version = version.trim();
+        let host = match host_arch() {
+            X86 => "X86",
+            X86_64 => "X64",
+            _ => return None,
+        };
+        let target = otry!(lib_subdir(target));
+        // The directory layout here is MSVC/bin/Host$host/$target/
+        let path = instance_path.join(r"VC\Tools\MSVC").join(version);
+        // This is the path to the toolchain for a particular target, running
+        // on a given host
+        let bin_path = path.join("bin").join(&format!("Host{}", host)).join(&target);
+        // But! we also need PATH to contain the target directory for the host
+        // architecture, because it contains dlls like mspdb140.dll compiled for
+        // the host architecture.
+        let host_dylib_path = path.join("bin").join(&format!("Host{}", host)).join(&host.to_lowercase());
+        let lib_path = path.join("lib").join(&target);
+        let include_path = path.join("include");
+        Some((bin_path, host_dylib_path, lib_path, include_path))
+    }
+
+    fn atl_paths(target: &str, path: &Path) -> Option<(PathBuf, PathBuf)> {
+        let atl_path = path.join("atlfmc");
+        let sub = otry!(lib_subdir(target));
+        if atl_path.exists() {
+            Some((atl_path.join("lib").join(sub), atl_path.join("include")))
+        } else {
+            None
+        }
+    }
+
+    // For MSVC 14 we need to find the Universal CRT as well as either
+    // the Windows 10 SDK or Windows 8.1 SDK.
+    pub fn find_msvc_14(tool: &str, target: &str) -> Option<Tool> {
+        let vcdir = otry!(get_vc_dir("14.0"));
+        let mut tool = otry!(get_tool(tool, &vcdir, target));
+        otry!(add_sdks(&mut tool, target));
+        Some(tool.into_tool())
+    }
+
+    fn add_sdks(tool: &mut MsvcTool, target: &str) -> Option<()> {
+        let sub = otry!(lib_subdir(target));
+        let (ucrt, ucrt_version) = otry!(get_ucrt_dir());
+
+        tool.path.push(ucrt.join("bin").join(&ucrt_version).join(sub));
+
+        let ucrt_include = ucrt.join("include").join(&ucrt_version);
+        tool.include.push(ucrt_include.join("ucrt"));
+
+        let ucrt_lib = ucrt.join("lib").join(&ucrt_version);
+        tool.libs.push(ucrt_lib.join("ucrt").join(sub));
+
+        if let Some((sdk, version)) = get_sdk10_dir() {
+            tool.path.push(sdk.join("bin").join(sub));
+            let sdk_lib = sdk.join("lib").join(&version);
+            tool.libs.push(sdk_lib.join("um").join(sub));
+            let sdk_include = sdk.join("include").join(&version);
+            tool.include.push(sdk_include.join("um"));
+            tool.include.push(sdk_include.join("winrt"));
+            tool.include.push(sdk_include.join("shared"));
+        } else if let Some(sdk) = get_sdk81_dir() {
+            tool.path.push(sdk.join("bin").join(sub));
+            let sdk_lib = sdk.join("lib").join("winv6.3");
+            tool.libs.push(sdk_lib.join("um").join(sub));
+            let sdk_include = sdk.join("include");
+            tool.include.push(sdk_include.join("um"));
+            tool.include.push(sdk_include.join("winrt"));
+            tool.include.push(sdk_include.join("shared"));
+        }
+
+        Some(())
+    }
+
+    // For MSVC 12 we need to find the Windows 8.1 SDK.
+    pub fn find_msvc_12(tool: &str, target: &str) -> Option<Tool> {
+        let vcdir = otry!(get_vc_dir("12.0"));
+        let mut tool = otry!(get_tool(tool, &vcdir, target));
+        let sub = otry!(lib_subdir(target));
+        let sdk81 = otry!(get_sdk81_dir());
+        tool.path.push(sdk81.join("bin").join(sub));
+        let sdk_lib = sdk81.join("lib").join("winv6.3");
+        tool.libs.push(sdk_lib.join("um").join(sub));
+        let sdk_include = sdk81.join("include");
+        tool.include.push(sdk_include.join("shared"));
+        tool.include.push(sdk_include.join("um"));
+        tool.include.push(sdk_include.join("winrt"));
+        Some(tool.into_tool())
+    }
+
+    // For MSVC 11 we need to find the Windows 8 SDK.
+    pub fn find_msvc_11(tool: &str, target: &str) -> Option<Tool> {
+        let vcdir = otry!(get_vc_dir("11.0"));
+        let mut tool = otry!(get_tool(tool, &vcdir, target));
+        let sub = otry!(lib_subdir(target));
+        let sdk8 = otry!(get_sdk8_dir());
+        tool.path.push(sdk8.join("bin").join(sub));
+        let sdk_lib = sdk8.join("lib").join("win8");
+        tool.libs.push(sdk_lib.join("um").join(sub));
+        let sdk_include = sdk8.join("include");
+        tool.include.push(sdk_include.join("shared"));
+        tool.include.push(sdk_include.join("um"));
+        tool.include.push(sdk_include.join("winrt"));
+        Some(tool.into_tool())
+    }
+
+    fn add_env(tool: &mut Tool, env: &str, paths: Vec<PathBuf>) {
+        let prev = env::var_os(env).unwrap_or(OsString::new());
+        let prev = env::split_paths(&prev);
+        let new = paths.into_iter().chain(prev);
+        tool.env.push((env.to_string().into(), env::join_paths(new).unwrap()));
+    }
+
+    // Given a possible MSVC installation directory, we look for the linker and
+    // then add the MSVC library path.
+    fn get_tool(tool: &str, path: &Path, target: &str) -> Option<MsvcTool> {
+        bin_subdir(target)
+            .into_iter()
+            .map(|(sub, host)| (path.join("bin").join(sub).join(tool), path.join("bin").join(host)))
+            .filter(|&(ref path, _)| path.is_file())
+            .map(|(path, host)| {
+                let mut tool = MsvcTool::new(path);
+                tool.path.push(host);
+                tool
+            })
+            .filter_map(|mut tool| {
+                let sub = otry!(vc_lib_subdir(target));
+                tool.libs.push(path.join("lib").join(sub));
+                tool.include.push(path.join("include"));
+                let atlmfc_path = path.join("atlmfc");
+                if atlmfc_path.exists() {
+                    tool.libs.push(atlmfc_path.join("lib").join(sub));
+                    tool.include.push(atlmfc_path.join("include"));
+                }
+                Some(tool)
+            })
+            .next()
+    }
+
+    // To find MSVC we look in a specific registry key for the version we are
+    // trying to find.
+    fn get_vc_dir(ver: &str) -> Option<PathBuf> {
+        let key = r"SOFTWARE\Microsoft\VisualStudio\SxS\VC7";
+        let key = otry!(LOCAL_MACHINE.open(key.as_ref()).ok());
+        let path = otry!(key.query_str(ver).ok());
+        Some(path.into())
+    }
+
+    // To find the Universal CRT we look in a specific registry key for where
+    // all the Universal CRTs are located and then sort them asciibetically to
+    // find the newest version. While this sort of sorting isn't ideal,  it is
+    // what vcvars does so that's good enough for us.
+    //
+    // Returns a pair of (root, version) for the ucrt dir if found
+    fn get_ucrt_dir() -> Option<(PathBuf, String)> {
+        let key = r"SOFTWARE\Microsoft\Windows Kits\Installed Roots";
+        let key = otry!(LOCAL_MACHINE.open(key.as_ref()).ok());
+        let root = otry!(key.query_str("KitsRoot10").ok());
+        let readdir = otry!(Path::new(&root).join("lib").read_dir().ok());
+        let max_libdir = otry!(readdir.filter_map(|dir| dir.ok())
+            .map(|dir| dir.path())
+            .filter(|dir| {
+                dir.components()
+                    .last()
+                    .and_then(|c| c.as_os_str().to_str())
+                    .map(|c| c.starts_with("10.") && dir.join("ucrt").is_dir())
+                    .unwrap_or(false)
+            })
+            .max());
+        let version = max_libdir.components().last().unwrap();
+        let version = version.as_os_str().to_str().unwrap().to_string();
+        Some((root.into(), version))
+    }
+
+    // Vcvars finds the correct version of the Windows 10 SDK by looking
+    // for the include `um\Windows.h` because sometimes a given version will
+    // only have UCRT bits without the rest of the SDK. Since we only care about
+    // libraries and not includes, we instead look for `um\x64\kernel32.lib`.
+    // Since the 32-bit and 64-bit libraries are always installed together we
+    // only need to bother checking x64, making this code a tiny bit simpler.
+    // Like we do for the Universal CRT, we sort the possibilities
+    // asciibetically to find the newest one as that is what vcvars does.
+    fn get_sdk10_dir() -> Option<(PathBuf, String)> {
+        let key = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0";
+        let key = otry!(LOCAL_MACHINE.open(key.as_ref()).ok());
+        let root = otry!(key.query_str("InstallationFolder").ok());
+        let readdir = otry!(Path::new(&root).join("lib").read_dir().ok());
+        let mut dirs = readdir.filter_map(|dir| dir.ok())
+            .map(|dir| dir.path())
+            .collect::<Vec<_>>();
+        dirs.sort();
+        let dir = otry!(dirs.into_iter()
+            .rev()
+            .filter(|dir| dir.join("um").join("x64").join("kernel32.lib").is_file())
+            .next());
+        let version = dir.components().last().unwrap();
+        let version = version.as_os_str().to_str().unwrap().to_string();
+        Some((root.into(), version))
+    }
+
+    // Interestingly there are several subdirectories, `win7` `win8` and
+    // `winv6.3`. Vcvars seems to only care about `winv6.3` though, so the same
+    // applies to us. Note that if we were targetting kernel mode drivers
+    // instead of user mode applications, we would care.
+    fn get_sdk81_dir() -> Option<PathBuf> {
+        let key = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1";
+        let key = otry!(LOCAL_MACHINE.open(key.as_ref()).ok());
+        let root = otry!(key.query_str("InstallationFolder").ok());
+        Some(root.into())
+    }
+
+    fn get_sdk8_dir() -> Option<PathBuf> {
+        let key = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0";
+        let key = otry!(LOCAL_MACHINE.open(key.as_ref()).ok());
+        let root = otry!(key.query_str("InstallationFolder").ok());
+        Some(root.into())
+    }
+
+    const PROCESSOR_ARCHITECTURE_INTEL: u16 = 0;
+    const PROCESSOR_ARCHITECTURE_AMD64: u16 = 9;
+    const X86: u16 = PROCESSOR_ARCHITECTURE_INTEL;
+    const X86_64: u16 = PROCESSOR_ARCHITECTURE_AMD64;
+
+    // When choosing the tool to use, we have to choose the one which matches
+    // the target architecture. Otherwise we end up in situations where someone
+    // on 32-bit Windows is trying to cross compile to 64-bit and it tries to
+    // invoke the native 64-bit compiler which won't work.
+    //
+    // For the return value of this function, the first member of the tuple is
+    // the folder of the tool we will be invoking, while the second member is
+    // the folder of the host toolchain for that tool which is essential when
+    // using a cross linker. We return a Vec since on x64 there are often two
+    // linkers that can target the architecture we desire. The 64-bit host
+    // linker is preferred, and hence first, due to 64-bit allowing it more
+    // address space to work with and potentially being faster.
+    fn bin_subdir(target: &str) -> Vec<(&'static str, &'static str)> {
+        let arch = target.split('-').next().unwrap();
+        match (arch, host_arch()) {
+            ("i586", X86) | ("i686", X86) => vec![("", "")],
+            ("i586", X86_64) | ("i686", X86_64) => vec![("amd64_x86", "amd64"), ("", "")],
+            ("x86_64", X86) => vec![("x86_amd64", "")],
+            ("x86_64", X86_64) => vec![("amd64", "amd64"), ("x86_amd64", "")],
+            ("arm", X86) => vec![("x86_arm", "")],
+            ("arm", X86_64) => vec![("amd64_arm", "amd64"), ("x86_arm", "")],
+            _ => vec![],
+        }
+    }
+
+    fn lib_subdir(target: &str) -> Option<&'static str> {
+        let arch = target.split('-').next().unwrap();
+        match arch {
+            "i586" | "i686" => Some("x86"),
+            "x86_64" => Some("x64"),
+            "arm" => Some("arm"),
+            _ => None,
+        }
+    }
+
+    // MSVC's x86 libraries are not in a subfolder
+    fn vc_lib_subdir(target: &str) -> Option<&'static str> {
+        let arch = target.split('-').next().unwrap();
+        match arch {
+            "i586" | "i686" => Some(""),
+            "x86_64" => Some("amd64"),
+            "arm" => Some("arm"),
+            _ => None,
+        }
+    }
+
+    #[allow(bad_style)]
+    fn host_arch() -> u16 {
+        type DWORD = u32;
+        type WORD = u16;
+        type LPVOID = *mut u8;
+        type DWORD_PTR = usize;
+
+        #[repr(C)]
+        struct SYSTEM_INFO {
+            wProcessorArchitecture: WORD,
+            _wReserved: WORD,
+            _dwPageSize: DWORD,
+            _lpMinimumApplicationAddress: LPVOID,
+            _lpMaximumApplicationAddress: LPVOID,
+            _dwActiveProcessorMask: DWORD_PTR,
+            _dwNumberOfProcessors: DWORD,
+            _dwProcessorType: DWORD,
+            _dwAllocationGranularity: DWORD,
+            _wProcessorLevel: WORD,
+            _wProcessorRevision: WORD,
+        }
+
+        extern "system" {
+            fn GetNativeSystemInfo(lpSystemInfo: *mut SYSTEM_INFO);
+        }
+
+        unsafe {
+            let mut info = mem::zeroed();
+            GetNativeSystemInfo(&mut info);
+            info.wProcessorArchitecture
+        }
+    }
+
+    // Given a registry key, look at all the sub keys and find the one which has
+    // the maximal numeric value.
+    //
+    // Returns the name of the maximal key as well as the opened maximal key.
+    fn max_version(key: &RegistryKey) -> Option<(OsString, RegistryKey)> {
+        let mut max_vers = 0;
+        let mut max_key = None;
+        for subkey in key.iter().filter_map(|k| k.ok()) {
+            let val = subkey.to_str()
+                .and_then(|s| s.trim_left_matches("v").replace(".", "").parse().ok());
+            let val = match val {
+                Some(s) => s,
+                None => continue,
+            };
+            if val > max_vers {
+                if let Ok(k) = key.open(&subkey) {
+                    max_vers = val;
+                    max_key = Some((subkey, k));
+                }
+            }
+        }
+        max_key
+    }
+
+    pub fn has_msbuild_version(version: &str) -> bool {
+        match version {
+            "15.0" => {
+                find_msbuild_vs15("x86_64-pc-windows-msvc").is_some() ||
+                    find_msbuild_vs15("i686-pc-windows-msvc").is_some()
+            }
+            "12.0" | "14.0" => {
+                LOCAL_MACHINE.open(
+                    &OsString::from(format!("SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\{}",
+                                            version))).is_ok()
+            }
+            _ => false
+        }
+    }
+
+    // see http://stackoverflow.com/questions/328017/path-to-msbuild
+    pub fn find_msbuild(target: &str) -> Option<Tool> {
+        // VS 15 (2017) changed how to locate msbuild
+        if let Some(r) = find_msbuild_vs15(target) {
+            return Some(r);
+        } else {
+            find_old_msbuild(target)
+        }
+    }
+
+    fn find_msbuild_vs15(target: &str) -> Option<Tool> {
+        // Seems like this could also go through SetupConfiguration,
+        // or that find_msvc_15 could just use this registry key
+        // instead of the COM interface.
+        let key = r"SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7";
+        LOCAL_MACHINE.open(key.as_ref())
+            .ok()
+            .and_then(|key| {
+                key.query_str("15.0").ok()
+            })
+            .map(|path| {
+                let path = PathBuf::from(path).join(r"MSBuild\15.0\Bin\MSBuild.exe");
+                let mut tool = Tool::new(path);
+                if target.contains("x86_64") {
+                    tool.env.push(("Platform".into(), "X64".into()));
+                }
+                tool
+            })
+    }
+
+    fn find_old_msbuild(target: &str) -> Option<Tool> {
+        let key = r"SOFTWARE\Microsoft\MSBuild\ToolsVersions";
+        LOCAL_MACHINE.open(key.as_ref())
+            .ok()
+            .and_then(|key| {
+                max_version(&key).and_then(|(_vers, key)| key.query_str("MSBuildToolsPath").ok())
+            })
+            .map(|path| {
+                let mut path = PathBuf::from(path);
+                path.push("MSBuild.exe");
+                let mut tool = Tool::new(path);
+                if target.contains("x86_64") {
+                    tool.env.push(("Platform".into(), "X64".into()));
+                }
+                tool
+            })
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/tests/cc_env.rs
@@ -0,0 +1,73 @@
+extern crate cc;
+extern crate tempdir;
+
+use std::env;
+use std::path::Path;
+use std::ffi::OsString;
+
+mod support;
+use support::Test;
+
+#[test]
+fn main() {
+    ccache();
+    distcc();
+    ccache_spaces();
+    ccache_env_flags();
+}
+
+fn ccache() {
+    let test = Test::gnu();
+
+    env::set_var("CC", "ccache cc");
+    let compiler = test.gcc().file("foo.c").get_compiler();
+
+    assert_eq!(compiler.path(), Path::new("cc"));
+}
+
+fn ccache_spaces() {
+    let test = Test::gnu();
+    test.shim("ccache");
+
+    env::set_var("CC", "ccache        cc");
+    let compiler = test.gcc().file("foo.c").get_compiler();
+    assert_eq!(compiler.path(), Path::new("cc"));
+}
+
+fn distcc() {
+    let test = Test::gnu();
+    test.shim("distcc");
+
+    env::set_var("CC", "distcc cc");
+    let compiler = test.gcc().file("foo.c").get_compiler();
+    assert_eq!(compiler.path(), Path::new("cc"));
+}
+
+fn ccache_env_flags() {
+    let test = Test::gnu();
+    test.shim("ccache");
+
+    env::set_var("CC", "ccache lol-this-is-not-a-compiler");
+    let compiler = test.gcc().file("foo.c").get_compiler();
+    assert_eq!(compiler.path(), Path::new("lol-this-is-not-a-compiler"));
+    assert_eq!(
+        compiler.cc_env(),
+        OsString::from("ccache lol-this-is-not-a-compiler")
+    );
+    assert!(
+        compiler
+            .cflags_env()
+            .into_string()
+            .unwrap()
+            .contains("ccache") == false
+    );
+    assert!(
+        compiler
+            .cflags_env()
+            .into_string()
+            .unwrap()
+            .contains(" lol-this-is-not-a-compiler") == false
+    );
+
+    env::set_var("CC", "");
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/tests/support/mod.rs
@@ -0,0 +1,122 @@
+#![allow(dead_code)]
+
+use std::env;
+use std::ffi::OsStr;
+use std::fs::{self, File};
+use std::io::prelude::*;
+use std::path::PathBuf;
+
+use cc;
+use tempdir::TempDir;
+
+pub struct Test {
+    pub td: TempDir,
+    pub gcc: PathBuf,
+    pub msvc: bool,
+}
+
+pub struct Execution {
+    args: Vec<String>,
+}
+
+impl Test {
+    pub fn new() -> Test {
+        let mut gcc = PathBuf::from(env::current_exe().unwrap());
+        gcc.pop();
+        if gcc.ends_with("deps") {
+            gcc.pop();
+        }
+        gcc.push(format!("gcc-shim{}", env::consts::EXE_SUFFIX));
+        Test {
+            td: TempDir::new("gcc-test").unwrap(),
+            gcc: gcc,
+            msvc: false,
+        }
+    }
+
+    pub fn gnu() -> Test {
+        let t = Test::new();
+        t.shim("cc").shim("c++").shim("ar");
+        t
+    }
+
+    pub fn msvc() -> Test {
+        let mut t = Test::new();
+        t.shim("cl").shim("lib.exe");
+        t.msvc = true;
+        t
+    }
+
+    pub fn shim(&self, name: &str) -> &Test {
+        let fname = format!("{}{}", name, env::consts::EXE_SUFFIX);
+        fs::hard_link(&self.gcc, self.td.path().join(&fname))
+            .or_else(|_| fs::copy(&self.gcc, self.td.path().join(&fname)).map(|_| ()))
+            .unwrap();
+        self
+    }
+
+    pub fn gcc(&self) -> cc::Build {
+        let mut cfg = cc::Build::new();
+        let mut path = env::split_paths(&env::var_os("PATH").unwrap()).collect::<Vec<_>>();
+        path.insert(0, self.td.path().to_owned());
+        let target = if self.msvc {
+            "x86_64-pc-windows-msvc"
+        } else {
+            "x86_64-unknown-linux-gnu"
+        };
+
+        cfg.target(target)
+            .host(target)
+            .opt_level(2)
+            .debug(false)
+            .out_dir(self.td.path())
+            .__set_env("PATH", env::join_paths(path).unwrap())
+            .__set_env("GCCTEST_OUT_DIR", self.td.path());
+        if self.msvc {
+            cfg.compiler(self.td.path().join("cl"));
+            cfg.archiver(self.td.path().join("lib.exe"));
+        }
+        cfg
+    }
+
+    pub fn cmd(&self, i: u32) -> Execution {
+        let mut s = String::new();
+        File::open(self.td.path().join(format!("out{}", i)))
+            .unwrap()
+            .read_to_string(&mut s)
+            .unwrap();
+        Execution { args: s.lines().map(|s| s.to_string()).collect() }
+    }
+}
+
+impl Execution {
+    pub fn must_have<P: AsRef<OsStr>>(&self, p: P) -> &Execution {
+        if !self.has(p.as_ref()) {
+            panic!("didn't find {:?} in {:?}", p.as_ref(), self.args);
+        } else {
+            self
+        }
+    }
+
+    pub fn must_not_have<P: AsRef<OsStr>>(&self, p: P) -> &Execution {
+        if self.has(p.as_ref()) {
+            panic!("found {:?}", p.as_ref());
+        } else {
+            self
+        }
+    }
+
+    pub fn has(&self, p: &OsStr) -> bool {
+        self.args.iter().any(|arg| OsStr::new(arg) == p)
+    }
+
+    pub fn must_have_in_order(&self, before: &str, after: &str) -> &Execution {
+        let before_position = self.args.iter().rposition(|x| OsStr::new(x) == OsStr::new(before));
+        let after_position = self.args.iter().rposition(|x| OsStr::new(x) == OsStr::new(after));
+        match (before_position, after_position) {
+            (Some(b), Some(a)) if b < a => {},
+            (b, a) => { panic!("{:?} (last position: {:?}) did not appear before {:?} (last position: {:?})", before, b, after, a) },
+        };
+        self
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/cc/tests/test.rs
@@ -0,0 +1,351 @@
+extern crate cc;
+extern crate tempdir;
+
+use support::Test;
+
+mod support;
+
+#[test]
+fn gnu_smoke() {
+    let test = Test::gnu();
+    test.gcc()
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0)
+        .must_have("-O2")
+        .must_have("foo.c")
+        .must_not_have("-g")
+        .must_have("-c")
+        .must_have("-ffunction-sections")
+        .must_have("-fdata-sections");
+    test.cmd(1).must_have(test.td.path().join("foo.o"));
+}
+
+#[test]
+fn gnu_opt_level_1() {
+    let test = Test::gnu();
+    test.gcc()
+        .opt_level(1)
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0)
+        .must_have("-O1")
+        .must_not_have("-O2");
+}
+
+#[test]
+fn gnu_opt_level_s() {
+    let test = Test::gnu();
+    test.gcc()
+        .opt_level_str("s")
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0)
+        .must_have("-Os")
+        .must_not_have("-O1")
+        .must_not_have("-O2")
+        .must_not_have("-O3")
+        .must_not_have("-Oz");
+}
+
+#[test]
+fn gnu_debug() {
+    let test = Test::gnu();
+    test.gcc()
+        .debug(true)
+        .file("foo.c")
+        .compile("foo");
+    test.cmd(0).must_have("-g");
+}
+
+#[test]
+fn gnu_warnings_into_errors() {
+    let test = Test::gnu();
+    test.gcc()
+        .warnings_into_errors(true)
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0).must_have("-Werror");
+}
+
+#[test]
+fn gnu_warnings() {
+    let test = Test::gnu();
+    test.gcc()
+        .warnings(true)
+        .flag("-Wno-missing-field-initializers")
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0).must_have("-Wall")
+               .must_have("-Wextra");
+}
+
+#[test]
+fn gnu_warnings_overridable() {
+    let test = Test::gnu();
+    test.gcc()
+        .warnings(true)
+        .flag("-Wno-missing-field-initializers")
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0).must_have_in_order("-Wall", "-Wno-missing-field-initializers");
+}
+
+#[test]
+fn gnu_x86_64() {
+    for vendor in &["unknown-linux-gnu", "apple-darwin"] {
+        let target = format!("x86_64-{}", vendor);
+        let test = Test::gnu();
+        test.gcc()
+            .target(&target)
+            .host(&target)
+            .file("foo.c")
+            .compile("foo");
+
+        test.cmd(0)
+            .must_have("-fPIC")
+            .must_have("-m64");
+    }
+}
+
+#[test]
+fn gnu_x86_64_no_pic() {
+    for vendor in &["unknown-linux-gnu", "apple-darwin"] {
+        let target = format!("x86_64-{}", vendor);
+        let test = Test::gnu();
+        test.gcc()
+            .pic(false)
+            .target(&target)
+            .host(&target)
+            .file("foo.c")
+            .compile("foo");
+
+        test.cmd(0).must_not_have("-fPIC");
+    }
+}
+
+#[test]
+fn gnu_i686() {
+    for vendor in &["unknown-linux-gnu", "apple-darwin"] {
+        let target = format!("i686-{}", vendor);
+        let test = Test::gnu();
+        test.gcc()
+            .target(&target)
+            .host(&target)
+            .file("foo.c")
+            .compile("foo");
+
+        test.cmd(0)
+            .must_have("-m32");
+    }
+}
+
+#[test]
+fn gnu_i686_pic() {
+    for vendor in &["unknown-linux-gnu", "apple-darwin"] {
+        let target = format!("i686-{}", vendor);
+        let test = Test::gnu();
+        test.gcc()
+            .pic(true)
+            .target(&target)
+            .host(&target)
+            .file("foo.c")
+            .compile("foo");
+
+        test.cmd(0).must_have("-fPIC");
+    }
+}
+
+#[test]
+fn gnu_set_stdlib() {
+    let test = Test::gnu();
+    test.gcc()
+        .cpp_set_stdlib(Some("foo"))
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0).must_not_have("-stdlib=foo");
+}
+
+#[test]
+fn gnu_include() {
+    let test = Test::gnu();
+    test.gcc()
+        .include("foo/bar")
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0).must_have("-I").must_have("foo/bar");
+}
+
+#[test]
+fn gnu_define() {
+    let test = Test::gnu();
+    test.gcc()
+        .define("FOO", "bar")
+        .define("BAR", None)
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0).must_have("-DFOO=bar").must_have("-DBAR");
+}
+
+#[test]
+fn gnu_compile_assembly() {
+    let test = Test::gnu();
+    test.gcc()
+        .file("foo.S")
+        .compile("foo");
+    test.cmd(0).must_have("foo.S");
+}
+
+#[test]
+fn gnu_shared() {
+    let test = Test::gnu();
+    test.gcc()
+        .file("foo.c")
+        .shared_flag(true)
+        .static_flag(false)
+        .compile("foo");
+
+    test.cmd(0)
+        .must_have("-shared")
+        .must_not_have("-static");
+}
+
+#[test]
+fn gnu_flag_if_supported() {
+    if cfg!(windows) {
+        return
+    }
+    let test = Test::gnu();
+    test.gcc()
+        .file("foo.c")
+        .flag_if_supported("-Wall")
+        .flag_if_supported("-Wflag-does-not-exist")
+        .flag_if_supported("-std=c++11")
+        .compile("foo");
+
+    test.cmd(0)
+        .must_have("-Wall")
+        .must_not_have("-Wflag-does-not-exist")
+        .must_not_have("-std=c++11");
+}
+
+#[test]
+fn gnu_flag_if_supported_cpp() {
+    if cfg!(windows) {
+        return
+    }
+    let test = Test::gnu();
+    test.gcc()
+        .cpp(true)
+        .file("foo.cpp")
+        .flag_if_supported("-std=c++11")
+        .compile("foo");
+
+    test.cmd(0)
+        .must_have("-std=c++11");
+}
+
+#[test]
+fn gnu_static() {
+    let test = Test::gnu();
+    test.gcc()
+        .file("foo.c")
+        .shared_flag(false)
+        .static_flag(true)
+        .compile("foo");
+
+    test.cmd(0)
+        .must_have("-static")
+        .must_not_have("-shared");
+}
+
+#[test]
+fn msvc_smoke() {
+    let test = Test::msvc();
+    test.gcc()
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0)
+        .must_have("/O2")
+        .must_have("foo.c")
+        .must_not_have("/Z7")
+        .must_have("/c")
+        .must_have("/MD");
+    test.cmd(1).must_have(test.td.path().join("foo.o"));
+}
+
+#[test]
+fn msvc_opt_level_0() {
+    let test = Test::msvc();
+    test.gcc()
+        .opt_level(0)
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0).must_not_have("/O2");
+}
+
+#[test]
+fn msvc_debug() {
+    let test = Test::msvc();
+    test.gcc()
+        .debug(true)
+        .file("foo.c")
+        .compile("foo");
+    test.cmd(0).must_have("/Z7");
+}
+
+#[test]
+fn msvc_include() {
+    let test = Test::msvc();
+    test.gcc()
+        .include("foo/bar")
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0).must_have("/I").must_have("foo/bar");
+}
+
+#[test]
+fn msvc_define() {
+    let test = Test::msvc();
+    test.gcc()
+        .define("FOO", "bar")
+        .define("BAR", None)
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0).must_have("/DFOO=bar").must_have("/DBAR");
+}
+
+#[test]
+fn msvc_static_crt() {
+    let test = Test::msvc();
+    test.gcc()
+        .static_crt(true)
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0).must_have("/MT");
+}
+
+#[test]
+fn msvc_no_static_crt() {
+    let test = Test::msvc();
+    test.gcc()
+        .static_crt(false)
+        .file("foo.c")
+        .compile("foo");
+
+    test.cmd(0).must_have("/MD");
+}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".clog.toml":"f691701bd51b5f311931d0d8f05fa3d78c00dda8d60f3313e21011309c736ff1",".github/CONTRIBUTING.md":"f7eff737f3aa25294802fefb233e3758a64b248781dbbf3262532d693f340a87",".github/ISSUE_TEMPLATE.md":"681afbd64b3603e3e82789ceb6841d851eaa7333caec5769173462bab1b5d82b",".travis.yml":"2975b3159624d4ecc4dd29577f378e9d4fa27f1991bfd5042ac3c267fb2cdd38","CHANGELOG.md":"82b23419a6964c8f80993b399c9dded5b7fd809ba51f5f806c2a139d3c6270a4","CONTRIBUTORS.md":"5d7dbafaff6879bbfbb01b22cca299953ec163872d8d624bbf99e20851ca0165","Cargo.toml":"94e3789815bfd001abf96cb0d10fa95a4b4576bc679539e79a531d0010e2ccdd","LICENSE-MIT":"6725d1437fc6c77301f2ff0e7d52914cf4f9509213e1078dc77d9356dbe6eac5","README.md":"031031971829f165ed7ffd8375c2249ce96336a9ed7f207d4722df05563d2d7e","appveyor.yml":"303c64c2cc84c24b3c9ac0b4cd66b98d6bb25dec7d030ed53e5cb6ab3f13ebd1","clap-test.rs":"a0b0d9ca9106a52bf9dc41cf52b0b87c98209dca3490caa6ec1452bd1fec5c4c","index.html":"36f9ce4465266f3af9a259444b01c4239200473cabfc848f789f75b322a3ea8f","justfile":"811b2dec57aec46e570aeeb9945018cf87fe65f6d5b27cdb9ffca79d906910f6","rustfmt.toml":"8fd2d63119df515fd5f44e530c709b19d66b09fbc2e22a640bf4b64c57e7d6b3","src/app/help.rs":"da53217886fb1ea289b9057d4b5e94dce74ce81a7b7006d216370aad709bff77","src/app/macros.rs":"0205c461041d917aecb4a15212f89908e72902b961f47014a645f2b061de5998","src/app/meta.rs":"a56d28bb466a8ba68155b3f2883e85228b4b74cf25658f62fc050e07cff2dc85","src/app/mod.rs":"d0e1843ae1f77c1da4179cebdd8fb1ea55803002fb1ae96087de3a8cdcedf6fc","src/app/parser.rs":"66b08057b7bc19f6c2c94671de7fc20ec623368e04f92d2a6775991d37430fc2","src/app/settings.rs":"cf9f4a1a9d3799ac30d1d98cf23987cc884435ad912a0dfd853b101ce86c97cc","src/app/usage.rs":"ecaeab6c7980544e9a2d35cc41f2797df8bc9c09f5da67e96286631a116c0ccc","src/app/validator.rs":"f19d876ac673019ed5fdd4b9f76ba598fa790aa5e64d482696ca1e45dce5f28b","src/args/any_arg.rs":"b082385eeff2505ced7b747bd44d20a3fb6fd9d4bd14be9e99870699c43ea072","src/args/arg.rs":"673de3f1957eccb1b116255bac9638fe24c0da54ccb358d958446c8ed54c9621","src/args/arg_builder/base.rs":"8b99a9ab811df3e0bdcfba8c0994042b0bcd06d8ddf794ab559baaf9a490ba59","src/args/arg_builder/flag.rs":"4007a950869789b1f4d5f953107aee228477e2d5fe82515d3b895286c65522c6","src/args/arg_builder/mod.rs":"7a32c8fd85b48f7b60e5f2c13dc70fa9100aa65cd933ba419300d28d682bf722","src/args/arg_builder/option.rs":"d5e5243e3a72d2c820c8fad4e1efc4b985881c6f60f3a72757b33a9054a87e99","src/args/arg_builder/positional.rs":"39615d22b586e744a0bdeb8490dbe43df7df66ed793abf8f50ed2037ec0fb90c","src/args/arg_builder/switched.rs":"61f5121b0ec746461215a47e1b7a4d699a37a3f181172820e0615f68d5f6f0ef","src/args/arg_builder/valued.rs":"19368a03e046d6b63451c3d04dff6e51d49f140ed45330f82879539c6d1b28dd","src/args/arg_matcher.rs":"27829739ae12ac7800a26109e751ce9f8c3d26e262d41de161a38baf5c421167","src/args/arg_matches.rs":"9d72a388053ef0c31fe2516df9ea791a4d0f6c0b5e9758eb61886f1ac8df89ab","src/args/group.rs":"3f72a6ecc6ff71c96dd9cd8098e4fb6f7c4e6207e9bd0b67a50b104f5dfdb23d","src/args/macros.rs":"0dd7ae4c6e26ed78044c3ef90e21259816e544f724dcb09e6a0d92d4fcbc4b1a","src/args/matched_arg.rs":"1ed8d338869ecc3b5fa426ef4cf42f4c9c3b1dd538cdea1fe0489169345536f7","src/args/mod.rs":"c155cd989fa4ca1f8de6a79115afbf5086f092adcb854ff9698b9100f45fc323","src/args/settings.rs":"e6bbfb49c2e38fcedb67481bcbf0eb887ee510031639be8134411121a9363f7e","src/args/subcommand.rs":"e1ad9638c33785f1301675de1795b0a4f4b079452aa11f7526d263c2a1179432","src/completions/bash.rs":"116c6830ee2b6310f299a69924f5b1e39b05ebec2b5f7b0ffe3b6938b7fa5514","src/completions/fish.rs":"63975f8beea9af6bef66c7dd7938bfa61c6f871995a74dbc1545daa9fbc1f2d0","src/completions/macros.rs":"ebad5037e6e63401b1a54498e09d3bd93d1a3a06f045c2990902d47eb9a73774","src/completions/mod.rs":"5d4a734df6a21e6c1e0831a2f7be50a45d2e7bdaf7475589ea78b978643229cd","src/completions/powershell.rs":"4267818aaa60583c055d7a276a7535309e5162c94467f3003799b6a8a7f6d6b0","src/completions/shell.rs":"c7995ca229fd0d8671761da0aca0513c4f740165f02d06cd97aa0ae881c22cd4","src/completions/zsh.rs":"8ac4576e1cb3b1403dbb35ce146159aa8b29864e1d8201776200d999052b422d","src/errors.rs":"5d0ab536ea62614a6cf88d175a5b5e9c2777a35958e1d4598ac1ec4a6f451593","src/fmt.rs":"42459e7f42f5495c005d2de3eaf8d7b5619bf4b8d245ecb76e583f08ecaa3869","src/lib.rs":"3471c5b046df081afecb4e541d4e55dc7afa34bf7fe8f369f301f6471887e930","src/macros.rs":"c1d40220947c62b0364eedd2c40ca2c414daccc334a1e04e029a884e782bf2b0","src/osstringext.rs":"a87a5a0685dd8310f6329d5f8e8f54c0fac68eb75595a835aeb1c36208efd5f9","src/strext.rs":"d4418d396069e9c05804f92c042ba7192a4244e46059e2edc98670b45cd2daee","src/suggestions.rs":"ca352c62cdcc1b6071c50e39f39e8f5f6cd11c318229cc6cf16511dfde43c5c7","src/usage_parser.rs":"a04143bba42a6506746091a3f898c38e2c7409bacefed21fa8194c90961ca390"},"package":"6b8f69e518f967224e628896b54e41ff6acfb4dcfefc5076325c36525dac900f"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/CHANGELOG.md
+++ /dev/null
@@ -1,2470 +0,0 @@
-<a name="v2.24.2"></a>
-### v2.24.2 (2017-05-15)
-
-
-#### Bug Fixes
-
-*   adds a debug assertion to ensure all args added to groups actually exist ([14f6b8f3](https://github.com/kbknapp/clap-rs/commit/14f6b8f3a2f6df73aeeec9c54a54909b1acfc158), closes [#917](https://github.com/kbknapp/clap-rs/issues/917))
-*   fixes a bug where args that allow values to start with a hyphen couldnt contain a double hyphen -- as a value ([ebf73a09](https://github.com/kbknapp/clap-rs/commit/ebf73a09db6f3c03c19cdd76b1ba6113930e1643), closes [#960](https://github.com/kbknapp/clap-rs/issues/960))
-*   fixes a bug where positional argument help text is misaligned ([54c16836](https://github.com/kbknapp/clap-rs/commit/54c16836dea4651806a2cfad53146a83fa3abf21))
-
-#### Documentation
-
-* **App::template:**  adds details about the necessity to use AppSettings::UnifiedHelpMessage when using {unified} tags in the help template ([cf569438](https://github.com/kbknapp/clap-rs/commit/cf569438f309c199800bb8e46c9f140187de69d7), closes [#949](https://github.com/kbknapp/clap-rs/issues/949))
-* **Arg::allow_hyphen_values:**  updates the docs to include warnings for allow_hyphen_values and multiple(true) used together ([ded5a2f1](https://github.com/kbknapp/clap-rs/commit/ded5a2f15474d4a5bd46a67b130ccb8b6781bd01))
-* **clap_app!:**  adds using the @group specifier to the macro docs ([fe85fcb1](https://github.com/kbknapp/clap-rs/commit/fe85fcb1772b61f13b20b7ea5290e2437a76190c), closes [#932](https://github.com/kbknapp/clap-rs/issues/932))
-
-
-
-<a name="v2.24.0"></a>
-### v2.24.0 (2017-05-07)
-
-
-#### Bug Fixes
-
-*   fixes a bug where args with last(true) and required(true) set were not being printed in the usage string ([3ac533fe](https://github.com/kbknapp/clap-rs/commit/3ac533fedabf713943eedf006f830a5a486bbe80), closes [#944](https://github.com/kbknapp/clap-rs/issues/944))
-*   fixes a bug that was printing the arg name, instead of value name when Arg::last(true) was used ([e1fe8ac3](https://github.com/kbknapp/clap-rs/commit/e1fe8ac3bc1f9cf4e36df0d881f8419755f1787b), closes [#940](https://github.com/kbknapp/clap-rs/issues/940))
-*   fixes a bug where flags were parsed as flags AND positional values when specific combinations of settings were used ([20f83292](https://github.com/kbknapp/clap-rs/commit/20f83292d070038b8cee2a6b47e91f6b0a2f7871), closes [#946](https://github.com/kbknapp/clap-rs/issues/946))
-
-
-
-<a name="v2.24.0"></a>
-## v2.24.0 (2017-05-05)
-
-
-#### Documentation
-
-* **README.md:**  fix some typos ([fa34deac](https://github.com/kbknapp/clap-rs/commit/fa34deac079f334c3af97bb7fb151880ba8887f8))
-
-#### API Additions
-
-* **Arg:**  add `default_value_os` ([d5ef8955](https://github.com/kbknapp/clap-rs/commit/d5ef8955414b1587060f7218385256105b639c88))
-* **arg_matches.rs:**  Added a Default implementation for Values and OsValues iterators. ([0a4384e3](https://github.com/kbknapp/clap-rs/commit/0a4384e350eed74c2a4dc8964c203f21ac64897f))
-
-
-<a name="v2.23.2"></a>
-### v2.23.2 (2017-04-19)
-
-
-#### Bug Fixes
-
-* **PowerShell Completions:**  fixes a bug where powershells completions cant be used if no subcommands are defined ([a8bce558](https://github.com/kbknapp/clap-rs/commit/a8bce55837dc4e0fb187dc93180884a40ae09c6f), closes [#931](https://github.com/kbknapp/clap-rs/issues/931))
-
-#### Improvements
-
-*   bumps term_size to take advantage of better terminal dimension handling ([e05100b7](https://github.com/kbknapp/clap-rs/commit/e05100b73d74066a90876bf38f952adf5e8ee422))
-* **PowerShell Completions:**  massively dedups subcommand names in the generate script to make smaller scripts that are still functionally equiv ([85b0e1cc](https://github.com/kbknapp/clap-rs/commit/85b0e1cc4b9755dda75a93d898d79bc38631552b))
-
-#### Documentation
-
-*   Fix a typo the minimum rust version required ([71dabba3](https://github.com/kbknapp/clap-rs/commit/71dabba3ea0a17c88b0e2199c9d99f0acbf3bc17))
-
-<a name="v2.23.1"></a>
-### v2.23.1 (2017-04-05)
-
-
-#### Bug Fixes
-
-*   fixes a missing newline character in the autogenerated help and version messages in some instances ([5ae9007d](https://github.com/kbknapp/clap-rs/commit/5ae9007d984ae94ae2752df51bcbaeb0ec89bc15))
-
-
-<a name="v2.23.0"></a>
-## v2.23.0 (2017-04-05)
-
-
-#### API Additions
-
-* `App::long_about`
-* `App::long_version`
-* `App::print_long_help`
-* `App::write_long_help`
-* `App::print_long_version`
-* `App::write_long_version`
-* `Arg::long_help`
-
-#### Features
-
-*   allows distinguishing between short and long version messages (-V/short or --version/long) ([59272b06](https://github.com/kbknapp/clap-rs/commit/59272b06cc213289dc604dbc694cb95d383a5d68))
-*   allows distinguishing between short and long help with subcommands in the same manner as args ([6b371891](https://github.com/kbknapp/clap-rs/commit/6b371891a1702173a849d1e95f9fecb168bf6fc4))
-*   allows specifying a short help vs a long help (i.e. varying levels of detail depending on if -h or --help was used) ([ef1b24c3](https://github.com/kbknapp/clap-rs/commit/ef1b24c3a0dff2f58c5e2e90880fbc2b69df20ee))
-* **clap_app!:**  adds support for arg names with hyphens similar to longs with hyphens ([f7a88779](https://github.com/kbknapp/clap-rs/commit/f7a8877978c8f90e6543d4f0d9600c086cf92cd7), closes [#869](https://github.com/kbknapp/clap-rs/issues/869))
-
-#### Bug Fixes
-
-*   fixes a bug that wasn't allowing help and version to be properly overridden ([8b2ceb83](https://github.com/kbknapp/clap-rs/commit/8b2ceb8368bcb70689fadf1c7f4b9549184926c1), closes [#922](https://github.com/kbknapp/clap-rs/issues/922))
-
-#### Documentation
-
-* **clap_app!:**  documents the `--("some-arg")` method for using args with hyphens inside them ([bc08ef3e](https://github.com/kbknapp/clap-rs/commit/bc08ef3e185393073d969d301989b6319c616c1f), closes [#919](https://github.com/kbknapp/clap-rs/issues/919))
-
-
-
-<a name="v2.22.2"></a>
-### v2.22.2 (2017-03-30)
-
-
-#### Bug Fixes
-
-* **Custom Usage Strings:**  fixes the usage string regression when using help templates ([0e4fd96d](https://github.com/kbknapp/clap-rs/commit/0e4fd96d74280d306d09e60ac44f938a82321769))
-
-
-
-<a name="v2.22.1"></a>
-### v2.22.1 (2017-03-24)
-
-
-#### Bug Fixes
-
-* **usage:**  fixes a big regression with custom usage strings ([2c41caba](https://github.com/kbknapp/clap-rs/commit/2c41caba3c7d723a2894e315d04da796b0e97759))
-
-<a name="v2.22.0"></a>
-## v2.22.0 (2017-03-23)
-
-#### API Additions
-
-* **App::name:**  adds the ability to change the name of the App instance after creation ([d49e8292](https://github.com/kbknapp/clap-rs/commit/d49e8292b026b06e2b70447cd9f08299f4fcba76), closes [#908](https://github.com/kbknapp/clap-rs/issues/908))
-* **Arg::hide_default_value:**  adds ability to hide the default value of an argument from the help string ([89e6ea86](https://github.com/kbknapp/clap-rs/commit/89e6ea861e16a1ad56757ca12f6b32d02253e44a), closes [#902](https://github.com/kbknapp/clap-rs/issues/902))
-
-
-<a name="v2.21.3"></a>
-### v2.21.3 (2017-03-23)
-
-#### Bug Fixes
-
-* **yaml:**  adds support for loading author info from yaml ([e04c390c](https://github.com/kbknapp/clap-rs/commit/e04c390c597a55fa27e724050342f16c42f1c5c9))
-
-
-<a name="v2.21.2"></a>
-### v2.21.2 (2017-03-17)
-
-
-#### Improvements
-
-*   add fish subcommand help support ([f8f68cf8](https://github.com/kbknapp/clap-rs/commit/f8f68cf8251669aef4539a25a7c1166f0ac81ea6))
-*   options that use `require_equals(true)` now display the equals sign in help messages, usage strings, and errors" ([c8eb0384](https://github.com/kbknapp/clap-rs/commit/c8eb0384d394d2900ccdc1593099c97808a3fa05), closes [#903](https://github.com/kbknapp/clap-rs/issues/903))
-
-
-#### Bug Fixes
-
-*  setting the max term width now correctly propagates down through child subcommands
-
-
-
-<a name="v2.21.1"></a>
-### v2.21.1 (2017-03-12)
-
-
-#### Bug Fixes
-
-* **ArgRequiredElseHelp:**  fixes the precedence of this error to prioritize over other error messages ([74b751ff](https://github.com/kbknapp/clap-rs/commit/74b751ff2e3631e337b7946347c1119829a41c53), closes [#895](https://github.com/kbknapp/clap-rs/issues/895))
-* **Positionals:**  fixes some regression bugs resulting from old asserts in debug mode. ([9a3bc98e](https://github.com/kbknapp/clap-rs/commit/9a3bc98e9b55e7514b74b73374c5ac8b6e5e0508), closes [#896](https://github.com/kbknapp/clap-rs/issues/896))
-
-
-
-<a name="v2.21.0"></a>
-## v2.21.0 (2017-03-09)
-
-#### Performance
-
-*   doesn't run `arg_post_processing` on multiple values anymore ([ec516182](https://github.com/kbknapp/clap-rs/commit/ec5161828729f6a53f0fccec8648f71697f01f78))
-*   changes internal use of `VecMap` to `Vec` for matched values of `Arg`s ([22bf137a](https://github.com/kbknapp/clap-rs/commit/22bf137ac581684c6ed460d2c3c640c503d62621))
-*   vastly reduces the amount of cloning when adding non-global args minus when they're added from `App::args` which is forced to clone ([8da0303b](https://github.com/kbknapp/clap-rs/commit/8da0303bc02db5fe047cfc0631a9da41d9dc60f7))
-*   refactor to remove unneeded vectors and allocations and checks for significant performance increases ([0efa4119](https://github.com/kbknapp/clap-rs/commit/0efa4119632f134fc5b8b9695b007dd94b76735d))
-
-#### Documentation
-
-*   Fix examples link in CONTRIBUTING.md ([60cf875d](https://github.com/kbknapp/clap-rs/commit/60cf875d67a252e19bb85054be57696fac2c57a1))
-
-#### Improvements
-
-*   when `AppSettings::SubcommandsNegateReqs` and `ArgsNegateSubcommands` are used, a new more accurate double line usage string is shown ([50f02300](https://github.com/kbknapp/clap-rs/commit/50f02300d81788817acefef0697e157e01b6ca32), closes [#871](https://github.com/kbknapp/clap-rs/issues/871))
-
-#### API Additions
-
-* **Arg::last:**  adds the ability to mark a positional argument as 'last' which means it should be used with `--` syntax and can be accessed early ([6a7aea90](https://github.com/kbknapp/clap-rs/commit/6a7aea9043b83badd9ab038b4ecc4c787716147e), closes [#888](https://github.com/kbknapp/clap-rs/issues/888))
-*   provides `default_value_os` and `default_value_if[s]_os` ([0f2a3782](https://github.com/kbknapp/clap-rs/commit/0f2a378219a6930748d178ba350fe5925be5dad5), closes [#849](https://github.com/kbknapp/clap-rs/issues/849))
-*   provides `App::help_message` and `App::version_message` which allows one to override the auto-generated help/version flag associated help ([389c413](https://github.com/kbknapp/clap-rs/commit/389c413b7023dccab8c76aa00577ea1d048e7a99), closes [#889](https://github.com/kbknapp/clap-rs/issues/889))
-
-#### New Settings
-
-* **InferSubcommands:**  adds a setting to allow one to infer shortened subcommands or aliases (i.e. for subcommmand "test", "t", "te", or "tes" would be allowed assuming no other ambiguities) ([11602032](https://github.com/kbknapp/clap-rs/commit/11602032f6ff05881e3adf130356e37d5e66e8f9), closes [#863](https://github.com/kbknapp/clap-rs/issues/863))
-
-#### Bug Fixes
-
-*   doesn't print the argument sections in the help message if all args in that section are hidden ([ce5ee5f5](https://github.com/kbknapp/clap-rs/commit/ce5ee5f5a76f838104aeddd01c8ec956dd347f50))
-*   doesn't include the various [ARGS] [FLAGS] or [OPTIONS] if the only ones available are hidden ([7b4000af](https://github.com/kbknapp/clap-rs/commit/7b4000af97637703645c5fb2ac8bb65bd546b95b), closes [#882](https://github.com/kbknapp/clap-rs/issues/882))
-*   now correctly shows subcommand as required in the usage string when AppSettings::SubcommandRequiredElseHelp is used ([8f0884c1](https://github.com/kbknapp/clap-rs/commit/8f0884c1764983a49b45de52a1eddf8d721564d8))
-*   fixes some memory leaks when an error is detected and clap exits ([8c2dd287](https://github.com/kbknapp/clap-rs/commit/8c2dd28718262ace4ae0db98563809548e02a86b))
-*   fixes a trait that's marked private accidentlly, but should be crate internal public ([1ae21108](https://github.com/kbknapp/clap-rs/commit/1ae21108015cea87e5360402e1747025116c7878))
-* **Completions:**   fixes a bug that tried to propogate global args multiple times when generating multiple completion scripts ([5e9b9cf4](https://github.com/kbknapp/clap-rs/commit/5e9b9cf4dd80fa66a624374fd04e6545635c1f94), closes [#846](https://github.com/kbknapp/clap-rs/issues/846))
-
-#### Features
-
-* **Options:**  adds the ability to require the equals syntax with options --opt=val ([f002693d](https://github.com/kbknapp/clap-rs/commit/f002693dec6a6959c4e9590cb7b7bfffd6d6e5bc), closes [#833](https://github.com/kbknapp/clap-rs/issues/833))
-
-
-
-<a name="v2.20.5"></a>
-### v2.20.5 (2017-02-18)
-
-
-#### Bug Fixes
-
-* **clap_app!:**   fixes a critical bug of a missing fragment specifier when using `!property` style tags. ([5635c1f94](https://github.com/kbknapp/clap-rs/commit/5e9b9cf4dd80fa66a624374fd04e6545635c1f94))
-
-
-<a name="v2.20.4"></a>
-### v2.20.4 (2017-02-15)
-
-
-#### Bug Fixes
-
-* **Completions:**   fixes a bug that tried to propogate global args multiple times when generating multiple completion scripts ([5e9b9cf4](https://github.com/kbknapp/clap-rs/commit/5e9b9cf4dd80fa66a624374fd04e6545635c1f94), closes [#846](https://github.com/kbknapp/clap-rs/issues/846))
-
-#### Documentation
-
-*   Fix examples link in CONTRIBUTING.md ([60cf875d](https://github.com/kbknapp/clap-rs/commit/60cf875d67a252e19bb85054be57696fac2c57a1))
-
-
-<a name="v2.20.3"></a>
-### v2.20.3 (2017-02-03)
-
-
-#### Documentation
-
-* **Macros:**  adds a warning about changing values in Cargo.toml not triggering a rebuild automatically ([112aea3e](https://github.com/kbknapp/clap-rs/commit/112aea3e42ae9e0c0a2d33ebad89496dbdd95e5d), closes [#838](https://github.com/kbknapp/clap-rs/issues/838))
-
-#### Bug Fixes
-
-*   fixes a println->debugln typo ([279aa62e](https://github.com/kbknapp/clap-rs/commit/279aa62eaf08f56ce090ba16b937bc763cbb45be))
-*   fixes bash completions for commands that have an underscore in the name ([7f5cfa72](https://github.com/kbknapp/clap-rs/commit/7f5cfa724f0ac4e098f5fe466c903febddb2d994), closes [#581](https://github.com/kbknapp/clap-rs/issues/581))
-*   fixes a bug where ZSH completions would panic if the binary name had an underscore in it ([891a2a00](https://github.com/kbknapp/clap-rs/commit/891a2a006f775e92c556dda48bb32fac9807c4fb), closes [#581](https://github.com/kbknapp/clap-rs/issues/581))
-*   allow final word to be wrapped in wrap_help ([564c5f0f](https://github.com/kbknapp/clap-rs/commit/564c5f0f1730f4a2c1cdd128664f1a981c31dcd4), closes [#828](https://github.com/kbknapp/clap-rs/issues/828))
-* fixes a bug where global args weren't included in the generated completion scripts ([9a1e006e](https://github.com/kbknapp/clap-rs/commit/9a1e006eb75ad5a6057ebd119aa90f7e06c0ace8), closes [#841](https://github.com/kbknapp/clap-rs/issues/841))
-
-
-
-<a name="v2.20.2"></a>
-### v2.20.2 (2017-02-03)
-
-#### Bug Fixes
-
-*   fixes a critical bug where subcommand settings were being propogated too far ([74648c94](https://github.com/kbknapp/clap-rs/commit/74648c94b893df542bfa5bb595e68c7bb8167e36), closes [#832](https://github.com/kbknapp/clap-rs/issues/832))
-
-
-#### Improvements
-
-*   adds ArgGroup::multiple to the supported YAML fields for building ArgGroups from YAML ([d8590037](https://github.com/kbknapp/clap-rs/commit/d8590037ce07dafd8cd5b26928aa4a9fd3018288), closes [#840](https://github.com/kbknapp/clap-rs/issues/840))
-
-<a name="v2.20.1"></a>
-### v2.20.1 (2017-01-31)
-
-#### Bug Fixes
-
-*   allow final word to be wrapped in wrap_help ([564c5f0f](https://github.com/kbknapp/clap-rs/commit/564c5f0f1730f4a2c1cdd128664f1a981c31dcd4), closes [#828](https://github.com/kbknapp/clap-rs/issues/828))
-*   actually show character in debug output ([84d8c547](https://github.com/kbknapp/clap-rs/commit/84d8c5476de95b7f37d61888bc4f13688b712434))
-*   include final character in line lenght ([aff4ba18](https://github.com/kbknapp/clap-rs/commit/aff4ba18da8147e1259b04b0bfbc1fcb5c78a3c0))
-
-#### Improvements
-
-*   updates libc and term_size deps for the libc version conflict ([6802ac4a](https://github.com/kbknapp/clap-rs/commit/6802ac4a59c142cda9ec55ca0c45ae5cb9a6ab55))
-
-#### Documentation
-
-*   fix link from app_from_crate! to crate_authors! (#822) ([5b29be9b](https://github.com/kbknapp/clap-rs/commit/5b29be9b073330ab1f7227cdd19fe4aab39d5dcb))
-*   fix spelling of "guaranteed" ([4f30a65b](https://github.com/kbknapp/clap-rs/commit/4f30a65b9c03eb09607eb91a929a6396637dc105))
-
-<a name="v2.20.0"></a>
-
-#### New Settings
-
-* **ArgsNegateSubcommands:**  disables args being allowed between subcommands ([5e2af8c9](https://github.com/kbknapp/clap-rs/commit/5e2af8c96adb5ab75fa2d1536237ebcb41869494), closes [#793](https://github.com/kbknapp/clap-rs/issues/793))
-* **DontCollapseArgsInUsage:** disables the collapsing of positional args into `[ARGS]` in the usage string  ([c2978afc](https://github.com/kbknapp/clap-rs/commit/c2978afc61fb46d5263ab3b2d87ecde1c9ce1553), closes [#769](https://github.com/kbknapp/clap-rs/issues/769))
-* **DisableHelpSubcommand:**  disables building the `help` subcommand  ([a10fc859](https://github.com/kbknapp/clap-rs/commit/a10fc859ee20159fbd9ff4337be59b76467a64f2))
-* **AllowMissingPositional:**  allows one to implement `$ prog [optional] <required>` style CLIs where the second postional argument is required, but the first is optional ([1110fdc7](https://github.com/kbknapp/clap-rs/commit/1110fdc7a345c108820dc45783a9bf893fa4c214), closes [#636](https://github.com/kbknapp/clap-rs/issues/636))
-* **PropagateGlobalValuesDown:**  automatically propagats global arg's values down through *used* subcommands ([985536c8](https://github.com/kbknapp/clap-rs/commit/985536c8ebcc09af98aac835f42a8072ad58c262), closes [#694](https://github.com/kbknapp/clap-rs/issues/694))
-
-#### API Additions
-
-##### Arg
-
-* **Arg::value_terminator:**  adds the ability to terminate multiple values with a given string or char ([be64ce0c](https://github.com/kbknapp/clap-rs/commit/be64ce0c373efc106384baca3f487ea99fe7b8cf), closes [#782](https://github.com/kbknapp/clap-rs/issues/782))
-* **Arg::default_value_if[s]:**  adds new methods for *conditional* default values (such as a particular value from another argument was used) ([eb4010e7](https://github.com/kbknapp/clap-rs/commit/eb4010e7b21724447ef837db11ac441915728f22))
-* **Arg::requires_if[s]:**  adds the ability to *conditionally* require additional args (such as if a particular value was used) ([198449d6](https://github.com/kbknapp/clap-rs/commit/198449d64393c265f0bc327aaeac23ec4bb97226))
-* **Arg::required_if[s]:**  adds the ability for an arg to be *conditionally* required (i.e. "arg X is only required if arg Y was used with value Z") ([ee9cfddf](https://github.com/kbknapp/clap-rs/commit/ee9cfddf345a6b5ae2af42ba72aa5c89e2ca7f59))
-* **Arg::validator_os:**  adds ability to validate values which may contain invalid UTF-8 ([47232498](https://github.com/kbknapp/clap-rs/commit/47232498a813db4f3366ccd3e9faf0bff56433a4))
-
-##### Macros
-
-* **crate_description!:** Uses the `Cargo.toml` description field to fill in the `App::about` method at compile time ([4d9a82db](https://github.com/kbknapp/clap-rs/commit/4d9a82db8e875e9b64a9c2a5c6e22c25afc1279d), closes [#778](https://github.com/kbknapp/clap-rs/issues/778))
-* **crate_name!:** Uses the `Cargo.toml` name field to fill in the `App::new` method at compile time ([4d9a82db](https://github.com/kbknapp/clap-rs/commit/4d9a82db8e875e9b64a9c2a5c6e22c25afc1279d), closes [#778](https://github.com/kbknapp/clap-rs/issues/778))
-* **app_from_crate!:** Combines `crate_version!`, `crate_name!`, `crate_description!`, and `crate_authors!` into a single macro call to build a default `App` instance from the `Cargo.toml` fields ([4d9a82db](https://github.com/kbknapp/clap-rs/commit/4d9a82db8e875e9b64a9c2a5c6e22c25afc1279d), closes [#778](https://github.com/kbknapp/clap-rs/issues/778))
-
-
-#### Features
-
-* **no_cargo:**  adds a `no_cargo` feature to disable Cargo-env-var-dependent macros for those *not* using `cargo` to build their crates (#786) ([6fdd2f9d](https://github.com/kbknapp/clap-rs/commit/6fdd2f9d693aaf1118fc61bd362273950703f43d))
-
-#### Bug Fixes
-
-* **Options:**  fixes a critical bug where options weren't forced to have a value ([5a5f2b1e](https://github.com/kbknapp/clap-rs/commit/5a5f2b1e9f598a0d0280ef3e98abbbba2bc41132), closes [#665](https://github.com/kbknapp/clap-rs/issues/665))
-*   fixes a bug where calling the help of a subcommand wasn't ignoring required args of parent commands ([d3d34a2b](https://github.com/kbknapp/clap-rs/commit/d3d34a2b51ef31004055b0ab574f766d801c3adf), closes [#789](https://github.com/kbknapp/clap-rs/issues/789))
-* **Help Subcommand:**  fixes a bug where the help subcommand couldn't be overriden ([d34ec3e0](https://github.com/kbknapp/clap-rs/commit/d34ec3e032d03e402d8e87af9b2942fe2819b2da), closes [#787](https://github.com/kbknapp/clap-rs/issues/787))
-* **Low Index Multiples:**  fixes a bug which caused combinations of LowIndexMultiples and `Arg::allow_hyphen_values` to fail parsing ([26c670ca](https://github.com/kbknapp/clap-rs/commit/26c670ca16d2c80dc26d5c1ce83380ace6357318))
-
-#### Improvements
-
-* **Default Values:**  improves the error message when default values are involved ([1f33de54](https://github.com/kbknapp/clap-rs/commit/1f33de545036e7fd2f80faba251fca009bd519b8), closes [#774](https://github.com/kbknapp/clap-rs/issues/774))
-* **YAML:**  adds conditional requirements and conditional default values to YAML ([9a4df327](https://github.com/kbknapp/clap-rs/commit/9a4df327893486adb5558ffefba790c634ccdc6e), closes [#764](https://github.com/kbknapp/clap-rs/issues/764))
-*  Support `--("some-arg-name")` syntax for defining long arg names when using `clap_app!` macro ([f41ec962](https://github.com/kbknapp/clap-rs/commit/f41ec962c243a5ffff8b1be1ae2ad63970d3d1d4))
-*  Support `("some app name")` syntax for defining app names when using `clap_app!` macro ([9895b671](https://github.com/kbknapp/clap-rs/commit/9895b671cff784f35cf56abcd8270f7c2ba09699), closes [#759](https://github.com/kbknapp/clap-rs/issues/759))
-* **Help Wrapping:**  long app names (with spaces), authors, and descriptions are now wrapped appropriately ([ad4691b7](https://github.com/kbknapp/clap-rs/commit/ad4691b71a63e951ace346318238d8834e04ad8a), closes [#777](https://github.com/kbknapp/clap-rs/issues/777))
-
-
-#### Documentation
-
-* **Conditional Default Values:**  fixes the failing doc tests of Arg::default_value_ifs ([4ef09101](https://github.com/kbknapp/clap-rs/commit/4ef091019c083b4db1a0c13f1c1e95ac363259f2))
-* **Conditional Requirements:**  adds docs for Arg::requires_ifs ([7f296e29](https://github.com/kbknapp/clap-rs/commit/7f296e29db7d9036e76e5dbcc9c8b20dfe7b25bd))
-* **README.md:**  fix some typos ([f22c21b4](https://github.com/kbknapp/clap-rs/commit/f22c21b422d5b287d1a1ac183a379ee02eebf54f))
-* **src/app/mod.rs:**  fix some typos ([5c9b0d47](https://github.com/kbknapp/clap-rs/commit/5c9b0d47ca78dea285c5b9dec79063d24c3e451a))
-
-<a name="v2.19.3"></a>
-### v2.19.3 (2016-12-28)
-
-
-#### Bug Fixes
-
-*   fixes a bug where calling the help of a subcommand wasn't ignoring required args of parent commands ([a0ee4993](https://github.com/kbknapp/clap-rs/commit/a0ee4993015ea97b06b5bc9f378d8bcb18f1c51c), closes [#789](https://github.com/kbknapp/clap-rs/issues/789))
-
-
-
-<a name="v2.19.2"></a>
-### v2.19.2 (2016-12-08)
-
-#### Bug Fixes
-
-* **ZSH Completions:**  escapes square brackets in ZSH completions ([7e17d5a3](https://github.com/kbknapp/clap-rs/commit/7e17d5a36b2cc2cc77e7b15796b14d639ed3cbf7), closes [#771](https://github.com/kbknapp/clap-rs/issues/771))
-
-#### Documentation
-
-* **Examples:**  adds subcommand examples ([0e0f3354](https://github.com/kbknapp/clap-rs/commit/0e0f33547a6901425afc1d9fbe19f7ae3832d9a4), closes [#766](https://github.com/kbknapp/clap-rs/issues/766))
-* **README.md:**  adds guidance on when to use ~ in version pinning, and clarifies breaking change policy ([591eaefc](https://github.com/kbknapp/clap-rs/commit/591eaefc7319142ba921130e502bb0729feed907), closes [#765](https://github.com/kbknapp/clap-rs/issues/765))
-
-
-
-<a name="v2.19.1"></a>
-### v2.19.1 (2016-12-01)
-
-
-#### Bug Fixes
-
-* **Help Messages:**  fixes help message alignment when specific settings are used on options ([cd94b318](https://github.com/kbknapp/clap-rs/commit/cd94b3188d63b63295a319e90e826bca46befcd2), closes [#760](https://github.com/kbknapp/clap-rs/issues/760))
-
-#### Improvements
-
-* **Bash Completion:**  allows bash completion to fall back to traidtional bash completion upon no matching completing function ([b1b16d56](https://github.com/kbknapp/clap-rs/commit/b1b16d56d8fddf819bdbe24b3724bb6a9f3fa613)))
-
-
-<a name="v2.19.0"></a>
-## v2.19.0 (2016-11-21)
-
-#### Features
-
-*   allows specifying AllowLeadingHyphen style values, but only for specific args vice command wide ([c0d70feb](https://github.com/kbknapp/clap-rs/commit/c0d70febad9996a77a54107054daf1914c50d4ef), closes [#742](https://github.com/kbknapp/clap-rs/issues/742))
-
-#### Bug Fixes
-
-* **Required Unless:**  fixes a bug where having required_unless set doesn't work when conflicts are also set ([d20331b6](https://github.com/kbknapp/clap-rs/commit/d20331b6f7940ac3a4e919999f8bb4780875125d), closes [#753](https://github.com/kbknapp/clap-rs/issues/753))
-* **ZSH Completions:**  fixes an issue where zsh completions caused panics if there were no subcommands ([49e7cdab](https://github.com/kbknapp/clap-rs/commit/49e7cdab76dd1ccc07221e360f07808ec62648aa), closes [#754](https://github.com/kbknapp/clap-rs/issues/754))
-
-#### Improvements
-
-* **Validators:**  improves the error messages for validators ([65eb3385](https://github.com/kbknapp/clap-rs/commit/65eb33859d3ff53e7d3277f02a9d3fd9038a9dfb), closes [#744](https://github.com/kbknapp/clap-rs/issues/744))
-
-#### Documentation
-
-*   updates the docs landing page ([01e1e33f](https://github.com/kbknapp/clap-rs/commit/01e1e33f377934099a4a725fab5cd6c5ff50eaa2))
-*   adds the macro version back to the readme ([45eb9bf1](https://github.com/kbknapp/clap-rs/commit/45eb9bf130329c3f3853aba0342c2fe3c64ff80f))
-*   fix broken docs links ([808e7cee](https://github.com/kbknapp/clap-rs/commit/808e7ceeb86d4a319bdc270f51c23a64621dbfb3))
-* **Compatibility Policy:**  adds an official compatibility policy to ([760d66dc](https://github.com/kbknapp/clap-rs/commit/760d66dc17310b357f257776624151da933cd25d), closes [#740](https://github.com/kbknapp/clap-rs/issues/740))
-* **Contributing:**  updates the readme to improve the readability and contributing sections ([eb51316c](https://github.com/kbknapp/clap-rs/commit/eb51316cdfdc7258d287ba13b67ef2f42bd2b8f6))
-
-<a name="v2.18.0"></a>
-## v2.18.0 (2016-11-05)
-
-
-#### Features
-
-* **Completions:**  adds completion support for PowerShell. ([cff82c88](https://github.com/kbknapp/clap-rs/commit/cff82c880e21064fca63351507b80350df6caadf), closes [#729](https://github.com/kbknapp/clap-rs/issues/729))
-
-
-
-<a name="v2.17.1"></a>
-### v2.17.1 (2016-11-02)
-
-
-#### Bug Fixes
-
-* **Low Index Multiples:**  fixes a bug where using low index multiples was propgated to subcommands ([33924e88](https://github.com/kbknapp/clap-rs/commit/33924e884461983c4e6b5ea1330fecc769a4ade7), closes [#725](https://github.com/kbknapp/clap-rs/issues/725))
-
-
-
-<a name="v2.17.0"></a>
-## v2.17.0 (2016-11-01)
-
-
-#### Features
-
-* **Positional Args:**  allows specifying the second to last positional argument as multiple(true) ([1ced2a74](https://github.com/kbknapp/clap-rs/commit/1ced2a7433ea8937a1b260ea65d708f32ca7c95e), closes [#725](https://github.com/kbknapp/clap-rs/issues/725))
-
-
-
-<a name="v2.16.4"></a>
-### v2.16.4 (2016-10-31)
-
-
-#### Improvements
-
-* **Error Output:**  conflicting errors are now symetrical, meaning more consistent and less confusing ([3d37001d](https://github.com/kbknapp/clap-rs/commit/3d37001d1dc647d73cc597ff172f1072d4beb80d), closes [#718](https://github.com/kbknapp/clap-rs/issues/718))
-
-#### Documentation
-
-*   Fix typo in example `13a_enum_values_automatic` ([c22fbc07](https://github.com/kbknapp/clap-rs/commit/c22fbc07356e556ffb5d1a79ec04597d149b915e))
-* **README.md:**  fixes failing yaml example (#715) ([21fba9e6](https://github.com/kbknapp/clap-rs/commit/21fba9e6cd8c163012999cd0ce271ec8780c5695))
-
-#### Bug Fixes
-
-* **ZSH Completions:**  fixes bug that caused panic on subcommands with aliases ([5c70e1a0](https://github.com/kbknapp/clap-rs/commit/5c70e1a01bc977e44c10015d18bb8e215c32dfc8), closes [#714](https://github.com/kbknapp/clap-rs/issues/714))
-* **debug:**  fixes the debug feature (#716) ([6c11ccf4](https://github.com/kbknapp/clap-rs/commit/6c11ccf443d46258d51f7cda33fbcc81e7fe8e90))
-
-
-
-<a name="v2.16.3"></a>
-### v2.16.3 (2016-10-28)
-
-
-#### Bug Fixes
-
-*   Derive display order after propagation ([9cb6facf](https://github.com/kbknapp/clap-rs/commit/9cb6facf507aff7cddd124b8c29714d2b0e7bd13), closes [#706](https://github.com/kbknapp/clap-rs/issues/706))
-* **yaml-example:**  inconsistent args ([847f7199](https://github.com/kbknapp/clap-rs/commit/847f7199219ead5065561d91d64780d99ae4b587))
-
-
-
-<a name="v2.15.1"></a>
-### v2.16.2 (2016-10-25)
-
-
-#### Bug Fixes
-
-* **Fish Completions:**  fixes a bug where single quotes are not escaped ([780b4a18](https://github.com/kbknapp/clap-rs/commit/780b4a18281b6f7f7071e1b9db2290fae653c406), closes [#704](https://github.com/kbknapp/clap-rs/issues/704))
-
-
-<a name="v2.16.1"></a>
-### v2.16.1 (2016-10-24)
-
-
-#### Bug Fixes
-
-* **Help Message:**  fixes a regression bug where args with multiple(true) threw off alignment ([ebddac79](https://github.com/kbknapp/clap-rs/commit/ebddac791f3ceac193d5ad833b4b734b9643a7af), closes [#702](https://github.com/kbknapp/clap-rs/issues/702))
-
-
-
-<a name="v2.16.0"></a>
-## v2.16.0 (2016-10-23)
-
-
-#### Features
-
-* **Completions:**  adds ZSH completion support ([3e36b0ba](https://github.com/kbknapp/clap-rs/commit/3e36b0bac491d3f6194aee14604caf7be26b3d56), closes [#699](https://github.com/kbknapp/clap-rs/issues/699))
-
-
-
-<a name="v2.15.0"></a>
-## v2.15.0 (2016-10-21)
-
-
-#### Features
-
-* **AppSettings:**  adds new setting `AppSettings::AllowNegativeNumbers` ([ab064546](https://github.com/kbknapp/clap-rs/commit/ab06454677fb6aa9b9f804644fcca2168b1eaee3), closes [#696](https://github.com/kbknapp/clap-rs/issues/696))
-
-#### Documentation
-
-* **app/settings.rs:**  moves variants to roughly alphabetical order ([9ed4d4d7](https://github.com/kbknapp/clap-rs/commit/9ed4d4d7957a23357aef60081e45639ab9e3905f))
-
-
-<a name="v2.14.1"></a>
-### v2.14.1 (2016-10-20)
-
-
-#### Documentation
-
-*   Improve documentation around features ([4ee85b95](https://github.com/kbknapp/clap-rs/commit/4ee85b95d2d16708a016a3ba4e6e2c93b89b7fad))
-*   reword docs for ErrorKind and app::Settings ([3ccde7a4](https://github.com/kbknapp/clap-rs/commit/3ccde7a4b8f7a2ea8b916a5415c04a8ff4b5cb7a))
-*   fix tests that fail when the "suggestions" feature is disabled ([996fc381](https://github.com/kbknapp/clap-rs/commit/996fc381763a48d125c7ea8a58fed057fd0b4ac6))
-*   fix the OsString-using doc-tests ([af9e1a39](https://github.com/kbknapp/clap-rs/commit/af9e1a393ce6cdda46a03c8a4f48df222b015a24))
-*   tag non-rust code blocks as such instead of ignoring them ([0ba9f4b1](https://github.com/kbknapp/clap-rs/commit/0ba9f4b123f281952581b6dec948f7e51dd22890))
-* **ErrorKind:**  improve some errors about subcommands ([9f6217a4](https://github.com/kbknapp/clap-rs/commit/9f6217a424da823343d7b801b9c350dee3cd1906))
-* **yaml:**  make sure the doc-tests don't fail before "missing file" ([8c0f5551](https://github.com/kbknapp/clap-rs/commit/8c0f55516f4910c78c9f8a2bdbd822729574f95b))
-
-#### Improvements
-
-*   Stabilize clap_app! ([cd516006](https://github.com/kbknapp/clap-rs/commit/cd516006e35c37b005f329338560a0a53d1f3e00))
-* **with_defaults:**  Deprecate App::with_defaults() ([26085409](https://github.com/kbknapp/clap-rs/commit/2608540940c8bb66e517b65706bc7dea55510682), closes [#638](https://github.com/kbknapp/clap-rs/issues/638))
-
-#### Bug Fixes
-
-*   fixes a bug that made determining when to auto-wrap long help messages inconsistent ([468baadb](https://github.com/kbknapp/clap-rs/commit/468baadb8398fc1d37897b0c49374aef4cf97dca), closes [#688](https://github.com/kbknapp/clap-rs/issues/688))
-* **Completions:**  fish completions for nested subcommands ([a61eaf8a](https://github.com/kbknapp/clap-rs/commit/a61eaf8aade76cfe90ccc0f7125751ebf60e3254))
-* **features:**  Make lints not enable other nightly-requiring features ([835f75e3](https://github.com/kbknapp/clap-rs/commit/835f75e3ba20999117363ed9f916464d777f36ef))
-
-
-
-<a name="v2.14.0"></a>
-## v2.14.0 (2016-10-05)
-
-
-#### Features
-
-* **arg_aliases:**  Ability to alias arguments ([33b5f6ef](https://github.com/kbknapp/clap-rs/commit/33b5f6ef2c9612ecabb31f96b824793e46bfd3dd), closes [#669](https://github.com/kbknapp/clap-rs/issues/669))
-* **flag_aliases:**  Ability to alias flags ([40d6dac9](https://github.com/kbknapp/clap-rs/commit/40d6dac973927dded6ab423481634ef47ee7bfd7))
-
-#### Bug Fixes
-
-* **UsageParser:**  Handle non-ascii names / options. ([1d6a7c6e](https://github.com/kbknapp/clap-rs/commit/1d6a7c6e7e6aadc527346aa822f19d8587f714f3), closes [#664](https://github.com/kbknapp/clap-rs/issues/664))
-
-#### Documentation
-
-*   typo ([bac417fa](https://github.com/kbknapp/clap-rs/commit/bac417fa1cea3d32308334c7cccfcf54546cd9d8))
-
-
-<a name="v2.13.0"></a>
-## v2.13.0 (2016-09-18)
-
-
-#### Documentation
-
-*   updates README.md with new website information and updated video tutorials info ([0c19c580](https://github.com/kbknapp/clap-rs/commit/0c19c580cf50f1b82ff32f70b36708ae2bcac132))
-*   updates the docs about removing implicit value_delimiter(true) ([c81bc722](https://github.com/kbknapp/clap-rs/commit/c81bc722ebb8a86d22be89b5aec98df9fe222a08))
-* **Default Values:**  adds better examples on using default values ([57a8d9ab](https://github.com/kbknapp/clap-rs/commit/57a8d9abb2f973c235a8a14f8fc031673d7a7460), closes [#418](https://github.com/kbknapp/clap-rs/issues/418))
-
-#### Bug Fixes
-
-* **Value Delimiters:**  fixes the confusion around implicitly setting value delimiters. (default is now `false`) ([09d4d0a9](https://github.com/kbknapp/clap-rs/commit/09d4d0a9038d7ce2df55c2aec95e16f36189fcee), closes [#666](https://github.com/kbknapp/clap-rs/issues/666))
-
-
-
-<a name="v2.12.1"></a>
-### v2.12.1 (2016-09-13)
-
-
-#### Bug Fixes
-
-* **Help Wrapping:**  fixes a regression-bug where the old {n} newline char stopped working ([92ac353b](https://github.com/kbknapp/clap-rs/commit/92ac353b48b7caa2511ad2a046d94da93c236cf6), closes [#661](https://github.com/kbknapp/clap-rs/issues/661))
-
-
-
-<a name="v2.12.0"></a>
-## v2.12.0 (2016-09-13)
-
-
-#### Features
-
-* **Help:**  adds ability to hide the possible values on a per argument basis ([9151ef73](https://github.com/kbknapp/clap-rs/commit/9151ef739871f2e74910c342299c0de196b95dec), closes [#640](https://github.com/kbknapp/clap-rs/issues/640))
-* **help:**  allow for limiting detected terminal width ([a43e28af](https://github.com/kbknapp/clap-rs/commit/a43e28af85c9a9deaedd5ef735f4f13008daab29), closes [#653](https://github.com/kbknapp/clap-rs/issues/653))
-
-#### Documentation
-
-* **Help Wrapping:**  removes the verbage about using `'{n}'` to insert newlines in help text ([c5a2b352](https://github.com/kbknapp/clap-rs/commit/c5a2b352ca600f5b802290ad945731066cd53611))
-* **Value Delimiters:**  updates the docs for the Arg::multiple method WRT value delimiters and default settings ([f9d17a06](https://github.com/kbknapp/clap-rs/commit/f9d17a060aa53f10d0a6e1a7eed5d989d1a59533))
-* **appsettings:**  Document AppSetting::DisableVersion ([94501965](https://github.com/kbknapp/clap-rs/commit/945019654d2ca67eb2b1d6014fdf80b84d528d30), closes [#589](https://github.com/kbknapp/clap-rs/issues/589))
-
-#### Bug Fixes
-
-* **AllowLeadingHyphen:**  fixes a bug where valid args aren't recognized with this setting ([a9699e4d](https://github.com/kbknapp/clap-rs/commit/a9699e4d7cdc9a06e73b845933ff1fe6d76f016a), closes [#588](https://github.com/kbknapp/clap-rs/issues/588))
-
-#### Improvements
-
-* **Help Wrapping:**
-  *  clap now ignores hard newlines in help messages and properly re-aligns text, but still wraps if the term width is too small ([c7678523](https://github.com/kbknapp/clap-rs/commit/c76785239fd42adc8ca04f9202b6fec615aa9f14), closes [#617](https://github.com/kbknapp/clap-rs/issues/617))
-  *  makes some minor changes to when next line help is automatically used ([01cae799](https://github.com/kbknapp/clap-rs/commit/01cae7990a33167ac35103fb36c811b4fe6eb98f))
-* **Value Delimiters:**  changes the default value delimiter rules ([f9e69254](https://github.com/kbknapp/clap-rs/commit/f9e692548e8c94de15f909432de301407d6bb834), closes [#655](https://github.com/kbknapp/clap-rs/issues/655))
-* **YAML:**  supports setting Arg::require_delimiter from YAML ([b9b55a39](https://github.com/kbknapp/clap-rs/commit/b9b55a39dfebcdbdc05dca2692927e503db50816))
-
-#### Performance
-
-* **help:**  fix redundant contains() checks ([a8afed74](https://github.com/kbknapp/clap-rs/commit/a8afed7428bf0733f8e93bb11ad6c00d9e970fcc))
-
-
-
-<a name="v2.11.3"></a>
-### v2.11.3 (2016-09-07)
-
-
-#### Documentation
-
-* **Help Wrapping:**  removes the verbage about using `'{n}'` to insert newlines in help text ([c5a2b352](https://github.com/kbknapp/clap-rs/commit/c5a2b352ca600f5b802290ad945731066cd53611))
-
-#### Improvements
-
-* **Help Wrapping:**
-  *  clap now ignores hard newlines in help messages and properly re-aligns text, but still wraps if the term width is too small ([c7678523](https://github.com/kbknapp/clap-rs/commit/c76785239fd42adc8ca04f9202b6fec615aa9f14), closes [#617](https://github.com/kbknapp/clap-rs/issues/617))
-  *  makes some minor changes to when next line help is automatically used ([01cae799](https://github.com/kbknapp/clap-rs/commit/01cae7990a33167ac35103fb36c811b4fe6eb98f))
-* **YAML:**  supports setting Arg::require_delimiter from YAML ([b9b55a39](https://github.com/kbknapp/clap-rs/commit/b9b55a39dfebcdbdc05dca2692927e503db50816))
-
-
-
-
-<a name="v2.11.2"></a>
-### v2.11.2 (2016-09-06)
-
-#### Improvements
-
-* **Help Wrapping:**  makes some minor changes to when next line help is automatically used ([5658b117](https://github.com/kbknapp/clap-rs/commit/5658b117aec3e03adff9c8c52a4c4bc1fcb4e1ff))
-
-
-<a name="v2.11.1"></a>
-### v2.11.1 (2016-09-05)
-
-
-#### Bug Fixes
-
-* **Settings:**  fixes an issue where settings weren't propogated down through grand-child subcommands ([b3efc107](https://github.com/kbknapp/clap-rs/commit/b3efc107515d78517b20798ff3890b8a2b04498e), closes [#638](https://github.com/kbknapp/clap-rs/issues/638))
-
-#### Features
-
-* **Errors:**  Errors with custom description ([58512f2f](https://github.com/kbknapp/clap-rs/commit/58512f2fcb430745f1ee6ee8f1c67f62dc216c73))
-
-#### Improvements
-
-* **help:**  use term_size instead of home-grown solution ([fc7327e9](https://github.com/kbknapp/clap-rs/commit/fc7327e9dcf4258ef2baebf0a8714d9c0622855b))
-
-
-
-<a name="v2.11.0"></a>
-### v2.11.0 (2016-08-28)
-
-
-#### Bug Fixes
-
-* **Groups:**  fixes some usage strings that contain both args in groups and ones that conflict with each other ([3d782def](https://github.com/kbknapp/clap-rs/commit/3d782def57725e2de26ca5a5bc5cc2e40ddebefb), closes [#616](https://github.com/kbknapp/clap-rs/issues/616))
-
-#### Documentation
-
-*   moves docs to docs.rs ([03209d5e](https://github.com/kbknapp/clap-rs/commit/03209d5e1300906f00bafec1869c2047a92e5071), closes [#634](https://github.com/kbknapp/clap-rs/issues/634))
-
-#### Improvements
-
-* **Completions:**  uses standard conventions for bash completion files, namely '{bin}.bash-completion' ([27f5bbfb](https://github.com/kbknapp/clap-rs/commit/27f5bbfbcc9474c2f57c2b92b1feb898ae46ee70), closes [#567](https://github.com/kbknapp/clap-rs/issues/567))
-* **Help:**  automatically moves help text to the next line and wraps when term width is determined to be too small, or help text is too long ([150964c4](https://github.com/kbknapp/clap-rs/commit/150964c4e7124d54476c9d9b4b3f2406f0fd00e5), closes [#597](https://github.com/kbknapp/clap-rs/issues/597))
-* **YAML Errors:**  vastly improves error messages when using YAML ([f43b7c65](https://github.com/kbknapp/clap-rs/commit/f43b7c65941c53adc0616b8646a21dc255862eb2), closes [#574](https://github.com/kbknapp/clap-rs/issues/574))
-
-#### Features
-
-*   adds App::with_defaults to automatically use crate_authors! and crate_version! macros ([5520bb01](https://github.com/kbknapp/clap-rs/commit/5520bb012c127dfd299fd55699443c744d8dcd5b), closes [#600](https://github.com/kbknapp/clap-rs/issues/600))
-
-
-
-<a name="v2.10.4"></a>
-### v2.10.4 (2016-08-25)
-
-
-#### Bug Fixes
-
-* **Help Wrapping:**  fixes a bug where help is wrapped incorrectly and causing a panic with some non-English characters ([d0b442c7](https://github.com/kbknapp/clap-rs/commit/d0b442c7beeecac9764406bc3bd171ced0b8825e), closes [#626](https://github.com/kbknapp/clap-rs/issues/626))
-
-
-
-<a name="v2.10.3"></a>
-### v2.10.3 (2016-08-25)
-
-#### Features
-
-* **Help:**  adds new short hand way to use source formatting and ignore term width in help messages ([7dfdaf20](https://github.com/kbknapp/clap-rs/commit/7dfdaf200ebb5c431351a045b48f5e0f0d3f31db), closes [#625](https://github.com/kbknapp/clap-rs/issues/625))
-
-#### Documentation
-
-* **Term Width:**  adds details about set_term_width(0) ([00b8205d](https://github.com/kbknapp/clap-rs/commit/00b8205d22639d1b54b9c453c55c785aace52cb2))
-
-#### Bug Fixes
-
-* **Unicode:**  fixes two bugs where non-English characters were stripped or caused a panic with help wrapping ([763a5c92](https://github.com/kbknapp/clap-rs/commit/763a5c920e23efc74d190af0cb8b5dd714b2d67a), closes [#626](https://github.com/kbknapp/clap-rs/issues/626))
-
-
-
-<a name="v2.10.2"></a>
-### v2.10.2 (2016-08-22)
-
-
-#### Bug Fixes
-
-*   fixes a bug where the help is printed twice ([a643fb28](https://github.com/kbknapp/clap-rs/commit/a643fb283acd9905dc727c4579c5c9fa2ceaa7e7), closes [#623](https://github.com/kbknapp/clap-rs/issues/623))
-
-
-
-<a name="v2.10.1"></a>
-### v2.10.1 (2016-08-21)
-
-
-#### Bug Fixes
-
-* **Help Subcommand:**  fixes misleading usage string when using multi-level subcommmands ([e203515e](https://github.com/kbknapp/clap-rs/commit/e203515e3ac495b405dbba4f78fb6af148fd282e), closes [#618](https://github.com/kbknapp/clap-rs/issues/618))
-
-#### Features
-
-* **YAML:**  allows using lists or single values with arg declarations ([9ade2cd4](https://github.com/kbknapp/clap-rs/commit/9ade2cd4b268d6d7fe828319ce6a523c641b9c38), closes [#614](https://github.com/kbknapp/clap-rs/issues/614), [#613](https://github.com/kbknapp/clap-rs/issues/613))
-
-
-
-<a name="v2.10.0"></a>
-## v2.10.0 (2016-07-29)
-
-
-#### Features
-
-* **Completions:**  one can generate a basic fish completions script at compile time ([1979d2f2](https://github.com/kbknapp/clap-rs/commit/1979d2f2f3216e57d02a97e624a8a8f6cf867ed9))
-
-#### Bug Fixes
-
-* **parser:**  preserve external subcommand name ([875df243](https://github.com/kbknapp/clap-rs/commit/875df24316c266920a073c13bbefbf546bc1f635))
-
-#### Breaking Changes
-
-* **parser:**  preserve external subcommand name ([875df243](https://github.com/kbknapp/clap-rs/commit/875df24316c266920a073c13bbefbf546bc1f635))
-
-#### Documentation
-
-* **YAML:**  fixes example 17's incorrect reference to arg_groups instead of groups ([b6c99e13](https://github.com/kbknapp/clap-rs/commit/b6c99e1377f918e78c16c8faced70a71607da931), closes [#601](https://github.com/kbknapp/clap-rs/issues/601))
-
-
-
-<a name="2.9.3"></a>
-### 2.9.3 (2016-07-24)
-
-
-#### Bug Fixes
-
-*   fixes bug where only first arg in list of required_unless_one is recognized ([1fc3b55b](https://github.com/kbknapp/clap-rs/commit/1fc3b55bd6c8653b02e7c4253749c6b77737d2ac), closes [#575](https://github.com/kbknapp/clap-rs/issues/575))
-* **Settings:**  fixes typo subcommandsrequired->subcommandrequired ([fc72cdf5](https://github.com/kbknapp/clap-rs/commit/fc72cdf591d30f5d9375d0b5cc2a2ff3e812f9f6), closes [#593](https://github.com/kbknapp/clap-rs/issues/593))
-
-#### Features
-
-* **Completions:**  adds the ability to generate completions to io::Write object ([9f62cf73](https://github.com/kbknapp/clap-rs/commit/9f62cf7378ba5acb5ce8c5bac89b4aa60c30755f))
-* **Settings:**  Add unset_setting and unset_settings fns to App (#598) ([0ceba231](https://github.com/kbknapp/clap-rs/commit/0ceba231c6767cd6d88fdb1feeeea41deadf77ff), closes [#590](https://github.com/kbknapp/clap-rs/issues/590))
-
-
-<a name="2.9.2"></a>
-### 2.9.2 (2016-07-03)
-
-
-#### Documentation
-
-* **Completions:**  fixes the formatting of the Cargo.toml excerpt in the completions example ([722f2607](https://github.com/kbknapp/clap-rs/commit/722f2607beaef56b6a0e433db5fd09492d9f028c))
-
-#### Bug Fixes
-
-* **Completions:**  fixes bug where --help and --version short weren't added to the completion list ([e9f2438e](https://github.com/kbknapp/clap-rs/commit/e9f2438e2ce99af0ae570a2eaf541fc7f55b771b), closes [#536](https://github.com/kbknapp/clap-rs/issues/536))
-
-
-
-<a name="2.9.1"></a>
-### 2.9.1 (2016-07-02)
-
-
-#### Improvements
-
-* **Completions:**  allows multiple completions to be built by namespacing with bin name ([57484b2d](https://github.com/kbknapp/clap-rs/commit/57484b2daeaac01c1026e8c84efc8bf099e0eb31))
-
-
-<a name="v2.9.0"></a>
-## v2.9.0 (2016-07-01)
-
-
-#### Documentation
-
-* **Completions:**
-  *  fixes some errors in the completion docs ([9b359bf0](https://github.com/kbknapp/clap-rs/commit/9b359bf06255d3dad8f489308044b60a9d1e6a87))
-  *  adds documentation for completion scripts ([c6c519e4](https://github.com/kbknapp/clap-rs/commit/c6c519e40efd6c4533a9ef5efe8e74fd150391b7))
-
-#### Features
-
-* **Completions:**
-  *  one can now generate a bash completions script at compile time! ([e75b6c7b](https://github.com/kbknapp/clap-rs/commit/e75b6c7b75f729afb9eb1d2a2faf61dca7674634), closes [#376](https://github.com/kbknapp/clap-rs/issues/376))
-  *  completions now include aliases to subcommands, including all subcommand options ([0ab9f840](https://github.com/kbknapp/clap-rs/commit/0ab9f84052a8cf65b5551657f46c0c270841e634), closes [#556](https://github.com/kbknapp/clap-rs/issues/556))
-  *  completions now continue completing even after first completion ([18fc2e5b](https://github.com/kbknapp/clap-rs/commit/18fc2e5b5af63bf54a94b72cec5e1223d49f4806))
-  *  allows matching on possible values in options ([89cc2026](https://github.com/kbknapp/clap-rs/commit/89cc2026ba9ac69cf44c5254360bbf99236d4f89), closes [#557](https://github.com/kbknapp/clap-rs/issues/557))
-
-#### Bug Fixes
-
-* **AllowLeadingHyphen:**  fixes an issue where  isn't ignored like it should be with this setting ([96c24c9a](https://github.com/kbknapp/clap-rs/commit/96c24c9a8fa1f85e06138d3cdd133e51659e19d2), closes [#558](https://github.com/kbknapp/clap-rs/issues/558))
-
-<a name="v2.8.0"></a>
-## v2.8.0 (2016-06-30)
-
-
-#### Features
-
-* **Arg:**  adds new setting `Arg::require_delimiter` which requires val delimiter to parse multiple values ([920b5595](https://github.com/kbknapp/clap-rs/commit/920b5595ed72abfb501ce054ab536067d8df2a66))
-
-#### Bug Fixes
-
-*   Declare term::Winsize as repr(C) ([5d663d90](https://github.com/kbknapp/clap-rs/commit/5d663d905c9829ce6e7a164f1f0896cdd70236dd))
-
-#### Documentation
-
-* **Arg:**  adds docs for ([49af4e38](https://github.com/kbknapp/clap-rs/commit/49af4e38a5dae2ab0a7fc3b4147e2c053d532484))
-
-
-
-<a name="v2.7.1"></a>
-### v2.7.1 (2016-06-29)
-
-
-#### Bug Fixes
-
-* **Options:**
-  *  options with multiple values and using delimiters no longer parse additional values after a trailing space ([cdc500bd](https://github.com/kbknapp/clap-rs/commit/cdc500bdde6abe238c36ade406ddafc2bafff583))
-  *  using options with multiple values and with an = no longer parse args after the trailing space as values ([290f61d0](https://github.com/kbknapp/clap-rs/commit/290f61d07177413cf082ada55526d83405f6d011))
-
-
-
-<a name="v2.7.0"></a>
-## v2.7.0 (2016-06-28)
-
-
-#### Documentation
-
-*   fix typos ([43b3d40b](https://github.com/kbknapp/clap-rs/commit/43b3d40b8c38b1571da75af86b5088be96cccec2))
-* **ArgGroup:**  vastly improves ArgGroup docs by adding better examples ([9e5f4f5d](https://github.com/kbknapp/clap-rs/commit/9e5f4f5d734d630bca5535c3a0aa4fd4f9db3e39), closes [#534](https://github.com/kbknapp/clap-rs/issues/534))
-
-#### Features
-
-* **ArgGroup:**  one can now specify groups which require AT LEAST one of the args ([33689acc](https://github.com/kbknapp/clap-rs/commit/33689acc689b217a8c0ee439f1b1225590c38355), closes [#533](https://github.com/kbknapp/clap-rs/issues/533))
-
-#### Bug Fixes
-
-* **App:**  using `App::print_help` now prints the same as would have been printed by `--help` or the like ([e84cc018](https://github.com/kbknapp/clap-rs/commit/e84cc01836bbe0527e97de6db9889bd9e0fd6ba1), closes [#536](https://github.com/kbknapp/clap-rs/issues/536))
-* **Help:**
-  *  prevents invoking <cmd> help help and displaying incorrect help message ([e3d2893f](https://github.com/kbknapp/clap-rs/commit/e3d2893f377942a2d4cf3c6ff04524d0346e6fdb), closes [#538](https://github.com/kbknapp/clap-rs/issues/538))
-  *  subcommand help messages requested via <cmd> help <sub> now correctly match <cmd> <sub> --help ([08ad1cff](https://github.com/kbknapp/clap-rs/commit/08ad1cff4fec57224ea957a2891a057b323c01bc), closes [#539](https://github.com/kbknapp/clap-rs/issues/539))
-
-#### Improvements
-
-* **ArgGroup:**  Add multiple ArgGroups per Arg ([902e182f](https://github.com/kbknapp/clap-rs/commit/902e182f7a58aff11ff01e0a452abcdbdb2262aa), closes [#426](https://github.com/kbknapp/clap-rs/issues/426))
-* **Usage Strings:**  `[FLAGS]` and `[ARGS]` are no longer blindly added to usage strings ([9b2e45b1](https://github.com/kbknapp/clap-rs/commit/9b2e45b170aff567b038d8b3368880b6046c10c6), closes [#537](https://github.com/kbknapp/clap-rs/issues/537))
-* **arg_enum!:**  allows using meta items like repr(C) with arg_enum!s ([edf9b233](https://github.com/kbknapp/clap-rs/commit/edf9b2331c17a2cbcc13f961add4c55c2778e773), closes [#543](https://github.com/kbknapp/clap-rs/issues/543))
-
-
-
-<a name="v2.6.0"></a>
-## v2.6.0 (2016-06-14)
-
-
-#### Improvements
-
-*   removes extra newline from help output ([86e61d19](https://github.com/kbknapp/clap-rs/commit/86e61d19a748fb9870fcf1175308984e51ca1115))
-*   allows printing version to any io::Write object ([921f5f79](https://github.com/kbknapp/clap-rs/commit/921f5f7916597f1d028cd4a65bfe76a01c801724))
-*   removes extra newline when printing version ([7e2e2cbb](https://github.com/kbknapp/clap-rs/commit/7e2e2cbb4a8a0f050bb8072a376f742fc54b8589))
-* **Aliases:**  improves readability of asliases in help messages ([ca511de7](https://github.com/kbknapp/clap-rs/commit/ca511de71f5b8c2ac419f1b188658e8c63b67846), closes [#526](https://github.com/kbknapp/clap-rs/issues/526), [#529](https://github.com/kbknapp/clap-rs/issues/529))
-* **Usage Strings:**  improves the default usage string when only a single positional arg is present ([ec86f2da](https://github.com/kbknapp/clap-rs/commit/ec86f2dada1545a63fc72355e22fcdc4c466c215), closes [#518](https://github.com/kbknapp/clap-rs/issues/518))
-
-#### Features
-
-* **Help:**  allows wrapping at specified term width (Even on Windows!) ([1761dc0d](https://github.com/kbknapp/clap-rs/commit/1761dc0d27d0d621229d792be40c36fbf65c3014), closes [#451](https://github.com/kbknapp/clap-rs/issues/451))
-* **Settings:**
-  *  adds new setting to stop delimiting values with -- or TrailingVarArg ([fc3e0f5a](https://github.com/kbknapp/clap-rs/commit/fc3e0f5afda6d24cdb3c4676614beebe13e1e870), closes [#511](https://github.com/kbknapp/clap-rs/issues/511))
-  *  one can now set an AppSetting which is propogated down through child subcommands ([e2341835](https://github.com/kbknapp/clap-rs/commit/e23418351a3b98bf08dfd7744bc14377c70d59ee), closes [#519](https://github.com/kbknapp/clap-rs/issues/519))
-* **Subcommands:**  adds support for visible aliases ([7b10e7f8](https://github.com/kbknapp/clap-rs/commit/7b10e7f8937a07fdb8d16a6d8df79ce78d080cd3), closes [#522](https://github.com/kbknapp/clap-rs/issues/522))
-
-#### Bug Fixes
-
-*   fixes bug where args are printed out of order with templates ([05abb534](https://github.com/kbknapp/clap-rs/commit/05abb534864764102031a0d402e64ac65867aa87))
-*   fixes bug where one can't override version or help flags ([90d7d6a2](https://github.com/kbknapp/clap-rs/commit/90d7d6a2ea8240122dd9bf8d82d3c4f5ebb5c703), closes [#514](https://github.com/kbknapp/clap-rs/issues/514))
-*   fixes issue where before_help wasn't printed ([b3faff60](https://github.com/kbknapp/clap-rs/commit/b3faff6030f76a23f26afcfa6a90169002ed7106))
-* **Help:**  `App::before_help` and `App::after_help` now correctly wrap ([1f4da767](https://github.com/kbknapp/clap-rs/commit/1f4da7676e6e71aa8dda799f3eeefad105a47819), closes [#516](https://github.com/kbknapp/clap-rs/issues/516))
-* **Settings:**  fixes bug where new color settings couldn't be converted from strs ([706a7c11](https://github.com/kbknapp/clap-rs/commit/706a7c11b0900be594de6d5a3121938eff197602))
-* **Subcommands:**  subcommands with aliases now display help of the aliased subcommand ([5354d14b](https://github.com/kbknapp/clap-rs/commit/5354d14b51f189885ba110e01e6b76cca3752992), closes [#521](https://github.com/kbknapp/clap-rs/issues/521))
-* **Windows:**  fixes a failing windows build ([01e7dfd6](https://github.com/kbknapp/clap-rs/commit/01e7dfd6c07228c0be6695b3c7bf9370d82860d4))
-* **YAML:**  adds missing YAML methods for App and Arg ([e468faf3](https://github.com/kbknapp/clap-rs/commit/e468faf3f05950fd9f72d84b69aa2061e91c6c64), closes [#528](https://github.com/kbknapp/clap-rs/issues/528))
-
-
-
-<a name="v2.5.2"></a>
-### v2.5.2 (2016-05-31)
-
-
-#### Improvements
-
-*   removes extra newline from help output ([86e61d19](https://github.com/kbknapp/clap-rs/commit/86e61d19a748fb9870fcf1175308984e51ca1115))
-*   allows printing version to any io::Write object ([921f5f79](https://github.com/kbknapp/clap-rs/commit/921f5f7916597f1d028cd4a65bfe76a01c801724))
-*   removes extra newline when printing version ([7e2e2cbb](https://github.com/kbknapp/clap-rs/commit/7e2e2cbb4a8a0f050bb8072a376f742fc54b8589))
-
-#### Bug Fixes
-
-*   fixes bug where args are printed out of order with templates ([3935431d](https://github.com/kbknapp/clap-rs/commit/3935431d5633f577c0826ae2142794b301f4b8ca))
-*   fixes bug where one can't override version or help flags ([90d7d6a2](https://github.com/kbknapp/clap-rs/commit/90d7d6a2ea8240122dd9bf8d82d3c4f5ebb5c703), closes [#514](https://github.com/kbknapp/clap-rs/issues/514))
-*   fixes issue where before_help wasn't printed ([b3faff60](https://github.com/kbknapp/clap-rs/commit/b3faff6030f76a23f26afcfa6a90169002ed7106))
-
-#### Documentation
-
-*   inter-links all types and pages ([3312893d](https://github.com/kbknapp/clap-rs/commit/3312893ddaef3f44d68d8d26ed3d08010be50d97), closes [#505](https://github.com/kbknapp/clap-rs/issues/505))
-*   makes all publicly available types viewable in docs ([52ca6505](https://github.com/kbknapp/clap-rs/commit/52ca6505b4fec7b5c2d53d160c072d395eb21da6))
-
-<a name="v2.5.1"></a>
-### v2.5.1 (2016-05-11)
-
-
-#### Bug Fixes
-
-* **Subcommand Aliases**: fixes lifetime issue when setting multiple aliases at once ([ac42f6cf0](https://github.com/kbknapp/clap-rs/commit/ac42f6cf0de6c4920f703807d63061803930b18d))
-
-<a name="v2.5.0"></a>
-## v2.5.0 (2016-05-10)
-
-
-#### Improvements
-
-* **SubCommand Aliases:**  adds feature to yaml configs too ([69592195](https://github.com/kbknapp/clap-rs/commit/695921954dde46dfd483399dcdef482c9dd7f34a))
-
-#### Features
-
-* **SubCommands:**  adds support for subcommand aliases ([66b4dea6](https://github.com/kbknapp/clap-rs/commit/66b4dea65c44d8f77ff522238a9237aed1bcab6d), closes [#469](https://github.com/kbknapp/clap-rs/issues/469))
-
-
-<a name="v2.4.3"></a>
-### v2.4.3 (2016-05-10)
-
-
-#### Bug Fixes
-
-* **Usage Strings:**
-  *  now properly dedups args that are also in groups ([3ca0947c](https://github.com/kbknapp/clap-rs/commit/3ca0947c166b4f8525752255e3a4fa6565eb9689), closes [#498](https://github.com/kbknapp/clap-rs/issues/498))
-  *  removes duplicate groups from usage strings ([f574fb8a](https://github.com/kbknapp/clap-rs/commit/f574fb8a7cde4d4a2fa4c4481d59be2d0f135427))
-
-#### Improvements
-
-* **Groups:**  formats positional args in groups in a better way ([fef11154](https://github.com/kbknapp/clap-rs/commit/fef11154fb7430d1cbf04a672aabb366e456a368))
-* **Help:**
-  *  moves positionals to standard <> formatting ([03dfe5ce](https://github.com/kbknapp/clap-rs/commit/03dfe5ceff1d63f172788ff688567ddad9fe119b))
-  *  default help subcommand string has been shortened ([5b7fe8e4](https://github.com/kbknapp/clap-rs/commit/5b7fe8e4161e43ab19e2e5fcf55fbe46791134e9), closes [#494](https://github.com/kbknapp/clap-rs/issues/494))
-
-<a name="v2.4.2"></a>
-### v2.4.3 (2016-05-10)
-
-* Ghost Release
-
-<a name="v2.4.1"></a>
-### v2.4.3 (2016-05-10)
-
-* Ghost Release
-
-<a name="v2.4.0"></a>
-## v2.4.0 (2016-05-02)
-
-
-#### Features
-
-* **Help:**  adds support for displaying info before help message ([29fbfa3b](https://github.com/kbknapp/clap-rs/commit/29fbfa3b963f2f3ca7704bf5d3e1201531baa373))
-* **Required:**  adds allowing args that are required unless certain args are present ([af1f7916](https://github.com/kbknapp/clap-rs/commit/af1f79168390ea7da4074d0d9777de458ea64971))
-
-#### Documentation
-
-*   hides formatting from docs ([cb708093](https://github.com/kbknapp/clap-rs/commit/cb708093a7cd057f08c98b7bd1ed54c2db86ae7e))
-* **required_unless:**  adds docs and examples for required_unless ([ca727b52](https://github.com/kbknapp/clap-rs/commit/ca727b52423b9883acd88b2f227b2711bc144573))
-
-#### Bug Fixes
-
-* **Required Args:**  fixes issue where missing required args are sometimes duplicatd in error messages ([3beebd81](https://github.com/kbknapp/clap-rs/commit/3beebd81e7bc2faa4115ac109cf570e512c5477f), closes [#492](https://github.com/kbknapp/clap-rs/issues/492))
-
-
-<a name="v2.3.0"></a>
-## v2.3.0 (2016-04-18)
-
-
-#### Improvements
-
-* **macros.rs:**  Added write_nspaces macro (a new version of write_spaces) ([9d757e86](https://github.com/kbknapp/clap-rs/commit/9d757e8678e334e5a740ac750c76a9ed4e785cba))
-* **parser.rs:**
-  *  Provide a way to create a usage string without the USAGE: title ([a91d378b](https://github.com/kbknapp/clap-rs/commit/a91d378ba0c91b5796457f8c6e881b13226ab735))
-  *  Make Parser's create_usage public allowing to have function outside the parser to generate the help ([d51945f8](https://github.com/kbknapp/clap-rs/commit/d51945f8b82ebb0963f4f40b384a9e8335783091))
-  *  Expose Parser's flags, opts and positionals argument as iterators ([9b23e7ee](https://github.com/kbknapp/clap-rs/commit/9b23e7ee40e51f7a823644c4496be955dc6c9d3a))
-* **src/args:**  Exposes argument display order by introducing a new Trait ([1321630e](https://github.com/kbknapp/clap-rs/commit/1321630ef56955f152c73376d4d85cceb0bb4a12))
-* **srs/args:**  Added longest_filter to AnyArg trait ([65b3f667](https://github.com/kbknapp/clap-rs/commit/65b3f667532685f854c699ddd264d326599cf7e5))
-
-#### Features
-
-* **Authors Macro:**  adds a crate_authors macro ([38fb59ab](https://github.com/kbknapp/clap-rs/commit/38fb59abf480eb2b6feca269097412f8b00b5b54), closes [#447](https://github.com/kbknapp/clap-rs/issues/447))
-* **HELP:**
-  *  implements optional colored help messages ([abc8f669](https://github.com/kbknapp/clap-rs/commit/abc8f669c3c8193ffc3a3b0ac6c3ac2198794d4f), closes [#483](https://github.com/kbknapp/clap-rs/issues/483))
-  *  Add a Templated Help system. ([81e121ed](https://github.com/kbknapp/clap-rs/commit/81e121edd616f7285593f11120c63bcccae0d23e))
-
-#### Bug Fixes
-
-* **HELP:**  Adjust Help to semantic changes introduced in 6933b84 ([8d23806b](https://github.com/kbknapp/clap-rs/commit/8d23806bd67530ad412c34a1dcdcb1435555573d))
-
-<a name="v2.2.6"></a>
-### v2.2.6 (2016-04-11)
-
-#### Bug Fixes
-
-* **Arg Groups**: fixes bug where arg name isn't printed properly ([3019a685](https://github.com/kbknapp/clap-rs/commit/3019a685eee747ccbe6be09ad5dddce0b1d1d4db), closes [#476](https://github.com/kbknapp/clap-rs/issues/476))
-
-
-<a name="v2.2.5"></a>
-### v2.2.5 (2016-04-03)
-
-
-#### Bug Fixes
-
-* **Empty Values:**  fixes bug where empty values weren't stored ([885d166f](https://github.com/kbknapp/clap-rs/commit/885d166f04eb3fb581898ae5818c6c8032e5a686), closes [#470](https://github.com/kbknapp/clap-rs/issues/470))
-* **Help Message:**  fixes bug where arg name is printed twice ([71acf1d5](https://github.com/kbknapp/clap-rs/commit/71acf1d576946658b8bbdb5ae79e6716c43a030f), closes [#472](https://github.com/kbknapp/clap-rs/issues/472))
-
-
-<a name="v2.2.4"></a>
-### v2.2.4 (2016-03-30)
-
-
-#### Bug Fixes
-
-*   fixes compiling with debug cargo feature ([d4b55450](https://github.com/kbknapp/clap-rs/commit/d4b554509928031ac0808076178075bb21f8c1da))
-* **Empty Values:**  fixes bug where empty values weren't stored ([885d166f](https://github.com/kbknapp/clap-rs/commit/885d166f04eb3fb581898ae5818c6c8032e5a686), closes [#470](https://github.com/kbknapp/clap-rs/issues/470))
-
-
-
-<a name="v2.2.3"></a>
-### v2.2.3 (2016-03-28)
-
-
-#### Bug Fixes
-
-* **Help Subcommand:**  fixes issue where help and version flags weren't properly displayed ([205b07bf](https://github.com/kbknapp/clap-rs/commit/205b07bf2e6547851f1290f8cd6b169145e144f1), closes [#466](https://github.com/kbknapp/clap-rs/issues/466))
-
-<a name="v2.2.2"></a>
-### v2.2.2 (2016-03-27)
-
-
-#### Bug Fixes
-
-* **Help Message:**  fixes bug with wrapping in the middle of a unicode sequence ([05365ddc](https://github.com/kbknapp/clap-rs/commit/05365ddcc252e4b49e7a75e199d6001a430bd84d), closes [#456](https://github.com/kbknapp/clap-rs/issues/456))
-* **Usage Strings:**  fixes small bug where -- would appear needlessly in usage strings ([6933b849](https://github.com/kbknapp/clap-rs/commit/6933b8491c2a7e28cdb61b47dcf10caf33c2f78a), closes [#461](https://github.com/kbknapp/clap-rs/issues/461))
-
-
-<a name="2.2.1"></a>
-### 2.2.1 (2016-03-16)
-
-
-#### Features
-
-* **Help Message:**  wraps and aligns the help message of subcommands ([813d75d0](https://github.com/kbknapp/clap-rs/commit/813d75d06fbf077c65762608c0fa5e941cfc393c), closes [#452](https://github.com/kbknapp/clap-rs/issues/452))
-
-#### Bug Fixes
-
-* **Help Message:**  fixes a bug where small terminal sizes causing a loop ([1d73b035](https://github.com/kbknapp/clap-rs/commit/1d73b0355236923aeaf6799abc759762ded7e1d0), closes [#453](https://github.com/kbknapp/clap-rs/issues/453))
-
-
-<a name="v2.2.0"></a>
-## v2.2.0 (2016-03-15)
-
-
-#### Features
-
-* **Help Message:**  can auto wrap and aligning help text to term width ([e36af026](https://github.com/kbknapp/clap-rs/commit/e36af0266635f23e85e951b9088d561e9a5d1bf6), closes [#428](https://github.com/kbknapp/clap-rs/issues/428))
-* **Help Subcommand:**  adds support passing additional subcommands to help subcommand ([2c12757b](https://github.com/kbknapp/clap-rs/commit/2c12757bbdf34ce481f3446c074e24c09c2e60fd), closes [#416](https://github.com/kbknapp/clap-rs/issues/416))
-* **Opts and Flags:**  adds support for custom ordering in help messages ([9803b51e](https://github.com/kbknapp/clap-rs/commit/9803b51e799904c0befaac457418ee766ccc1ab9))
-* **Settings:**  adds support for automatically deriving custom display order of args ([ad86e433](https://github.com/kbknapp/clap-rs/commit/ad86e43334c4f70e86909689a088fb87e26ff95a), closes [#444](https://github.com/kbknapp/clap-rs/issues/444))
-* **Subcommands:**  adds support for custom ordering in help messages ([7d2a2ed4](https://github.com/kbknapp/clap-rs/commit/7d2a2ed413f5517d45988eef0765cdcd663b6372), closes [#442](https://github.com/kbknapp/clap-rs/issues/442))
-
-#### Bug Fixes
-
-* **From Usage:**  fixes a bug where adding empty lines werent ignored ([c5c58c86](https://github.com/kbknapp/clap-rs/commit/c5c58c86b9c503d8de19da356a5a5cffb59fbe84))
-
-#### Documentation
-
-* **Groups:**  explains required ArgGroups better ([4ff0205b](https://github.com/kbknapp/clap-rs/commit/4ff0205b85a45151b59bbaf090a89df13438380f), closes [#439](https://github.com/kbknapp/clap-rs/issues/439))
-
-<a name="v2.1.2"></a>
-### v2.1.2 (2016-02-24)
-
-#### Bug Fixes
-
-* **Nightly:**  fixes failing nightly build ([d752c170](https://github.com/kbknapp/clap-rs/commit/d752c17029598b19037710f204b7943f0830ae75), closes [#434](https://github.com/kbknapp/clap-rs/issues/434))
-
-
-<a name="v2.1.1"></a>
-### v2.1.1 (2016-02-19)
-
-
-#### Documentation
-
-* **AppSettings:**  clarifies that AppSettings do not propagate ([3c8db0e9](https://github.com/kbknapp/clap-rs/commit/3c8db0e9be1d24edaad364359513cbb02abb4186), closes [#429](https://github.com/kbknapp/clap-rs/issues/429))
-* **Arg Examples:**  adds better examples ([1e79cccc](https://github.com/kbknapp/clap-rs/commit/1e79cccc12937bc0e7cd2aad8e404410798e9fff))
-
-#### Improvements
-
-* **Help:**  adds setting for next line help by arg ([066df748](https://github.com/kbknapp/clap-rs/commit/066df7486e684cf50a8479a356a12ba972c34ce1), closes [#427](https://github.com/kbknapp/clap-rs/issues/427))
-
-
-<a name="v2.1.0"></a>
-## v2.1.0 (2016-02-10)
-
-
-#### Features
-
-* **Defult Values:**  adds support for default values in args ([73211952](https://github.com/kbknapp/clap-rs/commit/73211952964a79d97b434dd567e6d7d34be7feb5), closes [#418](https://github.com/kbknapp/clap-rs/issues/418))
-
-#### Documentation
-
-* **Default Values:**  adds better examples and notes for default values ([9facd74f](https://github.com/kbknapp/clap-rs/commit/9facd74f843ef3807c5d35259558a344e6c25905))
-
-
-<a name="v2.0.6"></a>
-### v2.0.6 (2016-02-09)
-
-
-#### Improvements
-
-* **Positional Arguments:**  now displays value name if appropriate ([f0a99916](https://github.com/kbknapp/clap-rs/commit/f0a99916c59ce675515c6dcdfe9a40b130510908), closes [#420](https://github.com/kbknapp/clap-rs/issues/420))
-
-
-<a name="v2.0.5"></a>
-### v2.0.5 (2016-02-05)
-
-
-#### Bug Fixes
-
-* **Multiple Values:**  fixes bug where number_of_values wasnt respected ([72c387da](https://github.com/kbknapp/clap-rs/commit/72c387da0bb8a6f526f863770f08bb8ca0d3de03))
-
-
-<a name="v2.0.4"></a>
-### v2.0.4 (2016-02-04)
-
-
-#### Bug Fixes
-
-*   adds support for building ArgGroups from standalone YAML ([fcbc7e12](https://github.com/kbknapp/clap-rs/commit/fcbc7e12f5d7b023b8f30cba8cad28a01cf6cd26))
-*   Stop lonely hyphens from causing panic ([85b11468](https://github.com/kbknapp/clap-rs/commit/85b11468b0189d5cc15f1cfac5db40d17a0077dc), closes [#410](https://github.com/kbknapp/clap-rs/issues/410))
-* **AppSettings:**  fixes bug where subcmds didn't receive parent ver ([a62e4527](https://github.com/kbknapp/clap-rs/commit/a62e452754b3b0e3ac9a15aa8b5330636229ead1))
-
-<a name="v2.0.3"></a>
-### v2.0.3 (2016-02-02)
-
-
-#### Improvements
-
-* **values:**  adds support for up to u64::max values per arg ([c7abf7d7](https://github.com/kbknapp/clap-rs/commit/c7abf7d7611e317b0d31d97632e3d2e13570947c))
-* **occurrences:**  Allow for more than 256 occurrences of an argument. ([3731ddb3](https://github.com/kbknapp/clap-rs/commit/3731ddb361163f3d6b86844362871e48c80fa530))
-
-#### Features
-
-* **AppSettings:**  adds HidePossibleValuesInHelp to skip writing those values ([cdee7a0e](https://github.com/kbknapp/clap-rs/commit/cdee7a0eb2beeec723cb98acfacf03bf629c1da3))
-
-#### Bug Fixes
-
-* **value_t_or_exit:**  fixes typo which causes value_t_or_exit to return a Result ([ee96baff](https://github.com/kbknapp/clap-rs/commit/ee96baffd306cb8d20ddc5575cf739bb1a6354e8))
-
-
-<a name="v2.0.2"></a>
-### v2.0.2 (2016-01-31)
-
-
-#### Improvements
-
-* **arg_enum:**  enum declared with arg_enum returns [&'static str; #] instead of Vec ([9c4b8a1a](https://github.com/kbknapp/clap-rs/commit/9c4b8a1a6b12949222f17d1074578ad7676b9c0d))
-
-#### Bug Fixes
-
-*   clap_app! should be gated by unstable, not nightly feature ([0c8b84af](https://github.com/kbknapp/clap-rs/commit/0c8b84af6161d5baf683688eafc00874846f83fa))
-* **SubCommands:**  fixed where subcmds weren't recognized after mult args ([c19c17a8](https://github.com/kbknapp/clap-rs/commit/c19c17a8850602990e24347aeb4427cf43316223), closes [#405](https://github.com/kbknapp/clap-rs/issues/405))
-* **Usage Parser:**  fixes a bug where literal single quotes weren't allowed in help strings ([0bcc7120](https://github.com/kbknapp/clap-rs/commit/0bcc71206478074769e311479b34a9f74fe80f5c), closes [#406](https://github.com/kbknapp/clap-rs/issues/406))
-
-
-<a name="v2.0.1"></a>
-### v2.0.1 (2016-01-30)
-
-
-#### Bug Fixes
-
-*   fixes cargo features to NOT require nightly with unstable features ([dcbcc60c](https://github.com/kbknapp/clap-rs/commit/dcbcc60c9ba17894be636472ea4b07a82d86a9db), closes [#402](https://github.com/kbknapp/clap-rs/issues/402))
-
-
-<a name="v2.0.0"></a>
-## v2.0.0 (2016-01-28)
-
-
-#### Improvements
-
-* **From Usage:**  vastly improves the usage parser ([fa3a2f86](https://github.com/kbknapp/clap-rs/commit/fa3a2f86bd674c5eb07128c95098fab7d1437247), closes [#350](https://github.com/kbknapp/clap-rs/issues/350))
-
-#### Features
-
-*   adds support for external subcommands ([177fe5cc](https://github.com/kbknapp/clap-rs/commit/177fe5cce745c2164a8e38c23be4c4460d2d7211), closes [#372](https://github.com/kbknapp/clap-rs/issues/372))
-*   adds support values with a leading hyphen ([e4d429b9](https://github.com/kbknapp/clap-rs/commit/e4d429b9d52e95197bd0b572d59efacecf305a59), closes [#385](https://github.com/kbknapp/clap-rs/issues/385))
-*   adds support for turning off the value delimiter ([508db850](https://github.com/kbknapp/clap-rs/commit/508db850a87c2e251cf6b6ddead9ad56b29f9e57), closes [#352](https://github.com/kbknapp/clap-rs/issues/352))
-*   adds support changing the value delimiter ([dafeae8a](https://github.com/kbknapp/clap-rs/commit/dafeae8a526162640f6a68da434370c64d190889), closes [#353](https://github.com/kbknapp/clap-rs/issues/353))
-*   adds support for comma separated values ([e69da6af](https://github.com/kbknapp/clap-rs/commit/e69da6afcd2fe48a3c458ca031db40997f860eda), closes [#348](https://github.com/kbknapp/clap-rs/issues/348))
-*   adds support with options with optional values ([4555736c](https://github.com/kbknapp/clap-rs/commit/4555736cad01441dcde4ea84a285227e0844c16e), closes [#367](https://github.com/kbknapp/clap-rs/issues/367))
-* **UTF-8:**  adds support for invalid utf8 in values ([c5c59dec](https://github.com/kbknapp/clap-rs/commit/c5c59dec0bc33b86b2e99d30741336f17ec84282), closes [#269](https://github.com/kbknapp/clap-rs/issues/269))
-* **v2:**  implementing the base of 2.x ([a3536054](https://github.com/kbknapp/clap-rs/commit/a3536054512ba833533dc56615ce3663d884381c))
-
-#### Bug Fixes
-
-*   fixes nightly build with new lints ([17599195](https://github.com/kbknapp/clap-rs/commit/175991956c37dc83ba9c49396e927a1cb65c5b11))
-*   fixes Windows build for 2x release ([674c9b48](https://github.com/kbknapp/clap-rs/commit/674c9b48c7c92079cb180cc650a9e39f34781c32), closes [#392](https://github.com/kbknapp/clap-rs/issues/392))
-*   fixes yaml build for 2x base ([adceae64](https://github.com/kbknapp/clap-rs/commit/adceae64c8556d00ab715677377b216f9f468ad7))
-
-#### Documentation
-
-*   updates examples for 2x release ([1303b360](https://github.com/kbknapp/clap-rs/commit/1303b3607468f362ab1b452d5614c1a064dc69b4), closes [#394](https://github.com/kbknapp/clap-rs/issues/394))
-*   updates examples for 2x release ([0a011f31](https://github.com/kbknapp/clap-rs/commit/0a011f3142aec338d388a6c8bfe22fa7036021bb), closes [#394](https://github.com/kbknapp/clap-rs/issues/394))
-*   updates documentation for v2 release ([8d51724e](https://github.com/kbknapp/clap-rs/commit/8d51724ef73dfde5bb94fb9466bc5463a1cc1502))
-*   updating docs for 2x release ([576d0e0e](https://github.com/kbknapp/clap-rs/commit/576d0e0e2c7b8f386589179bbf7419b93abacf1c))
-* **README.md:**
-  *  updates readme for v2 release ([acaba01a](https://github.com/kbknapp/clap-rs/commit/acaba01a353c12144b9cd9a3ce447400691849b0), closes [#393](https://github.com/kbknapp/clap-rs/issues/393))
-  *  fix typo and make documentation conspicuous ([07b9f614](https://github.com/kbknapp/clap-rs/commit/07b9f61495d927f69f7abe6c0d85253f0f4e6107))
-
-#### BREAKING CHANGES
-
-* **Fewer liftimes! Yay!**
- * `App<'a, 'b, 'c, 'd, 'e, 'f>` => `App<'a, 'b>`
- * `Arg<'a, 'b, 'c, 'd, 'e, 'f>` => `Arg<'a, 'b>`
- * `ArgMatches<'a, 'b>` => `ArgMatches<'a>`
-* **Simply Renamed**
- * `App::arg_group` => `App::group`
- * `App::arg_groups` => `App::groups`
- * `ArgGroup::add` => `ArgGroup::arg`
- * `ArgGroup::add_all` => `ArgGroup::args`
- * `ClapError` => `Error`
-  * struct field `ClapError::error_type` => `Error::kind`
- * `ClapResult` => `Result`
- * `ClapErrorType` => `ErrorKind`
-* **Removed Deprecated Functions and Methods**
- * `App::subcommands_negate_reqs`
- * `App::subcommand_required`
- * `App::arg_required_else_help`
- * `App::global_version(bool)`
- * `App::versionless_subcommands`
- * `App::unified_help_messages`
- * `App::wait_on_error`
- * `App::subcommand_required_else_help`
- * `SubCommand::new`
- * `App::error_on_no_subcommand`
- * `Arg::new`
- * `Arg::mutually_excludes`
- * `Arg::mutually_excludes_all`
- * `Arg::mutually_overrides_with`
- * `simple_enum!`
-* **Renamed Error Variants**
- * `InvalidUnicode` => `InvalidUtf8`
- * `InvalidArgument` => `UnknownArgument`
-* **Usage Parser**
- * Value names can now be specified inline, i.e. `-o, --option <FILE> <FILE2> 'some option which takes two files'`
- * **There is now a priority of order to determine the name** - This is perhaps the biggest breaking change. See the documentation for full details. Prior to this change, the value name took precedence. **Ensure your args are using the proper names (i.e. typically the long or short and NOT the value name) throughout the code**
-* `ArgMatches::values_of` returns an `Values` now which implements `Iterator` (should not break any code)
-* `crate_version!` returns `&'static str` instead of `String`
-* Using the `clap_app!` macro requires compiling with the `unstable` feature because the syntax could change slightly in the future
-
-
-<a name="v1.5.5"></a>
-### v1.5.5 (2016-01-04)
-
-
-#### Bug Fixes
-
-*   fixes an issue where invalid short args didn't cause an error ([c9bf7e44](https://github.com/kbknapp/clap-rs/commit/c9bf7e4440bd2f9b524ea955311d433c40a7d1e0))
-*   prints the name in version and help instead of binary name ([8f3817f6](https://github.com/kbknapp/clap-rs/commit/8f3817f665c0cab6726bc16c56a53b6a61e44448), closes [#368](https://github.com/kbknapp/clap-rs/issues/368))
-*   fixes an intentional panic issue discovered via clippy ([ea83a3d4](https://github.com/kbknapp/clap-rs/commit/ea83a3d421ea8856d4cac763942834d108b71406))
-
-
-<a name="v1.5.4"></a>
-### v1.5.4 (2015-12-18)
-
-
-#### Examples
-
-* **17_yaml:**  conditinonally compile 17_yaml example ([575de089](https://github.com/kbknapp/clap-rs/commit/575de089a3e240c398cb10e6cf5a5c6b68662c01))
-
-#### Improvements
-
-*   clippy improvements ([99cdebc2](https://github.com/kbknapp/clap-rs/commit/99cdebc23da3a45a165f14b27bebeb2ed828a2ce))
-
-#### Bug Fixes
-
-
-* **errors:**  return correct error type in WrongNumValues error builder ([5ba8ba9d](https://github.com/kbknapp/clap-rs/commit/5ba8ba9dcccdfa74dd1c44260e64b359bbb36be6))
-*   ArgRequiredElseHelp setting now takes precedence over missing required args ([faad83fb](https://github.com/kbknapp/clap-rs/commit/faad83fbef6752f3093b6e98fca09a9449b830f4), closes [#362](https://github.com/kbknapp/clap-rs/issues/362))
-
-
-<a name="v1.5.3"></a>
-### v1.5.3 (2015-11-20)
-
-
-#### Bug Fixes
-
-* **Errors:**  fixes some instances when errors are missing a final newline ([c4d2b171](https://github.com/kbknapp/clap-rs/commit/c4d2b1711994479ad64ee52b6b49d2ceccbf2118))
-
-
-
-
-<a name="v1.5.2"></a>
-### v1.5.2 (2015-11-14)
-
-
-#### Bug Fixes
-
-* **Errors:**  fixes a compiling bug when built on Windows or without the color feature ([a35f7634](https://github.com/kbknapp/clap-rs/commit/a35f76346fe6ecc88dda6a1eb13627186e7ce185))
-
-
-
-<a name="v1.5.1"></a>
-### v1.5.1 (2015-11-13)
-
-
-#### Bug Fixes
-
-* **Required Args:**  fixes a bug where required args are not correctly accounted for ([f03b88a9](https://github.com/kbknapp/clap-rs/commit/f03b88a9766b331a63879bcd747687f2e5a2661b), closes [#343](https://github.com/kbknapp/clap-rs/issues/343))
-
-
-
-<a name="v1.5.0"></a>
-## v1.5.0 (2015-11-13)
-
-
-#### Bug Fixes
-
-*   fixes a bug with required positional args in usage strings ([c6858f78](https://github.com/kbknapp/clap-rs/commit/c6858f78755f8e860204323c828c8355a066dc83))
-
-#### Documentation
-
-* **FAQ:**  updates readme with slight changes to FAQ ([a4ef0fab](https://github.com/kbknapp/clap-rs/commit/a4ef0fab73c8dc68f1b138965d1340459c113398))
-
-#### Improvements
-
-*   massive errors overhaul ([cdc29175](https://github.com/kbknapp/clap-rs/commit/cdc29175bc9c53e5b4aec86cbc04c1743154dae6))
-* **ArgMatcher:**  huge refactor and deduplication of code ([8988853f](https://github.com/kbknapp/clap-rs/commit/8988853fb8825e8f841fde349834cc12cdbad081))
-* **Errors:**  errors have been vastly improved ([e59bc0c1](https://github.com/kbknapp/clap-rs/commit/e59bc0c16046db156a88ba71a037db05028e995c))
-* **Traits:**  refactoring some configuration into traits ([5800cdec](https://github.com/kbknapp/clap-rs/commit/5800cdec6dce3def4242b9f7bd136308afb19685))
-
-#### Performance
-
-* **App:**
-  *  more BTreeMap->Vec, Opts and SubCmds ([bc4495b3](https://github.com/kbknapp/clap-rs/commit/bc4495b32ec752b6c4b29719e831c043ef2a26ce))
-  *  changes flags BTreeMap->Vec ([d357640f](https://github.com/kbknapp/clap-rs/commit/d357640fab55e5964fe83efc3c771e53aa3222fd))
-  *  removed unneeded BTreeMap ([78971fd6](https://github.com/kbknapp/clap-rs/commit/78971fd68d7dc5c8e6811b4520cdc54e4188f733))
-  *  changes BTreeMap to VecMap in some instances ([64b921d0](https://github.com/kbknapp/clap-rs/commit/64b921d087fdd03775c95ba0bcf65d3f5d36f812))
-  *  removed excess clones ([ec0089d4](https://github.com/kbknapp/clap-rs/commit/ec0089d42ed715d293fb668d3a90b0db0aa3ec39))
-
-
-
-<a name="v1.4.7"></a>
-### v1.4.7 (2015-11-03)
-
-
-#### Documentation
-
-*   Clarify behavior of Arg::multiple with options. ([434f497a](https://github.com/kbknapp/clap-rs/commit/434f497ab6d831f8145cf09278c97ca6ee6c6fe7))
-*   Fix typos and improve grammar. ([c1f66b5d](https://github.com/kbknapp/clap-rs/commit/c1f66b5de7b5269fbf8760a005ef8c645edd3229))
-
-#### Bug Fixes
-
-* **Error Status:**  fixes bug where --help and --version return non-zero exit code ([89b51fdf](https://github.com/kbknapp/clap-rs/commit/89b51fdf8b1ab67607567344e2317ff1a757cb12))
-
-
-
-<a name="v1.4.6"></a>
-### v1.4.6 (2015-10-29)
-
-
-#### Features
-
-*   allows parsing without a binary name for daemons and interactive CLIs ([aff89d57](https://github.com/kbknapp/clap-rs/commit/aff89d579b5b85c3dc81b64f16d5865299ec39a2), closes [#318](https://github.com/kbknapp/clap-rs/issues/318))
-
-#### Bug Fixes
-
-* **Errors:**  tones down quoting in some error messages ([34ce59ed](https://github.com/kbknapp/clap-rs/commit/34ce59ede53bfa2eef722c74881cdba7419fd9c7), closes [#309](https://github.com/kbknapp/clap-rs/issues/309))
-* **Help and Version:**  only builds help and version once ([e3be87cf](https://github.com/kbknapp/clap-rs/commit/e3be87cfc095fc41c9811adcdc6d2b079f237d5e))
-* **Option Args:**  fixes bug with args and multiple values ([c9a9548a](https://github.com/kbknapp/clap-rs/commit/c9a9548a8f96cef8a3dd9a980948325fbbc1b91b), closes [#323](https://github.com/kbknapp/clap-rs/issues/323))
-* **POSIX Overrides:**  fixes bug where required args are overridden ([40ed2b50](https://github.com/kbknapp/clap-rs/commit/40ed2b50c3a9fe88bfdbaa43cef9fd6493ecaa8e))
-* **Safe Matches:**  using 'safe' forms of the get_matches family no longer exit the process ([c47025dc](https://github.com/kbknapp/clap-rs/commit/c47025dca2b3305dea0a0acfdd741b09af0c0d05), closes [#256](https://github.com/kbknapp/clap-rs/issues/256))
-* **Versionless SubCommands:**  fixes a bug where the -V flag was needlessly built ([27df8b9d](https://github.com/kbknapp/clap-rs/commit/27df8b9d98d13709dad3929a009f40ebff089a1a), closes [#329](https://github.com/kbknapp/clap-rs/issues/329))
-
-#### Documentation
-
-*   adds comparison in readme ([1a8bf31e](https://github.com/kbknapp/clap-rs/commit/1a8bf31e7a6b87ce48a66af2cde1645b2dd5bc95), closes [#325](https://github.com/kbknapp/clap-rs/issues/325))
-
-
-
-<a name="v1.4.5"></a>
-### v1.4.5 (2015-10-06)
-
-
-#### Bug Fixes
-
-*   fixes crash on invalid arg error ([c78ce128](https://github.com/kbknapp/clap-rs/commit/c78ce128ebbe7b8f730815f8176c29d76f4ade8c))
-
-
-
-<a name="v1.4.4"></a>
-### v1.4.4 (2015-10-06)
-
-
-#### Documentation
-
-*   clean up some formatting ([b7df92d7](https://github.com/kbknapp/clap-rs/commit/b7df92d7ea25835701dd22ddff984b9749f48a00))
-*   move the crate-level docs to top of the lib.rs file ([d7233bf1](https://github.com/kbknapp/clap-rs/commit/d7233bf122dbf80ba8fc79e5641be2df8af10e7a))
-*   changes doc comments to rustdoc comments ([34b601be](https://github.com/kbknapp/clap-rs/commit/34b601be5fdde76c1a0859385b359b96d66b8732))
-*   fixes panic in 14_groups example ([945b00a0](https://github.com/kbknapp/clap-rs/commit/945b00a0c27714b63bdca48d003fe205fcfdc578), closes [#295](https://github.com/kbknapp/clap-rs/issues/295))
-*   avoid suggesting star dependencies. ([d33228f4](https://github.com/kbknapp/clap-rs/commit/d33228f40b5fefb84cf3dd51546bfb340dcd9f5a))
-* **Rustdoc:**  adds portions of the readme to main rustdoc page ([6f9ee181](https://github.com/kbknapp/clap-rs/commit/6f9ee181e69d90bd4206290e59d6f3f1e8f0cbb2), closes [#293](https://github.com/kbknapp/clap-rs/issues/293))
-
-#### Bug Fixes
-
-*   grammar error in some conflicting option errors ([e73b07e1](https://github.com/kbknapp/clap-rs/commit/e73b07e19474323ad2260da66abbf6a6d4ecbd4f))
-* **Unified Help:**  sorts both flags and options as a unified category ([2a223dad](https://github.com/kbknapp/clap-rs/commit/2a223dad82901fa2e74baad3bfc4c7b94509300f))
-* **Usage:**  fixes a bug where required args aren't filtered properly ([72b453dc](https://github.com/kbknapp/clap-rs/commit/72b453dc170af3050bb123d35364f6da77fc06d7), closes [#277](https://github.com/kbknapp/clap-rs/issues/277))
-* **Usage Strings:**  fixes a bug ordering of elements in usage strings ([aaf0d6fe](https://github.com/kbknapp/clap-rs/commit/aaf0d6fe7aa2403e76096c16204d254a9ee61ee2), closes [#298](https://github.com/kbknapp/clap-rs/issues/298))
-
-#### Features
-
-*   supports -aValue style options ([0e3733e4](https://github.com/kbknapp/clap-rs/commit/0e3733e4fec2015c2d566a51432dcd92cb69cad3))
-* **Trailing VarArg:**  adds opt-in setting for final arg being vararg ([27018b18](https://github.com/kbknapp/clap-rs/commit/27018b1821a4bcd5235cfe92abe71b3c99efc24d), closes [#278](https://github.com/kbknapp/clap-rs/issues/278))
-
-
-
-<a name="v1.4.3"></a>
-### v1.4.3 (2015-09-30)
-
-
-#### Features
-
-*   allows accessing arg values by group name ([c92a4b9e](https://github.com/kbknapp/clap-rs/commit/c92a4b9eff2d679957f61c0c41ff404b40d38a91))
-
-#### Documentation
-
-*   use links to examples instead of plain text ([bb4fe237](https://github.com/kbknapp/clap-rs/commit/bb4fe237858535627271465147add537e4556b43))
-
-#### Bug Fixes
-
-* **Help Message:**  required args no longer double list in usage ([1412e639](https://github.com/kbknapp/clap-rs/commit/1412e639e0a79df84936d1101a837f90077d1c83), closes [#277](https://github.com/kbknapp/clap-rs/issues/277))
-* **Possible Values:**  possible value validation is restored ([f121ae74](https://github.com/kbknapp/clap-rs/commit/f121ae749f8f4bfe754ef2e8a6dfc286504b5b75), closes [#287](https://github.com/kbknapp/clap-rs/issues/287))
-
-
-
-<a name="v1.4.2"></a>
-### v1.4.2 (2015-09-23)
-
-
-#### Bug Fixes
-
-* **Conflicts:**  fixes bug with conflicts not removing required args ([e17fcec5](https://github.com/kbknapp/clap-rs/commit/e17fcec53b3216ad047a13dddc6f740473fad1a1), closes [#271](https://github.com/kbknapp/clap-rs/issues/271))
-
-
-
-<a name="v1.4.1"></a>
-### v1.4.1 (2015-09-22)
-
-
-#### Examples
-
-*   add clap_app quick example ([4ba6249c](https://github.com/kbknapp/clap-rs/commit/4ba6249c3cf4d2e083370d1fe4dcc7025282c28a))
-
-#### Features
-
-* **Unicode:**  allows non-panicing on invalid unicode characters ([c5bf7ddc](https://github.com/kbknapp/clap-rs/commit/c5bf7ddc8cfb876ec928a5aaf5591232bbb32e5d))
-
-#### Documentation
-
-*   properly names Examples section for rustdoc ([87ba5445](https://github.com/kbknapp/clap-rs/commit/87ba54451d7ec7b1c9b9ef134f90bbe39e6fac69))
-*   fixes various typos and spelling ([f85640f9](https://github.com/kbknapp/clap-rs/commit/f85640f9f6d8fd3821a40e9b8b7a34fabb789d02))
-* **Arg:**  unhides fields of the Arg struct ([931aea88](https://github.com/kbknapp/clap-rs/commit/931aea88427edf43a3da90d5a500c1ff2b2c3614))
-
-#### Bug Fixes
-
-*   flush the buffer in App::print_version() ([cbc42a37](https://github.com/kbknapp/clap-rs/commit/cbc42a37d212d84d22b1777d08e584ff191934e7))
-*   Macro benchmarks ([13712da1](https://github.com/kbknapp/clap-rs/commit/13712da1d36dc7614eec3a10ad488257ba615751))
-
-
-
-<a name="v1.4.0"></a>
-## v1.4.0 (2015-09-09)
-
-
-#### Features
-
-*   allows printing help message by library consumers ([56b95f32](https://github.com/kbknapp/clap-rs/commit/56b95f320875c62dda82cb91b29059671e120ed1))
-*   allows defining hidden args and subcmds ([2cab4d03](https://github.com/kbknapp/clap-rs/commit/2cab4d0334ea3c2439a1d4bfca5bf9905c7ea9ac), closes [#231](https://github.com/kbknapp/clap-rs/issues/231))
-*   Builder macro to assist with App/Arg/Group/SubCommand building ([443841b0](https://github.com/kbknapp/clap-rs/commit/443841b012a8d795cd5c2bd69ae6e23ef9b16477))
-* **Errors:**  allows consumers to write to stderr and exit on error ([1e6403b6](https://github.com/kbknapp/clap-rs/commit/1e6403b6a863574fa3cb6946b1fb58f034e8664c))
-
-
-
-<a name="v1.3.2"></a>
-### v1.3.2 (2015-09-08)
-
-
-#### Documentation
-
-*   fixed ErrorKind docs ([dd057843](https://github.com/kbknapp/clap-rs/commit/dd05784327fa070eb6ce5ce89a8507e011d8db94))
-* **ErrorKind:**  changed examples content ([b9ca2616](https://github.com/kbknapp/clap-rs/commit/b9ca261634b89613bbf3d98fd74d55cefbb31a8c))
-
-#### Bug Fixes
-
-*   fixes a bug where the help subcommand wasn't overridable ([94003db4](https://github.com/kbknapp/clap-rs/commit/94003db4b5eebe552ca337521c1c001295822745))
-
-#### Features
-
-*   adds abiltiy not consume self when parsing matches and/or exit on help ([94003db4](https://github.com/kbknapp/clap-rs/commit/94003db4b5eebe552ca337521c1c001295822745))
-* **App:**  Added ability for users to handle errors themselves ([934e6fbb](https://github.com/kbknapp/clap-rs/commit/934e6fbb643b2385efc23444fe6fce31494dc288))
-
-
-
-<a name="v1.3.1"></a>
-### v1.3.1 (2015-09-04)
-
-
-#### Examples
-
-* **17_yaml:**  fixed example ([9b848622](https://github.com/kbknapp/clap-rs/commit/9b848622296c8c5c7b9a39b93ddd41f51df790b5))
-
-#### Performance
-
-*   changes ArgGroup HashSets to Vec ([3cb4a48e](https://github.com/kbknapp/clap-rs/commit/3cb4a48ebd15c20692f4f3a2a924284dc7fd5e10))
-*   changes BTreeSet for Vec in some instances ([baab2e3f](https://github.com/kbknapp/clap-rs/commit/baab2e3f4060e811abee14b1654cbcd5cf3b5fea))
-
-
-
-<a name="v1.3.0"></a>
-## v1.3.0 (2015-09-01)
-
-
-#### Features
-
-* **YAML:**  allows building a CLI from YAML files ([86cf4c45](https://github.com/kbknapp/clap-rs/commit/86cf4c45626a36b8115446952f9069f73c1debc3))
-* **ArgGroups:**  adds support for building ArgGroups from yaml ([ecf88665](https://github.com/kbknapp/clap-rs/commit/ecf88665cbff367018b29161a1b75d44a212707d))
-* **Subcommands:**  adds support for subcommands from yaml ([e415cf78](https://github.com/kbknapp/clap-rs/commit/e415cf78ba916052d118a8648deba2b9c16b1530))
-
-#### Documentation
-
-* **YAML:**  adds examples for using YAML to build a CLI ([ab41d7f3](https://github.com/kbknapp/clap-rs/commit/ab41d7f38219544750e6e1426076dc498073191b))
-* **Args from YAML:**  fixes doc examples ([19b348a1](https://github.com/kbknapp/clap-rs/commit/19b348a10050404cd93888dbbbe4f396681b67d0))
-* **Examples:**  adds better usage examples instead of having unused variables ([8cbacd88](https://github.com/kbknapp/clap-rs/commit/8cbacd8883004fe71a8ea036ec4391c7dd8efe94))
-
-#### Examples
-
-*   Add AppSettings example ([12705079](https://github.com/kbknapp/clap-rs/commit/12705079ca96a709b4dd94f7ddd20a833b26838c))
-
-#### Bug Fixes
-
-* **Unified Help Messages:**  fixes a crash from this setting and no opts ([169ffec1](https://github.com/kbknapp/clap-rs/commit/169ffec1003d58d105d7ef2585b3425e57980000), closes [#210](https://github.com/kbknapp/clap-rs/issues/210))
-
-
-
-<a name="v1.2.5"></a>
-### v1.2.5 (2015-08-27)
-
-
-#### Examples
-
-*   add custom validator example ([b9997d1f](https://github.com/kbknapp/clap-rs/commit/b9997d1fca74d4d8f93971f2a01bdf9798f913d5))
-*   fix indentation ([d4f1b740](https://github.com/kbknapp/clap-rs/commit/d4f1b740ede410fd2528b9ecd89592c2fd8b1e20))
-
-#### Features
-
-* **Args:**  allows opts and args to define a name for help and usage msgs ([ad962ec4](https://github.com/kbknapp/clap-rs/commit/ad962ec478da999c7dba0afdb84c266f4d09b1bd))
-
-
-
-<a name="v1.2.4"></a>
-### v1.2.4 (2015-08-26)
-
-
-#### Bug Fixes
-
-* **Possible Values:**  fixes a bug where suggestions arent made when using --long=value format ([3d5e9a6c](https://github.com/kbknapp/clap-rs/commit/3d5e9a6cedb26668839b481c9978e2fbbab8be6f), closes [#192](https://github.com/kbknapp/clap-rs/issues/192))
-
-
-
-<a name="v1.2.3"></a>
-### v1.2.3 (2015-08-24)
-
-
-#### Bug Fixes
-
-* **App, Args:**  fixed subcommand reqs negation ([b41afa8c](https://github.com/kbknapp/clap-rs/commit/b41afa8c3ded3d1be12f7a2f8ea06cc44afc9458), closes [#188](https://github.com/kbknapp/clap-rs/issues/188))
-
-
-
-<a name="v1.2.2"></a>
-### v1.2.2 (2015-08-23)
-
-
-#### Bug Fixes
-
-*   fixed confusing error message, also added test for it ([fc7a31a7](https://github.com/kbknapp/clap-rs/commit/fc7a31a745efbf1768ee2c62cd3bb72bfe30c708))
-* **App:**  fixed requirmets overriding ([9c135eb7](https://github.com/kbknapp/clap-rs/commit/9c135eb790fa16183e5bdb2009ddc3cf9e25f99f))
-
-
-
-<a name="v1.2.1"></a>
-### v1.2.1 (2015-08-20)
-
-
-#### Documentation
-
-* **README.md:**  updates for new features ([16cf9245](https://github.com/kbknapp/clap-rs/commit/16cf9245fb5fc4cf6face898e358368bf9961cbb))
-
-#### Features
-
-*   implements posix compatible conflicts for long args ([8c2d48ac](https://github.com/kbknapp/clap-rs/commit/8c2d48acf5473feebd721a9049a9c9b7051e70f9))
-*   added overrides to support conflicts in POSIX compatible manner ([0b916a00](https://github.com/kbknapp/clap-rs/commit/0b916a00de26f6941538f6bc5f3365fa302083c1))
-* **Args:**  allows defining POSIX compatible argument conflicts ([d715646e](https://github.com/kbknapp/clap-rs/commit/d715646e69759ccd95e01f49b04f489827ecf502))
-
-#### Bug Fixes
-
-*   fixed links in cargo and license buttons ([6d9837ad](https://github.com/kbknapp/clap-rs/commit/6d9837ad9a9e006117cd7372fdc60f9a3889c7e2))
-
-#### Performance
-
-* **Args and Apps:**  changes HashSet->Vec in some instances for increased performance ([d0c3b379](https://github.com/kbknapp/clap-rs/commit/d0c3b379700757e0a9b0c40af709f8af1f5b4949))
-
-
-
-<a name="v1.2.0"></a>
-### v1.2.0 (2015-08-15)
-
-
-#### Bug Fixes
-
-*   fixed misspell and enum name ([7df170d7](https://github.com/kbknapp/clap-rs/commit/7df170d7f4ecff06608317655d1e0c4298f62076))
-*   fixed use for clap crate ([dc3ada73](https://github.com/kbknapp/clap-rs/commit/dc3ada738667d4b689678f79d14251ee82004ece))
-
-#### Documentation
-
-*   updates docs for new features ([03496547](https://github.com/kbknapp/clap-rs/commit/034965471782d872ca495045b58d34b31807c5b1))
-*   fixed docs for previous changes ([ade36778](https://github.com/kbknapp/clap-rs/commit/ade367780c366425de462506d256e0f554ed3b9c))
-
-#### Improvements
-
-* **AppSettings:**  adds ability to add multiple settings at once ([4a00e251](https://github.com/kbknapp/clap-rs/commit/4a00e2510d0ca8d095d5257d51691ba3b61c1374))
-
-#### Features
-
-*   Replace application level settings with enum variants ([618dc4e2](https://github.com/kbknapp/clap-rs/commit/618dc4e2c205bf26bc43146164e65eb1f6b920ed))
-* **Args:**  allows for custom argument value validations to be defined ([84ae2ddb](https://github.com/kbknapp/clap-rs/commit/84ae2ddbceda34b5cbda98a6959edaa52fde2e1a), closes [#170](https://github.com/kbknapp/clap-rs/issues/170))
-
-
-
-<a name="v1.1.6"></a>
-### v1.1.6 (2015-08-01)
-
-
-#### Bug Fixes
-
-*   fixes two bugs in App when printing newlines in help and subcommands required error ([d63c0136](https://github.com/kbknapp/clap-rs/commit/d63c0136310db9dd2b1c7b4745938311601d8938))
-
-
-
-<a name="v1.1.5"></a>
-### v1.1.5 (2015-07-29)
-
-#### Performance
-
-*   removes some unneeded allocations ([93e915df](https://github.com/kbknapp/clap-rs/commit/93e915dfe300f7b7d6209ca93323c6a46f89a8c1))
-
-<a name="v1.1.4"></a>
-### v1.1.4 (2015-07-20)
-
-
-#### Improvements
-
-* **Usage Strings**  displays a [--] when it may be helpful ([86c3be85](https://github.com/kbknapp/clap-rs/commit/86c3be85fb6f77f83b5a6d2df40ae60937486984))
-
-#### Bug Fixes
-
-* **Macros**  fixes a typo in a macro generated error message ([c9195c5f](https://github.com/kbknapp/clap-rs/commit/c9195c5f92abb8cd6a37b4f4fbb2f1fee2a8e368))
-* **Type Errors**  fixes formatting of error output when failed type parsing ([fe5d95c6](https://github.com/kbknapp/clap-rs/commit/fe5d95c64f3296e6eddcbec0cb8b86659800145f))
-
-
-
-<a name="v1.1.3"></a>
-### v1.1.3 (2015-07-18)
-
-
-#### Documentation
-
-*   updates README.md to include lack of color support on Windows ([52f81e17](https://github.com/kbknapp/clap-rs/commit/52f81e17377b18d2bd0f34693b642b7f358998ee))
-
-#### Bug Fixes
-
-*   fixes formatting bug which prevented compiling on windows ([9cb5dceb](https://github.com/kbknapp/clap-rs/commit/9cb5dceb3e5fe5e0e7b24619ff77e5040672b723), closes [#163](https://github.com/kbknapp/clap-rs/issues/163))
-
-
-
-<a name="v1.1.2"></a>
-### v1.1.2 (2015-07-17)
-
-
-#### Bug Fixes
-
-*   fixes a bug when parsing multiple {n} newlines inside help strings ([6d214b54](https://github.com/kbknapp/clap-rs/commit/6d214b549a9b7e189a94e5fa2b7c92cc333ca637))
-
-
-
-<a name="v1.1.1"></a>
-## v1.1.1 (2015-07-17)
-
-
-#### Bug Fixes
-
-*   fixes a logic bug and allows setting Arg::number_of_values() < 2 ([42b6d1fc](https://github.com/kbknapp/clap-rs/commit/42b6d1fc3c519c92dfb3af15276e7d3b635e6cfe), closes [#161](https://github.com/kbknapp/clap-rs/issues/161))
-
-
-
-<a name="v1.1.0"></a>
-## v1.1.0 (2015-07-16)
-
-
-#### Features
-
-*   allows creating unified help messages, a la docopt or getopts ([52bcd892](https://github.com/kbknapp/clap-rs/commit/52bcd892ea51564ce463bc5865acd64f8fe91cb1), closes [#158](https://github.com/kbknapp/clap-rs/issues/158))
-*   allows stating all subcommands should *not* have --version flags ([336c476f](https://github.com/kbknapp/clap-rs/commit/336c476f631d512b54ac56fdca6f29ebdc2c00c5), closes [#156](https://github.com/kbknapp/clap-rs/issues/156))
-*   allows setting version number to auto-propagate through subcommands ([bc66d3c6](https://github.com/kbknapp/clap-rs/commit/bc66d3c6deedeca62463fff95369ab1cfcdd366b), closes [#157](https://github.com/kbknapp/clap-rs/issues/157))
-
-#### Improvements
-
-* **Help Strings**  properly aligns and handles newlines in long help strings ([f9800a29](https://github.com/kbknapp/clap-rs/commit/f9800a29696dd2cc0b0284bf693b3011831e556f), closes [#145](https://github.com/kbknapp/clap-rs/issues/145))
-
-
-#### Performance
-
-* **Help Messages**  big performance improvements when printing help messages ([52bcd892](https://github.com/kbknapp/clap-rs/commit/52bcd892ea51564ce463bc5865acd64f8fe91cb1))
-
-#### Documentation
-
-*   updates readme with new features ([8232f7bb](https://github.com/kbknapp/clap-rs/commit/8232f7bb52e88862bc13c3d4f99ee4f56cfe4bc0))
-*   fix incorrect code example for `App::subcommand_required` ([8889689d](https://github.com/kbknapp/clap-rs/commit/8889689dc6336ccc45b2c9f2cf8e2e483a639e93))
-
-
-<a name="v1.0.3"></a>
-### v1.0.3 (2015-07-11)
-
-
-#### Improvements
-
-* **Errors**  writes errors to stderr ([cc76ab8c](https://github.com/kbknapp/clap-rs/commit/cc76ab8c2b77c67b42f4717ded530df7806142cf), closes [#154](https://github.com/kbknapp/clap-rs/issues/154))
-
-#### Documentation
-
-* **README.md**  updates example help message to new format ([0aca29bd](https://github.com/kbknapp/clap-rs/commit/0aca29bd5d6d1a4e9971bdc88d946ffa58606efa))
-
-
-
-<a name="v1.0.2"></a>
-### v1.0.2 (2015-07-09)
-
-
-#### Improvements
-
-* **Usage**  re-orders optional arguments and required to natural standard ([dc7e1fce](https://github.com/kbknapp/clap-rs/commit/dc7e1fcea5c85d317018fb201d2a9262249131b4), closes [#147](https://github.com/kbknapp/clap-rs/issues/147))
-
-
-
-<a name="v1.0.1"></a>
-### v1.0.1 (2015-07-08)
-
-
-#### Bug Fixes
-
-*   allows empty values when using --long='' syntax ([083f82d3](https://github.com/kbknapp/clap-rs/commit/083f82d333b69720a6ef30074875310921d964d1), closes [#151](https://github.com/kbknapp/clap-rs/issues/151))
-
-
-
-<a name="v1.0.0"></a>
-## v1.0.0 (2015-07-08)
-
-
-#### Documentation
-
-* **README.md**  adds new features to what's new list ([938f7f01](https://github.com/kbknapp/clap-rs/commit/938f7f01340f521969376cf4e2e3d9436bca21f7))
-* **README.md**  use with_name for subcommands ([28b7e316](https://github.com/kbknapp/clap-rs/commit/28b7e3161fb772e5309042648fe8c3a420645bac))
-
-#### Features
-
-*   args can now be parsed from arbitrary locations, not just std::env::args() ([75312528](https://github.com/kbknapp/clap-rs/commit/753125282b1b9bfff875f1557ce27610edcc59e1))
-
-
-
-<a name="v1.0.0"></a>
-## v1.0.0-beta (2015-06-30)
-
-
-#### Features
-
-*   allows waiting for user input on error ([d0da3bdd](https://github.com/kbknapp/clap-rs/commit/d0da3bdd9d1871541907ea9c645322a74d260e07), closes [#140](https://github.com/kbknapp/clap-rs/issues/140))
-* **Help**  allows one to fully override the auto-generated help message ([26d5ae3e](https://github.com/kbknapp/clap-rs/commit/26d5ae3e330d1e150811d5b60b2b01a8f8df854e), closes [#141](https://github.com/kbknapp/clap-rs/issues/141))
-
-#### Documentation
-
-*   adds "whats new" section to readme ([ff149a29](https://github.com/kbknapp/clap-rs/commit/ff149a29dd9e179865e6d577cd7dc87c54f8f95c))
-
-#### Improvements
-
-*   removes deprecated functions in prep for 1.0 ([274484df](https://github.com/kbknapp/clap-rs/commit/274484dfd08fff4859cefd7e9bef3b73d3a9cb5f))
-
-
-
-<a name="v0.11.0"></a>
-## v0.11.0 (2015-06-17) - BREAKING CHANGE
-
-
-#### Documentation
-
-*   updates docs to new version flag defaults ([ebf442eb](https://github.com/kbknapp/clap-rs/commit/ebf442ebebbcd2ec6bfe2c06566c9d362bccb112))
-
-#### Features
-
-* **Help and Version**  default short for version is now `-V` but can be overridden (only breaks manual documentation) (**BREAKING CHANGE** [eb1d9320](https://github.com/kbknapp/clap-rs/commit/eb1d9320c509c1e4e57d7c7959da82bcfe06ada0))
-
-
-
-<a name="v0.10.5"></a>
-### v0.10.5 (2015-06-06)
-
-
-#### Bug Fixes
-
-* **Global Args**  global arguments propogate fully now ([1f377960](https://github.com/kbknapp/clap-rs/commit/1f377960a48c82f54ca5f39eb56bcb393140b046), closes [#137](https://github.com/kbknapp/clap-rs/issues/137))
-
-
-
-<a name="v0.10.4"></a>
-### v0.10.4 (2015-06-06)
-
-
-#### Bug Fixes
-
-* **Global Args**  global arguments propogate fully now ([8f2c0160](https://github.com/kbknapp/clap-rs/commit/8f2c0160c8d844daef375a33dbaec7d89de00a00), closes [#137](https://github.com/kbknapp/clap-rs/issues/137))
-
-
-
-<a name="v0.10.3"></a>
-### v0.10.3 (2015-05-31)
-
-
-#### Bug Fixes
-
-* **Global Args**  fixes a bug where globals only transfer to one subcommand ([a37842ee](https://github.com/kbknapp/clap-rs/commit/a37842eec1ee3162b86fdbda23420b221cdb1e3b), closes [#135](https://github.com/kbknapp/clap-rs/issues/135))
-
-
-
-<a name="v0.10.2"></a>
-### v0.10.2 (2015-05-30)
-
-
-#### Improvements
-
-* **Binary Names**  allows users to override the system determined bin name ([2191fe94](https://github.com/kbknapp/clap-rs/commit/2191fe94bda35771383b52872fb7f5421b178be1), closes [#134](https://github.com/kbknapp/clap-rs/issues/134))
-
-#### Documentation
-
-*   adds contributing guidelines ([6f76bd0a](https://github.com/kbknapp/clap-rs/commit/6f76bd0a07e8b7419b391243ab2d6687cd8a9c5f))
-
-
-
-<a name="v0.10.1"></a>
-### v0.10.1 (2015-05-26)
-
-
-#### Features
-
-*   can now specify that an app or subcommand should display help on no args or subcommands ([29ca7b2f](https://github.com/kbknapp/clap-rs/commit/29ca7b2f74376ca0cdb9d8ee3bfa99f7640cc404), closes [#133](https://github.com/kbknapp/clap-rs/issues/133))
-
-
-
-<a name="v0.10.0"></a>
-## v0.10.0 (2015-05-23)
-
-
-#### Features
-
-* **Global Args**  allows args that propagate down to child commands ([2bcc6137](https://github.com/kbknapp/clap-rs/commit/2bcc6137a83cb07757771a0afea953e68e692f0b), closes [#131](https://github.com/kbknapp/clap-rs/issues/131))
-
-#### Improvements
-
-* **Colors**  implements more structured colored output ([d6c3ed54](https://github.com/kbknapp/clap-rs/commit/d6c3ed54d21cf7b40d9f130d4280ff5448522fc5), closes [#129](https://github.com/kbknapp/clap-rs/issues/129))
-
-#### Deprecations
-
-* **SubCommand/App**  several methods and functions for stable release ([28b73855](https://github.com/kbknapp/clap-rs/commit/28b73855523ad170544afdb20665db98702fbe70))
-
-#### Documentation
-
-*   updates for deprecations and new features ([743eefe8](https://github.com/kbknapp/clap-rs/commit/743eefe8dd40c1260065ce086d572e9e9358bc4c))
-
-
-
-<a name="v0.9.2"></a>
-## v0.9.2 (2015-05-20)
-
-
-#### Bug Fixes
-
-* **help**  allows parent requirements to be ignored with help and version ([52218cc1](https://github.com/kbknapp/clap-rs/commit/52218cc1fdb06a42456c964d98cc2c7ac3432412), closes [#124](https://github.com/kbknapp/clap-rs/issues/124))
-
-
-
-<a name="v0.9.1"></a>
-## v0.9.1 (2015-05-18)
-
-
-#### Bug Fixes
-
-* **help**  fixes a bug where requirements are included as program name in help and version ([08ba3f25](https://github.com/kbknapp/clap-rs/commit/08ba3f25cf38b149229ba8b9cb37a5804fe6b789))
-
-
-
-<a name="v0.9.0"></a>
-## v0.9.0 (2015-05-17)
-
-
-#### Improvements
-
-* **usage**  usage strings now include parent command requirements ([dd8f21c7](https://github.com/kbknapp/clap-rs/commit/dd8f21c7c15cde348fdcf44fa7c205f0e98d2e4a), closes [#125](https://github.com/kbknapp/clap-rs/issues/125))
-* **args**  allows consumer of clap to decide if empty values are allowed or not ([ab4ec609](https://github.com/kbknapp/clap-rs/commit/ab4ec609ccf692b9b72cccef5c9f74f5577e360d), closes [#122](https://github.com/kbknapp/clap-rs/issues/122))
-
-#### Features
-
-* **subcommands**
-  *  allows optionally specifying that no subcommand is an error ([7554f238](https://github.com/kbknapp/clap-rs/commit/7554f238fd3afdd60b7e4dcf00ff4a9eccf842c1), closes [#126](https://github.com/kbknapp/clap-rs/issues/126))
-  *  subcommands can optionally negate parent requirements ([4a4229f5](https://github.com/kbknapp/clap-rs/commit/4a4229f500e21c350e1ef78dd09ef27559653288), closes [#123](https://github.com/kbknapp/clap-rs/issues/123))
-
-
-
-<a name="v0.8.6"></a>
-## v0.8.6 (2015-05-17)
-
-
-#### Bug Fixes
-
-* **args**  `-` can now be parsed as a value for an argument ([bc12e78e](https://github.com/kbknapp/clap-rs/commit/bc12e78eadd7eaf9d008a8469fdd2dfd7990cb5d), closes [#121](https://github.com/kbknapp/clap-rs/issues/121))
-
-
-
-<a name="v0.8.5"></a>
-## v0.8.5 (2015-05-15)
-
-
-#### Bug Fixes
-
-* **macros**  makes macro errors consistent with others ([0c264a8c](https://github.com/kbknapp/clap-rs/commit/0c264a8ca57ec1cfdcb74dae79145d766cdc9b97), closes [#118](https://github.com/kbknapp/clap-rs/issues/118))
-
-#### Features
-
-* **macros**
-  *  arg_enum! and simple_enum! provide a Vec<&str> of variant names ([30fa87ba](https://github.com/kbknapp/clap-rs/commit/30fa87ba4e0f3189351d8f4f78b72e616a30d0bd), closes [#119](https://github.com/kbknapp/clap-rs/issues/119))
-  *  arg_enum! and simple_enum! auto-implement Display ([d1219f0d](https://github.com/kbknapp/clap-rs/commit/d1219f0d1371d872061bd0718057eca4ef47b739), closes [#120](https://github.com/kbknapp/clap-rs/issues/120))
-
-
-
-<a name="v0.8.4"></a>
-## v0.8.4 (2015-05-12)
-
-
-#### Bug Fixes
-
-* **suggestions**  --help and --version now get suggestions ([d2b3b1fa](https://github.com/kbknapp/clap-rs/commit/d2b3b1faa0bdc1c5d2350cc4635aba81e02e9d96), closes [#116](https://github.com/kbknapp/clap-rs/issues/116))
-
-
-
-<a name="v0.8.3"></a>
-## v0.8.3 (2015-05-10)
-
-
-#### Bug Fixes
-
-* **usage**  groups unfold their members in usage strings ([55d15582](https://github.com/kbknapp/clap-rs/commit/55d155827ea4a6b077a83669701e797ce1ad68f4), closes [#114](https://github.com/kbknapp/clap-rs/issues/114))
-
-#### Performance
-
-* **usage**  removes unneeded allocations ([fd53cd18](https://github.com/kbknapp/clap-rs/commit/fd53cd188555f5c3dc8bc341c5d7eb04b761a70f))
-
-
-
-<a name="v0.8.2"></a>
-## v0.8.2 (2015-05-08)
-
-
-#### Bug Fixes
-
-* **usage strings**  positional arguments are presented in index order ([eb0e374e](https://github.com/kbknapp/clap-rs/commit/eb0e374ecf952f1eefbc73113f21e0705936e40b), closes [#112](https://github.com/kbknapp/clap-rs/issues/112))
-
-
-
-<a name="v0.8.1"></a>
-## v0.8.1 (2015-05-06)
-
-
-#### Bug Fixes
-
-* **subcommands**  stops parsing multiple values when subcommands are found ([fc79017e](https://github.com/kbknapp/clap-rs/commit/fc79017eced04fd41cc1801331e5054df41fac17), closes [#109](https://github.com/kbknapp/clap-rs/issues/109))
-
-#### Improvements
-
-* **color**  reduces color in error messages ([aab44cca](https://github.com/kbknapp/clap-rs/commit/aab44cca6352f47e280c296e50c535f5d752dd46), closes [#110](https://github.com/kbknapp/clap-rs/issues/110))
-* **suggestions**  adds suggested arguments to usage strings ([99447414](https://github.com/kbknapp/clap-rs/commit/994474146e9fb8b701af773a52da71553d74d4b7))
-
-
-
-<a name="v0.8.0"></a>
-## v0.8.0 (2015-05-06)
-
-
-#### Bug Fixes
-
-* **did-you-mean**  for review ([0535cfb0](https://github.com/kbknapp/clap-rs/commit/0535cfb0c711331568b4de8080eeef80bd254b68))
-* **Positional**  positionals were ignored if they matched a subcmd, even after '--' ([90e7b081](https://github.com/kbknapp/clap-rs/commit/90e7b0818741668b47cbe3becd029bab588e3553))
-* **help**  fixes bug where space between arg and help is too long ([632fb115](https://github.com/kbknapp/clap-rs/commit/632fb11514c504999ea86bdce47cdd34f8ebf646))
-
-#### Features
-
-* **from_usage**  adds ability to add value names or num of vals in usage string ([3d581976](https://github.com/kbknapp/clap-rs/commit/3d58197674ed7886ca315efb76e411608a327501), closes [#98](https://github.com/kbknapp/clap-rs/issues/98))
-* **did-you-mean**
-  *  gate it behind 'suggestions' ([c0e38351](https://github.com/kbknapp/clap-rs/commit/c0e383515d01bdd5ca459af9c2f7e2cf49e2488b))
-  *  for possible values ([1cc2deb2](https://github.com/kbknapp/clap-rs/commit/1cc2deb29158e0e4e8b434e4ce26b3d819301a7d))
-  *  for long flags (i.e. --long) ([52a0b850](https://github.com/kbknapp/clap-rs/commit/52a0b8505c99354bdf5fd1cd256cf41197ac2d81))
-  *  for subcommands ([06e869b5](https://github.com/kbknapp/clap-rs/commit/06e869b5180258047ed3c60ba099de818dd25fff))
-* **Flags**  adds sugestions functionality ([8745071c](https://github.com/kbknapp/clap-rs/commit/8745071c3257dd327c497013516f12a823df9530))
-* **errors**  colorizes output red on error ([f8b26b13](https://github.com/kbknapp/clap-rs/commit/f8b26b13da82ba3ba9a932d3d1ab4ea45d1ab036))
-
-#### Improvements
-
-* **arg_enum**  allows ascii case insensitivity for enum variants ([b249f965](https://github.com/kbknapp/clap-rs/commit/b249f9657c6921c004764bd80d13ebca81585eec), closes [#104](https://github.com/kbknapp/clap-rs/issues/104))
-* **clap-test**  simplified `make test` invocation ([d17dcb29](https://github.com/kbknapp/clap-rs/commit/d17dcb2920637a1f58c61c596b7bd362fd53047c))
-
-#### Documentation
-
-* **README**  adds details about optional and new features ([960389de](https://github.com/kbknapp/clap-rs/commit/960389de02c9872aaee9adabe86987f71f986e39))
-* **clap**  fix typos caught by codespell ([8891d929](https://github.com/kbknapp/clap-rs/commit/8891d92917aa1a069cca67272be41b99e548356e))
-* **from_usage**  explains new usage strings with multiple values ([05476fc6](https://github.com/kbknapp/clap-rs/commit/05476fc61cd1e5f4a4e750d258c878732a3a9c64))
-
-
-
-<a name="v0.7.6"></a>
-## v0.7.6 (2015-05-05)
-
-
-#### Improvements
-
-* **Options**  adds number of values to options in help/usage ([c1c993c4](https://github.com/kbknapp/clap-rs/commit/c1c993c419d18e35c443785053d8de9a2ef88073))
-
-#### Features
-
-* **from_usage**  adds ability to add value names or num of vals in usage string ([ad55748c](https://github.com/kbknapp/clap-rs/commit/ad55748c265cf27935c7b210307d2040b6a09125), closes [#98](https://github.com/kbknapp/clap-rs/issues/98))
-
-#### Bug Fixes
-
-* **MultipleValues**  properly distinguishes between multiple values and multiple occurrences ([dd2a7564](https://github.com/kbknapp/clap-rs/commit/dd2a75640ca68a91b973faad15f04df891356cef), closes [#99](https://github.com/kbknapp/clap-rs/issues/99))
-* **help**  fixes tab alignment with multiple values ([847001ff](https://github.com/kbknapp/clap-rs/commit/847001ff6d8f4d9518e810fefb8edf746dd0f31e))
-
-#### Documentation
-
-* **from_usage**  explains new usage strings with multiple values ([5a3a42df](https://github.com/kbknapp/clap-rs/commit/5a3a42dfa3a783537f88dedc0fd5f0edcb8ea372))
-
-
-
-<a name="v0.7.5"></a>
-## v0.7.5 (2015-05-04)
-
-
-#### Bug Fixes
-
-* **Options**  fixes bug where options with no value don't error out ([a1fb94be](https://github.com/kbknapp/clap-rs/commit/a1fb94be53141572ffd97aad037295d4ffec82d0))
-
-
-
-<a name="v0.7.4"></a>
-## v0.7.4 (2015-05-03)
-
-
-#### Bug Fixes
-
-* **Options**  fixes a bug where option arguments in succession get their values skipped ([f66334d0](https://github.com/kbknapp/clap-rs/commit/f66334d0ce984e2b56e5c19abb1dd536fae9342a))
-
-
-
-<a name="v0.7.3"></a>
-## v0.7.3 (2015-05-03)
-
-
-#### Bug Fixes
-
-* **RequiredValues**  fixes a bug where missing values are parsed as missing arguments ([93c4a723](https://github.com/kbknapp/clap-rs/commit/93c4a7231ba1a08152648598f7aa4503ea82e4de))
-
-#### Improvements
-
-* **ErrorMessages**  improves error messages and corrections ([a29c3983](https://github.com/kbknapp/clap-rs/commit/a29c3983c4229906655a29146ec15a0e46dd942d))
-* **ArgGroups**  improves requirement and confliction support for groups ([c236dc5f](https://github.com/kbknapp/clap-rs/commit/c236dc5ff475110d2a1b80e62903f80296163ad3))
-
-
-
-<a name="v0.7.2"></a>
-## v0.7.2 (2015-05-03)
-
-
-#### Bug Fixes
-
-* **RequiredArgs**  fixes bug where required-by-default arguments are not listed in usage ([12aea961](https://github.com/kbknapp/clap-rs/commit/12aea9612d290845ba86515c240aeeb0a21198db), closes [#96](https://github.com/kbknapp/clap-rs/issues/96))
-
-
-
-<a name="v0.7.1"></a>
-## v0.7.1 (2015-05-01)
-
-
-#### Bug Fixes
-
-* **MultipleValues**  stops evaluating values if the max or exact number of values was reached ([86d92c9f](https://github.com/kbknapp/clap-rs/commit/86d92c9fdbf9f422442e9562977bbaf268dbbae1))
-
-
-
-<a name="v0.7.0"></a>
-## v0.7.0 (2015-04-30) - BREAKING CHANGE
-
-
-#### Bug Fixes
-
-* **from_usage**  removes bug where usage strings have no help text ([ad4e5451](https://github.com/kbknapp/clap-rs/commit/ad4e54510739aeabf75f0da3278fb0952db531b3), closes [#83](https://github.com/kbknapp/clap-rs/issues/83))
-
-#### Features
-
-* **MultipleValues**
-  *  add support for minimum and maximum number of values ([53f6b8c9](https://github.com/kbknapp/clap-rs/commit/53f6b8c9d8dc408b4fa9f833fc3a63683873c42f))
-  *  adds support limited number and named values ([ae09f05e](https://github.com/kbknapp/clap-rs/commit/ae09f05e92251c1b39a83d372736fcc7b504e432))
-  *  implement shorthand for options with multiple values ([6669f0a9](https://github.com/kbknapp/clap-rs/commit/6669f0a9687d4f668523145d7bd5c007d1eb59a8))
-* **arg**  allow other types besides Vec for multiple value settings (**BREAKING CHANGE** [0cc2f698](https://github.com/kbknapp/clap-rs/commit/0cc2f69839b9b1db5d06330771b494783049a88e), closes [#87](https://github.com/kbknapp/clap-rs/issues/87))
-* **usage**  implement smart usage strings on errors ([d77048ef](https://github.com/kbknapp/clap-rs/commit/d77048efb1e595ffe831f1a2bea2f2700db53b9f), closes [#88](https://github.com/kbknapp/clap-rs/issues/88))
-
-
-
-<a name="v0.6.9"></a>
-## v0.6.9 (2015-04-29)
-
-
-#### Bug Fixes
-
-* **from_usage**  removes bug where usage strings have no help text ([ad4e5451](https://github.com/kbknapp/clap-rs/commit/ad4e54510739aeabf75f0da3278fb0952db531b3), closes [#83](https://github.com/kbknapp/clap-rs/issues/83))
-
-
-
-<a name="0.6.8"></a>
-## 0.6.8 (2015-04-27)
-
-
-#### Bug Fixes
-
-* **help**  change long help --long=long -> --long <long> ([1e25abfc](https://github.com/kbknapp/clap-rs/commit/1e25abfc36679ab89eae71bf98ced4de81992d00))
-* **RequiredArgs**  required by default args should no longer be required when their exclusions are present ([4bb4c3cc](https://github.com/kbknapp/clap-rs/commit/4bb4c3cc076b49e86720e882bf8c489877199f2d))
-
-#### Features
-
-* **ArgGroups**  add ability to create arg groups ([09eb4d98](https://github.com/kbknapp/clap-rs/commit/09eb4d9893af40c347e50e2b717e1adef552357d))
-
-
-
-<a name="v0.6.7"></a>
-## v0.6.7 (2015-04-22)
-
-
-#### Bug Fixes
-
-* **from_usage**  fix bug causing args to not be required ([b76129e9](https://github.com/kbknapp/clap-rs/commit/b76129e9b71a63365d5c77a7f57b58dbd1e94d49))
-
-#### Features
-
-* **apps**  add ability to display additional help info after auto-gen'ed help msg ([65cc259e](https://github.com/kbknapp/clap-rs/commit/65cc259e4559cbe3653c865ec0c4b1e42a389b07))
-
-
-
-<a name="v0.6.6"></a>
-## v0.6.6 (2015-04-19)
-
-
-#### Bug Fixes
-
-* **from_usage**  tabs and spaces should be treated equally ([4fd44181](https://github.com/kbknapp/clap-rs/commit/4fd44181d55d8eb88caab1e625231cfa3129e347))
-
-#### Features
-
-* **macros.rs**  add macro to get version from Cargo.toml ([c630969a](https://github.com/kbknapp/clap-rs/commit/c630969aa3bbd386379219cae27ba1305b117f3e))
-
-
-
-<a name="v0.6.5"></a>
-## v0.6.5 (2015-04-19)
-
-
-#### Bug Fixes
-
-* **macros.rs**  fix use statements for trait impls ([86e4075e](https://github.com/kbknapp/clap-rs/commit/86e4075eb111937c8a7bdb344e866e350429f042))
-
-
-
-<a name="v0.6.4"></a>
-## v0.6.4 (2015-04-17)
-
-
-#### Features
-
-* **macros**  add ability to create enums pub or priv with derives ([2c499f80](https://github.com/kbknapp/clap-rs/commit/2c499f8015a199827cdf1fa3ec4f6f171722f8c7))
-
-
-
-<a name="v0.6.3"></a>
-## v0.6.3 (2015-04-16)
-
-
-#### Features
-
-* **macros**  add macro to create custom enums to use as types ([fb672aff](https://github.com/kbknapp/clap-rs/commit/fb672aff561c29db2e343d6c607138f141aca8b6))
-
-
-
-<a name="v0.6.2"></a>
-## v0.6.2 (2015-04-14)
-
-
-#### Features
-
-* **macros**
-  *  add ability to get mutliple typed values or exit ([0b87251f](https://github.com/kbknapp/clap-rs/commit/0b87251fc088234bee51c323c2b652d7254f7a59))
-  *  add ability to get a typed multiple values ([e243fe38](https://github.com/kbknapp/clap-rs/commit/e243fe38ddbbf845a46c0b9baebaac3778c80927))
-  *  add convenience macro to get a typed value or exit ([4b7cd3ea](https://github.com/kbknapp/clap-rs/commit/4b7cd3ea4947780d9daa39f3e1ddab53ad4c7fef))
-  *  add convenience macro to get a typed value ([8752700f](https://github.com/kbknapp/clap-rs/commit/8752700fbb30e89ee68adbce24489ae9a24d33a9))
-
-
-
-<a name="v0.6.1"></a>
-## v0.6.1 (2015-04-13)
-
-
-#### Bug Fixes
-
-* **from_usage**  trim all whitespace before parsing ([91d29045](https://github.com/kbknapp/clap-rs/commit/91d2904599bd602deef2e515dfc65dc2863bdea0))
-
-
-
-<a name="v0.6.0"></a>
-## v0.6.0 (2015-04-13)
-
-
-#### Bug Fixes
-
-* **tests**  fix failing doc tests ([3710cd69](https://github.com/kbknapp/clap-rs/commit/3710cd69162f87221a62464f63437c1ce843ad3c))
-
-#### Features
-
-* **app**  add support for building args from usage strings ([d5d48bcf](https://github.com/kbknapp/clap-rs/commit/d5d48bcf463a4e494ef758836bd69a4c220bbbb5))
-* **args**  add ability to create basic arguments from a usage string ([ab409a8f](https://github.com/kbknapp/clap-rs/commit/ab409a8f1db9e37cc70200f6f4a84a162692e618))
-
-
-
-<a name="v0.5.14"></a>
-## v0.5.14 (2015-04-10)
-
-
-#### Bug Fixes
-
-* **usage**
-  *  remove unneeded space ([51372789](https://github.com/kbknapp/clap-rs/commit/5137278942121bc2593ce6e5dc224ec2682549e6))
-  *  remove warning about unused variables ([ba817b9d](https://github.com/kbknapp/clap-rs/commit/ba817b9d815e37320650973f1bea0e7af3030fd7))
-
-#### Features
-
-* **usage**  add ability to get usage string for subcommands too ([3636afc4](https://github.com/kbknapp/clap-rs/commit/3636afc401c2caa966efb5b1869ef4f1ed3384aa))
-
-
-
-<a name="v0.5.13"></a>
-## v0.5.13 (2015-04-09)
-
-
-#### Features
-
-* **SubCommands**  add method to get name and subcommand matches together ([64e53928](https://github.com/kbknapp/clap-rs/commit/64e539280e23e567cf5de393b346eb0ca20e7eb5))
-* **ArgMatches**  add method to get default usage string ([02462150](https://github.com/kbknapp/clap-rs/commit/02462150ca750bdc7012627d7e8d96379d494d7f))
-
-
-
-<a name="v0.5.12"></a>
-## v0.5.12 (2015-04-08)
-
-
-#### Features
-
-* **help**  sort arguments by name so as to not display a random order ([f4b2bf57](https://github.com/kbknapp/clap-rs/commit/f4b2bf5767386013069fb74862e6e938dacf44d2))
-
-
-
-<a name="v0.5.11"></a>
-## v0.5.11 (2015-04-08)
-
-
-#### Bug Fixes
-
-* **flags**  fix bug not allowing users to specify -v or -h ([90e72cff](https://github.com/kbknapp/clap-rs/commit/90e72cffdee321b79eea7a2207119533540062b4))
-
-
-
-<a name="v0.5.10"></a>
-## v0.5.10 (2015-04-08)
-
-
-#### Bug Fixes
-
-* **help**  fix spacing when option argument has not long version ([ca17fa49](https://github.com/kbknapp/clap-rs/commit/ca17fa494b68e92da83ee364bf64b0687006824b))
-
-
-
-<a name="v0.5.9"></a>
-## v0.5.9 (2015-04-08)
-
-
-#### Bug Fixes
-
-* **positional args**  all previous positional args become required when a latter one is required ([c14c3f31](https://github.com/kbknapp/clap-rs/commit/c14c3f31fd557c165570b60911d8ee483d89d6eb), closes [#50](https://github.com/kbknapp/clap-rs/issues/50))
-* **clap**  remove unstable features for Rust 1.0 ([9abdb438](https://github.com/kbknapp/clap-rs/commit/9abdb438e36e364d41550e7f5d44ebcaa8ee6b10))
-* **args**  improve error messages for arguments with mutual exclusions ([18dbcf37](https://github.com/kbknapp/clap-rs/commit/18dbcf37024daf2b76ca099a6f118b53827aa339), closes [#51](https://github.com/kbknapp/clap-rs/issues/51))
-
-
-
-<a name="v0.5.8"></a>
-## v0.5.8 (2015-04-08)
-
-
-#### Bug Fixes
-
-* **option args**  fix bug in getting the wrong number of occurrences for options ([82ad6ad7](https://github.com/kbknapp/clap-rs/commit/82ad6ad77539cf9f9a03b78db466f575ebd972cc))
-* **help**  fix formatting for option arguments with no long ([e8691004](https://github.com/kbknapp/clap-rs/commit/e869100423d93fa3acff03c4620cbcc0d0e790a1))
-* **flags**  add assertion to catch flags with specific value sets ([a0a2a40f](https://github.com/kbknapp/clap-rs/commit/a0a2a40fed57f7c5ad9d68970d090e9856306c7d), closes [#52](https://github.com/kbknapp/clap-rs/issues/52))
-* **args**  improve error messages for arguments with mutual exclusions ([bff945fc](https://github.com/kbknapp/clap-rs/commit/bff945fc5d03bba4266533340adcffb002508d1b), closes [#51](https://github.com/kbknapp/clap-rs/issues/51))
-* **tests**  add missing .takes_value(true) to option2 ([bdb0e88f](https://github.com/kbknapp/clap-rs/commit/bdb0e88f696c8595c3def3bfb0e52d538c7be085))
-* **positional args**  all previous positional args become required when a latter one is required ([343d47dc](https://github.com/kbknapp/clap-rs/commit/343d47dcbf83786a45c0d0f01b27fd9dd76725de), closes [#50](https://github.com/kbknapp/clap-rs/issues/50))
-
-
-
-<a name="v0.5.7"></a>
-## v0.5.7 (2015-04-08)
-
-
-#### Bug Fixes
-
-* **args**  fix bug in arguments who are required and mutually exclusive ([6ceb88a5](https://github.com/kbknapp/clap-rs/commit/6ceb88a594caae825605abc1cdad95204996bf29))
-
-
-
-<a name="v0.5.6"></a>
-## v0.5.6 (2015-04-08)
-
-
-#### Bug Fixes
-
-* **help**  fix formatting of help and usage ([28691b52](https://github.com/kbknapp/clap-rs/commit/28691b52f67e65c599e10e4ea2a0f6f9765a06b8))
-
-
-
-<a name="v0.5.5"></a>
-## v0.5.5 (2015-04-08)
-
-
-#### Bug Fixes
-
-* **help**  fix formatting of help for flags and options ([6ec10115](https://github.com/kbknapp/clap-rs/commit/6ec1011563a746f0578a93b76d45e63878e0f9a8))
-
-
-
-<a name="v0.5.4"></a>
-## v0.5.4 (2015-04-08)
-
-
-#### Features
-
-* **help**  add '...' to indicate multiple values supported ([297ddba7](https://github.com/kbknapp/clap-rs/commit/297ddba77000e2228762ab0eca50b480f7467386))
-
-
-
-<a name="v0.5.3"></a>
-## v0.5.3 (2015-04-08)
-
-
-#### Features
-
-* **positionals**
-  *  add assertions for positional args with multiple vals ([b7fa72d4](https://github.com/kbknapp/clap-rs/commit/b7fa72d40f18806ec2042dd67a518401c2cf5681))
-  *  add support for multiple values ([80784009](https://github.com/kbknapp/clap-rs/commit/807840094109fbf90b348039ae22669ef27889ba))
-
-
-
-<a name="v0.5.2"></a>
-## v0.5.2 (2015-04-08)
-
-
-#### Bug Fixes
-
-* **apps**  allow use of hyphens in application and subcommand names ([da549dcb](https://github.com/kbknapp/clap-rs/commit/da549dcb6c7e0d773044ab17829744483a8b0f7f))
-
-
-
-<a name="v0.5.1"></a>
-## v0.5.1 (2015-04-08)
-
-
-#### Bug Fixes
-
-* **args**  determine if the only arguments allowed are also required ([0a09eb36](https://github.com/kbknapp/clap-rs/commit/0a09eb365ced9a03faf8ed24f083ef730acc90e8))
-
-
-
-<a name="v0.5.0"></a>
-## v0.5.0 (2015-04-08)
-
-
-#### Features
-
-* **args**  add support for a specific set of allowed values on options or positional arguments ([270eb889](https://github.com/kbknapp/clap-rs/commit/270eb88925b6dc2881bff1f31ee344f085d31809))
-
-
-
-<a name="v0.4.18"></a>
-## v0.4.18 (2015-04-08)
-
-
-#### Bug Fixes
-
-* **usage**  display required args in usage, even if only required by others ([1b7316d4](https://github.com/kbknapp/clap-rs/commit/1b7316d4a8df70b0aa584ccbfd33f68966ad2a54))
-
-#### Features
-
-* **subcommands**  properly list subcommands in help and usage ([4ee02344](https://github.com/kbknapp/clap-rs/commit/4ee023442abc3dba54b68138006a52b714adf331))
-
-
-
-<a name="v0.4.17"></a>
-## v0.4.17 (2015-04-08)
-
-
-#### Bug Fixes
-
-* **tests**  remove cargo test from claptests makefile ([1cf73817](https://github.com/kbknapp/clap-rs/commit/1cf73817d6fb1dccb5b6a23b46c2efa8b567ad62))
-
-
-
-<a name="v0.4.16"></a>
-## v0.4.16 (2015-04-08)
-
-
-#### Bug Fixes
-
-* **option**  fix bug with option occurrence values ([9af52e93](https://github.com/kbknapp/clap-rs/commit/9af52e93cef9e17ac9974963f132013d0b97b946))
-* **tests**  fix testing script bug and formatting ([d8f03a55](https://github.com/kbknapp/clap-rs/commit/d8f03a55c4f74d126710ee06aad5a667246a8001))
-
-#### Features
-
-* **arg**  allow lifetimes other than 'static in arguments ([9e8c1fb9](https://github.com/kbknapp/clap-rs/commit/9e8c1fb9406f8448873ca58bab07fe905f1551e5))
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/Cargo.toml
+++ /dev/null
@@ -1,83 +0,0 @@
-[package]
-
-name = "clap"
-version = "2.24.2"
-authors = ["Kevin K. <kbknapp@gmail.com>"]
-exclude = ["examples/*", "clap-test/*", "tests/*", "benches/*", "*.png", "clap-perf/*", "*.dot"]
-repository = "https://github.com/kbknapp/clap-rs.git"
-documentation = "https://docs.rs/clap/"
-homepage = "https://clap.rs/"
-readme = "README.md"
-license = "MIT"
-keywords = ["argument", "command", "arg", "parser", "parse"]
-categories = ["command-line-interface"]
-description = """
-A simple to use, efficient, and full featured  Command Line Argument Parser
-"""
-
-[dependencies]
-bitflags              = "0.8.0"
-vec_map               = "0.8"
-unicode-width         = "0.1.4"
-unicode-segmentation  = "1.0.1"
-strsim    = { version = "0.6.0",  optional = true }
-ansi_term = { version = "0.9.0",  optional = true }
-term_size = { version = "0.3.0",  optional = true }
-yaml-rust = { version = "0.3.5",  optional = true }
-clippy    = { version = "~0.0.131", optional = true }
-atty      = { version = "0.2.2",  optional = true }
-
-[dev-dependencies]
-regex = "0.2"
-lazy_static = "0.2"
-
-[features]
-default     = ["suggestions", "color", "wrap_help"]
-suggestions = ["strsim"]
-color       = ["ansi_term", "atty"]
-wrap_help   = ["term_size"]
-yaml        = ["yaml-rust"]
-unstable    = [] # for building with unstable clap features (doesn't require nightly Rust) (currently none)
-nightly     = [] # for building with unstable Rust features (currently none)
-lints       = ["clippy"] # Requires nightly Rust
-debug       = [] # Enables debug messages
-no_cargo    = [] # Enable if you're not using Cargo, disables Cargo-env-var-dependent macros
-
-[profile.release]
-opt-level = 3
-debug = false
-rpath = false
-lto = true
-debug-assertions = false
-# codegen-units ignored with lto=true
-
-[profile.dev]
-opt-level = 0
-debug = true
-rpath = false
-lto = false
-debug-assertions = true
-codegen-units = 4
-
-[profile.test]
-opt-level = 1
-debug = true
-rpath = false
-lto = false
-debug-assertions = true
-codegen-units = 4
-
-[profile.bench]
-opt-level = 3
-debug = false
-rpath = false
-lto = true
-debug-assertions = false
-
-[profile.doc]
-opt-level = 0
-debug = true
-rpath = false
-lto = false
-debug-assertions = true
-codegen-units = 4
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/README.md
+++ /dev/null
@@ -1,690 +0,0 @@
-clap
-====
-
-[![Crates.io](https://img.shields.io/crates/v/clap.svg)](https://crates.io/crates/clap) [![Crates.io](https://img.shields.io/crates/d/clap.svg)](https://crates.io/crates/clap) [![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kbknapp/clap-rs/blob/master/LICENSE-MIT) [![Coverage Status](https://coveralls.io/repos/kbknapp/clap-rs/badge.svg?branch=master&service=github)](https://coveralls.io/github/kbknapp/clap-rs?branch=master) [![Join the chat at https://gitter.im/kbknapp/clap-rs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kbknapp/clap-rs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-
-Linux: [![Build Status](https://travis-ci.org/kbknapp/clap-rs.svg?branch=master)](https://travis-ci.org/kbknapp/clap-rs)
-Windows: [![Build status](https://ci.appveyor.com/api/projects/status/ejg8c33dn31nhv36/branch/master?svg=true)](https://ci.appveyor.com/project/kbknapp/clap-rs/branch/master)
-
-Command Line Argument Parser for Rust
-
-It is a simple-to-use, efficient, and full-featured library for parsing command line arguments and subcommands when writing console/terminal applications.
-
-## [documentation](https://docs.rs/clap/)
-## [website](https://clap.rs/)
-## [blog](https://blog.clap.rs/)
-
-Table of Contents
-=================
-
-* [What's New](#whats-new)
-* [About](#about)
-* [FAQ](#faq)
-* [Features](#features)
-* [Quick Example](#quick-example)
-* [Try it!](#try-it)
-  * [Pre-Built Test](#pre-built-test)
-  * [BYOB (Build Your Own Binary)](#byob-build-your-own-binary)
-* [Usage](#usage)
-  * [Optional Dependencies / Features](#optional-dependencies--features)
-  * [Dependencies Tree](#dependencies-tree)
-  * [More Information](#more-information)
-    * [Video Tutorials](#video-tutorials)
-* [How to Contribute](#how-to-contribute)
-  * [Testing Code](#testing-code)
-  * [Linting Code](#linting-code)
-  * [Debugging Code](#debugging-code)
-  * [Goals](#goals)
-  * [Compatibility Policy](#compatibility-policy)
-    * [Minimum Version of Rust](#minimum-version-of-rust)
-* [License](#license)
-* [Recent Breaking Changes](#recent-breaking-changes)
-  * [Deprecations](#deprecations)
-
-Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
-
-## What's New
-
-Here's the highlights for v2.24.2
-
-* fixes a bug where args that allow values to start with a hyphen couldnt contain a double hyphen -- as a value 
-* fixes a bug where positional argument help text is misaligned 
-* **App::template docs:**  adds details about the necessity to use AppSettings::UnifiedHelpMessage when using {unified} tags in the help template 
-* **Arg::allow_hyphen_values docs:**  updates the docs to include warnings for allow_hyphen_values and multiple(true) used together 
-* **clap_app! docs:**  adds using the @group specifier to the macro docs 
-* adds a debug assertion to ensure all args added to groups actually exist 
-
-Here's the highlights for v2.21.0 to v2.24.1
-
-* fixes a bug where args with last(true) and required(true) set were not being printed in the usage string 
-* fixes a bug that was printing the arg name, instead of value name when Arg::last(true) was used 
-* fixes a bug where flags were parsed as flags AND positional values when specific combinations of settings were used 
-* **README.md:**  fix some typos 
-* **Arg:**  add `default_value_os` 
-* **arg_matches.rs:**  Added a Default implementation for Values and OsValues iterators. 
-* **PowerShell Completions:**
-  * fixes a bug where powershells completions cant be used if no subcommands are defined
-  * massively dedups subcommand names in the generate script to make smaller scripts that are still functionally equiv
-* allows specifying a short help vs a long help (i.e. varying levels of detail depending on if -h or --help was used)
-* **clap_app!:**  adds support for arg names with hyphens similar to longs with hyphens
-* fixes a bug that wasn't allowing help and version to be properly overridden
-  * This may break code that was relying on this bug! If you add a flag with a long of `help` manually *and* rely on the help message to be printed automatically your code could break. Please see the commit link in the full CHANGELOG.md
-* `App::long_about`
-* `App::long_version`
-* `App::print_long_help`
-* `App::write_long_help`
-* `App::print_long_version`
-* `App::write_long_version`
-* `Arg::long_help`
-* **clap_app!:**  documents the `--("some-arg")` method for using args with hyphens inside them
-* fixes the usage string regression when using help templates
-* fixes a big regression with custom usage strings
-* adds the ability to change the name of the App instance after creation
-* adds ability to hide the default value of an argument from the help string
-* fixes support for loading author info from yaml
-* adds fish subcommand help support
-* options that use `require_equals(true)` now display the equals sign in help messages, usage strings, and errors
-* setting the max term width now correctly propagates down through child subcommands
-* fixes the precedence of this error to prioritize over other error messages
-* fixes some regression bugs resulting from old asserts in debug mode.
-* adds the ability to mark a positional argument as 'last' which means it should be used with `--` syntax and can be accessed early to effectivly skip other positional args
-* Some performance improvements by reducing the ammount of duplicate work, cloning, and allocations in all cases.
-* Some massive performance gains when using many args (i.e. things like shell glob expansions)
-* adds a setting to allow one to infer shortened subcommands or aliases (i.e. for subcommmand "test", "t", "te", or "tes" would be allowed assuming no other ambiguities)
-* when `AppSettings::SubcommandsNegateReqs` and `ArgsNegateSubcommands` are used, a new more accurate double line usage string is shown
-* provides `default_value_os` and `default_value_if[s]_os`
-* provides `App::help_message` and `App::version_message` which allows one to override the auto-generated help/version flag associated help
-* adds the ability to require the equals syntax with options `--opt=val`
-* doesn't print the argument sections in the help message if all args in that section are hidden
-* doesn't include the various `[ARGS]` `[FLAGS]` or `[OPTIONS]` if the only ones available are hidden
-* now correctly shows subcommand as required in the usage string when AppSettings::SubcommandRequiredElseHelp is used
-* fixes some "memory leaks" when an error is detected and clap exits
-* fixes a trait that's marked private accidentlly, but should be crate internal public
-* fixes a bug that tried to propogate global args multiple times when generating multiple completion scripts
-* Fixes a critical bug in the `clap_app!` macro of a missing fragment specifier when using `!property` style tags.
-* Fix examples link in CONTRIBUTING.md
-
-For full details, see [CHANGELOG.md](https://github.com/kbknapp/clap-rs/blob/master/CHANGELOG.md)
-
-## About
-
-`clap` is used to parse *and validate* the string of command line arguments provided by the user at runtime. You provide the list of valid possibilities, and `clap` handles the rest. This means you focus on your *applications* functionality, and less on the parsing and validating of arguments.
-
-`clap` also provides the traditional version and help switches (or flags) 'for free' meaning automatically with no configuration. It does this by checking list of valid possibilities you supplied and adding only the ones you haven't already defined. If you are using subcommands, `clap` will also auto-generate a `help` subcommand for you in addition to the traditional flags.
-
-Once `clap` parses the user provided string of arguments, it returns the matches along with any applicable values. If the user made an error or typo, `clap` informs them of the mistake and exits gracefully (or returns a `Result` type and allows you to perform any clean up prior to exit). Because of this, you can make reasonable assumptions in your code about the validity of the arguments.
-
-## FAQ
-
-For a full FAQ and more in depth details, see [the wiki page](https://github.com/kbknapp/clap-rs/wiki/FAQ)
-
-### Comparisons
-
-First, let me say that these comparisons are highly subjective, and not meant in a critical or harsh manner. All the argument parsing libraries out there (to include `clap`) have their own strengths and weaknesses. Sometimes it just comes down to personal taste when all other factors are equal. When in doubt, try them all and pick one that you enjoy :) There's plenty of room in the Rust community for multiple implementations!
-
-#### How does `clap` compare to [getopts](https://github.com/rust-lang-nursery/getopts)?
-
-`getopts` is a very basic, fairly minimalist argument parsing library. This isn't a bad thing, sometimes you don't need tons of features, you just want to parse some simple arguments, and have some help text generated for you based on valid arguments you specify. The downside to this approach is that you must manually implement most of the common features (such as checking to display help messages, usage strings, etc.). If you want a highly custom argument parser, and don't mind writing the majority of the functionality yourself, `getopts` is an excellent base.
-
-`getopts` also doesn't allocate much, or at all. This gives it a very small performance boost. Although, as you start implementing additional features, that boost quickly disappears.
-
-Personally, I find many, many uses of `getopts` are manually implementing features that `clap` provides by default. Using `clap` simplifies your codebase allowing you to focus on your application, and not argument parsing.
-
-#### How does `clap` compare to [docopt.rs](https://github.com/docopt/docopt.rs)?
-
-I first want to say I'm a big a fan of BurntSushi's work, the creator of `Docopt.rs`. I aspire to produce the quality of libraries that this man does! When it comes to comparing these two libraries they are very different. `docopt` tasks you with writing a help message, and then it parsers that message for you to determine all valid arguments and their use. Some people LOVE this approach, others do not. If you're willing to write a detailed help message, it's nice that you can stick that in your program and have `docopt` do the rest. On the downside, it's far less flexible.
-
-`docopt` is also excellent at translating arguments into Rust types automatically. There is even a syntax extension which will do all this for you, if you're willing to use a nightly compiler (use of a stable compiler requires you to somewhat manually translate from arguments to Rust types). To use BurntSushi's words, `docopt` is also a sort of black box. You get what you get, and it's hard to tweak implementation or customize the experience for your use case.
-
-Because `docopt` is doing a ton of work to parse your help messages and determine what you were trying to communicate as valid arguments, it's also one of the more heavy weight parsers performance-wise. For most applications this isn't a concern and this isn't to say `docopt` is slow, in fact from it. This is just something to keep in mind while comparing.
-
-#### All else being equal, what are some reasons to use `clap`?
-
-`clap` is as fast, and as lightweight as possible while still giving all the features you'd expect from a modern argument parser. In fact, for the amount and type of features `clap` offers it remains about as fast as `getopts`. If you use `clap` when just need some simple arguments parsed, you'll find it's a walk in the park. `clap` also makes it possible to represent extremely complex, and advanced requirements, without too much thought. `clap` aims to be intuitive, easy to use, and fully capable for wide variety use cases and needs.
-
-## Features
-
-Below are a few of the features which `clap` supports, full descriptions and usage can be found in the [documentation](https://docs.rs/clap/) and [examples/](examples) directory
-
-* **Auto-generated Help, Version, and Usage information**
-  - Can optionally be fully, or partially overridden if you want a custom help, version, or usage
-* **Auto-generated bash completion scripts at compile time**
-  - Even works through many multiple levels of subcommands
-  - Works with options which only accept certain values
-  - Works with subcommand aliases
-* **Flags / Switches** (i.e. bool fields)
-  - Both short and long versions supported (i.e. `-f` and `--flag` respectively)
-  - Supports combining short versions (i.e. `-fBgoZ` is the same as `-f -B -g -o -Z`)
-  - Supports multiple occurrences (i.e. `-vvv` or `-v -v -v`)
-* **Positional Arguments** (i.e. those which are based off an index from the program name)
-  - Supports multiple values (i.e. `myprog <file>...` such as `myprog file1.txt file2.txt` being two values for the same "file" argument)
-  - Supports Specific Value Sets (See below)
-  - Can set value parameters (such as the minimum number of values, the maximum number of values, or the exact number of values)
-  - Can set custom validations on values to extend the argument parsing capability to truly custom domains
-* **Option Arguments** (i.e. those that take values)
-  - Both short and long versions supported (i.e. `-o value`, `-ovalue`, `-o=value` and `--option value` or `--option=value` respectively)
-  - Supports multiple values (i.e. `-o <val1> -o <val2>` or `-o <val1> <val2>`)
-  - Supports delimited values (i.e. `-o=val1,val2,val3`, can also change the delimiter)
-  - Supports Specific Value Sets (See below)
-  - Supports named values so that the usage/help info appears as `-o <FILE> <INTERFACE>` etc. for when you require specific multiple values
-  - Can set value parameters (such as the minimum number of values, the maximum number of values, or the exact number of values)
-  - Can set custom validations on values to extend the argument parsing capability to truly custom domains
-* **Sub-Commands** (i.e. `git add <file>` where `add` is a sub-command of `git`)
-  - Support their own sub-arguments, and sub-sub-commands independent of the parent
-  - Get their own auto-generated Help, Version, and Usage independent of parent
-* **Support for building CLIs from YAML** - This keeps your Rust source nice and tidy and makes supporting localized translation very simple!
-* **Requirement Rules**: Arguments can define the following types of requirement rules
-  - Can be required by default
-  - Can be required only if certain arguments are present
-  - Can require other arguments to be present
-* **Confliction Rules**: Arguments can optionally define the following types of exclusion rules
-  - Can be disallowed when certain arguments are present
-  - Can disallow use of other arguments when present
-* **Groups**: Arguments can be made part of a group
-  - Fully compatible with other relational rules (requirements, conflicts, and overrides) which allows things like requiring the use of any arg in a group, or denying the use of an entire group conditionally
-* **Specific Value Sets**: Positional or Option Arguments can define a specific set of allowed values (i.e. imagine a `--mode` option which may *only* have one of two values `fast` or `slow` such as `--mode fast` or `--mode slow`)
-* **Default Values**
-* **Automatic Version from Cargo.toml**: `clap` is fully compatible with Rust's `env!()` macro for automatically setting the version of your application to the version in your Cargo.toml. See [09_auto_version example](examples/09_auto_version.rs) for how to do this (Thanks to [jhelwig](https://github.com/jhelwig) for pointing this out)
-* **Typed Values**: You can use several convenience macros provided by `clap` to get typed values (i.e. `i32`, `u8`, etc.) from positional or option arguments so long as the type you request implements `std::str::FromStr` See the [12_typed_values example](examples/12_typed_values.rs). You can also use `clap`s `arg_enum!` macro to create an enum with variants that automatically implement `std::str::FromStr`. See [13a_enum_values_automatic example](examples/13a_enum_values_automatic.rs) for details
-* **Suggestions**: Suggests corrections when the user enters a typo. For example, if you defined a `--myoption` argument, and the user mistakenly typed `--moyption` (notice `y` and `o` transposed), they would receive a `Did you mean '--myoption'?` error and exit gracefully. This also works for subcommands and flags. (Thanks to [Byron](https://github.com/Byron) for the implementation) (This feature can optionally be disabled, see 'Optional Dependencies / Features')
-* **Colorized Errors (Non Windows OS only)**: Error message are printed in in colored text (this feature can optionally be disabled, see 'Optional Dependencies / Features').
-* **Global Arguments**: Arguments can optionally be defined once, and be available to all child subcommands.
-* **Custom Validations**: You can define a function to use as a validator of argument values. Imagine defining a function to validate IP addresses, or fail parsing upon error. This means your application logic can be solely focused on *using* values.
-* **POSIX Compatible Conflicts/Overrides** - In POSIX args can be conflicting, but not fail parsing because whichever arg comes *last* "wins" so to speak. This allows things such as aliases (i.e. `alias ls='ls -l'` but then using `ls -C` in your terminal which ends up passing `ls -l -C` as the final arguments. Since `-l` and `-C` aren't compatible, this effectively runs `ls -C` in `clap` if you choose...`clap` also supports hard conflicts that fail parsing). (Thanks to [Vinatorul](https://github.com/Vinatorul)!)
-* Supports the Unix `--` meaning, only positional arguments follow
-
-## Quick Example
-
-The following examples show a quick example of some of the very basic functionality of `clap`. For more advanced usage, such as requirements, conflicts, groups, multiple values and occurrences see the [documentation](https://docs.rs/clap/), [examples/](examples) directory of this repository or the [video tutorials](https://www.youtube.com/playlist?list=PLza5oFLQGTl2Z5T8g1pRkIynR3E0_pc7U).
-
- **NOTE:** All of these examples are functionally the same, but show different styles in which to use `clap`
-
-The first example shows a method that allows more advanced configuration options (not shown in this small example), or even dynamically generating arguments when desired. The downside is it's more verbose.
-
-```rust
-// (Full example with detailed comments in examples/01b_quick_example.rs)
-//
-// This example demonstrates clap's full 'builder pattern' style of creating arguments which is
-// more verbose, but allows easier editing, and at times more advanced options, or the possibility
-// to generate arguments dynamically.
-extern crate clap;
-use clap::{Arg, App, SubCommand};
-
-fn main() {
-    let matches = App::new("My Super Program")
-                          .version("1.0")
-                          .author("Kevin K. <kbknapp@gmail.com>")
-                          .about("Does awesome things")
-                          .arg(Arg::with_name("config")
-                               .short("c")
-                               .long("config")
-                               .value_name("FILE")
-                               .help("Sets a custom config file")
-                               .takes_value(true))
-                          .arg(Arg::with_name("INPUT")
-                               .help("Sets the input file to use")
-                               .required(true)
-                               .index(1))
-                          .arg(Arg::with_name("v")
-                               .short("v")
-                               .multiple(true)
-                               .help("Sets the level of verbosity"))
-                          .subcommand(SubCommand::with_name("test")
-                                      .about("controls testing features")
-                                      .version("1.3")
-                                      .author("Someone E. <someone_else@other.com>")
-                                      .arg(Arg::with_name("debug")
-                                          .short("d")
-                                          .help("print debug information verbosely")))
-                          .get_matches();
-
-    // Gets a value for config if supplied by user, or defaults to "default.conf"
-    let config = matches.value_of("config").unwrap_or("default.conf");
-    println!("Value for config: {}", config);
-
-    // Calling .unwrap() is safe here because "INPUT" is required (if "INPUT" wasn't
-    // required we could have used an 'if let' to conditionally get the value)
-    println!("Using input file: {}", matches.value_of("INPUT").unwrap());
-
-    // Vary the output based on how many times the user used the "verbose" flag
-    // (i.e. 'myprog -v -v -v' or 'myprog -vvv' vs 'myprog -v'
-    match matches.occurrences_of("v") {
-        0 => println!("No verbose info"),
-        1 => println!("Some verbose info"),
-        2 => println!("Tons of verbose info"),
-        3 | _ => println!("Don't be crazy"),
-    }
-
-    // You can handle information about subcommands by requesting their matches by name
-    // (as below), requesting just the name used, or both at the same time
-    if let Some(matches) = matches.subcommand_matches("test") {
-        if matches.is_present("debug") {
-            println!("Printing debug info...");
-        } else {
-            println!("Printing normally...");
-        }
-    }
-
-    // more program logic goes here...
-}
-```
-
-The next example shows a far less verbose method, but sacrifices some of the advanced configuration options (not shown in this small example). This method also takes a *very* minor runtime penalty.
-
-```rust
-// (Full example with detailed comments in examples/01a_quick_example.rs)
-//
-// This example demonstrates clap's "usage strings" method of creating arguments
-// which is less verbose
-extern crate clap;
-use clap::{Arg, App, SubCommand};
-
-fn main() {
-    let matches = App::new("myapp")
-                          .version("1.0")
-                          .author("Kevin K. <kbknapp@gmail.com>")
-                          .about("Does awesome things")
-                          .args_from_usage(
-                              "-c, --config=[FILE] 'Sets a custom config file'
-                              <INPUT>              'Sets the input file to use'
-                              -v...                'Sets the level of verbosity'")
-                          .subcommand(SubCommand::with_name("test")
-                                      .about("controls testing features")
-                                      .version("1.3")
-                                      .author("Someone E. <someone_else@other.com>")
-                                      .arg_from_usage("-d, --debug 'Print debug information'"))
-                          .get_matches();
-
-    // Same as previous example...
-}
-```
-
-This third method shows how you can use a YAML file to build your CLI and keep your Rust source tidy
-or support multiple localized translations by having different YAML files for each localization.
-
-First, create the `cli.yml` file to hold your CLI options, but it could be called anything we like:
-
-```yaml
-name: myapp
-version: "1.0"
-author: Kevin K. <kbknapp@gmail.com>
-about: Does awesome things
-args:
-    - config:
-        short: c
-        long: config
-        value_name: FILE
-        help: Sets a custom config file
-        takes_value: true
-    - INPUT:
-        help: Sets the input file to use
-        required: true
-        index: 1
-    - verbose:
-        short: v
-        multiple: true
-        help: Sets the level of verbosity
-subcommands:
-    - test:
-        about: controls testing features
-        version: "1.3"
-        author: Someone E. <someone_else@other.com>
-        args:
-            - debug:
-                short: d
-                help: print debug information
-```
-
-Since this feature requires additional dependencies that not everyone may want, it is *not* compiled in by default and we need to enable a feature flag in Cargo.toml:
-
-Simply change your `clap = "2.19"` to `clap = {version = "2.19", features = ["yaml"]}`.
-
-At last we create our `main.rs` file just like we would have with the previous two examples:
-
-```rust
-// (Full example with detailed comments in examples/17_yaml.rs)
-//
-// This example demonstrates clap's building from YAML style of creating arguments which is far
-// more clean, but takes a very small performance hit compared to the other two methods.
-#[macro_use]
-extern crate clap;
-use clap::App;
-
-fn main() {
-    // The YAML file is found relative to the current file, similar to how modules are found
-    let yaml = load_yaml!("cli.yml");
-    let matches = App::from_yaml(yaml).get_matches();
-
-    // Same as previous examples...
-}
-```
-
-Finally there is a macro version, which is like a hybrid approach offering the speed of the builder pattern (the first example), but without all the verbosity.
-
-```rust
-#[macro_use]
-extern crate clap;
-
-fn main() {
-    let matches = clap_app!(myapp =>
-        (version: "1.0")
-        (author: "Kevin K. <kbknapp@gmail.com>")
-        (about: "Does awesome things")
-        (@arg CONFIG: -c --config +takes_value "Sets a custom config file")
-        (@arg INPUT: +required "Sets the input file to use")
-        (@arg debug: -d ... "Sets the level of debugging information")
-        (@subcommand test =>
-            (about: "controls testing features")
-            (version: "1.3")
-            (author: "Someone E. <someone_else@other.com>")
-            (@arg verbose: -v --verbose "Print test information verbosely")
-        )
-    ).get_matches();
-
-    // Same as before...
-}
-```
-
-If you were to compile any of the above programs and run them with the flag `--help` or `-h` (or `help` subcommand, since we defined `test` as a subcommand) the following would be output
-
-```sh
-$ myprog --help
-My Super Program 1.0
-Kevin K. <kbknapp@gmail.com>
-Does awesome things
-
-USAGE:
-    MyApp [FLAGS] [OPTIONS] <INPUT> [SUBCOMMAND]
-
-FLAGS:
-    -h, --help       Prints this message
-    -v               Sets the level of verbosity
-    -V, --version    Prints version information
-
-OPTIONS:
-    -c, --config <FILE>    Sets a custom config file
-
-ARGS:
-    INPUT    The input file to use
-
-SUBCOMMANDS:
-    help    Prints this message
-    test    Controls testing features
-```
-
-**NOTE:** You could also run `myapp test --help` to see similar output and options for the `test` subcommand.
-
-## Try it!
-
-### Pre-Built Test
-
-To try out the pre-built example, use the following steps:
-
-* Clone the repository `$ git clone https://github.com/kbknapp/clap-rs && cd clap-rs/tests`
-* Compile the example `$ cargo build --release`
-* Run the help info `$ ./target/release/claptests --help`
-* Play with the arguments!
-
-### BYOB (Build Your Own Binary)
-
-To test out `clap`'s default auto-generated help/version follow these steps:
-* Create a new cargo project `$ cargo new fake --bin && cd fake`
-* Add `clap` to your `Cargo.toml`
-*
-```toml
-[dependencies]
-clap = "2"
-```
-
-* Add the following to your `src/main.rs`
-
-```rust
-extern crate clap;
-use clap::App;
-
-fn main() {
-  App::new("fake").version("v1.0-beta").get_matches();
-}
-```
-
-* Build your program `$ cargo build --release`
-* Run with help or version `$ ./target/release/fake --help` or `$ ./target/release/fake --version`
-
-## Usage
-
-For full usage, add `clap` as a dependency in your `Cargo.toml` () to use from crates.io:
-
-```toml
-[dependencies]
-clap = "~2.19.0"
-```
-
-(**note**: If you are concerned with supporting a minimum version of Rust that is *older* than the current stable Rust minus 2 stable releases, it's recommended to use the `~major.minor.patch` style versions in your `Cargo.toml` which will only update the patch version automatically. For more information see the [Compatibility Policy](#compatibility-policy))
-
-Then add `extern crate clap;` to your crate root.
-
-Define a list of valid arguments for your program (see the [documentation](https://docs.rs/clap/) or [examples/](examples) directory of this repo)
-
-Then run `cargo build` or `cargo update && cargo build` for your project.
-
-### Optional Dependencies / Features
-
-#### Features enabled by default
-
-* **"suggestions"**: Turns on the `Did you mean '--myoption'?` feature for when users make typos. (builds dependency `strsim`)
-* **"color"**: Turns on colored error messages. This feature only works on non-Windows OSs. (builds dependency `ansi-term`)
-* **"wrap_help"**: Wraps the help at the actual terminal width when available, instead of 120 characters. (builds dependency `term_size`)
-
-To disable these, add this to your `Cargo.toml`:
-
-```toml
-[dependencies.clap]
-version = "2.19"
-default-features = false
-```
-
-You can also selectively enable only the features you'd like to include, by adding:
-
-```toml
-[dependencies.clap]
-version = "2.19"
-default-features = false
-
-# Cherry-pick the features you'd like to use
-features = [ "suggestions", "color" ]
-```
-
-#### Opt-in features
-
-* **"yaml"**: Enables building CLIs from YAML documents. (builds dependency `yaml-rust`)
-* **"unstable"**: Enables unstable `clap` features that may change from release to release
-
-### Dependencies Tree
-
-The following graphic depicts `clap`s dependency graph (generated using [cargo-graph](https://github.com/kbknapp/cargo-graph)).
-
- * **Dashed** Line: Optional dependency
- * **Red** Color: **NOT** included by default (must use cargo `features` to enable)
- * **Blue** Color: Dev dependency, only used while developing.
-
-![clap dependencies](clap_dep_graph.png)
-
-### More Information
-
-You can find complete documentation on the [docs.rs](https://docs.rs/clap/) for this project.
-
-You can also find usage examples in the [examples/](examples) directory of this repo.
-
-#### Video Tutorials
-
-There's also the video tutorial series [Argument Parsing with Rust v2](https://www.youtube.com/playlist?list=PLza5oFLQGTl2Z5T8g1pRkIynR3E0_pc7U).
-
-These videos slowly trickle out as I finish them and currently a work in progress.
-
-## How to Contribute
-
-Contributions are always welcome! And there is a multitude of ways in which you can help depending on what you like to do, or are good at. Anything from documentation, code cleanup, issue completion, new features, you name it, even filing issues is contributing and greatly appreciated!
-
-Another really great way to help is if you find an interesting, or helpful way in which to use `clap`. You can either add it to the [examples/](examples) directory, or file an issue and tell me. I'm all about giving credit where credit is due :)
-
-Please read [CONTRIBUTING.md](.github/CONTRIBUTING.md) before you start contributing.
-
-
-### Testing Code
-
-To test with all features both enabled and disabled, you can run these commands:
-
-```sh
-$ cargo test --no-default-features
-$ cargo test --features "yaml unstable"
-```
-
-Alternatively, if you have [`just`](https://github.com/casey/just) installed you can run the prebuilt recipes. *Not* using `just` is perfectly fine as well, it simply bundles commands automatically.
-
-For example, to test the code, as above simply run:
-
-```sh
-$ just run-tests
-```
-
-From here on, I will list the appropriate `cargo` command as well as the `just` command.
-
-Sometimes it's helpful to only run a subset of the tests, which can be done via:
-
-```sh
-$ cargo test --test <test_name>
-
-# Or
-
-$ just run-test <test_name>
-```
-
-### Linting Code
-
-During the CI process `clap` runs against many different lints using [`clippy`](https://github.com/Manishearth/rust-clippy). In order to check if these lints pass on your own computer prior to submitting a PR you'll need a nightly compiler.
-
-In order to check the code for lints run either:
-
-```sh
-$ rustup override add nightly
-$ cargo build --features lints
-$ rustup override remove
-
-# Or
-
-$ just lint
-```
-
-### Debugging Code
-
-Another helpful technique is to see the `clap` debug output while developing features. In order to see the debug output while running the full test suite or individual tests, run:
-
-```sh
-$ cargo test --features debug
-
-# Or for individual tests
-$ cargo test --test <test_name> --features debug
-
-# The corresponding just command for individual debugging tests is:
-$ just debug <test_name>
-```
-
-### Goals
-
-There are a few goals of `clap` that I'd like to maintain throughout contributions. If your proposed changes break, or go against any of these goals we'll discuss the changes further before merging (but will *not* be ignored, all contributes are welcome!). These are by no means hard-and-fast rules, as I'm no expert and break them myself from time to time (even if by mistake or ignorance :P).
-
-* Remain backwards compatible when possible
-  - If backwards compatibility *must* be broken, use deprecation warnings if at all possible before removing legacy code
-  - This does not apply for security concerns
-* Parse arguments quickly
-  - Parsing of arguments shouldn't slow down usage of the main program
-  - This is also true of generating help and usage information (although *slightly* less stringent, as the program is about to exit)
-* Try to be cognizant of memory usage
-  - Once parsing is complete, the memory footprint of `clap` should be low since the  main program is the star of the show
-* `panic!` on *developer* error, exit gracefully on *end-user* error
-
-### Compatibility Policy
-
-Because `clap` takes SemVer and compatibility seriously, this is the official policy regarding breaking changes and minimum required versions of Rust.
-
-`clap` will pin the minimum required version of Rust to the CI builds. Bumping the minimum version of Rust is considered a minor breaking change, meaning *at a minimum* the minor version of `clap` will be bumped.
-
-In order to keep from being surprised of breaking changes, it is **highly** recommended to use the `~major.minor.patch` style in your `Cargo.toml` only if you wish to target a version of Rust that is *older* than current stable minus two releases:
-
-```toml
-[dependencies]
-clap = "~2.19.0"
-```
-
-This will cause *only* the patch version to be updated upon a `cargo update` call, and therefore cannot break due to new features, or bumped minimum versions of Rust.
-
-#### Minimum Version of Rust
-
-`clap` will officially support current stable Rust, minus two releases, but may work with prior releases as well. For example, current stable Rust at the time of this writing is 1.13.0, meaning `clap` is guaranteed to compile with 1.11.0 and beyond.
-At the 1.14.0 release, `clap` will be guaranteed to compile with 1.12.0 and beyond, etc.
-
-Upon bumping the minimum version of Rust (assuming it's within the stable-2 range), it *must* be clearly annotated in the `CHANGELOG.md`
-
-#### Breaking Changes
-
-`clap` takes a similar policy to Rust and will bump the major version number upon breaking changes with only the following exceptions:
-
- * The breaking change is to fix a security concern
- * The breaking change is to be fixing a bug (i.e. relying on a bug as a feature)
- * The breaking change is a feature isn't used in the wild, or all users of said feature have given approval *prior* to the change
-
-## License
-
-`clap` is licensed under the MIT license. Please read the [LICENSE-MIT](LICENSE-MIT) file in this repository for more information.
-
-## Recent Breaking Changes
-
-`clap` follows semantic versioning, so breaking changes should only happen upon major version bumps. The only exception to this rule is breaking changes that happen due to implementation that was deemed to be a bug, security concerns, or it can be reasonably proved to affect no code. For the full details, see [CHANGELOG.md](./CHANGELOG.md).
-
-As of 2.0.0 (From 1.x)
-
-* **Fewer lifetimes! Yay!**
- * `App<'a, 'b, 'c, 'd, 'e, 'f>` => `App<'a, 'b>`
- * `Arg<'a, 'b, 'c, 'd, 'e, 'f>` => `Arg<'a, 'b>`
- * `ArgMatches<'a, 'b>` => `ArgMatches<'a>`
-* **Simply Renamed**
- * `App::arg_group` => `App::group`
- * `App::arg_groups` => `App::groups`
- * `ArgGroup::add` => `ArgGroup::arg`
- * `ArgGroup::add_all` => `ArgGroup::args`
- * `ClapError` => `Error`
-  * struct field `ClapError::error_type` => `Error::kind`
- * `ClapResult` => `Result`
- * `ClapErrorType` => `ErrorKind`
-* **Removed Deprecated Functions and Methods**
- * `App::subcommands_negate_reqs`
- * `App::subcommand_required`
- * `App::arg_required_else_help`
- * `App::global_version(bool)`
- * `App::versionless_subcommands`
- * `App::unified_help_messages`
- * `App::wait_on_error`
- * `App::subcommand_required_else_help`
- * `SubCommand::new`
- * `App::error_on_no_subcommand`
- * `Arg::new`
- * `Arg::mutually_excludes`
- * `Arg::mutually_excludes_all`
- * `Arg::mutually_overrides_with`
- * `simple_enum!`
-* **Renamed Error Variants**
- * `InvalidUnicode` => `InvalidUtf8`
- * `InvalidArgument` => `UnknownArgument`
-* **Usage Parser**
- * Value names can now be specified inline, i.e. `-o, --option <FILE> <FILE2> 'some option which takes two files'`
- * **There is now a priority of order to determine the name** - This is perhaps the biggest breaking change. See the documentation for full details. Prior to this change, the value name took precedence. **Ensure your args are using the proper names (i.e. typically the long or short and NOT the value name) throughout the code**
-* `ArgMatches::values_of` returns an `Values` now which implements `Iterator` (should not break any code)
-* `crate_version!` returns `&'static str` instead of `String`
-
-### Deprecations
-
-Old method names will be left around for several minor version bumps, or one major version bump.
-
-As of 2.19.0:
-
- * None!
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/appveyor.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-install:
-  - ps: Start-FileDownload 'https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.exe'
-  - rust-nightly-i686-pc-windows-gnu.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
-  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
-  - rustc -V
-  - cargo -V
-
-build: false
-
-test_script:
-  - cargo build --features yaml
-  - cargo test --features yaml 
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/clap-test.rs
+++ /dev/null
@@ -1,75 +0,0 @@
-#[allow(unused_imports, dead_code)]
-mod test {
-    use std::str;
-    use std::io::{Cursor, Write};
-
-    use regex::Regex;
-
-    use clap::{App, Arg, SubCommand, ArgGroup};
-
-    fn compare<S, S2>(l: S, r: S2) -> bool
-        where S: AsRef<str>,
-              S2: AsRef<str>
-    {
-        let re = Regex::new("\x1b[^m]*m").unwrap();
-        // Strip out any mismatching \r character on windows that might sneak in on either side
-        let ls = l.as_ref().trim().replace("\r", "");
-        let rs = r.as_ref().trim().replace("\r", "");
-        let left = re.replace_all(&*ls, "");
-        let right = re.replace_all(&*rs, "");
-        let b = left == right;
-        if !b {
-            println!("");
-            println!("--> left");
-            println!("{}", left);
-            println!("--> right");
-            println!("{}", right);
-            println!("--")
-        }
-        b
-    }
-
-    pub fn compare_output(l: App, args: &str, right: &str, stderr: bool) -> bool {
-        let mut buf = Cursor::new(Vec::with_capacity(50));
-        let res = l.get_matches_from_safe(args.split(' ').collect::<Vec<_>>());
-        let err = res.unwrap_err();
-        err.write_to(&mut buf).unwrap();
-        let content = buf.into_inner();
-        let left = String::from_utf8(content).unwrap();
-        assert_eq!(stderr, err.use_stderr());
-        compare(left, right)
-    }
-
-    // Legacy tests from the pyhton script days
-
-    pub fn complex_app() -> App<'static, 'static> {
-        let args = "-o --option=[opt]... 'tests options'
-                    [positional] 'tests positionals'";
-        let opt3_vals = ["fast", "slow"];
-        let pos3_vals = ["vi", "emacs"];
-        App::new("clap-test")
-            .version("v1.4.8")
-            .about("tests clap library")
-            .author("Kevin K. <kbknapp@gmail.com>")
-            .args_from_usage(args)
-            .arg(Arg::from_usage("-f --flag... 'tests flags'")
-                .global(true))
-            .args(&[
-                Arg::from_usage("[flag2] -F 'tests flags with exclusions'").conflicts_with("flag").requires("long-option-2"),
-                Arg::from_usage("--long-option-2 [option2] 'tests long options with exclusions'").conflicts_with("option").requires("positional2"),
-                Arg::from_usage("[positional2] 'tests positionals with exclusions'"),
-                Arg::from_usage("-O --Option [option3] 'specific vals'").possible_values(&opt3_vals),
-                Arg::from_usage("[positional3]... 'tests specific values'").possible_values(&pos3_vals),
-                Arg::from_usage("--multvals [one] [two] 'Tests mutliple values, not mult occs'"),
-                Arg::from_usage("--multvalsmo... [one] [two] 'Tests mutliple values, and mult occs'"),
-                Arg::from_usage("--minvals2 [minvals]... 'Tests 2 min vals'").min_values(2),
-                Arg::from_usage("--maxvals3 [maxvals]... 'Tests 3 max vals'").max_values(3)
-            ])
-            .subcommand(SubCommand::with_name("subcmd")
-                                    .about("tests subcommands")
-                                    .version("0.1")
-                                    .author("Kevin K. <kbknapp@gmail.com>")
-                                    .arg_from_usage("-o --option [scoption]... 'tests options'")
-                                    .arg_from_usage("[scpositional] 'tests positionals'"))
-    }
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/app/help.rs
+++ /dev/null
@@ -1,1010 +0,0 @@
-// Std
-use std::cmp;
-use std::collections::BTreeMap;
-use std::fmt::Display;
-use std::io::{self, Cursor, Read, Write};
-use std::usize;
-
-// Internal
-use app::{App, AppSettings};
-use app::parser::Parser;
-use args::{AnyArg, ArgSettings, DispOrder};
-use errors::{Error, Result as ClapResult};
-use fmt::{Format, Colorizer};
-use app::usage;
-
-// Third Party
-use unicode_width::UnicodeWidthStr;
-#[cfg(feature = "wrap_help")]
-use term_size;
-use unicode_segmentation::UnicodeSegmentation;
-use vec_map::VecMap;
-
-#[cfg(not(feature = "wrap_help"))]
-mod term_size {
-    pub fn dimensions() -> Option<(usize, usize)> { None }
-}
-
-macro_rules! find_longest {
-    ($help:expr) => {{
-        let mut lw = 0;
-        for l in $help.split(' ').map(|s| str_width(s)) {
-            if l > lw {
-                lw = l;
-            }
-        }
-        lw
-    }};
-}
-
-fn str_width(s: &str) -> usize { UnicodeWidthStr::width(s) }
-
-const TAB: &'static str = "    ";
-
-// These are just convenient traits to make the code easier to read.
-trait ArgWithDisplay<'b, 'c>: AnyArg<'b, 'c> + Display {}
-impl<'b, 'c, T> ArgWithDisplay<'b, 'c> for T where T: AnyArg<'b, 'c> + Display {}
-
-trait ArgWithOrder<'b, 'c>: ArgWithDisplay<'b, 'c> + DispOrder {
-    fn as_base(&self) -> &ArgWithDisplay<'b, 'c>;
-}
-impl<'b, 'c, T> ArgWithOrder<'b, 'c> for T
-    where T: ArgWithDisplay<'b, 'c> + DispOrder
-{
-    fn as_base(&self) -> &ArgWithDisplay<'b, 'c> { self }
-}
-
-fn as_arg_trait<'a, 'b, T: ArgWithOrder<'a, 'b>>(x: &T) -> &ArgWithOrder<'a, 'b> { x }
-
-impl<'b, 'c> DispOrder for App<'b, 'c> {
-    fn disp_ord(&self) -> usize { 999 }
-}
-
-macro_rules! color {
-    ($_self:ident, $s:expr, $c:ident) => {
-        if $_self.color {
-            write!($_self.writer, "{}", $_self.cizer.$c($s))
-        } else {
-            write!($_self.writer, "{}", $s)
-        }
-    };
-    ($_self:ident, $fmt_s:expr, $v:expr, $c:ident) => {
-        if $_self.color {
-            write!($_self.writer, "{}", $_self.cizer.$c(format!($fmt_s, $v)))
-        } else {
-            write!($_self.writer, $fmt_s, $v)
-        }
-    };
-}
-
-/// `clap` Help Writer.
-///
-/// Wraps a writer stream providing different methods to generate help for `clap` objects.
-pub struct Help<'a> {
-    writer: &'a mut Write,
-    next_line_help: bool,
-    hide_pv: bool,
-    term_w: usize,
-    color: bool,
-    cizer: Colorizer,
-    longest: usize,
-    force_next_line: bool,
-    use_long: bool,
-}
-
-// Public Functions
-impl<'a> Help<'a> {
-    /// Create a new `Help` instance.
-    pub fn new(w: &'a mut Write,
-               next_line_help: bool,
-               hide_pv: bool,
-               color: bool,
-               cizer: Colorizer,
-               term_w: Option<usize>,
-               max_w: Option<usize>,
-               use_long: bool)
-               -> Self {
-        debugln!("Help::new;");
-        Help {
-            writer: w,
-            next_line_help: next_line_help,
-            hide_pv: hide_pv,
-            term_w: match term_w {
-                Some(width) => if width == 0 { usize::MAX } else { width },
-                None => {
-                    cmp::min(term_size::dimensions().map_or(120, |(w, _)| w),
-                             match max_w {
-                                 None | Some(0) => usize::MAX,
-                                 Some(mw) => mw,
-                             })
-                }
-            },
-            color: color,
-            cizer: cizer,
-            longest: 0,
-            force_next_line: false,
-            use_long: use_long,
-        }
-    }
-
-    /// Reads help settings from an App
-    /// and write its help to the wrapped stream.
-    pub fn write_app_help(w: &'a mut Write, app: &App, use_long: bool) -> ClapResult<()> {
-        debugln!("Help::write_app_help;");
-        Self::write_parser_help(w, &app.p, use_long)
-    }
-
-    /// Reads help settings from a Parser
-    /// and write its help to the wrapped stream.
-    pub fn write_parser_help(w: &'a mut Write, parser: &Parser, use_long: bool) -> ClapResult<()> {
-        debugln!("Help::write_parser_help;");
-        Self::_write_parser_help(w, parser, false, use_long)
-    }
-
-    /// Reads help settings from a Parser
-    /// and write its help to the wrapped stream which will be stderr. This method prevents
-    /// formatting when required.
-    pub fn write_parser_help_to_stderr(w: &'a mut Write, parser: &Parser) -> ClapResult<()> {
-        debugln!("Help::write_parser_help;");
-        Self::_write_parser_help(w, parser, true, false)
-    }
-
-    #[doc(hidden)]
-    pub fn _write_parser_help(w: &'a mut Write, parser: &Parser, stderr: bool, use_long: bool) -> ClapResult<()> {
-        debugln!("Help::write_parser_help;");
-        let nlh = parser.is_set(AppSettings::NextLineHelp);
-        let hide_v = parser.is_set(AppSettings::HidePossibleValuesInHelp);
-        let color = parser.is_set(AppSettings::ColoredHelp);
-        let cizer = Colorizer {
-            use_stderr: stderr,
-            when: parser.color(),
-        };
-        Self::new(w,
-                  nlh,
-                  hide_v,
-                  color,
-                  cizer,
-                  parser.meta.term_w,
-                  parser.meta.max_w,
-                  use_long)
-                .write_help(parser)
-    }
-
-    /// Writes the parser help to the wrapped stream.
-    pub fn write_help(&mut self, parser: &Parser) -> ClapResult<()> {
-        debugln!("Help::write_help;");
-        if let Some(h) = parser.meta.help_str {
-            try!(write!(self.writer, "{}", h).map_err(Error::from));
-        } else if let Some(tmpl) = parser.meta.template {
-            try!(self.write_templated_help(&parser, tmpl));
-        } else {
-            try!(self.write_default_help(&parser));
-        }
-        Ok(())
-    }
-}
-
-// Methods to write AnyArg help.
-impl<'a> Help<'a> {
-    /// Writes help for each argument in the order they were declared to the wrapped stream.
-    fn write_args_unsorted<'b: 'd, 'c: 'd, 'd, I: 'd>(&mut self, args: I) -> io::Result<()>
-        where I: Iterator<Item = &'d ArgWithOrder<'b, 'c>>
-    {
-        debugln!("Help::write_args_unsorted;");
-        // The shortest an arg can legally be is 2 (i.e. '-x')
-        self.longest = 2;
-        let mut arg_v = Vec::with_capacity(10);
-        for arg in args.filter(|arg| {
-                                   !(arg.is_set(ArgSettings::Hidden)) ||
-                                   arg.is_set(ArgSettings::NextLineHelp)
-                               }) {
-            if arg.longest_filter() {
-                self.longest = cmp::max(self.longest, arg.to_string().len());
-            }
-            arg_v.push(arg)
-        }
-        let mut first = true;
-        for arg in arg_v {
-            if first {
-                first = false;
-            } else {
-                try!(self.writer.write_all(b"\n"));
-            }
-            try!(self.write_arg(arg.as_base()));
-        }
-        Ok(())
-    }
-
-    /// Sorts arguments by length and display order and write their help to the wrapped stream.
-    fn write_args<'b: 'd, 'c: 'd, 'd, I: 'd>(&mut self, args: I) -> io::Result<()>
-        where I: Iterator<Item = &'d ArgWithOrder<'b, 'c>>
-    {
-        debugln!("Help::write_args;");
-        // The shortest an arg can legally be is 2 (i.e. '-x')
-        self.longest = 2;
-        let mut ord_m = VecMap::new();
-        // Determine the longest
-        for arg in args.filter(|arg| {
-            // If it's NextLineHelp, but we don't care to compute how long because it may be
-            // NextLineHelp on purpose *because* it's so long and would throw off all other
-            // args alignment
-            !arg.is_set(ArgSettings::Hidden) || arg.is_set(ArgSettings::NextLineHelp)
-        }) {
-            if arg.longest_filter() {
-                debugln!("Help::write_args: Current Longest...{}", self.longest);
-                self.longest = cmp::max(self.longest, arg.to_string().len());
-                debugln!("Help::write_args: New Longest...{}", self.longest);
-            }
-            let btm = ord_m.entry(arg.disp_ord()).or_insert(BTreeMap::new());
-            btm.insert(arg.name(), arg);
-        }
-        let mut first = true;
-        for btm in ord_m.values() {
-            for arg in btm.values() {
-                if first {
-                    first = false;
-                } else {
-                    try!(self.writer.write_all(b"\n"));
-                }
-                try!(self.write_arg(arg.as_base()));
-            }
-        }
-        Ok(())
-    }
-
-    /// Writes help for an argument to the wrapped stream.
-    fn write_arg<'b, 'c>(&mut self, arg: &ArgWithDisplay<'b, 'c>) -> io::Result<()> {
-        debugln!("Help::write_arg;");
-        try!(self.short(arg));
-        try!(self.long(arg));
-        let spec_vals = try!(self.val(arg));
-        try!(self.help(arg, &*spec_vals));
-        Ok(())
-    }
-
-    /// Writes argument's short command to the wrapped stream.
-    fn short<'b, 'c>(&mut self, arg: &ArgWithDisplay<'b, 'c>) -> io::Result<()> {
-        debugln!("Help::short;");
-        try!(write!(self.writer, "{}", TAB));
-        if let Some(s) = arg.short() {
-            color!(self, "-{}", s, good)
-        } else if arg.has_switch() {
-            write!(self.writer, "{}", TAB)
-        } else {
-            Ok(())
-        }
-    }
-
-    /// Writes argument's long command to the wrapped stream.
-    fn long<'b, 'c>(&mut self, arg: &ArgWithDisplay<'b, 'c>) -> io::Result<()> {
-        debugln!("Help::long;");
-        if !arg.has_switch() {
-            return Ok(());
-        }
-        if arg.takes_value() {
-            if let Some(l) = arg.long() {
-                if arg.short().is_some() {
-                    try!(write!(self.writer, ", "));
-                }
-                try!(color!(self, "--{}", l, good))
-            }
-
-            let sep = if arg.is_set(ArgSettings::RequireEquals) {
-                "="
-            } else {
-                " "
-            };
-            try!(write!(self.writer, "{}", sep));
-        } else if let Some(l) = arg.long() {
-            if arg.short().is_some() {
-                try!(write!(self.writer, ", "));
-            }
-            try!(color!(self, "--{}", l, good));
-        }
-        Ok(())
-    }
-
-    /// Writes argument's possible values to the wrapped stream.
-    fn val<'b, 'c>(&mut self, arg: &ArgWithDisplay<'b, 'c>) -> Result<String, io::Error> {
-        debugln!("Help::val: arg={}", arg);
-        if arg.takes_value() {
-            if let Some(vec) = arg.val_names() {
-                let mut it = vec.iter().peekable();
-                while let Some((_, val)) = it.next() {
-                    try!(color!(self, "<{}>", val, good));
-                    if it.peek().is_some() {
-                        try!(write!(self.writer, " "));
-                    }
-                }
-                let num = vec.len();
-                if arg.is_set(ArgSettings::Multiple) && num == 1 {
-                    try!(color!(self, "...", good));
-                }
-            } else if let Some(num) = arg.num_vals() {
-                let mut it = (0..num).peekable();
-                while let Some(_) = it.next() {
-                    try!(color!(self, "<{}>", arg.name(), good));
-                    if it.peek().is_some() {
-                        try!(write!(self.writer, " "));
-                    }
-                }
-                if arg.is_set(ArgSettings::Multiple) && num == 1 {
-                    try!(color!(self, "...", good));
-                }
-            } else if arg.has_switch() {
-                try!(color!(self, "<{}>", arg.name(), good));
-                if arg.is_set(ArgSettings::Multiple) {
-                    try!(color!(self, "...", good));
-                }
-            } else {
-                try!(color!(self, "{}", arg, good));
-            }
-        }
-
-        let spec_vals = self.spec_vals(arg);
-        let h = arg.help().unwrap_or("");
-        let h_w = str_width(h) + str_width(&*spec_vals);
-        let nlh = self.next_line_help || arg.is_set(ArgSettings::NextLineHelp);
-        let taken = self.longest + 12;
-        self.force_next_line = !nlh && self.term_w >= taken &&
-                               (taken as f32 / self.term_w as f32) > 0.40 &&
-                               h_w > (self.term_w - taken);
-
-        debug!("Help::val: Has switch...");
-        if arg.has_switch() {
-            sdebugln!("Yes");
-            debugln!("Help::val: force_next_line...{:?}", self.force_next_line);
-            debugln!("Help::val: nlh...{:?}", nlh);
-            debugln!("Help::val: taken...{}", taken);
-            debugln!("Help::val: help_width > (width - taken)...{} > ({} - {})",
-                     h_w,
-                     self.term_w,
-                     taken);
-            debugln!("Help::val: longest...{}", self.longest);
-            debug!("Help::val: next_line...");
-            if !(nlh || self.force_next_line) {
-                sdebugln!("No");
-                let self_len = arg.to_string().len();
-                // subtract ourself
-                let mut spcs = self.longest - self_len;
-                // Since we're writing spaces from the tab point we first need to know if we
-                // had a long and short, or just short
-                if arg.long().is_some() {
-                    // Only account 4 after the val
-                    spcs += 4;
-                } else {
-                    // Only account for ', --' + 4 after the val
-                    spcs += 8;
-                }
-
-                write_nspaces!(self.writer, spcs);
-            } else {
-                sdebugln!("Yes");
-            }
-        } else if !(nlh || self.force_next_line) {
-            sdebugln!("No, and not next_line");
-            write_nspaces!(self.writer, self.longest + 4 - (arg.to_string().len()));
-        } else {
-            sdebugln!("No");
-        }
-        Ok(spec_vals)
-    }
-
-    fn write_before_after_help(&mut self, h: &str) -> io::Result<()> {
-        debugln!("Help::write_before_after_help;");
-        let mut help = String::new();
-        // determine if our help fits or needs to wrap
-        debugln!("Help::write_before_after_help: Term width...{}",
-                 self.term_w);
-        let too_long = str_width(h) >= self.term_w;
-
-        debug!("Help::write_before_after_help: Too long...");
-        if too_long || h.contains("{n}") {
-            sdebugln!("Yes");
-            help.push_str(h);
-            debugln!("Help::write_before_after_help: help: {}", help);
-            debugln!("Help::write_before_after_help: help width: {}",
-                     str_width(&*help));
-            // Determine how many newlines we need to insert
-            debugln!("Help::write_before_after_help: Usable space: {}",
-                     self.term_w);
-            let longest_w = find_longest!(help);
-            help = help.replace("{n}", "\n");
-            wrap_help(&mut help, longest_w, self.term_w);
-        } else {
-            sdebugln!("No");
-        }
-        let help = if !help.is_empty() {
-            &*help
-        } else {
-            help.push_str(h);
-            &*help
-        };
-        if help.contains('\n') {
-            if let Some(part) = help.lines().next() {
-                try!(write!(self.writer, "{}", part));
-            }
-            for part in help.lines().skip(1) {
-                try!(write!(self.writer, "\n{}", part));
-            }
-        } else {
-            try!(write!(self.writer, "{}", help));
-        }
-        Ok(())
-    }
-
-    /// Writes argument's help to the wrapped stream.
-    fn help<'b, 'c>(&mut self, arg: &ArgWithDisplay<'b, 'c>, spec_vals: &str) -> io::Result<()> {
-        debugln!("Help::help;");
-        let mut help = String::new();
-        let h = if self.use_long {
-            arg.long_help().unwrap_or(arg.help().unwrap_or(""))
-        } else {
-            arg.help().unwrap_or(arg.long_help().unwrap_or(""))
-        };
-        let nlh = self.next_line_help || arg.is_set(ArgSettings::NextLineHelp) || self.use_long;
-        debugln!("Help::help: Next Line...{:?}", nlh);
-
-        let spcs = if nlh || self.force_next_line {
-            12 // "tab" * 3
-        } else {
-            self.longest + 12
-        };
-
-        let too_long = spcs + str_width(h) + str_width(&*spec_vals) >= self.term_w;
-
-        // Is help on next line, if so then indent
-        if nlh || self.force_next_line {
-            try!(write!(self.writer, "\n{}{}{}", TAB, TAB, TAB));
-        }
-
-        debug!("Help::help: Too long...");
-        if too_long && spcs <= self.term_w || h.contains("{n}") {
-            sdebugln!("Yes");
-            help.push_str(h);
-            help.push_str(&*spec_vals);
-            debugln!("Help::help: help...{}", help);
-            debugln!("Help::help: help width...{}", str_width(&*help));
-            // Determine how many newlines we need to insert
-            let avail_chars = self.term_w - spcs;
-            debugln!("Help::help: Usable space...{}", avail_chars);
-            let longest_w = find_longest!(help);
-            help = help.replace("{n}", "\n");
-            wrap_help(&mut help, longest_w, avail_chars);
-        } else {
-            sdebugln!("No");
-        }
-        let help = if !help.is_empty() {
-            &*help
-        } else if spec_vals.is_empty() {
-            h
-        } else {
-            help.push_str(h);
-            help.push_str(&*spec_vals);
-            &*help
-        };
-        if help.contains('\n') {
-            if let Some(part) = help.lines().next() {
-                try!(write!(self.writer, "{}", part));
-            }
-            for part in help.lines().skip(1) {
-                try!(write!(self.writer, "\n"));
-                if nlh || self.force_next_line {
-                    try!(write!(self.writer, "{}{}{}", TAB, TAB, TAB));
-                } else if arg.has_switch() {
-                    write_nspaces!(self.writer, self.longest + 12);
-                } else {
-                    write_nspaces!(self.writer, self.longest + 8);
-                }
-                try!(write!(self.writer, "{}", part));
-            }
-        } else if nlh || self.force_next_line {
-            try!(write!(self.writer, "{}", help));
-            try!(write!(self.writer, "\n"));
-        } else {
-            try!(write!(self.writer, "{}", help));
-        }
-        Ok(())
-    }
-
-    fn spec_vals(&self, a: &ArgWithDisplay) -> String {
-        debugln!("Help::spec_vals: a={}", a);
-        let mut spec_vals = vec![];
-        if !a.is_set(ArgSettings::HideDefaultValue) {
-            if let Some(pv) = a.default_val() {
-                debugln!("Help::spec_vals: Found default value...[{:?}]", pv);
-                spec_vals.push(format!(" [default: {}]",
-                                       if self.color {
-                                           self.cizer.good(pv.to_string_lossy())
-                                       } else {
-                                           Format::None(pv.to_string_lossy())
-                                       }));
-            }
-        }
-        if let Some(ref aliases) = a.aliases() {
-            debugln!("Help::spec_vals: Found aliases...{:?}", aliases);
-            spec_vals.push(format!(" [aliases: {}]",
-                                   if self.color {
-                                       aliases
-                                           .iter()
-                                           .map(|v| format!("{}", self.cizer.good(v)))
-                                           .collect::<Vec<_>>()
-                                           .join(", ")
-                                   } else {
-                                       aliases.join(", ")
-                                   }));
-        }
-        if !self.hide_pv && !a.is_set(ArgSettings::HidePossibleValues) {
-            if let Some(pv) = a.possible_vals() {
-                debugln!("Help::spec_vals: Found possible vals...{:?}", pv);
-                spec_vals.push(if self.color {
-                                   format!(" [values: {}]",
-                                           pv.iter()
-                                               .map(|v| format!("{}", self.cizer.good(v)))
-                                               .collect::<Vec<_>>()
-                                               .join(", "))
-                               } else {
-                                   format!(" [values: {}]", pv.join(", "))
-                               });
-            }
-        }
-        spec_vals.join(" ")
-    }
-}
-
-
-// Methods to write Parser help.
-impl<'a> Help<'a> {
-    /// Writes help for all arguments (options, flags, args, subcommands)
-    /// including titles of a Parser Object to the wrapped stream.
-    #[cfg_attr(feature = "lints", allow(useless_let_if_seq))]
-    pub fn write_all_args(&mut self, parser: &Parser) -> ClapResult<()> {
-        debugln!("Help::write_all_args;");
-        let flags = parser.has_flags();
-        let pos = parser
-            .positionals()
-            .filter(|arg| !arg.is_set(ArgSettings::Hidden))
-            .count() > 0;
-        let opts = parser.has_opts();
-        let subcmds = parser.has_subcommands();
-
-        let unified_help = parser.is_set(AppSettings::UnifiedHelpMessage);
-
-        let mut first = true;
-
-        if unified_help && (flags || opts) {
-            let opts_flags = parser
-                .flags()
-                .map(as_arg_trait)
-                .chain(parser.opts().map(as_arg_trait));
-            try!(color!(self, "OPTIONS:\n", warning));
-            try!(self.write_args(opts_flags));
-            first = false;
-        } else {
-            if flags {
-                try!(color!(self, "FLAGS:\n", warning));
-                try!(self.write_args(parser.flags().map(as_arg_trait)));
-                first = false;
-            }
-            if opts {
-                if !first {
-                    try!(self.writer.write_all(b"\n\n"));
-                }
-                try!(color!(self, "OPTIONS:\n", warning));
-                try!(self.write_args(parser.opts().map(as_arg_trait)));
-                first = false;
-            }
-        }
-
-        if pos {
-            if !first {
-                try!(self.writer.write_all(b"\n\n"));
-            }
-            try!(color!(self, "ARGS:\n", warning));
-            try!(self.write_args_unsorted(parser.positionals().map(as_arg_trait)));
-            first = false;
-        }
-
-        if subcmds {
-            if !first {
-                try!(self.writer.write_all(b"\n\n"));
-            }
-            try!(color!(self, "SUBCOMMANDS:\n", warning));
-            try!(self.write_subcommands(&parser));
-        }
-
-        Ok(())
-    }
-
-    /// Writes help for subcommands of a Parser Object to the wrapped stream.
-    fn write_subcommands(&mut self, parser: &Parser) -> io::Result<()> {
-        debugln!("Help::write_subcommands;");
-        // The shortest an arg can legally be is 2 (i.e. '-x')
-        self.longest = 2;
-        let mut ord_m = VecMap::new();
-        for sc in parser
-                .subcommands
-                .iter()
-                .filter(|s| !s.p.is_set(AppSettings::Hidden)) {
-            let btm = ord_m
-                .entry(sc.p.meta.disp_ord)
-                .or_insert(BTreeMap::new());
-            self.longest = cmp::max(self.longest, sc.p.meta.name.len());
-            btm.insert(sc.p.meta.name.clone(), sc.clone());
-        }
-
-        let mut first = true;
-        for btm in ord_m.values() {
-            for sc in btm.values() {
-                if first {
-                    first = false;
-                } else {
-                    try!(self.writer.write_all(b"\n"));
-                }
-                try!(self.write_arg(sc));
-            }
-        }
-        Ok(())
-    }
-
-    /// Writes version of a Parser Object to the wrapped stream.
-    fn write_version(&mut self, parser: &Parser) -> io::Result<()> {
-        debugln!("Help::write_version;");
-        try!(write!(self.writer, "{}", parser.meta.version.unwrap_or("".into())));
-        Ok(())
-    }
-
-    /// Writes binary name of a Parser Object to the wrapped stream.
-    fn write_bin_name(&mut self, parser: &Parser) -> io::Result<()> {
-        debugln!("Help::write_bin_name;");
-        macro_rules! write_name {
-            () => {{
-                let mut name = parser.meta.name.clone();
-                let longest_w = find_longest!(name);            
-                name = name.replace("{n}", "\n");
-                wrap_help(&mut name, longest_w, self.term_w);
-                try!(color!(self, &*name, good));
-            }};
-        }
-        if let Some(bn) = parser.meta.bin_name.as_ref() {
-            if bn.contains(' ') {
-                // Incase we're dealing with subcommands i.e. git mv is translated to git-mv
-                try!(color!(self, bn.replace(" ", "-"), good))
-            } else {
-                write_name!();
-            }
-        } else {
-            write_name!();
-        }
-        Ok(())
-    }
-
-    /// Writes default help for a Parser Object to the wrapped stream.
-    pub fn write_default_help(&mut self, parser: &Parser) -> ClapResult<()> {
-        debugln!("Help::write_default_help;");
-        if let Some(h) = parser.meta.pre_help {
-            try!(self.write_before_after_help(h));
-            try!(self.writer.write_all(b"\n\n"));
-        }
-
-        macro_rules! write_thing {
-            ($thing:expr) => {{
-                let mut owned_thing = $thing.to_owned();
-                let longest_w = find_longest!(owned_thing);            
-                owned_thing = owned_thing.replace("{n}", "\n");
-                wrap_help(&mut owned_thing, longest_w, self.term_w);
-                try!(write!(self.writer, "{}\n", &*owned_thing))
-            }};
-        }
-        // Print the version
-        try!(self.write_bin_name(&parser));
-        try!(self.writer.write_all(b" "));
-        try!(self.write_version(&parser));
-        try!(self.writer.write_all(b"\n"));
-        if let Some(author) = parser.meta.author {
-            write_thing!(author)
-        }
-        if let Some(about) = parser.meta.about {
-            write_thing!(about)
-        }
-
-        try!(color!(self, "\nUSAGE:", warning));
-        try!(write!(self.writer,
-                    "\n{}{}\n\n",
-                    TAB,
-                    usage::create_usage_no_title(parser, &[])));
-
-        let flags = parser.has_flags();
-        let pos = parser.has_positionals();
-        let opts = parser.has_opts();
-        let subcmds = parser.has_subcommands();
-
-        if flags || opts || pos || subcmds {
-            try!(self.write_all_args(&parser));
-        }
-
-        if let Some(h) = parser.meta.more_help {
-            if flags || opts || pos || subcmds {
-                try!(self.writer.write_all(b"\n\n"));
-            }
-            try!(self.write_before_after_help(h));
-        }
-
-        self.writer.flush().map_err(Error::from)
-    }
-}
-
-/// Possible results for a copying function that stops when a given
-/// byte was found.
-enum CopyUntilResult {
-    DelimiterFound(usize),
-    DelimiterNotFound(usize),
-    ReaderEmpty,
-    ReadError(io::Error),
-    WriteError(io::Error),
-}
-
-/// Copies the contents of a reader into a writer until a delimiter byte is found.
-/// On success, the total number of bytes that were
-/// copied from reader to writer is returned.
-fn copy_until<R: Read, W: Write>(r: &mut R, w: &mut W, delimiter_byte: u8) -> CopyUntilResult {
-    debugln!("copy_until;");
-
-    let mut count = 0;
-    for wb in r.bytes() {
-        match wb {
-            Ok(b) => {
-                if b == delimiter_byte {
-                    return CopyUntilResult::DelimiterFound(count);
-                }
-                match w.write(&[b]) {
-                    Ok(c) => count += c,
-                    Err(e) => return CopyUntilResult::WriteError(e),
-                }
-            }
-            Err(e) => return CopyUntilResult::ReadError(e),
-        }
-    }
-    if count > 0 {
-        CopyUntilResult::DelimiterNotFound(count)
-    } else {
-        CopyUntilResult::ReaderEmpty
-    }
-}
-
-/// Copies the contents of a reader into a writer until a {tag} is found,
-/// copying the tag content to a buffer and returning its size.
-/// In addition to errors, there are three possible outputs:
-///   - None: The reader was consumed.
-///   - Some(Ok(0)): No tag was captured but the reader still contains data.
-///   - Some(Ok(length>0)): a tag with `length` was captured to the tag_buffer.
-fn copy_and_capture<R: Read, W: Write>(r: &mut R,
-                                       w: &mut W,
-                                       tag_buffer: &mut Cursor<Vec<u8>>)
-                                       -> Option<io::Result<usize>> {
-    use self::CopyUntilResult::*;
-    debugln!("copy_and_capture;");
-
-    // Find the opening byte.
-    match copy_until(r, w, b'{') {
-
-        // The end of the reader was reached without finding the opening tag.
-        // (either with or without having copied data to the writer)
-        // Return None indicating that we are done.
-        ReaderEmpty |
-        DelimiterNotFound(_) => None,
-
-        // Something went wrong.
-        ReadError(e) | WriteError(e) => Some(Err(e)),
-
-        // The opening byte was found.
-        // (either with or without having copied data to the writer)
-        DelimiterFound(_) => {
-
-            // Lets reset the buffer first and find out how long it is.
-            tag_buffer.set_position(0);
-            let buffer_size = tag_buffer.get_ref().len();
-
-            // Find the closing byte,limiting the reader to the length of the buffer.
-            let mut rb = r.take(buffer_size as u64);
-            match copy_until(&mut rb, tag_buffer, b'}') {
-
-                // We were already at the end of the reader.
-                // Return None indicating that we are done.
-                ReaderEmpty => None,
-
-                // The closing tag was found.
-                // Return the tag_length.
-                DelimiterFound(tag_length) => Some(Ok(tag_length)),
-
-                // The end of the reader was found without finding the closing tag.
-                // Write the opening byte and captured text to the writer.
-                // Return 0 indicating that nothing was caputred but the reader still contains data.
-                DelimiterNotFound(not_tag_length) => {
-                    match w.write(b"{") {
-                        Err(e) => Some(Err(e)),
-                        _ => {
-                            match w.write(&tag_buffer.get_ref()[0..not_tag_length]) {
-                                Err(e) => Some(Err(e)),
-                                _ => Some(Ok(0)),
-                            }
-                        }
-                    }
-                }
-
-                ReadError(e) | WriteError(e) => Some(Err(e)),
-            }
-        }
-    }
-}
-
-
-// Methods to write Parser help using templates.
-impl<'a> Help<'a> {
-    /// Write help to stream for the parser in the format defined by the template.
-    ///
-    /// Tags arg given inside curly brackets:
-    /// Valid tags are:
-    ///     * `{bin}`         - Binary name.
-    ///     * `{version}`     - Version number.
-    ///     * `{author}`      - Author information.
-    ///     * `{usage}`       - Automatically generated or given usage string.
-    ///     * `{all-args}`    - Help for all arguments (options, flags, positionals arguments,
-    ///                         and subcommands) including titles.
-    ///     * `{unified}`     - Unified help for options and flags.
-    ///     * `{flags}`       - Help for flags.
-    ///     * `{options}`     - Help for options.
-    ///     * `{positionals}` - Help for positionals arguments.
-    ///     * `{subcommands}` - Help for subcommands.
-    ///     * `{after-help}`  - Info to be displayed after the help message.
-    ///     * `{before-help}` - Info to be displayed before the help message.
-    ///
-    /// The template system is, on purpose, very simple. Therefore the tags have to writen
-    /// in the lowercase and without spacing.
-    fn write_templated_help(&mut self, parser: &Parser, template: &str) -> ClapResult<()> {
-        debugln!("Help::write_templated_help;");
-        let mut tmplr = Cursor::new(&template);
-        let mut tag_buf = Cursor::new(vec![0u8; 15]);
-
-        // The strategy is to copy the template from the the reader to wrapped stream
-        // until a tag is found. Depending on its value, the appropriate content is copied
-        // to the wrapped stream.
-        // The copy from template is then resumed, repeating this sequence until reading
-        // the complete template.
-
-        loop {
-            let tag_length = match copy_and_capture(&mut tmplr, &mut self.writer, &mut tag_buf) {
-                None => return Ok(()),
-                Some(Err(e)) => return Err(Error::from(e)),
-                Some(Ok(val)) if val > 0 => val,
-                _ => continue,
-            };
-
-            debugln!("Help::write_template_help:iter: tag_buf={};", unsafe {
-                String::from_utf8_unchecked(tag_buf.get_ref()[0..tag_length]
-                                                .iter()
-                                                .map(|&i| i)
-                                                .collect::<Vec<_>>())
-            });
-            match &tag_buf.get_ref()[0..tag_length] {
-                b"?" => {
-                    try!(self.writer.write_all(b"Could not decode tag name"));
-                }
-                b"bin" => {
-                    try!(self.write_bin_name(&parser));
-                }
-                b"version" => {
-                    try!(write!(self.writer,
-                                "{}",
-                                parser.meta.version.unwrap_or("unknown version")));
-                }
-                b"author" => {
-                    try!(write!(self.writer,
-                                "{}",
-                                parser.meta.author.unwrap_or("unknown author")));
-                }
-                b"about" => {
-                    try!(write!(self.writer,
-                                "{}",
-                                parser.meta.about.unwrap_or("unknown about")));
-                }
-                b"usage" => {
-                    try!(write!(self.writer, "{}", usage::create_usage_no_title(parser, &[])));
-                }
-                b"all-args" => {
-                    try!(self.write_all_args(&parser));
-                }
-                b"unified" => {
-                    let opts_flags = parser
-                        .flags()
-                        .map(as_arg_trait)
-                        .chain(parser.opts().map(as_arg_trait));
-                    try!(self.write_args(opts_flags));
-                }
-                b"flags" => {
-                    try!(self.write_args(parser.flags().map(as_arg_trait)));
-                }
-                b"options" => {
-                    try!(self.write_args(parser.opts().map(as_arg_trait)));
-                }
-                b"positionals" => {
-                    try!(self.write_args(parser.positionals().map(as_arg_trait)));
-                }
-                b"subcommands" => {
-                    try!(self.write_subcommands(&parser));
-                }
-                b"after-help" => {
-                    try!(write!(self.writer,
-                                "{}",
-                                parser.meta.more_help.unwrap_or("unknown after-help")));
-                }
-                b"before-help" => {
-                    try!(write!(self.writer,
-                                "{}",
-                                parser.meta.pre_help.unwrap_or("unknown before-help")));
-                }
-                // Unknown tag, write it back.
-                r => {
-                    try!(self.writer.write_all(b"{"));
-                    try!(self.writer.write_all(r));
-                    try!(self.writer.write_all(b"}"));
-                }
-            }
-        }
-    }
-}
-
-fn wrap_help(help: &mut String, longest_w: usize, avail_chars: usize) {
-    debugln!("Help::wrap_help: longest_w={}, avail_chars={}",
-             longest_w,
-             avail_chars);
-    debug!("Help::wrap_help: Enough space to wrap...");
-    if longest_w < avail_chars {
-        sdebugln!("Yes");
-        let mut prev_space = 0;
-        let mut j = 0;
-        for (idx, g) in (&*help.clone()).grapheme_indices(true) {
-            debugln!("Help::wrap_help:iter: idx={}, g={}", idx, g);
-            if g == "\n" {
-                debugln!("Help::wrap_help:iter: Newline found...");
-                debugln!("Help::wrap_help:iter: Still space...{:?}",
-                         str_width(&help[j..idx]) < avail_chars);
-                if str_width(&help[j..idx]) < avail_chars {
-                    j = idx;
-                    continue;
-                }
-            } else if g != " " {
-                if idx != help.len() - 1 || str_width(&help[j..idx]) < avail_chars {
-                    continue;
-                }
-                debugln!("Help::wrap_help:iter: Reached the end of the line and we're over...");
-            } else if str_width(&help[j..idx]) <= avail_chars {
-                debugln!("Help::wrap_help:iter: Space found with room...");
-                prev_space = idx;
-                continue;
-            }
-            debugln!("Help::wrap_help:iter: Adding Newline...");
-            j = prev_space;
-            debugln!("Help::wrap_help:iter: prev_space={}, j={}", prev_space, j);
-            debugln!("Help::wrap_help:iter: Removing...{}", j);
-            debugln!("Help::wrap_help:iter: Char at {}: {:?}", j, &help[j..j + 1]);
-            help.remove(j);
-            help.insert(j, '\n');
-            prev_space = idx;
-        }
-    } else {
-        sdebugln!("No");
-    }
-}
-
-#[cfg(test)]
-mod test {
-    use super::wrap_help;
-
-    #[test]
-    fn wrap_help_last_word() {
-        let mut help = String::from("foo bar baz");
-        wrap_help(&mut help, 3, 5);
-        assert_eq!(help, "foo\nbar\nbaz");
-    }
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/app/macros.rs
+++ /dev/null
@@ -1,162 +0,0 @@
-macro_rules! remove_overriden {
-    (@remove_requires $rem_from:expr, $a:ident.$ov:ident) => {
-        if let Some(ora) = $a.$ov() {
-            for i in (0 .. $rem_from.len()).rev() {
-                let should_remove = ora.iter().any(|&(_, ref name)| name == &$rem_from[i]);
-                if should_remove { $rem_from.swap_remove(i); }
-            }
-        }
-    };
-    (@remove $rem_from:expr, $a:ident.$ov:ident) => {
-        if let Some(ora) = $a.$ov() {
-            vec_remove_all!($rem_from, ora.iter());
-        }
-    };
-    (@arg $_self:ident, $arg:ident) => {
-        remove_overriden!(@remove_requires $_self.required, $arg.requires);
-        remove_overriden!(@remove $_self.blacklist, $arg.blacklist);
-        remove_overriden!(@remove $_self.overrides, $arg.overrides);
-    };
-    ($_self:ident, $name:expr) => {
-        debugln!("remove_overriden!;");
-        if let Some(o) = $_self.opts.iter() .find(|o| o.b.name == *$name) {
-            remove_overriden!(@arg $_self, o);
-        } else if let Some(f) = $_self.flags.iter() .find(|f| f.b.name == *$name) {
-            remove_overriden!(@arg $_self, f);
-        } else {
-            let p = $_self.positionals.values()
-                                      .find(|p| p.b.name == *$name)
-                                      .expect(INTERNAL_ERROR_MSG);
-            remove_overriden!(@arg $_self, p);
-        }
-    };
-}
-
-macro_rules! arg_post_processing {
-    ($me:ident, $arg:ident, $matcher:ident) => {
-        debugln!("arg_post_processing!;");
-        // Handle POSIX overrides
-        debug!("arg_post_processing!: Is '{}' in overrides...", $arg.to_string());
-        if $me.overrides.contains(&$arg.name()) {
-            if let Some(ref name) = find_name_from!($me, &$arg.name(), overrides, $matcher) {
-                sdebugln!("Yes by {}", name);
-                $matcher.remove(name);
-                remove_overriden!($me, name);
-            }
-        } else { sdebugln!("No"); }
-
-        // Add overrides
-        debug!("arg_post_processing!: Does '{}' have overrides...", $arg.to_string());
-        if let Some(or) = $arg.overrides() {
-            sdebugln!("Yes");
-            $matcher.remove_all(or);
-            for pa in or { remove_overriden!($me, pa); }
-            $me.overrides.extend(or);
-            vec_remove_all!($me.required, or.iter());
-        } else { sdebugln!("No"); }
-
-        // Handle conflicts
-        debug!("arg_post_processing!: Does '{}' have conflicts...", $arg.to_string());
-        if let Some(bl) = $arg.blacklist() {
-            sdebugln!("Yes");
-
-            for c in bl {
-                // Inject two-way conflicts
-                debug!("arg_post_processing!: Has '{}' already been matched...", c);
-                if $matcher.contains(c) {
-                    sdebugln!("Yes");
-                    // find who blacklisted us...
-                    $me.blacklist.push(&$arg.b.name);
-                } else {
-                    sdebugln!("No");
-                }
-            }
-
-            $me.blacklist.extend_from_slice(bl);
-            vec_remove_all!($me.overrides, bl.iter());
-            // vec_remove_all!($me.required, bl.iter());
-        } else { sdebugln!("No"); }
-
-        // Add all required args which aren't already found in matcher to the master
-        // list
-        debug!("arg_post_processing!: Does '{}' have requirements...", $arg.to_string());
-        if let Some(reqs) = $arg.requires() {
-            for n in reqs.iter()
-                .filter(|&&(val, _)| val.is_none())
-                .filter(|&&(_, req)| !$matcher.contains(&req))
-                .map(|&(_, name)| name) {
-                    
-                $me.required.push(n);
-            }
-        } else { sdebugln!("No"); }
-
-        _handle_group_reqs!($me, $arg);
-    };
-}
-
-macro_rules! _handle_group_reqs{
-    ($me:ident, $arg:ident) => ({
-        use args::AnyArg;
-        debugln!("_handle_group_reqs!;");
-        for grp in $me.groups.iter() {
-            let found = if grp.args.contains(&$arg.name()) {
-                // vec_remove!($me.required, &$arg.name());
-                if let Some(ref reqs) = grp.requires {
-                    debugln!("_handle_group_reqs!: Adding {:?} to the required list", reqs);
-                    $me.required.extend(reqs);
-                }
-                if let Some(ref bl) = grp.conflicts {
-                    $me.blacklist.extend(bl);
-                }
-                true // What if arg is in more than one group with different reqs?
-            } else {
-                false
-            };
-            debugln!("_handle_group_reqs!:iter: grp={}, found={:?}", grp.name, found);
-            if found {
-                for i in (0 .. $me.required.len()).rev() {
-                    let should_remove = grp.args.contains(&$me.required[i]);
-                    if should_remove { $me.required.swap_remove(i); }
-                }
-                debugln!("_handle_group_reqs!:iter: Adding args from group to blacklist...{:?}", grp.args);
-                if !grp.multiple {
-                    $me.blacklist.extend(&grp.args);
-                    vec_remove!($me.blacklist, &$arg.name());
-                }
-            }
-        }
-    })
-}
-
-macro_rules! parse_positional {
-    (
-        $_self:ident,
-        $p:ident,
-        $arg_os:ident,
-        $pos_counter:ident,
-        $matcher:ident
-    ) => {
-        debugln!("parse_positional!;");
-
-        if !$_self.is_set(AS::TrailingValues) &&
-           ($_self.is_set(AS::TrailingVarArg) &&
-            $pos_counter == $_self.positionals.len()) {
-            $_self.settings.set(AS::TrailingValues);
-        }
-        let _ = try!($_self.add_val_to_arg($p, &$arg_os, $matcher));
-
-        $matcher.inc_occurrence_of($p.b.name);
-        let _ = $_self.groups_for_arg($p.b.name)
-                      .and_then(|vec| Some($matcher.inc_occurrences_of(&*vec)));
-        if $_self.cache.map_or(true, |name| name != $p.b.name) {
-            arg_post_processing!($_self, $p, $matcher);
-            $_self.cache = Some($p.b.name);
-        }
-
-        $_self.settings.set(AS::ValidArgFound);
-        // Only increment the positional counter if it doesn't allow multiples
-        if !$p.b.settings.is_set(ArgSettings::Multiple) {
-            $pos_counter += 1;
-        }
-    };
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/app/parser.rs
+++ /dev/null
@@ -1,1864 +0,0 @@
-// Std
-use std::ffi::{OsStr, OsString};
-use std::fmt::Display;
-use std::fs::File;
-use std::io::{self, BufWriter, Write};
-#[cfg(feature = "debug")]
-use std::os::unix::ffi::OsStrExt;
-use std::path::PathBuf;
-use std::slice::Iter;
-use std::iter::Peekable;
-
-// Third Party
-use vec_map::{self, VecMap};
-
-// Internal
-use INTERNAL_ERROR_MSG;
-use INVALID_UTF8;
-use SubCommand;
-use app::App;
-use app::help::Help;
-use app::meta::AppMeta;
-use app::settings::AppFlags;
-use args::{AnyArg, ArgMatcher, Base, Switched, Arg, ArgGroup, FlagBuilder, OptBuilder, PosBuilder};
-use args::settings::ArgSettings;
-use completions::ComplGen;
-use errors::{Error, ErrorKind};
-use errors::Result as ClapResult;
-use fmt::ColorWhen;
-use osstringext::OsStrExt2;
-use completions::Shell;
-use suggestions;
-use app::settings::AppSettings as AS;
-use app::validator::Validator;
-use app::usage;
-
-#[derive(Debug, PartialEq, Copy, Clone)]
-#[doc(hidden)]
-pub enum ParseResult<'a> {
-    Flag,
-    Opt(&'a str),
-    Pos(&'a str),
-    MaybeHyphenValue,
-    MaybeNegNum,
-    NotFound,
-    ValuesDone,
-}
-
-#[allow(missing_debug_implementations)]
-#[doc(hidden)]
-#[derive(Clone, Default)]
-pub struct Parser<'a, 'b>
-    where 'a: 'b
-{
-    pub meta: AppMeta<'b>,
-    settings: AppFlags,
-    pub g_settings: AppFlags,
-    pub flags: Vec<FlagBuilder<'a, 'b>>,
-    pub opts: Vec<OptBuilder<'a, 'b>>,
-    pub positionals: VecMap<PosBuilder<'a, 'b>>,
-    pub subcommands: Vec<App<'a, 'b>>,
-    pub groups: Vec<ArgGroup<'a>>,
-    pub global_args: Vec<Arg<'a, 'b>>,
-    pub required: Vec<&'a str>,
-    pub r_ifs: Vec<(&'a str, &'b str, &'a str)>,
-    pub blacklist: Vec<&'b str>,
-    pub overrides: Vec<&'b str>,
-    help_short: Option<char>,
-    version_short: Option<char>,
-    cache: Option<&'a str>,
-    pub help_message: Option<&'a str>,
-    pub version_message: Option<&'a str>,
-}
-
-impl<'a, 'b> Parser<'a, 'b>
-    where 'a: 'b
-{
-    pub fn with_name(n: String) -> Self {
-        Parser {
-            meta: AppMeta::with_name(n),
-            ..Default::default()
-        }
-    }
-
-    pub fn help_short(&mut self, s: &str) {
-        let c = s.trim_left_matches(|c| c == '-')
-            .chars()
-            .nth(0)
-            .unwrap_or('h');
-        self.help_short = Some(c);
-    }
-
-    pub fn version_short(&mut self, s: &str) {
-        let c = s.trim_left_matches(|c| c == '-')
-            .chars()
-            .nth(0)
-            .unwrap_or('V');
-        self.version_short = Some(c);
-    }
-
-    pub fn gen_completions_to<W: Write>(&mut self, for_shell: Shell, buf: &mut W) {
-        if !self.is_set(AS::Propogated) {
-            self.propogate_help_version();
-            self.build_bin_names();
-            self.propogate_globals();
-            self.propogate_settings();
-            self.set(AS::Propogated);
-        }
-
-        ComplGen::new(self).generate(for_shell, buf)
-    }
-
-    pub fn gen_completions(&mut self, for_shell: Shell, od: OsString) {
-        use std::error::Error;
-
-        let out_dir = PathBuf::from(od);
-        let name = &*self.meta.bin_name.as_ref().unwrap().clone();
-        let file_name = match for_shell {
-            Shell::Bash => format!("{}.bash-completion", name),
-            Shell::Fish => format!("{}.fish", name),
-            Shell::Zsh => format!("_{}", name),
-            Shell::PowerShell => format!("_{}.ps1", name),
-        };
-
-        let mut file = match File::create(out_dir.join(file_name)) {
-            Err(why) => panic!("couldn't create completion file: {}", why.description()),
-            Ok(file) => file,
-        };
-        self.gen_completions_to(for_shell, &mut file)
-    }
-
-    #[inline]
-    fn app_debug_asserts(&mut self) -> bool {
-        assert!(self.verify_positionals());
-        let should_err = self.groups
-            .iter()
-            .all(|g| {
-                g.args
-                    .iter()
-                    .all(|arg| {
-                             (self.flags.iter().any(|f| &f.b.name == arg) ||
-                              self.opts.iter().any(|o| &o.b.name == arg) ||
-                              self.positionals.values().any(|p| &p.b.name == arg) ||
-                              self.groups.iter().any(|g| &g.name == arg))
-                         })
-            });
-        let g = self.groups
-            .iter()
-            .find(|g| {
-                g.args
-                    .iter()
-                    .any(|arg| {
-                             !(self.flags.iter().any(|f| &f.b.name == arg) ||
-                               self.opts.iter().any(|o| &o.b.name == arg) ||
-                               self.positionals.values().any(|p| &p.b.name == arg) ||
-                               self.groups.iter().any(|g| &g.name == arg))
-                         })
-            });
-        assert!(should_err,
-                "The group '{}' contains the arg '{}' that doesn't actually exist.",
-                g.unwrap().name,
-                g.unwrap()
-                    .args
-                    .iter()
-                    .find(|arg| {
-                              !(self.flags.iter().any(|f| &&f.b.name == arg) ||
-                                self.opts.iter().any(|o| &&o.b.name == arg) ||
-                                self.positionals.values().any(|p| &&p.b.name == arg) ||
-                                self.groups.iter().any(|g| &&g.name == arg))
-                          })
-                    .unwrap());
-        true
-    }
-
-    #[inline]
-    fn debug_asserts(&self, a: &Arg) -> bool {
-        assert!(!arg_names!(self).any(|name| name == a.b.name),
-                format!("Non-unique argument name: {} is already in use", a.b.name));
-        if let Some(l) = a.s.long {
-            assert!(!self.contains_long(l),
-                    "Argument long must be unique\n\n\t--{} is already in use",
-                    l);
-        }
-        if let Some(s) = a.s.short {
-            assert!(!self.contains_short(s),
-                    "Argument short must be unique\n\n\t-{} is already in use",
-                    s);
-        }
-        let i = if a.index.is_none() {
-            (self.positionals.len() + 1)
-        } else {
-            a.index.unwrap() as usize
-        };
-        assert!(!self.positionals.contains_key(i),
-                "Argument \"{}\" has the same index as another positional \
-                    argument\n\n\tPerhaps try .multiple(true) to allow one positional argument \
-                    to take multiple values",
-                a.b.name);
-        assert!(!(a.is_set(ArgSettings::Required) && a.is_set(ArgSettings::Global)),
-                "Global arguments cannot be required.\n\n\t'{}' is marked as \
-                          global and required",
-                a.b.name);
-        if a.b.is_set(ArgSettings::Last) {
-            assert!(!self.positionals
-                         .values()
-                         .any(|p| p.b.is_set(ArgSettings::Last)),
-                    "Only one positional argument may have last(true) set. Found two.");
-            assert!(a.s.long.is_none(),
-                    "Flags or Options may not have last(true) set. {} has both a long and last(true) set.",
-                    a.b.name);
-            assert!(a.s.short.is_none(),
-                    "Flags or Options may not have last(true) set. {} has both a short and last(true) set.",
-                    a.b.name);
-        }
-        true
-    }
-
-    #[inline]
-    fn add_conditional_reqs(&mut self, a: &Arg<'a, 'b>) {
-        if let Some(ref r_ifs) = a.r_ifs {
-            for &(arg, val) in r_ifs {
-                self.r_ifs.push((arg, val, a.b.name));
-            }
-        }
-    }
-
-    #[inline]
-    fn add_arg_groups(&mut self, a: &Arg<'a, 'b>) {
-        if let Some(ref grps) = a.b.groups {
-            for g in grps {
-                let mut found = false;
-                if let Some(ref mut ag) = self.groups.iter_mut().find(|grp| &grp.name == g) {
-                    ag.args.push(a.b.name);
-                    found = true;
-                }
-                if !found {
-                    let mut ag = ArgGroup::with_name(g);
-                    ag.args.push(a.b.name);
-                    self.groups.push(ag);
-                }
-            }
-        }
-    }
-
-    #[inline]
-    fn add_reqs(&mut self, a: &Arg<'a, 'b>) {
-        if a.is_set(ArgSettings::Required) {
-            // If the arg is required, add all it's requirements to master required list
-            if let Some(ref areqs) = a.b.requires {
-                for name in areqs
-                        .iter()
-                        .filter(|&&(val, _)| val.is_none())
-                        .map(|&(_, name)| name) {
-                    self.required.push(name);
-                }
-            }
-            self.required.push(a.b.name);
-        }
-    }
-
-    #[inline]
-    fn implied_settings(&mut self, a: &Arg<'a, 'b>) {
-        if a.is_set(ArgSettings::Last) {
-            // if an arg has `Last` set, we need to imply DontCollapseArgsInUsage so that args
-            // in the usage string don't get confused or left out.
-            self.set(AS::DontCollapseArgsInUsage);
-            self.set(AS::ContainsLast);
-        }
-        if let Some(l) = a.s.long {
-            if l == "version" {
-                self.unset(AS::NeedsLongVersion);
-            } else if l == "help" {
-                self.unset(AS::NeedsLongHelp);
-            }
-        }
-    }
-
-    // actually adds the arguments
-    pub fn add_arg(&mut self, a: Arg<'a, 'b>) {
-        // if it's global we have to clone anyways
-        if a.is_set(ArgSettings::Global) {
-            return self.add_arg_ref(&a);
-        }
-        debug_assert!(self.debug_asserts(&a));
-        self.add_conditional_reqs(&a);
-        self.add_arg_groups(&a);
-        self.add_reqs(&a);
-        self.implied_settings(&a);
-        if a.index.is_some() || (a.s.short.is_none() && a.s.long.is_none()) {
-            let i = if a.index.is_none() {
-                (self.positionals.len() + 1)
-            } else {
-                a.index.unwrap() as usize
-            };
-            self.positionals
-                .insert(i, PosBuilder::from_arg(a, i as u64));
-        } else if a.is_set(ArgSettings::TakesValue) {
-            let mut ob = OptBuilder::from(a);
-            ob.s.unified_ord = self.flags.len() + self.opts.len();
-            self.opts.push(ob);
-        } else {
-            let mut fb = FlagBuilder::from(a);
-            fb.s.unified_ord = self.flags.len() + self.opts.len();
-            self.flags.push(fb);
-        }
-    }
-    // actually adds the arguments but from a borrow (which means we have to do some clonine)
-    pub fn add_arg_ref(&mut self, a: &Arg<'a, 'b>) {
-        debug_assert!(self.debug_asserts(&a));
-        self.add_conditional_reqs(a);
-        self.add_arg_groups(a);
-        self.add_reqs(a);
-        self.implied_settings(&a);
-        if a.index.is_some() || (a.s.short.is_none() && a.s.long.is_none()) {
-            let i = if a.index.is_none() {
-                (self.positionals.len() + 1)
-            } else {
-                a.index.unwrap() as usize
-            };
-            let pb = PosBuilder::from_arg_ref(a, i as u64);
-            self.positionals.insert(i, pb);
-        } else if a.is_set(ArgSettings::TakesValue) {
-            let mut ob = OptBuilder::from(a);
-            ob.s.unified_ord = self.flags.len() + self.opts.len();
-            self.opts.push(ob);
-        } else {
-            let mut fb = FlagBuilder::from(a);
-            fb.s.unified_ord = self.flags.len() + self.opts.len();
-            self.flags.push(fb);
-        }
-        if a.is_set(ArgSettings::Global) {
-            self.global_args.push(a.into());
-        }
-    }
-
-    pub fn add_group(&mut self, group: ArgGroup<'a>) {
-        if group.required {
-            self.required.push(group.name);
-            if let Some(ref reqs) = group.requires {
-                self.required.extend_from_slice(reqs);
-            }
-            if let Some(ref bl) = group.conflicts {
-                self.blacklist.extend_from_slice(bl);
-            }
-        }
-        if self.groups.iter().any(|g| g.name == group.name) {
-            let grp = self.groups
-                .iter_mut()
-                .find(|g| g.name == group.name)
-                .expect(INTERNAL_ERROR_MSG);
-            grp.args.extend_from_slice(&group.args);
-            grp.requires = group.requires.clone();
-            grp.conflicts = group.conflicts.clone();
-            grp.required = group.required;
-        } else {
-            self.groups.push(group);
-        }
-    }
-
-    pub fn add_subcommand(&mut self, mut subcmd: App<'a, 'b>) {
-        debugln!("Parser::add_subcommand: term_w={:?}, name={}",
-                 self.meta.term_w,
-                 subcmd.p.meta.name);
-        subcmd.p.meta.term_w = self.meta.term_w;
-        if subcmd.p.meta.name == "help" {
-            self.unset(AS::NeedsSubcommandHelp);
-        }
-
-        self.subcommands.push(subcmd);
-    }
-
-    pub fn propogate_settings(&mut self) {
-        debugln!("Parser::propogate_settings: self={}, g_settings={:#?}",
-                 self.meta.name,
-                 self.g_settings);
-        for sc in &mut self.subcommands {
-            debugln!("Parser::propogate_settings: sc={}, settings={:#?}, g_settings={:#?}",
-                     sc.p.meta.name,
-                     sc.p.settings,
-                     sc.p.g_settings);
-            // We have to create a new scope in order to tell rustc the borrow of `sc` is
-            // done and to recursively call this method
-            {
-                let vsc = self.settings.is_set(AS::VersionlessSubcommands);
-                let gv = self.settings.is_set(AS::GlobalVersion);
-
-                if vsc {
-                    sc.p.set(AS::DisableVersion);
-                }
-                if gv && sc.p.meta.version.is_none() && self.meta.version.is_some() {
-                    sc.p.set(AS::GlobalVersion);
-                    sc.p.meta.version = Some(self.meta.version.unwrap());
-                }
-                sc.p.settings = sc.p.settings | self.g_settings;
-                sc.p.g_settings = sc.p.g_settings | self.g_settings;
-                sc.p.meta.term_w = self.meta.term_w;
-                sc.p.meta.max_w = self.meta.max_w;
-            }
-            sc.p.propogate_settings();
-        }
-    }
-
-    #[cfg_attr(feature = "lints", allow(needless_borrow))]
-    pub fn derive_display_order(&mut self) {
-        if self.is_set(AS::DeriveDisplayOrder) {
-            let unified = self.is_set(AS::UnifiedHelpMessage);
-            for (i, o) in self.opts
-                    .iter_mut()
-                    .enumerate()
-                    .filter(|&(_, ref o)| o.s.disp_ord == 999) {
-                o.s.disp_ord = if unified { o.s.unified_ord } else { i };
-            }
-            for (i, f) in self.flags
-                    .iter_mut()
-                    .enumerate()
-                    .filter(|&(_, ref f)| f.s.disp_ord == 999) {
-                f.s.disp_ord = if unified { f.s.unified_ord } else { i };
-            }
-            for (i, sc) in &mut self.subcommands
-                                    .iter_mut()
-                                    .enumerate()
-                                    .filter(|&(_, ref sc)| sc.p.meta.disp_ord == 999) {
-                sc.p.meta.disp_ord = i;
-            }
-        }
-        for sc in &mut self.subcommands {
-            sc.p.derive_display_order();
-        }
-    }
-
-    pub fn required(&self) -> Iter<&str> { self.required.iter() }
-
-    #[cfg_attr(feature = "lints", allow(needless_borrow))]
-    #[inline]
-    pub fn has_args(&self) -> bool {
-        !(self.flags.is_empty() && self.opts.is_empty() && self.positionals.is_empty())
-    }
-
-    #[inline]
-    pub fn has_opts(&self) -> bool { !self.opts.is_empty() }
-
-    #[inline]
-    pub fn has_flags(&self) -> bool { !self.flags.is_empty() }
-
-    #[inline]
-    pub fn has_positionals(&self) -> bool { !self.positionals.is_empty() }
-
-    #[inline]
-    pub fn has_subcommands(&self) -> bool { !self.subcommands.is_empty() }
-
-    #[inline]
-    pub fn has_visible_opts(&self) -> bool {
-        if self.opts.is_empty() {
-            return false;
-        }
-        self.opts.iter().any(|o| !o.is_set(ArgSettings::Hidden))
-    }
-
-    #[inline]
-    pub fn has_visible_flags(&self) -> bool {
-        if self.flags.is_empty() {
-            return false;
-        }
-        self.flags.iter().any(|f| !f.is_set(ArgSettings::Hidden))
-    }
-
-    #[inline]
-    pub fn has_visible_positionals(&self) -> bool {
-        if self.positionals.is_empty() {
-            return false;
-        }
-        self.positionals
-            .values()
-            .any(|p| !p.is_set(ArgSettings::Hidden))
-    }
-
-    #[inline]
-    pub fn has_visible_subcommands(&self) -> bool {
-        if self.subcommands.is_empty() {
-            return false;
-        }
-        self.subcommands.iter().any(|s| !s.p.is_set(AS::Hidden))
-    }
-
-    #[inline]
-    pub fn is_set(&self, s: AS) -> bool { self.settings.is_set(s) }
-
-    #[inline]
-    pub fn set(&mut self, s: AS) { self.settings.set(s) }
-
-    #[inline]
-    pub fn unset(&mut self, s: AS) { self.settings.unset(s) }
-
-    #[cfg_attr(feature = "lints", allow(block_in_if_condition_stmt))]
-    pub fn verify_positionals(&mut self) -> bool {
-        // Because you must wait until all arguments have been supplied, this is the first chance
-        // to make assertions on positional argument indexes
-        //
-        // Firt we verify that the index highest supplied index, is equal to the number of
-        // positional arguments to verify there are no gaps (i.e. supplying an index of 1 and 3
-        // but no 2)
-        if let Some((idx, p)) = self.positionals.iter().rev().next() {
-            assert!(!(idx != self.positionals.len()),
-                    "Found positional argument \"{}\" who's index is {} but there \
-                          are only {} positional arguments defined",
-                    p.b.name,
-                    idx,
-                    self.positionals.len());
-        }
-
-        // Next we verify that only the highest index has a .multiple(true) (if any)
-        if self.positionals
-               .values()
-               .any(|a| {
-                        a.b.is_set(ArgSettings::Multiple) &&
-                        (a.index as usize != self.positionals.len())
-                    }) {
-            let mut it = self.positionals.values().rev();
-            let last = it.next().unwrap();
-            let second_to_last = it.next().unwrap();
-            // Either the final positional is required
-            // Or the second to last has a terminator or .last(true) set
-            let ok = last.is_set(ArgSettings::Required) ||
-                     (second_to_last.v.terminator.is_some() ||
-                      second_to_last.b.is_set(ArgSettings::Last)) ||
-                     last.is_set(ArgSettings::Last);
-            assert!(ok,
-                    "When using a positional argument with .multiple(true) that is *not the \
-                          last* positional argument, the last positional argument (i.e the one \
-                          with the highest index) *must* have .required(true) or .last(true) set.");
-            let ok = second_to_last.is_set(ArgSettings::Multiple) || last.is_set(ArgSettings::Last);
-            assert!(ok,
-                    "Only the last positional argument, or second to last positional \
-                          argument may be set to .multiple(true)");
-
-            let count = self.positionals
-                .values()
-                .filter(|p| p.b.settings.is_set(ArgSettings::Multiple) && p.v.num_vals.is_none())
-                .count();
-            let ok = count <= 1 ||
-                     (last.is_set(ArgSettings::Last) && last.is_set(ArgSettings::Multiple) &&
-                      second_to_last.is_set(ArgSettings::Multiple) &&
-                      count == 2);
-            assert!(ok,
-                    "Only one positional argument with .multiple(true) set is allowed per \
-                        command, unless the second one also has .last(true) set");
-        }
-
-
-        if self.is_set(AS::AllowMissingPositional) {
-            // Check that if a required positional argument is found, all positions with a lower
-            // index are also required.
-            let mut found = false;
-            let mut foundx2 = false;
-            for p in self.positionals.values().rev() {
-                if foundx2 && !p.b.settings.is_set(ArgSettings::Required) {
-                    assert!(p.b.is_set(ArgSettings::Required),
-                            "Found positional argument which is not required with a lower \
-                                  index than a required positional argument by two or more: {:?} \
-                                  index {}",
-                            p.b.name,
-                            p.index);
-                } else if p.b.is_set(ArgSettings::Required) && !p.b.is_set(ArgSettings::Last) {
-                    // Args that .last(true) don't count since they can be required and have
-                    // positionals with a lower index that aren't required
-                    // Imagine: prog <req1> [opt1] -- <req2>
-                    // Both of these are valid invocations:
-                    //      $ prog r1 -- r2
-                    //      $ prog r1 o1 -- r2
-                    if found {
-                        foundx2 = true;
-                        continue;
-                    }
-                    found = true;
-                    continue;
-                } else {
-                    found = false;
-                }
-            }
-        } else {
-            // Check that if a required positional argument is found, all positions with a lower
-            // index are also required
-            let mut found = false;
-            for p in self.positionals.values().rev() {
-                if found {
-                    assert!(p.b.is_set(ArgSettings::Required),
-                            "Found positional argument which is not required with a lower \
-                                  index than a required positional argument: {:?} index {}",
-                            p.b.name,
-                            p.index);
-                } else if p.b.is_set(ArgSettings::Required) && !p.b.is_set(ArgSettings::Last) {
-                    // Args that .last(true) don't count since they can be required and have
-                    // positionals with a lower index that aren't required
-                    // Imagine: prog <req1> [opt1] -- <req2>
-                    // Both of these are valid invocations:
-                    //      $ prog r1 -- r2
-                    //      $ prog r1 o1 -- r2
-                    found = true;
-                    continue;
-                }
-            }
-        }
-        if self.positionals
-               .values()
-               .any(|p| {
-                        p.b.is_set(ArgSettings::Last) && p.b.is_set(ArgSettings::Required)
-                    }) && self.has_subcommands() &&
-           !self.is_set(AS::SubcommandsNegateReqs) {
-            panic!("Having a required positional argument with .last(true) set *and* child \
-            subcommands without setting SubcommandsNegateReqs isn't compatible.");
-        }
-
-        true
-    }
-
-    pub fn propogate_globals(&mut self) {
-        for sc in &mut self.subcommands {
-            // We have to create a new scope in order to tell rustc the borrow of `sc` is
-            // done and to recursively call this method
-            {
-                for a in &self.global_args {
-                    sc.p.add_arg_ref(a);
-                }
-            }
-            sc.p.propogate_globals();
-        }
-    }
-
-    // Checks if the arg matches a subcommand name, or any of it's aliases (if defined)
-    fn possible_subcommand(&self, arg_os: &OsStr) -> (bool, Option<&str>) {
-        debugln!("Parser::possible_subcommand: arg={:?}", arg_os);
-        fn starts(h: &str, n: &OsStr) -> bool {
-            #[cfg(not(target_os = "windows"))]
-            use std::os::unix::ffi::OsStrExt;
-            #[cfg(target_os = "windows")]
-            use osstringext::OsStrExt3;
-
-            let n_bytes = n.as_bytes();
-            let h_bytes = OsStr::new(h).as_bytes();
-
-            h_bytes.starts_with(n_bytes)
-        }
-
-        if self.is_set(AS::ArgsNegateSubcommands) && self.is_set(AS::ValidArgFound) {
-            return (false, None);
-        }
-        if !self.is_set(AS::InferSubcommands) {
-            if let Some(sc) = find_subcmd!(self, arg_os) {
-                return (true, Some(&sc.p.meta.name));
-            }
-        } else {
-            let v = self.subcommands
-                .iter()
-                .filter(|s| {
-                    starts(&s.p.meta.name[..], &*arg_os) ||
-                    (s.p.meta.aliases.is_some() &&
-                     s.p
-                         .meta
-                         .aliases
-                         .as_ref()
-                         .unwrap()
-                         .iter()
-                         .filter(|&&(a, _)| starts(a, &*arg_os))
-                         .count() == 1)
-                })
-                .map(|sc| &sc.p.meta.name)
-                .collect::<Vec<_>>();
-
-            if v.len() == 1 {
-                return (true, Some(v[0]));
-            }
-        }
-        (false, None)
-    }
-
-    fn parse_help_subcommand<I, T>(&self, it: &mut I) -> ClapResult<ParseResult<'a>>
-        where I: Iterator<Item = T>,
-              T: Into<OsString>
-    {
-        debugln!("Parser::parse_help_subcommand;");
-        let cmds: Vec<OsString> = it.map(|c| c.into()).collect();
-        let mut help_help = false;
-        let mut bin_name = self.meta
-            .bin_name
-            .as_ref()
-            .unwrap_or(&self.meta.name)
-            .clone();
-        let mut sc = {
-            let mut sc: &Parser = self;
-            for (i, cmd) in cmds.iter().enumerate() {
-                if &*cmd.to_string_lossy() == "help" {
-                    // cmd help help
-                    help_help = true;
-                }
-                if let Some(c) = sc.subcommands
-                       .iter()
-                       .find(|s| &*s.p.meta.name == cmd)
-                       .map(|sc| &sc.p) {
-                    sc = c;
-                    if i == cmds.len() - 1 {
-                        break;
-                    }
-                } else if let Some(c) = sc.subcommands
-                              .iter()
-                              .find(|s| if let Some(ref als) = s.p.meta.aliases {
-                                        als.iter().any(|&(a, _)| &a == &&*cmd.to_string_lossy())
-                                    } else {
-                                        false
-                                    })
-                              .map(|sc| &sc.p) {
-                    sc = c;
-                    if i == cmds.len() - 1 {
-                        break;
-                    }
-                } else {
-                    return Err(Error::unrecognized_subcommand(cmd.to_string_lossy().into_owned(),
-                                                              self.meta
-                                                                  .bin_name
-                                                                  .as_ref()
-                                                                  .unwrap_or(&self.meta.name),
-                                                              self.color()));
-                }
-                bin_name = format!("{} {}", bin_name, &*sc.meta.name);
-            }
-            sc.clone()
-        };
-        if help_help {
-            let mut pb = PosBuilder::new("subcommand", 1);
-            pb.b.help = Some("The subcommand whose help message to display");
-            pb.set(ArgSettings::Multiple);
-            sc.positionals.insert(1, pb);
-            sc.settings = sc.settings | self.g_settings;
-        } else {
-            sc.create_help_and_version();
-        }
-        if sc.meta.bin_name != self.meta.bin_name {
-            sc.meta.bin_name = Some(format!("{} {}", bin_name, sc.meta.name));
-        }
-        Err(sc._help(false))
-    }
-
-    // allow wrong self convention due to self.valid_neg_num = true and it's a private method
-    #[cfg_attr(feature = "lints", allow(wrong_self_convention))]
-    fn is_new_arg(&mut self, arg_os: &OsStr, needs_val_of: ParseResult<'a>) -> bool {
-        debugln!("Parser::is_new_arg: arg={:?}, Needs Val of={:?}",
-                 arg_os,
-                 needs_val_of);
-        let app_wide_settings = if self.is_set(AS::AllowLeadingHyphen) {
-            true
-        } else if self.is_set(AS::AllowNegativeNumbers) {
-            let a = arg_os.to_string_lossy();
-            if a.parse::<i64>().is_ok() || a.parse::<f64>().is_ok() {
-                self.set(AS::ValidNegNumFound);
-                true
-            } else {
-                false
-            }
-        } else {
-            false
-        };
-        let arg_allows_tac = match needs_val_of {
-            ParseResult::Opt(name) => {
-                let o = self.opts
-                    .iter()
-                    .find(|o| o.b.name == name)
-                    .expect(INTERNAL_ERROR_MSG);
-                (o.is_set(ArgSettings::AllowLeadingHyphen) || app_wide_settings)
-            }
-            ParseResult::Pos(name) => {
-                let p = self.positionals
-                    .values()
-                    .find(|p| p.b.name == name)
-                    .expect(INTERNAL_ERROR_MSG);
-                (p.is_set(ArgSettings::AllowLeadingHyphen) || app_wide_settings)
-            }
-            _ => false,
-        };
-        debugln!("Parser::is_new_arg: Arg::allow_leading_hyphen({:?})",
-                 arg_allows_tac);
-
-        // Is this a new argument, or values from a previous option?
-        let mut ret = if arg_os.starts_with(b"--") {
-            debugln!("Parser::is_new_arg: -- found");
-            if arg_os.len_() == 2 && !arg_allows_tac {
-                return true; // We have to return true so override everything else
-            } else if arg_allows_tac {
-                return false;
-            }
-            true
-        } else if arg_os.starts_with(b"-") {
-            debugln!("Parser::is_new_arg: - found");
-            // a singe '-' by itself is a value and typically means "stdin" on unix systems
-            !(arg_os.len_() == 1)
-        } else {
-            debugln!("Parser::is_new_arg: probably value");
-            false
-        };
-
-        ret = ret && !arg_allows_tac;
-
-        debugln!("Parser::is_new_arg: starts_new_arg={:?}", ret);
-        ret
-    }
-
-    // The actual parsing function
-    #[cfg_attr(feature = "lints", allow(while_let_on_iterator, collapsible_if))]
-    pub fn get_matches_with<I, T>(&mut self,
-                                  matcher: &mut ArgMatcher<'a>,
-                                  it: &mut Peekable<I>)
-                                  -> ClapResult<()>
-        where I: Iterator<Item = T>,
-              T: Into<OsString> + Clone
-    {
-        debugln!("Parser::get_matches_with;");
-        // Verify all positional assertions pass
-        debug_assert!(self.app_debug_asserts());
-        if self.positionals
-               .values()
-               .any(|a| {
-                        a.b.is_set(ArgSettings::Multiple) &&
-                        (a.index as usize != self.positionals.len())
-                    }) &&
-           self.positionals
-               .values()
-               .last()
-               .map_or(false, |p| !p.is_set(ArgSettings::Last)) {
-            self.settings.set(AS::LowIndexMultiplePositional);
-        }
-        let has_args = self.has_args();
-
-        // Next we create the `--help` and `--version` arguments and add them if
-        // necessary
-        self.create_help_and_version();
-
-        let mut subcmd_name: Option<String> = None;
-        let mut needs_val_of: ParseResult<'a> = ParseResult::NotFound;
-        let mut pos_counter = 1;
-        while let Some(arg) = it.next() {
-            let arg_os = arg.into();
-            debugln!("Parser::get_matches_with: Begin parsing '{:?}' ({:?})",
-                     arg_os,
-                     &*arg_os.as_bytes());
-
-            self.unset(AS::ValidNegNumFound);
-            // Is this a new argument, or values from a previous option?
-            let starts_new_arg = self.is_new_arg(&arg_os, needs_val_of);
-            if arg_os.starts_with(b"--") && arg_os.len_() == 2 && starts_new_arg {
-                debugln!("Parser::get_matches_with: setting TrailingVals=true");
-                self.set(AS::TrailingValues);
-                continue;
-            }
-
-            // Has the user already passed '--'? Meaning only positional args follow
-            if !self.is_set(AS::TrailingValues) {
-                // Does the arg match a subcommand name, or any of it's aliases (if defined)
-                {
-                    let (is_match, sc_name) = self.possible_subcommand(&arg_os);
-                    debugln!("Parser::get_matches_with: possible_sc={:?}, sc={:?}",
-                             is_match,
-                             sc_name);
-                    if is_match {
-                        let sc_name = sc_name.expect(INTERNAL_ERROR_MSG);
-                        if sc_name == "help" && self.is_set(AS::NeedsSubcommandHelp) {
-                            try!(self.parse_help_subcommand(it));
-                        }
-                        subcmd_name = Some(sc_name.to_owned());
-                        break;
-                    }
-                }
-
-                if !starts_new_arg {
-                    match needs_val_of {
-                        ParseResult::Opt(name) => {
-                            // Check to see if parsing a value from a previous arg
-                            let arg = self.opts
-                                .iter()
-                                .find(|o| o.b.name == name)
-                                .expect(INTERNAL_ERROR_MSG);
-                            // get the OptBuilder so we can check the settings
-                            needs_val_of = try!(self.add_val_to_arg(arg, &arg_os, matcher));
-                            // get the next value from the iterator
-                            continue;
-                        }
-                        _ => (),
-                    }
-                } else {
-                    if arg_os.starts_with(b"--") {
-                        needs_val_of = try!(self.parse_long_arg(matcher, &arg_os));
-                        debugln!("Parser:get_matches_with: After parse_long_arg {:?}",
-                                 needs_val_of);
-                        match needs_val_of {
-                            ParseResult::Flag |
-                            ParseResult::Opt(..) |
-                            ParseResult::ValuesDone => continue,
-                            _ => (),
-                        }
-                    } else if arg_os.starts_with(b"-") && arg_os.len_() != 1 {
-                        // Try to parse short args like normal, if AllowLeadingHyphen or
-                        // AllowNegativeNumbers is set, parse_short_arg will *not* throw
-                        // an error, and instead return Ok(None)
-                        needs_val_of = try!(self.parse_short_arg(matcher, &arg_os));
-                        // If it's None, we then check if one of those two AppSettings was set
-                        debugln!("Parser:get_matches_with: After parse_short_arg {:?}",
-                                 needs_val_of);
-                        match needs_val_of {
-                            ParseResult::MaybeNegNum => {
-                                if !(arg_os.to_string_lossy().parse::<i64>().is_ok() ||
-                                     arg_os.to_string_lossy().parse::<f64>().is_ok()) {
-                                    return Err(Error::unknown_argument(&*arg_os.to_string_lossy(),
-                                        "",
-                                        &*usage::create_error_usage(self, matcher, None),
-                                        self.color()));
-                                }
-                            }
-                            ParseResult::Opt(..) |
-                            ParseResult::Flag |
-                            ParseResult::ValuesDone => continue,
-                            _ => (),
-                        }
-                    }
-                }
-
-                if !(self.is_set(AS::ArgsNegateSubcommands) && self.is_set(AS::ValidArgFound)) &&
-                   !self.is_set(AS::InferSubcommands) {
-                    if let Some(cdate) = suggestions::did_you_mean(&*arg_os.to_string_lossy(),
-                                                                   sc_names!(self)) {
-                        return Err(Error::invalid_subcommand(arg_os
-                                                                 .to_string_lossy()
-                                                                 .into_owned(),
-                                                             cdate,
-                                                             self.meta
-                                                                 .bin_name
-                                                                 .as_ref()
-                                                                 .unwrap_or(&self.meta.name),
-                                                             &*usage::create_error_usage(self,
-                                                                                         matcher,
-                                                                                         None),
-                                                             self.color()));
-                    }
-                }
-            }
-
-            let low_index_mults = self.is_set(AS::LowIndexMultiplePositional) &&
-                                  pos_counter == (self.positionals.len() - 1);
-            let missing_pos = self.is_set(AS::AllowMissingPositional) &&
-                              pos_counter == (self.positionals.len() - 1);
-            debugln!("Parser::get_matches_with: Positional counter...{}",
-                     pos_counter);
-            debugln!("Parser::get_matches_with: Low index multiples...{:?}",
-                     low_index_mults);
-            if low_index_mults || missing_pos {
-                if let Some(na) = it.peek() {
-                    let n = (*na).clone().into();
-                    needs_val_of = if needs_val_of != ParseResult::ValuesDone {
-                        if let Some(p) = self.positionals.get(pos_counter) {
-                            ParseResult::Pos(p.b.name)
-                        } else {
-                            ParseResult::ValuesDone
-                        }
-                    } else {
-                        ParseResult::ValuesDone
-                    };
-                    let sc_match = {
-                        self.possible_subcommand(&n).0
-                    };
-                    if self.is_new_arg(&n, needs_val_of) || sc_match ||
-                       suggestions::did_you_mean(&n.to_string_lossy(), sc_names!(self)).is_some() {
-                        debugln!("Parser::get_matches_with: Bumping the positional counter...");
-                        pos_counter += 1;
-                    }
-                } else {
-                    debugln!("Parser::get_matches_with: Bumping the positional counter...");
-                    pos_counter += 1;
-                }
-            } else if self.is_set(AS::ContainsLast) && self.is_set(AS::TrailingValues) {
-                // Came to -- and one postional has .last(true) set, so we go immediately
-                // to the last (highest index) positional
-                debugln!("Parser::get_matches_with: .last(true) and --, setting last pos");
-                pos_counter = self.positionals.len();
-            }
-            if let Some(p) = self.positionals.get(pos_counter) {
-                if p.is_set(ArgSettings::Last) && !self.is_set(AS::TrailingValues) {
-                    return Err(Error::unknown_argument(&*arg_os.to_string_lossy(),
-                                                       "",
-                                                       &*usage::create_error_usage(self,
-                                                                                   matcher,
-                                                                                   None),
-                                                       self.color()));
-                }
-                parse_positional!(self, p, arg_os, pos_counter, matcher);
-                self.settings.set(AS::ValidArgFound);
-            } else if self.is_set(AS::AllowExternalSubcommands) {
-                // Get external subcommand name
-                let sc_name = match arg_os.to_str() {
-                    Some(s) => s.to_string(),
-                    None => {
-                        if !self.is_set(AS::StrictUtf8) {
-                            return Err(Error::invalid_utf8(&*usage::create_error_usage(self,
-                                                                                       matcher,
-                                                                                       None),
-                                                           self.color()));
-                        }
-                        arg_os.to_string_lossy().into_owned()
-                    }
-                };
-
-                // Collect the external subcommand args
-                let mut sc_m = ArgMatcher::new();
-                while let Some(v) = it.next() {
-                    let a = v.into();
-                    if a.to_str().is_none() && !self.is_set(AS::StrictUtf8) {
-                        return Err(Error::invalid_utf8(&*usage::create_error_usage(self,
-                                                                                   matcher,
-                                                                                   None),
-                                                       self.color()));
-                    }
-                    sc_m.add_val_to("", &a);
-                }
-
-                matcher.subcommand(SubCommand {
-                                       name: sc_name,
-                                       matches: sc_m.into(),
-                                   });
-            } else if !(self.is_set(AS::AllowLeadingHyphen) ||
-                        self.is_set(AS::AllowNegativeNumbers)) &&
-                      !self.is_set(AS::InferSubcommands) {
-                return Err(Error::unknown_argument(&*arg_os.to_string_lossy(),
-                                                   "",
-                                                   &*usage::create_error_usage(self,
-                                                                               matcher,
-                                                                               None),
-                                                   self.color()));
-            } else if !has_args || self.is_set(AS::InferSubcommands) && self.has_subcommands() {
-                if let Some(cdate) = suggestions::did_you_mean(&*arg_os.to_string_lossy(),
-                                                               sc_names!(self)) {
-                    return Err(Error::invalid_subcommand(arg_os.to_string_lossy().into_owned(),
-                                                         cdate,
-                                                         self.meta
-                                                             .bin_name
-                                                             .as_ref()
-                                                             .unwrap_or(&self.meta.name),
-                                                         &*usage::create_error_usage(self,
-                                                                                     matcher,
-                                                                                     None),
-                                                         self.color()));
-                } else {
-                    return Err(Error::unrecognized_subcommand(arg_os
-                                                                  .to_string_lossy()
-                                                                  .into_owned(),
-                                                              self.meta
-                                                                  .bin_name
-                                                                  .as_ref()
-                                                                  .unwrap_or(&self.meta.name),
-                                                              self.color()));
-                }
-            }
-        }
-
-        if let Some(ref pos_sc_name) = subcmd_name {
-            let sc_name = {
-                find_subcmd!(self, pos_sc_name)
-                    .expect(INTERNAL_ERROR_MSG)
-                    .p
-                    .meta
-                    .name
-                    .clone()
-            };
-            try!(self.parse_subcommand(&*sc_name, matcher, it));
-        } else if self.is_set(AS::SubcommandRequired) {
-            let bn = self.meta.bin_name.as_ref().unwrap_or(&self.meta.name);
-            return Err(Error::missing_subcommand(bn,
-                                                 &usage::create_error_usage(self, matcher, None),
-                                                 self.color()));
-        } else if self.is_set(AS::SubcommandRequiredElseHelp) {
-            debugln!("Parser::get_matches_with: SubcommandRequiredElseHelp=true");
-            let mut out = vec![];
-            try!(self.write_help_err(&mut out));
-            return Err(Error {
-                           message: String::from_utf8_lossy(&*out).into_owned(),
-                           kind: ErrorKind::MissingArgumentOrSubcommand,
-                           info: None,
-                       });
-        }
-
-        Validator::new(self).validate(needs_val_of, subcmd_name, matcher)
-    }
-
-
-    fn propogate_help_version(&mut self) {
-        debugln!("Parser::propogate_help_version;");
-        self.create_help_and_version();
-        for sc in &mut self.subcommands {
-            sc.p.propogate_help_version();
-        }
-    }
-
-    fn build_bin_names(&mut self) {
-        debugln!("Parser::build_bin_names;");
-        for sc in &mut self.subcommands {
-            debug!("Parser::build_bin_names:iter: bin_name set...");
-            if sc.p.meta.bin_name.is_none() {
-                sdebugln!("No");
-                let bin_name = format!("{}{}{}",
-                                       self.meta
-                                           .bin_name
-                                           .as_ref()
-                                           .unwrap_or(&self.meta.name.clone()),
-                                       if self.meta.bin_name.is_some() {
-                                           " "
-                                       } else {
-                                           ""
-                                       },
-                                       &*sc.p.meta.name);
-                debugln!("Parser::build_bin_names:iter: Setting bin_name of {} to {}",
-                         self.meta.name,
-                         bin_name);
-                sc.p.meta.bin_name = Some(bin_name);
-            } else {
-                sdebugln!("yes ({:?})", sc.p.meta.bin_name);
-            }
-            debugln!("Parser::build_bin_names:iter: Calling build_bin_names from...{}",
-                     sc.p.meta.name);
-            sc.p.build_bin_names();
-        }
-    }
-
-    fn parse_subcommand<I, T>(&mut self,
-                              sc_name: &str,
-                              matcher: &mut ArgMatcher<'a>,
-                              it: &mut Peekable<I>)
-                              -> ClapResult<()>
-        where I: Iterator<Item = T>,
-              T: Into<OsString> + Clone
-    {
-        use std::fmt::Write;
-        debugln!("Parser::parse_subcommand;");
-        let mut mid_string = String::new();
-        if !self.is_set(AS::SubcommandsNegateReqs) {
-            let mut hs: Vec<&str> = self.required.iter().map(|n| &**n).collect();
-            for k in matcher.arg_names() {
-                hs.push(k);
-            }
-            let reqs = usage::get_required_usage_from(self, &hs, Some(matcher), None, false);
-
-            for s in &reqs {
-                write!(&mut mid_string, " {}", s).expect(INTERNAL_ERROR_MSG);
-            }
-        }
-        mid_string.push_str(" ");
-        if let Some(ref mut sc) = self.subcommands
-               .iter_mut()
-               .find(|s| &s.p.meta.name == &sc_name) {
-            let mut sc_matcher = ArgMatcher::new();
-            // bin_name should be parent's bin_name + [<reqs>] + the sc's name separated by
-            // a space
-            sc.p.meta.usage = Some(format!("{}{}{}",
-                                           self.meta.bin_name.as_ref().unwrap_or(&String::new()),
-                                           if self.meta.bin_name.is_some() {
-                                               &*mid_string
-                                           } else {
-                                               ""
-                                           },
-                                           &*sc.p.meta.name));
-            sc.p.meta.bin_name =
-                Some(format!("{}{}{}",
-                             self.meta.bin_name.as_ref().unwrap_or(&String::new()),
-                             if self.meta.bin_name.is_some() {
-                                 " "
-                             } else {
-                                 ""
-                             },
-                             &*sc.p.meta.name));
-            debugln!("Parser::parse_subcommand: About to parse sc={}",
-                     sc.p.meta.name);
-            debugln!("Parser::parse_subcommand: sc settings={:#?}", sc.p.settings);
-            try!(sc.p.get_matches_with(&mut sc_matcher, it));
-            matcher.subcommand(SubCommand {
-                                   name: sc.p.meta.name.clone(),
-                                   matches: sc_matcher.into(),
-                               });
-        }
-        Ok(())
-    }
-
-    pub fn groups_for_arg(&self, name: &str) -> Option<Vec<&'a str>> {
-        debugln!("Parser::groups_for_arg: name={}", name);
-
-        if self.groups.is_empty() {
-            debugln!("Parser::groups_for_arg: No groups defined");
-            return None;
-        }
-        let mut res = vec![];
-        debugln!("Parser::groups_for_arg: Searching through groups...");
-        for grp in &self.groups {
-            for a in &grp.args {
-                if a == &name {
-                    sdebugln!("\tFound '{}'", grp.name);
-                    res.push(&*grp.name);
-                }
-            }
-        }
-        if res.is_empty() {
-            return None;
-        }
-
-        Some(res)
-    }
-
-    pub fn args_in_group(&self, group: &str) -> Vec<String> {
-        let mut g_vec = vec![];
-        let mut args = vec![];
-
-        for n in &self.groups
-                      .iter()
-                      .find(|g| g.name == group)
-                      .expect(INTERNAL_ERROR_MSG)
-                      .args {
-            if let Some(f) = self.flags.iter().find(|f| &f.b.name == n) {
-                args.push(f.to_string());
-            } else if let Some(f) = self.opts.iter().find(|o| &o.b.name == n) {
-                args.push(f.to_string());
-            } else if let Some(p) = self.positionals.values().find(|p| &p.b.name == n) {
-                args.push(p.b.name.to_owned());
-            } else {
-                g_vec.push(*n);
-            }
-        }
-
-        for av in g_vec.iter().map(|g| self.args_in_group(g)) {
-            args.extend(av);
-        }
-        args.dedup();
-        args.iter().map(ToOwned::to_owned).collect()
-    }
-
-    pub fn arg_names_in_group(&self, group: &str) -> Vec<&'a str> {
-        let mut g_vec = vec![];
-        let mut args = vec![];
-
-        for n in &self.groups
-                      .iter()
-                      .find(|g| g.name == group)
-                      .expect(INTERNAL_ERROR_MSG)
-                      .args {
-            if self.groups.iter().any(|g| &g.name == &*n) {
-                args.extend(self.arg_names_in_group(n));
-                g_vec.push(*n);
-            } else {
-                if !args.contains(n) {
-                    args.push(*n);
-                }
-            }
-        }
-
-        args.iter().map(|s| *s).collect()
-    }
-
-    pub fn create_help_and_version(&mut self) {
-        debugln!("Parser::create_help_and_version;");
-        // name is "hclap_help" because flags are sorted by name
-        if !self.contains_long("help") {
-            debugln!("Parser::create_help_and_version: Building --help");
-            if self.help_short.is_none() && !self.contains_short('h') {
-                self.help_short = Some('h');
-            }
-            let arg = FlagBuilder {
-                b: Base {
-                    name: "hclap_help",
-                    help: self.help_message.or(Some("Prints help information")),
-                    ..Default::default()
-                },
-                s: Switched {
-                    short: self.help_short,
-                    long: Some("help"),
-                    ..Default::default()
-                },
-            };
-            self.flags.push(arg);
-        }
-        if !self.is_set(AS::DisableVersion) && !self.contains_long("version") {
-            debugln!("Parser::create_help_and_version: Building --version");
-            if self.version_short.is_none() && !self.contains_short('V') {
-                self.version_short = Some('V');
-            }
-            // name is "vclap_version" because flags are sorted by name
-            let arg = FlagBuilder {
-                b: Base {
-                    name: "vclap_version",
-                    help: self.version_message.or(Some("Prints version information")),
-                    ..Default::default()
-                },
-                s: Switched {
-                    short: self.version_short,
-                    long: Some("version"),
-                    ..Default::default()
-                },
-            };
-            self.flags.push(arg);
-        }
-        if !self.subcommands.is_empty() && !self.is_set(AS::DisableHelpSubcommand) &&
-           self.is_set(AS::NeedsSubcommandHelp) {
-            debugln!("Parser::create_help_and_version: Building help");
-            self.subcommands
-                .push(App::new("help")
-                          .about("Prints this message or the help of the given subcommand(s)"));
-        }
-    }
-
-    // Retrieves the names of all args the user has supplied thus far, except required ones
-    // because those will be listed in self.required
-    fn check_for_help_and_version_str(&self, arg: &OsStr) -> ClapResult<()> {
-        debugln!("Parser::check_for_help_and_version_str;");
-        debug!("Parser::check_for_help_and_version_str: Checking if --{} is help or version...",
-               arg.to_str().unwrap());
-        if arg == "help" && self.is_set(AS::NeedsLongHelp) {
-            sdebugln!("Help");
-            return Err(self._help(true));
-        }
-        if arg == "version" && self.is_set(AS::NeedsLongVersion) {
-            sdebugln!("Version");
-            return Err(self._version(true));
-        }
-        sdebugln!("Neither");
-
-        Ok(())
-    }
-
-    fn check_for_help_and_version_char(&self, arg: char) -> ClapResult<()> {
-        debugln!("Parser::check_for_help_and_version_char;");
-        debug!("Parser::check_for_help_and_version_char: Checking if -{} is help or version...",
-               arg);
-        if let Some(h) = self.help_short {
-            if arg == h && self.is_set(AS::NeedsLongHelp) {
-                sdebugln!("Help");
-                return Err(self._help(false));
-            }
-        }
-        if let Some(v) = self.version_short {
-            if arg == v && self.is_set(AS::NeedsLongVersion) {
-                sdebugln!("Version");
-                return Err(self._version(false));
-            }
-        }
-        sdebugln!("Neither");
-        Ok(())
-    }
-
-    fn use_long_help(&self) -> bool {
-        let ul = self.flags.iter().any(|f| f.b.long_help.is_some()) ||
-                 self.opts.iter().any(|o| o.b.long_help.is_some()) ||
-                 self.positionals.values().any(|p| p.b.long_help.is_some()) ||
-                 self.subcommands
-                     .iter()
-                     .any(|s| s.p.meta.long_about.is_some());
-        debugln!("Parser::use_long_help: ret={:?}", ul);
-        ul
-    }
-
-    fn _help(&self, mut use_long: bool) -> Error {
-        debugln!("Parser::_help: use_long={:?}", use_long);
-        use_long = use_long && self.use_long_help();
-        let mut buf = vec![];
-        match Help::write_parser_help(&mut buf, self, use_long) {
-            Err(e) => return e,
-            _ => (),
-        }
-        Error {
-            message: unsafe { String::from_utf8_unchecked(buf) },
-            kind: ErrorKind::HelpDisplayed,
-            info: None,
-        }
-    }
-
-    fn _version(&self, use_long: bool) -> Error {
-        debugln!("Parser::_version: ");
-        let out = io::stdout();
-        let mut buf_w = BufWriter::new(out.lock());
-        match self.print_version(&mut buf_w, use_long) {
-            Err(e) => return e,
-            _ => (),
-        }
-        Error {
-            message: String::new(),
-            kind: ErrorKind::VersionDisplayed,
-            info: None,
-        }
-    }
-
-    fn parse_long_arg(&mut self,
-                      matcher: &mut ArgMatcher<'a>,
-                      full_arg: &OsStr)
-                      -> ClapResult<ParseResult<'a>> {
-        // maybe here lifetime should be 'a
-        debugln!("Parser::parse_long_arg;");
-        let mut val = None;
-        debug!("Parser::parse_long_arg: Does it contain '='...");
-        let arg = if full_arg.contains_byte(b'=') {
-            let (p0, p1) = full_arg.trim_left_matches(b'-').split_at_byte(b'=');
-            sdebugln!("Yes '{:?}'", p1);
-            val = Some(p1);
-            p0
-        } else {
-            sdebugln!("No");
-            full_arg.trim_left_matches(b'-')
-        };
-
-        if let Some(opt) = find_opt_by_long!(@os self, &arg) {
-            debugln!("Parser::parse_long_arg: Found valid opt '{}'",
-                     opt.to_string());
-            self.settings.set(AS::ValidArgFound);
-            let ret = try!(self.parse_opt(val, opt, val.is_some(), matcher));
-            if self.cache.map_or(true, |name| name != opt.b.name) {
-                arg_post_processing!(self, opt, matcher);
-                self.cache = Some(opt.b.name);
-            }
-
-            return Ok(ret);
-        } else if let Some(flag) = find_flag_by_long!(@os self, &arg) {
-            debugln!("Parser::parse_long_arg: Found valid flag '{}'",
-                     flag.to_string());
-            self.settings.set(AS::ValidArgFound);
-            // Only flags could be help or version, and we need to check the raw long
-            // so this is the first point to check
-            try!(self.check_for_help_and_version_str(arg));
-
-            try!(self.parse_flag(flag, matcher));
-
-            // Handle conflicts, requirements, etc.
-            // if self.cache.map_or(true, |name| name != flag.b.name) {
-            arg_post_processing!(self, flag, matcher);
-            // self.cache = Some(flag.b.name);
-            // }
-
-            return Ok(ParseResult::Flag);
-        } else if self.is_set(AS::AllowLeadingHyphen) {
-            return Ok(ParseResult::MaybeHyphenValue);
-        } else if self.is_set(AS::ValidNegNumFound) {
-            return Ok(ParseResult::MaybeNegNum);
-        }
-
-        debugln!("Parser::parse_long_arg: Didn't match anything");
-        self.did_you_mean_error(arg.to_str().expect(INVALID_UTF8), matcher)
-            .map(|_| ParseResult::NotFound)
-    }
-
-    #[cfg_attr(feature = "lints", allow(len_zero))]
-    fn parse_short_arg(&mut self,
-                       matcher: &mut ArgMatcher<'a>,
-                       full_arg: &OsStr)
-                       -> ClapResult<ParseResult<'a>> {
-        debugln!("Parser::parse_short_arg: full_arg={:?}", full_arg);
-        let arg_os = full_arg.trim_left_matches(b'-');
-        let arg = arg_os.to_string_lossy();
-
-        // If AllowLeadingHyphen is set, we want to ensure `-val` gets parsed as `-val` and not
-        // `-v` `-a` `-l` assuming `v` `a` and `l` are all, or mostly, valid shorts.
-        if self.is_set(AS::AllowLeadingHyphen) {
-            if arg.chars().any(|c| !self.contains_short(c)) {
-                debugln!("Parser::parse_short_arg: LeadingHyphenAllowed yet -{} isn't valid",
-                         arg);
-                return Ok(ParseResult::MaybeHyphenValue);
-            }
-        } else if self.is_set(AS::ValidNegNumFound) {
-            // TODO: Add docs about having AllowNegativeNumbers and `-2` as a valid short
-            // May be better to move this to *after* not finding a valid flag/opt?
-            debugln!("Parser::parse_short_arg: Valid negative num...");
-            return Ok(ParseResult::MaybeNegNum);
-        }
-
-        let mut ret = ParseResult::NotFound;
-        for c in arg.chars() {
-            debugln!("Parser::parse_short_arg:iter:{}", c);
-            // Check for matching short options, and return the name if there is no trailing
-            // concatenated value: -oval
-            // Option: -o
-            // Value: val
-            if let Some(opt) = find_opt_by_short!(self, c) {
-                debugln!("Parser::parse_short_arg:iter:{}: Found valid opt", c);
-                self.settings.set(AS::ValidArgFound);
-                // Check for trailing concatenated value
-                let p: Vec<_> = arg.splitn(2, c).collect();
-                debugln!("Parser::parse_short_arg:iter:{}: p[0]={:?}, p[1]={:?}",
-                         c,
-                         p[0].as_bytes(),
-                         p[1].as_bytes());
-                let i = p[0].as_bytes().len() + 1;
-                let val = if p[1].as_bytes().len() > 0 {
-                    debugln!("Parser::parse_short_arg:iter:{}: val={:?} (bytes), val={:?} (ascii)",
-                             c,
-                             arg_os.split_at(i).1.as_bytes(),
-                             arg_os.split_at(i).1);
-                    Some(arg_os.split_at(i).1)
-                } else {
-                    None
-                };
-
-                // Default to "we're expecting a value later"
-                let ret = try!(self.parse_opt(val, opt, false, matcher));
-
-                if self.cache.map_or(true, |name| name != opt.b.name) {
-                    arg_post_processing!(self, opt, matcher);
-                    self.cache = Some(opt.b.name);
-                }
-
-                return Ok(ret);
-            } else if let Some(flag) = find_flag_by_short!(self, c) {
-                debugln!("Parser::parse_short_arg:iter:{}: Found valid flag", c);
-                self.settings.set(AS::ValidArgFound);
-                // Only flags can be help or version
-                try!(self.check_for_help_and_version_char(c));
-                ret = try!(self.parse_flag(flag, matcher));
-
-                // Handle conflicts, requirements, overrides, etc.
-                // Must be called here due to mutablilty
-                if self.cache.map_or(true, |name| name != flag.b.name) {
-                    arg_post_processing!(self, flag, matcher);
-                    self.cache = Some(flag.b.name);
-                }
-            } else {
-                let arg = format!("-{}", c);
-                return Err(Error::unknown_argument(&*arg,
-                                                   "",
-                                                   &*usage::create_error_usage(self,
-                                                                               matcher,
-                                                                               None),
-                                                   self.color()));
-            }
-        }
-        Ok(ret)
-    }
-
-    fn parse_opt(&self,
-                 val: Option<&OsStr>,
-                 opt: &OptBuilder<'a, 'b>,
-                 had_eq: bool,
-                 matcher: &mut ArgMatcher<'a>)
-                 -> ClapResult<ParseResult<'a>> {
-        debugln!("Parser::parse_opt; opt={}, val={:?}", opt.b.name, val);
-        debugln!("Parser::parse_opt; opt.settings={:?}", opt.b.settings);
-        let mut has_eq = false;
-
-        debug!("Parser::parse_opt; Checking for val...");
-        if let Some(fv) = val {
-            has_eq = fv.starts_with(&[b'=']) || had_eq;
-            let v = fv.trim_left_matches(b'=');
-            if !opt.is_set(ArgSettings::EmptyValues) &&
-               (v.len_() == 0 || (opt.is_set(ArgSettings::RequireEquals) && !has_eq)) {
-                sdebugln!("Found Empty - Error");
-                return Err(Error::empty_value(opt,
-                                              &*usage::create_error_usage(self, matcher, None),
-                                              self.color()));
-            }
-            sdebugln!("Found - {:?}, len: {}", v, v.len_());
-            debugln!("Parser::parse_opt: {:?} contains '='...{:?}",
-                     fv,
-                     fv.starts_with(&[b'=']));
-            try!(self.add_val_to_arg(opt, v, matcher));
-        } else if opt.is_set(ArgSettings::RequireEquals) && !opt.is_set(ArgSettings::EmptyValues) {
-            sdebugln!("None, but requires equals...Error");
-            return Err(Error::empty_value(opt,
-                                          &*usage::create_error_usage(self, matcher, None),
-                                          self.color()));
-
-        } else {
-            sdebugln!("None");
-        }
-
-        matcher.inc_occurrence_of(opt.b.name);
-        // Increment or create the group "args"
-        self.groups_for_arg(opt.b.name)
-            .and_then(|vec| Some(matcher.inc_occurrences_of(&*vec)));
-
-        if val.is_none() ||
-           !has_eq &&
-           (opt.is_set(ArgSettings::Multiple) && !opt.is_set(ArgSettings::RequireDelimiter) &&
-            matcher.needs_more_vals(opt)) {
-            debugln!("Parser::parse_opt: More arg vals required...");
-            return Ok(ParseResult::Opt(opt.b.name));
-        }
-        debugln!("Parser::parse_opt: More arg vals not required...");
-        Ok(ParseResult::ValuesDone)
-    }
-
-    fn add_val_to_arg<A>(&self,
-                         arg: &A,
-                         val: &OsStr,
-                         matcher: &mut ArgMatcher<'a>)
-                         -> ClapResult<ParseResult<'a>>
-        where A: AnyArg<'a, 'b> + Display
-    {
-        debugln!("Parser::add_val_to_arg; arg={}, val={:?}", arg.name(), val);
-        let ret;
-        debugln!("Parser::add_val_to_arg; trailing_vals={:?}, DontDelimTrailingVals={:?}",
-                 self.is_set(AS::TrailingValues),
-                 self.is_set(AS::DontDelimitTrailingValues));
-        if !(self.is_set(AS::TrailingValues) && self.is_set(AS::DontDelimitTrailingValues)) {
-            if let Some(delim) = arg.val_delim() {
-                let mut iret = ParseResult::ValuesDone;
-                if val.is_empty_() {
-                    iret = try!(self.add_single_val_to_arg(arg, val, matcher));
-                } else {
-                    for v in val.split(delim as u32 as u8) {
-                        iret = try!(self.add_single_val_to_arg(arg, v, matcher));
-                    }
-                    // If there was a delimiter used, we're not looking for more values
-                    if val.contains_byte(delim as u32 as u8) ||
-                       arg.is_set(ArgSettings::RequireDelimiter) {
-                        iret = ParseResult::ValuesDone;
-                    }
-                }
-                ret = Ok(iret);
-            } else {
-                ret = self.add_single_val_to_arg(arg, val, matcher);
-            }
-        } else {
-            ret = self.add_single_val_to_arg(arg, val, matcher);
-        }
-        ret
-    }
-
-    fn add_single_val_to_arg<A>(&self,
-                                arg: &A,
-                                v: &OsStr,
-                                matcher: &mut ArgMatcher<'a>)
-                                -> ClapResult<ParseResult<'a>>
-        where A: AnyArg<'a, 'b> + Display
-    {
-        debugln!("Parser::add_single_val_to_arg;");
-        debugln!("Parser::add_single_val_to_arg: adding val...{:?}", v);
-        if let Some(t) = arg.val_terminator() {
-            if t == v {
-                return Ok(ParseResult::ValuesDone);
-            }
-        }
-        matcher.add_val_to(arg.name(), v);
-
-        // Increment or create the group "args"
-        if let Some(grps) = self.groups_for_arg(arg.name()) {
-            for grp in grps {
-                matcher.add_val_to(&*grp, v);
-            }
-        }
-
-        if matcher.needs_more_vals(arg) {
-            return Ok(ParseResult::Opt(arg.name()));
-        }
-        Ok(ParseResult::ValuesDone)
-    }
-
-
-    fn parse_flag(&self,
-                  flag: &FlagBuilder<'a, 'b>,
-                  matcher: &mut ArgMatcher<'a>)
-                  -> ClapResult<ParseResult<'a>> {
-        debugln!("Parser::parse_flag;");
-
-        matcher.inc_occurrence_of(flag.b.name);
-        // Increment or create the group "args"
-        self.groups_for_arg(flag.b.name)
-            .and_then(|vec| Some(matcher.inc_occurrences_of(&*vec)));
-
-        Ok(ParseResult::Flag)
-    }
-
-    fn did_you_mean_error(&self, arg: &str, matcher: &mut ArgMatcher<'a>) -> ClapResult<()> {
-        // Didn't match a flag or option...maybe it was a typo and close to one
-        let suffix =
-            suggestions::did_you_mean_suffix(arg,
-                                             longs!(self),
-                                             suggestions::DidYouMeanMessageStyle::LongFlag);
-
-        // Add the arg to the matches to build a proper usage string
-        if let Some(name) = suffix.1 {
-            if let Some(opt) = find_opt_by_long!(self, &name) {
-                self.groups_for_arg(&*opt.b.name)
-                    .and_then(|grps| Some(matcher.inc_occurrences_of(&*grps)));
-                matcher.insert(&*opt.b.name);
-            } else if let Some(flg) = find_flag_by_long!(self, &name) {
-                self.groups_for_arg(&*flg.b.name)
-                    .and_then(|grps| Some(matcher.inc_occurrences_of(&*grps)));
-                matcher.insert(&*flg.b.name);
-            }
-        }
-
-        let used_arg = format!("--{}", arg);
-        Err(Error::unknown_argument(&*used_arg,
-                                    &*suffix.0,
-                                    &*usage::create_error_usage(self, matcher, None),
-                                    self.color()))
-    }
-
-    // Prints the version to the user and exits if quit=true
-    fn print_version<W: Write>(&self, w: &mut W, use_long: bool) -> ClapResult<()> {
-        try!(self.write_version(w, use_long));
-        w.flush().map_err(Error::from)
-    }
-
-    pub fn write_version<W: Write>(&self, w: &mut W, use_long: bool) -> io::Result<()> {
-        let ver = if use_long {
-            self.meta
-                .long_version
-                .unwrap_or(self.meta.version.unwrap_or("".into()))
-        } else {
-            self.meta
-                .version
-                .unwrap_or(self.meta.long_version.unwrap_or("".into()))
-        };
-        if let Some(bn) = self.meta.bin_name.as_ref() {
-            if bn.contains(' ') {
-                // Incase we're dealing with subcommands i.e. git mv is translated to git-mv
-                write!(w, "{} {}", bn.replace(" ", "-"), ver)
-            } else {
-                write!(w, "{} {}", &self.meta.name[..], ver)
-            }
-        } else {
-            write!(w, "{} {}", &self.meta.name[..], ver)
-        }
-    }
-
-    pub fn print_help(&self) -> ClapResult<()> {
-        let out = io::stdout();
-        let mut buf_w = BufWriter::new(out.lock());
-        self.write_help(&mut buf_w)
-    }
-
-    pub fn write_help<W: Write>(&self, w: &mut W) -> ClapResult<()> {
-        Help::write_parser_help(w, self, false)
-    }
-
-    pub fn write_long_help<W: Write>(&self, w: &mut W) -> ClapResult<()> {
-        Help::write_parser_help(w, self, true)
-    }
-
-    pub fn write_help_err<W: Write>(&self, w: &mut W) -> ClapResult<()> {
-        Help::write_parser_help_to_stderr(w, self)
-    }
-
-    pub fn add_defaults(&mut self, matcher: &mut ArgMatcher<'a>) -> ClapResult<()> {
-        macro_rules! add_val {
-            (@default $_self:ident, $a:ident, $m:ident) => {
-                if let Some(ref val) = $a.v.default_val {
-                    if $m.get($a.b.name).is_none() {
-                        try!($_self.add_val_to_arg($a, OsStr::new(val), $m));
-
-                        if $_self.cache.map_or(true, |name| name != $a.name()) {
-                            arg_post_processing!($_self, $a, $m);
-                            $_self.cache = Some($a.name());
-                        }
-                    }
-                }
-            };
-            ($_self:ident, $a:ident, $m:ident) => {
-                if let Some(ref vm) = $a.v.default_vals_ifs {
-                    let mut done = false;
-                    if $m.get($a.b.name).is_none() {
-                        for &(arg, val, default) in vm.values() {
-                            let add = if let Some(a) = $m.get(arg) {
-                                if let Some(v) = val {
-                                    a.vals.iter().any(|value| v == value)
-                                } else {
-                                    true
-                                }
-                            } else {
-                                false
-                            };
-                            if add {
-                                try!($_self.add_val_to_arg($a, OsStr::new(default), $m));
-                                if $_self.cache.map_or(true, |name| name != $a.name()) {
-                                    arg_post_processing!($_self, $a, $m);
-                                    $_self.cache = Some($a.name());
-                                }
-                                done = true;
-                                break;
-                            }
-                        }
-                    }
-
-                    if done {
-                        continue; // outer loop (outside macro)
-                    }
-                }
-                add_val!(@default $_self, $a, $m)
-            };
-        }
-
-        for o in &self.opts {
-            add_val!(self, o, matcher);
-        }
-        for p in self.positionals.values() {
-            add_val!(self, p, matcher);
-        }
-        Ok(())
-    }
-
-    pub fn flags(&self) -> Iter<FlagBuilder<'a, 'b>> { self.flags.iter() }
-
-    pub fn opts(&self) -> Iter<OptBuilder<'a, 'b>> { self.opts.iter() }
-
-    pub fn positionals(&self) -> vec_map::Values<PosBuilder<'a, 'b>> { self.positionals.values() }
-
-    pub fn subcommands(&self) -> Iter<App> { self.subcommands.iter() }
-
-    // Should we color the output? None=determined by output location, true=yes, false=no
-    #[doc(hidden)]
-    pub fn color(&self) -> ColorWhen {
-        debugln!("Parser::color;");
-        debug!("Parser::color: Color setting...");
-        if self.is_set(AS::ColorNever) {
-            sdebugln!("Never");
-            ColorWhen::Never
-        } else if self.is_set(AS::ColorAlways) {
-            sdebugln!("Always");
-            ColorWhen::Always
-        } else {
-            sdebugln!("Auto");
-            ColorWhen::Auto
-        }
-    }
-
-    pub fn find_any_arg(&self, name: &str) -> Option<&AnyArg> {
-        if let Some(f) = find_by_name!(self, &name, flags, iter) {
-            return Some(f);
-        }
-        if let Some(o) = find_by_name!(self, &name, opts, iter) {
-            return Some(o);
-        }
-        if let Some(p) = find_by_name!(self, &name, positionals, values) {
-            return Some(p);
-        }
-        None
-    }
-
-    // Only used for completion scripts due to bin_name messiness
-    #[cfg_attr(feature = "lints", allow(block_in_if_condition_stmt))]
-    pub fn find_subcommand(&'b self, sc: &str) -> Option<&'b App<'a, 'b>> {
-        debugln!("Parser::find_subcommand: sc={}", sc);
-        debugln!("Parser::find_subcommand: Currently in Parser...{}",
-                 self.meta.bin_name.as_ref().unwrap());
-        for s in self.subcommands.iter() {
-            if s.p.meta.bin_name.as_ref().unwrap_or(&String::new()) == sc ||
-               (s.p.meta.aliases.is_some() &&
-                s.p
-                    .meta
-                    .aliases
-                    .as_ref()
-                    .unwrap()
-                    .iter()
-                    .any(|&(s, _)| {
-                             s == sc.split(' ').rev().next().expect(INTERNAL_ERROR_MSG)
-                         })) {
-                return Some(s);
-            }
-            if let Some(app) = s.p.find_subcommand(sc) {
-                return Some(app);
-            }
-        }
-        None
-    }
-
-    #[inline]
-    fn contains_long(&self, l: &str) -> bool { longs!(self).any(|al| al == &l) }
-
-    #[inline]
-    fn contains_short(&self, s: char) -> bool { shorts!(self).any(|arg_s| arg_s == &s) }
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/app/settings.rs
+++ /dev/null
@@ -1,987 +0,0 @@
-// Std
-use std::ascii::AsciiExt;
-use std::str::FromStr;
-use std::ops::BitOr;
-
-bitflags! {
-    flags Flags: u64 {
-        const SC_NEGATE_REQS       = 1 << 0,
-        const SC_REQUIRED          = 1 << 1,
-        const A_REQUIRED_ELSE_HELP = 1 << 2,
-        const GLOBAL_VERSION       = 1 << 3,
-        const VERSIONLESS_SC       = 1 << 4,
-        const UNIFIED_HELP         = 1 << 5,
-        const WAIT_ON_ERROR        = 1 << 6,
-        const SC_REQUIRED_ELSE_HELP= 1 << 7,
-        const NEEDS_LONG_HELP      = 1 << 8,
-        const NEEDS_LONG_VERSION   = 1 << 9,
-        const NEEDS_SC_HELP        = 1 << 10,
-        const DISABLE_VERSION      = 1 << 11,
-        const HIDDEN               = 1 << 12,
-        const TRAILING_VARARG      = 1 << 13,
-        const NO_BIN_NAME          = 1 << 14,
-        const ALLOW_UNK_SC         = 1 << 15,
-        const UTF8_STRICT          = 1 << 16,
-        const UTF8_NONE            = 1 << 17,
-        const LEADING_HYPHEN       = 1 << 18,
-        const NO_POS_VALUES        = 1 << 19,
-        const NEXT_LINE_HELP       = 1 << 20,
-        const DERIVE_DISP_ORDER    = 1 << 21,
-        const COLORED_HELP         = 1 << 22,
-        const COLOR_ALWAYS         = 1 << 23,
-        const COLOR_AUTO           = 1 << 24,
-        const COLOR_NEVER          = 1 << 25,
-        const DONT_DELIM_TRAIL     = 1 << 26,
-        const ALLOW_NEG_NUMS       = 1 << 27,
-        const LOW_INDEX_MUL_POS    = 1 << 28,
-        const DISABLE_HELP_SC      = 1 << 29,
-        const DONT_COLLAPSE_ARGS   = 1 << 30,
-        const ARGS_NEGATE_SCS      = 1 << 31, 
-        const PROPAGATE_VALS_DOWN  = 1 << 32,
-        const ALLOW_MISSING_POS    = 1 << 33,
-        const TRAILING_VALUES      = 1 << 34,
-        const VALID_NEG_NUM_FOUND  = 1 << 35,
-        const PROPOGATED           = 1 << 36,
-        const VALID_ARG_FOUND      = 1 << 37,
-        const INFER_SUBCOMMANDS    = 1 << 38,
-        const CONTAINS_LAST        = 1 << 39,
-    }
-}
-
-#[doc(hidden)]
-#[derive(Debug, Copy, Clone, PartialEq)]
-pub struct AppFlags(Flags);
-
-impl BitOr for AppFlags {
-    type Output = Self;
-    fn bitor(self, rhs: Self) -> Self { AppFlags(self.0 | rhs.0) }
-}
-
-impl Default for AppFlags {
-    fn default() -> Self {
-        AppFlags(NEEDS_LONG_VERSION | NEEDS_LONG_HELP | NEEDS_SC_HELP | UTF8_NONE | COLOR_AUTO)
-    }
-}
-
-impl AppFlags {
-    pub fn new() -> Self { AppFlags::default() }
-
-    impl_settings! { AppSettings,
-        ArgRequiredElseHelp => A_REQUIRED_ELSE_HELP,
-        ArgsNegateSubcommands => ARGS_NEGATE_SCS,
-        AllowExternalSubcommands => ALLOW_UNK_SC,
-        AllowInvalidUtf8 => UTF8_NONE,
-        AllowLeadingHyphen => LEADING_HYPHEN,
-        AllowNegativeNumbers => ALLOW_NEG_NUMS,
-        AllowMissingPositional => ALLOW_MISSING_POS,
-        ColoredHelp => COLORED_HELP,
-        ColorAlways => COLOR_ALWAYS,
-        ColorAuto => COLOR_AUTO,
-        ColorNever => COLOR_NEVER,
-        DontDelimitTrailingValues => DONT_DELIM_TRAIL,
-        DontCollapseArgsInUsage => DONT_COLLAPSE_ARGS,
-        DeriveDisplayOrder => DERIVE_DISP_ORDER,
-        DisableHelpSubcommand => DISABLE_HELP_SC,
-        DisableVersion => DISABLE_VERSION,
-        GlobalVersion => GLOBAL_VERSION,
-        HidePossibleValuesInHelp => NO_POS_VALUES,
-        Hidden => HIDDEN,
-        LowIndexMultiplePositional => LOW_INDEX_MUL_POS,
-        NeedsLongHelp => NEEDS_LONG_HELP,
-        NeedsLongVersion => NEEDS_LONG_VERSION,
-        NeedsSubcommandHelp => NEEDS_SC_HELP,
-        NoBinaryName => NO_BIN_NAME,
-        PropagateGlobalValuesDown=> PROPAGATE_VALS_DOWN,
-        StrictUtf8 => UTF8_STRICT,
-        SubcommandsNegateReqs => SC_NEGATE_REQS,
-        SubcommandRequired => SC_REQUIRED,
-        SubcommandRequiredElseHelp => SC_REQUIRED_ELSE_HELP,
-        TrailingVarArg => TRAILING_VARARG,
-        UnifiedHelpMessage => UNIFIED_HELP,
-        NextLineHelp => NEXT_LINE_HELP,
-        VersionlessSubcommands => VERSIONLESS_SC,
-        WaitOnError => WAIT_ON_ERROR,
-        TrailingValues => TRAILING_VALUES,
-        ValidNegNumFound => VALID_NEG_NUM_FOUND,
-        Propogated => PROPOGATED,
-        ValidArgFound => VALID_ARG_FOUND,
-        InferSubcommands => INFER_SUBCOMMANDS,
-        ContainsLast => CONTAINS_LAST
-    }
-}
-
-/// Application level settings, which affect how [`App`] operates
-///
-/// **NOTE:** When these settings are used, they apply only to current command, and are *not*
-/// propagated down or up through child or parent subcommands
-///
-/// [`App`]: ./struct.App.html
-#[derive(Debug, PartialEq, Copy, Clone)]
-pub enum AppSettings {
-    /// Specifies that any invalid UTF-8 code points should *not* be treated as an error.
-    /// This is the default behavior of `clap`.
-    ///
-    /// **NOTE:** Using argument values with invalid UTF-8 code points requires using
-    /// [`ArgMatches::os_value_of`], [`ArgMatches::os_values_of`], [`ArgMatches::lossy_value_of`],
-    /// or [`ArgMatches::lossy_values_of`] for those particular arguments which may contain invalid
-    /// UTF-8 values
-    ///
-    /// **NOTE:** This rule only applies to  argument values, as flags, options, and
-    /// [`SubCommand`]s themselves only allow valid UTF-8 code points.
-    ///
-    /// # Platform Specific
-    ///
-    /// Non Windows systems only
-    ///
-    /// # Examples
-    ///
-    #[cfg_attr(not(unix), doc=" ```ignore")]
-    #[cfg_attr(    unix , doc=" ```")]
-    /// # use clap::{App, AppSettings};
-    /// use std::ffi::OsString;
-    /// use std::os::unix::ffi::{OsStrExt,OsStringExt};
-    ///
-    /// let r = App::new("myprog")
-    ///   //.setting(AppSettings::AllowInvalidUtf8)
-    ///     .arg_from_usage("<arg> 'some positional arg'")
-    ///     .get_matches_from_safe(
-    ///         vec![
-    ///             OsString::from("myprog"),
-    ///             OsString::from_vec(vec![0xe9])]);
-    ///
-    /// assert!(r.is_ok());
-    /// let m = r.unwrap();
-    /// assert_eq!(m.value_of_os("arg").unwrap().as_bytes(), &[0xe9]);
-    /// ```
-    /// [`ArgMatches::os_value_of`]: ./struct.ArgMatches.html#method.os_value_of
-    /// [`ArgMatches::os_values_of`]: ./struct.ArgMatches.html#method.os_values_of
-    /// [`ArgMatches::lossy_value_of`]: ./struct.ArgMatches.html#method.lossy_value_of
-    /// [`ArgMatches::lossy_values_of`]: ./struct.ArgMatches.html#method.lossy_values_of
-    AllowInvalidUtf8,
-
-    /// Specifies that leading hyphens are allowed in argument *values*, such as negative numbers
-    /// like `-10`. (which would otherwise be parsed as another flag or option)
-    ///
-    /// **NOTE:** Use this setting with caution as it silences certain circumstances which would
-    /// otherwise be an error (such as accidentally forgetting to specify a value for leading
-    /// option). It is preferred to set this on a per argument basis, via [`Arg::allow_hyphen_values`]
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{Arg, App, AppSettings};
-    /// // Imagine you needed to represent negative numbers as well, such as -10
-    /// let m = App::new("nums")
-    ///     .setting(AppSettings::AllowLeadingHyphen)
-    ///     .arg(Arg::with_name("neg").index(1))
-    ///     .get_matches_from(vec![
-    ///         "nums", "-20"
-    ///     ]);
-    ///
-    /// assert_eq!(m.value_of("neg"), Some("-20"));
-    /// # ;
-    /// ```
-    /// [`Arg::allow_hyphen_values`]: ./struct.Arg.html#method.allow_hyphen_values
-    AllowLeadingHyphen,
-
-    /// Allows negative numbers to pass as values. This is similar to
-    /// `AllowLeadingHyphen` except that it only allows numbers, all
-    /// other undefined leading hyphens will fail to parse.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, AppSettings};
-    /// let res = App::new("myprog")
-    ///     .version("v1.1")
-    ///     .setting(AppSettings::AllowNegativeNumbers)
-    ///     .arg(Arg::with_name("num"))
-    ///     .get_matches_from_safe(vec![
-    ///         "myprog", "-20"
-    ///     ]);
-    /// assert!(res.is_ok());
-    /// let m = res.unwrap();
-    /// assert_eq!(m.value_of("num").unwrap(), "-20");
-    /// ```
-    /// [`AllowLeadingHyphen`]: ./enum.AppSettings.html#variant.AllowLeadingHyphen
-    AllowNegativeNumbers,
-
-    /// Allows one to implement a CLI where the second to last positional argument is optional, but
-    /// the final positional argument is required. Such as `$ prog [optional] <required>` where one
-    /// of the two following usages is allowed:
-    ///
-    /// * `$ prog [optional] <required>`
-    /// * `$ prog <required>`
-    ///
-    /// This would otherwise not be allowed. This is useful when `[optional]` has a default value.
-    ///
-    /// **Note:** In addition to using this setting, the second positional argument *must* be
-    /// [required]
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, AppSettings};
-    /// // Assume there is an external subcommand named "subcmd"
-    /// let m = App::new("myprog")
-    ///     .setting(AppSettings::AllowMissingPositional)
-    ///     .arg(Arg::with_name("arg1")
-    ///         .default_value("something"))
-    ///     .arg(Arg::with_name("arg2")
-    ///         .required(true))
-    ///     .get_matches_from(vec![
-    ///         "myprog", "other"
-    ///     ]);
-    ///
-    /// assert_eq!(m.value_of("arg1"), Some("something"));
-    /// assert_eq!(m.value_of("arg2"), Some("other"));
-    /// ```
-    /// [required]: ./struct.Arg.html#method.required
-    AllowMissingPositional,
-
-    /// Specifies that an unexpected positional argument,
-    /// which would otherwise cause a [`ErrorKind::UnknownArgument`] error,
-    /// should instead be treated as a [`SubCommand`] within the [`ArgMatches`] struct.
-    ///
-    /// **NOTE:** Use this setting with caution,
-    /// as a truly unexpected argument (i.e. one that is *NOT* an external subcommand)
-    /// will **not** cause an error and instead be treated as a potential subcommand.
-    /// One should check for such cases manually and inform the user appropriately.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, AppSettings};
-    /// // Assume there is an external subcommand named "subcmd"
-    /// let m = App::new("myprog")
-    ///     .setting(AppSettings::AllowExternalSubcommands)
-    ///     .get_matches_from(vec![
-    ///         "myprog", "subcmd", "--option", "value", "-fff", "--flag"
-    ///     ]);
-    ///
-    /// // All trailing arguments will be stored under the subcommand's sub-matches using an empty
-    /// // string argument name
-    /// match m.subcommand() {
-    ///     (external, Some(ext_m)) => {
-    ///          let ext_args: Vec<&str> = ext_m.values_of("").unwrap().collect();
-    ///          assert_eq!(external, "subcmd");
-    ///          assert_eq!(ext_args, ["--option", "value", "-fff", "--flag"]);
-    ///     },
-    ///     _ => {},
-    /// }
-    /// ```
-    /// [`ErrorKind::UnknownArgument`]: ./enum.ErrorKind.html#variant.UnknownArgument
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    /// [`ArgMatches`]: ./struct.ArgMatches.html
-    AllowExternalSubcommands,
-
-    /// Specifies that use of a valid [argument] negates [subcomands] being used after. By default
-    /// `clap` allows arguments between subcommands such as
-    /// `<cmd> [cmd_args] <cmd2> [cmd2_args] <cmd3> [cmd3_args]`. This setting disables that
-    /// functionality and says that arguments can only follow the *final* subcommand. For instance
-    /// using this setting makes only the following invocations possible:
-    ///
-    /// * `<cmd> <cmd2> <cmd3> [cmd3_args]`
-    /// * `<cmd> <cmd2> [cmd2_args]`
-    /// * `<cmd> [cmd_args]`
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::ArgsNegateSubcommands)
-    /// # ;
-    /// ```
-    /// [subcommands]: ./struct.SubCommand.html
-    /// [argument]: ./struct.Arg.html
-    ArgsNegateSubcommands,
-
-    /// Specifies that the help text should be displayed (and then exit gracefully),
-    /// if no arguments are present at runtime (i.e. an empty run such as, `$ myprog`.
-    ///
-    /// **NOTE:** [`SubCommand`]s count as arguments
-    ///
-    /// **NOTE:** Setting [`Arg::default_value`] effectively disables this option as it will
-    /// ensure that some argument is always present.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::ArgRequiredElseHelp)
-    /// # ;
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    /// [`Arg::default_value`]: ./struct.Arg.html#method.default_value
-    ArgRequiredElseHelp,
-
-    /// Uses colorized help messages.
-    ///
-    /// **NOTE:** Must be compiled with the `color` cargo feature
-    ///
-    /// # Platform Specific
-    ///
-    /// This setting only applies to Unix, Linux, and OSX (i.e. non-Windows platforms)
-    ///
-    /// # Examples
-    ///
-    /// ```no_run
-    /// # use clap::{App, Arg, SubCommand, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::ColoredHelp)
-    ///     .get_matches();
-    /// ```
-    ColoredHelp,
-
-    /// Enables colored output only when the output is going to a terminal or TTY.
-    ///
-    /// **NOTE:** This is the default behavior of `clap`.
-    ///
-    /// **NOTE:** Must be compiled with the `color` cargo feature.
-    ///
-    /// # Platform Specific
-    ///
-    /// This setting only applies to Unix, Linux, and OSX (i.e. non-Windows platforms).
-    ///
-    /// # Examples
-    ///
-    /// ```no_run
-    /// # use clap::{App, Arg, SubCommand, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::ColorAuto)
-    ///     .get_matches();
-    /// ```
-    ColorAuto,
-
-    /// Enables colored output regardless of whether or not the output is going to a terminal/TTY.
-    ///
-    /// **NOTE:** Must be compiled with the `color` cargo feature.
-    ///
-    /// # Platform Specific
-    ///
-    /// This setting only applies to Unix, Linux, and OSX (i.e. non-Windows platforms).
-    ///
-    /// # Examples
-    ///
-    /// ```no_run
-    /// # use clap::{App, Arg, SubCommand, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::ColorAlways)
-    ///     .get_matches();
-    /// ```
-    ColorAlways,
-
-    /// Disables colored output no matter if the output is going to a terminal/TTY, or not.
-    ///
-    /// **NOTE:** Must be compiled with the `color` cargo feature
-    ///
-    /// # Platform Specific
-    ///
-    /// This setting only applies to Unix, Linux, and OSX (i.e. non-Windows platforms)
-    ///
-    /// # Examples
-    ///
-    /// ```no_run
-    /// # use clap::{App, Arg, SubCommand, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::ColorNever)
-    ///     .get_matches();
-    /// ```
-    ColorNever,
-
-    /// Disables the automatic collapsing of positional args into `[ARGS]` inside the usage string
-    ///
-    /// # Examples
-    ///
-    /// ```no_run
-    /// # use clap::{App, Arg, SubCommand, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::DontCollapseArgsInUsage)
-    ///     .get_matches();
-    /// ```
-    DontCollapseArgsInUsage,
-
-    /// Disables the automatic delimiting of values when `--` or [`AppSettings::TrailingVarArg`]
-    /// was used.
-    ///
-    /// **NOTE:** The same thing can be done manually by setting the final positional argument to
-    /// [`Arg::use_delimiter(false)`]. Using this setting is safer, because it's easier to locate
-    /// when making changes.
-    ///
-    /// # Examples
-    ///
-    /// ```no_run
-    /// # use clap::{App, Arg, SubCommand, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::DontDelimitTrailingValues)
-    ///     .get_matches();
-    /// ```
-    /// [`AppSettings::TrailingVarArg`]: ./enum.AppSettings.html#variant.TrailingVarArg
-    /// [`Arg::use_delimiter(false)`]: ./struct.Arg.html#method.use_delimiter
-    DontDelimitTrailingValues,
-
-    /// Disables the `help` subcommand
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, AppSettings, ErrorKind, SubCommand};
-    /// let res = App::new("myprog")
-    ///     .version("v1.1")
-    ///     .setting(AppSettings::DisableHelpSubcommand)
-    ///     // Normally, creating a subcommand causes a `help` subcommand to automaticaly
-    ///     // be generated as well
-    ///     .subcommand(SubCommand::with_name("test"))
-    ///     .get_matches_from_safe(vec![
-    ///         "myprog", "help"
-    ///     ]);
-    /// assert!(res.is_err());
-    /// assert_eq!(res.unwrap_err().kind, ErrorKind::UnknownArgument);
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    DisableHelpSubcommand,
-
-    /// Disables `-V` and `--version` [`App`] without affecting any of the [`SubCommand`]s
-    /// (Defaults to `false`; application *does* have a version flag)
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, AppSettings, ErrorKind};
-    /// let res = App::new("myprog")
-    ///     .version("v1.1")
-    ///     .setting(AppSettings::DisableVersion)
-    ///     .get_matches_from_safe(vec![
-    ///         "myprog", "-V"
-    ///     ]);
-    /// assert!(res.is_err());
-    /// assert_eq!(res.unwrap_err().kind, ErrorKind::UnknownArgument);
-    /// ```
-    ///
-    /// ```rust
-    /// # use clap::{App, SubCommand, AppSettings, ErrorKind};
-    /// let res = App::new("myprog")
-    ///     .version("v1.1")
-    ///     .setting(AppSettings::DisableVersion)
-    ///     .subcommand(SubCommand::with_name("test"))
-    ///     .get_matches_from_safe(vec![
-    ///         "myprog", "test", "-V"
-    ///     ]);
-    /// assert!(res.is_err());
-    /// assert_eq!(res.unwrap_err().kind, ErrorKind::VersionDisplayed);
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    DisableVersion,
-
-    /// Displays the arguments and [`SubCommand`]s in the help message in the order that they were
-    /// declared in, and not alphabetically which is the default.
-    ///
-    /// # Examples
-    ///
-    /// ```no_run
-    /// # use clap::{App, Arg, SubCommand, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::DeriveDisplayOrder)
-    ///     .get_matches();
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    DeriveDisplayOrder,
-
-    /// Specifies to use the version of the current command for all child [`SubCommand`]s.
-    /// (Defaults to `false`; subcommands have independant version strings from their parents.)
-    ///
-    /// **NOTE:** The version for the current command **and** this setting must be set **prior** to
-    /// adding any child subcommands
-    ///
-    /// # Examples
-    ///
-    /// ```no_run
-    /// # use clap::{App, Arg, SubCommand, AppSettings};
-    /// App::new("myprog")
-    ///     .version("v1.1")
-    ///     .setting(AppSettings::GlobalVersion)
-    ///     .subcommand(SubCommand::with_name("test"))
-    ///     .get_matches();
-    /// // running `$ myprog test --version` will display
-    /// // "myprog-test v1.1"
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    GlobalVersion,
-
-    /// Specifies that this [`SubCommand`] should be hidden from help messages
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, AppSettings, SubCommand};
-    /// App::new("myprog")
-    ///     .subcommand(SubCommand::with_name("test")
-    ///     .setting(AppSettings::Hidden))
-    /// # ;
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    Hidden,
-
-    /// Tells `clap` *not* to print possible values when displaying help information.
-    /// This can be useful if there are many values, or they are explained elsewhere.
-    HidePossibleValuesInHelp,
-
-    /// Tries to match unknown args to partial [`subcommands`] or their [aliases]. For example to 
-    /// match a subcommand named `test`, one could use `t`, `te`, `tes`, and `test`.
-    ///
-    /// **NOTE:** The match *must not* be ambiguous at all in order to succeed. i.e. to match `te`
-    /// to `test` there could not also be a subcommand or alias `temp` because both start with `te`
-    ///
-    /// **CAUTION:** This setting can interfere with [positional/free arguments], take care when
-    /// designing CLIs which allow inferred subcommands and have potential positional/free
-    /// arguments who's values could start with the same characters as subcommands. If this is the
-    /// case, it's recommended to use settings such as [`AppSeettings::ArgsNegateSubcommands`] in
-    /// conjuction with this setting.
-    ///
-    /// # Examples
-    ///
-    /// ```no_run
-    /// # use clap::{App, Arg, SubCommand, AppSettings};
-    /// let m = App::new("prog")
-    ///     .setting(AppSettings::InferSubcommands)
-    ///     .subcommand(SubCommand::with_name("test"))
-    ///     .get_matches_from(vec![
-    ///         "prog", "te"
-    ///     ]);
-    /// assert_eq!(m.subcommand_name(), Some("test"));
-    /// ```
-    /// [`subcommands`]: ./struct.SubCommand.html
-    /// [positional/free arguments]: ./struct.Arg.html#method.index
-    /// [aliases]: ./struct.App.html#method.alias
-    /// [`AppSeettings::ArgsNegateSubcommands`]: ./enum.AppSettings.html#variant.ArgsNegateSubcommands
-    InferSubcommands,
-
-    /// Specifies that the parser should not assume the first argument passed is the binary name.
-    /// This is normally the case when using a "daemon" style mode, or an interactive CLI where one
-    /// one would not normally type the binary or program name for each command.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, AppSettings};
-    /// let m = App::new("myprog")
-    ///     .setting(AppSettings::NoBinaryName)
-    ///     .arg(Arg::from_usage("<cmd>... 'commands to run'"))
-    ///     .get_matches_from(vec!["command", "set"]);
-    ///
-    /// let cmds: Vec<&str> = m.values_of("cmd").unwrap().collect();
-    /// assert_eq!(cmds, ["command", "set"]);
-    /// ```
-    NoBinaryName,
-
-    /// Places the help string for all arguments on the line after the argument.
-    ///
-    /// # Examples
-    ///
-    /// ```no_run
-    /// # use clap::{App, Arg, SubCommand, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::NextLineHelp)
-    ///     .get_matches();
-    /// ```
-    NextLineHelp,
-
-    /// Specifies that the parser should propagate global arg's values down through any *used* child
-    /// subcommands. Meaning, if a subcommand wasn't used, the values won't be propagated down to
-    /// said subcommand.
-    ///
-    /// **NOTE:** Values are only propagated *down* through futher child commands, not up
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, AppSettings, SubCommand};
-    /// let m = App::new("myprog")
-    ///     .setting(AppSettings::PropagateGlobalValuesDown)
-    ///     .arg(Arg::from_usage("[cmd] 'command to run'")
-    ///         .global(true))
-    ///     .subcommand(SubCommand::with_name("foo"))
-    ///     .get_matches_from(vec!["myprog", "set", "foo"]);
-    ///
-    /// assert_eq!(m.value_of("cmd"), Some("set"));
-    ///
-    /// let sub_m = m.subcommand_matches("foo").unwrap();
-    /// assert_eq!(sub_m.value_of("cmd"), Some("set"));
-    /// ```
-    /// Now doing the same thing, but *not* using any subcommands will result in the value not being
-    /// propagated down.
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, AppSettings, SubCommand};
-    /// let m = App::new("myprog")
-    ///     .setting(AppSettings::PropagateGlobalValuesDown)
-    ///     .arg(Arg::from_usage("[cmd] 'command to run'")
-    ///         .global(true))
-    ///     .subcommand(SubCommand::with_name("foo"))
-    ///     .get_matches_from(vec!["myprog", "set"]);
-    ///
-    /// assert_eq!(m.value_of("cmd"), Some("set"));
-    ///
-    /// assert!(m.subcommand_matches("foo").is_none());
-    /// ```
-    PropagateGlobalValuesDown,
-
-    /// Allows [`SubCommand`]s to override all requirements of the parent command.
-    /// For example if you had a subcommand or top level application with a required argument
-    /// that is only required as long as there is no subcommand present,
-    /// using this setting would allow you to set those arguments to [`Arg::required(true)`]
-    /// and yet receive no error so long as the user uses a valid subcommand instead.
-    ///
-    /// **NOTE:** This defaults to false (using subcommand does *not* negate requirements)
-    ///
-    /// # Examples
-    ///
-    /// This first example shows that it is an error to not use a required argument
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, AppSettings, SubCommand, ErrorKind};
-    /// let err = App::new("myprog")
-    ///     .setting(AppSettings::SubcommandsNegateReqs)
-    ///     .arg(Arg::with_name("opt").required(true))
-    ///     .subcommand(SubCommand::with_name("test"))
-    ///     .get_matches_from_safe(vec![
-    ///         "myprog"
-    ///     ]);
-    /// assert!(err.is_err());
-    /// assert_eq!(err.unwrap_err().kind, ErrorKind::MissingRequiredArgument);
-    /// # ;
-    /// ```
-    ///
-    /// This next example shows that it is no longer error to not use a required argument if a
-    /// valid subcommand is used.
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, AppSettings, SubCommand, ErrorKind};
-    /// let noerr = App::new("myprog")
-    ///     .setting(AppSettings::SubcommandsNegateReqs)
-    ///     .arg(Arg::with_name("opt").required(true))
-    ///     .subcommand(SubCommand::with_name("test"))
-    ///     .get_matches_from_safe(vec![
-    ///         "myprog", "test"
-    ///     ]);
-    /// assert!(noerr.is_ok());
-    /// # ;
-    /// ```
-    /// [`Arg::required(true)`]: ./struct.Arg.html#method.required
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    SubcommandsNegateReqs,
-
-    /// Specifies that the help text should be displayed (before exiting gracefully) if no
-    /// [`SubCommand`]s are present at runtime (i.e. an empty run such as `$ myprog`).
-    ///
-    /// **NOTE:** This should *not* be used with [`AppSettings::SubcommandRequired`] as they do
-    /// nearly same thing; this prints the help text, and the other prints an error.
-    ///
-    /// **NOTE:** If the user specifies arguments at runtime, but no subcommand the help text will
-    /// still be displayed and exit. If this is *not* the desired result, consider using
-    /// [`AppSettings::ArgRequiredElseHelp`] instead.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::SubcommandRequiredElseHelp)
-    /// # ;
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    /// [`AppSettings::SubcommandRequired`]: ./enum.AppSettings.html#variant.SubcommandRequired
-    /// [`AppSettings::ArgRequiredElseHelp`]: ./enum.AppSettings.html#variant.ArgRequiredElseHelp
-    SubcommandRequiredElseHelp,
-
-    /// Specifies that any invalid UTF-8 code points should be treated as an error and fail
-    /// with a [`ErrorKind::InvalidUtf8`] error.
-    ///
-    /// **NOTE:** This rule only applies to argument values; Things such as flags, options, and
-    /// [`SubCommand`]s themselves only allow valid UTF-8 code points.
-    ///
-    /// # Platform Specific
-    ///
-    /// Non Windows systems only
-    ///
-    /// # Examples
-    ///
-    #[cfg_attr(not(unix), doc=" ```ignore")]
-    #[cfg_attr(    unix , doc=" ```")]
-    /// # use clap::{App, AppSettings, ErrorKind};
-    /// use std::ffi::OsString;
-    /// use std::os::unix::ffi::OsStringExt;
-    ///
-    /// let m = App::new("myprog")
-    ///     .setting(AppSettings::StrictUtf8)
-    ///     .arg_from_usage("<arg> 'some positional arg'")
-    ///     .get_matches_from_safe(
-    ///         vec![
-    ///             OsString::from("myprog"),
-    ///             OsString::from_vec(vec![0xe9])]);
-    ///
-    /// assert!(m.is_err());
-    /// assert_eq!(m.unwrap_err().kind, ErrorKind::InvalidUtf8);
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    /// [`ErrorKind::InvalidUtf8`]: ./enum.ErrorKind.html#variant.InvalidUtf8
-    StrictUtf8,
-
-    /// Allows specifying that if no [`SubCommand`] is present at runtime,
-    /// error and exit gracefully.
-    ///
-    /// **NOTE:** This defaults to `false` (subcommands do *not* need to be present)
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, AppSettings, SubCommand, ErrorKind};
-    /// let err = App::new("myprog")
-    ///     .setting(AppSettings::SubcommandRequired)
-    ///     .subcommand(SubCommand::with_name("test"))
-    ///     .get_matches_from_safe(vec![
-    ///         "myprog",
-    ///     ]);
-    /// assert!(err.is_err());
-    /// assert_eq!(err.unwrap_err().kind, ErrorKind::MissingSubcommand);
-    /// # ;
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    SubcommandRequired,
-
-    /// Specifies that the final positional argument is a "VarArg" and that `clap` should not
-    /// attempt to parse any further args.
-    ///
-    /// The values of the trailing positional argument will contain all args from itself on.
-    ///
-    /// **NOTE:** The final positional argument **must** have [`Arg::multiple(true)`] or the usage
-    /// string equivalent.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, AppSettings};
-    /// let m = App::new("myprog")
-    ///     .setting(AppSettings::TrailingVarArg)
-    ///     .arg(Arg::from_usage("<cmd>... 'commands to run'"))
-    ///     .get_matches_from(vec!["myprog", "arg1", "-r", "val1"]);
-    ///
-    /// let trail: Vec<&str> = m.values_of("cmd").unwrap().collect();
-    /// assert_eq!(trail, ["arg1", "-r", "val1"]);
-    /// ```
-    /// [`Arg::multiple(true)`]: ./struct.Arg.html#method.multiple
-    TrailingVarArg,
-
-    /// Groups flags and options together, presenting a more unified help message
-    /// (a la `getopts` or `docopt` style).
-    ///
-    /// The default is that the auto-generated help message will group flags, and options
-    /// separately.
-    ///
-    /// **NOTE:** This setting is cosmetic only and does not affect any functionality.
-    ///
-    /// # Examples
-    ///
-    /// ```no_run
-    /// # use clap::{App, Arg, SubCommand, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::UnifiedHelpMessage)
-    ///     .get_matches();
-    /// // running `myprog --help` will display a unified "docopt" or "getopts" style help message
-    /// ```
-    UnifiedHelpMessage,
-
-    /// Disables `-V` and `--version` for all [`SubCommand`]s
-    /// (Defaults to `false`; subcommands *do* have version flags.)
-    ///
-    /// **NOTE:** This setting must be set **prior** adding any subcommands
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, SubCommand, AppSettings, ErrorKind};
-    /// let res = App::new("myprog")
-    ///     .version("v1.1")
-    ///     .setting(AppSettings::VersionlessSubcommands)
-    ///     .subcommand(SubCommand::with_name("test"))
-    ///     .get_matches_from_safe(vec![
-    ///         "myprog", "test", "-V"
-    ///     ]);
-    /// assert!(res.is_err());
-    /// assert_eq!(res.unwrap_err().kind, ErrorKind::UnknownArgument);
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    VersionlessSubcommands,
-
-    /// Will display a message "Press [ENTER]/[RETURN] to continue..." and wait for user before
-    /// exiting
-    ///
-    /// This is most useful when writing an application which is run from a GUI shortcut, or on
-    /// Windows where a user tries to open the binary by double-clicking instead of using the
-    /// command line.
-    ///
-    /// **NOTE:** This setting is **not** recursive with [`SubCommand`]s, meaning if you wish this
-    /// behavior for all subcommands, you must set this on each command (needing this is extremely
-    /// rare)
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, AppSettings};
-    /// App::new("myprog")
-    ///     .setting(AppSettings::WaitOnError)
-    /// # ;
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    WaitOnError,
-
-    #[doc(hidden)]
-    NeedsLongVersion,
-
-    #[doc(hidden)]
-    NeedsLongHelp,
-
-    #[doc(hidden)]
-    NeedsSubcommandHelp,
-
-    #[doc(hidden)]
-    LowIndexMultiplePositional,
-
-    #[doc(hidden)]
-    TrailingValues,
-
-    #[doc(hidden)]
-    ValidNegNumFound,
-
-    #[doc(hidden)]
-    Propogated,
-
-    #[doc(hidden)]
-    ValidArgFound,
-
-    #[doc(hidden)]
-    ContainsLast,
-}
-
-impl FromStr for AppSettings {
-    type Err = String;
-    fn from_str(s: &str) -> Result<Self, <Self as FromStr>::Err> {
-        match &*s.to_ascii_lowercase() {
-            "argrequiredelsehelp" => Ok(AppSettings::ArgRequiredElseHelp),
-            "argsnegatesubcommands" => Ok(AppSettings::ArgsNegateSubcommands),
-            "allowinvalidutf8" => Ok(AppSettings::AllowInvalidUtf8),
-            "allowleadinghyphen" => Ok(AppSettings::AllowLeadingHyphen),
-            "allowexternalsubcommands" => Ok(AppSettings::AllowExternalSubcommands),
-            "allownegativenumbers" => Ok(AppSettings::AllowNegativeNumbers),
-            "colorauto" => Ok(AppSettings::ColorAuto),
-            "coloralways" => Ok(AppSettings::ColorAlways),
-            "colornever" => Ok(AppSettings::ColorNever),
-            "coloredhelp" => Ok(AppSettings::ColoredHelp),
-            "derivedisplayorder" => Ok(AppSettings::DeriveDisplayOrder),
-            "dontcollapseargsinusage" => Ok(AppSettings::DontCollapseArgsInUsage),
-            "dontdelimittrailingvalues" => Ok(AppSettings::DontDelimitTrailingValues),
-            "disablehelpsubcommand" => Ok(AppSettings::DisableHelpSubcommand),
-            "disableversion" => Ok(AppSettings::DisableVersion),
-            "globalversion" => Ok(AppSettings::GlobalVersion),
-            "hidden" => Ok(AppSettings::Hidden),
-            "hidepossiblevaluesinhelp" => Ok(AppSettings::HidePossibleValuesInHelp),
-            "infersubcommands" => Ok(AppSettings::InferSubcommands),
-            "lowindexmultiplepositional" => Ok(AppSettings::LowIndexMultiplePositional),
-            "nobinaryname" => Ok(AppSettings::NoBinaryName),
-            "nextlinehelp" => Ok(AppSettings::NextLineHelp),
-            "strictutf8" => Ok(AppSettings::StrictUtf8),
-            "subcommandsnegatereqs" => Ok(AppSettings::SubcommandsNegateReqs),
-            "subcommandrequired" => Ok(AppSettings::SubcommandRequired),
-            "subcommandrequiredelsehelp" => Ok(AppSettings::SubcommandRequiredElseHelp),
-            "trailingvararg" => Ok(AppSettings::TrailingVarArg),
-            "unifiedhelpmessage" => Ok(AppSettings::UnifiedHelpMessage),
-            "versionlesssubcommands" => Ok(AppSettings::VersionlessSubcommands),
-            "waitonerror" => Ok(AppSettings::WaitOnError),
-            "validnegnumfound" => Ok(AppSettings::ValidNegNumFound),
-            "validargfound" => Ok(AppSettings::ValidArgFound),
-            "propogated" => Ok(AppSettings::Propogated),
-            "trailingvalues" => Ok(AppSettings::TrailingValues),
-            _ => Err("unknown AppSetting, cannot convert from str".to_owned()),
-        }
-    }
-}
-
-#[cfg(test)]
-mod test {
-    use super::AppSettings;
-
-    #[test]
-    fn app_settings_fromstr() {
-        assert_eq!("argsnegatesubcommands".parse::<AppSettings>().unwrap(),
-                   AppSettings::ArgsNegateSubcommands);
-        assert_eq!("argrequiredelsehelp".parse::<AppSettings>().unwrap(),
-                   AppSettings::ArgRequiredElseHelp);
-        assert_eq!("allowexternalsubcommands".parse::<AppSettings>().unwrap(),
-                   AppSettings::AllowExternalSubcommands);
-        assert_eq!("allowinvalidutf8".parse::<AppSettings>().unwrap(),
-                   AppSettings::AllowInvalidUtf8);
-        assert_eq!("allowleadinghyphen".parse::<AppSettings>().unwrap(),
-                   AppSettings::AllowLeadingHyphen);
-        assert_eq!("allownegativenumbers".parse::<AppSettings>().unwrap(),
-                   AppSettings::AllowNegativeNumbers);
-        assert_eq!("coloredhelp".parse::<AppSettings>().unwrap(),
-                   AppSettings::ColoredHelp);
-        assert_eq!("colorauto".parse::<AppSettings>().unwrap(),
-                   AppSettings::ColorAuto);
-        assert_eq!("coloralways".parse::<AppSettings>().unwrap(),
-                   AppSettings::ColorAlways);
-        assert_eq!("colornever".parse::<AppSettings>().unwrap(),
-                   AppSettings::ColorNever);
-        assert_eq!("disablehelpsubcommand".parse::<AppSettings>().unwrap(),
-                   AppSettings::DisableHelpSubcommand);
-        assert_eq!("disableversion".parse::<AppSettings>().unwrap(),
-                   AppSettings::DisableVersion);
-        assert_eq!("dontcollapseargsinusage".parse::<AppSettings>().unwrap(),
-                   AppSettings::DontCollapseArgsInUsage);
-        assert_eq!("dontdelimittrailingvalues".parse::<AppSettings>().unwrap(),
-                   AppSettings::DontDelimitTrailingValues);
-        assert_eq!("derivedisplayorder".parse::<AppSettings>().unwrap(),
-                   AppSettings::DeriveDisplayOrder);
-        assert_eq!("globalversion".parse::<AppSettings>().unwrap(),
-                   AppSettings::GlobalVersion);
-        assert_eq!("hidden".parse::<AppSettings>().unwrap(),
-                   AppSettings::Hidden);
-        assert_eq!("hidepossiblevaluesinhelp".parse::<AppSettings>().unwrap(),
-                   AppSettings::HidePossibleValuesInHelp);
-        assert_eq!("lowindexmultiplePositional".parse::<AppSettings>().unwrap(),
-                   AppSettings::LowIndexMultiplePositional);
-        assert_eq!("nobinaryname".parse::<AppSettings>().unwrap(),
-                   AppSettings::NoBinaryName);
-        assert_eq!("nextlinehelp".parse::<AppSettings>().unwrap(),
-                   AppSettings::NextLineHelp);
-        assert_eq!("subcommandsnegatereqs".parse::<AppSettings>().unwrap(),
-                   AppSettings::SubcommandsNegateReqs);
-        assert_eq!("subcommandrequired".parse::<AppSettings>().unwrap(),
-                   AppSettings::SubcommandRequired);
-        assert_eq!("subcommandrequiredelsehelp".parse::<AppSettings>().unwrap(),
-                   AppSettings::SubcommandRequiredElseHelp);
-        assert_eq!("strictutf8".parse::<AppSettings>().unwrap(),
-                   AppSettings::StrictUtf8);
-        assert_eq!("trailingvararg".parse::<AppSettings>().unwrap(),
-                   AppSettings::TrailingVarArg);
-        assert_eq!("unifiedhelpmessage".parse::<AppSettings>().unwrap(),
-                   AppSettings::UnifiedHelpMessage);
-        assert_eq!("versionlesssubcommands".parse::<AppSettings>().unwrap(),
-                   AppSettings::VersionlessSubcommands);
-        assert_eq!("waitonerror".parse::<AppSettings>().unwrap(),
-                   AppSettings::WaitOnError);
-        assert_eq!("validnegnumfound".parse::<AppSettings>().unwrap(),
-                   AppSettings::ValidNegNumFound);
-        assert_eq!("validargfound".parse::<AppSettings>().unwrap(),
-                   AppSettings::ValidArgFound);
-        assert_eq!("propogated".parse::<AppSettings>().unwrap(),
-                   AppSettings::Propogated);
-        assert_eq!("trailingvalues".parse::<AppSettings>().unwrap(),
-                   AppSettings::TrailingValues);
-        assert_eq!("infersubcommands".parse::<AppSettings>().unwrap(),
-                   AppSettings::InferSubcommands);
-        assert!("hahahaha".parse::<AppSettings>().is_err());
-    }
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/app/usage.rs
+++ /dev/null
@@ -1,439 +0,0 @@
-// std
-use std::collections::{BTreeMap, VecDeque};
-
-// Internal
-use INTERNAL_ERROR_MSG;
-use args::{AnyArg, ArgMatcher, PosBuilder};
-use args::settings::ArgSettings;
-use app::settings::AppSettings as AS;
-use app::parser::Parser;
-
-// Creates a usage string for display. This happens just after all arguments were parsed, but before
-// any subcommands have been parsed (so as to give subcommands their own usage recursively)
-pub fn create_usage_with_title(p: &Parser, used: &[&str]) -> String {
-    debugln!("usage::create_usage_with_title;");
-    let mut usage = String::with_capacity(75);
-    usage.push_str("USAGE:\n    ");
-    usage.push_str(&*create_usage_no_title(p, used));
-    usage
-}
-
-// Creates a usage string to be used in error message (i.e. one with currently used args)
-pub fn create_error_usage<'a, 'b>(p: &Parser<'a, 'b>,
-                                  matcher: &'b ArgMatcher<'a>,
-                                  extra: Option<&str>)
-                                  -> String {
-    let mut args: Vec<_> = matcher.arg_names()
-        .iter()
-        .filter(|n| {
-            if let Some(o) = find_by_name!(p, *n, opts, iter) {
-                !o.b.is_set(ArgSettings::Required) && !o.b.is_set(ArgSettings::Hidden)
-            } else if let Some(p) = find_by_name!(p, *n, positionals, values) {
-                !p.b.is_set(ArgSettings::Required) && p.b.is_set(ArgSettings::Hidden)
-            } else {
-                true // flags can't be required, so they're always true
-            }
-        })
-        .map(|&n| n)
-        .collect();
-    if let Some(r) = extra {
-        args.push(r);
-    }
-    create_usage_with_title(p, &*args)
-}
-
-// Creates a usage string (*without title*) if one was not provided by the user manually.
-pub fn create_usage_no_title(p: &Parser, used: &[&str]) -> String {
-    debugln!("usage::create_usage_no_title;");
-    if let Some(u) = p.meta.usage_str {
-        String::from(&*u)
-    } else if used.is_empty() {
-        create_help_usage(p, true)
-    } else {
-        create_smart_usage(p, used)
-    }
-}
-
-// Creates a usage string for display in help messages (i.e. not for errors)
-pub fn create_help_usage(p: &Parser, incl_reqs: bool) -> String {
-    let mut usage = String::with_capacity(75);
-    let name = p.meta
-        .usage
-        .as_ref()
-        .unwrap_or_else(|| {
-                            p.meta
-                                .bin_name
-                                .as_ref()
-                                .unwrap_or(&p.meta.name)
-                        });
-    usage.push_str(&*name);
-    let req_string = if incl_reqs {
-        let mut reqs: Vec<&str> = p.required().map(|r| &**r).collect();
-        reqs.sort();
-        reqs.dedup();
-        get_required_usage_from(p, &reqs, None, None, false).iter().fold(String::new(), |a, s| {
-            a + &format!(" {}", s)[..]
-        })
-    } else {
-        String::new()
-    };
-
-    let flags = needs_flags_tag(p);
-    if flags && !p.is_set(AS::UnifiedHelpMessage) {
-        usage.push_str(" [FLAGS]");
-    } else if flags {
-        usage.push_str(" [OPTIONS]");
-    }
-    if !p.is_set(AS::UnifiedHelpMessage) &&
-       p.opts.iter().any(|o| !o.is_set(ArgSettings::Required) && !o.is_set(ArgSettings::Hidden)) {
-        usage.push_str(" [OPTIONS]");
-    }
-
-    usage.push_str(&req_string[..]);
-
-    let has_last = p.positionals.values().any(|p| p.is_set(ArgSettings::Last));
-    // places a '--' in the usage string if there are args and options
-    // supporting multiple values
-    if p.opts.iter().any(|o| o.is_set(ArgSettings::Multiple)) &&
-       p.positionals.values().any(|p| !p.is_set(ArgSettings::Required)) &&
-       !p.has_visible_subcommands() && !has_last {
-        usage.push_str(" [--]");
-    }
-    let not_req_or_hidden =
-        |p: &PosBuilder| (!p.is_set(ArgSettings::Required) || p.is_set(ArgSettings::Last)) && !p.is_set(ArgSettings::Hidden);
-    if p.has_positionals() && p.positionals.values().any(not_req_or_hidden) {
-        if let Some(args_tag) = get_args_tag(p, incl_reqs) {
-            usage.push_str(&*args_tag);
-        } else {
-            usage.push_str(" [ARGS]");
-        }
-        if has_last && incl_reqs {
-            let pos = p.positionals
-                .values()
-                .find(|p| p.b.is_set(ArgSettings::Last))
-                .expect(INTERNAL_ERROR_MSG);
-            debugln!("usage::create_help_usage: '{}' has .last(true)", pos.name());
-            let req = pos.is_set(ArgSettings::Required);
-            if req && p.positionals.values().any(|p| !p.is_set(ArgSettings::Required)) {
-                usage.push_str(" -- <");
-            } else if req {
-                usage.push_str(" [--] <");
-            } else {
-                usage.push_str(" [-- <");
-            }
-            usage.push_str(&*pos.name_no_brackets());
-            usage.push_str(">");
-            usage.push_str(pos.multiple_str());
-            if !req {
-                usage.push_str("]");
-            }
-        }
-    }
-
-    // incl_reqs is only false when this function is called recursively
-    if p.has_visible_subcommands() && incl_reqs {
-        if p.is_set(AS::SubcommandsNegateReqs) || p.is_set(AS::ArgsNegateSubcommands) {
-            if !p.is_set(AS::ArgsNegateSubcommands) {
-                usage.push_str("\n    ");
-                usage.push_str(&*create_help_usage(p, false));
-                usage.push_str(" <SUBCOMMAND>");
-            } else {
-                usage.push_str("\n    ");
-                usage.push_str(&*name);
-                usage.push_str(" <SUBCOMMAND>");
-            }
-        } else if p.is_set(AS::SubcommandRequired) || p.is_set(AS::SubcommandRequiredElseHelp) {
-            usage.push_str(" <SUBCOMMAND>");
-        } else {
-            usage.push_str(" [SUBCOMMAND]");
-        }
-    }
-    usage.shrink_to_fit();
-    debugln!("usage::create_help_usage: usage={}", usage);
-    usage
-}
-
-// Creates a context aware usage string, or "smart usage" from currently used
-// args, and requirements
-fn create_smart_usage(p: &Parser, used: &[&str]) -> String {
-    debugln!("usage::smart_usage;");
-    let mut usage = String::with_capacity(75);
-    let mut hs: Vec<&str> = p.required().map(|s| &**s).collect();
-    hs.extend_from_slice(used);
-
-    let r_string =
-        get_required_usage_from(p, &hs, None, None, false).iter().fold(String::new(), |acc, s| {
-            acc + &format!(" {}", s)[..]
-        });
-
-    usage.push_str(&p.meta
-                        .usage
-                        .as_ref()
-                        .unwrap_or_else(|| {
-                                            p.meta
-                                                .bin_name
-                                                .as_ref()
-                                                .unwrap_or(&p.meta.name)
-                                        })
-                        [..]);
-    usage.push_str(&*r_string);
-    if p.is_set(AS::SubcommandRequired) {
-        usage.push_str(" <SUBCOMMAND>");
-    }
-    usage.shrink_to_fit();
-    usage
-}
-
-// Gets the `[ARGS]` tag for the usage string
-fn get_args_tag(p: &Parser, incl_reqs: bool) -> Option<String> {
-    debugln!("usage::get_args_tag;");
-    let mut count = 0;
-    'outer: for pos in p.positionals
-                    .values()
-                    .filter(|pos| !pos.is_set(ArgSettings::Required))
-                    .filter(|pos| !pos.is_set(ArgSettings::Hidden))
-                    .filter(|pos| !pos.is_set(ArgSettings::Last)) {
-        debugln!("usage::get_args_tag:iter:{}:", pos.b.name);
-        if let Some(g_vec) = p.groups_for_arg(pos.b.name) {
-            for grp_s in &g_vec {
-                debugln!("usage::get_args_tag:iter:{}:iter:{};", pos.b.name, grp_s);
-                // if it's part of a required group we don't want to count it
-                if p.groups.iter().any(|g| g.required && (&g.name == grp_s)) {
-                    continue 'outer;
-                }
-            }
-        }
-        count += 1;
-        debugln!("usage::get_args_tag:iter: {} Args not required or hidden",
-                 count);
-    }
-    if !p.is_set(AS::DontCollapseArgsInUsage) && count > 1 {
-        debugln!("usage::get_args_tag:iter: More than one, returning [ARGS]");
-        return None; // [ARGS]
-    } else if count == 1 && incl_reqs {
-        let pos = p.positionals
-            .values()
-            .find(|pos| {
-                      !pos.is_set(ArgSettings::Required) && !pos.is_set(ArgSettings::Hidden) &&
-                      !pos.is_set(ArgSettings::Last)
-                  })
-            .expect(INTERNAL_ERROR_MSG);
-        debugln!("usage::get_args_tag:iter: Exactly one, returning '{}'",
-                 pos.name());
-        return Some(format!(" [{}]{}", pos.name_no_brackets(), pos.multiple_str()));
-    } else if p.is_set(AS::DontCollapseArgsInUsage) && !p.positionals.is_empty() && incl_reqs {
-        debugln!("usage::get_args_tag:iter: Don't collapse returning all");
-        return Some(p.positionals
-                        .values()
-                        .filter(|pos| !pos.is_set(ArgSettings::Required))
-                        .filter(|pos| !pos.is_set(ArgSettings::Hidden))
-                        .filter(|pos| !pos.is_set(ArgSettings::Last))
-                        .map(|pos| {
-                                 format!(" [{}]{}", pos.name_no_brackets(), pos.multiple_str())
-                             })
-                        .collect::<Vec<_>>()
-                        .join(""));
-    } else if !incl_reqs {
-        debugln!("usage::get_args_tag:iter: incl_reqs=false, building secondary usage string");
-        let highest_req_pos = p.positionals
-            .iter()
-            .filter_map(|(idx, pos)| if pos.b.is_set(ArgSettings::Required) &&
-                                        !pos.b.is_set(ArgSettings::Last) {
-                            Some(idx)
-                        } else {
-                            None
-                        })
-            .max()
-            .unwrap_or(p.positionals.len());
-        return Some(p.positionals
-                        .iter()
-                        .filter_map(|(idx, pos)| if idx <= highest_req_pos {
-                                        Some(pos)
-                                    } else {
-                                        None
-                                    })
-                        .filter(|pos| !pos.is_set(ArgSettings::Required))
-                        .filter(|pos| !pos.is_set(ArgSettings::Hidden))
-                        .filter(|pos| !pos.is_set(ArgSettings::Last))
-                        .map(|pos| {
-                                 format!(" [{}]{}", pos.name_no_brackets(), pos.multiple_str())
-                             })
-                        .collect::<Vec<_>>()
-                        .join(""));
-    }
-    Some("".into())
-}
-
-// Determines if we need the `[FLAGS]` tag in the usage string
-fn needs_flags_tag(p: &Parser) -> bool {
-    debugln!("usage::needs_flags_tag;");
-    'outer: for f in &p.flags {
-        debugln!("usage::needs_flags_tag:iter: f={};", f.b.name);
-        if let Some(l) = f.s.long {
-            if l == "help" || l == "version" {
-                // Don't print `[FLAGS]` just for help or version
-                continue;
-            }
-        }
-        if let Some(g_vec) = p.groups_for_arg(f.b.name) {
-            for grp_s in &g_vec {
-                debugln!("usage::needs_flags_tag:iter:iter: grp_s={};", grp_s);
-                if p.groups.iter().any(|g| &g.name == grp_s && g.required) {
-                    debugln!("usage::needs_flags_tag:iter:iter: Group is required");
-                    continue 'outer;
-                }
-            }
-        }
-        if f.is_set(ArgSettings::Hidden) {
-            continue;
-        }
-        debugln!("usage::needs_flags_tag:iter: [FLAGS] required");
-        return true;
-    }
-
-    debugln!("usage::needs_flags_tag: [FLAGS] not required");
-    false
-}
-
-// Returns the required args in usage string form by fully unrolling all groups
-pub fn get_required_usage_from<'a, 'b>(p: &Parser<'a, 'b>,
-                                       reqs: &[&'a str],
-                                       matcher: Option<&ArgMatcher<'a>>,
-                                       extra: Option<&str>,
-                                       incl_last: bool)
-                                       -> VecDeque<String> {
-    debugln!("usage::get_required_usage_from: reqs={:?}, extra={:?}",
-             reqs,
-             extra);
-    let mut desc_reqs: Vec<&str> = vec![];
-    desc_reqs.extend(extra);
-    let mut new_reqs: Vec<&str> = vec![];
-    macro_rules! get_requires {
-        (@group $a: ident, $v:ident, $p:ident) => {{
-            if let Some(rl) = p.groups.iter()
-                                            .filter(|g| g.requires.is_some())
-                                            .find(|g| &g.name == $a)
-                                            .map(|g| g.requires.as_ref().unwrap()) {
-                for r in rl {
-                    if !$p.contains(&r) {
-                        debugln!("usage::get_required_usage_from:iter:{}: adding group req={:?}",
-                            $a, r);
-                        $v.push(r);
-                    }
-                }
-            }
-        }};
-        ($a:ident, $what:ident, $how:ident, $v:ident, $p:ident) => {{
-            if let Some(rl) = p.$what.$how()
-                                        .filter(|a| a.b.requires.is_some())
-                                        .find(|arg| &arg.b.name == $a)
-                                        .map(|a| a.b.requires.as_ref().unwrap()) {
-                for &(_, r) in rl.iter() {
-                    if !$p.contains(&r) {
-                        debugln!("usage::get_required_usage_from:iter:{}: adding arg req={:?}",
-                            $a, r);
-                        $v.push(r);
-                    }
-                }
-            }
-        }};
-    }
-    // initialize new_reqs
-    for a in reqs {
-        get_requires!(a, flags, iter, new_reqs, reqs);
-        get_requires!(a, opts, iter, new_reqs, reqs);
-        get_requires!(a, positionals, values, new_reqs, reqs);
-        get_requires!(@group a, new_reqs, reqs);
-    }
-    desc_reqs.extend_from_slice(&*new_reqs);
-    debugln!("usage::get_required_usage_from: after init desc_reqs={:?}",
-             desc_reqs);
-    loop {
-        let mut tmp = vec![];
-        for a in &new_reqs {
-            get_requires!(a, flags, iter, tmp, desc_reqs);
-            get_requires!(a, opts, iter, tmp, desc_reqs);
-            get_requires!(a, positionals, values, tmp, desc_reqs);
-            get_requires!(@group a, tmp, desc_reqs);
-        }
-        if tmp.is_empty() {
-            debugln!("usage::get_required_usage_from: no more children");
-            break;
-        } else {
-            debugln!("usage::get_required_usage_from: after iter tmp={:?}", tmp);
-            debugln!("usage::get_required_usage_from: after iter new_reqs={:?}",
-                     new_reqs);
-            desc_reqs.extend_from_slice(&*new_reqs);
-            new_reqs.clear();
-            new_reqs.extend_from_slice(&*tmp);
-            debugln!("usage::get_required_usage_from: after iter desc_reqs={:?}",
-                     desc_reqs);
-        }
-    }
-    desc_reqs.extend_from_slice(reqs);
-    desc_reqs.sort();
-    desc_reqs.dedup();
-    debugln!("usage::get_required_usage_from: final desc_reqs={:?}",
-             desc_reqs);
-    let mut ret_val = VecDeque::new();
-    let args_in_groups = p.groups
-        .iter()
-        .filter(|gn| desc_reqs.contains(&gn.name))
-        .flat_map(|g| p.arg_names_in_group(&g.name))
-        .collect::<Vec<_>>();
-
-    let pmap = if let Some(ref m) = matcher {
-        desc_reqs.iter()
-            .filter(|a| p.positionals.values().any(|p| &&p.b.name == a))
-            .filter(|&pos| !m.contains(pos))
-            .filter_map(|pos| p.positionals.values().find(|x| &x.b.name == pos))
-            .filter(|&pos| incl_last || !pos.is_set(ArgSettings::Last))
-            .filter(|pos| !args_in_groups.contains(&pos.b.name))
-            .map(|pos| (pos.index, pos))
-            .collect::<BTreeMap<u64, &PosBuilder>>() // sort by index
-    } else {
-        desc_reqs.iter()
-            .filter(|a| p.positionals.values().any(|pos| &&pos.b.name == a))
-            .filter_map(|pos| p.positionals.values().find(|x| &x.b.name == pos))
-            .filter(|&pos| incl_last || !pos.is_set(ArgSettings::Last))
-            .filter(|pos| !args_in_groups.contains(&pos.b.name))
-            .map(|pos| (pos.index, pos))
-            .collect::<BTreeMap<u64, &PosBuilder>>() // sort by index
-    };
-    debugln!("usage::get_required_usage_from: args_in_groups={:?}",
-             args_in_groups);
-    for &p in pmap.values() {
-        let s = p.to_string();
-        if args_in_groups.is_empty() || !args_in_groups.contains(&&*s) {
-            ret_val.push_back(s);
-        }
-    }
-    for a in desc_reqs.iter()
-            .filter(|name| !p.positionals.values().any(|p| &&p.b.name == name))
-            .filter(|name| !p.groups.iter().any(|g| &&g.name == name))
-            .filter(|name| !args_in_groups.contains(name))
-            .filter(|name| !(matcher.is_some() && matcher.as_ref().unwrap().contains(name))) {
-        debugln!("usage::get_required_usage_from:iter:{}:", a);
-        let arg = find_by_name!(p, a, flags, iter)
-            .map(|f| f.to_string())
-            .unwrap_or_else(|| {
-                                find_by_name!(p, a, opts, iter)
-                                    .map(|o| o.to_string())
-                                    .expect(INTERNAL_ERROR_MSG)
-                            });
-        ret_val.push_back(arg);
-    }
-    let mut g_vec: Vec<String> = vec![];
-    for g in desc_reqs.iter().filter(|n| p.groups.iter().any(|g| &&g.name == n)) {
-        let g_string = p.args_in_group(g).join("|");
-        let elem = format!("<{}>", &g_string[..g_string.len()]);
-        if !g_vec.contains(&elem) {
-            g_vec.push(elem);
-        }
-    }
-    for g in g_vec {
-        ret_val.push_back(g);
-    }
-
-    ret_val
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/app/validator.rs
+++ /dev/null
@@ -1,456 +0,0 @@
-// std
-use std::fmt::Display;
-
-// Internal
-use INTERNAL_ERROR_MSG;
-use INVALID_UTF8;
-use args::{AnyArg, ArgMatcher, MatchedArg};
-use args::settings::ArgSettings;
-use errors::{Error, ErrorKind};
-use errors::Result as ClapResult;
-use osstringext::OsStrExt2;
-use app::settings::AppSettings as AS;
-use app::parser::{Parser, ParseResult};
-use fmt::Colorizer;
-use app::usage;
-
-pub struct Validator<'a, 'b, 'z>(&'z mut Parser<'a, 'b>)
-    where 'a: 'b,
-          'b: 'z;
-
-impl<'a, 'b, 'z> Validator<'a, 'b, 'z> {
-    pub fn new(p: &'z mut Parser<'a, 'b>) -> Self { Validator(p) }
-
-    pub fn validate(&mut self,
-                    needs_val_of: ParseResult<'a>,
-                    subcmd_name: Option<String>,
-                    matcher: &mut ArgMatcher<'a>)
-                    -> ClapResult<()> {
-        debugln!("Validator::validate;");
-        let mut reqs_validated = false;
-        try!(self.0.add_defaults(matcher));
-        if let ParseResult::Opt(a) = needs_val_of {
-            debugln!("Validator::validate: needs_val_of={:?}", a);
-            let o = self.0
-                .opts
-                .iter()
-                .find(|o| o.b.name == a)
-                .expect(INTERNAL_ERROR_MSG);
-            try!(self.validate_required(matcher));
-            reqs_validated = true;
-            let should_err = if let Some(v) = matcher.0.args.get(&*o.b.name) {
-                v.vals.is_empty() && !(o.v.min_vals.is_some() && o.v.min_vals.unwrap() == 0)
-            } else {
-                true
-            };
-            if should_err {
-                return Err(Error::empty_value(o,
-                                              &*usage::create_error_usage(self.0, matcher, None),
-                                              self.0.color()));
-            }
-        }
-
-        if matcher.is_empty() && matcher.subcommand_name().is_none() &&
-           self.0.is_set(AS::ArgRequiredElseHelp) {
-            let mut out = vec![];
-            try!(self.0.write_help_err(&mut out));
-            return Err(Error {
-                           message: String::from_utf8_lossy(&*out).into_owned(),
-                           kind: ErrorKind::MissingArgumentOrSubcommand,
-                           info: None,
-                       });
-        }
-        try!(self.validate_blacklist(matcher));
-        if !(self.0.is_set(AS::SubcommandsNegateReqs) && subcmd_name.is_some()) && !reqs_validated {
-            try!(self.validate_required(matcher));
-        }
-        try!(self.validate_matched_args(matcher));
-        matcher.usage(usage::create_usage_with_title(self.0, &[]));
-
-        Ok(())
-    }
-
-    fn validate_values<A>(&self,
-                          arg: &A,
-                          ma: &MatchedArg,
-                          matcher: &ArgMatcher<'a>)
-                          -> ClapResult<()>
-        where A: AnyArg<'a, 'b> + Display
-    {
-        debugln!("Validator::validate_values: arg={:?}", arg.name());
-        for val in &ma.vals {
-            if self.0.is_set(AS::StrictUtf8) && val.to_str().is_none() {
-                debugln!("Validator::validate_values: invalid UTF-8 found in val {:?}",
-                         val);
-                return Err(Error::invalid_utf8(&*usage::create_error_usage(self.0, matcher, None),
-                                               self.0.color()));
-            }
-            if let Some(p_vals) = arg.possible_vals() {
-                debugln!("Validator::validate_values: possible_vals={:?}", p_vals);
-                let val_str = val.to_string_lossy();
-                if !p_vals.contains(&&*val_str) {
-                    return Err(Error::invalid_value(val_str,
-                                                    p_vals,
-                                                    arg,
-                                                    &*usage::create_error_usage(self.0,
-                                                                                matcher,
-                                                                                None),
-                                                    self.0.color()));
-                }
-            }
-            if !arg.is_set(ArgSettings::EmptyValues) && val.is_empty_() &&
-               matcher.contains(&*arg.name()) {
-                debugln!("Validator::validate_values: illegal empty val found");
-                return Err(Error::empty_value(arg,
-                                              &*usage::create_error_usage(self.0, matcher, None),
-                                              self.0.color()));
-            }
-            if let Some(vtor) = arg.validator() {
-                debug!("Validator::validate_values: checking validator...");
-                if let Err(e) = vtor(val.to_string_lossy().into_owned()) {
-                    sdebugln!("error");
-                    return Err(Error::value_validation(Some(arg), e, self.0.color()));
-                } else {
-                    sdebugln!("good");
-                }
-            }
-            if let Some(vtor) = arg.validator_os() {
-                debug!("Validator::validate_values: checking validator_os...");
-                if let Err(e) = vtor(val) {
-                    sdebugln!("error");
-                    return Err(Error::value_validation(Some(arg),
-                                                       (*e).to_string_lossy().to_string(),
-                                                       self.0.color()));
-                } else {
-                    sdebugln!("good");
-                }
-            }
-        }
-        Ok(())
-    }
-
-    fn validate_blacklist(&self, matcher: &mut ArgMatcher) -> ClapResult<()> {
-        debugln!("Validator::validate_blacklist: blacklist={:?}",
-                 self.0.blacklist);
-        macro_rules! build_err {
-            ($p:expr, $name:expr, $matcher:ident) => ({
-                debugln!("build_err!: name={}", $name);
-                let mut c_with = find_from!($p, $name, blacklist, &$matcher);
-                c_with = c_with.or(
-                    $p.find_any_arg($name).map_or(None, |aa| aa.blacklist())
-                                           .map_or(None, 
-                                                |bl| bl.iter().find(|arg| $matcher.contains(arg)))
-                                           .map_or(None, |an| $p.find_any_arg(an))
-                                           .map_or(None, |aa| Some(format!("{}", aa)))
-                );
-                debugln!("build_err!: '{:?}' conflicts with '{}'", c_with, $name);
-                $matcher.remove($name);
-                let usg = usage::create_error_usage($p, $matcher, None);
-                if let Some(f) = find_by_name!($p, $name, flags, iter) {
-                    debugln!("build_err!: It was a flag...");
-                    Error::argument_conflict(f, c_with, &*usg, self.0.color())
-                } else if let Some(o) = find_by_name!($p, $name, opts, iter) {
-                   debugln!("build_err!: It was an option...");
-                    Error::argument_conflict(o, c_with, &*usg, self.0.color())
-                } else {
-                    match find_by_name!($p, $name, positionals, values) {
-                        Some(p) => {
-                            debugln!("build_err!: It was a positional...");
-                            Error::argument_conflict(p, c_with, &*usg, self.0.color())
-                        },
-                        None    => panic!(INTERNAL_ERROR_MSG)
-                    }
-                }
-            });
-        }
-
-        for name in &self.0.blacklist {
-            debugln!("Validator::validate_blacklist:iter: Checking blacklisted name: {}",
-                     name);
-            if self.0.groups.iter().any(|g| &g.name == name) {
-                debugln!("Validator::validate_blacklist:iter: groups contains it...");
-                for n in self.0.arg_names_in_group(name) {
-                    debugln!("Validator::validate_blacklist:iter:iter: Checking arg '{}' in group...",
-                             n);
-                    if matcher.contains(n) {
-                        debugln!("Validator::validate_blacklist:iter:iter: matcher contains it...");
-                        return Err(build_err!(self.0, &n, matcher));
-                    }
-                }
-            } else if matcher.contains(name) {
-                debugln!("Validator::validate_blacklist:iter: matcher contains it...");
-                return Err(build_err!(self.0, name, matcher));
-            }
-        }
-        Ok(())
-    }
-
-    fn validate_matched_args(&self, matcher: &mut ArgMatcher<'a>) -> ClapResult<()> {
-        debugln!("Validator::validate_matched_args;");
-        for (name, ma) in matcher.iter() {
-            debugln!("Validator::validate_matched_args:iter:{}: vals={:#?}",
-                     name,
-                     ma.vals);
-            if let Some(opt) = find_by_name!(self.0, name, opts, iter) {
-                try!(self.validate_arg_num_vals(opt, ma, matcher));
-                try!(self.validate_values(opt, ma, matcher));
-                try!(self.validate_arg_requires(opt, ma, matcher));
-                try!(self.validate_arg_num_occurs(opt, ma, matcher));
-            } else if let Some(flag) = find_by_name!(self.0, name, flags, iter) {
-                try!(self.validate_arg_requires(flag, ma, matcher));
-                try!(self.validate_arg_num_occurs(flag, ma, matcher));
-            } else if let Some(pos) = find_by_name!(self.0, name, positionals, values) {
-                try!(self.validate_arg_num_vals(pos, ma, matcher));
-                try!(self.validate_arg_num_occurs(pos, ma, matcher));
-                try!(self.validate_values(pos, ma, matcher));
-                try!(self.validate_arg_requires(pos, ma, matcher));
-            } else {
-                let grp = self.0
-                    .groups
-                    .iter()
-                    .find(|g| &g.name == name)
-                    .expect(INTERNAL_ERROR_MSG);
-                if let Some(ref g_reqs) = grp.requires {
-                    if g_reqs.iter().any(|&n| !matcher.contains(n)) {
-                        return self.missing_required_error(matcher, None);
-                    }
-                }
-            }
-        }
-        Ok(())
-    }
-
-    fn validate_arg_num_occurs<A>(&self,
-                                  a: &A,
-                                  ma: &MatchedArg,
-                                  matcher: &ArgMatcher)
-                                  -> ClapResult<()>
-        where A: AnyArg<'a, 'b> + Display
-    {
-        debugln!("Validator::validate_arg_num_occurs: a={};", a.name());
-        if ma.occurs > 1 && !a.is_set(ArgSettings::Multiple) {
-            // Not the first time, and we don't allow multiples
-            return Err(Error::unexpected_multiple_usage(a,
-                                                        &*usage::create_error_usage(self.0,
-                                                                                    matcher,
-                                                                                    None),
-                                                        self.0.color()));
-        }
-        Ok(())
-    }
-
-    fn validate_arg_num_vals<A>(&self,
-                                a: &A,
-                                ma: &MatchedArg,
-                                matcher: &ArgMatcher)
-                                -> ClapResult<()>
-        where A: AnyArg<'a, 'b> + Display
-    {
-        debugln!("Validator::validate_arg_num_vals;");
-        if let Some(num) = a.num_vals() {
-            debugln!("Validator::validate_arg_num_vals: num_vals set...{}", num);
-            let should_err = if a.is_set(ArgSettings::Multiple) {
-                ((ma.vals.len() as u64) % num) != 0
-            } else {
-                num != (ma.vals.len() as u64)
-            };
-            if should_err {
-                debugln!("Validator::validate_arg_num_vals: Sending error WrongNumberOfValues");
-                return Err(Error::wrong_number_of_values(a,
-                                                         num,
-                                                         if a.is_set(ArgSettings::Multiple) {
-                                                             (ma.vals.len() % num as usize)
-                                                         } else {
-                                                             ma.vals.len()
-                                                         },
-                                                         if ma.vals.len() == 1 ||
-                                                            (a.is_set(ArgSettings::Multiple) &&
-                                                             (ma.vals.len() % num as usize) ==
-                                                             1) {
-                                                             "as"
-                                                         } else {
-                                                             "ere"
-                                                         },
-                                                         &*usage::create_error_usage(self.0,
-                                                                                     matcher,
-                                                                                     None),
-                                                         self.0.color()));
-            }
-        }
-        if let Some(num) = a.max_vals() {
-            debugln!("Validator::validate_arg_num_vals: max_vals set...{}", num);
-            if (ma.vals.len() as u64) > num {
-                debugln!("Validator::validate_arg_num_vals: Sending error TooManyValues");
-                return Err(Error::too_many_values(ma.vals
-                                                      .iter()
-                                                      .last()
-                                                      .expect(INTERNAL_ERROR_MSG)
-                                                      .to_str()
-                                                      .expect(INVALID_UTF8),
-                                                  a,
-                                                  &*usage::create_error_usage(self.0,
-                                                                              matcher,
-                                                                              None),
-                                                  self.0.color()));
-            }
-        }
-        if let Some(num) = a.min_vals() {
-            debugln!("Validator::validate_arg_num_vals: min_vals set: {}", num);
-            if (ma.vals.len() as u64) < num {
-                debugln!("Validator::validate_arg_num_vals: Sending error TooFewValues");
-                return Err(Error::too_few_values(a,
-                                                 num,
-                                                 ma.vals.len(),
-                                                 &*usage::create_error_usage(self.0,
-                                                                             matcher,
-                                                                             None),
-                                                 self.0.color()));
-            }
-        }
-        // Issue 665 (https://github.com/kbknapp/clap-rs/issues/665)
-        if a.takes_value() && !a.is_set(ArgSettings::EmptyValues) && ma.vals.is_empty() {
-            return Err(Error::empty_value(a,
-                                          &*usage::create_error_usage(self.0, matcher, None),
-                                          self.0.color()));
-        }
-        Ok(())
-    }
-
-    fn validate_arg_requires<A>(&self,
-                                a: &A,
-                                ma: &MatchedArg,
-                                matcher: &ArgMatcher)
-                                -> ClapResult<()>
-        where A: AnyArg<'a, 'b> + Display
-    {
-        debugln!("Validator::validate_arg_requires;");
-        if let Some(a_reqs) = a.requires() {
-            for &(val, name) in a_reqs.iter().filter(|&&(val, _)| val.is_some()) {
-                let missing_req =
-                    |v| v == val.expect(INTERNAL_ERROR_MSG) && !matcher.contains(name);
-                if ma.vals.iter().any(missing_req) {
-                    return self.missing_required_error(matcher, None);
-                }
-            }
-        }
-        Ok(())
-    }
-
-    fn validate_required(&self, matcher: &ArgMatcher) -> ClapResult<()> {
-        debugln!("Validator::validate_required: required={:?};",
-                 self.0.required);
-        'outer: for name in &self.0.required {
-            debugln!("Validator::validate_required:iter:{}:", name);
-            if matcher.contains(name) {
-                continue 'outer;
-            }
-            if let Some(a) = find_by_name!(self.0, name, flags, iter) {
-                if self.is_missing_required_ok(a, matcher) {
-                    continue 'outer;
-                }
-            } else if let Some(a) = find_by_name!(self.0, name, opts, iter) {
-                if self.is_missing_required_ok(a, matcher) {
-                    continue 'outer;
-                }
-            } else if let Some(a) = find_by_name!(self.0, name, positionals, values) {
-                if self.is_missing_required_ok(a, matcher) {
-                    continue 'outer;
-                }
-            }
-            return self.missing_required_error(matcher, None);
-        }
-
-        // Validate the conditionally required args
-        for &(a, v, r) in &self.0.r_ifs {
-            if let Some(ma) = matcher.get(a) {
-                if matcher.get(r).is_none() && ma.vals.iter().any(|val| val == v) {
-                    return self.missing_required_error(matcher, Some(r));
-                }
-            }
-        }
-        Ok(())
-    }
-
-    fn validate_conflicts<A>(&self, a: &A, matcher: &ArgMatcher) -> Option<bool>
-        where A: AnyArg<'a, 'b>
-    {
-        debugln!("Validator::validate_conflicts: a={:?};", a.name());
-        a.blacklist()
-            .map(|bl| {
-                bl.iter()
-                    .any(|conf| {
-                        matcher.contains(conf) ||
-                        self.0
-                            .groups
-                            .iter()
-                            .find(|g| &g.name == conf)
-                            .map_or(false, |g| g.args.iter().any(|arg| matcher.contains(arg)))
-                    })
-            })
-    }
-
-    fn validate_required_unless<A>(&self, a: &A, matcher: &ArgMatcher) -> Option<bool>
-        where A: AnyArg<'a, 'b>
-    {
-        debugln!("Validator::validate_required_unless: a={:?};", a.name());
-        macro_rules! check {
-            ($how:ident, $_self:expr, $a:ident, $m:ident) => {{
-                $a.required_unless().map(|ru| {
-                    ru.iter().$how(|n| {
-                        $m.contains(n) || {
-                            if let Some(grp) = $_self.groups.iter().find(|g| &g.name == n) {
-                                     grp.args.iter().any(|arg| $m.contains(arg))
-                            } else {
-                                false
-                            }
-                        }
-                    })
-                })
-            }}; 
-        }
-        if a.is_set(ArgSettings::RequiredUnlessAll) {
-            check!(all, self.0, a, matcher)
-        } else {
-            check!(any, self.0, a, matcher)
-        }
-    }
-
-    fn missing_required_error(&self, matcher: &ArgMatcher, extra: Option<&str>) -> ClapResult<()> {
-        debugln!("Validator::missing_required_error: extra={:?}", extra);
-        let c = Colorizer {
-            use_stderr: true,
-            when: self.0.color(),
-        };
-        let mut reqs = self.0
-            .required
-            .iter()
-            .map(|&r| &*r)
-            .collect::<Vec<_>>();
-        if let Some(r) = extra {
-            reqs.push(r);
-        }
-        reqs.retain(|n| !matcher.contains(n));
-        reqs.dedup();
-        debugln!("Validator::missing_required_error: reqs={:#?}", reqs);
-        let req_args =
-            usage::get_required_usage_from(self.0, &reqs[..], Some(matcher), extra, true)
-                .iter()
-                .fold(String::new(),
-                      |acc, s| acc + &format!("\n    {}", c.error(s))[..]);
-        debugln!("Validator::missing_required_error: req_args={:#?}",
-                 req_args);
-        Err(Error::missing_required_argument(&*req_args,
-                                             &*usage::create_error_usage(self.0, matcher, extra),
-                                             self.0.color()))
-    }
-
-    #[inline]
-    fn is_missing_required_ok<A>(&self, a: &A, matcher: &ArgMatcher) -> bool
-        where A: AnyArg<'a, 'b>
-    {
-        debugln!("Validator::is_missing_required_ok: a={}", a.name());
-        self.validate_conflicts(a, matcher).unwrap_or(false) ||
-        self.validate_required_unless(a, matcher)
-            .unwrap_or(false)
-    }
-}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/args/arg_builder/positional.rs
+++ /dev/null
@@ -1,204 +0,0 @@
-// Std
-use std::borrow::Cow;
-use std::fmt::{Display, Formatter, Result};
-use std::rc::Rc;
-use std::result::Result as StdResult;
-use std::ffi::{OsStr, OsString};
-use std::mem;
-
-// Third Party
-use vec_map::{self, VecMap};
-
-// Internal
-use Arg;
-use args::{ArgSettings, Base, Valued, AnyArg, DispOrder};
-use INTERNAL_ERROR_MSG;
-
-#[allow(missing_debug_implementations)]
-#[doc(hidden)]
-#[derive(Clone, Default)]
-pub struct PosBuilder<'n, 'e>
-    where 'n: 'e
-{
-    pub b: Base<'n, 'e>,
-    pub v: Valued<'n, 'e>,
-    pub index: u64,
-}
-
-impl<'n, 'e> PosBuilder<'n, 'e> {
-    pub fn new(name: &'n str, idx: u64) -> Self {
-        PosBuilder {
-            b: Base::new(name),
-            index: idx,
-            ..Default::default()
-        }
-    }
-
-    pub fn from_arg_ref(a: &Arg<'n, 'e>, idx: u64) -> Self {
-        let mut pb = PosBuilder {
-            b: Base::from(a),
-            v: Valued::from(a),
-            index: idx,
-        };
-        if a.v.max_vals.is_some() || a.v.min_vals.is_some() ||
-           (a.v.num_vals.is_some() && a.v.num_vals.unwrap() > 1) {
-            pb.b.settings.set(ArgSettings::Multiple);
-        }
-        pb
-    }
-
-    pub fn from_arg(mut a: Arg<'n, 'e>, idx: u64) -> Self {
-        if a.v.max_vals.is_some() || a.v.min_vals.is_some() ||
-           (a.v.num_vals.is_some() && a.v.num_vals.unwrap() > 1) {
-            a.b.settings.set(ArgSettings::Multiple);
-        }
-        PosBuilder {
-            b: mem::replace(&mut a.b, Base::default()),
-            v: mem::replace(&mut a.v, Valued::default()),
-            index: idx,
-        }
-    }
-
-    pub fn multiple_str(&self) -> &str {
-        let mult_vals = self.v
-            .val_names
-            .as_ref()
-            .map_or(true, |ref names| names.len() < 2);
-        if self.is_set(ArgSettings::Multiple) && mult_vals {
-            "..."
-        } else {
-            ""
-        }
-    }
-
-    pub fn name_no_brackets(&self) -> Cow<str> {
-        debugln!("PosBuilder::name_no_brackets;");
-        if let Some(ref names) = self.v.val_names {
-            debugln!("PosBuilder:name_no_brackets: val_names={:#?}", names);
-            if names.len() > 1 {
-                Cow::Owned(names
-                               .values()
-                               .map(|n| format!("<{}>", n))
-                               .collect::<Vec<_>>()
-                               .join(" "))
-            } else {
-                Cow::Borrowed(names.values().next().expect(INTERNAL_ERROR_MSG))
-            }
-        } else {
-            debugln!("PosBuilder:name_no_brackets: just name");
-            Cow::Borrowed(self.b.name)
-        }
-    }
-}
-
-impl<'n, 'e> Display for PosBuilder<'n, 'e> {
-    fn fmt(&self, f: &mut Formatter) -> Result {
-        if let Some(ref names) = self.v.val_names {
-            try!(write!(f,
-                        "{}",
-                        names
-                            .values()
-                            .map(|n| format!("<{}>", n))
-                            .collect::<Vec<_>>()
-                            .join(" ")));
-        } else {
-            try!(write!(f, "<{}>", self.b.name));
-        }
-        if self.b.settings.is_set(ArgSettings::Multiple) && (self.v.val_names.is_none() || self.v.val_names.as_ref().unwrap().len() == 1) {
-            try!(write!(f, "..."));
-        }
-
-        Ok(())
-    }
-}
-
-impl<'n, 'e> AnyArg<'n, 'e> for PosBuilder<'n, 'e> {
-    fn name(&self) -> &'n str { self.b.name }
-    fn overrides(&self) -> Option<&[&'e str]> { self.b.overrides.as_ref().map(|o| &o[..]) }
-    fn requires(&self) -> Option<&[(Option<&'e str>, &'n str)]> {
-        self.b.requires.as_ref().map(|o| &o[..])
-    }
-    fn blacklist(&self) -> Option<&[&'e str]> { self.b.blacklist.as_ref().map(|o| &o[..]) }
-    fn required_unless(&self) -> Option<&[&'e str]> { self.b.r_unless.as_ref().map(|o| &o[..]) }
-    fn val_names(&self) -> Option<&VecMap<&'e str>> { self.v.val_names.as_ref() }
-    fn is_set(&self, s: ArgSettings) -> bool { self.b.settings.is_set(s) }
-    fn set(&mut self, s: ArgSettings) { self.b.settings.set(s) }
-    fn has_switch(&self) -> bool { false }
-    fn max_vals(&self) -> Option<u64> { self.v.max_vals }
-    fn val_terminator(&self) -> Option<&'e str> { self.v.terminator }
-    fn num_vals(&self) -> Option<u64> { self.v.num_vals }
-    fn possible_vals(&self) -> Option<&[&'e str]> { self.v.possible_vals.as_ref().map(|o| &o[..]) }
-    fn validator(&self) -> Option<&Rc<Fn(String) -> StdResult<(), String>>> {
-        self.v.validator.as_ref()
-    }
-    fn validator_os(&self) -> Option<&Rc<Fn(&OsStr) -> StdResult<(), OsString>>> {
-        self.v.validator_os.as_ref()
-    }
-    fn min_vals(&self) -> Option<u64> { self.v.min_vals }
-    fn short(&self) -> Option<char> { None }
-    fn long(&self) -> Option<&'e str> { None }
-    fn val_delim(&self) -> Option<char> { self.v.val_delim }
-    fn takes_value(&self) -> bool { true }
-    fn help(&self) -> Option<&'e str> { self.b.help }
-    fn long_help(&self) -> Option<&'e str> { self.b.long_help }
-    fn default_vals_ifs(&self) -> Option<vec_map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
-        self.v.default_vals_ifs.as_ref().map(|vm| vm.values())
-    }
-    fn default_val(&self) -> Option<&'e OsStr> { self.v.default_val }
-    fn longest_filter(&self) -> bool { true }
-    fn aliases(&self) -> Option<Vec<&'e str>> { None }
-}
-
-impl<'n, 'e> DispOrder for PosBuilder<'n, 'e> {
-    fn disp_ord(&self) -> usize { self.index as usize }
-}
-
-impl<'n, 'e> PartialEq for PosBuilder<'n, 'e> {
-    fn eq(&self, other: &PosBuilder<'n, 'e>) -> bool { self.b == other.b }
-}
-
-#[cfg(test)]
-mod test {
-    use args::settings::ArgSettings;
-    use super::PosBuilder;
-    use vec_map::VecMap;
-
-    #[test]
-    fn display_mult() {
-        let mut p = PosBuilder::new("pos", 1);
-        p.b.settings.set(ArgSettings::Multiple);
-
-        assert_eq!(&*format!("{}", p), "<pos>...");
-    }
-
-    #[test]
-    fn display_required() {
-        let mut p2 = PosBuilder::new("pos", 1);
-        p2.b.settings.set(ArgSettings::Required);
-
-        assert_eq!(&*format!("{}", p2), "<pos>");
-    }
-
-    #[test]
-    fn display_val_names() {
-        let mut p2 = PosBuilder::new("pos", 1);
-        let mut vm = VecMap::new();
-        vm.insert(0, "file1");
-        vm.insert(1, "file2");
-        p2.v.val_names = Some(vm);
-
-        assert_eq!(&*format!("{}", p2), "<file1> <file2>");
-    }
-
-    #[test]
-    fn display_val_names_req() {
-        let mut p2 = PosBuilder::new("pos", 1);
-        p2.b.settings.set(ArgSettings::Required);
-        let mut vm = VecMap::new();
-        vm.insert(0, "file1");
-        vm.insert(1, "file2");
-        p2.v.val_names = Some(vm);
-
-        assert_eq!(&*format!("{}", p2), "<file1> <file2>");
-    }
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/args/group.rs
+++ /dev/null
@@ -1,634 +0,0 @@
-#[cfg(feature = "yaml")]
-use std::collections::BTreeMap;
-use std::fmt::{Debug, Formatter, Result};
-
-#[cfg(feature = "yaml")]
-use yaml_rust::Yaml;
-
-/// `ArgGroup`s are a family of related [arguments] and way for you to express, "Any of these
-/// arguments". By placing arguments in a logical group, you can create easier requirement and
-/// exclusion rules instead of having to list each argument individually, or when you want a rule
-/// to apply "any but not all" arguments.
-///
-/// For instance, you can make an entire `ArgGroup` required. If [`ArgGroup::multiple(true)`] is
-/// set, this means that at least one argument from that group must be present. If
-/// [`ArgGroup::multiple(false)`] is set (the default), one and *only* one must be present.
-///
-/// You can also do things such as name an entire `ArgGroup` as a [conflict] or [requirement] for
-/// another argument, meaning any of the arguments that belong to that group will cause a failure
-/// if present, or must present respectively.
-///
-/// Perhaps the most common use of `ArgGroup`s is to require one and *only* one argument to be
-/// present out of a given set. Imagine that you had multiple arguments, and you want one of them
-/// to be required, but making all of them required isn't feasible because perhaps they conflict
-/// with each other. For example, lets say that you were building an application where one could
-/// set a given version number by supplying a string with an option argument, i.e.
-/// `--set-ver v1.2.3`, you also wanted to support automatically using a previous version number
-/// and simply incrementing one of the three numbers. So you create three flags `--major`,
-/// `--minor`, and `--patch`. All of these arguments shouldn't be used at one time but you want to
-/// specify that *at least one* of them is used. For this, you can create a group.
-///
-/// Finally, you may use `ArgGroup`s to pull a value from a group of arguments when you don't care
-/// exactly which argument was actually used at runtime.
-///
-/// # Examples
-///
-/// The following example demonstrates using an `ArgGroup` to ensure that one, and only one, of
-/// the arguments from the specified group is present at runtime.
-///
-/// ```rust
-/// # use clap::{App, ArgGroup, ErrorKind};
-/// let result = App::new("app")
-///     .args_from_usage(
-///         "--set-ver [ver] 'set the version manually'
-///          --major         'auto increase major'
-///          --minor         'auto increase minor'
-///          --patch         'auto increase patch'")
-///     .group(ArgGroup::with_name("vers")
-///          .args(&["set-ver", "major", "minor","patch"])
-///          .required(true))
-///     .get_matches_from_safe(vec!["app", "--major", "--patch"]);
-/// // Because we used two args in the group it's an error
-/// assert!(result.is_err());
-/// let err = result.unwrap_err();
-/// assert_eq!(err.kind, ErrorKind::ArgumentConflict);
-/// ```
-/// This next example shows a passing parse of the same scenario
-///
-/// ```rust
-/// # use clap::{App, ArgGroup};
-/// let result = App::new("app")
-///     .args_from_usage(
-///         "--set-ver [ver] 'set the version manually'
-///          --major         'auto increase major'
-///          --minor         'auto increase minor'
-///          --patch         'auto increase patch'")
-///     .group(ArgGroup::with_name("vers")
-///          .args(&["set-ver", "major", "minor","patch"])
-///          .required(true))
-///     .get_matches_from_safe(vec!["app", "--major"]);
-/// assert!(result.is_ok());
-/// let matches = result.unwrap();
-/// // We may not know which of the args was used, so we can test for the group...
-/// assert!(matches.is_present("vers"));
-/// // we could also alternatively check each arg individually (not shown here)
-/// ```
-/// [`ArgGroup::multiple(true)`]: ./struct.ArgGroup.html#method.multiple
-/// [arguments]: ./struct.Arg.html
-/// [conflict]: ./struct.Arg.html#method.conflicts_with
-/// [requirement]: ./struct.Arg.html#method.requires
-#[derive(Default)]
-pub struct ArgGroup<'a> {
-    #[doc(hidden)]
-    pub name: &'a str,
-    #[doc(hidden)]
-    pub args: Vec<&'a str>,
-    #[doc(hidden)]
-    pub required: bool,
-    #[doc(hidden)]
-    pub requires: Option<Vec<&'a str>>,
-    #[doc(hidden)]
-    pub conflicts: Option<Vec<&'a str>>,
-    #[doc(hidden)]
-    pub multiple: bool,
-}
-
-impl<'a> ArgGroup<'a> {
-    /// Creates a new instance of `ArgGroup` using a unique string name. The name will be used to
-    /// get values from the group or refer to the group inside of conflict and requirement rules.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, ArgGroup};
-    /// ArgGroup::with_name("config")
-    /// # ;
-    /// ```
-    pub fn with_name(n: &'a str) -> Self {
-        ArgGroup {
-            name: n,
-            required: false,
-            args: vec![],
-            requires: None,
-            conflicts: None,
-            multiple: false,
-        }
-    }
-
-    /// Creates a new instance of `ArgGroup` from a .yml (YAML) file.
-    ///
-    /// # Examples
-    ///
-    /// ```ignore
-    /// # #[macro_use]
-    /// # extern crate clap;
-    /// # use clap::ArgGroup;
-    /// # fn main() {
-    /// let yml = load_yaml!("group.yml");
-    /// let ag = ArgGroup::from_yaml(yml);
-    /// # }
-    /// ```
-    #[cfg(feature = "yaml")]
-    pub fn from_yaml(y: &'a Yaml) -> ArgGroup<'a> { ArgGroup::from(y.as_hash().unwrap()) }
-
-    /// Adds an [argument] to this group by name
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ArgGroup};
-    /// let m = App::new("myprog")
-    ///     .arg(Arg::with_name("flag")
-    ///         .short("f"))
-    ///     .arg(Arg::with_name("color")
-    ///         .short("c"))
-    ///     .group(ArgGroup::with_name("req_flags")
-    ///         .arg("flag")
-    ///         .arg("color"))
-    ///     .get_matches_from(vec!["myprog", "-f"]);
-    /// // maybe we don't know which of the two flags was used...
-    /// assert!(m.is_present("req_flags"));
-    /// // but we can also check individually if needed
-    /// assert!(m.is_present("flag"));
-    /// ```
-    /// [argument]: ./struct.Arg.html
-    #[cfg_attr(feature = "lints", allow(should_assert_eq))]
-    pub fn arg(mut self, n: &'a str) -> Self {
-        assert!(self.name != n,
-                "ArgGroup '{}' can not have same name as arg inside it",
-                &*self.name);
-        self.args.push(n);
-        self
-    }
-
-    /// Adds multiple [arguments] to this group by name
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ArgGroup};
-    /// let m = App::new("myprog")
-    ///     .arg(Arg::with_name("flag")
-    ///         .short("f"))
-    ///     .arg(Arg::with_name("color")
-    ///         .short("c"))
-    ///     .group(ArgGroup::with_name("req_flags")
-    ///         .args(&["flag", "color"]))
-    ///     .get_matches_from(vec!["myprog", "-f"]);
-    /// // maybe we don't know which of the two flags was used...
-    /// assert!(m.is_present("req_flags"));
-    /// // but we can also check individually if needed
-    /// assert!(m.is_present("flag"));
-    /// ```
-    /// [arguments]: ./struct.Arg.html
-    pub fn args(mut self, ns: &[&'a str]) -> Self {
-        for n in ns {
-            self = self.arg(n);
-        }
-        self
-    }
-
-    /// Allows more than one of the ['Arg']s in this group to be used. (Default: `false`)
-    ///
-    /// # Examples
-    ///
-    /// Notice in this example we use *both* the `-f` and `-c` flags which are both part of the
-    /// group
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ArgGroup};
-    /// let m = App::new("myprog")
-    ///     .arg(Arg::with_name("flag")
-    ///         .short("f"))
-    ///     .arg(Arg::with_name("color")
-    ///         .short("c"))
-    ///     .group(ArgGroup::with_name("req_flags")
-    ///         .args(&["flag", "color"])
-    ///         .multiple(true))
-    ///     .get_matches_from(vec!["myprog", "-f", "-c"]);
-    /// // maybe we don't know which of the two flags was used...
-    /// assert!(m.is_present("req_flags"));
-    /// ```
-    /// In this next example, we show the default behavior (i.e. `multiple(false)) which will throw
-    /// an error if more than one of the args in the group was used.
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ArgGroup, ErrorKind};
-    /// let result = App::new("myprog")
-    ///     .arg(Arg::with_name("flag")
-    ///         .short("f"))
-    ///     .arg(Arg::with_name("color")
-    ///         .short("c"))
-    ///     .group(ArgGroup::with_name("req_flags")
-    ///         .args(&["flag", "color"]))
-    ///     .get_matches_from_safe(vec!["myprog", "-f", "-c"]);
-    /// // Because we used both args in the group it's an error
-    /// assert!(result.is_err());
-    /// let err = result.unwrap_err();
-    /// assert_eq!(err.kind, ErrorKind::ArgumentConflict);
-    /// ```
-    /// ['Arg']: ./struct.Arg.html
-    pub fn multiple(mut self, m: bool) -> Self {
-        self.multiple = m;
-        self
-    }
-
-    /// Sets the group as required or not. A required group will be displayed in the usage string
-    /// of the application in the format `<arg|arg2|arg3>`. A required `ArgGroup` simply states
-    /// that one argument from this group *must* be present at runtime (unless
-    /// conflicting with another argument).
-    ///
-    /// **NOTE:** This setting only applies to the current [`App`] / [`SubCommand`], and not
-    /// globally.
-    ///
-    /// **NOTE:** By default, [`ArgGroup::multiple`] is set to `false` which when combined with
-    /// `ArgGroup::required(true)` states, "One and *only one* arg must be used from this group.
-    /// Use of more than one arg is an error." Vice setting `ArgGroup::multiple(true)` which
-    /// states, '*At least* one arg from this group must be used. Using multiple is OK."
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ArgGroup, ErrorKind};
-    /// let result = App::new("myprog")
-    ///     .arg(Arg::with_name("flag")
-    ///         .short("f"))
-    ///     .arg(Arg::with_name("color")
-    ///         .short("c"))
-    ///     .group(ArgGroup::with_name("req_flags")
-    ///         .args(&["flag", "color"])
-    ///         .required(true))
-    ///     .get_matches_from_safe(vec!["myprog"]);
-    /// // Because we didn't use any of the args in the group, it's an error
-    /// assert!(result.is_err());
-    /// let err = result.unwrap_err();
-    /// assert_eq!(err.kind, ErrorKind::MissingRequiredArgument);
-    /// ```
-    /// [`App`]: ./struct.App.html
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    /// [`ArgGroup::multiple`]: ./struct.ArgGroup.html#method.multiple
-    pub fn required(mut self, r: bool) -> Self {
-        self.required = r;
-        self
-    }
-
-    /// Sets the requirement rules of this group. This is not to be confused with a
-    /// [required group]. Requirement rules function just like [argument requirement rules], you
-    /// can name other arguments or groups that must be present when any one of the arguments from
-    /// this group is used.
-    ///
-    /// **NOTE:** The name provided may be an argument, or group name
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ArgGroup, ErrorKind};
-    /// let result = App::new("myprog")
-    ///     .arg(Arg::with_name("flag")
-    ///         .short("f"))
-    ///     .arg(Arg::with_name("color")
-    ///         .short("c"))
-    ///     .arg(Arg::with_name("debug")
-    ///         .short("d"))
-    ///     .group(ArgGroup::with_name("req_flags")
-    ///         .args(&["flag", "color"])
-    ///         .requires("debug"))
-    ///     .get_matches_from_safe(vec!["myprog", "-c"]);
-    /// // because we used an arg from the group, and the group requires "-d" to be used, it's an
-    /// // error
-    /// assert!(result.is_err());
-    /// let err = result.unwrap_err();
-    /// assert_eq!(err.kind, ErrorKind::MissingRequiredArgument);
-    /// ```
-    /// [required group]: ./struct.ArgGroup.html#method.required
-    /// [argument requirement rules]: ./struct.Arg.html#method.requires
-    pub fn requires(mut self, n: &'a str) -> Self {
-        if let Some(ref mut reqs) = self.requires {
-            reqs.push(n);
-        } else {
-            self.requires = Some(vec![n]);
-        }
-        self
-    }
-
-    /// Sets the requirement rules of this group. This is not to be confused with a
-    /// [required group]. Requirement rules function just like [argument requirement rules], you
-    /// can name other arguments or groups that must be present when one of the arguments from this
-    /// group is used.
-    ///
-    /// **NOTE:** The names provided may be an argument, or group name
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ArgGroup, ErrorKind};
-    /// let result = App::new("myprog")
-    ///     .arg(Arg::with_name("flag")
-    ///         .short("f"))
-    ///     .arg(Arg::with_name("color")
-    ///         .short("c"))
-    ///     .arg(Arg::with_name("debug")
-    ///         .short("d"))
-    ///     .arg(Arg::with_name("verb")
-    ///         .short("v"))
-    ///     .group(ArgGroup::with_name("req_flags")
-    ///         .args(&["flag", "color"])
-    ///         .requires_all(&["debug", "verb"]))
-    ///     .get_matches_from_safe(vec!["myprog", "-c", "-d"]);
-    /// // because we used an arg from the group, and the group requires "-d" and "-v" to be used,
-    /// // yet we only used "-d" it's an error
-    /// assert!(result.is_err());
-    /// let err = result.unwrap_err();
-    /// assert_eq!(err.kind, ErrorKind::MissingRequiredArgument);
-    /// ```
-    /// [required group]: ./struct.ArgGroup.html#method.required
-    /// [argument requirement rules]: ./struct.Arg.html#method.requires_all
-    pub fn requires_all(mut self, ns: &[&'a str]) -> Self {
-        for n in ns {
-            self = self.requires(n);
-        }
-        self
-    }
-
-    /// Sets the exclusion rules of this group. Exclusion (aka conflict) rules function just like
-    /// [argument exclusion rules], you can name other arguments or groups that must *not* be
-    /// present when one of the arguments from this group are used.
-    ///
-    /// **NOTE:** The name provided may be an argument, or group name
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ArgGroup, ErrorKind};
-    /// let result = App::new("myprog")
-    ///     .arg(Arg::with_name("flag")
-    ///         .short("f"))
-    ///     .arg(Arg::with_name("color")
-    ///         .short("c"))
-    ///     .arg(Arg::with_name("debug")
-    ///         .short("d"))
-    ///     .group(ArgGroup::with_name("req_flags")
-    ///         .args(&["flag", "color"])
-    ///         .conflicts_with("debug"))
-    ///     .get_matches_from_safe(vec!["myprog", "-c", "-d"]);
-    /// // because we used an arg from the group, and the group conflicts with "-d", it's an error
-    /// assert!(result.is_err());
-    /// let err = result.unwrap_err();
-    /// assert_eq!(err.kind, ErrorKind::ArgumentConflict);
-    /// ```
-    /// [argument exclusion rules]: ./struct.Arg.html#method.conflicts_with
-    pub fn conflicts_with(mut self, n: &'a str) -> Self {
-        if let Some(ref mut confs) = self.conflicts {
-            confs.push(n);
-        } else {
-            self.conflicts = Some(vec![n]);
-        }
-        self
-    }
-
-    /// Sets the exclusion rules of this group. Exclusion rules function just like
-    /// [argument exclusion rules], you can name other arguments or groups that must *not* be
-    /// present when one of the arguments from this group are used.
-    ///
-    /// **NOTE:** The names provided may be an argument, or group name
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ArgGroup, ErrorKind};
-    /// let result = App::new("myprog")
-    ///     .arg(Arg::with_name("flag")
-    ///         .short("f"))
-    ///     .arg(Arg::with_name("color")
-    ///         .short("c"))
-    ///     .arg(Arg::with_name("debug")
-    ///         .short("d"))
-    ///     .arg(Arg::with_name("verb")
-    ///         .short("v"))
-    ///     .group(ArgGroup::with_name("req_flags")
-    ///         .args(&["flag", "color"])
-    ///         .conflicts_with_all(&["debug", "verb"]))
-    ///     .get_matches_from_safe(vec!["myprog", "-c", "-v"]);
-    /// // because we used an arg from the group, and the group conflicts with either "-v" or "-d"
-    /// // it's an error
-    /// assert!(result.is_err());
-    /// let err = result.unwrap_err();
-    /// assert_eq!(err.kind, ErrorKind::ArgumentConflict);
-    /// ```
-    /// [argument exclusion rules]: ./struct.Arg.html#method.conflicts_with_all
-    pub fn conflicts_with_all(mut self, ns: &[&'a str]) -> Self {
-        for n in ns {
-            self = self.conflicts_with(n);
-        }
-        self
-    }
-}
-
-impl<'a> Debug for ArgGroup<'a> {
-    fn fmt(&self, f: &mut Formatter) -> Result {
-        write!(f,
-               "{{\n\
-                   \tname: {:?},\n\
-                   \targs: {:?},\n\
-                   \trequired: {:?},\n\
-                   \trequires: {:?},\n\
-                   \tconflicts: {:?},\n\
-                }}",
-               self.name,
-               self.args,
-               self.required,
-               self.requires,
-               self.conflicts)
-    }
-}
-
-impl<'a, 'z> From<&'z ArgGroup<'a>> for ArgGroup<'a> {
-    fn from(g: &'z ArgGroup<'a>) -> Self {
-        ArgGroup {
-            name: g.name,
-            required: g.required,
-            args: g.args.clone(),
-            requires: g.requires.clone(),
-            conflicts: g.conflicts.clone(),
-            multiple: g.multiple,
-        }
-    }
-}
-
-#[cfg(feature = "yaml")]
-impl<'a> From<&'a BTreeMap<Yaml, Yaml>> for ArgGroup<'a> {
-    fn from(b: &'a BTreeMap<Yaml, Yaml>) -> Self {
-        // We WANT this to panic on error...so expect() is good.
-        let mut a = ArgGroup::default();
-        let group_settings = if b.len() == 1 {
-            let name_yml = b.keys().nth(0).expect("failed to get name");
-            let name_str = name_yml.as_str().expect("failed to convert arg YAML name to str");
-            a.name = name_str;
-            b.get(name_yml)
-                .expect("failed to get name_str")
-                .as_hash()
-                .expect("failed to convert to a hash")
-        } else {
-            b
-        };
-
-        for (k, v) in group_settings.iter() {
-            a = match k.as_str().unwrap() {
-                "required" => a.required(v.as_bool().unwrap()),
-                "multiple" => a.multiple(v.as_bool().unwrap()),
-                "args" => yaml_vec_or_str!(v, a, arg),
-                "arg" => {
-                    if let Some(ys) = v.as_str() {
-                        a = a.arg(ys);
-                    }
-                    a
-                }
-                "requires" => yaml_vec_or_str!(v, a, requires),
-                "conflicts_with" => yaml_vec_or_str!(v, a, conflicts_with),
-                "name" => {
-                    if let Some(ys) = v.as_str() {
-                        a.name = ys;
-                    }
-                    a
-                }
-                s => {
-                    panic!("Unknown ArgGroup setting '{}' in YAML file for \
-                             ArgGroup '{}'",
-                           s,
-                           a.name)
-                }
-            }
-        }
-
-        a
-    }
-}
-
-#[cfg(test)]
-mod test {
-    use super::ArgGroup;
-    #[cfg(feature = "yaml")]
-    use yaml_rust::YamlLoader;
-
-    #[test]
-    fn groups() {
-        let g = ArgGroup::with_name("test")
-            .arg("a1")
-            .arg("a4")
-            .args(&["a2", "a3"])
-            .required(true)
-            .conflicts_with("c1")
-            .conflicts_with_all(&["c2", "c3"])
-            .conflicts_with("c4")
-            .requires("r1")
-            .requires_all(&["r2", "r3"])
-            .requires("r4");
-
-        let args = vec!["a1", "a4", "a2", "a3"];
-        let reqs = vec!["r1", "r2", "r3", "r4"];
-        let confs = vec!["c1", "c2", "c3", "c4"];
-
-        assert_eq!(g.args, args);
-        assert_eq!(g.requires, Some(reqs));
-        assert_eq!(g.conflicts, Some(confs));
-    }
-
-    #[test]
-    fn test_debug() {
-        let g = ArgGroup::with_name("test")
-            .arg("a1")
-            .arg("a4")
-            .args(&["a2", "a3"])
-            .required(true)
-            .conflicts_with("c1")
-            .conflicts_with_all(&["c2", "c3"])
-            .conflicts_with("c4")
-            .requires("r1")
-            .requires_all(&["r2", "r3"])
-            .requires("r4");
-
-        let args = vec!["a1", "a4", "a2", "a3"];
-        let reqs = vec!["r1", "r2", "r3", "r4"];
-        let confs = vec!["c1", "c2", "c3", "c4"];
-
-        let debug_str = format!("{{\n\
-                   \tname: \"test\",\n\
-                   \targs: {:?},\n\
-                   \trequired: {:?},\n\
-                   \trequires: {:?},\n\
-                   \tconflicts: {:?},\n\
-               }}",
-                                args,
-                                true,
-                                Some(reqs),
-                                Some(confs));
-        assert_eq!(&*format!("{:?}", g), &*debug_str);
-    }
-
-    #[test]
-    fn test_from() {
-        let g = ArgGroup::with_name("test")
-            .arg("a1")
-            .arg("a4")
-            .args(&["a2", "a3"])
-            .required(true)
-            .conflicts_with("c1")
-            .conflicts_with_all(&["c2", "c3"])
-            .conflicts_with("c4")
-            .requires("r1")
-            .requires_all(&["r2", "r3"])
-            .requires("r4");
-
-        let args = vec!["a1", "a4", "a2", "a3"];
-        let reqs = vec!["r1", "r2", "r3", "r4"];
-        let confs = vec!["c1", "c2", "c3", "c4"];
-
-        let g2 = ArgGroup::from(&g);
-        assert_eq!(g2.args, args);
-        assert_eq!(g2.requires, Some(reqs));
-        assert_eq!(g2.conflicts, Some(confs));
-    }
-
-    #[cfg(feature="yaml")]
-    #[cfg_attr(feature = "yaml", test)]
-    fn test_yaml() {
-
-        let g_yaml = "name: test
-args:
-- a1
-- a4
-- a2
-- a3
-conflicts_with:
-- c1
-- c2
-- c3
-- c4
-requires:
-- r1
-- r2
-- r3
-- r4";
-        let yml = &YamlLoader::load_from_str(g_yaml).expect("failed to load YAML file")[0];
-        let g = ArgGroup::from_yaml(yml);
-        let args = vec!["a1", "a4", "a2", "a3"];
-        let reqs = vec!["r1", "r2", "r3", "r4"];
-        let confs = vec!["c1", "c2", "c3", "c4"];
-        assert_eq!(g.args, args);
-        assert_eq!(g.requires, Some(reqs));
-        assert_eq!(g.conflicts, Some(confs));
-    }
-}
-
-impl<'a> Clone for ArgGroup<'a> {
-    fn clone(&self) -> Self {
-        ArgGroup {
-            name: self.name,
-            required: self.required,
-            args: self.args.clone(),
-            requires: self.requires.clone(),
-            conflicts: self.conflicts.clone(),
-            multiple: self.multiple,
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/args/macros.rs
+++ /dev/null
@@ -1,102 +0,0 @@
-
-macro_rules! yaml_tuple2 {
-    ($a:ident, $v:ident, $c:ident) => {{
-            if let Some(vec) = $v.as_vec() {
-                for ys in vec {
-                    if let Some(tup) = ys.as_vec() {
-                        debug_assert_eq!(2, tup.len());
-                        $a = $a.$c(yaml_str!(tup[0]), yaml_str!(tup[1]));
-                    } else {
-                        panic!("Failed to convert YAML value to vec");
-                    }
-                }
-            } else {
-                panic!("Failed to convert YAML value to vec");
-            }
-            $a
-        }
-    };
-}
-
-macro_rules! yaml_tuple3 {
-    ($a:ident, $v:ident, $c:ident) => {{
-            if let Some(vec) = $v.as_vec() {
-                for ys in vec {
-                    if let Some(tup) = ys.as_vec() {
-                        debug_assert_eq!(3, tup.len());
-                        $a = $a.$c(yaml_str!(tup[0]), yaml_opt_str!(tup[1]), yaml_str!(tup[2]));
-                    } else {
-                        panic!("Failed to convert YAML value to vec");
-                    }
-                }
-            } else {
-                panic!("Failed to convert YAML value to vec");
-            }
-            $a
-        }
-    };
-}
-
-macro_rules! yaml_vec_or_str {
-    ($v:ident, $a:ident, $c:ident) => {{
-            let maybe_vec = $v.as_vec();
-            if let Some(vec) = maybe_vec {
-                for ys in vec {
-                    if let Some(s) = ys.as_str() {
-                        $a = $a.$c(s);
-                    } else {
-                        panic!("Failed to convert YAML value {:?} to a string", ys);
-                    }
-                }
-            } else {
-                if let Some(s) = $v.as_str() {
-                    $a = $a.$c(s);
-                } else {
-                    panic!("Failed to convert YAML value {:?} to either a vec or string", $v);
-                }
-            }
-            $a
-        }
-    };
-}
-
-macro_rules! yaml_opt_str {
-    ($v:expr) => {{
-        if $v.is_null() {
-            Some($v.as_str().unwrap_or_else(|| panic!("failed to convert YAML {:?} value to a string", $v)))
-        } else {
-            None
-        }
-    }};
-}
-
-macro_rules! yaml_str {
-    ($v:expr) => {{
-        $v.as_str().unwrap_or_else(|| panic!("failed to convert YAML {:?} value to a string", $v))
-    }};
-}
-
-
-macro_rules! yaml_to_str {
-    ($a:ident, $v:ident, $c:ident) => {{
-        $a.$c(yaml_str!($v))
-    }};
-}
-
-macro_rules! yaml_to_bool {
-    ($a:ident, $v:ident, $c:ident) => {{
-        $a.$c($v.as_bool().unwrap_or_else(|| panic!("failed to convert YAML {:?} value to a string", $v)))
-    }};
-}
-
-macro_rules! yaml_to_u64 {
-    ($a:ident, $v:ident, $c:ident) => {{
-        $a.$c($v.as_i64().unwrap_or_else(|| panic!("failed to convert YAML {:?} value to a string", $v)) as u64)
-    }};
-}
-
-macro_rules! yaml_to_usize {
-    ($a:ident, $v:ident, $c:ident) => {{
-        $a.$c($v.as_i64().unwrap_or_else(|| panic!("failed to convert YAML {:?} value to a string", $v)) as usize)
-    }};
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/args/settings.rs
+++ /dev/null
@@ -1,165 +0,0 @@
-// Std
-use std::ascii::AsciiExt;
-use std::str::FromStr;
-
-bitflags! {
-    flags Flags: u16 {
-        const REQUIRED         = 1 << 0,
-        const MULTIPLE         = 1 << 1,
-        const EMPTY_VALS       = 1 << 2,
-        const GLOBAL           = 1 << 3,
-        const HIDDEN           = 1 << 4,
-        const TAKES_VAL        = 1 << 5,
-        const USE_DELIM        = 1 << 6,
-        const NEXT_LINE_HELP   = 1 << 7,
-        const R_UNLESS_ALL     = 1 << 8,
-        const REQ_DELIM        = 1 << 9,
-        const DELIM_NOT_SET    = 1 << 10,
-        const HIDE_POS_VALS    = 1 << 11,
-        const ALLOW_TAC_VALS   = 1 << 12,
-        const REQUIRE_EQUALS   = 1 << 13,
-        const LAST             = 1 << 14,
-        const HIDE_DEFAULT_VAL = 1 << 15,
-    }
-}
-
-#[doc(hidden)]
-#[derive(Debug, Clone, Copy)]
-pub struct ArgFlags(Flags);
-
-impl ArgFlags {
-    pub fn new() -> Self { ArgFlags::default() }
-
-    impl_settings!{ArgSettings,
-        Required => REQUIRED,
-        Multiple => MULTIPLE,
-        EmptyValues => EMPTY_VALS,
-        Global => GLOBAL,
-        Hidden => HIDDEN,
-        TakesValue => TAKES_VAL,
-        UseValueDelimiter => USE_DELIM,
-        NextLineHelp => NEXT_LINE_HELP,
-        RequiredUnlessAll => R_UNLESS_ALL,
-        RequireDelimiter => REQ_DELIM,
-        ValueDelimiterNotSet => DELIM_NOT_SET,
-        HidePossibleValues => HIDE_POS_VALS,
-        AllowLeadingHyphen => ALLOW_TAC_VALS,
-        RequireEquals => REQUIRE_EQUALS,
-        Last => LAST,
-        HideDefaultValue => HIDE_DEFAULT_VAL
-    }
-}
-
-impl Default for ArgFlags {
-    fn default() -> Self { ArgFlags(EMPTY_VALS | DELIM_NOT_SET) }
-}
-
-/// Various settings that apply to arguments and may be set, unset, and checked via getter/setter
-/// methods [`Arg::set`], [`Arg::unset`], and [`Arg::is_set`]
-/// [`Arg::set`]: ./struct.Arg.html#method.set
-/// [`Arg::unset`]: ./struct.Arg.html#method.unset
-/// [`Arg::is_set`]: ./struct.Arg.html#method.is_set
-#[derive(Debug, PartialEq, Copy, Clone)]
-pub enum ArgSettings {
-    /// The argument must be used
-    Required,
-    /// The argument may be used multiple times such as `--flag --flag`
-    Multiple,
-    /// The argument allows empty values such as `--option ""`
-    EmptyValues,
-    /// The argument should be propagated down through all child [`SubCommands`]
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    Global,
-    /// The argument should **not** be shown in help text
-    Hidden,
-    /// The argument accepts a value, such as `--option <value>`
-    TakesValue,
-    /// Determines if the argument allows values to be grouped via a delimter
-    UseValueDelimiter,
-    /// Prints the help text on the line after the argument
-    NextLineHelp,
-    /// Requires the use of a value delimiter for all multiple values
-    RequireDelimiter,
-    /// Hides the possible values from the help string
-    HidePossibleValues,
-    /// Allows vals that start with a '-'
-    AllowLeadingHyphen,
-    /// Require options use `--option=val` syntax
-    RequireEquals,
-    /// Specifies that the arg is the last positional argument and may be accessed early via `--`
-    /// syntax
-    Last,
-    /// Hides the default value from the help string
-    HideDefaultValue,
-    #[doc(hidden)]
-    RequiredUnlessAll,
-    #[doc(hidden)]
-    ValueDelimiterNotSet,
-}
-
-impl FromStr for ArgSettings {
-    type Err = String;
-    fn from_str(s: &str) -> Result<Self, <Self as FromStr>::Err> {
-        match &*s.to_ascii_lowercase() {
-            "required" => Ok(ArgSettings::Required),
-            "multiple" => Ok(ArgSettings::Multiple),
-            "global" => Ok(ArgSettings::Global),
-            "emptyvalues" => Ok(ArgSettings::EmptyValues),
-            "hidden" => Ok(ArgSettings::Hidden),
-            "takesvalue" => Ok(ArgSettings::TakesValue),
-            "usevaluedelimiter" => Ok(ArgSettings::UseValueDelimiter),
-            "nextlinehelp" => Ok(ArgSettings::NextLineHelp),
-            "requiredunlessall" => Ok(ArgSettings::RequiredUnlessAll),
-            "requiredelimiter" => Ok(ArgSettings::RequireDelimiter),
-            "valuedelimiternotset" => Ok(ArgSettings::ValueDelimiterNotSet),
-            "hidepossiblevalues" => Ok(ArgSettings::HidePossibleValues),
-            "allowleadinghyphen" => Ok(ArgSettings::AllowLeadingHyphen),
-            "requireequals" => Ok(ArgSettings::RequireEquals),
-            "last" => Ok(ArgSettings::Last),
-            "hidedefaultvalue" => Ok(ArgSettings::HideDefaultValue),
-            _ => Err("unknown ArgSetting, cannot convert from str".to_owned()),
-        }
-    }
-}
-
-#[cfg(test)]
-mod test {
-    use super::ArgSettings;
-
-    #[test]
-    fn arg_settings_fromstr() {
-        assert_eq!("allowleadinghyphen".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::AllowLeadingHyphen);
-        assert_eq!("emptyvalues".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::EmptyValues);
-        assert_eq!("global".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::Global);
-        assert_eq!("hidepossiblevalues".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::HidePossibleValues);
-        assert_eq!("hidden".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::Hidden);
-        assert_eq!("multiple".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::Multiple);
-        assert_eq!("nextlinehelp".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::NextLineHelp);
-        assert_eq!("requiredunlessall".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::RequiredUnlessAll);
-        assert_eq!("requiredelimiter".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::RequireDelimiter);
-        assert_eq!("required".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::Required);
-        assert_eq!("takesvalue".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::TakesValue);
-        assert_eq!("usevaluedelimiter".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::UseValueDelimiter);
-        assert_eq!("valuedelimiternotset".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::ValueDelimiterNotSet);
-        assert_eq!("requireequals".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::RequireEquals);
-        assert_eq!("last".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::Last);
-        assert_eq!("hidedefaultvalue".parse::<ArgSettings>().unwrap(),
-                   ArgSettings::HideDefaultValue);
-        assert!("hahahaha".parse::<ArgSettings>().is_err());
-    }
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/completions/powershell.rs
+++ /dev/null
@@ -1,127 +0,0 @@
-
-// Std
-use std::io::Write;
-
-// Internal
-use app::parser::Parser;
-use INTERNAL_ERROR_MSG;
-
-pub struct PowerShellGen<'a, 'b>
-    where 'a: 'b
-{
-    p: &'b Parser<'a, 'b>,
-}
-
-impl<'a, 'b> PowerShellGen<'a, 'b> {
-    pub fn new(p: &'b Parser<'a, 'b>) -> Self { PowerShellGen { p: p } }
-
-    pub fn generate_to<W: Write>(&self, buf: &mut W) {
-        let bin_name = self.p.meta.bin_name.as_ref().unwrap();
-
-        let mut names = vec![];
-        let (subcommands_detection_cases, subcommands_cases) = generate_inner(self.p, "", &mut names);
-
-        let mut bin_names = vec![bin_name.to_string(), format!("./{0}", bin_name)];
-        if cfg!(windows) {
-            bin_names.push(format!("{0}.exe", bin_name));
-            bin_names.push(format!(r".\{0}", bin_name));
-            bin_names.push(format!(r".\{0}.exe", bin_name));
-            bin_names.push(format!(r"./{0}.exe", bin_name));
-        }
-
-        let bin_names = bin_names.iter().fold(String::new(), |previous, current| {
-            format!("{0}, '{1}'", previous, current)
-        });
-        let bin_names = bin_names.trim_left_matches(", ");
-
-        let result = format!(r#"
-@({bin_names}) | %{{
-    Register-ArgumentCompleter -Native -CommandName $_ -ScriptBlock {{
-        param($wordToComplete, $commandAst, $cursorPosition)
-
-        $command = '_{bin_name}'
-        $commandAst.CommandElements |
-            Select-Object -Skip 1 |
-            %{{
-                switch ($_.ToString()) {{
-{subcommands_detection_cases}
-                    default {{ 
-                        break
-                    }}
-                }}
-            }}
-
-        $completions = @()
-
-        switch ($command) {{
-{subcommands_cases}
-        }}
-
-        $completions |
-            ?{{ $_ -like "$wordToComplete*" }} |
-            Sort-Object |
-            %{{ New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }}
-    }}
-}}
-"#,
-            bin_names = bin_names,
-            bin_name = bin_name,
-            subcommands_detection_cases = subcommands_detection_cases,
-            subcommands_cases = subcommands_cases
-        );
-
-        w!(buf, result.as_bytes());
-    }
-}
-
-fn generate_inner<'a, 'b, 'p>(p: &'p Parser<'a, 'b>, previous_command_name: &str, names: &mut Vec<&'p str>) -> (String, String) {
-    debugln!("PowerShellGen::generate_inner;");
-    let command_name = if previous_command_name.is_empty() {
-        format!("{}_{}", previous_command_name, &p.meta.bin_name.as_ref().expect(INTERNAL_ERROR_MSG))
-    } else {
-        format!("{}_{}", previous_command_name, &p.meta.name)
-    };
-
-    let mut subcommands_detection_cases = if previous_command_name.is_empty() {
-        String::new()
-    } else if !names.contains(&&*p.meta.name) {
-        names.push(&&*p.meta.name);
-        format!(r"
-                    '{0}' {{
-                        $command += '_{0}'
-                        break
-                    }}
-",
-                &p.meta.name)
-    } else {
-        String::new()
-    };
-
-    let mut completions = String::new();
-    for subcommand in &p.subcommands {
-        completions.push_str(&format!("'{}', ", &subcommand.p.meta.name));
-    }
-    for short in shorts!(p) {
-        completions.push_str(&format!("'-{}', ", short));
-    }
-    for long in longs!(p) {
-        completions.push_str(&format!("'--{}', ", long));
-    }
-
-    let mut subcommands_cases = format!(r"
-            '{}' {{
-                $completions = @({})
-            }}
-",
-                                        &command_name,
-                                        completions.trim_right_matches(", "));
-
-    for subcommand in &p.subcommands {
-        let (subcommand_subcommands_detection_cases, subcommand_subcommands_cases) =
-            generate_inner(&subcommand.p, &command_name, names);
-        subcommands_detection_cases.push_str(&subcommand_subcommands_detection_cases);
-        subcommands_cases.push_str(&subcommand_subcommands_cases);
-    }
-
-    (subcommands_detection_cases, subcommands_cases)
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/errors.rs
+++ /dev/null
@@ -1,884 +0,0 @@
-// Std
-use std::convert::From;
-use std::error::Error as StdError;
-use std::fmt as std_fmt;
-use std::fmt::Display;
-use std::io::{self, Write};
-use std::process;
-use std::result::Result as StdResult;
-
-// Internal
-use args::{FlagBuilder, AnyArg};
-use fmt;
-use suggestions;
-
-/// Short hand for [`Result`] type
-/// [`Result`]: https://doc.rust-lang.org/std/result/enum.Result.html
-pub type Result<T> = StdResult<T, Error>;
-
-/// Command line argument parser kind of error
-#[derive(Debug, Copy, Clone, PartialEq)]
-pub enum ErrorKind {
-    /// Occurs when an [`Arg`] has a set of possible values,
-    /// and the user provides a value which isn't in that set.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind};
-    /// let result = App::new("prog")
-    ///     .arg(Arg::with_name("speed")
-    ///         .possible_value("fast")
-    ///         .possible_value("slow"))
-    ///     .get_matches_from_safe(vec!["prog", "other"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::InvalidValue);
-    /// ```
-    /// [`Arg`]: ./struct.Arg.html
-    InvalidValue,
-
-    /// Occurs when a user provides a flag, option, argument or subcommand which isn't defined.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind};
-    /// let result = App::new("prog")
-    ///     .arg(Arg::from_usage("--flag 'some flag'"))
-    ///     .get_matches_from_safe(vec!["prog", "--other"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::UnknownArgument);
-    /// ```
-    UnknownArgument,
-
-    /// Occurs when the user provides an unrecognized [`SubCommand`] which meets the threshold for
-    /// being similar enough to an existing subcommand.
-    /// If it doesn't meet the threshold, or the 'suggestions' feature is disabled,
-    /// the more general [`UnknownArgument`] error is returned.
-    ///
-    /// # Examples
-    ///
-    #[cfg_attr(not(feature="suggestions"), doc=" ```no_run")]
-    #[cfg_attr(    feature="suggestions" , doc=" ```")]
-    /// # use clap::{App, Arg, ErrorKind, SubCommand};
-    /// let result = App::new("prog")
-    ///     .subcommand(SubCommand::with_name("config")
-    ///         .about("Used for configuration")
-    ///         .arg(Arg::with_name("config_file")
-    ///             .help("The configuration file to use")
-    ///             .index(1)))
-    ///     .get_matches_from_safe(vec!["prog", "confi"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::InvalidSubcommand);
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    /// [`UnknownArgument`]: ./enum.ErrorKind.html#variant.UnknownArgument
-    InvalidSubcommand,
-
-    /// Occurs when the user provides an unrecognized [`SubCommand`] which either
-    /// doesn't meet the threshold for being similar enough to an existing subcommand,
-    /// or the 'sggestions' feature is disabled.
-    /// Otherwise the more detailed [`InvalidSubcommand`] error is returned.
-    ///
-    /// This error typically happens when passing additional subcommand names to the `help`
-    /// subcommand. Otherwise, the more general [`UnknownArgument`] error is used.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind, SubCommand};
-    /// let result = App::new("prog")
-    ///     .subcommand(SubCommand::with_name("config")
-    ///         .about("Used for configuration")
-    ///         .arg(Arg::with_name("config_file")
-    ///             .help("The configuration file to use")
-    ///             .index(1)))
-    ///     .get_matches_from_safe(vec!["prog", "help", "nothing"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::UnrecognizedSubcommand);
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    /// [`InvalidSubcommand`]: ./enum.ErrorKind.html#variant.InvalidSubcommand
-    /// [`UnknownArgument`]: ./enum.ErrorKind.html#variant.UnknownArgument
-    UnrecognizedSubcommand,
-
-    /// Occurs when the user provides an empty value for an option that does not allow empty
-    /// values.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind};
-    /// let res = App::new("prog")
-    ///     .arg(Arg::with_name("color")
-    ///          .long("color")
-    ///          .empty_values(false))
-    ///     .get_matches_from_safe(vec!["prog", "--color="]);
-    /// assert!(res.is_err());
-    /// assert_eq!(res.unwrap_err().kind, ErrorKind::EmptyValue);
-    /// ```
-    EmptyValue,
-
-    /// Occurs when the user provides a value for an argument with a custom validation and the
-    /// value fails that validation.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind};
-    /// fn is_numeric(val: String) -> Result<(), String> {
-    ///     match val.parse::<i64>() {
-    ///         Ok(..) => Ok(()),
-    ///         Err(..) => Err(String::from("Value wasn't a number!")),
-    ///     }
-    /// }
-    ///
-    /// let result = App::new("prog")
-    ///     .arg(Arg::with_name("num")
-    ///          .validator(is_numeric))
-    ///     .get_matches_from_safe(vec!["prog", "NotANumber"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::ValueValidation);
-    /// ```
-    ValueValidation,
-
-    /// Occurs when a user provides more values for an argument than were defined by setting
-    /// [`Arg::max_values`].
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind};
-    /// let result = App::new("prog")
-    ///     .arg(Arg::with_name("arg")
-    ///         .multiple(true)
-    ///         .max_values(2))
-    ///     .get_matches_from_safe(vec!["prog", "too", "many", "values"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::TooManyValues);
-    /// ```
-    /// [`Arg::max_values`]: ./struct.Arg.html#method.max_values
-    TooManyValues,
-
-    /// Occurs when the user provides fewer values for an argument than were defined by setting
-    /// [`Arg::min_values`].
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind};
-    /// let result = App::new("prog")
-    ///     .arg(Arg::with_name("some_opt")
-    ///         .long("opt")
-    ///         .min_values(3))
-    ///     .get_matches_from_safe(vec!["prog", "--opt", "too", "few"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::TooFewValues);
-    /// ```
-    /// [`Arg::min_values`]: ./struct.Arg.html#method.min_values
-    TooFewValues,
-
-    /// Occurs when the user provides a different number of values for an argument than what's
-    /// been defined by setting [`Arg::number_of_values`] or than was implicitly set by
-    /// [`Arg::value_names`].
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind};
-    /// let result = App::new("prog")
-    ///     .arg(Arg::with_name("some_opt")
-    ///         .long("opt")
-    ///         .takes_value(true)
-    ///         .number_of_values(2))
-    ///     .get_matches_from_safe(vec!["prog", "--opt", "wrong"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::WrongNumberOfValues);
-    /// ```
-    /// [`Arg::number_of_values`]
-    /// [`Arg::number_of_values`]: ./struct.Arg.html#method.number_of_values
-    /// [`Arg::value_names`]: ./struct.Arg.html#method.value_names
-    WrongNumberOfValues,
-
-    /// Occurs when the user provides two values which conflict with each other and can't be used
-    /// together.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind};
-    /// let result = App::new("prog")
-    ///     .arg(Arg::with_name("debug")
-    ///         .long("debug")
-    ///         .conflicts_with("color"))
-    ///     .arg(Arg::with_name("color")
-    ///         .long("color"))
-    ///     .get_matches_from_safe(vec!["prog", "--debug", "--color"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::ArgumentConflict);
-    /// ```
-    ArgumentConflict,
-
-    /// Occurs when the user does not provide one or more required arguments.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind};
-    /// let result = App::new("prog")
-    ///     .arg(Arg::with_name("debug")
-    ///         .required(true))
-    ///     .get_matches_from_safe(vec!["prog"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::MissingRequiredArgument);
-    /// ```
-    MissingRequiredArgument,
-
-    /// Occurs when a subcommand is required (as defined by [`AppSettings::SubcommandRequired`]),
-    /// but the user does not provide one.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, AppSettings, SubCommand, ErrorKind};
-    /// let err = App::new("prog")
-    ///     .setting(AppSettings::SubcommandRequired)
-    ///     .subcommand(SubCommand::with_name("test"))
-    ///     .get_matches_from_safe(vec![
-    ///         "myprog",
-    ///     ]);
-    /// assert!(err.is_err());
-    /// assert_eq!(err.unwrap_err().kind, ErrorKind::MissingSubcommand);
-    /// # ;
-    /// ```
-    /// [`AppSettings::SubcommandRequired`]: ./enum.AppSettings.html#variant.SubcommandRequired
-    MissingSubcommand,
-
-    /// Occurs when either an argument or [`SubCommand`] is required, as defined by
-    /// [`AppSettings::ArgRequiredElseHelp`], but the user did not provide one.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, AppSettings, ErrorKind, SubCommand};
-    /// let result = App::new("prog")
-    ///     .setting(AppSettings::ArgRequiredElseHelp)
-    ///     .subcommand(SubCommand::with_name("config")
-    ///         .about("Used for configuration")
-    ///         .arg(Arg::with_name("config_file")
-    ///             .help("The configuration file to use")))
-    ///     .get_matches_from_safe(vec!["prog"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::MissingArgumentOrSubcommand);
-    /// ```
-    /// [`SubCommand`]: ./struct.SubCommand.html
-    /// [`AppSettings::ArgRequiredElseHelp`]: ./enum.AppSettings.html#variant.ArgRequiredElseHelp
-    MissingArgumentOrSubcommand,
-
-    /// Occurs when the user provides multiple values to an argument which doesn't allow that.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind};
-    /// let result = App::new("prog")
-    ///     .arg(Arg::with_name("debug")
-    ///         .long("debug")
-    ///         .multiple(false))
-    ///     .get_matches_from_safe(vec!["prog", "--debug", "--debug"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::UnexpectedMultipleUsage);
-    /// ```
-    UnexpectedMultipleUsage,
-
-    /// Occurs when the user provides a value containing invalid UTF-8 for an argument and
-    /// [`AppSettings::StrictUtf8`] is set.
-    ///
-    /// # Platform Speicific
-    ///
-    /// Non-Windows platforms only (such as Linux, Unix, OSX, etc.)
-    ///
-    /// # Examples
-    ///
-    #[cfg_attr(not(unix), doc=" ```ignore")]
-    #[cfg_attr(    unix , doc=" ```")]
-    /// # use clap::{App, Arg, ErrorKind, AppSettings};
-    /// # use std::os::unix::ffi::OsStringExt;
-    /// # use std::ffi::OsString;
-    /// let result = App::new("prog")
-    ///     .setting(AppSettings::StrictUtf8)
-    ///     .arg(Arg::with_name("utf8")
-    ///         .short("u")
-    ///         .takes_value(true))
-    ///     .get_matches_from_safe(vec![OsString::from("myprog"),
-    ///                                 OsString::from("-u"),
-    ///                                 OsString::from_vec(vec![0xE9])]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::InvalidUtf8);
-    /// ```
-    /// [`AppSettings::StrictUtf8`]: ./enum.AppSettings.html#variant.StrictUtf8
-    InvalidUtf8,
-
-    /// Not a true "error" as it means `--help` or similar was used.
-    /// The help message will be sent to `stdout`.
-    ///
-    /// **Note**: If the help is displayed due to an error (such as missing subcommands) it will
-    /// be sent to `stderr` instead of `stdout`.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind};
-    /// let result = App::new("prog")
-    ///     .get_matches_from_safe(vec!["prog", "--help"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::HelpDisplayed);
-    /// ```
-    HelpDisplayed,
-
-    /// Not a true "error" as it means `--version` or similar was used.
-    /// The message will be sent to `stdout`.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// # use clap::{App, Arg, ErrorKind};
-    /// let result = App::new("prog")
-    ///     .get_matches_from_safe(vec!["prog", "--version"]);
-    /// assert!(result.is_err());
-    /// assert_eq!(result.unwrap_err().kind, ErrorKind::VersionDisplayed);
-    /// ```
-    VersionDisplayed,
-
-    /// Occurs when using the [`value_t!`] and [`values_t!`] macros to convert an argument value
-    /// into type `T`, but the argument you requested wasn't used. I.e. you asked for an argument
-    /// with name `config` to be converted, but `config` wasn't used by the user.
-    /// [`value_t!`]: ./macro.value_t!.html
-    /// [`values_t!`]: ./macro.values_t!.html
-    ArgumentNotFound,
-
-    /// Represents an [I/O error].
-    /// Can occur when writing to `stderr` or `stdout` or reading a configuration file.
-    /// [I/O error]: https://doc.rust-lang.org/std/io/struct.Error.html
-    Io,
-
-    /// Represents a [Format error] (which is a part of [`Display`]).
-    /// Typically caused by writing to `stderr` or `stdout`.
-    /// [`Display`]: https://doc.rust-lang.org/std/fmt/trait.Display.html
-    /// [Format error]: https://doc.rust-lang.org/std/fmt/struct.Error.html
-    Format,
-}
-
-/// Command Line Argument Parser Error
-#[derive(Debug)]
-pub struct Error {
-    /// Formated error message
-    pub message: String,
-    /// The type of error
-    pub kind: ErrorKind,
-    /// Any additional information passed along, such as the argument name that caused the error
-    pub info: Option<Vec<String>>,
-}
-
-impl Error {
-    /// Should the message be written to `stdout` or not
-    pub fn use_stderr(&self) -> bool {
-        match self.kind {
-            ErrorKind::HelpDisplayed |
-            ErrorKind::VersionDisplayed => false,
-            _ => true,
-        }
-    }
-
-    /// Prints the error to `stderr` and exits with a status of `1`
-    pub fn exit(&self) -> ! {
-        if self.use_stderr() {
-            wlnerr!("{}", self.message);
-            process::exit(1);
-        }
-        let out = io::stdout();
-        writeln!(&mut out.lock(), "{}", self.message).expect("Error writing Error to stdout");
-        process::exit(0);
-    }
-
-    #[doc(hidden)]
-    pub fn write_to<W: Write>(&self, w: &mut W) -> io::Result<()> { write!(w, "{}", self.message) }
-
-    #[doc(hidden)]
-    pub fn argument_conflict<'a, 'b, A, O, U>(arg: &A,
-                                              other: Option<O>,
-                                              usage: U,
-                                              color: fmt::ColorWhen)
-                                              -> Self
-        where A: AnyArg<'a, 'b> + Display,
-              O: Into<String>,
-              U: Display
-    {
-        let mut v = vec![arg.name().to_owned()];
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} The argument '{}' cannot be used with {}\n\n\
-                            {}\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             c.warning(&*arg.to_string()),
-                             match other {
-                                 Some(name) => {
-                                     let n = name.into();
-                                     v.push(n.clone());
-                                     c.warning(format!("'{}'", n))
-                                 }
-                                 None => {
-                                     c.none("one or more of the other specified arguments"
-                                         .to_owned())
-                                 }
-                             },
-                             usage,
-                             c.good("--help")),
-            kind: ErrorKind::ArgumentConflict,
-            info: Some(v),
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn empty_value<'a, 'b, A, U>(arg: &A, usage: U, color: fmt::ColorWhen) -> Self
-        where A: AnyArg<'a, 'b> + Display,
-              U: Display
-    {
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} The argument '{}' requires a value but none was supplied\
-                            \n\n\
-                            {}\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             c.warning(arg.to_string()),
-                             usage,
-                             c.good("--help")),
-            kind: ErrorKind::EmptyValue,
-            info: Some(vec![arg.name().to_owned()]),
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn invalid_value<'a, 'b, B, G, A, U>(bad_val: B,
-                                             good_vals: &[G],
-                                             arg: &A,
-                                             usage: U,
-                                             color: fmt::ColorWhen)
-                                             -> Self
-        where B: AsRef<str>,
-              G: AsRef<str> + Display,
-              A: AnyArg<'a, 'b> + Display,
-              U: Display
-    {
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        let suffix =
-            suggestions::did_you_mean_suffix(bad_val.as_ref(),
-                                             good_vals.iter(),
-                                             suggestions::DidYouMeanMessageStyle::EnumValue);
-
-        let mut sorted = vec![];
-        for v in good_vals {
-            let val = format!("{}", c.good(v));
-            sorted.push(val);
-        }
-        sorted.sort();
-        let valid_values = sorted.join(", ");
-        Error {
-            message: format!("{} '{}' isn't a valid value for '{}'\n\t\
-                            [values: {}]\n\
-                            {}\n\n\
-                            {}\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             c.warning(bad_val.as_ref()),
-                             c.warning(arg.to_string()),
-                             valid_values,
-                             suffix.0,
-                             usage,
-                             c.good("--help")),
-            kind: ErrorKind::InvalidValue,
-            info: Some(vec![arg.name().to_owned(), bad_val.as_ref().to_owned()]),
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn invalid_subcommand<S, D, N, U>(subcmd: S,
-                                          did_you_mean: D,
-                                          name: N,
-                                          usage: U,
-                                          color: fmt::ColorWhen)
-                                          -> Self
-        where S: Into<String>,
-              D: AsRef<str> + Display,
-              N: Display,
-              U: Display
-    {
-        let s = subcmd.into();
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} The subcommand '{}' wasn't recognized\n\t\
-                            Did you mean '{}'?\n\n\
-                            If you believe you received this message in error, try \
-                            re-running with '{} {} {}'\n\n\
-                            {}\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             c.warning(&*s),
-                             c.good(did_you_mean.as_ref()),
-                             name,
-                             c.good("--"),
-                             &*s,
-                             usage,
-                             c.good("--help")),
-            kind: ErrorKind::InvalidSubcommand,
-            info: Some(vec![s]),
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn unrecognized_subcommand<S, N>(subcmd: S, name: N, color: fmt::ColorWhen) -> Self
-        where S: Into<String>,
-              N: Display
-    {
-        let s = subcmd.into();
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} The subcommand '{}' wasn't recognized\n\n\
-                            {}\n\t\
-                                {} help <subcommands>...\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             c.warning(&*s),
-                             c.warning("USAGE:"),
-                             name,
-                             c.good("--help")),
-            kind: ErrorKind::UnrecognizedSubcommand,
-            info: Some(vec![s]),
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn missing_required_argument<R, U>(required: R, usage: U, color: fmt::ColorWhen) -> Self
-        where R: Display,
-              U: Display
-    {
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} The following required arguments were not provided:{}\n\n\
-                            {}\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             required,
-                             usage,
-                             c.good("--help")),
-            kind: ErrorKind::MissingRequiredArgument,
-            info: None,
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn missing_subcommand<N, U>(name: N, usage: U, color: fmt::ColorWhen) -> Self
-        where N: AsRef<str> + Display,
-              U: Display
-    {
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} '{}' requires a subcommand, but one was not provided\n\n\
-                            {}\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             c.warning(name),
-                             usage,
-                             c.good("--help")),
-            kind: ErrorKind::MissingSubcommand,
-            info: None,
-        }
-    }
-
-
-    #[doc(hidden)]
-    pub fn invalid_utf8<U>(usage: U, color: fmt::ColorWhen) -> Self
-        where U: Display
-    {
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} Invalid UTF-8 was detected in one or more arguments\n\n\
-                            {}\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             usage,
-                             c.good("--help")),
-            kind: ErrorKind::InvalidUtf8,
-            info: None,
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn too_many_values<'a, 'b, V, A, U>(val: V,
-                                            arg: &A,
-                                            usage: U,
-                                            color: fmt::ColorWhen)
-                                            -> Self
-        where V: AsRef<str> + Display + ToOwned,
-              A: AnyArg<'a, 'b> + Display,
-              U: Display
-    {
-        let v = val.as_ref();
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} The value '{}' was provided to '{}', but it wasn't expecting \
-                            any more values\n\n\
-                            {}\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             c.warning(v),
-                             c.warning(arg.to_string()),
-                             usage,
-                             c.good("--help")),
-            kind: ErrorKind::TooManyValues,
-            info: Some(vec![arg.name().to_owned(), v.to_owned()]),
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn too_few_values<'a, 'b, A, U>(arg: &A,
-                                        min_vals: u64,
-                                        curr_vals: usize,
-                                        usage: U,
-                                        color: fmt::ColorWhen)
-                                        -> Self
-        where A: AnyArg<'a, 'b> + Display,
-              U: Display
-    {
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} The argument '{}' requires at least {} values, but only {} w{} \
-                            provided\n\n\
-                            {}\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             c.warning(arg.to_string()),
-                             c.warning(min_vals.to_string()),
-                             c.warning(curr_vals.to_string()),
-                             if curr_vals > 1 { "ere" } else { "as" },
-                             usage,
-                             c.good("--help")),
-            kind: ErrorKind::TooFewValues,
-            info: Some(vec![arg.name().to_owned()]),
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn value_validation<'a, 'b, A>(arg: Option<&A>, err: String, color: fmt::ColorWhen) -> Self
-        where A: AnyArg<'a, 'b> + Display
-    {
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} Invalid value{}: {}",
-                             c.error("error:"),
-                             if let Some(a) = arg {
-                                 format!(" for '{}'", c.warning(a.to_string()))
-                             } else {
-                                 "".to_string()
-                             },
-                             err),
-            kind: ErrorKind::ValueValidation,
-            info: None,
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn value_validation_auto(err: String) -> Self {
-        let n: Option<&FlagBuilder> = None; 
-        Error::value_validation(n, err, fmt::ColorWhen::Auto)
-    }
-
-    #[doc(hidden)]
-    pub fn wrong_number_of_values<'a, 'b, A, S, U>(arg: &A,
-                                                   num_vals: u64,
-                                                   curr_vals: usize,
-                                                   suffix: S,
-                                                   usage: U,
-                                                   color: fmt::ColorWhen)
-                                                   -> Self
-        where A: AnyArg<'a, 'b> + Display,
-              S: Display,
-              U: Display
-    {
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} The argument '{}' requires {} values, but {} w{} \
-                            provided\n\n\
-                            {}\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             c.warning(arg.to_string()),
-                             c.warning(num_vals.to_string()),
-                             c.warning(curr_vals.to_string()),
-                             suffix,
-                             usage,
-                             c.good("--help")),
-            kind: ErrorKind::WrongNumberOfValues,
-            info: Some(vec![arg.name().to_owned()]),
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn unexpected_multiple_usage<'a, 'b, A, U>(arg: &A, usage: U, color: fmt::ColorWhen) -> Self
-        where A: AnyArg<'a, 'b> + Display,
-              U: Display
-    {
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} The argument '{}' was provided more than once, but cannot \
-                            be used multiple times\n\n\
-                            {}\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             c.warning(arg.to_string()),
-                             usage,
-                             c.good("--help")),
-            kind: ErrorKind::UnexpectedMultipleUsage,
-            info: Some(vec![arg.name().to_owned()]),
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn unknown_argument<A, U>(arg: A,
-                                  did_you_mean: &str,
-                                  usage: U,
-                                  color: fmt::ColorWhen)
-                                  -> Self
-        where A: Into<String>,
-              U: Display
-    {
-        let a = arg.into();
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} Found argument '{}' which wasn't expected, or isn't valid in \
-            this context{}\n\
-                            {}\n\n\
-                            For more information try {}",
-                             c.error("error:"),
-                             c.warning(&*a),
-                             if did_you_mean.is_empty() {
-                                 "\n".to_owned()
-                             } else {
-                                 format!("{}\n", did_you_mean)
-                             },
-                             usage,
-                             c.good("--help")),
-            kind: ErrorKind::UnknownArgument,
-            info: Some(vec![a]),
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn io_error(e: &Error, color: fmt::ColorWhen) -> Self {
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: color,
-        };
-        Error {
-            message: format!("{} {}", c.error("error:"), e.description()),
-            kind: ErrorKind::Io,
-            info: None,
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn argument_not_found_auto<A>(arg: A) -> Self
-        where A: Into<String>
-    {
-        let a = arg.into();
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: fmt::ColorWhen::Auto,
-        };
-        Error {
-            message: format!("{} The argument '{}' wasn't found",
-                             c.error("error:"),
-                             a.clone()),
-            kind: ErrorKind::ArgumentNotFound,
-            info: Some(vec![a]),
-        }
-    }
-
-    /// Create an error with a custom description.
-    ///
-    /// This can be used in combination with `Error::exit` to exit your program
-    /// with a custom error message.
-    pub fn with_description(description: &str, kind: ErrorKind) -> Self {
-        let c = fmt::Colorizer {
-            use_stderr: true,
-            when: fmt::ColorWhen::Auto,
-        };
-        Error {
-            message: format!("{} {}", c.error("error:"), description),
-            kind: kind,
-            info: None,
-        }
-    }
-}
-
-impl StdError for Error {
-    fn description(&self) -> &str { &*self.message }
-}
-
-impl Display for Error {
-    fn fmt(&self, f: &mut std_fmt::Formatter) -> std_fmt::Result { writeln!(f, "{}", self.message) }
-}
-
-impl From<io::Error> for Error {
-    fn from(e: io::Error) -> Self { Error::with_description(e.description(), ErrorKind::Io) }
-}
-
-impl From<std_fmt::Error> for Error {
-    fn from(e: std_fmt::Error) -> Self {
-        Error::with_description(e.description(), ErrorKind::Format)
-    }
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/fmt.rs
+++ /dev/null
@@ -1,165 +0,0 @@
-#[cfg(all(feature = "color", not(target_os = "windows")))]
-use ansi_term::ANSIString;
-
-#[cfg(all(feature = "color", not(target_os = "windows")))]
-use ansi_term::Colour::{Green, Red, Yellow};
-
-#[cfg(feature = "color")]
-use atty;
-use std::fmt;
-
-#[doc(hidden)]
-#[derive(Debug, Copy, Clone, PartialEq)]
-pub enum ColorWhen {
-    Auto,
-    Always,
-    Never,
-}
-
-#[cfg(feature = "color")]
-pub fn is_a_tty(stderr: bool) -> bool {
-    debugln!("is_a_tty: stderr={:?}", stderr);
-    let stream = if stderr {
-        atty::Stream::Stderr
-    } else {
-        atty::Stream::Stdout
-    };
-    atty::is(stream)
-}
-
-#[cfg(not(feature = "color"))]
-pub fn is_a_tty(_: bool) -> bool {
-    debugln!("is_a_tty;");
-    false
-}
-
-#[doc(hidden)]
-pub struct Colorizer {
-    pub use_stderr: bool,
-    pub when: ColorWhen,
-}
-
-macro_rules! color {
-    ($_self:ident, $c:ident, $m:expr) => {
-        match $_self.when {
-            ColorWhen::Auto => if is_a_tty($_self.use_stderr) {
-                Format::$c($m)
-            } else {
-                Format::None($m)
-            },
-            ColorWhen::Always => Format::$c($m),
-            ColorWhen::Never => Format::None($m),
-        }
-    };
-}
-
-impl Colorizer {
-    pub fn good<T>(&self, msg: T) -> Format<T>
-        where T: fmt::Display + AsRef<str>
-    {
-        debugln!("Colorizer::good;");
-        color!(self, Good, msg)
-    }
-
-    pub fn warning<T>(&self, msg: T) -> Format<T>
-        where T: fmt::Display + AsRef<str>
-    {
-        debugln!("Colorizer::warning;");
-        color!(self, Warning, msg)
-    }
-
-    pub fn error<T>(&self, msg: T) -> Format<T>
-        where T: fmt::Display + AsRef<str>
-    {
-        debugln!("Colorizer::error;");
-        color!(self, Error, msg)
-    }
-
-    pub fn none<T>(&self, msg: T) -> Format<T>
-        where T: fmt::Display + AsRef<str>
-    {
-        debugln!("Colorizer::none;");
-        Format::None(msg)
-    }
-}
-
-impl Default for Colorizer {
-    fn default() -> Self {
-        Colorizer {
-            use_stderr: true,
-            when: ColorWhen::Auto,
-        }
-    }
-}
-
-/// Defines styles for different types of error messages. Defaults to Error=Red, Warning=Yellow,
-/// and Good=Green
-#[derive(Debug)]
-#[doc(hidden)]
-pub enum Format<T> {
-    /// Defines the style used for errors, defaults to Red
-    Error(T),
-    /// Defines the style used for warnings, defaults to Yellow
-    Warning(T),
-    /// Defines the style used for good values, defaults to Green
-    Good(T),
-    /// Defines no formatting style
-    None(T),
-}
-
-#[cfg(all(feature = "color", not(target_os = "windows")))]
-impl<T: AsRef<str>> Format<T> {
-    fn format(&self) -> ANSIString {
-        match *self {
-            Format::Error(ref e) => Red.bold().paint(e.as_ref()),
-            Format::Warning(ref e) => Yellow.paint(e.as_ref()),
-            Format::Good(ref e) => Green.paint(e.as_ref()),
-            Format::None(ref e) => ANSIString::from(e.as_ref()),
-        }
-    }
-}
-
-#[cfg(any(not(feature = "color"), target_os = "windows"))]
-#[cfg_attr(feature="lints", allow(match_same_arms))]
-impl<T: fmt::Display> Format<T> {
-    fn format(&self) -> &T {
-        match *self {
-            Format::Error(ref e) => e,
-            Format::Warning(ref e) => e,
-            Format::Good(ref e) => e,
-            Format::None(ref e) => e,
-        }
-    }
-}
-
-
-#[cfg(all(feature = "color", not(target_os = "windows")))]
-impl<T: AsRef<str>> fmt::Display for Format<T> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", &self.format()) }
-}
-
-#[cfg(any(not(feature = "color"), target_os = "windows"))]
-impl<T: fmt::Display> fmt::Display for Format<T> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", &self.format()) }
-}
-
-#[cfg(all(test, feature = "color", not(target_os = "windows")))]
-mod test {
-    use ansi_term::ANSIString;
-    use ansi_term::Colour::{Green, Red, Yellow};
-    use super::Format;
-
-    #[test]
-    fn colored_output() {
-        let err = Format::Error("error");
-        assert_eq!(&*format!("{}", err),
-                   &*format!("{}", Red.bold().paint("error")));
-        let good = Format::Good("good");
-        assert_eq!(&*format!("{}", good), &*format!("{}", Green.paint("good")));
-        let warn = Format::Warning("warn");
-        assert_eq!(&*format!("{}", warn), &*format!("{}", Yellow.paint("warn")));
-        let none = Format::None("none");
-        assert_eq!(&*format!("{}", none),
-                   &*format!("{}", ANSIString::from("none")));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/lib.rs
+++ /dev/null
@@ -1,570 +0,0 @@
-// Copyright ⓒ 2015-2016 Kevin B. Knapp and [`clap-rs` contributors](https://github.com/kbknapp/clap-rs/blob/master/CONTRIBUTORS.md).
-// Licensed under the MIT license
-// (see LICENSE or <http://opensource.org/licenses/MIT>) All files in the project carrying such
-// notice may not be copied, modified, or distributed except according to those terms.
-
-//! `clap` is a simple-to-use, efficient, and full-featured library for parsing command line
-//! arguments and subcommands when writing console/terminal applications.
-//!
-//! ## About
-//!
-//! `clap` is used to parse *and validate* the string of command line arguments provided by the user
-//! at runtime. You provide the list of valid possibilities, and `clap` handles the rest. This means
-//! you focus on your *applications* functionality, and less on the parsing and validating of
-//! arguments.
-//!
-//! `clap` also provides the traditional version and help switches (or flags) 'for free' meaning
-//! automatically with no configuration. It does this by checking list of valid possibilities you
-//! supplied and adding only the ones you haven't already defined. If you are using subcommands,
-//! `clap` will also auto-generate a `help` subcommand for you in addition to the traditional flags.
-//!
-//! Once `clap` parses the user provided string of arguments, it returns the matches along with any
-//! applicable values. If the user made an error or typo, `clap` informs them of the mistake and
-//! exits gracefully (or returns a `Result` type and allows you to perform any clean up prior to
-//! exit). Because of this, you can make reasonable assumptions in your code about the validity of
-//! the arguments.
-//!
-//!
-//! ## Quick Example
-//!
-//! The following examples show a quick example of some of the very basic functionality of `clap`.
-//! For more advanced usage, such as requirements, conflicts, groups, multiple values and
-//! occurrences see the [documentation](https://docs.rs/clap/), [examples/](examples) directory of
-//! this repository or the [video tutorials](https://www.youtube.com/playlist?list=PLza5oFLQGTl2Z5T8g1pRkIynR3E0_pc7U).
-//!
-//! **NOTE:** All of these examples are functionally the same, but show different styles in which to
-//! use `clap`
-//!
-//! The first example shows a method that allows more advanced configuration options (not shown in
-//! this small example), or even dynamically generating arguments when desired. The downside is it's
-//! more verbose.
-//! 
-//! ```no_run
-//! // (Full example with detailed comments in examples/01b_quick_example.rs)
-//! //
-//! // This example demonstrates clap's full 'builder pattern' style of creating arguments which is
-//! // more verbose, but allows easier editing, and at times more advanced options, or the possibility
-//! // to generate arguments dynamically.
-//! extern crate clap;
-//! use clap::{Arg, App, SubCommand};
-//! 
-//! fn main() {
-//!     let matches = App::new("My Super Program")
-//!                           .version("1.0")
-//!                           .author("Kevin K. <kbknapp@gmail.com>")
-//!                           .about("Does awesome things")
-//!                           .arg(Arg::with_name("config")
-//!                                .short("c")
-//!                                .long("config")
-//!                                .value_name("FILE")
-//!                                .help("Sets a custom config file")
-//!                                .takes_value(true))
-//!                           .arg(Arg::with_name("INPUT")
-//!                                .help("Sets the input file to use")
-//!                                .required(true)
-//!                                .index(1))
-//!                           .arg(Arg::with_name("v")
-//!                                .short("v")
-//!                                .multiple(true)
-//!                                .help("Sets the level of verbosity"))
-//!                           .subcommand(SubCommand::with_name("test")
-//!                                       .about("controls testing features")
-//!                                       .version("1.3")
-//!                                       .author("Someone E. <someone_else@other.com>")
-//!                                       .arg(Arg::with_name("debug")
-//!                                           .short("d")
-//!                                           .help("print debug information verbosely")))
-//!                           .get_matches();
-//! 
-//!     // Gets a value for config if supplied by user, or defaults to "default.conf"
-//!     let config = matches.value_of("config").unwrap_or("default.conf");
-//!     println!("Value for config: {}", config);
-//! 
-//!     // Calling .unwrap() is safe here because "INPUT" is required (if "INPUT" wasn't
-//!     // required we could have used an 'if let' to conditionally get the value)
-//!     println!("Using input file: {}", matches.value_of("INPUT").unwrap());
-//! 
-//!     // Vary the output based on how many times the user used the "verbose" flag
-//!     // (i.e. 'myprog -v -v -v' or 'myprog -vvv' vs 'myprog -v'
-//!     match matches.occurrences_of("v") {
-//!         0 => println!("No verbose info"),
-//!         1 => println!("Some verbose info"),
-//!         2 => println!("Tons of verbose info"),
-//!         3 | _ => println!("Don't be crazy"),
-//!     }
-//! 
-//!     // You can handle information about subcommands by requesting their matches by name
-//!     // (as below), requesting just the name used, or both at the same time
-//!     if let Some(matches) = matches.subcommand_matches("test") {
-//!         if matches.is_present("debug") {
-//!             println!("Printing debug info...");
-//!         } else {
-//!             println!("Printing normally...");
-//!         }
-//!     }
-//! 
-//!     // more program logic goes here...
-//! }
-//! ```
-//! 
-//! The next example shows a far less verbose method, but sacrifices some of the advanced
-//! configuration options (not shown in this small example). This method also takes a *very* minor
-//! runtime penalty.
-//! 
-//! ```no_run
-//! // (Full example with detailed comments in examples/01a_quick_example.rs)
-//! //
-//! // This example demonstrates clap's "usage strings" method of creating arguments
-//! // which is less verbose
-//! extern crate clap;
-//! use clap::{Arg, App, SubCommand};
-//! 
-//! fn main() {
-//!     let matches = App::new("myapp")
-//!                           .version("1.0")
-//!                           .author("Kevin K. <kbknapp@gmail.com>")
-//!                           .about("Does awesome things")
-//!                           .args_from_usage(
-//!                               "-c, --config=[FILE] 'Sets a custom config file'
-//!                               <INPUT>              'Sets the input file to use'
-//!                               -v...                'Sets the level of verbosity'")
-//!                           .subcommand(SubCommand::with_name("test")
-//!                                       .about("controls testing features")
-//!                                       .version("1.3")
-//!                                       .author("Someone E. <someone_else@other.com>")
-//!                                       .arg_from_usage("-d, --debug 'Print debug information'"))
-//!                           .get_matches();
-//! 
-//!     // Same as previous example...
-//! }
-//! ```
-//! 
-//! This third method shows how you can use a YAML file to build your CLI and keep your Rust source
-//! tidy or support multiple localized translations by having different YAML files for each
-//! localization.
-//!
-//! First, create the `cli.yml` file to hold your CLI options, but it could be called anything we
-//! like:
-//! 
-//! ```yaml
-//! name: myapp
-//! version: "1.0"
-//! author: Kevin K. <kbknapp@gmail.com>
-//! about: Does awesome things
-//! args:
-//!     - config:
-//!         short: c
-//!         long: config
-//!         value_name: FILE
-//!         help: Sets a custom config file
-//!         takes_value: true
-//!     - INPUT:
-//!         help: Sets the input file to use
-//!         required: true
-//!         index: 1
-//!     - verbose:
-//!         short: v
-//!         multiple: true
-//!         help: Sets the level of verbosity
-//! subcommands:
-//!     - test:
-//!         about: controls testing features
-//!         version: "1.3"
-//!         author: Someone E. <someone_else@other.com>
-//!         args:
-//!             - debug:
-//!                 short: d
-//!                 help: print debug information
-//! ```
-//! 
-//! Since this feature requires additional dependencies that not everyone may want, it is *not*
-//! compiled in by default and we need to enable a feature flag in Cargo.toml:
-//!
-//! Simply change your `clap = "~2.19.0"` to `clap = {version = "~2.19.0", features = ["yaml"]}`.
-//!
-//! At last we create our `main.rs` file just like we would have with the previous two examples:
-//! 
-//! ```ignore
-//! // (Full example with detailed comments in examples/17_yaml.rs)
-//! //
-//! // This example demonstrates clap's building from YAML style of creating arguments which is far
-//! // more clean, but takes a very small performance hit compared to the other two methods.
-//! #[macro_use]
-//! extern crate clap;
-//! use clap::App;
-//! 
-//! fn main() {
-//!     // The YAML file is found relative to the current file, similar to how modules are found
-//!     let yaml = load_yaml!("cli.yml");
-//!     let matches = App::from_yaml(yaml).get_matches();
-//! 
-//!     // Same as previous examples...
-//! }
-//! ```
-//! 
-//! Finally there is a macro version, which is like a hybrid approach offering the speed of the
-//! builder pattern (the first example), but without all the verbosity.
-//! 
-//! ```no_run
-//! #[macro_use]
-//! extern crate clap;
-//! 
-//! fn main() {
-//!     let matches = clap_app!(myapp =>
-//!         (version: "1.0")
-//!         (author: "Kevin K. <kbknapp@gmail.com>")
-//!         (about: "Does awesome things")
-//!         (@arg CONFIG: -c --config +takes_value "Sets a custom config file")
-//!         (@arg INPUT: +required "Sets the input file to use")
-//!         (@arg debug: -d ... "Sets the level of debugging information")
-//!         (@subcommand test =>
-//!             (about: "controls testing features")
-//!             (version: "1.3")
-//!             (author: "Someone E. <someone_else@other.com>")
-//!             (@arg verbose: -v --verbose "Print test information verbosely")
-//!         )
-//!     ).get_matches();
-//! 
-//!     // Same as before...
-//! }
-//! ```
-//! 
-//! If you were to compile any of the above programs and run them with the flag `--help` or `-h` (or
-//! `help` subcommand, since we defined `test` as a subcommand) the following would be output
-//! 
-//! ```text
-//! $ myprog --help
-//! My Super Program 1.0
-//! Kevin K. <kbknapp@gmail.com>
-//! Does awesome things
-//! 
-//! USAGE:
-//!     MyApp [FLAGS] [OPTIONS] <INPUT> [SUBCOMMAND]
-//! 
-//! FLAGS:
-//!     -h, --help       Prints this message
-//!     -v               Sets the level of verbosity
-//!     -V, --version    Prints version information
-//! 
-//! OPTIONS:
-//!     -c, --config <FILE>    Sets a custom config file
-//! 
-//! ARGS:
-//!     INPUT    The input file to use
-//! 
-//! SUBCOMMANDS:
-//!     help    Prints this message
-//!     test    Controls testing features
-//! ```
-//! 
-//! **NOTE:** You could also run `myapp test --help` to see similar output and options for the
-//! `test` subcommand.
-//! 
-//! ## Try it!
-//! 
-//! ### Pre-Built Test
-//! 
-//! To try out the pre-built example, use the following steps:
-//! 
-//! * Clone the repository `$ git clone https://github.com/kbknapp/clap-rs && cd clap-rs/tests`
-//! * Compile the example `$ cargo build --release`
-//! * Run the help info `$ ./target/release/claptests --help`
-//! * Play with the arguments!
-//! 
-//! ### BYOB (Build Your Own Binary)
-//! 
-//! To test out `clap`'s default auto-generated help/version follow these steps:
-//!
-//! * Create a new cargo project `$ cargo new fake --bin && cd fake`
-//! * Add `clap` to your `Cargo.toml`
-//!
-//! ```toml
-//! [dependencies]
-//! clap = "2"
-//! ```
-//! 
-//! * Add the following to your `src/main.rs`
-//! 
-//! ```no_run
-//! extern crate clap;
-//! use clap::App;
-//! 
-//! fn main() {
-//!   App::new("fake").version("v1.0-beta").get_matches();
-//! }
-//! ```
-//! 
-//! * Build your program `$ cargo build --release`
-//! * Run with help or version `$ ./target/release/fake --help` or `$ ./target/release/fake
-//! --version`
-//! 
-//! ## Usage
-//! 
-//! For full usage, add `clap` as a dependency in your `Cargo.toml` (it is **highly** recommended to
-//! use the `~major.minor.patch` style versions in your `Cargo.toml`, for more information see
-//! [Compatibility Policy](#compatibility-policy)) to use from crates.io:
-//! 
-//! ```toml
-//! [dependencies]
-//! clap = "~2.19.0"
-//! ```
-//! 
-//! Or get the latest changes from the master branch at github:
-//! 
-//! ```toml
-//! [dependencies.clap]
-//! git = "https://github.com/kbknapp/clap-rs.git"
-//! ```
-//! 
-//! Add `extern crate clap;` to your crate root.
-//! 
-//! Define a list of valid arguments for your program (see the 
-//! [documentation](https://docs.rs/clap/) or [examples/](examples) directory of this repo)
-//! 
-//! Then run `cargo build` or `cargo update && cargo build` for your project.
-//! 
-//! ### Optional Dependencies / Features
-//! 
-//! #### Features enabled by default
-//! 
-//! * **"suggestions"**: Turns on the `Did you mean '--myoption'?` feature for when users make typos. (builds dependency `strsim`)
-//! * **"color"**: Turns on colored error messages. This feature only works on non-Windows OSs. (builds dependency `ansi-term` and `atty`)
-//! * **"wrap_help"**: Wraps the help at the actual terminal width when available, instead of 120 chracters. (builds dependency `term_size`)
-//! 
-//! To disable these, add this to your `Cargo.toml`:
-//! 
-//! ```toml
-//! [dependencies.clap]
-//! version = "~2.19.0"
-//! default-features = false
-//! ```
-//! 
-//! You can also selectively enable only the features you'd like to include, by adding:
-//! 
-//! ```toml
-//! [dependencies.clap]
-//! version = "~2.19.0"
-//! default-features = false
-//! 
-//! # Cherry-pick the features you'd like to use
-//! features = [ "suggestions", "color" ]
-//! ```
-//! 
-//! #### Opt-in features
-//! 
-//! * **"yaml"**: Enables building CLIs from YAML documents. (builds dependency `yaml-rust`)
-//! * **"unstable"**: Enables unstable `clap` features that may change from release to release
-//! 
-//! ### Dependencies Tree
-//! 
-//! The following graphic depicts `clap`s dependency graph (generated using 
-//! [cargo-graph](https://github.com/kbknapp/cargo-graph)).
-//! 
-//!  * **Dashed** Line: Optional dependency
-//!  * **Red** Color: **NOT** included by default (must use cargo `features` to enable)
-//!  * **Blue** Color: Dev dependency, only used while developing.
-//! 
-//! ![clap dependencies](clap_dep_graph.png)
-//! 
-//! ### More Information
-//! 
-//! You can find complete documentation on the [docs.rs](https://docs.rs/clap/) for this project.
-//! 
-//! You can also find usage examples in the [examples/](examples) directory of this repo.
-//! 
-//! #### Video Tutorials
-//! 
-//! There's also the video tutorial series [Argument Parsing with Rust v2](https://www.youtube.com/playlist?list=PLza5oFLQGTl2Z5T8g1pRkIynR3E0_pc7U).
-//! 
-//! These videos slowly trickle out as I finish them and currently a work in progress.
-//! 
-//! ## How to Contribute
-//! 
-//! Contributions are always welcome! And there is a multitude of ways in which you can help
-//! depending on what you like to do, or are good at. Anything from documentation, code cleanup,
-//! issue completion, new features, you name it, even filing issues is contributing and greatly
-//! appreciated!
-//!
-//! Another really great way to help is if you find an interesting, or helpful way in which to use
-//! `clap`. You can either add it to the [examples/](examples) directory, or file an issue and tell
-//! me. I'm all about giving credit where credit is due :)
-//! 
-//! Please read [CONTRIBUTING.md](.github/CONTRIBUTING.md) before you start contributing.
-//! 
-//! 
-//! ### Testing Code
-//! 
-//! To test with all features both enabled and disabled, you can run theese commands:
-//! 
-//! ```text
-//! $ cargo test --no-default-features
-//! $ cargo test --features "yaml unstable"
-//! ```
-//! 
-//! Alternatively, if you have [`just`](https://github.com/casey/just) installed you can run the
-//! prebuilt recipies. *Not* using `just` is prfeclty fine as well, it simply bundles commands
-//! automatically.
-//! 
-//! For example, to test the code, as above simply run:
-//! 
-//! ```text
-//! $ just run-tests`
-//! ```
-//! 
-//! From here on, I will lis the appropriate `cargo` command as well as the `just` command.
-//! 
-//! Sometimes it's helpful to only run a subset of the tests, which can be done via:
-//! 
-//! ```text
-//! $ cargo test --test <test_name>
-//! 
-//! # Or
-//! 
-//! $ just run-test <test_name>
-//! ```
-//! 
-//! ### Linting Code
-//! 
-//! During the CI process `clap` runs against many different lints using
-//! [`clippy`](https://github.com/Manishearth/rust-clippy). In order to check if these lints pass on
-//! your own computer prior to submitting a PR you'll need a nightly compiler.
-//! 
-//! In order to check the code for lints run either:
-//! 
-//! ```text
-//! $ rustup override add nightly
-//! $ cargo build --features lints
-//! $ rustup override remove
-//! 
-//! # Or
-//! 
-//! $ just lint
-//! ```
-//! 
-//! ### Debugging Code
-//! 
-//! Another helpful technique is to see the `clap` debug output while developing features. In order
-//! to see the debug output while running the full test suite or individual tests, run:
-//! 
-//! ```text
-//! $ cargo test --features debug
-//! 
-//! # Or for individual tests
-//! $ cargo test --test <test_name> --features debug
-//! 
-//! # The corresponding just command for individual debugging tests is:
-//! $ just debug <test_name>
-//! ```
-//! 
-//! ### Goals
-//! 
-//! There are a few goals of `clap` that I'd like to maintain throughout contributions. If your
-//! proposed changes break, or go against any of these goals we'll discuss the changes further
-//! before merging (but will *not* be ignored, all contributes are welcome!). These are by no means
-//! hard-and-fast rules, as I'm no expert and break them myself from time to time (even if by
-//! mistake or ignorance).
-//! 
-//! * Remain backwards compatible when possible
-//!   - If backwards compatibility *must* be broken, use deprecation warnings if at all possible before
-//!   removing legacy code - This does not apply for security concerns
-//! * Parse arguments quickly
-//!   - Parsing of arguments shouldn't slow down usage of the main program - This is also true of
-//!   generating help and usage information (although *slightly* less stringent, as the program is about
-//!   to exit)
-//! * Try to be cognizant of memory usage
-//!   - Once parsing is complete, the memory footprint of `clap` should be low since the  main program
-//!   is the star of the show
-//! * `panic!` on *developer* error, exit gracefully on *end-user* error
-//! 
-//! ### Compatibility Policy
-//!
-//! Because `clap` takes SemVer and compatibility seriously, this is the official policy regarding
-//! breaking changes and previous versions of Rust.
-//!
-//! `clap` will pin the minimum required version of Rust to the CI builds. Bumping the minimum
-//! version of Rust is considered a minor breaking change, meaning *at a minimum* the minor version
-//! of `clap` will be bumped.
-//!
-//! In order to keep from being suprised of breaking changes, it is **highly** recommended to use
-//! the `~major.minor.patch` style in your `Cargo.toml`:
-//!
-//! ```toml 
-//! [dependencies] clap = "~2.19.0"
-//! ```
-//!
-//! This will cause *only* the patch version to be updated upon a `cargo update` call, and therefore
-//! cannot break due to new features, or bumped minimum versions of Rust.
-//!
-//! #### Minimum Version of Rust
-//!
-//! `clap` will officially support current stable Rust, minus two releases, but may work with prior
-//! releases as well. For example, current stable Rust at the time of this writing is 1.13.0,
-//! meaning `clap` is guaranteed to compile with 1.11.0 and beyond. At the 1.14.0 release, `clap`
-//! will be guaranteed to compile with 1.12.0 and beyond, etc.
-//! 
-//! Upon bumping the minimum version of Rust (assuming it's within the stable-2 range), it *must* be
-//! clearly annotated in the `CHANGELOG.md`
-//! 
-//! ## License
-//! 
-//! `clap` is licensed under the MIT license. Please read the [LICENSE-MIT](LICENSE-MIT) file in
-//! this repository for more information.
-
-#![crate_type= "lib"]
-#![deny(
-        missing_docs,
-        missing_debug_implementations,
-        missing_copy_implementations,
-        trivial_casts,
-        unused_import_braces,
-        unused_allocation)]
-// Lints we'd like to deny but are currently failing for upstream crates
-//      unused_qualifications       (bitflags, clippy)
-//      trivial_numeric_casts       (bitflags)
-#![cfg_attr(not(any(feature = "lints", feature = "nightly")), forbid(unstable_features))]
-#![cfg_attr(feature = "lints", feature(plugin))]
-#![cfg_attr(feature = "lints", plugin(clippy))]
-#![cfg_attr(feature = "lints", deny(warnings))]
-#![cfg_attr(feature = "lints", allow(cyclomatic_complexity))]
-#![cfg_attr(feature = "lints", allow(doc_markdown))]
-#![cfg_attr(feature = "lints", allow(explicit_iter_loop))]
-
-#[cfg(feature = "suggestions")]
-extern crate strsim;
-#[cfg(feature = "color")]
-extern crate ansi_term;
-#[cfg(feature = "yaml")]
-extern crate yaml_rust;
-extern crate unicode_width;
-#[macro_use]
-extern crate bitflags;
-extern crate vec_map;
-#[cfg(feature = "wrap_help")]
-extern crate term_size;
-extern crate unicode_segmentation;
-#[cfg(feature = "color")]
-extern crate atty;
-
-#[cfg(feature = "yaml")]
-pub use yaml_rust::YamlLoader;
-pub use args::{Arg, ArgGroup, ArgMatches, ArgSettings, SubCommand, Values, OsValues};
-pub use app::{App, AppSettings};
-pub use fmt::Format;
-pub use errors::{Error, ErrorKind, Result};
-pub use completions::Shell;
-
-#[macro_use]
-mod macros;
-mod app;
-mod args;
-mod usage_parser;
-mod fmt;
-mod suggestions;
-mod errors;
-mod osstringext;
-mod strext;
-mod completions;
-
-const INTERNAL_ERROR_MSG: &'static str = "Fatal internal error. Please consider filing a bug \
-                                          report at https://github.com/kbknapp/clap-rs/issues";
-const INVALID_UTF8: &'static str = "unexpected invalid UTF-8 code point";
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/macros.rs
+++ /dev/null
@@ -1,1076 +0,0 @@
-/// A convenience macro for loading the YAML file at compile time (relative to the current file,
-/// like modules work). That YAML object can then be passed to this function.
-///
-/// # Panics
-///
-/// The YAML file must be properly formatted or this function will panic!(). A good way to
-/// ensure this doesn't happen is to run your program with the `--help` switch. If this passes
-/// without error, you needn't worry because the YAML is properly formatted.
-///
-/// # Examples
-///
-/// The following example shows how to load a properly formatted YAML file to build an instnace
-/// of an `App` struct.
-///
-/// ```ignore
-/// # #[macro_use]
-/// # extern crate clap;
-/// # use clap::App;
-/// # fn main() {
-/// let yml = load_yaml!("app.yml");
-/// let app = App::from_yaml(yml);
-///
-/// // continued logic goes here, such as `app.get_matches()` etc.
-/// # }
-/// ```
-#[cfg(feature = "yaml")]
-#[macro_export]
-macro_rules! load_yaml {
-    ($yml:expr) => (
-        &::clap::YamlLoader::load_from_str(include_str!($yml)).expect("failed to load YAML file")[0]
-    );
-}
-
-/// Convenience macro getting a typed value `T` where `T` implements [`std::str::FromStr`] from an
-/// argument value. This macro returns a `Result<T,String>` which allows you as the developer to
-/// decide what you'd like to do on a failed parse. There are two types of errors, parse failures
-/// and those where the argument wasn't present (such as a non-required argument). You can use
-/// it to get a single value, or a iterator as with the [`ArgMatches::values_of`]
-///
-/// # Examples
-///
-/// ```no_run
-/// # #[macro_use]
-/// # extern crate clap;
-/// # use clap::App;
-/// # fn main() {
-/// let matches = App::new("myapp")
-///               .arg_from_usage("[length] 'Set the length to use as a pos whole num, i.e. 20'")
-///               .get_matches();
-///
-/// let len      = value_t!(matches.value_of("length"), u32).unwrap_or_else(|e| e.exit());
-/// let also_len = value_t!(matches, "length", u32).unwrap_or_else(|e| e.exit());
-///
-/// println!("{} + 2: {}", len, len + 2);
-/// # }
-/// ```
-/// [`std::str::FromStr`]: https://doc.rust-lang.org/std/str/trait.FromStr.html
-/// [`ArgMatches::values_of`]: ./struct.ArgMatches.html#method.values_of
-/// [`Result<T,String>`]: https://doc.rust-lang.org/std/result/enum.Result.html
-#[macro_export]
-macro_rules! value_t {
-    ($m:ident, $v:expr, $t:ty) => {
-        value_t!($m.value_of($v), $t)
-    };
-    ($m:ident.value_of($v:expr), $t:ty) => {
-        if let Some(v) = $m.value_of($v) {
-            match v.parse::<$t>() {
-                Ok(val) => Ok(val),
-                Err(_)  =>
-                    Err(::clap::Error::value_validation_auto(
-                        format!("The argument '{}' isn't a valid value", v))),
-            }
-        } else {
-            Err(::clap::Error::argument_not_found_auto($v))
-        }
-    };
-}
-
-/// Convenience macro getting a typed value `T` where `T` implements [`std::str::FromStr`] or
-/// exiting upon error, instead of returning a [`Result`] type.
-///
-/// **NOTE:** This macro is for backwards compatibility sake. Prefer
-/// [`value_t!(/* ... */).unwrap_or_else(|e| e.exit())`]
-///
-/// # Examples
-///
-/// ```no_run
-/// # #[macro_use]
-/// # extern crate clap;
-/// # use clap::App;
-/// # fn main() {
-/// let matches = App::new("myapp")
-///               .arg_from_usage("[length] 'Set the length to use as a pos whole num, i.e. 20'")
-///               .get_matches();
-///
-/// let len      = value_t_or_exit!(matches.value_of("length"), u32);
-/// let also_len = value_t_or_exit!(matches, "length", u32);
-///
-/// println!("{} + 2: {}", len, len + 2);
-/// # }
-/// ```
-/// [`std::str::FromStr`]: https://doc.rust-lang.org/std/str/trait.FromStr.html
-/// [`Result`]: https://doc.rust-lang.org/std/result/enum.Result.html
-/// [`value_t!(/* ... */).unwrap_or_else(|e| e.exit())`]: ./macro.value_t!.html
-#[macro_export]
-macro_rules! value_t_or_exit {
-    ($m:ident, $v:expr, $t:ty) => {
-        value_t_or_exit!($m.value_of($v), $t)
-    };
-    ($m:ident.value_of($v:expr), $t:ty) => {
-        if let Some(v) = $m.value_of($v) {
-            match v.parse::<$t>() {
-                Ok(val) => val,
-                Err(_)  =>
-                    ::clap::Error::value_validation_auto(
-                        format!("The argument '{}' isn't a valid value", v)).exit(),
-            }
-        } else {
-            ::clap::Error::argument_not_found_auto($v).exit()
-        }
-    };
-}
-
-/// Convenience macro getting a typed value [`Vec<T>`] where `T` implements [`std::str::FromStr`]
-/// This macro returns a [`clap::Result<Vec<T>>`] which allows you as the developer to decide
-/// what you'd like to do on a failed parse.
-///
-/// # Examples
-///
-/// ```no_run
-/// # #[macro_use]
-/// # extern crate clap;
-/// # use clap::App;
-/// # fn main() {
-/// let matches = App::new("myapp")
-///               .arg_from_usage("[seq]... 'A sequence of pos whole nums, i.e. 20 45'")
-///               .get_matches();
-///
-/// let vals = values_t!(matches.values_of("seq"), u32).unwrap_or_else(|e| e.exit());
-/// for v in &vals {
-///     println!("{} + 2: {}", v, v + 2);
-/// }
-///
-/// let vals = values_t!(matches, "seq", u32).unwrap_or_else(|e| e.exit());
-/// for v in &vals {
-///     println!("{} + 2: {}", v, v + 2);
-/// }
-/// # }
-/// ```
-/// [`std::str::FromStr`]: https://doc.rust-lang.org/std/str/trait.FromStr.html
-/// [`Vec<T>`]: https://doc.rust-lang.org/std/vec/struct.Vec.html
-/// [`clap::Result<Vec<T>>`]: ./type.Result.html
-#[macro_export]
-macro_rules! values_t {
-    ($m:ident, $v:expr, $t:ty) => {
-        values_t!($m.values_of($v), $t)
-    };
-    ($m:ident.values_of($v:expr), $t:ty) => {
-        if let Some(vals) = $m.values_of($v) {
-            let mut tmp = vec![];
-            let mut err = None;
-            for pv in vals {
-                match pv.parse::<$t>() {
-                    Ok(rv) => tmp.push(rv),
-                    Err(..) => {
-                        err = Some(::clap::Error::value_validation_auto(
-                                format!("The argument '{}' isn't a valid value", pv)));
-                        break
-                    }
-                }
-            }
-            match err {
-                Some(e) => Err(e),
-                None => Ok(tmp),
-            }
-        } else {
-            Err(::clap::Error::argument_not_found_auto($v))
-        }
-    };
-}
-
-/// Convenience macro getting a typed value [`Vec<T>`] where `T` implements [`std::str::FromStr`]
-/// or exiting upon error.
-///
-/// **NOTE:** This macro is for backwards compatibility sake. Prefer
-/// [`values_t!(/* ... */).unwrap_or_else(|e| e.exit())`]
-///
-/// # Examples
-///
-/// ```no_run
-/// # #[macro_use]
-/// # extern crate clap;
-/// # use clap::App;
-/// # fn main() {
-/// let matches = App::new("myapp")
-///               .arg_from_usage("[seq]... 'A sequence of pos whole nums, i.e. 20 45'")
-///               .get_matches();
-///
-/// let vals = values_t_or_exit!(matches.values_of("seq"), u32);
-/// for v in &vals {
-///     println!("{} + 2: {}", v, v + 2);
-/// }
-///
-/// // type for example only
-/// let vals: Vec<u32> = values_t_or_exit!(matches, "seq", u32);
-/// for v in &vals {
-///     println!("{} + 2: {}", v, v + 2);
-/// }
-/// # }
-/// ```
-/// [`values_t!(/* ... */).unwrap_or_else(|e| e.exit())`]: ./macro.values_t!.html
-/// [`std::str::FromStr`]: https://doc.rust-lang.org/std/str/trait.FromStr.html
-/// [`Vec<T>`]: https://doc.rust-lang.org/std/vec/struct.Vec.html
-#[macro_export]
-macro_rules! values_t_or_exit {
-    ($m:ident, $v:expr, $t:ty) => {
-        values_t_or_exit!($m.values_of($v), $t)
-    };
-    ($m:ident.values_of($v:expr), $t:ty) => {
-        if let Some(vals) = $m.values_of($v) {
-            vals.map(|v| v.parse::<$t>().unwrap_or_else(|_|{
-                ::clap::Error::value_validation_auto(
-                    format!("One or more arguments aren't valid values")).exit()
-            })).collect::<Vec<$t>>()
-        } else {
-            ::clap::Error::argument_not_found_auto($v).exit()
-        }
-    };
-}
-
-// _clap_count_exprs! is derived from https://github.com/DanielKeep/rust-grabbag
-// commit: 82a35ca5d9a04c3b920622d542104e3310ee5b07
-// License: MIT
-// Copyright ⓒ 2015 grabbag contributors.
-// Licensed under the MIT license (see LICENSE or <http://opensource.org
-// /licenses/MIT>) or the Apache License, Version 2.0 (see LICENSE of
-// <http://www.apache.org/licenses/LICENSE-2.0>), at your option. All
-// files in the project carrying such notice may not be copied, modified,
-// or distributed except according to those terms.
-//
-/// Counts the number of comma-delimited expressions passed to it.  The result is a compile-time
-/// evaluable expression, suitable for use as a static array size, or the value of a `const`.
-///
-/// # Examples
-///
-/// ```
-/// # #[macro_use] extern crate clap;
-/// # fn main() {
-/// const COUNT: usize = _clap_count_exprs!(a, 5+1, "hi there!".into_string());
-/// assert_eq!(COUNT, 3);
-/// # }
-/// ```
-#[macro_export]
-macro_rules! _clap_count_exprs {
-    () => { 0 };
-    ($e:expr) => { 1 };
-    ($e:expr, $($es:expr),+) => { 1 + _clap_count_exprs!($($es),*) };
-}
-
-/// Convenience macro to generate more complete enums with variants to be used as a type when
-/// parsing arguments. This enum also provides a `variants()` function which can be used to
-/// retrieve a `Vec<&'static str>` of the variant names, as well as implementing [`FromStr`] and
-/// [`Display`] automatically.
-///
-/// **NOTE:** Case insensitivity is supported for ASCII characters only
-///
-/// **NOTE:** This macro automatically implements [`std::str::FromStr`] and [`std::fmt::Display`]
-///
-/// **NOTE:** These enums support pub (or not) and uses of the #[derive()] traits
-///
-/// # Examples
-///
-/// ```no_run
-/// # #[macro_use]
-/// # extern crate clap;
-/// # use clap::{App, Arg};
-/// arg_enum!{
-///     #[derive(Debug)]
-///     pub enum Foo {
-///         Bar,
-///         Baz,
-///         Qux
-///     }
-/// }
-/// // Foo enum can now be used via Foo::Bar, or Foo::Baz, etc
-/// // and implements std::str::FromStr to use with the value_t! macros
-/// fn main() {
-///     let m = App::new("app")
-///                 .arg_from_usage("<foo> 'the foo'")
-///                 .get_matches();
-///     let f = value_t!(m, "foo", Foo).unwrap_or_else(|e| e.exit());
-///
-///     // Use f like any other Foo variant...
-/// }
-/// ```
-/// [`FromStr`]: https://doc.rust-lang.org/std/str/trait.FromStr.html
-/// [`std::str::FromStr`]: https://doc.rust-lang.org/std/str/trait.FromStr.html
-/// [`Display`]: https://doc.rust-lang.org/std/fmt/trait.Display.html
-/// [`std::fmt::Display`]: https://doc.rust-lang.org/std/fmt/trait.Display.html
-#[macro_export]
-macro_rules! arg_enum {
-    (@as_item $($i:item)*) => ($($i)*);
-    (@impls ( $($tts:tt)* ) -> ($e:ident, $($v:ident),+)) => {
-        arg_enum!(@as_item
-        $($tts)*
-
-        impl ::std::str::FromStr for $e {
-            type Err = String;
-
-            fn from_str(s: &str) -> ::std::result::Result<Self,Self::Err> {
-                use ::std::ascii::AsciiExt;
-                match s {
-                    $(stringify!($v) |
-                    _ if s.eq_ignore_ascii_case(stringify!($v)) => Ok($e::$v)),+,
-                    _ => Err({
-                        let v = vec![
-                            $(stringify!($v),)+
-                        ];
-                        format!("valid values: {}",
-                            v.join(" ,"))
-                    }),
-                }
-            }
-        }
-        impl ::std::fmt::Display for $e {
-            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                match *self {
-                    $($e::$v => write!(f, stringify!($v)),)+
-                }
-            }
-        }
-        impl $e {
-            #[allow(dead_code)]
-            pub fn variants() -> [&'static str; _clap_count_exprs!($(stringify!($v)),+)] {
-                [
-                    $(stringify!($v),)+
-                ]
-            }
-        });
-    };
-    ($(#[$($m:meta),+])+ pub enum $e:ident { $($v:ident $(=$val:expr)*),+ } ) => {
-        arg_enum!(@impls
-            ($(#[$($m),+])+
-            pub enum $e {
-                $($v$(=$val)*),+
-            }) -> ($e, $($v),+)
-        );
-    };
-    ($(#[$($m:meta),+])+ enum $e:ident { $($v:ident $(=$val:expr)*),+  } ) => {
-        arg_enum!(@impls
-            ($(#[$($m),+])+
-            enum $e {
-                $($v$(=$val)*),+
-            }) -> ($e, $($v),+)
-        );
-    };
-    (pub enum $e:ident { $($v:ident $(=$val:expr)*),+ } ) => {
-        arg_enum!(@impls
-            (pub enum $e {
-                $($v$(=$val)*),+
-            }) -> ($e, $($v),+)
-        );
-    };
-    (enum $e:ident { $($v:ident $(=$val:expr)*),+ } ) => {
-        arg_enum!(@impls
-            (enum $e {
-                $($v$(=$val)*),+
-            }) -> ($e, $($v),+)
-        );
-    };
-}
-
-/// Allows you to pull the version from your Cargo.toml at compile time as
-/// MAJOR.MINOR.PATCH_PKGVERSION_PRE
-///
-/// # Examples
-///
-/// ```no_run
-/// # #[macro_use]
-/// # extern crate clap;
-/// # use clap::App;
-/// # fn main() {
-/// let m = App::new("app")
-///             .version(crate_version!())
-///             .get_matches();
-/// # }
-/// ```
-#[cfg(not(feature="no_cargo"))]
-#[macro_export]
-macro_rules! crate_version {
-    () => {
-        env!("CARGO_PKG_VERSION")
-    };
-}
-
-/// Allows you to pull the authors for the app from your Cargo.toml at
-/// compile time in the form:
-/// `"author1 lastname <author1@example.com>:author2 lastname <author2@example.com>"`
-///
-/// You can replace the colons with a custom separator by supplying a
-/// replacement string, so, for example,
-/// `crate_authors!(",\n")` would become
-/// `"author1 lastname <author1@example.com>,\nauthor2 lastname <author2@example.com>,\nauthor3 lastname <author3@example.com>"`
-///
-/// # Examples
-///
-/// ```no_run
-/// # #[macro_use]
-/// # extern crate clap;
-/// # use clap::App;
-/// # fn main() {
-/// let m = App::new("app")
-///             .author(crate_authors!("\n"))
-///             .get_matches();
-/// # }
-/// ```
-#[cfg(not(feature="no_cargo"))]
-#[macro_export]
-macro_rules! crate_authors {
-    ($sep:expr) => {{
-        use std::ops::Deref;
-        use std::sync::{ONCE_INIT, Once};
-
-        #[allow(missing_copy_implementations)]
-        #[allow(non_camel_case_types)]
-        #[allow(dead_code)]
-        struct CARGO_AUTHORS {__private_field: ()}
-        static CARGO_AUTHORS: CARGO_AUTHORS = CARGO_AUTHORS {__private_field: ()};
-
-        impl Deref for CARGO_AUTHORS {
-            type Target = String;
-
-            #[allow(unsafe_code)]
-            fn deref<'a>(&'a self) -> &'a String {
-                unsafe {
-                    static mut LAZY: (*const String, Once) = (0 as *const String, ONCE_INIT);
-
-                    LAZY.1.call_once(|| LAZY.0 = Box::into_raw(Box::new(env!("CARGO_PKG_AUTHORS").replace(':', $sep))));
-                    &*LAZY.0
-                }
-            }
-        }
-
-        &CARGO_AUTHORS[..]
-    }};
-    () => {
-        env!("CARGO_PKG_AUTHORS")
-    };
-}
-
-/// Allows you to pull the description from your Cargo.toml at compile time.
-///
-/// # Examples
-///
-/// ```no_run
-/// # #[macro_use]
-/// # extern crate clap;
-/// # use clap::App;
-/// # fn main() {
-/// let m = App::new("app")
-///             .about(crate_description!())
-///             .get_matches();
-/// # }
-/// ```
-#[cfg(not(feature="no_cargo"))]
-#[macro_export]
-macro_rules! crate_description {
-    () => {
-        env!("CARGO_PKG_DESCRIPTION")
-    };
-}
-
-/// Allows you to pull the name from your Cargo.toml at compile time.
-///
-/// # Examples
-///
-/// ```no_run
-/// # #[macro_use]
-/// # extern crate clap;
-/// # use clap::App;
-/// # fn main() {
-/// let m = App::new(crate_name!())
-///             .get_matches();
-/// # }
-/// ```
-#[cfg(not(feature="no_cargo"))]
-#[macro_export]
-macro_rules! crate_name {
-    () => {
-        env!("CARGO_PKG_NAME")
-    };
-}
-
-/// Allows you to build the `App` instance from your Cargo.toml at compile time.
-///
-/// Equivalent to using the `crate_*!` macros with their respective fields.
-///
-/// Provided separator is for the [`crate_authors!`](macro.crate_authors.html) macro,
-/// refer to the documentation therefor.
-///
-/// **NOTE:** Changing the values in your `Cargo.toml` does not trigger a re-build automatically,
-/// and therefore won't change the generated output until you recompile.
-///
-/// **Pro Tip:** In some cases you can "trick" the compiler into triggering a rebuild when your
-/// `Cargo.toml` is changed by including this in your `src/main.rs` file
-/// `include_str!("../Cargo.toml");`
-///
-/// # Examples
-///
-/// ```no_run
-/// # #[macro_use]
-/// # extern crate clap;
-/// # fn main() {
-/// let m = app_from_crate!().get_matches();
-/// # }
-/// ```
-#[cfg(not(feature="no_cargo"))]
-#[macro_export]
-macro_rules! app_from_crate {
-    () => {
-        $crate::App::new(crate_name!())
-            .version(crate_version!())
-            .author(crate_authors!())
-            .about(crate_description!())
-    };
-    ($sep:expr) => {
-        $crate::App::new(crate_name!())
-            .version(crate_version!())
-            .author(crate_authors!($sep))
-            .about(crate_description!())
-    };
-}
-
-/// Build `App`, `Arg`s, `SubCommand`s and `Group`s with Usage-string like input
-/// but without the associated parsing runtime cost.
-///
-/// `clap_app!` also supports several shorthand syntaxes.
-///
-/// # Examples
-///
-/// ```no_run
-/// # #[macro_use]
-/// # extern crate clap;
-/// # fn main() {
-/// let matches = clap_app!(myapp =>
-///     (version: "1.0")
-///     (author: "Kevin K. <kbknapp@gmail.com>")
-///     (about: "Does awesome things")
-///     (@arg CONFIG: -c --config +takes_value "Sets a custom config file")
-///     (@arg INPUT: +required "Sets the input file to use")
-///     (@arg debug: -d ... "Sets the level of debugging information")
-///     (@group difficulty =>
-///         (@arg hard: -h --hard "Sets hard mode")
-///         (@arg normal: -n --normal "Sets normal mode")
-///         (@arg easy: -e --easy "Sets easy mode")
-///     )
-///     (@subcommand test =>
-///         (about: "controls testing features")
-///         (version: "1.3")
-///         (author: "Someone E. <someone_else@other.com>")
-///         (@arg verbose: -v --verbose "Print test information verbosely")
-///     )
-/// );
-/// # }
-/// ```
-/// # Shorthand Syntax for Args
-///
-/// * A single hyphen followed by a character (such as `-c`) sets the [`Arg::short`]
-/// * A double hyphen followed by a character or word (such as `--config`) sets [`Arg::long`]
-///   * If one wishes to use a [`Arg::long`] with a hyphen inside (i.e. `--config-file`), you
-///     must use `--("config-file")` due to limitations of the Rust macro system.
-/// * Three dots (`...`) sets [`Arg::multiple(true)`]
-/// * Angled brackets after either a short or long will set [`Arg::value_name`] and
-/// `Arg::required(true)` such as `--config <FILE>` = `Arg::value_name("FILE")` and
-/// `Arg::required(true)
-/// * Square brackets after either a short or long will set [`Arg::value_name`] and
-/// `Arg::required(false)` such as `--config [FILE]` = `Arg::value_name("FILE")` and
-/// `Arg::required(false)
-/// * There are short hand syntaxes for Arg methods that accept booleans
-///   * A plus sign will set that method to `true` such as `+required` = `Arg::required(true)`
-///   * An exclamation will set that method to `false` such as `!required` = `Arg::required(false)`
-/// * A `#{min, max}` will set [`Arg::min_values(min)`] and [`Arg::max_values(max)`]
-/// * An asterisk (`*`) will set `Arg::required(true)`
-/// * Curly brackets around a `fn` will set [`Arg::validator`] as in `{fn}` = `Arg::validator(fn)`
-/// * An Arg method that accepts a string followed by square brackets will set that method such as
-/// `conflicts_with[FOO]` will set `Arg::conflicts_with("FOO")` (note the lack of quotes around
-/// `FOO` in the macro)
-/// * An Arg method that takes a string and can be set multiple times (such as
-/// [`Arg::conflicts_with`]) followed by square brackets and a list of values separated by spaces
-/// will set that method such as `conflicts_with[FOO BAR BAZ]` will set
-/// `Arg::conflicts_with("FOO")`, `Arg::conflicts_with("BAR")`, and `Arg::conflicts_with("BAZ")`
-/// (note the lack of quotes around the values in the macro)
-///
-/// [`Arg::short`]: ./struct.Arg.html#method.short
-/// [`Arg::long`]: ./struct.Arg.html#method.long
-/// [`Arg::multiple(true)`]: ./struct.Arg.html#method.multiple
-/// [`Arg::value_name`]: ./struct.Arg.html#method.value_name
-/// [`Arg::min_values(min)`]: ./struct.Arg.html#method.min_values
-/// [`Arg::max_values(max)`]: ./struct.Arg.html#method.max_values
-/// [`Arg::validator`]: ./struct.Arg.html#method.validator
-/// [`Arg::conflicts_with`]: ./struct.Arg.html#method.conflicts_with
-#[macro_export]
-macro_rules! clap_app {
-    (@app ($builder:expr)) => { $builder };
-    (@app ($builder:expr) (@arg ($name:expr): $($tail:tt)*) $($tt:tt)*) => {
-        clap_app!{ @app
-            ($builder.arg(
-                clap_app!{ @arg ($crate::Arg::with_name($name)) (-) $($tail)* }))
-            $($tt)*
-        }
-    };
-    (@app ($builder:expr) (@arg $name:ident: $($tail:tt)*) $($tt:tt)*) => {
-        clap_app!{ @app
-            ($builder.arg(
-                clap_app!{ @arg ($crate::Arg::with_name(stringify!($name))) (-) $($tail)* }))
-            $($tt)*
-        }
-    };
-    (@app ($builder:expr) (@setting $setting:ident) $($tt:tt)*) => {
-        clap_app!{ @app
-            ($builder.setting($crate::AppSettings::$setting))
-            $($tt)*
-        }
-    };
-// Treat the application builder as an argument to set it's attributes
-    (@app ($builder:expr) (@attributes $($attr:tt)*) $($tt:tt)*) => {
-        clap_app!{ @app (clap_app!{ @arg ($builder) $($attr)* }) $($tt)* }
-    };
-    (@app ($builder:expr) (@group $name:ident => $($tail:tt)*) $($tt:tt)*) => {
-        clap_app!{ @app
-            (clap_app!{ @group ($builder, $crate::ArgGroup::with_name(stringify!($name))) $($tail)* })
-            $($tt)*
-        }
-    };
-// Handle subcommand creation
-    (@app ($builder:expr) (@subcommand $name:ident => $($tail:tt)*) $($tt:tt)*) => {
-        clap_app!{ @app
-            ($builder.subcommand(
-                clap_app!{ @app ($crate::SubCommand::with_name(stringify!($name))) $($tail)* }
-            ))
-            $($tt)*
-        }
-    };
-// Yaml like function calls - used for setting various meta directly against the app
-    (@app ($builder:expr) ($ident:ident: $($v:expr),*) $($tt:tt)*) => {
-// clap_app!{ @app ($builder.$ident($($v),*)) $($tt)* }
-        clap_app!{ @app
-            ($builder.$ident($($v),*))
-            $($tt)*
-        }
-    };
-
-// Add members to group and continue argument handling with the parent builder
-    (@group ($builder:expr, $group:expr)) => { $builder.group($group) };
-    (@group ($builder:expr, $group:expr) (@attributes $($attr:tt)*) $($tt:tt)*) => {
-        clap_app!{ @group ($builder, clap_app!{ @arg ($group) (-) $($attr)* }) $($tt)* }
-    };
-    (@group ($builder:expr, $group:expr) (@arg $name:ident: $($tail:tt)*) $($tt:tt)*) => {
-        clap_app!{ @group
-            (clap_app!{ @app ($builder) (@arg $name: $($tail)*) },
-             $group.arg(stringify!($name)))
-            $($tt)*
-        }
-    };
-
-// No more tokens to munch
-    (@arg ($arg:expr) $modes:tt) => { $arg };
-// Shorthand tokens influenced by the usage_string
-    (@arg ($arg:expr) $modes:tt --($long:expr) $($tail:tt)*) => {
-        clap_app!{ @arg ($arg.long($long)) $modes $($tail)* }
-    };
-    (@arg ($arg:expr) $modes:tt --$long:ident $($tail:tt)*) => {
-        clap_app!{ @arg ($arg.long(stringify!($long))) $modes $($tail)* }
-    };
-    (@arg ($arg:expr) $modes:tt -$short:ident $($tail:tt)*) => {
-        clap_app!{ @arg ($arg.short(stringify!($short))) $modes $($tail)* }
-    };
-    (@arg ($arg:expr) (-) <$var:ident> $($tail:tt)*) => {
-        clap_app!{ @arg ($arg.value_name(stringify!($var))) (+) +takes_value +required $($tail)* }
-    };
-    (@arg ($arg:expr) (+) <$var:ident> $($tail:tt)*) => {
-        clap_app!{ @arg ($arg.value_name(stringify!($var))) (+) $($tail)* }
-    };
-    (@arg ($arg:expr) (-) [$var:ident] $($tail:tt)*) => {
-        clap_app!{ @arg ($arg.value_name(stringify!($var))) (+) +takes_value $($tail)* }
-    };
-    (@arg ($arg:expr) (+) [$var:ident] $($tail:tt)*) => {
-        clap_app!{ @arg ($arg.value_name(stringify!($var))) (+) $($tail)* }
-    };
-    (@arg ($arg:expr) $modes:tt ... $($tail:tt)*) => {
-        clap_app!{ @arg ($arg) $modes +multiple $($tail)* }
-    };
-// Shorthand magic
-    (@arg ($arg:expr) $modes:tt #{$n:expr, $m:expr} $($tail:tt)*) => {
-        clap_app!{ @arg ($arg) $modes min_values($n) max_values($m) $($tail)* }
-    };
-    (@arg ($arg:expr) $modes:tt * $($tail:tt)*) => {
-        clap_app!{ @arg ($arg) $modes +required $($tail)* }
-    };
-// !foo -> .foo(false)
-    (@arg ($arg:expr) $modes:tt !$ident:ident $($tail:tt)*) => {
-        clap_app!{ @arg ($arg.$ident(false)) $modes $($tail)* }
-    };
-// +foo -> .foo(true)
-    (@arg ($arg:expr) $modes:tt +$ident:ident $($tail:tt)*) => {
-        clap_app!{ @arg ($arg.$ident(true)) $modes $($tail)* }
-    };
-// Validator
-    (@arg ($arg:expr) $modes:tt {$fn_:expr} $($tail:tt)*) => {
-        clap_app!{ @arg ($arg.validator($fn_)) $modes $($tail)* }
-    };
-    (@as_expr $expr:expr) => { $expr };
-// Help
-    (@arg ($arg:expr) $modes:tt $desc:tt) => { $arg.help(clap_app!{ @as_expr $desc }) };
-// Handle functions that need to be called multiple times for each argument
-    (@arg ($arg:expr) $modes:tt $ident:ident[$($target:ident)*] $($tail:tt)*) => {
-        clap_app!{ @arg ($arg $( .$ident(stringify!($target)) )*) $modes $($tail)* }
-    };
-// Inherit builder's functions
-    (@arg ($arg:expr) $modes:tt $ident:ident($($expr:expr)*) $($tail:tt)*) => {
-        clap_app!{ @arg ($arg.$ident($($expr)*)) $modes $($tail)* }
-    };
-
-// Build a subcommand outside of an app.
-    (@subcommand $name:ident => $($tail:tt)*) => {
-        clap_app!{ @app ($crate::SubCommand::with_name(stringify!($name))) $($tail)* }
-    };
-// Start the magic
-    (($name:expr) => $($tail:tt)*) => {{
-        clap_app!{ @app ($crate::App::new($name)) $($tail)*}
-    }};
-
-    ($name:ident => $($tail:tt)*) => {{
-        clap_app!{ @app ($crate::App::new(stringify!($name))) $($tail)*}
-    }};
-}
-
-macro_rules! impl_settings {
-    ($n:ident, $($v:ident => $c:ident),+) => {
-        pub fn set(&mut self, s: $n) {
-            match s {
-                $($n::$v => self.0.insert($c)),+
-            }
-        }
-
-        pub fn unset(&mut self, s: $n) {
-            match s {
-                $($n::$v => self.0.remove($c)),+
-            }
-        }
-
-        pub fn is_set(&self, s: $n) -> bool {
-            match s {
-                $($n::$v => self.0.contains($c)),+
-            }
-        }
-    };
-}
-
-// Convenience for writing to stderr thanks to https://github.com/BurntSushi
-macro_rules! wlnerr(
-    ($($arg:tt)*) => ({
-        use std::io::{Write, stderr};
-        writeln!(&mut stderr(), $($arg)*).ok();
-    })
-);
-macro_rules! werr(
-    ($($arg:tt)*) => ({
-        use std::io::{Write, stderr};
-        write!(&mut stderr(), $($arg)*).ok();
-    })
-);
-
-#[cfg(feature = "debug")]
-#[cfg_attr(feature = "debug", macro_use)]
-mod debug_macros {
-    macro_rules! debugln {
-        ($fmt:expr) => (println!(concat!("DEBUG:clap:", $fmt)));
-        ($fmt:expr, $($arg:tt)*) => (println!(concat!("DEBUG:clap:",$fmt), $($arg)*));
-    }
-    macro_rules! sdebugln {
-        ($fmt:expr) => (println!($fmt));
-        ($fmt:expr, $($arg:tt)*) => (println!($fmt, $($arg)*));
-    }
-    macro_rules! debug {
-        ($fmt:expr) => (print!(concat!("DEBUG:clap:", $fmt)));
-        ($fmt:expr, $($arg:tt)*) => (print!(concat!("DEBUG:clap:",$fmt), $($arg)*));
-    }
-    macro_rules! sdebug {
-        ($fmt:expr) => (print!($fmt));
-        ($fmt:expr, $($arg:tt)*) => (print!($fmt, $($arg)*));
-    }
-}
-
-#[cfg(not(feature = "debug"))]
-#[cfg_attr(not(feature = "debug"), macro_use)]
-mod debug_macros {
-    macro_rules! debugln {
-        ($fmt:expr) => ();
-        ($fmt:expr, $($arg:tt)*) => ();
-    }
-    macro_rules! sdebugln {
-        ($fmt:expr) => ();
-        ($fmt:expr, $($arg:tt)*) => ();
-    }
-    macro_rules! sdebug {
-        ($fmt:expr) => ();
-        ($fmt:expr, $($arg:tt)*) => ();
-    }
-    macro_rules! debug {
-        ($fmt:expr) => ();
-        ($fmt:expr, $($arg:tt)*) => ();
-    }
-}
-
-// Helper/deduplication macro for printing the correct number of spaces in help messages
-// used in:
-//    src/args/arg_builder/*.rs
-//    src/app/mod.rs
-macro_rules! write_spaces {
-    ($num:expr, $w:ident) => ({
-        debugln!("write_spaces!;");
-        for _ in 0..$num {
-            try!(write!($w, " "));
-        }
-    })
-}
-
-// Helper/deduplication macro for printing the correct number of spaces in help messages
-// used in:
-//    src/args/arg_builder/*.rs
-//    src/app/mod.rs
-macro_rules! write_nspaces {
-    ($dst:expr, $num:expr) => ({
-        debugln!("write_spaces!: num={}", $num);
-        for _ in 0..$num {
-            try!($dst.write_all(b" "));
-        }
-    })
-}
-
-// convenience macro for remove an item from a vec
-macro_rules! vec_remove {
-    ($vec:expr, $to_rem:expr) => {
-        debugln!("vec_remove!: to_rem={:?}", $to_rem);
-        for i in (0 .. $vec.len()).rev() {
-            let should_remove = &$vec[i] == $to_rem;
-            if should_remove { $vec.swap_remove(i); }
-        }
-    };
-}
-
-// convenience macro for remove an item from a vec
-macro_rules! vec_remove_all {
-    ($vec:expr, $to_rem:expr) => {
-        debugln!("vec_remove_all! to_rem={:?}", $to_rem);
-        for i in (0 .. $vec.len()).rev() {
-            let should_remove = $to_rem.any(|name| name == &$vec[i]);
-            if should_remove { $vec.swap_remove(i); }
-        }
-    };
-}
-macro_rules! find_from {
-    ($_self:expr, $arg_name:expr, $from:ident, $matcher:expr) => {{
-        let mut ret = None;
-        for k in $matcher.arg_names() {
-            if let Some(f) = find_by_name!($_self, &k, flags, iter) {
-                if let Some(ref v) = f.$from() {
-                    if v.contains($arg_name) {
-                        ret = Some(f.to_string());
-                    }
-                }
-            }
-            if let Some(o) = find_by_name!($_self, &k, opts, iter) {
-                if let Some(ref v) = o.$from() {
-                    if v.contains(&$arg_name) {
-                        ret = Some(o.to_string());
-                    }
-                }
-            }
-            if let Some(pos) = find_by_name!($_self, &k, positionals, values) {
-                if let Some(ref v) = pos.$from() {
-                    if v.contains($arg_name) {
-                        ret = Some(pos.b.name.to_owned());
-                    }
-                }
-            }
-        }
-        ret
-    }};
-}
-
-macro_rules! find_name_from {
-    ($_self:expr, $arg_name:expr, $from:ident, $matcher:expr) => {{
-        let mut ret = None;
-        for k in $matcher.arg_names() {
-            if let Some(f) = find_by_name!($_self, &k, flags, iter) {
-                if let Some(ref v) = f.$from() {
-                    if v.contains($arg_name) {
-                        ret = Some(f.b.name);
-                    }
-                }
-            }
-            if let Some(o) = find_by_name!($_self, &k, opts, iter) {
-                if let Some(ref v) = o.$from() {
-                    if v.contains(&$arg_name) {
-                        ret = Some(o.b.name);
-                    }
-                }
-            }
-            if let Some(pos) = find_by_name!($_self, &k, positionals, values) {
-                if let Some(ref v) = pos.$from() {
-                    if v.contains($arg_name) {
-                        ret = Some(pos.b.name);
-                    }
-                }
-            }
-        }
-        ret
-    }};
-}
-
-// Finds an arg by name
-macro_rules! find_by_name {
-    ($p:expr, $name:expr, $what:ident, $how:ident) => {
-        $p.$what.$how().find(|o| &o.b.name == $name)
-    }
-}
-
-// Finds an option including if it's aliasesed
-macro_rules! find_opt_by_long {
-    (@os $_self:ident, $long:expr) => {{
-        _find_by_long!($_self, $long, opts)
-    }};
-    ($_self:ident, $long:expr) => {{
-        _find_by_long!($_self, $long, opts)
-    }};
-}
-
-macro_rules! find_flag_by_long {
-    (@os $_self:ident, $long:expr) => {{
-        _find_by_long!($_self, $long, flags)
-    }};
-    ($_self:ident, $long:expr) => {{
-        _find_by_long!($_self, $long, flags)
-    }};
-}
-
-macro_rules! find_any_by_long {
-    ($_self:ident, $long:expr, $what:ident) => {
-        _find_flag_by_long!($_self, $long).or(_find_opt_by_long!($_self, $long))
-    }
-}
-
-macro_rules! _find_by_long {
-    ($_self:ident, $long:expr, $what:ident) => {{
-        $_self.$what
-            .iter()
-            .filter(|a| a.s.long.is_some())
-            .find(|a| {
-                &&a.s.long.unwrap() == &$long ||
-                (a.s.aliases.is_some() &&
-                 a.s
-                    .aliases
-                    .as_ref()
-                    .unwrap()
-                    .iter()
-                    .any(|&(alias, _)| &&alias == &$long))
-            })
-    }}
-}
-
-// Finds an option
-macro_rules! find_opt_by_short {
-    ($_self:ident, $short:expr) => {{
-        _find_by_short!($_self, $short, opts)
-    }}
-}
-
-macro_rules! find_flag_by_short {
-    ($_self:ident, $short:expr) => {{
-        _find_by_short!($_self, $short, flags)
-    }}
-}
-
-macro_rules! find_any_by_short {
-    ($_self:ident, $short:expr, $what:ident) => {
-        _find_flag_by_short!($_self, $short).or(_find_opt_by_short!($_self, $short))
-    }
-}
-
-macro_rules! _find_by_short {
-    ($_self:ident, $short:expr, $what:ident) => {{
-        $_self.$what
-            .iter()
-            .filter(|a| a.s.short.is_some())
-            .find(|a| a.s.short.unwrap() == $short)
-    }}
-}
-
-macro_rules! find_subcmd {
-    ($_self:expr, $sc:expr) => {{
-        $_self.subcommands
-            .iter()
-            .find(|s| {
-                &*s.p.meta.name == $sc ||
-                (s.p.meta.aliases.is_some() &&
-                 s.p
-                    .meta
-                    .aliases
-                    .as_ref()
-                    .unwrap()
-                    .iter()
-                    .any(|&(n, _)| n == $sc))
-            })
-    }};
-}
-
-macro_rules! shorts {
-    ($_self:ident) => {{
-        _shorts_longs!($_self, short)
-    }};
-}
-
-
-macro_rules! longs {
-    ($_self:ident) => {{
-        _shorts_longs!($_self, long)
-    }};
-}
-
-macro_rules! _shorts_longs {
-    ($_self:ident, $what:ident) => {{
-        $_self.flags
-                .iter()
-                .filter(|f| f.s.$what.is_some())
-                .map(|f| f.s.$what.as_ref().unwrap())
-                .chain($_self.opts.iter()
-                                  .filter(|o| o.s.$what.is_some())
-                                  .map(|o| o.s.$what.as_ref().unwrap()))
-    }};
-}
-
-macro_rules! arg_names {
-    ($_self:ident) => {{
-        _names!(@args $_self)
-    }};
-}
-
-macro_rules! sc_names {
-    ($_self:ident) => {{
-        _names!(@sc $_self)
-    }};
-}
-
-macro_rules! _names {
-    (@args $_self:ident) => {{
-        $_self.flags
-                .iter()
-                .map(|f| &*f.b.name)
-                .chain($_self.opts.iter()
-                                  .map(|o| &*o.b.name)
-                                  .chain($_self.positionals.values()
-                                                           .map(|p| &*p.b.name)))
-    }};
-    (@sc $_self:ident) => {{
-        $_self.subcommands
-            .iter()
-            .map(|s| &*s.p.meta.name)
-            .chain($_self.subcommands
-                         .iter()
-                         .filter(|s| s.p.meta.aliases.is_some())
-                         .flat_map(|s| s.p.meta.aliases.as_ref().unwrap().iter().map(|&(n, _)| n)))
-
-    }}
-}
deleted file mode 100644
--- a/third_party/rust/clap-2.24.2/src/suggestions.rs
+++ /dev/null
@@ -1,110 +0,0 @@
-// Third Party
-#[cfg(feature = "suggestions")]
-use strsim;
-
-// Internal
-use fmt::Format;
-
-/// Produces a string from a given list of possible values which is similar to
-/// the passed in value `v` with a certain confidence.
-/// Thus in a list of possible values like ["foo", "bar"], the value "fop" will yield
-/// `Some("foo")`, whereas "blark" would yield `None`.
-#[cfg(feature = "suggestions")]
-#[cfg_attr(feature = "lints", allow(needless_lifetimes))]
-pub fn did_you_mean<'a, T: ?Sized, I>(v: &str, possible_values: I) -> Option<&'a str>
-    where T: AsRef<str> + 'a,
-          I: IntoIterator<Item = &'a T>
-{
-
-    let mut candidate: Option<(f64, &str)> = None;
-    for pv in possible_values {
-        let confidence = strsim::jaro_winkler(v, pv.as_ref());
-        if confidence > 0.8 &&
-           (candidate.is_none() || (candidate.as_ref().unwrap().0 < confidence)) {
-            candidate = Some((confidence, pv.as_ref()));
-        }
-    }
-    match candidate {
-        None => None,
-        Some((_, candidate)) => Some(candidate),
-    }
-}
-
-#[cfg(not(feature = "suggestions"))]
-pub fn did_you_mean<'a, T: ?Sized, I>(_: &str, _: I) -> Option<&'a str>
-    where T: AsRef<str> + 'a,
-          I: IntoIterator<Item = &'a T>
-{
-    None
-}
-
-/// Returns a suffix that can be empty, or is the standard 'did you mean' phrase
-#[cfg_attr(feature = "lints", allow(needless_lifetimes))]
-pub fn did_you_mean_suffix<'z, T, I>(arg: &str,
-                                     values: I,
-                                     style: DidYouMeanMessageStyle)
-                                     -> (String, Option<&'z str>)
-    where T: AsRef<str> + 'z,
-          I: IntoIterator<Item = &'z T>
-{
-    match did_you_mean(arg, values) {
-        Some(candidate) => {
-            let mut suffix = "\n\tDid you mean ".to_owned();
-            match style {
-                DidYouMeanMessageStyle::LongFlag => {
-                    suffix.push_str(&Format::Good("--").to_string())
-                }
-                DidYouMeanMessageStyle::EnumValue => suffix.push('\''),
-            }
-            suffix.push_str(&Format::Good(candidate).to_string()[..]);
-            if let DidYouMeanMessageStyle::EnumValue = style {
-                suffix.push('\'');
-            }
-            suffix.push_str("?");
-            (suffix, Some(candidate))
-        }
-        None => (String::new(), None),
-    }
-}
-
-/// A helper to determine message formatting
-#[derive(Copy, Clone, Debug)]
-pub enum DidYouMeanMessageStyle {
-    /// Suggested value is a long flag
-    LongFlag,
-    /// Suggested value is one of various possible values
-    EnumValue,
-}
-
-#[cfg(all(test, features = "suggestions"))]
-mod test {
-    use super::*;
-
-    #[test]
-    fn possible_values_match() {
-        let p_vals = ["test", "possible", "values"];
-        assert_eq!(did_you_mean("tst", p_vals.iter()), Some("test"));
-    }
-
-    #[test]
-    fn possible_values_nomatch() {
-        let p_vals = ["test", "possible", "values"];
-        assert!(did_you_mean("hahaahahah", p_vals.iter()).is_none());
-    }
-
-    #[test]
-    fn suffix_long() {
-        let p_vals = ["test", "possible", "values"];
-        let suffix = "\n\tDid you mean \'--test\'?";
-        assert_eq!(did_you_mean_suffix("tst", p_vals.iter(), DidYouMeanMessageStyle::LongFlag),
-                   (suffix, Some("test")));
-    }
-
-    #[test]
-    fn suffix_enum() {
-        let p_vals = ["test", "possible", "values"];
-        let suffix = "\n\tDid you mean \'test\'?";
-        assert_eq!(did_you_mean_suffix("tst", p_vals.iter(), DidYouMeanMessageStyle::EnumValue),
-                   (suffix, Some("test")));
-    }
-}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clap-2.25.0/.appveyor.yml
@@ -0,0 +1,17 @@
+environment:
+  matrix:
+  - TARGET: x86_64-pc-windows-msvc
+  - TARGET: i686-pc-windows-msvc
+  - TARGET: x86_64-pc-windows-gnu
+  - TARGET: i686-pc-windows-gnu
+  RUST_BACKTRACE: full
+install:
+  - curl -sSf -o rustup-init.exe https://win.rustup.rs/
+  - rustup-init.exe -y --default-host %TARGET%
+  - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
+  - rustc -vV
+  - cargo -vV
+build: false
+test_script:
+  - cargo build --verbose --features yaml
+  - cargo test --verbose --features yaml
copy from third_party/rust/clap/.cargo-checksum.json
copy to third_party/rust/clap-2.25.0/.cargo-checksum.json
rename from third_party/rust/clap-2.24.2/.clog.toml
rename to third_party/rust/clap-2.25.0/.clog.toml
rename from third_party/rust/clap-2.24.2/.github/CONTRIBUTING.md
rename to third_party/rust/clap-2.25.0/.github/CONTRIBUTING.md
rename from third_party/rust/clap-2.24.2/.github/ISSUE_TEMPLATE.md
rename to third_party/rust/clap-2.25.0/.github/ISSUE_TEMPLATE.md
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clap-2.25.0/.mention-bot
@@ -0,0 +1,9 @@
+{
+  "findPotentialReviewers": false, 
+  "alwaysNotifyForPaths": [
+    {
+      "name": "kbknapp", 
+      "files": ["**/*.rs", "**/*.md", "*"] 
+    }
+  ]
+}
rename from third_party/rust/clap-2.24.2/.travis.yml
rename to third_party/rust/clap-2.25.0/.travis.yml
copy from third_party/rust/clap/CHANGELOG.md
copy to third_party/rust/clap-2.25.0/CHANGELOG.md
rename from third_party/rust/clap-2.24.2/CONTRIBUTORS.md
rename to third_party/rust/clap-2.25.0/CONTRIBUTORS.md
copy from third_party/rust/clap/Cargo.toml
copy to third_party/rust/clap-2.25.0/Cargo.toml
rename from third_party/rust/clap-2.24.2/LICENSE-MIT
rename to third_party/rust/clap-2.25.0/LICENSE-MIT
copy from third_party/rust/clap/README.md
copy to third_party/rust/clap-2.25.0/README.md
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clap-2.25.0/clap-test.rs
@@ -0,0 +1,76 @@
+#[allow(unused_imports, dead_code)]
+mod test {
+    use std::str;
+    use std::io::{Cursor, Write};
+
+    use regex::Regex;
+
+    use clap::{App, Arg, SubCommand, ArgGroup};
+
+    fn compare<S, S2>(l: S, r: S2) -> bool
+        where S: AsRef<str>,
+              S2: AsRef<str>
+    {
+        let re = Regex::new("\x1b[^m]*m").unwrap();
+        // Strip out any mismatching \r character on windows that might sneak in on either side
+        let ls = l.as_ref().trim().replace("\r", "");
+        let rs = r.as_ref().trim().replace("\r", "");
+        let left = re.replace_all(&*ls, "");
+        let right = re.replace_all(&*rs, "");
+        let b = left == right;
+        if !b {
+            println!("");
+            println!("--> left");
+            println!("{}", left);
+            println!("--> right");
+            println!("{}", right);
+            println!("--")
+        }
+        b
+    }
+
+    pub fn compare_output(l: App, args: &str, right: &str, stderr: bool) -> bool {
+        let mut buf = Cursor::new(Vec::with_capacity(50));
+        let res = l.get_matches_from_safe(args.split(' ').collect::<Vec<_>>());
+        let err = res.unwrap_err();
+        err.write_to(&mut buf).unwrap();
+        let content = buf.into_inner();
+        let left = String::from_utf8(content).unwrap();
+        assert_eq!(stderr, err.use_stderr());
+        compare(left, right)
+    }
+
+    // Legacy tests from the pyhton script days
+
+    pub fn complex_app() -> App<'static, 'static> {
+        let args = "-o --option=[opt]... 'tests options'
+                    [positional] 'tests positionals'";
+        let opt3_vals = ["fast", "slow"];
+        let pos3_vals = ["vi", "emacs"];
+        App::new("clap-test")
+            .version("v1.4.8")
+            .about("tests clap library")
+            .author("Kevin K. <kbknapp@gmail.com>")
+            .args_from_usage(args)
+            .arg(Arg::from_usage("-f --flag... 'tests flags'")
+                .global(true))
+            .args(&[
+                Arg::from_usage("[flag2] -F 'tests flags with exclusions'").conflicts_with("flag").requires("long-option-2"),
+                Arg::from_usage("--long-option-2 [option2] 'tests long options with exclusions'").conflicts_with("option").requires("positional2"),
+                Arg::from_usage("[positional2] 'tests positionals with exclusions'"),
+                Arg::from_usage("-O --Option [option3] 'specific vals'").possible_values(&opt3_vals),
+                Arg::from_usage("[positional3]... 'tests specific values'").possible_values(&pos3_vals),
+                Arg::from_usage("--multvals [one] [two] 'Tests mutliple values, not mult occs'"),
+                Arg::from_usage("--multvalsmo... [one] [two] 'Tests mutliple values, and mult occs'"),
+                Arg::from_usage("--minvals2 [minvals]... 'Tests 2 min vals'").min_values(2),
+                Arg::from_usage("--maxvals3 [maxvals]... 'Tests 3 max vals'").max_values(3)
+            ])
+            .subcommand(SubCommand::with_name("subcmd")
+                                    .about("tests subcommands")
+                                    .version("0.1")
+                                    .author("Kevin K. <kbknapp@gmail.com>")
+                                    .arg_from_usage("-o --option [scoption]... 'tests options'")
+                                    .arg_from_usage("-s --subcmdarg [subcmdarg] 'tests other args'")
+                                    .arg_from_usage("[scpositional] 'tests positionals'"))
+    }
+}
rename from third_party/rust/clap-2.24.2/index.html
rename to third_party/rust/clap-2.25.0/index.html
rename from third_party/rust/clap-2.24.2/justfile
rename to third_party/rust/clap-2.25.0/justfile
rename from third_party/rust/clap-2.24.2/rustfmt.toml
rename to third_party/rust/clap-2.25.0/rustfmt.toml
copy from third_party/rust/clap/src/app/help.rs
copy to third_party/rust/clap-2.25.0/src/app/help.rs
copy from third_party/rust/clap/src/app/macros.rs
copy to third_party/rust/clap-2.25.0/src/app/macros.rs
rename from third_party/rust/clap-2.24.2/src/app/meta.rs
rename to third_party/rust/clap-2.25.0/src/app/meta.rs
rename from third_party/rust/clap-2.24.2/src/app/mod.rs
rename to third_party/rust/clap-2.25.0/src/app/mod.rs
copy from third_party/rust/clap/src/app/parser.rs
copy to third_party/rust/clap-2.25.0/src/app/parser.rs
copy from third_party/rust/clap/src/app/settings.rs
copy to third_party/rust/clap-2.25.0/src/app/settings.rs
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clap-2.25.0/src/app/usage.rs
@@ -0,0 +1,439 @@
+// std
+use std::collections::{BTreeMap, VecDeque};
+
+// Internal
+use INTERNAL_ERROR_MSG;
+use args::{AnyArg, ArgMatcher, PosBuilder};
+use args::settings::ArgSettings;
+use app::settings::AppSettings as AS;
+use app::parser::Parser;
+
+// Creates a usage string for display. This happens just after all arguments were parsed, but before
+// any subcommands have been parsed (so as to give subcommands their own usage recursively)
+pub fn create_usage_with_title(p: &Parser, used: &[&str]) -> String {
+    debugln!("usage::create_usage_with_title;");
+    let mut usage = String::with_capacity(75);
+    usage.push_str("USAGE:\n    ");
+    usage.push_str(&*create_usage_no_title(p, used));
+    usage
+}
+
+// Creates a usage string to be used in error message (i.e. one with currently used args)
+pub fn create_error_usage<'a, 'b>(p: &Parser<'a, 'b>,
+                                  matcher: &'b ArgMatcher<'a>,
+                                  extra: Option<&str>)
+                                  -> String {
+    let mut args: Vec<_> = matcher.arg_names()
+        .iter()
+        .filter(|n| {
+            if let Some(o) = find_by_name!(p, **n, opts, iter) {
+                !o.b.is_set(ArgSettings::Required) && !o.b.is_set(ArgSettings::Hidden)
+            } else if let Some(p) = find_by_name!(p, **n, positionals, values) {
+                !p.b.is_set(ArgSettings::Required) && p.b.is_set(ArgSettings::Hidden)
+            } else {
+                true // flags can't be required, so they're always true
+            }
+        })
+        .map(|&n| n)
+        .collect();
+    if let Some(r) = extra {
+        args.push(r);
+    }
+    create_usage_with_title(p, &*args)
+}
+
+// Creates a usage string (*without title*) if one was not provided by the user manually.
+pub fn create_usage_no_title(p: &Parser, used: &[&str]) -> String {
+    debugln!("usage::create_usage_no_title;");
+    if let Some(u) = p.meta.usage_str {
+        String::from(&*u)
+    } else if used.is_empty() {
+        create_help_usage(p, true)
+    } else {
+        create_smart_usage(p, used)
+    }
+}
+
+// Creates a usage string for display in help messages (i.e. not for errors)
+pub fn create_help_usage(p: &Parser, incl_reqs: bool) -> String {
+    let mut usage = String::with_capacity(75);
+    let name = p.meta
+        .usage
+        .as_ref()
+        .unwrap_or_else(|| {
+                            p.meta
+                                .bin_name
+                                .as_ref()
+                                .unwrap_or(&p.meta.name)
+                        });
+    usage.push_str(&*name);
+    let req_string = if incl_reqs {
+        let mut reqs: Vec<&str> = p.required().map(|r| &**r).collect();
+        reqs.sort();
+        reqs.dedup();
+        get_required_usage_from(p, &reqs, None, None, false).iter().fold(String::new(), |a, s| {
+            a + &format!(" {}", s)[..]
+        })
+    } else {
+        String::new()
+    };
+
+    let flags = needs_flags_tag(p);
+    if flags && !p.is_set(AS::UnifiedHelpMessage) {
+        usage.push_str(" [FLAGS]");
+    } else if flags {
+        usage.push_str(" [OPTIONS]");
+    }
+    if !p.is_set(AS::UnifiedHelpMessage) &&
+       p.opts.iter().any(|o| !o.is_set(ArgSettings::Required) && !o.is_set(ArgSettings::Hidden)) {
+        usage.push_str(" [OPTIONS]");
+    }
+
+    usage.push_str(&req_string[..]);
+
+    let has_last = p.positionals.values().any(|p| p.is_set(ArgSettings::Last));
+    // places a '--' in the usage string if there are args and options
+    // supporting multiple values
+    if p.opts.iter().any(|o| o.is_set(ArgSettings::Multiple)) &&
+       p.positionals.values().any(|p| !p.is_set(ArgSettings::Required)) &&
+       !p.has_visible_subcommands() && !has_last {
+        usage.push_str(" [--]");
+    }
+    let not_req_or_hidden =
+        |p: &PosBuilder| (!p.is_set(ArgSettings::Required) || p.is_set(ArgSettings::Last)) && !p.is_set(ArgSettings::Hidden);
+    if p.has_positionals() && p.positionals.values().any(not_req_or_hidden) {
+        if let Some(args_tag) = get_args_tag(p, incl_reqs) {
+            usage.push_str(&*args_tag);
+        } else {
+            usage.push_str(" [ARGS]");
+        }
+        if has_last && incl_reqs {
+            let pos = p.positionals
+                .values()
+                .find(|p| p.b.is_set(ArgSettings::Last))
+                .expect(INTERNAL_ERROR_MSG);
+            debugln!("usage::create_help_usage: '{}' has .last(true)", pos.name());
+            let req = pos.is_set(ArgSettings::Required);
+            if req && p.positionals.values().any(|p| !p.is_set(ArgSettings::Required)) {
+                usage.push_str(" -- <");
+            } else if req {
+                usage.push_str(" [--] <");
+            } else {
+                usage.push_str(" [-- <");
+            }
+            usage.push_str(&*pos.name_no_brackets());
+            usage.push_str(">");
+            usage.push_str(pos.multiple_str());
+            if !req {
+                usage.push_str("]");
+            }
+        }
+    }
+
+    // incl_reqs is only false when this function is called recursively
+    if p.has_visible_subcommands() && incl_reqs {
+        if p.is_set(AS::SubcommandsNegateReqs) || p.is_set(AS::ArgsNegateSubcommands) {
+            if !p.is_set(AS::ArgsNegateSubcommands) {
+                usage.push_str("\n    ");
+                usage.push_str(&*create_help_usage(p, false));
+                usage.push_str(" <SUBCOMMAND>");
+            } else {
+                usage.push_str("\n    ");
+                usage.push_str(&*name);
+                usage.push_str(" <SUBCOMMAND>");
+            }
+        } else if p.is_set(AS::SubcommandRequired) || p.is_set(AS::SubcommandRequiredElseHelp) {
+            usage.push_str(" <SUBCOMMAND>");
+        } else {
+            usage.push_str(" [SUBCOMMAND]");
+        }
+    }
+    usage.shrink_to_fit();
+    debugln!("usage::create_help_usage: usage={}", usage);
+    usage
+}
+
+// Creates a context aware usage string, or "smart usage" from currently used
+// args, and requirements
+fn create_smart_usage(p: &Parser, used: &[&str]) -> String {
+    debugln!("usage::smart_usage;");
+    let mut usage = String::with_capacity(75);
+    let mut hs: Vec<&str> = p.required().map(|s| &**s).collect();
+    hs.extend_from_slice(used);
+
+    let r_string =
+        get_required_usage_from(p, &hs, None, None, false).iter().fold(String::new(), |acc, s| {
+            acc + &format!(" {}", s)[..]
+        });
+
+    usage.push_str(&p.meta
+                        .usage
+                        .as_ref()
+                        .unwrap_or_else(|| {
+                                            p.meta
+                                                .bin_name
+                                                .as_ref()
+                                                .unwrap_or(&p.meta.name)
+                                        })
+                        [..]);
+    usage.push_str(&*r_string);
+    if p.is_set(AS::SubcommandRequired) {
+        usage.push_str(" <SUBCOMMAND>");
+    }
+    usage.shrink_to_fit();
+    usage
+}
+
+// Gets the `[ARGS]` tag for the usage string
+fn get_args_tag(p: &Parser, incl_reqs: bool) -> Option<String> {
+    debugln!("usage::get_args_tag;");
+    let mut count = 0;
+    'outer: for pos in p.positionals
+                    .values()
+                    .filter(|pos| !pos.is_set(ArgSettings::Required))
+                    .filter(|pos| !pos.is_set(ArgSettings::Hidden))
+                    .filter(|pos| !pos.is_set(ArgSettings::Last)) {
+        debugln!("usage::get_args_tag:iter:{}:", pos.b.name);
+        if let Some(g_vec) = p.groups_for_arg(pos.b.name) {
+            for grp_s in &g_vec {
+                debugln!("usage::get_args_tag:iter:{}:iter:{};", pos.b.name, grp_s);
+                // if it's part of a required group we don't want to count it
+                if p.groups.iter().any(|g| g.required && (&g.name == grp_s)) {
+                    continue 'outer;
+                }
+            }
+        }
+        count += 1;
+        debugln!("usage::get_args_tag:iter: {} Args not required or hidden",
+                 count);
+    }
+    if !p.is_set(AS::DontCollapseArgsInUsage) && count > 1 {
+        debugln!("usage::get_args_tag:iter: More than one, returning [ARGS]");
+        return None; // [ARGS]
+    } else if count == 1 && incl_reqs {
+        let pos = p.positionals
+            .values()
+            .find(|pos| {
+                      !pos.is_set(ArgSettings::Required) && !pos.is_set(ArgSettings::Hidden) &&
+                      !pos.is_set(ArgSettings::Last)
+                  })
+            .expect(INTERNAL_ERROR_MSG);
+        debugln!("usage::get_args_tag:iter: Exactly one, returning '{}'",
+                 pos.name());
+        return Some(format!(" [{}]{}", pos.name_no_brackets(), pos.multiple_str()));
+    } else if p.is_set(AS::DontCollapseArgsInUsage) && !p.positionals.is_empty() && incl_reqs {
+        debugln!("usage::get_args_tag:iter: Don't collapse returning all");
+        return Some(p.positionals
+                        .values()
+                        .filter(|pos| !pos.is_set(ArgSettings::Required))
+                        .filter(|pos| !pos.is_set(ArgSettings::Hidden))
+                        .filter(|pos| !pos.is_set(ArgSettings::Last))
+                        .map(|pos| {
+                                 format!(" [{}]{}", pos.name_no_brackets(), pos.multiple_str())
+                             })
+                        .collect::<Vec<_>>()
+                        .join(""));
+    } else if !incl_reqs {
+        debugln!("usage::get_args_tag:iter: incl_reqs=false, building secondary usage string");
+        let highest_req_pos = p.positionals
+            .iter()
+            .filter_map(|(idx, pos)| if pos.b.is_set(ArgSettings::Required) &&
+                                        !pos.b.is_set(ArgSettings::Last) {
+                            Some(idx)
+                        } else {
+                            None
+                        })
+            .max()
+            .unwrap_or_else(|| p.positionals.len());
+        return Some(p.positionals
+                        .iter()
+                        .filter_map(|(idx, pos)| if idx <= highest_req_pos {
+                                        Some(pos)
+                                    } else {
+                                        None
+                                    })
+                        .filter(|pos| !pos.is_set(ArgSettings::Required))
+                        .filter(|pos| !pos.is_set(ArgSettings::Hidden))
+                        .filter(|pos| !pos.is_set(ArgSettings::Last))
+                        .map(|pos| {
+                                 format!(" [{}]{}", pos.name_no_brackets(), pos.multiple_str())
+                             })
+                        .collect::<Vec<_>>()
+                        .join(""));
+    }
+    Some("".into())
+}
+
+// Determines if we need the `[FLAGS]` tag in the usage string
+fn needs_flags_tag(p: &Parser) -> bool {
+    debugln!("usage::needs_flags_tag;");
+    'outer: for f in &p.flags {
+        debugln!("usage::needs_flags_tag:iter: f={};", f.b.name);
+        if let Some(l) = f.s.long {
+            if l == "help" || l == "version" {
+                // Don't print `[FLAGS]` just for help or version
+                continue;
+            }
+        }
+        if let Some(g_vec) = p.groups_for_arg(f.b.name) {
+            for grp_s in &g_vec {
+                debugln!("usage::needs_flags_tag:iter:iter: grp_s={};", grp_s);
+                if p.groups.iter().any(|g| &g.name == grp_s && g.required) {
+                    debugln!("usage::needs_flags_tag:iter:iter: Group is required");
+                    continue 'outer;
+                }
+            }
+        }
+        if f.is_set(ArgSettings::Hidden) {
+            continue;
+        }
+        debugln!("usage::needs_flags_tag:iter: [FLAGS] required");
+        return true;
+    }
+
+    debugln!("usage::needs_flags_tag: [FLAGS] not required");
+    false
+}
+
+// Returns the required args in usage string form by fully unrolling all groups
+pub fn get_required_usage_from<'a, 'b>(p: &Parser<'a, 'b>,
+                                       reqs: &[&'a str],
+                                       matcher: Option<&ArgMatcher<'a>>,
+                                       extra: Option<&str>,
+                                       incl_last: bool)
+                                       -> VecDeque<String> {
+    debugln!("usage::get_required_usage_from: reqs={:?}, extra={:?}",
+             reqs,
+             extra);
+    let mut desc_reqs: Vec<&str> = vec![];
+    desc_reqs.extend(extra);
+    let mut new_reqs: Vec<&str> = vec![];
+    macro_rules! get_requires {
+        (@group $a: ident, $v:ident, $p:ident) => {{
+            if let Some(rl) = p.groups.iter()
+                                            .filter(|g| g.requires.is_some())
+                                            .find(|g| &g.name == $a)
+                                            .map(|g| g.requires.as_ref().unwrap()) {
+                for r in rl {
+                    if !$p.contains(&r) {
+                        debugln!("usage::get_required_usage_from:iter:{}: adding group req={:?}",
+                            $a, r);
+                        $v.push(r);
+                    }
+                }
+            }
+        }};
+        ($a:ident, $what:ident, $how:ident, $v:ident, $p:ident) => {{
+            if let Some(rl) = p.$what.$how()
+                                        .filter(|a| a.b.requires.is_some())
+                                        .find(|arg| &arg.b.name == $a)
+                                        .map(|a| a.b.requires.as_ref().unwrap()) {
+                for &(_, r) in rl.iter() {
+                    if !$p.contains(&r) {
+                        debugln!("usage::get_required_usage_from:iter:{}: adding arg req={:?}",
+                            $a, r);
+                        $v.push(r);
+                    }
+                }
+            }
+        }};
+    }
+    // initialize new_reqs
+    for a in reqs {
+        get_requires!(a, flags, iter, new_reqs, reqs);
+        get_requires!(a, opts, iter, new_reqs, reqs);
+        get_requires!(a, positionals, values, new_reqs, reqs);
+        get_requires!(@group a, new_reqs, reqs);
+    }
+    desc_reqs.extend_from_slice(&*new_reqs);
+    debugln!("usage::get_required_usage_from: after init desc_reqs={:?}",
+             desc_reqs);
+    loop {
+        let mut tmp = vec![];
+        for a in &new_reqs {
+            get_requires!(a, flags, iter, tmp, desc_reqs);
+            get_requires!(a, opts, iter, tmp, desc_reqs);
+            get_requires!(a, positionals, values, tmp, desc_reqs);
+            get_requires!(@group a, tmp, desc_reqs);
+        }
+        if tmp.is_empty() {
+            debugln!("usage::get_required_usage_from: no more children");
+            break;
+        } else {
+            debugln!("usage::get_required_usage_from: after iter tmp={:?}", tmp);
+            debugln!("usage::get_required_usage_from: after iter new_reqs={:?}",
+                     new_reqs);
+            desc_reqs.extend_from_slice(&*new_reqs);
+            new_reqs.clear();
+            new_reqs.extend_from_slice(&*tmp);
+            debugln!("usage::get_required_usage_from: after iter desc_reqs={:?}",
+                     desc_reqs);
+        }
+    }
+    desc_reqs.extend_from_slice(reqs);
+    desc_reqs.sort();
+    desc_reqs.dedup();
+    debugln!("usage::get_required_usage_from: final desc_reqs={:?}",
+             desc_reqs);
+    let mut ret_val = VecDeque::new();
+    let args_in_groups = p.groups
+        .iter()
+        .filter(|gn| desc_reqs.contains(&gn.name))
+        .flat_map(|g| p.arg_names_in_group(g.name))
+        .collect::<Vec<_>>();
+
+    let pmap = if let Some(m) = matcher {
+        desc_reqs.iter()
+            .filter(|a| p.positionals.values().any(|p| &&p.b.name == a))
+            .filter(|&pos| !m.contains(pos))
+            .filter_map(|pos| p.positionals.values().find(|x| &x.b.name == pos))
+            .filter(|&pos| incl_last || !pos.is_set(ArgSettings::Last))
+            .filter(|pos| !args_in_groups.contains(&pos.b.name))
+            .map(|pos| (pos.index, pos))
+            .collect::<BTreeMap<u64, &PosBuilder>>() // sort by index
+    } else {
+        desc_reqs.iter()
+            .filter(|a| p.positionals.values().any(|pos| &&pos.b.name == a))
+            .filter_map(|pos| p.positionals.values().find(|x| &x.b.name == pos))
+            .filter(|&pos| incl_last || !pos.is_set(ArgSettings::Last))
+            .filter(|pos| !args_in_groups.contains(&pos.b.name))
+            .map(|pos| (pos.index, pos))
+            .collect::<BTreeMap<u64, &PosBuilder>>() // sort by index
+    };
+    debugln!("usage::get_required_usage_from: args_in_groups={:?}",
+             args_in_groups);
+    for &p in pmap.values() {
+        let s = p.to_string();
+        if args_in_groups.is_empty() || !args_in_groups.contains(&&*s) {
+            ret_val.push_back(s);
+        }
+    }
+    for a in desc_reqs.iter()
+            .filter(|name| !p.positionals.values().any(|p| &&p.b.name == name))
+            .filter(|name| !p.groups.iter().any(|g| &&g.name == name))
+            .filter(|name| !args_in_groups.contains(name))
+            .filter(|name| !(matcher.is_some() && matcher.as_ref().unwrap().contains(name))) {
+        debugln!("usage::get_required_usage_from:iter:{}:", a);
+        let arg = find_by_name!(p, *a, flags, iter)
+            .map(|f| f.to_string())
+            .unwrap_or_else(|| {
+                                find_by_name!(p, *a, opts, iter)
+                                    .map(|o| o.to_string())
+                                    .expect(INTERNAL_ERROR_MSG)
+                            });
+        ret_val.push_back(arg);
+    }
+    let mut g_vec: Vec<String> = vec![];
+    for g in desc_reqs.iter().filter(|n| p.groups.iter().any(|g| &&g.name == n)) {
+        let g_string = p.args_in_group(g).join("|");
+        let elem = format!("<{}>", &g_string[..g_string.len()]);
+        if !g_vec.contains(&elem) {
+            g_vec.push(elem);
+        }
+    }
+    for g in g_vec {
+        ret_val.push_back(g);
+    }
+
+    ret_val
+}
copy from third_party/rust/clap/src/app/validator.rs
copy to third_party/rust/clap-2.25.0/src/app/validator.rs
rename from third_party/rust/clap-2.24.2/src/args/any_arg.rs
rename to third_party/rust/clap-2.25.0/src/args/any_arg.rs
rename from third_party/rust/clap-2.24.2/src/args/arg.rs
rename to third_party/rust/clap-2.25.0/src/args/arg.rs
rename from third_party/rust/clap-2.24.2/src/args/arg_builder/base.rs
rename to third_party/rust/clap-2.25.0/src/args/arg_builder/base.rs
rename from third_party/rust/clap-2.24.2/src/args/arg_builder/flag.rs
rename to third_party/rust/clap-2.25.0/src/args/arg_builder/flag.rs
rename from third_party/rust/clap-2.24.2/src/args/arg_builder/mod.rs
rename to third_party/rust/clap-2.25.0/src/args/arg_builder/mod.rs
rename from third_party/rust/clap-2.24.2/src/args/arg_builder/option.rs
rename to third_party/rust/clap-2.25.0/src/args/arg_builder/option.rs
copy from third_party/rust/clap/src/args/arg_builder/positional.rs
copy to third_party/rust/clap-2.25.0/src/args/arg_builder/positional.rs
rename from third_party/rust/clap-2.24.2/src/args/arg_builder/switched.rs
rename to third_party/rust/clap-2.25.0/src/args/arg_builder/switched.rs
rename from third_party/rust/clap-2.24.2/src/args/arg_builder/valued.rs
rename to third_party/rust/clap-2.25.0/src/args/arg_builder/valued.rs
rename from third_party/rust/clap-2.24.2/src/args/arg_matcher.rs
rename to third_party/rust/clap-2.25.0/src/args/arg_matcher.rs
rename from third_party/rust/clap-2.24.2/src/args/arg_matches.rs
rename to third_party/rust/clap-2.25.0/src/args/arg_matches.rs
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clap-2.25.0/src/args/group.rs
@@ -0,0 +1,634 @@
+#[cfg(feature = "yaml")]
+use std::collections::BTreeMap;
+use std::fmt::{Debug, Formatter, Result};
+
+#[cfg(feature = "yaml")]
+use yaml_rust::Yaml;
+
+/// `ArgGroup`s are a family of related [arguments] and way for you to express, "Any of these
+/// arguments". By placing arguments in a logical group, you can create easier requirement and
+/// exclusion rules instead of having to list each argument individually, or when you want a rule
+/// to apply "any but not all" arguments.
+///
+/// For instance, you can make an entire `ArgGroup` required. If [`ArgGroup::multiple(true)`] is
+/// set, this means that at least one argument from that group must be present. If
+/// [`ArgGroup::multiple(false)`] is set (the default), one and *only* one must be present.
+///
+/// You can also do things such as name an entire `ArgGroup` as a [conflict] or [requirement] for
+/// another argument, meaning any of the arguments that belong to that group will cause a failure
+/// if present, or must present respectively.
+///
+/// Perhaps the most common use of `ArgGroup`s is to require one and *only* one argument to be
+/// present out of a given set. Imagine that you had multiple arguments, and you want one of them
+/// to be required, but making all of them required isn't feasible because perhaps they conflict
+/// with each other. For example, lets say that you were building an application where one could
+/// set a given version number by supplying a string with an option argument, i.e.
+/// `--set-ver v1.2.3`, you also wanted to support automatically using a previous version number
+/// and simply incrementing one of the three numbers. So you create three flags `--major`,
+/// `--minor`, and `--patch`. All of these arguments shouldn't be used at one time but you want to
+/// specify that *at least one* of them is used. For this, you can create a group.
+///
+/// Finally, you may use `ArgGroup`s to pull a value from a group of arguments when you don't care
+/// exactly which argument was actually used at runtime.
+///
+/// # Examples
+///
+/// The following example demonstrates using an `ArgGroup` to ensure that one, and only one, of
+/// the arguments from the specified group is present at runtime.
+///
+/// ```rust
+/// # use clap::{App, ArgGroup, ErrorKind};
+/// let result = App::new("app")
+///     .args_from_usage(
+///         "--set-ver [ver] 'set the version manually'
+///          --major         'auto increase major'
+///          --minor         'auto increase minor'
+///          --patch         'auto increase patch'")
+///     .group(ArgGroup::with_name("vers")
+///          .args(&["set-ver", "major", "minor","patch"])
+///          .required(true))
+///     .get_matches_from_safe(vec!["app", "--major", "--patch"]);
+/// // Because we used two args in the group it's an error
+/// assert!(result.is_err());
+/// let err = result.unwrap_err();
+/// assert_eq!(err.kind, ErrorKind::ArgumentConflict);
+/// ```
+/// This next example shows a passing parse of the same scenario
+///
+/// ```rust
+/// # use clap::{App, ArgGroup};
+/// let result = App::new("app")
+///     .args_from_usage(
+///         "--set-ver [ver] 'set the version manually'
+///          --major         'auto increase major'
+///          --minor         'auto increase minor'
+///          --patch         'auto increase patch'")
+///     .group(ArgGroup::with_name("vers")
+///          .args(&["set-ver", "major", "minor","patch"])
+///          .required(true))
+///     .get_matches_from_safe(vec!["app", "--major"]);
+/// assert!(result.is_ok());
+/// let matches = result.unwrap();
+/// // We may not know which of the args was used, so we can test for the group...
+/// assert!(matches.is_present("vers"));
+/// // we could also alternatively check each arg individually (not shown here)
+/// ```
+/// [`ArgGroup::multiple(true)`]: ./struct.ArgGroup.html#method.multiple
+/// [arguments]: ./struct.Arg.html
+/// [conflict]: ./struct.Arg.html#method.conflicts_with
+/// [requirement]: ./struct.Arg.html#method.requires
+#[derive(Default)]
+pub struct ArgGroup<'a> {
+    #[doc(hidden)]
+    pub name: &'a str,
+    #[doc(hidden)]
+    pub args: Vec<&'a str>,
+    #[doc(hidden)]
+    pub required: bool,
+    #[doc(hidden)]
+    pub requires: Option<Vec<&'a str>>,
+    #[doc(hidden)]
+    pub conflicts: Option<Vec<&'a str>>,
+    #[doc(hidden)]
+    pub multiple: bool,
+}
+
+impl<'a> ArgGroup<'a> {
+    /// Creates a new instance of `ArgGroup` using a unique string name. The name will be used to
+    /// get values from the group or refer to the group inside of conflict and requirement rules.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, ArgGroup};
+    /// ArgGroup::with_name("config")
+    /// # ;
+    /// ```
+    pub fn with_name(n: &'a str) -> Self {
+        ArgGroup {
+            name: n,
+            required: false,
+            args: vec![],
+            requires: None,
+            conflicts: None,
+            multiple: false,
+        }
+    }
+
+    /// Creates a new instance of `ArgGroup` from a .yml (YAML) file.
+    ///
+    /// # Examples
+    ///
+    /// ```ignore
+    /// # #[macro_use]
+    /// # extern crate clap;
+    /// # use clap::ArgGroup;
+    /// # fn main() {
+    /// let yml = load_yaml!("group.yml");
+    /// let ag = ArgGroup::from_yaml(yml);
+    /// # }
+    /// ```
+    #[cfg(feature = "yaml")]
+    pub fn from_yaml(y: &'a Yaml) -> ArgGroup<'a> { ArgGroup::from(y.as_hash().unwrap()) }
+
+    /// Adds an [argument] to this group by name
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ArgGroup};
+    /// let m = App::new("myprog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .short("f"))
+    ///     .arg(Arg::with_name("color")
+    ///         .short("c"))
+    ///     .group(ArgGroup::with_name("req_flags")
+    ///         .arg("flag")
+    ///         .arg("color"))
+    ///     .get_matches_from(vec!["myprog", "-f"]);
+    /// // maybe we don't know which of the two flags was used...
+    /// assert!(m.is_present("req_flags"));
+    /// // but we can also check individually if needed
+    /// assert!(m.is_present("flag"));
+    /// ```
+    /// [argument]: ./struct.Arg.html
+    #[cfg_attr(feature = "lints", allow(should_assert_eq))]
+    pub fn arg(mut self, n: &'a str) -> Self {
+        assert!(self.name != n,
+                "ArgGroup '{}' can not have same name as arg inside it",
+                &*self.name);
+        self.args.push(n);
+        self
+    }
+
+    /// Adds multiple [arguments] to this group by name
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ArgGroup};
+    /// let m = App::new("myprog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .short("f"))
+    ///     .arg(Arg::with_name("color")
+    ///         .short("c"))
+    ///     .group(ArgGroup::with_name("req_flags")
+    ///         .args(&["flag", "color"]))
+    ///     .get_matches_from(vec!["myprog", "-f"]);
+    /// // maybe we don't know which of the two flags was used...
+    /// assert!(m.is_present("req_flags"));
+    /// // but we can also check individually if needed
+    /// assert!(m.is_present("flag"));
+    /// ```
+    /// [arguments]: ./struct.Arg.html
+    pub fn args(mut self, ns: &[&'a str]) -> Self {
+        for n in ns {
+            self = self.arg(n);
+        }
+        self
+    }
+
+    /// Allows more than one of the ['Arg']s in this group to be used. (Default: `false`)
+    ///
+    /// # Examples
+    ///
+    /// Notice in this example we use *both* the `-f` and `-c` flags which are both part of the
+    /// group
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ArgGroup};
+    /// let m = App::new("myprog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .short("f"))
+    ///     .arg(Arg::with_name("color")
+    ///         .short("c"))
+    ///     .group(ArgGroup::with_name("req_flags")
+    ///         .args(&["flag", "color"])
+    ///         .multiple(true))
+    ///     .get_matches_from(vec!["myprog", "-f", "-c"]);
+    /// // maybe we don't know which of the two flags was used...
+    /// assert!(m.is_present("req_flags"));
+    /// ```
+    /// In this next example, we show the default behavior (i.e. `multiple(false)) which will throw
+    /// an error if more than one of the args in the group was used.
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ArgGroup, ErrorKind};
+    /// let result = App::new("myprog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .short("f"))
+    ///     .arg(Arg::with_name("color")
+    ///         .short("c"))
+    ///     .group(ArgGroup::with_name("req_flags")
+    ///         .args(&["flag", "color"]))
+    ///     .get_matches_from_safe(vec!["myprog", "-f", "-c"]);
+    /// // Because we used both args in the group it's an error
+    /// assert!(result.is_err());
+    /// let err = result.unwrap_err();
+    /// assert_eq!(err.kind, ErrorKind::ArgumentConflict);
+    /// ```
+    /// ['Arg']: ./struct.Arg.html
+    pub fn multiple(mut self, m: bool) -> Self {
+        self.multiple = m;
+        self
+    }
+
+    /// Sets the group as required or not. A required group will be displayed in the usage string
+    /// of the application in the format `<arg|arg2|arg3>`. A required `ArgGroup` simply states
+    /// that one argument from this group *must* be present at runtime (unless
+    /// conflicting with another argument).
+    ///
+    /// **NOTE:** This setting only applies to the current [`App`] / [`SubCommand`], and not
+    /// globally.
+    ///
+    /// **NOTE:** By default, [`ArgGroup::multiple`] is set to `false` which when combined with
+    /// `ArgGroup::required(true)` states, "One and *only one* arg must be used from this group.
+    /// Use of more than one arg is an error." Vice setting `ArgGroup::multiple(true)` which
+    /// states, '*At least* one arg from this group must be used. Using multiple is OK."
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ArgGroup, ErrorKind};
+    /// let result = App::new("myprog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .short("f"))
+    ///     .arg(Arg::with_name("color")
+    ///         .short("c"))
+    ///     .group(ArgGroup::with_name("req_flags")
+    ///         .args(&["flag", "color"])
+    ///         .required(true))
+    ///     .get_matches_from_safe(vec!["myprog"]);
+    /// // Because we didn't use any of the args in the group, it's an error
+    /// assert!(result.is_err());
+    /// let err = result.unwrap_err();
+    /// assert_eq!(err.kind, ErrorKind::MissingRequiredArgument);
+    /// ```
+    /// [`App`]: ./struct.App.html
+    /// [`SubCommand`]: ./struct.SubCommand.html
+    /// [`ArgGroup::multiple`]: ./struct.ArgGroup.html#method.multiple
+    pub fn required(mut self, r: bool) -> Self {
+        self.required = r;
+        self
+    }
+
+    /// Sets the requirement rules of this group. This is not to be confused with a
+    /// [required group]. Requirement rules function just like [argument requirement rules], you
+    /// can name other arguments or groups that must be present when any one of the arguments from
+    /// this group is used.
+    ///
+    /// **NOTE:** The name provided may be an argument, or group name
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ArgGroup, ErrorKind};
+    /// let result = App::new("myprog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .short("f"))
+    ///     .arg(Arg::with_name("color")
+    ///         .short("c"))
+    ///     .arg(Arg::with_name("debug")
+    ///         .short("d"))
+    ///     .group(ArgGroup::with_name("req_flags")
+    ///         .args(&["flag", "color"])
+    ///         .requires("debug"))
+    ///     .get_matches_from_safe(vec!["myprog", "-c"]);
+    /// // because we used an arg from the group, and the group requires "-d" to be used, it's an
+    /// // error
+    /// assert!(result.is_err());
+    /// let err = result.unwrap_err();
+    /// assert_eq!(err.kind, ErrorKind::MissingRequiredArgument);
+    /// ```
+    /// [required group]: ./struct.ArgGroup.html#method.required
+    /// [argument requirement rules]: ./struct.Arg.html#method.requires
+    pub fn requires(mut self, n: &'a str) -> Self {
+        if let Some(ref mut reqs) = self.requires {
+            reqs.push(n);
+        } else {
+            self.requires = Some(vec![n]);
+        }
+        self
+    }
+
+    /// Sets the requirement rules of this group. This is not to be confused with a
+    /// [required group]. Requirement rules function just like [argument requirement rules], you
+    /// can name other arguments or groups that must be present when one of the arguments from this
+    /// group is used.
+    ///
+    /// **NOTE:** The names provided may be an argument, or group name
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ArgGroup, ErrorKind};
+    /// let result = App::new("myprog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .short("f"))
+    ///     .arg(Arg::with_name("color")
+    ///         .short("c"))
+    ///     .arg(Arg::with_name("debug")
+    ///         .short("d"))
+    ///     .arg(Arg::with_name("verb")
+    ///         .short("v"))
+    ///     .group(ArgGroup::with_name("req_flags")
+    ///         .args(&["flag", "color"])
+    ///         .requires_all(&["debug", "verb"]))
+    ///     .get_matches_from_safe(vec!["myprog", "-c", "-d"]);
+    /// // because we used an arg from the group, and the group requires "-d" and "-v" to be used,
+    /// // yet we only used "-d" it's an error
+    /// assert!(result.is_err());
+    /// let err = result.unwrap_err();
+    /// assert_eq!(err.kind, ErrorKind::MissingRequiredArgument);
+    /// ```
+    /// [required group]: ./struct.ArgGroup.html#method.required
+    /// [argument requirement rules]: ./struct.Arg.html#method.requires_all
+    pub fn requires_all(mut self, ns: &[&'a str]) -> Self {
+        for n in ns {
+            self = self.requires(n);
+        }
+        self
+    }
+
+    /// Sets the exclusion rules of this group. Exclusion (aka conflict) rules function just like
+    /// [argument exclusion rules], you can name other arguments or groups that must *not* be
+    /// present when one of the arguments from this group are used.
+    ///
+    /// **NOTE:** The name provided may be an argument, or group name
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ArgGroup, ErrorKind};
+    /// let result = App::new("myprog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .short("f"))
+    ///     .arg(Arg::with_name("color")
+    ///         .short("c"))
+    ///     .arg(Arg::with_name("debug")
+    ///         .short("d"))
+    ///     .group(ArgGroup::with_name("req_flags")
+    ///         .args(&["flag", "color"])
+    ///         .conflicts_with("debug"))
+    ///     .get_matches_from_safe(vec!["myprog", "-c", "-d"]);
+    /// // because we used an arg from the group, and the group conflicts with "-d", it's an error
+    /// assert!(result.is_err());
+    /// let err = result.unwrap_err();
+    /// assert_eq!(err.kind, ErrorKind::ArgumentConflict);
+    /// ```
+    /// [argument exclusion rules]: ./struct.Arg.html#method.conflicts_with
+    pub fn conflicts_with(mut self, n: &'a str) -> Self {
+        if let Some(ref mut confs) = self.conflicts {
+            confs.push(n);
+        } else {
+            self.conflicts = Some(vec![n]);
+        }
+        self
+    }
+
+    /// Sets the exclusion rules of this group. Exclusion rules function just like
+    /// [argument exclusion rules], you can name other arguments or groups that must *not* be
+    /// present when one of the arguments from this group are used.
+    ///
+    /// **NOTE:** The names provided may be an argument, or group name
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ArgGroup, ErrorKind};
+    /// let result = App::new("myprog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .short("f"))
+    ///     .arg(Arg::with_name("color")
+    ///         .short("c"))
+    ///     .arg(Arg::with_name("debug")
+    ///         .short("d"))
+    ///     .arg(Arg::with_name("verb")
+    ///         .short("v"))
+    ///     .group(ArgGroup::with_name("req_flags")
+    ///         .args(&["flag", "color"])
+    ///         .conflicts_with_all(&["debug", "verb"]))
+    ///     .get_matches_from_safe(vec!["myprog", "-c", "-v"]);
+    /// // because we used an arg from the group, and the group conflicts with either "-v" or "-d"
+    /// // it's an error
+    /// assert!(result.is_err());
+    /// let err = result.unwrap_err();
+    /// assert_eq!(err.kind, ErrorKind::ArgumentConflict);
+    /// ```
+    /// [argument exclusion rules]: ./struct.Arg.html#method.conflicts_with_all
+    pub fn conflicts_with_all(mut self, ns: &[&'a str]) -> Self {
+        for n in ns {
+            self = self.conflicts_with(n);
+        }
+        self
+    }
+}
+
+impl<'a> Debug for ArgGroup<'a> {
+    fn fmt(&self, f: &mut Formatter) -> Result {
+        write!(f,
+               "{{\n\
+                   \tname: {:?},\n\
+                   \targs: {:?},\n\
+                   \trequired: {:?},\n\
+                   \trequires: {:?},\n\
+                   \tconflicts: {:?},\n\
+                }}",
+               self.name,
+               self.args,
+               self.required,
+               self.requires,
+               self.conflicts)
+    }
+}
+
+impl<'a, 'z> From<&'z ArgGroup<'a>> for ArgGroup<'a> {
+    fn from(g: &'z ArgGroup<'a>) -> Self {
+        ArgGroup {
+            name: g.name,
+            required: g.required,
+            args: g.args.clone(),
+            requires: g.requires.clone(),
+            conflicts: g.conflicts.clone(),
+            multiple: g.multiple,
+        }
+    }
+}
+
+#[cfg(feature = "yaml")]
+impl<'a> From<&'a BTreeMap<Yaml, Yaml>> for ArgGroup<'a> {
+    fn from(b: &'a BTreeMap<Yaml, Yaml>) -> Self {
+        // We WANT this to panic on error...so expect() is good.
+        let mut a = ArgGroup::default();
+        let group_settings = if b.len() == 1 {
+            let name_yml = b.keys().nth(0).expect("failed to get name");
+            let name_str = name_yml.as_str().expect("failed to convert arg YAML name to str");
+            a.name = name_str;
+            b.get(name_yml)
+                .expect("failed to get name_str")
+                .as_hash()
+                .expect("failed to convert to a hash")
+        } else {
+            b
+        };
+
+        for (k, v) in group_settings {
+            a = match k.as_str().unwrap() {
+                "required" => a.required(v.as_bool().unwrap()),
+                "multiple" => a.multiple(v.as_bool().unwrap()),
+                "args" => yaml_vec_or_str!(v, a, arg),
+                "arg" => {
+                    if let Some(ys) = v.as_str() {
+                        a = a.arg(ys);
+                    }
+                    a
+                }
+                "requires" => yaml_vec_or_str!(v, a, requires),
+                "conflicts_with" => yaml_vec_or_str!(v, a, conflicts_with),
+                "name" => {
+                    if let Some(ys) = v.as_str() {
+                        a.name = ys;
+                    }
+                    a
+                }
+                s => {
+                    panic!("Unknown ArgGroup setting '{}' in YAML file for \
+                             ArgGroup '{}'",
+                           s,
+                           a.name)
+                }
+            }
+        }
+
+        a
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use super::ArgGroup;
+    #[cfg(feature = "yaml")]
+    use yaml_rust::YamlLoader;
+
+    #[test]
+    fn groups() {
+        let g = ArgGroup::with_name("test")
+            .arg("a1")
+            .arg("a4")
+            .args(&["a2", "a3"])
+            .required(true)
+            .conflicts_with("c1")
+            .conflicts_with_all(&["c2", "c3"])
+            .conflicts_with("c4")
+            .requires("r1")
+            .requires_all(&["r2", "r3"])
+            .requires("r4");
+
+        let args = vec!["a1", "a4", "a2", "a3"];
+        let reqs = vec!["r1", "r2", "r3", "r4"];
+        let confs = vec!["c1", "c2", "c3", "c4"];
+
+        assert_eq!(g.args, args);
+        assert_eq!(g.requires, Some(reqs));
+        assert_eq!(g.conflicts, Some(confs));
+    }
+
+    #[test]
+    fn test_debug() {
+        let g = ArgGroup::with_name("test")
+            .arg("a1")
+            .arg("a4")
+            .args(&["a2", "a3"])
+            .required(true)
+            .conflicts_with("c1")
+            .conflicts_with_all(&["c2", "c3"])
+            .conflicts_with("c4")
+            .requires("r1")
+            .requires_all(&["r2", "r3"])
+            .requires("r4");
+
+        let args = vec!["a1", "a4", "a2", "a3"];
+        let reqs = vec!["r1", "r2", "r3", "r4"];
+        let confs = vec!["c1", "c2", "c3", "c4"];
+
+        let debug_str = format!("{{\n\
+                   \tname: \"test\",\n\
+                   \targs: {:?},\n\
+                   \trequired: {:?},\n\
+                   \trequires: {:?},\n\
+                   \tconflicts: {:?},\n\
+               }}",
+                                args,
+                                true,
+                                Some(reqs),
+                                Some(confs));
+        assert_eq!(&*format!("{:?}", g), &*debug_str);
+    }
+
+    #[test]
+    fn test_from() {
+        let g = ArgGroup::with_name("test")
+            .arg("a1")
+            .arg("a4")
+            .args(&["a2", "a3"])
+            .required(true)
+            .conflicts_with("c1")
+            .conflicts_with_all(&["c2", "c3"])
+            .conflicts_with("c4")
+            .requires("r1")
+            .requires_all(&["r2", "r3"])
+            .requires("r4");
+
+        let args = vec!["a1", "a4", "a2", "a3"];
+        let reqs = vec!["r1", "r2", "r3", "r4"];
+        let confs = vec!["c1", "c2", "c3", "c4"];
+
+        let g2 = ArgGroup::from(&g);
+        assert_eq!(g2.args, args);
+        assert_eq!(g2.requires, Some(reqs));
+        assert_eq!(g2.conflicts, Some(confs));
+    }
+
+    #[cfg(feature="yaml")]
+    #[cfg_attr(feature = "yaml", test)]
+    fn test_yaml() {
+
+        let g_yaml = "name: test
+args:
+- a1
+- a4
+- a2
+- a3
+conflicts_with:
+- c1
+- c2
+- c3
+- c4
+requires:
+- r1
+- r2
+- r3
+- r4";
+        let yml = &YamlLoader::load_from_str(g_yaml).expect("failed to load YAML file")[0];
+        let g = ArgGroup::from_yaml(yml);
+        let args = vec!["a1", "a4", "a2", "a3"];
+        let reqs = vec!["r1", "r2", "r3", "r4"];
+        let confs = vec!["c1", "c2", "c3", "c4"];
+        assert_eq!(g.args, args);
+        assert_eq!(g.requires, Some(reqs));
+        assert_eq!(g.conflicts, Some(confs));
+    }
+}
+
+impl<'a> Clone for ArgGroup<'a> {
+    fn clone(&self) -> Self {
+        ArgGroup {
+            name: self.name,
+            required: self.required,
+            args: self.args.clone(),
+            requires: self.requires.clone(),
+            conflicts: self.conflicts.clone(),
+            multiple: self.multiple,
+        }
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clap-2.25.0/src/args/macros.rs
@@ -0,0 +1,109 @@
+#[cfg(feature = "yaml")]
+macro_rules! yaml_tuple2 {
+    ($a:ident, $v:ident, $c:ident) => {{
+            if let Some(vec) = $v.as_vec() {
+                for ys in vec {
+                    if let Some(tup) = ys.as_vec() {
+                        debug_assert_eq!(2, tup.len());
+                        $a = $a.$c(yaml_str!(tup[0]), yaml_str!(tup[1]));
+                    } else {
+                        panic!("Failed to convert YAML value to vec");
+                    }
+                }
+            } else {
+                panic!("Failed to convert YAML value to vec");
+            }
+            $a
+        }
+    };
+}
+
+#[cfg(feature = "yaml")]
+macro_rules! yaml_tuple3 {
+    ($a:ident, $v:ident, $c:ident) => {{
+            if let Some(vec) = $v.as_vec() {
+                for ys in vec {
+                    if let Some(tup) = ys.as_vec() {
+                        debug_assert_eq!(3, tup.len());
+                        $a = $a.$c(yaml_str!(tup[0]), yaml_opt_str!(tup[1]), yaml_str!(tup[2]));
+                    } else {
+                        panic!("Failed to convert YAML value to vec");
+                    }
+                }
+            } else {
+                panic!("Failed to convert YAML value to vec");
+            }
+            $a
+        }
+    };
+}
+
+#[cfg(feature = "yaml")]
+macro_rules! yaml_vec_or_str {
+    ($v:ident, $a:ident, $c:ident) => {{
+            let maybe_vec = $v.as_vec();
+            if let Some(vec) = maybe_vec {
+                for ys in vec {
+                    if let Some(s) = ys.as_str() {
+                        $a = $a.$c(s);
+                    } else {
+                        panic!("Failed to convert YAML value {:?} to a string", ys);
+                    }
+                }
+            } else {
+                if let Some(s) = $v.as_str() {
+                    $a = $a.$c(s);
+                } else {
+                    panic!("Failed to convert YAML value {:?} to either a vec or string", $v);
+                }
+            }
+            $a
+        }
+    };
+}
+
+#[cfg(feature = "yaml")]
+macro_rules! yaml_opt_str {
+    ($v:expr) => {{
+        if $v.is_null() {
+            Some($v.as_str().unwrap_or_else(|| panic!("failed to convert YAML {:?} value to a string", $v)))
+        } else {
+            None
+        }
+    }};
+}
+
+#[cfg(feature = "yaml")]
+macro_rules! yaml_str {
+    ($v:expr) => {{
+        $v.as_str().unwrap_or_else(|| panic!("failed to convert YAML {:?} value to a string", $v))
+    }};
+}
+
+#[cfg(feature = "yaml")]
+macro_rules! yaml_to_str {
+    ($a:ident, $v:ident, $c:ident) => {{
+        $a.$c(yaml_str!($v))
+    }};
+}
+
+#[cfg(feature = "yaml")]
+macro_rules! yaml_to_bool {
+    ($a:ident, $v:ident, $c:ident) => {{
+        $a.$c($v.as_bool().unwrap_or_else(|| panic!("failed to convert YAML {:?} value to a string", $v)))
+    }};
+}
+
+#[cfg(feature = "yaml")]
+macro_rules! yaml_to_u64 {
+    ($a:ident, $v:ident, $c:ident) => {{
+        $a.$c($v.as_i64().unwrap_or_else(|| panic!("failed to convert YAML {:?} value to a string", $v)) as u64)
+    }};
+}
+
+#[cfg(feature = "yaml")]
+macro_rules! yaml_to_usize {
+    ($a:ident, $v:ident, $c:ident) => {{
+        $a.$c($v.as_i64().unwrap_or_else(|| panic!("failed to convert YAML {:?} value to a string", $v)) as usize)
+    }};
+}
rename from third_party/rust/clap-2.24.2/src/args/matched_arg.rs
rename to third_party/rust/clap-2.25.0/src/args/matched_arg.rs
rename from third_party/rust/clap-2.24.2/src/args/mod.rs
rename to third_party/rust/clap-2.25.0/src/args/mod.rs
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clap-2.25.0/src/args/settings.rs
@@ -0,0 +1,165 @@
+// Std
+use std::ascii::AsciiExt;
+use std::str::FromStr;
+
+bitflags! {
+    struct Flags: u16 {
+        const REQUIRED         = 1;
+        const MULTIPLE         = 1 << 1;
+        const EMPTY_VALS       = 1 << 2;
+        const GLOBAL           = 1 << 3;
+        const HIDDEN           = 1 << 4;
+        const TAKES_VAL        = 1 << 5;
+        const USE_DELIM        = 1 << 6;
+        const NEXT_LINE_HELP   = 1 << 7;
+        const R_UNLESS_ALL     = 1 << 8;
+        const REQ_DELIM        = 1 << 9;
+        const DELIM_NOT_SET    = 1 << 10;
+        const HIDE_POS_VALS    = 1 << 11;
+        const ALLOW_TAC_VALS   = 1 << 12;
+        const REQUIRE_EQUALS   = 1 << 13;
+        const LAST             = 1 << 14;
+        const HIDE_DEFAULT_VAL = 1 << 15;
+    }
+}
+
+#[doc(hidden)]
+#[derive(Debug, Clone, Copy)]
+pub struct ArgFlags(Flags);
+
+impl ArgFlags {
+    pub fn new() -> Self { ArgFlags::default() }
+
+    impl_settings!{ArgSettings,
+        Required => REQUIRED,
+        Multiple => MULTIPLE,
+        EmptyValues => EMPTY_VALS,
+        Global => GLOBAL,
+        Hidden => HIDDEN,
+        TakesValue => TAKES_VAL,
+        UseValueDelimiter => USE_DELIM,
+        NextLineHelp => NEXT_LINE_HELP,
+        RequiredUnlessAll => R_UNLESS_ALL,
+        RequireDelimiter => REQ_DELIM,
+        ValueDelimiterNotSet => DELIM_NOT_SET,
+        HidePossibleValues => HIDE_POS_VALS,
+        AllowLeadingHyphen => ALLOW_TAC_VALS,
+        RequireEquals => REQUIRE_EQUALS,
+        Last => LAST,
+        HideDefaultValue => HIDE_DEFAULT_VAL
+    }
+}
+
+impl Default for ArgFlags {
+    fn default() -> Self { ArgFlags(EMPTY_VALS | DELIM_NOT_SET) }
+}
+
+/// Various settings that apply to arguments and may be set, unset, and checked via getter/setter
+/// methods [`Arg::set`], [`Arg::unset`], and [`Arg::is_set`]
+/// [`Arg::set`]: ./struct.Arg.html#method.set
+/// [`Arg::unset`]: ./struct.Arg.html#method.unset
+/// [`Arg::is_set`]: ./struct.Arg.html#method.is_set
+#[derive(Debug, PartialEq, Copy, Clone)]
+pub enum ArgSettings {
+    /// The argument must be used
+    Required,
+    /// The argument may be used multiple times such as `--flag --flag`
+    Multiple,
+    /// The argument allows empty values such as `--option ""`
+    EmptyValues,
+    /// The argument should be propagated down through all child [`SubCommands`]
+    /// [`SubCommand`]: ./struct.SubCommand.html
+    Global,
+    /// The argument should **not** be shown in help text
+    Hidden,
+    /// The argument accepts a value, such as `--option <value>`
+    TakesValue,
+    /// Determines if the argument allows values to be grouped via a delimter
+    UseValueDelimiter,
+    /// Prints the help text on the line after the argument
+    NextLineHelp,
+    /// Requires the use of a value delimiter for all multiple values
+    RequireDelimiter,
+    /// Hides the possible values from the help string
+    HidePossibleValues,
+    /// Allows vals that start with a '-'
+    AllowLeadingHyphen,
+    /// Require options use `--option=val` syntax
+    RequireEquals,
+    /// Specifies that the arg is the last positional argument and may be accessed early via `--`
+    /// syntax
+    Last,
+    /// Hides the default value from the help string
+    HideDefaultValue,
+    #[doc(hidden)]
+    RequiredUnlessAll,
+    #[doc(hidden)]
+    ValueDelimiterNotSet,
+}
+
+impl FromStr for ArgSettings {
+    type Err = String;
+    fn from_str(s: &str) -> Result<Self, <Self as FromStr>::Err> {
+        match &*s.to_ascii_lowercase() {
+            "required" => Ok(ArgSettings::Required),
+            "multiple" => Ok(ArgSettings::Multiple),
+            "global" => Ok(ArgSettings::Global),
+            "emptyvalues" => Ok(ArgSettings::EmptyValues),
+            "hidden" => Ok(ArgSettings::Hidden),
+            "takesvalue" => Ok(ArgSettings::TakesValue),
+            "usevaluedelimiter" => Ok(ArgSettings::UseValueDelimiter),
+            "nextlinehelp" => Ok(ArgSettings::NextLineHelp),
+            "requiredunlessall" => Ok(ArgSettings::RequiredUnlessAll),
+            "requiredelimiter" => Ok(ArgSettings::RequireDelimiter),
+            "valuedelimiternotset" => Ok(ArgSettings::ValueDelimiterNotSet),
+            "hidepossiblevalues" => Ok(ArgSettings::HidePossibleValues),
+            "allowleadinghyphen" => Ok(ArgSettings::AllowLeadingHyphen),
+            "requireequals" => Ok(ArgSettings::RequireEquals),
+            "last" => Ok(ArgSettings::Last),
+            "hidedefaultvalue" => Ok(ArgSettings::HideDefaultValue),
+            _ => Err("unknown ArgSetting, cannot convert from str".to_owned()),
+        }
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use super::ArgSettings;
+
+    #[test]
+    fn arg_settings_fromstr() {
+        assert_eq!("allowleadinghyphen".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::AllowLeadingHyphen);
+        assert_eq!("emptyvalues".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::EmptyValues);
+        assert_eq!("global".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::Global);
+        assert_eq!("hidepossiblevalues".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::HidePossibleValues);
+        assert_eq!("hidden".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::Hidden);
+        assert_eq!("multiple".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::Multiple);
+        assert_eq!("nextlinehelp".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::NextLineHelp);
+        assert_eq!("requiredunlessall".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::RequiredUnlessAll);
+        assert_eq!("requiredelimiter".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::RequireDelimiter);
+        assert_eq!("required".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::Required);
+        assert_eq!("takesvalue".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::TakesValue);
+        assert_eq!("usevaluedelimiter".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::UseValueDelimiter);
+        assert_eq!("valuedelimiternotset".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::ValueDelimiterNotSet);
+        assert_eq!("requireequals".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::RequireEquals);
+        assert_eq!("last".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::Last);
+        assert_eq!("hidedefaultvalue".parse::<ArgSettings>().unwrap(),
+                   ArgSettings::HideDefaultValue);
+        assert!("hahahaha".parse::<ArgSettings>().is_err());
+    }
+}
rename from third_party/rust/clap-2.24.2/src/args/subcommand.rs
rename to third_party/rust/clap-2.25.0/src/args/subcommand.rs
rename from third_party/rust/clap-2.24.2/src/completions/bash.rs
rename to third_party/rust/clap-2.25.0/src/completions/bash.rs
rename from third_party/rust/clap-2.24.2/src/completions/fish.rs
rename to third_party/rust/clap-2.25.0/src/completions/fish.rs
rename from third_party/rust/clap-2.24.2/src/completions/macros.rs
rename to third_party/rust/clap-2.25.0/src/completions/macros.rs
rename from third_party/rust/clap-2.24.2/src/completions/mod.rs
rename to third_party/rust/clap-2.25.0/src/completions/mod.rs
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clap-2.25.0/src/completions/powershell.rs
@@ -0,0 +1,125 @@
+
+// Std
+use std::io::Write;
+
+// Internal
+use app::parser::Parser;
+use INTERNAL_ERROR_MSG;
+
+pub struct PowerShellGen<'a, 'b>
+    where 'a: 'b
+{
+    p: &'b Parser<'a, 'b>,
+}
+
+impl<'a, 'b> PowerShellGen<'a, 'b> {
+    pub fn new(p: &'b Parser<'a, 'b>) -> Self { PowerShellGen { p: p } }
+
+    pub fn generate_to<W: Write>(&self, buf: &mut W) {
+        let bin_name = self.p.meta.bin_name.as_ref().unwrap();
+
+        let mut names = vec![];
+        let (subcommands_detection_cases, subcommands_cases) = generate_inner(self.p, "", &mut names);
+
+        let mut bin_names = vec![bin_name.to_string(), format!("./{0}", bin_name)];
+        if cfg!(windows) {
+            bin_names.push(format!("{0}.exe", bin_name));
+            bin_names.push(format!(r".\{0}", bin_name));
+            bin_names.push(format!(r".\{0}.exe", bin_name));
+            bin_names.push(format!(r"./{0}.exe", bin_name));
+        }
+
+        let bin_names = bin_names.iter().fold(String::new(), |previous, current| {
+            format!("{0}, '{1}'", previous, current)
+        });
+        let bin_names = bin_names.trim_left_matches(", ");
+
+        let result = format!(r#"
+@({bin_names}) | %{{
+    Register-ArgumentCompleter -Native -CommandName $_ -ScriptBlock {{
+        param($wordToComplete, $commandAst, $cursorPosition)
+
+        $command = '_{bin_name}'
+        $commandAst.CommandElements |
+            Select-Object -Skip 1 |
+            %{{
+                switch ($_.ToString()) {{
+{subcommands_detection_cases}
+                    default {{ 
+                        break
+                    }}
+                }}
+            }}
+
+        $completions = @()
+
+        switch ($command) {{
+{subcommands_cases}
+        }}
+
+        $completions |
+            ?{{ $_ -like "$wordToComplete*" }} |
+            Sort-Object |
+            %{{ New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', $_ }}
+    }}
+}}
+"#,
+            bin_names = bin_names,
+            bin_name = bin_name,
+            subcommands_detection_cases = subcommands_detection_cases,
+            subcommands_cases = subcommands_cases
+        );
+
+        w!(buf, result.as_bytes());
+    }
+}
+
+fn generate_inner<'a, 'b, 'p>(p: &'p Parser<'a, 'b>, previous_command_name: &str, names: &mut Vec<&'p str>) -> (String, String) {
+    debugln!("PowerShellGen::generate_inner;");
+    let command_name = if previous_command_name.is_empty() {
+        format!("{}_{}", previous_command_name, &p.meta.bin_name.as_ref().expect(INTERNAL_ERROR_MSG))
+    } else {
+        format!("{}_{}", previous_command_name, &p.meta.name)
+    };
+
+    let mut subcommands_detection_cases = if !names.contains(&&*p.meta.name) {
+        names.push(&*p.meta.name);
+        format!(r"
+                    '{0}' {{
+                        $command += '_{0}'
+                        break
+                    }}
+",
+                &p.meta.name)
+    } else {
+        String::new()
+    };
+
+    let mut completions = String::new();
+    for subcommand in &p.subcommands {
+        completions.push_str(&format!("'{}', ", &subcommand.p.meta.name));
+    }
+    for short in shorts!(p) {
+        completions.push_str(&format!("'-{}', ", short));
+    }
+    for long in longs!(p) {
+        completions.push_str(&format!("'--{}', ", long));
+    }
+
+    let mut subcommands_cases = format!(r"
+            '{}' {{
+                $completions = @({})
+            }}
+",
+                                        &command_name,
+                                        completions.trim_right_matches(", "));
+
+    for subcommand in &p.subcommands {
+        let (subcommand_subcommands_detection_cases, subcommand_subcommands_cases) =
+            generate_inner(&subcommand.p, &command_name, names);
+        subcommands_detection_cases.push_str(&subcommand_subcommands_detection_cases);
+        subcommands_cases.push_str(&subcommand_subcommands_cases);
+    }
+
+    (subcommands_detection_cases, subcommands_cases)
+}
rename from third_party/rust/clap-2.24.2/src/completions/shell.rs
rename to third_party/rust/clap-2.25.0/src/completions/shell.rs
rename from third_party/rust/clap-2.24.2/src/completions/zsh.rs
rename to third_party/rust/clap-2.25.0/src/completions/zsh.rs
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clap-2.25.0/src/errors.rs
@@ -0,0 +1,884 @@
+// Std
+use std::convert::From;
+use std::error::Error as StdError;
+use std::fmt as std_fmt;
+use std::fmt::Display;
+use std::io::{self, Write};
+use std::process;
+use std::result::Result as StdResult;
+
+// Internal
+use args::{FlagBuilder, AnyArg};
+use fmt::{Colorizer, ColorizerOption, ColorWhen};
+use suggestions;
+
+/// Short hand for [`Result`] type
+/// [`Result`]: https://doc.rust-lang.org/std/result/enum.Result.html
+pub type Result<T> = StdResult<T, Error>;
+
+/// Command line argument parser kind of error
+#[derive(Debug, Copy, Clone, PartialEq)]
+pub enum ErrorKind {
+    /// Occurs when an [`Arg`] has a set of possible values,
+    /// and the user provides a value which isn't in that set.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind};
+    /// let result = App::new("prog")
+    ///     .arg(Arg::with_name("speed")
+    ///         .possible_value("fast")
+    ///         .possible_value("slow"))
+    ///     .get_matches_from_safe(vec!["prog", "other"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::InvalidValue);
+    /// ```
+    /// [`Arg`]: ./struct.Arg.html
+    InvalidValue,
+
+    /// Occurs when a user provides a flag, option, argument or subcommand which isn't defined.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind};
+    /// let result = App::new("prog")
+    ///     .arg(Arg::from_usage("--flag 'some flag'"))
+    ///     .get_matches_from_safe(vec!["prog", "--other"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::UnknownArgument);
+    /// ```
+    UnknownArgument,
+
+    /// Occurs when the user provides an unrecognized [`SubCommand`] which meets the threshold for
+    /// being similar enough to an existing subcommand.
+    /// If it doesn't meet the threshold, or the 'suggestions' feature is disabled,
+    /// the more general [`UnknownArgument`] error is returned.
+    ///
+    /// # Examples
+    ///
+    #[cfg_attr(not(feature="suggestions"), doc=" ```no_run")]
+    #[cfg_attr(    feature="suggestions" , doc=" ```")]
+    /// # use clap::{App, Arg, ErrorKind, SubCommand};
+    /// let result = App::new("prog")
+    ///     .subcommand(SubCommand::with_name("config")
+    ///         .about("Used for configuration")
+    ///         .arg(Arg::with_name("config_file")
+    ///             .help("The configuration file to use")
+    ///             .index(1)))
+    ///     .get_matches_from_safe(vec!["prog", "confi"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::InvalidSubcommand);
+    /// ```
+    /// [`SubCommand`]: ./struct.SubCommand.html
+    /// [`UnknownArgument`]: ./enum.ErrorKind.html#variant.UnknownArgument
+    InvalidSubcommand,
+
+    /// Occurs when the user provides an unrecognized [`SubCommand`] which either
+    /// doesn't meet the threshold for being similar enough to an existing subcommand,
+    /// or the 'sggestions' feature is disabled.
+    /// Otherwise the more detailed [`InvalidSubcommand`] error is returned.
+    ///
+    /// This error typically happens when passing additional subcommand names to the `help`
+    /// subcommand. Otherwise, the more general [`UnknownArgument`] error is used.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind, SubCommand};
+    /// let result = App::new("prog")
+    ///     .subcommand(SubCommand::with_name("config")
+    ///         .about("Used for configuration")
+    ///         .arg(Arg::with_name("config_file")
+    ///             .help("The configuration file to use")
+    ///             .index(1)))
+    ///     .get_matches_from_safe(vec!["prog", "help", "nothing"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::UnrecognizedSubcommand);
+    /// ```
+    /// [`SubCommand`]: ./struct.SubCommand.html
+    /// [`InvalidSubcommand`]: ./enum.ErrorKind.html#variant.InvalidSubcommand
+    /// [`UnknownArgument`]: ./enum.ErrorKind.html#variant.UnknownArgument
+    UnrecognizedSubcommand,
+
+    /// Occurs when the user provides an empty value for an option that does not allow empty
+    /// values.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind};
+    /// let res = App::new("prog")
+    ///     .arg(Arg::with_name("color")
+    ///          .long("color")
+    ///          .empty_values(false))
+    ///     .get_matches_from_safe(vec!["prog", "--color="]);
+    /// assert!(res.is_err());
+    /// assert_eq!(res.unwrap_err().kind, ErrorKind::EmptyValue);
+    /// ```
+    EmptyValue,
+
+    /// Occurs when the user provides a value for an argument with a custom validation and the
+    /// value fails that validation.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind};
+    /// fn is_numeric(val: String) -> Result<(), String> {
+    ///     match val.parse::<i64>() {
+    ///         Ok(..) => Ok(()),
+    ///         Err(..) => Err(String::from("Value wasn't a number!")),
+    ///     }
+    /// }
+    ///
+    /// let result = App::new("prog")
+    ///     .arg(Arg::with_name("num")
+    ///          .validator(is_numeric))
+    ///     .get_matches_from_safe(vec!["prog", "NotANumber"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::ValueValidation);
+    /// ```
+    ValueValidation,
+
+    /// Occurs when a user provides more values for an argument than were defined by setting
+    /// [`Arg::max_values`].
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind};
+    /// let result = App::new("prog")
+    ///     .arg(Arg::with_name("arg")
+    ///         .multiple(true)
+    ///         .max_values(2))
+    ///     .get_matches_from_safe(vec!["prog", "too", "many", "values"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::TooManyValues);
+    /// ```
+    /// [`Arg::max_values`]: ./struct.Arg.html#method.max_values
+    TooManyValues,
+
+    /// Occurs when the user provides fewer values for an argument than were defined by setting
+    /// [`Arg::min_values`].
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind};
+    /// let result = App::new("prog")
+    ///     .arg(Arg::with_name("some_opt")
+    ///         .long("opt")
+    ///         .min_values(3))
+    ///     .get_matches_from_safe(vec!["prog", "--opt", "too", "few"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::TooFewValues);
+    /// ```
+    /// [`Arg::min_values`]: ./struct.Arg.html#method.min_values
+    TooFewValues,
+
+    /// Occurs when the user provides a different number of values for an argument than what's
+    /// been defined by setting [`Arg::number_of_values`] or than was implicitly set by
+    /// [`Arg::value_names`].
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind};
+    /// let result = App::new("prog")
+    ///     .arg(Arg::with_name("some_opt")
+    ///         .long("opt")
+    ///         .takes_value(true)
+    ///         .number_of_values(2))
+    ///     .get_matches_from_safe(vec!["prog", "--opt", "wrong"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::WrongNumberOfValues);
+    /// ```
+    /// [`Arg::number_of_values`]
+    /// [`Arg::number_of_values`]: ./struct.Arg.html#method.number_of_values
+    /// [`Arg::value_names`]: ./struct.Arg.html#method.value_names
+    WrongNumberOfValues,
+
+    /// Occurs when the user provides two values which conflict with each other and can't be used
+    /// together.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind};
+    /// let result = App::new("prog")
+    ///     .arg(Arg::with_name("debug")
+    ///         .long("debug")
+    ///         .conflicts_with("color"))
+    ///     .arg(Arg::with_name("color")
+    ///         .long("color"))
+    ///     .get_matches_from_safe(vec!["prog", "--debug", "--color"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::ArgumentConflict);
+    /// ```
+    ArgumentConflict,
+
+    /// Occurs when the user does not provide one or more required arguments.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind};
+    /// let result = App::new("prog")
+    ///     .arg(Arg::with_name("debug")
+    ///         .required(true))
+    ///     .get_matches_from_safe(vec!["prog"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::MissingRequiredArgument);
+    /// ```
+    MissingRequiredArgument,
+
+    /// Occurs when a subcommand is required (as defined by [`AppSettings::SubcommandRequired`]),
+    /// but the user does not provide one.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, AppSettings, SubCommand, ErrorKind};
+    /// let err = App::new("prog")
+    ///     .setting(AppSettings::SubcommandRequired)
+    ///     .subcommand(SubCommand::with_name("test"))
+    ///     .get_matches_from_safe(vec![
+    ///         "myprog",
+    ///     ]);
+    /// assert!(err.is_err());
+    /// assert_eq!(err.unwrap_err().kind, ErrorKind::MissingSubcommand);
+    /// # ;
+    /// ```
+    /// [`AppSettings::SubcommandRequired`]: ./enum.AppSettings.html#variant.SubcommandRequired
+    MissingSubcommand,
+
+    /// Occurs when either an argument or [`SubCommand`] is required, as defined by
+    /// [`AppSettings::ArgRequiredElseHelp`], but the user did not provide one.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, AppSettings, ErrorKind, SubCommand};
+    /// let result = App::new("prog")
+    ///     .setting(AppSettings::ArgRequiredElseHelp)
+    ///     .subcommand(SubCommand::with_name("config")
+    ///         .about("Used for configuration")
+    ///         .arg(Arg::with_name("config_file")
+    ///             .help("The configuration file to use")))
+    ///     .get_matches_from_safe(vec!["prog"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::MissingArgumentOrSubcommand);
+    /// ```
+    /// [`SubCommand`]: ./struct.SubCommand.html
+    /// [`AppSettings::ArgRequiredElseHelp`]: ./enum.AppSettings.html#variant.ArgRequiredElseHelp
+    MissingArgumentOrSubcommand,
+
+    /// Occurs when the user provides multiple values to an argument which doesn't allow that.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind};
+    /// let result = App::new("prog")
+    ///     .arg(Arg::with_name("debug")
+    ///         .long("debug")
+    ///         .multiple(false))
+    ///     .get_matches_from_safe(vec!["prog", "--debug", "--debug"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::UnexpectedMultipleUsage);
+    /// ```
+    UnexpectedMultipleUsage,
+
+    /// Occurs when the user provides a value containing invalid UTF-8 for an argument and
+    /// [`AppSettings::StrictUtf8`] is set.
+    ///
+    /// # Platform Speicific
+    ///
+    /// Non-Windows platforms only (such as Linux, Unix, OSX, etc.)
+    ///
+    /// # Examples
+    ///
+    #[cfg_attr(not(unix), doc=" ```ignore")]
+    #[cfg_attr(    unix , doc=" ```")]
+    /// # use clap::{App, Arg, ErrorKind, AppSettings};
+    /// # use std::os::unix::ffi::OsStringExt;
+    /// # use std::ffi::OsString;
+    /// let result = App::new("prog")
+    ///     .setting(AppSettings::StrictUtf8)
+    ///     .arg(Arg::with_name("utf8")
+    ///         .short("u")
+    ///         .takes_value(true))
+    ///     .get_matches_from_safe(vec![OsString::from("myprog"),
+    ///                                 OsString::from("-u"),
+    ///                                 OsString::from_vec(vec![0xE9])]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::InvalidUtf8);
+    /// ```
+    /// [`AppSettings::StrictUtf8`]: ./enum.AppSettings.html#variant.StrictUtf8
+    InvalidUtf8,
+
+    /// Not a true "error" as it means `--help` or similar was used.
+    /// The help message will be sent to `stdout`.
+    ///
+    /// **Note**: If the help is displayed due to an error (such as missing subcommands) it will
+    /// be sent to `stderr` instead of `stdout`.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind};
+    /// let result = App::new("prog")
+    ///     .get_matches_from_safe(vec!["prog", "--help"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::HelpDisplayed);
+    /// ```
+    HelpDisplayed,
+
+    /// Not a true "error" as it means `--version` or similar was used.
+    /// The message will be sent to `stdout`.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// # use clap::{App, Arg, ErrorKind};
+    /// let result = App::new("prog")
+    ///     .get_matches_from_safe(vec!["prog", "--version"]);
+    /// assert!(result.is_err());
+    /// assert_eq!(result.unwrap_err().kind, ErrorKind::VersionDisplayed);
+    /// ```
+    VersionDisplayed,
+
+    /// Occurs when using the [`value_t!`] and [`values_t!`] macros to convert an argument value
+    /// into type `T`, but the argument you requested wasn't used. I.e. you asked for an argument
+    /// with name `config` to be converted, but `config` wasn't used by the user.
+    /// [`value_t!`]: ./macro.value_t!.html
+    /// [`values_t!`]: ./macro.values_t!.html
+    ArgumentNotFound,
+
+    /// Represents an [I/O error].
+    /// Can occur when writing to `stderr` or `stdout` or reading a configuration file.
+    /// [I/O error]: https://doc.rust-lang.org/std/io/struct.Error.html
+    Io,
+
+    /// Represents a [Format error] (which is a part of [`Display`]).
+    /// Typically caused by writing to `stderr` or `stdout`.
+    /// [`Display`]: https://doc.rust-lang.org/std/fmt/trait.Display.html
+    /// [Format error]: https://doc.rust-lang.org/std/fmt/struct.Error.html
+    Format,
+}
+
+/// Command Line Argument Parser Error
+#[derive(Debug)]
+pub struct Error {
+    /// Formated error message
+    pub message: String,
+    /// The type of error
+    pub kind: ErrorKind,
+    /// Any additional information passed along, such as the argument name that caused the error
+    pub info: Option<Vec<String>>,
+}
+
+impl Error {
+    /// Should the message be written to `stdout` or not
+    pub fn use_stderr(&self) -> bool {
+        match self.kind {
+            ErrorKind::HelpDisplayed |
+            ErrorKind::VersionDisplayed => false,
+            _ => true,
+        }
+    }
+
+    /// Prints the error to `stderr` and exits with a status of `1`
+    pub fn exit(&self) -> ! {
+        if self.use_stderr() {
+            wlnerr!("{}", self.message);
+            process::exit(1);
+        }
+        let out = io::stdout();
+        writeln!(&mut out.lock(), "{}", self.message).expect("Error writing Error to stdout");
+        process::exit(0);
+    }
+
+    #[doc(hidden)]
+    pub fn write_to<W: Write>(&self, w: &mut W) -> io::Result<()> { write!(w, "{}", self.message) }
+
+    #[doc(hidden)]
+    pub fn argument_conflict<'a, 'b, A, O, U>(arg: &A,
+                                              other: Option<O>,
+                                              usage: U,
+                                              color: ColorWhen)
+                                              -> Self
+        where A: AnyArg<'a, 'b> + Display,
+              O: Into<String>,
+              U: Display
+    {
+        let mut v = vec![arg.name().to_owned()];
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} The argument '{}' cannot be used with {}\n\n\
+                            {}\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             c.warning(&*arg.to_string()),
+                             match other {
+                                 Some(name) => {
+                                     let n = name.into();
+                                     v.push(n.clone());
+                                     c.warning(format!("'{}'", n))
+                                 }
+                                 None => {
+                                     c.none("one or more of the other specified arguments"
+                                         .to_owned())
+                                 }
+                             },
+                             usage,
+                             c.good("--help")),
+            kind: ErrorKind::ArgumentConflict,
+            info: Some(v),
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn empty_value<'a, 'b, A, U>(arg: &A, usage: U, color: ColorWhen) -> Self
+        where A: AnyArg<'a, 'b> + Display,
+              U: Display
+    {
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} The argument '{}' requires a value but none was supplied\
+                            \n\n\
+                            {}\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             c.warning(arg.to_string()),
+                             usage,
+                             c.good("--help")),
+            kind: ErrorKind::EmptyValue,
+            info: Some(vec![arg.name().to_owned()]),
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn invalid_value<'a, 'b, B, G, A, U>(bad_val: B,
+                                             good_vals: &[G],
+                                             arg: &A,
+                                             usage: U,
+                                             color: ColorWhen)
+                                             -> Self
+        where B: AsRef<str>,
+              G: AsRef<str> + Display,
+              A: AnyArg<'a, 'b> + Display,
+              U: Display
+    {
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        let suffix =
+            suggestions::did_you_mean_value_suffix(
+                bad_val.as_ref(),
+                good_vals.iter());
+
+        let mut sorted = vec![];
+        for v in good_vals {
+            let val = format!("{}", c.good(v));
+            sorted.push(val);
+        }
+        sorted.sort();
+        let valid_values = sorted.join(", ");
+        Error {
+            message: format!("{} '{}' isn't a valid value for '{}'\n\t\
+                            [values: {}]\n\
+                            {}\n\n\
+                            {}\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             c.warning(bad_val.as_ref()),
+                             c.warning(arg.to_string()),
+                             valid_values,
+                             suffix.0,
+                             usage,
+                             c.good("--help")),
+            kind: ErrorKind::InvalidValue,
+            info: Some(vec![arg.name().to_owned(), bad_val.as_ref().to_owned()]),
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn invalid_subcommand<S, D, N, U>(subcmd: S,
+                                          did_you_mean: D,
+                                          name: N,
+                                          usage: U,
+                                          color: ColorWhen)
+                                          -> Self
+        where S: Into<String>,
+              D: AsRef<str> + Display,
+              N: Display,
+              U: Display
+    {
+        let s = subcmd.into();
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} The subcommand '{}' wasn't recognized\n\t\
+                            Did you mean '{}'?\n\n\
+                            If you believe you received this message in error, try \
+                            re-running with '{} {} {}'\n\n\
+                            {}\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             c.warning(&*s),
+                             c.good(did_you_mean.as_ref()),
+                             name,
+                             c.good("--"),
+                             &*s,
+                             usage,
+                             c.good("--help")),
+            kind: ErrorKind::InvalidSubcommand,
+            info: Some(vec![s]),
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn unrecognized_subcommand<S, N>(subcmd: S, name: N, color: ColorWhen) -> Self
+        where S: Into<String>,
+              N: Display
+    {
+        let s = subcmd.into();
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} The subcommand '{}' wasn't recognized\n\n\
+                            {}\n\t\
+                                {} help <subcommands>...\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             c.warning(&*s),
+                             c.warning("USAGE:"),
+                             name,
+                             c.good("--help")),
+            kind: ErrorKind::UnrecognizedSubcommand,
+            info: Some(vec![s]),
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn missing_required_argument<R, U>(required: R, usage: U, color: ColorWhen) -> Self
+        where R: Display,
+              U: Display
+    {
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} The following required arguments were not provided:{}\n\n\
+                            {}\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             required,
+                             usage,
+                             c.good("--help")),
+            kind: ErrorKind::MissingRequiredArgument,
+            info: None,
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn missing_subcommand<N, U>(name: N, usage: U, color: ColorWhen) -> Self
+        where N: AsRef<str> + Display,
+              U: Display
+    {
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} '{}' requires a subcommand, but one was not provided\n\n\
+                            {}\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             c.warning(name),
+                             usage,
+                             c.good("--help")),
+            kind: ErrorKind::MissingSubcommand,
+            info: None,
+        }
+    }
+
+
+    #[doc(hidden)]
+    pub fn invalid_utf8<U>(usage: U, color: ColorWhen) -> Self
+        where U: Display
+    {
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} Invalid UTF-8 was detected in one or more arguments\n\n\
+                            {}\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             usage,
+                             c.good("--help")),
+            kind: ErrorKind::InvalidUtf8,
+            info: None,
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn too_many_values<'a, 'b, V, A, U>(val: V,
+                                            arg: &A,
+                                            usage: U,
+                                            color: ColorWhen)
+                                            -> Self
+        where V: AsRef<str> + Display + ToOwned,
+              A: AnyArg<'a, 'b> + Display,
+              U: Display
+    {
+        let v = val.as_ref();
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} The value '{}' was provided to '{}', but it wasn't expecting \
+                            any more values\n\n\
+                            {}\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             c.warning(v),
+                             c.warning(arg.to_string()),
+                             usage,
+                             c.good("--help")),
+            kind: ErrorKind::TooManyValues,
+            info: Some(vec![arg.name().to_owned(), v.to_owned()]),
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn too_few_values<'a, 'b, A, U>(arg: &A,
+                                        min_vals: u64,
+                                        curr_vals: usize,
+                                        usage: U,
+                                        color: ColorWhen)
+                                        -> Self
+        where A: AnyArg<'a, 'b> + Display,
+              U: Display
+    {
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} The argument '{}' requires at least {} values, but only {} w{} \
+                            provided\n\n\
+                            {}\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             c.warning(arg.to_string()),
+                             c.warning(min_vals.to_string()),
+                             c.warning(curr_vals.to_string()),
+                             if curr_vals > 1 { "ere" } else { "as" },
+                             usage,
+                             c.good("--help")),
+            kind: ErrorKind::TooFewValues,
+            info: Some(vec![arg.name().to_owned()]),
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn value_validation<'a, 'b, A>(arg: Option<&A>, err: String, color: ColorWhen) -> Self
+        where A: AnyArg<'a, 'b> + Display
+    {
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} Invalid value{}: {}",
+                             c.error("error:"),
+                             if let Some(a) = arg {
+                                 format!(" for '{}'", c.warning(a.to_string()))
+                             } else {
+                                 "".to_string()
+                             },
+                             err),
+            kind: ErrorKind::ValueValidation,
+            info: None,
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn value_validation_auto(err: String) -> Self {
+        let n: Option<&FlagBuilder> = None; 
+        Error::value_validation(n, err, ColorWhen::Auto)
+    }
+
+    #[doc(hidden)]
+    pub fn wrong_number_of_values<'a, 'b, A, S, U>(arg: &A,
+                                                   num_vals: u64,
+                                                   curr_vals: usize,
+                                                   suffix: S,
+                                                   usage: U,
+                                                   color: ColorWhen)
+                                                   -> Self
+        where A: AnyArg<'a, 'b> + Display,
+              S: Display,
+              U: Display
+    {
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} The argument '{}' requires {} values, but {} w{} \
+                            provided\n\n\
+                            {}\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             c.warning(arg.to_string()),
+                             c.warning(num_vals.to_string()),
+                             c.warning(curr_vals.to_string()),
+                             suffix,
+                             usage,
+                             c.good("--help")),
+            kind: ErrorKind::WrongNumberOfValues,
+            info: Some(vec![arg.name().to_owned()]),
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn unexpected_multiple_usage<'a, 'b, A, U>(arg: &A, usage: U, color: ColorWhen) -> Self
+        where A: AnyArg<'a, 'b> + Display,
+              U: Display
+    {
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} The argument '{}' was provided more than once, but cannot \
+                            be used multiple times\n\n\
+                            {}\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             c.warning(arg.to_string()),
+                             usage,
+                             c.good("--help")),
+            kind: ErrorKind::UnexpectedMultipleUsage,
+            info: Some(vec![arg.name().to_owned()]),
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn unknown_argument<A, U>(arg: A,
+                                  did_you_mean: &str,
+                                  usage: U,
+                                  color: ColorWhen)
+                                  -> Self
+        where A: Into<String>,
+              U: Display
+    {
+        let a = arg.into();
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} Found argument '{}' which wasn't expected, or isn't valid in \
+            this context{}\n\
+                            {}\n\n\
+                            For more information try {}",
+                             c.error("error:"),
+                             c.warning(&*a),
+                             if did_you_mean.is_empty() {
+                                 "\n".to_owned()
+                             } else {
+                                 format!("{}\n", did_you_mean)
+                             },
+                             usage,
+                             c.good("--help")),
+            kind: ErrorKind::UnknownArgument,
+            info: Some(vec![a]),
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn io_error(e: &Error, color: ColorWhen) -> Self {
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: color,
+        });
+        Error {
+            message: format!("{} {}", c.error("error:"), e.description()),
+            kind: ErrorKind::Io,
+            info: None,
+        }
+    }
+
+    #[doc(hidden)]
+    pub fn argument_not_found_auto<A>(arg: A) -> Self
+        where A: Into<String>
+    {
+        let a = arg.into();
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: ColorWhen::Auto,
+        });
+        Error {
+            message: format!("{} The argument '{}' wasn't found",
+                             c.error("error:"),
+                             a.clone()),
+            kind: ErrorKind::ArgumentNotFound,
+            info: Some(vec![a]),
+        }
+    }
+
+    /// Create an error with a custom description.
+    ///
+    /// This can be used in combination with `Error::exit` to exit your program
+    /// with a custom error message.
+    pub fn with_description(description: &str, kind: ErrorKind) -> Self {
+        let c = Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: ColorWhen::Auto,
+        });
+        Error {
+            message: format!("{} {}", c.error("error:"), description),
+            kind: kind,
+            info: None,
+        }
+    }
+}
+
+impl StdError for Error {
+    fn description(&self) -> &str { &*self.message }
+}
+
+impl Display for Error {
+    fn fmt(&self, f: &mut std_fmt::Formatter) -> std_fmt::Result { writeln!(f, "{}", self.message) }
+}
+
+impl From<io::Error> for Error {
+    fn from(e: io::Error) -> Self { Error::with_description(e.description(), ErrorKind::Io) }
+}
+
+impl From<std_fmt::Error> for Error {
+    fn from(e: std_fmt::Error) -> Self {
+        Error::with_description(e.description(), ErrorKind::Format)
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clap-2.25.0/src/fmt.rs
@@ -0,0 +1,181 @@
+#[cfg(all(feature = "color", not(target_os = "windows")))]
+use ansi_term::ANSIString;
+
+#[cfg(all(feature = "color", not(target_os = "windows")))]
+use ansi_term::Colour::{Green, Red, Yellow};
+
+#[cfg(feature = "color")]
+use atty;
+use std::fmt;
+use std::env;
+
+#[doc(hidden)]
+#[derive(Debug, Copy, Clone, PartialEq)]
+pub enum ColorWhen {
+    Auto,
+    Always,
+    Never,
+}
+
+#[cfg(feature = "color")]
+pub fn is_a_tty(stderr: bool) -> bool {
+    debugln!("is_a_tty: stderr={:?}", stderr);
+    let stream = if stderr {
+        atty::Stream::Stderr
+    } else {
+        atty::Stream::Stdout
+    };
+    atty::is(stream)
+}
+
+#[cfg(not(feature = "color"))]
+pub fn is_a_tty(_: bool) -> bool {
+    debugln!("is_a_tty;");
+    false
+}
+
+pub fn is_term_dumb() -> bool { env::var("TERM").ok() == Some(String::from("dumb")) }
+
+#[doc(hidden)]
+pub struct ColorizerOption {
+    pub use_stderr: bool,
+    pub when: ColorWhen,
+}
+
+#[doc(hidden)]
+pub struct Colorizer {
+    when: ColorWhen,
+}
+
+macro_rules! color {
+    ($_self:ident, $c:ident, $m:expr) => {
+        match $_self.when {
+            ColorWhen::Auto => Format::$c($m),
+            ColorWhen::Always => Format::$c($m),
+            ColorWhen::Never => Format::None($m),
+        }
+    };
+}
+
+impl Colorizer {
+    pub fn new(option: ColorizerOption) -> Colorizer {
+        let is_a_tty = is_a_tty(option.use_stderr);
+        let is_term_dumb = is_term_dumb();
+        Colorizer {
+            when: if is_a_tty && !is_term_dumb {
+                option.when
+            } else {
+                ColorWhen::Never
+            },
+        }
+    }
+
+    pub fn good<T>(&self, msg: T) -> Format<T>
+        where T: fmt::Display + AsRef<str>
+    {
+        debugln!("Colorizer::good;");
+        color!(self, Good, msg)
+    }
+
+    pub fn warning<T>(&self, msg: T) -> Format<T>
+        where T: fmt::Display + AsRef<str>
+    {
+        debugln!("Colorizer::warning;");
+        color!(self, Warning, msg)
+    }
+
+    pub fn error<T>(&self, msg: T) -> Format<T>
+        where T: fmt::Display + AsRef<str>
+    {
+        debugln!("Colorizer::error;");
+        color!(self, Error, msg)
+    }
+
+    pub fn none<T>(&self, msg: T) -> Format<T>
+        where T: fmt::Display + AsRef<str>
+    {
+        debugln!("Colorizer::none;");
+        Format::None(msg)
+    }
+}
+
+impl Default for Colorizer {
+    fn default() -> Self {
+        Colorizer::new(ColorizerOption {
+            use_stderr: true,
+            when: ColorWhen::Auto,
+        })
+    }
+}
+
+/// Defines styles for different types of error messages. Defaults to Error=Red, Warning=Yellow,
+/// and Good=Green
+#[derive(Debug)]
+#[doc(hidden)]
+pub enum Format<T> {
+    /// Defines the style used for errors, defaults to Red
+    Error(T),
+    /// Defines the style used for warnings, defaults to Yellow
+    Warning(T),
+    /// Defines the style used for good values, defaults to Green
+    Good(T),
+    /// Defines no formatting style
+    None(T),
+}
+
+#[cfg(all(feature = "color", not(target_os = "windows")))]
+impl<T: AsRef<str>> Format<T> {
+    fn format(&self) -> ANSIString {
+        match *self {
+            Format::Error(ref e) => Red.bold().paint(e.as_ref()),
+            Format::Warning(ref e) => Yellow.paint(e.as_ref()),
+            Format::Good(ref e) => Green.paint(e.as_ref()),
+            Format::None(ref e) => ANSIString::from(e.as_ref()),
+        }
+    }
+}
+
+#[cfg(any(not(feature = "color"), target_os = "windows"))]
+#[cfg_attr(feature="lints", allow(match_same_arms))]
+impl<T: fmt::Display> Format<T> {
+    fn format(&self) -> &T {
+        match *self {
+            Format::Error(ref e) => e,
+            Format::Warning(ref e) => e,
+            Format::Good(ref e) => e,
+            Format::None(ref e) => e,
+        }
+    }
+}
+
+
+#[cfg(all(feature = "color", not(target_os = "windows")))]
+impl<T: AsRef<str>> fmt::Display for Format<T> {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", &self.format()) }
+}
+
+#[cfg(any(not(feature = "color"), target_os = "windows"))]
+impl<T: fmt::Display> fmt::Display for Format<T> {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", &self.format()) }
+}
+
+#[cfg(all(test, feature = "color", not(target_os = "windows")))]
+mod test {
+    use ansi_term::ANSIString;
+    use ansi_term::Colour::{Green, Red, Yellow};
+    use super::Format;
+
+    #[test]
+    fn colored_output() {
+        let err = Format::Error("error");
+        assert_eq!(&*format!("{}", err),
+                   &*format!("{}", Red.bold().paint("error")));
+        let good = Format::Good("good");
+        assert_eq!(&*format!("{}", good), &*format!("{}", Green.paint("good")));
+        let warn = Format::Warning("warn");
+        assert_eq!(&*format!("{}", warn), &*format!("{}", Yellow.paint("warn")));
+        let none = Format::None("none");
+        assert_eq!(&*format!("{}", none),
+                   &*format!("{}", ANSIString::from("none")));
+    }
+}
copy from third_party/rust/clap/src/lib.rs
copy to third_party/rust/clap-2.25.0/src/lib.rs
copy from third_party/rust/clap/src/macros.rs
copy to third_party/rust/clap-2.25.0/src/macros.rs
rename from third_party/rust/clap-2.24.2/src/osstringext.rs
rename to third_party/rust/clap-2.25.0/src/osstringext.rs
rename from third_party/rust/clap-2.24.2/src/strext.rs
rename to third_party/rust/clap-2.25.0/src/strext.rs
copy from third_party/rust/clap/src/suggestions.rs
copy to third_party/rust/clap-2.25.0/src/suggestions.rs
rename from third_party/rust/clap-2.24.2/src/usage_parser.rs
rename to third_party/rust/clap-2.25.0/src/usage_parser.rs
--- a/third_party/rust/clap/.cargo-checksum.json
+++ b/third_party/rust/clap/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".appveyor.yml":"38fb7e583271029caad727c9123a2b2679b7c59971de418f16dc5136dbebaeb5",".clog.toml":"f691701bd51b5f311931d0d8f05fa3d78c00dda8d60f3313e21011309c736ff1",".github/CONTRIBUTING.md":"f7eff737f3aa25294802fefb233e3758a64b248781dbbf3262532d693f340a87",".github/ISSUE_TEMPLATE.md":"681afbd64b3603e3e82789ceb6841d851eaa7333caec5769173462bab1b5d82b",".mention-bot":"51790ab49f43ed86a4a7c3d2e468aa5fa526ca5e2ac6af20432a2cb5b2fdbe84",".travis.yml":"2975b3159624d4ecc4dd29577f378e9d4fa27f1991bfd5042ac3c267fb2cdd38","CHANGELOG.md":"89936cd672f43681351e1b76622cc44d11c69f60440dd101f7b9db1cf2f184f7","CONTRIBUTORS.md":"5d7dbafaff6879bbfbb01b22cca299953ec163872d8d624bbf99e20851ca0165","Cargo.toml":"f12c622fae3f6582168616219b6e07e2ec99943e9515b76f97974e75227b9aa0","LICENSE-MIT":"6725d1437fc6c77301f2ff0e7d52914cf4f9509213e1078dc77d9356dbe6eac5","README.md":"bce567fb1e3e57129f3d0f58f5a1e9e07dc7414731644a47939c50b76f9976bb","clap-test.rs":"995a9d41ef372a814616113f4a58c1e580043678e54527afc2ebee7e8e1d3ef5","index.html":"36f9ce4465266f3af9a259444b01c4239200473cabfc848f789f75b322a3ea8f","justfile":"811b2dec57aec46e570aeeb9945018cf87fe65f6d5b27cdb9ffca79d906910f6","rustfmt.toml":"8fd2d63119df515fd5f44e530c709b19d66b09fbc2e22a640bf4b64c57e7d6b3","src/app/help.rs":"515f3ec638e3df8323b44c906073c07657122ec1b34bdadbdc47661c5d97ad1d","src/app/macros.rs":"44610b6522cedbcb140670aac27c796379f562ce77fcf5e8d104b038aadf52ec","src/app/meta.rs":"a56d28bb466a8ba68155b3f2883e85228b4b74cf25658f62fc050e07cff2dc85","src/app/mod.rs":"d0e1843ae1f77c1da4179cebdd8fb1ea55803002fb1ae96087de3a8cdcedf6fc","src/app/parser.rs":"1bae4cecf4fc798efdc2ad8d237f17536dafd7524e2d9a366f30f72a8a275846","src/app/settings.rs":"c6b87d4da01891123edddee9e28b048cba0c19d8c1db34ad5ad3e85b657c6b97","src/app/usage.rs":"703cec975c53e7f01b14b4593de41c518910ab347bc4c54efe79367a704ffc4c","src/app/validator.rs":"bc2291f6231a63456acab9e7743d1f881f1d5dfc17955394fa856703a8e80086","src/args/any_arg.rs":"b082385eeff2505ced7b747bd44d20a3fb6fd9d4bd14be9e99870699c43ea072","src/args/arg.rs":"673de3f1957eccb1b116255bac9638fe24c0da54ccb358d958446c8ed54c9621","src/args/arg_builder/base.rs":"8b99a9ab811df3e0bdcfba8c0994042b0bcd06d8ddf794ab559baaf9a490ba59","src/args/arg_builder/flag.rs":"4007a950869789b1f4d5f953107aee228477e2d5fe82515d3b895286c65522c6","src/args/arg_builder/mod.rs":"7a32c8fd85b48f7b60e5f2c13dc70fa9100aa65cd933ba419300d28d682bf722","src/args/arg_builder/option.rs":"d5e5243e3a72d2c820c8fad4e1efc4b985881c6f60f3a72757b33a9054a87e99","src/args/arg_builder/positional.rs":"f103a22803d9fb7f7c8f37f705fe214fdaad46903439964fc13740ec6f647eb8","src/args/arg_builder/switched.rs":"61f5121b0ec746461215a47e1b7a4d699a37a3f181172820e0615f68d5f6f0ef","src/args/arg_builder/valued.rs":"19368a03e046d6b63451c3d04dff6e51d49f140ed45330f82879539c6d1b28dd","src/args/arg_matcher.rs":"27829739ae12ac7800a26109e751ce9f8c3d26e262d41de161a38baf5c421167","src/args/arg_matches.rs":"9d72a388053ef0c31fe2516df9ea791a4d0f6c0b5e9758eb61886f1ac8df89ab","src/args/group.rs":"7fe5e2f0dd24faf1765410a9336d85976875e964d7f246e1fa216c4808d88dde","src/args/macros.rs":"57f248e2694f9413cbbaf9087813ed4f27064f5f8e29eaf4ec41ec2b274ae806","src/args/matched_arg.rs":"1ed8d338869ecc3b5fa426ef4cf42f4c9c3b1dd538cdea1fe0489169345536f7","src/args/mod.rs":"c155cd989fa4ca1f8de6a79115afbf5086f092adcb854ff9698b9100f45fc323","src/args/settings.rs":"2753ff50046def9ccb7f601b3d9f565348da1ef0253af24ccee94616a2e5c470","src/args/subcommand.rs":"e1ad9638c33785f1301675de1795b0a4f4b079452aa11f7526d263c2a1179432","src/completions/bash.rs":"116c6830ee2b6310f299a69924f5b1e39b05ebec2b5f7b0ffe3b6938b7fa5514","src/completions/fish.rs":"63975f8beea9af6bef66c7dd7938bfa61c6f871995a74dbc1545daa9fbc1f2d0","src/completions/macros.rs":"ebad5037e6e63401b1a54498e09d3bd93d1a3a06f045c2990902d47eb9a73774","src/completions/mod.rs":"5d4a734df6a21e6c1e0831a2f7be50a45d2e7bdaf7475589ea78b978643229cd","src/completions/powershell.rs":"866409e5d0a9b2551d739f86c0e4faf86911e9e7c656fb74b38e6960844233b5","src/completions/shell.rs":"c7995ca229fd0d8671761da0aca0513c4f740165f02d06cd97aa0ae881c22cd4","src/completions/zsh.rs":"8ac4576e1cb3b1403dbb35ce146159aa8b29864e1d8201776200d999052b422d","src/errors.rs":"3c46a4d79d9304ffb152a190528ec9db0cb6c05799bb5211e6df9f7d7abab814","src/fmt.rs":"f205f784268572544ff7e84a89f416c898255404275d4ab1f8fea7e89695daa9","src/lib.rs":"87b3ee49c6389cdbaa23e705732bcc68e7235bb16ff469321c92a89258c21beb","src/macros.rs":"2317a90223c80d8688fea5334b09b783c8aca8894e6c22ec2fd400ce941d301b","src/osstringext.rs":"a87a5a0685dd8310f6329d5f8e8f54c0fac68eb75595a835aeb1c36208efd5f9","src/strext.rs":"d4418d396069e9c05804f92c042ba7192a4244e46059e2edc98670b45cd2daee","src/suggestions.rs":"ad1165a9896382a0f09f73c0f6bf468454c19da207f28c3973e02879f453ad68","src/usage_parser.rs":"a04143bba42a6506746091a3f898c38e2c7409bacefed21fa8194c90961ca390"},"package":"867a885995b4184be051b70a592d4d70e32d7a188db6e8dff626af286a962771"}
\ No newline at end of file
+{"files":{".appveyor.yml":"38fb7e583271029caad727c9123a2b2679b7c59971de418f16dc5136dbebaeb5",".clog.toml":"f691701bd51b5f311931d0d8f05fa3d78c00dda8d60f3313e21011309c736ff1",".github/CONTRIBUTING.md":"f7eff737f3aa25294802fefb233e3758a64b248781dbbf3262532d693f340a87",".github/ISSUE_TEMPLATE.md":"181a07050efec74e52bb3890585eb02dc77259ac6396ff33fe0869208fa86cee",".mention-bot":"51790ab49f43ed86a4a7c3d2e468aa5fa526ca5e2ac6af20432a2cb5b2fdbe84",".travis.yml":"939aa491f28ece97d9a98e781ae8e76c484592742317390bb1de92224bf0678a","CHANGELOG.md":"9487316c1d190fa572f2779979c99395c687dd0495f4657ffb460e1a2a6c5019","CONTRIBUTORS.md":"6890277f02e66ec77120d3335240ac677abd126db5f7a9d9168f47f5cb4df977","Cargo.toml":"25cb059a452c73a7177ab54d9edf7c0dfcb1489e8013a3efd522e9b2fdfef05e","LICENSE-MIT":"6725d1437fc6c77301f2ff0e7d52914cf4f9509213e1078dc77d9356dbe6eac5","README.md":"57e3b95a81faf3503cc8ba14f8b30f725172551507846b6a6e0f9eb1f1ba2b2a","SPONSORS.md":"097c6b7a80feba1e1b9170fa641a2d7d1868e6115fce73a90ab26448ba36f843","clap-test.rs":"995a9d41ef372a814616113f4a58c1e580043678e54527afc2ebee7e8e1d3ef5","index.html":"36f9ce4465266f3af9a259444b01c4239200473cabfc848f789f75b322a3ea8f","justfile":"811b2dec57aec46e570aeeb9945018cf87fe65f6d5b27cdb9ffca79d906910f6","rustfmt.toml":"8fd2d63119df515fd5f44e530c709b19d66b09fbc2e22a640bf4b64c57e7d6b3","src/app/help.rs":"6bf52a4b213ae6b1e53d206bd63816961608284c1c0cbb6cebe9cc1dcf0dc463","src/app/macros.rs":"77764555c2831180f4e976d5bcd95f3da4fdb609d77ae84c94f4ce602afd0c9b","src/app/meta.rs":"a56d28bb466a8ba68155b3f2883e85228b4b74cf25658f62fc050e07cff2dc85","src/app/mod.rs":"672b7472eb674dd0e875dddb6916f7f63c49873ad6d5afcb46f054b9161fc3a4","src/app/parser.rs":"dd87e6e5b22ec761d0228de66f6d929b68a06a692099cb86feabba1924506e4d","src/app/settings.rs":"e6e73720774d7040efa0c155267e996ad9a1d1d4626bb568f3b902edc8913344","src/app/usage.rs":"703cec975c53e7f01b14b4593de41c518910ab347bc4c54efe79367a704ffc4c","src/app/validator.rs":"0e8d58ce7f22482897a48c8b34d52540274ece40f974226fcca6078cc896ae02","src/args/any_arg.rs":"2960506a31a884a9b3142fea532afa0a01f7de8d14ba2a6347eb5cd5b2fdd98b","src/args/arg.rs":"e10c790b12aea012a52edec6c5e8afe27925ae4b936f83352830a40ef1f4c93d","src/args/arg_builder/base.rs":"8b99a9ab811df3e0bdcfba8c0994042b0bcd06d8ddf794ab559baaf9a490ba59","src/args/arg_builder/flag.rs":"fd6eef19c4de7ded217e86224de472147d4f4c5813607bc0fa67462c5d347b7a","src/args/arg_builder/mod.rs":"7a32c8fd85b48f7b60e5f2c13dc70fa9100aa65cd933ba419300d28d682bf722","src/args/arg_builder/option.rs":"e73031991e561ea7e61574f719207034df0fa3acdd28735502d8511f00d7adbf","src/args/arg_builder/positional.rs":"897df6cda52b67728103c7b2c0750f91326880b751204f4ab15852b18be0d929","src/args/arg_builder/switched.rs":"61f5121b0ec746461215a47e1b7a4d699a37a3f181172820e0615f68d5f6f0ef","src/args/arg_builder/valued.rs":"20998bf790a58206b27cf8b09f6740812d507336042a2026f203f99af4500ed5","src/args/arg_matcher.rs":"ff2b23b43fb5d61727410ab156844b90f898279e08b4aa56f244ad7ced12d03f","src/args/arg_matches.rs":"2342be87d96e3b7437d711a3550e8bf83a524a52b3cd1a34e91de02f16e01fa6","src/args/group.rs":"7fe5e2f0dd24faf1765410a9336d85976875e964d7f246e1fa216c4808d88dde","src/args/macros.rs":"57f248e2694f9413cbbaf9087813ed4f27064f5f8e29eaf4ec41ec2b274ae806","src/args/matched_arg.rs":"1ed8d338869ecc3b5fa426ef4cf42f4c9c3b1dd538cdea1fe0489169345536f7","src/args/mod.rs":"c155cd989fa4ca1f8de6a79115afbf5086f092adcb854ff9698b9100f45fc323","src/args/settings.rs":"2753ff50046def9ccb7f601b3d9f565348da1ef0253af24ccee94616a2e5c470","src/args/subcommand.rs":"e1ad9638c33785f1301675de1795b0a4f4b079452aa11f7526d263c2a1179432","src/completions/bash.rs":"116c6830ee2b6310f299a69924f5b1e39b05ebec2b5f7b0ffe3b6938b7fa5514","src/completions/fish.rs":"65782afc62724e068efcb1c85b193f7963891def2ff5cd6e5200ebdb67003bb5","src/completions/macros.rs":"ebad5037e6e63401b1a54498e09d3bd93d1a3a06f045c2990902d47eb9a73774","src/completions/mod.rs":"5d4a734df6a21e6c1e0831a2f7be50a45d2e7bdaf7475589ea78b978643229cd","src/completions/powershell.rs":"866409e5d0a9b2551d739f86c0e4faf86911e9e7c656fb74b38e6960844233b5","src/completions/shell.rs":"c7995ca229fd0d8671761da0aca0513c4f740165f02d06cd97aa0ae881c22cd4","src/completions/zsh.rs":"e98cc3676c0bfa67f0816947b932c92a14cbcf13b45656cf2f8683f9ab05fbca","src/errors.rs":"3c46a4d79d9304ffb152a190528ec9db0cb6c05799bb5211e6df9f7d7abab814","src/fmt.rs":"f205f784268572544ff7e84a89f416c898255404275d4ab1f8fea7e89695daa9","src/lib.rs":"804d8a9c384122e54cc230327810bde108660e61238c2b889d5bbbbcc2f19c75","src/macros.rs":"a65e1349b12ff164578b5c106c73eb646c86b8be04ec4964fa6da511b3135d76","src/map.rs":"67ac4802ed485359c78a1747c832666095b5ee05d68c686d110bd2e4aa9f06e2","src/osstringext.rs":"a87a5a0685dd8310f6329d5f8e8f54c0fac68eb75595a835aeb1c36208efd5f9","src/strext.rs":"d4418d396069e9c05804f92c042ba7192a4244e46059e2edc98670b45cd2daee","src/suggestions.rs":"1f348d393c0c85e622ca97253fd3f25fed9c2c660996d6ca5ac7e3abfd99783b","src/usage_parser.rs":"cc23ff4156d5bebc8a1bebc45edcf337947d8d217461b052271777e0bf31fa51"},"package":"1b8c532887f1a292d17de05ae858a8fe50a301e196f9ef0ddb7ccd0d1d00f180"}
\ No newline at end of file
--- a/third_party/rust/clap/.github/ISSUE_TEMPLATE.md
+++ b/third_party/rust/clap/.github/ISSUE_TEMPLATE.md
@@ -1,9 +1,11 @@
-Please use the following template to assist with creating an issue, and getting a speedy resolution. If an area is not aplicable, feel free to delete the area, or mark with `N/A`
+<!--
+Please use the following template to assist with creating an issue and to ensure a speedy resolution. If an area is not applicable, feel free to delete the area or mark with `N/A`
+-->
 
 ### Rust Version
 
 * Use the output of `rustc -V`
 
 ### Affected Version of clap
 
 * Can be found in Cargo.lock of your project (i.e. `grep clap Cargo.lock`)
--- a/third_party/rust/clap/.travis.yml
+++ b/third_party/rust/clap/.travis.yml
@@ -1,24 +1,30 @@
 sudo: true
 language: rust
 cache: cargo
 rust:
   - nightly
-  - nightly-2017-01-25
+  - nightly-2017-06-07
   - beta
   - stable
-  - 1.11.0
+  - 1.18.0
 matrix:
     allow_failures:
         - rust: nightly
 before_script:
   - |
     pip install git+git://github.com/kbknapp/travis-cargo.git --user &&
     export PATH=$HOME/.local/bin:$PATH
+  - |
+    if [[ "$TRAVIS_RUST_VERSION" == "1.13.0" ]]; then
+        echo "Old Rust detected, removing version-sync dependency"
+        sed -i "/^version-sync =/d" Cargo.toml
+        rm "tests/version-numbers.rs"
+    fi
 script:
   - |
     travis-cargo test -- --verbose --no-default-features &&
     travis-cargo --skip nightly test -- --verbose --features "yaml unstable" &&
     travis-cargo --only nightly test -- --verbose --features "yaml unstable nightly" &&
     travis-cargo --only nightly bench
 addons:
   apt:
--- a/third_party/rust/clap/CHANGELOG.md
+++ b/third_party/rust/clap/CHANGELOG.md
@@ -1,9 +1,124 @@
-<a name="v2.24.2"></a>
+<a name="v2.27.1"></a>
+## v2.27.1 (2017-10-24)
+
+
+#### Bug Fixes
+
+* Adds `term_size` as an optional dependency (with feature `wrap_help`) to fix compile bug
+
+<a name="v2.27.0"></a>
+## v2.27.0 (2017-10-24)
+
+** This release raises the minimum required version of Rust to 1.18 **
+
+** This release also contains a very minor breaking change to fix a bug **
+
+The only CLIs affected will be those using unrestrained multiple values and subcommands where the
+subcommand name can coincide with one of the multiple values.
+
+See the commit [0c223f54](https://github.com/kbknapp/clap-rs/commit/0c223f54ed46da406bc8b43a5806e0b227863b31) for full details.
+
+
+#### Bug Fixes
+
+*   Values from global args are now propagated UP and DOWN!
+*   fixes a bug where using AppSettings::AllowHyphenValues would allow invalid arguments even when there is no way for them to be valid ([77ed4684](https://github.com/kbknapp/clap-rs/commit/77ed46841fc0263d7aa32fcc5cc49ef703b37c04), closes [#1066](https://github.com/kbknapp/clap-rs/issues/1066))
+*   when an argument requires a value and that value happens to match a subcommand name, its parsed as a value ([0c223f54](https://github.com/kbknapp/clap-rs/commit/0c223f54ed46da406bc8b43a5806e0b227863b31), closes [#1031](https://github.com/kbknapp/clap-rs/issues/1031), breaks [#](https://github.com/kbknapp/clap-rs/issues/), [#](https://github.com/kbknapp/clap-rs/issues/))
+*   fixes a bug that prevented number_of_values and default_values to be used together ([5eb342a9](https://github.com/kbknapp/clap-rs/commit/5eb342a99dde07b0f011048efde3e283bc1110fc), closes [#1050](https://github.com/kbknapp/clap-rs/issues/1050), [#1056](https://github.com/kbknapp/clap-rs/issues/1056))
+*   fixes a bug that didn't allow args with default values to have conflicts ([58b5b4be](https://github.com/kbknapp/clap-rs/commit/58b5b4be315280888d50d9b15119b91a9028f050), closes [#1071](https://github.com/kbknapp/clap-rs/issues/1071))
+*   fixes a panic when using global args and calling App::get_matches_from_safe_borrow multiple times ([d86ec797](https://github.com/kbknapp/clap-rs/commit/d86ec79742c77eb3f663fb30e225954515cf25bb), closes [#1076](https://github.com/kbknapp/clap-rs/issues/1076))
+*   fixes issues and potential regressions with global args values not being propagated properly or at all ([a43f9dd4](https://github.com/kbknapp/clap-rs/commit/a43f9dd4aaf1864dd14a3c28dec89ccdd70c61e5), closes [#1010](https://github.com/kbknapp/clap-rs/issues/1010), [#1061](https://github.com/kbknapp/clap-rs/issues/1061), [#978](https://github.com/kbknapp/clap-rs/issues/978))
+*   fixes a bug where default values are not applied if the option supports zero values ([9c248cbf](https://github.com/kbknapp/clap-rs/commit/9c248cbf7d8a825119bc387c23e9a1d1989682b0), closes [#1047](https://github.com/kbknapp/clap-rs/issues/1047))
+
+#### Documentation
+
+*   adds addtional blurbs about using multiples with subcommands ([03455b77](https://github.com/kbknapp/clap-rs/commit/03455b7751a757e7b2f6ffaf2d16168539c99661))
+*   updates the docs to reflect changes to global args and that global args values can now be propagated back up the stack ([ead076f0](https://github.com/kbknapp/clap-rs/commit/ead076f03ada4c322bf3e34203925561ec496d87))
+*   add html_root_url attribute ([e67a061b](https://github.com/kbknapp/clap-rs/commit/e67a061bcf567c6518d6c2f58852e01f02764b22))
+*   sync README version numbers with crate version ([5536361b](https://github.com/kbknapp/clap-rs/commit/5536361bcda29887ed86bb68e43d0b603cbc423f))
+
+#### Improvements
+
+*   args that have require_delimiter(true) is now reflected in help and usage strings ([dce61699](https://github.com/kbknapp/clap-rs/commit/dce616998ed9bd95e8ed3bec1f09a4883da47b85), closes [#1052](https://github.com/kbknapp/clap-rs/issues/1052))
+*   if all subcommands are hidden, the subcommands section of the help message is no longer displayed ([4ae7b046](https://github.com/kbknapp/clap-rs/commit/4ae7b0464750bc07ec80ece38e43f003fdd1b8ae), closes [#1046](https://github.com/kbknapp/clap-rs/issues/1046))
+
+#### Breaking Changes
+
+*   when an argument requires a value and that value happens to match a subcommand name, its parsed as a value ([0c223f54](https://github.com/kbknapp/clap-rs/commit/0c223f54ed46da406bc8b43a5806e0b227863b31), closes [#1031](https://github.com/kbknapp/clap-rs/issues/1031), breaks [#](https://github.com/kbknapp/clap-rs/issues/), [#](https://github.com/kbknapp/clap-rs/issues/))
+
+#### Deprecations
+
+* **AppSettings::PropagateGlobalValuesDown:**  this setting is no longer required to propagate values down or up ([2bb5ddce](https://github.com/kbknapp/clap-rs/commit/2bb5ddcee61c791ca1aaca494fbeb4bd5e277488))
+
+
+
+<a name="v2.26.2"></a>
+### v2.26.2 (2017-09-14)
+
+
+#### Improvements
+
+*   if all subcommands are hidden, the subcommands section of the help message is no longer displayed ([4ae7b046](https://github.com/kbknapp/clap-rs/commit/4ae7b0464750bc07ec80ece38e43f003fdd1b8ae), closes [#1046](https://github.com/kbknapp/clap-rs/issues/1046))
+
+#### Bug Fixes
+
+*   fixes a bug where default values are not applied if the option supports zero values ([9c248cbf](https://github.com/kbknapp/clap-rs/commit/9c248cbf7d8a825119bc387c23e9a1d1989682b0), closes [#1047](https://github.com/kbknapp/clap-rs/issues/1047))
+
+
+
+<a name="v2.26.1"></a>
+### v2.26.1 (2017-09-14)
+
+
+#### Bug Fixes
+
+*   fixes using require_equals(true) and min_values(0) together ([10ae208f](https://github.com/kbknapp/clap-rs/commit/10ae208f68518eff6e98166724065745f4083174), closes [#1044](https://github.com/kbknapp/clap-rs/issues/1044))
+*   escape special characters in zsh and fish completions ([87e019fc](https://github.com/kbknapp/clap-rs/commit/87e019fc84ba6193a8c4ddc26c61eb99efffcd25))
+*   avoid panic generating default help msg if term width set to 0 due to bug in textwrap 0.7.0 ([b3eadb0d](https://github.com/kbknapp/clap-rs/commit/b3eadb0de516106db4e08f078ad32e8f6d6e7a57))
+*   Change `who's` -> `whose` ([53c1ffe8](https://github.com/kbknapp/clap-rs/commit/53c1ffe87f38b05d8804a0f7832412a952845349))
+*   adds a debug assertion to ensure all args added to groups actually exist ([7ad123e2](https://github.com/kbknapp/clap-rs/commit/7ad123e2c02577e3ca30f7e205181e896b157d11), closes [#917](https://github.com/kbknapp/clap-rs/issues/917))
+*   fixes a bug where args that allow values to start with a hyphen couldnt contain a double hyphen -- as a value ([ab2f4c9e](https://github.com/kbknapp/clap-rs/commit/ab2f4c9e563e36ec739a4b55d5a5b76fdb9e9fa4), closes [#960](https://github.com/kbknapp/clap-rs/issues/960))
+*   fixes a bug where positional argument help text is misaligned ([54c16836](https://github.com/kbknapp/clap-rs/commit/54c16836dea4651806a2cfad53146a83fa3abf21))
+* **Help Message:**  fixes long_about not being usable ([a8257ea0](https://github.com/kbknapp/clap-rs/commit/a8257ea0ffb812e552aca256c4a3d2aebfd8065b), closes [#1043](https://github.com/kbknapp/clap-rs/issues/1043))
+* **Suggestions:**  output for flag after subcommand ([434ea5ba](https://github.com/kbknapp/clap-rs/commit/434ea5ba71395d8c1afcf88e69f0b0d8339b01a1))
+
+
+
+<a name="v2.26.0"></a>
+## v2.26.0 (2017-07-29)
+
+Minimum version of Rust is now v1.13.0 (Stable)
+
+
+#### Improvements
+
+*   bumps unicode-segmentation to v1.2 ([cd7b40a2](https://github.com/kbknapp/clap-rs/commit/cd7b40a21c77bae17ba453c5512cb82b7d1ce474))
+
+
+#### Performance
+
+*   update textwrap to version 0.7.0 ([c2d4e637](https://github.com/kbknapp/clap-rs/commit/c2d4e63756a6f070e38c16dff846e9b0a53d6f93))
+
+
+
+
+<a name="v2.25.1"></a>
+### v2.25.1 (2017-07-21)
+
+#### Improvements
+
+* impl Default for Values + OsValues for any lifetime. ([fb7d6231f1](https://github.com/kbknapp/clap-rs/commit/fb7d6231f13a2f79f411e62dca210b7dc9994c18))
+
+#### Documentation
+
+* Various documentation typos and grammar fixes
+
+<a name="v2.25.0"></a>
 ### v2.25.0 (2017-06-20)
 
 
 #### Features
 
 *   use textwrap crate for wrapping help texts ([b93870c1](https://github.com/kbknapp/clap-rs/commit/b93870c10ae3bd90d233c586a33e086803117285))
 
 #### Improvements
@@ -16,17 +131,16 @@
 *   Change `who's` -> `whose` ([53c1ffe8](https://github.com/kbknapp/clap-rs/commit/53c1ffe87f38b05d8804a0f7832412a952845349))
 
 #### Documentation
 
 * **App::template:**  adds details about the necessity to use AppSettings::UnifiedHelpMessage when using {unified} tags in the help template ([cbea3d5a](https://github.com/kbknapp/clap-rs/commit/cbea3d5acf3271a7a734498c4d99c709941c331e), closes [#949](https://github.com/kbknapp/clap-rs/issues/949))
 * **Arg::allow_hyphen_values:**  updates the docs to include warnings for allow_hyphen_values and multiple(true) used together ([f9b0d657](https://github.com/kbknapp/clap-rs/commit/f9b0d657835d3f517f313d70962177dc30acf4a7))
 * **README.md:**
   *  added a warning about using ~ deps ([821929b5](https://github.com/kbknapp/clap-rs/commit/821929b51bd60213955705900a436c9a64fcb79f), closes [#964](https://github.com/kbknapp/clap-rs/issues/964))
-  *  added a warning about using ~ deps ([667697b0](https://github.com/kbknapp/clap-rs/commit/667697b0018369b71da41d02d567ab57df0f4887))
 * **clap_app!:**  adds using the @group specifier to the macro docs ([826048cb](https://github.com/kbknapp/clap-rs/commit/826048cb3cbc0280169303f1498ff0a2b7395883), closes [#932](https://github.com/kbknapp/clap-rs/issues/932))
 
 
 
 <a name="v2.24.2"></a>
 ### v2.24.2 (2017-05-15)
 
 
--- a/third_party/rust/clap/CONTRIBUTORS.md
+++ b/third_party/rust/clap/CONTRIBUTORS.md
@@ -1,67 +1,79 @@
 the following is a list of contributors:
 
 
-[<img alt="kbknapp" src="https://avatars2.githubusercontent.com/u/6942134?v=3&s=117" width="117">](https://github.com/kbknapp) |[<img alt="homu" src="https://avatars2.githubusercontent.com/u/10212162?v=3&s=117" width="117">](https://github.com/homu) |[<img alt="Vinatorul" src="https://avatars2.githubusercontent.com/u/6770624?v=3&s=117" width="117">](https://github.com/Vinatorul) |[<img alt="tormol" src="https://avatars0.githubusercontent.com/u/10460821?v=3&s=117" width="117">](https://github.com/tormol) |[<img alt="sru" src="https://avatars0.githubusercontent.com/u/2485892?v=3&s=117" width="117">](https://github.com/sru) |[<img alt="nabijaczleweli" src="https://avatars0.githubusercontent.com/u/6709544?v=3&s=117" width="117">](https://github.com/nabijaczleweli) |
+[<img alt="kbknapp" src="https://avatars1.githubusercontent.com/u/6942134?v=4&s=117" width="117">](https://github.com/kbknapp) |[<img alt="homu" src="https://avatars1.githubusercontent.com/u/10212162?v=4&s=117" width="117">](https://github.com/homu) |[<img alt="Vinatorul" src="https://avatars1.githubusercontent.com/u/6770624?v=4&s=117" width="117">](https://github.com/Vinatorul) |[<img alt="tormol" src="https://avatars3.githubusercontent.com/u/10460821?v=4&s=117" width="117">](https://github.com/tormol) |[<img alt="little-dude" src="https://avatars2.githubusercontent.com/u/6646324?v=4&s=117" width="117">](https://github.com/little-dude) |[<img alt="sru" src="https://avatars3.githubusercontent.com/u/2485892?v=4&s=117" width="117">](https://github.com/sru) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[kbknapp](https://github.com/kbknapp) |[homu](https://github.com/homu) |[Vinatorul](https://github.com/Vinatorul) |[tormol](https://github.com/tormol) |[sru](https://github.com/sru) |[nabijaczleweli](https://github.com/nabijaczleweli) |
+[kbknapp](https://github.com/kbknapp) |[homu](https://github.com/homu) |[Vinatorul](https://github.com/Vinatorul) |[tormol](https://github.com/tormol) |[little-dude](https://github.com/little-dude) |[sru](https://github.com/sru) |
 
-[<img alt="Byron" src="https://avatars1.githubusercontent.com/u/63622?v=3&s=117" width="117">](https://github.com/Byron) |[<img alt="hgrecco" src="https://avatars3.githubusercontent.com/u/278566?v=3&s=117" width="117">](https://github.com/hgrecco) |[<img alt="james-darkfox" src="https://avatars0.githubusercontent.com/u/637155?v=3&s=117" width="117">](https://github.com/james-darkfox) |[<img alt="rtaycher" src="https://avatars3.githubusercontent.com/u/324733?v=3&s=117" width="117">](https://github.com/rtaycher) |[<img alt="glowing-chemist" src="https://avatars3.githubusercontent.com/u/17074682?v=3&s=117" width="117">](https://github.com/glowing-chemist) |[<img alt="Arnavion" src="https://avatars1.githubusercontent.com/u/1096010?v=3&s=117" width="117">](https://github.com/Arnavion) |
+[<img alt="nabijaczleweli" src="https://avatars3.githubusercontent.com/u/6709544?v=4&s=117" width="117">](https://github.com/nabijaczleweli) |[<img alt="mgeisler" src="https://avatars0.githubusercontent.com/u/89623?v=4&s=117" width="117">](https://github.com/mgeisler) |[<img alt="Byron" src="https://avatars2.githubusercontent.com/u/63622?v=4&s=117" width="117">](https://github.com/Byron) |[<img alt="hgrecco" src="https://avatars0.githubusercontent.com/u/278566?v=4&s=117" width="117">](https://github.com/hgrecco) |[<img alt="nateozem" src="https://avatars2.githubusercontent.com/u/22719441?v=4&s=117" width="117">](https://github.com/nateozem) |[<img alt="james-darkfox" src="https://avatars3.githubusercontent.com/u/637155?v=4&s=117" width="117">](https://github.com/james-darkfox) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[Byron](https://github.com/Byron) |[hgrecco](https://github.com/hgrecco) |[james-darkfox](https://github.com/james-darkfox) |[rtaycher](https://github.com/rtaycher) |[glowing-chemist](https://github.com/glowing-chemist) |[Arnavion](https://github.com/Arnavion) |
+[nabijaczleweli](https://github.com/nabijaczleweli) |[mgeisler](https://github.com/mgeisler) |[Byron](https://github.com/Byron) |[hgrecco](https://github.com/hgrecco) |[nateozem](https://github.com/nateozem) |[james-darkfox](https://github.com/james-darkfox) |
 
-[<img alt="mgeisler" src="https://avatars3.githubusercontent.com/u/89623?v=3&s=117" width="117">](https://github.com/mgeisler) |[<img alt="afiune" src="https://avatars3.githubusercontent.com/u/5712253?v=3&s=117" width="117">](https://github.com/afiune) |[<img alt="crazymerlyn" src="https://avatars2.githubusercontent.com/u/6919679?v=3&s=117" width="117">](https://github.com/crazymerlyn) |[<img alt="SuperFluffy" src="https://avatars3.githubusercontent.com/u/701177?v=3&s=117" width="117">](https://github.com/SuperFluffy) |[<img alt="untitaker" src="https://avatars3.githubusercontent.com/u/837573?v=3&s=117" width="117">](https://github.com/untitaker) |[<img alt="japaric" src="https://avatars0.githubusercontent.com/u/5018213?v=3&s=117" width="117">](https://github.com/japaric) |
+[<img alt="Arnavion" src="https://avatars2.githubusercontent.com/u/1096010?v=4&s=117" width="117">](https://github.com/Arnavion) |[<img alt="rtaycher" src="https://avatars0.githubusercontent.com/u/324733?v=4&s=117" width="117">](https://github.com/rtaycher) |[<img alt="glowing-chemist" src="https://avatars0.githubusercontent.com/u/17074682?v=4&s=117" width="117">](https://github.com/glowing-chemist) |[<img alt="untitaker" src="https://avatars0.githubusercontent.com/u/837573?v=4&s=117" width="117">](https://github.com/untitaker) |[<img alt="afiune" src="https://avatars0.githubusercontent.com/u/5712253?v=4&s=117" width="117">](https://github.com/afiune) |[<img alt="crazymerlyn" src="https://avatars1.githubusercontent.com/u/6919679?v=4&s=117" width="117">](https://github.com/crazymerlyn) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[mgeisler](https://github.com/mgeisler) |[afiune](https://github.com/afiune) |[crazymerlyn](https://github.com/crazymerlyn) |[SuperFluffy](https://github.com/SuperFluffy) |[untitaker](https://github.com/untitaker) |[japaric](https://github.com/japaric) |
+[Arnavion](https://github.com/Arnavion) |[rtaycher](https://github.com/rtaycher) |[glowing-chemist](https://github.com/glowing-chemist) |[untitaker](https://github.com/untitaker) |[afiune](https://github.com/afiune) |[crazymerlyn](https://github.com/crazymerlyn) |
 
-[<img alt="matthiasbeyer" src="https://avatars3.githubusercontent.com/u/427866?v=3&s=117" width="117">](https://github.com/matthiasbeyer) |[<img alt="SShrike" src="https://avatars2.githubusercontent.com/u/4061736?v=3&s=117" width="117">](https://github.com/SShrike) |[<img alt="gohyda" src="https://avatars0.githubusercontent.com/u/10263838?v=3&s=117" width="117">](https://github.com/gohyda) |[<img alt="jimmycuadra" src="https://avatars1.githubusercontent.com/u/122457?v=3&s=117" width="117">](https://github.com/jimmycuadra) |[<img alt="Nemo157" src="https://avatars2.githubusercontent.com/u/81079?v=3&s=117" width="117">](https://github.com/Nemo157) |[<img alt="tshepang" src="https://avatars3.githubusercontent.com/u/588486?v=3&s=117" width="117">](https://github.com/tshepang) |
+[<img alt="SuperFluffy" src="https://avatars0.githubusercontent.com/u/701177?v=4&s=117" width="117">](https://github.com/SuperFluffy) |[<img alt="japaric" src="https://avatars3.githubusercontent.com/u/5018213?v=4&s=117" width="117">](https://github.com/japaric) |[<img alt="matthiasbeyer" src="https://avatars0.githubusercontent.com/u/427866?v=4&s=117" width="117">](https://github.com/matthiasbeyer) |[<img alt="SShrike" src="https://avatars1.githubusercontent.com/u/4061736?v=4&s=117" width="117">](https://github.com/SShrike) |[<img alt="tshepang" src="https://avatars0.githubusercontent.com/u/588486?v=4&s=117" width="117">](https://github.com/tshepang) |[<img alt="gohyda" src="https://avatars3.githubusercontent.com/u/10263838?v=4&s=117" width="117">](https://github.com/gohyda) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[matthiasbeyer](https://github.com/matthiasbeyer) |[SShrike](https://github.com/SShrike) |[gohyda](https://github.com/gohyda) |[jimmycuadra](https://github.com/jimmycuadra) |[Nemo157](https://github.com/Nemo157) |[tshepang](https://github.com/tshepang) |
+[SuperFluffy](https://github.com/SuperFluffy) |[japaric](https://github.com/japaric) |[matthiasbeyer](https://github.com/matthiasbeyer) |[SShrike](https://github.com/SShrike) |[tshepang](https://github.com/tshepang) |[gohyda](https://github.com/gohyda) |
 
-[<img alt="porglezomp" src="https://avatars2.githubusercontent.com/u/1690225?v=3&s=117" width="117">](https://github.com/porglezomp) |[<img alt="wdv4758h" src="https://avatars2.githubusercontent.com/u/2716047?v=3&s=117" width="117">](https://github.com/wdv4758h) |[<img alt="frewsxcv" src="https://avatars1.githubusercontent.com/u/416575?v=3&s=117" width="117">](https://github.com/frewsxcv) |[<img alt="hoodie" src="https://avatars2.githubusercontent.com/u/260370?v=3&s=117" width="117">](https://github.com/hoodie) |[<img alt="huonw" src="https://avatars2.githubusercontent.com/u/1203825?v=3&s=117" width="117">](https://github.com/huonw) |[<img alt="GrappigPanda" src="https://avatars3.githubusercontent.com/u/2055372?v=3&s=117" width="117">](https://github.com/GrappigPanda) |
+[<img alt="jimmycuadra" src="https://avatars2.githubusercontent.com/u/122457?v=4&s=117" width="117">](https://github.com/jimmycuadra) |[<img alt="Nemo157" src="https://avatars1.githubusercontent.com/u/81079?v=4&s=117" width="117">](https://github.com/Nemo157) |[<img alt="golem131" src="https://avatars3.githubusercontent.com/u/2429587?v=4&s=117" width="117">](https://github.com/golem131) |[<img alt="porglezomp" src="https://avatars1.githubusercontent.com/u/1690225?v=4&s=117" width="117">](https://github.com/porglezomp) |[<img alt="wdv4758h" src="https://avatars1.githubusercontent.com/u/2716047?v=4&s=117" width="117">](https://github.com/wdv4758h) |[<img alt="frewsxcv" src="https://avatars2.githubusercontent.com/u/416575?v=4&s=117" width="117">](https://github.com/frewsxcv) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[porglezomp](https://github.com/porglezomp) |[wdv4758h](https://github.com/wdv4758h) |[frewsxcv](https://github.com/frewsxcv) |[hoodie](https://github.com/hoodie) |[huonw](https://github.com/huonw) |[GrappigPanda](https://github.com/GrappigPanda) |
+[jimmycuadra](https://github.com/jimmycuadra) |[Nemo157](https://github.com/Nemo157) |[golem131](https://github.com/golem131) |[porglezomp](https://github.com/porglezomp) |[wdv4758h](https://github.com/wdv4758h) |[frewsxcv](https://github.com/frewsxcv) |
 
-[<img alt="ignatenkobrain" src="https://avatars2.githubusercontent.com/u/2866862?v=3&s=117" width="117">](https://github.com/ignatenkobrain) |[<img alt="cstorey" src="https://avatars0.githubusercontent.com/u/743059?v=3&s=117" width="117">](https://github.com/cstorey) |[<img alt="musoke" src="https://avatars3.githubusercontent.com/u/16665084?v=3&s=117" width="117">](https://github.com/musoke) |[<img alt="nelsonjchen" src="https://avatars2.githubusercontent.com/u/5363?v=3&s=117" width="117">](https://github.com/nelsonjchen) |[<img alt="pkgw" src="https://avatars3.githubusercontent.com/u/59598?v=3&s=117" width="117">](https://github.com/pkgw) |[<img alt="Deedasmi" src="https://avatars3.githubusercontent.com/u/5093293?v=3&s=117" width="117">](https://github.com/Deedasmi) |
+[<img alt="hoodie" src="https://avatars1.githubusercontent.com/u/260370?v=4&s=117" width="117">](https://github.com/hoodie) |[<img alt="huonw" src="https://avatars1.githubusercontent.com/u/1203825?v=4&s=117" width="117">](https://github.com/huonw) |[<img alt="GrappigPanda" src="https://avatars0.githubusercontent.com/u/2055372?v=4&s=117" width="117">](https://github.com/GrappigPanda) |[<img alt="ignatenkobrain" src="https://avatars1.githubusercontent.com/u/2866862?v=4&s=117" width="117">](https://github.com/ignatenkobrain) |[<img alt="shepmaster" src="https://avatars0.githubusercontent.com/u/174509?v=4&s=117" width="117">](https://github.com/shepmaster) |[<img alt="cstorey" src="https://avatars3.githubusercontent.com/u/743059?v=4&s=117" width="117">](https://github.com/cstorey) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[ignatenkobrain](https://github.com/ignatenkobrain) |[cstorey](https://github.com/cstorey) |[musoke](https://github.com/musoke) |[nelsonjchen](https://github.com/nelsonjchen) |[pkgw](https://github.com/pkgw) |[Deedasmi](https://github.com/Deedasmi) |
+[hoodie](https://github.com/hoodie) |[huonw](https://github.com/huonw) |[GrappigPanda](https://github.com/GrappigPanda) |[ignatenkobrain](https://github.com/ignatenkobrain) |[shepmaster](https://github.com/shepmaster) |[cstorey](https://github.com/cstorey) |
 
-[<img alt="N-006" src="https://avatars3.githubusercontent.com/u/399312?v=3&s=117" width="117">](https://github.com/N-006) |[<img alt="Keats" src="https://avatars1.githubusercontent.com/u/680355?v=3&s=117" width="117">](https://github.com/Keats) |[<img alt="starkat99" src="https://avatars2.githubusercontent.com/u/8295111?v=3&s=117" width="117">](https://github.com/starkat99) |[<img alt="alex-gulyas" src="https://avatars3.githubusercontent.com/u/8698329?v=3&s=117" width="117">](https://github.com/alex-gulyas) |[<img alt="cite-reader" src="https://avatars2.githubusercontent.com/u/4196987?v=3&s=117" width="117">](https://github.com/cite-reader) |[<img alt="alexbool" src="https://avatars0.githubusercontent.com/u/1283792?v=3&s=117" width="117">](https://github.com/alexbool) |
+[<img alt="kieraneglin" src="https://avatars0.githubusercontent.com/u/569917?v=4&s=117" width="117">](https://github.com/kieraneglin) |[<img alt="musoke" src="https://avatars0.githubusercontent.com/u/16665084?v=4&s=117" width="117">](https://github.com/musoke) |[<img alt="nelsonjchen" src="https://avatars1.githubusercontent.com/u/5363?v=4&s=117" width="117">](https://github.com/nelsonjchen) |[<img alt="pkgw" src="https://avatars0.githubusercontent.com/u/59598?v=4&s=117" width="117">](https://github.com/pkgw) |[<img alt="Deedasmi" src="https://avatars0.githubusercontent.com/u/5093293?v=4&s=117" width="117">](https://github.com/Deedasmi) |[<img alt="vmchale" src="https://avatars1.githubusercontent.com/u/13259982?v=4&s=117" width="117">](https://github.com/vmchale) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[N-006](https://github.com/N-006) |[Keats](https://github.com/Keats) |[starkat99](https://github.com/starkat99) |[alex-gulyas](https://github.com/alex-gulyas) |[cite-reader](https://github.com/cite-reader) |[alexbool](https://github.com/alexbool) |
+[kieraneglin](https://github.com/kieraneglin) |[musoke](https://github.com/musoke) |[nelsonjchen](https://github.com/nelsonjchen) |[pkgw](https://github.com/pkgw) |[Deedasmi](https://github.com/Deedasmi) |[vmchale](https://github.com/vmchale) |
 
-[<img alt="AluisioASG" src="https://avatars1.githubusercontent.com/u/1904165?v=3&s=117" width="117">](https://github.com/AluisioASG) |[<img alt="BurntSushi" src="https://avatars0.githubusercontent.com/u/456674?v=3&s=117" width="117">](https://github.com/BurntSushi) |[<img alt="nox" src="https://avatars3.githubusercontent.com/u/123095?v=3&s=117" width="117">](https://github.com/nox) |[<img alt="pixelistik" src="https://avatars2.githubusercontent.com/u/170929?v=3&s=117" width="117">](https://github.com/pixelistik) |[<img alt="brennie" src="https://avatars0.githubusercontent.com/u/156585?v=3&s=117" width="117">](https://github.com/brennie) |[<img alt="ogham" src="https://avatars0.githubusercontent.com/u/503760?v=3&s=117" width="117">](https://github.com/ogham) |
+[<img alt="messense" src="https://avatars0.githubusercontent.com/u/1556054?v=4&s=117" width="117">](https://github.com/messense) |[<img alt="Keats" src="https://avatars2.githubusercontent.com/u/680355?v=4&s=117" width="117">](https://github.com/Keats) |[<img alt="starkat99" src="https://avatars1.githubusercontent.com/u/8295111?v=4&s=117" width="117">](https://github.com/starkat99) |[<img alt="alex-gulyas" src="https://avatars0.githubusercontent.com/u/8698329?v=4&s=117" width="117">](https://github.com/alex-gulyas) |[<img alt="cite-reader" src="https://avatars1.githubusercontent.com/u/4196987?v=4&s=117" width="117">](https://github.com/cite-reader) |[<img alt="alexbool" src="https://avatars3.githubusercontent.com/u/1283792?v=4&s=117" width="117">](https://github.com/alexbool) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[AluisioASG](https://github.com/AluisioASG) |[BurntSushi](https://github.com/BurntSushi) |[nox](https://github.com/nox) |[pixelistik](https://github.com/pixelistik) |[brennie](https://github.com/brennie) |[ogham](https://github.com/ogham) |
+[messense](https://github.com/messense) |[Keats](https://github.com/Keats) |[starkat99](https://github.com/starkat99) |[alex-gulyas](https://github.com/alex-gulyas) |[cite-reader](https://github.com/cite-reader) |[alexbool](https://github.com/alexbool) |
 
-[<img alt="Bilalh" src="https://avatars3.githubusercontent.com/u/171602?v=3&s=117" width="117">](https://github.com/Bilalh) |[<img alt="dotdash" src="https://avatars2.githubusercontent.com/u/230962?v=3&s=117" width="117">](https://github.com/dotdash) |[<img alt="bradurani" src="https://avatars3.githubusercontent.com/u/4195952?v=3&s=117" width="117">](https://github.com/bradurani) |[<img alt="Seeker14491" src="https://avatars1.githubusercontent.com/u/6490497?v=3&s=117" width="117">](https://github.com/Seeker14491) |[<img alt="brianp" src="https://avatars2.githubusercontent.com/u/179134?v=3&s=117" width="117">](https://github.com/brianp) |[<img alt="casey" src="https://avatars1.githubusercontent.com/u/1945?v=3&s=117" width="117">](https://github.com/casey) |
+[<img alt="AluisioASG" src="https://avatars2.githubusercontent.com/u/1904165?v=4&s=117" width="117">](https://github.com/AluisioASG) |[<img alt="BurntSushi" src="https://avatars3.githubusercontent.com/u/456674?v=4&s=117" width="117">](https://github.com/BurntSushi) |[<img alt="nox" src="https://avatars0.githubusercontent.com/u/123095?v=4&s=117" width="117">](https://github.com/nox) |[<img alt="mitsuhiko" src="https://avatars1.githubusercontent.com/u/7396?v=4&s=117" width="117">](https://github.com/mitsuhiko) |[<img alt="brennie" src="https://avatars3.githubusercontent.com/u/156585?v=4&s=117" width="117">](https://github.com/brennie) |[<img alt="pixelistik" src="https://avatars1.githubusercontent.com/u/170929?v=4&s=117" width="117">](https://github.com/pixelistik) |
+:---: |:---: |:---: |:---: |:---: |:---: |
+[AluisioASG](https://github.com/AluisioASG) |[BurntSushi](https://github.com/BurntSushi) |[nox](https://github.com/nox) |[mitsuhiko](https://github.com/mitsuhiko) |[brennie](https://github.com/brennie) |[pixelistik](https://github.com/pixelistik) |
+
+[<img alt="Bilalh" src="https://avatars0.githubusercontent.com/u/171602?v=4&s=117" width="117">](https://github.com/Bilalh) |[<img alt="dotdash" src="https://avatars1.githubusercontent.com/u/230962?v=4&s=117" width="117">](https://github.com/dotdash) |[<img alt="bradurani" src="https://avatars0.githubusercontent.com/u/4195952?v=4&s=117" width="117">](https://github.com/bradurani) |[<img alt="Seeker14491" src="https://avatars2.githubusercontent.com/u/6490497?v=4&s=117" width="117">](https://github.com/Seeker14491) |[<img alt="brianp" src="https://avatars1.githubusercontent.com/u/179134?v=4&s=117" width="117">](https://github.com/brianp) |[<img alt="casey" src="https://avatars2.githubusercontent.com/u/1945?v=4&s=117" width="117">](https://github.com/casey) |
 :---: |:---: |:---: |:---: |:---: |:---: |
 [Bilalh](https://github.com/Bilalh) |[dotdash](https://github.com/dotdash) |[bradurani](https://github.com/bradurani) |[Seeker14491](https://github.com/Seeker14491) |[brianp](https://github.com/brianp) |[casey](https://github.com/casey) |
 
-[<img alt="volks73" src="https://avatars2.githubusercontent.com/u/1915469?v=3&s=117" width="117">](https://github.com/volks73) |[<img alt="daboross" src="https://avatars2.githubusercontent.com/u/1152146?v=3&s=117" width="117">](https://github.com/daboross) |[<img alt="mernen" src="https://avatars3.githubusercontent.com/u/6412?v=3&s=117" width="117">](https://github.com/mernen) |[<img alt="dguo" src="https://avatars3.githubusercontent.com/u/2763135?v=3&s=117" width="117">](https://github.com/dguo) |[<img alt="davidszotten" src="https://avatars0.githubusercontent.com/u/412005?v=3&s=117" width="117">](https://github.com/davidszotten) |[<img alt="eddyb" src="https://avatars1.githubusercontent.com/u/77424?v=3&s=117" width="117">](https://github.com/eddyb) |
+[<img alt="volks73" src="https://avatars1.githubusercontent.com/u/1915469?v=4&s=117" width="117">](https://github.com/volks73) |[<img alt="daboross" src="https://avatars1.githubusercontent.com/u/1152146?v=4&s=117" width="117">](https://github.com/daboross) |[<img alt="mernen" src="https://avatars0.githubusercontent.com/u/6412?v=4&s=117" width="117">](https://github.com/mernen) |[<img alt="dguo" src="https://avatars0.githubusercontent.com/u/2763135?v=4&s=117" width="117">](https://github.com/dguo) |[<img alt="davidszotten" src="https://avatars3.githubusercontent.com/u/412005?v=4&s=117" width="117">](https://github.com/davidszotten) |[<img alt="drusellers" src="https://avatars1.githubusercontent.com/u/63355?v=4&s=117" width="117">](https://github.com/drusellers) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[volks73](https://github.com/volks73) |[daboross](https://github.com/daboross) |[mernen](https://github.com/mernen) |[dguo](https://github.com/dguo) |[davidszotten](https://github.com/davidszotten) |[eddyb](https://github.com/eddyb) |
+[volks73](https://github.com/volks73) |[daboross](https://github.com/daboross) |[mernen](https://github.com/mernen) |[dguo](https://github.com/dguo) |[davidszotten](https://github.com/davidszotten) |[drusellers](https://github.com/drusellers) |
 
-[<img alt="birkenfeld" src="https://avatars3.githubusercontent.com/u/144359?v=3&s=117" width="117">](https://github.com/birkenfeld) |[<img alt="tanakh" src="https://avatars1.githubusercontent.com/u/109069?v=3&s=117" width="117">](https://github.com/tanakh) |[<img alt="SirVer" src="https://avatars3.githubusercontent.com/u/140115?v=3&s=117" width="117">](https://github.com/SirVer) |[<img alt="idmit" src="https://avatars2.githubusercontent.com/u/2546728?v=3&s=117" width="117">](https://github.com/idmit) |[<img alt="archer884" src="https://avatars2.githubusercontent.com/u/679494?v=3&s=117" width="117">](https://github.com/archer884) |[<img alt="shepmaster" src="https://avatars3.githubusercontent.com/u/174509?v=3&s=117" width="117">](https://github.com/shepmaster) |
+[<img alt="eddyb" src="https://avatars2.githubusercontent.com/u/77424?v=4&s=117" width="117">](https://github.com/eddyb) |[<img alt="birkenfeld" src="https://avatars0.githubusercontent.com/u/144359?v=4&s=117" width="117">](https://github.com/birkenfeld) |[<img alt="guanqun" src="https://avatars0.githubusercontent.com/u/53862?v=4&s=117" width="117">](https://github.com/guanqun) |[<img alt="tanakh" src="https://avatars2.githubusercontent.com/u/109069?v=4&s=117" width="117">](https://github.com/tanakh) |[<img alt="SirVer" src="https://avatars0.githubusercontent.com/u/140115?v=4&s=117" width="117">](https://github.com/SirVer) |[<img alt="idmit" src="https://avatars1.githubusercontent.com/u/2546728?v=4&s=117" width="117">](https://github.com/idmit) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[birkenfeld](https://github.com/birkenfeld) |[tanakh](https://github.com/tanakh) |[SirVer](https://github.com/SirVer) |[idmit](https://github.com/idmit) |[archer884](https://github.com/archer884) |[shepmaster](https://github.com/shepmaster) |
+[eddyb](https://github.com/eddyb) |[birkenfeld](https://github.com/birkenfeld) |[guanqun](https://github.com/guanqun) |[tanakh](https://github.com/tanakh) |[SirVer](https://github.com/SirVer) |[idmit](https://github.com/idmit) |
 
-[<img alt="jespino" src="https://avatars3.githubusercontent.com/u/290303?v=3&s=117" width="117">](https://github.com/jespino) |[<img alt="jtdowney" src="https://avatars2.githubusercontent.com/u/44654?v=3&s=117" width="117">](https://github.com/jtdowney) |[<img alt="andete" src="https://avatars1.githubusercontent.com/u/689017?v=3&s=117" width="117">](https://github.com/andete) |[<img alt="joshtriplett" src="https://avatars1.githubusercontent.com/u/162737?v=3&s=117" width="117">](https://github.com/joshtriplett) |[<img alt="malbarbo" src="https://avatars0.githubusercontent.com/u/1678126?v=3&s=117" width="117">](https://github.com/malbarbo) |[<img alt="iliekturtles" src="https://avatars0.githubusercontent.com/u/5081378?v=3&s=117" width="117">](https://github.com/iliekturtles) |
+[<img alt="archer884" src="https://avatars1.githubusercontent.com/u/679494?v=4&s=117" width="117">](https://github.com/archer884) |[<img alt="jacobmischka" src="https://avatars1.githubusercontent.com/u/3939997?v=4&s=117" width="117">](https://github.com/jacobmischka) |[<img alt="jespino" src="https://avatars0.githubusercontent.com/u/290303?v=4&s=117" width="117">](https://github.com/jespino) |[<img alt="jtdowney" src="https://avatars1.githubusercontent.com/u/44654?v=4&s=117" width="117">](https://github.com/jtdowney) |[<img alt="andete" src="https://avatars2.githubusercontent.com/u/689017?v=4&s=117" width="117">](https://github.com/andete) |[<img alt="jdanford" src="https://avatars2.githubusercontent.com/u/5767112?v=4&s=117" width="117">](https://github.com/jdanford) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[jespino](https://github.com/jespino) |[jtdowney](https://github.com/jtdowney) |[andete](https://github.com/andete) |[joshtriplett](https://github.com/joshtriplett) |[malbarbo](https://github.com/malbarbo) |[iliekturtles](https://github.com/iliekturtles) |
+[archer884](https://github.com/archer884) |[jacobmischka](https://github.com/jacobmischka) |[jespino](https://github.com/jespino) |[jtdowney](https://github.com/jtdowney) |[andete](https://github.com/andete) |[jdanford](https://github.com/jdanford) |
+
+[<img alt="joshtriplett" src="https://avatars2.githubusercontent.com/u/162737?v=4&s=117" width="117">](https://github.com/joshtriplett) |[<img alt="Kalwyn" src="https://avatars3.githubusercontent.com/u/22778640?v=4&s=117" width="117">](https://github.com/Kalwyn) |[<img alt="manuel-rhdt" src="https://avatars1.githubusercontent.com/u/3199013?v=4&s=117" width="117">](https://github.com/manuel-rhdt) |[<img alt="malbarbo" src="https://avatars3.githubusercontent.com/u/1678126?v=4&s=117" width="117">](https://github.com/malbarbo) |[<img alt="Marwes" src="https://avatars3.githubusercontent.com/u/957312?v=4&s=117" width="117">](https://github.com/Marwes) |[<img alt="mdaffin" src="https://avatars1.githubusercontent.com/u/171232?v=4&s=117" width="117">](https://github.com/mdaffin) |
+:---: |:---: |:---: |:---: |:---: |:---: |
+[joshtriplett](https://github.com/joshtriplett) |[Kalwyn](https://github.com/Kalwyn) |[manuel-rhdt](https://github.com/manuel-rhdt) |[malbarbo](https://github.com/malbarbo) |[Marwes](https://github.com/Marwes) |[mdaffin](https://github.com/mdaffin) |
 
-[<img alt="nicompte" src="https://avatars1.githubusercontent.com/u/439369?v=3&s=117" width="117">](https://github.com/nicompte) |[<img alt="NickeZ" src="https://avatars1.githubusercontent.com/u/492753?v=3&s=117" width="117">](https://github.com/NickeZ) |[<img alt="nvzqz" src="https://avatars3.githubusercontent.com/u/10367662?v=3&s=117" width="117">](https://github.com/nvzqz) |[<img alt="Geogi" src="https://avatars2.githubusercontent.com/u/1818316?v=3&s=117" width="117">](https://github.com/Geogi) |[<img alt="flying-sheep" src="https://avatars3.githubusercontent.com/u/291575?v=3&s=117" width="117">](https://github.com/flying-sheep) |[<img alt="peppsac" src="https://avatars0.githubusercontent.com/u/2198295?v=3&s=117" width="117">](https://github.com/peppsac) |
+[<img alt="iliekturtles" src="https://avatars3.githubusercontent.com/u/5081378?v=4&s=117" width="117">](https://github.com/iliekturtles) |[<img alt="nicompte" src="https://avatars2.githubusercontent.com/u/439369?v=4&s=117" width="117">](https://github.com/nicompte) |[<img alt="NickeZ" src="https://avatars2.githubusercontent.com/u/492753?v=4&s=117" width="117">](https://github.com/NickeZ) |[<img alt="nvzqz" src="https://avatars0.githubusercontent.com/u/10367662?v=4&s=117" width="117">](https://github.com/nvzqz) |[<img alt="nuew" src="https://avatars2.githubusercontent.com/u/26099511?v=4&s=117" width="117">](https://github.com/nuew) |[<img alt="Geogi" src="https://avatars1.githubusercontent.com/u/1818316?v=4&s=117" width="117">](https://github.com/Geogi) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[nicompte](https://github.com/nicompte) |[NickeZ](https://github.com/NickeZ) |[nvzqz](https://github.com/nvzqz) |[Geogi](https://github.com/Geogi) |[flying-sheep](https://github.com/flying-sheep) |[peppsac](https://github.com/peppsac) |
+[iliekturtles](https://github.com/iliekturtles) |[nicompte](https://github.com/nicompte) |[NickeZ](https://github.com/NickeZ) |[nvzqz](https://github.com/nvzqz) |[nuew](https://github.com/nuew) |[Geogi](https://github.com/Geogi) |
 
-[<img alt="hexjelly" src="https://avatars3.githubusercontent.com/u/435283?v=3&s=117" width="117">](https://github.com/hexjelly) |[<img alt="rnelson" src="https://avatars0.githubusercontent.com/u/118361?v=3&s=117" width="117">](https://github.com/rnelson) |[<img alt="swatteau" src="https://avatars0.githubusercontent.com/u/5521255?v=3&s=117" width="117">](https://github.com/swatteau) |[<img alt="tspiteri" src="https://avatars3.githubusercontent.com/u/18604588?v=3&s=117" width="117">](https://github.com/tspiteri) |[<img alt="vks" src="https://avatars1.githubusercontent.com/u/33460?v=3&s=117" width="117">](https://github.com/vks) |[<img alt="th4t" src="https://avatars1.githubusercontent.com/u/2801030?v=3&s=117" width="117">](https://github.com/th4t) |
+[<img alt="flying-sheep" src="https://avatars0.githubusercontent.com/u/291575?v=4&s=117" width="117">](https://github.com/flying-sheep) |[<img alt="Phlosioneer" src="https://avatars2.githubusercontent.com/u/4657718?v=4&s=117" width="117">](https://github.com/Phlosioneer) |[<img alt="peppsac" src="https://avatars3.githubusercontent.com/u/2198295?v=4&s=117" width="117">](https://github.com/peppsac) |[<img alt="golddranks" src="https://avatars1.githubusercontent.com/u/2675542?v=4&s=117" width="117">](https://github.com/golddranks) |[<img alt="hexjelly" src="https://avatars0.githubusercontent.com/u/435283?v=4&s=117" width="117">](https://github.com/hexjelly) |[<img alt="rnelson" src="https://avatars3.githubusercontent.com/u/118361?v=4&s=117" width="117">](https://github.com/rnelson) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[hexjelly](https://github.com/hexjelly) |[rnelson](https://github.com/rnelson) |[swatteau](https://github.com/swatteau) |[tspiteri](https://github.com/tspiteri) |[vks](https://github.com/vks) |[th4t](https://github.com/th4t) |
+[flying-sheep](https://github.com/flying-sheep) |[Phlosioneer](https://github.com/Phlosioneer) |[peppsac](https://github.com/peppsac) |[golddranks](https://github.com/golddranks) |[hexjelly](https://github.com/hexjelly) |[rnelson](https://github.com/rnelson) |
 
-[<img alt="mineo" src="https://avatars2.githubusercontent.com/u/78236?v=3&s=117" width="117">](https://github.com/mineo) |[<img alt="grossws" src="https://avatars1.githubusercontent.com/u/171284?v=3&s=117" width="117">](https://github.com/grossws) |[<img alt="messense" src="https://avatars3.githubusercontent.com/u/1556054?v=3&s=117" width="117">](https://github.com/messense) |[<img alt="mvaude" src="https://avatars2.githubusercontent.com/u/9532611?v=3&s=117" width="117">](https://github.com/mvaude) |[<img alt="panicbit" src="https://avatars1.githubusercontent.com/u/628445?v=3&s=117" width="117">](https://github.com/panicbit) |[<img alt="mitsuhiko" src="https://avatars2.githubusercontent.com/u/7396?v=3&s=117" width="117">](https://github.com/mitsuhiko) |
+[<img alt="swatteau" src="https://avatars3.githubusercontent.com/u/5521255?v=4&s=117" width="117">](https://github.com/swatteau) |[<img alt="tspiteri" src="https://avatars0.githubusercontent.com/u/18604588?v=4&s=117" width="117">](https://github.com/tspiteri) |[<img alt="vks" src="https://avatars2.githubusercontent.com/u/33460?v=4&s=117" width="117">](https://github.com/vks) |[<img alt="th4t" src="https://avatars2.githubusercontent.com/u/2801030?v=4&s=117" width="117">](https://github.com/th4t) |[<img alt="mineo" src="https://avatars1.githubusercontent.com/u/78236?v=4&s=117" width="117">](https://github.com/mineo) |[<img alt="wabain" src="https://avatars3.githubusercontent.com/u/7651435?v=4&s=117" width="117">](https://github.com/wabain) |
 :---: |:---: |:---: |:---: |:---: |:---: |
-[mineo](https://github.com/mineo) |[grossws](https://github.com/grossws) |[messense](https://github.com/messense) |[mvaude](https://github.com/mvaude) |[panicbit](https://github.com/panicbit) |[mitsuhiko](https://github.com/mitsuhiko) |
+[swatteau](https://github.com/swatteau) |[tspiteri](https://github.com/tspiteri) |[vks](https://github.com/vks) |[th4t](https://github.com/th4t) |[mineo](https://github.com/mineo) |[wabain](https://github.com/wabain) |
+
+[<img alt="grossws" src="https://avatars2.githubusercontent.com/u/171284?v=4&s=117" width="117">](https://github.com/grossws) |[<img alt="kennytm" src="https://avatars1.githubusercontent.com/u/103023?v=4&s=117" width="117">](https://github.com/kennytm) |[<img alt="mvaude" src="https://avatars1.githubusercontent.com/u/9532611?v=4&s=117" width="117">](https://github.com/mvaude) |[<img alt="panicbit" src="https://avatars2.githubusercontent.com/u/628445?v=4&s=117" width="117">](https://github.com/panicbit) |[<img alt="ogham" src="https://avatars3.githubusercontent.com/u/503760?v=4&s=117" width="117">](https://github.com/ogham) |
+:---: |:---: |:---: |:---: |:---: |
+[grossws](https://github.com/grossws) |[kennytm](https://github.com/kennytm) |[mvaude](https://github.com/mvaude) |[panicbit](https://github.com/panicbit) |[ogham](https://github.com/ogham) |
 
 
 
 
 This list was generated by [mgechev/github-contributors-list](https://github.com/mgechev/github-contributors-list)
--- a/third_party/rust/clap/Cargo.toml
+++ b/third_party/rust/clap/Cargo.toml
@@ -7,27 +7,29 @@
 #
 # 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 = "clap"
-version = "2.25.0"
+version = "2.27.1"
 authors = ["Kevin K. <kbknapp@gmail.com>"]
 exclude = ["examples/*", "clap-test/*", "tests/*", "benches/*", "*.png", "clap-perf/*", "*.dot"]
 description = "A simple to use, efficient, and full featured  Command Line Argument Parser\n"
 homepage = "https://clap.rs/"
 documentation = "https://docs.rs/clap/"
 readme = "README.md"
 keywords = ["argument", "command", "arg", "parser", "parse"]
 categories = ["command-line-interface"]
 license = "MIT"
 repository = "https://github.com/kbknapp/clap-rs.git"
+[package.metadata.docs.rs]
+features = ["doc"]
 [profile.test]
 opt-level = 1
 lto = false
 codegen-units = 4
 debug = true
 debug-assertions = true
 rpath = false
 
@@ -55,63 +57,70 @@ debug-assertions = true
 rpath = false
 
 [profile.release]
 opt-level = 3
 lto = true
 debug = false
 debug-assertions = false
 rpath = false
+[dependencies.bitflags]
+version = "0.9"
+
+[dependencies.clippy]
+version = "~0.0.166"
+optional = true
+
 [dependencies.ansi_term]
 version = "0.9.0"
 optional = true
 
-[dependencies.term_size]
-version = "0.3.0"
+[dependencies.vec_map]
+version = "0.8"
 optional = true
 
-[dependencies.textwrap]
+[dependencies.strsim]
 version = "0.6.0"
+optional = true
 
-[dependencies.yaml-rust]
-version = "0.3.5"
+[dependencies.atty]
+version = "0.2.2"
 optional = true
 
 [dependencies.unicode-width]
 version = "0.1.4"
 
-[dependencies.atty]
-version = "0.2.2"
+[dependencies.textwrap]
+version = "0.9.0"
+
+[dependencies.term_size]
+version = "0.3.0"
 optional = true
 
-[dependencies.vec_map]
-version = "0.8"
-
-[dependencies.clippy]
-version = "~0.0.131"
-optional = true
-
-[dependencies.unicode-segmentation]
-version = "~1.1.0"
-
-[dependencies.bitflags]
-version = "0.9"
-
-[dependencies.strsim]
-version = "0.6.0"
+[dependencies.yaml-rust]
+version = "0.3.5"
 optional = true
 [dev-dependencies.regex]
 version = "0.2"
 
 [dev-dependencies.lazy_static]
 version = "0.2"
 
+[dev-dependencies.version-sync]
+version = "0.3"
+
 [features]
-unstable = []
-default = ["suggestions", "color", "wrap_help"]
-color = ["ansi_term", "atty"]
-yaml = ["yaml-rust"]
+debug = []
 no_cargo = []
-wrap_help = ["term_size"]
-suggestions = ["strsim"]
+yaml = ["yaml-rust"]
 nightly = []
-debug = []
+color = ["ansi_term", "atty"]
+suggestions = ["strsim"]
+default = ["suggestions", "color", "vec_map"]
+wrap_help = ["term_size", "textwrap/term_size"]
 lints = ["clippy"]
+unstable = []
+doc = ["yaml"]
+[badges.appveyor]
+repository = "kbknapp/clap-rs"
+
+[badges.travis-ci]
+repository = "kbknapp/clap-rs"
--- a/third_party/rust/clap/README.md
+++ b/third_party/rust/clap/README.md
@@ -40,36 +40,73 @@ Table of Contents
 * [License](#license)
 * [Recent Breaking Changes](#recent-breaking-changes)
   * [Deprecations](#deprecations)
 
 Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
 
 ## What's New
 
-Here's the highlights for v2.25.0
+Here's whats new in 2.27.1:
+
+** This release also contains a very minor breaking change to fix a bug **
+
+The only CLIs affected will be those using unrestrained multiple values and subcommands where the
+subcommand name can coincide with one of the multiple values.
+
+See the commit [0c223f54](https://github.com/kbknapp/clap-rs/commit/0c223f54ed46da406bc8b43a5806e0b227863b31) for full details.
 
-* use textwrap crate for wrapping help texts 
-* suggests to use flag after subcommand when applicable 
-* Bumps bitflags crate to v0.9
-
-Here's the highlights for v2.21.0 to v2.24.2
+*    Adds `term_size` as an optional dependency (with feature `wrap_help`) to fix compile bug
+*   **The minimum required version of Rust is now 1.18.0 (Stable)**
+*   Values from global args are now propagated UP and DOWN!
+*   fixes a bug where using AppSettings::AllowHyphenValues would allow invalid arguments even when there is no way for them to be valid
+*   when an argument requires a value and that value happens to match a subcommand name, its parsed as a value
+*   fixes a bug that prevented number_of_values and default_values to be used together
+*   fixes a bug that didn't allow args with default values to have conflicts
+*   fixes a panic when using global args and calling App::get_matches_from_safe_borrow multiple times
+*   fixes issues and potential regressions with global args values not being propagated properly or at all
+*   fixes a bug where default values are not applied if the option supports zero values
+*   adds addtional blurbs about using multiples with subcommands
+*   updates the docs to reflect changes to global args and that global args values can now be propagated back up the stack
+*   add html_root_url attribute
+*   sync README version numbers with crate version
+*   args that have require_delimiter(true) is now reflected in help and usage strings
+*   if all subcommands are hidden, the subcommands section of the help message is no longer displayed
+*   fixes when an argument requires a value and that value happens to match a subcommand name, its parsed as a value
+* **AppSettings::PropagateGlobalValuesDown:**  this setting deprecated and is no longer required to propagate values down or up
 
-* fixes a bug where args that allow values to start with a hyphen couldnt contain a double hyphen -- as a value 
-* fixes a bug where positional argument help text is misaligned 
-* **App::template docs:**  adds details about the necessity to use AppSettings::UnifiedHelpMessage when using {unified} tags in the help template 
-* **Arg::allow_hyphen_values docs:**  updates the docs to include warnings for allow_hyphen_values and multiple(true) used together 
-* **clap_app! docs:**  adds using the @group specifier to the macro docs 
-* adds a debug assertion to ensure all args added to groups actually exist 
-* fixes a bug where args with last(true) and required(true) set were not being printed in the usage string 
-* fixes a bug that was printing the arg name, instead of value name when Arg::last(true) was used 
-* fixes a bug where flags were parsed as flags AND positional values when specific combinations of settings were used 
-* **README.md:**  fix some typos 
-* **Arg:**  add `default_value_os` 
-* **arg_matches.rs:**  Added a Default implementation for Values and OsValues iterators. 
+Here's the highlights for v2.21.0 to v2.26.2
+
+*   if all subcommands are hidden, the subcommands section of the help message is no longer displayed
+*   fixes a bug where default values are not applied if the option supports zero values
+*   fixes using require_equals(true) and min_values(0) together
+*   escape special characters in zsh and fish completions
+*   avoid panic generating default help msg if term width set to 0 due to bug in textwrap 0.7.0
+*   Change `who's` -> `whose` in documentation
+* **Help Message:**  fixes `App::long_about` not being displayed
+* **Suggestions:**  output for flag after subcommand
+*   **The minimum required version of Rust is now 1.13.0 (Stable)**
+*   bumps unicode-segmentation to v1.2
+*   update textwrap to version 0.7.0 which increases the performance of writing help strings
+* impl Default for Values + OsValues for any lifetime.
+* use textwrap crate for wrapping help texts
+* suggests to use flag after subcommand when applicable
+* Bumps bitflags crate to v0.9
+* fixes a bug where args that allow values to start with a hyphen couldnt contain a double hyphen -- as a value
+* fixes a bug where positional argument help text is misaligned
+* **App::template docs:**  adds details about the necessity to use AppSettings::UnifiedHelpMessage when using {unified} tags in the help template
+* **Arg::allow_hyphen_values docs:**  updates the docs to include warnings for allow_hyphen_values and multiple(true) used together
+* **clap_app! docs:**  adds using the @group specifier to the macro docs
+* adds a debug assertion to ensure all args added to groups actually exist
+* fixes a bug where args with last(true) and required(true) set were not being printed in the usage string
+* fixes a bug that was printing the arg name, instead of value name when Arg::last(true) was used
+* fixes a bug where flags were parsed as flags AND positional values when specific combinations of settings were used
+* **README.md:**  fix some typos
+* **Arg:**  add `default_value_os`
+* **arg_matches.rs:**  Added a Default implementation for Values and OsValues iterators.
 * **PowerShell Completions:**
   * fixes a bug where powershells completions cant be used if no subcommands are defined
   * massively dedups subcommand names in the generate script to make smaller scripts that are still functionally equiv
 * allows specifying a short help vs a long help (i.e. varying levels of detail depending on if -h or --help was used)
 * **clap_app!:**  adds support for arg names with hyphens similar to longs with hyphens
 * fixes a bug that wasn't allowing help and version to be properly overridden
   * This may break code that was relying on this bug! If you add a flag with a long of `help` manually *and* rely on the help message to be printed automatically your code could break. Please see the commit link in the full CHANGELOG.md
 * `App::long_about`
@@ -134,17 +171,17 @@ First, let me say that these comparisons
 Personally, I find many, many uses of `getopts` are manually implementing features that `clap` provides by default. Using `clap` simplifies your codebase allowing you to focus on your application, and not argument parsing.
 
 #### How does `clap` compare to [docopt.rs](https://github.com/docopt/docopt.rs)?
 
 I first want to say I'm a big a fan of BurntSushi's work, the creator of `Docopt.rs`. I aspire to produce the quality of libraries that this man does! When it comes to comparing these two libraries they are very different. `docopt` tasks you with writing a help message, and then it parsers that message for you to determine all valid arguments and their use. Some people LOVE this approach, others do not. If you're willing to write a detailed help message, it's nice that you can stick that in your program and have `docopt` do the rest. On the downside, it's far less flexible.
 
 `docopt` is also excellent at translating arguments into Rust types automatically. There is even a syntax extension which will do all this for you, if you're willing to use a nightly compiler (use of a stable compiler requires you to somewhat manually translate from arguments to Rust types). To use BurntSushi's words, `docopt` is also a sort of black box. You get what you get, and it's hard to tweak implementation or customize the experience for your use case.
 
-Because `docopt` is doing a ton of work to parse your help messages and determine what you were trying to communicate as valid arguments, it's also one of the more heavy weight parsers performance-wise. For most applications this isn't a concern and this isn't to say `docopt` is slow, in fact from it. This is just something to keep in mind while comparing.
+Because `docopt` is doing a ton of work to parse your help messages and determine what you were trying to communicate as valid arguments, it's also one of the more heavy weight parsers performance-wise. For most applications this isn't a concern and this isn't to say `docopt` is slow, in fact far from it. This is just something to keep in mind while comparing.
 
 #### All else being equal, what are some reasons to use `clap`?
 
 `clap` is as fast, and as lightweight as possible while still giving all the features you'd expect from a modern argument parser. In fact, for the amount and type of features `clap` offers it remains about as fast as `getopts`. If you use `clap` when just need some simple arguments parsed, you'll find it's a walk in the park. `clap` also makes it possible to represent extremely complex, and advanced requirements, without too much thought. `clap` aims to be intuitive, easy to use, and fully capable for wide variety use cases and needs.
 
 ## Features
 
 Below are a few of the features which `clap` supports, full descriptions and usage can be found in the [documentation](https://docs.rs/clap/) and [examples/](examples) directory
@@ -335,17 +372,17 @@ subcommands:
         args:
             - debug:
                 short: d
                 help: print debug information
 ```
 
 Since this feature requires additional dependencies that not everyone may want, it is *not* compiled in by default and we need to enable a feature flag in Cargo.toml:
 
-Simply change your `clap = "2.19"` to `clap = {version = "2.19", features = ["yaml"]}`.
+Simply change your `clap = "2.27"` to `clap = {version = "2.27", features = ["yaml"]}`.
 
 At last we create our `main.rs` file just like we would have with the previous two examples:
 
 ```rust
 // (Full example with detailed comments in examples/17_yaml.rs)
 //
 // This example demonstrates clap's building from YAML style of creating arguments which is far
 // more clean, but takes a very small performance hit compared to the other two methods.
@@ -454,17 +491,17 @@ fn main() {
 * Run with help or version `$ ./target/release/fake --help` or `$ ./target/release/fake --version`
 
 ## Usage
 
 For full usage, add `clap` as a dependency in your `Cargo.toml` () to use from crates.io:
 
 ```toml
 [dependencies]
-clap = "~2.19.0"
+clap = "~2.27"
 ```
 
 (**note**: If you are concerned with supporting a minimum version of Rust that is *older* than the current stable Rust minus 2 stable releases, it's recommended to use the `~major.minor.patch` style versions in your `Cargo.toml` which will only update the patch version automatically. For more information see the [Compatibility Policy](#compatibility-policy))
 
 Then add `extern crate clap;` to your crate root.
 
 Define a list of valid arguments for your program (see the [documentation](https://docs.rs/clap/) or [examples/](examples) directory of this repo)
 
@@ -472,30 +509,31 @@ Then run `cargo build` or `cargo update 
 
 ### Optional Dependencies / Features
 
 #### Features enabled by default
 
 * **"suggestions"**: Turns on the `Did you mean '--myoption'?` feature for when users make typos. (builds dependency `strsim`)
 * **"color"**: Turns on colored error messages. This feature only works on non-Windows OSs. (builds dependency `ansi-term`)
 * **"wrap_help"**: Wraps the help at the actual terminal width when available, instead of 120 characters. (builds dependency `term_size`)
+* **"vec_map"**: Use [`VecMap`](https://crates.io/crates/vec_map) internally instead of a [`BTreeMap`](https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html). This feature provides a _slight_ performance improvement. (builds dependency `vec_map`)
 
 To disable these, add this to your `Cargo.toml`:
 
 ```toml
 [dependencies.clap]
-version = "2.19"
+version = "2.27"
 default-features = false
 ```
 
 You can also selectively enable only the features you'd like to include, by adding:
 
 ```toml
 [dependencies.clap]
-version = "2.19"
+version = "2.27"
 default-features = false
 
 # Cherry-pick the features you'd like to use
 features = [ "suggestions", "color" ]
 ```
 
 #### Opt-in features
 
@@ -611,47 +649,48 @@ There are a few goals of `clap` that I'd
 Because `clap` takes SemVer and compatibility seriously, this is the official policy regarding breaking changes and minimum required versions of Rust.
 
 `clap` will pin the minimum required version of Rust to the CI builds. Bumping the minimum version of Rust is considered a minor breaking change, meaning *at a minimum* the minor version of `clap` will be bumped.
 
 In order to keep from being surprised of breaking changes, it is **highly** recommended to use the `~major.minor.patch` style in your `Cargo.toml` only if you wish to target a version of Rust that is *older* than current stable minus two releases:
 
 ```toml
 [dependencies]
-clap = "~2.19.0"
+clap = "~2.27"
 ```
 
 This will cause *only* the patch version to be updated upon a `cargo update` call, and therefore cannot break due to new features, or bumped minimum versions of Rust.
 
 #### Warning about '~' Dependencies
 
 Using `~` can cause issues in certain circumstances.
 
 From @alexcrichton:
 
 Right now Cargo's version resolution is pretty naive, it's just a brute-force search of the solution space, returning the first resolvable graph. This also means that it currently won't terminate until it proves there is not possible resolvable graph. This leads to situations where workspaces with multiple binaries, for example, have two different dependencies such as:
 
-```toml
+```toml,no_sync
 
 # In one Cargo.toml
 [dependencies]
-clap = "~2.19.0"
+clap = "~2.27.0"
 
 # In another Cargo.toml
 [dependencies]
-clap = "2.22"
+clap = "2.27"
 
 ```
 
 This is inherently an unresolvable crate graph in Cargo right now. Cargo requires there's only one major version of a crate, and being in the same workspace these two crates must share a version. This is impossible in this location, though, as these version constraints cannot be met.
 
 #### Minimum Version of Rust
 
-`clap` will officially support current stable Rust, minus two releases, but may work with prior releases as well. For example, current stable Rust at the time of this writing is 1.13.0, meaning `clap` is guaranteed to compile with 1.11.0 and beyond.
-At the 1.14.0 release, `clap` will be guaranteed to compile with 1.12.0 and beyond, etc.
+`clap` will officially support current stable Rust, minus two releases, but may work with prior releases as well. For example, current stable Rust at the time of this writing is 1.21.0, meaning `clap` is guaranteed to compile with 1.19.0 and beyond.
+
+At the 1.22.0 stable release, `clap` will be guaranteed to compile with 1.20.0 and beyond, etc.
 
 Upon bumping the minimum version of Rust (assuming it's within the stable-2 range), it *must* be clearly annotated in the `CHANGELOG.md`
 
 #### Breaking Changes
 
 `clap` takes a similar policy to Rust and will bump the major version number upon breaking changes with only the following exceptions:
 
  * The breaking change is to fix a security concern
@@ -705,11 +744,11 @@ As of 2.0.0 (From 1.x)
  * **There is now a priority of order to determine the name** - This is perhaps the biggest breaking change. See the documentation for full details. Prior to this change, the value name took precedence. **Ensure your args are using the proper names (i.e. typically the long or short and NOT the value name) throughout the code**
 * `ArgMatches::values_of` returns an `Values` now which implements `Iterator` (should not break any code)
 * `crate_version!` returns `&'static str` instead of `String`
 
 ### Deprecations
 
 Old method names will be left around for several minor version bumps, or one major version bump.
 
-As of 2.19.0:
+As of 2.27.0:
 
- * None!
+* **AppSettings::PropagateGlobalValuesDown:**  this setting deprecated and is no longer required to propagate values down or up
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clap/SPONSORS.md
@@ -0,0 +1,7 @@
+The following is a list of [sponsors](https://www.clap.rs/sponsor/) for the clap-rs project:
+
+[<img alt="Noelia Seva-Gonzalez" src="https://www.clap.rs/sponsor/img/noelia_sm.png" width="117">](http://vsgrealestategroup.com.realproserver.com/About)
+Noelia Seva-Gonzalez
+
+[<img alt="Rob Tsuk" src="https://www.clap.rs/sponsor/img/robtsuk_sm.png" width="117">](https://github.com/rtsuk)
+Rob Tsuk
\ No newline at end of file
--- a/third_party/rust/clap/src/app/help.rs
+++ b/third_party/rust/clap/src/app/help.rs
@@ -1,48 +1,55 @@
 // Std
+use std::borrow::Cow;
 use std::cmp;
 use std::collections::BTreeMap;
 use std::fmt::Display;
 use std::io::{self, Cursor, Read, Write};
 use std::usize;
 
 // Internal
 use app::{App, AppSettings};
 use app::parser::Parser;
 use args::{AnyArg, ArgSettings, DispOrder};
 use errors::{Error, Result as ClapResult};
-use fmt::{Format, Colorizer, ColorizerOption};
+use fmt::{Colorizer, ColorizerOption, Format};
 use app::usage;
+use map::VecMap;
+use INTERNAL_ERROR_MSG;
 
 // Third Party
 use unicode_width::UnicodeWidthStr;
 #[cfg(feature = "wrap_help")]
 use term_size;
 use textwrap;
-use vec_map::VecMap;
 
 #[cfg(not(feature = "wrap_help"))]
 mod term_size {
     pub fn dimensions() -> Option<(usize, usize)> { None }
 }
 
 fn str_width(s: &str) -> usize { UnicodeWidthStr::width(s) }
 
 const TAB: &'static str = "    ";
 
 // These are just convenient traits to make the code easier to read.
 trait ArgWithDisplay<'b, 'c>: AnyArg<'b, 'c> + Display {}
-impl<'b, 'c, T> ArgWithDisplay<'b, 'c> for T where T: AnyArg<'b, 'c> + Display {}
+impl<'b, 'c, T> ArgWithDisplay<'b, 'c> for T
+where
+    T: AnyArg<'b, 'c> + Display,
+{
+}
 
 trait ArgWithOrder<'b, 'c>: ArgWithDisplay<'b, 'c> + DispOrder {
     fn as_base(&self) -> &ArgWithDisplay<'b, 'c>;
 }
 impl<'b, 'c, T> ArgWithOrder<'b, 'c> for T
-    where T: ArgWithDisplay<'b, 'c> + DispOrder
+where
+    T: ArgWithDisplay<'b, 'c> + DispOrder,
 {
     fn as_base(&self) -> &ArgWithDisplay<'b, 'c> { self }
 }
 
 fn as_arg_trait<'a, 'b, T: ArgWithOrder<'a, 'b>>(x: &T) -> &ArgWithOrder<'a, 'b> { x }
 
 impl<'b, 'c> DispOrder for App<'b, 'c> {
     fn disp_ord(&self) -> usize { 999 }
@@ -79,39 +86,44 @@ pub struct Help<'a> {
     force_next_line: bool,
     use_long: bool,
 }
 
 // Public Functions
 impl<'a> Help<'a> {
     /// Create a new `Help` instance.
     #[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))]
-    pub fn new(w: &'a mut Write,
-               next_line_help: bool,
-               hide_pv: bool,
-               color: bool,
-               cizer: Colorizer,
-               term_w: Option<usize>,
-               max_w: Option<usize>,
-               use_long: bool)
-               -> Self {
+    pub fn new(
+        w: &'a mut Write,
+        next_line_help: bool,
+        hide_pv: bool,
+        color: bool,
+        cizer: Colorizer,
+        term_w: Option<usize>,
+        max_w: Option<usize>,
+        use_long: bool,
+    ) -> Self {
         debugln!("Help::new;");
         Help {
             writer: w,
             next_line_help: next_line_help,
             hide_pv: hide_pv,
             term_w: match term_w {
-                Some(width) => if width == 0 { usize::MAX } else { width },
-                None => {
-                    cmp::min(term_size::dimensions().map_or(120, |(w, _)| w),
-                             match max_w {
-                                 None | Some(0) => usize::MAX,
-                                 Some(mw) => mw,
-                             })
-                }
+                Some(width) => if width == 0 {
+                    usize::MAX
+                } else {
+                    width
+                },
+                None => cmp::min(
+                    term_size::dimensions().map_or(120, |(w, _)| w),
+                    match max_w {
+                        None | Some(0) => usize::MAX,
+                        Some(mw) => mw,
+                    },
+                ),
             },
             color: color,
             cizer: cizer,
             longest: 0,
             force_next_line: false,
             use_long: use_long,
         }
     }
@@ -134,84 +146,91 @@ impl<'a> Help<'a> {
     /// and write its help to the wrapped stream which will be stderr. This method prevents
     /// formatting when required.
     pub fn write_parser_help_to_stderr(w: &'a mut Write, parser: &Parser) -> ClapResult<()> {
         debugln!("Help::write_parser_help;");
         Self::_write_parser_help(w, parser, true, false)
     }
 
     #[doc(hidden)]
-    pub fn _write_parser_help(w: &'a mut Write, parser: &Parser, stderr: bool, use_long: bool) -> ClapResult<()> {
+    pub fn _write_parser_help(
+        w: &'a mut Write,
+        parser: &Parser,
+        stderr: bool,
+        use_long: bool,
+    ) -> ClapResult<()> {
         debugln!("Help::write_parser_help;");
         let nlh = parser.is_set(AppSettings::NextLineHelp);
         let hide_v = parser.is_set(AppSettings::HidePossibleValuesInHelp);
         let color = parser.is_set(AppSettings::ColoredHelp);
         let cizer = Colorizer::new(ColorizerOption {
             use_stderr: stderr,
             when: parser.color(),
         });
-        Self::new(w,
-                  nlh,
-                  hide_v,
-                  color,
-                  cizer,
-                  parser.meta.term_w,
-                  parser.meta.max_w,
-                  use_long)
-                .write_help(parser)
+        Self::new(
+            w,
+            nlh,
+            hide_v,
+            color,
+            cizer,
+            parser.meta.term_w,
+            parser.meta.max_w,
+            use_long,
+        ).write_help(parser)
     }
 
     /// Writes the parser help to the wrapped stream.
     pub fn write_help(&mut self, parser: &Parser) -> ClapResult<()> {
         debugln!("Help::write_help;");
         if let Some(h) = parser.meta.help_str {
-            try!(write!(self.writer, "{}", h).map_err(Error::from));
+            write!(self.writer, "{}", h).map_err(Error::from)?;
         } else if let Some(tmpl) = parser.meta.template {
-            try!(self.write_templated_help(parser, tmpl));
+            self.write_templated_help(parser, tmpl)?;
         } else {
-            try!(self.write_default_help(parser));
+            self.write_default_help(parser)?;
         }
         Ok(())
     }
 }
 
 // Methods to write AnyArg help.
 impl<'a> Help<'a> {
     /// Writes help for each argument in the order they were declared to the wrapped stream.
     fn write_args_unsorted<'b: 'd, 'c: 'd, 'd, I: 'd>(&mut self, args: I) -> io::Result<()>
-        where I: Iterator<Item = &'d ArgWithOrder<'b, 'c>>
+    where
+        I: Iterator<Item = &'d ArgWithOrder<'b, 'c>>,
     {
         debugln!("Help::write_args_unsorted;");
         // The shortest an arg can legally be is 2 (i.e. '-x')
         self.longest = 2;
         let mut arg_v = Vec::with_capacity(10);
         for arg in args.filter(|arg| {
-                                   !(arg.is_set(ArgSettings::Hidden)) ||
-                                   arg.is_set(ArgSettings::NextLineHelp)
-                               }) {
+            !(arg.is_set(ArgSettings::Hidden)) || arg.is_set(ArgSettings::NextLineHelp)
+        }) {
             if arg.longest_filter() {
                 self.longest = cmp::max(self.longest, str_width(arg.to_string().as_str()));
             }
             arg_v.push(arg)
         }
         let mut first = true;
         for arg in arg_v {
             if first {
                 first = false;
             } else {
-                try!(self.writer.write_all(b"\n"));
+                self.writer.write_all(b"\n")?;
             }
-            try!(self.write_arg(arg.as_base()));
+            self.write_arg(arg.as_base())?;
         }
         Ok(())
     }
 
     /// Sorts arguments by length and display order and write their help to the wrapped stream.
     fn write_args<'b: 'd, 'c: 'd, 'd, I: 'd>(&mut self, args: I) -> io::Result<()>
-        where I: Iterator<Item = &'d ArgWithOrder<'b, 'c>>
+    where
+        I: Iterator<Item = &'d ArgWithOrder<'b, 'c>>,
     {
         debugln!("Help::write_args;");
         // The shortest an arg can legally be is 2 (i.e. '-x')
         self.longest = 2;
         let mut ord_m = VecMap::new();
         // Determine the longest
         for arg in args.filter(|arg| {
             // If it's NextLineHelp, but we don't care to compute how long because it may be
@@ -228,38 +247,38 @@ impl<'a> Help<'a> {
             btm.insert(arg.name(), arg);
         }
         let mut first = true;
         for btm in ord_m.values() {
             for arg in btm.values() {
                 if first {
                     first = false;
                 } else {
-                    try!(self.writer.write_all(b"\n"));
+                    self.writer.write_all(b"\n")?;
                 }
-                try!(self.write_arg(arg.as_base()));
+                self.write_arg(arg.as_base())?;
             }
         }
         Ok(())
     }
 
     /// Writes help for an argument to the wrapped stream.
     fn write_arg<'b, 'c>(&mut self, arg: &ArgWithDisplay<'b, 'c>) -> io::Result<()> {
         debugln!("Help::write_arg;");
-        try!(self.short(arg));
-        try!(self.long(arg));
-        let spec_vals = try!(self.val(arg));
-        try!(self.help(arg, &*spec_vals));
+        self.short(arg)?;
+        self.long(arg)?;
+        let spec_vals = self.val(arg)?;
+        self.help(arg, &*spec_vals)?;
         Ok(())
     }
 
     /// Writes argument's short command to the wrapped stream.
     fn short<'b, 'c>(&mut self, arg: &ArgWithDisplay<'b, 'c>) -> io::Result<()> {
         debugln!("Help::short;");
-        try!(write!(self.writer, "{}", TAB));
+        write!(self.writer, "{}", TAB)?;
         if let Some(s) = arg.short() {
             color!(self, "-{}", s, good)
         } else if arg.has_switch() {
             write!(self.writer, "{}", TAB)
         } else {
             Ok(())
         }
     }
@@ -268,92 +287,99 @@ impl<'a> Help<'a> {
     fn long<'b, 'c>(&mut self, arg: &ArgWithDisplay<'b, 'c>) -> io::Result<()> {
         debugln!("Help::long;");
         if !arg.has_switch() {
             return Ok(());
         }
         if arg.takes_value() {
             if let Some(l) = arg.long() {
                 if arg.short().is_some() {
-                    try!(write!(self.writer, ", "));
+                    write!(self.writer, ", ")?;
                 }
-                try!(color!(self, "--{}", l, good))
+                color!(self, "--{}", l, good)?
             }
 
             let sep = if arg.is_set(ArgSettings::RequireEquals) {
                 "="
             } else {
                 " "
             };
-            try!(write!(self.writer, "{}", sep));
+            write!(self.writer, "{}", sep)?;
         } else if let Some(l) = arg.long() {
             if arg.short().is_some() {
-                try!(write!(self.writer, ", "));
+                write!(self.writer, ", ")?;
             }
-            try!(color!(self, "--{}", l, good));
+            color!(self, "--{}", l, good)?;
         }
         Ok(())
     }
 
     /// Writes argument's possible values to the wrapped stream.
     fn val<'b, 'c>(&mut self, arg: &ArgWithDisplay<'b, 'c>) -> Result<String, io::Error> {
         debugln!("Help::val: arg={}", arg);
         if arg.takes_value() {
+            let delim = if arg.is_set(ArgSettings::RequireDelimiter) {
+                arg.val_delim().expect(INTERNAL_ERROR_MSG)
+            } else {
+                ' '
+            };
             if let Some(vec) = arg.val_names() {
                 let mut it = vec.iter().peekable();
                 while let Some((_, val)) = it.next() {
-                    try!(color!(self, "<{}>", val, good));
+                    color!(self, "<{}>", val, good)?;
                     if it.peek().is_some() {
-                        try!(write!(self.writer, " "));
+                        write!(self.writer, "{}", delim)?;
                     }
                 }
                 let num = vec.len();
                 if arg.is_set(ArgSettings::Multiple) && num == 1 {
-                    try!(color!(self, "...", good));
+                    color!(self, "...", good)?;
                 }
             } else if let Some(num) = arg.num_vals() {
                 let mut it = (0..num).peekable();
                 while let Some(_) = it.next() {
-                    try!(color!(self, "<{}>", arg.name(), good));
+                    color!(self, "<{}>", arg.name(), good)?;
                     if it.peek().is_some() {
-                        try!(write!(self.writer, " "));
+                        write!(self.writer, "{}", delim)?;
                     }
                 }
                 if arg.is_set(ArgSettings::Multiple) && num == 1 {
-                    try!(color!(self, "...", good));
+                    color!(self, "...", good)?;
                 }
             } else if arg.has_switch() {
-                try!(color!(self, "<{}>", arg.name(), good));
+                color!(self, "<{}>", arg.name(), good)?;
                 if arg.is_set(ArgSettings::Multiple) {
-                    try!(color!(self, "...", good));
+                    color!(self, "...", good)?;
                 }
             } else {
-                try!(color!(self, "{}", arg, good));
+                color!(self, "{}", arg, good)?;
             }
         }
 
         let spec_vals = self.spec_vals(arg);
         let h = arg.help().unwrap_or("");
         let h_w = str_width(h) + str_width(&*spec_vals);
         let nlh = self.next_line_help || arg.is_set(ArgSettings::NextLineHelp);
         let taken = self.longest + 12;
-        self.force_next_line = !nlh && self.term_w >= taken &&
-                               (taken as f32 / self.term_w as f32) > 0.40 &&
-                               h_w > (self.term_w - taken);
+        self.force_next_line = !nlh && self.term_w >= taken
+            && (taken as f32 / self.term_w as f32) > 0.40
+            && h_w > (self.term_w - taken);
 
         debug!("Help::val: Has switch...");
         if arg.has_switch() {
             sdebugln!("Yes");
             debugln!("Help::val: force_next_line...{:?}", self.force_next_line);
             debugln!("Help::val: nlh...{:?}", nlh);
             debugln!("Help::val: taken...{}", taken);
-            debugln!("Help::val: help_width > (width - taken)...{} > ({} - {})",
-                     h_w,
-                     self.term_w,
-                     taken);
+            debugln!(
+                "Help::val: help_width > (width - taken)...{} > ({} - {})",
+                h_w,
+                self.term_w,
+                taken
+            );
             debugln!("Help::val: longest...{}", self.longest);
             debug!("Help::val: next_line...");
             if !(nlh || self.force_next_line) {
                 sdebugln!("No");
                 let self_len = str_width(arg.to_string().as_str());
                 // subtract ourself
                 let mut spcs = self.longest - self_len;
                 // Since we're writing spaces from the tab point we first need to know if we
@@ -367,45 +393,54 @@ impl<'a> Help<'a> {
                 }
 
                 write_nspaces!(self.writer, spcs);
             } else {
                 sdebugln!("Yes");
             }
         } else if !(nlh || self.force_next_line) {
             sdebugln!("No, and not next_line");
-            write_nspaces!(self.writer, self.longest + 4 - (str_width(arg.to_string().as_str())));
+            write_nspaces!(
+                self.writer,
+                self.longest + 4 - (str_width(arg.to_string().as_str()))
+            );
         } else {
             sdebugln!("No");
         }
         Ok(spec_vals)
     }
 
     fn write_before_after_help(&mut self, h: &str) -> io::Result<()> {
         debugln!("Help::write_before_after_help;");
         let mut help = String::from(h);
         // determine if our help fits or needs to wrap
-        debugln!("Help::write_before_after_help: Term width...{}",
-                 self.term_w);
+        debugln!(
+            "Help::write_before_after_help: Term width...{}",
+            self.term_w
+        );
         let too_long = str_width(h) >= self.term_w;
 
         debug!("Help::write_before_after_help: Too long...");
         if too_long || h.contains("{n}") {
             sdebugln!("Yes");
             debugln!("Help::write_before_after_help: help: {}", help);
-            debugln!("Help::write_before_after_help: help width: {}",
-                     str_width(&*help));
+            debugln!(
+                "Help::write_before_after_help: help width: {}",
+                str_width(&*help)
+            );
             // Determine how many newlines we need to insert
-            debugln!("Help::write_before_after_help: Usable space: {}",
-                     self.term_w);
+            debugln!(
+                "Help::write_before_after_help: Usable space: {}",
+                self.term_w
+            );
             help = wrap_help(&help.replace("{n}", "\n"), self.term_w);
         } else {
             sdebugln!("No");
         }
-        try!(write!(self.writer, "{}", help));
+        write!(self.writer, "{}", help)?;
         Ok(())
     }
 
     /// Writes argument's help to the wrapped stream.
     fn help<'b, 'c>(&mut self, arg: &ArgWithDisplay<'b, 'c>, spec_vals: &str) -> io::Result<()> {
         debugln!("Help::help;");
         let h = if self.use_long {
             arg.long_help().unwrap_or_else(|| arg.help().unwrap_or(""))
@@ -421,90 +456,108 @@ impl<'a> Help<'a> {
         } else {
             self.longest + 12
         };
 
         let too_long = spcs + str_width(h) + str_width(&*spec_vals) >= self.term_w;
 
         // Is help on next line, if so then indent
         if nlh || self.force_next_line {
-            try!(write!(self.writer, "\n{}{}{}", TAB, TAB, TAB));
+            write!(self.writer, "\n{}{}{}", TAB, TAB, TAB)?;
         }
 
         debug!("Help::help: Too long...");
         if too_long && spcs <= self.term_w || h.contains("{n}") {
             sdebugln!("Yes");
             debugln!("Help::help: help...{}", help);
             debugln!("Help::help: help width...{}", str_width(&*help));
             // Determine how many newlines we need to insert
             let avail_chars = self.term_w - spcs;
             debugln!("Help::help: Usable space...{}", avail_chars);
             help = wrap_help(&help.replace("{n}", "\n"), avail_chars);
         } else {
             sdebugln!("No");
         }
         if let Some(part) = help.lines().next() {
-            try!(write!(self.writer, "{}", part));
+            write!(self.writer, "{}", part)?;
         }
         for part in help.lines().skip(1) {
-            try!(write!(self.writer, "\n"));
+            write!(self.writer, "\n")?;
             if nlh || self.force_next_line {
-                try!(write!(self.writer, "{}{}{}", TAB, TAB, TAB));
+                write!(self.writer, "{}{}{}", TAB, TAB, TAB)?;
             } else if arg.has_switch() {
                 write_nspaces!(self.writer, self.longest + 12);
             } else {
                 write_nspaces!(self.writer, self.longest + 8);
             }
-            try!(write!(self.writer, "{}", part));
+            write!(self.writer, "{}", part)?;
         }
         if !help.contains('\n') && (nlh || self.force_next_line) {
-            try!(write!(self.writer, "\n"));
+            write!(self.writer, "\n")?;
         }
         Ok(())
     }
 
     fn spec_vals(&self, a: &ArgWithDisplay) -> String {
         debugln!("Help::spec_vals: a={}", a);
         let mut spec_vals = vec![];
+        if let Some(ref env) = a.env() {
+            debugln!(
+                "Help::spec_vals: Found environment variable...[{:?}:{:?}]",
+                env.0,
+                env.1
+            );
+            spec_vals.push(format!(
+                " [env:{}: {}]",
+                env.0.to_string_lossy(),
+                env.1.map_or(Cow::Borrowed(""), |val| val.to_string_lossy())
+            ));
+        }
         if !a.is_set(ArgSettings::HideDefaultValue) {
             if let Some(pv) = a.default_val() {
                 debugln!("Help::spec_vals: Found default value...[{:?}]", pv);
-                spec_vals.push(format!(" [default: {}]",
-                                       if self.color {
-                                           self.cizer.good(pv.to_string_lossy())
-                                       } else {
-                                           Format::None(pv.to_string_lossy())
-                                       }));
+                spec_vals.push(format!(
+                    " [default: {}]",
+                    if self.color {
+                        self.cizer.good(pv.to_string_lossy())
+                    } else {
+                        Format::None(pv.to_string_lossy())
+                    }
+                ));
             }
         }
         if let Some(ref aliases) = a.aliases() {
             debugln!("Help::spec_vals: Found aliases...{:?}", aliases);
-            spec_vals.push(format!(" [aliases: {}]",
-                                   if self.color {
-                                       aliases
-                                           .iter()
-                                           .map(|v| format!("{}", self.cizer.good(v)))
-                                           .collect::<Vec<_>>()
-                                           .join(", ")
-                                   } else {
-                                       aliases.join(", ")
-                                   }));
+            spec_vals.push(format!(
+                " [aliases: {}]",
+                if self.color {
+                    aliases
+                        .iter()
+                        .map(|v| format!("{}", self.cizer.good(v)))
+                        .collect::<Vec<_>>()
+                        .join(", ")
+                } else {
+                    aliases.join(", ")
+                }
+            ));
         }
         if !self.hide_pv && !a.is_set(ArgSettings::HidePossibleValues) {
             if let Some(pv) = a.possible_vals() {
                 debugln!("Help::spec_vals: Found possible vals...{:?}", pv);
                 spec_vals.push(if self.color {
-                                   format!(" [values: {}]",
-                                           pv.iter()
-                                               .map(|v| format!("{}", self.cizer.good(v)))
-                                               .collect::<Vec<_>>()
-                                               .join(", "))
-                               } else {
-                                   format!(" [values: {}]", pv.join(", "))
-                               });
+                    format!(
+                        " [values: {}]",
+                        pv.iter()
+                            .map(|v| format!("{}", self.cizer.good(v)))
+                            .collect::<Vec<_>>()
+                            .join(", ")
+                    )
+                } else {
+                    format!(" [values: {}]", pv.join(", "))
+                });
             }
         }
         spec_vals.join(" ")
     }
 }
 
 
 // Methods to write Parser help.
@@ -516,176 +569,189 @@ impl<'a> Help<'a> {
     pub fn write_all_args(&mut self, parser: &Parser) -> ClapResult<()> {
         debugln!("Help::write_all_args;");
         let flags = parser.has_flags();
         let pos = parser
             .positionals()
             .filter(|arg| !arg.is_set(ArgSettings::Hidden))
             .count() > 0;
         let opts = parser.has_opts();
-        let subcmds = parser.has_subcommands();
+        let subcmds = parser.has_visible_subcommands();
 
         let unified_help = parser.is_set(AppSettings::UnifiedHelpMessage);
 
         let mut first = true;
 
         if unified_help && (flags || opts) {
             let opts_flags = parser
                 .flags()
                 .map(as_arg_trait)
                 .chain(parser.opts().map(as_arg_trait));
-            try!(color!(self, "OPTIONS:\n", warning));
-            try!(self.write_args(opts_flags));
+            color!(self, "OPTIONS:\n", warning)?;
+            self.write_args(opts_flags)?;
             first = false;
         } else {
             if flags {
-                try!(color!(self, "FLAGS:\n", warning));
-                try!(self.write_args(parser.flags().map(as_arg_trait)));
+                color!(self, "FLAGS:\n", warning)?;
+                self.write_args(parser.flags().map(as_arg_trait))?;
                 first = false;
             }
             if opts {
                 if !first {
-                    try!(self.writer.write_all(b"\n\n"));
+                    self.writer.write_all(b"\n\n")?;
                 }
-                try!(color!(self, "OPTIONS:\n", warning));
-                try!(self.write_args(parser.opts().map(as_arg_trait)));
+                color!(self, "OPTIONS:\n", warning)?;
+                self.write_args(parser.opts().map(as_arg_trait))?;
                 first = false;
             }
         }
 
         if pos {
             if !first {
-                try!(self.writer.write_all(b"\n\n"));
+                self.writer.write_all(b"\n\n")?;
             }
-            try!(color!(self, "ARGS:\n", warning));
-            try!(self.write_args_unsorted(parser.positionals().map(as_arg_trait)));
+            color!(self, "ARGS:\n", warning)?;
+            self.write_args_unsorted(parser.positionals().map(as_arg_trait))?;
             first = false;
         }
 
         if subcmds {
             if !first {
-                try!(self.writer.write_all(b"\n\n"));
+                self.writer.write_all(b"\n\n")?;
             }
-            try!(color!(self, "SUBCOMMANDS:\n", warning));
-            try!(self.write_subcommands(parser));
+            color!(self, "SUBCOMMANDS:\n", warning)?;
+            self.write_subcommands(parser)?;
         }
 
         Ok(())
     }
 
     /// Writes help for subcommands of a Parser Object to the wrapped stream.
     fn write_subcommands(&mut self, parser: &Parser) -> io::Result<()> {
         debugln!("Help::write_subcommands;");
         // The shortest an arg can legally be is 2 (i.e. '-x')
         self.longest = 2;
         let mut ord_m = VecMap::new();
         for sc in parser
-                .subcommands
-                .iter()
-                .filter(|s| !s.p.is_set(AppSettings::Hidden)) {
-            let btm = ord_m
-                .entry(sc.p.meta.disp_ord)
-                .or_insert(BTreeMap::new());
+            .subcommands
+            .iter()
+            .filter(|s| !s.p.is_set(AppSettings::Hidden))
+        {
+            let btm = ord_m.entry(sc.p.meta.disp_ord).or_insert(BTreeMap::new());
             self.longest = cmp::max(self.longest, str_width(sc.p.meta.name.as_str()));
             //self.longest = cmp::max(self.longest, sc.p.meta.name.len());
             btm.insert(sc.p.meta.name.clone(), sc.clone());
         }
 
         let mut first = true;
         for btm in ord_m.values() {
             for sc in btm.values() {
                 if first {
                     first = false;
                 } else {
-                    try!(self.writer.write_all(b"\n"));
+                    self.writer.write_all(b"\n")?;
                 }
-                try!(self.write_arg(sc));
+                self.write_arg(sc)?;
             }
         }
         Ok(())
     }
 
     /// Writes version of a Parser Object to the wrapped stream.
     fn write_version(&mut self, parser: &Parser) -> io::Result<()> {
         debugln!("Help::write_version;");
-        try!(write!(self.writer, "{}", parser.meta.version.unwrap_or("")));
+        write!(self.writer, "{}", parser.meta.version.unwrap_or(""))?;
         Ok(())
     }
 
     /// Writes binary name of a Parser Object to the wrapped stream.
     fn write_bin_name(&mut self, parser: &Parser) -> io::Result<()> {
         debugln!("Help::write_bin_name;");
         macro_rules! write_name {
             () => {{
                 let mut name = parser.meta.name.clone();
                 name = name.replace("{n}", "\n");
-                try!(color!(self, wrap_help(&name, self.term_w), good));
+                color!(self, wrap_help(&name, self.term_w), good)?;
             }};
         }
         if let Some(bn) = parser.meta.bin_name.as_ref() {
             if bn.contains(' ') {
                 // Incase we're dealing with subcommands i.e. git mv is translated to git-mv
-                try!(color!(self, bn.replace(" ", "-"), good))
+                color!(self, bn.replace(" ", "-"), good)?
             } else {
                 write_name!();
             }
         } else {
             write_name!();
         }
         Ok(())
     }
 
     /// Writes default help for a Parser Object to the wrapped stream.
     pub fn write_default_help(&mut self, parser: &Parser) -> ClapResult<()> {
         debugln!("Help::write_default_help;");
         if let Some(h) = parser.meta.pre_help {
-            try!(self.write_before_after_help(h));
-            try!(self.writer.write_all(b"\n\n"));
+            self.write_before_after_help(h)?;
+            self.writer.write_all(b"\n\n")?;
         }
 
         macro_rules! write_thing {
             ($thing:expr) => {{
                 let mut owned_thing = $thing.to_owned();
                 owned_thing = owned_thing.replace("{n}", "\n");
-                try!(write!(self.writer, "{}\n",
-                            wrap_help(&owned_thing, self.term_w)))
+                write!(self.writer, "{}\n",
+                            wrap_help(&owned_thing, self.term_w))?
             }};
         }
         // Print the version
-        try!(self.write_bin_name(parser));
-        try!(self.writer.write_all(b" "));
-        try!(self.write_version(parser));
-        try!(self.writer.write_all(b"\n"));
+        self.write_bin_name(parser)?;
+        self.writer.write_all(b" ")?;
+        self.write_version(parser)?;
+        self.writer.write_all(b"\n")?;
         if let Some(author) = parser.meta.author {
             write_thing!(author)
         }
-        if let Some(about) = parser.meta.about {
+        if self.use_long {
+            if let Some(about) = parser.meta.long_about {
+                debugln!("Help::write_default_help: writing long about");
+                write_thing!(about)
+            } else if let Some(about) = parser.meta.about {
+                debugln!("Help::write_default_help: writing about");
+                write_thing!(about)
+            }
+        } else if let Some(about) = parser.meta.about {
+            debugln!("Help::write_default_help: writing about");
+            write_thing!(about)
+        } else if let Some(about) = parser.meta.long_about {
+            debugln!("Help::write_default_help: writing long about");
             write_thing!(about)
         }
 
-        try!(color!(self, "\nUSAGE:", warning));
-        try!(write!(self.writer,
-                    "\n{}{}\n\n",
-                    TAB,
-                    usage::create_usage_no_title(parser, &[])));
+        color!(self, "\nUSAGE:", warning)?;
+        write!(
+            self.writer,
+            "\n{}{}\n\n",
+            TAB,
+            usage::create_usage_no_title(parser, &[])
+        )?;
 
         let flags = parser.has_flags();
         let pos = parser.has_positionals();
         let opts = parser.has_opts();
         let subcmds = parser.has_subcommands();
 
         if flags || opts || pos || subcmds {
-            try!(self.write_all_args(parser));
+            self.write_all_args(parser)?;
         }
 
         if let Some(h) = parser.meta.more_help {
             if flags || opts || pos || subcmds {
-                try!(self.writer.write_all(b"\n\n"));
+                self.writer.write_all(b"\n\n")?;
             }
-            try!(self.write_before_after_help(h));
+            self.write_before_after_help(h)?;
         }
 
         self.writer.flush().map_err(Error::from)
     }
 }
 
 /// Possible results for a copying function that stops when a given
 /// byte was found.
@@ -726,69 +792,62 @@ fn copy_until<R: Read, W: Write>(r: &mut
 }
 
 /// Copies the contents of a reader into a writer until a {tag} is found,
 /// copying the tag content to a buffer and returning its size.
 /// In addition to errors, there are three possible outputs:
 ///   - `None`: The reader was consumed.
 ///   - `Some(Ok(0))`: No tag was captured but the reader still contains data.
 ///   - `Some(Ok(length>0))`: a tag with `length` was captured to the `tag_buffer`.
-fn copy_and_capture<R: Read, W: Write>(r: &mut R,
-                                       w: &mut W,
-                                       tag_buffer: &mut Cursor<Vec<u8>>)
-                                       -> Option<io::Result<usize>> {
+fn copy_and_capture<R: Read, W: Write>(
+    r: &mut R,
+    w: &mut W,
+    tag_buffer: &mut Cursor<Vec<u8>>,
+) -> Option<io::Result<usize>> {
     use self::CopyUntilResult::*;
     debugln!("copy_and_capture;");
 
     // Find the opening byte.
     match copy_until(r, w, b'{') {
-
         // The end of the reader was reached without finding the opening tag.
         // (either with or without having copied data to the writer)
         // Return None indicating that we are done.
-        ReaderEmpty |
-        DelimiterNotFound(_) => None,
+        ReaderEmpty | DelimiterNotFound(_) => None,
 
         // Something went wrong.
         ReadError(e) | WriteError(e) => Some(Err(e)),
 
         // The opening byte was found.
         // (either with or without having copied data to the writer)
         DelimiterFound(_) => {
-
             // Lets reset the buffer first and find out how long it is.
             tag_buffer.set_position(0);
             let buffer_size = tag_buffer.get_ref().len();
 
             // Find the closing byte,limiting the reader to the length of the buffer.
             let mut rb = r.take(buffer_size as u64);
             match copy_until(&mut rb, tag_buffer, b'}') {
-
                 // We were already at the end of the reader.
                 // Return None indicating that we are done.
                 ReaderEmpty => None,
 
                 // The closing tag was found.
                 // Return the tag_length.
                 DelimiterFound(tag_length) => Some(Ok(tag_length)),
 
                 // The end of the reader was found without finding the closing tag.
                 // Write the opening byte and captured text to the writer.
                 // Return 0 indicating that nothing was caputred but the reader still contains data.
-                DelimiterNotFound(not_tag_length) => {
-                    match w.write(b"{") {
+                DelimiterNotFound(not_tag_length) => match w.write(b"{") {
+                    Err(e) => Some(Err(e)),
+                    _ => match w.write(&tag_buffer.get_ref()[0..not_tag_length]) {
                         Err(e) => Some(Err(e)),
-                        _ => {
-                            match w.write(&tag_buffer.get_ref()[0..not_tag_length]) {
-                                Err(e) => Some(Err(e)),
-                                _ => Some(Ok(0)),
-                            }
-                        }
-                    }
-                }
+                        _ => Some(Ok(0)),
+                    },
+                },
 
                 ReadError(e) | WriteError(e) => Some(Err(e)),
             }
         }
     }
 }
 
 
@@ -829,83 +888,102 @@ impl<'a> Help<'a> {
             let tag_length = match copy_and_capture(&mut tmplr, &mut self.writer, &mut tag_buf) {
                 None => return Ok(()),
                 Some(Err(e)) => return Err(Error::from(e)),
                 Some(Ok(val)) if val > 0 => val,
                 _ => continue,
             };
 
             debugln!("Help::write_template_help:iter: tag_buf={};", unsafe {
-                String::from_utf8_unchecked(tag_buf.get_ref()[0..tag_length]
-                                                .iter()
-                                                .map(|&i| i)
-                                                .collect::<Vec<_>>())
+                String::from_utf8_unchecked(
+                    tag_buf.get_ref()[0..tag_length]
+                        .iter()
+                        .map(|&i| i)
+                        .collect::<Vec<_>>(),
+                )
             });
             match &tag_buf.get_ref()[0..tag_length] {
                 b"?" => {
-                    try!(self.writer.write_all(b"Could not decode tag name"));
+                    self.writer.write_all(b"Could not decode tag name")?;
                 }
                 b"bin" => {
-                    try!(self.write_bin_name(parser));
+                    self.write_bin_name(parser)?;
                 }
                 b"version" => {
-                    try!(write!(self.writer,
-                                "{}",
-                                parser.meta.version.unwrap_or("unknown version")));
+                    write!(
+                        self.writer,
+                        "{}",
+                        parser.meta.version.unwrap_or("unknown version")
+                    )?;
                 }
                 b"author" => {
-                    try!(write!(self.writer,
-                                "{}",
-                                parser.meta.author.unwrap_or("unknown author")));
+                    write!(
+                        self.writer,
+                        "{}",
+                        parser.meta.author.unwrap_or("unknown author")
+                    )?;
                 }
                 b"about" => {
-                    try!(write!(self.writer,
-                                "{}",
-                                parser.meta.about.unwrap_or("unknown about")));
+                    write!(
+                        self.writer,
+                        "{}",
+                        parser.meta.about.unwrap_or("unknown about")
+                    )?;
+                }
+                b"long-about" => {
+                    write!(
+                        self.writer,
+                        "{}",
+                        parser.meta.long_about.unwrap_or("unknown about")
+                    )?;
                 }
                 b"usage" => {
-                    try!(write!(self.writer, "{}", usage::create_usage_no_title(parser, &[])));
+                    write!(self.writer, "{}", usage::create_usage_no_title(parser, &[]))?;
                 }
                 b"all-args" => {
-                    try!(self.write_all_args(parser));
+                    self.write_all_args(parser)?;
                 }
                 b"unified" => {
                     let opts_flags = parser
                         .flags()
                         .map(as_arg_trait)
                         .chain(parser.opts().map(as_arg_trait));
-                    try!(self.write_args(opts_flags));
+                    self.write_args(opts_flags)?;
                 }
                 b"flags" => {
-                    try!(self.write_args(parser.flags().map(as_arg_trait)));
+                    self.write_args(parser.flags().map(as_arg_trait))?;
                 }
                 b"options" => {
-                    try!(self.write_args(parser.opts().map(as_arg_trait)));
+                    self.write_args(parser.opts().map(as_arg_trait))?;
                 }
                 b"positionals" => {
-                    try!(self.write_args(parser.positionals().map(as_arg_trait)));
+                    self.write_args(parser.positionals().map(as_arg_trait))?;
                 }
                 b"subcommands" => {
-                    try!(self.write_subcommands(parser));
+                    self.write_subcommands(parser)?;
                 }
                 b"after-help" => {
-                    try!(write!(self.writer,
-                                "{}",
-                                parser.meta.more_help.unwrap_or("unknown after-help")));
+                    write!(
+                        self.writer,
+                        "{}",
+                        parser.meta.more_help.unwrap_or("unknown after-help")
+                    )?;
                 }
                 b"before-help" => {
-                    try!(write!(self.writer,
-                                "{}",
-                                parser.meta.pre_help.unwrap_or("unknown before-help")));
+                    write!(
+                        self.writer,
+                        "{}",
+                        parser.meta.pre_help.unwrap_or("unknown before-help")
+                    )?;
                 }
                 // Unknown tag, write it back.
                 r => {
-                    try!(self.writer.write_all(b"{"));
-                    try!(self.writer.write_all(r));
-                    try!(self.writer.write_all(b"}"));
+                    self.writer.write_all(b"{")?;
+                    self.writer.write_all(r)?;
+                    self.writer.write_all(b"}")?;
                 }
             }
         }
     }
 }
 
 fn wrap_help(help: &str, avail_chars: usize) -> String {
     let wrapper = textwrap::Wrapper::new(avail_chars).break_words(false);
--- a/third_party/rust/clap/src/app/macros.rs
+++ b/third_party/rust/clap/src/app/macros.rs
@@ -141,17 +141,17 @@ macro_rules! parse_positional {
     ) => {
         debugln!("parse_positional!;");
 
         if !$_self.is_set(AS::TrailingValues) &&
            ($_self.is_set(AS::TrailingVarArg) &&
             $pos_counter == $_self.positionals.len()) {
             $_self.settings.set(AS::TrailingValues);
         }
-        let _ = try!($_self.add_val_to_arg($p, &$arg_os, $matcher));
+        let _ = $_self.add_val_to_arg($p, &$arg_os, $matcher)?;
 
         $matcher.inc_occurrence_of($p.b.name);
         let _ = $_self.groups_for_arg($p.b.name)
                       .and_then(|vec| Some($matcher.inc_occurrences_of(&*vec)));
         if $_self.cache.map_or(true, |name| name != $p.b.name) {
             arg_post_processing!($_self, $p, $matcher);
             $_self.cache = Some($p.b.name);
         }
--- a/third_party/rust/clap/src/app/mod.rs
+++ b/third_party/rust/clap/src/app/mod.rs
@@ -13,27 +13,27 @@ use std::ffi::{OsStr, OsString};
 use std::fmt;
 use std::io::{self, BufRead, BufWriter, Write};
 use std::path::Path;
 use std::process;
 use std::rc::Rc;
 use std::result::Result as StdResult;
 
 // Third Party
-use vec_map::{self, VecMap};
 #[cfg(feature = "yaml")]
 use yaml_rust::Yaml;
 
 // Internal
 use app::help::Help;
 use app::parser::Parser;
 use args::{AnyArg, Arg, ArgGroup, ArgMatcher, ArgMatches, ArgSettings};
 use errors::Result as ClapResult;
 pub use self::settings::AppSettings;
 use completions::Shell;
+use map::{self, VecMap};
 
 /// Used to create a representation of a command line program and all possible command line
 /// arguments. Application settings are set using the "builder pattern" with the
 /// [`App::get_matches`] family of methods being the terminal methods that starts the
 /// runtime-parsing process. These methods then return information about the user supplied
 /// arguments (or lack there of).
 ///
 /// **NOTE:** There aren't any mandatory "options" that one must set. The "options" may
@@ -305,17 +305,17 @@ impl<'a, 'b> App<'a, 'b> {
     /// # ;
     /// ```
     pub fn before_help<S: Into<&'b str>>(mut self, help: S) -> Self {
         self.p.meta.pre_help = Some(help.into());
         self
     }
 
     /// Sets a string of the version number to be displayed when displaying version or help
-    /// information with `-V`. 
+    /// information with `-V`.
     ///
     /// **NOTE:** If only `version` is provided, and not [`App::long_version`] but the user
     /// requests `--version` clap will still display the contents of `version` appropriately
     ///
     /// **Pro-tip:** Use `clap`s convenience macro [`crate_version!`] to automatically set your
     /// application's version to the same thing as your crate at compile time. See the [`examples/`]
     /// directory for more information
     ///
@@ -532,18 +532,18 @@ impl<'a, 'b> App<'a, 'b> {
     ///
     ///   * `{bin}`         - Binary name.
     ///   * `{version}`     - Version number.
     ///   * `{author}`      - Author information.
     ///   * `{about}`       - General description (from [`App::about`])
     ///   * `{usage}`       - Automatically generated or given usage string.
     ///   * `{all-args}`    - Help for all arguments (options, flags, positionals arguments,
     ///                       and subcommands) including titles.
-    ///   * `{unified}`     - Unified help for options and flags. Note, you must *also* set 
-    ///                       [`AppSettings::UnifiedHelpMessage`] to fully merge both options and 
+    ///   * `{unified}`     - Unified help for options and flags. Note, you must *also* set
+    ///                       [`AppSettings::UnifiedHelpMessage`] to fully merge both options and
     ///                       flags, otherwise the ordering is "best effort"
     ///   * `{flags}`       - Help for flags.
     ///   * `{options}`     - Help for options.
     ///   * `{positionals}` - Help for positionals arguments.
     ///   * `{subcommands}` - Help for subcommands.
     ///   * `{after-help}`  - Help from [`App::after_help`]
     ///   * `{before-help}`  - Help from [`App::before_help`]
     ///
@@ -604,21 +604,21 @@ impl<'a, 'b> App<'a, 'b> {
     /// [`AppSettings`]: ./enum.AppSettings.html
     pub fn settings(mut self, settings: &[AppSettings]) -> Self {
         for s in settings {
             self.p.set(*s);
         }
         self
     }
 
-    /// Enables a single setting that is propogated *down* through all child [`SubCommand`]s.
+    /// Enables a single setting that is propagated down through all child [`SubCommand`]s.
     ///
     /// See [`AppSettings`] for a full list of possibilities and examples.
     ///
-    /// **NOTE**: The setting is *only* propogated *down* and not up through parent commands.
+    /// **NOTE**: The setting is *only* propagated *down* and not up through parent commands.
     ///
     /// # Examples
     ///
     /// ```no_run
     /// # use clap::{App, Arg, AppSettings};
     /// App::new("myprog")
     ///     .global_setting(AppSettings::SubcommandRequired)
     /// # ;
@@ -626,21 +626,21 @@ impl<'a, 'b> App<'a, 'b> {
     /// [`SubCommand`]: ./struct.SubCommand.html
     /// [`AppSettings`]: ./enum.AppSettings.html
     pub fn global_setting(mut self, setting: AppSettings) -> Self {
         self.p.set(setting);
         self.p.g_settings.set(setting);
         self
     }
 
-    /// Enables multiple settings which are propogated *down* through all child [`SubCommand`]s.
+    /// Enables multiple settings which are propagated *down* through all child [`SubCommand`]s.
     ///
     /// See [`AppSettings`] for a full list of possibilities and examples.
     ///
-    /// **NOTE**: The setting is *only* propogated *down* and not up through parent commands.
+    /// **NOTE**: The setting is *only* propagated *down* and not up through parent commands.
     ///
     /// # Examples
     ///
     /// ```no_run
     /// # use clap::{App, Arg, AppSettings};
     /// App::new("myprog")
     ///     .global_settings(&[AppSettings::SubcommandRequired,
     ///                  AppSettings::ColoredHelp])
@@ -1148,28 +1148,28 @@ impl<'a, 'b> App<'a, 'b> {
     /// ```
     /// [`io::stdout()`]: https://doc.rust-lang.org/std/io/fn.stdout.html
     /// [`BufWriter`]: https://doc.rust-lang.org/std/io/struct.BufWriter.html
     /// [`-h` (short)]: ./struct.Arg.html#method.help
     /// [`--help` (long)]: ./struct.Arg.html#method.long_help
     pub fn print_help(&mut self) -> ClapResult<()> {
         // If there are global arguments, or settings we need to propgate them down to subcommands
         // before parsing incase we run into a subcommand
-        self.p.propogate_globals();
-        self.p.propogate_settings();
+        self.p.propagate_globals();
+        self.p.propagate_settings();
         self.p.derive_display_order();
 
         self.p.create_help_and_version();
         let out = io::stdout();
         let mut buf_w = BufWriter::new(out.lock());
         self.write_help(&mut buf_w)
     }
 
     /// Prints the full help message to [`io::stdout()`] using a [`BufWriter`] using the same
-    /// method as if someone ran `-h` to request the help message
+    /// method as if someone ran `--help` to request the help message
     ///
     /// **NOTE:** clap has the ability to distinguish between "short" and "long" help messages
     /// depending on if the user ran [`-h` (short)] or [`--help` (long)]
     ///
     /// # Examples
     ///
     /// ```rust
     /// # use clap::App;
@@ -1178,33 +1178,33 @@ impl<'a, 'b> App<'a, 'b> {
     /// ```
     /// [`io::stdout()`]: https://doc.rust-lang.org/std/io/fn.stdout.html
     /// [`BufWriter`]: https://doc.rust-lang.org/std/io/struct.BufWriter.html
     /// [`-h` (short)]: ./struct.Arg.html#method.help
     /// [`--help` (long)]: ./struct.Arg.html#method.long_help
     pub fn print_long_help(&mut self) -> ClapResult<()> {
         // If there are global arguments, or settings we need to propgate them down to subcommands
         // before parsing incase we run into a subcommand
-        self.p.propogate_globals();
-        self.p.propogate_settings();
+        self.p.propagate_globals();
+        self.p.propagate_settings();
         self.p.derive_display_order();
 
         self.p.create_help_and_version();
         let out = io::stdout();
         let mut buf_w = BufWriter::new(out.lock());
         self.write_long_help(&mut buf_w)
     }
 
     /// Writes the full help message to the user to a [`io::Write`] object in the same method as if
     /// the user ran `-h`
     ///
     /// **NOTE:** clap has the ability to distinguish between "short" and "long" help messages
     /// depending on if the user ran [`-h` (short)] or [`--help` (long)]
     ///
-    /// **NOTE:** There is a known bug where this method does not write propogated global arguments
+    /// **NOTE:** There is a known bug where this method does not write propagated global arguments
     /// or autogenerated arguments (i.e. the default help/version args). Prefer
     /// [`App::write_long_help`] instead if possibe!
     ///
     /// # Examples
     ///
     /// ```rust
     /// # use clap::App;
     /// use std::io;
@@ -1215,18 +1215,18 @@ impl<'a, 'b> App<'a, 'b> {
     /// [`io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
     /// [`-h` (short)]: ./struct.Arg.html#method.help
     /// [`--help` (long)]: ./struct.Arg.html#method.long_help
     pub fn write_help<W: Write>(&self, w: &mut W) -> ClapResult<()> {
         // PENDING ISSUE: 808
         //      https://github.com/kbknapp/clap-rs/issues/808
         // If there are global arguments, or settings we need to propgate them down to subcommands
         // before parsing incase we run into a subcommand
-        // self.p.propogate_globals();
-        // self.p.propogate_settings();
+        // self.p.propagate_globals();
+        // self.p.propagate_settings();
         // self.p.derive_display_order();
         // self.p.create_help_and_version();
 
         Help::write_app_help(w, self, false)
     }
 
     /// Writes the full help message to the user to a [`io::Write`] object in the same method as if
     /// the user ran `--help`
@@ -1242,18 +1242,18 @@ impl<'a, 'b> App<'a, 'b> {
     /// let mut app = App::new("myprog");
     /// let mut out = io::stdout();
     /// app.write_long_help(&mut out).expect("failed to write to stdout");
     /// ```
     /// [`io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
     /// [`-h` (short)]: ./struct.Arg.html#method.help
     /// [`--help` (long)]: ./struct.Arg.html#method.long_help
     pub fn write_long_help<W: Write>(&mut self, w: &mut W) -> ClapResult<()> {
-        self.p.propogate_globals();
-        self.p.propogate_settings();
+        self.p.propagate_globals();
+        self.p.propagate_settings();
         self.p.derive_display_order();
         self.p.create_help_and_version();
 
         Help::write_app_help(w, self, true)
     }
 
     /// Writes the version message to the user to a [`io::Write`] object as if the user ran `-V`.
     ///
@@ -1581,19 +1581,22 @@ impl<'a, 'b> App<'a, 'b> {
     /// [`App::get_matches_from_safe`]: ./struct.App.html#method.get_matches_from_safe
     /// [`AppSettings::NoBinaryName`]: ./enum.AppSettings.html#variant.NoBinaryName
     pub fn get_matches_from_safe_borrow<I, T>(&mut self, itr: I) -> ClapResult<ArgMatches<'a>>
         where I: IntoIterator<Item = T>,
               T: Into<OsString> + Clone
     {
         // If there are global arguments, or settings we need to propgate them down to subcommands
         // before parsing incase we run into a subcommand
-        self.p.propogate_globals();
-        self.p.propogate_settings();
-        self.p.derive_display_order();
+        if !self.p.is_set(AppSettings::Propagated) {
+            self.p.propagate_globals();
+            self.p.propagate_settings();
+            self.p.derive_display_order();
+            self.p.set(AppSettings::Propagated);
+        }
 
         let mut matcher = ArgMatcher::new();
 
         let mut it = itr.into_iter();
         // Get the name of the program (argument 1 of env::args()) and determine the
         // actual file
         // that was used to execute the program. This is because a program called
         // ./target/release/my_prog -a
@@ -1614,21 +1617,18 @@ impl<'a, 'b> App<'a, 'b> {
             }
         }
 
         // do the real parsing
         if let Err(e) = self.p.get_matches_with(&mut matcher, &mut it.peekable()) {
             return Err(e);
         }
 
-        if self.p.is_set(AppSettings::PropagateGlobalValuesDown) {
-            for a in &self.p.global_args {
-                matcher.propagate(a.b.name);
-            }
-        }
+        let global_arg_vec : Vec<&str> = (&self).p.global_args.iter().map(|ga| ga.b.name).collect();
+        matcher.propagate_globals(&global_arg_vec);
 
         Ok(matcher.into())
     }
 }
 
 #[cfg(feature = "yaml")]
 impl<'a> From<&'a Yaml> for App<'a, 'a> {
     fn from(mut yaml: &'a Yaml) -> Self {
@@ -1788,19 +1788,20 @@ impl<'n, 'e> AnyArg<'n, 'e> for App<'n, 
     fn min_vals(&self) -> Option<u64> { None }
     fn short(&self) -> Option<char> { None }
     fn long(&self) -> Option<&'e str> { None }
     fn val_delim(&self) -> Option<char> { None }
     fn takes_value(&self) -> bool { true }
     fn help(&self) -> Option<&'e str> { self.p.meta.about }
     fn long_help(&self) -> Option<&'e str> { self.p.meta.long_about }
     fn default_val(&self) -> Option<&'e OsStr> { None }
-    fn default_vals_ifs(&self) -> Option<vec_map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
+    fn default_vals_ifs(&self) -> Option<map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
         None
     }
+    fn env<'s>(&'s self) -> Option<(&'n OsStr, Option<&'s OsString>)> { None }
     fn longest_filter(&self) -> bool { true }
     fn aliases(&self) -> Option<Vec<&'e str>> {
         if let Some(ref aliases) = self.p.meta.aliases {
             let vis_aliases: Vec<_> =
                 aliases.iter().filter_map(|&(n, v)| if v { Some(n) } else { None }).collect();
             if vis_aliases.is_empty() {
                 None
             } else {
--- a/third_party/rust/clap/src/app/parser.rs
+++ b/third_party/rust/clap/src/app/parser.rs
@@ -4,19 +4,16 @@ use std::fmt::Display;
 use std::fs::File;
 use std::io::{self, BufWriter, Write};
 #[cfg(feature = "debug")]
 use std::os::unix::ffi::OsStrExt;
 use std::path::PathBuf;
 use std::slice::Iter;
 use std::iter::Peekable;
 
-// Third Party
-use vec_map::{self, VecMap};
-
 // Internal
 use INTERNAL_ERROR_MSG;
 use INVALID_UTF8;
 use SubCommand;
 use app::App;
 use app::help::Help;
 use app::meta::AppMeta;
 use app::settings::AppFlags;
@@ -27,16 +24,17 @@ use errors::{Error, ErrorKind};
 use errors::Result as ClapResult;
 use fmt::ColorWhen;
 use osstringext::OsStrExt2;
 use completions::Shell;
 use suggestions;
 use app::settings::AppSettings as AS;
 use app::validator::Validator;
 use app::usage;
+use map::{self, VecMap};
 
 #[derive(Debug, PartialEq, Copy, Clone)]
 #[doc(hidden)]
 pub enum ParseResult<'a> {
     Flag,
     Opt(&'a str),
     Pos(&'a str),
     MaybeHyphenValue,
@@ -93,22 +91,22 @@ impl<'a, 'b> Parser<'a, 'b>
         let c = s.trim_left_matches(|c| c == '-')
             .chars()
             .nth(0)
             .unwrap_or('V');
         self.version_short = Some(c);
     }
 
     pub fn gen_completions_to<W: Write>(&mut self, for_shell: Shell, buf: &mut W) {
-        if !self.is_set(AS::Propogated) {
-            self.propogate_help_version();
+        if !self.is_set(AS::Propagated) {
+            self.propagate_help_version();
             self.build_bin_names();
-            self.propogate_globals();
-            self.propogate_settings();
-            self.set(AS::Propogated);
+            self.propagate_globals();
+            self.propagate_settings();
+            self.set(AS::Propagated);
         }
 
         ComplGen::new(self).generate(for_shell, buf)
     }
 
     pub fn gen_completions(&mut self, for_shell: Shell, od: OsString) {
         use std::error::Error;
 
@@ -363,22 +361,22 @@ impl<'a, 'b> Parser<'a, 'b>
         subcmd.p.meta.term_w = self.meta.term_w;
         if subcmd.p.meta.name == "help" {
             self.unset(AS::NeedsSubcommandHelp);
         }
 
         self.subcommands.push(subcmd);
     }
 
-    pub fn propogate_settings(&mut self) {
-        debugln!("Parser::propogate_settings: self={}, g_settings={:#?}",
+    pub fn propagate_settings(&mut self) {
+        debugln!("Parser::propagate_settings: self={}, g_settings={:#?}",
                  self.meta.name,
                  self.g_settings);
         for sc in &mut self.subcommands {
-            debugln!("Parser::propogate_settings: sc={}, settings={:#?}, g_settings={:#?}",
+            debugln!("Parser::propagate_settings: sc={}, settings={:#?}, g_settings={:#?}",
                      sc.p.meta.name,
                      sc.p.settings,
                      sc.p.g_settings);
             // We have to create a new scope in order to tell rustc the borrow of `sc` is
             // done and to recursively call this method
             {
                 let vsc = self.settings.is_set(AS::VersionlessSubcommands);
                 let gv = self.settings.is_set(AS::GlobalVersion);
@@ -390,17 +388,17 @@ impl<'a, 'b> Parser<'a, 'b>
                     sc.p.set(AS::GlobalVersion);
                     sc.p.meta.version = Some(self.meta.version.unwrap());
                 }
                 sc.p.settings = sc.p.settings | self.g_settings;
                 sc.p.g_settings = sc.p.g_settings | self.g_settings;
                 sc.p.meta.term_w = self.meta.term_w;
                 sc.p.meta.max_w = self.meta.max_w;
             }
-            sc.p.propogate_settings();
+            sc.p.propagate_settings();
         }
     }
 
     #[cfg_attr(feature = "lints", allow(needless_borrow))]
     pub fn derive_display_order(&mut self) {
         if self.is_set(AS::DeriveDisplayOrder) {
             let unified = self.is_set(AS::UnifiedHelpMessage);
             for (i, o) in self.opts
@@ -470,20 +468,17 @@ impl<'a, 'b> Parser<'a, 'b>
         }
         self.positionals
             .values()
             .any(|p| !p.is_set(ArgSettings::Hidden))
     }
 
     #[inline]
     pub fn has_visible_subcommands(&self) -> bool {
-        if self.subcommands.is_empty() {
-            return false;
-        }
-        self.subcommands.iter().any(|s| !s.p.is_set(AS::Hidden))
+        self.has_subcommands() && self.subcommands.iter().filter(|sc| sc.p.meta.name != "help").any(|sc| !sc.p.is_set(AS::Hidden))
     }
 
     #[inline]
     pub fn is_set(&self, s: AS) -> bool { self.settings.is_set(s) }
 
     #[inline]
     pub fn set(&mut self, s: AS) { self.settings.set(s) }
 
@@ -607,26 +602,26 @@ impl<'a, 'b> Parser<'a, 'b>
            !self.is_set(AS::SubcommandsNegateReqs) {
             panic!("Having a required positional argument with .last(true) set *and* child \
             subcommands without setting SubcommandsNegateReqs isn't compatible.");
         }
 
         true
     }
 
-    pub fn propogate_globals(&mut self) {
+    pub fn propagate_globals(&mut self) {
         for sc in &mut self.subcommands {
             // We have to create a new scope in order to tell rustc the borrow of `sc` is
             // done and to recursively call this method
             {
                 for a in &self.global_args {
                     sc.p.add_arg_ref(a);
                 }
             }
-            sc.p.propogate_globals();
+            sc.p.propagate_globals();
         }
     }
 
     // Checks if the arg matches a subcommand name, or any of it's aliases (if defined)
     fn possible_subcommand(&self, arg_os: &OsStr) -> (bool, Option<&str>) {
         debugln!("Parser::possible_subcommand: arg={:?}", arg_os);
         fn starts(h: &str, n: &OsStr) -> bool {
             #[cfg(not(target_os = "windows"))]
@@ -848,57 +843,62 @@ impl<'a, 'b> Parser<'a, 'b>
                 self.set(AS::TrailingValues);
                 continue;
             }
 
             // Has the user already passed '--'? Meaning only positional args follow
             if !self.is_set(AS::TrailingValues) {
                 // Does the arg match a subcommand name, or any of it's aliases (if defined)
                 {
-                    let (is_match, sc_name) = self.possible_subcommand(&arg_os);
-                    debugln!("Parser::get_matches_with: possible_sc={:?}, sc={:?}",
-                             is_match,
-                             sc_name);
-                    if is_match {
-                        let sc_name = sc_name.expect(INTERNAL_ERROR_MSG);
-                        if sc_name == "help" && self.is_set(AS::NeedsSubcommandHelp) {
-                            try!(self.parse_help_subcommand(it));
+                    match needs_val_of {
+                        ParseResult::Opt(_) | ParseResult::Pos(_) =>(),
+                        _ => {
+                            let (is_match, sc_name) = self.possible_subcommand(&arg_os);
+                            debugln!("Parser::get_matches_with: possible_sc={:?}, sc={:?}",
+                                    is_match,
+                                    sc_name);
+                            if is_match {
+                                let sc_name = sc_name.expect(INTERNAL_ERROR_MSG);
+                                if sc_name == "help" && self.is_set(AS::NeedsSubcommandHelp) {
+                                    self.parse_help_subcommand(it)?;
+                                }
+                                subcmd_name = Some(sc_name.to_owned());
+                                break;
+                            }
                         }
-                        subcmd_name = Some(sc_name.to_owned());
-                        break;
                     }
                 }
 
                 if !starts_new_arg {
                     if let ParseResult::Opt(name) = needs_val_of {
                             // Check to see if parsing a value from a previous arg
                             let arg = self.opts
                                 .iter()
                                 .find(|o| o.b.name == name)
                                 .expect(INTERNAL_ERROR_MSG);
                             // get the OptBuilder so we can check the settings
-                            needs_val_of = try!(self.add_val_to_arg(arg, &arg_os, matcher));
+                            needs_val_of = self.add_val_to_arg(arg, &arg_os, matcher)?;
                             // get the next value from the iterator
                             continue;
                     }
                 } else if arg_os.starts_with(b"--") {
-                    needs_val_of = try!(self.parse_long_arg(matcher, &arg_os));
+                    needs_val_of = self.parse_long_arg(matcher, &arg_os)?;
                     debugln!("Parser:get_matches_with: After parse_long_arg {:?}",
                              needs_val_of);
                     match needs_val_of {
                         ParseResult::Flag |
                             ParseResult::Opt(..) |
                             ParseResult::ValuesDone => continue,
                         _ => (),
                     }
                 } else if arg_os.starts_with(b"-") && arg_os.len_() != 1 {
                     // Try to parse short args like normal, if AllowLeadingHyphen or
                     // AllowNegativeNumbers is set, parse_short_arg will *not* throw
                     // an error, and instead return Ok(None)
-                    needs_val_of = try!(self.parse_short_arg(matcher, &arg_os));
+                    needs_val_of = self.parse_short_arg(matcher, &arg_os)?;
                     // If it's None, we then check if one of those two AppSettings was set
                     debugln!("Parser:get_matches_with: After parse_short_arg {:?}",
                              needs_val_of);
                     match needs_val_of {
                         ParseResult::MaybeNegNum => {
                             if !(arg_os.to_string_lossy().parse::<i64>().is_ok() ||
                                  arg_os.to_string_lossy().parse::<f64>().is_ok()) {
                                 return Err(Error::unknown_argument(&*arg_os.to_string_lossy(),
@@ -1010,18 +1010,18 @@ impl<'a, 'b> Parser<'a, 'b>
                     }
                     sc_m.add_val_to("", &a);
                 }
 
                 matcher.subcommand(SubCommand {
                                        name: sc_name,
                                        matches: sc_m.into(),
                                    });
-            } else if !(self.is_set(AS::AllowLeadingHyphen) ||
-                        self.is_set(AS::AllowNegativeNumbers)) &&
+            } else if !((self.is_set(AS::AllowLeadingHyphen) ||
+                        self.is_set(AS::AllowNegativeNumbers)) && arg_os.starts_with(b"-")) &&
                       !self.is_set(AS::InferSubcommands) {
                 return Err(Error::unknown_argument(&*arg_os.to_string_lossy(),
                                                    "",
                                                    &*usage::create_error_usage(self,
                                                                                matcher,
                                                                                None),
                                                    self.color()));
             } else if !has_args || self.is_set(AS::InferSubcommands) && self.has_subcommands() {
@@ -1042,54 +1042,61 @@ impl<'a, 'b> Parser<'a, 'b>
                                                                   .to_string_lossy()
                                                                   .into_owned(),
                                                               self.meta
                                                                   .bin_name
                                                                   .as_ref()
                                                                   .unwrap_or(&self.meta.name),
                                                               self.color()));
                 }
+            } else {
+                return Err(Error::unknown_argument(&*arg_os.to_string_lossy(),
+                                                   "",
+                                                   &*usage::create_error_usage(self,
+                                                                               matcher,
+                                                                               None),
+                                                   self.color()));
             }
         }
 
         if let Some(ref pos_sc_name) = subcmd_name {
             let sc_name = {
                 find_subcmd!(self, pos_sc_name)
                     .expect(INTERNAL_ERROR_MSG)
                     .p
                     .meta
                     .name
                     .clone()
             };
-            try!(self.parse_subcommand(&*sc_name, matcher, it));
+            self.parse_subcommand(&*sc_name, matcher, it)?;
         } else if self.is_set(AS::SubcommandRequired) {
             let bn = self.meta.bin_name.as_ref().unwrap_or(&self.meta.name);
             return Err(Error::missing_subcommand(bn,
                                                  &usage::create_error_usage(self, matcher, None),
                                                  self.color()));
         } else if self.is_set(AS::SubcommandRequiredElseHelp) {
             debugln!("Parser::get_matches_with: SubcommandRequiredElseHelp=true");
             let mut out = vec![];
-            try!(self.write_help_err(&mut out));
+            self.write_help_err(&mut out)?;
             return Err(Error {
                            message: String::from_utf8_lossy(&*out).into_owned(),
                            kind: ErrorKind::MissingArgumentOrSubcommand,
                            info: None,
                        });
         }
 
         Validator::new(self).validate(needs_val_of, subcmd_name, matcher)
     }
 
 
-    fn propogate_help_version(&mut self) {
-        debugln!("Parser::propogate_help_version;");
+    fn propagate_help_version(&mut self) {
+        debugln!("Parser::propagate_help_version;");
         self.create_help_and_version();
         for sc in &mut self.subcommands {
-            sc.p.propogate_help_version();
+            sc.p.propagate_help_version();
         }
     }
 
     fn build_bin_names(&mut self) {
         debugln!("Parser::build_bin_names;");
         for sc in &mut self.subcommands {
             debug!("Parser::build_bin_names:iter: bin_name set...");
             if sc.p.meta.bin_name.is_none() {
@@ -1162,17 +1169,17 @@ impl<'a, 'b> Parser<'a, 'b>
                                  " "
                              } else {
                                  ""
                              },
                              &*sc.p.meta.name));
             debugln!("Parser::parse_subcommand: About to parse sc={}",
                      sc.p.meta.name);
             debugln!("Parser::parse_subcommand: sc settings={:#?}", sc.p.settings);
-            try!(sc.p.get_matches_with(&mut sc_matcher, it));
+            sc.p.get_matches_with(&mut sc_matcher, it)?;
             matcher.subcommand(SubCommand {
                                    name: sc.p.meta.name.clone(),
                                    matches: sc_matcher.into(),
                                });
         }
         Ok(())
     }
 
@@ -1332,36 +1339,34 @@ impl<'a, 'b> Parser<'a, 'b>
                 sdebugln!("Version");
                 return Err(self._version(false));
             }
         }
         sdebugln!("Neither");
         Ok(())
     }
 
-    #[cfg_attr(feature = "cargo-clippy", allow(let_and_return))]
     fn use_long_help(&self) -> bool {
-        let ul = self.flags.iter().any(|f| f.b.long_help.is_some()) ||
+        self.meta.long_about.is_some() ||
+                 self.flags.iter().any(|f| f.b.long_help.is_some()) ||
                  self.opts.iter().any(|o| o.b.long_help.is_some()) ||
                  self.positionals.values().any(|p| p.b.long_help.is_some()) ||
                  self.subcommands
                      .iter()
-                     .any(|s| s.p.meta.long_about.is_some());
-        debugln!("Parser::use_long_help: ret={:?}", ul);
-        ul
+                     .any(|s| s.p.meta.long_about.is_some())
     }
 
     fn _help(&self, mut use_long: bool) -> Error {
         debugln!("Parser::_help: use_long={:?}", use_long);
         use_long = use_long && self.use_long_help();
         let mut buf = vec![];
         match Help::write_parser_help(&mut buf, self, use_long) {
             Err(e) => e,
             _ => Error {
-                message: unsafe { String::from_utf8_unchecked(buf) },
+                message: String::from_utf8(buf).unwrap_or_default(),
                 kind: ErrorKind::HelpDisplayed,
                 info: None,
             }
         }
     }
 
     fn _version(&self, use_long: bool) -> Error {
         debugln!("Parser::_version: ");
@@ -1394,32 +1399,32 @@ impl<'a, 'b> Parser<'a, 'b>
             sdebugln!("No");
             full_arg.trim_left_matches(b'-')
         };
 
         if let Some(opt) = find_opt_by_long!(@os self, arg) {
             debugln!("Parser::parse_long_arg: Found valid opt '{}'",
                      opt.to_string());
             self.settings.set(AS::ValidArgFound);
-            let ret = try!(self.parse_opt(val, opt, val.is_some(), matcher));
+            let ret = self.parse_opt(val, opt, val.is_some(), matcher)?;
             if self.cache.map_or(true, |name| name != opt.b.name) {
                 arg_post_processing!(self, opt, matcher);
                 self.cache = Some(opt.b.name);
             }
 
             return Ok(ret);
         } else if let Some(flag) = find_flag_by_long!(@os self, arg) {
             debugln!("Parser::parse_long_arg: Found valid flag '{}'",
                      flag.to_string());
             self.settings.set(AS::ValidArgFound);
             // Only flags could be help or version, and we need to check the raw long
             // so this is the first point to check
-            try!(self.check_for_help_and_version_str(arg));
+            self.check_for_help_and_version_str(arg)?;
 
-            try!(self.parse_flag(flag, matcher));
+            self.parse_flag(flag, matcher)?;
 
             // Handle conflicts, requirements, etc.
             // if self.cache.map_or(true, |name| name != flag.b.name) {
             arg_post_processing!(self, flag, matcher);
             // self.cache = Some(flag.b.name);
             // }
 
             return Ok(ParseResult::Flag);
@@ -1481,30 +1486,30 @@ impl<'a, 'b> Parser<'a, 'b>
                              arg_os.split_at(i).1.as_bytes(),
                              arg_os.split_at(i).1);
                     Some(arg_os.split_at(i).1)
                 } else {
                     None
                 };
 
                 // Default to "we're expecting a value later"
-                let ret = try!(self.parse_opt(val, opt, false, matcher));
+                let ret = self.parse_opt(val, opt, false, matcher)?;
 
                 if self.cache.map_or(true, |name| name != opt.b.name) {
                     arg_post_processing!(self, opt, matcher);
                     self.cache = Some(opt.b.name);
                 }
 
                 return Ok(ret);
             } else if let Some(flag) = find_flag_by_short!(self, c) {
                 debugln!("Parser::parse_short_arg:iter:{}: Found valid flag", c);
                 self.settings.set(AS::ValidArgFound);
                 // Only flags can be help or version
-                try!(self.check_for_help_and_version_char(c));
-                ret = try!(self.parse_flag(flag, matcher));
+                self.check_for_help_and_version_char(c)?;
+                ret = self.parse_flag(flag, matcher)?;
 
                 // Handle conflicts, requirements, overrides, etc.
                 // Must be called here due to mutablilty
                 if self.cache.map_or(true, |name| name != flag.b.name) {
                     arg_post_processing!(self, flag, matcher);
                     self.cache = Some(flag.b.name);
                 }
             } else {
@@ -1524,52 +1529,58 @@ impl<'a, 'b> Parser<'a, 'b>
                  val: Option<&OsStr>,
                  opt: &OptBuilder<'a, 'b>,
                  had_eq: bool,
                  matcher: &mut ArgMatcher<'a>)
                  -> ClapResult<ParseResult<'a>> {
         debugln!("Parser::parse_opt; opt={}, val={:?}", opt.b.name, val);
         debugln!("Parser::parse_opt; opt.settings={:?}", opt.b.settings);
         let mut has_eq = false;
+        let no_val = val.is_none();
+        let empty_vals = opt.is_set(ArgSettings::EmptyValues);
+        let min_vals_zero = opt.v.min_vals.unwrap_or(1) == 0;
+        let needs_eq = opt.is_set(ArgSettings::RequireEquals);
 
         debug!("Parser::parse_opt; Checking for val...");
         if let Some(fv) = val {
             has_eq = fv.starts_with(&[b'=']) || had_eq;
             let v = fv.trim_left_matches(b'=');
-            if !opt.is_set(ArgSettings::EmptyValues) &&
-               (v.len_() == 0 || (opt.is_set(ArgSettings::RequireEquals) && !has_eq)) {
+            if !empty_vals &&
+               (v.len_() == 0 || (needs_eq && !has_eq)) {
                 sdebugln!("Found Empty - Error");
                 return Err(Error::empty_value(opt,
                                               &*usage::create_error_usage(self, matcher, None),
                                               self.color()));
             }
             sdebugln!("Found - {:?}, len: {}", v, v.len_());
             debugln!("Parser::parse_opt: {:?} contains '='...{:?}",
                      fv,
                      fv.starts_with(&[b'=']));
-            try!(self.add_val_to_arg(opt, v, matcher));
-        } else if opt.is_set(ArgSettings::RequireEquals) && !opt.is_set(ArgSettings::EmptyValues) {
+            self.add_val_to_arg(opt, v, matcher)?;
+        } else if needs_eq && !(empty_vals || min_vals_zero) {
             sdebugln!("None, but requires equals...Error");
             return Err(Error::empty_value(opt,
                                           &*usage::create_error_usage(self, matcher, None),
                                           self.color()));
 
         } else {
             sdebugln!("None");
         }
 
         matcher.inc_occurrence_of(opt.b.name);
         // Increment or create the group "args"
         self.groups_for_arg(opt.b.name)
             .and_then(|vec| Some(matcher.inc_occurrences_of(&*vec)));
 
-        if val.is_none() ||
-           !has_eq &&
-           (opt.is_set(ArgSettings::Multiple) && !opt.is_set(ArgSettings::RequireDelimiter) &&
-            matcher.needs_more_vals(opt)) {
+        let needs_delim = opt.is_set(ArgSettings::RequireDelimiter);
+        let mult = opt.is_set(ArgSettings::Multiple);
+        if no_val && min_vals_zero && !has_eq && needs_eq {
+            debugln!("Parser::parse_opt: More arg vals not required...");
+            return Ok(ParseResult::ValuesDone);
+        } else if no_val || (mult && !needs_delim) && !has_eq && matcher.needs_more_vals(opt) {
             debugln!("Parser::parse_opt: More arg vals required...");
             return Ok(ParseResult::Opt(opt.b.name));
         }
         debugln!("Parser::parse_opt: More arg vals not required...");
         Ok(ParseResult::ValuesDone)
     }
 
     fn add_val_to_arg<A>(&self,
@@ -1581,21 +1592,21 @@ impl<'a, 'b> Parser<'a, 'b>
     {
         debugln!("Parser::add_val_to_arg; arg={}, val={:?}", arg.name(), val);
         debugln!("Parser::add_val_to_arg; trailing_vals={:?}, DontDelimTrailingVals={:?}",
                  self.is_set(AS::TrailingValues),
                  self.is_set(AS::DontDelimitTrailingValues));
         if !(self.is_set(AS::TrailingValues) && self.is_set(AS::DontDelimitTrailingValues)) {
             if let Some(delim) = arg.val_delim() {
                 if val.is_empty_() {
-                    Ok(try!(self.add_single_val_to_arg(arg, val, matcher)))
+                    Ok(self.add_single_val_to_arg(arg, val, matcher)?)
                 } else {
                     let mut iret = ParseResult::ValuesDone;
                     for v in val.split(delim as u32 as u8) {
-                        iret = try!(self.add_single_val_to_arg(arg, v, matcher));
+                        iret = self.add_single_val_to_arg(arg, v, matcher)?;
                     }
                     // If there was a delimiter used, we're not looking for more values
                     if val.contains_byte(delim as u32 as u8) ||
                         arg.is_set(ArgSettings::RequireDelimiter) {
                             iret = ParseResult::ValuesDone;
                         }
                     Ok(iret)
                 }
@@ -1674,17 +1685,17 @@ impl<'a, 'b> Parser<'a, 'b>
         Err(Error::unknown_argument(&*used_arg,
                                     &*suffix.0,
                                     &*usage::create_error_usage(self, matcher, None),
                                     self.color()))
     }
 
     // Prints the version to the user and exits if quit=true
     fn print_version<W: Write>(&self, w: &mut W, use_long: bool) -> ClapResult<()> {
-        try!(self.write_version(w, use_long));
+        self.write_version(w, use_long)?;
         w.flush().map_err(Error::from)
     }
 
     pub fn write_version<W: Write>(&self, w: &mut W, use_long: bool) -> io::Result<()> {
         let ver = if use_long {
             self.meta
                 .long_version
                 .unwrap_or_else(|| self.meta.version.unwrap_or(""))
@@ -1719,77 +1730,134 @@ impl<'a, 'b> Parser<'a, 'b>
         Help::write_parser_help(w, self, true)
     }
 
     pub fn write_help_err<W: Write>(&self, w: &mut W) -> ClapResult<()> {
         Help::write_parser_help_to_stderr(w, self)
     }
 
     pub fn add_defaults(&mut self, matcher: &mut ArgMatcher<'a>) -> ClapResult<()> {
+        debugln!("Parser::add_defaults;");
         macro_rules! add_val {
             (@default $_self:ident, $a:ident, $m:ident) => {
                 if let Some(ref val) = $a.v.default_val {
-                    if $m.get($a.b.name).is_none() {
-                        try!($_self.add_val_to_arg($a, OsStr::new(val), $m));
+                    debugln!("Parser::add_defaults:iter:{}: has default vals", $a.b.name);
+                    if $m.get($a.b.name).map(|ma| ma.vals.len()).map(|len| len == 0).unwrap_or(false) {
+                        debugln!("Parser::add_defaults:iter:{}: has no user defined vals", $a.b.name);
+                        $_self.add_val_to_arg($a, OsStr::new(val), $m)?;
+
+                        if $_self.cache.map_or(true, |name| name != $a.name()) {
+                            arg_post_processing!($_self, $a, $m);
+                            $_self.cache = Some($a.name());
+                        }
+                    } else if $m.get($a.b.name).is_some() {
+                        debugln!("Parser::add_defaults:iter:{}: has user defined vals", $a.b.name);
+                    } else {
+                        debugln!("Parser::add_defaults:iter:{}: wasn't used", $a.b.name);
+
+                        $_self.add_val_to_arg($a, OsStr::new(val), $m)?;
 
                         if $_self.cache.map_or(true, |name| name != $a.name()) {
                             arg_post_processing!($_self, $a, $m);
                             $_self.cache = Some($a.name());
                         }
                     }
+                } else {
+                    debugln!("Parser::add_defaults:iter:{}: doesn't have default vals", $a.b.name);
                 }
             };
             ($_self:ident, $a:ident, $m:ident) => {
                 if let Some(ref vm) = $a.v.default_vals_ifs {
+                    sdebugln!(" has conditional defaults");
                     let mut done = false;
                     if $m.get($a.b.name).is_none() {
                         for &(arg, val, default) in vm.values() {
                             let add = if let Some(a) = $m.get(arg) {
                                 if let Some(v) = val {
                                     a.vals.iter().any(|value| v == value)
                                 } else {
                                     true
                                 }
                             } else {
                                 false
                             };
                             if add {
-                                try!($_self.add_val_to_arg($a, OsStr::new(default), $m));
+                                $_self.add_val_to_arg($a, OsStr::new(default), $m)?;
                                 if $_self.cache.map_or(true, |name| name != $a.name()) {
                                     arg_post_processing!($_self, $a, $m);
                                     $_self.cache = Some($a.name());
                                 }
                                 done = true;
                                 break;
                             }
                         }
                     }
 
                     if done {
                         continue; // outer loop (outside macro)
                     }
+                } else {
+                    sdebugln!(" doesn't have conditional defaults");
                 }
                 add_val!(@default $_self, $a, $m)
             };
         }
 
         for o in &self.opts {
+            debug!("Parser::add_defaults:iter:{}:", o.b.name);
+            add_val!(self, o, matcher);
+        }
+        for p in self.positionals.values() {
+            debug!("Parser::add_defaults:iter:{}:", p.b.name);
+            add_val!(self, p, matcher);
+        }
+        Ok(())
+    }
+    
+    pub fn add_env(&mut self, matcher: &mut ArgMatcher<'a>) -> ClapResult<()> {
+        macro_rules! add_val {
+            ($_self:ident, $a:ident, $m:ident) => {
+                if let Some(ref val) = $a.v.env {
+                    if $m.get($a.b.name).map(|ma| ma.vals.len()).map(|len| len == 0).unwrap_or(false) {
+                        if let Some(ref val) = val.1 {
+                            $_self.add_val_to_arg($a, OsStr::new(val), $m)?;
+
+                            if $_self.cache.map_or(true, |name| name != $a.name()) {
+                                arg_post_processing!($_self, $a, $m);
+                                $_self.cache = Some($a.name());
+                            }
+                        }
+                    } else {
+                        if let Some(ref val) = val.1 {
+                            $_self.add_val_to_arg($a, OsStr::new(val), $m)?;
+
+                            if $_self.cache.map_or(true, |name| name != $a.name()) {
+                                arg_post_processing!($_self, $a, $m);
+                                $_self.cache = Some($a.name());
+                            }
+                        }
+                    }
+                }
+            };
+        }
+
+        for o in &self.opts {
             add_val!(self, o, matcher);
         }
         for p in self.positionals.values() {
             add_val!(self, p, matcher);
         }
         Ok(())
     }
 
     pub fn flags(&self) -> Iter<FlagBuilder<'a, 'b>> { self.flags.iter() }
 
     pub fn opts(&self) -> Iter<OptBuilder<'a, 'b>> { self.opts.iter() }
 
-    pub fn positionals(&self) -> vec_map::Values<PosBuilder<'a, 'b>> { self.positionals.values() }
+    pub fn positionals(&self) -> map::Values<PosBuilder<'a, 'b>> { self.positionals.values() }
 
     pub fn subcommands(&self) -> Iter<App> { self.subcommands.iter() }
 
     // Should we color the output? None=determined by output location, true=yes, false=no
     #[doc(hidden)]
     pub fn color(&self) -> ColorWhen {
         debugln!("Parser::color;");
         debug!("Parser::color: Color setting...");
--- a/third_party/rust/clap/src/app/settings.rs
+++ b/third_party/rust/clap/src/app/settings.rs
@@ -36,17 +36,17 @@ bitflags! {
         const LOW_INDEX_MUL_POS    = 1 << 28;
         const DISABLE_HELP_SC      = 1 << 29;
         const DONT_COLLAPSE_ARGS   = 1 << 30;
         const ARGS_NEGATE_SCS      = 1 << 31;
         const PROPAGATE_VALS_DOWN  = 1 << 32;
         const ALLOW_MISSING_POS    = 1 << 33;
         const TRAILING_VALUES      = 1 << 34;
         const VALID_NEG_NUM_FOUND  = 1 << 35;
-        const PROPOGATED           = 1 << 36;
+        const PROPAGATED           = 1 << 36;
         const VALID_ARG_FOUND      = 1 << 37;
         const INFER_SUBCOMMANDS    = 1 << 38;
         const CONTAINS_LAST        = 1 << 39;
     }
 }
 
 #[doc(hidden)]
 #[derive(Debug, Copy, Clone, PartialEq)]
@@ -98,17 +98,17 @@ impl AppFlags {
         SubcommandRequiredElseHelp => SC_REQUIRED_ELSE_HELP,
         TrailingVarArg => TRAILING_VARARG,
         UnifiedHelpMessage => UNIFIED_HELP,
         NextLineHelp => NEXT_LINE_HELP,
         VersionlessSubcommands => VERSIONLESS_SC,
         WaitOnError => WAIT_ON_ERROR,
         TrailingValues => TRAILING_VALUES,
         ValidNegNumFound => VALID_NEG_NUM_FOUND,
-        Propogated => PROPOGATED,
+        Propagated => PROPAGATED,
         ValidArgFound => VALID_ARG_FOUND,
         InferSubcommands => INFER_SUBCOMMANDS,
         ContainsLast => CONTAINS_LAST
     }
 }
 
 /// Application level settings, which affect how [`App`] operates
 ///
@@ -583,54 +583,53 @@ pub enum AppSettings {
     /// ```no_run
     /// # use clap::{App, Arg, SubCommand, AppSettings};
     /// App::new("myprog")
     ///     .setting(AppSettings::NextLineHelp)
     ///     .get_matches();
     /// ```
     NextLineHelp,
 
-    /// Specifies that the parser should propagate global arg's values down through any *used* child
-    /// subcommands. Meaning, if a subcommand wasn't used, the values won't be propagated down to
+    /// **DEPRECATED**: This setting is no longer required in order to propagate values up or down
+    /// 
+    /// Specifies that the parser should propagate global arg's values down or up through any *used*
+    /// child subcommands. Meaning, if a subcommand wasn't used, the values won't be propagated to 
     /// said subcommand.
     ///
-    /// **NOTE:** Values are only propagated *down* through futher child commands, not up
-    ///
     /// # Examples
     ///
     /// ```rust
     /// # use clap::{App, Arg, AppSettings, SubCommand};
     /// let m = App::new("myprog")
-    ///     .setting(AppSettings::PropagateGlobalValuesDown)
     ///     .arg(Arg::from_usage("[cmd] 'command to run'")
     ///         .global(true))
     ///     .subcommand(SubCommand::with_name("foo"))
     ///     .get_matches_from(vec!["myprog", "set", "foo"]);
     ///
     /// assert_eq!(m.value_of("cmd"), Some("set"));
     ///
     /// let sub_m = m.subcommand_matches("foo").unwrap();
     /// assert_eq!(sub_m.value_of("cmd"), Some("set"));
     /// ```
     /// Now doing the same thing, but *not* using any subcommands will result in the value not being
     /// propagated down.
     ///
     /// ```rust
     /// # use clap::{App, Arg, AppSettings, SubCommand};
     /// let m = App::new("myprog")
-    ///     .setting(AppSettings::PropagateGlobalValuesDown)
     ///     .arg(Arg::from_usage("[cmd] 'command to run'")
     ///         .global(true))
     ///     .subcommand(SubCommand::with_name("foo"))
     ///     .get_matches_from(vec!["myprog", "set"]);
     ///
     /// assert_eq!(m.value_of("cmd"), Some("set"));
     ///
     /// assert!(m.subcommand_matches("foo").is_none());
     /// ```
+    #[deprecated(since = "2.27.0", note = "No longer required to propagate values")]
     PropagateGlobalValuesDown,
 
     /// Allows [`SubCommand`]s to override all requirements of the parent command.
     /// For example if you had a subcommand or top level application with a required argument
     /// that is only required as long as there is no subcommand present,
     /// using this setting would allow you to set those arguments to [`Arg::required(true)`]
     /// and yet receive no error so long as the user uses a valid subcommand instead.
     ///
@@ -851,17 +850,17 @@ pub enum AppSettings {
 
     #[doc(hidden)]
     TrailingValues,
 
     #[doc(hidden)]
     ValidNegNumFound,
 
     #[doc(hidden)]
-    Propogated,
+    Propagated,
 
     #[doc(hidden)]
     ValidArgFound,
 
     #[doc(hidden)]
     ContainsLast,
 }
 
@@ -896,17 +895,17 @@ impl FromStr for AppSettings {
             "subcommandrequired" => Ok(AppSettings::SubcommandRequired),
             "subcommandrequiredelsehelp" => Ok(AppSettings::SubcommandRequiredElseHelp),
             "trailingvararg" => Ok(AppSettings::TrailingVarArg),
             "unifiedhelpmessage" => Ok(AppSettings::UnifiedHelpMessage),
             "versionlesssubcommands" => Ok(AppSettings::VersionlessSubcommands),
             "waitonerror" => Ok(AppSettings::WaitOnError),
             "validnegnumfound" => Ok(AppSettings::ValidNegNumFound),
             "validargfound" => Ok(AppSettings::ValidArgFound),
-            "propogated" => Ok(AppSettings::Propogated),
+            "propagated" => Ok(AppSettings::Propagated),
             "trailingvalues" => Ok(AppSettings::TrailingValues),
             _ => Err("unknown AppSetting, cannot convert from str".to_owned()),
         }
     }
 }
 
 #[cfg(test)]
 mod test {
@@ -971,17 +970,17 @@ mod test {
         assert_eq!("versionlesssubcommands".parse::<AppSettings>().unwrap(),
                    AppSettings::VersionlessSubcommands);
         assert_eq!("waitonerror".parse::<AppSettings>().unwrap(),
                    AppSettings::WaitOnError);
         assert_eq!("validnegnumfound".parse::<AppSettings>().unwrap(),
                    AppSettings::ValidNegNumFound);
         assert_eq!("validargfound".parse::<AppSettings>().unwrap(),
                    AppSettings::ValidArgFound);
-        assert_eq!("propogated".parse::<AppSettings>().unwrap(),
-                   AppSettings::Propogated);
+        assert_eq!("propagated".parse::<AppSettings>().unwrap(),
+                   AppSettings::Propagated);
         assert_eq!("trailingvalues".parse::<AppSettings>().unwrap(),
                    AppSettings::TrailingValues);
         assert_eq!("infersubcommands".parse::<AppSettings>().unwrap(),
                    AppSettings::InferSubcommands);
         assert!("hahahaha".parse::<AppSettings>().is_err());
     }
 }
--- a/third_party/rust/clap/src/app/validator.rs
+++ b/third_party/rust/clap/src/app/validator.rs
@@ -23,53 +23,54 @@ impl<'a, 'b, 'z> Validator<'a, 'b, 'z> {
 
     pub fn validate(&mut self,
                     needs_val_of: ParseResult<'a>,
                     subcmd_name: Option<String>,
                     matcher: &mut ArgMatcher<'a>)
                     -> ClapResult<()> {
         debugln!("Validator::validate;");
         let mut reqs_validated = false;
-        try!(self.0.add_defaults(matcher));
+        self.0.add_env(matcher)?;
+        self.0.add_defaults(matcher)?;
         if let ParseResult::Opt(a) = needs_val_of {
             debugln!("Validator::validate: needs_val_of={:?}", a);
             let o = self.0
                 .opts
                 .iter()
                 .find(|o| o.b.name == a)
                 .expect(INTERNAL_ERROR_MSG);
-            try!(self.validate_required(matcher));
+            self.validate_required(matcher)?;
             reqs_validated = true;
             let should_err = if let Some(v) = matcher.0.args.get(&*o.b.name) {
                 v.vals.is_empty() && !(o.v.min_vals.is_some() && o.v.min_vals.unwrap() == 0)
             } else {
                 true
             };
             if should_err {
                 return Err(Error::empty_value(o,
                                               &*usage::create_error_usage(self.0, matcher, None),
                                               self.0.color()));
             }
         }
 
         if matcher.is_empty() && matcher.subcommand_name().is_none() &&
            self.0.is_set(AS::ArgRequiredElseHelp) {
             let mut out = vec![];
-            try!(self.0.write_help_err(&mut out));
+            self.0.write_help_err(&mut out)?;
             return Err(Error {
                            message: String::from_utf8_lossy(&*out).into_owned(),
                            kind: ErrorKind::MissingArgumentOrSubcommand,
                            info: None,
                        });
         }
-        try!(self.validate_blacklist(matcher));
+        self.validate_blacklist(matcher)?;
         if !(self.0.is_set(AS::SubcommandsNegateReqs) && subcmd_name.is_some()) && !reqs_validated {
-            try!(self.validate_required(matcher));
+            self.validate_required(matcher)?;
         }
-        try!(self.validate_matched_args(matcher));
+        self.validate_matched_args(matcher)?;
         matcher.usage(usage::create_usage_with_title(self.0, &[]));
 
         Ok(())
     }
 
     fn validate_values<A>(&self,
                           arg: &A,
                           ma: &MatchedArg,
@@ -160,55 +161,57 @@ impl<'a, 'b, 'z> Validator<'a, 'b, 'z> {
                         },
                         None    => panic!(INTERNAL_ERROR_MSG)
                     }
                 }
             });
         }
 
         for name in &self.0.blacklist {
-            debugln!("Validator::validate_blacklist:iter: Checking blacklisted name: {}",
-                     name);
+            debugln!("Validator::validate_blacklist:iter:{}: Checking blacklisted arg", name);
+            let mut should_err = false;
             if self.0.groups.iter().any(|g| &g.name == name) {
-                debugln!("Validator::validate_blacklist:iter: groups contains it...");
+                debugln!("Validator::validate_blacklist:iter:{}: groups contains it...", name);
                 for n in self.0.arg_names_in_group(name) {
-                    debugln!("Validator::validate_blacklist:iter:iter: Checking arg '{}' in group...",
-                             n);
+                    debugln!("Validator::validate_blacklist:iter:{}:iter:{}: looking in group...", name, n);
                     if matcher.contains(n) {
-                        debugln!("Validator::validate_blacklist:iter:iter: matcher contains it...");
+                        debugln!("Validator::validate_blacklist:iter:{}:iter:{}: matcher contains it...", name, n);
                         return Err(build_err!(self.0, n, matcher));
                     }
                 }
-            } else if matcher.contains(name) {
-                debugln!("Validator::validate_blacklist:iter: matcher contains it...");
+            } else if let Some(ma) = matcher.get(name) {
+                debugln!("Validator::validate_blacklist:iter:{}: matcher contains it...", name);
+                should_err = ma.occurs > 0;
+            }
+            if should_err {
                 return Err(build_err!(self.0, *name, matcher));
             }
         }
         Ok(())
     }
 
     fn validate_matched_args(&self, matcher: &mut ArgMatcher<'a>) -> ClapResult<()> {
         debugln!("Validator::validate_matched_args;");
         for (name, ma) in matcher.iter() {
             debugln!("Validator::validate_matched_args:iter:{}: vals={:#?}",
                      name,
                      ma.vals);
             if let Some(opt) = find_by_name!(self.0, *name, opts, iter) {
-                try!(self.validate_arg_num_vals(opt, ma, matcher));
-                try!(self.validate_values(opt, ma, matcher));
-                try!(self.validate_arg_requires(opt, ma, matcher));
-                try!(self.validate_arg_num_occurs(opt, ma, matcher));
+                self.validate_arg_num_vals(opt, ma, matcher)?;
+                self.validate_values(opt, ma, matcher)?;
+                self.validate_arg_requires(opt, ma, matcher)?;
+                self.validate_arg_num_occurs(opt, ma, matcher)?;
             } else if let Some(flag) = find_by_name!(self.0, *name, flags, iter) {
-                try!(self.validate_arg_requires(flag, ma, matcher));
-                try!(self.validate_arg_num_occurs(flag, ma, matcher));
+                self.validate_arg_requires(flag, ma, matcher)?;
+                self.validate_arg_num_occurs(flag, ma, matcher)?;
             } else if let Some(pos) = find_by_name!(self.0, *name, positionals, values) {
-                try!(self.validate_arg_num_vals(pos, ma, matcher));
-                try!(self.validate_arg_num_occurs(pos, ma, matcher));
-                try!(self.validate_values(pos, ma, matcher));
-                try!(self.validate_arg_requires(pos, ma, matcher));
+                self.validate_arg_num_vals(pos, ma, matcher)?;
+                self.validate_arg_num_occurs(pos, ma, matcher)?;
+                self.validate_values(pos, ma, matcher)?;
+                self.validate_arg_requires(pos, ma, matcher)?;
             } else {
                 let grp = self.0
                     .groups
                     .iter()
                     .find(|g| &g.name == name)
                     .expect(INTERNAL_ERROR_MSG);
                 if let Some(ref g_reqs) = grp.requires {
                     if g_reqs.iter().any(|&n| !matcher.contains(n)) {
@@ -289,31 +292,32 @@ impl<'a, 'b, 'z> Validator<'a, 'b, 'z> {
                                                       .expect(INVALID_UTF8),
                                                   a,
                                                   &*usage::create_error_usage(self.0,
                                                                               matcher,
                                                                               None),
                                                   self.0.color()));
             }
         }
-        if let Some(num) = a.min_vals() {
+        let min_vals_zero = if let Some(num) = a.min_vals() {
             debugln!("Validator::validate_arg_num_vals: min_vals set: {}", num);
-            if (ma.vals.len() as u64) < num {
+            if (ma.vals.len() as u64) < num && num != 0 {
                 debugln!("Validator::validate_arg_num_vals: Sending error TooFewValues");
                 return Err(Error::too_few_values(a,
                                                  num,
                                                  ma.vals.len(),
                                                  &*usage::create_error_usage(self.0,
                                                                              matcher,
                                                                              None),
                                                  self.0.color()));
             }
-        }
+            num == 0
+        } else { false };
         // Issue 665 (https://github.com/kbknapp/clap-rs/issues/665)
-        if a.takes_value() && !a.is_set(ArgSettings::EmptyValues) && ma.vals.is_empty() {
+        if a.takes_value() && !(a.is_set(ArgSettings::EmptyValues) || min_vals_zero)  && ma.vals.is_empty() {
             return Err(Error::empty_value(a,
                                           &*usage::create_error_usage(self.0, matcher, None),
                                           self.0.color()));
         }
         Ok(())
     }
 
     fn validate_arg_requires<A>(&self,
--- a/third_party/rust/clap/src/args/any_arg.rs
+++ b/third_party/rust/clap/src/args/any_arg.rs
@@ -1,18 +1,16 @@
 // Std
 use std::rc::Rc;
 use std::fmt as std_fmt;
 use std::ffi::{OsStr, OsString};
 
-// Third Party
-use vec_map::{self, VecMap};
-
 // Internal
 use args::settings::ArgSettings;
+use map::{self, VecMap};
 
 #[doc(hidden)]
 pub trait AnyArg<'n, 'e>: std_fmt::Display {
     fn name(&self) -> &'n str;
     fn overrides(&self) -> Option<&[&'e str]>;
     fn aliases(&self) -> Option<Vec<&'e str>>;
     fn requires(&self) -> Option<&[(Option<&'e str>, &'n str)]>;
     fn blacklist(&self) -> Option<&[&'e str]>;
@@ -29,16 +27,17 @@ pub trait AnyArg<'n, 'e>: std_fmt::Displ
     fn short(&self) -> Option<char>;
     fn long(&self) -> Option<&'e str>;
     fn val_delim(&self) -> Option<char>;
     fn takes_value(&self) -> bool;
     fn val_names(&self) -> Option<&VecMap<&'e str>>;
     fn help(&self) -> Option<&'e str>;
     fn long_help(&self) -> Option<&'e str>;
     fn default_val(&self) -> Option<&'e OsStr>;
-    fn default_vals_ifs(&self) -> Option<vec_map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>>;
+    fn default_vals_ifs(&self) -> Option<map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>>;
+    fn env<'s>(&'s self) -> Option<(&'n OsStr, Option<&'s OsString>)>;
     fn longest_filter(&self) -> bool;
     fn val_terminator(&self) -> Option<&'e str>;
 }
 
 pub trait DispOrder {
     fn disp_ord(&self) -> usize;
 }
--- a/third_party/rust/clap/src/args/arg.rs
+++ b/third_party/rust/clap/src/args/arg.rs
@@ -1,21 +1,21 @@
 #[cfg(feature = "yaml")]
 use std::collections::BTreeMap;
 use std::rc::Rc;
 use std::ffi::{OsString, OsStr};
 #[cfg(target_os="windows")]
 use osstringext::OsStrExt3;
 #[cfg(not(target_os="windows"))]
 use std::os::unix::ffi::OsStrExt;
-
+use std::env;
 
 #[cfg(feature = "yaml")]
 use yaml_rust::Yaml;
-use vec_map::VecMap;
+use map::VecMap;
 
 use usage_parser::UsageParser;
 use args::settings::ArgSettings;
 use args::arg_builder::{Base, Valued, Switched};
 
 /// The abstract representation of a command line argument. Used to set all the options and
 /// relationships that define a valid argument for the program.
 ///
@@ -123,16 +123,17 @@ impl<'a, 'b> Arg<'a, 'b> {
                 "allow_hyphen_values" => yaml_to_bool!(a, v, allow_hyphen_values),
                 "require_delimiter" => yaml_to_bool!(a, v, require_delimiter),
                 "value_delimiter" => yaml_to_str!(a, v, value_delimiter),
                 "required_unless" => yaml_to_str!(a, v, required_unless),
                 "display_order" => yaml_to_usize!(a, v, display_order),
                 "default_value" => yaml_to_str!(a, v, default_value),
                 "default_value_if" => yaml_tuple3!(a, v, default_value_if),
                 "default_value_ifs" => yaml_tuple3!(a, v, default_value_if),
+                "env" => yaml_to_str!(a, v, env),
                 "value_names" => yaml_vec_or_str!(v, a, value_name),
                 "groups" => yaml_vec_or_str!(v, a, group),
                 "requires" => yaml_vec_or_str!(v, a, requires),
                 "requires_if" => yaml_tuple2!(a, v, requires_if),
                 "requires_ifs" => yaml_tuple2!(a, v, requires_if),
                 "conflicts_with" => yaml_vec_or_str!(v, a, conflicts_with),
                 "overrides_with" => yaml_vec_or_str!(v, a, overrides_with),
                 "possible_values" => yaml_vec_or_str!(v, a, possible_value),
@@ -1502,17 +1503,17 @@ impl<'a, 'b> Arg<'a, 'b> {
     ///         .takes_value(true))
     ///     .get_matches_from_safe(vec![
     ///         "prog", "--other", "not-special"
     ///     ]);
     ///
     /// assert!(res.is_ok()); // We didn't use --other=special, so "cfg" wasn't required
     /// ```
     ///
-    /// Setting [`Arg::required_if(arg, val)`] and having `arg` used with a vaue of `val` but *not*
+    /// Setting [`Arg::required_if(arg, val)`] and having `arg` used with a value of `val` but *not*
     /// using this arg is an error.
     ///
     /// ```rust
     /// # use clap::{App, Arg, ErrorKind};
     /// let res = App::new("prog")
     ///     .arg(Arg::with_name("cfg")
     ///         .takes_value(true)
     ///         .required_if("other", "special")
@@ -1586,17 +1587,17 @@ impl<'a, 'b> Arg<'a, 'b> {
     ///     .get_matches_from_safe(vec![
     ///         "prog", "--option", "other"
     ///     ]);
     ///
     /// assert!(res.is_ok()); // We didn't use --option=spec, or --extra=val so "cfg" isn't required
     /// ```
     ///
     /// Setting [`Arg::required_ifs(&[(arg, val)])`] and having any of the `arg`s used with it's
-    /// vaue of `val` but *not* using this arg is an error.
+    /// value of `val` but *not* using this arg is an error.
     ///
     /// ```rust
     /// # use clap::{App, Arg, ErrorKind};
     /// let res = App::new("prog")
     ///     .arg(Arg::with_name("cfg")
     ///         .required_ifs(&[
     ///             ("extra", "val"),
     ///             ("option", "spec")
@@ -1885,28 +1886,58 @@ impl<'a, 'b> Arg<'a, 'b> {
     /// occurrences vs multiple values.
     ///
     /// For example, `--opt val1 val2` is one occurrence, but two values. Whereas
     /// `--opt val1 --opt val2` is two occurrences.
     ///
     /// **WARNING:**
     ///
     /// Setting `multiple(true)` for an [option] with no other details, allows multiple values
-    /// **and** multiple occurrences because it isn't possible to have more occurrences than values for
-    /// options. Because multiple values are allowed, `--option val1 val2 val3` is perfectly valid,
-    /// be careful when designing a CLI where positional arguments are expected after a option which
-    /// accepts multiple values, as `clap` will continue parsing *values* until it reaches the max
-    /// or specific number of values defined, or another flag or option.
+    /// **and** multiple occurrences because it isn't possible to have more occurrences than values 
+    /// for options. Because multiple values are allowed, `--option val1 val2 val3` is perfectly 
+    /// valid, be careful when designing a CLI where positional arguments are expected after a 
+    /// option which accepts multiple values, as `clap` will continue parsing *values* until it 
+    /// reaches the max or specific number of values defined, or another flag or option.
     ///
     /// **Pro Tip**:
     ///
     /// It's possible to define an option which allows multiple occurrences, but only one value per
     /// occurrence. To do this use [`Arg::number_of_values(1)`] in coordination with
     /// [`Arg::multiple(true)`].
     ///
+    /// **WARNING:**
+    /// 
+    /// When using args with `multiple(true)` on [options] or [positionals] (i.e. those args that
+    /// accept values) and [subcommands], one needs to consider the posibility of an argument value
+    /// being the same as a valid subcommand. By default `clap` will parse the argument in question
+    /// as a value *only if* a value is possible at that moment. Otherwise it will be parsed as a
+    /// subcommand. In effect, this means using `multiple(true)` with no additional parameters and
+    /// a possible value that coincides with a subcommand name, the subcommand cannot be called 
+    /// unless another argument is passed first.
+    /// 
+    /// As an example, consider a CLI with an option `--ui-paths=<paths>...` and subcommand `signer`
+    /// 
+    /// The following would be parsed as values to `--ui-paths`.
+    /// 
+    /// ```notrust
+    /// $ program --ui-paths path1 path2 signer
+    /// ```
+    /// 
+    /// This is because `--ui-paths` accepts multiple values. `clap` will continue parsing values
+    /// until another argument is reached and it knows `--ui-paths` is done.
+    /// 
+    /// By adding additional parameters to `--ui-paths` we can solve this issue. Consider adding
+    /// [`Arg::number_of_values(1)`] as discussed above. The following are all valid, and `signer` 
+    /// is parsed as both a subcommand and a value in the second case.
+    /// 
+    /// ```notrust
+    /// $ program --ui-paths path1 signer
+    /// $ program --ui-paths path1 --ui-paths signer signer
+    /// ```
+    /// 
     /// # Examples
     ///
     /// ```rust
     /// # use clap::{App, Arg};
     /// Arg::with_name("debug")
     ///     .short("d")
     ///     .multiple(true)
     /// # ;
@@ -2030,16 +2061,19 @@ impl<'a, 'b> Arg<'a, 'b> {
     ///     .get_matches_from_safe(vec![
     ///         "prog", "-F", "file1", "file2", "file3", "word"
     ///     ]);
     ///
     /// assert!(res.is_err());
     /// assert_eq!(res.unwrap_err().kind, ErrorKind::UnknownArgument);
     /// ```
     /// [option]: ./struct.Arg.html#method.takes_value
+    /// [options]: ./struct.Arg.html#method.takes_value
+    /// [subcommands]: ./struct.SubCommand.html
+    /// [positionals]: ./struct.Arg.html#method.index
     /// [`Arg::number_of_values(1)`]: ./struct.Arg.html#method.number_of_values
     /// [`Arg::multiple(true)`]: ./struct.Arg.html#method.multiple
     pub fn multiple(self, multi: bool) -> Self {
         if multi {
             self.set(ArgSettings::Multiple)
         } else {
             self.unset(ArgSettings::Multiple)
         }
@@ -2049,17 +2083,17 @@ impl<'a, 'b> Arg<'a, 'b> {
     /// one sets [`multiple(true)`] on an argument, clap will continue parsing values for that
     /// argument until it reaches another valid argument, or one of the other more specific settings
     /// for multiple values is used (such as [`min_values`], [`max_values`] or
     /// [`number_of_values`]).
     ///
     /// **NOTE:** This setting only applies to [options] and [positional arguments]
     ///
     /// **NOTE:** When the terminator is passed in on the command line, it is **not** stored as one
-    /// of the vaues
+    /// of the values
     ///
     /// # Examples
     ///
     /// ```rust
     /// # use clap::{App, Arg};
     /// Arg::with_name("vals")
     ///     .takes_value(true)
     ///     .multiple(true)
@@ -2093,24 +2127,20 @@ impl<'a, 'b> Arg<'a, 'b> {
     pub fn value_terminator(mut self, term: &'b str) -> Self {
         self.setb(ArgSettings::TakesValue);
         self.v.terminator = Some(term);
         self
     }
 
     /// Specifies that an argument can be matched to all child [`SubCommand`]s.
     ///
-    /// **NOTE:** Global arguments *only* propagate down, **not** up (to parent commands)
-    ///
-    /// **NOTE:** Global arguments *cannot* be [required].
-    ///
-    /// **NOTE:** Global arguments, when matched, *only* exist in the command's matches that they
-    /// were matched to. For example, if you defined a `--flag` global argument in the top most
-    /// parent command, but the user supplied the arguments `top cmd1 cmd2 --flag` *only* `cmd2`'s
-    /// [`ArgMatches`] would return `true` if tested for [`ArgMatches::is_present("flag")`].
+    /// **NOTE:** Global arguments *only* propagate down, **not** up (to parent commands), however
+    /// their values once a user uses them will be propagated back up to parents. In effect, this 
+    /// means one should *define* all global arguments at the top level, however it doesn't matter 
+    /// where the user *uses* the global argument.
     ///
     /// # Examples
     ///
     /// ```rust
     /// # use clap::{App, Arg};
     /// Arg::with_name("debug")
     ///     .short("d")
     ///     .global(true)
@@ -3009,17 +3039,17 @@ impl<'a, 'b> Arg<'a, 'b> {
     /// Specifies the value of the argument when *not* specified at runtime.
     ///
     /// **NOTE:** If the user *does not* use this argument at runtime, [`ArgMatches::occurrences_of`]
     /// will return `0` even though the [`ArgMatches::value_of`] will return the default specified.
     ///
     /// **NOTE:** If the user *does not* use this argument at runtime [`ArgMatches::is_present`] will
     /// still return `true`. If you wish to determine whether the argument was used at runtime or
     /// not, consider [`ArgMatches::occurrences_of`] which will return `0` if the argument was *not*
-    /// used at runtmie.
+    /// used at runtime.
     ///
     /// **NOTE:** This setting is perfectly compatible with [`Arg::default_value_if`] but slightly
     /// different. `Arg::default_value` *only* takes affect when the user has not provided this arg
     /// at runtime. `Arg::default_value_if` however only takes affect when the user has not provided
     /// a value at runtime **and** these other conditions are met as well. If you have set
     /// `Arg::default_value` and `Arg::default_value_if`, and the user **did not** provide a this
     /// arg at runtime, nor did were the conditions met for `Arg::default_value_if`, the
     /// `Arg::default_value` will be applied.
@@ -3306,16 +3336,129 @@ impl<'a, 'b> Arg<'a, 'b> {
     #[cfg_attr(feature = "lints", allow(explicit_counter_loop))]
     pub fn default_value_ifs_os(mut self, ifs: &[(&'a str, Option<&'b OsStr>, &'b OsStr)]) -> Self {
         for &(arg, val, default) in ifs {
             self = self.default_value_if_os(arg, val, default);
         }
         self
     }
 
+    /// Specifies that if the value is not passed in as an argument, that it should be retrieved
+    /// from the environment, if available. If it is not present in the environment, then default
+    /// rules will apply.
+    /// 
+    /// **NOTE:** If the user *does not* use this argument at runtime, [`ArgMatches::occurrences_of`]
+    /// will return `0` even though the [`ArgMatches::value_of`] will return the default specified.
+    ///
+    /// **NOTE:** If the user *does not* use this argument at runtime [`ArgMatches::is_present`] will
+    /// return `true` if the variable is present in the environemnt . If you wish to determine whether
+    /// the argument was used at runtime or not, consider [`ArgMatches::occurrences_of`] which will
+    /// return `0` if the argument was *not* used at runtime.
+    /// 
+    /// **NOTE:** This implicitly sets [`Arg::takes_value(true)`].
+    /// 
+    /// **NOTE:** If [`Arg::multiple(true)`] is set then [`Arg::use_delimiter(true)`] should also be
+    /// set. Otherwise, only a single argument will be returned from the environment variable. The
+    /// default delimiter is `,` and follows all the other delimiter rules.
+    ///  
+    /// # Examples
+    /// 
+    /// In this example, we show the variable coming from the environment:
+    /// 
+    /// ```rust
+    /// # use std::env;
+    /// # use clap::{App, Arg};
+    ///
+    /// env::set_var("MY_FLAG", "env");
+    ///  
+    /// let m = App::new("prog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .long("flag")
+    ///         .env("MY_FLAG"))
+    ///     .get_matches_from(vec![
+    ///         "prog"
+    ///     ]);
+    ///
+    /// assert_eq!(m.value_of("flag"), Some("env"));
+    /// ```
+    /// 
+    /// In this example, we show the variable coming from an option on the CLI:
+    /// 
+    /// ```rust
+    /// # use std::env;
+    /// # use clap::{App, Arg};
+    ///
+    /// env::set_var("MY_FLAG", "env");
+    ///  
+    /// let m = App::new("prog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .long("flag")
+    ///         .env("MY_FLAG"))
+    ///     .get_matches_from(vec![
+    ///         "prog", "--flag", "opt"
+    ///     ]);
+    ///
+    /// assert_eq!(m.value_of("flag"), Some("opt"));
+    /// ```
+    /// 
+    /// In this example, we show the variable coming from the environment even with the
+    /// presence of a default:
+    /// 
+    /// ```rust
+    /// # use std::env;
+    /// # use clap::{App, Arg};
+    ///
+    /// env::set_var("MY_FLAG", "env");
+    ///  
+    /// let m = App::new("prog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .long("flag")
+    ///         .env("MY_FLAG")
+    ///         .default_value("default"))
+    ///     .get_matches_from(vec![
+    ///         "prog"
+    ///     ]);
+    ///
+    /// assert_eq!(m.value_of("flag"), Some("env"));
+    /// ```
+    /// 
+    /// In this example, we show the use of multiple values in a single environment variable:
+    /// 
+    /// ```rust
+    /// # use std::env;
+    /// # use clap::{App, Arg};
+    ///
+    /// env::set_var("MY_FLAG_MULTI", "env1,env2");
+    ///  
+    /// let m = App::new("prog")
+    ///     .arg(Arg::with_name("flag")
+    ///         .long("flag")
+    ///         .env("MY_FLAG_MULTI")
+    ///         .multiple(true)
+    ///         .use_delimiter(true))
+    ///     .get_matches_from(vec![
+    ///         "prog"
+    ///     ]);
+    ///
+    /// assert_eq!(m.values_of("flag").unwrap().collect::<Vec<_>>(), vec!["env1", "env2"]);
+    /// ```
+    pub fn env(self, name: &'a str) -> Self {
+        self.env_os(OsStr::new(name))
+    }
+
+    /// Specifies that if the value is not passed in as an argument, that it should be retrieved
+    /// from the environment if available in the exact same manner as [`Arg::env`] only using
+    /// [`OsStr`]s instead.
+    pub fn env_os(mut self, name: &'a OsStr) -> Self {
+        self.setb(ArgSettings::TakesValue);
+
+        self.v.env = Some((name, env::var_os(name)));
+        self
+    }
+
     /// When set to `true` the help string will be displayed on the line after the argument and
     /// indented once. This can be helpful for arguments with very long or complex help messages.
     /// This can also be helpful for arguments with very long flag names, or many/long value names.
     ///
     /// **NOTE:** To apply this setting to all arguments consider using
     /// [`AppSettings::NextLineHelp`]
     ///
     /// # Examples
--- a/third_party/rust/clap/src/args/arg_builder/flag.rs
+++ b/third_party/rust/clap/src/args/arg_builder/flag.rs
@@ -1,34 +1,38 @@
 // Std
 use std::convert::From;
 use std::fmt::{Display, Formatter, Result};
 use std::rc::Rc;
 use std::result::Result as StdResult;
 use std::ffi::{OsStr, OsString};
 use std::mem;
 
-// Third Party
-use vec_map::{self, VecMap};
-
 // Internal
 use Arg;
-use args::{ArgSettings, Base, Switched, AnyArg, DispOrder};
+use args::{AnyArg, ArgSettings, Base, DispOrder, Switched};
+use map::{self, VecMap};
 
 #[derive(Default, Clone, Debug)]
 #[doc(hidden)]
 pub struct FlagBuilder<'n, 'e>
-    where 'n: 'e
+where
+    'n: 'e,
 {
     pub b: Base<'n, 'e>,
     pub s: Switched<'e>,
 }
 
 impl<'n, 'e> FlagBuilder<'n, 'e> {
-    pub fn new(name: &'n str) -> Self { FlagBuilder { b: Base::new(name), ..Default::default() } }
+    pub fn new(name: &'n str) -> Self {
+        FlagBuilder {
+            b: Base::new(name),
+            ..Default::default()
+        }
+    }
 }
 
 impl<'a, 'b, 'z> From<&'z Arg<'a, 'b>> for FlagBuilder<'a, 'b> {
     fn from(a: &'z Arg<'a, 'b>) -> Self {
         FlagBuilder {
             b: Base::from(a),
             s: Switched::from(a),
         }
@@ -42,19 +46,19 @@ impl<'a, 'b> From<Arg<'a, 'b>> for FlagB
             s: mem::replace(&mut a.s, Switched::default()),
         }
     }
 }
 
 impl<'n, 'e> Display for FlagBuilder<'n, 'e> {
     fn fmt(&self, f: &mut Formatter) -> Result {
         if let Some(l) = self.s.long {
-            try!(write!(f, "--{}", l));
+            write!(f, "--{}", l)?;
         } else {
-            try!(write!(f, "-{}", self.s.short.unwrap()));
+            write!(f, "-{}", self.s.short.unwrap())?;
         }
 
         Ok(())
     }
 }
 
 impl<'n, 'e> AnyArg<'n, 'e> for FlagBuilder<'n, 'e> {
     fn name(&self) -> &'n str { self.b.name }
@@ -77,23 +81,25 @@ impl<'n, 'e> AnyArg<'n, 'e> for FlagBuil
     fn min_vals(&self) -> Option<u64> { None }
     fn short(&self) -> Option<char> { self.s.short }
     fn long(&self) -> Option<&'e str> { self.s.long }
     fn val_delim(&self) -> Option<char> { None }
     fn help(&self) -> Option<&'e str> { self.b.help }
     fn long_help(&self) -> Option<&'e str> { self.b.long_help }
     fn val_terminator(&self) -> Option<&'e str> { None }
     fn default_val(&self) -> Option<&'e OsStr> { None }
-    fn default_vals_ifs(&self) -> Option<vec_map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
+    fn default_vals_ifs(&self) -> Option<map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
         None
     }
+    fn env<'s>(&'s self) -> Option<(&'n OsStr, Option<&'s OsString>)> { None }
     fn longest_filter(&self) -> bool { self.s.long.is_some() }
     fn aliases(&self) -> Option<Vec<&'e str>> {
         if let Some(ref aliases) = self.s.aliases {
-            let vis_aliases: Vec<_> = aliases.iter()
+            let vis_aliases: Vec<_> = aliases
+                .iter()
                 .filter_map(|&(n, v)| if v { Some(n) } else { None })
                 .collect();
             if vis_aliases.is_empty() {
                 None
             } else {
                 Some(vis_aliases)
             }
         } else {
@@ -102,19 +108,17 @@ impl<'n, 'e> AnyArg<'n, 'e> for FlagBuil
     }
 }
 
 impl<'n, 'e> DispOrder for FlagBuilder<'n, 'e> {
     fn disp_ord(&self) -> usize { self.s.disp_ord }
 }
 
 impl<'n, 'e> PartialEq for FlagBuilder<'n, 'e> {
-    fn eq(&self, other: &FlagBuilder<'n, 'e>) -> bool {
-        self.b == other.b
-    }
+    fn eq(&self, other: &FlagBuilder<'n, 'e>) -> bool { self.b == other.b }
 }
 
 #[cfg(test)]
 mod test {
     use args::settings::ArgSettings;
     use super::FlagBuilder;
 
     #[test]
@@ -139,13 +143,17 @@ mod test {
 
         assert_eq!(&*format!("{}", f), "--flag");
     }
 
     #[test]
     fn flagbuilder_display_multiple_aliases() {
         let mut f = FlagBuilder::new("flg");
         f.s.short = Some('f');
-        f.s.aliases =
-            Some(vec![("alias_not_visible", false), ("f2", true), ("f3", true), ("f4", true)]);
+        f.s.aliases = Some(vec![
+            ("alias_not_visible", false),
+            ("f2", true),
+            ("f3", true),
+            ("f4", true),
+        ]);
         assert_eq!(&*format!("{}", f), "-f");
     }
 }
--- a/third_party/rust/clap/src/args/arg_builder/option.rs
+++ b/third_party/rust/clap/src/args/arg_builder/option.rs
@@ -1,34 +1,39 @@
 // Std
 use std::fmt::{Display, Formatter, Result};
 use std::rc::Rc;
 use std::result::Result as StdResult;
 use std::ffi::{OsStr, OsString};
 use std::mem;
 
-// Third Party
-use vec_map::{self, VecMap};
-
 // Internal
-use args::{ArgSettings, AnyArg, Base, Switched, Valued, Arg, DispOrder};
+use args::{AnyArg, Arg, ArgSettings, Base, DispOrder, Switched, Valued};
+use map::{self, VecMap};
+use INTERNAL_ERROR_MSG;
 
 #[allow(missing_debug_implementations)]
 #[doc(hidden)]
 #[derive(Default, Clone)]
 pub struct OptBuilder<'n, 'e>
-    where 'n: 'e
+where
+    'n: 'e,
 {
     pub b: Base<'n, 'e>,
     pub s: Switched<'e>,
     pub v: Valued<'n, 'e>,
 }
 
 impl<'n, 'e> OptBuilder<'n, 'e> {
-    pub fn new(name: &'n str) -> Self { OptBuilder { b: Base::new(name), ..Default::default() } }
+    pub fn new(name: &'n str) -> Self {
+        OptBuilder {
+            b: Base::new(name),
+            ..Default::default()
+        }
+    }
 }
 
 impl<'n, 'e, 'z> From<&'z Arg<'n, 'e>> for OptBuilder<'n, 'e> {
     fn from(a: &'z Arg<'n, 'e>) -> Self {
         OptBuilder {
             b: Base::from(a),
             s: Switched::from(a),
             v: Valued::from(a),
@@ -52,54 +57,61 @@ impl<'n, 'e> Display for OptBuilder<'n, 
         debugln!("OptBuilder::fmt:{}", self.b.name);
         let sep = if self.b.is_set(ArgSettings::RequireEquals) {
             "="
         } else {
             " "
         };
         // Write the name such --long or -l
         if let Some(l) = self.s.long {
-            try!(write!(f, "--{}{}", l, sep));
+            write!(f, "--{}{}", l, sep)?;
         } else {
-            try!(write!(f, "-{}{}", self.s.short.unwrap(), sep));
+            write!(f, "-{}{}", self.s.short.unwrap(), sep)?;
         }
+        let delim = if self.is_set(ArgSettings::RequireDelimiter) {
+            self.v.val_delim.expect(INTERNAL_ERROR_MSG)
+        } else {
+            ' '
+        };
 
         // Write the values such as <name1> <name2>
         if let Some(ref vec) = self.v.val_names {
             let mut it = vec.iter().peekable();
             while let Some((_, val)) = it.next() {
-                try!(write!(f, "<{}>", val));
+                write!(f, "<{}>", val)?;
                 if it.peek().is_some() {
-                    try!(write!(f, " "));
+                    write!(f, "{}", delim)?;
                 }
             }
             let num = vec.len();
             if self.is_set(ArgSettings::Multiple) && num == 1 {
-                try!(write!(f, "..."));
+                write!(f, "...")?;
             }
         } else if let Some(num) = self.v.num_vals {
             let mut it = (0..num).peekable();
             while let Some(_) = it.next() {
-                try!(write!(f, "<{}>", self.b.name));
+                write!(f, "<{}>", self.b.name)?;
                 if it.peek().is_some() {
-                    try!(write!(f, " "));
+                    write!(f, "{}", delim)?;
                 }
             }
             if self.is_set(ArgSettings::Multiple) && num == 1 {
-                try!(write!(f, "..."));
+                write!(f, "...")?;
             }
         } else {
-            try!(write!(f,
-                        "<{}>{}",
-                        self.b.name,
-                        if self.is_set(ArgSettings::Multiple) {
-                            "..."
-                        } else {
-                            ""
-                        }));
+            write!(
+                f,
+                "<{}>{}",
+                self.b.name,
+                if self.is_set(ArgSettings::Multiple) {
+                    "..."
+                } else {
+                    ""
+                }
+            )?;
         }
 
         Ok(())
     }
 }
 
 impl<'n, 'e> AnyArg<'n, 'e> for OptBuilder<'n, 'e> {
     fn name(&self) -> &'n str { self.b.name }
@@ -126,23 +138,30 @@ impl<'n, 'e> AnyArg<'n, 'e> for OptBuild
     fn min_vals(&self) -> Option<u64> { self.v.min_vals }
     fn short(&self) -> Option<char> { self.s.short }
     fn long(&self) -> Option<&'e str> { self.s.long }
     fn val_delim(&self) -> Option<char> { self.v.val_delim }
     fn takes_value(&self) -> bool { true }
     fn help(&self) -> Option<&'e str> { self.b.help }
     fn long_help(&self) -> Option<&'e str> { self.b.long_help }
     fn default_val(&self) -> Option<&'e OsStr> { self.v.default_val }
-    fn default_vals_ifs(&self) -> Option<vec_map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
+    fn default_vals_ifs(&self) -> Option<map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
         self.v.default_vals_ifs.as_ref().map(|vm| vm.values())
     }
+    fn env<'s>(&'s self) -> Option<(&'n OsStr, Option<&'s OsString>)> {
+        self.v
+            .env
+            .as_ref()
+            .map(|&(key, ref value)| (key, value.as_ref()))
+    }
     fn longest_filter(&self) -> bool { true }
     fn aliases(&self) -> Option<Vec<&'e str>> {
         if let Some(ref aliases) = self.s.aliases {
-            let vis_aliases: Vec<_> = aliases.iter()
+            let vis_aliases: Vec<_> = aliases
+                .iter()
                 .filter_map(|&(n, v)| if v { Some(n) } else { None })
                 .collect();
             if vis_aliases.is_empty() {
                 None
             } else {
                 Some(vis_aliases)
             }
         } else {
@@ -151,26 +170,24 @@ impl<'n, 'e> AnyArg<'n, 'e> for OptBuild
     }
 }
 
 impl<'n, 'e> DispOrder for OptBuilder<'n, 'e> {
     fn disp_ord(&self) -> usize { self.s.disp_ord }
 }
 
 impl<'n, 'e> PartialEq for OptBuilder<'n, 'e> {
-    fn eq(&self, other: &OptBuilder<'n, 'e>) -> bool {
-        self.b == other.b
-    }
+    fn eq(&self, other: &OptBuilder<'n, 'e>) -> bool { self.b == other.b }
 }
 
 #[cfg(test)]
 mod test {
     use args::settings::ArgSettings;
     use super::OptBuilder;
-    use vec_map::VecMap;
+    use map::VecMap;
 
     #[test]
     fn optbuilder_display1() {
         let mut o = OptBuilder::new("opt");
         o.s.long = Some("option");
         o.b.settings.set(ArgSettings::Multiple);
 
         assert_eq!(&*format!("{}", o), "--option <opt>...");
@@ -211,13 +228,17 @@ mod test {
 
         assert_eq!(&*format!("{}", o), "--option <opt>");
     }
 
     #[test]
     fn optbuilder_display_multiple_aliases() {
         let mut o = OptBuilder::new("opt");
         o.s.long = Some("option");
-        o.s.aliases =
-            Some(vec![("als_not_visible", false), ("als2", true), ("als3", true), ("als4", true)]);
+        o.s.aliases = Some(vec![
+            ("als_not_visible", false),
+            ("als2", true),
+            ("als3", true),
+            ("als4", true),
+        ]);
         assert_eq!(&*format!("{}", o), "--option <opt>");
     }
 }
--- a/third_party/rust/clap/src/args/arg_builder/positional.rs
+++ b/third_party/rust/clap/src/args/arg_builder/positional.rs
@@ -1,29 +1,28 @@
 // Std
 use std::borrow::Cow;
 use std::fmt::{Display, Formatter, Result};
 use std::rc::Rc;
 use std::result::Result as StdResult;
 use std::ffi::{OsStr, OsString};
 use std::mem;
 
-// Third Party
-use vec_map::{self, VecMap};
-
 // Internal
 use Arg;
-use args::{ArgSettings, Base, Valued, AnyArg, DispOrder};
+use args::{AnyArg, ArgSettings, Base, DispOrder, Valued};
 use INTERNAL_ERROR_MSG;
+use map::{self, VecMap};
 
 #[allow(missing_debug_implementations)]
 #[doc(hidden)]
 #[derive(Clone, Default)]
 pub struct PosBuilder<'n, 'e>
-    where 'n: 'e
+where
+    'n: 'e,
 {
     pub b: Base<'n, 'e>,
     pub v: Valued<'n, 'e>,
     pub index: u64,
 }
 
 impl<'n, 'e> PosBuilder<'n, 'e> {
     pub fn new(name: &'n str, idx: u64) -> Self {
@@ -35,26 +34,28 @@ impl<'n, 'e> PosBuilder<'n, 'e> {
     }
 
     pub fn from_arg_ref(a: &Arg<'n, 'e>, idx: u64) -> Self {
         let mut pb = PosBuilder {
             b: Base::from(a),
             v: Valued::from(a),
             index: idx,
         };
-        if a.v.max_vals.is_some() || a.v.min_vals.is_some() ||
-           (a.v.num_vals.is_some() && a.v.num_vals.unwrap() > 1) {
+        if a.v.max_vals.is_some() || a.v.min_vals.is_some()
+            || (a.v.num_vals.is_some() && a.v.num_vals.unwrap() > 1)
+        {
             pb.b.settings.set(ArgSettings::Multiple);
         }
         pb
     }
 
     pub fn from_arg(mut a: Arg<'n, 'e>, idx: u64) -> Self {
-        if a.v.max_vals.is_some() || a.v.min_vals.is_some() ||
-           (a.v.num_vals.is_some() && a.v.num_vals.unwrap() > 1) {
+        if a.v.max_vals.is_some() || a.v.min_vals.is_some()
+            || (a.v.num_vals.is_some() && a.v.num_vals.unwrap() > 1)
+        {
             a.b.settings.set(ArgSettings::Multiple);
         }
         PosBuilder {
             b: mem::replace(&mut a.b, Base::default()),
             v: mem::replace(&mut a.v, Valued::default()),
             index: idx,
         }
     }
@@ -68,49 +69,67 @@ impl<'n, 'e> PosBuilder<'n, 'e> {
             "..."
         } else {
             ""
         }
     }
 
     pub fn name_no_brackets(&self) -> Cow<str> {
         debugln!("PosBuilder::name_no_brackets;");
+        let mut delim = String::new();
+        delim.push(if self.is_set(ArgSettings::RequireDelimiter) {
+            self.v.val_delim.expect(INTERNAL_ERROR_MSG)
+        } else {
+            ' '
+        });
         if let Some(ref names) = self.v.val_names {
             debugln!("PosBuilder:name_no_brackets: val_names={:#?}", names);
             if names.len() > 1 {
-                Cow::Owned(names
-                               .values()
-                               .map(|n| format!("<{}>", n))
-                               .collect::<Vec<_>>()
-                               .join(" "))
+                Cow::Owned(
+                    names
+                        .values()
+                        .map(|n| format!("<{}>", n))
+                        .collect::<Vec<_>>()
+                        .join(&*delim),
+                )
             } else {
                 Cow::Borrowed(names.values().next().expect(INTERNAL_ERROR_MSG))
             }
         } else {
             debugln!("PosBuilder:name_no_brackets: just name");
             Cow::Borrowed(self.b.name)
         }
     }
 }
 
 impl<'n, 'e> Display for PosBuilder<'n, 'e> {
     fn fmt(&self, f: &mut Formatter) -> Result {
+        let mut delim = String::new();
+        delim.push(if self.is_set(ArgSettings::RequireDelimiter) {
+            self.v.val_delim.expect(INTERNAL_ERROR_MSG)
+        } else {
+            ' '
+        });
         if let Some(ref names) = self.v.val_names {
-            try!(write!(f,
-                        "{}",
-                        names
-                            .values()
-                            .map(|n| format!("<{}>", n))
-                            .collect::<Vec<_>>()
-                            .join(" ")));
+            write!(
+                f,
+                "{}",
+                names
+                    .values()
+                    .map(|n| format!("<{}>", n))
+                    .collect::<Vec<_>>()
+                    .join(&*delim)
+            )?;
         } else {
-            try!(write!(f, "<{}>", self.b.name));
+            write!(f, "<{}>", self.b.name)?;
         }
-        if self.b.settings.is_set(ArgSettings::Multiple) && (self.v.val_names.is_none() || self.v.val_names.as_ref().unwrap().len() == 1) {
-            try!(write!(f, "..."));
+        if self.b.settings.is_set(ArgSettings::Multiple)
+            && (self.v.val_names.is_none() || self.v.val_names.as_ref().unwrap().len() == 1)
+        {
+            write!(f, "...")?;
         }
 
         Ok(())
     }
 }
 
 impl<'n, 'e> AnyArg<'n, 'e> for PosBuilder<'n, 'e> {
     fn name(&self) -> &'n str { self.b.name }
@@ -136,37 +155,43 @@ impl<'n, 'e> AnyArg<'n, 'e> for PosBuild
     }
     fn min_vals(&self) -> Option<u64> { self.v.min_vals }
     fn short(&self) -> Option<char> { None }
     fn long(&self) -> Option<&'e str> { None }
     fn val_delim(&self) -> Option<char> { self.v.val_delim }
     fn takes_value(&self) -> bool { true }
     fn help(&self) -> Option<&'e str> { self.b.help }
     fn long_help(&self) -> Option<&'e str> { self.b.long_help }
-    fn default_vals_ifs(&self) -> Option<vec_map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
+    fn default_vals_ifs(&self) -> Option<map::Values<(&'n str, Option<&'e OsStr>, &'e OsStr)>> {
         self.v.default_vals_ifs.as_ref().map(|vm| vm.values())
     }
     fn default_val(&self) -> Option<&'e OsStr> { self.v.default_val }
+    fn env<'s>(&'s self) -> Option<(&'n OsStr, Option<&'s OsString>)> {
+        self.v
+            .env
+            .as_ref()
+            .map(|&(key, ref value)| (key, value.as_ref()))
+    }
     fn longest_filter(&self) -> bool { true }
     fn aliases(&self) -> Option<Vec<&'e str>> { None }
 }
 
 impl<'n, 'e> DispOrder for PosBuilder<'n, 'e> {
     fn disp_ord(&self) -> usize { self.index as usize }
 }
 
 impl<'n, 'e> PartialEq for PosBuilder<'n, 'e> {
     fn eq(&self, other: &PosBuilder<'n, 'e>) -> bool { self.b == other.b }
 }
 
 #[cfg(test)]
 mod test {
     use args::settings::ArgSettings;
     use super::PosBuilder;
-    use vec_map::VecMap;
+    use map::VecMap;
 
     #[test]
     fn display_mult() {
         let mut p = PosBuilder::new("pos", 1);
         p.b.settings.set(ArgSettings::Multiple);
 
         assert_eq!(&*format!("{}", p), "<pos>...");
     }
--- a/third_party/rust/clap/src/args/arg_builder/valued.rs
+++ b/third_party/rust/clap/src/args/arg_builder/valued.rs
@@ -1,46 +1,49 @@
 use std::rc::Rc;
 use std::ffi::{OsStr, OsString};
 
-use vec_map::VecMap;
+use map::VecMap;
 
 use Arg;
 
 #[allow(missing_debug_implementations)]
 #[derive(Clone)]
 pub struct Valued<'a, 'b>
-    where 'a: 'b
+where
+    'a: 'b,
 {
     pub possible_vals: Option<Vec<&'b str>>,
     pub val_names: Option<VecMap<&'b str>>,
     pub num_vals: Option<u64>,
     pub max_vals: Option<u64>,
     pub min_vals: Option<u64>,
     pub validator: Option<Rc<Fn(String) -> Result<(), String>>>,
     pub validator_os: Option<Rc<Fn(&OsStr) -> Result<(), OsString>>>,
     pub val_delim: Option<char>,
     pub default_val: Option<&'b OsStr>,
     pub default_vals_ifs: Option<VecMap<(&'a str, Option<&'b OsStr>, &'b OsStr)>>,
+    pub env: Option<(&'a OsStr, Option<OsString>)>,
     pub terminator: Option<&'b str>,
 }
 
 impl<'n, 'e> Default for Valued<'n, 'e> {
     fn default() -> Self {
         Valued {
             possible_vals: None,
             num_vals: None,
             min_vals: None,
             max_vals: None,
             val_names: None,
             validator: None,
             validator_os: None,
             val_delim: None,
             default_val: None,
             default_vals_ifs: None,
+            env: None,
             terminator: None,
         }
     }
 }
 
 impl<'n, 'e> Valued<'n, 'e> {
     pub fn fill_in(&mut self) {
         if let Some(ref vec) = self.val_names {
--- a/third_party/rust/clap/src/args/arg_matcher.rs
+++ b/third_party/rust/clap/src/args/arg_matcher.rs
@@ -1,10 +1,11 @@
 // Std
 use std::collections::hash_map::{Entry, Iter};
+use std::collections::HashMap;
 use std::ffi::OsStr;
 use std::ops::Deref;
 use std::mem;
 
 // Internal
 use args::{ArgMatches, MatchedArg, SubCommand};
 use args::AnyArg;
 use args::settings::ArgSettings;
@@ -15,41 +16,55 @@ pub struct ArgMatcher<'a>(pub ArgMatches
 
 impl<'a> Default for ArgMatcher<'a> {
     fn default() -> Self { ArgMatcher(ArgMatches::default()) }
 }
 
 impl<'a> ArgMatcher<'a> {
     pub fn new() -> Self { ArgMatcher::default() }
 
-    pub fn propagate(&mut self, arg: &'a str) {
-        debugln!("ArgMatcher::propagate: arg={}", arg);
-        let vals: Vec<_> = if let Some(ma) = self.get(arg) {
-            ma.vals.clone()
-        } else {
-            debugln!("ArgMatcher::propagate: arg wasn't used");
-            return;
-        };
+    pub fn propagate_globals(&mut self, global_arg_vec : &[&'a str]) {
+        debugln!("ArgMatcher::get_global_values: global_arg_vec={:?}", global_arg_vec);
+        let mut vals_map = HashMap::new();
+        self.fill_in_global_values(global_arg_vec, &mut vals_map);
+    }
+
+    fn fill_in_global_values(
+        &mut self, 
+        global_arg_vec: &[&'a str], 
+        vals_map: &mut HashMap<&'a str, MatchedArg> 
+    ) {
+        for global_arg in global_arg_vec {
+            if let Some(ma) = self.get(global_arg) {
+                // We have to check if the parent's global arg wasn't used but still exists
+                // such as from a default value.
+                //
+                // For example, `myprog subcommand --global-arg=value` where --global-arg defines
+                // a default value of `other` myprog would have an existing MatchedArg for
+                // --global-arg where the value is `other`, however the occurs will be 0.
+                let to_update = if let Some(parent_ma) = vals_map.get(global_arg) {
+                    if parent_ma.occurs > 0 && ma.occurs == 0 {
+                        parent_ma.clone()
+                    } else {
+                        ma.clone()
+                    }
+                } else {
+                    ma.clone()
+                };
+                vals_map.insert(global_arg, to_update);
+            }
+        }
         if let Some(ref mut sc) = self.0.subcommand {
-            {
-                let sma = (*sc).matches.args.entry(arg).or_insert_with(|| {
-                    let mut gma = MatchedArg::new();
-                    gma.occurs += 1;
-                    gma.vals = vals.clone();
-                    gma
-                });
-                if sma.vals.is_empty() {
-                    sma.vals = vals.clone();
-                }
-            }
             let mut am = ArgMatcher(mem::replace(&mut sc.matches, ArgMatches::new()));
-            am.propagate(arg);
+            am.fill_in_global_values(global_arg_vec, vals_map);
             mem::swap(&mut am.0, &mut sc.matches);
-        } else {
-            debugln!("ArgMatcher::propagate: Subcommand wasn't used");
+        }
+
+        for (name, matched_arg) in vals_map.into_iter() {
+            self.0.args.insert(name, matched_arg.clone());
         }
     }
 
     pub fn get_mut(&mut self, arg: &str) -> Option<&mut MatchedArg> { self.0.args.get_mut(arg) }
 
     pub fn get(&self, arg: &str) -> Option<&MatchedArg> { self.0.args.get(arg) }
 
     pub fn remove(&mut self, arg: &str) { self.0.args.remove(arg); }
--- a/third_party/rust/clap/src/args/arg_matches.rs
+++ b/third_party/rust/clap/src/args/arg_matches.rs
@@ -174,17 +174,17 @@ impl<'a> ArgMatches<'a> {
     ///                             OsString::from_vec(vec![b'H', b'i', b' ', 0xe9, b'!'])]);
     /// assert_eq!(&*m.value_of_os("arg").unwrap().as_bytes(), [b'H', b'i', b' ', 0xe9, b'!']);
     /// ```
     /// [`String`]: https://doc.rust-lang.org/std/string/struct.String.html
     /// [`ArgMatches::values_of_os`]: ./struct.ArgMatches.html#method.values_of_os
     pub fn value_of_os<S: AsRef<str>>(&self, name: S) -> Option<&OsStr> {
         self.args
             .get(name.as_ref())
-            .map_or(None, |arg| arg.vals.get(0).map(|v| v.as_os_str()))
+            .and_then(|arg| arg.vals.get(0).map(|v| v.as_os_str()))
     }
 
     /// Gets a [`Values`] struct which implements [`Iterator`] for values of a specific argument
     /// (i.e. an argument that takes multiple values at runtime). If the option wasn't present at
     /// runtime it returns `None`
     ///
     /// # Panics
     ///
@@ -563,31 +563,38 @@ impl<'a> Iterator for Values<'a> {
 
 impl<'a> DoubleEndedIterator for Values<'a> {
     fn next_back(&mut self) -> Option<&'a str> { self.iter.next_back() }
 }
 
 impl<'a> ExactSizeIterator for Values<'a> {}
 
 /// Creates an empty iterator.
-impl Default for Values<'static> {
+impl<'a> Default for Values<'a> {
     fn default() -> Self {
         static EMPTY: [OsString; 0] = [];
         // This is never called because the iterator is empty:
         fn to_str_slice(_: &OsString) -> &str { unreachable!() };
         Values { iter: EMPTY[..].iter().map(to_str_slice) }
     }
 }
 
 #[test]
 fn test_default_values() {
     let mut values: Values = Values::default();
     assert_eq!(values.next(), None);
 }
 
+#[test]
+fn test_default_values_with_shorter_lifetime() {
+    let matches = ArgMatches::new();
+    let mut values = matches.values_of("").unwrap_or_default();
+    assert_eq!(values.next(), None);
+}
+
 /// An iterator for getting multiple values out of an argument via the [`ArgMatches::values_of_os`]
 /// method. Usage of this iterator allows values which contain invalid UTF-8 code points unlike
 /// [`Values`].
 ///
 /// # Examples
 ///
 #[cfg_attr(not(unix), doc=" ```ignore")]
 #[cfg_attr(    unix , doc=" ```")]
@@ -617,22 +624,29 @@ impl<'a> Iterator for OsValues<'a> {
     fn size_hint(&self) -> (usize, Option<usize>) { self.iter.size_hint() }
 }
 
 impl<'a> DoubleEndedIterator for OsValues<'a> {
     fn next_back(&mut self) -> Option<&'a OsStr> { self.iter.next_back() }
 }
 
 /// Creates an empty iterator.
-impl Default for OsValues<'static> {
+impl<'a> Default for OsValues<'a> {
     fn default() -> Self {
         static EMPTY: [OsString; 0] = [];
         // This is never called because the iterator is empty:
         fn to_str_slice(_: &OsString) -> &OsStr { unreachable!() };
         OsValues { iter: EMPTY[..].iter().map(to_str_slice) }
     }
 }
 
 #[test]
 fn test_default_osvalues() {
     let mut values: OsValues = OsValues::default();
     assert_eq!(values.next(), None);
 }
+
+#[test]
+fn test_default_osvalues_with_shorter_lifetime() {
+    let matches = ArgMatches::new();
+    let mut values = matches.values_of_os("").unwrap_or_default();
+    assert_eq!(values.next(), None);
+}
--- a/third_party/rust/clap/src/completions/fish.rs
+++ b/third_party/rust/clap/src/completions/fish.rs
@@ -35,16 +35,21 @@ end
             .to_string();
 
         let mut buffer = detect_subcommand_function;
         gen_fish_inner(command, self, &command.to_string(), &mut buffer);
         w!(buf, buffer.as_bytes());
     }
 }
 
+// Escape string inside single quotes
+fn escape_string(string: &str) -> String {
+    string.replace("\\", "\\\\").replace("'", "\\'")
+}
+
 fn gen_fish_inner(root_command: &str, comp_gen: &FishGen, parent_cmds: &str, buffer: &mut String) {
     debugln!("FishGen::gen_fish_inner;");
     // example :
     //
     // complete
     //      -c {command}
     //      -d "{description}"
     //      -s {short}
@@ -62,17 +67,17 @@ fn gen_fish_inner(root_command: &str, co
         let mut template = basic_template.clone();
         if let Some(data) = option.s.short {
             template.push_str(format!(" -s {}", data).as_str());
         }
         if let Some(data) = option.s.long {
             template.push_str(format!(" -l {}", data).as_str());
         }
         if let Some(data) = option.b.help {
-            template.push_str(format!(" -d \"{}\"", data).as_str());
+            template.push_str(format!(" -d '{}'", escape_string(data)).as_str());
         }
         if let Some(ref data) = option.v.possible_vals {
             template.push_str(format!(" -r -f -a \"{}\"", data.join(" ")).as_str());
         }
         buffer.push_str(template.as_str());
         buffer.push_str("\n");
     }
 
@@ -80,28 +85,28 @@ fn gen_fish_inner(root_command: &str, co
         let mut template = basic_template.clone();
         if let Some(data) = flag.s.short {
             template.push_str(format!(" -s {}", data).as_str());
         }
         if let Some(data) = flag.s.long {
             template.push_str(format!(" -l {}", data).as_str());
         }
         if let Some(data) = flag.b.help {
-            template.push_str(format!(" -d \"{}\"", data).as_str());
+            template.push_str(format!(" -d '{}'", escape_string(data)).as_str());
         }
         buffer.push_str(template.as_str());
         buffer.push_str("\n");
     }
 
     for subcommand in &comp_gen.p.subcommands {
         let mut template = basic_template.clone();
         template.push_str(" -f");
         template.push_str(format!(" -a \"{}\"", &subcommand.p.meta.name).as_str());
         if let Some(data) = subcommand.p.meta.about {
-            template.push_str(format!(" -d \"{}\"", &data).as_str())
+            template.push_str(format!(" -d '{}'", escape_string(data)).as_str())
         }
         buffer.push_str(template.as_str());
         buffer.push_str("\n");
     }
 
     // generate options of subcommands
     for subcommand in &comp_gen.p.subcommands {
         let sub_comp_gen = FishGen::new(&subcommand.p);
--- a/third_party/rust/clap/src/completions/zsh.rs
+++ b/third_party/rust/clap/src/completions/zsh.rs
@@ -287,22 +287,30 @@ fn get_args_of(p: &Parser) -> String {
     if !sc.is_empty() {
         ret.push(sc);
     }
     ret.push(String::from("&& ret=0"));
 
     ret.join("\n")
 }
 
+// Escape string inside single quotes and brackets
+fn escape_string(string: &str) -> String {
+    string.replace("\\", "\\\\")
+        .replace("'", "'\\''")
+        .replace("[", "\\[")
+        .replace("]", "\\]")
+}
+
 fn write_opts_of(p: &Parser) -> String {
     debugln!("write_opts_of;");
     let mut ret = vec![];
     for o in p.opts() {
         debugln!("write_opts_of:iter: o={}", o.name());
-        let help = o.help().unwrap_or("").replace("[", "\\[").replace("]", "\\]");
+        let help = o.help().map_or(String::new(), escape_string);
         let mut conflicts = get_zsh_arg_conflicts!(p, o, INTERNAL_ERROR_MSG);
         conflicts = if conflicts.is_empty() {
             String::new()
         } else {
             format!("({})", conflicts)
         };
 
         let multiple = if o.is_set(ArgSettings::Multiple) {
@@ -311,28 +319,28 @@ fn write_opts_of(p: &Parser) -> String {
             ""
         };
         let pv = if let Some(pv_vec) = o.possible_vals() {
             format!(": :({})", pv_vec.join(" "))
         } else {
             String::new()
         };
         if let Some(short) = o.short() {
-            let s = format!("\"{conflicts}{multiple}-{arg}+[{help}]{possible_values}\" \\",
+            let s = format!("'{conflicts}{multiple}-{arg}+[{help}]{possible_values}' \\",
                 conflicts = conflicts,
                 multiple = multiple,
                 arg = short,
                 possible_values = pv,
                 help = help);
 
             debugln!("write_opts_of:iter: Wrote...{}", &*s);
             ret.push(s);
         }
         if let Some(long) = o.long() {
-            let l = format!("\"{conflicts}{multiple}--{arg}+[{help}]{possible_values}\" \\",
+            let l = format!("'{conflicts}{multiple}--{arg}+[{help}]{possible_values}' \\",
                 conflicts = conflicts,
                 multiple = multiple,
                 arg = long,
                 possible_values = pv,
                 help = help);
 
             debugln!("write_opts_of:iter: Wrote...{}", &*l);
             ret.push(l);
@@ -342,42 +350,42 @@ fn write_opts_of(p: &Parser) -> String {
     ret.join("\n")
 }
 
 fn write_flags_of(p: &Parser) -> String {
     debugln!("write_flags_of;");
     let mut ret = vec![];
     for f in p.flags() {
         debugln!("write_flags_of:iter: f={}", f.name());
-        let help = f.help().unwrap_or("").replace("[", "\\[").replace("]", "\\]");
+        let help = f.help().map_or(String::new(), escape_string);
         let mut conflicts = get_zsh_arg_conflicts!(p, f, INTERNAL_ERROR_MSG);
         conflicts = if conflicts.is_empty() {
             String::new()
         } else {
             format!("({})", conflicts)
         };
 
         let multiple = if f.is_set(ArgSettings::Multiple) {
             "*"
         } else {
             ""
         };
         if let Some(short) = f.short() {
-            let s = format!("\"{conflicts}{multiple}-{arg}[{help}]\" \\",
+            let s = format!("'{conflicts}{multiple}-{arg}[{help}]' \\",
                 multiple = multiple,
                 conflicts = conflicts,
                 arg = short,
                 help = help);
 
             debugln!("write_flags_of:iter: Wrote...{}", &*s);
             ret.push(s);
         }
 
         if let Some(long) = f.long() {
-            let l = format!("\"{conflicts}{multiple}--{arg}[{help}]\" \\",
+            let l = format!("'{conflicts}{multiple}--{arg}[{help}]' \\",
                 conflicts = conflicts,
                 multiple = multiple,
                 arg = long,
                 help = help);
 
             debugln!("write_flags_of:iter: Wrote...{}", &*l);
             ret.push(l);
         }
--- a/third_party/rust/clap/src/lib.rs
+++ b/third_party/rust/clap/src/lib.rs
@@ -33,26 +33,26 @@
 //! this repository or the [video tutorials](https://www.youtube.com/playlist?list=PLza5oFLQGTl2Z5T8g1pRkIynR3E0_pc7U).
 //!
 //! **NOTE:** All of these examples are functionally the same, but show different styles in which to
 //! use `clap`
 //!
 //! The first example shows a method that allows more advanced configuration options (not shown in
 //! this small example), or even dynamically generating arguments when desired. The downside is it's
 //! more verbose.
-//! 
+//!
 //! ```no_run
 //! // (Full example with detailed comments in examples/01b_quick_example.rs)
 //! //
 //! // This example demonstrates clap's full 'builder pattern' style of creating arguments which is
 //! // more verbose, but allows easier editing, and at times more advanced options, or the possibility
 //! // to generate arguments dynamically.
 //! extern crate clap;
 //! use clap::{Arg, App, SubCommand};
-//! 
+//!
 //! fn main() {
 //!     let matches = App::new("My Super Program")
 //!                           .version("1.0")
 //!                           .author("Kevin K. <kbknapp@gmail.com>")
 //!                           .about("Does awesome things")
 //!                           .arg(Arg::with_name("config")
 //!                                .short("c")
 //!                                .long("config")
@@ -70,87 +70,87 @@
 //!                           .subcommand(SubCommand::with_name("test")
 //!                                       .about("controls testing features")
 //!                                       .version("1.3")
 //!                                       .author("Someone E. <someone_else@other.com>")
 //!                                       .arg(Arg::with_name("debug")
 //!                                           .short("d")
 //!                                           .help("print debug information verbosely")))
 //!                           .get_matches();
-//! 
+//!
 //!     // Gets a value for config if supplied by user, or defaults to "default.conf"
 //!     let config = matches.value_of("config").unwrap_or("default.conf");
 //!     println!("Value for config: {}", config);
-//! 
+//!
 //!     // Calling .unwrap() is safe here because "INPUT" is required (if "INPUT" wasn't
 //!     // required we could have used an 'if let' to conditionally get the value)
 //!     println!("Using input file: {}", matches.value_of("INPUT").unwrap());
-//! 
+//!
 //!     // Vary the output based on how many times the user used the "verbose" flag
 //!     // (i.e. 'myprog -v -v -v' or 'myprog -vvv' vs 'myprog -v'
 //!     match matches.occurrences_of("v") {
 //!         0 => println!("No verbose info"),
 //!         1 => println!("Some verbose info"),
 //!         2 => println!("Tons of verbose info"),
 //!         3 | _ => println!("Don't be crazy"),
 //!     }
-//! 
+//!
 //!     // You can handle information about subcommands by requesting their matches by name
 //!     // (as below), requesting just the name used, or both at the same time
 //!     if let Some(matches) = matches.subcommand_matches("test") {
 //!         if matches.is_present("debug") {
 //!             println!("Printing debug info...");
 //!         } else {
 //!             println!("Printing normally...");
 //!         }
 //!     }
-//! 
+//!
 //!     // more program logic goes here...
 //! }
 //! ```
-//! 
+//!
 //! The next example shows a far less verbose method, but sacrifices some of the advanced
 //! configuration options (not shown in this small example). This method also takes a *very* minor
 //! runtime penalty.
-//! 
+//!
 //! ```no_run
 //! // (Full example with detailed comments in examples/01a_quick_example.rs)
 //! //
 //! // This example demonstrates clap's "usage strings" method of creating arguments
 //! // which is less verbose
 //! extern crate clap;
 //! use clap::{Arg, App, SubCommand};
-//! 
+//!
 //! fn main() {
 //!     let matches = App::new("myapp")
 //!                           .version("1.0")
 //!                           .author("Kevin K. <kbknapp@gmail.com>")
 //!                           .about("Does awesome things")
 //!                           .args_from_usage(
 //!                               "-c, --config=[FILE] 'Sets a custom config file'
 //!                               <INPUT>              'Sets the input file to use'
 //!                               -v...                'Sets the level of verbosity'")
 //!                           .subcommand(SubCommand::with_name("test")
 //!                                       .about("controls testing features")
 //!                                       .version("1.3")
 //!                                       .author("Someone E. <someone_else@other.com>")
 //!                                       .arg_from_usage("-d, --debug 'Print debug information'"))
 //!                           .get_matches();
-//! 
+//!
 //!     // Same as previous example...
 //! }
 //! ```
-//! 
+//!
 //! This third method shows how you can use a YAML file to build your CLI and keep your Rust source
 //! tidy or support multiple localized translations by having different YAML files for each
 //! localization.
 //!
 //! First, create the `cli.yml` file to hold your CLI options, but it could be called anything we
 //! like:
-//! 
+//!
 //! ```yaml
 //! name: myapp
 //! version: "1.0"
 //! author: Kevin K. <kbknapp@gmail.com>
 //! about: Does awesome things
 //! args:
 //!     - config:
 //!         short: c
@@ -171,383 +171,387 @@
 //!         about: controls testing features
 //!         version: "1.3"
 //!         author: Someone E. <someone_else@other.com>
 //!         args:
 //!             - debug:
 //!                 short: d
 //!                 help: print debug information
 //! ```
-//! 
+//!
 //! Since this feature requires additional dependencies that not everyone may want, it is *not*
 //! compiled in by default and we need to enable a feature flag in Cargo.toml:
 //!
-//! Simply change your `clap = "~2.19.0"` to `clap = {version = "~2.19.0", features = ["yaml"]}`.
+//! Simply change your `clap = "~2.27.0"` to `clap = {version = "~2.27.0", features = ["yaml"]}`.
 //!
 //! At last we create our `main.rs` file just like we would have with the previous two examples:
-//! 
+//!
 //! ```ignore
 //! // (Full example with detailed comments in examples/17_yaml.rs)
 //! //
 //! // This example demonstrates clap's building from YAML style of creating arguments which is far
 //! // more clean, but takes a very small performance hit compared to the other two methods.
 //! #[macro_use]
 //! extern crate clap;
 //! use clap::App;
-//! 
+//!
 //! fn main() {
 //!     // The YAML file is found relative to the current file, similar to how modules are found
 //!     let yaml = load_yaml!("cli.yml");
 //!     let matches = App::from_yaml(yaml).get_matches();
-//! 
+//!
 //!     // Same as previous examples...
 //! }
 //! ```
-//! 
+//!
 //! Finally there is a macro version, which is like a hybrid approach offering the speed of the
 //! builder pattern (the first example), but without all the verbosity.
-//! 
+//!
 //! ```no_run
 //! #[macro_use]
 //! extern crate clap;
-//! 
+//!
 //! fn main() {
 //!     let matches = clap_app!(myapp =>
 //!         (version: "1.0")
 //!         (author: "Kevin K. <kbknapp@gmail.com>")
 //!         (about: "Does awesome things")
 //!         (@arg CONFIG: -c --config +takes_value "Sets a custom config file")
 //!         (@arg INPUT: +required "Sets the input file to use")
 //!         (@arg debug: -d ... "Sets the level of debugging information")
 //!         (@subcommand test =>
 //!             (about: "controls testing features")
 //!             (version: "1.3")
 //!             (author: "Someone E. <someone_else@other.com>")
 //!             (@arg verbose: -v --verbose "Print test information verbosely")
 //!         )
 //!     ).get_matches();
-//! 
+//!
 //!     // Same as before...
 //! }
 //! ```
-//! 
+//!
 //! If you were to compile any of the above programs and run them with the flag `--help` or `-h` (or
 //! `help` subcommand, since we defined `test` as a subcommand) the following would be output
-//! 
+//!
 //! ```text
 //! $ myprog --help
 //! My Super Program 1.0
 //! Kevin K. <kbknapp@gmail.com>
 //! Does awesome things
-//! 
+//!
 //! USAGE:
 //!     MyApp [FLAGS] [OPTIONS] <INPUT> [SUBCOMMAND]
-//! 
+//!
 //! FLAGS:
 //!     -h, --help       Prints this message
 //!     -v               Sets the level of verbosity
 //!     -V, --version    Prints version information
-//! 
+//!
 //! OPTIONS:
 //!     -c, --config <FILE>    Sets a custom config file
-//! 
+//!
 //! ARGS:
 //!     INPUT    The input file to use
-//! 
+//!
 //! SUBCOMMANDS:
 //!     help    Prints this message
 //!     test    Controls testing features
 //! ```
-//! 
+//!
 //! **NOTE:** You could also run `myapp test --help` to see similar output and options for the
 //! `test` subcommand.
-//! 
+//!
 //! ## Try it!
-//! 
+//!
 //! ### Pre-Built Test
-//! 
+//!
 //! To try out the pre-built example, use the following steps:
-//! 
+//!
 //! * Clone the repository `$ git clone https://github.com/kbknapp/clap-rs && cd clap-rs/tests`
 //! * Compile the example `$ cargo build --release`
 //! * Run the help info `$ ./target/release/claptests --help`
 //! * Play with the arguments!
-//! 
+//!
 //! ### BYOB (Build Your Own Binary)
-//! 
+//!
 //! To test out `clap`'s default auto-generated help/version follow these steps:
 //!
 //! * Create a new cargo project `$ cargo new fake --bin && cd fake`
 //! * Add `clap` to your `Cargo.toml`
 //!
 //! ```toml
 //! [dependencies]
 //! clap = "2"
 //! ```
-//! 
+//!
 //! * Add the following to your `src/main.rs`
-//! 
+//!
 //! ```no_run
 //! extern crate clap;
 //! use clap::App;
-//! 
+//!
 //! fn main() {
 //!   App::new("fake").version("v1.0-beta").get_matches();
 //! }
 //! ```
-//! 
+//!
 //! * Build your program `$ cargo build --release`
 //! * Run with help or version `$ ./target/release/fake --help` or `$ ./target/release/fake
 //! --version`
-//! 
+//!
 //! ## Usage
-//! 
+//!
 //! For full usage, add `clap` as a dependency in your `Cargo.toml` (it is **highly** recommended to
 //! use the `~major.minor.patch` style versions in your `Cargo.toml`, for more information see
 //! [Compatibility Policy](#compatibility-policy)) to use from crates.io:
-//! 
+//!
 //! ```toml
 //! [dependencies]
-//! clap = "~2.19.0"
+//! clap = "~2.27.0"
 //! ```
-//! 
+//!
 //! Or get the latest changes from the master branch at github:
-//! 
+//!
 //! ```toml
 //! [dependencies.clap]
 //! git = "https://github.com/kbknapp/clap-rs.git"
 //! ```
-//! 
+//!
 //! Add `extern crate clap;` to your crate root.
-//! 
-//! Define a list of valid arguments for your program (see the 
+//!
+//! Define a list of valid arguments for your program (see the
 //! [documentation](https://docs.rs/clap/) or [examples/](examples) directory of this repo)
-//! 
+//!
 //! Then run `cargo build` or `cargo update && cargo build` for your project.
-//! 
+//!
 //! ### Optional Dependencies / Features
-//! 
+//!
 //! #### Features enabled by default
-//! 
+//!
 //! * `suggestions`: Turns on the `Did you mean '--myoption'?` feature for when users make typos. (builds dependency `strsim`)
 //! * `color`: Turns on colored error messages. This feature only works on non-Windows OSs. (builds dependency `ansi-term` and `atty`)
-//! * `wrap_help`: Wraps the help at the actual terminal width when available, instead of 120 chracters. (builds dependency `term_size`)
-//! 
+//! * `wrap_help`: Wraps the help at the actual terminal width when
+//!  available, instead of 120 chracters. (builds dependency `textwrap`
+//! with feature `term_size`)
+//!
 //! To disable these, add this to your `Cargo.toml`:
-//! 
+//!
 //! ```toml
 //! [dependencies.clap]
-//! version = "~2.19.0"
+//! version = "~2.27.0"
 //! default-features = false
 //! ```
-//! 
+//!
 //! You can also selectively enable only the features you'd like to include, by adding:
-//! 
+//!
 //! ```toml
 //! [dependencies.clap]
-//! version = "~2.19.0"
+//! version = "~2.27.0"
 //! default-features = false
-//! 
+//!
 //! # Cherry-pick the features you'd like to use
 //! features = [ "suggestions", "color" ]
 //! ```
-//! 
+//!
 //! #### Opt-in features
-//! 
+//!
 //! * **"yaml"**: Enables building CLIs from YAML documents. (builds dependency `yaml-rust`)
 //! * **"unstable"**: Enables unstable `clap` features that may change from release to release
-//! 
+//!
 //! ### Dependencies Tree
-//! 
-//! The following graphic depicts `clap`s dependency graph (generated using 
+//!
+//! The following graphic depicts `clap`s dependency graph (generated using
 //! [cargo-graph](https://github.com/kbknapp/cargo-graph)).
-//! 
+//!
 //!  * **Dashed** Line: Optional dependency
 //!  * **Red** Color: **NOT** included by default (must use cargo `features` to enable)
 //!  * **Blue** Color: Dev dependency, only used while developing.
-//! 
+//!
 //! ![clap dependencies](clap_dep_graph.png)
-//! 
+//!
 //! ### More Information
-//! 
+//!
 //! You can find complete documentation on the [docs.rs](https://docs.rs/clap/) for this project.
-//! 
+//!
 //! You can also find usage examples in the [examples/](examples) directory of this repo.
-//! 
+//!
 //! #### Video Tutorials
-//! 
+//!
 //! There's also the video tutorial series [Argument Parsing with Rust v2](https://www.youtube.com/playlist?list=PLza5oFLQGTl2Z5T8g1pRkIynR3E0_pc7U).
-//! 
+//!
 //! These videos slowly trickle out as I finish them and currently a work in progress.
-//! 
+//!
 //! ## How to Contribute
-//! 
+//!
 //! Contributions are always welcome! And there is a multitude of ways in which you can help
 //! depending on what you like to do, or are good at. Anything from documentation, code cleanup,
 //! issue completion, new features, you name it, even filing issues is contributing and greatly
 //! appreciated!
 //!
 //! Another really great way to help is if you find an interesting, or helpful way in which to use
 //! `clap`. You can either add it to the [examples/](examples) directory, or file an issue and tell
 //! me. I'm all about giving credit where credit is due :)
-//! 
+//!
 //! Please read [CONTRIBUTING.md](.github/CONTRIBUTING.md) before you start contributing.
-//! 
-//! 
+//!
+//!
 //! ### Testing Code
-//! 
+//!
 //! To test with all features both enabled and disabled, you can run theese commands:
-//! 
+//!
 //! ```text
 //! $ cargo test --no-default-features
 //! $ cargo test --features "yaml unstable"
 //! ```
-//! 
+//!
 //! Alternatively, if you have [`just`](https://github.com/casey/just) installed you can run the
 //! prebuilt recipies. *Not* using `just` is prfeclty fine as well, it simply bundles commands
 //! automatically.
-//! 
+//!
 //! For example, to test the code, as above simply run:
-//! 
+//!
 //! ```text
 //! $ just run-tests`
 //! ```
-//! 
+//!
 //! From here on, I will lis the appropriate `cargo` command as well as the `just` command.
-//! 
+//!
 //! Sometimes it's helpful to only run a subset of the tests, which can be done via:
-//! 
+//!
 //! ```text
 //! $ cargo test --test <test_name>
-//! 
+//!
 //! # Or
-//! 
+//!
 //! $ just run-test <test_name>
 //! ```
-//! 
+//!
 //! ### Linting Code
-//! 
+//!
 //! During the CI process `clap` runs against many different lints using
 //! [`clippy`](https://github.com/Manishearth/rust-clippy). In order to check if these lints pass on
 //! your own computer prior to submitting a PR you'll need a nightly compiler.
-//! 
+//!
 //! In order to check the code for lints run either:
-//! 
+//!
 //! ```text
 //! $ rustup override add nightly
 //! $ cargo build --features lints
 //! $ rustup override remove
-//! 
+//!
 //! # Or
-//! 
+//!
 //! $ just lint
 //! ```
-//! 
+//!
 //! ### Debugging Code
-//! 
+//!
 //! Another helpful technique is to see the `clap` debug output while developing features. In order
 //! to see the debug output while running the full test suite or individual tests, run:
-//! 
+//!
 //! ```text
 //! $ cargo test --features debug
-//! 
+//!
 //! # Or for individual tests
 //! $ cargo test --test <test_name> --features debug
-//! 
+//!
 //! # The corresponding just command for individual debugging tests is:
 //! $ just debug <test_name>
 //! ```
-//! 
+//!
 //! ### Goals
-//! 
+//!
 //! There are a few goals of `clap` that I'd like to maintain throughout contributions. If your
 //! proposed changes break, or go against any of these goals we'll discuss the changes further
 //! before merging (but will *not* be ignored, all contributes are welcome!). These are by no means
 //! hard-and-fast rules, as I'm no expert and break them myself from time to time (even if by
 //! mistake or ignorance).
-//! 
+//!
 //! * Remain backwards compatible when possible
 //!   - If backwards compatibility *must* be broken, use deprecation warnings if at all possible before
 //!   removing legacy code - This does not apply for security concerns
 //! * Parse arguments quickly
 //!   - Parsing of arguments shouldn't slow down usage of the main program - This is also true of
 //!   generating help and usage information (although *slightly* less stringent, as the program is about
 //!   to exit)
 //! * Try to be cognizant of memory usage
 //!   - Once parsing is complete, the memory footprint of `clap` should be low since the  main program
 //!   is the star of the show
 //! * `panic!` on *developer* error, exit gracefully on *end-user* error
-//! 
+//!
 //! ### Compatibility Policy
 //!
 //! Because `clap` takes `SemVer` and compatibility seriously, this is the official policy regarding
 //! breaking changes and previous versions of Rust.
 //!
 //! `clap` will pin the minimum required version of Rust to the CI builds. Bumping the minimum
 //! version of Rust is considered a minor breaking change, meaning *at a minimum* the minor version
 //! of `clap` will be bumped.
 //!
 //! In order to keep from being suprised of breaking changes, it is **highly** recommended to use
 //! the `~major.minor.patch` style in your `Cargo.toml`:
 //!
-//! ```toml 
-//! [dependencies] clap = "~2.19.0"
+//! ```toml
+//! [dependencies] clap = "~2.27.0"
 //! ```
 //!
 //! This will cause *only* the patch version to be updated upon a `cargo update` call, and therefore
 //! cannot break due to new features, or bumped minimum versions of Rust.
 //!
 //! #### Minimum Version of Rust
 //!
 //! `clap` will officially support current stable Rust, minus two releases, but may work with prior
-//! releases as well. For example, current stable Rust at the time of this writing is 1.13.0,
-//! meaning `clap` is guaranteed to compile with 1.11.0 and beyond. At the 1.14.0 release, `clap`
-//! will be guaranteed to compile with 1.12.0 and beyond, etc.
-//! 
+//! releases as well. For example, current stable Rust at the time of this writing is 1.21.0,
+//! meaning `clap` is guaranteed to compile with 1.19.0 and beyond. At the 1.22.0 release, `clap`
+//! will be guaranteed to compile with 1.20.0 and beyond, etc.
+//!
 //! Upon bumping the minimum version of Rust (assuming it's within the stable-2 range), it *must* be
 //! clearly annotated in the `CHANGELOG.md`
-//! 
+//!
 //! ## License
-//! 
+//!
 //! `clap` is licensed under the MIT license. Please read the [LICENSE-MIT](LICENSE-MIT) file in
 //! this repository for more information.
 
 #![crate_type= "lib"]
+#![doc(html_root_url = "https://docs.rs/clap/2.27.1")]
 #![deny(
         missing_docs,
         missing_debug_implementations,
         missing_copy_implementations,
         trivial_casts,
         unused_import_braces,
         unused_allocation)]
 // Lints we'd like to deny but are currently failing for upstream crates
 //      unused_qualifications       (bitflags, clippy)
 //      trivial_numeric_casts       (bitflags)
 #![cfg_attr(not(any(feature = "lints", feature = "nightly")), forbid(unstable_features))]
 #![cfg_attr(feature = "lints", feature(plugin))]
 #![cfg_attr(feature = "lints", plugin(clippy))]
-#![cfg_attr(feature = "lints", deny(warnings))]
+// Need to disable deny(warnings) while deprecations are active
+// #![cfg_attr(feature = "lints", deny(warnings))]
 #![cfg_attr(feature = "lints", allow(cyclomatic_complexity))]
 #![cfg_attr(feature = "lints", allow(doc_markdown))]
 #![cfg_attr(feature = "lints", allow(explicit_iter_loop))]
 
 #[cfg(feature = "suggestions")]
 extern crate strsim;
 #[cfg(feature = "color")]
 extern crate ansi_term;
 #[cfg(feature = "yaml")]
 extern crate yaml_rust;
 extern crate unicode_width;
 #[macro_use]
 extern crate bitflags;
+#[cfg(feature = "vec_map")]
 extern crate vec_map;
 #[cfg(feature = "wrap_help")]
 extern crate term_size;
 extern crate textwrap;
-extern crate unicode_segmentation;
 #[cfg(feature = "color")]
 extern crate atty;
 
 #[cfg(feature = "yaml")]
 pub use yaml_rust::YamlLoader;
 pub use args::{Arg, ArgGroup, ArgMatches, ArgSettings, SubCommand, Values, OsValues};
 pub use app::{App, AppSettings};
 pub use fmt::Format;
@@ -560,12 +564,13 @@ mod app;
 mod args;
 mod usage_parser;
 mod fmt;
 mod suggestions;
 mod errors;
 mod osstringext;
 mod strext;
 mod completions;
+mod map;
 
 const INTERNAL_ERROR_MSG: &'static str = "Fatal internal error. Please consider filing a bug \
                                           report at https://github.com/kbknapp/clap-rs/issues";
 const INVALID_UTF8: &'static str = "unexpected invalid UTF-8 code point";
--- a/third_party/rust/clap/src/macros.rs
+++ b/third_party/rust/clap/src/macros.rs
@@ -417,36 +417,39 @@ macro_rules! crate_version {
 #[cfg(not(feature="no_cargo"))]
 #[macro_export]
 macro_rules! crate_authors {
     ($sep:expr) => {{
         use std::ops::Deref;
         use std::sync::{ONCE_INIT, Once};
 
         #[allow(missing_copy_implementations)]
-        #[allow(non_camel_case_types)]
         #[allow(dead_code)]
-        struct CARGO_AUTHORS {__private_field: ()}
-        static CARGO_AUTHORS: CARGO_AUTHORS = CARGO_AUTHORS {__private_field: ()};
+        struct CargoAuthors { __private_field: () };
 
-        impl Deref for CARGO_AUTHORS {
-            type Target = String;
+        impl Deref for CargoAuthors {
+            type Target = str;
 
             #[allow(unsafe_code)]
-            fn deref<'a>(&'a self) -> &'a String {
+            fn deref(&self) -> &'static str {
+                static ONCE: Once = ONCE_INIT;
+                static mut VALUE: *const String = 0 as *const String;
+
                 unsafe {
-                    static mut LAZY: (*const String, Once) = (0 as *const String, ONCE_INIT);
+                    ONCE.call_once(|| {
+                        let s = env!("CARGO_PKG_AUTHORS").replace(':', $sep);
+                        VALUE = Box::into_raw(Box::new(s));
+                    });
 
-                    LAZY.1.call_once(|| LAZY.0 = Box::into_raw(Box::new(env!("CARGO_PKG_AUTHORS").replace(':', $sep))));
-                    &*LAZY.0
+                    &(*VALUE)[..]
                 }
             }
         }
 
-        &CARGO_AUTHORS[..]
+        &*CargoAuthors { __private_field: () }
     }};
     () => {
         env!("CARGO_PKG_AUTHORS")
     };
 }
 
 /// Allows you to pull the description from your Cargo.toml at compile time.
 ///
@@ -806,17 +809,17 @@ mod debug_macros {
 // Helper/deduplication macro for printing the correct number of spaces in help messages
 // used in:
 //    src/args/arg_builder/*.rs
 //    src/app/mod.rs
 macro_rules! write_nspaces {
     ($dst:expr, $num:expr) => ({
         debugln!("write_spaces!: num={}", $num);
         for _ in 0..$num {
-            try!($dst.write_all(b" "));
+            $dst.write_all(b" ")?;
         }
     })
 }
 
 // convenience macro for remove an item from a vec
 macro_rules! vec_remove_all {
     ($vec:expr, $to_rem:expr) => {
         debugln!("vec_remove_all! to_rem={:?}", $to_rem);
new file mode 100644
--- /dev/null
+++ b/third_party/rust/clap/src/map.rs
@@ -0,0 +1,84 @@
+#[cfg(feature = "vec_map")]
+pub use vec_map::{VecMap, Values};
+
+#[cfg(not(feature = "vec_map"))]
+pub use self::vec_map::{VecMap, Values};
+
+#[cfg(not(feature = "vec_map"))]
+mod vec_map {
+    use std::collections::BTreeMap;
+    use std::collections::btree_map;
+    use std::fmt::{self, Debug, Formatter};
+
+    #[derive(Clone, Default, Debug)]
+    pub struct VecMap<V> {
+        inner: BTreeMap<usize, V>,
+    }
+
+    impl<V> VecMap<V> {
+        pub fn new() -> Self {
+            VecMap { inner: Default::default() }
+        }
+
+        pub fn len(&self) -> usize {
+            self.inner.len()
+        }
+
+        pub fn is_empty(&self) -> bool {
+            self.inner.is_empty()
+        }
+
+        pub fn insert(&mut self, key: usize, value: V) -> Option<V> {
+            self.inner.insert(key, value)
+        }
+
+        pub fn values(&self) -> Values<V> {
+            self.inner.values()
+        }
+
+        pub fn iter(&self) -> Iter<V> {
+            Iter { inner: self.inner.iter() }
+        }
+
+        pub fn contains_key(&self, key: usize) -> bool {
+            self.inner.contains_key(&key)
+        }
+
+        pub fn entry(&mut self, key: usize) -> Entry<V> {
+            self.inner.entry(key)
+        }
+
+        pub fn get(&self, key: usize) -> Option<&V> {
+            self.inner.get(&key)
+        }
+    }
+
+    pub type Values<'a, V> = btree_map::Values<'a, usize, V>;
+
+    pub type Entry<'a, V> = btree_map::Entry<'a, usize, V>;
+
+    #[derive(Clone)]
+    pub struct Iter<'a, V: 'a> {
+        inner: btree_map::Iter<'a, usize, V>,
+    }
+
+    impl<'a, V: 'a + Debug> Debug for Iter<'a, V> {
+        fn fmt(&self, f: &mut Formatter) -> fmt::Result {
+            f.debug_list().entries(self.inner.clone()).finish()
+        }
+    }
+
+    impl<'a, V: 'a> Iterator for Iter<'a, V> {
+        type Item = (usize, &'a V);
+
+        fn next(&mut self) -> Option<Self::Item> {
+            self.inner.next().map(|(k, v)| (*k, v))
+        }
+    }
+
+    impl<'a, V: 'a> DoubleEndedIterator for Iter<'a, V> {
+        fn next_back(&mut self) -> Option<Self::Item> {
+            self.inner.next_back().map(|(k, v)| (*k, v))
+        }
+    }
+}
--- a/third_party/rust/clap/src/suggestions.rs
+++ b/third_party/rust/clap/src/suggestions.rs
@@ -53,25 +53,26 @@ pub fn did_you_mean_flag_suffix<'z, T, I
         }
         None => {
             for subcommand in subcommands {
                 let opts = subcommand.p.flags.iter().filter_map(|f| f.s.long).chain(
                     subcommand.p.opts.iter().filter_map(|o| o.s.long));
 
                 if let Some(candidate) = did_you_mean(arg, opts) {
                     let suffix = format!(
-                        "\n\tDid you mean to put '--{}' after the subcommand '{}'?",
-                        Format::Good(arg),
-                        Format::Good(candidate));
+                        "\n\tDid you mean to put '{}{}' after the subcommand '{}'?",
+                        Format::Good("--"),
+                        Format::Good(candidate),
+                        Format::Good(subcommand.get_name()));
                     return (suffix, Some(candidate));
                 }
             }
         }
     }
-    return (String::new(), None)
+    (String::new(), None)
 }
 
 /// Returns a suffix that can be empty, or is the standard 'did you mean' phrase
 pub fn did_you_mean_value_suffix<'z, T, I>(arg: &str, values: I) -> (String, Option<&'z str>)
     where T: AsRef<str> + 'z,
           I: IntoIterator<Item = &'z T>
 {
     match did_you_mean(arg, values) {
--- a/third_party/rust/clap/src/usage_parser.rs
+++ b/third_party/rust/clap/src/usage_parser.rs
@@ -1,15 +1,14 @@
-// Third Party
-use vec_map::VecMap;
 
 // Internal
 use INTERNAL_ERROR_MSG;
 use args::Arg;
 use args::settings::ArgSettings;
+use map::VecMap;
 
 #[derive(PartialEq, Debug)]
 enum UsageToken {
     Name,
     ValName,
     Short,
     Long,
     Help,
--- a/third_party/rust/flate2/.cargo-checksum.json
+++ b/third_party/rust/flate2/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"e33073c310c4bc45c4017b793e710c689fbf4fcbd618b3dee92a6343364ece0f","Cargo.toml":"7cccd970edc30578b4fa9fb27762ec77fbd31df0281d0c1d0a69ea16896216eb","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"b875d1d0ca491813f3a2469ea69d37dd667ad0c70f895e6bbda540c99e291154","appveyor.yml":"a39fd7664bf538147bfb494b9f9c96d6f898d9896a5d5e1806019f399cc44bff","src/bufreader.rs":"0a1213858056c8154066f45df7b261c052c6a2c55ec88bc21f56ad3f2748d8c4","src/crc.rs":"869b4cc79a61b6dda02253430c4ca09fd1efee51509a7552bdc0c8dc5bd2b6bb","src/deflate.rs":"4783d36a1a323c0004f2ebd3af7f6ac9c949cd1e7dc5fc54eacdc5d944098271","src/ffi.rs":"7bd962e85dc05b18c878dc3d5abb054f2c41f7b20a793d2ddbba755b7661fcfa","src/gz.rs":"d4fae4fbcf17b7ad7b233eee2027cfbeb7ed138b1efdf64068fdbcc7e1ade26e","src/lib.rs":"572a609457d29bc93340d65f561454c07d3638b4fb741906d1949232d410dc73","src/mem.rs":"51fa61421f1b235ace54596b3a0e4dcd2a67324dcd16d6552d7d6a7368935e50","src/zio.rs":"1d1fc161e40939b1f84da98a433d3b0adbf9e29baee578042c2919b123d0b66d","src/zlib.rs":"ecc52ab6b8034f0fdb89d3a01b75cc181160e44225160800448d183fed4ef2ee","tests/corrupt-file.gz":"083dd284aa1621916a2d0f66ea048c8d3ba7a722b22d0d618722633f51e7d39c","tests/good-file.gz":"87296963e53024a74752179ce7e54087565d358a85d3e65c3b37ef36eaa3d4a6","tests/good-file.txt":"bc4e03658a441fe2ad2df7cd2197144b87e41696f01e327b380e869cd9b485a0","tests/gunzip.rs":"3d2e0a80756474dc2b08f20071685117083765c4f1763456c676f1feeaff35e9","tests/multi.gz":"efa3341da052f95056314cc6920e02a3da15bdef30234b2552fb407812db5cc6","tests/multi.txt":"dbea9325179efe46ea2add94f7b6b745ca983fabb208dc6d34aa064623d7ee23","tests/tokio.rs":"d19defd6c369877f406ed8bd74683a257fde7de51f4161004cea4260faf4464d"},"package":"36df0166e856739905cd3d7e0b210fe818592211a008862599845e012d8d304c"}
\ No newline at end of file
+{"files":{".travis.yml":"98cf8c8df11438fb438cfe8226d1123bce6680832a4accf91f83614a10363466","Cargo.toml":"b143aa0bd29dbdd83e67e0d28f91f398e0a006d41a899a088c1b560af2bad5a8","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"2accc2c811f3cfa17753c9cbe1cb9856f6a5f52705dafc355e1d5494d2a81e2f","appveyor.yml":"7293e690b6b1fb75cbab1f72ffc5077dd145c806282969b595cc1a82ce1a2e62","examples/deflatedecoder-bufread.rs":"9066719a7b91c57792c1e305a808c12727c93938e936ac2ae16b0e174b82138f","examples/deflatedecoder-read.rs":"39ee43782a5bee7f808da7d32e1b5cd8b51e8be5e344ac11ad9be8a300bc7c85","examples/deflatedecoder-write.rs":"fd084e864a6f6ea6597b8baa2c6f2ab59c2d07da1c3aeb094ec4391c0266d0ad","examples/deflateencoder-bufread.rs":"9c1bd6d215095e338c5a6fc2b3c3b4685f836cae8f102a229d8571c17e2ece6a","examples/deflateencoder-read.rs":"805b677b584c3209ba46e7b4e9706e93d15ebe5f26e086760931fdecef14aeff","examples/deflateencoder-write.rs":"fa402135fa3d009aba4d492ff1287dc2a7cfd745c6fff37d3eb12fef924bf7f4","examples/flatereadext.rs":"656b9bc5352d30a4e6ba7d33a187bc4c1adc28ccb4bd7bffd67fa74c75da3a95","examples/gzbuilder.rs":"2bccaf7f3fb81d1251f410323a3f9a98d838754ce3d370e16ed15c97be5d91bc","examples/gzdecoder-bufread.rs":"76b208873eb2461d213cdf8b20c4062c8fc5dd17a874df12f120415b43d81da3","examples/gzdecoder-read.rs":"e90f4b05312341bdd3b9995b919903efd5be75a7815473d472c1a494446acac2","examples/gzencoder-bufread.rs":"d403cb34700a0c654e11d111e4f862b7a0ae88d05df39a2c8ecd163fe3bcf2f0","examples/gzencoder-read.rs":"c97c87b059da9c46e0d0ddf06ea4db7c22a3dac9e699ab81dbb2d4a8b8681d3a","examples/gzencoder-write.rs":"5ff4f9ea1f9facad50d08ef1687bb785b2f657d6897b7253cd1af32e912e6284","examples/gzmultidecoder-bufread.rs":"23a92037081675fbab811b1d1ac1037130f4f8a4f2f0642c0bf063da835c0c94","examples/gzmultidecoder-read.rs":"d34e50a1fcd5d6c8c25cb203561fd44f698679ba624fe1ecfbfe7b67adff40ba","examples/hello_world.txt":"d2a84f4b8b650937ec8f73cd8be2c74add5a911ba64df27458ed8229da804a26","examples/zlibdecoder-bufread.rs":"b0d5646607d29a3b6d1add6ce002fab781a55463e9bb749ffff22492e2be0618","examples/zlibdecoder-read.rs":"5f5497f7534750229c182a90e17f2522f46ded904ebf942169fcc86fc2503abd","examples/zlibdecoder-write.rs":"755f6beec5d25874611101d6785b4245f405364e21e45f54ff6915d11a563f53","examples/zlibencoder-bufread.rs":"e7ab4059b98c583382a9d8ec21210329dd150c534af864d23e6beed58bd94ac1","examples/zlibencoder-read.rs":"61853ef3c41e94f45eecedbb90964175ce13390e1a5a01c13326af474714e962","examples/zlibencoder-write.rs":"ec2b7bdacc5b517029c1bd7a3ce6fd399a8f760503a98e9d31dea50f69296e0a","src/bufreader.rs":"ebfbaf104b292a64e8b46076c1bbb680c2941753c02928e85cb5215897891d4a","src/crc.rs":"fc9147392c4b87255950e9bb65e75f1ddebe3d45bfc985980a3937e80f345aab","src/deflate/bufread.rs":"9bbf8b1111f112db2a6bed9b797b2acf055611f605294be29010b8fb7cb67ada","src/deflate/mod.rs":"1f8280ea4ab35c91f886b0373eacbc89da89d53876d4473aa4ab32a07dd098aa","src/deflate/read.rs":"88c2ac0e393fbd8604639b4730f377eeb8797366dd729d52e14236c964af2b02","src/deflate/write.rs":"db6a4782fb4d46fbc87344e59fe8b4155522a76f8ea9d9bdea8bb1398b639b49","src/ffi.rs":"0cab9ad8d3c0c2558cc2b3e9d0faa9c7fc94a0518896fb1a130e573f72aad05e","src/gz/bufread.rs":"b9f038d1ace807e97c4408ea0d1e5bc615697b7fc87fe4dc4183d99b6270b9c2","src/gz/mod.rs":"8a59e00a571f59bab43722000de3b128d443ff869c25e8d7a7f0eaa180055be9","src/gz/read.rs":"4e0c3560de39d7481484f4df6a6f012979421e257eebce247dab5f54a49407e7","src/gz/write.rs":"f5558769630a7f8d8d61a29f8625570ee50fa898b1aa3f3b7d24fcf50ecb2736","src/lib.rs":"aca4a46ac726cce6c67bf06719722b96006faf5330a8596099a9135fa54cfde9","src/mem.rs":"d8bf64e13e0a0bce49d4e3ee2522283f2d4541e2049aa928774d964398358ea6","src/zio.rs":"1076ceab3cee8a455ef8d199f66c0d0f19b1ae512421a776aaa50c9f6bacace5","src/zlib/bufread.rs":"464083100ca54e20643c7acfb6cd6ea96c928dca42667593997aa29d9d0de823","src/zlib/mod.rs":"6c959d5f7ba78ce42a2337327e1f730b0c529b853a13fbd8a59e9ba150763fa2","src/zlib/read.rs":"e963274f6013cb81b52510e7074f5c6554954a44b0391491cb831fff8c190290","src/zlib/write.rs":"0ce320af2aad71fe7ac91ba258ca348641dd7627bb51756dfb30e2e9ca9d9ad8","tests/corrupt-file.gz":"083dd284aa1621916a2d0f66ea048c8d3ba7a722b22d0d618722633f51e7d39c","tests/early-flush.rs":"6ff08e3e16722a61d141fc503a438bbb84c5beb3bdd28bbac9dfa03d3562cc3d","tests/good-file.gz":"87296963e53024a74752179ce7e54087565d358a85d3e65c3b37ef36eaa3d4a6","tests/good-file.txt":"bc4e03658a441fe2ad2df7cd2197144b87e41696f01e327b380e869cd9b485a0","tests/gunzip.rs":"3d2e0a80756474dc2b08f20071685117083765c4f1763456c676f1feeaff35e9","tests/multi.gz":"efa3341da052f95056314cc6920e02a3da15bdef30234b2552fb407812db5cc6","tests/multi.txt":"dbea9325179efe46ea2add94f7b6b745ca983fabb208dc6d34aa064623d7ee23","tests/tokio.rs":"d19defd6c369877f406ed8bd74683a257fde7de51f4161004cea4260faf4464d","tests/zero-write.rs":"027330824a7141963657efa26d99d7503a16492ed8779d7e316e22bba0e7f190"},"package":"e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423"}
\ No newline at end of file
--- a/third_party/rust/flate2/.travis.yml
+++ b/third_party/rust/flate2/.travis.yml
@@ -4,23 +4,23 @@ rust:
   - beta
   - nightly
 sudo: false
 before_script:
   - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
 script:
   - export CARGO_TARGET_DIR=`pwd`/target
   - cargo build --verbose
+  - rustdoc --test README.md -L target/debug/deps --extern flate2=target/debug/libflate2.rlib
   - cargo test --verbose
   - cargo test --verbose --features zlib
   - cargo test --verbose --features tokio
   - cargo test --verbose --features 'tokio zlib'
   - cargo test --verbose --features zlib --no-default-features
   - cargo clean && cargo build
-  - rustdoc --test README.md -L target/debug -L target/debug/deps
   - cargo doc --no-deps
   - cargo doc --no-deps --manifest-path=miniz-sys/Cargo.toml
 after_success:
   - travis-cargo --only nightly doc-upload
 env:
   global:
     secure: "PHVT7IaeP5nQQVwGHKwqCYBDp0QyetSlER7se2j2Xgfx+lw3Bu6VWH6VF04B636Gb0tHPN/sUCXSgGRcvDuy6XFOev4LfynoYxNKgHJYg2E34EP2QLwsFfnvE4iujaG3GJk3o935Y7OYGv2OP1HeG4Mv6JhQK0GLnNDBZQ65kWI="
 
--- a/third_party/rust/flate2/Cargo.toml
+++ b/third_party/rust/flate2/Cargo.toml
@@ -1,36 +1,61 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
 [package]
-
 name = "flate2"
+version = "0.2.20"
 authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.19"
-license = "MIT/Apache-2.0"
+description = "Bindings to miniz.c for DEFLATE compression and decompression exposed as\nReader/Writer streams. Contains bindings for zlib, deflate, and gzip-based\nstreams.\n"
+homepage = "https://github.com/alexcrichton/flate2-rs"
+documentation = "https://docs.rs/flate2"
 readme = "README.md"
 keywords = ["gzip", "flate", "zlib", "encoding"]
 categories = ["compression", "api-bindings"]
+license = "MIT/Apache-2.0"
 repository = "https://github.com/alexcrichton/flate2-rs"
-homepage = "https://github.com/alexcrichton/flate2-rs"
-documentation = "https://docs.rs/flate2"
-description = """
-Bindings to miniz.c for DEFLATE compression and decompression exposed as
-Reader/Writer streams. Contains bindings for zlib, deflate, and gzip-based
-streams.
-"""
+[dependencies.libc]
+version = "0.2"
 
-[workspace]
+[dependencies.libz-sys]
+version = "1.0"
+optional = true
+
+[dependencies.miniz-sys]
+version = "0.1.7"
+optional = true
 
-[dependencies]
-libc = "0.2"
-miniz-sys = { path = "miniz-sys", version = "0.1.7", optional = true }
-libz-sys = { version = "1.0", optional = true }
-tokio-io = { version = "0.1", optional = true }
-futures = { version = "0.1", optional = true }
+[dependencies.futures]
+version = "0.1"
+optional = true
 
-[dev-dependencies]
-rand = "0.3"
-quickcheck = { version = "0.4", default-features = false }
-tokio-core = "0.1"
+[dependencies.tokio-io]
+version = "0.1"
+optional = true
+[dev-dependencies.rand]
+version = "0.3"
+
+[dev-dependencies.quickcheck]
+version = "0.4"
+default-features = false
+
+[dev-dependencies.tokio-core]
+version = "0.1"
 
 [features]
 default = ["miniz-sys"]
 zlib = ["libz-sys"]
 tokio = ["tokio-io", "futures"]
+[badges.travis-ci]
+repository = "alexcrichton/flate2-rs"
+
+[badges.appveyor]
+repository = "alexcrichton/flate2-rs"
--- a/third_party/rust/flate2/README.md
+++ b/third_party/rust/flate2/README.md
@@ -1,14 +1,14 @@
 # flate2
 
 [![Build Status](https://travis-ci.org/alexcrichton/flate2-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/flate2-rs)
 [![Build status](https://ci.appveyor.com/api/projects/status/9tatexq47i3ee13k?svg=true)](https://ci.appveyor.com/project/alexcrichton/flate2-rs)
-
-[Documentation](https://docs.rs/flate2)
+[![Crates.io](https://img.shields.io/crates/v/flate2.svg?maxAge=2592000)](https://crates.io/crates/flate2)
+[![Documentation](https://docs.rs/flate2/badge.svg)](https://docs.rs/flate2)
 
 A streaming compression/decompression library for Rust. The underlying
 implementation by default uses [`miniz`](https://code.google.com/p/miniz/) but
 can optionally be configured to use the system zlib, if available.
 
 Supported formats:
 
 * deflate
--- a/third_party/rust/flate2/appveyor.yml
+++ b/third_party/rust/flate2/appveyor.yml
@@ -1,18 +1,24 @@
 environment:
   matrix:
   - TARGET: x86_64-pc-windows-msvc
+  - TARGET: x86_64-pc-windows-gnu
   - TARGET: i686-pc-windows-msvc
   - TARGET: i686-pc-windows-gnu
 install:
+  - ps: >-
+        If ($Env:TARGET -eq 'x86_64-pc-windows-gnu') {
+          $Env:PATH += ';C:\msys64\mingw64\bin'
+        } ElseIf ($Env:TARGET -eq 'i686-pc-windows-gnu') {
+          $Env:PATH += ';C:\MinGW\bin'
+        }
   - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
   - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
   - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
-  - SET PATH=%PATH%;C:\MinGW\bin
   - rustc -V
   - cargo -V
 
 build: false
 
 test_script:
   - cargo test --verbose --target %TARGET%
   - cargo test --verbose --target %TARGET% --features tokio
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/deflatedecoder-bufread.rs
@@ -0,0 +1,24 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::write::DeflateEncoder;
+use flate2::bufread::DeflateDecoder;
+
+// Compress a sample string and print it after transformation.
+fn main() {
+    let mut e = DeflateEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    let bytes = e.finish().unwrap();
+    println!("{}", decode_reader(bytes).unwrap());
+}
+
+// Uncompresses a Deflate Encoded vector of bytes and returns a string or error
+// Here &[u8] implements Read
+fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+    let mut deflater = DeflateDecoder::new(&bytes[..]);
+    let mut s = String::new();
+    deflater.read_to_string(&mut s)?;
+    Ok(s)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/deflatedecoder-read.rs
@@ -0,0 +1,24 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::write::DeflateEncoder;
+use flate2::read::DeflateDecoder;
+
+// Compress a sample string and print it after transformation.
+fn main() {
+    let mut e = DeflateEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    let bytes = e.finish().unwrap();
+    println!("{}", decode_reader(bytes).unwrap());
+}
+
+// Uncompresses a Deflate Encoded vector of bytes and returns a string or error
+// Here &[u8] implements Read
+fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+    let mut deflater = DeflateDecoder::new(&bytes[..]);
+    let mut s = String::new();
+    deflater.read_to_string(&mut s)?;
+    Ok(s)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/deflatedecoder-write.rs
@@ -0,0 +1,26 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::write::DeflateEncoder;
+use flate2::write::DeflateDecoder;
+
+// Compress a sample string and print it after transformation.
+fn main() {
+    let mut e = DeflateEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    let bytes = e.finish().unwrap();
+    println!("{}", decode_reader(bytes).unwrap());
+}
+
+// Uncompresses a Deflate Encoded vector of bytes and returns a string or error
+// Here Vec<u8> implements Write
+fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+    let mut writer = Vec::new();
+    let mut deflater = DeflateDecoder::new(writer);
+    deflater.write(&bytes[..])?;
+    writer = deflater.finish()?;
+    let return_string = String::from_utf8(writer).expect("String parsing error");
+    Ok(return_string)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/deflateencoder-bufread.rs
@@ -0,0 +1,24 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::bufread::DeflateEncoder;
+use std::fs::File;
+use std::io::BufReader;
+
+// Open file and debug print the contents compressed with Deflate
+fn main() {
+    println!("{:?}", open_hello_world().unwrap());
+}
+
+// Opens sample file, compresses the contents and returns a Vector or error
+// File wrapped in a BufReader implements Bufread
+fn open_hello_world() -> io::Result<Vec<u8>> {
+    let f = File::open("examples/hello_world.txt")?;
+    let b = BufReader::new(f);
+    let mut deflater = DeflateEncoder::new(b, Compression::Fast);
+    let mut buffer = Vec::new();
+    deflater.read_to_end(&mut buffer)?;
+    Ok(buffer)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/deflateencoder-read.rs
@@ -0,0 +1,20 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::read::DeflateEncoder;
+
+// Print the Deflate compressed representation of hello world
+fn main() {
+    println!("{:?}", deflateencoder_read_hello_world().unwrap());
+}
+
+// Return a vector containing the Defalte compressed version of hello world
+fn deflateencoder_read_hello_world() -> io::Result<Vec<u8>> {
+    let mut ret_vec = [0;100];
+    let c = b"hello world";
+    let mut deflater = DeflateEncoder::new(&c[..], Compression::Fast);
+    let count = deflater.read(&mut ret_vec)?;
+    Ok(ret_vec[0..count].to_vec())
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/deflateencoder-write.rs
@@ -0,0 +1,12 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use flate2::Compression;
+use flate2::write::DeflateEncoder;
+
+// Vec<u8> implements Write to print the compressed bytes of sample string
+fn main() {
+    let mut e = DeflateEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    println!("{:?}", e.finish().unwrap());
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/flatereadext.rs
@@ -0,0 +1,22 @@
+extern crate flate2;
+
+use flate2::{FlateReadExt, Compression};
+use std::io::prelude::*;
+use std::io;
+use std::fs::File;
+
+fn main() {
+    println!("{}", run().unwrap());
+}
+
+fn run() -> io::Result<String> {
+    let f = File::open("examples/hello_world.txt")?;
+
+    //gz_encode method comes from FlateReadExt and applies to a std::fs::File
+    let data = f.gz_encode(Compression::Default);
+    let mut buffer = String::new();
+
+    //gz_decode method comes from FlateReadExt and applies to a &[u8]
+    &data.gz_decode()?.read_to_string(&mut buffer)?;
+    Ok(buffer)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/gzbuilder.rs
@@ -0,0 +1,24 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use std::fs::File;
+use flate2::GzBuilder;
+use flate2::Compression;
+
+// Open file and debug print the contents compressed with gzip
+fn main() {
+    sample_builder().unwrap();
+}
+
+// GzBuilder opens a file and writes a sample string using Builder pattern
+fn sample_builder() -> Result<(), io::Error> {
+    let f = File::create("examples/hello_world.gz")?;
+    let mut gz = GzBuilder::new()
+                 .filename("hello_world.txt")
+                 .comment("test file, please delete")
+                 .write(f, Compression::Default);
+    gz.write(b"hello world")?;
+    gz.finish()?;
+    Ok(())
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/gzdecoder-bufread.rs
@@ -0,0 +1,24 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::write::GzEncoder;
+use flate2::bufread::GzDecoder;
+
+// Compress a sample string and print it after transformation.
+fn main() {
+    let mut e = GzEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    let bytes = e.finish().unwrap();
+    println!("{}", decode_reader(bytes).unwrap());
+}
+
+// Uncompresses a Gz Encoded vector of bytes and returns a string or error
+// Here &[u8] implements BufRead
+fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+    let mut gz = GzDecoder::new(&bytes[..])?;
+    let mut s = String::new();
+    gz.read_to_string(&mut s)?;
+    Ok(s)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/gzdecoder-read.rs
@@ -0,0 +1,24 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::write::GzEncoder;
+use flate2::read::GzDecoder;
+
+// Compress a sample string and print it after transformation.
+fn main() {
+    let mut e = GzEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    let bytes = e.finish().unwrap();
+    println!("{}", decode_reader(bytes).unwrap());
+}
+
+// Uncompresses a Gz Encoded vector of bytes and returns a string or error
+// Here &[u8] implements Read
+fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+    let mut gz = GzDecoder::new(&bytes[..])?;
+    let mut s = String::new();
+    gz.read_to_string(&mut s)?;
+    Ok(s)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/gzencoder-bufread.rs
@@ -0,0 +1,24 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::bufread::GzEncoder;
+use std::fs::File;
+use std::io::BufReader;
+
+// Open file and debug print the contents compressed with gzip
+fn main() {
+    println!("{:?}", open_hello_world().unwrap());
+}
+
+// Opens sample file, compresses the contents and returns a Vector or error
+// File wrapped in a BufReader implements Bufread
+fn open_hello_world() -> io::Result<Vec<u8>> {
+    let f = File::open("examples/hello_world.txt")?;
+    let b = BufReader::new(f);
+    let mut gz = GzEncoder::new(b, Compression::Fast);
+    let mut buffer = Vec::new();
+    gz.read_to_end(&mut buffer)?;
+    Ok(buffer)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/gzencoder-read.rs
@@ -0,0 +1,20 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::read::GzEncoder;
+
+// Print the GZ compressed representation of hello world
+fn main() {
+    println!("{:?}", gzencoder_read_hello_world().unwrap());
+}
+
+// Return a vector containing the GZ compressed version of hello world
+fn gzencoder_read_hello_world() -> io::Result<Vec<u8>> {
+    let mut ret_vec = [0;100];
+    let c = b"hello world";
+    let mut z = GzEncoder::new(&c[..], Compression::Fast);
+    let count = z.read(&mut ret_vec)?;
+    Ok(ret_vec[0..count].to_vec())
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/gzencoder-write.rs
@@ -0,0 +1,12 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use flate2::Compression;
+use flate2::write::GzEncoder;
+
+// Vec<u8> implements Write to print the compressed bytes of sample string
+fn main() {
+    let mut e = GzEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    println!("{:?}", e.finish().unwrap());
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/gzmultidecoder-bufread.rs
@@ -0,0 +1,24 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::write::GzEncoder;
+use flate2::bufread::MultiGzDecoder;
+
+// Compress a sample string and print it after transformation.
+fn main() {
+    let mut e = GzEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    let bytes = e.finish().unwrap();
+    println!("{}", decode_reader(bytes).unwrap());
+}
+
+// Uncompresses a Gz Encoded vector of bytes and returns a string or error
+// Here &[u8] implements BufRead
+fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+    let mut gz = MultiGzDecoder::new(&bytes[..])?;
+    let mut s = String::new();
+    gz.read_to_string(&mut s)?;
+    Ok(s)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/gzmultidecoder-read.rs
@@ -0,0 +1,24 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::write::GzEncoder;
+use flate2::read::MultiGzDecoder;
+
+// Compress a sample string and print it after transformation.
+fn main() {
+    let mut e = GzEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    let bytes = e.finish().unwrap();
+    println!("{}", decode_reader(bytes).unwrap());
+}
+
+// Uncompresses a Gz Encoded vector of bytes and returns a string or error
+// Here &[u8] implements Read
+fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+    let mut gz = MultiGzDecoder::new(&bytes[..])?;
+    let mut s = String::new();
+    gz.read_to_string(&mut s)?;
+    Ok(s)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/hello_world.txt
@@ -0,0 +1,1 @@
+Hello World
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/zlibdecoder-bufread.rs
@@ -0,0 +1,24 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::write::ZlibEncoder;
+use flate2::bufread::ZlibDecoder;
+
+// Compress a sample string and print it after transformation.
+fn main() {
+    let mut e = ZlibEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    let bytes = e.finish().unwrap();
+    println!("{}", decode_bufreader(bytes).unwrap());
+}
+
+// Uncompresses a Zlib Encoded vector of bytes and returns a string or error
+// Here &[u8] implements BufRead
+fn decode_bufreader(bytes: Vec<u8>) -> io::Result<String> {
+    let mut z = ZlibDecoder::new(&bytes[..]);
+    let mut s = String::new();
+    z.read_to_string(&mut s)?;
+    Ok(s)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/zlibdecoder-read.rs
@@ -0,0 +1,24 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::write::ZlibEncoder;
+use flate2::read::ZlibDecoder;
+
+// Compress a sample string and print it after transformation.
+fn main() {
+    let mut e = ZlibEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    let bytes = e.finish().unwrap();
+    println!("{}", decode_reader(bytes).unwrap());
+}
+
+// Uncompresses a Zlib Encoded vector of bytes and returns a string or error
+// Here &[u8] implements Read
+fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+    let mut z = ZlibDecoder::new(&bytes[..]);
+    let mut s = String::new();
+    z.read_to_string(&mut s)?;
+    Ok(s)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/zlibdecoder-write.rs
@@ -0,0 +1,26 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::write::ZlibEncoder;
+use flate2::write::ZlibDecoder;
+
+// Compress a sample string and print it after transformation.
+fn main() {
+    let mut e = ZlibEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    let bytes = e.finish().unwrap();
+    println!("{}", decode_reader(bytes).unwrap());
+}
+
+// Uncompresses a Zlib Encoded vector of bytes and returns a string or error
+// Here Vec<u8> implements Write
+fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+    let mut writer = Vec::new();
+    let mut z = ZlibDecoder::new(writer);
+    z.write(&bytes[..])?;
+    writer = z.finish()?;
+    let return_string = String::from_utf8(writer).expect("String parsing error");
+    Ok(return_string)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/zlibencoder-bufread.rs
@@ -0,0 +1,24 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use std::io;
+use flate2::Compression;
+use flate2::bufread::ZlibEncoder;
+use std::fs::File;
+use std::io::BufReader;
+
+// Open file and debug print the contents compressed with zlib
+fn main() {
+    println!("{:?}", open_hello_world().unwrap());
+}
+
+// Opens sample file, compresses the contents and returns a Vector or error
+// File wrapped in a BufReader implements Bufread
+fn open_hello_world() -> io::Result<Vec<u8>> {
+    let f = File::open("examples/hello_world.txt")?;
+    let b = BufReader::new(f);
+    let mut z = ZlibEncoder::new(b, Compression::Fast);
+    let mut buffer = Vec::new();
+    z.read_to_end(&mut buffer)?;
+    Ok(buffer)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/zlibencoder-read.rs
@@ -0,0 +1,21 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use flate2::Compression;
+use flate2::read::ZlibEncoder;
+use std::fs::File;
+
+// Open file and debug print the compressed contents
+fn main() {
+    println!("{:?}", open_hello_world().unwrap());
+}
+
+// Opens sample file, compresses the contents and returns a Vector or error
+// File implements Read
+fn open_hello_world() -> std::io::Result<Vec<u8>> {
+    let f = File::open("examples/hello_world.txt")?;
+    let mut z = ZlibEncoder::new(f, Compression::Fast);
+    let mut buffer = [0;50];
+    let byte_count = z.read(&mut buffer)?;
+    Ok(buffer[0..byte_count].to_vec())
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/examples/zlibencoder-write.rs
@@ -0,0 +1,12 @@
+extern crate flate2;
+
+use std::io::prelude::*;
+use flate2::Compression;
+use flate2::write::ZlibEncoder;
+
+// Vec<u8> implements Write to print the compressed bytes of sample string
+fn main() {
+    let mut e = ZlibEncoder::new(Vec::new(), Compression::Default);
+    e.write(b"Hello World").unwrap();
+    println!("{:?}", e.finish().unwrap());
+}
--- a/third_party/rust/flate2/src/bufreader.rs
+++ b/third_party/rust/flate2/src/bufreader.rs
@@ -15,30 +15,41 @@ use std::mem;
 
 pub struct BufReader<R> {
     inner: R,
     buf: Box<[u8]>,
     pos: usize,
     cap: usize,
 }
 
+impl<R> ::std::fmt::Debug for BufReader<R> where R: ::std::fmt::Debug {
+    fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> Result<(), ::std::fmt::Error>{
+        fmt.debug_struct("BufReader")
+            .field("reader", &self.inner)
+            .field("buffer", &format_args!("{}/{}", self.cap - self.pos, self.buf.len()))
+            .finish()
+    }
+}
+
 impl<R: Read> BufReader<R> {
     pub fn new(inner: R) -> BufReader<R> {
         BufReader::with_buf(vec![0; 32 * 1024], inner)
     }
 
     pub fn with_buf(buf: Vec<u8>, inner: R) -> BufReader<R> {
         BufReader {
             inner: inner,
             buf: buf.into_boxed_slice(),
             pos: 0,
             cap: 0,
         }
     }
+}
 
+impl<R> BufReader<R> {
     pub fn get_ref(&self) -> &R {
         &self.inner
     }
 
     pub fn get_mut(&mut self) -> &mut R {
         &mut self.inner
     }
 
--- a/third_party/rust/flate2/src/crc.rs
+++ b/third_party/rust/flate2/src/crc.rs
@@ -1,23 +1,29 @@
 //! Simple CRC bindings backed by miniz.c
 
 use std::io::prelude::*;
 use std::io;
 use libc;
 
 use ffi;
 
-/// The CRC calculated by a CrcReader.
+/// The CRC calculated by a [`CrcReader`].
+///
+/// [`CrcReader`]: struct.CrcReader.html
+#[derive(Debug)]
 pub struct Crc {
     crc: libc::c_ulong,
     amt: u32,
 }
 
-/// A wrapper around a `std::io::Read` that calculates the CRC.
+/// A wrapper around a [`Read`] that calculates the CRC.
+///
+/// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
+#[derive(Debug)]
 pub struct CrcReader<R> {
     inner: R,
     crc: Crc,
 }
 
 impl Crc {
     /// Create a new CRC.
     pub fn new() -> Crc {
@@ -63,17 +69,19 @@ impl Crc {
 impl<R: Read> CrcReader<R> {
     /// Create a new CrcReader.
     pub fn new(r: R) -> CrcReader<R> {
         CrcReader {
             inner: r,
             crc: Crc::new(),
         }
     }
+}
 
+impl<R> CrcReader<R> {
     /// Get the Crc for this CrcReader.
     pub fn crc(&self) -> &Crc {
         &self.crc
     }
 
     /// Get the reader that is wrapped by this CrcReader.
     pub fn into_inner(self) -> R {
         self.inner
deleted file mode 100644
--- a/third_party/rust/flate2/src/deflate.rs
+++ /dev/null
@@ -1,857 +0,0 @@
-//! DEFLATE compression and decompression of streams
-
-use std::io::prelude::*;
-use std::io;
-use std::mem;
-
-#[cfg(feature = "tokio")]
-use futures::Poll;
-#[cfg(feature = "tokio")]
-use tokio_io::{AsyncRead, AsyncWrite};
-
-use bufreader::BufReader;
-use zio;
-use {Compress, Decompress};
-
-/// A DEFLATE encoder, or compressor.
-///
-/// This structure implements a `Write` interface and takes a stream of
-/// uncompressed data, writing the compressed data to the wrapped writer.
-pub struct EncoderWriter<W: Write> {
-    inner: zio::Writer<W, Compress>,
-}
-
-/// A DEFLATE encoder, or compressor.
-///
-/// This structure implements a `Read` interface and will read uncompressed
-/// data from an underlying stream and emit a stream of compressed data.
-pub struct EncoderReader<R: Read> {
-    inner: EncoderReaderBuf<BufReader<R>>,
-}
-
-/// A DEFLATE encoder, or compressor.
-///
-/// This structure implements a `BufRead` interface and will read uncompressed
-/// data from an underlying stream and emit a stream of compressed data.
-pub struct EncoderReaderBuf<R: BufRead> {
-    obj: R,
-    data: Compress,
-}
-
-/// A DEFLATE decoder, or decompressor.
-///
-/// This structure implements a `Read` interface and takes a stream of
-/// compressed data as input, providing the decompressed data when read from.
-pub struct DecoderReader<R: Read> {
-    inner: DecoderReaderBuf<BufReader<R>>,
-}
-
-/// A DEFLATE decoder, or decompressor.
-///
-/// This structure implements a `BufRead` interface and takes a stream of
-/// compressed data as input, providing the decompressed data when read from.
-pub struct DecoderReaderBuf<R: BufRead> {
-    obj: R,
-    data: Decompress,
-}
-
-/// A DEFLATE decoder, or decompressor.
-///
-/// This structure implements a `Write` and will emit a stream of decompressed
-/// data when fed a stream of compressed data.
-pub struct DecoderWriter<W: Write> {
-    inner: zio::Writer<W, Decompress>,
-}
-
-impl<W: Write> EncoderWriter<W> {
-    /// Creates a new encoder which will write compressed data to the stream
-    /// given at the given compression level.
-    ///
-    /// When this encoder is dropped or unwrapped the final pieces of data will
-    /// be flushed.
-    pub fn new(w: W, level: ::Compression) -> EncoderWriter<W> {
-        EncoderWriter {
-            inner: zio::Writer::new(w, Compress::new(level, false)),
-        }
-    }
-
-    /// Acquires a reference to the underlying writer.
-    pub fn get_ref(&self) -> &W {
-        self.inner.get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying writer.
-    ///
-    /// Note that mutating the output/input state of the stream may corrupt this
-    /// object, so care must be taken when using this method.
-    pub fn get_mut(&mut self) -> &mut W {
-        self.inner.get_mut()
-    }
-
-    /// Resets the state of this encoder entirely, swapping out the output
-    /// stream for another.
-    ///
-    /// This function will finish encoding the current stream into the current
-    /// output stream before swapping out the two output streams. If the stream
-    /// cannot be finished an error is returned.
-    ///
-    /// After the current stream has been finished, this will reset the internal
-    /// state of this encoder and replace the output stream with the one
-    /// provided, returning the previous output stream. Future data written to
-    /// this encoder will be the compressed into the stream `w` provided.
-    pub fn reset(&mut self, w: W) -> io::Result<W> {
-        try!(self.inner.finish());
-        self.inner.data.reset();
-        Ok(self.inner.replace(w))
-    }
-
-    /// Attempt to finish this output stream, writing out final chunks of data.
-    ///
-    /// Note that this function can only be used once data has finished being
-    /// written to the output stream. After this function is called then further
-    /// calls to `write` may result in a panic.
-    ///
-    /// # Panics
-    ///
-    /// Attempts to write data to this stream may result in a panic after this
-    /// function is called.
-    pub fn try_finish(&mut self) -> io::Result<()> {
-        self.inner.finish()
-    }
-
-    /// Consumes this encoder, flushing the output stream.
-    ///
-    /// This will flush the underlying data stream, close off the compressed
-    /// stream and, if successful, return the contained writer.
-    ///
-    /// Note that this function may not be suitable to call in a situation where
-    /// the underlying stream is an asynchronous I/O stream. To finish a stream
-    /// the `try_finish` (or `shutdown`) method should be used instead. To
-    /// re-acquire ownership of a stream it is safe to call this method after
-    /// `try_finish` or `shutdown` has returned `Ok`.
-    pub fn finish(mut self) -> io::Result<W> {
-        try!(self.inner.finish());
-        Ok(self.inner.take_inner())
-    }
-
-    /// Consumes this encoder, flushing the output stream.
-    ///
-    /// This will flush the underlying data stream and then return the contained
-    /// writer if the flush succeeded.
-    /// The compressed stream will not closed but only flushed. This
-    /// means that obtained byte array can by extended by another deflated
-    /// stream. To close the stream add the two bytes 0x3 and 0x0.
-    pub fn flush_finish(mut self) -> io::Result<W> {
-        try!(self.inner.flush());
-        Ok(self.inner.take_inner())
-    }
-
-    /// Returns the number of bytes that have been written to this compresor.
-    ///
-    /// Note that not all bytes written to this object may be accounted for,
-    /// there may still be some active buffering.
-    pub fn total_in(&self) -> u64 {
-        self.inner.data.total_in()
-    }
-
-    /// Returns the number of bytes that the compressor has produced.
-    ///
-    /// Note that not all bytes may have been written yet, some may still be
-    /// buffered.
-    pub fn total_out(&self) -> u64 {
-        self.inner.data.total_out()
-    }
-}
-
-impl<W: Write> Write for EncoderWriter<W> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.inner.write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.inner.flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<W: AsyncWrite> AsyncWrite for EncoderWriter<W> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        try_nb!(self.inner.finish());
-        self.inner.get_mut().shutdown()
-    }
-}
-
-impl<W: Read + Write> Read for EncoderWriter<W> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        self.inner.get_mut().read(buf)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<W: AsyncRead + AsyncWrite> AsyncRead for EncoderWriter<W> {
-}
-
-impl<R: Read> EncoderReader<R> {
-    /// Creates a new encoder which will read uncompressed data from the given
-    /// stream and emit the compressed stream.
-    pub fn new(r: R, level: ::Compression) -> EncoderReader<R> {
-        EncoderReader {
-            inner: EncoderReaderBuf::new(BufReader::new(r), level),
-        }
-    }
-
-    /// Resets the state of this encoder entirely, swapping out the input
-    /// stream for another.
-    ///
-    /// This function will reset the internal state of this encoder and replace
-    /// the input stream with the one provided, returning the previous input
-    /// stream. Future data read from this encoder will be the compressed
-    /// version of `r`'s data.
-    ///
-    /// Note that there may be currently buffered data when this function is
-    /// called, and in that case the buffered data is discarded.
-    pub fn reset(&mut self, r: R) -> R {
-        self.inner.data.reset();
-        self.inner.obj.reset(r)
-    }
-
-    /// Acquires a reference to the underlying reader
-    pub fn get_ref(&self) -> &R {
-        self.inner.get_ref().get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying stream
-    ///
-    /// Note that mutation of the stream may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        self.inner.get_mut().get_mut()
-    }
-
-    /// Consumes this encoder, returning the underlying reader.
-    ///
-    /// Note that there may be buffered bytes which are not re-acquired as part
-    /// of this transition. It's recommended to only call this function after
-    /// EOF has been reached.
-    pub fn into_inner(self) -> R {
-        self.inner.into_inner().into_inner()
-    }
-
-    /// Returns the number of bytes that have been read into this compressor.
-    ///
-    /// Note that not all bytes read from the underlying object may be accounted
-    /// for, there may still be some active buffering.
-    pub fn total_in(&self) -> u64 {
-        self.inner.data.total_in()
-    }
-
-    /// Returns the number of bytes that the compressor has produced.
-    ///
-    /// Note that not all bytes may have been read yet, some may still be
-    /// buffered.
-    pub fn total_out(&self) -> u64 {
-        self.inner.data.total_out()
-    }
-}
-
-impl<R: Read> Read for EncoderReader<R> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        self.inner.read(buf)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncRead> AsyncRead for EncoderReader<R> {
-}
-
-impl<W: Read + Write> Write for EncoderReader<W> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncRead + AsyncWrite> AsyncWrite for EncoderReader<R> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        self.get_mut().shutdown()
-    }
-}
-
-impl<R: BufRead> EncoderReaderBuf<R> {
-    /// Creates a new encoder which will read uncompressed data from the given
-    /// stream and emit the compressed stream.
-    pub fn new(r: R, level: ::Compression) -> EncoderReaderBuf<R> {
-        EncoderReaderBuf {
-            obj: r,
-            data: Compress::new(level, false),
-        }
-    }
-
-    /// Resets the state of this encoder entirely, swapping out the input
-    /// stream for another.
-    ///
-    /// This function will reset the internal state of this encoder and replace
-    /// the input stream with the one provided, returning the previous input
-    /// stream. Future data read from this encoder will be the compressed
-    /// version of `r`'s data.
-    pub fn reset(&mut self, r: R) -> R {
-        self.data.reset();
-        mem::replace(&mut self.obj, r)
-    }
-
-    /// Acquires a reference to the underlying reader
-    pub fn get_ref(&self) -> &R {
-        &self.obj
-    }
-
-    /// Acquires a mutable reference to the underlying stream
-    ///
-    /// Note that mutation of the stream may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        &mut self.obj
-    }
-
-    /// Consumes this encoder, returning the underlying reader.
-    pub fn into_inner(self) -> R {
-        self.obj
-    }
-
-    /// Returns the number of bytes that have been read into this compressor.
-    ///
-    /// Note that not all bytes read from the underlying object may be accounted
-    /// for, there may still be some active buffering.
-    pub fn total_in(&self) -> u64 {
-        self.data.total_in()
-    }
-
-    /// Returns the number of bytes that the compressor has produced.
-    ///
-    /// Note that not all bytes may have been read yet, some may still be
-    /// buffered.
-    pub fn total_out(&self) -> u64 {
-        self.data.total_out()
-    }
-}
-
-impl<R: BufRead> Read for EncoderReaderBuf<R> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        zio::read(&mut self.obj, &mut self.data, buf)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncRead + BufRead> AsyncRead for EncoderReaderBuf<R> {
-}
-
-impl<W: BufRead + Write> Write for EncoderReaderBuf<W> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncWrite + BufRead> AsyncWrite for EncoderReaderBuf<R> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        self.get_mut().shutdown()
-    }
-}
-
-impl<R: Read> DecoderReader<R> {
-    /// Creates a new decoder which will decompress data read from the given
-    /// stream.
-    pub fn new(r: R) -> DecoderReader<R> {
-        DecoderReader::new_with_buf(r, vec![0; 32 * 1024])
-    }
-
-    /// Same as `new`, but the intermediate buffer for data is specified.
-    ///
-    /// Note that the capacity of the intermediate buffer is never increased,
-    /// and it is recommended for it to be large.
-    pub fn new_with_buf(r: R, buf: Vec<u8>) -> DecoderReader<R> {
-        DecoderReader {
-            inner: DecoderReaderBuf::new(BufReader::with_buf(buf, r))
-        }
-    }
-
-    /// Resets the state of this decoder entirely, swapping out the input
-    /// stream for another.
-    ///
-    /// This will reset the internal state of this decoder and replace the
-    /// input stream with the one provided, returning the previous input
-    /// stream. Future data read from this decoder will be the decompressed
-    /// version of `r`'s data.
-    ///
-    /// Note that there may be currently buffered data when this function is
-    /// called, and in that case the buffered data is discarded.
-    pub fn reset(&mut self, r: R) -> R {
-        self.inner.data = Decompress::new(false);
-        self.inner.obj.reset(r)
-    }
-
-    /// Acquires a reference to the underlying stream
-    pub fn get_ref(&self) -> &R {
-        self.inner.get_ref().get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying stream
-    ///
-    /// Note that mutation of the stream may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        self.inner.get_mut().get_mut()
-    }
-
-    /// Consumes this decoder, returning the underlying reader.
-    ///
-    /// Note that there may be buffered bytes which are not re-acquired as part
-    /// of this transition. It's recommended to only call this function after
-    /// EOF has been reached.
-    pub fn into_inner(self) -> R {
-        self.inner.into_inner().into_inner()
-    }
-
-    /// Returns the number of bytes that the decompressor has consumed.
-    ///
-    /// Note that this will likely be smaller than what the decompressor
-    /// actually read from the underlying stream due to buffering.
-    pub fn total_in(&self) -> u64 {
-        self.inner.total_in()
-    }
-
-    /// Returns the number of bytes that the decompressor has produced.
-    pub fn total_out(&self) -> u64 {
-        self.inner.total_out()
-    }
-}
-
-impl<R: Read> Read for DecoderReader<R> {
-    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
-        self.inner.read(into)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncRead> AsyncRead for DecoderReader<R> {
-}
-
-impl<W: Read + Write> Write for DecoderReader<W> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncWrite + AsyncRead> AsyncWrite for DecoderReader<R> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        self.get_mut().shutdown()
-    }
-}
-
-impl<R: BufRead> DecoderReaderBuf<R> {
-    /// Creates a new decoder which will decompress data read from the given
-    /// stream.
-    pub fn new(r: R) -> DecoderReaderBuf<R> {
-        DecoderReaderBuf {
-            obj: r,
-            data: Decompress::new(false),
-        }
-    }
-
-    /// Resets the state of this decoder entirely, swapping out the input
-    /// stream for another.
-    ///
-    /// This will reset the internal state of this decoder and replace the
-    /// input stream with the one provided, returning the previous input
-    /// stream. Future data read from this decoder will be the decompressed
-    /// version of `r`'s data.
-    pub fn reset(&mut self, r: R) -> R {
-        self.data = Decompress::new(false);
-        mem::replace(&mut self.obj, r)
-    }
-
-    /// Resets the state of this decoder's data
-    ///
-    /// This will reset the internal state of this decoder. It will continue
-    /// reading from the same stream.
-    pub fn reset_data(&mut self) {
-        self.data = Decompress::new(false);
-    }
-
-    /// Acquires a reference to the underlying stream
-    pub fn get_ref(&self) -> &R {
-        &self.obj
-    }
-
-    /// Acquires a mutable reference to the underlying stream
-    ///
-    /// Note that mutation of the stream may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        &mut self.obj
-    }
-
-    /// Consumes this decoder, returning the underlying reader.
-    pub fn into_inner(self) -> R {
-        self.obj
-    }
-
-    /// Returns the number of bytes that the decompressor has consumed.
-    ///
-    /// Note that this will likely be smaller than what the decompressor
-    /// actually read from the underlying stream due to buffering.
-    pub fn total_in(&self) -> u64 {
-        self.data.total_in()
-    }
-
-    /// Returns the number of bytes that the decompressor has produced.
-    pub fn total_out(&self) -> u64 {
-        self.data.total_out()
-    }
-}
-
-impl<R: BufRead> Read for DecoderReaderBuf<R> {
-    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
-        zio::read(&mut self.obj, &mut self.data, into)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncRead + BufRead> AsyncRead for DecoderReaderBuf<R> {
-}
-
-impl<W: BufRead + Write> Write for DecoderReaderBuf<W> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncWrite + BufRead> AsyncWrite for DecoderReaderBuf<R> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        self.get_mut().shutdown()
-    }
-}
-
-impl<W: Write> DecoderWriter<W> {
-    /// Creates a new decoder which will write uncompressed data to the stream.
-    ///
-    /// When this encoder is dropped or unwrapped the final pieces of data will
-    /// be flushed.
-    pub fn new(w: W) -> DecoderWriter<W> {
-        DecoderWriter {
-            inner: zio::Writer::new(w, Decompress::new(false)),
-        }
-    }
-
-    /// Acquires a reference to the underlying writer.
-    pub fn get_ref(&self) -> &W {
-        self.inner.get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying writer.
-    ///
-    /// Note that mutating the output/input state of the stream may corrupt this
-    /// object, so care must be taken when using this method.
-    pub fn get_mut(&mut self) -> &mut W {
-        self.inner.get_mut()
-    }
-
-    /// Resets the state of this decoder entirely, swapping out the output
-    /// stream for another.
-    ///
-    /// This function will finish encoding the current stream into the current
-    /// output stream before swapping out the two output streams. If the stream
-    /// cannot be finished an error is returned.
-    ///
-    /// This will then reset the internal state of this decoder and replace the
-    /// output stream with the one provided, returning the previous output
-    /// stream. Future data written to this decoder will be decompressed into
-    /// the output stream `w`.
-    pub fn reset(&mut self, w: W) -> io::Result<W> {
-        try!(self.inner.finish());
-        self.inner.data = Decompress::new(false);
-        Ok(self.inner.replace(w))
-    }
-
-    /// Attempt to finish this output stream, writing out final chunks of data.
-    ///
-    /// Note that this function can only be used once data has finished being
-    /// written to the output stream. After this function is called then further
-    /// calls to `write` may result in a panic.
-    ///
-    /// # Panics
-    ///
-    /// Attempts to write data to this stream may result in a panic after this
-    /// function is called.
-    pub fn try_finish(&mut self) -> io::Result<()> {
-        self.inner.finish()
-    }
-
-    /// Consumes this encoder, flushing the output stream.
-    ///
-    /// This will flush the underlying data stream and then return the contained
-    /// writer if the flush succeeded.
-    ///
-    /// Note that this function may not be suitable to call in a situation where
-    /// the underlying stream is an asynchronous I/O stream. To finish a stream
-    /// the `try_finish` (or `shutdown`) method should be used instead. To
-    /// re-acquire ownership of a stream it is safe to call this method after
-    /// `try_finish` or `shutdown` has returned `Ok`.
-    pub fn finish(mut self) -> io::Result<W> {
-        try!(self.inner.finish());
-        Ok(self.inner.take_inner())
-    }
-
-    /// Returns the number of bytes that the decompressor has consumed for
-    /// decompression.
-    ///
-    /// Note that this will likely be smaller than the number of bytes
-    /// successfully written to this stream due to internal buffering.
-    pub fn total_in(&self) -> u64 {
-        self.inner.data.total_in()
-    }
-
-    /// Returns the number of bytes that the decompressor has written to its
-    /// output stream.
-    pub fn total_out(&self) -> u64 {
-        self.inner.data.total_out()
-    }
-}
-
-impl<W: Write> Write for DecoderWriter<W> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.inner.write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.inner.flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<W: AsyncWrite> AsyncWrite for DecoderWriter<W> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        try_nb!(self.inner.finish());
-        self.inner.get_mut().shutdown()
-    }
-}
-
-impl<W: Read + Write> Read for DecoderWriter<W> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        self.inner.get_mut().read(buf)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<W: AsyncRead + AsyncWrite> AsyncRead for DecoderWriter<W> {
-}
-
-#[cfg(test)]
-mod tests {
-    use std::io::prelude::*;
-
-    use rand::{thread_rng, Rng};
-
-    use deflate::{EncoderWriter, EncoderReader, DecoderReader, DecoderWriter};
-    use Compression::Default;
-
-    #[test]
-    fn roundtrip() {
-        let mut real = Vec::new();
-        let mut w = EncoderWriter::new(Vec::new(), Default);
-        let v = thread_rng().gen_iter::<u8>().take(1024).collect::<Vec<_>>();
-        for _ in 0..200 {
-            let to_write = &v[..thread_rng().gen_range(0, v.len())];
-            real.extend(to_write.iter().map(|x| *x));
-            w.write_all(to_write).unwrap();
-        }
-        let result = w.finish().unwrap();
-        let mut r = DecoderReader::new(&result[..]);
-        let mut ret = Vec::new();
-        r.read_to_end(&mut ret).unwrap();
-        assert!(ret == real);
-    }
-
-    #[test]
-    fn drop_writes() {
-        let mut data = Vec::new();
-        EncoderWriter::new(&mut data, Default).write_all(b"foo").unwrap();
-        let mut r = DecoderReader::new(&data[..]);
-        let mut ret = Vec::new();
-        r.read_to_end(&mut ret).unwrap();
-        assert!(ret == b"foo");
-    }
-
-    #[test]
-    fn total_in() {
-        let mut real = Vec::new();
-        let mut w = EncoderWriter::new(Vec::new(), Default);
-        let v = thread_rng().gen_iter::<u8>().take(1024).collect::<Vec<_>>();
-        for _ in 0..200 {
-            let to_write = &v[..thread_rng().gen_range(0, v.len())];
-            real.extend(to_write.iter().map(|x| *x));
-            w.write_all(to_write).unwrap();
-        }
-        let mut result = w.finish().unwrap();
-
-        let result_len = result.len();
-
-        for _ in 0..200 {
-            result.extend(v.iter().map(|x| *x));
-        }
-
-        let mut r = DecoderReader::new(&result[..]);
-        let mut ret = Vec::new();
-        r.read_to_end(&mut ret).unwrap();
-        assert!(ret == real);
-        assert_eq!(r.total_in(), result_len as u64);
-    }
-
-    #[test]
-    fn roundtrip2() {
-        let v = thread_rng()
-                    .gen_iter::<u8>()
-                    .take(1024 * 1024)
-                    .collect::<Vec<_>>();
-        let mut r = DecoderReader::new(EncoderReader::new(&v[..], Default));
-        let mut ret = Vec::new();
-        r.read_to_end(&mut ret).unwrap();
-        assert_eq!(ret, v);
-    }
-
-    #[test]
-    fn roundtrip3() {
-        let v = thread_rng()
-                    .gen_iter::<u8>()
-                    .take(1024 * 1024)
-                    .collect::<Vec<_>>();
-        let mut w = EncoderWriter::new(DecoderWriter::new(Vec::new()), Default);
-        w.write_all(&v).unwrap();
-        let w = w.finish().unwrap().finish().unwrap();
-        assert!(w == v);
-    }
-
-    #[test]
-    fn reset_writer() {
-        let v = thread_rng()
-                    .gen_iter::<u8>()
-                    .take(1024 * 1024)
-                    .collect::<Vec<_>>();
-        let mut w = EncoderWriter::new(Vec::new(), Default);
-        w.write_all(&v).unwrap();
-        let a = w.reset(Vec::new()).unwrap();
-        w.write_all(&v).unwrap();
-        let b = w.finish().unwrap();
-
-        let mut w = EncoderWriter::new(Vec::new(), Default);
-        w.write_all(&v).unwrap();
-        let c = w.finish().unwrap();
-        assert!(a == b && b == c);
-    }
-
-    #[test]
-    fn reset_reader() {
-        let v = thread_rng()
-                    .gen_iter::<u8>()
-                    .take(1024 * 1024)
-                    .collect::<Vec<_>>();
-        let (mut a, mut b, mut c) = (Vec::new(), Vec::new(), Vec::new());
-        let mut r = EncoderReader::new(&v[..], Default);
-        r.read_to_end(&mut a).unwrap();
-        r.reset(&v[..]);
-        r.read_to_end(&mut b).unwrap();
-
-        let mut r = EncoderReader::new(&v[..], Default);
-        r.read_to_end(&mut c).unwrap();
-        assert!(a == b && b == c);
-    }
-
-    #[test]
-    fn reset_decoder() {
-        let v = thread_rng()
-                    .gen_iter::<u8>()
-                    .take(1024 * 1024)
-                    .collect::<Vec<_>>();
-        let mut w = EncoderWriter::new(Vec::new(), Default);
-        w.write_all(&v).unwrap();
-        let data = w.finish().unwrap();
-
-        {
-            let (mut a, mut b, mut c) = (Vec::new(), Vec::new(), Vec::new());
-            let mut r = DecoderReader::new(&data[..]);
-            r.read_to_end(&mut a).unwrap();
-            r.reset(&data);
-            r.read_to_end(&mut b).unwrap();
-
-            let mut r = DecoderReader::new(&data[..]);
-            r.read_to_end(&mut c).unwrap();
-            assert!(a == b && b == c && c == v);
-        }
-
-        {
-            let mut w = DecoderWriter::new(Vec::new());
-            w.write_all(&data).unwrap();
-            let a = w.reset(Vec::new()).unwrap();
-            w.write_all(&data).unwrap();
-            let b = w.finish().unwrap();
-
-            let mut w = DecoderWriter::new(Vec::new());
-            w.write_all(&data).unwrap();
-            let c = w.finish().unwrap();
-            assert!(a == b && b == c && c == v);
-        }
-    }
-
-    #[test]
-    fn zero_length_read_with_data() {
-        let m = vec![3u8; 128 * 1024 + 1];
-        let mut c = EncoderReader::new(&m[..], ::Compression::Default);
-
-        let mut result = Vec::new();
-        c.read_to_end(&mut result).unwrap();
-
-        let mut d = DecoderReader::new(&result[..]);
-        let mut data = Vec::new();
-        assert!(d.read(&mut data).unwrap() == 0);
-    }
-
-    #[test]
-    fn qc_reader() {
-        ::quickcheck::quickcheck(test as fn(_) -> _);
-
-        fn test(v: Vec<u8>) -> bool {
-            let mut r = DecoderReader::new(EncoderReader::new(&v[..], Default));
-            let mut v2 = Vec::new();
-            r.read_to_end(&mut v2).unwrap();
-            v == v2
-        }
-    }
-
-    #[test]
-    fn qc_writer() {
-        ::quickcheck::quickcheck(test as fn(_) -> _);
-
-        fn test(v: Vec<u8>) -> bool {
-            let mut w = EncoderWriter::new(DecoderWriter::new(Vec::new()), Default);
-            w.write_all(&v).unwrap();
-            v == w.finish().unwrap().finish().unwrap()
-        }
-    }
-}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/src/deflate/bufread.rs
@@ -0,0 +1,269 @@
+use std::io::prelude::*;
+use std::io;
+use std::mem;
+
+#[cfg(feature = "tokio")]
+use futures::Poll;
+#[cfg(feature = "tokio")]
+use tokio_io::{AsyncRead, AsyncWrite};
+
+use zio;
+use {Compress, Decompress};
+
+/// A DEFLATE encoder, or compressor.
+///
+/// This structure implements a [`BufRead`] interface and will read uncompressed
+/// data from an underlying stream and emit a stream of compressed data.
+///
+/// [`BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// use flate2::Compression;
+/// use flate2::bufread::DeflateEncoder;
+/// use std::fs::File;
+/// use std::io::BufReader;
+///
+/// # fn main() {
+/// #    println!("{:?}", open_hello_world().unwrap());
+/// # }
+/// #
+/// // Opens sample file, compresses the contents and returns a Vector
+/// fn open_hello_world() -> io::Result<Vec<u8>> {
+///    let f = File::open("examples/hello_world.txt")?;
+///    let b = BufReader::new(f);
+///    let mut deflater = DeflateEncoder::new(b, Compression::Fast);
+///    let mut buffer = Vec::new();
+///    deflater.read_to_end(&mut buffer)?;
+///    Ok(buffer)
+/// }
+/// ```
+#[derive(Debug)]
+pub struct DeflateEncoder<R> {
+    obj: R,
+    data: Compress,
+}
+
+
+impl<R: BufRead> DeflateEncoder<R> {
+    /// Creates a new encoder which will read uncompressed data from the given
+    /// stream and emit the compressed stream.
+    pub fn new(r: R, level: ::Compression) -> DeflateEncoder<R> {
+        DeflateEncoder {
+            obj: r,
+            data: Compress::new(level, false),
+        }
+    }
+}
+
+pub fn reset_encoder_data<R>(zlib: &mut DeflateEncoder<R>) {
+    zlib.data.reset();
+}
+
+impl<R> DeflateEncoder<R> {
+    /// Resets the state of this encoder entirely, swapping out the input
+    /// stream for another.
+    ///
+    /// This function will reset the internal state of this encoder and replace
+    /// the input stream with the one provided, returning the previous input
+    /// stream. Future data read from this encoder will be the compressed
+    /// version of `r`'s data.
+    pub fn reset(&mut self, r: R) -> R {
+        reset_encoder_data(self);
+        mem::replace(&mut self.obj, r)
+    }
+
+    /// Acquires a reference to the underlying reader
+    pub fn get_ref(&self) -> &R {
+        &self.obj
+    }
+
+    /// Acquires a mutable reference to the underlying stream
+    ///
+    /// Note that mutation of the stream may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        &mut self.obj
+    }
+
+    /// Consumes this encoder, returning the underlying reader.
+    pub fn into_inner(self) -> R {
+        self.obj
+    }
+
+    /// Returns the number of bytes that have been read into this compressor.
+    ///
+    /// Note that not all bytes read from the underlying object may be accounted
+    /// for, there may still be some active buffering.
+    pub fn total_in(&self) -> u64 {
+        self.data.total_in()
+    }
+
+    /// Returns the number of bytes that the compressor has produced.
+    ///
+    /// Note that not all bytes may have been read yet, some may still be
+    /// buffered.
+    pub fn total_out(&self) -> u64 {
+        self.data.total_out()
+    }
+}
+
+impl<R: BufRead> Read for DeflateEncoder<R> {
+    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
+        zio::read(&mut self.obj, &mut self.data, buf)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncRead + BufRead> AsyncRead for DeflateEncoder<R> {}
+
+impl<W: BufRead + Write> Write for DeflateEncoder<W> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncWrite + BufRead> AsyncWrite for DeflateEncoder<R> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        self.get_mut().shutdown()
+    }
+}
+
+/// A DEFLATE decoder, or decompressor.
+///
+/// This structure implements a [`BufRead`] interface and takes a stream of
+/// compressed data as input, providing the decompressed data when read from.
+///
+/// [`BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// # use flate2::Compression;
+/// # use flate2::write::DeflateEncoder;
+/// use flate2::bufread::DeflateDecoder;
+///
+/// # fn main() {
+/// #    let mut e = DeflateEncoder::new(Vec::new(), Compression::Default);
+/// #    e.write(b"Hello World").unwrap();
+/// #    let bytes = e.finish().unwrap();
+/// #    println!("{}", decode_reader(bytes).unwrap());
+/// # }
+/// // Uncompresses a Deflate Encoded vector of bytes and returns a string or error
+/// // Here &[u8] implements Read
+/// fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+///    let mut deflater = DeflateDecoder::new(&bytes[..]);
+///    let mut s = String::new();
+///    deflater.read_to_string(&mut s)?;
+///    Ok(s)
+/// }
+/// ```
+#[derive(Debug)]
+pub struct DeflateDecoder<R> {
+    obj: R,
+    data: Decompress,
+}
+
+pub fn reset_decoder_data<R>(zlib: &mut DeflateDecoder<R>) {
+    zlib.data = Decompress::new(false);
+}
+
+impl<R: BufRead> DeflateDecoder<R> {
+    /// Creates a new decoder which will decompress data read from the given
+    /// stream.
+    pub fn new(r: R) -> DeflateDecoder<R> {
+        DeflateDecoder {
+            obj: r,
+            data: Decompress::new(false),
+        }
+    }
+}
+
+impl<R> DeflateDecoder<R> {
+    /// Resets the state of this decoder entirely, swapping out the input
+    /// stream for another.
+    ///
+    /// This will reset the internal state of this decoder and replace the
+    /// input stream with the one provided, returning the previous input
+    /// stream. Future data read from this decoder will be the decompressed
+    /// version of `r`'s data.
+    pub fn reset(&mut self, r: R) -> R {
+        reset_decoder_data(self);
+        mem::replace(&mut self.obj, r)
+    }
+
+    /// Resets the state of this decoder's data
+    ///
+    /// This will reset the internal state of this decoder. It will continue
+    /// reading from the same stream.
+    pub fn reset_data(&mut self) {
+        reset_decoder_data(self);
+    }
+
+    /// Acquires a reference to the underlying stream
+    pub fn get_ref(&self) -> &R {
+        &self.obj
+    }
+
+    /// Acquires a mutable reference to the underlying stream
+    ///
+    /// Note that mutation of the stream may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        &mut self.obj
+    }
+
+    /// Consumes this decoder, returning the underlying reader.
+    pub fn into_inner(self) -> R {
+        self.obj
+    }
+
+    /// Returns the number of bytes that the decompressor has consumed.
+    ///
+    /// Note that this will likely be smaller than what the decompressor
+    /// actually read from the underlying stream due to buffering.
+    pub fn total_in(&self) -> u64 {
+        self.data.total_in()
+    }
+
+    /// Returns the number of bytes that the decompressor has produced.
+    pub fn total_out(&self) -> u64 {
+        self.data.total_out()
+    }
+}
+
+impl<R: BufRead> Read for DeflateDecoder<R> {
+    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
+        zio::read(&mut self.obj, &mut self.data, into)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncRead + BufRead> AsyncRead for DeflateDecoder<R> {}
+
+impl<W: BufRead + Write> Write for DeflateDecoder<W> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncWrite + BufRead> AsyncWrite for DeflateDecoder<R> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        self.get_mut().shutdown()
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/src/deflate/mod.rs
@@ -0,0 +1,198 @@
+pub mod bufread;
+pub mod read;
+pub mod write;
+
+#[cfg(test)]
+mod tests {
+    use std::io::prelude::*;
+
+    use rand::{thread_rng, Rng};
+
+    use super::{read, write};
+    use Compression::Default;
+
+    #[test]
+    fn roundtrip() {
+        let mut real = Vec::new();
+        let mut w = write::DeflateEncoder::new(Vec::new(), Default);
+        let v = thread_rng().gen_iter::<u8>().take(1024).collect::<Vec<_>>();
+        for _ in 0..200 {
+            let to_write = &v[..thread_rng().gen_range(0, v.len())];
+            real.extend(to_write.iter().map(|x| *x));
+            w.write_all(to_write).unwrap();
+        }
+        let result = w.finish().unwrap();
+        let mut r = read::DeflateDecoder::new(&result[..]);
+        let mut ret = Vec::new();
+        r.read_to_end(&mut ret).unwrap();
+        assert!(ret == real);
+    }
+
+    #[test]
+    fn drop_writes() {
+        let mut data = Vec::new();
+        write::DeflateEncoder::new(&mut data, Default)
+            .write_all(b"foo")
+            .unwrap();
+        let mut r = read::DeflateDecoder::new(&data[..]);
+        let mut ret = Vec::new();
+        r.read_to_end(&mut ret).unwrap();
+        assert!(ret == b"foo");
+    }
+
+    #[test]
+    fn total_in() {
+        let mut real = Vec::new();
+        let mut w = write::DeflateEncoder::new(Vec::new(), Default);
+        let v = thread_rng().gen_iter::<u8>().take(1024).collect::<Vec<_>>();
+        for _ in 0..200 {
+            let to_write = &v[..thread_rng().gen_range(0, v.len())];
+            real.extend(to_write.iter().map(|x| *x));
+            w.write_all(to_write).unwrap();
+        }
+        let mut result = w.finish().unwrap();
+
+        let result_len = result.len();
+
+        for _ in 0..200 {
+            result.extend(v.iter().map(|x| *x));
+        }
+
+        let mut r = read::DeflateDecoder::new(&result[..]);
+        let mut ret = Vec::new();
+        r.read_to_end(&mut ret).unwrap();
+        assert!(ret == real);
+        assert_eq!(r.total_in(), result_len as u64);
+    }
+
+    #[test]
+    fn roundtrip2() {
+        let v = thread_rng()
+            .gen_iter::<u8>()
+            .take(1024 * 1024)
+            .collect::<Vec<_>>();
+        let mut r = read::DeflateDecoder::new(read::DeflateEncoder::new(&v[..], Default));
+        let mut ret = Vec::new();
+        r.read_to_end(&mut ret).unwrap();
+        assert_eq!(ret, v);
+    }
+
+    #[test]
+    fn roundtrip3() {
+        let v = thread_rng()
+            .gen_iter::<u8>()
+            .take(1024 * 1024)
+            .collect::<Vec<_>>();
+        let mut w = write::DeflateEncoder::new(write::DeflateDecoder::new(Vec::new()), Default);
+        w.write_all(&v).unwrap();
+        let w = w.finish().unwrap().finish().unwrap();
+        assert!(w == v);
+    }
+
+    #[test]
+    fn reset_writer() {
+        let v = thread_rng()
+            .gen_iter::<u8>()
+            .take(1024 * 1024)
+            .collect::<Vec<_>>();
+        let mut w = write::DeflateEncoder::new(Vec::new(), Default);
+        w.write_all(&v).unwrap();
+        let a = w.reset(Vec::new()).unwrap();
+        w.write_all(&v).unwrap();
+        let b = w.finish().unwrap();
+
+        let mut w = write::DeflateEncoder::new(Vec::new(), Default);
+        w.write_all(&v).unwrap();
+        let c = w.finish().unwrap();
+        assert!(a == b && b == c);
+    }
+
+    #[test]
+    fn reset_reader() {
+        let v = thread_rng()
+            .gen_iter::<u8>()
+            .take(1024 * 1024)
+            .collect::<Vec<_>>();
+        let (mut a, mut b, mut c) = (Vec::new(), Vec::new(), Vec::new());
+        let mut r = read::DeflateEncoder::new(&v[..], Default);
+        r.read_to_end(&mut a).unwrap();
+        r.reset(&v[..]);
+        r.read_to_end(&mut b).unwrap();
+
+        let mut r = read::DeflateEncoder::new(&v[..], Default);
+        r.read_to_end(&mut c).unwrap();
+        assert!(a == b && b == c);
+    }
+
+    #[test]
+    fn reset_decoder() {
+        let v = thread_rng()
+            .gen_iter::<u8>()
+            .take(1024 * 1024)
+            .collect::<Vec<_>>();
+        let mut w = write::DeflateEncoder::new(Vec::new(), Default);
+        w.write_all(&v).unwrap();
+        let data = w.finish().unwrap();
+
+        {
+            let (mut a, mut b, mut c) = (Vec::new(), Vec::new(), Vec::new());
+            let mut r = read::DeflateDecoder::new(&data[..]);
+            r.read_to_end(&mut a).unwrap();
+            r.reset(&data);
+            r.read_to_end(&mut b).unwrap();
+
+            let mut r = read::DeflateDecoder::new(&data[..]);
+            r.read_to_end(&mut c).unwrap();
+            assert!(a == b && b == c && c == v);
+        }
+
+        {
+            let mut w = write::DeflateDecoder::new(Vec::new());
+            w.write_all(&data).unwrap();
+            let a = w.reset(Vec::new()).unwrap();
+            w.write_all(&data).unwrap();
+            let b = w.finish().unwrap();
+
+            let mut w = write::DeflateDecoder::new(Vec::new());
+            w.write_all(&data).unwrap();
+            let c = w.finish().unwrap();
+            assert!(a == b && b == c && c == v);
+        }
+    }
+
+    #[test]
+    fn zero_length_read_with_data() {
+        let m = vec![3u8; 128 * 1024 + 1];
+        let mut c = read::DeflateEncoder::new(&m[..], ::Compression::Default);
+
+        let mut result = Vec::new();
+        c.read_to_end(&mut result).unwrap();
+
+        let mut d = read::DeflateDecoder::new(&result[..]);
+        let mut data = Vec::new();
+        assert!(d.read(&mut data).unwrap() == 0);
+    }
+
+    #[test]
+    fn qc_reader() {
+        ::quickcheck::quickcheck(test as fn(_) -> _);
+
+        fn test(v: Vec<u8>) -> bool {
+            let mut r = read::DeflateDecoder::new(read::DeflateEncoder::new(&v[..], Default));
+            let mut v2 = Vec::new();
+            r.read_to_end(&mut v2).unwrap();
+            v == v2
+        }
+    }
+
+    #[test]
+    fn qc_writer() {
+        ::quickcheck::quickcheck(test as fn(_) -> _);
+
+        fn test(v: Vec<u8>) -> bool {
+            let mut w = write::DeflateEncoder::new(write::DeflateDecoder::new(Vec::new()), Default);
+            w.write_all(&v).unwrap();
+            v == w.finish().unwrap().finish().unwrap()
+        }
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/src/deflate/read.rs
@@ -0,0 +1,268 @@
+use std::io::prelude::*;
+use std::io;
+
+#[cfg(feature = "tokio")]
+use futures::Poll;
+#[cfg(feature = "tokio")]
+use tokio_io::{AsyncRead, AsyncWrite};
+
+use bufreader::BufReader;
+use super::bufread;
+
+/// A DEFLATE encoder, or compressor.
+///
+/// This structure implements a [`Read`] interface and will read uncompressed
+/// data from an underlying stream and emit a stream of compressed data.
+///
+/// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// use flate2::Compression;
+/// use flate2::read::DeflateEncoder;
+///
+/// # fn main() {
+/// #    println!("{:?}", deflateencoder_read_hello_world().unwrap());
+/// # }
+/// #
+/// // Return a vector containing the Deflate compressed version of hello world
+/// fn deflateencoder_read_hello_world() -> io::Result<Vec<u8>> {
+///    let mut ret_vec = [0;100];
+///    let c = b"hello world";
+///    let mut deflater = DeflateEncoder::new(&c[..], Compression::Fast);
+///    let count = deflater.read(&mut ret_vec)?;
+///    Ok(ret_vec[0..count].to_vec())
+/// }
+/// ```
+#[derive(Debug)]
+pub struct DeflateEncoder<R> {
+    inner: bufread::DeflateEncoder<BufReader<R>>,
+}
+
+impl<R: Read> DeflateEncoder<R> {
+    /// Creates a new encoder which will read uncompressed data from the given
+    /// stream and emit the compressed stream.
+    pub fn new(r: R, level: ::Compression) -> DeflateEncoder<R> {
+        DeflateEncoder {
+            inner: bufread::DeflateEncoder::new(BufReader::new(r), level),
+        }
+    }
+}
+
+impl<R> DeflateEncoder<R> {
+    /// Resets the state of this encoder entirely, swapping out the input
+    /// stream for another.
+    ///
+    /// This function will reset the internal state of this encoder and replace
+    /// the input stream with the one provided, returning the previous input
+    /// stream. Future data read from this encoder will be the compressed
+    /// version of `r`'s data.
+    ///
+    /// Note that there may be currently buffered data when this function is
+    /// called, and in that case the buffered data is discarded.
+    pub fn reset(&mut self, r: R) -> R {
+        super::bufread::reset_encoder_data(&mut self.inner);
+        self.inner.get_mut().reset(r)
+    }
+
+    /// Acquires a reference to the underlying reader
+    pub fn get_ref(&self) -> &R {
+        self.inner.get_ref().get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying stream
+    ///
+    /// Note that mutation of the stream may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        self.inner.get_mut().get_mut()
+    }
+
+    /// Consumes this encoder, returning the underlying reader.
+    ///
+    /// Note that there may be buffered bytes which are not re-acquired as part
+    /// of this transition. It's recommended to only call this function after
+    /// EOF has been reached.
+    pub fn into_inner(self) -> R {
+        self.inner.into_inner().into_inner()
+    }
+
+    /// Returns the number of bytes that have been read into this compressor.
+    ///
+    /// Note that not all bytes read from the underlying object may be accounted
+    /// for, there may still be some active buffering.
+    pub fn total_in(&self) -> u64 {
+        self.inner.total_in()
+    }
+
+    /// Returns the number of bytes that the compressor has produced.
+    ///
+    /// Note that not all bytes may have been read yet, some may still be
+    /// buffered.
+    pub fn total_out(&self) -> u64 {
+        self.inner.total_out()
+    }
+}
+
+impl<R: Read> Read for DeflateEncoder<R> {
+    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
+        self.inner.read(buf)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncRead> AsyncRead for DeflateEncoder<R> {}
+
+impl<W: Read + Write> Write for DeflateEncoder<W> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncRead + AsyncWrite> AsyncWrite for DeflateEncoder<R> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        self.get_mut().shutdown()
+    }
+}
+
+/// A DEFLATE decoder, or decompressor.
+///
+/// This structure implements a [`Read`] interface and takes a stream of
+/// compressed data as input, providing the decompressed data when read from.
+///
+/// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// # use flate2::Compression;
+/// # use flate2::write::DeflateEncoder;
+/// use flate2::read::DeflateDecoder;
+///
+/// # fn main() {
+/// #    let mut e = DeflateEncoder::new(Vec::new(), Compression::Default);
+/// #    e.write(b"Hello World").unwrap();
+/// #    let bytes = e.finish().unwrap();
+/// #    println!("{}", decode_reader(bytes).unwrap());
+/// # }
+/// // Uncompresses a Deflate Encoded vector of bytes and returns a string or error
+/// // Here &[u8] implements Read
+/// fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+///    let mut deflater = DeflateDecoder::new(&bytes[..]);
+///    let mut s = String::new();
+///    deflater.read_to_string(&mut s)?;
+///    Ok(s)
+/// }
+/// ```
+#[derive(Debug)]
+pub struct DeflateDecoder<R> {
+    inner: bufread::DeflateDecoder<BufReader<R>>,
+}
+
+
+
+impl<R: Read> DeflateDecoder<R> {
+    /// Creates a new decoder which will decompress data read from the given
+    /// stream.
+    pub fn new(r: R) -> DeflateDecoder<R> {
+        DeflateDecoder::new_with_buf(r, vec![0; 32 * 1024])
+    }
+
+    /// Same as `new`, but the intermediate buffer for data is specified.
+    ///
+    /// Note that the capacity of the intermediate buffer is never increased,
+    /// and it is recommended for it to be large.
+    pub fn new_with_buf(r: R, buf: Vec<u8>) -> DeflateDecoder<R> {
+        DeflateDecoder {
+            inner: bufread::DeflateDecoder::new(BufReader::with_buf(buf, r)),
+        }
+    }
+}
+
+impl<R> DeflateDecoder<R> {
+    /// Resets the state of this decoder entirely, swapping out the input
+    /// stream for another.
+    ///
+    /// This will reset the internal state of this decoder and replace the
+    /// input stream with the one provided, returning the previous input
+    /// stream. Future data read from this decoder will be the decompressed
+    /// version of `r`'s data.
+    ///
+    /// Note that there may be currently buffered data when this function is
+    /// called, and in that case the buffered data is discarded.
+    pub fn reset(&mut self, r: R) -> R {
+        super::bufread::reset_decoder_data(&mut self.inner);
+        self.inner.get_mut().reset(r)
+    }
+
+    /// Acquires a reference to the underlying stream
+    pub fn get_ref(&self) -> &R {
+        self.inner.get_ref().get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying stream
+    ///
+    /// Note that mutation of the stream may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        self.inner.get_mut().get_mut()
+    }
+
+    /// Consumes this decoder, returning the underlying reader.
+    ///
+    /// Note that there may be buffered bytes which are not re-acquired as part
+    /// of this transition. It's recommended to only call this function after
+    /// EOF has been reached.
+    pub fn into_inner(self) -> R {
+        self.inner.into_inner().into_inner()
+    }
+
+    /// Returns the number of bytes that the decompressor has consumed.
+    ///
+    /// Note that this will likely be smaller than what the decompressor
+    /// actually read from the underlying stream due to buffering.
+    pub fn total_in(&self) -> u64 {
+        self.inner.total_in()
+    }
+
+    /// Returns the number of bytes that the decompressor has produced.
+    pub fn total_out(&self) -> u64 {
+        self.inner.total_out()
+    }
+}
+
+impl<R: Read> Read for DeflateDecoder<R> {
+    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
+        self.inner.read(into)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncRead> AsyncRead for DeflateDecoder<R> {}
+
+impl<W: Read + Write> Write for DeflateDecoder<W> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncWrite + AsyncRead> AsyncWrite for DeflateDecoder<R> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        self.get_mut().shutdown()
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/src/deflate/write.rs
@@ -0,0 +1,350 @@
+use std::io::prelude::*;
+use std::io;
+
+#[cfg(feature = "tokio")]
+use futures::Poll;
+#[cfg(feature = "tokio")]
+use tokio_io::{AsyncRead, AsyncWrite};
+
+use zio;
+use {Compress, Decompress};
+
+/// A DEFLATE encoder, or compressor.
+///
+/// This structure implements a [`Write`] interface and takes a stream of
+/// uncompressed data, writing the compressed data to the wrapped writer.
+///
+/// [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use flate2::Compression;
+/// use flate2::write::DeflateEncoder;
+///
+/// // Vec<u8> implements Write to print the compressed bytes of sample string
+/// # fn main() {
+///
+/// let mut e = DeflateEncoder::new(Vec::new(), Compression::Default);
+/// e.write(b"Hello World").unwrap();
+/// println!("{:?}", e.finish().unwrap());
+/// # }
+/// ```
+#[derive(Debug)]
+pub struct DeflateEncoder<W: Write> {
+    inner: zio::Writer<W, Compress>,
+}
+
+impl<W: Write> DeflateEncoder<W> {
+    /// Creates a new encoder which will write compressed data to the stream
+    /// given at the given compression level.
+    ///
+    /// When this encoder is dropped or unwrapped the final pieces of data will
+    /// be flushed.
+    pub fn new(w: W, level: ::Compression) -> DeflateEncoder<W> {
+        DeflateEncoder {
+            inner: zio::Writer::new(w, Compress::new(level, false)),
+        }
+    }
+
+    /// Acquires a reference to the underlying writer.
+    pub fn get_ref(&self) -> &W {
+        self.inner.get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying writer.
+    ///
+    /// Note that mutating the output/input state of the stream may corrupt this
+    /// object, so care must be taken when using this method.
+    pub fn get_mut(&mut self) -> &mut W {
+        self.inner.get_mut()
+    }
+
+    /// Resets the state of this encoder entirely, swapping out the output
+    /// stream for another.
+    ///
+    /// This function will finish encoding the current stream into the current
+    /// output stream before swapping out the two output streams. If the stream
+    /// cannot be finished an error is returned.
+    ///
+    /// After the current stream has been finished, this will reset the internal
+    /// state of this encoder and replace the output stream with the one
+    /// provided, returning the previous output stream. Future data written to
+    /// this encoder will be the compressed into the stream `w` provided.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn reset(&mut self, w: W) -> io::Result<W> {
+        try!(self.inner.finish());
+        self.inner.data.reset();
+        Ok(self.inner.replace(w))
+    }
+
+    /// Attempt to finish this output stream, writing out final chunks of data.
+    ///
+    /// Note that this function can only be used once data has finished being
+    /// written to the output stream. After this function is called then further
+    /// calls to `write` may result in a panic.
+    ///
+    /// # Panics
+    ///
+    /// Attempts to write data to this stream may result in a panic after this
+    /// function is called.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn try_finish(&mut self) -> io::Result<()> {
+        self.inner.finish()
+    }
+
+    /// Consumes this encoder, flushing the output stream.
+    ///
+    /// This will flush the underlying data stream, close off the compressed
+    /// stream and, if successful, return the contained writer.
+    ///
+    /// Note that this function may not be suitable to call in a situation where
+    /// the underlying stream is an asynchronous I/O stream. To finish a stream
+    /// the `try_finish` (or `shutdown`) method should be used instead. To
+    /// re-acquire ownership of a stream it is safe to call this method after
+    /// `try_finish` or `shutdown` has returned `Ok`.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn finish(mut self) -> io::Result<W> {
+        try!(self.inner.finish());
+        Ok(self.inner.take_inner())
+    }
+
+    /// Consumes this encoder, flushing the output stream.
+    ///
+    /// This will flush the underlying data stream and then return the contained
+    /// writer if the flush succeeded.
+    /// The compressed stream will not closed but only flushed. This
+    /// means that obtained byte array can by extended by another deflated
+    /// stream. To close the stream add the two bytes 0x3 and 0x0.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn flush_finish(mut self) -> io::Result<W> {
+        try!(self.inner.flush());
+        Ok(self.inner.take_inner())
+    }
+
+    /// Returns the number of bytes that have been written to this compresor.
+    ///
+    /// Note that not all bytes written to this object may be accounted for,
+    /// there may still be some active buffering.
+    pub fn total_in(&self) -> u64 {
+        self.inner.data.total_in()
+    }
+
+    /// Returns the number of bytes that the compressor has produced.
+    ///
+    /// Note that not all bytes may have been written yet, some may still be
+    /// buffered.
+    pub fn total_out(&self) -> u64 {
+        self.inner.data.total_out()
+    }
+}
+
+impl<W: Write> Write for DeflateEncoder<W> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.inner.write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.inner.flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<W: AsyncWrite> AsyncWrite for DeflateEncoder<W> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        try_nb!(self.inner.finish());
+        self.inner.get_mut().shutdown()
+    }
+}
+
+impl<W: Read + Write> Read for DeflateEncoder<W> {
+    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
+        self.inner.get_mut().read(buf)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<W: AsyncRead + AsyncWrite> AsyncRead for DeflateEncoder<W> {}
+
+/// A DEFLATE decoder, or decompressor.
+///
+/// This structure implements a [`Write`] and will emit a stream of decompressed
+/// data when fed a stream of compressed data.
+///
+/// [`Write`]: https://doc.rust-lang.org/std/io/trait.Read.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// # use flate2::Compression;
+/// # use flate2::write::DeflateEncoder;
+/// use flate2::write::DeflateDecoder;
+///
+/// # fn main() {
+/// #    let mut e = DeflateEncoder::new(Vec::new(), Compression::Default);
+/// #    e.write(b"Hello World").unwrap();
+/// #    let bytes = e.finish().unwrap();
+/// #    println!("{}", decode_writer(bytes).unwrap());
+/// # }
+/// // Uncompresses a Deflate Encoded vector of bytes and returns a string or error
+/// // Here Vec<u8> implements Write
+/// fn decode_writer(bytes: Vec<u8>) -> io::Result<String> {
+///    let mut writer = Vec::new();
+///    let mut deflater = DeflateDecoder::new(writer);
+///    deflater.write(&bytes[..])?;
+///    writer = deflater.finish()?;
+///    let return_string = String::from_utf8(writer).expect("String parsing error");
+///    Ok(return_string)
+/// }
+/// ```
+#[derive(Debug)]
+pub struct DeflateDecoder<W: Write> {
+    inner: zio::Writer<W, Decompress>,
+}
+
+
+impl<W: Write> DeflateDecoder<W> {
+    /// Creates a new decoder which will write uncompressed data to the stream.
+    ///
+    /// When this encoder is dropped or unwrapped the final pieces of data will
+    /// be flushed.
+    pub fn new(w: W) -> DeflateDecoder<W> {
+        DeflateDecoder {
+            inner: zio::Writer::new(w, Decompress::new(false)),
+        }
+    }
+
+    /// Acquires a reference to the underlying writer.
+    pub fn get_ref(&self) -> &W {
+        self.inner.get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying writer.
+    ///
+    /// Note that mutating the output/input state of the stream may corrupt this
+    /// object, so care must be taken when using this method.
+    pub fn get_mut(&mut self) -> &mut W {
+        self.inner.get_mut()
+    }
+
+    /// Resets the state of this decoder entirely, swapping out the output
+    /// stream for another.
+    ///
+    /// This function will finish encoding the current stream into the current
+    /// output stream before swapping out the two output streams.
+    ///
+    /// This will then reset the internal state of this decoder and replace the
+    /// output stream with the one provided, returning the previous output
+    /// stream. Future data written to this decoder will be decompressed into
+    /// the output stream `w`.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to finish the stream, and if that I/O
+    /// returns an error then that will be returned from this function.
+    pub fn reset(&mut self, w: W) -> io::Result<W> {
+        try!(self.inner.finish());
+        self.inner.data = Decompress::new(false);
+        Ok(self.inner.replace(w))
+    }
+
+    /// Attempt to finish this output stream, writing out final chunks of data.
+    ///
+    /// Note that this function can only be used once data has finished being
+    /// written to the output stream. After this function is called then further
+    /// calls to `write` may result in a panic.
+    ///
+    /// # Panics
+    ///
+    /// Attempts to write data to this stream may result in a panic after this
+    /// function is called.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to finish the stream, returning any
+    /// errors which happen.
+    pub fn try_finish(&mut self) -> io::Result<()> {
+        self.inner.finish()
+    }
+
+    /// Consumes this encoder, flushing the output stream.
+    ///
+    /// This will flush the underlying data stream and then return the contained
+    /// writer if the flush succeeded.
+    ///
+    /// Note that this function may not be suitable to call in a situation where
+    /// the underlying stream is an asynchronous I/O stream. To finish a stream
+    /// the `try_finish` (or `shutdown`) method should be used instead. To
+    /// re-acquire ownership of a stream it is safe to call this method after
+    /// `try_finish` or `shutdown` has returned `Ok`.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn finish(mut self) -> io::Result<W> {
+        try!(self.inner.finish());
+        Ok(self.inner.take_inner())
+    }
+
+    /// Returns the number of bytes that the decompressor has consumed for
+    /// decompression.
+    ///
+    /// Note that this will likely be smaller than the number of bytes
+    /// successfully written to this stream due to internal buffering.
+    pub fn total_in(&self) -> u64 {
+        self.inner.data.total_in()
+    }
+
+    /// Returns the number of bytes that the decompressor has written to its
+    /// output stream.
+    pub fn total_out(&self) -> u64 {
+        self.inner.data.total_out()
+    }
+}
+
+impl<W: Write> Write for DeflateDecoder<W> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.inner.write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.inner.flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<W: AsyncWrite> AsyncWrite for DeflateDecoder<W> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        try_nb!(self.inner.finish());
+        self.inner.get_mut().shutdown()
+    }
+}
+
+impl<W: Read + Write> Read for DeflateDecoder<W> {
+    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
+        self.inner.get_mut().read(buf)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<W: AsyncRead + AsyncWrite> AsyncRead for DeflateDecoder<W> {}
--- a/third_party/rust/flate2/src/ffi.rs
+++ b/third_party/rust/flate2/src/ffi.rs
@@ -64,16 +64,22 @@ mod imp {
                          ZLIB_VERSION.as_ptr() as *const c_char,
                          mem::size_of::<mz_stream>() as c_int)
     }
 
     pub struct StreamWrapper{
         inner: Box<mz_stream>,
     }
 
+    impl ::std::fmt::Debug for StreamWrapper{
+        fn fmt(&self, f: &mut ::std::fmt::Formatter) -> Result<(), ::std::fmt::Error>{
+            write!(f, "StreamWrapper")
+        }
+    }
+
     impl Default for StreamWrapper {
         fn default() -> StreamWrapper {
             StreamWrapper {
                 inner: Box::new(unsafe{ mem::zeroed() })
             }
         }
     }
 
@@ -100,16 +106,22 @@ mod imp {
 
     use libc::{c_ulong, off_t};
     pub use self::miniz_sys::*;
 
     pub struct StreamWrapper {
         inner: mz_stream,
     }
 
+    impl ::std::fmt::Debug for StreamWrapper{
+        fn fmt(&self, f: &mut ::std::fmt::Formatter) -> Result<(), ::std::fmt::Error>{
+            write!(f, "StreamWrapper")
+        }
+    }
+
     impl Default for StreamWrapper {
         fn default() -> StreamWrapper {
             StreamWrapper {
                 inner : unsafe{ mem::zeroed() }
             }
         }
     }
 
deleted file mode 100644
--- a/third_party/rust/flate2/src/gz.rs
+++ /dev/null
@@ -1,1049 +0,0 @@
-//! gzip compression/decompression
-//!
-//! [1]: http://www.gzip.org/zlib/rfc-gzip.html
-
-use std::cmp;
-use std::env;
-use std::ffi::CString;
-use std::io::prelude::*;
-use std::io;
-use std::mem;
-
-#[cfg(feature = "tokio")]
-use futures::Poll;
-#[cfg(feature = "tokio")]
-use tokio_io::{AsyncRead, AsyncWrite};
-
-use {Compression, Compress};
-use bufreader::BufReader;
-use crc::{CrcReader, Crc};
-use deflate;
-use zio;
-
-static FHCRC: u8 = 1 << 1;
-static FEXTRA: u8 = 1 << 2;
-static FNAME: u8 = 1 << 3;
-static FCOMMENT: u8 = 1 << 4;
-
-/// A gzip streaming encoder
-///
-/// This structure exposes a `Write` interface that will emit compressed data
-/// to the underlying writer `W`.
-pub struct EncoderWriter<W: Write> {
-    inner: zio::Writer<W, Compress>,
-    crc: Crc,
-    crc_bytes_written: usize,
-    header: Vec<u8>,
-}
-
-/// A gzip streaming encoder
-///
-/// This structure exposes a `Read` interface that will read uncompressed data
-/// from the underlying reader and expose the compressed version as a `Read`
-/// interface.
-pub struct EncoderReader<R: Read> {
-    inner: EncoderReaderBuf<BufReader<R>>,
-}
-
-/// A gzip streaming encoder
-///
-/// This structure exposes a `Read` interface that will read uncompressed data
-/// from the underlying reader and expose the compressed version as a `Read`
-/// interface.
-pub struct EncoderReaderBuf<R: BufRead> {
-    inner: deflate::EncoderReaderBuf<CrcReader<R>>,
-    header: Vec<u8>,
-    pos: usize,
-    eof: bool,
-}
-
-/// A builder structure to create a new gzip Encoder.
-///
-/// This structure controls header configuration options such as the filename.
-pub struct Builder {
-    extra: Option<Vec<u8>>,
-    filename: Option<CString>,
-    comment: Option<CString>,
-    mtime: u32,
-}
-
-/// A gzip streaming decoder
-///
-/// This structure exposes a `Read` interface that will consume compressed
-/// data from the underlying reader and emit uncompressed data.
-pub struct DecoderReader<R: Read> {
-    inner: DecoderReaderBuf<BufReader<R>>,
-}
-
-/// A gzip streaming decoder that decodes all members of a multistream
-///
-/// A gzip member consists of a header, compressed data and a trailer. The [gzip
-/// specification](https://tools.ietf.org/html/rfc1952), however, allows multiple
-/// gzip members to be joined in a single stream.  `MultiDecoderReader` will
-/// decode all consecutive members while `DecoderReader` will only decompress the
-/// first gzip member. The multistream format is commonly used in bioinformatics,
-/// for example when using the BGZF compressed data.
-///
-/// This structure exposes a `Read` interface that will consume all gzip members
-/// from the underlying reader and emit uncompressed data.
-pub struct MultiDecoderReader<R: Read> {
-    inner: MultiDecoderReaderBuf<BufReader<R>>,
-}
-
-/// A gzip streaming decoder
-///
-/// This structure exposes a `Read` interface that will consume compressed
-/// data from the underlying reader and emit uncompressed data.
-pub struct DecoderReaderBuf<R: BufRead> {
-    inner: CrcReader<deflate::DecoderReaderBuf<R>>,
-    header: Header,
-    finished: bool,
-}
-
-/// A gzip streaming decoder that decodes all members of a multistream
-///
-/// A gzip member consists of a header, compressed data and a trailer. The [gzip
-/// specification](https://tools.ietf.org/html/rfc1952), however, allows multiple
-/// gzip members to be joined in a single stream. `MultiDecoderReaderBuf` will
-/// decode all consecutive members while `DecoderReaderBuf` will only decompress
-/// the first gzip member. The multistream format is commonly used in
-/// bioinformatics, for example when using the BGZF compressed data.
-///
-/// This structure exposes a `Read` interface that will consume all gzip members
-/// from the underlying reader and emit uncompressed data.
-pub struct MultiDecoderReaderBuf<R: BufRead> {
-    inner: CrcReader<deflate::DecoderReaderBuf<R>>,
-    header: Header,
-    finished: bool,
-}
-
-/// A structure representing the header of a gzip stream.
-///
-/// The header can contain metadata about the file that was compressed, if
-/// present.
-pub struct Header {
-    extra: Option<Vec<u8>>,
-    filename: Option<Vec<u8>>,
-    comment: Option<Vec<u8>>,
-    mtime: u32,
-}
-
-impl Builder {
-    /// Create a new blank builder with no header by default.
-    pub fn new() -> Builder {
-        Builder {
-            extra: None,
-            filename: None,
-            comment: None,
-            mtime: 0,
-        }
-    }
-
-    /// Configure the `mtime` field in the gzip header.
-    pub fn mtime(mut self, mtime: u32) -> Builder {
-        self.mtime = mtime;
-        self
-    }
-
-    /// Configure the `extra` field in the gzip header.
-    pub fn extra(mut self, extra: Vec<u8>) -> Builder {
-        self.extra = Some(extra);
-        self
-    }
-
-    /// Configure the `filename` field in the gzip header.
-    pub fn filename(mut self, filename: &[u8]) -> Builder {
-        self.filename = Some(CString::new(filename).unwrap());
-        self
-    }
-
-    /// Configure the `comment` field in the gzip header.
-    pub fn comment(mut self, comment: &[u8]) -> Builder {
-        self.comment = Some(CString::new(comment).unwrap());
-        self
-    }
-
-    /// Consume this builder, creating a writer encoder in the process.
-    ///
-    /// The data written to the returned encoder will be compressed and then
-    /// written out to the supplied parameter `w`.
-    pub fn write<W: Write>(self, w: W, lvl: Compression) -> EncoderWriter<W> {
-        EncoderWriter {
-            inner: zio::Writer::new(w, Compress::new(lvl, false)),
-            crc: Crc::new(),
-            header: self.into_header(lvl),
-            crc_bytes_written: 0,
-        }
-    }
-
-    /// Consume this builder, creating a reader encoder in the process.
-    ///
-    /// Data read from the returned encoder will be the compressed version of
-    /// the data read from the given reader.
-    pub fn read<R: Read>(self, r: R, lvl: Compression) -> EncoderReader<R> {
-        EncoderReader {
-            inner: self.buf_read(BufReader::new(r), lvl),
-        }
-    }
-
-    /// Consume this builder, creating a reader encoder in the process.
-    ///
-    /// Data read from the returned encoder will be the compressed version of
-    /// the data read from the given reader.
-    pub fn buf_read<R>(self, r: R, lvl: Compression) -> EncoderReaderBuf<R>
-        where R: BufRead
-    {
-        let crc = CrcReader::new(r);
-        EncoderReaderBuf {
-            inner: deflate::EncoderReaderBuf::new(crc, lvl),
-            header: self.into_header(lvl),
-            pos: 0,
-            eof: false,
-        }
-    }
-
-    fn into_header(self, lvl: Compression) -> Vec<u8> {
-        let Builder { extra, filename, comment, mtime } = self;
-        let mut flg = 0;
-        let mut header = vec![0u8; 10];
-        match extra {
-            Some(v) => {
-                flg |= FEXTRA;
-                header.push((v.len() >> 0) as u8);
-                header.push((v.len() >> 8) as u8);
-                header.extend(v);
-            }
-            None => {}
-        }
-        match filename {
-            Some(filename) => {
-                flg |= FNAME;
-                header.extend(filename.as_bytes_with_nul().iter().map(|x| *x));
-            }
-            None => {}
-        }
-        match comment {
-            Some(comment) => {
-                flg |= FCOMMENT;
-                header.extend(comment.as_bytes_with_nul().iter().map(|x| *x));
-            }
-            None => {}
-        }
-        header[0] = 0x1f;
-        header[1] = 0x8b;
-        header[2] = 8;
-        header[3] = flg;
-        header[4] = (mtime >> 0) as u8;
-        header[5] = (mtime >> 8) as u8;
-        header[6] = (mtime >> 16) as u8;
-        header[7] = (mtime >> 24) as u8;
-        header[8] = match lvl {
-            Compression::Best => 2,
-            Compression::Fast => 4,
-            _ => 0,
-        };
-        header[9] = match env::consts::OS {
-            "linux" => 3,
-            "macos" => 7,
-            "win32" => 0,
-            _ => 255,
-        };
-        return header;
-    }
-}
-
-impl<W: Write> EncoderWriter<W> {
-    /// Creates a new encoder which will use the given compression level.
-    ///
-    /// The encoder is not configured specially for the emitted header. For
-    /// header configuration, see the `Builder` type.
-    ///
-    /// The data written to the returned encoder will be compressed and then
-    /// written to the stream `w`.
-    pub fn new(w: W, level: Compression) -> EncoderWriter<W> {
-        Builder::new().write(w, level)
-    }
-
-    /// Acquires a reference to the underlying writer.
-    pub fn get_ref(&self) -> &W {
-        self.inner.get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying writer.
-    ///
-    /// Note that mutation of the writer may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut W {
-        self.inner.get_mut()
-    }
-
-    /// Attempt to finish this output stream, writing out final chunks of data.
-    ///
-    /// Note that this function can only be used once data has finished being
-    /// written to the output stream. After this function is called then further
-    /// calls to `write` may result in a panic.
-    ///
-    /// # Panics
-    ///
-    /// Attempts to write data to this stream may result in a panic after this
-    /// function is called.
-    pub fn try_finish(&mut self) -> io::Result<()> {
-        try!(self.write_header());
-        try!(self.inner.finish());
-
-        while self.crc_bytes_written < 8 {
-            let (sum, amt) = (self.crc.sum() as u32, self.crc.amount());
-            let buf = [(sum >> 0) as u8,
-                       (sum >> 8) as u8,
-                       (sum >> 16) as u8,
-                       (sum >> 24) as u8,
-                       (amt >> 0) as u8,
-                       (amt >> 8) as u8,
-                       (amt >> 16) as u8,
-                       (amt >> 24) as u8];
-            let mut inner = self.inner.get_mut();
-            let n = try!(inner.write(&buf[self.crc_bytes_written..]));
-            self.crc_bytes_written += n;
-        }
-        Ok(())
-    }
-
-    /// Finish encoding this stream, returning the underlying writer once the
-    /// encoding is done.
-    ///
-    /// Note that this function may not be suitable to call in a situation where
-    /// the underlying stream is an asynchronous I/O stream. To finish a stream
-    /// the `try_finish` (or `shutdown`) method should be used instead. To
-    /// re-acquire ownership of a stream it is safe to call this method after
-    /// `try_finish` or `shutdown` has returned `Ok`.
-    pub fn finish(mut self) -> io::Result<W> {
-        try!(self.try_finish());
-        Ok(self.inner.take_inner())
-    }
-
-    fn write_header(&mut self) -> io::Result<()> {
-        while self.header.len() > 0 {
-            let n = try!(self.inner.get_mut().write(&self.header));
-            self.header.drain(..n);
-        }
-        Ok(())
-    }
-}
-
-impl<W: Write> Write for EncoderWriter<W> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        assert_eq!(self.crc_bytes_written, 0);
-        try!(self.write_header());
-        let n = try!(self.inner.write(buf));
-        self.crc.update(&buf[..n]);
-        Ok(n)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        assert_eq!(self.crc_bytes_written, 0);
-        self.inner.flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<W: AsyncWrite> AsyncWrite for EncoderWriter<W> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        try_nb!(self.try_finish());
-        self.get_mut().shutdown()
-    }
-}
-
-impl<R: Read + Write> Read for EncoderWriter<R> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        self.get_mut().read(buf)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncRead + AsyncWrite> AsyncRead for EncoderWriter<R> {
-}
-
-impl<W: Write> Drop for EncoderWriter<W> {
-    fn drop(&mut self) {
-        if self.inner.is_present() {
-            let _ = self.try_finish();
-        }
-    }
-}
-
-impl<R: Read> EncoderReader<R> {
-    /// Creates a new encoder which will use the given compression level.
-    ///
-    /// The encoder is not configured specially for the emitted header. For
-    /// header configuration, see the `Builder` type.
-    ///
-    /// The data read from the stream `r` will be compressed and available
-    /// through the returned reader.
-    pub fn new(r: R, level: Compression) -> EncoderReader<R> {
-        Builder::new().read(r, level)
-    }
-
-    /// Acquires a reference to the underlying reader.
-    pub fn get_ref(&self) -> &R {
-        self.inner.get_ref().get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying reader.
-    ///
-    /// Note that mutation of the reader may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        self.inner.get_mut().get_mut()
-    }
-
-    /// Returns the underlying stream, consuming this encoder
-    pub fn into_inner(self) -> R {
-        self.inner.into_inner().into_inner()
-    }
-}
-
-fn copy(into: &mut [u8], from: &[u8], pos: &mut usize) -> usize {
-    let min = cmp::min(into.len(), from.len() - *pos);
-    for (slot, val) in into.iter_mut().zip(from[*pos..*pos + min].iter()) {
-        *slot = *val;
-    }
-    *pos += min;
-    return min;
-}
-
-impl<R: Read> Read for EncoderReader<R> {
-    fn read(&mut self, mut into: &mut [u8]) -> io::Result<usize> {
-        self.inner.read(into)
-    }
-}
-
-impl<R: Read + Write> Write for EncoderReader<R> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-impl<R: BufRead> EncoderReaderBuf<R> {
-    /// Creates a new encoder which will use the given compression level.
-    ///
-    /// The encoder is not configured specially for the emitted header. For
-    /// header configuration, see the `Builder` type.
-    ///
-    /// The data read from the stream `r` will be compressed and available
-    /// through the returned reader.
-    pub fn new(r: R, level: Compression) -> EncoderReaderBuf<R> {
-        Builder::new().buf_read(r, level)
-    }
-
-    /// Acquires a reference to the underlying reader.
-    pub fn get_ref(&self) -> &R {
-        self.inner.get_ref().get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying reader.
-    ///
-    /// Note that mutation of the reader may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        self.inner.get_mut().get_mut()
-    }
-
-    /// Returns the underlying stream, consuming this encoder
-    pub fn into_inner(self) -> R {
-        self.inner.into_inner().into_inner()
-    }
-
-    fn read_footer(&mut self, into: &mut [u8]) -> io::Result<usize> {
-        if self.pos == 8 {
-            return Ok(0);
-        }
-        let crc = self.inner.get_ref().crc();
-        let ref arr = [(crc.sum() >> 0) as u8,
-                       (crc.sum() >> 8) as u8,
-                       (crc.sum() >> 16) as u8,
-                       (crc.sum() >> 24) as u8,
-                       (crc.amount() >> 0) as u8,
-                       (crc.amount() >> 8) as u8,
-                       (crc.amount() >> 16) as u8,
-                       (crc.amount() >> 24) as u8];
-        Ok(copy(into, arr, &mut self.pos))
-    }
-}
-
-impl<R: BufRead> Read for EncoderReaderBuf<R> {
-    fn read(&mut self, mut into: &mut [u8]) -> io::Result<usize> {
-        let mut amt = 0;
-        if self.eof {
-            return self.read_footer(into);
-        } else if self.pos < self.header.len() {
-            amt += copy(into, &self.header, &mut self.pos);
-            if amt == into.len() {
-                return Ok(amt);
-            }
-            let tmp = into;
-            into = &mut tmp[amt..];
-        }
-        match try!(self.inner.read(into)) {
-            0 => {
-                self.eof = true;
-                self.pos = 0;
-                self.read_footer(into)
-            }
-            n => Ok(amt + n),
-        }
-    }
-}
-
-impl<R: BufRead + Write> Write for EncoderReaderBuf<R> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-impl<R: Read> DecoderReader<R> {
-    /// Creates a new decoder from the given reader, immediately parsing the
-    /// gzip header.
-    ///
-    /// If an error is encountered when parsing the gzip header, an error is
-    /// returned.
-    pub fn new(r: R) -> io::Result<DecoderReader<R>> {
-        DecoderReaderBuf::new(BufReader::new(r)).map(|r| {
-            DecoderReader { inner: r }
-        })
-    }
-
-    /// Returns the header associated with this stream.
-    pub fn header(&self) -> &Header {
-        self.inner.header()
-    }
-
-    /// Acquires a reference to the underlying reader.
-    pub fn get_ref(&self) -> &R {
-        self.inner.get_ref().get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying stream.
-    ///
-    /// Note that mutation of the stream may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        self.inner.get_mut().get_mut()
-    }
-
-    /// Consumes this decoder, returning the underlying reader.
-    pub fn into_inner(self) -> R {
-        self.inner.into_inner().into_inner()
-    }
-}
-
-impl<R: Read> Read for DecoderReader<R> {
-    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
-        self.inner.read(into)
-    }
-}
-
-impl<R: Read + Write> Write for DecoderReader<R> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-impl<R: Read> MultiDecoderReader<R> {
-    /// Creates a new decoder from the given reader, immediately parsing the
-    /// (first) gzip header. If the gzip stream contains multiple members all will
-    /// be decoded.
-    ///
-    /// If an error is encountered when parsing the gzip header, an error is
-    /// returned.
-    pub fn new(r: R) -> io::Result<MultiDecoderReader<R>> {
-        MultiDecoderReaderBuf::new(BufReader::new(r)).map(|r| {
-            MultiDecoderReader { inner: r }
-        })
-    }
-
-    /// Returns the current header associated with this stream.
-    pub fn header(&self) -> &Header {
-        self.inner.header()
-    }
-
-    /// Acquires a reference to the underlying reader.
-    pub fn get_ref(&self) -> &R {
-        self.inner.get_ref().get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying stream.
-    ///
-    /// Note that mutation of the stream may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        self.inner.get_mut().get_mut()
-    }
-
-    /// Consumes this decoder, returning the underlying reader.
-    pub fn into_inner(self) -> R {
-        self.inner.into_inner().into_inner()
-    }
-}
-
-impl<R: Read> Read for MultiDecoderReader<R> {
-    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
-        self.inner.read(into)
-    }
-}
-
-impl<R: Read + Write> Write for MultiDecoderReader<R> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-impl<R: BufRead> DecoderReaderBuf<R> {
-    /// Creates a new decoder from the given reader, immediately parsing the
-    /// gzip header.
-    ///
-    /// If an error is encountered when parsing the gzip header, an error is
-    /// returned.
-    pub fn new(mut r: R) -> io::Result<DecoderReaderBuf<R>> {
-        let header = try!(read_gz_header(&mut r));
-
-        let flate = deflate::DecoderReaderBuf::new(r);
-        return Ok(DecoderReaderBuf {
-            inner: CrcReader::new(flate),
-            header: header,
-            finished: false,
-        });
-    }
-
-
-    /// Returns the header associated with this stream.
-    pub fn header(&self) -> &Header {
-        &self.header
-    }
-
-    /// Acquires a reference to the underlying reader.
-    pub fn get_ref(&self) -> &R {
-        self.inner.get_ref().get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying stream.
-    ///
-    /// Note that mutation of the stream may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        self.inner.get_mut().get_mut()
-    }
-
-    /// Consumes this decoder, returning the underlying reader.
-    pub fn into_inner(self) -> R {
-        self.inner.into_inner().into_inner()
-    }
-
-    fn finish(&mut self) -> io::Result<()> {
-        if self.finished {
-            return Ok(());
-        }
-        let ref mut buf = [0u8; 8];
-        {
-            let mut len = 0;
-
-            while len < buf.len() {
-                match try!(self.inner.get_mut().get_mut().read(&mut buf[len..])) {
-                    0 => return Err(corrupt()),
-                    n => len += n,
-                }
-            }
-        }
-
-        let crc = ((buf[0] as u32) << 0) | ((buf[1] as u32) << 8) |
-                  ((buf[2] as u32) << 16) |
-                  ((buf[3] as u32) << 24);
-        let amt = ((buf[4] as u32) << 0) | ((buf[5] as u32) << 8) |
-                  ((buf[6] as u32) << 16) |
-                  ((buf[7] as u32) << 24);
-        if crc != self.inner.crc().sum() as u32 {
-            return Err(corrupt());
-        }
-        if amt != self.inner.crc().amount() {
-            return Err(corrupt());
-        }
-        self.finished = true;
-        Ok(())
-    }
-}
-
-impl<R: BufRead> Read for DecoderReaderBuf<R> {
-    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
-        match try!(self.inner.read(into)) {
-            0 => {
-                try!(self.finish());
-                Ok(0)
-            }
-            n => Ok(n),
-        }
-    }
-}
-
-impl<R: BufRead + Write> Write for DecoderReaderBuf<R> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-impl<R: BufRead> MultiDecoderReaderBuf<R> {
-    /// Creates a new decoder from the given reader, immediately parsing the
-    /// (first) gzip header. If the gzip stream contains multiple members all will
-    /// be decoded.
-    ///
-    /// If an error is encountered when parsing the gzip header, an error is
-    /// returned.
-    pub fn new(mut r: R) -> io::Result<MultiDecoderReaderBuf<R>> {
-        let header = try!(read_gz_header(&mut r));
-
-        let flate = deflate::DecoderReaderBuf::new(r);
-        return Ok(MultiDecoderReaderBuf {
-            inner: CrcReader::new(flate),
-            header: header,
-            finished: false,
-        });
-    }
-
-
-    /// Returns the current header associated with this stream.
-    pub fn header(&self) -> &Header {
-        &self.header
-    }
-
-    /// Acquires a reference to the underlying reader.
-    pub fn get_ref(&self) -> &R {
-        self.inner.get_ref().get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying stream.
-    ///
-    /// Note that mutation of the stream may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        self.inner.get_mut().get_mut()
-    }
-
-    /// Consumes this decoder, returning the underlying reader.
-    pub fn into_inner(self) -> R {
-        self.inner.into_inner().into_inner()
-    }
-
-    fn finish_member(&mut self) -> io::Result<usize> {
-        if self.finished {
-            return Ok(0);
-        }
-        let ref mut buf = [0u8; 8];
-        {
-            let mut len = 0;
-
-            while len < buf.len() {
-                match try!(self.inner.get_mut().get_mut().read(&mut buf[len..])) {
-                    0 => return Err(corrupt()),
-                    n => len += n,
-                }
-            }
-        }
-
-        let crc = ((buf[0] as u32) << 0) | ((buf[1] as u32) << 8) |
-                  ((buf[2] as u32) << 16) |
-                  ((buf[3] as u32) << 24);
-        let amt = ((buf[4] as u32) << 0) | ((buf[5] as u32) << 8) |
-                  ((buf[6] as u32) << 16) |
-                  ((buf[7] as u32) << 24);
-        if crc != self.inner.crc().sum() as u32 {
-            return Err(corrupt());
-        }
-        if amt != self.inner.crc().amount() {
-            return Err(corrupt());
-        }
-        let remaining = match self.inner.get_mut().get_mut().fill_buf() {
-            Ok(b) => {
-                if b.is_empty() {
-                    self.finished = true;
-                    return Ok(0);
-                } else {
-                    b.len()
-                }
-            },
-            Err(e) => return Err(e)
-        };
-
-        let next_header = try!(read_gz_header(self.inner.get_mut().get_mut()));
-        mem::replace(&mut self.header, next_header);
-        self.inner.reset();
-        self.inner.get_mut().reset_data();
-
-        Ok(remaining)
-    }
-}
-
-impl<R: BufRead> Read for MultiDecoderReaderBuf<R> {
-    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
-        match try!(self.inner.read(into)) {
-            0 => {
-                match self.finish_member() {
-                    Ok(0) => Ok(0),
-                    Ok(_) => self.read(into),
-                    Err(e) => Err(e)
-                }
-            },
-            n => Ok(n),
-        }
-    }
-}
-
-impl<R: BufRead + Write> Write for MultiDecoderReaderBuf<R> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-impl Header {
-    /// Returns the `filename` field of this gzip stream's header, if present.
-    pub fn filename(&self) -> Option<&[u8]> {
-        self.filename.as_ref().map(|s| &s[..])
-    }
-
-    /// Returns the `extra` field of this gzip stream's header, if present.
-    pub fn extra(&self) -> Option<&[u8]> {
-        self.extra.as_ref().map(|s| &s[..])
-    }
-
-    /// Returns the `comment` field of this gzip stream's header, if present.
-    pub fn comment(&self) -> Option<&[u8]> {
-        self.comment.as_ref().map(|s| &s[..])
-    }
-
-    /// Returns the `mtime` field of this gzip stream's header, if present.
-    pub fn mtime(&self) -> u32 {
-        self.mtime
-    }
-}
-
-fn corrupt() -> io::Error {
-    io::Error::new(io::ErrorKind::InvalidInput,
-                   "corrupt gzip stream does not have a matching checksum")
-}
-
-fn bad_header() -> io::Error {
-    io::Error::new(io::ErrorKind::InvalidInput, "invalid gzip header")
-}
-
-fn read_le_u16<R: Read>(r: &mut R) -> io::Result<u16> {
-    let mut b = [0; 2];
-    try!(r.read_exact(&mut b));
-    Ok((b[0] as u16) | ((b[1] as u16) << 8))
-}
-
-fn read_gz_header<R: Read>(r: &mut R) -> io::Result<Header> {
-    let mut crc_reader = CrcReader::new(r);
-    let mut header = [0; 10];
-    try!(crc_reader.read_exact(&mut header));
-
-    let id1 = header[0];
-    let id2 = header[1];
-    if id1 != 0x1f || id2 != 0x8b {
-        return Err(bad_header());
-    }
-    let cm = header[2];
-    if cm != 8 {
-        return Err(bad_header());
-    }
-
-    let flg = header[3];
-    let mtime = ((header[4] as u32) << 0) | ((header[5] as u32) << 8) |
-        ((header[6] as u32) << 16) |
-        ((header[7] as u32) << 24);
-    let _xfl = header[8];
-    let _os = header[9];
-
-    let extra = if flg & FEXTRA != 0 {
-        let xlen = try!(read_le_u16(&mut crc_reader));
-        let mut extra = vec![0; xlen as usize];
-        try!(crc_reader.read_exact(&mut extra));
-        Some(extra)
-    } else {
-        None
-    };
-    let filename = if flg & FNAME != 0 {
-        // wow this is slow
-        let mut b = Vec::new();
-        for byte in crc_reader.by_ref().bytes() {
-            let byte = try!(byte);
-            if byte == 0 {
-                break;
-            }
-            b.push(byte);
-        }
-        Some(b)
-    } else {
-        None
-    };
-    let comment = if flg & FCOMMENT != 0 {
-        // wow this is slow
-        let mut b = Vec::new();
-        for byte in crc_reader.by_ref().bytes() {
-            let byte = try!(byte);
-            if byte == 0 {
-                break;
-            }
-            b.push(byte);
-        }
-        Some(b)
-    } else {
-        None
-    };
-
-    if flg & FHCRC != 0 {
-        let calced_crc = crc_reader.crc().sum() as u16;
-        let stored_crc = try!(read_le_u16(&mut crc_reader));
-        if calced_crc != stored_crc {
-            return Err(corrupt());
-        }
-    }
-
-    Ok(Header {
-        extra: extra,
-        filename: filename,
-        comment: comment,
-        mtime: mtime,
-    })
-}
-
-#[cfg(test)]
-mod tests {
-    use std::io::prelude::*;
-
-    use super::{EncoderWriter, EncoderReader, DecoderReader, Builder};
-    use Compression::Default;
-    use rand::{thread_rng, Rng};
-
-    #[test]
-    fn roundtrip() {
-        let mut e = EncoderWriter::new(Vec::new(), Default);
-        e.write_all(b"foo bar baz").unwrap();
-        let inner = e.finish().unwrap();
-        let mut d = DecoderReader::new(&inner[..]).unwrap();
-        let mut s = String::new();
-        d.read_to_string(&mut s).unwrap();
-        assert_eq!(s, "foo bar baz");
-    }
-
-    #[test]
-    fn roundtrip_zero() {
-        let e = EncoderWriter::new(Vec::new(), Default);
-        let inner = e.finish().unwrap();
-        let mut d = DecoderReader::new(&inner[..]).unwrap();
-        let mut s = String::new();
-        d.read_to_string(&mut s).unwrap();
-        assert_eq!(s, "");
-    }
-
-    #[test]
-    fn roundtrip_big() {
-        let mut real = Vec::new();
-        let mut w = EncoderWriter::new(Vec::new(), Default);
-        let v = thread_rng().gen_iter::<u8>().take(1024).collect::<Vec<_>>();
-        for _ in 0..200 {
-            let to_write = &v[..thread_rng().gen_range(0, v.len())];
-            real.extend(to_write.iter().map(|x| *x));
-            w.write_all(to_write).unwrap();
-        }
-        let result = w.finish().unwrap();
-        let mut r = DecoderReader::new(&result[..]).unwrap();
-        let mut v = Vec::new();
-        r.read_to_end(&mut v).unwrap();
-        assert!(v == real);
-    }
-
-    #[test]
-    fn roundtrip_big2() {
-        let v = thread_rng()
-                    .gen_iter::<u8>()
-                    .take(1024 * 1024)
-                    .collect::<Vec<_>>();
-        let mut r = DecoderReader::new(EncoderReader::new(&v[..], Default))
-                        .unwrap();
-        let mut res = Vec::new();
-        r.read_to_end(&mut res).unwrap();
-        assert!(res == v);
-    }
-
-    #[test]
-    fn fields() {
-        let r = vec![0, 2, 4, 6];
-        let e = Builder::new()
-                    .filename(b"foo.rs")
-                    .comment(b"bar")
-                    .extra(vec![0, 1, 2, 3])
-                    .read(&r[..], Default);
-        let mut d = DecoderReader::new(e).unwrap();
-        assert_eq!(d.header().filename(), Some(&b"foo.rs"[..]));
-        assert_eq!(d.header().comment(), Some(&b"bar"[..]));
-        assert_eq!(d.header().extra(), Some(&b"\x00\x01\x02\x03"[..]));
-        let mut res = Vec::new();
-        d.read_to_end(&mut res).unwrap();
-        assert_eq!(res, vec![0, 2, 4, 6]);
-
-    }
-
-    #[test]
-    fn keep_reading_after_end() {
-        let mut e = EncoderWriter::new(Vec::new(), Default);
-        e.write_all(b"foo bar baz").unwrap();
-        let inner = e.finish().unwrap();
-        let mut d = DecoderReader::new(&inner[..]).unwrap();
-        let mut s = String::new();
-        d.read_to_string(&mut s).unwrap();
-        assert_eq!(s, "foo bar baz");
-        d.read_to_string(&mut s).unwrap();
-        assert_eq!(s, "foo bar baz");
-    }
-
-    #[test]
-    fn qc_reader() {
-        ::quickcheck::quickcheck(test as fn(_) -> _);
-
-        fn test(v: Vec<u8>) -> bool {
-            let r = EncoderReader::new(&v[..], Default);
-            let mut r = DecoderReader::new(r).unwrap();
-            let mut v2 = Vec::new();
-            r.read_to_end(&mut v2).unwrap();
-            v == v2
-        }
-    }
-
-    #[test]
-    fn flush_after_write() {
-		let mut f = EncoderWriter::new(Vec::new(), Default);
-		write!(f, "Hello world").unwrap();
-		f.flush().unwrap();
-    }
-}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/src/gz/bufread.rs
@@ -0,0 +1,547 @@
+use std::cmp;
+use std::io::prelude::*;
+use std::io;
+use std::mem;
+
+use super::{Builder, Header};
+use super::{FCOMMENT, FEXTRA, FHCRC, FNAME};
+use Compression;
+use crc::CrcReader;
+use deflate;
+
+fn copy(into: &mut [u8], from: &[u8], pos: &mut usize) -> usize {
+    let min = cmp::min(into.len(), from.len() - *pos);
+    for (slot, val) in into.iter_mut().zip(from[*pos..*pos + min].iter()) {
+        *slot = *val;
+    }
+    *pos += min;
+    return min;
+}
+fn corrupt() -> io::Error {
+    io::Error::new(
+        io::ErrorKind::InvalidInput,
+        "corrupt gzip stream does not have a matching checksum",
+    )
+}
+
+fn bad_header() -> io::Error {
+    io::Error::new(io::ErrorKind::InvalidInput, "invalid gzip header")
+}
+
+fn read_le_u16<R: Read>(r: &mut R) -> io::Result<u16> {
+    let mut b = [0; 2];
+    try!(r.read_exact(&mut b));
+    Ok((b[0] as u16) | ((b[1] as u16) << 8))
+}
+
+fn read_gz_header<R: Read>(r: &mut R) -> io::Result<Header> {
+    let mut crc_reader = CrcReader::new(r);
+    let mut header = [0; 10];
+    try!(crc_reader.read_exact(&mut header));
+
+    let id1 = header[0];
+    let id2 = header[1];
+    if id1 != 0x1f || id2 != 0x8b {
+        return Err(bad_header());
+    }
+    let cm = header[2];
+    if cm != 8 {
+        return Err(bad_header());
+    }
+
+    let flg = header[3];
+    let mtime = ((header[4] as u32) << 0) | ((header[5] as u32) << 8) | ((header[6] as u32) << 16) |
+        ((header[7] as u32) << 24);
+    let _xfl = header[8];
+    let _os = header[9];
+
+    let extra = if flg & FEXTRA != 0 {
+        let xlen = try!(read_le_u16(&mut crc_reader));
+        let mut extra = vec![0; xlen as usize];
+        try!(crc_reader.read_exact(&mut extra));
+        Some(extra)
+    } else {
+        None
+    };
+    let filename = if flg & FNAME != 0 {
+        // wow this is slow
+        let mut b = Vec::new();
+        for byte in crc_reader.by_ref().bytes() {
+            let byte = try!(byte);
+            if byte == 0 {
+                break;
+            }
+            b.push(byte);
+        }
+        Some(b)
+    } else {
+        None
+    };
+    let comment = if flg & FCOMMENT != 0 {
+        // wow this is slow
+        let mut b = Vec::new();
+        for byte in crc_reader.by_ref().bytes() {
+            let byte = try!(byte);
+            if byte == 0 {
+                break;
+            }
+            b.push(byte);
+        }
+        Some(b)
+    } else {
+        None
+    };
+
+    if flg & FHCRC != 0 {
+        let calced_crc = crc_reader.crc().sum() as u16;
+        let stored_crc = try!(read_le_u16(&mut crc_reader));
+        if calced_crc != stored_crc {
+            return Err(corrupt());
+        }
+    }
+
+    Ok(Header {
+        extra: extra,
+        filename: filename,
+        comment: comment,
+        mtime: mtime,
+    })
+}
+
+
+/// A gzip streaming encoder
+///
+/// This structure exposes a [`BufRead`] interface that will read uncompressed data
+/// from the underlying reader and expose the compressed version as a [`BufRead`]
+/// interface.
+///
+/// [`BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// use flate2::Compression;
+/// use flate2::bufread::GzEncoder;
+/// use std::fs::File;
+/// use std::io::BufReader;
+///
+/// // Opens sample file, compresses the contents and returns a Vector or error
+/// // File wrapped in a BufReader implements BufRead
+///
+/// fn open_hello_world() -> io::Result<Vec<u8>> {
+///     let f = File::open("examples/hello_world.txt")?;
+///     let b = BufReader::new(f);
+///     let mut gz = GzEncoder::new(b, Compression::Fast);
+///     let mut buffer = Vec::new();
+///     gz.read_to_end(&mut buffer)?;
+///     Ok(buffer)
+/// }
+/// ```
+#[derive(Debug)]
+pub struct GzEncoder<R> {
+    inner: deflate::bufread::DeflateEncoder<CrcReader<R>>,
+    header: Vec<u8>,
+    pos: usize,
+    eof: bool,
+}
+
+pub fn gz_encoder<R: BufRead>(header: Vec<u8>, r: R, lvl: Compression)
+    -> GzEncoder<R>
+{
+    let crc = CrcReader::new(r);
+    GzEncoder {
+        inner: deflate::bufread::DeflateEncoder::new(crc, lvl),
+        header: header,
+        pos: 0,
+        eof: false,
+    }
+}
+
+impl<R: BufRead> GzEncoder<R> {
+    /// Creates a new encoder which will use the given compression level.
+    ///
+    /// The encoder is not configured specially for the emitted header. For
+    /// header configuration, see the `Builder` type.
+    ///
+    /// The data read from the stream `r` will be compressed and available
+    /// through the returned reader.
+    pub fn new(r: R, level: Compression) -> GzEncoder<R> {
+        Builder::new().buf_read(r, level)
+    }
+
+    fn read_footer(&mut self, into: &mut [u8]) -> io::Result<usize> {
+        if self.pos == 8 {
+            return Ok(0);
+        }
+        let crc = self.inner.get_ref().crc();
+        let ref arr = [
+            (crc.sum() >> 0) as u8,
+            (crc.sum() >> 8) as u8,
+            (crc.sum() >> 16) as u8,
+            (crc.sum() >> 24) as u8,
+            (crc.amount() >> 0) as u8,
+            (crc.amount() >> 8) as u8,
+            (crc.amount() >> 16) as u8,
+            (crc.amount() >> 24) as u8,
+        ];
+        Ok(copy(into, arr, &mut self.pos))
+    }
+}
+
+impl<R> GzEncoder<R> {
+    /// Acquires a reference to the underlying reader.
+    pub fn get_ref(&self) -> &R {
+        self.inner.get_ref().get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying reader.
+    ///
+    /// Note that mutation of the reader may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        self.inner.get_mut().get_mut()
+    }
+
+    /// Returns the underlying stream, consuming this encoder
+    pub fn into_inner(self) -> R {
+        self.inner.into_inner().into_inner()
+    }
+}
+
+impl<R: BufRead> Read for GzEncoder<R> {
+    fn read(&mut self, mut into: &mut [u8]) -> io::Result<usize> {
+        let mut amt = 0;
+        if self.eof {
+            return self.read_footer(into);
+        } else if self.pos < self.header.len() {
+            amt += copy(into, &self.header, &mut self.pos);
+            if amt == into.len() {
+                return Ok(amt);
+            }
+            let tmp = into;
+            into = &mut tmp[amt..];
+        }
+        match try!(self.inner.read(into)) {
+            0 => {
+                self.eof = true;
+                self.pos = 0;
+                self.read_footer(into)
+            }
+            n => Ok(amt + n),
+        }
+    }
+}
+
+impl<R: BufRead + Write> Write for GzEncoder<R> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
+
+
+/// A gzip streaming decoder
+///
+/// This structure exposes a [`ReadBuf`] interface that will consume compressed
+/// data from the underlying reader and emit uncompressed data.
+///
+/// [`ReadBuf`]: https://doc.rust-lang.org/std/io/trait.BufRead.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// # use flate2::Compression;
+/// # use flate2::write::GzEncoder;
+/// use flate2::bufread::GzDecoder;
+///
+/// # fn main() {
+/// #   let mut e = GzEncoder::new(Vec::new(), Compression::Default);
+/// #   e.write(b"Hello World").unwrap();
+/// #   let bytes = e.finish().unwrap();
+/// #   println!("{}", decode_reader(bytes).unwrap());
+/// # }
+/// #
+/// // Uncompresses a Gz Encoded vector of bytes and returns a string or error
+/// // Here &[u8] implements BufRead
+///
+/// fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+///    let mut gz = GzDecoder::new(&bytes[..])?;
+///    let mut s = String::new();
+///    gz.read_to_string(&mut s)?;
+///    Ok(s)
+/// }
+/// ```
+#[derive(Debug)]
+pub struct GzDecoder<R> {
+    inner: CrcReader<deflate::bufread::DeflateDecoder<R>>,
+    header: Header,
+    finished: bool,
+}
+
+
+impl<R: BufRead> GzDecoder<R> {
+    /// Creates a new decoder from the given reader, immediately parsing the
+    /// gzip header.
+    ///
+    /// # Errors
+    ///
+    /// If an error is encountered when parsing the gzip header, an error is
+    /// returned.
+    pub fn new(mut r: R) -> io::Result<GzDecoder<R>> {
+        let header = try!(read_gz_header(&mut r));
+
+        let flate = deflate::bufread::DeflateDecoder::new(r);
+        return Ok(GzDecoder {
+            inner: CrcReader::new(flate),
+            header: header,
+            finished: false,
+        });
+    }
+
+    fn finish(&mut self) -> io::Result<()> {
+        if self.finished {
+            return Ok(());
+        }
+        let ref mut buf = [0u8; 8];
+        {
+            let mut len = 0;
+
+            while len < buf.len() {
+                match try!(self.inner.get_mut().get_mut().read(&mut buf[len..])) {
+                    0 => return Err(corrupt()),
+                    n => len += n,
+                }
+            }
+        }
+
+        let crc = ((buf[0] as u32) << 0) | ((buf[1] as u32) << 8) | ((buf[2] as u32) << 16) |
+            ((buf[3] as u32) << 24);
+        let amt = ((buf[4] as u32) << 0) | ((buf[5] as u32) << 8) | ((buf[6] as u32) << 16) |
+            ((buf[7] as u32) << 24);
+        if crc != self.inner.crc().sum() as u32 {
+            return Err(corrupt());
+        }
+        if amt != self.inner.crc().amount() {
+            return Err(corrupt());
+        }
+        self.finished = true;
+        Ok(())
+    }
+}
+
+impl<R> GzDecoder<R> {
+    /// Returns the header associated with this stream.
+    pub fn header(&self) -> &Header {
+        &self.header
+    }
+
+    /// Acquires a reference to the underlying reader.
+    pub fn get_ref(&self) -> &R {
+        self.inner.get_ref().get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying stream.
+    ///
+    /// Note that mutation of the stream may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        self.inner.get_mut().get_mut()
+    }
+
+    /// Consumes this decoder, returning the underlying reader.
+    pub fn into_inner(self) -> R {
+        self.inner.into_inner().into_inner()
+    }
+}
+
+impl<R: BufRead> Read for GzDecoder<R> {
+    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
+        match try!(self.inner.read(into)) {
+            0 => {
+                try!(self.finish());
+                Ok(0)
+            }
+            n => Ok(n),
+        }
+    }
+}
+
+impl<R: BufRead + Write> Write for GzDecoder<R> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
+
+
+
+/// A gzip streaming decoder that decodes all members of a multistream
+///
+/// A gzip member consists of a header, compressed data and a trailer. The [gzip
+/// specification](https://tools.ietf.org/html/rfc1952), however, allows multiple
+/// gzip members to be joined in a single stream. `MultiGzDecoder` will
+/// decode all consecutive members while `GzDecoder` will only decompress
+/// the first gzip member. The multistream format is commonly used in
+/// bioinformatics, for example when using the BGZF compressed data.
+///
+/// This structure exposes a [`BufRead`] interface that will consume all gzip members
+/// from the underlying reader and emit uncompressed data.
+///
+/// [`BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// # use flate2::Compression;
+/// # use flate2::write::GzEncoder;
+/// use flate2::bufread::MultiGzDecoder;
+///
+/// # fn main() {
+/// #   let mut e = GzEncoder::new(Vec::new(), Compression::Default);
+/// #   e.write(b"Hello World").unwrap();
+/// #   let bytes = e.finish().unwrap();
+/// #   println!("{}", decode_reader(bytes).unwrap());
+/// # }
+/// #
+/// // Uncompresses a Gz Encoded vector of bytes and returns a string or error
+/// // Here &[u8] implements BufRead
+///
+/// fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+///    let mut gz = MultiGzDecoder::new(&bytes[..])?;
+///    let mut s = String::new();
+///    gz.read_to_string(&mut s)?;
+///    Ok(s)
+/// }
+/// ```
+#[derive(Debug)]
+pub struct MultiGzDecoder<R> {
+    inner: CrcReader<deflate::bufread::DeflateDecoder<R>>,
+    header: Header,
+    finished: bool,
+}
+
+
+impl<R: BufRead> MultiGzDecoder<R> {
+    /// Creates a new decoder from the given reader, immediately parsing the
+    /// (first) gzip header. If the gzip stream contains multiple members all will
+    /// be decoded.
+    ///
+    /// # Errors
+    ///
+    /// If an error is encountered when parsing the gzip header, an error is
+    /// returned.
+    pub fn new(mut r: R) -> io::Result<MultiGzDecoder<R>> {
+        let header = try!(read_gz_header(&mut r));
+
+        let flate = deflate::bufread::DeflateDecoder::new(r);
+        return Ok(MultiGzDecoder {
+            inner: CrcReader::new(flate),
+            header: header,
+            finished: false,
+        });
+    }
+
+    fn finish_member(&mut self) -> io::Result<usize> {
+        if self.finished {
+            return Ok(0);
+        }
+        let ref mut buf = [0u8; 8];
+        {
+            let mut len = 0;
+
+            while len < buf.len() {
+                match try!(self.inner.get_mut().get_mut().read(&mut buf[len..])) {
+                    0 => return Err(corrupt()),
+                    n => len += n,
+                }
+            }
+        }
+
+        let crc = ((buf[0] as u32) << 0) | ((buf[1] as u32) << 8) | ((buf[2] as u32) << 16) |
+            ((buf[3] as u32) << 24);
+        let amt = ((buf[4] as u32) << 0) | ((buf[5] as u32) << 8) | ((buf[6] as u32) << 16) |
+            ((buf[7] as u32) << 24);
+        if crc != self.inner.crc().sum() as u32 {
+            return Err(corrupt());
+        }
+        if amt != self.inner.crc().amount() {
+            return Err(corrupt());
+        }
+        let remaining = match self.inner.get_mut().get_mut().fill_buf() {
+            Ok(b) => if b.is_empty() {
+                self.finished = true;
+                return Ok(0);
+            } else {
+                b.len()
+            },
+            Err(e) => return Err(e),
+        };
+
+        let next_header = try!(read_gz_header(self.inner.get_mut().get_mut()));
+        mem::replace(&mut self.header, next_header);
+        self.inner.reset();
+        self.inner.get_mut().reset_data();
+
+        Ok(remaining)
+    }
+}
+
+impl<R> MultiGzDecoder<R> {
+    /// Returns the current header associated with this stream.
+    pub fn header(&self) -> &Header {
+        &self.header
+    }
+
+    /// Acquires a reference to the underlying reader.
+    pub fn get_ref(&self) -> &R {
+        self.inner.get_ref().get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying stream.
+    ///
+    /// Note that mutation of the stream may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        self.inner.get_mut().get_mut()
+    }
+
+    /// Consumes this decoder, returning the underlying reader.
+    pub fn into_inner(self) -> R {
+        self.inner.into_inner().into_inner()
+    }
+}
+
+impl<R: BufRead> Read for MultiGzDecoder<R> {
+    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
+        match try!(self.inner.read(into)) {
+            0 => match self.finish_member() {
+                Ok(0) => Ok(0),
+                Ok(_) => self.read(into),
+                Err(e) => Err(e),
+            },
+            n => Ok(n),
+        }
+    }
+}
+
+impl<R: BufRead + Write> Write for MultiGzDecoder<R> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/src/gz/mod.rs
@@ -0,0 +1,344 @@
+use std::env;
+use std::ffi::CString;
+use std::io::prelude::*;
+use std::time;
+
+use Compression;
+use bufreader::BufReader;
+
+pub static FHCRC: u8 = 1 << 1;
+pub static FEXTRA: u8 = 1 << 2;
+pub static FNAME: u8 = 1 << 3;
+pub static FCOMMENT: u8 = 1 << 4;
+
+pub mod bufread;
+pub mod read;
+pub mod write;
+
+
+/// A structure representing the header of a gzip stream.
+///
+/// The header can contain metadata about the file that was compressed, if
+/// present.
+#[derive(PartialEq, Debug)]
+pub struct Header {
+    extra: Option<Vec<u8>>,
+    filename: Option<Vec<u8>>,
+    comment: Option<Vec<u8>>,
+    mtime: u32,
+}
+
+impl Header {
+    /// Returns the `filename` field of this gzip stream's header, if present.
+    pub fn filename(&self) -> Option<&[u8]> {
+        self.filename.as_ref().map(|s| &s[..])
+    }
+
+    /// Returns the `extra` field of this gzip stream's header, if present.
+    pub fn extra(&self) -> Option<&[u8]> {
+        self.extra.as_ref().map(|s| &s[..])
+    }
+
+    /// Returns the `comment` field of this gzip stream's header, if present.
+    pub fn comment(&self) -> Option<&[u8]> {
+        self.comment.as_ref().map(|s| &s[..])
+    }
+
+    /// This gives the most recent modification time of the original file being compressed.
+    ///
+    /// The time is in Unix format, i.e., seconds since 00:00:00 GMT, Jan. 1, 1970.
+    /// (Note that this may cause problems for MS-DOS and other systems that use local
+    /// rather than Universal time.) If the compressed data did not come from a file,
+    /// `mtime` is set to the time at which compression started.
+    /// `mtime` = 0 means no time stamp is available.
+    ///
+    /// The usage of `mtime` is discouraged because of Year 2038 problem.
+    pub fn mtime(&self) -> u32 {
+        self.mtime
+    }
+
+    /// Returns the most recent modification time represented by a date-time type.
+    /// Returns `None` if the value of the underlying counter is 0,
+    /// indicating no time stamp is available.
+    ///
+    ///
+    /// The time is measured as seconds since 00:00:00 GMT, Jan. 1 1970.
+    /// See [`mtime`](#method.mtime) for more detail.
+    pub fn mtime_as_datetime(&self) -> Option<time::SystemTime> {
+        if self.mtime == 0 {
+            None
+        } else {
+            let duration = time::Duration::new(u64::from(self.mtime), 0);
+            let datetime = time::UNIX_EPOCH + duration;
+            Some(datetime)
+        }
+    }
+}
+
+/// A builder structure to create a new gzip Encoder.
+///
+/// This structure controls header configuration options such as the filename.
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// # use std::io;
+/// use std::fs::File;
+/// use flate2::GzBuilder;
+/// use flate2::Compression;
+///
+/// // GzBuilder opens a file and writes a sample string using Builder pattern
+///
+/// # fn sample_builder() -> Result<(), io::Error> {
+/// let f = File::create("examples/hello_world.gz")?;
+/// let mut gz = GzBuilder::new()
+///                 .filename("hello_world.txt")
+///                 .comment("test file, please delete")
+///                 .write(f, Compression::Default);
+/// gz.write(b"hello world")?;
+/// gz.finish()?;
+/// # Ok(())
+/// # }
+/// ```
+#[derive(Debug)]
+pub struct Builder {
+    extra: Option<Vec<u8>>,
+    filename: Option<CString>,
+    comment: Option<CString>,
+    mtime: u32,
+}
+
+impl Builder {
+    /// Create a new blank builder with no header by default.
+    pub fn new() -> Builder {
+        Builder {
+            extra: None,
+            filename: None,
+            comment: None,
+            mtime: 0,
+        }
+    }
+
+    /// Configure the `mtime` field in the gzip header.
+    pub fn mtime(mut self, mtime: u32) -> Builder {
+        self.mtime = mtime;
+        self
+    }
+
+    /// Configure the `extra` field in the gzip header.
+    pub fn extra<T: Into<Vec<u8>>>(mut self, extra: T) -> Builder {
+        self.extra = Some(extra.into());
+        self
+    }
+
+    /// Configure the `filename` field in the gzip header.
+    ///
+    /// # Panics
+    ///
+    /// Panics if the `filename` slice contains a zero.
+    pub fn filename<T: Into<Vec<u8>>>(mut self, filename: T) -> Builder {
+        self.filename = Some(CString::new(filename.into()).unwrap());
+        self
+    }
+
+    /// Configure the `comment` field in the gzip header.
+    ///
+    /// # Panics
+    ///
+    /// Panics if the `comment` slice contains a zero.
+    pub fn comment<T: Into<Vec<u8>>>(mut self, comment: T) -> Builder {
+        self.comment = Some(CString::new(comment.into()).unwrap());
+        self
+    }
+
+    /// Consume this builder, creating a writer encoder in the process.
+    ///
+    /// The data written to the returned encoder will be compressed and then
+    /// written out to the supplied parameter `w`.
+    pub fn write<W: Write>(self, w: W, lvl: Compression) -> write::GzEncoder<W> {
+        write::gz_encoder(self.into_header(lvl), w, lvl)
+    }
+
+    /// Consume this builder, creating a reader encoder in the process.
+    ///
+    /// Data read from the returned encoder will be the compressed version of
+    /// the data read from the given reader.
+    pub fn read<R: Read>(self, r: R, lvl: Compression) -> read::GzEncoder<R> {
+        read::gz_encoder(self.buf_read(BufReader::new(r), lvl))
+    }
+
+    /// Consume this builder, creating a reader encoder in the process.
+    ///
+    /// Data read from the returned encoder will be the compressed version of
+    /// the data read from the given reader.
+    pub fn buf_read<R>(self, r: R, lvl: Compression) -> bufread::GzEncoder<R>
+    where
+        R: BufRead,
+    {
+        bufread::gz_encoder(self.into_header(lvl), r, lvl)
+    }
+
+    fn into_header(self, lvl: Compression) -> Vec<u8> {
+        let Builder {
+            extra,
+            filename,
+            comment,
+            mtime,
+        } = self;
+        let mut flg = 0;
+        let mut header = vec![0u8; 10];
+        match extra {
+            Some(v) => {
+                flg |= FEXTRA;
+                header.push((v.len() >> 0) as u8);
+                header.push((v.len() >> 8) as u8);
+                header.extend(v);
+            }
+            None => {}
+        }
+        match filename {
+            Some(filename) => {
+                flg |= FNAME;
+                header.extend(filename.as_bytes_with_nul().iter().map(|x| *x));
+            }
+            None => {}
+        }
+        match comment {
+            Some(comment) => {
+                flg |= FCOMMENT;
+                header.extend(comment.as_bytes_with_nul().iter().map(|x| *x));
+            }
+            None => {}
+        }
+        header[0] = 0x1f;
+        header[1] = 0x8b;
+        header[2] = 8;
+        header[3] = flg;
+        header[4] = (mtime >> 0) as u8;
+        header[5] = (mtime >> 8) as u8;
+        header[6] = (mtime >> 16) as u8;
+        header[7] = (mtime >> 24) as u8;
+        header[8] = match lvl {
+            Compression::Best => 2,
+            Compression::Fast => 4,
+            _ => 0,
+        };
+
+        // Typically this byte indicates what OS the gz stream was created on,
+        // but in an effort to have cross-platform reproducible streams just
+        // always set this to 255. I'm not sure that if we "correctly" set this
+        // it'd do anything anyway...
+        header[9] = 255;
+        return header;
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use std::io::prelude::*;
+
+    use super::{read, write, Builder};
+    use Compression::Default;
+    use rand::{thread_rng, Rng};
+
+    #[test]
+    fn roundtrip() {
+        let mut e = write::GzEncoder::new(Vec::new(), Default);
+        e.write_all(b"foo bar baz").unwrap();
+        let inner = e.finish().unwrap();
+        let mut d = read::GzDecoder::new(&inner[..]).unwrap();
+        let mut s = String::new();
+        d.read_to_string(&mut s).unwrap();
+        assert_eq!(s, "foo bar baz");
+    }
+
+    #[test]
+    fn roundtrip_zero() {
+        let e = write::GzEncoder::new(Vec::new(), Default);
+        let inner = e.finish().unwrap();
+        let mut d = read::GzDecoder::new(&inner[..]).unwrap();
+        let mut s = String::new();
+        d.read_to_string(&mut s).unwrap();
+        assert_eq!(s, "");
+    }
+
+    #[test]
+    fn roundtrip_big() {
+        let mut real = Vec::new();
+        let mut w = write::GzEncoder::new(Vec::new(), Default);
+        let v = thread_rng().gen_iter::<u8>().take(1024).collect::<Vec<_>>();
+        for _ in 0..200 {
+            let to_write = &v[..thread_rng().gen_range(0, v.len())];
+            real.extend(to_write.iter().map(|x| *x));
+            w.write_all(to_write).unwrap();
+        }
+        let result = w.finish().unwrap();
+        let mut r = read::GzDecoder::new(&result[..]).unwrap();
+        let mut v = Vec::new();
+        r.read_to_end(&mut v).unwrap();
+        assert!(v == real);
+    }
+
+    #[test]
+    fn roundtrip_big2() {
+        let v = thread_rng()
+            .gen_iter::<u8>()
+            .take(1024 * 1024)
+            .collect::<Vec<_>>();
+        let mut r = read::GzDecoder::new(read::GzEncoder::new(&v[..], Default)).unwrap();
+        let mut res = Vec::new();
+        r.read_to_end(&mut res).unwrap();
+        assert!(res == v);
+    }
+
+    #[test]
+    fn fields() {
+        let r = vec![0, 2, 4, 6];
+        let e = Builder::new()
+            .filename("foo.rs")
+            .comment("bar")
+            .extra(vec![0, 1, 2, 3])
+            .read(&r[..], Default);
+        let mut d = read::GzDecoder::new(e).unwrap();
+        assert_eq!(d.header().filename(), Some(&b"foo.rs"[..]));
+        assert_eq!(d.header().comment(), Some(&b"bar"[..]));
+        assert_eq!(d.header().extra(), Some(&b"\x00\x01\x02\x03"[..]));
+        let mut res = Vec::new();
+        d.read_to_end(&mut res).unwrap();
+        assert_eq!(res, vec![0, 2, 4, 6]);
+    }
+
+    #[test]
+    fn keep_reading_after_end() {
+        let mut e = write::GzEncoder::new(Vec::new(), Default);
+        e.write_all(b"foo bar baz").unwrap();
+        let inner = e.finish().unwrap();
+        let mut d = read::GzDecoder::new(&inner[..]).unwrap();
+        let mut s = String::new();
+        d.read_to_string(&mut s).unwrap();
+        assert_eq!(s, "foo bar baz");
+        d.read_to_string(&mut s).unwrap();
+        assert_eq!(s, "foo bar baz");
+    }
+
+    #[test]
+    fn qc_reader() {
+        ::quickcheck::quickcheck(test as fn(_) -> _);
+
+        fn test(v: Vec<u8>) -> bool {
+            let r = read::GzEncoder::new(&v[..], Default);
+            let mut r = read::GzDecoder::new(r).unwrap();
+            let mut v2 = Vec::new();
+            r.read_to_end(&mut v2).unwrap();
+            v == v2
+        }
+    }
+
+    #[test]
+    fn flush_after_write() {
+        let mut f = write::GzEncoder::new(Vec::new(), Default);
+        write!(f, "Hello world").unwrap();
+        f.flush().unwrap();
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/src/gz/read.rs
@@ -0,0 +1,286 @@
+use std::io::prelude::*;
+use std::io;
+
+use super::{Builder, Header};
+use Compression;
+use bufreader::BufReader;
+use super::bufread;
+
+/// A gzip streaming encoder
+///
+/// This structure exposes a [`Read`] interface that will read uncompressed data
+/// from the underlying reader and expose the compressed version as a [`Read`]
+/// interface.
+///
+/// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// use flate2::Compression;
+/// use flate2::read::GzEncoder;
+///
+/// // Return a vector containing the GZ compressed version of hello world
+///
+/// fn gzencode_hello_world() -> io::Result<Vec<u8>> {
+///     let mut ret_vec = [0;100];
+///     let bytestring = b"hello world";
+///     let mut gz = GzEncoder::new(&bytestring[..], Compression::Fast);
+///     let count = gz.read(&mut ret_vec)?;
+///     Ok(ret_vec[0..count].to_vec())
+/// }
+/// ```
+#[derive(Debug)]
+pub struct GzEncoder<R> {
+    inner: bufread::GzEncoder<BufReader<R>>,
+}
+
+pub fn gz_encoder<R: Read>(inner: bufread::GzEncoder<BufReader<R>>)
+    -> GzEncoder<R>
+{
+    GzEncoder { inner: inner }
+}
+
+impl<R: Read> GzEncoder<R> {
+    /// Creates a new encoder which will use the given compression level.
+    ///
+    /// The encoder is not configured specially for the emitted header. For
+    /// header configuration, see the `Builder` type.
+    ///
+    /// The data read from the stream `r` will be compressed and available
+    /// through the returned reader.
+    pub fn new(r: R, level: Compression) -> GzEncoder<R> {
+        Builder::new().read(r, level)
+    }
+}
+
+impl<R> GzEncoder<R> {
+    /// Acquires a reference to the underlying reader.
+    pub fn get_ref(&self) -> &R {
+        self.inner.get_ref().get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying reader.
+    ///
+    /// Note that mutation of the reader may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        self.inner.get_mut().get_mut()
+    }
+
+    /// Returns the underlying stream, consuming this encoder
+    pub fn into_inner(self) -> R {
+        self.inner.into_inner().into_inner()
+    }
+}
+
+impl<R: Read> Read for GzEncoder<R> {
+    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
+        self.inner.read(into)
+    }
+}
+
+impl<R: Read + Write> Write for GzEncoder<R> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
+
+/// A gzip streaming decoder
+///
+/// This structure exposes a [`Read`] interface that will consume compressed
+/// data from the underlying reader and emit uncompressed data.
+///
+/// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
+///
+/// # Examples
+///
+/// ```
+///
+/// use std::io::prelude::*;
+/// use std::io;
+/// # use flate2::Compression;
+/// # use flate2::write::GzEncoder;
+/// use flate2::read::GzDecoder;
+///
+/// # fn main() {
+/// #    let mut e = GzEncoder::new(Vec::new(), Compression::Default);
+/// #    e.write(b"Hello World").unwrap();
+/// #    let bytes = e.finish().unwrap();
+/// #    println!("{}", decode_reader(bytes).unwrap());
+/// # }
+/// #
+/// // Uncompresses a Gz Encoded vector of bytes and returns a string or error
+/// // Here &[u8] implements Read
+///
+/// fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+///    let mut gz = GzDecoder::new(&bytes[..])?;
+///    let mut s = String::new();
+///    gz.read_to_string(&mut s)?;
+///    Ok(s)
+/// }
+/// ```
+#[derive(Debug)]
+pub struct GzDecoder<R> {
+    inner: bufread::GzDecoder<BufReader<R>>,
+}
+
+impl<R: Read> GzDecoder<R> {
+    /// Creates a new decoder from the given reader, immediately parsing the
+    /// gzip header.
+    ///
+    /// # Errors
+    ///
+    /// If an error is encountered when parsing the gzip header, an error is
+    /// returned.
+    pub fn new(r: R) -> io::Result<GzDecoder<R>> {
+        bufread::GzDecoder::new(BufReader::new(r)).map(|r| GzDecoder { inner: r })
+    }
+}
+
+impl<R> GzDecoder<R> {
+    /// Returns the header associated with this stream.
+    pub fn header(&self) -> &Header {
+        self.inner.header()
+    }
+
+    /// Acquires a reference to the underlying reader.
+    pub fn get_ref(&self) -> &R {
+        self.inner.get_ref().get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying stream.
+    ///
+    /// Note that mutation of the stream may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        self.inner.get_mut().get_mut()
+    }
+
+    /// Consumes this decoder, returning the underlying reader.
+    pub fn into_inner(self) -> R {
+        self.inner.into_inner().into_inner()
+    }
+}
+
+impl<R: Read> Read for GzDecoder<R> {
+    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
+        self.inner.read(into)
+    }
+}
+
+impl<R: Read + Write> Write for GzDecoder<R> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
+
+/// A gzip streaming decoder that decodes all members of a multistream
+///
+/// A gzip member consists of a header, compressed data and a trailer. The [gzip
+/// specification](https://tools.ietf.org/html/rfc1952), however, allows multiple
+/// gzip members to be joined in a single stream.  `MultiGzDecoder` will
+/// decode all consecutive members while `GzDecoder` will only decompress the
+/// first gzip member. The multistream format is commonly used in bioinformatics,
+/// for example when using the BGZF compressed data.
+///
+/// This structure exposes a [`Read`] interface that will consume all gzip members
+/// from the underlying reader and emit uncompressed data.
+///
+/// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// # use flate2::Compression;
+/// # use flate2::write::GzEncoder;
+/// use flate2::read::MultiGzDecoder;
+///
+/// # fn main() {
+/// #    let mut e = GzEncoder::new(Vec::new(), Compression::Default);
+/// #    e.write(b"Hello World").unwrap();
+/// #    let bytes = e.finish().unwrap();
+/// #    println!("{}", decode_reader(bytes).unwrap());
+/// # }
+/// #
+/// // Uncompresses a Gz Encoded vector of bytes and returns a string or error
+/// // Here &[u8] implements Read
+///
+/// fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+///    let mut gz = MultiGzDecoder::new(&bytes[..])?;
+///    let mut s = String::new();
+///    gz.read_to_string(&mut s)?;
+///    Ok(s)
+/// }
+/// ```
+#[derive(Debug)]
+pub struct MultiGzDecoder<R> {
+    inner: bufread::MultiGzDecoder<BufReader<R>>,
+}
+
+impl<R: Read> MultiGzDecoder<R> {
+    /// Creates a new decoder from the given reader, immediately parsing the
+    /// (first) gzip header. If the gzip stream contains multiple members all will
+    /// be decoded.
+    ///
+    /// # Errors
+    ///
+    /// If an error is encountered when parsing the gzip header, an error is
+    /// returned.
+    pub fn new(r: R) -> io::Result<MultiGzDecoder<R>> {
+        bufread::MultiGzDecoder::new(BufReader::new(r)).map(|r| MultiGzDecoder { inner: r })
+    }
+}
+
+impl<R> MultiGzDecoder<R> {
+    /// Returns the current header associated with this stream.
+    pub fn header(&self) -> &Header {
+        self.inner.header()
+    }
+
+    /// Acquires a reference to the underlying reader.
+    pub fn get_ref(&self) -> &R {
+        self.inner.get_ref().get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying stream.
+    ///
+    /// Note that mutation of the stream may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        self.inner.get_mut().get_mut()
+    }
+
+    /// Consumes this decoder, returning the underlying reader.
+    pub fn into_inner(self) -> R {
+        self.inner.into_inner().into_inner()
+    }
+}
+
+impl<R: Read> Read for MultiGzDecoder<R> {
+    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
+        self.inner.read(into)
+    }
+}
+
+impl<R: Read + Write> Write for MultiGzDecoder<R> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/src/gz/write.rs
@@ -0,0 +1,182 @@
+use std::io::prelude::*;
+use std::io;
+
+#[cfg(feature = "tokio")]
+use futures::Poll;
+#[cfg(feature = "tokio")]
+use tokio_io::{AsyncRead, AsyncWrite};
+
+use super::Builder;
+use {Compress, Compression};
+use crc::Crc;
+use zio;
+
+/// A gzip streaming encoder
+///
+/// This structure exposes a [`Write`] interface that will emit compressed data
+/// to the underlying writer `W`.
+///
+/// [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use flate2::Compression;
+/// use flate2::write::GzEncoder;
+///
+/// // Vec<u8> implements Write to print the compressed bytes of sample string
+/// # fn main() {
+///
+/// let mut e = GzEncoder::new(Vec::new(), Compression::Default);
+/// e.write(b"Hello World").unwrap();
+/// println!("{:?}", e.finish().unwrap());
+/// # }
+/// ```
+#[derive(Debug)]
+pub struct GzEncoder<W: Write> {
+    inner: zio::Writer<W, Compress>,
+    crc: Crc,
+    crc_bytes_written: usize,
+    header: Vec<u8>,
+}
+
+pub fn gz_encoder<W: Write>(header: Vec<u8>, w: W, lvl: Compression) -> GzEncoder<W> {
+    GzEncoder {
+        inner: zio::Writer::new(w, Compress::new(lvl, false)),
+        crc: Crc::new(),
+        header: header,
+        crc_bytes_written: 0,
+    }
+}
+
+impl<W: Write> GzEncoder<W> {
+    /// Creates a new encoder which will use the given compression level.
+    ///
+    /// The encoder is not configured specially for the emitted header. For
+    /// header configuration, see the `Builder` type.
+    ///
+    /// The data written to the returned encoder will be compressed and then
+    /// written to the stream `w`.
+    pub fn new(w: W, level: Compression) -> GzEncoder<W> {
+        Builder::new().write(w, level)
+    }
+
+    /// Acquires a reference to the underlying writer.
+    pub fn get_ref(&self) -> &W {
+        self.inner.get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying writer.
+    ///
+    /// Note that mutation of the writer may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut W {
+        self.inner.get_mut()
+    }
+
+    /// Attempt to finish this output stream, writing out final chunks of data.
+    ///
+    /// Note that this function can only be used once data has finished being
+    /// written to the output stream. After this function is called then further
+    /// calls to `write` may result in a panic.
+    ///
+    /// # Panics
+    ///
+    /// Attempts to write data to this stream may result in a panic after this
+    /// function is called.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn try_finish(&mut self) -> io::Result<()> {
+        try!(self.write_header());
+        try!(self.inner.finish());
+
+        while self.crc_bytes_written < 8 {
+            let (sum, amt) = (self.crc.sum() as u32, self.crc.amount());
+            let buf = [
+                (sum >> 0) as u8,
+                (sum >> 8) as u8,
+                (sum >> 16) as u8,
+                (sum >> 24) as u8,
+                (amt >> 0) as u8,
+                (amt >> 8) as u8,
+                (amt >> 16) as u8,
+                (amt >> 24) as u8,
+            ];
+            let inner = self.inner.get_mut();
+            let n = try!(inner.write(&buf[self.crc_bytes_written..]));
+            self.crc_bytes_written += n;
+        }
+        Ok(())
+    }
+
+    /// Finish encoding this stream, returning the underlying writer once the
+    /// encoding is done.
+    ///
+    /// Note that this function may not be suitable to call in a situation where
+    /// the underlying stream is an asynchronous I/O stream. To finish a stream
+    /// the `try_finish` (or `shutdown`) method should be used instead. To
+    /// re-acquire ownership of a stream it is safe to call this method after
+    /// `try_finish` or `shutdown` has returned `Ok`.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn finish(mut self) -> io::Result<W> {
+        try!(self.try_finish());
+        Ok(self.inner.take_inner())
+    }
+
+    fn write_header(&mut self) -> io::Result<()> {
+        while self.header.len() > 0 {
+            let n = try!(self.inner.get_mut().write(&self.header));
+            self.header.drain(..n);
+        }
+        Ok(())
+    }
+}
+
+impl<W: Write> Write for GzEncoder<W> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        assert_eq!(self.crc_bytes_written, 0);
+        try!(self.write_header());
+        let n = try!(self.inner.write(buf));
+        self.crc.update(&buf[..n]);
+        Ok(n)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        assert_eq!(self.crc_bytes_written, 0);
+        try!(self.write_header());
+        self.inner.flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<W: AsyncWrite> AsyncWrite for GzEncoder<W> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        try_nb!(self.try_finish());
+        self.get_mut().shutdown()
+    }
+}
+
+impl<R: Read + Write> Read for GzEncoder<R> {
+    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
+        self.get_mut().read(buf)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncRead + AsyncWrite> AsyncRead for GzEncoder<R> {}
+
+impl<W: Write> Drop for GzEncoder<W> {
+    fn drop(&mut self) {
+        if self.inner.is_present() {
+            let _ = self.try_finish();
+        }
+    }
+}
--- a/third_party/rust/flate2/src/lib.rs
+++ b/third_party/rust/flate2/src/lib.rs
@@ -1,119 +1,178 @@
 //! A DEFLATE-based stream compression/decompression library
 //!
 //! This library is meant to supplement/replace the standard distributon's
 //! libflate library by providing a streaming encoder/decoder rather than purely
 //! an in-memory encoder/decoder.
 //!
-//! Like with libflate, flate2 is based on [`miniz.c`][1]
+//! Like with [`libflate`], flate2 is based on [`miniz.c`][1]
 //!
 //! [1]: https://code.google.com/p/miniz/
+//! [`libflate`]: https://docs.rs/crate/libflate/
 //!
 //! # Organization
 //!
-//! This crate consists mainly of two modules, `read` and `write`. Each
+//! This crate consists mainly of two modules, [`read`] and [`write`]. Each
 //! module contains a number of types used to encode and decode various streams
-//! of data. All types in the `write` module work on instances of `Write`,
-//! whereas all types in the `read` module work on instances of `Read`.
+//! of data. All types in the [`write`] module work on instances of [`Write`],
+//! whereas all types in the [`read`] module work on instances of [`Read`].
+//!
+//! ```
+//! use flate2::write::GzEncoder;
+//! use flate2::Compression;
+//! use std::io;
+//! use std::io::prelude::*;
+//!
+//! # fn main() { let _ = run(); }
+//! # fn run() -> io::Result<()> {
+//! let mut encoder = GzEncoder::new(Vec::new(), Compression::Default);
+//! encoder.write(b"Example")?;
+//! # Ok(())
+//! # }
+//! ```
+//!
 //!
 //! Other various types are provided at the top-level of the crate for
 //! management and dealing with encoders/decoders.
 //!
+//! [`read`]: read/index.html
+//! [`write`]: write/index.html
+//! [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
+//! [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
+//!
 //! # Helper traits
 //!
-//! There are two helper traits provided: `FlateReader` and `FlateWriter`.
+//! There are two helper traits provided: [`FlateReadExt`] and [`FlateWriteExt`].
 //! These provide convenience methods for creating a decoder/encoder out of an
 //! already existing stream to chain construction.
 //!
+//! [`FlateReadExt`]: trait.FlateReadExt.html
+//! [`FlateWriteExt`]: trait.FlateWriteExt.html
+//!
+//! ```
+//! use flate2::{FlateReadExt, Compression};
+//! use std::io::prelude::*;
+//! use std::io;
+//! use std::fs::File;
+//!
+//! # fn main() {
+//! #    println!("{}", run().unwrap());
+//! # }
+//! #
+//! // Read contents of file with a compression stream, then decompress with GZ
+//!
+//! # fn run() -> io::Result<String> {
+//! let f = File::open("examples/hello_world.txt")?;
+//!
+//! //gz_encode method comes from FlateReadExt and applies to a std::fs::File
+//! let data = f.gz_encode(Compression::Default);
+//! let mut buffer = String::new();
+//!
+//! //gz_decode method comes from FlateReadExt and applies to a &[u8]
+//! &data.gz_decode()?.read_to_string(&mut buffer)?;
+//! # Ok(buffer)
+//! # }
+//! ```
+//!
 //! # Async I/O
 //!
-//! This crate optionally can support async I/O streams with the Tokio stack via
+//! This crate optionally can support async I/O streams with the [Tokio stack] via
 //! the `tokio` feature of this crate:
 //!
+//! [Tokio stack]: https://tokio.rs/
+//!
 //! ```toml
 //! flate2 = { version = "0.2", features = ["tokio"] }
 //! ```
 //!
 //! All methods are internally capable of working with streams that may return
-//! `ErrorKind::WouldBlock` when they're not ready to perform the particular
+//! [`ErrorKind::WouldBlock`] when they're not ready to perform the particular
 //! operation.
 //!
+//! [`ErrorKind::WouldBlock`]: https://doc.rust-lang.org/std/io/enum.ErrorKind.html
+//!
 //! Note that care needs to be taken when using these objects, however. The
 //! Tokio runtime, in particular, requires that data is fully flushed before
 //! dropping streams. For compatibility with blocking streams all streams are
 //! flushed/written when they are dropped, and this is not always a suitable
 //! time to perform I/O. If I/O streams are flushed before drop, however, then
 //! these operations will be a noop.
-
 #![doc(html_root_url = "https://docs.rs/flate2/0.2")]
 #![deny(missing_docs)]
+#![deny(missing_debug_implementations)]
 #![allow(trivial_numeric_casts)]
 #![cfg_attr(test, deny(warnings))]
 
+#[cfg(feature = "tokio")]
+extern crate futures;
 extern crate libc;
 #[cfg(test)]
+extern crate quickcheck;
+#[cfg(test)]
 extern crate rand;
-#[cfg(test)]
-extern crate quickcheck;
 #[cfg(feature = "tokio")]
 #[macro_use]
 extern crate tokio_io;
-#[cfg(feature = "tokio")]
-extern crate futures;
 
 use std::io::prelude::*;
 use std::io;
 
 pub use gz::Builder as GzBuilder;
 pub use gz::Header as GzHeader;
-pub use mem::{Compress, Decompress, DataError, Status, Flush};
+pub use mem::{Compress, DataError, Decompress, Flush, Status};
 pub use crc::{Crc, CrcReader};
 
 mod bufreader;
 mod crc;
 mod deflate;
 mod ffi;
 mod gz;
 mod zio;
 mod mem;
 mod zlib;
 
-/// Types which operate over `Read` streams, both encoders and decoders for
+/// Types which operate over [`Read`] streams, both encoders and decoders for
 /// various formats.
+///
+/// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
 pub mod read {
-    pub use deflate::EncoderReader as DeflateEncoder;
-    pub use deflate::DecoderReader as DeflateDecoder;
-    pub use zlib::EncoderReader as ZlibEncoder;
-    pub use zlib::DecoderReader as ZlibDecoder;
-    pub use gz::EncoderReader as GzEncoder;
-    pub use gz::DecoderReader as GzDecoder;
-    pub use gz::MultiDecoderReader as MultiGzDecoder;
+    pub use deflate::read::DeflateEncoder;
+    pub use deflate::read::DeflateDecoder;
+    pub use zlib::read::ZlibEncoder;
+    pub use zlib::read::ZlibDecoder;
+    pub use gz::read::GzEncoder;
+    pub use gz::read::GzDecoder;
+    pub use gz::read::MultiGzDecoder;
 }
 
-/// Types which operate over `Write` streams, both encoders and decoders for
+/// Types which operate over [`Write`] streams, both encoders and decoders for
 /// various formats.
+///
+/// [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
 pub mod write {
-    pub use deflate::EncoderWriter as DeflateEncoder;
-    pub use deflate::DecoderWriter as DeflateDecoder;
-    pub use zlib::EncoderWriter as ZlibEncoder;
-    pub use zlib::DecoderWriter as ZlibDecoder;
-    pub use gz::EncoderWriter as GzEncoder;
+    pub use deflate::write::DeflateEncoder;
+    pub use deflate::write::DeflateDecoder;
+    pub use zlib::write::ZlibEncoder;
+    pub use zlib::write::ZlibDecoder;
+    pub use gz::write::GzEncoder;
 }
 
-/// Types which operate over `BufRead` streams, both encoders and decoders for
+/// Types which operate over [`BufRead`] streams, both encoders and decoders for
 /// various formats.
+///
+/// [`BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html
 pub mod bufread {
-    pub use deflate::EncoderReaderBuf as DeflateEncoder;
-    pub use deflate::DecoderReaderBuf as DeflateDecoder;
-    pub use zlib::EncoderReaderBuf as ZlibEncoder;
-    pub use zlib::DecoderReaderBuf as ZlibDecoder;
-    pub use gz::EncoderReaderBuf as GzEncoder;
-    pub use gz::DecoderReaderBuf as GzDecoder;
-    pub use gz::MultiDecoderReaderBuf as MultiGzDecoder;
+    pub use deflate::bufread::DeflateEncoder;
+    pub use deflate::bufread::DeflateDecoder;
+    pub use zlib::bufread::ZlibEncoder;
+    pub use zlib::bufread::ZlibDecoder;
+    pub use gz::bufread::GzEncoder;
+    pub use gz::bufread::GzDecoder;
+    pub use gz::bufread::MultiGzDecoder;
 }
 
 fn _assert_send_sync() {
     fn _assert_send_sync<T: Send + Sync>() {}
 
     _assert_send_sync::<read::DeflateEncoder<&[u8]>>();
     _assert_send_sync::<read::DeflateDecoder<&[u8]>>();
     _assert_send_sync::<read::ZlibEncoder<&[u8]>>();
@@ -125,29 +184,36 @@ fn _assert_send_sync() {
     _assert_send_sync::<write::DeflateDecoder<Vec<u8>>>();
     _assert_send_sync::<write::ZlibEncoder<Vec<u8>>>();
     _assert_send_sync::<write::ZlibDecoder<Vec<u8>>>();
     _assert_send_sync::<write::GzEncoder<Vec<u8>>>();
 }
 
 /// When compressing data, the compression level can be specified by a value in
 /// this enum.
-#[derive(Copy, Clone)]
+#[derive(Copy, Clone, PartialEq, Eq, Debug)]
 pub enum Compression {
     /// No compression is to be performed, this may actually inflate data
     /// slightly when encoding.
     None = 0,
     /// Optimize for the best speed of encoding.
     Fast = 1,
     /// Optimize for the size of data being encoded.
     Best = 9,
     /// Choose the default compression, a balance between speed and size.
     Default = 6,
 }
 
+/// Default to Compression::Default.
+impl Default for Compression {
+    fn default() -> Compression {
+        Compression::Default
+    }
+}
+
 /// A helper trait to create encoder/decoders with method syntax.
 pub trait FlateReadExt: Read + Sized {
     /// Consume this reader to create a compression stream at the specified
     /// compression level.
     fn gz_encode(self, lvl: Compression) -> read::GzEncoder<Self> {
         read::GzEncoder::new(self, lvl)
     }
 
@@ -217,26 +283,26 @@ pub trait FlateWriteExt: Write + Sized {
 }
 
 impl<T: Read> FlateReadExt for T {}
 impl<T: Write> FlateWriteExt for T {}
 
 #[cfg(test)]
 mod test {
     use std::io::prelude::*;
-    use {FlateReadExt, Compression};
+    use {Compression, FlateReadExt};
 
     #[test]
     fn crazy() {
         let rdr = &mut b"foobar";
         let mut res = Vec::new();
         rdr.gz_encode(Compression::Default)
-           .deflate_encode(Compression::Default)
-           .zlib_encode(Compression::Default)
-           .zlib_decode()
-           .deflate_decode()
-           .gz_decode()
-           .unwrap()
-           .read_to_end(&mut res)
-           .unwrap();
+            .deflate_encode(Compression::Default)
+            .zlib_encode(Compression::Default)
+            .zlib_decode()
+            .deflate_decode()
+            .gz_decode()
+            .unwrap()
+            .read_to_end(&mut res)
+            .unwrap();
         assert_eq!(res, b"foobar");
     }
 }
--- a/third_party/rust/flate2/src/mem.rs
+++ b/third_party/rust/flate2/src/mem.rs
@@ -7,58 +7,70 @@ use std::slice;
 use libc::{c_int, c_uint};
 
 use Compression;
 use ffi;
 
 /// Raw in-memory compression stream for blocks of data.
 ///
 /// This type is the building block for the I/O streams in the rest of this
-/// crate. It requires more management than the `Read`/`Write` API but is
+/// crate. It requires more management than the [`Read`]/[`Write`] API but is
 /// maximally flexible in terms of accepting input from any source and being
 /// able to produce output to any memory location.
 ///
 /// It is recommended to use the I/O stream adaptors over this type as they're
 /// easier to use.
+///
+/// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
+/// [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
+#[derive(Debug)]
 pub struct Compress {
     inner: Stream<DirCompress>,
 }
 
 /// Raw in-memory decompression stream for blocks of data.
 ///
 /// This type is the building block for the I/O streams in the rest of this
-/// crate. It requires more management than the `Read`/`Write` API but is
+/// crate. It requires more management than the [`Read`]/[`Write`] API but is
 /// maximally flexible in terms of accepting input from any source and being
 /// able to produce output to any memory location.
 ///
 /// It is recommended to use the I/O stream adaptors over this type as they're
 /// easier to use.
+///
+/// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
+/// [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
+#[derive(Debug)]
 pub struct Decompress {
     inner: Stream<DirDecompress>,
 }
 
+#[derive(Debug)]
 struct Stream<D: Direction> {
     stream_wrapper: ffi::StreamWrapper,
     total_in: u64,
     total_out: u64,
     _marker: marker::PhantomData<D>,
 }
 
 unsafe impl<D: Direction> Send for Stream<D> {}
 unsafe impl<D: Direction> Sync for Stream<D> {}
 
 trait Direction {
     unsafe fn destroy(stream: *mut ffi::mz_stream) -> c_int;
 }
 
+#[derive(Debug)]
 enum DirCompress {}
+#[derive(Debug)]
 enum DirDecompress {}
 
 /// Values which indicate the form of flushing to be used when compressing or
 /// decompressing in-memory data.
+#[derive(Copy, Clone, PartialEq, Eq, Debug)]
 pub enum Flush {
     /// A typical parameter for passing to compression/decompression functions,
     /// this indicates that the underlying stream to decide how much data to
     /// accumulate before producing output in order to maximize compression.
     None = ffi::MZ_NO_FLUSH as isize,
 
     /// All pending output is flushed to the output buffer and the output is
     /// aligned on a byte boundary so that the decompressor can get all input
@@ -107,16 +119,17 @@ pub enum Flush {
 
 /// Error returned when a decompression object finds that the input stream of
 /// bytes was not a valid input stream of bytes.
 #[derive(Debug)]
 pub struct DataError(());
 
 /// Possible status results of compressing some data or successfully
 /// decompressing a block of data.
+#[derive(Copy, Clone, PartialEq, Eq, Debug)]
 pub enum Status {
     /// Indicates success.
     ///
     /// Means that more input may be needed but isn't available
     /// and/or there' smore output to be written but the output buffer is full.
     Ok,
 
     /// Indicates that forward progress is not possible due to input or output
@@ -303,16 +316,22 @@ impl Decompress {
     /// decompress the entire stream in a single call.
     ///
     /// A flush value of `Flush::Finish` indicates that there are no more source
     /// bytes available beside what's already in the input buffer, and the
     /// output buffer is large enough to hold the rest of the decompressed data.
     ///
     /// To learn how much data was consumed or how much output was produced, use
     /// the `total_in` and `total_out` functions before/after this is called.
+    ///
+    /// # Errors
+    ///
+    /// If the input data to this instance of `Decompress` is not a valid
+    /// zlib/deflate stream then this function may return an instance of
+    /// `DataError` to indicate that the stream of input bytes is corrupted.
     pub fn decompress(&mut self,
                       input: &[u8],
                       output: &mut [u8],
                       flush: Flush)
                       -> Result<Status, DataError> {
         let raw = &mut *self.inner.stream_wrapper;
         raw.next_in = input.as_ptr() as *mut u8;
         raw.avail_in = input.len() as c_uint;
@@ -341,16 +360,22 @@ impl Decompress {
     /// Decompresses the input data into the extra space in the output vector
     /// specified by `output`.
     ///
     /// This function has the same semantics as `decompress`, except that the
     /// length of `vec` is managed by this function. This will not reallocate
     /// the vector provided or attempt to grow it, so space for the output must
     /// be reserved in the output vector by the caller before calling this
     /// function.
+    ///
+    /// # Errors
+    ///
+    /// If the input data to this instance of `Decompress` is not a valid
+    /// zlib/deflate stream then this function may return an instance of
+    /// `DataError` to indicate that the stream of input bytes is corrupted.
     pub fn decompress_vec(&mut self,
                           input: &[u8],
                           output: &mut Vec<u8>,
                           flush: Flush)
                           -> Result<Status, DataError> {
         let cap = output.capacity();
         let len = output.len();
 
--- a/third_party/rust/flate2/src/zio.rs
+++ b/third_party/rust/flate2/src/zio.rs
@@ -1,14 +1,15 @@
 use std::io::prelude::*;
 use std::io;
 use std::mem;
 
 use {Decompress, Compress, Status, Flush, DataError};
 
+#[derive(Debug)]
 pub struct Writer<W: Write, D: Ops> {
     obj: Option<W>,
     pub data: D,
     buf: Vec<u8>,
 }
 
 pub trait Ops {
     fn total_in(&self) -> u64;
@@ -127,16 +128,19 @@ impl<W: Write, D: Ops> Writer<W, D> {
         self.obj.is_some()
     }
 
     fn dump(&mut self) -> io::Result<()> {
         // TODO: should manage this buffer not with `drain` but probably more of
         // a deque-like strategy.
         while self.buf.len() > 0 {
             let n = try!(self.obj.as_mut().unwrap().write(&self.buf));
+            if n == 0 {
+                return Err(io::ErrorKind::WriteZero.into())
+            }
             self.buf.drain(..n);
         }
         Ok(())
     }
 }
 
 impl<W: Write, D: Ops> Write for Writer<W, D> {
     fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
deleted file mode 100644
--- a/third_party/rust/flate2/src/zlib.rs
+++ /dev/null
@@ -1,810 +0,0 @@
-//! ZLIB compression and decompression of streams
-
-use std::io::prelude::*;
-use std::io;
-use std::mem;
-
-#[cfg(feature = "tokio")]
-use futures::Poll;
-#[cfg(feature = "tokio")]
-use tokio_io::{AsyncRead, AsyncWrite};
-
-use bufreader::BufReader;
-use zio;
-use {Compress, Decompress};
-
-/// A ZLIB encoder, or compressor.
-///
-/// This structure implements a `Write` interface and takes a stream of
-/// uncompressed data, writing the compressed data to the wrapped writer.
-pub struct EncoderWriter<W: Write> {
-    inner: zio::Writer<W, Compress>,
-}
-
-/// A ZLIB encoder, or compressor.
-///
-/// This structure implements a `Read` interface and will read uncompressed
-/// data from an underlying stream and emit a stream of compressed data.
-pub struct EncoderReader<R> {
-    inner: EncoderReaderBuf<BufReader<R>>,
-}
-
-/// A ZLIB encoder, or compressor.
-///
-/// This structure implements a `BufRead` interface and will read uncompressed
-/// data from an underlying stream and emit a stream of compressed data.
-pub struct EncoderReaderBuf<R> {
-    obj: R,
-    data: Compress,
-}
-
-/// A ZLIB decoder, or decompressor.
-///
-/// This structure implements a `Read` interface and takes a stream of
-/// compressed data as input, providing the decompressed data when read from.
-pub struct DecoderReader<R> {
-    inner: DecoderReaderBuf<BufReader<R>>,
-}
-
-/// A ZLIB decoder, or decompressor.
-///
-/// This structure implements a `BufRead` interface and takes a stream of
-/// compressed data as input, providing the decompressed data when read from.
-pub struct DecoderReaderBuf<R> {
-    obj: R,
-    data: Decompress,
-}
-
-/// A ZLIB decoder, or decompressor.
-///
-/// This structure implements a `Write` and will emit a stream of decompressed
-/// data when fed a stream of compressed data.
-pub struct DecoderWriter<W: Write> {
-    inner: zio::Writer<W, Decompress>,
-}
-
-impl<W: Write> EncoderWriter<W> {
-    /// Creates a new encoder which will write compressed data to the stream
-    /// given at the given compression level.
-    ///
-    /// When this encoder is dropped or unwrapped the final pieces of data will
-    /// be flushed.
-    pub fn new(w: W, level: ::Compression) -> EncoderWriter<W> {
-        EncoderWriter {
-            inner: zio::Writer::new(w, Compress::new(level, true)),
-        }
-    }
-
-    /// Acquires a reference to the underlying writer.
-    pub fn get_ref(&self) -> &W {
-        self.inner.get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying writer.
-    ///
-    /// Note that mutating the output/input state of the stream may corrupt this
-    /// object, so care must be taken when using this method.
-    pub fn get_mut(&mut self) -> &mut W {
-        self.inner.get_mut()
-    }
-
-    /// Resets the state of this encoder entirely, swapping out the output
-    /// stream for another.
-    ///
-    /// This function will finish encoding the current stream into the current
-    /// output stream before swapping out the two output streams. If the stream
-    /// cannot be finished an error is returned.
-    ///
-    /// After the current stream has been finished, this will reset the internal
-    /// state of this encoder and replace the output stream with the one
-    /// provided, returning the previous output stream. Future data written to
-    /// this encoder will be the compressed into the stream `w` provided.
-    pub fn reset(&mut self, w: W) -> io::Result<W> {
-        try!(self.inner.finish());
-        self.inner.data.reset();
-        Ok(self.inner.replace(w))
-    }
-
-    /// Attempt to finish this output stream, writing out final chunks of data.
-    ///
-    /// Note that this function can only be used once data has finished being
-    /// written to the output stream. After this function is called then further
-    /// calls to `write` may result in a panic.
-    ///
-    /// # Panics
-    ///
-    /// Attempts to write data to this stream may result in a panic after this
-    /// function is called.
-    pub fn try_finish(&mut self) -> io::Result<()> {
-        self.inner.finish()
-    }
-
-    /// Consumes this encoder, flushing the output stream.
-    ///
-    /// This will flush the underlying data stream, close off the compressed
-    /// stream and, if successful, return the contained writer.
-    ///
-    /// Note that this function may not be suitable to call in a situation where
-    /// the underlying stream is an asynchronous I/O stream. To finish a stream
-    /// the `try_finish` (or `shutdown`) method should be used instead. To
-    /// re-acquire ownership of a stream it is safe to call this method after
-    /// `try_finish` or `shutdown` has returned `Ok`.
-    pub fn finish(mut self) -> io::Result<W> {
-        try!(self.inner.finish());
-        Ok(self.inner.take_inner())
-    }
-
-    /// Consumes this encoder, flushing the output stream.
-    ///
-    /// This will flush the underlying data stream and then return the contained
-    /// writer if the flush succeeded.
-    /// The compressed stream will not closed but only flushed. This
-    /// means that obtained byte array can by extended by another deflated
-    /// stream. To close the stream add the two bytes 0x3 and 0x0.
-    pub fn flush_finish(mut self) -> io::Result<W> {
-        try!(self.inner.flush());
-        Ok(self.inner.take_inner())
-    }
-
-    /// Returns the number of bytes that have been written to this compresor.
-    ///
-    /// Note that not all bytes written to this object may be accounted for,
-    /// there may still be some active buffering.
-    pub fn total_in(&self) -> u64 {
-        self.inner.data.total_in()
-    }
-
-    /// Returns the number of bytes that the compressor has produced.
-    ///
-    /// Note that not all bytes may have been written yet, some may still be
-    /// buffered.
-    pub fn total_out(&self) -> u64 {
-        self.inner.data.total_out()
-    }
-}
-
-impl<W: Write> Write for EncoderWriter<W> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.inner.write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.inner.flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<W: AsyncWrite> AsyncWrite for EncoderWriter<W> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        try_nb!(self.try_finish());
-        self.get_mut().shutdown()
-    }
-}
-
-impl<W: Read + Write> Read for EncoderWriter<W> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        self.get_mut().read(buf)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<W: AsyncRead + AsyncWrite> AsyncRead for EncoderWriter<W> {
-}
-
-impl<R: Read> EncoderReader<R> {
-    /// Creates a new encoder which will read uncompressed data from the given
-    /// stream and emit the compressed stream.
-    pub fn new(r: R, level: ::Compression) -> EncoderReader<R> {
-        EncoderReader {
-            inner: EncoderReaderBuf::new(BufReader::new(r), level),
-        }
-    }
-
-    /// Resets the state of this encoder entirely, swapping out the input
-    /// stream for another.
-    ///
-    /// This function will reset the internal state of this encoder and replace
-    /// the input stream with the one provided, returning the previous input
-    /// stream. Future data read from this encoder will be the compressed
-    /// version of `r`'s data.
-    ///
-    /// Note that there may be currently buffered data when this function is
-    /// called, and in that case the buffered data is discarded.
-    pub fn reset(&mut self, r: R) -> R {
-        self.inner.data.reset();
-        self.inner.obj.reset(r)
-    }
-
-    /// Acquires a reference to the underlying stream
-    pub fn get_ref(&self) -> &R {
-        self.inner.get_ref().get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying stream
-    ///
-    /// Note that mutation of the stream may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        self.inner.get_mut().get_mut()
-    }
-
-    /// Consumes this encoder, returning the underlying reader.
-    ///
-    /// Note that there may be buffered bytes which are not re-acquired as part
-    /// of this transition. It's recommended to only call this function after
-    /// EOF has been reached.
-    pub fn into_inner(self) -> R {
-        self.inner.into_inner().into_inner()
-    }
-
-    /// Returns the number of bytes that have been read into this compressor.
-    ///
-    /// Note that not all bytes read from the underlying object may be accounted
-    /// for, there may still be some active buffering.
-    pub fn total_in(&self) -> u64 {
-        self.inner.data.total_in()
-    }
-
-    /// Returns the number of bytes that the compressor has produced.
-    ///
-    /// Note that not all bytes may have been read yet, some may still be
-    /// buffered.
-    pub fn total_out(&self) -> u64 {
-        self.inner.data.total_out()
-    }
-}
-
-impl<R: Read> Read for EncoderReader<R> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        self.inner.read(buf)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncRead> AsyncRead for EncoderReader<R> {
-}
-
-impl<W: Read + Write> Write for EncoderReader<W> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncRead + AsyncWrite> AsyncWrite for EncoderReader<R> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        self.get_mut().shutdown()
-    }
-}
-
-impl<R: BufRead> EncoderReaderBuf<R> {
-    /// Creates a new encoder which will read uncompressed data from the given
-    /// stream and emit the compressed stream.
-    pub fn new(r: R, level: ::Compression) -> EncoderReaderBuf<R> {
-        EncoderReaderBuf {
-            obj: r,
-            data: Compress::new(level, true),
-        }
-    }
-
-    /// Resets the state of this encoder entirely, swapping out the input
-    /// stream for another.
-    ///
-    /// This function will reset the internal state of this encoder and replace
-    /// the input stream with the one provided, returning the previous input
-    /// stream. Future data read from this encoder will be the compressed
-    /// version of `r`'s data.
-    pub fn reset(&mut self, r: R) -> R {
-        self.data.reset();
-        mem::replace(&mut self.obj, r)
-    }
-
-    /// Acquires a reference to the underlying reader
-    pub fn get_ref(&self) -> &R {
-        &self.obj
-    }
-
-    /// Acquires a mutable reference to the underlying stream
-    ///
-    /// Note that mutation of the stream may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        &mut self.obj
-    }
-
-    /// Consumes this encoder, returning the underlying reader.
-    pub fn into_inner(self) -> R {
-        self.obj
-    }
-
-    /// Returns the number of bytes that have been read into this compressor.
-    ///
-    /// Note that not all bytes read from the underlying object may be accounted
-    /// for, there may still be some active buffering.
-    pub fn total_in(&self) -> u64 {
-        self.data.total_in()
-    }
-
-    /// Returns the number of bytes that the compressor has produced.
-    ///
-    /// Note that not all bytes may have been read yet, some may still be
-    /// buffered.
-    pub fn total_out(&self) -> u64 {
-        self.data.total_out()
-    }
-}
-
-impl<R: BufRead> Read for EncoderReaderBuf<R> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        zio::read(&mut self.obj, &mut self.data, buf)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncRead + BufRead> AsyncRead for EncoderReaderBuf<R> {
-}
-
-impl<R: BufRead + Write> Write for EncoderReaderBuf<R> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncWrite + BufRead> AsyncWrite for EncoderReaderBuf<R> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        self.get_mut().shutdown()
-    }
-}
-
-impl<R: Read> DecoderReader<R> {
-    /// Creates a new decoder which will decompress data read from the given
-    /// stream.
-    pub fn new(r: R) -> DecoderReader<R> {
-        DecoderReader::new_with_buf(r, vec![0; 32 * 1024])
-    }
-
-    /// Same as `new`, but the intermediate buffer for data is specified.
-    ///
-    /// Note that the specified buffer will only be used up to its current
-    /// length. The buffer's capacity will also not grow over time.
-    pub fn new_with_buf(r: R, buf: Vec<u8>) -> DecoderReader<R> {
-        DecoderReader {
-            inner: DecoderReaderBuf::new(BufReader::with_buf(buf, r)),
-        }
-    }
-
-    /// Resets the state of this decoder entirely, swapping out the input
-    /// stream for another.
-    ///
-    /// This will reset the internal state of this decoder and replace the
-    /// input stream with the one provided, returning the previous input
-    /// stream. Future data read from this decoder will be the decompressed
-    /// version of `r`'s data.
-    ///
-    /// Note that there may be currently buffered data when this function is
-    /// called, and in that case the buffered data is discarded.
-    pub fn reset(&mut self, r: R) -> R {
-        self.inner.data = Decompress::new(true);
-        self.inner.obj.reset(r)
-    }
-
-    /// Acquires a reference to the underlying stream
-    pub fn get_ref(&self) -> &R {
-        self.inner.get_ref().get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying stream
-    ///
-    /// Note that mutation of the stream may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        self.inner.get_mut().get_mut()
-    }
-
-    /// Consumes this decoder, returning the underlying reader.
-    ///
-    /// Note that there may be buffered bytes which are not re-acquired as part
-    /// of this transition. It's recommended to only call this function after
-    /// EOF has been reached.
-    pub fn into_inner(self) -> R {
-        self.inner.into_inner().into_inner()
-    }
-
-    /// Returns the number of bytes that the decompressor has consumed.
-    ///
-    /// Note that this will likely be smaller than what the decompressor
-    /// actually read from the underlying stream due to buffering.
-    pub fn total_in(&self) -> u64 {
-        self.inner.total_in()
-    }
-
-    /// Returns the number of bytes that the decompressor has produced.
-    pub fn total_out(&self) -> u64 {
-        self.inner.total_out()
-    }
-}
-
-impl<R: Read> Read for DecoderReader<R> {
-    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
-        self.inner.read(into)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncRead> AsyncRead for DecoderReader<R> {
-}
-
-impl<R: Read + Write> Write for DecoderReader<R> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncWrite + AsyncRead> AsyncWrite for DecoderReader<R> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        self.get_mut().shutdown()
-    }
-}
-
-impl<R: BufRead> DecoderReaderBuf<R> {
-    /// Creates a new decoder which will decompress data read from the given
-    /// stream.
-    pub fn new(r: R) -> DecoderReaderBuf<R> {
-        DecoderReaderBuf {
-            obj: r,
-            data: Decompress::new(true),
-        }
-    }
-
-    /// Resets the state of this decoder entirely, swapping out the input
-    /// stream for another.
-    ///
-    /// This will reset the internal state of this decoder and replace the
-    /// input stream with the one provided, returning the previous input
-    /// stream. Future data read from this decoder will be the decompressed
-    /// version of `r`'s data.
-    pub fn reset(&mut self, r: R) -> R {
-        self.data = Decompress::new(true);
-        mem::replace(&mut self.obj, r)
-    }
-
-    /// Acquires a reference to the underlying stream
-    pub fn get_ref(&self) -> &R {
-        &self.obj
-    }
-
-    /// Acquires a mutable reference to the underlying stream
-    ///
-    /// Note that mutation of the stream may result in surprising results if
-    /// this encoder is continued to be used.
-    pub fn get_mut(&mut self) -> &mut R {
-        &mut self.obj
-    }
-
-    /// Consumes this decoder, returning the underlying reader.
-    pub fn into_inner(self) -> R {
-        self.obj
-    }
-
-    /// Returns the number of bytes that the decompressor has consumed.
-    ///
-    /// Note that this will likely be smaller than what the decompressor
-    /// actually read from the underlying stream due to buffering.
-    pub fn total_in(&self) -> u64 {
-        self.data.total_in()
-    }
-
-    /// Returns the number of bytes that the decompressor has produced.
-    pub fn total_out(&self) -> u64 {
-        self.data.total_out()
-    }
-}
-
-impl<R: BufRead> Read for DecoderReaderBuf<R> {
-    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
-        zio::read(&mut self.obj, &mut self.data, into)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncRead + BufRead> AsyncRead for DecoderReaderBuf<R> {
-}
-
-impl<R: BufRead + Write> Write for DecoderReaderBuf<R> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.get_mut().write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.get_mut().flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<R: AsyncWrite + BufRead> AsyncWrite for DecoderReaderBuf<R> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        self.get_mut().shutdown()
-    }
-}
-
-impl<W: Write> DecoderWriter<W> {
-    /// Creates a new decoder which will write uncompressed data to the stream.
-    ///
-    /// When this decoder is dropped or unwrapped the final pieces of data will
-    /// be flushed.
-    pub fn new(w: W) -> DecoderWriter<W> {
-        DecoderWriter {
-            inner: zio::Writer::new(w, Decompress::new(true)),
-        }
-    }
-
-    /// Acquires a reference to the underlying writer.
-    pub fn get_ref(&self) -> &W {
-        self.inner.get_ref()
-    }
-
-    /// Acquires a mutable reference to the underlying writer.
-    ///
-    /// Note that mutating the output/input state of the stream may corrupt this
-    /// object, so care must be taken when using this method.
-    pub fn get_mut(&mut self) -> &mut W {
-        self.inner.get_mut()
-    }
-
-    /// Resets the state of this decoder entirely, swapping out the output
-    /// stream for another.
-    ///
-    /// This will reset the internal state of this decoder and replace the
-    /// output stream with the one provided, returning the previous output
-    /// stream. Future data written to this decoder will be decompressed into
-    /// the output stream `w`.
-    pub fn reset(&mut self, w: W) -> io::Result<W> {
-        try!(self.inner.finish());
-        self.inner.data = Decompress::new(true);
-        Ok(self.inner.replace(w))
-    }
-
-    /// Attempt to finish this output stream, writing out final chunks of data.
-    ///
-    /// Note that this function can only be used once data has finished being
-    /// written to the output stream. After this function is called then further
-    /// calls to `write` may result in a panic.
-    ///
-    /// # Panics
-    ///
-    /// Attempts to write data to this stream may result in a panic after this
-    /// function is called.
-    pub fn try_finish(&mut self) -> io::Result<()> {
-        self.inner.finish()
-    }
-
-    /// Consumes this encoder, flushing the output stream.
-    ///
-    /// This will flush the underlying data stream and then return the contained
-    /// writer if the flush succeeded.
-    ///
-    /// Note that this function may not be suitable to call in a situation where
-    /// the underlying stream is an asynchronous I/O stream. To finish a stream
-    /// the `try_finish` (or `shutdown`) method should be used instead. To
-    /// re-acquire ownership of a stream it is safe to call this method after
-    /// `try_finish` or `shutdown` has returned `Ok`.
-    pub fn finish(mut self) -> io::Result<W> {
-        try!(self.inner.finish());
-        Ok(self.inner.take_inner())
-    }
-
-    /// Returns the number of bytes that the decompressor has consumed for
-    /// decompression.
-    ///
-    /// Note that this will likely be smaller than the number of bytes
-    /// successfully written to this stream due to internal buffering.
-    pub fn total_in(&self) -> u64 {
-        self.inner.data.total_in()
-    }
-
-    /// Returns the number of bytes that the decompressor has written to its
-    /// output stream.
-    pub fn total_out(&self) -> u64 {
-        self.inner.data.total_out()
-    }
-}
-
-impl<W: Write> Write for DecoderWriter<W> {
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.inner.write(buf)
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        self.inner.flush()
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<W: AsyncWrite> AsyncWrite for DecoderWriter<W> {
-    fn shutdown(&mut self) -> Poll<(), io::Error> {
-        try_nb!(self.inner.finish());
-        self.inner.get_mut().shutdown()
-    }
-}
-
-impl<W: Read + Write> Read for DecoderWriter<W> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        self.inner.get_mut().read(buf)
-    }
-}
-
-#[cfg(feature = "tokio")]
-impl<W: AsyncRead + AsyncWrite> AsyncRead for DecoderWriter<W> {
-}
-
-#[cfg(test)]
-mod tests {
-    use std::io::prelude::*;
-    use std::io;
-
-    use rand::{thread_rng, Rng};
-
-    use zlib::{EncoderWriter, EncoderReader, DecoderReader, DecoderWriter};
-    use Compression::Default;
-
-    #[test]
-    fn roundtrip() {
-        let mut real = Vec::new();
-        let mut w = EncoderWriter::new(Vec::new(), Default);
-        let v = thread_rng().gen_iter::<u8>().take(1024).collect::<Vec<_>>();
-        for _ in 0..200 {
-            let to_write = &v[..thread_rng().gen_range(0, v.len())];
-            real.extend(to_write.iter().map(|x| *x));
-            w.write_all(to_write).unwrap();
-        }
-        let result = w.finish().unwrap();
-        let mut r = DecoderReader::new(&result[..]);
-        let mut ret = Vec::new();
-        r.read_to_end(&mut ret).unwrap();
-        assert!(ret == real);
-    }
-
-    #[test]
-    fn drop_writes() {
-        let mut data = Vec::new();
-        EncoderWriter::new(&mut data, Default).write_all(b"foo").unwrap();
-        let mut r = DecoderReader::new(&data[..]);
-        let mut ret = Vec::new();
-        r.read_to_end(&mut ret).unwrap();
-        assert!(ret == b"foo");
-    }
-
-    #[test]
-    fn total_in() {
-        let mut real = Vec::new();
-        let mut w = EncoderWriter::new(Vec::new(), Default);
-        let v = thread_rng().gen_iter::<u8>().take(1024).collect::<Vec<_>>();
-        for _ in 0..200 {
-            let to_write = &v[..thread_rng().gen_range(0, v.len())];
-            real.extend(to_write.iter().map(|x| *x));
-            w.write_all(to_write).unwrap();
-        }
-        let mut result = w.finish().unwrap();
-
-        let result_len = result.len();
-
-        for _ in 0..200 {
-            result.extend(v.iter().map(|x| *x));
-        }
-
-        let mut r = DecoderReader::new(&result[..]);
-        let mut ret = Vec::new();
-        r.read_to_end(&mut ret).unwrap();
-        assert!(ret == real);
-        assert_eq!(r.total_in(), result_len as u64);
-    }
-
-    #[test]
-    fn roundtrip2() {
-        let v = thread_rng()
-                    .gen_iter::<u8>()
-                    .take(1024 * 1024)
-                    .collect::<Vec<_>>();
-        let mut r = DecoderReader::new(EncoderReader::new(&v[..], Default));
-        let mut ret = Vec::new();
-        r.read_to_end(&mut ret).unwrap();
-        assert_eq!(ret, v);
-    }
-
-    #[test]
-    fn roundtrip3() {
-        let v = thread_rng()
-                    .gen_iter::<u8>()
-                    .take(1024 * 1024)
-                    .collect::<Vec<_>>();
-        let mut w = EncoderWriter::new(DecoderWriter::new(Vec::new()), Default);
-        w.write_all(&v).unwrap();
-        let w = w.finish().unwrap().finish().unwrap();
-        assert!(w == v);
-    }
-
-    #[test]
-    fn reset_decoder() {
-        let v = thread_rng()
-                    .gen_iter::<u8>()
-                    .take(1024 * 1024)
-                    .collect::<Vec<_>>();
-        let mut w = EncoderWriter::new(Vec::new(), Default);
-        w.write_all(&v).unwrap();
-        let data = w.finish().unwrap();
-
-        {
-            let (mut a, mut b, mut c) = (Vec::new(), Vec::new(), Vec::new());
-            let mut r = DecoderReader::new(&data[..]);
-            r.read_to_end(&mut a).unwrap();
-            r.reset(&data);
-            r.read_to_end(&mut b).unwrap();
-
-            let mut r = DecoderReader::new(&data[..]);
-            r.read_to_end(&mut c).unwrap();
-            assert!(a == b && b == c && c == v);
-        }
-
-        {
-            let mut w = DecoderWriter::new(Vec::new());
-            w.write_all(&data).unwrap();
-            let a = w.reset(Vec::new()).unwrap();
-            w.write_all(&data).unwrap();
-            let b = w.finish().unwrap();
-
-            let mut w = DecoderWriter::new(Vec::new());
-            w.write_all(&data).unwrap();
-            let c = w.finish().unwrap();
-            assert!(a == b && b == c && c == v);
-        }
-    }
-
-    #[test]
-    fn bad_input() {
-        // regress tests: previously caused a panic on drop
-        let mut out: Vec<u8> = Vec::new();
-        let data: Vec<u8> = (0..255).cycle().take(1024).collect();
-        let mut w = DecoderWriter::new(&mut out);
-        match w.write_all(&data[..]) {
-            Ok(_) => panic!("Expected an error to be returned!"),
-            Err(e) => assert_eq!(e.kind(), io::ErrorKind::InvalidInput),
-        }
-    }
-
-    #[test]
-    fn qc_reader() {
-        ::quickcheck::quickcheck(test as fn(_) -> _);
-
-        fn test(v: Vec<u8>) -> bool {
-            let mut r = DecoderReader::new(EncoderReader::new(&v[..], Default));
-            let mut v2 = Vec::new();
-            r.read_to_end(&mut v2).unwrap();
-            v == v2
-        }
-    }
-
-    #[test]
-    fn qc_writer() {
-        ::quickcheck::quickcheck(test as fn(_) -> _);
-
-        fn test(v: Vec<u8>) -> bool {
-            let mut w = EncoderWriter::new(DecoderWriter::new(Vec::new()), Default);
-            w.write_all(&v).unwrap();
-            v == w.finish().unwrap().finish().unwrap()
-        }
-    }
-}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/src/zlib/bufread.rs
@@ -0,0 +1,259 @@
+use std::io::prelude::*;
+use std::io;
+use std::mem;
+
+#[cfg(feature = "tokio")]
+use futures::Poll;
+#[cfg(feature = "tokio")]
+use tokio_io::{AsyncRead, AsyncWrite};
+
+use zio;
+use {Compress, Decompress};
+
+/// A ZLIB encoder, or compressor.
+///
+/// This structure implements a [`BufRead`] interface and will read uncompressed
+/// data from an underlying stream and emit a stream of compressed data.
+///
+/// [`BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use flate2::Compression;
+/// use flate2::bufread::ZlibEncoder;
+/// use std::fs::File;
+/// use std::io::BufReader;
+///
+/// // Use a buffered file to compress contents into a Vec<u8>
+///
+/// # fn open_hello_world() -> std::io::Result<Vec<u8>> {
+/// let f = File::open("examples/hello_world.txt")?;
+/// let b = BufReader::new(f);
+/// let mut z = ZlibEncoder::new(b, Compression::Fast);
+/// let mut buffer = Vec::new();
+/// z.read_to_end(&mut buffer)?;
+/// # Ok(buffer)
+/// # }
+/// ```
+#[derive(Debug)]
+pub struct ZlibEncoder<R> {
+    obj: R,
+    data: Compress,
+}
+
+
+impl<R: BufRead> ZlibEncoder<R> {
+    /// Creates a new encoder which will read uncompressed data from the given
+    /// stream and emit the compressed stream.
+    pub fn new(r: R, level: ::Compression) -> ZlibEncoder<R> {
+        ZlibEncoder {
+            obj: r,
+            data: Compress::new(level, true),
+        }
+    }
+}
+
+pub fn reset_encoder_data<R>(zlib: &mut ZlibEncoder<R>) {
+    zlib.data.reset()
+}
+
+impl<R> ZlibEncoder<R> {
+    /// Resets the state of this encoder entirely, swapping out the input
+    /// stream for another.
+    ///
+    /// This function will reset the internal state of this encoder and replace
+    /// the input stream with the one provided, returning the previous input
+    /// stream. Future data read from this encoder will be the compressed
+    /// version of `r`'s data.
+    pub fn reset(&mut self, r: R) -> R {
+        reset_encoder_data(self);
+        mem::replace(&mut self.obj, r)
+    }
+
+    /// Acquires a reference to the underlying reader
+    pub fn get_ref(&self) -> &R {
+        &self.obj
+    }
+
+    /// Acquires a mutable reference to the underlying stream
+    ///
+    /// Note that mutation of the stream may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        &mut self.obj
+    }
+
+    /// Consumes this encoder, returning the underlying reader.
+    pub fn into_inner(self) -> R {
+        self.obj
+    }
+
+    /// Returns the number of bytes that have been read into this compressor.
+    ///
+    /// Note that not all bytes read from the underlying object may be accounted
+    /// for, there may still be some active buffering.
+    pub fn total_in(&self) -> u64 {
+        self.data.total_in()
+    }
+
+    /// Returns the number of bytes that the compressor has produced.
+    ///
+    /// Note that not all bytes may have been read yet, some may still be
+    /// buffered.
+    pub fn total_out(&self) -> u64 {
+        self.data.total_out()
+    }
+}
+
+impl<R: BufRead> Read for ZlibEncoder<R> {
+    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
+        zio::read(&mut self.obj, &mut self.data, buf)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncRead + BufRead> AsyncRead for ZlibEncoder<R> {}
+
+impl<R: BufRead + Write> Write for ZlibEncoder<R> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncWrite + BufRead> AsyncWrite for ZlibEncoder<R> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        self.get_mut().shutdown()
+    }
+}
+
+/// A ZLIB decoder, or decompressor.
+///
+/// This structure implements a [`BufRead`] interface and takes a stream of
+/// compressed data as input, providing the decompressed data when read from.
+///
+/// [`BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// # use flate2::Compression;
+/// # use flate2::write::ZlibEncoder;
+/// use flate2::bufread::ZlibDecoder;
+///
+/// # fn main() {
+/// # let mut e = ZlibEncoder::new(Vec::new(), Compression::Default);
+/// # e.write(b"Hello World").unwrap();
+/// # let bytes = e.finish().unwrap();
+/// # println!("{}", decode_bufreader(bytes).unwrap());
+/// # }
+/// #
+/// // Uncompresses a Zlib Encoded vector of bytes and returns a string or error
+/// // Here &[u8] implements BufRead
+///
+/// fn decode_bufreader(bytes: Vec<u8>) -> io::Result<String> {
+///     let mut z = ZlibDecoder::new(&bytes[..]);
+///     let mut s = String::new();
+///     z.read_to_string(&mut s)?;
+///     Ok(s)
+/// }
+/// ```
+#[derive(Debug)]
+pub struct ZlibDecoder<R> {
+    obj: R,
+    data: Decompress,
+}
+
+impl<R: BufRead> ZlibDecoder<R> {
+    /// Creates a new decoder which will decompress data read from the given
+    /// stream.
+    pub fn new(r: R) -> ZlibDecoder<R> {
+        ZlibDecoder {
+            obj: r,
+            data: Decompress::new(true),
+        }
+    }
+}
+
+pub fn reset_decoder_data<R>(zlib: &mut ZlibDecoder<R>) {
+    zlib.data = Decompress::new(true);
+}
+
+impl<R> ZlibDecoder<R> {
+    /// Resets the state of this decoder entirely, swapping out the input
+    /// stream for another.
+    ///
+    /// This will reset the internal state of this decoder and replace the
+    /// input stream with the one provided, returning the previous input
+    /// stream. Future data read from this decoder will be the decompressed
+    /// version of `r`'s data.
+    pub fn reset(&mut self, r: R) -> R {
+        reset_decoder_data(self);
+        mem::replace(&mut self.obj, r)
+    }
+
+    /// Acquires a reference to the underlying stream
+    pub fn get_ref(&self) -> &R {
+        &self.obj
+    }
+
+    /// Acquires a mutable reference to the underlying stream
+    ///
+    /// Note that mutation of the stream may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        &mut self.obj
+    }
+
+    /// Consumes this decoder, returning the underlying reader.
+    pub fn into_inner(self) -> R {
+        self.obj
+    }
+
+    /// Returns the number of bytes that the decompressor has consumed.
+    ///
+    /// Note that this will likely be smaller than what the decompressor
+    /// actually read from the underlying stream due to buffering.
+    pub fn total_in(&self) -> u64 {
+        self.data.total_in()
+    }
+
+    /// Returns the number of bytes that the decompressor has produced.
+    pub fn total_out(&self) -> u64 {
+        self.data.total_out()
+    }
+}
+
+impl<R: BufRead> Read for ZlibDecoder<R> {
+    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
+        zio::read(&mut self.obj, &mut self.data, into)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncRead + BufRead> AsyncRead for ZlibDecoder<R> {}
+
+impl<R: BufRead + Write> Write for ZlibDecoder<R> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncWrite + BufRead> AsyncWrite for ZlibDecoder<R> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        self.get_mut().shutdown()
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/src/zlib/mod.rs
@@ -0,0 +1,164 @@
+pub mod bufread;
+pub mod read;
+pub mod write;
+
+
+#[cfg(test)]
+mod tests {
+    use std::io::prelude::*;
+    use std::io;
+
+    use rand::{thread_rng, Rng};
+
+    use zlib::{read, write};
+    use Compression::Default;
+
+    #[test]
+    fn roundtrip() {
+        let mut real = Vec::new();
+        let mut w = write::ZlibEncoder::new(Vec::new(), Default);
+        let v = thread_rng().gen_iter::<u8>().take(1024).collect::<Vec<_>>();
+        for _ in 0..200 {
+            let to_write = &v[..thread_rng().gen_range(0, v.len())];
+            real.extend(to_write.iter().map(|x| *x));
+            w.write_all(to_write).unwrap();
+        }
+        let result = w.finish().unwrap();
+        let mut r = read::ZlibDecoder::new(&result[..]);
+        let mut ret = Vec::new();
+        r.read_to_end(&mut ret).unwrap();
+        assert!(ret == real);
+    }
+
+    #[test]
+    fn drop_writes() {
+        let mut data = Vec::new();
+        write::ZlibEncoder::new(&mut data, Default)
+            .write_all(b"foo")
+            .unwrap();
+        let mut r = read::ZlibDecoder::new(&data[..]);
+        let mut ret = Vec::new();
+        r.read_to_end(&mut ret).unwrap();
+        assert!(ret == b"foo");
+    }
+
+    #[test]
+    fn total_in() {
+        let mut real = Vec::new();
+        let mut w = write::ZlibEncoder::new(Vec::new(), Default);
+        let v = thread_rng().gen_iter::<u8>().take(1024).collect::<Vec<_>>();
+        for _ in 0..200 {
+            let to_write = &v[..thread_rng().gen_range(0, v.len())];
+            real.extend(to_write.iter().map(|x| *x));
+            w.write_all(to_write).unwrap();
+        }
+        let mut result = w.finish().unwrap();
+
+        let result_len = result.len();
+
+        for _ in 0..200 {
+            result.extend(v.iter().map(|x| *x));
+        }
+
+        let mut r = read::ZlibDecoder::new(&result[..]);
+        let mut ret = Vec::new();
+        r.read_to_end(&mut ret).unwrap();
+        assert!(ret == real);
+        assert_eq!(r.total_in(), result_len as u64);
+    }
+
+    #[test]
+    fn roundtrip2() {
+        let v = thread_rng()
+            .gen_iter::<u8>()
+            .take(1024 * 1024)
+            .collect::<Vec<_>>();
+        let mut r = read::ZlibDecoder::new(read::ZlibEncoder::new(&v[..], Default));
+        let mut ret = Vec::new();
+        r.read_to_end(&mut ret).unwrap();
+        assert_eq!(ret, v);
+    }
+
+    #[test]
+    fn roundtrip3() {
+        let v = thread_rng()
+            .gen_iter::<u8>()
+            .take(1024 * 1024)
+            .collect::<Vec<_>>();
+        let mut w = write::ZlibEncoder::new(write::ZlibDecoder::new(Vec::new()), Default);
+        w.write_all(&v).unwrap();
+        let w = w.finish().unwrap().finish().unwrap();
+        assert!(w == v);
+    }
+
+    #[test]
+    fn reset_decoder() {
+        let v = thread_rng()
+            .gen_iter::<u8>()
+            .take(1024 * 1024)
+            .collect::<Vec<_>>();
+        let mut w = write::ZlibEncoder::new(Vec::new(), Default);
+        w.write_all(&v).unwrap();
+        let data = w.finish().unwrap();
+
+        {
+            let (mut a, mut b, mut c) = (Vec::new(), Vec::new(), Vec::new());
+            let mut r = read::ZlibDecoder::new(&data[..]);
+            r.read_to_end(&mut a).unwrap();
+            r.reset(&data);
+            r.read_to_end(&mut b).unwrap();
+
+            let mut r = read::ZlibDecoder::new(&data[..]);
+            r.read_to_end(&mut c).unwrap();
+            assert!(a == b && b == c && c == v);
+        }
+
+        {
+            let mut w = write::ZlibDecoder::new(Vec::new());
+            w.write_all(&data).unwrap();
+            let a = w.reset(Vec::new()).unwrap();
+            w.write_all(&data).unwrap();
+            let b = w.finish().unwrap();
+
+            let mut w = write::ZlibDecoder::new(Vec::new());
+            w.write_all(&data).unwrap();
+            let c = w.finish().unwrap();
+            assert!(a == b && b == c && c == v);
+        }
+    }
+
+    #[test]
+    fn bad_input() {
+        // regress tests: previously caused a panic on drop
+        let mut out: Vec<u8> = Vec::new();
+        let data: Vec<u8> = (0..255).cycle().take(1024).collect();
+        let mut w = write::ZlibDecoder::new(&mut out);
+        match w.write_all(&data[..]) {
+            Ok(_) => panic!("Expected an error to be returned!"),
+            Err(e) => assert_eq!(e.kind(), io::ErrorKind::InvalidInput),
+        }
+    }
+
+    #[test]
+    fn qc_reader() {
+        ::quickcheck::quickcheck(test as fn(_) -> _);
+
+        fn test(v: Vec<u8>) -> bool {
+            let mut r = read::ZlibDecoder::new(read::ZlibEncoder::new(&v[..], Default));
+            let mut v2 = Vec::new();
+            r.read_to_end(&mut v2).unwrap();
+            v == v2
+        }
+    }
+
+    #[test]
+    fn qc_writer() {
+        ::quickcheck::quickcheck(test as fn(_) -> _);
+
+        fn test(v: Vec<u8>) -> bool {
+            let mut w = write::ZlibEncoder::new(write::ZlibDecoder::new(Vec::new()), Default);
+            w.write_all(&v).unwrap();
+            v == w.finish().unwrap().finish().unwrap()
+        }
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/src/zlib/read.rs
@@ -0,0 +1,266 @@
+use std::io::prelude::*;
+use std::io;
+
+#[cfg(feature = "tokio")]
+use futures::Poll;
+#[cfg(feature = "tokio")]
+use tokio_io::{AsyncRead, AsyncWrite};
+
+use bufreader::BufReader;
+use super::bufread;
+
+/// A ZLIB encoder, or compressor.
+///
+/// This structure implements a [`Read`] interface and will read uncompressed
+/// data from an underlying stream and emit a stream of compressed data.
+///
+/// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use flate2::Compression;
+/// use flate2::read::ZlibEncoder;
+/// use std::fs::File;
+///
+/// // Open example file and compress the contents using Read interface
+///
+/// # fn open_hello_world() -> std::io::Result<Vec<u8>> {
+/// let f = File::open("examples/hello_world.txt")?;
+/// let mut z = ZlibEncoder::new(f, Compression::Fast);
+/// let mut buffer = [0;50];
+/// let byte_count = z.read(&mut buffer)?;
+/// # Ok(buffer[0..byte_count].to_vec())
+/// # }
+/// ```
+#[derive(Debug)]
+pub struct ZlibEncoder<R> {
+    inner: bufread::ZlibEncoder<BufReader<R>>,
+}
+
+impl<R: Read> ZlibEncoder<R> {
+    /// Creates a new encoder which will read uncompressed data from the given
+    /// stream and emit the compressed stream.
+    pub fn new(r: R, level: ::Compression) -> ZlibEncoder<R> {
+        ZlibEncoder {
+            inner: bufread::ZlibEncoder::new(BufReader::new(r), level),
+        }
+    }
+}
+
+impl<R> ZlibEncoder<R> {
+    /// Resets the state of this encoder entirely, swapping out the input
+    /// stream for another.
+    ///
+    /// This function will reset the internal state of this encoder and replace
+    /// the input stream with the one provided, returning the previous input
+    /// stream. Future data read from this encoder will be the compressed
+    /// version of `r`'s data.
+    ///
+    /// Note that there may be currently buffered data when this function is
+    /// called, and in that case the buffered data is discarded.
+    pub fn reset(&mut self, r: R) -> R {
+        super::bufread::reset_encoder_data(&mut self.inner);
+        self.inner.get_mut().reset(r)
+    }
+
+    /// Acquires a reference to the underlying stream
+    pub fn get_ref(&self) -> &R {
+        self.inner.get_ref().get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying stream
+    ///
+    /// Note that mutation of the stream may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        self.inner.get_mut().get_mut()
+    }
+
+    /// Consumes this encoder, returning the underlying reader.
+    ///
+    /// Note that there may be buffered bytes which are not re-acquired as part
+    /// of this transition. It's recommended to only call this function after
+    /// EOF has been reached.
+    pub fn into_inner(self) -> R {
+        self.inner.into_inner().into_inner()
+    }
+
+    /// Returns the number of bytes that have been read into this compressor.
+    ///
+    /// Note that not all bytes read from the underlying object may be accounted
+    /// for, there may still be some active buffering.
+    pub fn total_in(&self) -> u64 {
+        self.inner.total_in()
+    }
+
+    /// Returns the number of bytes that the compressor has produced.
+    ///
+    /// Note that not all bytes may have been read yet, some may still be
+    /// buffered.
+    pub fn total_out(&self) -> u64 {
+        self.inner.total_out()
+    }
+}
+
+impl<R: Read> Read for ZlibEncoder<R> {
+    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
+        self.inner.read(buf)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncRead> AsyncRead for ZlibEncoder<R> {}
+
+impl<W: Read + Write> Write for ZlibEncoder<W> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncRead + AsyncWrite> AsyncWrite for ZlibEncoder<R> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        self.get_mut().shutdown()
+    }
+}
+
+/// A ZLIB decoder, or decompressor.
+///
+/// This structure implements a [`Read`] interface and takes a stream of
+/// compressed data as input, providing the decompressed data when read from.
+///
+/// [`Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// # use flate2::Compression;
+/// # use flate2::write::ZlibEncoder;
+/// use flate2::read::ZlibDecoder;
+///
+/// # fn main() {
+/// # let mut e = ZlibEncoder::new(Vec::new(), Compression::Default);
+/// # e.write(b"Hello World").unwrap();
+/// # let bytes = e.finish().unwrap();
+/// # println!("{}", decode_reader(bytes).unwrap());
+/// # }
+/// #
+/// // Uncompresses a Zlib Encoded vector of bytes and returns a string or error
+/// // Here &[u8] implements Read
+///
+/// fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+///     let mut z = ZlibDecoder::new(&bytes[..]);
+///     let mut s = String::new();
+///     z.read_to_string(&mut s)?;
+///     Ok(s)
+/// }
+/// ```
+#[derive(Debug)]
+pub struct ZlibDecoder<R> {
+    inner: bufread::ZlibDecoder<BufReader<R>>,
+}
+
+
+impl<R: Read> ZlibDecoder<R> {
+    /// Creates a new decoder which will decompress data read from the given
+    /// stream.
+    pub fn new(r: R) -> ZlibDecoder<R> {
+        ZlibDecoder::new_with_buf(r, vec![0; 32 * 1024])
+    }
+
+    /// Same as `new`, but the intermediate buffer for data is specified.
+    ///
+    /// Note that the specified buffer will only be used up to its current
+    /// length. The buffer's capacity will also not grow over time.
+    pub fn new_with_buf(r: R, buf: Vec<u8>) -> ZlibDecoder<R> {
+        ZlibDecoder {
+            inner: bufread::ZlibDecoder::new(BufReader::with_buf(buf, r)),
+        }
+    }
+}
+
+impl<R> ZlibDecoder<R> {
+    /// Resets the state of this decoder entirely, swapping out the input
+    /// stream for another.
+    ///
+    /// This will reset the internal state of this decoder and replace the
+    /// input stream with the one provided, returning the previous input
+    /// stream. Future data read from this decoder will be the decompressed
+    /// version of `r`'s data.
+    ///
+    /// Note that there may be currently buffered data when this function is
+    /// called, and in that case the buffered data is discarded.
+    pub fn reset(&mut self, r: R) -> R {
+        super::bufread::reset_decoder_data(&mut self.inner);
+        self.inner.get_mut().reset(r)
+    }
+
+    /// Acquires a reference to the underlying stream
+    pub fn get_ref(&self) -> &R {
+        self.inner.get_ref().get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying stream
+    ///
+    /// Note that mutation of the stream may result in surprising results if
+    /// this encoder is continued to be used.
+    pub fn get_mut(&mut self) -> &mut R {
+        self.inner.get_mut().get_mut()
+    }
+
+    /// Consumes this decoder, returning the underlying reader.
+    ///
+    /// Note that there may be buffered bytes which are not re-acquired as part
+    /// of this transition. It's recommended to only call this function after
+    /// EOF has been reached.
+    pub fn into_inner(self) -> R {
+        self.inner.into_inner().into_inner()
+    }
+
+    /// Returns the number of bytes that the decompressor has consumed.
+    ///
+    /// Note that this will likely be smaller than what the decompressor
+    /// actually read from the underlying stream due to buffering.
+    pub fn total_in(&self) -> u64 {
+        self.inner.total_in()
+    }
+
+    /// Returns the number of bytes that the decompressor has produced.
+    pub fn total_out(&self) -> u64 {
+        self.inner.total_out()
+    }
+}
+
+impl<R: Read> Read for ZlibDecoder<R> {
+    fn read(&mut self, into: &mut [u8]) -> io::Result<usize> {
+        self.inner.read(into)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncRead> AsyncRead for ZlibDecoder<R> {}
+
+impl<R: Read + Write> Write for ZlibDecoder<R> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.get_mut().write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.get_mut().flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<R: AsyncWrite + AsyncRead> AsyncWrite for ZlibDecoder<R> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        self.get_mut().shutdown()
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/src/zlib/write.rs
@@ -0,0 +1,351 @@
+use std::io::prelude::*;
+use std::io;
+
+#[cfg(feature = "tokio")]
+use futures::Poll;
+#[cfg(feature = "tokio")]
+use tokio_io::{AsyncRead, AsyncWrite};
+
+use zio;
+use {Compress, Decompress};
+
+/// A ZLIB encoder, or compressor.
+///
+/// This structure implements a [`Write`] interface and takes a stream of
+/// uncompressed data, writing the compressed data to the wrapped writer.
+///
+/// [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use flate2::Compression;
+/// use flate2::write::ZlibEncoder;
+///
+/// // Vec<u8> implements Write, assigning the compressed bytes of sample string
+///
+/// # fn zlib_encoding() -> std::io::Result<()> {
+/// let mut e = ZlibEncoder::new(Vec::new(), Compression::Default);
+/// e.write(b"Hello World")?;
+/// let compressed = e.finish()?;
+/// # Ok(())
+/// # }
+/// ```
+#[derive(Debug)]
+pub struct ZlibEncoder<W: Write> {
+    inner: zio::Writer<W, Compress>,
+}
+
+
+impl<W: Write> ZlibEncoder<W> {
+    /// Creates a new encoder which will write compressed data to the stream
+    /// given at the given compression level.
+    ///
+    /// When this encoder is dropped or unwrapped the final pieces of data will
+    /// be flushed.
+    pub fn new(w: W, level: ::Compression) -> ZlibEncoder<W> {
+        ZlibEncoder {
+            inner: zio::Writer::new(w, Compress::new(level, true)),
+        }
+    }
+
+    /// Acquires a reference to the underlying writer.
+    pub fn get_ref(&self) -> &W {
+        self.inner.get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying writer.
+    ///
+    /// Note that mutating the output/input state of the stream may corrupt this
+    /// object, so care must be taken when using this method.
+    pub fn get_mut(&mut self) -> &mut W {
+        self.inner.get_mut()
+    }
+
+    /// Resets the state of this encoder entirely, swapping out the output
+    /// stream for another.
+    ///
+    /// This function will finish encoding the current stream into the current
+    /// output stream before swapping out the two output streams.
+    ///
+    /// After the current stream has been finished, this will reset the internal
+    /// state of this encoder and replace the output stream with the one
+    /// provided, returning the previous output stream. Future data written to
+    /// this encoder will be the compressed into the stream `w` provided.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn reset(&mut self, w: W) -> io::Result<W> {
+        try!(self.inner.finish());
+        self.inner.data.reset();
+        Ok(self.inner.replace(w))
+    }
+
+    /// Attempt to finish this output stream, writing out final chunks of data.
+    ///
+    /// Note that this function can only be used once data has finished being
+    /// written to the output stream. After this function is called then further
+    /// calls to `write` may result in a panic.
+    ///
+    /// # Panics
+    ///
+    /// Attempts to write data to this stream may result in a panic after this
+    /// function is called.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn try_finish(&mut self) -> io::Result<()> {
+        self.inner.finish()
+    }
+
+    /// Consumes this encoder, flushing the output stream.
+    ///
+    /// This will flush the underlying data stream, close off the compressed
+    /// stream and, if successful, return the contained writer.
+    ///
+    /// Note that this function may not be suitable to call in a situation where
+    /// the underlying stream is an asynchronous I/O stream. To finish a stream
+    /// the `try_finish` (or `shutdown`) method should be used instead. To
+    /// re-acquire ownership of a stream it is safe to call this method after
+    /// `try_finish` or `shutdown` has returned `Ok`.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn finish(mut self) -> io::Result<W> {
+        try!(self.inner.finish());
+        Ok(self.inner.take_inner())
+    }
+
+    /// Consumes this encoder, flushing the output stream.
+    ///
+    /// This will flush the underlying data stream and then return the contained
+    /// writer if the flush succeeded.
+    /// The compressed stream will not closed but only flushed. This
+    /// means that obtained byte array can by extended by another deflated
+    /// stream. To close the stream add the two bytes 0x3 and 0x0.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn flush_finish(mut self) -> io::Result<W> {
+        try!(self.inner.flush());
+        Ok(self.inner.take_inner())
+    }
+
+    /// Returns the number of bytes that have been written to this compresor.
+    ///
+    /// Note that not all bytes written to this object may be accounted for,
+    /// there may still be some active buffering.
+    pub fn total_in(&self) -> u64 {
+        self.inner.data.total_in()
+    }
+
+    /// Returns the number of bytes that the compressor has produced.
+    ///
+    /// Note that not all bytes may have been written yet, some may still be
+    /// buffered.
+    pub fn total_out(&self) -> u64 {
+        self.inner.data.total_out()
+    }
+}
+
+impl<W: Write> Write for ZlibEncoder<W> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.inner.write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.inner.flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<W: AsyncWrite> AsyncWrite for ZlibEncoder<W> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        try_nb!(self.try_finish());
+        self.get_mut().shutdown()
+    }
+}
+
+impl<W: Read + Write> Read for ZlibEncoder<W> {
+    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
+        self.get_mut().read(buf)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<W: AsyncRead + AsyncWrite> AsyncRead for ZlibEncoder<W> {}
+
+
+/// A ZLIB decoder, or decompressor.
+///
+/// This structure implements a [`Write`] and will emit a stream of decompressed
+/// data when fed a stream of compressed data.
+///
+/// [`Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
+///
+/// # Examples
+///
+/// ```
+/// use std::io::prelude::*;
+/// use std::io;
+/// # use flate2::Compression;
+/// # use flate2::write::ZlibEncoder;
+/// use flate2::write::ZlibDecoder;
+///
+/// # fn main() {
+/// #    let mut e = ZlibEncoder::new(Vec::new(), Compression::Default);
+/// #    e.write(b"Hello World").unwrap();
+/// #    let bytes = e.finish().unwrap();
+/// #    println!("{}", decode_reader(bytes).unwrap());
+/// # }
+/// #
+/// // Uncompresses a Zlib Encoded vector of bytes and returns a string or error
+/// // Here Vec<u8> implements Write
+///
+/// fn decode_reader(bytes: Vec<u8>) -> io::Result<String> {
+///    let mut writer = Vec::new();
+///    let mut z = ZlibDecoder::new(writer);
+///    z.write(&bytes[..])?;
+///    writer = z.finish()?;
+///    let return_string = String::from_utf8(writer).expect("String parsing error");
+///    Ok(return_string)
+/// }
+/// ```
+#[derive(Debug)]
+pub struct ZlibDecoder<W: Write> {
+    inner: zio::Writer<W, Decompress>,
+}
+
+
+impl<W: Write> ZlibDecoder<W> {
+    /// Creates a new decoder which will write uncompressed data to the stream.
+    ///
+    /// When this decoder is dropped or unwrapped the final pieces of data will
+    /// be flushed.
+    pub fn new(w: W) -> ZlibDecoder<W> {
+        ZlibDecoder {
+            inner: zio::Writer::new(w, Decompress::new(true)),
+        }
+    }
+
+    /// Acquires a reference to the underlying writer.
+    pub fn get_ref(&self) -> &W {
+        self.inner.get_ref()
+    }
+
+    /// Acquires a mutable reference to the underlying writer.
+    ///
+    /// Note that mutating the output/input state of the stream may corrupt this
+    /// object, so care must be taken when using this method.
+    pub fn get_mut(&mut self) -> &mut W {
+        self.inner.get_mut()
+    }
+
+    /// Resets the state of this decoder entirely, swapping out the output
+    /// stream for another.
+    ///
+    /// This will reset the internal state of this decoder and replace the
+    /// output stream with the one provided, returning the previous output
+    /// stream. Future data written to this decoder will be decompressed into
+    /// the output stream `w`.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn reset(&mut self, w: W) -> io::Result<W> {
+        try!(self.inner.finish());
+        self.inner.data = Decompress::new(true);
+        Ok(self.inner.replace(w))
+    }
+
+    /// Attempt to finish this output stream, writing out final chunks of data.
+    ///
+    /// Note that this function can only be used once data has finished being
+    /// written to the output stream. After this function is called then further
+    /// calls to `write` may result in a panic.
+    ///
+    /// # Panics
+    ///
+    /// Attempts to write data to this stream may result in a panic after this
+    /// function is called.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn try_finish(&mut self) -> io::Result<()> {
+        self.inner.finish()
+    }
+
+    /// Consumes this encoder, flushing the output stream.
+    ///
+    /// This will flush the underlying data stream and then return the contained
+    /// writer if the flush succeeded.
+    ///
+    /// Note that this function may not be suitable to call in a situation where
+    /// the underlying stream is an asynchronous I/O stream. To finish a stream
+    /// the `try_finish` (or `shutdown`) method should be used instead. To
+    /// re-acquire ownership of a stream it is safe to call this method after
+    /// `try_finish` or `shutdown` has returned `Ok`.
+    ///
+    /// # Errors
+    ///
+    /// This function will perform I/O to complete this stream, and any I/O
+    /// errors which occur will be returned from this function.
+    pub fn finish(mut self) -> io::Result<W> {
+        try!(self.inner.finish());
+        Ok(self.inner.take_inner())
+    }
+
+    /// Returns the number of bytes that the decompressor has consumed for
+    /// decompression.
+    ///
+    /// Note that this will likely be smaller than the number of bytes
+    /// successfully written to this stream due to internal buffering.
+    pub fn total_in(&self) -> u64 {
+        self.inner.data.total_in()
+    }
+
+    /// Returns the number of bytes that the decompressor has written to its
+    /// output stream.
+    pub fn total_out(&self) -> u64 {
+        self.inner.data.total_out()
+    }
+}
+
+impl<W: Write> Write for ZlibDecoder<W> {
+    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
+        self.inner.write(buf)
+    }
+
+    fn flush(&mut self) -> io::Result<()> {
+        self.inner.flush()
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<W: AsyncWrite> AsyncWrite for ZlibDecoder<W> {
+    fn shutdown(&mut self) -> Poll<(), io::Error> {
+        try_nb!(self.inner.finish());
+        self.inner.get_mut().shutdown()
+    }
+}
+
+impl<W: Read + Write> Read for ZlibDecoder<W> {
+    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
+        self.inner.get_mut().read(buf)
+    }
+}
+
+#[cfg(feature = "tokio")]
+impl<W: AsyncRead + AsyncWrite> AsyncRead for ZlibDecoder<W> {}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/tests/early-flush.rs
@@ -0,0 +1,20 @@
+extern crate flate2;
+
+use std::io::{Read, Write};
+
+use flate2::write::GzEncoder;
+use flate2::read::GzDecoder;
+
+#[test]
+fn smoke() {
+    let mut w = GzEncoder::new(Vec::new(), flate2::Compression::Default);
+    w.flush().unwrap();
+    w.write(b"hello").unwrap();
+
+    let bytes = w.finish().unwrap();
+
+    let mut r = GzDecoder::new(&bytes[..]).unwrap();
+    let mut s = String::new();
+    r.read_to_string(&mut s).unwrap();
+    assert_eq!(s, "hello");
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/flate2/tests/zero-write.rs
@@ -0,0 +1,8 @@
+extern crate flate2;
+
+#[test]
+fn zero_write_is_error() {
+    let mut buf = [0u8];
+    let writer = flate2::write::DeflateEncoder::new(&mut buf[..], flate2::Compression::Default);
+    assert!(writer.finish().is_err());
+}
deleted file mode 100644
--- a/third_party/rust/gcc-0.3.42/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"e68f9d10a8e367890cf734239c39952ee480cf0e8da9520b377df4a2b8ccc9e8","Cargo.toml":"4ae5b4d6f82bd2815ab930eada95a45905e64023d9d5442eebc52e348ae853be","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"ef945d1d641463da2a37f2743dcead1e8e928afbce0496f5d7682ac147327b85","appveyor.yml":"46c77d913eaa45871296942c2cd96ef092c9dcaf19201cb5c500a5107faeb06f","src/bin/gcc-shim.rs":"d6be9137cb48b86891e7b263adbf492e1193ffe682db9ba4a88eb1079b874b58","src/lib.rs":"28451f34b048a99fc17f0ef9a5f541efcf304dd36de589055d0d00f63561fb61","src/registry.rs":"3876ef9573e3bbc050aef41a684b9a510cc1a91b15ae874fe032cf4377b4d116","src/windows_registry.rs":"36c6a7f8322407faff2dcfd4789d0876d034885944bc0340ac7c1f7cbfc307f1","tests/cc_env.rs":"d92c5e3d3d43ac244e63b2cd2c93a521fcf124bf1ccf8d4c6bfa7f8333d88976","tests/support/mod.rs":"56bcfd1e2ff5ae8e581c71229444a3d96094bf689808808dd80e315bd6632083","tests/test.rs":"b63e74d571e7d585edc53693bcf0caae88fc040613ace91e32437d4a62cddb6a"},"package":"291055c78f59ca3d84c99026c9501c469413d386bb46be1e1cf1d285cd1db3b0"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/gcc-0.3.42/.travis.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-language: rust
-rust:
-  - stable
-  - beta
-  - nightly
-matrix:
-  include:
-    # Minimum version supported
-    - rust: 1.6.0
-      install:
-      script: cargo build
-
-sudo: false
-install:
-  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then OS=unknown-linux-gnu; else OS=apple-darwin; fi
-  - export TARGET=$ARCH-$OS
-  - curl https://static.rust-lang.org/rustup.sh |
-    sh -s -- --add-target=$TARGET --disable-sudo -y --prefix=`rustc --print sysroot`
-before_script:
-  - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
-script:
-  - cargo build --verbose
-  - cargo test --verbose
-  - cargo test --verbose --features parallel
-  - cargo test --manifest-path gcc-test/Cargo.toml --target $TARGET
-  - cargo test --manifest-path gcc-test/Cargo.toml --target $TARGET --features parallel
-  - cargo test --manifest-path gcc-test/Cargo.toml --target $TARGET --release
-  - cargo doc
-  - cargo clean && cargo build
-  - rustdoc --test README.md -L target/debug -L target/debug/deps
-after_success:
-  - travis-cargo --only nightly doc-upload
-env:
-  global:
-    secure: "CBtqrudgE0PS8x3kTr44jKbC2D4nfnmdYVecooNm0qnER4B4TSvZpZSQoCgKK6k4BYQuOSyFTOwYx6M79w39ZMOgyCP9ytB+tyMWL0/+ZuUQL04yVg4M5vd3oJMkOaXbvG56ncgPyFrseY+FPDg+mXAzvJk/nily37YXjkQj2D0="
-
-  matrix:
-    - ARCH=x86_64
-    - ARCH=i686
-notifications:
-  email:
-    on_success: never
-os:
-  - linux
-  - osx
-addons:
-  apt:
-    packages:
-      - g++-multilib
deleted file mode 100644
--- a/third_party/rust/gcc-0.3.42/Cargo.toml
+++ /dev/null
@@ -1,27 +0,0 @@
-[package]
-
-name = "gcc"
-version = "0.3.42"
-authors = ["Alex Crichton <alex@alexcrichton.com>"]
-license = "MIT/Apache-2.0"
-repository = "https://github.com/alexcrichton/gcc-rs"
-documentation = "https://docs.rs/gcc"
-description = """
-A build-time dependency for Cargo build scripts to assist in invoking the native
-C compiler to compile native C code into a static archive to be linked into Rust
-code.
-"""
-keywords = ["build-dependencies"]
-
-[badges]
-travis-ci = { repository = "alexcrichton/gcc-rs" }
-appveyor = { repository = "alexcrichton/gcc-rs" }
-
-[dependencies]
-rayon = { version = "0.6", optional = true }
-
-[features]
-parallel = ["rayon"]
-
-[dev-dependencies]
-tempdir = "0.3"
deleted file mode 100644
--- a/third_party/rust/gcc-0.3.42/README.md
+++ /dev/null
@@ -1,161 +0,0 @@
-# gcc-rs
-
-A library to compile C/C++ code into a Rust library/application.
-
-[![Build Status](https://travis-ci.org/alexcrichton/gcc-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/gcc-rs)
-[![Build status](https://ci.appveyor.com/api/projects/status/onu270iw98h81nwv?svg=true)](https://ci.appveyor.com/project/alexcrichton/gcc-rs)
-
-[Documentation](https://docs.rs/gcc)
-
-A simple library meant to be used as a build dependency with Cargo packages in
-order to build a set of C/C++ files into a static archive. Note that while this
-crate is called "gcc", it actually calls out to the most relevant compile for
-a platform, for example using `cl` on MSVC. That is, this crate does indeed work
-on MSVC!
-
-## Using gcc-rs
-
-First, you'll want to both add a build script for your crate (`build.rs`) and
-also add this crate to your `Cargo.toml` via:
-
-```toml
-[package]
-# ...
-build = "build.rs"
-
-[build-dependencies]
-gcc = "0.3"
-```
-
-Next up, you'll want to write a build script like so:
-
-```rust,no_run
-// build.rs
-
-extern crate gcc;
-
-fn main() {
-    gcc::compile_library("libfoo.a", &["foo.c", "bar.c"]);
-}
-```
-
-And that's it! Running `cargo build` should take care of the rest and your Rust
-application will now have the C files `foo.c` and `bar.c` compiled into it. You
-can call the functions in Rust by declaring functions in your Rust code like so:
-
-```
-extern {
-    fn foo_function();
-    fn bar_function();
-}
-
-pub fn call() {
-    unsafe {
-        foo_function();
-        bar_function();
-    }
-}
-
-fn main() {
-    // ...
-}
-```
-
-## External configuration via environment variables
-
-To control the programs and flags used for building, the builder can set a
-number of different environment variables.
-
-* `CFLAGS` - a series of space separated flags passed to "gcc". Note that
-             individual flags cannot currently contain spaces, so doing
-             something like: "-L=foo\ bar" is not possible.
-* `CC` - the actual C compiler used. Note that this is used as an exact
-         executable name, so (for example) no extra flags can be passed inside
-         this variable, and the builder must ensure that there aren't any
-         trailing spaces. This compiler must understand the `-c` flag. For
-         certain `TARGET`s, it also is assumed to know about other flags (most
-         common is `-fPIC`).
-* `AR` - the `ar` (archiver) executable to use to build the static library.
-
-Each of these variables can also be supplied with certain prefixes and suffixes,
-in the following prioritized order:
-
-1. `<var>_<target>` - for example, `CC_x86_64-unknown-linux-gnu`
-2. `<var>_<target_with_underscores>` - for example, `CC_x86_64_unknown_linux_gnu`
-3. `<build-kind>_<var>` - for example, `HOST_CC` or `TARGET_CFLAGS`
-4. `<var>` - a plain `CC`, `AR` as above.
-
-If none of these variables exist, gcc-rs uses built-in defaults
-
-In addition to the the above optional environment variables, `gcc-rs` has some
-functions with hard requirements on some variables supplied by [cargo's
-build-script driver][cargo] that it has the `TARGET`, `OUT_DIR`, `OPT_LEVEL`,
-and `HOST` variables.
-
-[cargo]: http://doc.crates.io/build-script.html#inputs-to-the-build-script
-
-## Optional features
-
-Currently gcc-rs supports parallel compilation (think `make -jN`) but this
-feature is turned off by default. To enable gcc-rs to compile C/C++ in parallel,
-you can change your dependency to:
-
-```toml
-[build-dependencies]
-gcc = { version = "0.3", features = ["parallel"] }
-```
-
-By default gcc-rs will limit parallelism to `$NUM_JOBS`, or if not present it
-will limit it to the number of cpus on the machine.
-
-## Compile-time Requirements
-
-To work properly this crate needs access to a C compiler when the build script
-is being run. This crate does not ship a C compiler with it. The compiler
-required varies per platform, but there are three broad categories:
-
-* Unix platforms require `cc` to be the C compiler. This can be found by
-  installing gcc/clang on Linux distributions and Xcode on OSX, for example.
-* Windows platforms targeting MSVC (e.g. your target triple ends in `-msvc`)
-  require `cl.exe` to be available and in `PATH`. This is typically found in
-  standard Visual Studio installations and the `PATH` can be set up by running
-  the appropriate developer tools shell.
-* Windows platforms targeting MinGW (e.g. your target triple ends in `-gnu`)
-  require `gcc` to be available in `PATH`. We recommend the
-  [MinGW-w64](http://mingw-w64.org) distribution, which is using the
-  [Win-builds](http://win-builds.org) installation system.
-  You may also acquire it via
-  [MSYS2](http://msys2.github.io), as explained [here][msys2-help].  Make sure
-  to install the appropriate architecture corresponding to your installation of
-  rustc. GCC from older [MinGW](http://www.mingw.org) project is compatible
-  only with 32-bit rust compiler.
-
-[msys2-help]: http://github.com/rust-lang/rust#building-on-windows
-
-## C++ support
-
-`gcc-rs` supports C++ libraries compilation by using the `cpp` method on
-`Config`:
-
-```rust,no_run
-extern crate gcc;
-
-fn main() {
-    gcc::Config::new()
-        .cpp(true) // Switch to C++ library compilation.
-        .file("foo.cpp")
-        .compile("libfoo.a");
-}
-```
-
-When using C++ library compilation switch, the `CXX` and `CXXFLAGS` env
-variables are used instead of `CC` and `CFLAGS` and the C++ standard library is
-linked to the crate target.
-
-## License
-
-`gcc-rs` is primarily distributed under the terms of both the MIT license and
-the Apache License (Version 2.0), with portions covered by various BSD-like
-licenses.
-
-See LICENSE-APACHE, and LICENSE-MIT for details.
deleted file mode 100644
--- a/third_party/rust/gcc-0.3.42/appveyor.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-environment:
-  matrix:
-  - TARGET: x86_64-pc-windows-msvc
-    ARCH: amd64
-    VS: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
-  - TARGET: x86_64-pc-windows-msvc
-    ARCH: amd64
-    VS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
-  - TARGET: i686-pc-windows-msvc
-    ARCH: x86
-    VS: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat
-  - TARGET: i686-pc-windows-msvc
-    ARCH: x86
-    VS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat
-  - TARGET: x86_64-pc-windows-gnu
-    MSYS_BITS: 64
-  - TARGET: i686-pc-windows-gnu
-    MSYS_BITS: 32
-install:
-  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
-  - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
-  - if defined VS call "%VS%" %ARCH%
-  - set PATH=%PATH%;C:\Program Files (x86)\Rust\bin
-  - if defined MSYS_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS_BITS%\bin
-  - rustc -V
-  - cargo -V
-
-build: false
-
-test_script:
-  - cargo test --target %TARGET%
-  - cargo test --features parallel --target %TARGET%
-  - cargo test --manifest-path gcc-test/Cargo.toml --target %TARGET%
-  - cargo test --manifest-path gcc-test/Cargo.toml --features parallel --target %TARGET%
-  - cargo test --manifest-path gcc-test/Cargo.toml --release --target %TARGET%
deleted file mode 100644
--- a/third_party/rust/gcc-0.3.42/src/lib.rs
+++ /dev/null
@@ -1,1128 +0,0 @@
-//! A library for build scripts to compile custom C code
-//!
-//! This library is intended to be used as a `build-dependencies` entry in
-//! `Cargo.toml`:
-//!
-//! ```toml
-//! [build-dependencies]
-//! gcc = "0.3"
-//! ```
-//!
-//! The purpose of this crate is to provide the utility functions necessary to
-//! compile C code into a static archive which is then linked into a Rust crate.
-//! The top-level `compile_library` function serves as a convenience and more
-//! advanced configuration is available through the `Config` builder.
-//!
-//! This crate will automatically detect situations such as cross compilation or
-//! other environment variables set by Cargo and will build code appropriately.
-//!
-//! # Examples
-//!
-//! Use the default configuration:
-//!
-//! ```no_run
-//! extern crate gcc;
-//!
-//! fn main() {
-//!     gcc::compile_library("libfoo.a", &["src/foo.c"]);
-//! }
-//! ```
-//!
-//! Use more advanced configuration:
-//!
-//! ```no_run
-//! extern crate gcc;
-//!
-//! fn main() {
-//!     gcc::Config::new()
-//!                 .file("src/foo.c")
-//!                 .define("FOO", Some("bar"))
-//!                 .include("src")
-//!                 .compile("libfoo.a");
-//! }
-//! ```
-
-#![doc(html_root_url = "https://docs.rs/gcc/0.3")]
-#![cfg_attr(test, deny(warnings))]
-#![deny(missing_docs)]
-
-#[cfg(feature = "parallel")]
-extern crate rayon;
-
-use std::env;
-use std::ffi::{OsString, OsStr};
-use std::fs;
-use std::path::{PathBuf, Path};
-use std::process::{Command, Stdio};
-use std::io::{self, BufReader, BufRead, Read, Write};
-use std::thread;
-
-#[cfg(windows)]
-mod registry;
-pub mod windows_registry;
-
-/// Extra configuration to pass to gcc.
-pub struct Config {
-    include_directories: Vec<PathBuf>,
-    definitions: Vec<(String, Option<String>)>,
-    objects: Vec<PathBuf>,
-    flags: Vec<String>,
-    files: Vec<PathBuf>,
-    cpp: bool,
-    cpp_link_stdlib: Option<Option<String>>,
-    cpp_set_stdlib: Option<String>,
-    target: Option<String>,
-    host: Option<String>,
-    out_dir: Option<PathBuf>,
-    opt_level: Option<String>,
-    debug: Option<bool>,
-    env: Vec<(OsString, OsString)>,
-    compiler: Option<PathBuf>,
-    archiver: Option<PathBuf>,
-    cargo_metadata: bool,
-    pic: Option<bool>,
-}
-
-/// Configuration used to represent an invocation of a C compiler.
-///
-/// This can be used to figure out what compiler is in use, what the arguments
-/// to it are, and what the environment variables look like for the compiler.
-/// This can be used to further configure other build systems (e.g. forward
-/// along CC and/or CFLAGS) or the `to_command` method can be used to run the
-/// compiler itself.
-pub struct Tool {
-    path: PathBuf,
-    args: Vec<OsString>,
-    env: Vec<(OsString, OsString)>,
-    family: ToolFamily
-}
-
-/// Represents the family of tools this tool belongs to.
-///
-/// Each family of tools differs in how and what arguments they accept.
-///
-/// Detection of a family is done on best-effort basis and may not accurately reflect the tool.
-#[derive(Copy, Clone, Debug)]
-enum ToolFamily {
-    /// Tool is GNU Compiler Collection-like.
-    Gnu,
-    /// Tool is Clang-like. It differs from the GCC in a sense that it accepts superset of flags
-    /// and its cross-compilation approach is different.
-    Clang,
-    /// Tool is the MSVC cl.exe.
-    Msvc,
-}
-
-impl ToolFamily {
-    /// What the flag to request debug info for this family of tools look like
-    fn debug_flag(&self) -> &'static str {
-        match *self {
-            ToolFamily::Msvc => "/Z7",
-            ToolFamily::Gnu |
-            ToolFamily::Clang => "-g",
-        }
-    }
-
-    /// What the flag to include directories into header search path looks like
-    fn include_flag(&self) -> &'static str {
-        match *self {
-            ToolFamily::Msvc => "/I",
-            ToolFamily::Gnu |
-            ToolFamily::Clang => "-I",
-        }
-    }
-
-    /// What the flag to request macro-expanded source output looks like
-    fn expand_flag(&self) -> &'static str {
-        match *self {
-            ToolFamily::Msvc => "/E",
-            ToolFamily::Gnu |
-            ToolFamily::Clang => "-E",
-        }
-    }
-}
-
-/// Compile a library from the given set of input C files.
-///
-/// This will simply compile all files into object files and then assemble them
-/// into the output. This will read the standard environment variables to detect
-/// cross compilations and such.
-///
-/// This function will also print all metadata on standard output for Cargo.
-///
-/// # Example
-///
-/// ```no_run
-/// gcc::compile_library("libfoo.a", &["foo.c", "bar.c"]);
-/// ```
-pub fn compile_library(output: &str, files: &[&str]) {
-    let mut c = Config::new();
-    for f in files.iter() {
-        c.file(*f);
-    }
-    c.compile(output);
-}
-
-impl Config {
-    /// Construct a new instance of a blank set of configuration.
-    ///
-    /// This builder is finished with the `compile` function.
-    pub fn new() -> Config {
-        Config {
-            include_directories: Vec::new(),
-            definitions: Vec::new(),
-            objects: Vec::new(),
-            flags: Vec::new(),
-            files: Vec::new(),
-            cpp: false,
-            cpp_link_stdlib: None,
-            cpp_set_stdlib: None,
-            target: None,
-            host: None,
-            out_dir: None,
-            opt_level: None,
-            debug: None,
-            env: Vec::new(),
-            compiler: None,
-            archiver: None,
-            cargo_metadata: true,
-            pic: None,
-        }
-    }
-
-    /// Add a directory to the `-I` or include path for headers
-    pub fn include<P: AsRef<Path>>(&mut self, dir: P) -> &mut Config {
-        self.include_directories.push(dir.as_ref().to_path_buf());
-        self
-    }
-
-    /// Specify a `-D` variable with an optional value.
-    pub fn define(&mut self, var: &str, val: Option<&str>) -> &mut Config {
-        self.definitions.push((var.to_string(), val.map(|s| s.to_string())));
-        self
-    }
-
-    /// Add an arbitrary object file to link in
-    pub fn object<P: AsRef<Path>>(&mut self, obj: P) -> &mut Config {
-        self.objects.push(obj.as_ref().to_path_buf());
-        self
-    }
-
-    /// Add an arbitrary flag to the invocation of the compiler
-    pub fn flag(&mut self, flag: &str) -> &mut Config {
-        self.flags.push(flag.to_string());
-        self
-    }
-
-    /// Add a file which will be compiled
-    pub fn file<P: AsRef<Path>>(&mut self, p: P) -> &mut Config {
-        self.files.push(p.as_ref().to_path_buf());
-        self
-    }
-
-    /// Set C++ support.
-    ///
-    /// The other `cpp_*` options will only become active if this is set to
-    /// `true`.
-    pub fn cpp(&mut self, cpp: bool) -> &mut Config {
-        self.cpp = cpp;
-        self
-    }
-
-    /// Set the standard library to link against when compiling with C++
-    /// support.
-    ///
-    /// The default value of this property depends on the current target: On
-    /// OS X `Some("c++")` is used, when compiling for a Visual Studio based
-    /// target `None` is used and for other targets `Some("stdc++")` is used.
-    ///
-    /// A value of `None` indicates that no automatic linking should happen,
-    /// otherwise cargo will link against the specified library.
-    ///
-    /// The given library name must not contain the `lib` prefix.
-    pub fn cpp_link_stdlib(&mut self, cpp_link_stdlib: Option<&str>) -> &mut Config {
-        self.cpp_link_stdlib = Some(cpp_link_stdlib.map(|s| s.into()));
-        self
-    }
-
-    /// Force the C++ compiler to use the specified standard library.
-    ///
-    /// Setting this option will automatically set `cpp_link_stdlib` to the same
-    /// value.
-    ///
-    /// The default value of this option is always `None`.
-    ///
-    /// This option has no effect when compiling for a Visual Studio based
-    /// target.
-    ///
-    /// This option sets the `-stdlib` flag, which is only supported by some
-    /// compilers (clang, icc) but not by others (gcc). The library will not
-    /// detect which compiler is used, as such it is the responsibility of the
-    /// caller to ensure that this option is only used in conjuction with a
-    /// compiler which supports the `-stdlib` flag.
-    ///
-    /// A value of `None` indicates that no specific C++ standard library should
-    /// be used, otherwise `-stdlib` is added to the compile invocation.
-    ///
-    /// The given library name must not contain the `lib` prefix.
-    pub fn cpp_set_stdlib(&mut self, cpp_set_stdlib: Option<&str>) -> &mut Config {
-        self.cpp_set_stdlib = cpp_set_stdlib.map(|s| s.into());
-        self.cpp_link_stdlib(cpp_set_stdlib);
-        self
-    }
-
-    /// Configures the target this configuration will be compiling for.
-    ///
-    /// This option is automatically scraped from the `TARGET` environment
-    /// variable by build scripts, so it's not required to call this function.
-    pub fn target(&mut self, target: &str) -> &mut Config {
-        self.target = Some(target.to_string());
-        self
-    }
-
-    /// Configures the host assumed by this configuration.
-    ///
-    /// This option is automatically scraped from the `HOST` environment
-    /// variable by build scripts, so it's not required to call this function.
-    pub fn host(&mut self, host: &str) -> &mut Config {
-        self.host = Some(host.to_string());
-        self
-    }
-
-    /// Configures the optimization level of the generated object files.
-    ///
-    /// This option is automatically scraped from the `OPT_LEVEL` environment
-    /// variable by build scripts, so it's not required to call this function.
-    pub fn opt_level(&mut self, opt_level: u32) -> &mut Config {
-        self.opt_level = Some(opt_level.to_string());
-        self
-    }
-
-    /// Configures the optimization level of the generated object files.
-    ///
-    /// This option is automatically scraped from the `OPT_LEVEL` environment
-    /// variable by build scripts, so it's not required to call this function.
-    pub fn opt_level_str(&mut self, opt_level: &str) -> &mut Config {
-        self.opt_level = Some(opt_level.to_string());
-        self
-    }
-
-    /// Configures whether the compiler will emit debug information when
-    /// generating object files.
-    ///
-    /// This option is automatically scraped from the `PROFILE` environment
-    /// variable by build scripts (only enabled when the profile is "debug"), so
-    /// it's not required to call this function.
-    pub fn debug(&mut self, debug: bool) -> &mut Config {
-        self.debug = Some(debug);
-        self
-    }
-
-    /// Configures the output directory where all object files and static
-    /// libraries will be located.
-    ///
-    /// This option is automatically scraped from the `OUT_DIR` environment
-    /// variable by build scripts, so it's not required to call this function.
-    pub fn out_dir<P: AsRef<Path>>(&mut self, out_dir: P) -> &mut Config {
-        self.out_dir = Some(out_dir.as_ref().to_owned());
-        self
-    }
-
-    /// Configures the compiler to be used to produce output.
-    ///
-    /// This option is automatically determined from the target platform or a
-    /// number of environment variables, so it's not required to call this
-    /// function.
-    pub fn compiler<P: AsRef<Path>>(&mut self, compiler: P) -> &mut Config {
-        self.compiler = Some(compiler.as_ref().to_owned());
-        self
-    }
-
-    /// Configures the tool used to assemble archives.
-    ///
-    /// This option is automatically determined from the target platform or a
-    /// number of environment variables, so it's not required to call this
-    /// function.
-    pub fn archiver<P: AsRef<Path>>(&mut self, archiver: P) -> &mut Config {
-        self.archiver = Some(archiver.as_ref().to_owned());
-        self
-    }
-    /// Define whether metadata should be emitted for cargo allowing it to
-    /// automatically link the binary. Defaults to `true`.
-    pub fn cargo_metadata(&mut self, cargo_metadata: bool) -> &mut Config {
-        self.cargo_metadata = cargo_metadata;
-        self
-    }
-
-    /// Configures whether the compiler will emit position independent code.
-    ///
-    /// This option defaults to `false` for `i686` and `windows-gnu` targets and to `true` for all
-    /// other targets.
-    pub fn pic(&mut self, pic: bool) -> &mut Config {
-        self.pic = Some(pic);
-        self
-    }
-
-
-    #[doc(hidden)]
-    pub fn __set_env<A, B>(&mut self, a: A, b: B) -> &mut Config
-        where A: AsRef<OsStr>,
-              B: AsRef<OsStr>
-    {
-        self.env.push((a.as_ref().to_owned(), b.as_ref().to_owned()));
-        self
-    }
-
-    /// Run the compiler, generating the file `output`
-    ///
-    /// The name `output` must begin with `lib` and end with `.a`
-    pub fn compile(&self, output: &str) {
-        assert!(output.starts_with("lib"));
-        assert!(output.ends_with(".a"));
-        let lib_name = &output[3..output.len() - 2];
-        let dst = self.get_out_dir();
-
-        let mut objects = Vec::new();
-        let mut src_dst = Vec::new();
-        for file in self.files.iter() {
-            let obj = dst.join(file).with_extension("o");
-            let obj = if !obj.starts_with(&dst) {
-                dst.join(obj.file_name().unwrap())
-            } else {
-                obj
-            };
-            fs::create_dir_all(&obj.parent().unwrap()).unwrap();
-            src_dst.push((file.to_path_buf(), obj.clone()));
-            objects.push(obj);
-        }
-        self.compile_objects(&src_dst);
-        self.assemble(lib_name, &dst.join(output), &objects);
-
-        if self.get_target().contains("msvc") {
-            let compiler = self.get_base_compiler();
-            let atlmfc_lib = compiler.env()
-                .iter()
-                .find(|&&(ref var, _)| var.as_os_str() == OsStr::new("LIB"))
-                .and_then(|&(_, ref lib_paths)| {
-                    env::split_paths(lib_paths).find(|path| {
-                        let sub = Path::new("atlmfc/lib");
-                        path.ends_with(sub) || path.parent().map_or(false, |p| p.ends_with(sub))
-                    })
-                });
-
-            if let Some(atlmfc_lib) = atlmfc_lib {
-                self.print(&format!("cargo:rustc-link-search=native={}", atlmfc_lib.display()));
-            }
-        }
-
-        self.print(&format!("cargo:rustc-link-lib=static={}",
-                            &output[3..output.len() - 2]));
-        self.print(&format!("cargo:rustc-link-search=native={}", dst.display()));
-
-        // Add specific C++ libraries, if enabled.
-        if self.cpp {
-            if let Some(stdlib) = self.get_cpp_link_stdlib() {
-                self.print(&format!("cargo:rustc-link-lib={}", stdlib));
-            }
-        }
-    }
-
-    #[cfg(feature = "parallel")]
-    fn compile_objects(&self, objs: &[(PathBuf, PathBuf)]) {
-        use self::rayon::prelude::*;
-
-        let mut cfg = rayon::Configuration::new();
-        if let Ok(amt) = env::var("NUM_JOBS") {
-            if let Ok(amt) = amt.parse() {
-                cfg = cfg.set_num_threads(amt);
-            }
-        }
-        drop(rayon::initialize(cfg));
-
-        objs.par_iter().weight_max().for_each(|&(ref src, ref dst)| self.compile_object(src, dst));
-    }
-
-    #[cfg(not(feature = "parallel"))]
-    fn compile_objects(&self, objs: &[(PathBuf, PathBuf)]) {
-        for &(ref src, ref dst) in objs {
-            self.compile_object(src, dst);
-        }
-    }
-
-    fn compile_object(&self, file: &Path, dst: &Path) {
-        let is_asm = file.extension().and_then(|s| s.to_str()) == Some("asm");
-        let msvc = self.get_target().contains("msvc");
-        let (mut cmd, name) = if msvc && is_asm {
-            self.msvc_macro_assembler()
-        } else {
-            let compiler = self.get_compiler();
-            let mut cmd = compiler.to_command();
-            for &(ref a, ref b) in self.env.iter() {
-                cmd.env(a, b);
-            }
-            (cmd,
-             compiler.path
-                 .file_name()
-                 .unwrap()
-                 .to_string_lossy()
-                 .into_owned())
-        };
-        if msvc && is_asm {
-            cmd.arg("/Fo").arg(dst);
-        } else if msvc {
-            let mut s = OsString::from("/Fo");
-            s.push(&dst);
-            cmd.arg(s);
-        } else {
-            cmd.arg("-o").arg(&dst);
-        }
-        cmd.arg(if msvc { "/c" } else { "-c" });
-        cmd.arg(file);
-
-        run(&mut cmd, &name);
-    }
-
-    /// Run the compiler, returning the macro-expanded version of the input files.
-    ///
-    /// This is only relevant for C and C++ files.
-    pub fn expand(&self) -> Vec<u8> {
-        let compiler = self.get_compiler();
-        let mut cmd = compiler.to_command();
-        for &(ref a, ref b) in self.env.iter() {
-            cmd.env(a, b);
-        }
-        cmd.arg(compiler.family.expand_flag());
-        for file in self.files.iter() {
-            cmd.arg(file);
-        }
-
-        let name = compiler.path
-            .file_name()
-            .unwrap()
-            .to_string_lossy()
-            .into_owned();
-
-        run(&mut cmd, &name)
-    }
-
-    /// Get the compiler that's in use for this configuration.
-    ///
-    /// This function will return a `Tool` which represents the culmination
-    /// of this configuration at a snapshot in time. The returned compiler can
-    /// be inspected (e.g. the path, arguments, environment) to forward along to
-    /// other tools, or the `to_command` method can be used to invoke the
-    /// compiler itself.
-    ///
-    /// This method will take into account all configuration such as debug
-    /// information, optimization level, include directories, defines, etc.
-    /// Additionally, the compiler binary in use follows the standard
-    /// conventions for this path, e.g. looking at the explicitly set compiler,
-    /// environment variables (a number of which are inspected here), and then
-    /// falling back to the default configuration.
-    pub fn get_compiler(&self) -> Tool {
-        let opt_level = self.get_opt_level();
-        let target = self.get_target();
-
-        let mut cmd = self.get_base_compiler();
-        let nvcc = cmd.path.file_name()
-            .and_then(|p| p.to_str()).map(|p| p.contains("nvcc"))
-            .unwrap_or(false);
-
-        // Non-target flags
-        // If the flag is not conditioned on target variable, it belongs here :)
-        match cmd.family {
-            ToolFamily::Msvc => {
-                cmd.args.push("/nologo".into());
-                let features = env::var("CARGO_CFG_TARGET_FEATURE")
-                                  .unwrap_or(String::new());
-                if features.contains("crt-static") {
-                    cmd.args.push("/MT".into());
-                } else {
-                    cmd.args.push("/MD".into());
-                }
-                match &opt_level[..] {
-                    "z" | "s" => cmd.args.push("/Os".into()),
-                    "1" => cmd.args.push("/O1".into()),
-                    // -O3 is a valid value for gcc and clang compilers, but not msvc. Cap to /O2.
-                    "2" | "3" => cmd.args.push("/O2".into()),
-                    _ => {}
-                }
-            }
-            ToolFamily::Gnu |
-            ToolFamily::Clang => {
-                cmd.args.push(format!("-O{}", opt_level).into());
-                if !nvcc {
-                    cmd.args.push("-ffunction-sections".into());
-                    cmd.args.push("-fdata-sections".into());
-                    if self.pic.unwrap_or(!target.contains("i686") &&
-                                          !target.contains("windows-gnu")) {
-                        cmd.args.push("-fPIC".into());
-                    }
-                } else if self.pic.unwrap_or(false) {
-                    cmd.args.push("-Xcompiler".into());
-                    cmd.args.push("\'-fPIC\'".into());
-                }
-            }
-        }
-        for arg in self.envflags(if self.cpp {"CXXFLAGS"} else {"CFLAGS"}) {
-            cmd.args.push(arg.into());
-        }
-
-        if self.get_debug() {
-            cmd.args.push(cmd.family.debug_flag().into());
-        }
-
-        // Target flags
-        match cmd.family {
-            ToolFamily::Clang => {
-                cmd.args.push(format!("--target={}", target).into());
-            }
-            ToolFamily::Msvc => {
-                if target.contains("i586") {
-                    cmd.args.push("/ARCH:IA32".into());
-                }
-            }
-            ToolFamily::Gnu => {
-                if target.contains("i686") || target.contains("i586") {
-                    cmd.args.push("-m32".into());
-                } else if target.contains("x86_64") || target.contains("powerpc64") {
-                    cmd.args.push("-m64".into());
-                }
-
-                if target.contains("musl") {
-                    cmd.args.push("-static".into());
-                }
-
-                // armv7 targets get to use armv7 instructions
-                if target.starts_with("armv7-unknown-linux-") {
-                    cmd.args.push("-march=armv7-a".into());
-                }
-
-                // On android we can guarantee some extra float instructions
-                // (specified in the android spec online)
-                if target.starts_with("armv7-linux-androideabi") {
-                    cmd.args.push("-march=armv7-a".into());
-                    cmd.args.push("-mfpu=vfpv3-d16".into());
-                }
-
-                // For us arm == armv6 by default
-                if target.starts_with("arm-unknown-linux-") {
-                    cmd.args.push("-march=armv6".into());
-                    cmd.args.push("-marm".into());
-                }
-
-                // Turn codegen down on i586 to avoid some instructions.
-                if target.starts_with("i586-unknown-linux-") {
-                    cmd.args.push("-march=pentium".into());
-                }
-
-                // Set codegen level for i686 correctly
-                if target.starts_with("i686-unknown-linux-") {
-                    cmd.args.push("-march=i686".into());
-                }
-
-                // Looks like `musl-gcc` makes is hard for `-m32` to make its way
-                // all the way to the linker, so we need to actually instruct the
-                // linker that we're generating 32-bit executables as well. This'll
-                // typically only be used for build scripts which transitively use
-                // these flags that try to compile executables.
-                if target == "i686-unknown-linux-musl" {
-                    cmd.args.push("-Wl,-melf_i386".into());
-                }
-
-                if target.starts_with("thumb") {
-                    cmd.args.push("-mthumb".into());
-
-                    if target.ends_with("eabihf") {
-                        cmd.args.push("-mfloat-abi=hard".into())
-                    }
-                }
-                if target.starts_with("thumbv6m") {
-                    cmd.args.push("-march=armv6s-m".into());
-                }
-                if target.starts_with("thumbv7em") {
-                    cmd.args.push("-march=armv7e-m".into());
-
-                    if target.ends_with("eabihf") {
-                        cmd.args.push("-mfpu=fpv4-sp-d16".into())
-                    }
-                }
-                if target.starts_with("thumbv7m") {
-                    cmd.args.push("-march=armv7-m".into());
-                }
-            }
-        }
-
-        if target.contains("-ios") {
-            // FIXME: potential bug. iOS is always compiled with Clang, but Gcc compiler may be
-            // detected instead.
-            self.ios_flags(&mut cmd);
-        }
-
-        if self.cpp {
-            match (self.cpp_set_stdlib.as_ref(), cmd.family) {
-                (Some(stdlib), ToolFamily::Gnu) |
-                (Some(stdlib), ToolFamily::Clang) => {
-                    cmd.args.push(format!("-stdlib=lib{}", stdlib).into());
-                }
-                _ => {
-                    println!("cargo:warning=cpp_set_stdlib is specified, but the {:?} compiler \
-                              does not support this option, ignored", cmd.family);
-                }
-            }
-        }
-
-        for directory in self.include_directories.iter() {
-            cmd.args.push(cmd.family.include_flag().into());
-            cmd.args.push(directory.into());
-        }
-
-        for flag in self.flags.iter() {
-            cmd.args.push(flag.into());
-        }
-
-        for &(ref key, ref value) in self.definitions.iter() {
-            let lead = if let ToolFamily::Msvc = cmd.family {"/"} else {"-"};
-            if let &Some(ref value) = value {
-                cmd.args.push(format!("{}D{}={}", lead, key, value).into());
-            } else {
-                cmd.args.push(format!("{}D{}", lead, key).into());
-            }
-        }
-        cmd
-    }
-
-    fn msvc_macro_assembler(&self) -> (Command, String) {
-        let target = self.get_target();
-        let tool = if target.contains("x86_64") {
-            "ml64.exe"
-        } else {
-            "ml.exe"
-        };
-        let mut cmd = windows_registry::find(&target, tool).unwrap_or_else(|| self.cmd(tool));
-        for directory in self.include_directories.iter() {
-            cmd.arg("/I").arg(directory);
-        }
-        for &(ref key, ref value) in self.definitions.iter() {
-            if let &Some(ref value) = value {
-                cmd.arg(&format!("/D{}={}", key, value));
-            } else {
-                cmd.arg(&format!("/D{}", key));
-            }
-        }
-
-        if target.contains("i686") || target.contains("i586") {
-            cmd.arg("/safeseh");
-        }
-        for flag in self.flags.iter() {
-            cmd.arg(flag);
-        }
-
-        (cmd, tool.to_string())
-    }
-
-    fn assemble(&self, lib_name: &str, dst: &Path, objects: &[PathBuf]) {
-        // Delete the destination if it exists as the `ar` tool at least on Unix
-        // appends to it, which we don't want.
-        let _ = fs::remove_file(&dst);
-
-        let target = self.get_target();
-        if target.contains("msvc") {
-            let mut cmd = match self.archiver {
-                Some(ref s) => self.cmd(s),
-                None => windows_registry::find(&target, "lib.exe").unwrap_or(self.cmd("lib.exe")),
-            };
-            let mut out = OsString::from("/OUT:");
-            out.push(dst);
-            run(cmd.arg(out)
-                    .arg("/nologo")
-                    .args(objects)
-                    .args(&self.objects),
-                "lib.exe");
-
-            // The Rust compiler will look for libfoo.a and foo.lib, but the
-            // MSVC linker will also be passed foo.lib, so be sure that both
-            // exist for now.
-            let lib_dst = dst.with_file_name(format!("{}.lib", lib_name));
-            let _ = fs::remove_file(&lib_dst);
-            fs::hard_link(&dst, &lib_dst)
-                .or_else(|_| {
-                    // if hard-link fails, just copy (ignoring the number of bytes written)
-                    fs::copy(&dst, &lib_dst).map(|_| ())
-                })
-                .ok()
-                .expect("Copying from {:?} to {:?} failed.");;
-        } else {
-            let ar = self.get_ar();
-            let cmd = ar.file_name().unwrap().to_string_lossy();
-            run(self.cmd(&ar)
-                    .arg("crs")
-                    .arg(dst)
-                    .args(objects)
-                    .args(&self.objects),
-                &cmd);
-        }
-    }
-
-    fn ios_flags(&self, cmd: &mut Tool) {
-        enum ArchSpec {
-            Device(&'static str),
-            Simulator(&'static str),
-        }
-
-        let target = self.get_target();
-        let arch = target.split('-').nth(0).unwrap();
-        let arch = match arch {
-            "arm" | "armv7" | "thumbv7" => ArchSpec::Device("armv7"),
-            "armv7s" | "thumbv7s" => ArchSpec::Device("armv7s"),
-            "arm64" | "aarch64" => ArchSpec::Device("arm64"),
-            "i386" | "i686" => ArchSpec::Simulator("-m32"),
-            "x86_64" => ArchSpec::Simulator("-m64"),
-            _ => fail("Unknown arch for iOS target"),
-        };
-
-        let sdk = match arch {
-            ArchSpec::Device(arch) => {
-                cmd.args.push("-arch".into());
-                cmd.args.push(arch.into());
-                cmd.args.push("-miphoneos-version-min=7.0".into());
-                "iphoneos"
-            }
-            ArchSpec::Simulator(arch) => {
-                cmd.args.push(arch.into());
-                cmd.args.push("-mios-simulator-version-min=7.0".into());
-                "iphonesimulator"
-            }
-        };
-
-        self.print(&format!("Detecting iOS SDK path for {}", sdk));
-        let sdk_path = self.cmd("xcrun")
-            .arg("--show-sdk-path")
-            .arg("--sdk")
-            .arg(sdk)
-            .stderr(Stdio::inherit())
-            .output()
-            .unwrap()
-            .stdout;
-
-        let sdk_path = String::from_utf8(sdk_path).unwrap();
-
-        cmd.args.push("-isysroot".into());
-        cmd.args.push(sdk_path.trim().into());
-    }
-
-    fn cmd<P: AsRef<OsStr>>(&self, prog: P) -> Command {
-        let mut cmd = Command::new(prog);
-        for &(ref a, ref b) in self.env.iter() {
-            cmd.env(a, b);
-        }
-        return cmd;
-    }
-
-    fn get_base_compiler(&self) -> Tool {
-        if let Some(ref c) = self.compiler {
-            return Tool::new(c.clone());
-        }
-        let host = self.get_host();
-        let target = self.get_target();
-        let (env, msvc, gnu, default) = if self.cpp {
-            ("CXX", "cl.exe", "g++", "c++")
-        } else {
-            ("CC", "cl.exe", "gcc", "cc")
-        };
-        self.env_tool(env)
-            .map(|(tool, args)| {
-                let mut t = Tool::new(PathBuf::from(tool));
-                for arg in args {
-                    t.args.push(arg.into());
-                }
-                return t;
-            })
-            .or_else(|| {
-                if target.contains("emscripten") {
-                    if self.cpp {
-                        Some(Tool::new(PathBuf::from("em++")))
-                    } else {
-                        Some(Tool::new(PathBuf::from("emcc")))
-                    }
-                } else {
-                    None
-                }
-            })
-            .or_else(|| windows_registry::find_tool(&target, "cl.exe"))
-            .unwrap_or_else(|| {
-                let compiler = if host.contains("windows") && target.contains("windows") {
-                    if target.contains("msvc") {
-                        msvc.to_string()
-                    } else {
-                        format!("{}.exe", gnu)
-                    }
-                } else if target.contains("android") {
-                    format!("{}-{}", target.replace("armv7", "arm"), gnu)
-                } else if self.get_host() != target {
-                    // CROSS_COMPILE is of the form: "arm-linux-gnueabi-"
-                    let cc_env = self.getenv("CROSS_COMPILE");
-                    let cross_compile = cc_env.as_ref().map(|s| s.trim_right_matches('-'));
-                    let prefix = cross_compile.or(match &target[..] {
-                        "aarch64-unknown-linux-gnu" => Some("aarch64-linux-gnu"),
-                        "arm-unknown-linux-gnueabi" => Some("arm-linux-gnueabi"),
-                        "arm-unknown-linux-gnueabihf" => Some("arm-linux-gnueabihf"),
-                        "arm-unknown-linux-musleabi" => Some("arm-linux-musleabi"),
-                        "arm-unknown-linux-musleabihf" => Some("arm-linux-musleabihf"),
-                        "arm-unknown-netbsdelf-eabi" => Some("arm--netbsdelf-eabi"),
-                        "armv6-unknown-netbsdelf-eabihf" => Some("armv6--netbsdelf-eabihf"),
-                        "armv7-unknown-linux-gnueabihf" => Some("arm-linux-gnueabihf"),
-                        "armv7-unknown-linux-musleabihf" => Some("arm-linux-musleabihf"),
-                        "armv7-unknown-netbsdelf-eabihf" => Some("armv7--netbsdelf-eabihf"),
-                        "i686-pc-windows-gnu" => Some("i686-w64-mingw32"),
-                        "i686-unknown-linux-musl" => Some("musl"),
-                        "i686-unknown-netbsdelf" => Some("i486--netbsdelf"),
-                        "mips-unknown-linux-gnu" => Some("mips-linux-gnu"),
-                        "mipsel-unknown-linux-gnu" => Some("mipsel-linux-gnu"),
-                        "mips64-unknown-linux-gnuabi64" => Some("mips64-linux-gnuabi64"),
-                        "mips64el-unknown-linux-gnuabi64" => Some("mips64el-linux-gnuabi64"),
-                        "powerpc-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-                        "powerpc-unknown-netbsd" => Some("powerpc--netbsd"),
-                        "powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
-                        "powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
-                        "s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
-                        "sparc64-unknown-netbsd" => Some("sparc64--netbsd"),
-                        "thumbv6m-none-eabi" => Some("arm-none-eabi"),
-                        "thumbv7em-none-eabi" => Some("arm-none-eabi"),
-                        "thumbv7em-none-eabihf" => Some("arm-none-eabi"),
-                        "thumbv7m-none-eabi" => Some("arm-none-eabi"),
-                        "x86_64-pc-windows-gnu" => Some("x86_64-w64-mingw32"),
-                        "x86_64-rumprun-netbsd" => Some("x86_64-rumprun-netbsd"),
-                        "x86_64-unknown-linux-musl" => Some("musl"),
-                        "x86_64-unknown-netbsd" => Some("x86_64--netbsd"),
-                        _ => None,
-                    });
-                    match prefix {
-                        Some(prefix) => format!("{}-{}", prefix, gnu),
-                        None => default.to_string(),
-                    }
-                } else {
-                    default.to_string()
-                };
-                Tool::new(PathBuf::from(compiler))
-            })
-    }
-
-    fn get_var(&self, var_base: &str) -> Result<String, String> {
-        let target = self.get_target();
-        let host = self.get_host();
-        let kind = if host == target { "HOST" } else { "TARGET" };
-        let target_u = target.replace("-", "_");
-        let res = self.getenv(&format!("{}_{}", var_base, target))
-            .or_else(|| self.getenv(&format!("{}_{}", var_base, target_u)))
-            .or_else(|| self.getenv(&format!("{}_{}", kind, var_base)))
-            .or_else(|| self.getenv(var_base));
-
-        match res {
-            Some(res) => Ok(res),
-            None => Err("could not get environment variable".to_string()),
-        }
-    }
-
-    fn envflags(&self, name: &str) -> Vec<String> {
-        self.get_var(name)
-            .unwrap_or(String::new())
-            .split(|c: char| c.is_whitespace())
-            .filter(|s| !s.is_empty())
-            .map(|s| s.to_string())
-            .collect()
-    }
-
-    fn env_tool(&self, name: &str) -> Option<(String, Vec<String>)> {
-        self.get_var(name).ok().map(|tool| {
-            let whitelist = ["ccache", "distcc"];
-            for t in whitelist.iter() {
-                if tool.starts_with(t) && tool[t.len()..].starts_with(" ") {
-                    return (t.to_string(), vec![tool[t.len()..].trim_left().to_string()]);
-                }
-            }
-            (tool, Vec::new())
-        })
-    }
-
-    /// Returns the default C++ standard library for the current target: `libc++`
-    /// for OS X and `libstdc++` for anything else.
-    fn get_cpp_link_stdlib(&self) -> Option<String> {
-        self.cpp_link_stdlib.clone().unwrap_or_else(|| {
-            let target = self.get_target();
-            if target.contains("msvc") {
-                None
-            } else if target.contains("darwin") {
-                Some("c++".to_string())
-            } else if target.contains("freebsd") {
-                Some("c++".to_string())
-            } else {
-                Some("stdc++".to_string())
-            }
-        })
-    }
-
-    fn get_ar(&self) -> PathBuf {
-        self.archiver
-            .clone()
-            .or_else(|| self.get_var("AR").map(PathBuf::from).ok())
-            .unwrap_or_else(|| {
-                if self.get_target().contains("android") {
-                    PathBuf::from(format!("{}-ar", self.get_target().replace("armv7", "arm")))
-                } else if self.get_target().contains("emscripten") {
-                    PathBuf::from("emar")
-                } else {
-                    PathBuf::from("ar")
-                }
-            })
-    }
-
-    fn get_target(&self) -> String {
-        self.target.clone().unwrap_or_else(|| self.getenv_unwrap("TARGET"))
-    }
-
-    fn get_host(&self) -> String {
-        self.host.clone().unwrap_or_else(|| self.getenv_unwrap("HOST"))
-    }
-
-    fn get_opt_level(&self) -> String {
-        self.opt_level.as_ref().cloned().unwrap_or_else(|| self.getenv_unwrap("OPT_LEVEL"))
-    }
-
-    fn get_debug(&self) -> bool {
-        self.debug.unwrap_or_else(|| self.getenv_unwrap("PROFILE") == "debug")
-    }
-
-    fn get_out_dir(&self) -> PathBuf {
-        self.out_dir.clone().unwrap_or_else(|| env::var_os("OUT_DIR").map(PathBuf::from).unwrap())
-    }
-
-    fn getenv(&self, v: &str) -> Option<String> {
-        let r = env::var(v).ok();
-        self.print(&format!("{} = {:?}", v, r));
-        r
-    }
-
-    fn getenv_unwrap(&self, v: &str) -> String {
-        match self.getenv(v) {
-            Some(s) => s,
-            None => fail(&format!("environment variable `{}` not defined", v)),
-        }
-    }
-
-    fn print(&self, s: &str) {
-        if self.cargo_metadata {
-            println!("{}", s);
-        }
-    }
-}
-
-impl Tool {
-    fn new(path: PathBuf) -> Tool {
-        // Try to detect family of the tool from its name, falling back to Gnu.
-        let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) {
-            if fname.contains("clang") {
-                ToolFamily::Clang
-            } else if fname.contains("cl") {
-                ToolFamily::Msvc
-            } else {
-                ToolFamily::Gnu
-            }
-        } else {
-            ToolFamily::Gnu
-        };
-        Tool {
-            path: path,
-            args: Vec::new(),
-            env: Vec::new(),
-            family: family
-        }
-    }
-
-    /// Converts this compiler into a `Command` that's ready to be run.
-    ///
-    /// This is useful for when the compiler needs to be executed and the
-    /// command returned will already have the initial arguments and environment
-    /// variables configured.
-    pub fn to_command(&self) -> Command {
-        let mut cmd = Command::new(&self.path);
-        cmd.args(&self.args);
-        for &(ref k, ref v) in self.env.iter() {
-            cmd.env(k, v);
-        }
-        cmd
-    }
-
-    /// Returns the path for this compiler.
-    ///
-    /// Note that this may not be a path to a file on the filesystem, e.g. "cc",
-    /// but rather something which will be resolved when a process is spawned.
-    pub fn path(&self) -> &Path {
-        &self.path
-    }
-
-    /// Returns the default set of arguments to the compiler needed to produce
-    /// executables for the target this compiler generates.
-    pub fn args(&self) -> &[OsString] {
-        &self.args
-    }
-
-    /// Returns the set of environment variables needed for this compiler to
-    /// operate.
-    ///
-    /// This is typically only used for MSVC compilers currently.
-    pub fn env(&self) -> &[(OsString, OsString)] {
-        &self.env
-    }
-}
-
-fn run(cmd: &mut Command, program: &str) -> Vec<u8> {
-    println!("running: {:?}", cmd);
-    // Capture the standard error coming from these programs, and write it out
-    // with cargo:warning= prefixes. Note that this is a bit wonky to avoid
-    // requiring the output to be UTF-8, we instead just ship bytes from one
-    // location to another.
-    let (spawn_result, stdout) = match cmd.stdout(Stdio::piped()).stderr(Stdio::piped()).spawn() {
-        Ok(mut child) => {
-            let stderr = BufReader::new(child.stderr.take().unwrap());
-            thread::spawn(move || {
-                for line in stderr.split(b'\n').filter_map(|l| l.ok()) {
-                    print!("cargo:warning=");
-                    std::io::stdout().write_all(&line).unwrap();
-                    println!("");
-                }
-            });
-            let mut stdout = vec![];
-            child.stdout.take().unwrap().read_to_end(&mut stdout).unwrap();
-            (child.wait(), stdout)
-        }
-        Err(e) => (Err(e), vec![]),
-    };
-    let status = match spawn_result {
-        Ok(status) => status,
-        Err(ref e) if e.kind() == io::ErrorKind::NotFound => {
-            let extra = if cfg!(windows) {
-                " (see https://github.com/alexcrichton/gcc-rs#compile-time-requirements \
-                   for help)"
-            } else {
-                ""
-            };
-            fail(&format!("failed to execute command: {}\nIs `{}` \
-                           not installed?{}",
-                          e,
-                          program,
-                          extra));
-        }
-        Err(e) => fail(&format!("failed to execute command: {}", e)),
-    };
-    println!("{:?}", status);
-    if !status.success() {
-        fail(&format!("command did not execute successfully, got: {}", status));
-    }
-    stdout
-}
-
-fn fail(s: &str) -> ! {
-    println!("\n\n{}\n\n", s);
-    panic!()
-}
deleted file mode 100644
--- a/third_party/rust/gcc-0.3.42/src/windows_registry.rs
+++ /dev/null
@@ -1,424 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! A helper module to probe the Windows Registry when looking for
-//! windows-specific tools.
-
-use std::process::Command;
-
-use Tool;
-
-macro_rules! otry {
-    ($expr:expr) => (match $expr {
-        Some(val) => val,
-        None => return None,
-    })
-}
-
-/// Attempts to find a tool within an MSVC installation using the Windows
-/// registry as a point to search from.
-///
-/// The `target` argument is the target that the tool should work for (e.g.
-/// compile or link for) and the `tool` argument is the tool to find (e.g.
-/// `cl.exe` or `link.exe`).
-///
-/// This function will return `None` if the tool could not be found, or it will
-/// return `Some(cmd)` which represents a command that's ready to execute the
-/// tool with the appropriate environment variables set.
-///
-/// Note that this function always returns `None` for non-MSVC targets.
-pub fn find(target: &str, tool: &str) -> Option<Command> {
-    find_tool(target, tool).map(|c| c.to_command())
-}
-
-/// Similar to the `find` function above, this function will attempt the same
-/// operation (finding a MSVC tool in a local install) but instead returns a
-/// `Tool` which may be introspected.
-#[cfg(not(windows))]
-pub fn find_tool(_target: &str, _tool: &str) -> Option<Tool> {
-    None
-}
-
-/// Documented above.
-#[cfg(windows)]
-pub fn find_tool(target: &str, tool: &str) -> Option<Tool> {
-    use std::env;
-    use std::ffi::OsString;
-    use std::mem;
-    use std::path::{Path, PathBuf};
-    use registry::{RegistryKey, LOCAL_MACHINE};
-
-    struct MsvcTool {
-        tool: PathBuf,
-        libs: Vec<PathBuf>,
-        path: Vec<PathBuf>,
-        include: Vec<PathBuf>,
-    }
-
-    impl MsvcTool {
-        fn new(tool: PathBuf) -> MsvcTool {
-            MsvcTool {
-                tool: tool,
-                libs: Vec::new(),
-                path: Vec::new(),
-                include: Vec::new(),
-            }
-        }
-
-        fn into_tool(self) -> Tool {
-            let MsvcTool { tool, libs, path, include } = self;
-            let mut tool = Tool::new(tool.into());
-            add_env(&mut tool, "LIB", libs);
-            add_env(&mut tool, "PATH", path);
-            add_env(&mut tool, "INCLUDE", include);
-            tool
-        }
-    }
-
-    // This logic is all tailored for MSVC, if we're not that then bail out
-    // early.
-    if !target.contains("msvc") {
-        return None;
-    }
-
-    // Looks like msbuild isn't located in the same location as other tools like
-    // cl.exe and lib.exe. To handle this we probe for it manually with
-    // dedicated registry keys.
-    if tool.contains("msbuild") {
-        return find_msbuild(target);
-    }
-
-    // If VCINSTALLDIR is set, then someone's probably already run vcvars and we
-    // should just find whatever that indicates.
-    if env::var_os("VCINSTALLDIR").is_some() {
-        return env::var_os("PATH")
-            .and_then(|path| env::split_paths(&path).map(|p| p.join(tool)).find(|p| p.exists()))
-            .map(|path| Tool::new(path.into()));
-    }
-
-    // Ok, if we're here, now comes the fun part of the probing. Default shells
-    // or shells like MSYS aren't really configured to execute `cl.exe` and the
-    // various compiler tools shipped as part of Visual Studio. Here we try to
-    // first find the relevant tool, then we also have to be sure to fill in
-    // environment variables like `LIB`, `INCLUDE`, and `PATH` to ensure that
-    // the tool is actually usable.
-
-    return find_msvc_latest(tool, target, "15.0")
-        .or_else(|| find_msvc_latest(tool, target, "14.0"))
-        .or_else(|| find_msvc_12(tool, target))
-        .or_else(|| find_msvc_11(tool, target));
-
-    // For MSVC 14 or newer we need to find the Universal CRT as well as either
-    // the Windows 10 SDK or Windows 8.1 SDK.
-    fn find_msvc_latest(tool: &str, target: &str, ver: &str) -> Option<Tool> {
-        let vcdir = otry!(get_vc_dir(ver));
-        let mut tool = otry!(get_tool(tool, &vcdir, target));
-        let sub = otry!(lib_subdir(target));
-        let (ucrt, ucrt_version) = otry!(get_ucrt_dir());
-
-        let ucrt_include = ucrt.join("include").join(&ucrt_version);
-        tool.include.push(ucrt_include.join("ucrt"));
-
-        let ucrt_lib = ucrt.join("lib").join(&ucrt_version);
-        tool.libs.push(ucrt_lib.join("ucrt").join(sub));
-
-        if let Some((sdk, version)) = get_sdk10_dir() {
-            tool.path.push(sdk.join("bin").join(sub));
-            let sdk_lib = sdk.join("lib").join(&version);
-            tool.libs.push(sdk_lib.join("um").join(sub));
-            let sdk_include = sdk.join("include").join(&version);
-            tool.include.push(sdk_include.join("um"));
-            tool.include.push(sdk_include.join("winrt"));
-            tool.include.push(sdk_include.join("shared"));
-        } else if let Some(sdk) = get_sdk81_dir() {
-            tool.path.push(sdk.join("bin").join(sub));
-            let sdk_lib = sdk.join("lib").join("winv6.3");
-            tool.libs.push(sdk_lib.join("um").join(sub));
-            let sdk_include = sdk.join("include");
-            tool.include.push(sdk_include.join("um"));
-            tool.include.push(sdk_include.join("winrt"));
-            tool.include.push(sdk_include.join("shared"));
-        } else {
-            return None;
-        }
-        Some(tool.into_tool())
-    }
-
-    // For MSVC 12 we need to find the Windows 8.1 SDK.
-    fn find_msvc_12(tool: &str, target: &str) -> Option<Tool> {
-        let vcdir = otry!(get_vc_dir("12.0"));
-        let mut tool = otry!(get_tool(tool, &vcdir, target));
-        let sub = otry!(lib_subdir(target));
-        let sdk81 = otry!(get_sdk81_dir());
-        tool.path.push(sdk81.join("bin").join(sub));
-        let sdk_lib = sdk81.join("lib").join("winv6.3");
-        tool.libs.push(sdk_lib.join("um").join(sub));
-        let sdk_include = sdk81.join("include");
-        tool.include.push(sdk_include.join("shared"));
-        tool.include.push(sdk_include.join("um"));
-        tool.include.push(sdk_include.join("winrt"));
-        Some(tool.into_tool())
-    }
-
-    // For MSVC 11 we need to find the Windows 8 SDK.
-    fn find_msvc_11(tool: &str, target: &str) -> Option<Tool> {
-        let vcdir = otry!(get_vc_dir("11.0"));
-        let mut tool = otry!(get_tool(tool, &vcdir, target));
-        let sub = otry!(lib_subdir(target));
-        let sdk8 = otry!(get_sdk8_dir());
-        tool.path.push(sdk8.join("bin").join(sub));
-        let sdk_lib = sdk8.join("lib").join("win8");
-        tool.libs.push(sdk_lib.join("um").join(sub));
-        let sdk_include = sdk8.join("include");
-        tool.include.push(sdk_include.join("shared"));
-        tool.include.push(sdk_include.join("um"));
-        tool.include.push(sdk_include.join("winrt"));
-        Some(tool.into_tool())
-    }
-
-    fn add_env(tool: &mut Tool, env: &str, paths: Vec<PathBuf>) {
-        let prev = env::var_os(env).unwrap_or(OsString::new());
-        let prev = env::split_paths(&prev);
-        let new = paths.into_iter().chain(prev);
-        tool.env.push((env.to_string().into(), env::join_paths(new).unwrap()));
-    }
-
-    // Given a possible MSVC installation directory, we look for the linker and
-    // then add the MSVC library path.
-    fn get_tool(tool: &str, path: &Path, target: &str) -> Option<MsvcTool> {
-        bin_subdir(target)
-            .into_iter()
-            .map(|(sub, host)| (path.join("bin").join(sub).join(tool), path.join("bin").join(host)))
-            .filter(|&(ref path, _)| path.is_file())
-            .map(|(path, host)| {
-                let mut tool = MsvcTool::new(path);
-                tool.path.push(host);
-                tool
-            })
-            .filter_map(|mut tool| {
-                let sub = otry!(vc_lib_subdir(target));
-                tool.libs.push(path.join("lib").join(sub));
-                tool.include.push(path.join("include"));
-                let atlmfc_path = path.join("atlmfc");
-                if atlmfc_path.exists() {
-                    tool.libs.push(atlmfc_path.join("lib").join(sub));
-                    tool.include.push(atlmfc_path.join("include"));
-                }
-                Some(tool)
-            })
-            .next()
-    }
-
-    // To find MSVC we look in a specific registry key for the version we are
-    // trying to find.
-    fn get_vc_dir(ver: &str) -> Option<PathBuf> {
-        let key = r"SOFTWARE\Microsoft\VisualStudio\SxS\VC7";
-        let key = otry!(LOCAL_MACHINE.open(key.as_ref()).ok());
-        let path = otry!(key.query_str(ver).ok());
-        Some(path.into())
-    }
-
-    // To find the Universal CRT we look in a specific registry key for where
-    // all the Universal CRTs are located and then sort them asciibetically to
-    // find the newest version. While this sort of sorting isn't ideal,  it is
-    // what vcvars does so that's good enough for us.
-    //
-    // Returns a pair of (root, version) for the ucrt dir if found
-    fn get_ucrt_dir() -> Option<(PathBuf, String)> {
-        let key = r"SOFTWARE\Microsoft\Windows Kits\Installed Roots";
-        let key = otry!(LOCAL_MACHINE.open(key.as_ref()).ok());
-        let root = otry!(key.query_str("KitsRoot10").ok());
-        let readdir = otry!(Path::new(&root).join("lib").read_dir().ok());
-        let max_libdir = otry!(readdir.filter_map(|dir| dir.ok())
-            .map(|dir| dir.path())
-            .filter(|dir| {
-                dir.components()
-                    .last()
-                    .and_then(|c| c.as_os_str().to_str())
-                    .map(|c| c.starts_with("10.") && dir.join("ucrt").is_dir())
-                    .unwrap_or(false)
-            })
-            .max());
-        let version = max_libdir.components().last().unwrap();
-        let version = version.as_os_str().to_str().unwrap().to_string();
-        Some((root.into(), version))
-    }
-
-    // Vcvars finds the correct version of the Windows 10 SDK by looking
-    // for the include `um\Windows.h` because sometimes a given version will
-    // only have UCRT bits without the rest of the SDK. Since we only care about
-    // libraries and not includes, we instead look for `um\x64\kernel32.lib`.
-    // Since the 32-bit and 64-bit libraries are always installed together we
-    // only need to bother checking x64, making this code a tiny bit simpler.
-    // Like we do for the Universal CRT, we sort the possibilities
-    // asciibetically to find the newest one as that is what vcvars does.
-    fn get_sdk10_dir() -> Option<(PathBuf, String)> {
-        let key = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0";
-        let key = otry!(LOCAL_MACHINE.open(key.as_ref()).ok());
-        let root = otry!(key.query_str("InstallationFolder").ok());
-        let readdir = otry!(Path::new(&root).join("lib").read_dir().ok());
-        let mut dirs = readdir.filter_map(|dir| dir.ok())
-            .map(|dir| dir.path())
-            .collect::<Vec<_>>();
-        dirs.sort();
-        let dir = otry!(dirs.into_iter()
-            .rev()
-            .filter(|dir| dir.join("um").join("x64").join("kernel32.lib").is_file())
-            .next());
-        let version = dir.components().last().unwrap();
-        let version = version.as_os_str().to_str().unwrap().to_string();
-        Some((root.into(), version))
-    }
-
-    // Interestingly there are several subdirectories, `win7` `win8` and
-    // `winv6.3`. Vcvars seems to only care about `winv6.3` though, so the same
-    // applies to us. Note that if we were targetting kernel mode drivers
-    // instead of user mode applications, we would care.
-    fn get_sdk81_dir() -> Option<PathBuf> {
-        let key = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1";
-        let key = otry!(LOCAL_MACHINE.open(key.as_ref()).ok());
-        let root = otry!(key.query_str("InstallationFolder").ok());
-        Some(root.into())
-    }
-
-    fn get_sdk8_dir() -> Option<PathBuf> {
-        let key = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0";
-        let key = otry!(LOCAL_MACHINE.open(key.as_ref()).ok());
-        let root = otry!(key.query_str("InstallationFolder").ok());
-        Some(root.into())
-    }
-
-    const PROCESSOR_ARCHITECTURE_INTEL: u16 = 0;
-    const PROCESSOR_ARCHITECTURE_AMD64: u16 = 9;
-    const X86: u16 = PROCESSOR_ARCHITECTURE_INTEL;
-    const X86_64: u16 = PROCESSOR_ARCHITECTURE_AMD64;
-
-    // When choosing the tool to use, we have to choose the one which matches
-    // the target architecture. Otherwise we end up in situations where someone
-    // on 32-bit Windows is trying to cross compile to 64-bit and it tries to
-    // invoke the native 64-bit compiler which won't work.
-    //
-    // For the return value of this function, the first member of the tuple is
-    // the folder of the tool we will be invoking, while the second member is
-    // the folder of the host toolchain for that tool which is essential when
-    // using a cross linker. We return a Vec since on x64 there are often two
-    // linkers that can target the architecture we desire. The 64-bit host
-    // linker is preferred, and hence first, due to 64-bit allowing it more
-    // address space to work with and potentially being faster.
-    fn bin_subdir(target: &str) -> Vec<(&'static str, &'static str)> {
-        let arch = target.split('-').next().unwrap();
-        match (arch, host_arch()) {
-            ("i586", X86) | ("i686", X86) => vec![("", "")],
-            ("i586", X86_64) | ("i686", X86_64) => vec![("amd64_x86", "amd64"), ("", "")],
-            ("x86_64", X86) => vec![("x86_amd64", "")],
-            ("x86_64", X86_64) => vec![("amd64", "amd64"), ("x86_amd64", "")],
-            ("arm", X86) => vec![("x86_arm", "")],
-            ("arm", X86_64) => vec![("amd64_arm", "amd64"), ("x86_arm", "")],
-            _ => vec![],
-        }
-    }
-
-    fn lib_subdir(target: &str) -> Option<&'static str> {
-        let arch = target.split('-').next().unwrap();
-        match arch {
-            "i586" | "i686" => Some("x86"),
-            "x86_64" => Some("x64"),
-            "arm" => Some("arm"),
-            _ => None,
-        }
-    }
-
-    // MSVC's x86 libraries are not in a subfolder
-    fn vc_lib_subdir(target: &str) -> Option<&'static str> {
-        let arch = target.split('-').next().unwrap();
-        match arch {
-            "i586" | "i686" => Some(""),
-            "x86_64" => Some("amd64"),
-            "arm" => Some("arm"),
-            _ => None,
-        }
-    }
-
-    #[allow(bad_style)]
-    fn host_arch() -> u16 {
-        type DWORD = u32;
-        type WORD = u16;
-        type LPVOID = *mut u8;
-        type DWORD_PTR = usize;
-
-        #[repr(C)]
-        struct SYSTEM_INFO {
-            wProcessorArchitecture: WORD,
-            _wReserved: WORD,
-            _dwPageSize: DWORD,
-            _lpMinimumApplicationAddress: LPVOID,
-            _lpMaximumApplicationAddress: LPVOID,
-            _dwActiveProcessorMask: DWORD_PTR,
-            _dwNumberOfProcessors: DWORD,
-            _dwProcessorType: DWORD,
-            _dwAllocationGranularity: DWORD,
-            _wProcessorLevel: WORD,
-            _wProcessorRevision: WORD,
-        }
-
-        extern "system" {
-            fn GetNativeSystemInfo(lpSystemInfo: *mut SYSTEM_INFO);
-        }
-
-        unsafe {
-            let mut info = mem::zeroed();
-            GetNativeSystemInfo(&mut info);
-            info.wProcessorArchitecture
-        }
-    }
-
-    // Given a registry key, look at all the sub keys and find the one which has
-    // the maximal numeric value.
-    //
-    // Returns the name of the maximal key as well as the opened maximal key.
-    fn max_version(key: &RegistryKey) -> Option<(OsString, RegistryKey)> {
-        let mut max_vers = 0;
-        let mut max_key = None;
-        for subkey in key.iter().filter_map(|k| k.ok()) {
-            let val = subkey.to_str()
-                .and_then(|s| s.trim_left_matches("v").replace(".", "").parse().ok());
-            let val = match val {
-                Some(s) => s,
-                None => continue,
-            };
-            if val > max_vers {
-                if let Ok(k) = key.open(&subkey) {
-                    max_vers = val;
-                    max_key = Some((subkey, k));
-                }
-            }
-        }
-        max_key
-    }
-
-    // see http://stackoverflow.com/questions/328017/path-to-msbuild
-    fn find_msbuild(target: &str) -> Option<Tool> {
-        let key = r"SOFTWARE\Microsoft\MSBuild\ToolsVersions";
-        LOCAL_MACHINE.open(key.as_ref())
-            .ok()
-            .and_then(|key| {
-                max_version(&key).and_then(|(_vers, key)| key.query_str("MSBuildToolsPath").ok())
-            })
-            .map(|path| {
-                let mut path = PathBuf::from(path);
-                path.push("MSBuild.exe");
-                let mut tool = Tool::new(path);
-                if target.contains("x86_64") {
-                    tool.env.push(("Platform".into(), "X64".into()));
-                }
-                tool
-            })
-    }
-}
deleted file mode 100644
--- a/third_party/rust/gcc-0.3.42/tests/cc_env.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-extern crate tempdir;
-extern crate gcc;
-
-use std::env;
-
-mod support;
-use support::Test;
-
-#[test]
-fn main() {
-    ccache();
-    distcc();
-    ccache_spaces();
-}
-
-fn ccache() {
-    let test = Test::gnu();
-    test.shim("ccache");
-
-    env::set_var("CC", "ccache lol-this-is-not-a-compiler foo");
-    test.gcc().file("foo.c").compile("libfoo.a");
-
-    test.cmd(0)
-        .must_have("lol-this-is-not-a-compiler foo")
-        .must_have("foo.c")
-        .must_not_have("ccache");
-}
-
-fn ccache_spaces() {
-    let test = Test::gnu();
-    test.shim("ccache");
-
-    env::set_var("CC", "ccache        lol-this-is-not-a-compiler foo");
-    test.gcc().file("foo.c").compile("libfoo.a");
-    test.cmd(0).must_have("lol-this-is-not-a-compiler foo");
-}
-
-fn distcc() {
-    let test = Test::gnu();
-    test.shim("distcc");
-
-    env::set_var("CC", "distcc lol-this-is-not-a-compiler foo");
-    test.gcc().file("foo.c").compile("libfoo.a");
-
-    test.cmd(0)
-        .must_have("lol-this-is-not-a-compiler foo")
-        .must_have("foo.c")
-        .must_not_have("distcc");
-}
deleted file mode 100644
--- a/third_party/rust/gcc-0.3.42/tests/support/mod.rs
+++ /dev/null
@@ -1,112 +0,0 @@
-#![allow(dead_code)]
-
-use std::env;
-use std::ffi::OsStr;
-use std::fs::{self, File};
-use std::io::prelude::*;
-use std::path::PathBuf;
-
-use gcc;
-use tempdir::TempDir;
-
-pub struct Test {
-    pub td: TempDir,
-    pub gcc: PathBuf,
-    pub msvc: bool,
-}
-
-pub struct Execution {
-    args: Vec<String>,
-}
-
-impl Test {
-    pub fn new() -> Test {
-        let mut gcc = PathBuf::from(env::current_exe().unwrap());
-        gcc.pop();
-        if gcc.ends_with("deps") {
-            gcc.pop();
-        }
-        gcc.push(format!("gcc-shim{}", env::consts::EXE_SUFFIX));
-        Test {
-            td: TempDir::new("gcc-test").unwrap(),
-            gcc: gcc,
-            msvc: false,
-        }
-    }
-
-    pub fn gnu() -> Test {
-        let t = Test::new();
-        t.shim("cc").shim("ar");
-        t
-    }
-
-    pub fn msvc() -> Test {
-        let mut t = Test::new();
-        t.shim("cl").shim("lib.exe");
-        t.msvc = true;
-        t
-    }
-
-    pub fn shim(&self, name: &str) -> &Test {
-        let fname = format!("{}{}", name, env::consts::EXE_SUFFIX);
-        fs::hard_link(&self.gcc, self.td.path().join(&fname))
-            .or_else(|_| fs::copy(&self.gcc, self.td.path().join(&fname)).map(|_| ()))
-            .unwrap();
-        self
-    }
-
-    pub fn gcc(&self) -> gcc::Config {
-        let mut cfg = gcc::Config::new();
-        let mut path = env::split_paths(&env::var_os("PATH").unwrap()).collect::<Vec<_>>();
-        path.insert(0, self.td.path().to_owned());
-        let target = if self.msvc {
-            "x86_64-pc-windows-msvc"
-        } else {
-            "x86_64-unknown-linux-gnu"
-        };
-
-        cfg.target(target)
-            .host(target)
-            .opt_level(2)
-            .debug(false)
-            .out_dir(self.td.path())
-            .__set_env("PATH", env::join_paths(path).unwrap())
-            .__set_env("GCCTEST_OUT_DIR", self.td.path());
-        if self.msvc {
-            cfg.compiler(self.td.path().join("cl"));
-            cfg.archiver(self.td.path().join("lib.exe"));
-        }
-        cfg
-    }
-
-    pub fn cmd(&self, i: u32) -> Execution {
-        let mut s = String::new();
-        File::open(self.td.path().join(format!("out{}", i)))
-            .unwrap()
-            .read_to_string(&mut s)
-            .unwrap();
-        Execution { args: s.lines().map(|s| s.to_string()).collect() }
-    }
-}
-
-impl Execution {
-    pub fn must_have<P: AsRef<OsStr>>(&self, p: P) -> &Execution {
-        if !self.has(p.as_ref()) {
-            panic!("didn't find {:?} in {:?}", p.as_ref(), self.args);
-        } else {
-            self
-        }
-    }
-
-    pub fn must_not_have<P: AsRef<OsStr>>(&self, p: P) -> &Execution {
-        if self.has(p.as_ref()) {
-            panic!("found {:?}", p.as_ref());
-        } else {
-            self
-        }
-    }
-
-    pub fn has(&self, p: &OsStr) -> bool {
-        self.args.iter().any(|arg| OsStr::new(arg) == p)
-    }
-}
deleted file mode 100644
--- a/third_party/rust/gcc-0.3.42/tests/test.rs
+++ /dev/null
@@ -1,230 +0,0 @@
-extern crate gcc;
-extern crate tempdir;
-
-use support::Test;
-
-mod support;
-
-#[test]
-fn gnu_smoke() {
-    let test = Test::gnu();
-    test.gcc()
-        .file("foo.c")
-        .compile("libfoo.a");
-
-    test.cmd(0)
-        .must_have("-O2")
-        .must_have("foo.c")
-        .must_not_have("-g")
-        .must_have("-c")
-        .must_have("-ffunction-sections")
-        .must_have("-fdata-sections");
-    test.cmd(1).must_have(test.td.path().join("foo.o"));
-}
-
-#[test]
-fn gnu_opt_level_1() {
-    let test = Test::gnu();
-    test.gcc()
-        .opt_level(1)
-        .file("foo.c")
-        .compile("libfoo.a");
-
-    test.cmd(0)
-        .must_have("-O1")
-        .must_not_have("-O2");
-}
-
-#[test]
-fn gnu_opt_level_s() {
-    let test = Test::gnu();
-    test.gcc()
-        .opt_level_str("s")
-        .file("foo.c")
-        .compile("libfoo.a");
-
-    test.cmd(0)
-        .must_have("-Os")
-        .must_not_have("-O1")
-        .must_not_have("-O2")
-        .must_not_have("-O3")
-        .must_not_have("-Oz");
-}
-
-#[test]
-fn gnu_debug() {
-    let test = Test::gnu();
-    test.gcc()
-        .debug(true)
-        .file("foo.c")
-        .compile("libfoo.a");
-    test.cmd(0).must_have("-g");
-}
-
-#[test]
-fn gnu_x86_64() {
-    for vendor in &["unknown-linux-gnu", "apple-darwin"] {
-        let target = format!("x86_64-{}", vendor);
-        let test = Test::gnu();
-        test.gcc()
-            .target(&target)
-            .host(&target)
-            .file("foo.c")
-            .compile("libfoo.a");
-
-        test.cmd(0)
-            .must_have("-fPIC")
-            .must_have("-m64");
-    }
-}
-
-#[test]
-fn gnu_x86_64_no_pic() {
-    for vendor in &["unknown-linux-gnu", "apple-darwin"] {
-        let target = format!("x86_64-{}", vendor);
-        let test = Test::gnu();
-        test.gcc()
-            .pic(false)
-            .target(&target)
-            .host(&target)
-            .file("foo.c")
-            .compile("libfoo.a");
-
-        test.cmd(0).must_not_have("-fPIC");
-    }
-}
-
-#[test]
-fn gnu_i686() {
-    for vendor in &["unknown-linux-gnu", "apple-darwin"] {
-        let target = format!("i686-{}", vendor);
-        let test = Test::gnu();
-        test.gcc()
-            .target(&target)
-            .host(&target)
-            .file("foo.c")
-            .compile("libfoo.a");
-
-        test.cmd(0)
-            .must_not_have("-fPIC")
-            .must_have("-m32");
-    }
-}
-
-#[test]
-fn gnu_i686_pic() {
-    for vendor in &["unknown-linux-gnu", "apple-darwin"] {
-        let target = format!("i686-{}", vendor);
-        let test = Test::gnu();
-        test.gcc()
-            .pic(true)
-            .target(&target)
-            .host(&target)
-            .file("foo.c")
-            .compile("libfoo.a");
-
-        test.cmd(0).must_have("-fPIC");
-    }
-}
-
-#[test]
-fn gnu_set_stdlib() {
-    let test = Test::gnu();
-    test.gcc()
-        .cpp_set_stdlib(Some("foo"))
-        .file("foo.c")
-        .compile("libfoo.a");
-
-    test.cmd(0).must_not_have("-stdlib=foo");
-}
-
-#[test]
-fn gnu_include() {
-    let test = Test::gnu();
-    test.gcc()
-        .include("foo/bar")
-        .file("foo.c")
-        .compile("libfoo.a");
-
-    test.cmd(0).must_have("-I").must_have("foo/bar");
-}
-
-#[test]
-fn gnu_define() {
-    let test = Test::gnu();
-    test.gcc()
-        .define("FOO", Some("bar"))
-        .define("BAR", None)
-        .file("foo.c")
-        .compile("libfoo.a");
-
-    test.cmd(0).must_have("-DFOO=bar").must_have("-DBAR");
-}
-
-#[test]
-fn gnu_compile_assembly() {
-    let test = Test::gnu();
-    test.gcc()
-        .file("foo.S")
-        .compile("libfoo.a");
-    test.cmd(0).must_have("foo.S");
-}
-
-#[test]
-fn msvc_smoke() {
-    let test = Test::msvc();
-    test.gcc()
-        .file("foo.c")
-        .compile("libfoo.a");
-
-    test.cmd(0)
-        .must_have("/O2")
-        .must_have("foo.c")
-        .must_not_have("/Z7")
-        .must_have("/c");
-    test.cmd(1).must_have(test.td.path().join("foo.o"));
-}
-
-#[test]
-fn msvc_opt_level_0() {
-    let test = Test::msvc();
-    test.gcc()
-        .opt_level(0)
-        .file("foo.c")
-        .compile("libfoo.a");
-
-    test.cmd(0).must_not_have("/O2");
-}
-
-#[test]
-fn msvc_debug() {
-    let test = Test::msvc();
-    test.gcc()
-        .debug(true)
-        .file("foo.c")
-        .compile("libfoo.a");
-    test.cmd(0).must_have("/Z7");
-}
-
-#[test]
-fn msvc_include() {
-    let test = Test::msvc();
-    test.gcc()
-        .include("foo/bar")
-        .file("foo.c")
-        .compile("libfoo.a");
-
-    test.cmd(0).must_have("/I").must_have("foo/bar");
-}
-
-#[test]
-fn msvc_define() {
-    let test = Test::msvc();
-    test.gcc()
-        .define("FOO", Some("bar"))
-        .define("BAR", None)
-        .file("foo.c")
-        .compile("libfoo.a");
-
-    test.cmd(0).must_have("/DFOO=bar").must_have("/DBAR");
-}
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"be18ed6efd3eb179681f340007aaaa2a2fdbe859dee2088268306ca771662f82",".travis_after.sh":"8a2b7facdb728db96f856211101a6ec70d08e8a6c97e2b88b95aacc6e9d43633","Cargo.toml":"8decbc46cc24226324027edebbfa878a887f2cacb2a9b4c9e9cde101a26d05b4","LICENSE-APACHE":"7cfd738c53d61c79f07e348f622bf7707c9084237054d37fbe07788a75f5881c","LICENSE-MIT":"1bc1057abd72f06decbd02da13037adbe5e8f92a719c5032e34ac52aa0f9e62f","README.md":"0d390941cb326a4a5baf06d930285192b5a98e2967e6dec2826acd593fa9bab3","benches/parse.rs":"a4927e4c379e8859b18b40c019655f2b75c3c75977eab066586a5fedee5d6b94","src/iter.rs":"e018f14fbcdcc501218737e2bfb3c44163e42f024756a5de74e9b3ed63c64fcc","src/lib.rs":"4bdb2eaf6e47468ddce4cda0d66440a31294fb6b5fc7dd0d06c032c1281c9624"},"package":"77f756bed9ee3a83ce98774f4155b42a31b787029013f3a7d83eca714e500e21"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/.travis.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-language: rust
-rust:
-  - stable
-  - beta
-  - nightly
-
-sudo: false
-
-cache:
-  apt: true
-  directories:
-    - target/debug/deps
-    - target/debug/build
-
-script:
-  - cargo build --verbose
-  - cargo test --verbose
-  - cargo build --verbose --no-default-features
-  - cargo test --verbose --no-default-features
-
-notifications:
-  email: false
-
-addons:
-  apt:
-    packages:
-      - libcurl4-openssl-dev
-      - libelf-dev
-      - libdw-dev
-
-after_success: ./.travis_after.sh
-
-env:
-  global:
-    secure: VhNfac39x05yr7aAwvg973wdaFxFfg0PqApgHIKyilq0aNDacpPi94sSEjSw1Qan9R6SaAH5nXj6xMst18sCw9DCLZzXr7cboun6Zd+O4eB9Kna5veXASpIa9KH/GMZvILfDFTXnIbLDpvzzEuSS5tWIUu7elikmoZhOXXP82B4=
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/.travis_after.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-set -ev
-if [[ $TRAVIS_RUST_VERSION = stable ]]; then
-  wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
-  tar xzf master.tar.gz
-  mkdir kcov-master/build
-  cd kcov-master/build
-  cmake ..
-  make
-  make install DESTDIR=../tmp
-  cd ../..
-  ls target/debug
-  ./kcov-master/tmp/usr/local/bin/kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov target/debug/httparse-*
-fi
-
-
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/Cargo.toml
+++ /dev/null
@@ -1,20 +0,0 @@
-[package]
-
-name = "httparse"
-version = "1.2.2"
-authors = ["Sean McArthur <sean.monstar@gmail.com>"]
-license = "MIT/Apache-2.0"
-description = "A tiny, safe, speedy, zero-copy HTTP/1.x parser."
-repository = "https://github.com/seanmonstar/httparse"
-
-[features]
-default = ["std"]
-std = []
-
-[dev-dependencies]
-pico-sys = "0.0"
-
-[profile.bench]
-lto = true
-codegen-units = 1
-opt-level = 3
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/LICENSE-MIT
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2015 Sean McArthur
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/README.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# httparse
-
-[![Build Status](https://travis-ci.org/seanmonstar/httparse.svg?branch=master)](https://travis-ci.org/seanmonstar/httparse)
-[![Coverage Status](https://coveralls.io/repos/seanmonstar/httparse/badge.svg)](https://coveralls.io/r/seanmonstar/httparse)
-[![crates.io](http://meritbadge.herokuapp.com/httparse)](https://crates.io/crates/httparse)
-
-A push parser for the HTTP 1.x protocol. Avoids allocations. Fast.
-
-[Documentation](https://docs.rs/httparse)
-
-## Usage
-
-```rust
-let mut headers = [httparse::EMPTY_HEADER; 16];
-let mut req = httparse::Request::new(&mut headers);
-
-let buf = b"GET /index.html HTTP/1.1\r\nHost";
-assert!(try!(req.parse(buf)).is_partial());
-
-// a partial request, so we try again once we have more data
-
-let buf = b"GET /index.html HTTP/1.1\r\nHost: example.domain\r\n\r\n";
-assert!(try!(req.parse(buf)).is_complete());
-```
-
-## License
-
-Licensed under either of
-
-- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://apache.org/licenses/LICENSE-2.0)
-- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
-
-### Contribution
-
-Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/benches/parse.rs
+++ /dev/null
@@ -1,68 +0,0 @@
-#![feature(test)]
-
-extern crate pico_sys as pico;
-extern crate httparse;
-
-extern crate test;
-
-const REQ: &'static [u8] = b"\
-GET /wp-content/uploads/2010/03/hello-kitty-darth-vader-pink.jpg HTTP/1.1\r\n\
-Host: www.kittyhell.com\r\n\
-User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; ja-JP-mac; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Pathtraq/0.9\r\n\
-Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n\
-Accept-Language: ja,en-us;q=0.7,en;q=0.3\r\n\
-Accept-Encoding: gzip,deflate\r\n\
-Accept-Charset: Shift_JIS,utf-8;q=0.7,*;q=0.7\r\n\
-Keep-Alive: 115\r\n\
-Connection: keep-alive\r\n\
-Cookie: wp_ozh_wsa_visits=2; wp_ozh_wsa_visit_lasttime=xxxxxxxxxx; __utma=xxxxxxxxx.xxxxxxxxxx.xxxxxxxxxx.xxxxxxxxxx.xxxxxxxxxx.x; __utmz=xxxxxxxxx.xxxxxxxxxx.x.x.utmccn=(referral)|utmcsr=reader.livedoor.com|utmcct=/reader/|utmcmd=referral\r\n\r\n";
-
-
-
-
-#[bench]
-fn bench_pico(b: &mut test::Bencher) {
-    use std::mem;
-
-    #[repr(C)]
-    #[derive(Clone, Copy)]
-    struct Header<'a>(&'a [u8], &'a [u8]);
-
-
-    #[repr(C)]
-    struct Headers<'a>(&'a mut [Header<'a>]);
-    let method = [0i8; 16];
-    let path = [0i8; 16];
-    let mut minor_version = 0;
-    let mut h = [Header(&[], &[]); 16];
-    let mut h_len = h.len();
-    let headers = Headers(&mut h);
-    let prev_buf_len = 0;
-
-    b.iter(|| {
-        let ret = unsafe {
-            pico::ffi::phr_parse_request(
-                REQ.as_ptr() as *const _,
-                REQ.len(),
-                &mut method.as_ptr(),
-                &mut 16,
-                &mut path.as_ptr(),
-                &mut 16,
-                &mut minor_version,
-                mem::transmute::<*mut Header, *mut pico::ffi::phr_header>(headers.0.as_mut_ptr()),
-                &mut h_len as *mut usize as *mut _,
-                prev_buf_len
-            )
-        };
-        assert_eq!(ret, REQ.len() as i32);
-    })
-}
-
-#[bench]
-fn bench_httparse(b: &mut test::Bencher) {
-    let mut headers = [httparse::Header{ name: "", value: &[] }; 16];
-    let mut req = httparse::Request::new(&mut headers);
-    b.iter(|| {
-        assert_eq!(req.parse(REQ).unwrap(), httparse::Status::Complete(REQ.len()));
-    })
-}
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/src/iter.rs
+++ /dev/null
@@ -1,116 +0,0 @@
-use core::slice;
-
-pub struct Bytes<'a> {
-    slice: &'a [u8],
-    pos: usize
-}
-
-impl<'a> Bytes<'a> {
-    #[inline]
-    pub fn new(slice: &'a [u8]) -> Bytes<'a> {
-        Bytes {
-            slice: slice,
-            pos: 0
-        }
-    }
-
-    #[inline]
-    pub fn pos(&self) -> usize {
-        self.pos
-    }
-
-    #[inline]
-    pub fn peek(&self) -> Option<u8> {
-        self.slice.get(self.pos).cloned()
-    }
-
-    #[inline]
-    pub fn bump(&mut self) {
-        self.pos += 1;
-    }
-
-    #[inline]
-    pub fn len(&self) -> usize {
-        self.slice.len()
-    }
-
-    #[inline]
-    pub fn slice(&mut self) -> &'a [u8] {
-        self.slice_skip(0)
-    }
-
-    #[inline]
-    pub fn slice_skip(&mut self, skip: usize) -> &'a [u8] {
-        debug_assert!(self.pos >= skip);
-        let head_pos = self.pos - skip;
-        unsafe {
-            let ptr = self.slice.as_ptr();
-            let head = slice::from_raw_parts(ptr, head_pos);
-            let tail = slice::from_raw_parts(ptr.offset(self.pos as isize), self.slice.len() - self.pos);
-            self.pos = 0;
-            self.slice = tail;
-            head
-        }
-    }
-
-    #[inline]
-    pub fn next_8<'b>(&'b mut self) -> Option<Bytes8<'b, 'a>> {
-        if self.slice.len() > self.pos + 8 {
-            Some(Bytes8 { bytes: self, pos: 0 })
-        } else {
-            None
-        }
-    }
-}
-
-impl<'a> Iterator for Bytes<'a> {
-    type Item = u8;
-
-    #[inline]
-    fn next(&mut self) -> Option<u8> {
-        if self.slice.len() > self.pos {
-            let b = unsafe { *self.slice.get_unchecked(self.pos) };
-            self.pos += 1;
-            Some(b)
-        } else {
-            None
-        }
-    }
-}
-
-pub struct Bytes8<'a, 'b: 'a> {
-    bytes: &'a mut Bytes<'b>,
-    pos: usize
-}
-
-macro_rules! bytes8_methods {
-    ($f:ident, $pos:expr) => {
-        #[inline]
-        pub fn $f(&mut self) -> u8 {
-            debug_assert!(self.assert_pos($pos));
-            let b = unsafe { *self.bytes.slice.get_unchecked(self.bytes.pos) };
-            self.bytes.pos += 1;
-            b
-        }
-    };
-    () => {
-        bytes8_methods!(_0, 0);
-        bytes8_methods!(_1, 1);
-        bytes8_methods!(_2, 2);
-        bytes8_methods!(_3, 3);
-        bytes8_methods!(_4, 4);
-        bytes8_methods!(_5, 5);
-        bytes8_methods!(_6, 6);
-        bytes8_methods!(_7, 7);
-    }
-}
-
-impl<'a, 'b: 'a> Bytes8<'a, 'b> {
-    bytes8_methods! {}
-
-    fn assert_pos(&mut self, pos: usize) -> bool {
-        let ret = self.pos == pos;
-        self.pos += 1;
-        ret
-    }
-}
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/src/lib.rs
+++ /dev/null
@@ -1,946 +0,0 @@
-#![cfg_attr(not(feature = "std"),  no_std)]
-#![cfg_attr(test, deny(warnings))]
-#![deny(missing_docs)]
-//! # httparse
-//!
-//! A push library for parsing HTTP/1.x requests and responses.
-//!
-//! The focus is on speed and safety. Unsafe code is used to keep parsing fast,
-//! but unsafety is contained in a submodule, with invariants enforced. The
-//! parsing internals use an `Iterator` instead of direct indexing, while
-//! skipping bounds checks.
-//!
-//! The speed is comparable to the fast picohttpparser, currently being around
-//! 1.6 times slower than pico. Improvements can be made as a `likely`
-//! intrinsic, and simd, are stabilized in rustc.
-
-#[cfg(feature = "std")] extern crate std as core;
-
-use core::{fmt, result, str, slice};
-
-use iter::Bytes;
-
-mod iter;
-
-macro_rules! next {
-    ($bytes:ident) => ({
-        match $bytes.next() {
-            Some(b) => b,
-            None => return Ok(Status::Partial)
-        }
-    })
-}
-
-macro_rules! expect {
-    ($bytes:ident.next() == $pat:pat => $ret:expr) => {
-        expect!(next!($bytes) => $pat |? $ret)
-    };
-    ($e:expr => $pat:pat |? $ret:expr) => {
-        match $e {
-            v@$pat => v,
-            _ => return $ret
-        }
-    };
-}
-
-macro_rules! complete {
-    ($e:expr) => {
-        match try!($e) {
-            Status::Complete(v) => v,
-            Status::Partial => return Ok(Status::Partial)
-        }
-    }
-}
-
-#[inline]
-fn shrink<T>(slice: &mut &mut [T], len: usize) {
-    debug_assert!(slice.len() >= len);
-    let ptr = slice.as_mut_ptr();
-    *slice = unsafe { slice::from_raw_parts_mut(ptr, len) };
-}
-
-/// Determines if byte is a token char.
-///
-/// > ```notrust
-/// > token          = 1*tchar
-/// >
-/// > tchar          = "!" / "#" / "$" / "%" / "&" / "'" / "*"
-/// >                / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
-/// >                / DIGIT / ALPHA
-/// >                ; any VCHAR, except delimiters
-/// > ```
-#[inline]
-fn is_token(b: u8) -> bool {
-    b > 0x1F && b < 0x7F
-}
-
-macro_rules! space {
-    ($bytes:ident or $err:expr) => ({
-        expect!($bytes.next() == b' ' => Err($err));
-        $bytes.slice();
-    })
-}
-
-macro_rules! newline {
-    ($bytes:ident) => ({
-        match next!($bytes) {
-            b'\r' => {
-                expect!($bytes.next() == b'\n' => Err(Error::NewLine));
-                $bytes.slice();
-            },
-            b'\n' => {
-                $bytes.slice();
-            },
-            _ => return Err(Error::NewLine)
-        }
-    })
-}
-
-/// An error in parsing.
-#[derive(Copy, Clone, PartialEq, Eq, Debug)]
-pub enum Error {
-    /// Invalid byte in header name.
-    HeaderName,
-    /// Invalid byte in header value.
-    HeaderValue,
-    /// Invalid byte in new line.
-    NewLine,
-    /// Invalid byte in Response status.
-    Status,
-    /// Invalid byte where token is required.
-    Token,
-    /// Parsed more headers than provided buffer can contain.
-    TooManyHeaders,
-    /// Invalid byte in HTTP version.
-    Version,
-}
-
-impl Error {
-    #[inline]
-    fn description_str(&self) -> &'static str {
-        match *self {
-            Error::HeaderName => "invalid header name",
-            Error::HeaderValue => "invalid header value",
-            Error::NewLine => "invalid new line",
-            Error::Status => "invalid response status",
-            Error::Token => "invalid token",
-            Error::TooManyHeaders => "too many headers",
-            Error::Version => "invalid HTTP version",
-        }
-    }
-}
-
-impl fmt::Display for Error {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(self.description_str())
-    }
-}
-
-#[cfg(feature = "std")]
-impl std::error::Error for Error {
-    fn description(&self) -> &str {
-        self.description_str()
-    }
-}
-
-/// An error in parsing a chunk size.
-// Note: Move this into the error enum once v2.0 is released.
-#[derive(Debug, PartialEq, Eq)]
-pub struct InvalidChunkSize;
-
-impl fmt::Display for InvalidChunkSize {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str("invalid chunk size")
-    }
-}
-
-/// A Result of any parsing action.
-///
-/// If the input is invalid, an `Error` will be returned. Note that incomplete
-/// data is not considered invalid, and so will not return an error, but rather
-/// a `Ok(Status::Partial)`.
-pub type Result<T> = result::Result<Status<T>, Error>;
-
-/// The result of a successful parse pass.
-///
-/// `Complete` is used when the buffer contained the complete value.
-/// `Partial` is used when parsing did not reach the end of the expected value,
-/// but no invalid data was found.
-#[derive(Copy, Clone, PartialEq, Debug)]
-pub enum Status<T> {
-    /// The completed result.
-    Complete(T),
-    /// A partial result.
-    Partial
-}
-
-impl<T> Status<T> {
-    /// Convenience method to check if status is complete.
-    #[inline]
-    pub fn is_complete(&self) -> bool {
-        match *self {
-            Status::Complete(..) => true,
-            Status::Partial => false
-        }
-    }
-
-    /// Convenience method to check if status is partial.
-    #[inline]
-    pub fn is_partial(&self) -> bool {
-        match *self {
-            Status::Complete(..) => false,
-            Status::Partial => true
-        }
-    }
-
-    /// Convenience method to unwrap a Complete value. Panics if the status is
-    /// `Partial`.
-    #[inline]
-    pub fn unwrap(self) -> T {
-        match self {
-            Status::Complete(t) => t,
-            Status::Partial => panic!("Tried to unwrap Status::Partial")
-        }
-    }
-}
-
-/// A parsed Request.
-///
-/// The optional values will be `None` if a parse was not complete, and did not
-/// parse the associated property. This allows you to inspect the parts that
-/// could be parsed, before reading more, in case you wish to exit early.
-///
-/// # Example
-///
-/// ```no_run
-/// let buf = b"GET /404 HTTP/1.1\r\nHost:";
-/// let mut headers = [httparse::EMPTY_HEADER; 16];
-/// let mut req = httparse::Request::new(&mut headers);
-/// let res = req.parse(buf).unwrap();
-/// if res.is_partial() {
-///     match req.path {
-///         Some(ref path) => {
-///             // check router for path.
-///             // /404 doesn't exist? we could stop parsing
-///         },
-///         None => {
-///             // must read more and parse again
-///         }
-///     }
-/// }
-/// ```
-pub struct Request<'headers, 'buf: 'headers> {
-    /// The request method, such as `GET`.
-    pub method: Option<&'buf str>,
-    /// The request path, such as `/about-us`.
-    pub path: Option<&'buf str>,
-    /// The request version, such as `HTTP/1.1`.
-    pub version: Option<u8>,
-    /// The request headers.
-    pub headers: &'headers mut [Header<'buf>]
-}
-
-impl<'h, 'b> Request<'h, 'b> {
-    /// Creates a new Request, using a slice of headers you allocate.
-    #[inline]
-    pub fn new(headers: &'h mut [Header<'b>]) -> Request<'h, 'b> {
-        Request {
-            method: None,
-            path: None,
-            version: None,
-            headers: headers,
-        }
-    }
-
-    /// Try to parse a buffer of bytes into the Request.
-    pub fn parse(&mut self, buf: &'b [u8]) -> Result<usize> {
-        let orig_len = buf.len();
-        let mut bytes = Bytes::new(buf);
-        complete!(skip_empty_lines(&mut bytes));
-        self.method = Some(complete!(parse_token(&mut bytes)));
-        self.path = Some(complete!(parse_token(&mut bytes)));
-        self.version = Some(complete!(parse_version(&mut bytes)));
-        newline!(bytes);
-
-        let len = orig_len - bytes.len();
-        let headers_len = complete!(parse_headers_iter(&mut self.headers, &mut bytes));
-
-        Ok(Status::Complete(len + headers_len))
-    }
-}
-
-#[inline]
-fn skip_empty_lines(bytes: &mut Bytes) -> Result<()> {
-    loop {
-        let b = bytes.peek();
-        match b {
-            Some(b'\r') => {
-                bytes.bump();
-                expect!(bytes.next() == b'\n' => Err(Error::NewLine));
-            },
-            Some(b'\n') => {
-                bytes.bump();
-            },
-            Some(..) => {
-                bytes.slice();
-                return Ok(Status::Complete(()));
-            },
-            None => return Ok(Status::Partial)
-        }
-    }
-}
-
-/// A parsed Response.
-///
-/// See `Request` docs for explanation of optional values.
-pub struct Response<'headers, 'buf: 'headers> {
-    /// The response version, such as `HTTP/1.1`.
-    pub version: Option<u8>,
-    /// The response code, such as `200`.
-    pub code: Option<u16>,
-    /// The response reason-phrase, such as `OK`.
-    pub reason: Option<&'buf str>,
-    /// The response headers.
-    pub headers: &'headers mut [Header<'buf>]
-}
-
-impl<'h, 'b> Response<'h, 'b> {
-    /// Creates a new `Response` using a slice of `Header`s you have allocated.
-    #[inline]
-    pub fn new(headers: &'h mut [Header<'b>]) -> Response<'h, 'b> {
-        Response {
-            version: None,
-            code: None,
-            reason: None,
-            headers: headers,
-        }
-    }
-
-    /// Try to parse a buffer of bytes into this `Response`.
-    pub fn parse(&mut self, buf: &'b [u8]) -> Result<usize> {
-        let orig_len = buf.len();
-        let mut bytes = Bytes::new(buf);
-
-        complete!(skip_empty_lines(&mut bytes));
-        self.version = Some(complete!(parse_version(&mut bytes)));
-        space!(bytes or Error::Version);
-        self.code = Some(complete!(parse_code(&mut bytes)));
-
-        // RFC7230 says there must be 'SP' and then reason-phrase, but admits
-        // its only for legacy reasons. With the reason-phrase completely
-        // optional (and preferred to be omitted) in HTTP2, we'll just
-        // handle any response that doesn't include a reason-phrase, because
-        // it's more lenient, and we don't care anyways.
-        //
-        // So, a SP means parse a reason-phrase.
-        // A newline means go to headers.
-        // Anything else we'll say is a malformed status.
-        match next!(bytes) {
-            b' ' => {
-                bytes.slice();
-                self.reason = Some(complete!(parse_reason(&mut bytes)));
-            },
-            b'\r' => {
-                expect!(bytes.next() == b'\n' => Err(Error::Status));
-                self.reason = Some("");
-            },
-            b'\n' => self.reason = Some(""),
-            _ => return Err(Error::Status),
-        }
-
-
-        let len = orig_len - bytes.len();
-        let headers_len = complete!(parse_headers_iter(&mut self.headers, &mut bytes));
-        Ok(Status::Complete(len + headers_len))
-    }
-}
-
-/// Represents a parsed header.
-#[derive(Copy, Clone, PartialEq, Debug)]
-pub struct Header<'a> {
-    /// The name portion of a header.
-    ///
-    /// A header name must be valid ASCII-US, so it's safe to store as a `&str`.
-    pub name: &'a str,
-    /// The value portion of a header.
-    ///
-    /// While headers **should** be ASCII-US, the specification allows for
-    /// values that may not be, and so the value is stored as bytes.
-    pub value: &'a [u8],
-}
-
-/// An empty header, useful for constructing a `Header` array to pass in for
-/// parsing.
-///
-/// # Example
-///
-/// ```
-/// let headers = [httparse::EMPTY_HEADER; 64];
-/// ```
-pub const EMPTY_HEADER: Header<'static> = Header { name: "", value: b"" };
-
-#[inline]
-fn parse_version(bytes: &mut Bytes) -> Result<u8> {
-    if let Some(mut eight) = bytes.next_8() {
-        expect!(eight._0() => b'H' |? Err(Error::Version));
-        expect!(eight._1() => b'T' |? Err(Error::Version));
-        expect!(eight._2() => b'T' |? Err(Error::Version));
-        expect!(eight._3() => b'P' |? Err(Error::Version));
-        expect!(eight._4() => b'/' |? Err(Error::Version));
-        expect!(eight._5() => b'1' |? Err(Error::Version));
-        expect!(eight._6() => b'.' |? Err(Error::Version));
-        let v = match eight._7() {
-            b'0' => 0,
-            b'1' => 1,
-            _ => return Err(Error::Version)
-        };
-        Ok(Status::Complete(v))
-    } else {
-        Ok(Status::Partial)
-    }
-}
-
-/// From [RFC 7230](https://tools.ietf.org/html/rfc7230):
-///
-/// > ```notrust
-/// > reason-phrase  = *( HTAB / SP / VCHAR / obs-text )
-/// > HTAB           = %x09        ; horizontal tab
-/// > VCHAR          = %x21-7E     ; visible (printing) characters
-/// > obs-text       = %x80-FF
-/// > ```
-///
-/// > A.2.  Changes from RFC 2616
-/// >
-/// > Non-US-ASCII content in header fields and the reason phrase
-/// > has been obsoleted and made opaque (the TEXT rule was removed).
-///
-/// Note that the following implementation deliberately rejects the obsoleted (non-US-ASCII) text range.
-///
-/// The fully compliant parser should probably just return the reason-phrase as an opaque &[u8] data
-/// and leave interpretation to user or specialized helpers (akin to .display() in std::path::Path)
-#[inline]
-fn parse_reason<'a>(bytes: &mut Bytes<'a>) -> Result<&'a str> {
-    loop {
-        let b = next!(bytes);
-        if b == b'\r' {
-            expect!(bytes.next() == b'\n' => Err(Error::Status));
-            return Ok(Status::Complete(unsafe {
-                // all bytes up till `i` must have been HTAB / SP / VCHAR
-                str::from_utf8_unchecked(bytes.slice_skip(2))
-            }));
-        } else if b == b'\n' {
-            return Ok(Status::Complete(unsafe {
-                // all bytes up till `i` must have been HTAB / SP / VCHAR
-                str::from_utf8_unchecked(bytes.slice_skip(1))
-            }));
-        } else if !((b >= 0x20 && b <= 0x7E) || b == b'\t') {
-            return Err(Error::Status);
-        }
-    }
-}
-
-#[inline]
-fn parse_token<'a>(bytes: &mut Bytes<'a>) -> Result<&'a str> {
-    loop {
-        let b = next!(bytes);
-        if b == b' ' {
-            return Ok(Status::Complete(unsafe {
-                // all bytes up till `i` must have been `is_token`.
-                str::from_utf8_unchecked(bytes.slice_skip(1))
-            }));
-        } else if !is_token(b) {
-            return Err(Error::Token);
-        }
-    }
-}
-
-#[inline]
-fn parse_code(bytes: &mut Bytes) -> Result<u16> {
-    let hundreds = expect!(bytes.next() == b'0'...b'9' => Err(Error::Status));
-    let tens = expect!(bytes.next() == b'0'...b'9' => Err(Error::Status));
-    let ones = expect!(bytes.next() == b'0'...b'9' => Err(Error::Status));
-
-    Ok(Status::Complete((hundreds - b'0') as u16 * 100 +
-                        (tens - b'0') as u16 * 10 +
-                        (ones - b'0') as u16))
-}
-
-/// Parse a buffer of bytes as headers.
-///
-/// The return value, if complete and successful, includes the index of the
-/// buffer that parsing stopped at, and a sliced reference to the parsed
-/// headers. The length of the slice will be equal to the number of properly
-/// parsed headers.
-///
-/// # Example
-///
-/// ```
-/// let buf = b"Host: foo.bar\nAccept: */*\n\nblah blah";
-/// let mut headers = [httparse::EMPTY_HEADER; 4];
-/// assert_eq!(httparse::parse_headers(buf, &mut headers),
-///            Ok(httparse::Status::Complete((27, &[
-///                httparse::Header { name: "Host", value: b"foo.bar" },
-///                httparse::Header { name: "Accept", value: b"*/*" }
-///            ][..]))));
-/// ```
-pub fn parse_headers<'b: 'h, 'h>(src: &'b [u8], mut dst: &'h mut [Header<'b>])
-    -> Result<(usize, &'h [Header<'b>])> {
-    let mut iter = Bytes::new(src);
-    let pos = complete!(parse_headers_iter(&mut dst, &mut iter));
-    Ok(Status::Complete((pos, dst)))
-}
-
-#[inline]
-fn parse_headers_iter<'a, 'b>(headers: &mut &mut [Header<'a>], bytes: &'b mut Bytes<'a>)
-    -> Result<usize> {
-    let mut num_headers: usize = 0;
-    let mut count: usize = 0;
-    let mut result = Err(Error::TooManyHeaders);
-
-    {
-        let mut iter = headers.iter_mut();
-
-        'headers: loop {
-            // a newline here means the head is over!
-            let b = next!(bytes);
-            if b == b'\r' {
-                expect!(bytes.next() == b'\n' => Err(Error::NewLine));
-                result = Ok(Status::Complete(count + bytes.pos()));
-                break;
-            } else if b == b'\n' {
-                result = Ok(Status::Complete(count + bytes.pos()));
-                break;
-            } else if b == b':' || !is_token(b) {
-                return Err(Error::HeaderName);
-            }
-
-            let header = match iter.next() {
-                Some(header) => header,
-                None => break 'headers
-            };
-
-            num_headers += 1;
-            // parse header name until colon
-            loop {
-                let b = next!(bytes);
-                if b == b':' {
-                    count += bytes.pos();
-                    header.name = unsafe {
-                        str::from_utf8_unchecked(bytes.slice_skip(1))
-                    };
-                    break;
-                } else if !is_token(b) {
-                    return Err(Error::HeaderName);
-                }
-            }
-
-            let mut b;
-
-            'value: loop {
-
-                // eat white space between colon and value
-                loop {
-                    b = next!(bytes);
-                    if b == b' ' || b == b'\t' {
-                        count += bytes.pos();
-                        bytes.slice();
-                        continue;
-                    } else {
-                        if !is_token(b) {
-                            if (b < 0o40 && b != 0o11) || b == 0o177 {
-                                break 'value;
-                            }
-                        }
-                        break;
-                    }
-                }
-
-                // parse value till EOL
-
-
-
-                macro_rules! check {
-                    ($bytes:ident, $i:ident) => ({
-                        b = $bytes.$i();
-                        if !is_token(b) {
-                            if (b < 0o40 && b != 0o11) || b == 0o177 {
-                                break 'value;
-                            }
-                        }
-                    });
-                    ($bytes:ident) => ({
-                        check!($bytes, _0);
-                        check!($bytes, _1);
-                        check!($bytes, _2);
-                        check!($bytes, _3);
-                        check!($bytes, _4);
-                        check!($bytes, _5);
-                        check!($bytes, _6);
-                        check!($bytes, _7);
-                    })
-                }
-                while let Some(mut bytes8) = bytes.next_8() {
-                    check!(bytes8);
-                }
-                loop {
-                    b = next!(bytes);
-                    if !is_token(b) {
-                        if (b < 0o40 && b != 0o11) || b == 0o177 {
-                            break 'value;
-                        }
-                    }
-                }
-            }
-
-            //found_ctl
-            if b == b'\r' {
-                expect!(bytes.next() == b'\n' => Err(Error::HeaderValue));
-                count += bytes.pos();
-                header.value = bytes.slice_skip(2);
-            } else if b == b'\n' {
-                count += bytes.pos();
-                header.value = bytes.slice_skip(1);
-            } else {
-                return Err(Error::HeaderValue);
-            }
-
-        }
-    } // drop iter
-
-    shrink(headers, num_headers);
-    result
-}
-
-/// Parse a buffer of bytes as a chunk size.
-///
-/// The return value, if complete and successful, includes the index of the
-/// buffer that parsing stopped at, and the size of the following chunk.
-///
-/// # Example
-///
-/// ```
-/// let buf = b"4\r\nRust\r\n0\r\n\r\n";
-/// assert_eq!(httparse::parse_chunk_size(buf),
-///            Ok(httparse::Status::Complete((3, 4))));
-/// ```
-pub fn parse_chunk_size(buf: &[u8])
-        -> result::Result<Status<(usize, u64)>, InvalidChunkSize> {
-    const RADIX: u64 = 16;
-    let mut bytes = Bytes::new(buf);
-    let mut size = 0;
-    let mut in_chunk_size = true;
-    let mut in_ext = false;
-    let mut count = 0;
-    loop {
-        let b = next!(bytes);
-        match b {
-            b'0'...b'9' if in_chunk_size => {
-                if count > 15 {
-                    return Err(InvalidChunkSize);
-                }
-                count += 1;
-                size *= RADIX;
-                size += (b - b'0') as u64;
-            },
-            b'a'...b'f' if in_chunk_size => {
-                if count > 15 {
-                    return Err(InvalidChunkSize);
-                }
-                count += 1;
-                size *= RADIX;
-                size += (b + 10 - b'a') as u64;
-            }
-            b'A'...b'F' if in_chunk_size => {
-                if count > 15 {
-                    return Err(InvalidChunkSize);
-                }
-                count += 1;
-                size *= RADIX;
-                size += (b + 10 - b'A') as u64;
-            }
-            b'\r' => {
-                match next!(bytes) {
-                    b'\n' => break,
-                    _ => return Err(InvalidChunkSize),
-                }
-            }
-            // If we weren't in the extension yet, the ";" signals its start
-            b';' if !in_ext => {
-                in_ext = true;
-                in_chunk_size = false;
-            }
-            // "Linear white space" is ignored between the chunk size and the
-            // extension separator token (";") due to the "implied *LWS rule".
-            b'\t' | b' ' if !in_ext & !in_chunk_size => {}
-            // LWS can follow the chunk size, but no more digits can come
-            b'\t' | b' ' if in_chunk_size => in_chunk_size = false,
-            // We allow any arbitrary octet once we are in the extension, since
-            // they all get ignored anyway. According to the HTTP spec, valid
-            // extensions would have a more strict syntax:
-            //     (token ["=" (token | quoted-string)])
-            // but we gain nothing by rejecting an otherwise valid chunk size.
-            _ if in_ext => {}
-            // Finally, if we aren't in the extension and we're reading any
-            // other octet, the chunk size line is invalid!
-            _ => return Err(InvalidChunkSize),
-        }
-    }
-    Ok(Status::Complete((bytes.pos(), size)))
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Request, Response, Status, EMPTY_HEADER, shrink, parse_chunk_size};
-
-    const NUM_OF_HEADERS: usize = 4;
-
-    #[test]
-    fn test_shrink() {
-        let mut arr = [EMPTY_HEADER; 16];
-        {
-            let slice = &mut &mut arr[..];
-            assert_eq!(slice.len(), 16);
-            shrink(slice, 4);
-            assert_eq!(slice.len(), 4);
-        }
-        assert_eq!(arr.len(), 16);
-    }
-
-    macro_rules! req {
-        ($name:ident, $buf:expr, |$arg:ident| $body:expr) => (
-            req! {$name, $buf, Ok(Status::Complete($buf.len())), |$arg| $body }
-        );
-        ($name:ident, $buf:expr, $len:expr, |$arg:ident| $body:expr) => (
-        #[test]
-        fn $name() {
-            let mut headers = [EMPTY_HEADER; NUM_OF_HEADERS];
-            let mut req = Request::new(&mut headers[..]);
-            let status = req.parse($buf.as_ref());
-            assert_eq!(status, $len);
-            closure(req);
-
-            fn closure($arg: Request) {
-                $body
-            }
-        }
-        )
-    }
-
-    req! {
-        test_request_simple,
-        b"GET / HTTP/1.1\r\n\r\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers.len(), 0);
-        }
-    }
-
-    req! {
-        test_request_headers,
-        b"GET / HTTP/1.1\r\nHost: foo.com\r\nCookie: \r\n\r\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers.len(), 2);
-            assert_eq!(req.headers[0].name, "Host");
-            assert_eq!(req.headers[0].value, b"foo.com");
-            assert_eq!(req.headers[1].name, "Cookie");
-            assert_eq!(req.headers[1].value, b"");
-        }
-    }
-
-    req! {
-        test_request_headers_max,
-        b"GET / HTTP/1.1\r\nA: A\r\nB: B\r\nC: C\r\nD: D\r\n\r\n",
-        |req| {
-            assert_eq!(req.headers.len(), NUM_OF_HEADERS);
-        }
-    }
-
-    req! {
-        test_request_multibyte,
-        b"GET / HTTP/1.1\r\nHost: foo.com\r\nUser-Agent: \xe3\x81\xb2\xe3/1.0\r\n\r\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers[0].name, "Host");
-            assert_eq!(req.headers[0].value, b"foo.com");
-            assert_eq!(req.headers[1].name, "User-Agent");
-            assert_eq!(req.headers[1].value, b"\xe3\x81\xb2\xe3/1.0");
-        }
-    }
-
-
-    req! {
-        test_request_partial,
-        b"GET / HTTP/1.1\r\n\r", Ok(Status::Partial),
-        |_req| {}
-    }
-
-    req! {
-        test_request_newlines,
-        b"GET / HTTP/1.1\nHost: foo.bar\n\n",
-        |_r| {}
-    }
-
-    req! {
-        test_request_empty_lines_prefix,
-        b"\r\n\r\nGET / HTTP/1.1\r\n\r\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers.len(), 0);
-        }
-    }
-
-    req! {
-        test_request_empty_lines_prefix_lf_only,
-        b"\n\nGET / HTTP/1.1\n\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers.len(), 0);
-        }
-    }
-
-    req! {
-        test_request_with_invalid_token_delimiter,
-        b"GET\n/ HTTP/1.1\r\nHost: foo.bar\r\n\r\n",
-        Err(::Error::Token),
-        |_r| {}
-    }
-
-    macro_rules! res {
-        ($name:ident, $buf:expr, |$arg:ident| $body:expr) => (
-            res! {$name, $buf, Ok(Status::Complete($buf.len())), |$arg| $body }
-        );
-        ($name:ident, $buf:expr, $len:expr, |$arg:ident| $body:expr) => (
-        #[test]
-        fn $name() {
-            let mut headers = [EMPTY_HEADER; NUM_OF_HEADERS];
-            let mut res = Response::new(&mut headers[..]);
-            let status = res.parse($buf.as_ref());
-            assert_eq!(status, $len);
-            closure(res);
-
-            fn closure($arg: Response) {
-                $body
-            }
-        }
-        )
-    }
-
-    res! {
-        test_response_simple,
-        b"HTTP/1.1 200 OK\r\n\r\n",
-        |res| {
-            assert_eq!(res.version.unwrap(), 1);
-            assert_eq!(res.code.unwrap(), 200);
-            assert_eq!(res.reason.unwrap(), "OK");
-        }
-    }
-
-    res! {
-        test_response_newlines,
-        b"HTTP/1.0 403 Forbidden\nServer: foo.bar\n\n",
-        |_r| {}
-    }
-
-    res! {
-        test_response_reason_missing,
-        b"HTTP/1.1 200 \r\n\r\n",
-        |res| {
-            assert_eq!(res.version.unwrap(), 1);
-            assert_eq!(res.code.unwrap(), 200);
-            assert_eq!(res.reason.unwrap(), "");
-        }
-    }
-
-    res! {
-        test_response_reason_missing_no_space,
-        b"HTTP/1.1 200\r\n\r\n",
-        |res| {
-            assert_eq!(res.version.unwrap(), 1);
-            assert_eq!(res.code.unwrap(), 200);
-            assert_eq!(res.reason.unwrap(), "");
-        }
-    }
-
-    res! {
-        test_response_reason_with_space_and_tab,
-        b"HTTP/1.1 101 Switching Protocols\t\r\n\r\n",
-        |res| {
-            assert_eq!(res.version.unwrap(), 1);
-            assert_eq!(res.code.unwrap(), 101);
-            assert_eq!(res.reason.unwrap(), "Switching Protocols\t");
-        }
-    }
-
-    static RESPONSE_REASON_WITH_OBS_TEXT_BYTE: &'static [u8] = b"HTTP/1.1 200 X\xFFZ\r\n\r\n";
-    res! {
-        test_response_reason_with_obsolete_text_byte,
-        RESPONSE_REASON_WITH_OBS_TEXT_BYTE,
-        Err(::Error::Status),
-        |_res| {}
-    }
-
-    res! {
-        test_response_reason_with_nul_byte,
-        b"HTTP/1.1 200 \x00\r\n\r\n",
-        Err(::Error::Status),
-        |_res| {}
-    }
-
-    res! {
-        test_response_version_missing_space,
-        b"HTTP/1.1",
-        Ok(Status::Partial),
-        |_res| {}
-    }
-
-    res! {
-        test_response_code_missing_space,
-        b"HTTP/1.1 200",
-        Ok(Status::Partial),
-        |_res| {}
-    }
-
-    res! {
-        test_response_empty_lines_prefix_lf_only,
-        b"\n\nHTTP/1.1 200 OK\n\n",
-        |_res| {}
-    }
-
-    #[test]
-    fn test_chunk_size() {
-        assert_eq!(parse_chunk_size(b"0\r\n"), Ok(Status::Complete((3, 0))));
-        assert_eq!(parse_chunk_size(b"12\r\nchunk"), Ok(Status::Complete((4, 18))));
-        assert_eq!(parse_chunk_size(b"3086d\r\n"), Ok(Status::Complete((7, 198765))));
-        assert_eq!(parse_chunk_size(b"3735AB1;foo bar*\r\n"), Ok(Status::Complete((18, 57891505))));
-        assert_eq!(parse_chunk_size(b"3735ab1 ; baz \r\n"), Ok(Status::Complete((16, 57891505))));
-        assert_eq!(parse_chunk_size(b"77a65\r"), Ok(Status::Partial));
-        assert_eq!(parse_chunk_size(b"ab"), Ok(Status::Partial));
-        assert_eq!(parse_chunk_size(b"567f8a\rfoo"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"567f8a\rfoo"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"567xf8a\r\n"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"ffffffffffffffff\r\n"), Ok(Status::Complete((18, ::core::u64::MAX))));
-        assert_eq!(parse_chunk_size(b"1ffffffffffffffff\r\n"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"Affffffffffffffff\r\n"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"fffffffffffffffff\r\n"), Err(::InvalidChunkSize));
-    }
-
-    #[cfg(feature = "std")]
-    #[test]
-    fn test_std_error() {
-        use super::Error;
-        use std::error::Error as StdError;
-        let err = Error::HeaderName;
-        assert_eq!(err.to_string(), err.description());
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{"Cargo.toml":"fdead335b20982f9530d61f0bc2049b61af773ec712d1895a780478abbcf4dfd","LICENSE":"df9cfd06d8a44d9a671eadd39ffd97f166481da015a30f45dfd27886209c5922","build.rs":"5b349037786f2f81402943423213d8c63e8fc8e321937da85f6d854ed825a84f","src/buffer.rs":"c8c7dbbb1d848b2c08a18c38b5214bfbd8aa457557c31a9a6f1de2f5aadc3d6a","src/client/mod.rs":"adca4f6090c9806641ace04488a4b28a56e8cd60411bbd9cc856b349fdb19797","src/client/pool.rs":"7c22c8e09af9d56e05a6caaf174b78043e10171982143b8e64118d0dd401efab","src/client/proxy.rs":"0fb671fddb1c377646dc86b620b086941d56354659eace4eb387f414c345fe6b","src/client/request.rs":"c9029bbf1c27ad11d78f61e1f1175b6417eecbc3b9053c33d8c08daf61f72570","src/client/response.rs":"64fa127a3d0f5b234a921eb3be26f89021a06f03e8770f7cbe64047ec40522e5","src/error.rs":"3b3d27425118d08b1205fe7a1c91037b6ad5791cb7ccfbf53207388cb4edca1b","src/header/common/accept.rs":"d4203a24788e23fcf1ef081e9d5ab010e95d48b67532417600b6f4ff7b4a103b","src/header/common/accept_charset.rs":"f2664acc80c429c32325b4128feedc12e47357be17550821929f8002c85af214","src/header/common/accept_encoding.rs":"bea61eb5cd40564a01a0cbbd139e8b070fd8b8489c7af08de9541f607e50fbb2","src/header/common/accept_language.rs":"2e0155b85d991a0b917be1e54a9eda019597aeb4bf61cbd841fbe92f186262a3","src/header/common/accept_ranges.rs":"df351621f0753340697b0a0ceab030580c8604d6a3a5c3c3415b9fca55c04330","src/header/common/access_control_allow_credentials.rs":"c68a618d51235be37d12746fad6248c07d6c904106cd0a97be2239efab8ce941","src/header/common/access_control_allow_headers.rs":"4781e3ce4ef2ee4e90a9f775742d55751c5403b0b11539f96c9e5c76d7a3029e","src/header/common/access_control_allow_methods.rs":"0f72c4e70e74f0be8ddae576220b2cea11e2d848512e5ffb329206275908383d","src/header/common/access_control_allow_origin.rs":"933fdc7d147f7706b191ad6943b341887d9260ef7480384deb2563cd31a43cd1","src/header/common/access_control_expose_headers.rs":"f026676e762ac5c5e6ae33543ceba4e484406e89306d0b3873507814675f408a","src/header/common/access_control_max_age.rs":"1c5970cfaf15ab3ab602b215ab119f100343a7f9e4f85a6711ea21a12f369402","src/header/common/access_control_request_headers.rs":"879810240d82544c581b5057808657f9445bf823e19a990e5e88d43d28b88ce6","src/header/common/access_control_request_method.rs":"fd5bc2396dbf0977c616d7b262f2441e60d3e2806c54d0838195cdedd992e7f1","src/header/common/allow.rs":"8b12d0c7f9a76f2aec826ba80097efa784304f50e2e0ce330d8ffd810bb7dd7d","src/header/common/authorization.rs":"888cca057e0c45757ccbe31c7fdf34b9fa4b62285869e4d525f338d7003ac67c","src/header/common/cache_control.rs":"de2c876b78b83ce080007d3413a13e7770963cec49cd0202a8ffb0259185f95f","src/header/common/connection.rs":"5584948f8baae51a480ab6badf23fcb2aa2df6f3db5bd12ba09dcd08d1d01643","src/header/common/content_disposition.rs":"b6be5e65ec73113e045b73a0f69f63204942e25a3b9469f2f59c032c587e111f","src/header/common/content_encoding.rs":"636e07b326036f0d903fe7bce4e49da56dc43ed53d7dd158a906c06bd7466ad2","src/header/common/content_language.rs":"0c42bebf462b570a6dae46580685cb931feaf83b8fd6a0e89a29f7383397f393","src/header/common/content_length.rs":"c792029182c0213d4e2cc90f66210c01f164a4a8b25abadaa74ce51947ad4c76","src/header/common/content_range.rs":"5fab7832b985489b76c698654a4891aaaff6b671b7174dc25c2c4abeeb0d14eb","src/header/common/content_type.rs":"cd6db1ac9159317a467df0feebf66fa0f2e976f81aa339f3e1402110ee16cdad","src/header/common/cookie.rs":"f38e0ece0f4ddf6f5bacd7b1199aab289a5943dd1151c525970837b24fb7e59c","src/header/common/date.rs":"b3516aee3bb26ee5b2a97829ea45d6440512cbd9ef862f9e7f65a39f282e207e","src/header/common/etag.rs":"d7548c554751bb74c5ef53095cd30074e48bb39802190d8caec90621d16c6e9b","src/header/common/expect.rs":"754c5d648086429d6d9c7cebcd86d59703893d6ff904ae5de5217bb71a860496","src/header/common/expires.rs":"351a28af03596aa5ae7dbe97485ef2e717bb5567d8a5ae830e8c1968bbb236ec","src/header/common/from.rs":"05d9f1675c7d3f2caa7082fe44f5e89c3a4104af26ff21b9846443ccde0df12a","src/header/common/host.rs":"f296d9c92c0462a937636190bc3aae8a8f9e3473bd8b7cd5963870fc03686bc2","src/header/common/if_match.rs":"a0919e71b40b51e447d21fce6b9fbe779de84ae228dc4769a237a2aa34cbb201","src/header/common/if_modified_since.rs":"b722b471531740b4e200da3f53182fea6d0b750931664d233674d99f7f92767f","src/header/common/if_none_match.rs":"f810a9fc0161bd293b8ea6f18d84120d7950557c46fb07028e7351c0fbaed0fa","src/header/common/if_range.rs":"bdc77ca3c6b392aaf38c778f69756933f8a59cb946839e801508548aef891153","src/header/common/if_unmodified_since.rs":"9783ab6133cab3b38800c0049338ff697390f0915f6b7d9b81a485f028ae2dbc","src/header/common/last-event-id.rs":"e773661a46c926b2ecd93cd1a1ca5a6c361b1b8d0c9d004c9ba0bb6b96995e4a","src/header/common/last_modified.rs":"26949ae19bb17e660a3c2c967a7e066c1cc79ea987e5c5b8627a211952d18eb0","src/header/common/location.rs":"ed3482f4f806e6241d70aabbc5ce409022ab5d85aa33d7c1e8a50385aec31a7a","src/header/common/mod.rs":"2af70a911729077f2bfa4fc5da46bf9adf122426ce78ef529de9317069d28117","src/header/common/origin.rs":"c5d38d5c47494038badf85154eae5aa529821adbb8d91e04845cd1939a3acb70","src/header/common/pragma.rs":"024f6d401d6a2c363fb81afcf57dd4cfb164a7ce5a5e4dc9f9b7a95d1ea829d1","src/header/common/prefer.rs":"e680be23a4ed754e357d607a3cbdd9e00d2591fd26058f7f43f7757a86be32f5","src/header/common/preference_applied.rs":"13841597fcd9f1049fc515ea0a401975b3a0c4851c6664e9e4afcba987184680","src/header/common/range.rs":"553a3cb2ba7531418ca56f39f20a6f03b7cb07258b8a70a9ff52c224ae410e93","src/header/common/referer.rs":"e40aebce1e21a8a939df1cb331ed6ab84c37a261fde83b788be1f82710bdb2ba","src/header/common/referrer_policy.rs":"a72fd93ae042aaa5ecfe548a12b6ac07dcd8efdc375591f6f851332f4398684c","src/header/common/server.rs":"e3c7963bd341573c513bf1a1a15bbe38a78f5d8029f6783a8d679ce17969cbe0","src/header/common/set_cookie.rs":"ca02d00f2ec18b4059b1979e3f66a4fadcacacb0f9a8c7faf7a2535f7ad0d6e8","src/header/common/strict_transport_security.rs":"16d20d713979143c9a22326bffc29b31d15e51937f150888c5cdf5b844c881bb","src/header/common/transfer_encoding.rs":"0ae112334bba0b5bb64e4a67059209ed5fb8f034cd24966d63cbfff714480df1","src/header/common/upgrade.rs":"caa2777900ebbd1239a322e0f84b745b688d270fac331d86b0979fe0140cfe63","src/header/common/user_agent.rs":"3f8396206a2cad8d925d391321ebc2d7625f18ea2efcb8562958748369f83111","src/header/common/vary.rs":"ea9ca2d338f01b3a60cb7734532e8717a85c93c15eb1f4701c620fee42a5e9f5","src/header/internals/cell.rs":"0dcc63cf60ce028cf5bfabfcf3e04cb295b474174807c7ea9a97e9f6b7bfadb7","src/header/internals/item.rs":"05973f19f40deaccf9b363645cc13cf4c702c4d22ddebb5e6af9a14d592e5a24","src/header/internals/mod.rs":"a7584044f256ee1be3ba1542c7ce32263aa9d62700571430b1d723c5cf53f383","src/header/internals/vec_map.rs":"5ff364116d9864d05a8488291def3b754844c082aea4cd58d6243ddae7277ce0","src/header/mod.rs":"df6412ebd012881dc188ffff1b5c4a3a0f7f271845760fdd7ffb2d8f97a67e77","src/header/parsing.rs":"5cb02c694b2bdd16abf9b6bc6af3c01b143f01e26f60ce2fb69c6b0c0c19017f","src/header/shared/charset.rs":"71087f535a425d7d17cb3de69f1016e6602032b957d49fe121f6e56f1bf26e2f","src/header/shared/encoding.rs":"9c3b39f074bcadab68e158beea5e35d43de0c717971839d2e1ae43468d7bd7f7","src/header/shared/entity.rs":"b70b08c6511f7fd5539e4e42685423bf2f5fb3d5333fe3175e9010b890d0b654","src/header/shared/httpdate.rs":"6401ebff650228ddc457e3d4b008208254c62a478ea98367e87ffe6cbb106992","src/header/shared/mod.rs":"7216081f6253959364d9aa3abf16f17462baab48f16d174078c61c71ad023c0f","src/header/shared/quality_item.rs":"284d1b35af35d2244459f4ade87c1897a949ef047d4e784738635d558ea157b4","src/http/h1.rs":"1d607c89a390d629648a2ff38ae95059a698ad0b36b925d9c7bbad7c764c8538","src/http/message.rs":"c09939bb38c40d5a8124f5b60b8fc539aa10a11b4a46c1c3f74d097fa8ecc088","src/http/mod.rs":"9112fb2e59070d105fb361afc600f85cd6a5e21d4d007eaa821145e9b7e63f55","src/lib.rs":"0c130e83db8da5d631cb10c364b879aa0b0b7926d8025a4c874de496b87fa900","src/method.rs":"f6fbd5f697cb28f073881cca26004ea3e97638a4b0e44c6192a426b9e762e9cc","src/mock.rs":"e366916d8c55099b1b9dee5cdbe26f1f2faff6ff9d659e476cbe578263dda2c6","src/net.rs":"15d6e3c20ca97641cca8bdf80a67296823e79be28b4492b48b0f74411439a105","src/server/listener.rs":"6bd4abda51fde6e38087923dff198aef7b5bc119add2e81d59173a215c512b9d","src/server/mod.rs":"d9f8796114740b08592621d9f461eb6c7d6baf692f409ebce4f0c44588148cdd","src/server/request.rs":"ce125e73bd3b9bf8b75af94c31a85fb5a5e8d3d11f7e758ecbbd51a4b2670af0","src/server/response.rs":"7b1e40ba04f2321a62042c13723596729e69883abc4912a5371911d9a0e2a474","src/status.rs":"6c3af3f4cac43748be938bfc7c2aeabe63f32fef233d7c2a7ea7a933c7c19699","src/uri.rs":"26c357704a80d5c8ffd28123617862ffff0213613f1aec6a5758be49244379c8","src/version.rs":"e56f6962a2ae701f3923bfce0a3d150f9caea28e8880598affb723190776cd4a"},"package":"36e108e0b1fa2d17491cbaac4bc460dc0956029d10ccf83c913dd0e5db3e7f07"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/Cargo.toml
+++ /dev/null
@@ -1,44 +0,0 @@
-[package]
-
-name = "hyper"
-version = "0.10.10"
-description = "A modern HTTP library."
-readme = "README.md"
-homepage = "http://hyper.rs"
-documentation = "http://hyper.rs/hyper"
-repository = "https://github.com/hyperium/hyper"
-license = "MIT"
-authors = ["Sean McArthur <sean.monstar@gmail.com>",
-           "Jonathan Reem <jonathan.reem@gmail.com>"]
-keywords = ["http", "hyper", "hyperium"]
-categories = ["web-programming::http-client", "web-programming::http-server"]
-build = "build.rs"
-
-include = [
-  "build.rs",
-  "Cargo.toml",
-  "LICENSE",
-  "src/**/*"
-]
-
-[dependencies]
-base64 = "0.5.2"
-httparse = "1.0"
-language-tags = "0.2"
-log = "0.3"
-mime = "0.2"
-num_cpus = "1.0"
-time = "0.1"
-traitobject = "0.1"
-typeable = "0.1"
-unicase = "1.0"
-url = "1.0"
-
-[dev-dependencies]
-env_logger = "0.3"
-
-[build-dependencies]
-rustc_version = "0.1"
-
-[features]
-nightly = []
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Sean McArthur
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/build.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-extern crate rustc_version as rustc;
-
-fn main() {
-    if rustc::version_matches(">= 1.9") {
-        println!("cargo:rustc-cfg=has_deprecated");
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/buffer.rs
+++ /dev/null
@@ -1,197 +0,0 @@
-use std::cmp;
-use std::io::{self, Read, BufRead};
-
-pub struct BufReader<R> {
-    inner: R,
-    buf: Vec<u8>,
-    pos: usize,
-    cap: usize,
-}
-
-const INIT_BUFFER_SIZE: usize = 4096;
-const MAX_BUFFER_SIZE: usize = 8192 + 4096 * 100;
-
-impl<R: Read> BufReader<R> {
-    #[inline]
-    pub fn new(rdr: R) -> BufReader<R> {
-        BufReader::with_capacity(rdr, INIT_BUFFER_SIZE)
-    }
-
-    #[inline]
-    pub fn from_parts(rdr: R, buf: Vec<u8>, pos: usize, cap: usize) -> BufReader<R> {
-        BufReader {
-            inner: rdr,
-            buf: buf,
-            pos: pos,
-            cap: cap,
-        }
-    }
-
-    #[inline]
-    pub fn with_capacity(rdr: R, cap: usize) -> BufReader<R> {
-        BufReader {
-            inner: rdr,
-            buf: vec![0; cap],
-            pos: 0,
-            cap: 0,
-        }
-    }
-
-    #[inline]
-    pub fn get_ref(&self) -> &R { &self.inner }
-
-    #[inline]
-    pub fn get_mut(&mut self) -> &mut R { &mut self.inner }
-
-    #[inline]
-    pub fn get_buf(&self) -> &[u8] {
-        if self.pos < self.cap {
-            trace!("get_buf [u8; {}][{}..{}]", self.buf.len(), self.pos, self.cap);
-            &self.buf[self.pos..self.cap]
-        } else {
-            trace!("get_buf []");
-            &[]
-        }
-    }
-
-    /// Extracts the buffer from this reader. Return the current cursor position
-    /// and the position of the last valid byte.
-    ///
-    /// This operation does not copy the buffer. Instead, it directly returns
-    /// the internal buffer. As a result, this reader will no longer have any
-    /// buffered contents and any subsequent read from this reader will not
-    /// include the returned buffered contents.
-    #[inline]
-    pub fn take_buf(&mut self) -> (Vec<u8>, usize, usize) {
-        let (pos, cap) = (self.pos, self.cap);
-        self.pos = 0;
-        self.cap = 0;
-
-        let mut output = vec![0; INIT_BUFFER_SIZE];
-        ::std::mem::swap(&mut self.buf, &mut output);
-        (output, pos, cap)
-    }
-
-    #[inline]
-    pub fn into_inner(self) -> R { self.inner }
-
-    #[inline]
-    pub fn into_parts(self) -> (R, Vec<u8>, usize, usize) {
-        (self.inner, self.buf, self.pos, self.cap)
-    }
-
-    #[inline]
-    pub fn read_into_buf(&mut self) -> io::Result<usize> {
-        self.maybe_reserve();
-        let v = &mut self.buf;
-        trace!("read_into_buf buf[{}..{}]", self.cap, v.len());
-        if self.cap < v.capacity() {
-            let nread = try!(self.inner.read(&mut v[self.cap..]));
-            self.cap += nread;
-            Ok(nread)
-        } else {
-            trace!("read_into_buf at full capacity");
-            Ok(0)
-        }
-    }
-
-    #[inline]
-    fn maybe_reserve(&mut self) {
-        let cap = self.buf.capacity();
-        if self.cap == cap && cap < MAX_BUFFER_SIZE {
-            self.buf.reserve(cmp::min(cap * 4, MAX_BUFFER_SIZE) - cap);
-            let new = self.buf.capacity() - self.buf.len();
-            trace!("reserved {}", new);
-            unsafe { grow_zerofill(&mut self.buf, new) }
-        }
-    }
-}
-
-#[inline]
-unsafe fn grow_zerofill(buf: &mut Vec<u8>, additional: usize) {
-    use std::ptr;
-    let len = buf.len();
-    buf.set_len(len + additional);
-    ptr::write_bytes(buf.as_mut_ptr().offset(len as isize), 0, additional);
-}
-
-impl<R: Read> Read for BufReader<R> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        if self.cap == self.pos && buf.len() >= self.buf.len() {
-            return self.inner.read(buf);
-        }
-        let nread = {
-           let mut rem = try!(self.fill_buf());
-           try!(rem.read(buf))
-        };
-        self.consume(nread);
-        Ok(nread)
-    }
-}
-
-impl<R: Read> BufRead for BufReader<R> {
-    fn fill_buf(&mut self) -> io::Result<&[u8]> {
-        if self.pos == self.cap {
-            self.cap = try!(self.inner.read(&mut self.buf));
-            self.pos = 0;
-        }
-        Ok(&self.buf[self.pos..self.cap])
-    }
-
-    #[inline]
-    fn consume(&mut self, amt: usize) {
-        self.pos = cmp::min(self.pos + amt, self.cap);
-        if self.pos == self.cap {
-            self.pos = 0;
-            self.cap = 0;
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-
-    use std::io::{self, Read, BufRead};
-    use super::BufReader;
-
-    struct SlowRead(u8);
-
-    impl Read for SlowRead {
-        fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-            let state = self.0;
-            self.0 += 1;
-            (&match state % 3 {
-                0 => b"foo",
-                1 => b"bar",
-                _ => b"baz",
-            }[..]).read(buf)
-        }
-    }
-
-    #[test]
-    fn test_consume_and_get_buf() {
-        let mut rdr = BufReader::new(SlowRead(0));
-        rdr.read_into_buf().unwrap();
-        rdr.consume(1);
-        assert_eq!(rdr.get_buf(), b"oo");
-        rdr.read_into_buf().unwrap();
-        rdr.read_into_buf().unwrap();
-        assert_eq!(rdr.get_buf(), b"oobarbaz");
-        rdr.consume(5);
-        assert_eq!(rdr.get_buf(), b"baz");
-        rdr.consume(3);
-        assert_eq!(rdr.get_buf(), b"");
-        assert_eq!(rdr.pos, 0);
-        assert_eq!(rdr.cap, 0);
-    }
-
-    #[test]
-    fn test_resize() {
-        let raw = b"hello world";
-        let mut rdr = BufReader::with_capacity(&raw[..], 5);
-        rdr.read_into_buf().unwrap();
-        assert_eq!(rdr.get_buf(), b"hello");
-        rdr.read_into_buf().unwrap();
-        assert_eq!(rdr.get_buf(), b"hello world");
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/client/mod.rs
+++ /dev/null
@@ -1,724 +0,0 @@
-//! HTTP Client
-//!
-//! # Usage
-//!
-//! The `Client` API is designed for most people to make HTTP requests.
-//! It utilizes the lower level `Request` API.
-//!
-//! ## GET
-//!
-//! ```no_run
-//! # use hyper::Client;
-//! let client = Client::new();
-//!
-//! let res = client.get("http://example.domain").send().unwrap();
-//! assert_eq!(res.status, hyper::Ok);
-//! ```
-//!
-//! The returned value is a `Response`, which provides easy access to
-//! the `status`, the `headers`, and the response body via the `Read`
-//! trait.
-//!
-//! ## POST
-//!
-//! ```no_run
-//! # use hyper::Client;
-//! let client = Client::new();
-//!
-//! let res = client.post("http://example.domain")
-//!     .body("foo=bar")
-//!     .send()
-//!     .unwrap();
-//! assert_eq!(res.status, hyper::Ok);
-//! ```
-//!
-//! # Sync
-//!
-//! The `Client` implements `Sync`, so you can share it among multiple threads
-//! and make multiple requests simultaneously.
-//!
-//! ```no_run
-//! # use hyper::Client;
-//! use std::sync::Arc;
-//! use std::thread;
-//!
-//! // Note: an Arc is used here because `thread::spawn` creates threads that
-//! // can outlive the main thread, so we must use reference counting to keep
-//! // the Client alive long enough. Scoped threads could skip the Arc.
-//! let client = Arc::new(Client::new());
-//! let clone1 = client.clone();
-//! let clone2 = client.clone();
-//! thread::spawn(move || {
-//!     clone1.get("http://example.domain").send().unwrap();
-//! });
-//! thread::spawn(move || {
-//!     clone2.post("http://example.domain/post").body("foo=bar").send().unwrap();
-//! });
-//! ```
-use std::borrow::Cow;
-use std::default::Default;
-use std::io::{self, copy, Read};
-use std::fmt;
-
-use std::time::Duration;
-
-use url::Url;
-use url::ParseError as UrlError;
-
-use header::{Headers, Header, HeaderFormat};
-use header::{ContentLength, Host, Location};
-use method::Method;
-use net::{NetworkConnector, NetworkStream, SslClient};
-use Error;
-
-use self::proxy::{Proxy, tunnel};
-use self::scheme::Scheme;
-pub use self::pool::Pool;
-pub use self::request::Request;
-pub use self::response::Response;
-
-mod proxy;
-pub mod pool;
-pub mod request;
-pub mod response;
-
-use http::Protocol;
-use http::h1::Http11Protocol;
-
-
-/// A Client to use additional features with Requests.
-///
-/// Clients can handle things such as: redirect policy, connection pooling.
-pub struct Client {
-    protocol: Box<Protocol + Send + Sync>,
-    redirect_policy: RedirectPolicy,
-    read_timeout: Option<Duration>,
-    write_timeout: Option<Duration>,
-    proxy: Option<(Scheme, Cow<'static, str>, u16)>
-}
-
-impl fmt::Debug for Client {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt.debug_struct("Client")
-           .field("redirect_policy", &self.redirect_policy)
-           .field("read_timeout", &self.read_timeout)
-           .field("write_timeout", &self.write_timeout)
-           .field("proxy", &self.proxy)
-           .finish()
-    }
-}
-
-impl Client {
-
-    /// Create a new Client.
-    pub fn new() -> Client {
-        Client::with_pool_config(Default::default())
-    }
-
-    /// Create a new Client with a configured Pool Config.
-    pub fn with_pool_config(config: pool::Config) -> Client {
-        Client::with_connector(Pool::new(config))
-    }
-
-    /// Create a Client with an HTTP proxy to a (host, port).
-    pub fn with_http_proxy<H>(host: H, port: u16) -> Client
-    where H: Into<Cow<'static, str>> {
-        let host = host.into();
-        let proxy = tunnel((Scheme::Http, host.clone(), port));
-        let mut client = Client::with_connector(Pool::with_connector(Default::default(), proxy));
-        client.proxy = Some((Scheme::Http, host, port));
-        client
-    }
-
-    /// Create a Client using a proxy with a custom connector and SSL client.
-    pub fn with_proxy_config<C, S>(proxy_config: ProxyConfig<C, S>) -> Client
-    where C: NetworkConnector + Send + Sync + 'static,
-          C::Stream: NetworkStream + Send + Clone,
-          S: SslClient<C::Stream> + Send + Sync + 'static {
-
-        let scheme = proxy_config.scheme;
-        let host = proxy_config.host;
-        let port = proxy_config.port;
-        let proxy = Proxy {
-            proxy: (scheme.clone(), host.clone(), port),
-            connector: proxy_config.connector,
-            ssl: proxy_config.ssl,
-        };
-
-        let mut client = match proxy_config.pool_config {
-            Some(pool_config) => Client::with_connector(Pool::with_connector(pool_config, proxy)),
-            None => Client::with_connector(proxy),
-        };
-        client.proxy = Some((scheme, host, port));
-        client
-    }
-
-    /// Create a new client with a specific connector.
-    pub fn with_connector<C, S>(connector: C) -> Client
-    where C: NetworkConnector<Stream=S> + Send + Sync + 'static, S: NetworkStream + Send {
-        Client::with_protocol(Http11Protocol::with_connector(connector))
-    }
-
-    /// Create a new client with a specific `Protocol`.
-    pub fn with_protocol<P: Protocol + Send + Sync + 'static>(protocol: P) -> Client {
-        Client {
-            protocol: Box::new(protocol),
-            redirect_policy: Default::default(),
-            read_timeout: None,
-            write_timeout: None,
-            proxy: None,
-        }
-    }
-
-    /// Set the RedirectPolicy.
-    pub fn set_redirect_policy(&mut self, policy: RedirectPolicy) {
-        self.redirect_policy = policy;
-    }
-
-    /// Set the read timeout value for all requests.
-    pub fn set_read_timeout(&mut self, dur: Option<Duration>) {
-        self.read_timeout = dur;
-    }
-
-    /// Set the write timeout value for all requests.
-    pub fn set_write_timeout(&mut self, dur: Option<Duration>) {
-        self.write_timeout = dur;
-    }
-
-    /// Build a Get request.
-    pub fn get<U: IntoUrl>(&self, url: U) -> RequestBuilder {
-        self.request(Method::Get, url)
-    }
-
-    /// Build a Head request.
-    pub fn head<U: IntoUrl>(&self, url: U) -> RequestBuilder {
-        self.request(Method::Head, url)
-    }
-
-    /// Build a Patch request.
-    pub fn patch<U: IntoUrl>(&self, url: U) -> RequestBuilder {
-        self.request(Method::Patch, url)
-    }
-
-    /// Build a Post request.
-    pub fn post<U: IntoUrl>(&self, url: U) -> RequestBuilder {
-        self.request(Method::Post, url)
-    }
-
-    /// Build a Put request.
-    pub fn put<U: IntoUrl>(&self, url: U) -> RequestBuilder {
-        self.request(Method::Put, url)
-    }
-
-    /// Build a Delete request.
-    pub fn delete<U: IntoUrl>(&self, url: U) -> RequestBuilder {
-        self.request(Method::Delete, url)
-    }
-
-
-    /// Build a new request using this Client.
-    pub fn request<U: IntoUrl>(&self, method: Method, url: U) -> RequestBuilder {
-        RequestBuilder {
-            client: self,
-            method: method,
-            url: url.into_url(),
-            body: None,
-            headers: None,
-        }
-    }
-}
-
-impl Default for Client {
-    fn default() -> Client { Client::new() }
-}
-
-/// Options for an individual Request.
-///
-/// One of these will be built for you if you use one of the convenience
-/// methods, such as `get()`, `post()`, etc.
-pub struct RequestBuilder<'a> {
-    client: &'a Client,
-    // We store a result here because it's good to keep RequestBuilder
-    // from being generic, but it is a nicer API to report the error
-    // from `send` (when other errors may be happening, so it already
-    // returns a `Result`). Why's it good to keep it non-generic? It
-    // stops downstream crates having to remonomorphise and recompile
-    // the code, which can take a while, since `send` is fairly large.
-    // (For an extreme example, a tiny crate containing
-    // `hyper::Client::new().get("x").send().unwrap();` took ~4s to
-    // compile with a generic RequestBuilder, but 2s with this scheme,)
-    url: Result<Url, UrlError>,
-    headers: Option<Headers>,
-    method: Method,
-    body: Option<Body<'a>>,
-}
-
-impl<'a> RequestBuilder<'a> {
-
-    /// Set a request body to be sent.
-    pub fn body<B: Into<Body<'a>>>(mut self, body: B) -> RequestBuilder<'a> {
-        self.body = Some(body.into());
-        self
-    }
-
-    /// Add additional headers to the request.
-    pub fn headers(mut self, headers: Headers) -> RequestBuilder<'a> {
-        self.headers = Some(headers);
-        self
-    }
-
-    /// Add an individual new header to the request.
-    pub fn header<H: Header + HeaderFormat>(mut self, header: H) -> RequestBuilder<'a> {
-        {
-            let mut headers = match self.headers {
-                Some(ref mut h) => h,
-                None => {
-                    self.headers = Some(Headers::new());
-                    self.headers.as_mut().unwrap()
-                }
-            };
-
-            headers.set(header);
-        }
-        self
-    }
-
-    /// Execute this request and receive a Response back.
-    pub fn send(self) -> ::Result<Response> {
-        let RequestBuilder { client, method, url, headers, body } = self;
-        let mut url = try!(url);
-        trace!("send method={:?}, url={:?}, client={:?}", method, url, client);
-
-        let can_have_body = match method {
-            Method::Get | Method::Head => false,
-            _ => true
-        };
-
-        let mut body = if can_have_body {
-            body
-        } else {
-            None
-        };
-
-        loop {
-            let mut req = {
-                let (host, port) = try!(get_host_and_port(&url));
-                let mut message = try!(client.protocol.new_message(&host, port, url.scheme()));
-                if url.scheme() == "http" && client.proxy.is_some() {
-                    message.set_proxied(true);
-                }
-
-                let mut h = Headers::new();
-                h.set(Host {
-                    hostname: host.to_owned(),
-                    port: Some(port),
-                });
-                if let Some(ref headers) = headers {
-                    h.extend(headers.iter());
-                }
-                let headers = h;
-                Request::with_headers_and_message(method.clone(), url.clone(), headers, message)
-            };
-
-            try!(req.set_write_timeout(client.write_timeout));
-            try!(req.set_read_timeout(client.read_timeout));
-
-            match (can_have_body, body.as_ref()) {
-                (true, Some(body)) => match body.size() {
-                    Some(size) => req.headers_mut().set(ContentLength(size)),
-                    None => (), // chunked, Request will add it automatically
-                },
-                (true, None) => req.headers_mut().set(ContentLength(0)),
-                _ => () // neither
-            }
-            let mut streaming = try!(req.start());
-            body.take().map(|mut rdr| copy(&mut rdr, &mut streaming));
-            let res = try!(streaming.send());
-            if !res.status.is_redirection() {
-                return Ok(res)
-            }
-            debug!("redirect code {:?} for {}", res.status, url);
-
-            let loc = {
-                // punching borrowck here
-                let loc = match res.headers.get::<Location>() {
-                    Some(&Location(ref loc)) => {
-                        Some(url.join(loc))
-                    }
-                    None => {
-                        debug!("no Location header");
-                        // could be 304 Not Modified?
-                        None
-                    }
-                };
-                match loc {
-                    Some(r) => r,
-                    None => return Ok(res)
-                }
-            };
-            url = match loc {
-                Ok(u) => u,
-                Err(e) => {
-                    debug!("Location header had invalid URI: {:?}", e);
-                    return Ok(res);
-                }
-            };
-            match client.redirect_policy {
-                // separate branches because they can't be one
-                RedirectPolicy::FollowAll => (), //continue
-                RedirectPolicy::FollowIf(cond) if cond(&url) => (), //continue
-                _ => return Ok(res),
-            }
-        }
-    }
-}
-
-/// An enum of possible body types for a Request.
-pub enum Body<'a> {
-    /// A Reader does not necessarily know it's size, so it is chunked.
-    ChunkedBody(&'a mut (Read + 'a)),
-    /// For Readers that can know their size, like a `File`.
-    SizedBody(&'a mut (Read + 'a), u64),
-    /// A String has a size, and uses Content-Length.
-    BufBody(&'a [u8] , usize),
-}
-
-impl<'a> Body<'a> {
-    fn size(&self) -> Option<u64> {
-        match *self {
-            Body::SizedBody(_, len) => Some(len),
-            Body::BufBody(_, len) => Some(len as u64),
-            _ => None
-        }
-    }
-}
-
-impl<'a> Read for Body<'a> {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        match *self {
-            Body::ChunkedBody(ref mut r) => r.read(buf),
-            Body::SizedBody(ref mut r, _) => r.read(buf),
-            Body::BufBody(ref mut r, _) => Read::read(r, buf),
-        }
-    }
-}
-
-impl<'a> Into<Body<'a>> for &'a [u8] {
-    #[inline]
-    fn into(self) -> Body<'a> {
-        Body::BufBody(self, self.len())
-    }
-}
-
-impl<'a> Into<Body<'a>> for &'a str {
-    #[inline]
-    fn into(self) -> Body<'a> {
-        self.as_bytes().into()
-    }
-}
-
-impl<'a> Into<Body<'a>> for &'a String {
-    #[inline]
-    fn into(self) -> Body<'a> {
-        self.as_bytes().into()
-    }
-}
-
-impl<'a, R: Read> From<&'a mut R> for Body<'a> {
-    #[inline]
-    fn from(r: &'a mut R) -> Body<'a> {
-        Body::ChunkedBody(r)
-    }
-}
-
-/// A helper trait to convert common objects into a Url.
-pub trait IntoUrl {
-    /// Consumes the object, trying to return a Url.
-    fn into_url(self) -> Result<Url, UrlError>;
-}
-
-impl IntoUrl for Url {
-    fn into_url(self) -> Result<Url, UrlError> {
-        Ok(self)
-    }
-}
-
-impl<'a> IntoUrl for &'a str {
-    fn into_url(self) -> Result<Url, UrlError> {
-        Url::parse(self)
-    }
-}
-
-impl<'a> IntoUrl for &'a String {
-    fn into_url(self) -> Result<Url, UrlError> {
-        Url::parse(self)
-    }
-}
-
-/// Proxy server configuration with a custom connector and TLS wrapper.
-pub struct ProxyConfig<C, S>
-where C: NetworkConnector + Send + Sync + 'static,
-      C::Stream: NetworkStream + Clone + Send,
-      S: SslClient<C::Stream> + Send + Sync + 'static {
-    scheme: Scheme,
-    host: Cow<'static, str>,
-    port: u16,
-    pool_config: Option<pool::Config>,
-    connector: C,
-    ssl: S,
-}
-
-impl<C, S> ProxyConfig<C, S>
-where C: NetworkConnector + Send + Sync + 'static,
-      C::Stream: NetworkStream + Clone + Send,
-      S: SslClient<C::Stream> + Send + Sync + 'static {
-
-    /// Create a new `ProxyConfig`.
-    #[inline]
-    pub fn new<H: Into<Cow<'static, str>>>(scheme: &str, host: H, port: u16, connector: C, ssl: S) -> ProxyConfig<C, S> {
-        ProxyConfig {
-            scheme: scheme.into(),
-            host: host.into(),
-            port: port,
-            pool_config: Some(pool::Config::default()),
-            connector: connector,
-            ssl: ssl,
-        }
-    }
-
-    /// Change the `pool::Config` for the proxy.
-    ///
-    /// Passing `None` disables the `Pool`.
-    ///
-    /// The default is enabled, with the default `pool::Config`.
-    pub fn set_pool_config(&mut self, pool_config: Option<pool::Config>) {
-        self.pool_config = pool_config;
-    }
-}
-
-/// Behavior regarding how to handle redirects within a Client.
-#[derive(Copy)]
-pub enum RedirectPolicy {
-    /// Don't follow any redirects.
-    FollowNone,
-    /// Follow all redirects.
-    FollowAll,
-    /// Follow a redirect if the contained function returns true.
-    FollowIf(fn(&Url) -> bool),
-}
-
-impl fmt::Debug for RedirectPolicy {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            RedirectPolicy::FollowNone => fmt.write_str("FollowNone"),
-            RedirectPolicy::FollowAll => fmt.write_str("FollowAll"),
-            RedirectPolicy::FollowIf(_) => fmt.write_str("FollowIf"),
-        }
-    }
-}
-
-// This is a hack because of upstream typesystem issues.
-impl Clone for RedirectPolicy {
-    fn clone(&self) -> RedirectPolicy {
-        *self
-    }
-}
-
-impl Default for RedirectPolicy {
-    fn default() -> RedirectPolicy {
-        RedirectPolicy::FollowAll
-    }
-}
-
-
-fn get_host_and_port(url: &Url) -> ::Result<(&str, u16)> {
-    let host = match url.host_str() {
-        Some(host) => host,
-        None => return Err(Error::Uri(UrlError::EmptyHost)),
-    };
-    trace!("host={:?}", host);
-    let port = match url.port_or_known_default() {
-        Some(port) => port,
-        None => return Err(Error::Uri(UrlError::InvalidPort)),
-    };
-    trace!("port={:?}", port);
-    Ok((host, port))
-}
-
-mod scheme {
-
-    #[derive(Clone, PartialEq, Eq, Debug, Hash)]
-    pub enum Scheme {
-        Http,
-        Https,
-        Other(String),
-    }
-
-    impl<'a> From<&'a str> for Scheme {
-        fn from(s: &'a str) -> Scheme {
-            match s {
-                "http" => Scheme::Http,
-                "https" => Scheme::Https,
-                s => Scheme::Other(String::from(s)),
-            }
-        }
-    }
-
-    impl AsRef<str> for Scheme {
-        fn as_ref(&self) -> &str {
-            match *self {
-                Scheme::Http => "http",
-                Scheme::Https => "https",
-                Scheme::Other(ref s) => s,
-            }
-        }
-    }
-
-}
-
-#[cfg(test)]
-mod tests {
-    use std::io::Read;
-    use header::Server;
-    use http::h1::Http11Message;
-    use mock::{MockStream, MockSsl};
-    use super::{Client, RedirectPolicy};
-    use super::scheme::Scheme;
-    use super::proxy::Proxy;
-    use super::pool::Pool;
-    use url::Url;
-
-    mock_connector!(MockRedirectPolicy {
-        "http://127.0.0.1" =>       "HTTP/1.1 301 Redirect\r\n\
-                                     Location: http://127.0.0.2\r\n\
-                                     Server: mock1\r\n\
-                                     \r\n\
-                                    "
-        "http://127.0.0.2" =>       "HTTP/1.1 302 Found\r\n\
-                                     Location: https://127.0.0.3\r\n\
-                                     Server: mock2\r\n\
-                                     \r\n\
-                                    "
-        "https://127.0.0.3" =>      "HTTP/1.1 200 OK\r\n\
-                                     Server: mock3\r\n\
-                                     \r\n\
-                                    "
-    });
-
-
-    #[test]
-    fn test_proxy() {
-        use super::pool::PooledStream;
-        type MessageStream = PooledStream<super::proxy::Proxied<MockStream, MockStream>>;
-        mock_connector!(ProxyConnector {
-            b"HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"
-        });
-        let tunnel = Proxy {
-            connector: ProxyConnector,
-            proxy: (Scheme::Http, "example.proxy".into(), 8008),
-            ssl: MockSsl,
-        };
-        let mut client = Client::with_connector(Pool::with_connector(Default::default(), tunnel));
-        client.proxy = Some((Scheme::Http, "example.proxy".into(), 8008));
-        let mut dump = vec![];
-        client.get("http://127.0.0.1/foo/bar").send().unwrap().read_to_end(&mut dump).unwrap();
-
-        let box_message = client.protocol.new_message("127.0.0.1", 80, "http").unwrap();
-        let message = box_message.downcast::<Http11Message>().unwrap();
-        let stream =  message.into_inner().downcast::<MessageStream>().unwrap().into_inner().into_normal().unwrap();
-
-        let s = ::std::str::from_utf8(&stream.write).unwrap();
-        let request_line = "GET http://127.0.0.1/foo/bar HTTP/1.1\r\n";
-        assert!(s.starts_with(request_line), "{:?} doesn't start with {:?}", s, request_line);
-        assert!(s.contains("Host: 127.0.0.1\r\n"));
-    }
-
-    #[test]
-    fn test_proxy_tunnel() {
-        use super::pool::PooledStream;
-        type MessageStream = PooledStream<super::proxy::Proxied<MockStream, MockStream>>;
-
-        mock_connector!(ProxyConnector {
-            b"HTTP/1.1 200 OK\r\n\r\n",
-            b"HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"
-        });
-        let tunnel = Proxy {
-            connector: ProxyConnector,
-            proxy: (Scheme::Http, "example.proxy".into(), 8008),
-            ssl: MockSsl,
-        };
-        let mut client = Client::with_connector(Pool::with_connector(Default::default(), tunnel));
-        client.proxy = Some((Scheme::Http, "example.proxy".into(), 8008));
-        let mut dump = vec![];
-        client.get("https://127.0.0.1/foo/bar").send().unwrap().read_to_end(&mut dump).unwrap();
-
-        let box_message = client.protocol.new_message("127.0.0.1", 443, "https").unwrap();
-        let message = box_message.downcast::<Http11Message>().unwrap();
-        let stream = message.into_inner().downcast::<MessageStream>().unwrap().into_inner().into_tunneled().unwrap();
-
-        let s = ::std::str::from_utf8(&stream.write).unwrap();
-        let connect_line = "CONNECT 127.0.0.1:443 HTTP/1.1\r\nHost: 127.0.0.1:443\r\n\r\n";
-        assert_eq!(&s[..connect_line.len()], connect_line);
-
-        let s = &s[connect_line.len()..];
-        let request_line = "GET /foo/bar HTTP/1.1\r\n";
-        assert_eq!(&s[..request_line.len()], request_line);
-        assert!(s.contains("Host: 127.0.0.1\r\n"));
-    }
-
-    #[test]
-    fn test_redirect_followall() {
-        let mut client = Client::with_connector(MockRedirectPolicy);
-        client.set_redirect_policy(RedirectPolicy::FollowAll);
-
-        let res = client.get("http://127.0.0.1").send().unwrap();
-        assert_eq!(res.headers.get(), Some(&Server("mock3".to_owned())));
-    }
-
-    #[test]
-    fn test_redirect_dontfollow() {
-        let mut client = Client::with_connector(MockRedirectPolicy);
-        client.set_redirect_policy(RedirectPolicy::FollowNone);
-        let res = client.get("http://127.0.0.1").send().unwrap();
-        assert_eq!(res.headers.get(), Some(&Server("mock1".to_owned())));
-    }
-
-    #[test]
-    fn test_redirect_followif() {
-        fn follow_if(url: &Url) -> bool {
-            !url.as_str().contains("127.0.0.3")
-        }
-        let mut client = Client::with_connector(MockRedirectPolicy);
-        client.set_redirect_policy(RedirectPolicy::FollowIf(follow_if));
-        let res = client.get("http://127.0.0.1").send().unwrap();
-        assert_eq!(res.headers.get(), Some(&Server("mock2".to_owned())));
-    }
-
-    mock_connector!(Issue640Connector {
-        b"HTTP/1.1 200 OK\r\nContent-Length: 3\r\n\r\n",
-        b"GET",
-        b"HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\n",
-        b"HEAD",
-        b"HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\n",
-        b"POST"
-    });
-
-    // see issue #640
-    #[test]
-    fn test_head_response_body_keep_alive() {
-        let client = Client::with_connector(Pool::with_connector(Default::default(), Issue640Connector));
-
-        let mut s = String::new();
-        client.get("http://127.0.0.1").send().unwrap().read_to_string(&mut s).unwrap();
-        assert_eq!(s, "GET");
-
-        let mut s = String::new();
-        client.head("http://127.0.0.1").send().unwrap().read_to_string(&mut s).unwrap();
-        assert_eq!(s, "");
-
-        let mut s = String::new();
-        client.post("http://127.0.0.1").send().unwrap().read_to_string(&mut s).unwrap();
-        assert_eq!(s, "POST");
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/client/pool.rs
+++ /dev/null
@@ -1,305 +0,0 @@
-//! Client Connection Pooling
-use std::borrow::ToOwned;
-use std::collections::HashMap;
-use std::fmt;
-use std::io::{self, Read, Write};
-use std::net::{SocketAddr, Shutdown};
-use std::sync::{Arc, Mutex};
-use std::sync::atomic::{AtomicBool, Ordering};
-
-use std::time::Duration;
-
-use net::{NetworkConnector, NetworkStream, DefaultConnector};
-use client::scheme::Scheme;
-
-/// The `NetworkConnector` that behaves as a connection pool used by hyper's `Client`.
-pub struct Pool<C: NetworkConnector> {
-    connector: C,
-    inner: Arc<Mutex<PoolImpl<<C as NetworkConnector>::Stream>>>
-}
-
-/// Config options for the `Pool`.
-#[derive(Debug)]
-pub struct Config {
-    /// The maximum idle connections *per host*.
-    pub max_idle: usize,
-}
-
-impl Default for Config {
-    #[inline]
-    fn default() -> Config {
-        Config {
-            max_idle: 5,
-        }
-    }
-}
-
-#[derive(Debug)]
-struct PoolImpl<S> {
-    conns: HashMap<Key, Vec<PooledStreamInner<S>>>,
-    config: Config,
-}
-
-type Key = (String, u16, Scheme);
-
-fn key<T: Into<Scheme>>(host: &str, port: u16, scheme: T) -> Key {
-    (host.to_owned(), port, scheme.into())
-}
-
-impl Pool<DefaultConnector> {
-    /// Creates a `Pool` with a `DefaultConnector`.
-    #[inline]
-    pub fn new(config: Config) -> Pool<DefaultConnector> {
-        Pool::with_connector(config, DefaultConnector::default())
-    }
-}
-
-impl<C: NetworkConnector> Pool<C> {
-    /// Creates a `Pool` with a specified `NetworkConnector`.
-    #[inline]
-    pub fn with_connector(config: Config, connector: C) -> Pool<C> {
-        Pool {
-            connector: connector,
-            inner: Arc::new(Mutex::new(PoolImpl {
-                conns: HashMap::new(),
-                config: config,
-            }))
-        }
-    }
-
-    /// Clear all idle connections from the Pool, closing them.
-    #[inline]
-    pub fn clear_idle(&mut self) {
-        self.inner.lock().unwrap().conns.clear();
-    }
-}
-
-impl<S> PoolImpl<S> {
-    fn reuse(&mut self, key: Key, conn: PooledStreamInner<S>) {
-        trace!("reuse {:?}", key);
-        let conns = self.conns.entry(key).or_insert(vec![]);
-        if conns.len() < self.config.max_idle {
-            conns.push(conn);
-        }
-    }
-}
-
-impl<C: NetworkConnector<Stream=S>, S: NetworkStream + Send> NetworkConnector for Pool<C> {
-    type Stream = PooledStream<S>;
-    fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<PooledStream<S>> {
-        let key = key(host, port, scheme);
-
-        let inner = {
-            // keep the mutex locked only in this block
-            let mut locked = self.inner.lock().unwrap();
-            let mut should_remove = false;
-            let inner = locked.conns.get_mut(&key).map(|vec| {
-                trace!("Pool had connection, using");
-                should_remove = vec.len() == 1;
-                vec.pop().unwrap()
-            });
-            if should_remove {
-                locked.conns.remove(&key);
-            }
-            inner
-        };
-
-        let inner = match inner {
-            Some(inner) => inner,
-            None => PooledStreamInner {
-                key: key.clone(),
-                stream: try!(self.connector.connect(host, port, scheme)),
-                previous_response_expected_no_content: false,
-            }
-
-        };
-        Ok(PooledStream {
-            inner: Some(inner),
-            is_closed: AtomicBool::new(false),
-            pool: self.inner.clone(),
-        })
-    }
-}
-
-/// A Stream that will try to be returned to the Pool when dropped.
-pub struct PooledStream<S> {
-    inner: Option<PooledStreamInner<S>>,
-    is_closed: AtomicBool,
-    pool: Arc<Mutex<PoolImpl<S>>>,
-}
-
-// manual impl to add the 'static bound for 1.7 compat
-impl<S> fmt::Debug for PooledStream<S> where S: fmt::Debug + 'static {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt.debug_struct("PooledStream")
-           .field("inner", &self.inner)
-           .field("is_closed", &self.is_closed.load(Ordering::Relaxed))
-           .field("pool", &self.pool)
-           .finish()
-    }
-}
-
-impl<S: NetworkStream> PooledStream<S> {
-    /// Take the wrapped stream out of the pool completely.
-    pub fn into_inner(mut self) -> S {
-        self.inner.take().expect("PooledStream lost its inner stream").stream
-    }
-
-    /// Gets a borrowed reference to the underlying stream.
-    pub fn get_ref(&self) -> &S {
-        &self.inner.as_ref().expect("PooledStream lost its inner stream").stream
-    }
-}
-
-#[derive(Debug)]
-struct PooledStreamInner<S> {
-    key: Key,
-    stream: S,
-    previous_response_expected_no_content: bool,
-}
-
-impl<S: NetworkStream> Read for PooledStream<S> {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        match self.inner.as_mut().unwrap().stream.read(buf) {
-            Ok(0) => {
-                // if the wrapped stream returns EOF (Ok(0)), that means the
-                // server has closed the stream. we must be sure this stream
-                // is dropped and not put back into the pool.
-                self.is_closed.store(true, Ordering::Relaxed);
-                Ok(0)
-            },
-            r => r
-        }
-    }
-}
-
-impl<S: NetworkStream> Write for PooledStream<S> {
-    #[inline]
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.inner.as_mut().unwrap().stream.write(buf)
-    }
-
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        self.inner.as_mut().unwrap().stream.flush()
-    }
-}
-
-impl<S: NetworkStream> NetworkStream for PooledStream<S> {
-    #[inline]
-    fn peer_addr(&mut self) -> io::Result<SocketAddr> {
-        self.inner.as_mut().unwrap().stream.peer_addr()
-            .map_err(|e| {
-                self.is_closed.store(true, Ordering::Relaxed);
-                e
-            })
-    }
-
-    #[inline]
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.inner.as_ref().unwrap().stream.set_read_timeout(dur)
-            .map_err(|e| {
-                self.is_closed.store(true, Ordering::Relaxed);
-                e
-            })
-    }
-
-    #[inline]
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.inner.as_ref().unwrap().stream.set_write_timeout(dur)
-            .map_err(|e| {
-                self.is_closed.store(true, Ordering::Relaxed);
-                e
-            })
-    }
-
-    #[inline]
-    fn close(&mut self, how: Shutdown) -> io::Result<()> {
-        self.is_closed.store(true, Ordering::Relaxed);
-        self.inner.as_mut().unwrap().stream.close(how)
-    }
-
-    #[inline]
-    fn set_previous_response_expected_no_content(&mut self, expected: bool) {
-        trace!("set_previous_response_expected_no_content {}", expected);
-        self.inner.as_mut().unwrap().previous_response_expected_no_content = expected;
-    }
-
-    #[inline]
-    fn previous_response_expected_no_content(&self) -> bool {
-        let answer = self.inner.as_ref().unwrap().previous_response_expected_no_content;
-        trace!("previous_response_expected_no_content {}", answer);
-        answer
-    }
-}
-
-impl<S> Drop for PooledStream<S> {
-    fn drop(&mut self) {
-        let is_closed = self.is_closed.load(Ordering::Relaxed);
-        trace!("PooledStream.drop, is_closed={}", is_closed);
-        if !is_closed {
-            self.inner.take().map(|inner| {
-                if let Ok(mut pool) = self.pool.lock() {
-                    pool.reuse(inner.key.clone(), inner);
-                }
-                // else poisoned, give up
-            });
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use std::net::Shutdown;
-    use std::io::Read;
-    use mock::{MockConnector};
-    use net::{NetworkConnector, NetworkStream};
-
-    use super::{Pool, key};
-
-    macro_rules! mocked {
-        () => ({
-            Pool::with_connector(Default::default(), MockConnector)
-        })
-    }
-
-    #[test]
-    fn test_connect_and_drop() {
-        let pool = mocked!();
-        let key = key("127.0.0.1", 3000, "http");
-        pool.connect("127.0.0.1", 3000, "http").unwrap();
-        {
-            let locked = pool.inner.lock().unwrap();
-            assert_eq!(locked.conns.len(), 1);
-            assert_eq!(locked.conns.get(&key).unwrap().len(), 1);
-        }
-        pool.connect("127.0.0.1", 3000, "http").unwrap(); //reused
-        {
-            let locked = pool.inner.lock().unwrap();
-            assert_eq!(locked.conns.len(), 1);
-            assert_eq!(locked.conns.get(&key).unwrap().len(), 1);
-        }
-    }
-
-    #[test]
-    fn test_closed() {
-        let pool = mocked!();
-        let mut stream = pool.connect("127.0.0.1", 3000, "http").unwrap();
-        stream.close(Shutdown::Both).unwrap();
-        drop(stream);
-        let locked = pool.inner.lock().unwrap();
-        assert_eq!(locked.conns.len(), 0);
-    }
-
-    #[test]
-    fn test_eof_closes() {
-        let pool = mocked!();
-
-        let mut stream = pool.connect("127.0.0.1", 3000, "http").unwrap();
-        assert_eq!(stream.read(&mut [0]).unwrap(), 0);
-        drop(stream);
-        let locked = pool.inner.lock().unwrap();
-        assert_eq!(locked.conns.len(), 0);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/client/proxy.rs
+++ /dev/null
@@ -1,221 +0,0 @@
-use std::borrow::Cow;
-use std::io;
-use std::net::{SocketAddr, Shutdown};
-use std::time::Duration;
-
-use client::scheme::Scheme;
-use method::Method;
-use net::{NetworkConnector, HttpConnector, NetworkStream, SslClient};
-
-pub fn tunnel(proxy: (Scheme, Cow<'static, str>, u16)) -> Proxy<HttpConnector, self::no_ssl::Plaintext> {
-    Proxy {
-        connector: HttpConnector,
-        proxy: proxy,
-        ssl: self::no_ssl::Plaintext,
-    }
-
-}
-
-pub struct Proxy<C, S>
-where C: NetworkConnector + Send + Sync + 'static,
-      C::Stream: NetworkStream + Send + Clone,
-      S: SslClient<C::Stream> {
-    pub connector: C,
-    pub proxy: (Scheme, Cow<'static, str>, u16),
-    pub ssl: S,
-}
-
-impl<C, S> NetworkConnector for Proxy<C, S>
-where C: NetworkConnector + Send + Sync + 'static,
-      C::Stream: NetworkStream + Send + Clone,
-      S: SslClient<C::Stream> {
-    type Stream = Proxied<C::Stream, S::Stream>;
-
-    fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<Self::Stream> {
-        use httparse;
-        use std::io::{Read, Write};
-        use ::version::HttpVersion::Http11;
-        trace!("{:?} proxy for '{}://{}:{}'", self.proxy, scheme, host, port);
-        match scheme {
-            "http" => {
-                self.connector.connect(self.proxy.1.as_ref(), self.proxy.2, self.proxy.0.as_ref())
-                    .map(Proxied::Normal)
-            },
-            "https" => {
-                let mut stream = try!(self.connector.connect(self.proxy.1.as_ref(), self.proxy.2, self.proxy.0.as_ref()));
-                trace!("{:?} CONNECT {}:{}", self.proxy, host, port);
-                try!(write!(&mut stream, "{method} {host}:{port} {version}\r\nHost: {host}:{port}\r\n\r\n",
-                            method=Method::Connect, host=host, port=port, version=Http11));
-                try!(stream.flush());
-                let mut buf = [0; 1024];
-                let mut n = 0;
-                while n < buf.len() {
-                    n += try!(stream.read(&mut buf[n..]));
-                    let mut headers = [httparse::EMPTY_HEADER; 10];
-                    let mut res = httparse::Response::new(&mut headers);
-                    if try!(res.parse(&buf[..n])).is_complete() {
-                        let code = res.code.expect("complete parsing lost code");
-                        if code >= 200 && code < 300 {
-                            trace!("CONNECT success = {:?}", code);
-                            return self.ssl.wrap_client(stream, host)
-                                .map(Proxied::Tunneled)
-                        } else {
-                            trace!("CONNECT response = {:?}", code);
-                            return Err(::Error::Status);
-                        }
-                    }
-                }
-                Err(::Error::TooLarge)
-            },
-            _ => Err(io::Error::new(io::ErrorKind::InvalidInput, "invalid scheme").into())
-        }
-    }
-}
-
-#[derive(Debug)]
-pub enum Proxied<T1, T2> {
-    Normal(T1),
-    Tunneled(T2)
-}
-
-#[cfg(test)]
-impl<T1, T2> Proxied<T1, T2> {
-    pub fn into_normal(self) -> Result<T1, Self> {
-        match self {
-            Proxied::Normal(t1) => Ok(t1),
-            _ => Err(self)
-        }
-    }
-
-    pub fn into_tunneled(self) -> Result<T2, Self> {
-        match self {
-            Proxied::Tunneled(t2) => Ok(t2),
-            _ => Err(self)
-        }
-    }
-}
-
-impl<T1: NetworkStream, T2: NetworkStream> io::Read for Proxied<T1, T2> {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        match *self {
-            Proxied::Normal(ref mut t) => io::Read::read(t, buf),
-            Proxied::Tunneled(ref mut t) => io::Read::read(t, buf),
-        }
-    }
-}
-
-impl<T1: NetworkStream, T2: NetworkStream> io::Write for Proxied<T1, T2> {
-    #[inline]
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        match *self {
-            Proxied::Normal(ref mut t) => io::Write::write(t, buf),
-            Proxied::Tunneled(ref mut t) => io::Write::write(t, buf),
-        }
-    }
-
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        match *self {
-            Proxied::Normal(ref mut t) => io::Write::flush(t),
-            Proxied::Tunneled(ref mut t) => io::Write::flush(t),
-        }
-    }
-}
-
-impl<T1: NetworkStream, T2: NetworkStream> NetworkStream for Proxied<T1, T2> {
-    #[inline]
-    fn peer_addr(&mut self) -> io::Result<SocketAddr> {
-        match *self {
-            Proxied::Normal(ref mut s) => s.peer_addr(),
-            Proxied::Tunneled(ref mut s) => s.peer_addr()
-        }
-    }
-
-    #[inline]
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        match *self {
-            Proxied::Normal(ref inner) => inner.set_read_timeout(dur),
-            Proxied::Tunneled(ref inner) => inner.set_read_timeout(dur)
-        }
-    }
-
-    #[inline]
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        match *self {
-            Proxied::Normal(ref inner) => inner.set_write_timeout(dur),
-            Proxied::Tunneled(ref inner) => inner.set_write_timeout(dur)
-        }
-    }
-
-    #[inline]
-    fn close(&mut self, how: Shutdown) -> io::Result<()> {
-        match *self {
-            Proxied::Normal(ref mut s) => s.close(how),
-            Proxied::Tunneled(ref mut s) => s.close(how)
-        }
-    }
-}
-
-#[cfg(not(any(feature = "openssl", feature = "security-framework")))]
-mod no_ssl {
-    use std::io;
-    use std::net::{Shutdown, SocketAddr};
-    use std::time::Duration;
-
-    use net::{SslClient, NetworkStream};
-
-    pub struct Plaintext;
-
-    #[derive(Clone)]
-    pub enum Void {}
-
-    impl io::Read for Void {
-        #[inline]
-        fn read(&mut self, _buf: &mut [u8]) -> io::Result<usize> {
-            match *self {}
-        }
-    }
-
-    impl io::Write for Void {
-        #[inline]
-        fn write(&mut self, _buf: &[u8]) -> io::Result<usize> {
-            match *self {}
-        }
-
-        #[inline]
-        fn flush(&mut self) -> io::Result<()> {
-            match *self {}
-        }
-    }
-
-    impl NetworkStream for Void {
-        #[inline]
-        fn peer_addr(&mut self) -> io::Result<SocketAddr> {
-            match *self {}
-        }
-
-        #[inline]
-        fn set_read_timeout(&self, _dur: Option<Duration>) -> io::Result<()> {
-            match *self {}
-        }
-
-        #[inline]
-        fn set_write_timeout(&self, _dur: Option<Duration>) -> io::Result<()> {
-            match *self {}
-        }
-
-        #[inline]
-        fn close(&mut self, _how: Shutdown) -> io::Result<()> {
-            match *self {}
-        }
-    }
-
-    impl<T: NetworkStream + Send + Clone> SslClient<T> for Plaintext {
-        type Stream = Void;
-
-        fn wrap_client(&self, _stream: T, _host: &str) -> ::Result<Self::Stream> {
-            Err(io::Error::new(io::ErrorKind::InvalidInput, "invalid scheme").into())
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/client/request.rs
+++ /dev/null
@@ -1,314 +0,0 @@
-//! Client Requests
-use std::marker::PhantomData;
-use std::io::{self, Write};
-
-use std::time::Duration;
-
-use url::Url;
-
-use method::Method;
-use header::Headers;
-use header::Host;
-use net::{NetworkStream, NetworkConnector, DefaultConnector, Fresh, Streaming};
-use version;
-use client::{Response, get_host_and_port};
-
-use http::{HttpMessage, RequestHead};
-use http::h1::Http11Message;
-
-
-/// A client request to a remote server.
-/// The W type tracks the state of the request, Fresh vs Streaming.
-pub struct Request<W> {
-    /// The target URI for this request.
-    pub url: Url,
-
-    /// The HTTP version of this request.
-    pub version: version::HttpVersion,
-
-    message: Box<HttpMessage>,
-    headers: Headers,
-    method: Method,
-
-    _marker: PhantomData<W>,
-}
-
-impl<W> Request<W> {
-    /// Read the Request headers.
-    #[inline]
-    pub fn headers(&self) -> &Headers { &self.headers }
-
-    /// Read the Request method.
-    #[inline]
-    pub fn method(&self) -> Method { self.method.clone() }
-
-    /// Set the write timeout.
-    #[inline]
-    pub fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.message.set_write_timeout(dur)
-    }
-
-    /// Set the read timeout.
-    #[inline]
-    pub fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.message.set_read_timeout(dur)
-    }
-}
-
-impl Request<Fresh> {
-    /// Create a new `Request<Fresh>` that will use the given `HttpMessage` for its communication
-    /// with the server. This implies that the given `HttpMessage` instance has already been
-    /// properly initialized by the caller (e.g. a TCP connection's already established).
-    pub fn with_message(method: Method, url: Url, message: Box<HttpMessage>)
-            -> ::Result<Request<Fresh>> {
-        let mut headers = Headers::new();
-        {
-            let (host, port) = try!(get_host_and_port(&url));
-            headers.set(Host {
-                hostname: host.to_owned(),
-                port: Some(port),
-            });
-        }
-
-        Ok(Request::with_headers_and_message(method, url, headers, message))
-    }
-
-    #[doc(hidden)]
-    pub fn with_headers_and_message(method: Method, url: Url, headers: Headers,  message: Box<HttpMessage>)
-                -> Request<Fresh> {
-        Request {
-            method: method,
-            headers: headers,
-            url: url,
-            version: version::HttpVersion::Http11,
-            message: message,
-            _marker: PhantomData,
-        }
-    }
-
-    /// Create a new client request.
-    pub fn new(method: Method, url: Url) -> ::Result<Request<Fresh>> {
-        let conn = DefaultConnector::default();
-        Request::with_connector(method, url, &conn)
-    }
-
-    /// Create a new client request with a specific underlying NetworkStream.
-    pub fn with_connector<C, S>(method: Method, url: Url, connector: &C)
-        -> ::Result<Request<Fresh>> where
-        C: NetworkConnector<Stream=S>,
-        S: Into<Box<NetworkStream + Send>> {
-        let stream = {
-            let (host, port) = try!(get_host_and_port(&url));
-            try!(connector.connect(host, port, url.scheme())).into()
-        };
-
-        Request::with_message(method, url, Box::new(Http11Message::with_stream(stream)))
-    }
-
-    /// Consume a Fresh Request, writing the headers and method,
-    /// returning a Streaming Request.
-    pub fn start(mut self) -> ::Result<Request<Streaming>> {
-        let head = match self.message.set_outgoing(RequestHead {
-            headers: self.headers,
-            method: self.method,
-            url: self.url,
-        }) {
-            Ok(head) => head,
-            Err(e) => {
-                let _ = self.message.close_connection();
-                return Err(From::from(e));
-            }
-        };
-
-        Ok(Request {
-            method: head.method,
-            headers: head.headers,
-            url: head.url,
-            version: self.version,
-            message: self.message,
-            _marker: PhantomData,
-        })
-    }
-
-    /// Get a mutable reference to the Request headers.
-    #[inline]
-    pub fn headers_mut(&mut self) -> &mut Headers { &mut self.headers }
-}
-
-
-
-impl Request<Streaming> {
-    /// Completes writing the request, and returns a response to read from.
-    ///
-    /// Consumes the Request.
-    pub fn send(self) -> ::Result<Response> {
-        Response::with_message(self.url, self.message)
-    }
-}
-
-impl Write for Request<Streaming> {
-    #[inline]
-    fn write(&mut self, msg: &[u8]) -> io::Result<usize> {
-        match self.message.write(msg) {
-            Ok(n) => Ok(n),
-            Err(e) => {
-                let _ = self.message.close_connection();
-                Err(e)
-            }
-        }
-    }
-
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        match self.message.flush() {
-            Ok(r) => Ok(r),
-            Err(e) => {
-                let _ = self.message.close_connection();
-                Err(e)
-            }
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use std::io::Write;
-    use std::str::from_utf8;
-    use url::Url;
-    use method::Method::{Get, Head, Post};
-    use mock::{MockStream, MockConnector};
-    use net::Fresh;
-    use header::{ContentLength,TransferEncoding,Encoding};
-    use url::form_urlencoded;
-    use super::Request;
-    use http::h1::Http11Message;
-
-    fn run_request(req: Request<Fresh>) -> Vec<u8> {
-        let req = req.start().unwrap();
-        let message = req.message;
-        let mut message = message.downcast::<Http11Message>().ok().unwrap();
-        message.flush_outgoing().unwrap();
-        let stream = *message
-            .into_inner().downcast::<MockStream>().ok().unwrap();
-        stream.write
-    }
-
-    fn assert_no_body(s: &str) {
-        assert!(!s.contains("Content-Length:"));
-        assert!(!s.contains("Transfer-Encoding:"));
-    }
-
-    #[test]
-    fn test_get_empty_body() {
-        let req = Request::with_connector(
-            Get, Url::parse("http://example.dom").unwrap(), &mut MockConnector
-        ).unwrap();
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert_no_body(s);
-    }
-
-    #[test]
-    fn test_head_empty_body() {
-        let req = Request::with_connector(
-            Head, Url::parse("http://example.dom").unwrap(), &mut MockConnector
-        ).unwrap();
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert_no_body(s);
-    }
-
-    #[test]
-    fn test_url_query() {
-        let url = Url::parse("http://example.dom?q=value").unwrap();
-        let req = Request::with_connector(
-            Get, url, &mut MockConnector
-        ).unwrap();
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert!(s.contains("?q=value"));
-    }
-
-    #[test]
-    fn test_post_content_length() {
-        let url = Url::parse("http://example.dom").unwrap();
-        let mut req = Request::with_connector(
-            Post, url, &mut MockConnector
-        ).unwrap();
-        let mut body = String::new();
-        form_urlencoded::Serializer::new(&mut body).append_pair("q", "value");
-        req.headers_mut().set(ContentLength(body.len() as u64));
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert!(s.contains("Content-Length:"));
-    }
-
-    #[test]
-    fn test_post_chunked() {
-        let url = Url::parse("http://example.dom").unwrap();
-        let req = Request::with_connector(
-            Post, url, &mut MockConnector
-        ).unwrap();
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert!(!s.contains("Content-Length:"));
-    }
-
-    #[test]
-    fn test_host_header() {
-        let url = Url::parse("http://example.dom").unwrap();
-        let req = Request::with_connector(
-            Get, url, &mut MockConnector
-        ).unwrap();
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert!(s.contains("Host: example.dom"));
-    }
-
-    #[test]
-    fn test_proxy() {
-        let url = Url::parse("http://example.dom").unwrap();
-        let mut req = Request::with_connector(
-            Get, url, &mut MockConnector
-        ).unwrap();
-        req.message.set_proxied(true);
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        let request_line = "GET http://example.dom/ HTTP/1.1";
-        assert_eq!(&s[..request_line.len()], request_line);
-        assert!(s.contains("Host: example.dom"));
-    }
-
-    #[test]
-    fn test_post_chunked_with_encoding() {
-        let url = Url::parse("http://example.dom").unwrap();
-        let mut req = Request::with_connector(
-            Post, url, &mut MockConnector
-        ).unwrap();
-        req.headers_mut().set(TransferEncoding(vec![Encoding::Chunked]));
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert!(!s.contains("Content-Length:"));
-        assert!(s.contains("Transfer-Encoding:"));
-    }
-
-    #[test]
-    fn test_write_error_closes() {
-        let url = Url::parse("http://hyper.rs").unwrap();
-        let req = Request::with_connector(
-            Get, url, &mut MockConnector
-        ).unwrap();
-        let mut req = req.start().unwrap();
-
-        req.message.downcast_mut::<Http11Message>().unwrap()
-            .get_mut().downcast_mut::<MockStream>().unwrap()
-            .error_on_write = true;
-
-        req.write(b"foo").unwrap();
-        assert!(req.flush().is_err());
-
-        assert!(req.message.downcast_ref::<Http11Message>().unwrap()
-            .get_ref().downcast_ref::<MockStream>().unwrap()
-            .is_closed);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/client/response.rs
+++ /dev/null
@@ -1,239 +0,0 @@
-//! Client Responses
-use std::io::{self, Read};
-
-use url::Url;
-
-use header;
-use net::NetworkStream;
-use http::{self, RawStatus, ResponseHead, HttpMessage};
-use http::h1::Http11Message;
-use status;
-use version;
-
-/// A response for a client request to a remote server.
-#[derive(Debug)]
-pub struct Response {
-    /// The status from the server.
-    pub status: status::StatusCode,
-    /// The headers from the server.
-    pub headers: header::Headers,
-    /// The HTTP version of this response from the server.
-    pub version: version::HttpVersion,
-    /// The final URL of this response.
-    pub url: Url,
-    status_raw: RawStatus,
-    message: Box<HttpMessage>,
-}
-
-impl Response {
-    /// Creates a new response from a server.
-    pub fn new(url: Url, stream: Box<NetworkStream + Send>) -> ::Result<Response> {
-        trace!("Response::new");
-        Response::with_message(url, Box::new(Http11Message::with_stream(stream)))
-    }
-
-    /// Creates a new response received from the server on the given `HttpMessage`.
-    pub fn with_message(url: Url, mut message: Box<HttpMessage>) -> ::Result<Response> {
-        trace!("Response::with_message");
-        let ResponseHead { headers, raw_status, version } = match message.get_incoming() {
-            Ok(head) => head,
-            Err(e) => {
-                let _ = message.close_connection();
-                return Err(From::from(e));
-            }
-        };
-        let status = status::StatusCode::from_u16(raw_status.0);
-        debug!("version={:?}, status={:?}", version, status);
-        debug!("headers={:?}", headers);
-
-        Ok(Response {
-            status: status,
-            version: version,
-            headers: headers,
-            url: url,
-            status_raw: raw_status,
-            message: message,
-        })
-    }
-
-    /// Get the raw status code and reason.
-    #[inline]
-    pub fn status_raw(&self) -> &RawStatus {
-        &self.status_raw
-    }
-
-    /// Gets a borrowed reference to the underlying `HttpMessage`.
-    #[inline]
-    pub fn get_ref(&self) -> &HttpMessage {
-        &*self.message
-    }
-}
-
-/// Read the response body.
-impl Read for Response {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        match self.message.read(buf) {
-            Err(e) => {
-                let _ = self.message.close_connection();
-                Err(e)
-            }
-            r => r
-        }
-    }
-}
-
-impl Drop for Response {
-    fn drop(&mut self) {
-        // if not drained, theres old bits in the Reader. we can't reuse this,
-        // since those old bits would end up in new Responses
-        //
-        // otherwise, the response has been drained. we should check that the
-        // server has agreed to keep the connection open
-        let is_drained = !self.message.has_body();
-        trace!("Response.drop is_drained={}", is_drained);
-        if !(is_drained && http::should_keep_alive(self.version, &self.headers)) {
-            trace!("Response.drop closing connection");
-            if let Err(e) = self.message.close_connection() {
-                error!("Response.drop error closing connection: {}", e);
-            }
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use std::io::{self, Read};
-
-    use url::Url;
-
-    use header::TransferEncoding;
-    use header::Encoding;
-    use http::HttpMessage;
-    use mock::MockStream;
-    use status;
-    use version;
-    use http::h1::Http11Message;
-
-    use super::Response;
-
-    fn read_to_string(mut r: Response) -> io::Result<String> {
-        let mut s = String::new();
-        try!(r.read_to_string(&mut s));
-        Ok(s)
-    }
-
-
-    #[test]
-    fn test_into_inner() {
-        let message: Box<HttpMessage> = Box::new(
-            Http11Message::with_stream(Box::new(MockStream::new())));
-        let message = message.downcast::<Http11Message>().ok().unwrap();
-        let b = message.into_inner().downcast::<MockStream>().ok().unwrap();
-        assert_eq!(b, Box::new(MockStream::new()));
-    }
-
-    #[test]
-    fn test_parse_chunked_response() {
-        let stream = MockStream::with_input(b"\
-            HTTP/1.1 200 OK\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            1\r\n\
-            q\r\n\
-            2\r\n\
-            we\r\n\
-            2\r\n\
-            rt\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        let url = Url::parse("http://hyper.rs").unwrap();
-        let res = Response::new(url, Box::new(stream)).unwrap();
-
-        // The status line is correct?
-        assert_eq!(res.status, status::StatusCode::Ok);
-        assert_eq!(res.version, version::HttpVersion::Http11);
-        // The header is correct?
-        match res.headers.get::<TransferEncoding>() {
-            Some(encodings) => {
-                assert_eq!(1, encodings.len());
-                assert_eq!(Encoding::Chunked, encodings[0]);
-            },
-            None => panic!("Transfer-Encoding: chunked expected!"),
-        };
-        // The body is correct?
-        assert_eq!(read_to_string(res).unwrap(), "qwert".to_owned());
-    }
-
-    /// Tests that when a chunk size is not a valid radix-16 number, an error
-    /// is returned.
-    #[test]
-    fn test_invalid_chunk_size_not_hex_digit() {
-        let stream = MockStream::with_input(b"\
-            HTTP/1.1 200 OK\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            X\r\n\
-            1\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        let url = Url::parse("http://hyper.rs").unwrap();
-        let res = Response::new(url, Box::new(stream)).unwrap();
-
-        assert!(read_to_string(res).is_err());
-    }
-
-    /// Tests that when a chunk size contains an invalid extension, an error is
-    /// returned.
-    #[test]
-    fn test_invalid_chunk_size_extension() {
-        let stream = MockStream::with_input(b"\
-            HTTP/1.1 200 OK\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            1 this is an invalid extension\r\n\
-            1\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        let url = Url::parse("http://hyper.rs").unwrap();
-        let res = Response::new(url, Box::new(stream)).unwrap();
-
-        assert!(read_to_string(res).is_err());
-    }
-
-    /// Tests that when a valid extension that contains a digit is appended to
-    /// the chunk size, the chunk is correctly read.
-    #[test]
-    fn test_chunk_size_with_extension() {
-        let stream = MockStream::with_input(b"\
-            HTTP/1.1 200 OK\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            1;this is an extension with a digit 1\r\n\
-            1\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        let url = Url::parse("http://hyper.rs").unwrap();
-        let res = Response::new(url, Box::new(stream)).unwrap();
-
-        assert_eq!(read_to_string(res).unwrap(), "1".to_owned());
-    }
-
-    #[test]
-    fn test_parse_error_closes() {
-        let url = Url::parse("http://hyper.rs").unwrap();
-        let stream = MockStream::with_input(b"\
-            definitely not http
-        ");
-
-        assert!(Response::new(url, Box::new(stream)).is_err());
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/error.rs
+++ /dev/null
@@ -1,219 +0,0 @@
-//! Error and Result module.
-use std::error::Error as StdError;
-use std::fmt;
-use std::io::Error as IoError;
-use std::str::Utf8Error;
-use std::string::FromUtf8Error;
-
-use httparse;
-use url;
-
-#[cfg(feature = "openssl")]
-use openssl::ssl::error::SslError;
-
-use self::Error::{
-    Method,
-    Uri,
-    Version,
-    Header,
-    Status,
-    Io,
-    Ssl,
-    TooLarge,
-    Utf8
-};
-
-pub use url::ParseError;
-
-/// Result type often returned from methods that can have hyper `Error`s.
-pub type Result<T> = ::std::result::Result<T, Error>;
-
-/// A set of errors that can occur parsing HTTP streams.
-#[derive(Debug)]
-pub enum Error {
-    /// An invalid `Method`, such as `GE,T`.
-    Method,
-    /// An invalid `RequestUri`, such as `exam ple.domain`.
-    Uri(url::ParseError),
-    /// An invalid `HttpVersion`, such as `HTP/1.1`
-    Version,
-    /// An invalid `Header`.
-    Header,
-    /// A message head is too large to be reasonable.
-    TooLarge,
-    /// An invalid `Status`, such as `1337 ELITE`.
-    Status,
-    /// An `io::Error` that occurred while trying to read or write to a network stream.
-    Io(IoError),
-    /// An error from a SSL library.
-    Ssl(Box<StdError + Send + Sync>),
-    /// Parsing a field as string failed
-    Utf8(Utf8Error),
-
-    #[doc(hidden)]
-    __Nonexhaustive(Void)
-}
-
-#[doc(hidden)]
-pub struct Void(());
-
-impl fmt::Debug for Void {
-    fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result {
-        unreachable!()
-    }
-}
-
-impl fmt::Display for Error {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            Uri(ref e) => fmt::Display::fmt(e, f),
-            Io(ref e) => fmt::Display::fmt(e, f),
-            Ssl(ref e) => fmt::Display::fmt(e, f),
-            Utf8(ref e) => fmt::Display::fmt(e, f),
-            ref e => f.write_str(e.description()),
-        }
-    }
-}
-
-impl StdError for Error {
-    fn description(&self) -> &str {
-        match *self {
-            Method => "Invalid Method specified",
-            Version => "Invalid HTTP version specified",
-            Header => "Invalid Header provided",
-            TooLarge => "Message head is too large",
-            Status => "Invalid Status provided",
-            Uri(ref e) => e.description(),
-            Io(ref e) => e.description(),
-            Ssl(ref e) => e.description(),
-            Utf8(ref e) => e.description(),
-            Error::__Nonexhaustive(..) =>  unreachable!(),
-        }
-    }
-
-    fn cause(&self) -> Option<&StdError> {
-        match *self {
-            Io(ref error) => Some(error),
-            Ssl(ref error) => Some(&**error),
-            Uri(ref error) => Some(error),
-            Utf8(ref error) => Some(error),
-            _ => None,
-        }
-    }
-}
-
-impl From<IoError> for Error {
-    fn from(err: IoError) -> Error {
-        Io(err)
-    }
-}
-
-impl From<url::ParseError> for Error {
-    fn from(err: url::ParseError) -> Error {
-        Uri(err)
-    }
-}
-
-#[cfg(feature = "openssl")]
-impl From<SslError> for Error {
-    fn from(err: SslError) -> Error {
-        match err {
-            SslError::StreamError(err) => Io(err),
-            err => Ssl(Box::new(err)),
-        }
-    }
-}
-
-impl From<Utf8Error> for Error {
-    fn from(err: Utf8Error) -> Error {
-        Utf8(err)
-    }
-}
-
-impl From<FromUtf8Error> for Error {
-    fn from(err: FromUtf8Error) -> Error {
-        Utf8(err.utf8_error())
-    }
-}
-
-impl From<httparse::Error> for Error {
-    fn from(err: httparse::Error) -> Error {
-        match err {
-            httparse::Error::HeaderName => Header,
-            httparse::Error::HeaderValue => Header,
-            httparse::Error::NewLine => Header,
-            httparse::Error::Status => Status,
-            httparse::Error::Token => Header,
-            httparse::Error::TooManyHeaders => TooLarge,
-            httparse::Error::Version => Version,
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use std::error::Error as StdError;
-    use std::io;
-    use httparse;
-    use url;
-    use super::Error;
-    use super::Error::*;
-
-    #[test]
-    fn test_cause() {
-        let orig = io::Error::new(io::ErrorKind::Other, "other");
-        let desc = orig.description().to_owned();
-        let e = Io(orig);
-        assert_eq!(e.cause().unwrap().description(), desc);
-    }
-
-    macro_rules! from {
-        ($from:expr => $error:pat) => {
-            match Error::from($from) {
-                e @ $error => {
-                    assert!(e.description().len() > 5);
-                } ,
-                _ => panic!("{:?}", $from)
-            }
-        }
-    }
-
-    macro_rules! from_and_cause {
-        ($from:expr => $error:pat) => {
-            match Error::from($from) {
-                e @ $error => {
-                    let desc = e.cause().unwrap().description();
-                    assert_eq!(desc, $from.description().to_owned());
-                    assert_eq!(desc, e.description());
-                },
-                _ => panic!("{:?}", $from)
-            }
-        }
-    }
-
-    #[test]
-    fn test_from() {
-
-        from_and_cause!(io::Error::new(io::ErrorKind::Other, "other") => Io(..));
-        from_and_cause!(url::ParseError::EmptyHost => Uri(..));
-
-        from!(httparse::Error::HeaderName => Header);
-        from!(httparse::Error::HeaderName => Header);
-        from!(httparse::Error::HeaderValue => Header);
-        from!(httparse::Error::NewLine => Header);
-        from!(httparse::Error::Status => Status);
-        from!(httparse::Error::Token => Header);
-        from!(httparse::Error::TooManyHeaders => TooLarge);
-        from!(httparse::Error::Version => Version);
-    }
-
-    #[cfg(feature = "openssl")]
-    #[test]
-    fn test_from_ssl() {
-        use openssl::ssl::error::SslError;
-
-        from!(SslError::StreamError(
-            io::Error::new(io::ErrorKind::Other, "ssl negotiation")) => Io(..));
-        from_and_cause!(SslError::SslSessionClosed => Ssl(..));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/accept.rs
+++ /dev/null
@@ -1,143 +0,0 @@
-use mime::Mime;
-
-use header::{QualityItem, qitem};
-
-header! {
-    /// `Accept` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.3.2)
-    ///
-    /// The `Accept` header field can be used by user agents to specify
-    /// response media types that are acceptable.  Accept header fields can
-    /// be used to indicate that the request is specifically limited to a
-    /// small set of desired types, as in the case of a request for an
-    /// in-line image
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Accept = #( media-range [ accept-params ] )
-    ///
-    /// media-range    = ( "*/*"
-    ///                  / ( type "/" "*" )
-    ///                  / ( type "/" subtype )
-    ///                  ) *( OWS ";" OWS parameter )
-    /// accept-params  = weight *( accept-ext )
-    /// accept-ext = OWS ";" OWS token [ "=" ( token / quoted-string ) ]
-    /// ```
-    ///
-    /// # Example values
-    /// * `audio/*; q=0.2, audio/basic` (`*` value won't parse correctly)
-    /// * `text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, Accept, qitem};
-    /// use hyper::mime::{Mime, TopLevel, SubLevel};
-    ///
-    /// let mut headers = Headers::new();
-    ///
-    /// headers.set(
-    ///     Accept(vec![
-    ///         qitem(Mime(TopLevel::Text, SubLevel::Html, vec![])),
-    ///     ])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, Accept, qitem};
-    /// use hyper::mime::{Mime, TopLevel, SubLevel, Attr, Value};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     Accept(vec![
-    ///         qitem(Mime(TopLevel::Application, SubLevel::Json,
-    ///                    vec![(Attr::Charset, Value::Utf8)])),
-    ///     ])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, Accept, QualityItem, Quality, qitem};
-    /// use hyper::mime::{Mime, TopLevel, SubLevel};
-    ///
-    /// let mut headers = Headers::new();
-    ///
-    /// headers.set(
-    ///     Accept(vec![
-    ///         qitem(Mime(TopLevel::Text, SubLevel::Html, vec![])),
-    ///         qitem(Mime(TopLevel::Application,
-    ///                    SubLevel::Ext("xhtml+xml".to_owned()), vec![])),
-    ///         QualityItem::new(Mime(TopLevel::Application, SubLevel::Xml, vec![]),
-    ///                          Quality(900)),
-    ///                          qitem(Mime(TopLevel::Image,
-    ///                                     SubLevel::Ext("webp".to_owned()), vec![])),
-    ///                          QualityItem::new(Mime(TopLevel::Star, SubLevel::Star, vec![]),
-    ///                                           Quality(800))
-    ///     ])
-    /// );
-    /// ```
-    ///
-    /// # Notes
-    /// * Using always Mime types to represent `media-range` differs from the ABNF.
-    /// * **FIXME**: `accept-ext` is not supported.
-    (Accept, "Accept") => (QualityItem<Mime>)+
-
-    test_accept {
-        // Tests from the RFC
-        // FIXME: Test fails, first value containing a "*" fails to parse
-        // test_header!(
-        //    test1,
-        //    vec![b"audio/*; q=0.2, audio/basic"],
-        //    Some(HeaderField(vec![
-        //        QualityItem::new(Mime(TopLevel::Audio, SubLevel::Star, vec![]), Quality(200)),
-        //        qitem(Mime(TopLevel::Audio, SubLevel::Ext("basic".to_owned()), vec![])),
-        //        ])));
-        test_header!(
-            test2,
-            vec![b"text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c"],
-            Some(HeaderField(vec![
-                QualityItem::new(Mime(TopLevel::Text, SubLevel::Plain, vec![]), Quality(500)),
-                qitem(Mime(TopLevel::Text, SubLevel::Html, vec![])),
-                QualityItem::new(
-                    Mime(TopLevel::Text, SubLevel::Ext("x-dvi".to_owned()), vec![]),
-                    Quality(800)),
-                qitem(Mime(TopLevel::Text, SubLevel::Ext("x-c".to_owned()), vec![])),
-                ])));
-        // Custom tests
-        test_header!(
-            test3,
-            vec![b"text/plain; charset=utf-8"],
-            Some(Accept(vec![
-                qitem(Mime(TopLevel::Text, SubLevel::Plain, vec![(Attr::Charset, Value::Utf8)])),
-                ])));
-        test_header!(
-            test4,
-            vec![b"text/plain; charset=utf-8; q=0.5"],
-            Some(Accept(vec![
-                QualityItem::new(Mime(TopLevel::Text,
-                    SubLevel::Plain, vec![(Attr::Charset, Value::Utf8)]),
-                    Quality(500)),
-            ])));
-    }
-}
-
-impl Accept {
-    /// A constructor to easily create `Accept: */*`.
-    pub fn star() -> Accept {
-        Accept(vec![qitem(mime!(Star/Star))])
-    }
-
-    /// A constructor to easily create `Accept: application/json`.
-    pub fn json() -> Accept {
-        Accept(vec![qitem(mime!(Application/Json))])
-    }
-
-    /// A constructor to easily create `Accept: text/*`.
-    pub fn text() -> Accept {
-        Accept(vec![qitem(mime!(Text/Star))])
-    }
-
-    /// A constructor to easily create `Accept: image/*`.
-    pub fn image() -> Accept {
-        Accept(vec![qitem(mime!(Image/Star))])
-    }
-}
-
-
-bench_header!(bench, Accept, { vec![b"text/plain; q=0.5, text/html".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/accept_charset.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-use header::{Charset, QualityItem};
-
-header! {
-    /// `Accept-Charset` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.3.3)
-    ///
-    /// The `Accept-Charset` header field can be sent by a user agent to
-    /// indicate what charsets are acceptable in textual response content.
-    /// This field allows user agents capable of understanding more
-    /// comprehensive or special-purpose charsets to signal that capability
-    /// to an origin server that is capable of representing information in
-    /// those charsets.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Accept-Charset = 1#( ( charset / "*" ) [ weight ] )
-    /// ```
-    ///
-    /// # Example values
-    /// * `iso-8859-5, unicode-1-1;q=0.8`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, AcceptCharset, Charset, qitem};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptCharset(vec![qitem(Charset::Us_Ascii)])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AcceptCharset, Charset, Quality, QualityItem};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptCharset(vec![
-    ///         QualityItem::new(Charset::Us_Ascii, Quality(900)),
-    ///         QualityItem::new(Charset::Iso_8859_10, Quality(200)),
-    ///     ])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AcceptCharset, Charset, qitem};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptCharset(vec![qitem(Charset::Ext("utf-8".to_owned()))])
-    /// );
-    /// ```
-    (AcceptCharset, "Accept-Charset") => (QualityItem<Charset>)+
-
-    test_accept_charset {
-        /// Testcase from RFC
-        test_header!(test1, vec![b"iso-8859-5, unicode-1-1;q=0.8"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/accept_encoding.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-use header::{Encoding, QualityItem};
-
-header! {
-    /// `Accept-Encoding` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.3.4)
-    ///
-    /// The `Accept-Encoding` header field can be used by user agents to
-    /// indicate what response content-codings are
-    /// acceptable in the response.  An  `identity` token is used as a synonym
-    /// for "no encoding" in order to communicate when no encoding is
-    /// preferred.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Accept-Encoding  = #( codings [ weight ] )
-    /// codings          = content-coding / "identity" / "*"
-    /// ```
-    ///
-    /// # Example values
-    /// * `compress, gzip`
-    /// * ``
-    /// * `*`
-    /// * `compress;q=0.5, gzip;q=1`
-    /// * `gzip;q=1.0, identity; q=0.5, *;q=0`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, AcceptEncoding, Encoding, qitem};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptEncoding(vec![qitem(Encoding::Chunked)])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AcceptEncoding, Encoding, qitem};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptEncoding(vec![
-    ///         qitem(Encoding::Chunked),
-    ///         qitem(Encoding::Gzip),
-    ///         qitem(Encoding::Deflate),
-    ///     ])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AcceptEncoding, Encoding, QualityItem, Quality, qitem};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptEncoding(vec![
-    ///         qitem(Encoding::Chunked),
-    ///         QualityItem::new(Encoding::Gzip, Quality(600)),
-    ///         QualityItem::new(Encoding::EncodingExt("*".to_owned()), Quality(0)),
-    ///     ])
-    /// );
-    /// ```
-    (AcceptEncoding, "Accept-Encoding") => (QualityItem<Encoding>)*
-
-    test_accept_encoding {
-        // From the RFC
-        test_header!(test1, vec![b"compress, gzip"]);
-        test_header!(test2, vec![b""], Some(AcceptEncoding(vec![])));
-        test_header!(test3, vec![b"*"]);
-        // Note: Removed quality 1 from gzip
-        test_header!(test4, vec![b"compress;q=0.5, gzip"]);
-        // Note: Removed quality 1 from gzip
-        test_header!(test5, vec![b"gzip, identity; q=0.5, *;q=0"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/accept_language.rs
+++ /dev/null
@@ -1,70 +0,0 @@
-use language_tags::LanguageTag;
-use header::QualityItem;
-
-header! {
-    /// `Accept-Language` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.3.5)
-    ///
-    /// The `Accept-Language` header field can be used by user agents to
-    /// indicate the set of natural languages that are preferred in the
-    /// response.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Accept-Language = 1#( language-range [ weight ] )
-    /// language-range  = <language-range, see [RFC4647], Section 2.1>
-    /// ```
-    ///
-    /// # Example values
-    /// * `da, en-gb;q=0.8, en;q=0.7`
-    /// * `en-us;q=1.0, en;q=0.5, fr`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::LanguageTag;
-    /// use hyper::header::{Headers, AcceptLanguage, qitem};
-    ///
-    /// let mut headers = Headers::new();
-    /// let mut langtag: LanguageTag = Default::default();
-    /// langtag.language = Some("en".to_owned());
-    /// langtag.region = Some("US".to_owned());
-    /// headers.set(
-    ///     AcceptLanguage(vec![
-    ///         qitem(langtag),
-    ///     ])
-    /// );
-    /// ```
-    /// ```
-    /// # extern crate hyper;
-    /// # #[macro_use] extern crate language_tags;
-    /// # use hyper::header::{Headers, AcceptLanguage, QualityItem, Quality, qitem};
-    /// #
-    /// # fn main() {
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptLanguage(vec![
-    ///         qitem(langtag!(da)),
-    ///         QualityItem::new(langtag!(en;;;GB), Quality(800)),
-    ///         QualityItem::new(langtag!(en), Quality(700)),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (AcceptLanguage, "Accept-Language") => (QualityItem<LanguageTag>)+
-
-    test_accept_language {
-        // From the RFC
-        test_header!(test1, vec![b"da, en-gb;q=0.8, en;q=0.7"]);
-        // Own test
-        test_header!(
-            test2, vec![b"en-US, en; q=0.5, fr"],
-            Some(AcceptLanguage(vec![
-                qitem(langtag!(en;;;US)),
-                QualityItem::new(langtag!(en), Quality(500)),
-                qitem(langtag!(fr)),
-        ])));
-    }
-}
-
-bench_header!(bench, AcceptLanguage,
-              { vec![b"en-us;q=1.0, en;q=0.5, fr".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/accept_ranges.rs
+++ /dev/null
@@ -1,101 +0,0 @@
-use std::fmt::{self, Display};
-use std::str::FromStr;
-
-header! {
-    /// `Accept-Ranges` header, defined in
-    /// [RFC7233](http://tools.ietf.org/html/rfc7233#section-2.3)
-    ///
-    /// The `Accept-Ranges` header field allows a server to indicate that it
-    /// supports range requests for the target resource.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Accept-Ranges     = acceptable-ranges
-    /// acceptable-ranges = 1#range-unit / \"none\"
-    ///
-    /// # Example values
-    /// * `bytes`
-    /// * `none`
-    /// * `unknown-unit`
-    /// ```
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, AcceptRanges, RangeUnit};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(AcceptRanges(vec![RangeUnit::Bytes]));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AcceptRanges, RangeUnit};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(AcceptRanges(vec![RangeUnit::None]));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AcceptRanges, RangeUnit};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptRanges(vec![
-    ///         RangeUnit::Unregistered("nibbles".to_owned()),
-    ///         RangeUnit::Bytes,
-    ///         RangeUnit::Unregistered("doublets".to_owned()),
-    ///         RangeUnit::Unregistered("quadlets".to_owned()),
-    ///     ])
-    /// );
-    /// ```
-    (AcceptRanges, "Accept-Ranges") => (RangeUnit)+
-
-    test_acccept_ranges {
-        test_header!(test1, vec![b"bytes"]);
-        test_header!(test2, vec![b"none"]);
-        test_header!(test3, vec![b"unknown-unit"]);
-        test_header!(test4, vec![b"bytes, unknown-unit"]);
-    }
-}
-
-/// Range Units, described in [RFC7233](http://tools.ietf.org/html/rfc7233#section-2)
-///
-/// A representation can be partitioned into subranges according to
-/// various structural units, depending on the structure inherent in the
-/// representation's media type.
-///
-/// # ABNF
-/// ```plain
-/// range-unit       = bytes-unit / other-range-unit
-/// bytes-unit       = "bytes"
-/// other-range-unit = token
-/// ```
-#[derive(Clone, Debug, Eq, PartialEq)]
-pub enum RangeUnit {
-    /// Indicating byte-range requests are supported.
-    Bytes,
-    /// Reserved as keyword, indicating no ranges are supported.
-    None,
-    /// The given range unit is not registered at IANA.
-    Unregistered(String),
-}
-
-
-impl FromStr for RangeUnit {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<Self> {
-        match s {
-            "bytes" => Ok(RangeUnit::Bytes),
-            "none" => Ok(RangeUnit::None),
-            // FIXME: Check if s is really a Token
-            _ => Ok(RangeUnit::Unregistered(s.to_owned())),
-        }
-    }
-}
-
-impl Display for RangeUnit {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            RangeUnit::Bytes => f.write_str("bytes"),
-            RangeUnit::None => f.write_str("none"),
-            RangeUnit::Unregistered(ref x) => f.write_str(&x),
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_credentials.rs
+++ /dev/null
@@ -1,89 +0,0 @@
-use std::fmt::{self, Display};
-use std::str;
-use unicase::UniCase;
-use header::{Header, HeaderFormat};
-
-/// `Access-Control-Allow-Credentials` header, part of
-/// [CORS](http://www.w3.org/TR/cors/#access-control-allow-headers-response-header)
-///
-/// > The Access-Control-Allow-Credentials HTTP response header indicates whether the
-/// > response to request can be exposed when the credentials flag is true. When part
-/// > of the response to an preflight request it indicates that the actual request can
-/// > be made with credentials. The Access-Control-Allow-Credentials HTTP header must
-/// > match the following ABNF:
-///
-/// # ABNF
-/// ```plain
-/// Access-Control-Allow-Credentials: "Access-Control-Allow-Credentials" ":" "true"
-/// ```
-///
-/// Since there is only one acceptable field value, the header struct does not accept
-/// any values at all. Setting an empty `AccessControlAllowCredentials` header is
-/// sufficient. See the examples below.
-///
-/// # Example values
-/// * "true"
-///
-/// # Examples
-/// ```
-/// # extern crate hyper;
-/// # fn main() {
-///
-/// use hyper::header::{Headers, AccessControlAllowCredentials};
-///
-/// let mut headers = Headers::new();
-/// headers.set(AccessControlAllowCredentials);
-/// # }
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct AccessControlAllowCredentials;
-
-const ACCESS_CONTROL_ALLOW_CREDENTIALS_TRUE: UniCase<&'static str> = UniCase("true");
-
-impl Header for AccessControlAllowCredentials {
-    fn header_name() -> &'static str {
-        "Access-Control-Allow-Credentials"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<AccessControlAllowCredentials> {
-        if raw.len() == 1 {
-            let text = unsafe {
-                // safe because:
-                // 1. we just checked raw.len == 1
-                // 2. we don't actually care if it's utf8, we just want to
-                //    compare the bytes with the "case" normalized. If it's not
-                //    utf8, then the byte comparison will fail, and we'll return
-                //    None. No big deal.
-                str::from_utf8_unchecked(raw.get_unchecked(0))
-            };
-            if UniCase(text) == ACCESS_CONTROL_ALLOW_CREDENTIALS_TRUE {
-                return Ok(AccessControlAllowCredentials);
-            }
-        }
-        Err(::Error::Header)
-    }
-}
-
-impl HeaderFormat for AccessControlAllowCredentials {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str("true")
-    }
-}
-
-impl Display for AccessControlAllowCredentials {
-    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-        self.fmt_header(f)
-    }
-}
-
-#[cfg(test)]
-mod test_access_control_allow_credentials {
-    use std::str;
-    use header::*;
-    use super::AccessControlAllowCredentials as HeaderField;
-    test_header!(works,        vec![b"true"], Some(HeaderField));
-    test_header!(ignores_case, vec![b"True"]);
-    test_header!(not_bool,     vec![b"false"], None);
-    test_header!(only_single,  vec![b"true", b"true"], None);
-    test_header!(no_gibberish, vec!["\u{645}\u{631}\u{62d}\u{628}\u{627}".as_bytes()], None);
-}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_headers.rs
+++ /dev/null
@@ -1,58 +0,0 @@
-use unicase::UniCase;
-
-header! {
-    /// `Access-Control-Allow-Headers` header, part of
-    /// [CORS](http://www.w3.org/TR/cors/#access-control-allow-headers-response-header)
-    ///
-    /// The `Access-Control-Allow-Headers` header indicates, as part of the
-    /// response to a preflight request, which header field names can be used
-    /// during the actual request.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Access-Control-Allow-Headers: "Access-Control-Allow-Headers" ":" #field-name
-    /// ```
-    ///
-    /// # Example values
-    /// * `accept-language, date`
-    ///
-    /// # Examples
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, AccessControlAllowHeaders};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlAllowHeaders(vec![UniCase("date".to_owned())])
-    /// );
-    /// # }
-    /// ```
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, AccessControlAllowHeaders};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlAllowHeaders(vec![
-    ///         UniCase("accept-language".to_owned()),
-    ///         UniCase("date".to_owned()),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (AccessControlAllowHeaders, "Access-Control-Allow-Headers") => (UniCase<String>)*
-
-    test_access_control_allow_headers {
-        test_header!(test1, vec![b"accept-language, date"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_methods.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-use method::Method;
-
-header! {
-    /// `Access-Control-Allow-Methods` header, part of
-    /// [CORS](http://www.w3.org/TR/cors/#access-control-allow-methods-response-header)
-    ///
-    /// The `Access-Control-Allow-Methods` header indicates, as part of the
-    /// response to a preflight request, which methods can be used during the
-    /// actual request.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Access-Control-Allow-Methods: "Access-Control-Allow-Methods" ":" #Method
-    /// ```
-    ///
-    /// # Example values
-    /// * `PUT, DELETE, XMODIFY`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, AccessControlAllowMethods};
-    /// use hyper::method::Method;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlAllowMethods(vec![Method::Get])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AccessControlAllowMethods};
-    /// use hyper::method::Method;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlAllowMethods(vec![
-    ///         Method::Get,
-    ///         Method::Post,
-    ///         Method::Patch,
-    ///         Method::Extension("COPY".to_owned()),
-    ///     ])
-    /// );
-    /// ```
-    (AccessControlAllowMethods, "Access-Control-Allow-Methods") => (Method)*
-
-    test_access_control_allow_methods {
-        test_header!(test1, vec![b"PUT, DELETE, XMODIFY"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_origin.rs
+++ /dev/null
@@ -1,98 +0,0 @@
-use std::fmt::{self, Display};
-
-use header::{Header, HeaderFormat};
-
-/// The `Access-Control-Allow-Origin` response header,
-/// part of [CORS](http://www.w3.org/TR/cors/#access-control-allow-origin-response-header)
-///
-/// The `Access-Control-Allow-Origin` header indicates whether a resource
-/// can be shared based by returning the value of the Origin request header,
-/// "*", or "null" in the response.
-///
-/// # ABNF
-/// ```plain
-/// Access-Control-Allow-Origin = "Access-Control-Allow-Origin" ":" origin-list-or-null | "*"
-/// ```
-///
-/// # Example values
-/// * `null`
-/// * `*`
-/// * `http://google.com/`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, AccessControlAllowOrigin};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     AccessControlAllowOrigin::Any
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, AccessControlAllowOrigin};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     AccessControlAllowOrigin::Null,
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, AccessControlAllowOrigin};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     AccessControlAllowOrigin::Value("http://hyper.rs".to_owned())
-/// );
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub enum AccessControlAllowOrigin {
-    /// Allow all origins
-    Any,
-    /// A hidden origin
-    Null,
-    /// Allow one particular origin
-    Value(String),
-}
-
-impl Header for AccessControlAllowOrigin {
-    fn header_name() -> &'static str {
-        "Access-Control-Allow-Origin"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<AccessControlAllowOrigin> {
-        if raw.len() != 1 {
-            return Err(::Error::Header)
-        }
-        let value = unsafe { raw.get_unchecked(0) };
-        Ok(match &value[..] {
-            b"*" => AccessControlAllowOrigin::Any,
-            b"null" => AccessControlAllowOrigin::Null,
-            _ => AccessControlAllowOrigin::Value(try!(String::from_utf8(value.clone())))
-        })
-    }
-}
-
-impl HeaderFormat for AccessControlAllowOrigin {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            AccessControlAllowOrigin::Any => f.write_str("*"),
-            AccessControlAllowOrigin::Null => f.write_str("null"),
-            AccessControlAllowOrigin::Value(ref url) => Display::fmt(url, f),
-        }
-    }
-}
-
-impl Display for AccessControlAllowOrigin {
-    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-        self.fmt_header(f)
-    }
-}
-
-#[cfg(test)]
-mod test_access_control_allow_orgin {
-    use header::*;
-    use super::AccessControlAllowOrigin as HeaderField;
-    test_header!(test1, vec![b"null"]);
-    test_header!(test2, vec![b"*"]);
-    test_header!(test3, vec![b"http://google.com/"]);
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_expose_headers.rs
+++ /dev/null
@@ -1,60 +0,0 @@
-use unicase::UniCase;
-
-header! {
-    /// `Access-Control-Expose-Headers` header, part of
-    /// [CORS](http://www.w3.org/TR/cors/#access-control-expose-headers-response-header)
-    ///
-    /// The Access-Control-Expose-Headers header indicates which headers are safe to expose to the
-    /// API of a CORS API specification.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Access-Control-Expose-Headers = "Access-Control-Expose-Headers" ":" #field-name
-    /// ```
-    ///
-    /// # Example values
-    /// * `ETag, Content-Length`
-    ///
-    /// # Examples
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, AccessControlExposeHeaders};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlExposeHeaders(vec![
-    ///         UniCase("etag".to_owned()),
-    ///         UniCase("content-length".to_owned())
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, AccessControlExposeHeaders};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlExposeHeaders(vec![
-    ///         UniCase("etag".to_owned()),
-    ///         UniCase("content-length".to_owned())
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (AccessControlExposeHeaders, "Access-Control-Expose-Headers") => (UniCase<String>)*
-
-    test_access_control_expose_headers {
-        test_header!(test1, vec![b"etag, content-length"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_max_age.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-header! {
-    /// `Access-Control-Max-Age` header, part of
-    /// [CORS](http://www.w3.org/TR/cors/#access-control-max-age-response-header)
-    ///
-    /// The `Access-Control-Max-Age` header indicates how long the results of a
-    /// preflight request can be cached in a preflight result cache.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Access-Control-Max-Age = \"Access-Control-Max-Age\" \":\" delta-seconds
-    /// ```
-    ///
-    /// # Example values
-    /// * `531`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, AccessControlMaxAge};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(AccessControlMaxAge(1728000u32));
-    /// ```
-    (AccessControlMaxAge, "Access-Control-Max-Age") => [u32]
-
-    test_access_control_max_age {
-        test_header!(test1, vec![b"531"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_request_headers.rs
+++ /dev/null
@@ -1,58 +0,0 @@
-use unicase::UniCase;
-
-header! {
-    /// `Access-Control-Request-Headers` header, part of
-    /// [CORS](http://www.w3.org/TR/cors/#access-control-request-headers-request-header)
-    ///
-    /// The `Access-Control-Request-Headers` header indicates which headers will
-    /// be used in the actual request as part of the preflight request.
-    /// during the actual request.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Access-Control-Allow-Headers: "Access-Control-Allow-Headers" ":" #field-name
-    /// ```
-    ///
-    /// # Example values
-    /// * `accept-language, date`
-    ///
-    /// # Examples
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, AccessControlRequestHeaders};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlRequestHeaders(vec![UniCase("date".to_owned())])
-    /// );
-    /// # }
-    /// ```
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, AccessControlRequestHeaders};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlRequestHeaders(vec![
-    ///         UniCase("accept-language".to_owned()),
-    ///         UniCase("date".to_owned()),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (AccessControlRequestHeaders, "Access-Control-Request-Headers") => (UniCase<String>)*
-
-    test_access_control_request_headers {
-        test_header!(test1, vec![b"accept-language, date"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_request_method.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-use method::Method;
-
-header! {
-    /// `Access-Control-Request-Method` header, part of
-    /// [CORS](http://www.w3.org/TR/cors/#access-control-request-method-request-header)
-    /// 
-    /// The `Access-Control-Request-Method` header indicates which method will be
-    /// used in the actual request as part of the preflight request.
-    /// # ABNF
-    /// ```plain
-    /// Access-Control-Request-Method: \"Access-Control-Request-Method\" \":\" Method
-    /// ```
-    /// 
-    /// # Example values
-    /// * `GET`
-    /// 
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, AccessControlRequestMethod};
-    /// use hyper::method::Method;
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(AccessControlRequestMethod(Method::Get));
-    /// ```
-    (AccessControlRequestMethod, "Access-Control-Request-Method") => [Method]
-
-    test_access_control_request_method {
-        test_header!(test1, vec![b"GET"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/allow.rs
+++ /dev/null
@@ -1,76 +0,0 @@
-use method::Method;
-
-header! {
-    /// `Allow` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.4.1)
-    ///
-    /// The `Allow` header field lists the set of methods advertised as
-    /// supported by the target resource.  The purpose of this field is
-    /// strictly to inform the recipient of valid request methods associated
-    /// with the resource.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Allow = #method
-    /// ```
-    ///
-    /// # Example values
-    /// * `GET, HEAD, PUT`
-    /// * `OPTIONS, GET, PUT, POST, DELETE, HEAD, TRACE, CONNECT, PATCH, fOObAr`
-    /// * ``
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, Allow};
-    /// use hyper::method::Method;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     Allow(vec![Method::Get])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, Allow};
-    /// use hyper::method::Method;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     Allow(vec![
-    ///         Method::Get,
-    ///         Method::Post,
-    ///         Method::Patch,
-    ///         Method::Extension("COPY".to_owned()),
-    ///     ])
-    /// );
-    /// ```
-    (Allow, "Allow") => (Method)*
-
-    test_allow {
-        // From the RFC
-        test_header!(
-            test1,
-            vec![b"GET, HEAD, PUT"],
-            Some(HeaderField(vec![Method::Get, Method::Head, Method::Put])));
-        // Own tests
-        test_header!(
-            test2,
-            vec![b"OPTIONS, GET, PUT, POST, DELETE, HEAD, TRACE, CONNECT, PATCH, fOObAr"],
-            Some(HeaderField(vec![
-                Method::Options,
-                Method::Get,
-                Method::Put,
-                Method::Post,
-                Method::Delete,
-                Method::Head,
-                Method::Trace,
-                Method::Connect,
-                Method::Patch,
-                Method::Extension("fOObAr".to_owned())])));
-        test_header!(
-            test3,
-            vec![b""],
-            Some(HeaderField(Vec::<Method>::new())));
-    }
-}
-
-bench_header!(bench,
-    Allow, { vec![b"OPTIONS,GET,PUT,POST,DELETE,HEAD,TRACE,CONNECT,PATCH,fOObAr".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/authorization.rs
+++ /dev/null
@@ -1,289 +0,0 @@
-use std::any::Any;
-use std::fmt::{self, Display};
-use std::str::{FromStr, from_utf8};
-use std::ops::{Deref, DerefMut};
-use base64::{encode, decode};
-use header::{Header, HeaderFormat};
-
-/// `Authorization` header, defined in [RFC7235](https://tools.ietf.org/html/rfc7235#section-4.2)
-///
-/// The `Authorization` header field allows a user agent to authenticate
-/// itself with an origin server -- usually, but not necessarily, after
-/// receiving a 401 (Unauthorized) response.  Its value consists of
-/// credentials containing the authentication information of the user
-/// agent for the realm of the resource being requested.
-///
-/// # ABNF
-/// ```plain
-/// Authorization = credentials
-/// ```
-///
-/// # Example values
-/// * `Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==`
-/// * `Bearer fpKL54jvWmEGVoRdCNjG`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Authorization};
-///
-/// let mut headers = Headers::new();
-/// headers.set(Authorization("let me in".to_owned()));
-/// ```
-/// ```
-/// use hyper::header::{Headers, Authorization, Basic};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///    Authorization(
-///        Basic {
-///            username: "Aladdin".to_owned(),
-///            password: Some("open sesame".to_owned())
-///        }
-///    )
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, Authorization, Bearer};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///    Authorization(
-///        Bearer {
-///            token: "QWxhZGRpbjpvcGVuIHNlc2FtZQ".to_owned()
-///        }
-///    )
-/// );
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct Authorization<S: Scheme>(pub S);
-
-impl<S: Scheme> Deref for Authorization<S> {
-    type Target = S;
-
-    fn deref(&self) -> &S {
-        &self.0
-    }
-}
-
-impl<S: Scheme> DerefMut for Authorization<S> {
-    fn deref_mut(&mut self) -> &mut S {
-        &mut self.0
-    }
-}
-
-impl<S: Scheme + Any> Header for Authorization<S> where <S as FromStr>::Err: 'static {
-    fn header_name() -> &'static str {
-        "Authorization"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Authorization<S>> {
-        if raw.len() != 1 {
-            return Err(::Error::Header);
-        }
-        let header = try!(from_utf8(unsafe { &raw.get_unchecked(0)[..] }));
-        if let Some(scheme) = <S as Scheme>::scheme() {
-            if header.starts_with(scheme) && header.len() > scheme.len() + 1 {
-                match header[scheme.len() + 1..].parse::<S>().map(Authorization) {
-                    Ok(h) => Ok(h),
-                    Err(_) => Err(::Error::Header)
-                }
-            } else {
-                Err(::Error::Header)
-            }
-        } else {
-            match header.parse::<S>().map(Authorization) {
-                Ok(h) => Ok(h),
-                Err(_) => Err(::Error::Header)
-            }
-        }
-    }
-}
-
-impl<S: Scheme + Any> HeaderFormat for Authorization<S> where <S as FromStr>::Err: 'static {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        if let Some(scheme) = <S as Scheme>::scheme() {
-            try!(write!(f, "{} ", scheme))
-        };
-        self.0.fmt_scheme(f)
-    }
-}
-
-/// An Authorization scheme to be used in the header.
-pub trait Scheme: FromStr + fmt::Debug + Clone + Send + Sync {
-    /// An optional Scheme name.
-    ///
-    /// Will be replaced with an associated constant once available.
-    fn scheme() -> Option<&'static str>;
-    /// Format the Scheme data into a header value.
-    fn fmt_scheme(&self, &mut fmt::Formatter) -> fmt::Result;
-}
-
-impl Scheme for String {
-    fn scheme() -> Option<&'static str> {
-        None
-    }
-
-    fn fmt_scheme(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        Display::fmt(self, f)
-    }
-}
-
-/// Credential holder for Basic Authentication
-#[derive(Clone, PartialEq, Debug)]
-pub struct Basic {
-    /// The username as a possibly empty string
-    pub username: String,
-    /// The password. `None` if the `:` delimiter character was not
-    /// part of the parsed input.
-    pub password: Option<String>
-}
-
-impl Scheme for Basic {
-    fn scheme() -> Option<&'static str> {
-        Some("Basic")
-    }
-
-    fn fmt_scheme(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        //FIXME: serialize::base64 could use some Debug implementation, so
-        //that we don't have to allocate a new string here just to write it
-        //to the formatter.
-        let mut text = self.username.clone();
-        text.push(':');
-        if let Some(ref pass) = self.password {
-            text.push_str(&pass[..]);
-        }
-
-        f.write_str(&encode(text.as_bytes()))
-    }
-}
-
-impl FromStr for Basic {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<Basic> {
-        match decode(s) {
-            Ok(decoded) => match String::from_utf8(decoded) {
-                Ok(text) => {
-                    let mut parts = &mut text.split(':');
-                    let user = match parts.next() {
-                        Some(part) => part.to_owned(),
-                        None => return Err(::Error::Header)
-                    };
-                    let password = match parts.next() {
-                        Some(part) => Some(part.to_owned()),
-                        None => None
-                    };
-                    Ok(Basic {
-                        username: user,
-                        password: password
-                    })
-                },
-                Err(e) => {
-                    debug!("Basic::from_utf8 error={:?}", e);
-                    Err(::Error::Header)
-                }
-            },
-            Err(e) => {
-                debug!("Basic::from_base64 error={:?}", e);
-                Err(::Error::Header)
-            }
-        }
-    }
-}
-
-#[derive(Clone, PartialEq, Debug)]
-///Token holder for Bearer Authentication, most often seen with oauth
-pub struct Bearer {
-	///Actual bearer token as a string
-	pub token: String
-}
-
-impl Scheme for Bearer {
-	fn scheme() -> Option<&'static str> {
-		Some("Bearer")
-	}
-
-	fn fmt_scheme(&self, f: &mut fmt::Formatter) -> fmt::Result {
-		write!(f, "{}", self.token)
-	}
-}
-
-impl FromStr for Bearer {
-	type Err = ::Error;
-	fn from_str(s: &str) -> ::Result<Bearer> {
-		Ok(Bearer { token: s.to_owned()})
-	}
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Authorization, Basic, Bearer};
-    use super::super::super::{Headers, Header};
-
-    #[test]
-    fn test_raw_auth() {
-        let mut headers = Headers::new();
-        headers.set(Authorization("foo bar baz".to_owned()));
-        assert_eq!(headers.to_string(), "Authorization: foo bar baz\r\n".to_owned());
-    }
-
-    #[test]
-    fn test_raw_auth_parse() {
-        let header: Authorization<String> = Header::parse_header(
-            &[b"foo bar baz".to_vec()]).unwrap();
-        assert_eq!(header.0, "foo bar baz");
-    }
-
-    #[test]
-    fn test_basic_auth() {
-        let mut headers = Headers::new();
-        headers.set(Authorization(
-            Basic { username: "Aladdin".to_owned(), password: Some("open sesame".to_owned()) }));
-        assert_eq!(
-            headers.to_string(),
-            "Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\r\n".to_owned());
-    }
-
-    #[test]
-    fn test_basic_auth_no_password() {
-        let mut headers = Headers::new();
-        headers.set(Authorization(Basic { username: "Aladdin".to_owned(), password: None }));
-        assert_eq!(headers.to_string(), "Authorization: Basic QWxhZGRpbjo=\r\n".to_owned());
-    }
-
-    #[test]
-    fn test_basic_auth_parse() {
-        let auth: Authorization<Basic> = Header::parse_header(
-            &[b"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==".to_vec()]).unwrap();
-        assert_eq!(auth.0.username, "Aladdin");
-        assert_eq!(auth.0.password, Some("open sesame".to_owned()));
-    }
-
-    #[test]
-    fn test_basic_auth_parse_no_password() {
-        let auth: Authorization<Basic> = Header::parse_header(
-            &[b"Basic QWxhZGRpbjo=".to_vec()]).unwrap();
-        assert_eq!(auth.0.username, "Aladdin");
-        assert_eq!(auth.0.password, Some("".to_owned()));
-    }
-
-	#[test]
-    fn test_bearer_auth() {
-        let mut headers = Headers::new();
-        headers.set(Authorization(
-            Bearer { token: "fpKL54jvWmEGVoRdCNjG".to_owned() }));
-        assert_eq!(
-            headers.to_string(),
-            "Authorization: Bearer fpKL54jvWmEGVoRdCNjG\r\n".to_owned());
-    }
-
-    #[test]
-    fn test_bearer_auth_parse() {
-        let auth: Authorization<Bearer> = Header::parse_header(
-            &[b"Bearer fpKL54jvWmEGVoRdCNjG".to_vec()]).unwrap();
-        assert_eq!(auth.0.token, "fpKL54jvWmEGVoRdCNjG");
-    }
-}
-
-bench_header!(raw, Authorization<String>, { vec![b"foo bar baz".to_vec()] });
-bench_header!(basic, Authorization<Basic>, { vec![b"Basic QWxhZGRpbjpuIHNlc2FtZQ==".to_vec()] });
-bench_header!(bearer, Authorization<Bearer>, { vec![b"Bearer fpKL54jvWmEGVoRdCNjG".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/cache_control.rs
+++ /dev/null
@@ -1,211 +0,0 @@
-use std::fmt;
-use std::str::FromStr;
-use header::{Header, HeaderFormat};
-use header::parsing::{from_comma_delimited, fmt_comma_delimited};
-
-/// `Cache-Control` header, defined in [RFC7234](https://tools.ietf.org/html/rfc7234#section-5.2)
-///
-/// The `Cache-Control` header field is used to specify directives for
-/// caches along the request/response chain.  Such cache directives are
-/// unidirectional in that the presence of a directive in a request does
-/// not imply that the same directive is to be given in the response.
-///
-/// # ABNF
-/// ```plain
-/// Cache-Control   = 1#cache-directive
-/// cache-directive = token [ "=" ( token / quoted-string ) ]
-/// ```
-///
-/// # Example values
-/// * `no-cache`
-/// * `private, community="UCI"`
-/// * `max-age=30`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, CacheControl, CacheDirective};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     CacheControl(vec![CacheDirective::MaxAge(86400u32)])
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, CacheControl, CacheDirective};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     CacheControl(vec![
-///         CacheDirective::NoCache,
-///         CacheDirective::Private,
-///         CacheDirective::MaxAge(360u32),
-///         CacheDirective::Extension("foo".to_owned(),
-///                                   Some("bar".to_owned())),
-///     ])
-/// );
-/// ```
-#[derive(PartialEq, Clone, Debug)]
-pub struct CacheControl(pub Vec<CacheDirective>);
-
-__hyper__deref!(CacheControl => Vec<CacheDirective>);
-
-impl Header for CacheControl {
-    fn header_name() -> &'static str {
-        "Cache-Control"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<CacheControl> {
-        let directives = try!(from_comma_delimited(raw));
-        if !directives.is_empty() {
-            Ok(CacheControl(directives))
-        } else {
-            Err(::Error::Header)
-        }
-    }
-}
-
-impl HeaderFormat for CacheControl {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for CacheControl {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt_comma_delimited(f, &self[..])
-    }
-}
-
-/// `CacheControl` contains a list of these directives.
-#[derive(PartialEq, Clone, Debug)]
-pub enum CacheDirective {
-    /// "no-cache"
-    NoCache,
-    /// "no-store"
-    NoStore,
-    /// "no-transform"
-    NoTransform,
-    /// "only-if-cached"
-    OnlyIfCached,
-
-    // request directives
-    /// "max-age=delta"
-    MaxAge(u32),
-    /// "max-stale=delta"
-    MaxStale(u32),
-    /// "min-fresh=delta"
-    MinFresh(u32),
-
-    // response directives
-    /// "must-revalidate"
-    MustRevalidate,
-    /// "public"
-    Public,
-    /// "private"
-    Private,
-    /// "proxy-revalidate"
-    ProxyRevalidate,
-    /// "s-maxage=delta"
-    SMaxAge(u32),
-
-    /// Extension directives. Optionally include an argument.
-    Extension(String, Option<String>)
-}
-
-impl fmt::Display for CacheDirective {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        use self::CacheDirective::*;
-        fmt::Display::fmt(match *self {
-            NoCache => "no-cache",
-            NoStore => "no-store",
-            NoTransform => "no-transform",
-            OnlyIfCached => "only-if-cached",
-
-            MaxAge(secs) => return write!(f, "max-age={}", secs),
-            MaxStale(secs) => return write!(f, "max-stale={}", secs),
-            MinFresh(secs) => return write!(f, "min-fresh={}", secs),
-
-            MustRevalidate => "must-revalidate",
-            Public => "public",
-            Private => "private",
-            ProxyRevalidate => "proxy-revalidate",
-            SMaxAge(secs) => return write!(f, "s-maxage={}", secs),
-
-            Extension(ref name, None) => &name[..],
-            Extension(ref name, Some(ref arg)) => return write!(f, "{}={}", name, arg),
-
-        }, f)
-    }
-}
-
-impl FromStr for CacheDirective {
-    type Err = Option<<u32 as FromStr>::Err>;
-    fn from_str(s: &str) -> Result<CacheDirective, Option<<u32 as FromStr>::Err>> {
-        use self::CacheDirective::*;
-        match s {
-            "no-cache" => Ok(NoCache),
-            "no-store" => Ok(NoStore),
-            "no-transform" => Ok(NoTransform),
-            "only-if-cached" => Ok(OnlyIfCached),
-            "must-revalidate" => Ok(MustRevalidate),
-            "public" => Ok(Public),
-            "private" => Ok(Private),
-            "proxy-revalidate" => Ok(ProxyRevalidate),
-            "" => Err(None),
-            _ => match s.find('=') {
-                Some(idx) if idx+1 < s.len() => match (&s[..idx], (&s[idx+1..]).trim_matches('"')) {
-                    ("max-age" , secs) => secs.parse().map(MaxAge).map_err(Some),
-                    ("max-stale", secs) => secs.parse().map(MaxStale).map_err(Some),
-                    ("min-fresh", secs) => secs.parse().map(MinFresh).map_err(Some),
-                    ("s-maxage", secs) => secs.parse().map(SMaxAge).map_err(Some),
-                    (left, right) => Ok(Extension(left.to_owned(), Some(right.to_owned())))
-                },
-                Some(_) => Err(None),
-                None => Ok(Extension(s.to_owned(), None))
-            }
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use header::Header;
-    use super::*;
-
-    #[test]
-    fn test_parse_multiple_headers() {
-        let cache = Header::parse_header(&[b"no-cache".to_vec(), b"private".to_vec()]);
-        assert_eq!(cache.ok(), Some(CacheControl(vec![CacheDirective::NoCache,
-                                                 CacheDirective::Private])))
-    }
-
-    #[test]
-    fn test_parse_argument() {
-        let cache = Header::parse_header(&[b"max-age=100, private".to_vec()]);
-        assert_eq!(cache.ok(), Some(CacheControl(vec![CacheDirective::MaxAge(100),
-                                                 CacheDirective::Private])))
-    }
-
-    #[test]
-    fn test_parse_quote_form() {
-        let cache = Header::parse_header(&[b"max-age=\"200\"".to_vec()]);
-        assert_eq!(cache.ok(), Some(CacheControl(vec![CacheDirective::MaxAge(200)])))
-    }
-
-    #[test]
-    fn test_parse_extension() {
-        let cache = Header::parse_header(&[b"foo, bar=baz".to_vec()]);
-        assert_eq!(cache.ok(), Some(CacheControl(vec![
-            CacheDirective::Extension("foo".to_owned(), None),
-            CacheDirective::Extension("bar".to_owned(), Some("baz".to_owned()))])))
-    }
-
-    #[test]
-    fn test_parse_bad_syntax() {
-        let cache: ::Result<CacheControl> = Header::parse_header(&[b"foo=".to_vec()]);
-        assert_eq!(cache.ok(), None)
-    }
-}
-
-bench_header!(normal,
-    CacheControl, { vec![b"no-cache, private".to_vec(), b"max-age=100".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/connection.rs
+++ /dev/null
@@ -1,143 +0,0 @@
-use std::fmt::{self, Display};
-use std::str::FromStr;
-use unicase::UniCase;
-
-pub use self::ConnectionOption::{KeepAlive, Close, ConnectionHeader};
-
-const KEEP_ALIVE: UniCase<&'static str> = UniCase("keep-alive");
-const CLOSE: UniCase<&'static str> = UniCase("close");
-
-/// Values that can be in the `Connection` header.
-#[derive(Clone, PartialEq, Debug)]
-pub enum ConnectionOption {
-    /// The `keep-alive` connection value.
-    KeepAlive,
-    /// The `close` connection value.
-    Close,
-    /// Values in the Connection header that are supposed to be names of other Headers.
-    ///
-    /// > When a header field aside from Connection is used to supply control
-    /// > information for or about the current connection, the sender MUST list
-    /// > the corresponding field-name within the Connection header field.
-    // TODO: it would be nice if these "Strings" could be stronger types, since
-    // they are supposed to relate to other Header fields (which we have strong
-    // types for).
-    ConnectionHeader(UniCase<String>),
-}
-
-impl FromStr for ConnectionOption {
-    type Err = ();
-    fn from_str(s: &str) -> Result<ConnectionOption, ()> {
-        if UniCase(s) == KEEP_ALIVE {
-            Ok(KeepAlive)
-        } else if UniCase(s) == CLOSE {
-            Ok(Close)
-        } else {
-            Ok(ConnectionHeader(UniCase(s.to_owned())))
-        }
-    }
-}
-
-impl Display for ConnectionOption {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(match *self {
-            KeepAlive => "keep-alive",
-            Close => "close",
-            ConnectionHeader(UniCase(ref s)) => s.as_ref()
-        })
-    }
-}
-
-header! {
-    /// `Connection` header, defined in
-    /// [RFC7230](http://tools.ietf.org/html/rfc7230#section-6.1)
-    ///
-    /// The `Connection` header field allows the sender to indicate desired
-    /// control options for the current connection.  In order to avoid
-    /// confusing downstream recipients, a proxy or gateway MUST remove or
-    /// replace any received connection options before forwarding the
-    /// message.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Connection        = 1#connection-option
-    /// connection-option = token
-    ///
-    /// # Example values
-    /// * `close`
-    /// * `keep-alive`
-    /// * `upgrade`
-    /// ```
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, Connection};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Connection::keep_alive());
-    /// ```
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, Connection, ConnectionOption};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     Connection(vec![
-    ///         ConnectionOption::ConnectionHeader(UniCase("upgrade".to_owned())),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (Connection, "Connection") => (ConnectionOption)+
-
-    test_connection {
-        test_header!(test1, vec![b"close"]);
-        test_header!(test2, vec![b"keep-alive"]);
-        test_header!(test3, vec![b"upgrade"]);
-    }
-}
-
-impl Connection {
-    /// A constructor to easily create a `Connection: close` header.
-    #[inline]
-    pub fn close() -> Connection {
-        Connection(vec![ConnectionOption::Close])
-    }
-
-    /// A constructor to easily create a `Connection: keep-alive` header.
-    #[inline]
-    pub fn keep_alive() -> Connection {
-        Connection(vec![ConnectionOption::KeepAlive])
-    }
-}
-
-bench_header!(close, Connection, { vec![b"close".to_vec()] });
-bench_header!(keep_alive, Connection, { vec![b"keep-alive".to_vec()] });
-bench_header!(header, Connection, { vec![b"authorization".to_vec()] });
-
-#[cfg(test)]
-mod tests {
-    use super::{Connection,ConnectionHeader};
-    use header::Header;
-    use unicase::UniCase;
-
-    fn parse_option(header: Vec<u8>) -> Connection {
-        let val = vec![header];
-        let connection: Connection = Header::parse_header(&val[..]).unwrap();
-        connection
-    }
-
-    #[test]
-    fn test_parse() {
-        assert_eq!(Connection::close(),parse_option(b"close".to_vec()));
-        assert_eq!(Connection::keep_alive(),parse_option(b"keep-alive".to_vec()));
-        assert_eq!(Connection::keep_alive(),parse_option(b"Keep-Alive".to_vec()));
-        assert_eq!(Connection(vec![ConnectionHeader(UniCase("upgrade".to_owned()))]),
-            parse_option(b"upgrade".to_vec()));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/content_disposition.rs
+++ /dev/null
@@ -1,265 +0,0 @@
-// # References
-//
-// "The Content-Disposition Header Field" https://www.ietf.org/rfc/rfc2183.txt
-// "The Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)" https://www.ietf.org/rfc/rfc6266.txt
-// "Returning Values from Forms: multipart/form-data" https://www.ietf.org/rfc/rfc2388.txt
-// Browser conformance tests at: http://greenbytes.de/tech/tc2231/
-// IANA assignment: http://www.iana.org/assignments/cont-disp/cont-disp.xhtml
-
-use language_tags::LanguageTag;
-use std::fmt;
-use unicase::UniCase;
-use url::percent_encoding;
-
-use header::{Header, HeaderFormat, parsing};
-use header::parsing::{parse_extended_value, HTTP_VALUE};
-use header::shared::Charset;
-
-/// The implied disposition of the content of the HTTP body
-#[derive(Clone, Debug, PartialEq)]
-pub enum DispositionType {
-    /// Inline implies default processing
-    Inline,
-    /// Attachment implies that the recipient should prompt the user to save the response locally,
-    /// rather than process it normally (as per its media type).
-    Attachment,
-    /// Extension type.  Should be handled by recipients the same way as Attachment
-    Ext(String)
-}
-
-/// A parameter to the disposition type
-#[derive(Clone, Debug, PartialEq)]
-pub enum DispositionParam {
-    /// A Filename consisting of a Charset, an optional LanguageTag, and finally a sequence of
-    /// bytes representing the filename
-    Filename(Charset, Option<LanguageTag>, Vec<u8>),
-    /// Extension type consisting of token and value.  Recipients should ignore unrecognized
-    /// parameters.
-    Ext(String, String)
-}
-
-/// A `Content-Disposition` header, (re)defined in [RFC6266](https://tools.ietf.org/html/rfc6266)
-///
-/// The Content-Disposition response header field is used to convey
-/// additional information about how to process the response payload, and
-/// also can be used to attach additional metadata, such as the filename
-/// to use when saving the response payload locally.
-///
-/// # ABNF
-/// ```plain
-/// content-disposition = "Content-Disposition" ":"
-///                       disposition-type *( ";" disposition-parm )
-///
-/// disposition-type    = "inline" | "attachment" | disp-ext-type
-///                       ; case-insensitive
-///
-/// disp-ext-type       = token
-///
-/// disposition-parm    = filename-parm | disp-ext-parm
-///
-/// filename-parm       = "filename" "=" value
-///                     | "filename*" "=" ext-value
-///
-/// disp-ext-parm       = token "=" value
-///                     | ext-token "=" ext-value
-///
-/// ext-token           = <the characters in token, followed by "*">
-/// ```
-///
-/// # Example
-/// ```
-/// use hyper::header::{Headers, ContentDisposition, DispositionType, DispositionParam, Charset};
-///
-/// let mut headers = Headers::new();
-/// headers.set(ContentDisposition {
-///     disposition: DispositionType::Attachment,
-///     parameters: vec![DispositionParam::Filename(
-///       Charset::Iso_8859_1, // The character set for the bytes of the filename
-///       None, // The optional language tag (see `language-tag` crate)
-///       b"\xa9 Copyright 1989.txt".to_vec() // the actual bytes of the filename
-///     )]
-/// });
-/// ```
-#[derive(Clone, Debug, PartialEq)]
-pub struct ContentDisposition {
-    /// The disposition
-    pub disposition: DispositionType,
-    /// Disposition parameters
-    pub parameters: Vec<DispositionParam>,
-}
-
-impl Header for ContentDisposition {
-    fn header_name() -> &'static str {
-        "Content-Disposition"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<ContentDisposition> {
-        parsing::from_one_raw_str(raw).and_then(|s: String| {
-            let mut sections = s.split(';');
-            let disposition = match sections.next() {
-                Some(s) => s.trim(),
-                None => return Err(::Error::Header),
-            };
-
-            let mut cd = ContentDisposition {
-                disposition: if UniCase(&*disposition) == UniCase("inline") {
-                    DispositionType::Inline
-                } else if UniCase(&*disposition) == UniCase("attachment") {
-                    DispositionType::Attachment
-                } else {
-                    DispositionType::Ext(disposition.to_owned())
-                },
-                parameters: Vec::new(),
-            };
-
-            for section in sections {
-                let mut parts = section.splitn(2, '=');
-
-                let key = if let Some(key) = parts.next() {
-                    key.trim()
-                } else {
-                    return Err(::Error::Header);
-                };
-
-                let val = if let Some(val) = parts.next() {
-                    val.trim()
-                } else {
-                    return Err(::Error::Header);
-                };
-
-                cd.parameters.push(
-                    if UniCase(&*key) == UniCase("filename") {
-                        DispositionParam::Filename(
-                            Charset::Ext("UTF-8".to_owned()), None,
-                            val.trim_matches('"').as_bytes().to_owned())
-                    } else if UniCase(&*key) == UniCase("filename*") {
-                        let extended_value = try!(parse_extended_value(val));
-                        DispositionParam::Filename(extended_value.charset, extended_value.language_tag, extended_value.value)
-                    } else {
-                        DispositionParam::Ext(key.to_owned(), val.trim_matches('"').to_owned())
-                    }
-                );
-            }
-
-            Ok(cd)
-        })
-    }
-}
-
-impl HeaderFormat for ContentDisposition {
-    #[inline]
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self, f)
-    }
-}
-
-impl fmt::Display for ContentDisposition {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match self.disposition {
-            DispositionType::Inline => try!(write!(f, "inline")),
-            DispositionType::Attachment => try!(write!(f, "attachment")),
-            DispositionType::Ext(ref s) => try!(write!(f, "{}", s)),
-        }
-        for param in &self.parameters {
-            match *param {
-                DispositionParam::Filename(ref charset, ref opt_lang, ref bytes) => {
-                    let mut use_simple_format: bool = false;
-                    if opt_lang.is_none() {
-                        if let Charset::Ext(ref ext) = *charset {
-                            if UniCase(&**ext) == UniCase("utf-8") {
-                                use_simple_format = true;
-                            }
-                        }
-                    }
-                    if use_simple_format {
-                        try!(write!(f, "; filename=\"{}\"",
-                                    match String::from_utf8(bytes.clone()) {
-                                        Ok(s) => s,
-                                        Err(_) => return Err(fmt::Error),
-                                    }));
-                    } else {
-                        try!(write!(f, "; filename*={}'", charset));
-                        if let Some(ref lang) = *opt_lang {
-                            try!(write!(f, "{}", lang));
-                        };
-                        try!(write!(f, "'"));
-                        try!(f.write_str(
-                            &percent_encoding::percent_encode(bytes, HTTP_VALUE).to_string()))
-                    }
-                },
-                DispositionParam::Ext(ref k, ref v) => try!(write!(f, "; {}=\"{}\"", k, v)),
-            }
-        }
-        Ok(())
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{ContentDisposition,DispositionType,DispositionParam};
-    use ::header::Header;
-    use ::header::shared::Charset;
-
-    #[test]
-    fn test_parse_header() {
-        assert!(ContentDisposition::parse_header([b"".to_vec()].as_ref()).is_err());
-
-        let a = [b"form-data; dummy=3; name=upload;\r\n filename=\"sample.png\"".to_vec()];
-        let a: ContentDisposition = ContentDisposition::parse_header(a.as_ref()).unwrap();
-        let b = ContentDisposition {
-            disposition: DispositionType::Ext("form-data".to_owned()),
-            parameters: vec![
-                DispositionParam::Ext("dummy".to_owned(), "3".to_owned()),
-                DispositionParam::Ext("name".to_owned(), "upload".to_owned()),
-                DispositionParam::Filename(
-                    Charset::Ext("UTF-8".to_owned()),
-                    None,
-                    "sample.png".bytes().collect()) ]
-        };
-        assert_eq!(a, b);
-
-        let a = [b"attachment; filename=\"image.jpg\"".to_vec()];
-        let a: ContentDisposition = ContentDisposition::parse_header(a.as_ref()).unwrap();
-        let b = ContentDisposition {
-            disposition: DispositionType::Attachment,
-            parameters: vec![
-                DispositionParam::Filename(
-                    Charset::Ext("UTF-8".to_owned()),
-                    None,
-                    "image.jpg".bytes().collect()) ]
-        };
-        assert_eq!(a, b);
-
-        let a = [b"attachment; filename*=UTF-8''%c2%a3%20and%20%e2%82%ac%20rates".to_vec()];
-        let a: ContentDisposition = ContentDisposition::parse_header(a.as_ref()).unwrap();
-        let b = ContentDisposition {
-            disposition: DispositionType::Attachment,
-            parameters: vec![
-                DispositionParam::Filename(
-                    Charset::Ext("UTF-8".to_owned()),
-                    None,
-                    vec![0xc2, 0xa3, 0x20, b'a', b'n', b'd', 0x20,
-                         0xe2, 0x82, 0xac, 0x20, b'r', b'a', b't', b'e', b's']) ]
-        };
-        assert_eq!(a, b);
-    }
-
-    #[test]
-    fn test_display() {
-        let a = [b"attachment; filename*=UTF-8'en'%C2%A3%20and%20%E2%82%AC%20rates".to_vec()];
-        let as_string = ::std::str::from_utf8(&(a[0])).unwrap();
-        let a: ContentDisposition = ContentDisposition::parse_header(a.as_ref()).unwrap();
-        let display_rendered = format!("{}",a);
-        assert_eq!(as_string, display_rendered);
-
-        let a = [b"attachment; filename*=UTF-8''black%20and%20white.csv".to_vec()];
-        let a: ContentDisposition = ContentDisposition::parse_header(a.as_ref()).unwrap();
-        let display_rendered = format!("{}",a);
-        assert_eq!("attachment; filename=\"black and white.csv\"".to_owned(), display_rendered);
-
-        let a = [b"attachment; filename=colourful.csv".to_vec()];
-        let a: ContentDisposition = ContentDisposition::parse_header(a.as_ref()).unwrap();
-        let display_rendered = format!("{}",a);
-        assert_eq!("attachment; filename=\"colourful.csv\"".to_owned(), display_rendered);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/content_encoding.rs
+++ /dev/null
@@ -1,50 +0,0 @@
-use header::Encoding;
-
-header! {
-    /// `Content-Encoding` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-3.1.2.2)
-    /// 
-    /// The `Content-Encoding` header field indicates what content codings
-    /// have been applied to the representation, beyond those inherent in the
-    /// media type, and thus what decoding mechanisms have to be applied in
-    /// order to obtain data in the media type referenced by the Content-Type
-    /// header field.  Content-Encoding is primarily used to allow a
-    /// representation's data to be compressed without losing the identity of
-    /// its underlying media type.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Content-Encoding = 1#content-coding
-    /// ```
-    /// 
-    /// # Example values
-    /// * `gzip`
-    /// 
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, ContentEncoding, Encoding};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(ContentEncoding(vec![Encoding::Chunked]));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, ContentEncoding, Encoding};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     ContentEncoding(vec![
-    ///         Encoding::Gzip,
-    ///         Encoding::Chunked,
-    ///     ])
-    /// );
-    /// ```
-    (ContentEncoding, "Content-Encoding") => (Encoding)+
-
-    test_content_encoding {
-        /// Testcase from the RFC
-        test_header!(test1, vec![b"gzip"], Some(ContentEncoding(vec![Encoding::Gzip])));
-    }
-}
-
-bench_header!(single, ContentEncoding, { vec![b"gzip".to_vec()] });
-bench_header!(multiple, ContentEncoding, { vec![b"gzip, deflate".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/content_language.rs
+++ /dev/null
@@ -1,59 +0,0 @@
-use language_tags::LanguageTag;
-use header::QualityItem;
-
-header! {
-    /// `Content-Language` header, defined in
-    /// [RFC7231](https://tools.ietf.org/html/rfc7231#section-3.1.3.2)
-    /// 
-    /// The `Content-Language` header field describes the natural language(s)
-    /// of the intended audience for the representation.  Note that this
-    /// might not be equivalent to all the languages used within the
-    /// representation.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Content-Language = 1#language-tag
-    /// ```
-    /// 
-    /// # Example values
-    /// * `da`
-    /// * `mi, en`
-    /// 
-    /// # Examples
-    /// ```
-    /// # extern crate hyper;
-    /// # #[macro_use] extern crate language_tags;
-    /// # use hyper::header::{Headers, ContentLanguage, qitem};
-    /// # 
-    /// # fn main() {
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     ContentLanguage(vec![
-    ///         qitem(langtag!(en)),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    /// ```
-    /// # extern crate hyper;
-    /// # #[macro_use] extern crate language_tags;
-    /// # use hyper::header::{Headers, ContentLanguage, qitem};
-    /// # 
-    /// # fn main() {
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     ContentLanguage(vec![
-    ///         qitem(langtag!(da)),
-    ///         qitem(langtag!(en;;;GB)),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (ContentLanguage, "Content-Language") => (QualityItem<LanguageTag>)+
-
-    test_content_language {
-        test_header!(test1, vec![b"da"]);
-        test_header!(test2, vec![b"mi, en"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/content_length.rs
+++ /dev/null
@@ -1,94 +0,0 @@
-use std::fmt;
-
-use header::{HeaderFormat, Header, parsing};
-
-/// `Content-Length` header, defined in
-/// [RFC7230](http://tools.ietf.org/html/rfc7230#section-3.3.2)
-/// 
-/// When a message does not have a `Transfer-Encoding` header field, a
-/// Content-Length header field can provide the anticipated size, as a
-/// decimal number of octets, for a potential payload body.  For messages
-/// that do include a payload body, the Content-Length field-value
-/// provides the framing information necessary for determining where the
-/// body (and message) ends.  For messages that do not include a payload
-/// body, the Content-Length indicates the size of the selected
-/// representation.
-/// 
-/// # ABNF
-/// ```plain
-/// Content-Length = 1*DIGIT
-/// ```
-/// 
-/// # Example values
-/// * `3495`
-/// 
-/// # Example
-/// ```
-/// use hyper::header::{Headers, ContentLength};
-/// 
-/// let mut headers = Headers::new();
-/// headers.set(ContentLength(1024u64));
-/// ```
-#[derive(Clone, Copy, Debug, PartialEq)]
-pub struct ContentLength(pub u64);
-
-impl Header for ContentLength {
-    #[inline]
-    fn header_name() -> &'static str {
-        "Content-Length"
-    }
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<ContentLength> {
-        // If multiple Content-Length headers were sent, everything can still
-        // be alright if they all contain the same value, and all parse
-        // correctly. If not, then it's an error.
-        raw.iter()
-            .map(::std::ops::Deref::deref)
-            .map(parsing::from_raw_str)
-            .fold(None, |prev, x| {
-                match (prev, x) {
-                    (None, x) => Some(x),
-                    (e@Some(Err(_)), _ ) => e,
-                    (Some(Ok(prev)), Ok(x)) if prev == x => Some(Ok(prev)),
-                    _ => Some(Err(::Error::Header))
-                }
-            })
-            .unwrap_or(Err(::Error::Header))
-            .map(ContentLength)
-    }
-}
-
-impl HeaderFormat for ContentLength {
-    #[inline]
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self.0, f)
-    }
-}
-
-impl fmt::Display for ContentLength {
-    #[inline]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self.0, f)
-    }
-}
-
-__hyper__deref!(ContentLength => u64);
-
-__hyper__tm!(ContentLength, tests {
-    // Testcase from RFC
-    test_header!(test1, vec![b"3495"], Some(HeaderField(3495)));
-
-    test_header!(test_invalid, vec![b"34v95"], None);
-
-    // Can't use the test_header macro because "5, 5" gets cleaned to "5".
-    #[test]
-    fn test_duplicates() {
-        let parsed = HeaderField::parse_header(&[b"5"[..].into(),
-                                                 b"5"[..].into()]).unwrap();
-        assert_eq!(parsed, HeaderField(5));
-        assert_eq!(format!("{}", parsed), "5");
-    }
-
-    test_header!(test_duplicates_vary, vec![b"5", b"6", b"5"], None);
-});
-
-bench_header!(bench, ContentLength, { vec![b"42349984".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/content_range.rs
+++ /dev/null
@@ -1,189 +0,0 @@
-use std::fmt::{self, Display};
-use std::str::FromStr;
-
-header! {
-    /// `Content-Range` header, defined in
-    /// [RFC7233](http://tools.ietf.org/html/rfc7233#section-4.2)
-    (ContentRange, "Content-Range") => [ContentRangeSpec]
-
-    test_content_range {
-        test_header!(test_bytes,
-            vec![b"bytes 0-499/500"],
-            Some(ContentRange(ContentRangeSpec::Bytes {
-                range: Some((0, 499)),
-                instance_length: Some(500)
-            })));
-
-        test_header!(test_bytes_unknown_len,
-            vec![b"bytes 0-499/*"],
-            Some(ContentRange(ContentRangeSpec::Bytes {
-                range: Some((0, 499)),
-                instance_length: None
-            })));
-
-        test_header!(test_bytes_unknown_range,
-            vec![b"bytes */500"],
-            Some(ContentRange(ContentRangeSpec::Bytes {
-                range: None,
-                instance_length: Some(500)
-            })));
-
-        test_header!(test_unregistered,
-            vec![b"seconds 1-2"],
-            Some(ContentRange(ContentRangeSpec::Unregistered {
-                unit: "seconds".to_owned(),
-                resp: "1-2".to_owned()
-            })));
-
-        test_header!(test_no_len,
-            vec![b"bytes 0-499"],
-            None::<ContentRange>);
-
-        test_header!(test_only_unit,
-            vec![b"bytes"],
-            None::<ContentRange>);
-
-        test_header!(test_end_less_than_start,
-            vec![b"bytes 499-0/500"],
-            None::<ContentRange>);
-
-        test_header!(test_blank,
-            vec![b""],
-            None::<ContentRange>);
-
-        test_header!(test_bytes_many_spaces,
-            vec![b"bytes 1-2/500 3"],
-            None::<ContentRange>);
-
-        test_header!(test_bytes_many_slashes,
-            vec![b"bytes 1-2/500/600"],
-            None::<ContentRange>);
-
-        test_header!(test_bytes_many_dashes,
-            vec![b"bytes 1-2-3/500"],
-            None::<ContentRange>);
-
-    }
-}
-
-
-/// Content-Range, described in [RFC7233](https://tools.ietf.org/html/rfc7233#section-4.2)
-///
-/// # ABNF
-/// ```plain
-/// Content-Range       = byte-content-range
-///                     / other-content-range
-///
-/// byte-content-range  = bytes-unit SP
-///                       ( byte-range-resp / unsatisfied-range )
-///
-/// byte-range-resp     = byte-range "/" ( complete-length / "*" )
-/// byte-range          = first-byte-pos "-" last-byte-pos
-/// unsatisfied-range   = "*/" complete-length
-///
-/// complete-length     = 1*DIGIT
-///
-/// other-content-range = other-range-unit SP other-range-resp
-/// other-range-resp    = *CHAR
-/// ```
-#[derive(PartialEq, Clone, Debug)]
-pub enum ContentRangeSpec {
-    /// Byte range
-    Bytes {
-        /// First and last bytes of the range, omitted if request could not be
-        /// satisfied
-        range: Option<(u64, u64)>,
-
-        /// Total length of the instance, can be omitted if unknown
-        instance_length: Option<u64>
-    },
-
-    /// Custom range, with unit not registered at IANA
-    Unregistered {
-        /// other-range-unit
-        unit: String,
-
-        /// other-range-resp
-        resp: String
-    }
-}
-
-fn split_in_two(s: &str, separator: char) -> Option<(&str, &str)> {
-    let mut iter = s.splitn(2, separator);
-    match (iter.next(), iter.next()) {
-        (Some(a), Some(b)) => Some((a, b)),
-        _ => None
-    }
-}
-
-impl FromStr for ContentRangeSpec {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<Self> {
-        let res = match split_in_two(s, ' ') {
-            Some(("bytes", resp)) => {
-                let (range, instance_length) = try!(split_in_two(resp, '/').ok_or(::Error::Header));
-
-                let instance_length = if instance_length == "*" {
-                    None
-                } else {
-                    Some(try!(instance_length.parse().map_err(|_| ::Error::Header)))
-                };
-
-                let range = if range == "*" {
-                    None
-                } else {
-                    let (first_byte, last_byte) = try!(split_in_two(range, '-').ok_or(::Error::Header));
-                    let first_byte = try!(first_byte.parse().map_err(|_| ::Error::Header));
-                    let last_byte = try!(last_byte.parse().map_err(|_| ::Error::Header));
-                    if last_byte < first_byte {
-                        return Err(::Error::Header);
-                    }
-                    Some((first_byte, last_byte))
-                };
-
-                ContentRangeSpec::Bytes {
-                    range: range,
-                    instance_length: instance_length
-                }
-            }
-            Some((unit, resp)) => {
-                ContentRangeSpec::Unregistered {
-                    unit: unit.to_owned(),
-                    resp: resp.to_owned()
-                }
-            }
-            _ => return Err(::Error::Header)
-        };
-        Ok(res)
-    }
-}
-
-impl Display for ContentRangeSpec {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            ContentRangeSpec::Bytes { range, instance_length } => {
-                try!(f.write_str("bytes "));
-                match range {
-                    Some((first_byte, last_byte)) => {
-                        try!(write!(f, "{}-{}", first_byte, last_byte));
-                    },
-                    None => {
-                        try!(f.write_str("*"));
-                    }
-                };
-                try!(f.write_str("/"));
-                if let Some(v) = instance_length {
-                    write!(f, "{}", v)
-                } else {
-                    f.write_str("*")
-                }
-            }
-            ContentRangeSpec::Unregistered { ref unit, ref resp } => {
-                try!(f.write_str(&unit));
-                try!(f.write_str(" "));
-                f.write_str(&resp)
-            }
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/content_type.rs
+++ /dev/null
@@ -1,97 +0,0 @@
-use mime::Mime;
-
-header! {
-    /// `Content-Type` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-3.1.1.5)
-    /// 
-    /// The `Content-Type` header field indicates the media type of the
-    /// associated representation: either the representation enclosed in the
-    /// message payload or the selected representation, as determined by the
-    /// message semantics.  The indicated media type defines both the data
-    /// format and how that data is intended to be processed by a recipient,
-    /// within the scope of the received message semantics, after any content
-    /// codings indicated by Content-Encoding are decoded.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Content-Type = media-type
-    /// ```
-    /// 
-    /// # Example values
-    /// * `text/html; charset=ISO-8859-4`
-    /// 
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, ContentType};
-    /// use hyper::mime::{Mime, TopLevel, SubLevel};
-    /// 
-    /// let mut headers = Headers::new();
-    /// 
-    /// headers.set(
-    ///     ContentType(Mime(TopLevel::Text, SubLevel::Html, vec![]))
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, ContentType};
-    /// use hyper::mime::{Mime, TopLevel, SubLevel, Attr, Value};
-    /// 
-    /// let mut headers = Headers::new();
-    /// 
-    /// headers.set(
-    ///     ContentType(Mime(TopLevel::Application, SubLevel::Json,
-    ///                      vec![(Attr::Charset, Value::Utf8)]))
-    /// );
-    /// ```
-    (ContentType, "Content-Type") => [Mime]
-
-    test_content_type {
-        test_header!(
-            test1,
-            // FIXME: Should be b"text/html; charset=ISO-8859-4" but mime crate lowercases
-            // the whole value so parsing and formatting the value gives a different result
-            vec![b"text/html; charset=iso-8859-4"],
-            Some(HeaderField(Mime(
-                TopLevel::Text,
-                SubLevel::Html,
-                vec![(Attr::Charset, Value::Ext("iso-8859-4".to_owned()))]))));
-    }
-}
-
-impl ContentType {
-    /// A constructor  to easily create a `Content-Type: application/json` header.
-    #[inline]
-    pub fn json() -> ContentType {
-        ContentType(mime!(Application/Json))
-    }
-
-    /// A constructor  to easily create a `Content-Type: text/plain; charset=utf-8` header.
-    #[inline]
-    pub fn plaintext() -> ContentType {
-        ContentType(mime!(Text/Plain; Charset=Utf8))
-    }
-
-    /// A constructor  to easily create a `Content-Type: text/html; charset=utf-8` header.
-    #[inline]
-    pub fn html() -> ContentType {
-        ContentType(mime!(Text/Html; Charset=Utf8))
-    }
-
-    /// A constructor  to easily create a `Content-Type: application/www-form-url-encoded` header.
-    #[inline]
-    pub fn form_url_encoded() -> ContentType {
-        ContentType(mime!(Application/WwwFormUrlEncoded))
-    }
-    /// A constructor  to easily create a `Content-Type: image/jpeg` header.
-    #[inline]
-    pub fn jpeg() -> ContentType {
-        ContentType(mime!(Image/Jpeg))
-    }
-
-    /// A constructor  to easily create a `Content-Type: image/png` header.
-    #[inline]
-    pub fn png() -> ContentType {
-        ContentType(mime!(Image/Png))
-    }
-}
-
-bench_header!(bench, ContentType, { vec![b"application/json; charset=utf-8".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/cookie.rs
+++ /dev/null
@@ -1,70 +0,0 @@
-use header::{Header, HeaderFormat};
-use std::fmt::{self, Display};
-use std::str::from_utf8;
-
-/// `Cookie` header, defined in [RFC6265](http://tools.ietf.org/html/rfc6265#section-5.4)
-///
-/// If the user agent does attach a Cookie header field to an HTTP
-/// request, the user agent must send the cookie-string
-/// as the value of the header field.
-///
-/// When the user agent generates an HTTP request, the user agent MUST NOT
-/// attach more than one Cookie header field.
-///
-/// # Example values
-/// * `SID=31d4d96e407aad42`
-/// * `SID=31d4d96e407aad42; lang=en-US`
-///
-/// # Example
-/// ```
-/// use hyper::header::{Headers, Cookie};
-///
-/// let mut headers = Headers::new();
-///
-/// headers.set(
-///    Cookie(vec![
-///        String::from("foo=bar")
-///    ])
-/// );
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct Cookie(pub Vec<String>);
-
-__hyper__deref!(Cookie => Vec<String>);
-
-impl Header for Cookie {
-    fn header_name() -> &'static str {
-        "Cookie"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Cookie> {
-        let mut cookies = Vec::with_capacity(raw.len());
-        for cookies_raw in raw.iter() {
-            let cookies_str = try!(from_utf8(&cookies_raw[..]));
-            for cookie_str in cookies_str.split(';') {
-                cookies.push(cookie_str.trim().to_owned())
-            }
-        }
-
-        if !cookies.is_empty() {
-            Ok(Cookie(cookies))
-        } else {
-            Err(::Error::Header)
-        }
-    }
-}
-
-impl HeaderFormat for Cookie {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let cookies = &self.0;
-        for (i, cookie) in cookies.iter().enumerate() {
-            if i != 0 {
-                try!(f.write_str("; "));
-            }
-            try!(Display::fmt(&cookie, f));
-        }
-        Ok(())
-    }
-}
-
-bench_header!(bench, Cookie, { vec![b"foo=bar; baz=quux".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/date.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-use header::HttpDate;
-
-header! {
-    /// `Date` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.1.1.2)
-    /// 
-    /// The `Date` header field represents the date and time at which the
-    /// message was originated.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Date = HTTP-date
-    /// ```
-    /// 
-    /// # Example values
-    /// * `Tue, 15 Nov 1994 08:12:31 GMT`
-    /// 
-    /// # Example
-    /// ```
-    /// # extern crate time;
-    /// # extern crate hyper;
-    /// # fn main() {
-    /// // extern crate time;
-    /// 
-    /// use hyper::header::{Headers, Date, HttpDate};
-    /// use time;
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(Date(HttpDate(time::now())));
-    /// # }
-    /// ```
-    (Date, "Date") => [HttpDate]
-
-    test_date {
-        test_header!(test1, vec![b"Tue, 15 Nov 1994 08:12:31 GMT"]);
-    }
-}
-
-bench_header!(imf_fixdate, Date, { vec![b"Sun, 07 Nov 1994 08:48:37 GMT".to_vec()] });
-bench_header!(rfc_850, Date, { vec![b"Sunday, 06-Nov-94 08:49:37 GMT".to_vec()] });
-bench_header!(asctime, Date, { vec![b"Sun Nov  6 08:49:37 1994".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/etag.rs
+++ /dev/null
@@ -1,89 +0,0 @@
-use header::EntityTag;
-
-header! {
-    /// `ETag` header, defined in [RFC7232](http://tools.ietf.org/html/rfc7232#section-2.3)
-    ///
-    /// The `ETag` header field in a response provides the current entity-tag
-    /// for the selected representation, as determined at the conclusion of
-    /// handling the request.  An entity-tag is an opaque validator for
-    /// differentiating between multiple representations of the same
-    /// resource, regardless of whether those multiple representations are
-    /// due to resource state changes over time, content negotiation
-    /// resulting in multiple representations being valid at the same time,
-    /// or both.  An entity-tag consists of an opaque quoted string, possibly
-    /// prefixed by a weakness indicator.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// ETag       = entity-tag
-    /// ```
-    ///
-    /// # Example values
-    /// * `"xyzzy"`
-    /// * `W/"xyzzy"`
-    /// * `""`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, ETag, EntityTag};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(ETag(EntityTag::new(false, "xyzzy".to_owned())));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, ETag, EntityTag};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(ETag(EntityTag::new(true, "xyzzy".to_owned())));
-    /// ```
-    (ETag, "ETag") => [EntityTag]
-
-    test_etag {
-        // From the RFC
-        test_header!(test1,
-            vec![b"\"xyzzy\""],
-            Some(ETag(EntityTag::new(false, "xyzzy".to_owned()))));
-        test_header!(test2,
-            vec![b"W/\"xyzzy\""],
-            Some(ETag(EntityTag::new(true, "xyzzy".to_owned()))));
-        test_header!(test3,
-            vec![b"\"\""],
-            Some(ETag(EntityTag::new(false, "".to_owned()))));
-        // Own tests
-        test_header!(test4,
-            vec![b"\"foobar\""],
-            Some(ETag(EntityTag::new(false, "foobar".to_owned()))));
-        test_header!(test5,
-            vec![b"\"\""],
-            Some(ETag(EntityTag::new(false, "".to_owned()))));
-        test_header!(test6,
-            vec![b"W/\"weak-etag\""],
-            Some(ETag(EntityTag::new(true, "weak-etag".to_owned()))));
-        test_header!(test7,
-            vec![b"W/\"\x65\x62\""],
-            Some(ETag(EntityTag::new(true, "\u{0065}\u{0062}".to_owned()))));
-        test_header!(test8,
-            vec![b"W/\"\""],
-            Some(ETag(EntityTag::new(true, "".to_owned()))));
-        test_header!(test9,
-            vec![b"no-dquotes"],
-            None::<ETag>);
-        test_header!(test10,
-            vec![b"w/\"the-first-w-is-case-sensitive\""],
-            None::<ETag>);
-        test_header!(test11,
-            vec![b""],
-            None::<ETag>);
-        test_header!(test12,
-            vec![b"\"unmatched-dquotes1"],
-            None::<ETag>);
-        test_header!(test13,
-            vec![b"unmatched-dquotes2\""],
-            None::<ETag>);
-        test_header!(test14,
-            vec![b"matched-\"dquotes\""],
-            None::<ETag>);
-    }
-}
-
-bench_header!(bench, ETag, { vec![b"W/\"nonemptytag\"".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/expect.rs
+++ /dev/null
@@ -1,68 +0,0 @@
-use std::fmt;
-use std::str;
-
-use unicase::UniCase;
-
-use header::{Header, HeaderFormat};
-
-/// The `Expect` header.
-///
-/// > The "Expect" header field in a request indicates a certain set of
-/// > behaviors (expectations) that need to be supported by the server in
-/// > order to properly handle this request.  The only such expectation
-/// > defined by this specification is 100-continue.
-/// >
-/// >    Expect  = "100-continue"
-///
-/// # Example
-/// ```
-/// use hyper::header::{Headers, Expect};
-/// let mut headers = Headers::new();
-/// headers.set(Expect::Continue);
-/// ```
-#[derive(Copy, Clone, PartialEq, Debug)]
-pub enum Expect {
-    /// The value `100-continue`.
-    Continue
-}
-
-const EXPECT_CONTINUE: UniCase<&'static str> = UniCase("100-continue");
-
-impl Header for Expect {
-    fn header_name() -> &'static str {
-        "Expect"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Expect> {
-        if raw.len() == 1 {
-            let text = unsafe {
-                // safe because:
-                // 1. we just checked raw.len == 1
-                // 2. we don't actually care if it's utf8, we just want to
-                //    compare the bytes with the "case" normalized. If it's not
-                //    utf8, then the byte comparison will fail, and we'll return
-                //    None. No big deal.
-                str::from_utf8_unchecked(raw.get_unchecked(0))
-            };
-            if UniCase(text) == EXPECT_CONTINUE {
-                Ok(Expect::Continue)
-            } else {
-                Err(::Error::Header)
-            }
-        } else {
-            Err(::Error::Header)
-        }
-    }
-}
-
-impl HeaderFormat for Expect {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for Expect {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str("100-continue")
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/expires.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-use header::HttpDate;
-
-header! {
-    /// `Expires` header, defined in [RFC7234](http://tools.ietf.org/html/rfc7234#section-5.3)
-    /// 
-    /// The `Expires` header field gives the date/time after which the
-    /// response is considered stale.
-    /// 
-    /// The presence of an Expires field does not imply that the original
-    /// resource will change or cease to exist at, before, or after that
-    /// time.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Expires = HTTP-date
-    /// ```
-    /// 
-    /// # Example values
-    /// * `Thu, 01 Dec 1994 16:00:00 GMT`
-    /// 
-    /// # Example
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate time;
-    /// # fn main() {
-    /// // extern crate time;
-    /// 
-    /// use hyper::header::{Headers, Expires, HttpDate};
-    /// use time::{self, Duration};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(Expires(HttpDate(time::now() + Duration::days(1))));
-    /// # }
-    /// ```
-    (Expires, "Expires") => [HttpDate]
-
-    test_expires {
-        // Testcase from RFC
-        test_header!(test1, vec![b"Thu, 01 Dec 1994 16:00:00 GMT"]);
-    }
-}
-
-bench_header!(imf_fixdate, Expires, { vec![b"Sun, 07 Nov 1994 08:48:37 GMT".to_vec()] });
-bench_header!(rfc_850, Expires, { vec![b"Sunday, 06-Nov-94 08:49:37 GMT".to_vec()] });
-bench_header!(asctime, Expires, { vec![b"Sun Nov  6 08:49:37 1994".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/from.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-header! {
-    /// `From` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.5.1)
-    ///
-    /// The `From` header field contains an Internet email address for a
-    /// human user who controls the requesting user agent.  The address ought
-    /// to be machine-usable.
-    /// # ABNF
-    /// ```plain
-    /// From    = mailbox
-    /// mailbox = <mailbox, see [RFC5322], Section 3.4>
-    /// ```
-    ///
-    /// # Example
-    /// ```
-    /// use hyper::header::{Headers, From};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(From("webmaster@example.org".to_owned()));
-    /// ```
-    // FIXME: Maybe use mailbox?
-    (From, "From") => [String]
-
-    test_from {
-        test_header!(test1, vec![b"webmaster@example.org"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/host.rs
+++ /dev/null
@@ -1,145 +0,0 @@
-use header::{Header, HeaderFormat};
-use std::fmt;
-use std::str::FromStr;
-use header::parsing::from_one_raw_str;
-use url::idna::domain_to_unicode;
-
-/// The `Host` header.
-///
-/// HTTP/1.1 requires that all requests include a `Host` header, and so hyper
-/// client requests add one automatically.
-///
-/// Currently is just a String, but it should probably become a better type,
-/// like `url::Host` or something.
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Host};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Host{
-///         hostname: "hyper.rs".to_owned(),
-///         port: None,
-///     }
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, Host};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Host{
-///         hostname: "hyper.rs".to_owned(),
-///         port: Some(8080),
-///     }
-/// );
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct Host {
-    /// The hostname, such a example.domain.
-    pub hostname: String,
-    /// An optional port number.
-    pub port: Option<u16>
-}
-
-impl Header for Host {
-    fn header_name() -> &'static str {
-        "Host"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Host> {
-        from_one_raw_str(raw)
-    }
-}
-
-impl HeaderFormat for Host {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match self.port {
-            None | Some(80) | Some(443) => f.write_str(&self.hostname[..]),
-            Some(port) => write!(f, "{}:{}", self.hostname, port)
-        }
-    }
-}
-
-impl fmt::Display for Host {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        self.fmt_header(f)
-    }
-}
-
-impl FromStr for Host {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<Host> {
-        let idx = s.rfind(':');
-        let port = idx.and_then(
-            |idx| s[idx + 1..].parse().ok()
-        );
-        let hostname_encoded = match port {
-            None => s,
-            Some(_) => &s[..idx.unwrap()]
-        };
-
-        let hostname = if hostname_encoded.starts_with("[") {
-            if !hostname_encoded.ends_with("]") {
-                return Err(::Error::Header)
-            }
-            hostname_encoded.to_owned()
-        } else {
-            let (hostname, res) = domain_to_unicode(hostname_encoded);
-            if res.is_err() {
-                return Err(::Error::Header)
-            }
-            hostname
-        };
-
-        Ok(Host {
-            hostname: hostname,
-            port: port
-        })
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::Host;
-    use header::Header;
-
-
-    #[test]
-    fn test_host() {
-        let host = Header::parse_header([b"foo.com".to_vec()].as_ref());
-        assert_eq!(host.ok(), Some(Host {
-            hostname: "foo.com".to_owned(),
-            port: None
-        }));
-
-
-        let host = Header::parse_header([b"foo.com:8080".to_vec()].as_ref());
-        assert_eq!(host.ok(), Some(Host {
-            hostname: "foo.com".to_owned(),
-            port: Some(8080)
-        }));
-
-        let host = Header::parse_header([b"foo.com".to_vec()].as_ref());
-        assert_eq!(host.ok(), Some(Host {
-            hostname: "foo.com".to_owned(),
-            port: None
-        }));
-
-        let host = Header::parse_header([b"[::1]:8080".to_vec()].as_ref());
-        assert_eq!(host.ok(), Some(Host {
-            hostname: "[::1]".to_owned(),
-            port: Some(8080)
-        }));
-
-        let host = Header::parse_header([b"[::1]".to_vec()].as_ref());
-        assert_eq!(host.ok(), Some(Host {
-            hostname: "[::1]".to_owned(),
-            port: None
-        }));
-    }
-}
-
-bench_header!(bench, Host, { vec![b"foo.com:3000".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/if_match.rs
+++ /dev/null
@@ -1,69 +0,0 @@
-use header::EntityTag;
-
-header! {
-    /// `If-Match` header, defined in
-    /// [RFC7232](https://tools.ietf.org/html/rfc7232#section-3.1)
-    ///
-    /// The `If-Match` header field makes the request method conditional on
-    /// the recipient origin server either having at least one current
-    /// representation of the target resource, when the field-value is "*",
-    /// or having a current representation of the target resource that has an
-    /// entity-tag matching a member of the list of entity-tags provided in
-    /// the field-value.
-    ///
-    /// An origin server MUST use the strong comparison function when
-    /// comparing entity-tags for `If-Match`, since the client
-    /// intends this precondition to prevent the method from being applied if
-    /// there have been any changes to the representation data.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// If-Match = "*" / 1#entity-tag
-    /// ```
-    ///
-    /// # Example values
-    /// * `"xyzzy"`
-    /// * "xyzzy", "r2d2xxxx", "c3piozzzz"
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, IfMatch};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(IfMatch::Any);
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, IfMatch, EntityTag};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     IfMatch::Items(vec![
-    ///         EntityTag::new(false, "xyzzy".to_owned()),
-    ///         EntityTag::new(false, "foobar".to_owned()),
-    ///         EntityTag::new(false, "bazquux".to_owned()),
-    ///     ])
-    /// );
-    /// ```
-    (IfMatch, "If-Match") => {Any / (EntityTag)+}
-
-    test_if_match {
-        test_header!(
-            test1,
-            vec![b"\"xyzzy\""],
-            Some(HeaderField::Items(
-                vec![EntityTag::new(false, "xyzzy".to_owned())])));
-        test_header!(
-            test2,
-            vec![b"\"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\""],
-            Some(HeaderField::Items(
-                vec![EntityTag::new(false, "xyzzy".to_owned()),
-                     EntityTag::new(false, "r2d2xxxx".to_owned()),
-                     EntityTag::new(false, "c3piozzzz".to_owned())])));
-        test_header!(test3, vec![b"*"], Some(IfMatch::Any));
-    }
-}
-
-bench_header!(star, IfMatch, { vec![b"*".to_vec()] });
-bench_header!(single , IfMatch, { vec![b"\"xyzzy\"".to_vec()] });
-bench_header!(multi, IfMatch,
-              { vec![b"\"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\"".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/if_modified_since.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-use header::HttpDate;
-
-header! {
-    /// `If-Modified-Since` header, defined in
-    /// [RFC7232](http://tools.ietf.org/html/rfc7232#section-3.3)
-    /// 
-    /// The `If-Modified-Since` header field makes a GET or HEAD request
-    /// method conditional on the selected representation's modification date
-    /// being more recent than the date provided in the field-value.
-    /// Transfer of the selected representation's data is avoided if that
-    /// data has not changed.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// If-Unmodified-Since = HTTP-date
-    /// ```
-    /// 
-    /// # Example values
-    /// * `Sat, 29 Oct 1994 19:43:31 GMT`
-    /// 
-    /// # Example
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate time;
-    /// # fn main() {
-    /// // extern crate time;
-    /// 
-    /// use hyper::header::{Headers, IfModifiedSince, HttpDate};
-    /// use time::{self, Duration};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(IfModifiedSince(HttpDate(time::now() - Duration::days(1))));
-    /// # }
-    /// ```
-    (IfModifiedSince, "If-Modified-Since") => [HttpDate]
-
-    test_if_modified_since {
-        // Testcase from RFC
-        test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);
-    }
-}
-
-bench_header!(imf_fixdate, IfModifiedSince, { vec![b"Sun, 07 Nov 1994 08:48:37 GMT".to_vec()] });
-bench_header!(rfc_850, IfModifiedSince, { vec![b"Sunday, 06-Nov-94 08:49:37 GMT".to_vec()] });
-bench_header!(asctime, IfModifiedSince, { vec![b"Sun Nov  6 08:49:37 1994".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/if_none_match.rs
+++ /dev/null
@@ -1,83 +0,0 @@
-use header::EntityTag;
-
-header! {
-    /// `If-None-Match` header, defined in
-    /// [RFC7232](https://tools.ietf.org/html/rfc7232#section-3.2)
-    ///
-    /// The `If-None-Match` header field makes the request method conditional
-    /// on a recipient cache or origin server either not having any current
-    /// representation of the target resource, when the field-value is "*",
-    /// or having a selected representation with an entity-tag that does not
-    /// match any of those listed in the field-value.
-    ///
-    /// A recipient MUST use the weak comparison function when comparing
-    /// entity-tags for If-None-Match (Section 2.3.2), since weak entity-tags
-    /// can be used for cache validation even if there have been changes to
-    /// the representation data.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// If-None-Match = "*" / 1#entity-tag
-    /// ```
-    ///
-    /// # Example values
-    /// * `"xyzzy"`
-    /// * `W/"xyzzy"`
-    /// * `"xyzzy", "r2d2xxxx", "c3piozzzz"`
-    /// * `W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"`
-    /// * `*`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, IfNoneMatch};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(IfNoneMatch::Any);
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, IfNoneMatch, EntityTag};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     IfNoneMatch::Items(vec![
-    ///         EntityTag::new(false, "xyzzy".to_owned()),
-    ///         EntityTag::new(false, "foobar".to_owned()),
-    ///         EntityTag::new(false, "bazquux".to_owned()),
-    ///     ])
-    /// );
-    /// ```
-    (IfNoneMatch, "If-None-Match") => {Any / (EntityTag)+}
-
-    test_if_none_match {
-        test_header!(test1, vec![b"\"xyzzy\""]);
-        test_header!(test2, vec![b"W/\"xyzzy\""]);
-        test_header!(test3, vec![b"\"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\""]);
-        test_header!(test4, vec![b"W/\"xyzzy\", W/\"r2d2xxxx\", W/\"c3piozzzz\""]);
-        test_header!(test5, vec![b"*"]);
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::IfNoneMatch;
-    use header::Header;
-    use header::EntityTag;
-
-    #[test]
-    fn test_if_none_match() {
-        let mut if_none_match: ::Result<IfNoneMatch>;
-
-        if_none_match = Header::parse_header([b"*".to_vec()].as_ref());
-        assert_eq!(if_none_match.ok(), Some(IfNoneMatch::Any));
-
-        if_none_match = Header::parse_header([b"\"foobar\", W/\"weak-etag\"".to_vec()].as_ref());
-        let mut entities: Vec<EntityTag> = Vec::new();
-        let foobar_etag = EntityTag::new(false, "foobar".to_owned());
-        let weak_etag = EntityTag::new(true, "weak-etag".to_owned());
-        entities.push(foobar_etag);
-        entities.push(weak_etag);
-        assert_eq!(if_none_match.ok(), Some(IfNoneMatch::Items(entities)));
-    }
-}
-
-bench_header!(bench, IfNoneMatch, { vec![b"W/\"nonemptytag\"".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/if_range.rs
+++ /dev/null
@@ -1,96 +0,0 @@
-use std::fmt::{self, Display};
-use header::{self, Header, HeaderFormat, EntityTag, HttpDate};
-
-/// `If-Range` header, defined in [RFC7233](http://tools.ietf.org/html/rfc7233#section-3.2)
-///
-/// If a client has a partial copy of a representation and wishes to have
-/// an up-to-date copy of the entire representation, it could use the
-/// Range header field with a conditional GET (using either or both of
-/// If-Unmodified-Since and If-Match.)  However, if the precondition
-/// fails because the representation has been modified, the client would
-/// then have to make a second request to obtain the entire current
-/// representation.
-///
-/// The `If-Range` header field allows a client to \"short-circuit\" the
-/// second request.  Informally, its meaning is as follows: if the
-/// representation is unchanged, send me the part(s) that I am requesting
-/// in Range; otherwise, send me the entire representation.
-///
-/// # ABNF
-/// ```plain
-/// If-Range = entity-tag / HTTP-date
-/// ```
-///
-/// # Example values
-/// * `Sat, 29 Oct 1994 19:43:31 GMT`
-/// * `\"xyzzy\"`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, IfRange, EntityTag};
-///
-/// let mut headers = Headers::new();
-/// headers.set(IfRange::EntityTag(EntityTag::new(false, "xyzzy".to_owned())));
-/// ```
-/// ```
-/// # extern crate hyper;
-/// # extern crate time;
-/// # fn main() {
-/// // extern crate time;
-///
-/// use hyper::header::{Headers, IfRange, HttpDate};
-/// use time::{self, Duration};
-///
-/// let mut headers = Headers::new();
-/// headers.set(IfRange::Date(HttpDate(time::now() - Duration::days(1))));
-/// # }
-/// ```
-#[derive(Clone, Debug, PartialEq)]
-pub enum IfRange {
-    /// The entity-tag the client has of the resource
-    EntityTag(EntityTag),
-    /// The date when the client retrieved the resource
-    Date(HttpDate),
-}
-
-impl Header for IfRange {
-    fn header_name() -> &'static str {
-        "If-Range"
-    }
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<IfRange> {
-        let etag: ::Result<EntityTag> = header::parsing::from_one_raw_str(raw);
-        if etag.is_ok() {
-            return Ok(IfRange::EntityTag(etag.unwrap()));
-        }
-        let date: ::Result<HttpDate> = header::parsing::from_one_raw_str(raw);
-        if date.is_ok() {
-            return Ok(IfRange::Date(date.unwrap()));
-        }
-        Err(::Error::Header)
-    }
-}
-
-impl HeaderFormat for IfRange {
-    fn fmt_header(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-        match *self {
-            IfRange::EntityTag(ref x) => Display::fmt(x, f),
-            IfRange::Date(ref x) => Display::fmt(x, f),
-        }
-    }
-}
-
-impl Display for IfRange {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        self.fmt_header(f)
-    }
-}
-
-#[cfg(test)]
-mod test_if_range {
-    use std::str;
-    use header::*;
-    use super::IfRange as HeaderField;
-    test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);
-    test_header!(test2, vec![b"\"xyzzy\""]);
-    test_header!(test3, vec![b"this-is-invalid"], None::<IfRange>);
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/if_unmodified_since.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-use header::HttpDate;
-
-header! {
-    /// `If-Unmodified-Since` header, defined in
-    /// [RFC7232](http://tools.ietf.org/html/rfc7232#section-3.4)
-    /// 
-    /// The `If-Unmodified-Since` header field makes the request method
-    /// conditional on the selected representation's last modification date
-    /// being earlier than or equal to the date provided in the field-value.
-    /// This field accomplishes the same purpose as If-Match for cases where
-    /// the user agent does not have an entity-tag for the representation.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// If-Unmodified-Since = HTTP-date
-    /// ```
-    /// 
-    /// # Example values
-    /// * `Sat, 29 Oct 1994 19:43:31 GMT`
-    /// 
-    /// # Example
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate time;
-    /// # fn main() {
-    /// // extern crate time;
-    /// 
-    /// use hyper::header::{Headers, IfUnmodifiedSince, HttpDate};
-    /// use time::{self, Duration};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(IfUnmodifiedSince(HttpDate(time::now() - Duration::days(1))));
-    /// # }
-    /// ```
-    (IfUnmodifiedSince, "If-Unmodified-Since") => [HttpDate]
-
-    test_if_unmodified_since {
-        // Testcase from RFC
-        test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);
-    }
-}
-
-bench_header!(imf_fixdate, IfUnmodifiedSince, { vec![b"Sun, 07 Nov 1994 08:48:37 GMT".to_vec()] });
-bench_header!(rfc_850, IfUnmodifiedSince, { vec![b"Sunday, 06-Nov-94 08:49:37 GMT".to_vec()] });
-bench_header!(asctime, IfUnmodifiedSince, { vec![b"Sun Nov  6 08:49:37 1994".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/last-event-id.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-header! {
-    /// `Last-Event-ID` header, defined in
-    /// [RFC3864](https://html.spec.whatwg.org/multipage/references.html#refsRFC3864)
-    ///
-    /// The `Last-Event-ID` header contains information about
-    /// the last event in an http interaction so that it's easier to
-    /// track of event state. This is helpful when working
-    /// with [Server-Sent-Events](http://www.html5rocks.com/en/tutorials/eventsource/basics/). If the connection were to be dropped, for example, it'd
-    /// be useful to let the server know what the last event you
-    /// recieved was.
-    ///
-    /// The spec is a String with the id of the last event, it can be
-    /// an empty string which acts a sort of "reset".
-    ///
-    /// # Example
-    /// ```
-    /// use hyper::header::{Headers, LastEventID};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(LastEventID("1".to_owned()));
-    /// ```
-    (LastEventID, "Last-Event-ID") => [String]
-
-    test_last_event_id {
-        // Initial state
-        test_header!(test1, vec![b""]);
-        // Own testcase
-        test_header!(test2, vec![b"1"], Some(LastEventID("1".to_owned())));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/last_modified.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-use header::HttpDate;
-
-header! {
-    /// `Last-Modified` header, defined in
-    /// [RFC7232](http://tools.ietf.org/html/rfc7232#section-2.2)
-    /// 
-    /// The `Last-Modified` header field in a response provides a timestamp
-    /// indicating the date and time at which the origin server believes the
-    /// selected representation was last modified, as determined at the
-    /// conclusion of handling the request.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Expires = HTTP-date
-    /// ```
-    /// 
-    /// # Example values
-    /// * `Sat, 29 Oct 1994 19:43:31 GMT`
-    /// 
-    /// # Example
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate time;
-    /// # fn main() {
-    /// // extern crate time;
-    /// 
-    /// use hyper::header::{Headers, LastModified, HttpDate};
-    /// use time::{self, Duration};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(LastModified(HttpDate(time::now() - Duration::days(1))));
-    /// # }
-    /// ```
-    (LastModified, "Last-Modified") => [HttpDate]
-
-    test_last_modified {
-        // Testcase from RFC
-        test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);}
-}
-
-bench_header!(imf_fixdate, LastModified, { vec![b"Sun, 07 Nov 1994 08:48:37 GMT".to_vec()] });
-bench_header!(rfc_850, LastModified, { vec![b"Sunday, 06-Nov-94 08:49:37 GMT".to_vec()] });
-bench_header!(asctime, LastModified, { vec![b"Sun Nov  6 08:49:37 1994".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/location.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-header! {
-    /// `Location` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.1.2)
-    ///
-    /// The `Location` header field is used in some responses to refer to a
-    /// specific resource in relation to the response.  The type of
-    /// relationship is defined by the combination of request method and
-    /// status code semantics.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Location = URI-reference
-    /// ```
-    ///
-    /// # Example values
-    /// * `/People.html#tim`
-    /// * `http://www.example.net/index.html`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, Location};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Location("/People.html#tim".to_owned()));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, Location};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Location("http://www.example.com/index.html".to_owned()));
-    /// ```
-    // TODO: Use URL
-    (Location, "Location") => [String]
-
-    test_location {
-        // Testcase from RFC
-        test_header!(test1, vec![b"/People.html#tim"]);
-        test_header!(test2, vec![b"http://www.example.net/index.html"]);
-    }
-
-}
-
-bench_header!(bench, Location, { vec![b"http://foo.com/hello:3000".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/mod.rs
+++ /dev/null
@@ -1,393 +0,0 @@
-//! A Collection of Header implementations for common HTTP Headers.
-//!
-//! ## Mime
-//!
-//! Several header fields use MIME values for their contents. Keeping with the
-//! strongly-typed theme, the [mime](http://seanmonstar.github.io/mime.rs) crate
-//! is used, such as `ContentType(pub Mime)`.
-
-pub use self::accept::Accept;
-pub use self::access_control_allow_credentials::AccessControlAllowCredentials;
-pub use self::access_control_allow_headers::AccessControlAllowHeaders;
-pub use self::access_control_allow_methods::AccessControlAllowMethods;
-pub use self::access_control_allow_origin::AccessControlAllowOrigin;
-pub use self::access_control_expose_headers::AccessControlExposeHeaders;
-pub use self::access_control_max_age::AccessControlMaxAge;
-pub use self::access_control_request_headers::AccessControlRequestHeaders;
-pub use self::access_control_request_method::AccessControlRequestMethod;
-pub use self::accept_charset::AcceptCharset;
-pub use self::accept_encoding::AcceptEncoding;
-pub use self::accept_language::AcceptLanguage;
-pub use self::accept_ranges::{AcceptRanges, RangeUnit};
-pub use self::allow::Allow;
-pub use self::authorization::{Authorization, Scheme, Basic, Bearer};
-pub use self::cache_control::{CacheControl, CacheDirective};
-pub use self::connection::{Connection, ConnectionOption};
-pub use self::content_disposition::{ContentDisposition, DispositionType, DispositionParam};
-pub use self::content_length::ContentLength;
-pub use self::content_encoding::ContentEncoding;
-pub use self::content_language::ContentLanguage;
-pub use self::content_range::{ContentRange, ContentRangeSpec};
-pub use self::content_type::ContentType;
-pub use self::cookie::Cookie;
-pub use self::date::Date;
-pub use self::etag::ETag;
-pub use self::expect::Expect;
-pub use self::expires::Expires;
-pub use self::from::From;
-pub use self::host::Host;
-pub use self::if_match::IfMatch;
-pub use self::if_modified_since::IfModifiedSince;
-pub use self::if_none_match::IfNoneMatch;
-pub use self::if_unmodified_since::IfUnmodifiedSince;
-pub use self::if_range::IfRange;
-pub use self::last_modified::LastModified;
-pub use self::location::Location;
-pub use self::origin::Origin;
-pub use self::pragma::Pragma;
-pub use self::prefer::{Prefer, Preference};
-pub use self::preference_applied::PreferenceApplied;
-pub use self::range::{Range, ByteRangeSpec};
-pub use self::referer::Referer;
-pub use self::referrer_policy::ReferrerPolicy;
-pub use self::server::Server;
-pub use self::set_cookie::SetCookie;
-pub use self::strict_transport_security::StrictTransportSecurity;
-pub use self::transfer_encoding::TransferEncoding;
-pub use self::upgrade::{Upgrade, Protocol, ProtocolName};
-pub use self::user_agent::UserAgent;
-pub use self::vary::Vary;
-
-#[doc(hidden)]
-#[macro_export]
-macro_rules! bench_header(
-    ($name:ident, $ty:ty, $value:expr) => {
-        #[cfg(test)]
-        #[cfg(feature = "nightly")]
-        #[allow(deprecated)]
-        mod $name {
-            use test::Bencher;
-            use super::*;
-
-            use header::{Header, HeaderFormatter};
-
-            #[bench]
-            fn bench_parse(b: &mut Bencher) {
-                let val = $value;
-                b.iter(|| {
-                    let _: $ty = Header::parse_header(&val[..]).unwrap();
-                });
-            }
-
-            #[bench]
-            fn bench_format(b: &mut Bencher) {
-                let val: $ty = Header::parse_header(&$value[..]).unwrap();
-                let fmt = HeaderFormatter(&val);
-                b.iter(|| {
-                    format!("{}", fmt);
-                });
-            }
-        }
-    }
-);
-
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __hyper__deref {
-    ($from:ty => $to:ty) => {
-        impl ::std::ops::Deref for $from {
-            type Target = $to;
-
-            fn deref(&self) -> &$to {
-                &self.0
-            }
-        }
-
-        impl ::std::ops::DerefMut for $from {
-            fn deref_mut(&mut self) -> &mut $to {
-                &mut self.0
-            }
-        }
-    }
-}
-
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __hyper__tm {
-    ($id:ident, $tm:ident{$($tf:item)*}) => {
-        #[allow(unused_imports)]
-        #[cfg(test)]
-        mod $tm{
-            use std::str;
-            use $crate::header::*;
-            use $crate::mime::*;
-            use $crate::language_tags::*;
-            use $crate::method::Method;
-            use super::$id as HeaderField;
-            $($tf)*
-        }
-
-    }
-}
-
-#[doc(hidden)]
-#[macro_export]
-macro_rules! test_header {
-    ($id:ident, $raw:expr) => {
-        #[test]
-        fn $id() {
-            use std::ascii::AsciiExt;
-            let raw = $raw;
-            let a: Vec<Vec<u8>> = raw.iter().map(|x| x.to_vec()).collect();
-            let value = HeaderField::parse_header(&a[..]);
-            let result = format!("{}", value.unwrap());
-            let expected = String::from_utf8(raw[0].to_vec()).unwrap();
-            let result_cmp: Vec<String> = result
-                .to_ascii_lowercase()
-                .split(' ')
-                .map(|x| x.to_owned())
-                .collect();
-            let expected_cmp: Vec<String> = expected
-                .to_ascii_lowercase()
-                .split(' ')
-                .map(|x| x.to_owned())
-                .collect();
-            assert_eq!(result_cmp.concat(), expected_cmp.concat());
-        }
-    };
-    ($id:ident, $raw:expr, $typed:expr) => {
-        #[test]
-        fn $id() {
-            let a: Vec<Vec<u8>> = $raw.iter().map(|x| x.to_vec()).collect();
-            let val = HeaderField::parse_header(&a[..]);
-            let typed: Option<HeaderField> = $typed;
-            // Test parsing
-            assert_eq!(val.ok(), typed);
-            // Test formatting
-            if typed.is_some() {
-                let raw = &($raw)[..];
-                let mut iter = raw.iter().map(|b|str::from_utf8(&b[..]).unwrap());
-                let mut joined = String::new();
-                joined.push_str(iter.next().unwrap());
-                for s in iter {
-                    joined.push_str(", ");
-                    joined.push_str(s);
-                }
-                assert_eq!(format!("{}", typed.unwrap()), joined);
-            }
-        }
-    }
-}
-
-#[macro_export]
-macro_rules! header {
-    // $a:meta: Attributes associated with the header item (usually docs)
-    // $id:ident: Identifier of the header
-    // $n:expr: Lowercase name of the header
-    // $nn:expr: Nice name of the header
-
-    // List header, zero or more items
-    ($(#[$a:meta])*($id:ident, $n:expr) => ($item:ty)*) => {
-        $(#[$a])*
-        #[derive(Clone, Debug, PartialEq)]
-        pub struct $id(pub Vec<$item>);
-        __hyper__deref!($id => Vec<$item>);
-        impl $crate::header::Header for $id {
-            fn header_name() -> &'static str {
-                $n
-            }
-            fn parse_header(raw: &[Vec<u8>]) -> $crate::Result<Self> {
-                $crate::header::parsing::from_comma_delimited(raw).map($id)
-            }
-        }
-        impl $crate::header::HeaderFormat for $id {
-            fn fmt_header(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                $crate::header::parsing::fmt_comma_delimited(f, &self.0[..])
-            }
-        }
-        impl ::std::fmt::Display for $id {
-            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                use $crate::header::HeaderFormat;
-                self.fmt_header(f)
-            }
-        }
-    };
-    // List header, one or more items
-    ($(#[$a:meta])*($id:ident, $n:expr) => ($item:ty)+) => {
-        $(#[$a])*
-        #[derive(Clone, Debug, PartialEq)]
-        pub struct $id(pub Vec<$item>);
-        __hyper__deref!($id => Vec<$item>);
-        impl $crate::header::Header for $id {
-            fn header_name() -> &'static str {
-                $n
-            }
-            fn parse_header(raw: &[Vec<u8>]) -> $crate::Result<Self> {
-                $crate::header::parsing::from_comma_delimited(raw).map($id)
-            }
-        }
-        impl $crate::header::HeaderFormat for $id {
-            fn fmt_header(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                $crate::header::parsing::fmt_comma_delimited(f, &self.0[..])
-            }
-        }
-        impl ::std::fmt::Display for $id {
-            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                use $crate::header::HeaderFormat;
-                self.fmt_header(f)
-            }
-        }
-    };
-    // Single value header
-    ($(#[$a:meta])*($id:ident, $n:expr) => [$value:ty]) => {
-        $(#[$a])*
-        #[derive(Clone, Debug, PartialEq)]
-        pub struct $id(pub $value);
-        __hyper__deref!($id => $value);
-        impl $crate::header::Header for $id {
-            fn header_name() -> &'static str {
-                $n
-            }
-            fn parse_header(raw: &[Vec<u8>]) -> $crate::Result<Self> {
-                $crate::header::parsing::from_one_raw_str(raw).map($id)
-            }
-        }
-        impl $crate::header::HeaderFormat for $id {
-            fn fmt_header(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                ::std::fmt::Display::fmt(&**self, f)
-            }
-        }
-        impl ::std::fmt::Display for $id {
-            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                ::std::fmt::Display::fmt(&**self, f)
-            }
-        }
-    };
-    // List header, one or more items with "*" option
-    ($(#[$a:meta])*($id:ident, $n:expr) => {Any / ($item:ty)+}) => {
-        $(#[$a])*
-        #[derive(Clone, Debug, PartialEq)]
-        pub enum $id {
-            /// Any value is a match
-            Any,
-            /// Only the listed items are a match
-            Items(Vec<$item>),
-        }
-        impl $crate::header::Header for $id {
-            fn header_name() -> &'static str {
-                $n
-            }
-            fn parse_header(raw: &[Vec<u8>]) -> $crate::Result<Self> {
-                // FIXME: Return None if no item is in $id::Only
-                if raw.len() == 1 {
-                    if raw[0] == b"*" {
-                        return Ok($id::Any)
-                    }
-                }
-                $crate::header::parsing::from_comma_delimited(raw).map($id::Items)
-            }
-        }
-        impl $crate::header::HeaderFormat for $id {
-            fn fmt_header(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                match *self {
-                    $id::Any => f.write_str("*"),
-                    $id::Items(ref fields) => $crate::header::parsing::fmt_comma_delimited(
-                        f, &fields[..])
-                }
-            }
-        }
-        impl ::std::fmt::Display for $id {
-            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                use $crate::header::HeaderFormat;
-                self.fmt_header(f)
-            }
-        }
-    };
-
-    // optional test module
-    ($(#[$a:meta])*($id:ident, $n:expr) => ($item:ty)* $tm:ident{$($tf:item)*}) => {
-        header! {
-            $(#[$a])*
-            ($id, $n) => ($item)*
-        }
-
-        __hyper__tm! { $id, $tm { $($tf)* }}
-    };
-    ($(#[$a:meta])*($id:ident, $n:expr) => ($item:ty)+ $tm:ident{$($tf:item)*}) => {
-        header! {
-            $(#[$a])*
-            ($id, $n) => ($item)+
-        }
-
-        __hyper__tm! { $id, $tm { $($tf)* }}
-    };
-    ($(#[$a:meta])*($id:ident, $n:expr) => [$item:ty] $tm:ident{$($tf:item)*}) => {
-        header! {
-            $(#[$a])*
-            ($id, $n) => [$item]
-        }
-
-        __hyper__tm! { $id, $tm { $($tf)* }}
-    };
-    ($(#[$a:meta])*($id:ident, $n:expr) => {Any / ($item:ty)+} $tm:ident{$($tf:item)*}) => {
-        header! {
-            $(#[$a])*
-            ($id, $n) => {Any / ($item)+}
-        }
-
-        __hyper__tm! { $id, $tm { $($tf)* }}
-    };
-}
-
-
-mod accept;
-mod access_control_allow_credentials;
-mod access_control_allow_headers;
-mod access_control_allow_methods;
-mod access_control_allow_origin;
-mod access_control_expose_headers;
-mod access_control_max_age;
-mod access_control_request_headers;
-mod access_control_request_method;
-mod accept_charset;
-mod accept_encoding;
-mod accept_language;
-mod accept_ranges;
-mod allow;
-mod authorization;
-mod cache_control;
-mod cookie;
-mod connection;
-mod content_disposition;
-mod content_encoding;
-mod content_language;
-mod content_length;
-mod content_range;
-mod content_type;
-mod date;
-mod etag;
-mod expect;
-mod expires;
-mod from;
-mod host;
-mod if_match;
-mod if_modified_since;
-mod if_none_match;
-mod if_range;
-mod if_unmodified_since;
-mod last_modified;
-mod location;
-mod origin;
-mod pragma;
-mod prefer;
-mod preference_applied;
-mod range;
-mod referer;
-mod referrer_policy;
-mod server;
-mod set_cookie;
-mod strict_transport_security;
-mod transfer_encoding;
-mod upgrade;
-mod user_agent;
-mod vary;
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/origin.rs
+++ /dev/null
@@ -1,119 +0,0 @@
-use header::{Header, Host, HeaderFormat};
-use std::fmt;
-use std::str::FromStr;
-use header::parsing::from_one_raw_str;
-
-/// The `Origin` header.
-///
-/// The `Origin` header is a version of the `Referer` header that is used for all HTTP fetches and `POST`s whose CORS flag is set.
-/// This header is often used to inform recipients of the security context of where the request was initiated.
-///
-///
-/// Following the spec, https://fetch.spec.whatwg.org/#origin-header, the value of this header is composed of
-/// a String (scheme), header::Host (host/port)
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Origin};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Origin::new("http", "hyper.rs", None)
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, Origin};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Origin::new("https", "wikipedia.org", Some(443))
-/// );
-/// ```
-
-#[derive(Clone, Debug)]
-pub struct Origin {
-    /// The scheme, such as http or https
-    pub scheme: String,
-    /// The host, such as Host{hostname: "hyper.rs".to_owned(), port: None}
-    pub host: Host,
-}
-
-impl Origin {
-    /// Creates a new `Origin` header.
-    pub fn new<S: Into<String>, H: Into<String>>(scheme: S, hostname: H, port: Option<u16>) -> Origin{
-        Origin {
-            scheme: scheme.into(),
-            host: Host {
-                hostname: hostname.into(),
-                port: port
-            }
-        }
-    }
-}
-
-impl Header for Origin {
-    fn header_name() -> &'static str {
-        static NAME: &'static str = "Origin";
-        NAME
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Origin> {
-        from_one_raw_str(raw)
-    }
-}
-
-impl FromStr for Origin {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<Origin> {
-        let idx = match s.find("://") {
-            Some(idx) => idx,
-            None => return Err(::Error::Header)
-        };
-        // idx + 3 because thats how long "://" is
-        let (scheme, etc) = (&s[..idx], &s[idx + 3..]);
-        let host = try!(Host::from_str(etc));
-
-
-        Ok(Origin{
-            scheme: scheme.to_owned(),
-            host: host
-        })
-    }
-}
-
-impl HeaderFormat for Origin {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for Origin {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}://{}", self.scheme, self.host)
-    }
-}
-
-impl PartialEq for Origin {
-    fn eq(&self, other: &Origin) -> bool {
-        self.scheme == other.scheme && self.host == other.host
-    }
-}
-
-
-#[cfg(test)]
-mod tests {
-    use super::Origin;
-    use header::Header;
-
-    #[test]
-    fn test_origin() {
-        let origin = Header::parse_header([b"http://foo.com".to_vec()].as_ref());
-        assert_eq!(origin.ok(), Some(Origin::new("http", "foo.com", None)));
-
-        let origin = Header::parse_header([b"https://foo.com:443".to_vec()].as_ref());
-        assert_eq!(origin.ok(), Some(Origin::new("https", "foo.com", Some(443))));
-    }
-}
-
-bench_header!(bench, Origin, { vec![b"https://foo.com".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/pragma.rs
+++ /dev/null
@@ -1,82 +0,0 @@
-use std::fmt;
-use std::ascii::AsciiExt;
-
-use header::{Header, HeaderFormat, parsing};
-
-/// The `Pragma` header defined by HTTP/1.0.
-///
-/// > The "Pragma" header field allows backwards compatibility with
-/// > HTTP/1.0 caches, so that clients can specify a "no-cache" request
-/// > that they will understand (as Cache-Control was not defined until
-/// > HTTP/1.1).  When the Cache-Control header field is also present and
-/// > understood in a request, Pragma is ignored.
-
-/// > In HTTP/1.0, Pragma was defined as an extensible field for
-/// > implementation-specified directives for recipients.  This
-/// > specification deprecates such extensions to improve interoperability.
-///
-/// Spec: https://tools.ietf.org/html/rfc7234#section-5.4
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Pragma};
-///
-/// let mut headers = Headers::new();
-/// headers.set(Pragma::NoCache);
-/// ```
-/// ```
-/// use hyper::header::{Headers, Pragma};
-///
-/// let mut headers = Headers::new();
-/// headers.set(Pragma::Ext("foobar".to_owned()));
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub enum Pragma {
-    /// Corresponds to the `no-cache` value.
-    NoCache,
-    /// Every value other than `no-cache`.
-    Ext(String),
-}
-
-impl Header for Pragma {
-    fn header_name() -> &'static str {
-        "Pragma"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Pragma> {
-        parsing::from_one_raw_str(raw).and_then(|s: String| {
-            let slice = &s.to_ascii_lowercase()[..];
-            match slice {
-                "no-cache" => Ok(Pragma::NoCache),
-                _ => Ok(Pragma::Ext(s)),
-            }
-        })
-    }
-}
-
-impl HeaderFormat for Pragma {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for Pragma {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(match *self {
-            Pragma::NoCache => "no-cache",
-            Pragma::Ext(ref string) => &string[..],
-        })
-    }
-}
-
-#[test]
-fn test_parse_header() {
-    let a: Pragma = Header::parse_header([b"no-cache".to_vec()].as_ref()).unwrap();
-    let b = Pragma::NoCache;
-    assert_eq!(a, b);
-    let c: Pragma = Header::parse_header([b"FoObar".to_vec()].as_ref()).unwrap();
-    let d = Pragma::Ext("FoObar".to_owned());
-    assert_eq!(c, d);
-    let e: ::Result<Pragma> = Header::parse_header([b"".to_vec()].as_ref());
-    assert_eq!(e.ok(), None);
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/prefer.rs
+++ /dev/null
@@ -1,209 +0,0 @@
-use std::fmt;
-use std::str::FromStr;
-use header::{Header, HeaderFormat};
-use header::parsing::{from_comma_delimited, fmt_comma_delimited};
-
-/// `Prefer` header, defined in [RFC7240](http://tools.ietf.org/html/rfc7240)
-///
-/// The `Prefer` header field is HTTP header field that can be used by a
-/// client to request that certain behaviors be employed by a server
-/// while processing a request.
-///
-/// # ABNF
-/// ```plain
-/// Prefer     = "Prefer" ":" 1#preference
-/// preference = token [ BWS "=" BWS word ]
-///              *( OWS ";" [ OWS parameter ] )
-/// parameter  = token [ BWS "=" BWS word ]
-/// ```
-///
-/// # Example values
-/// * `respond-async`
-/// * `return=minimal`
-/// * `wait=30`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Prefer, Preference};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Prefer(vec![Preference::RespondAsync])
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, Prefer, Preference};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Prefer(vec![
-///         Preference::RespondAsync,
-///         Preference::ReturnRepresentation,
-///         Preference::Wait(10u32),
-///         Preference::Extension("foo".to_owned(),
-///                               "bar".to_owned(),
-///                               vec![]),
-///     ])
-/// );
-/// ```
-#[derive(PartialEq, Clone, Debug)]
-pub struct Prefer(pub Vec<Preference>);
-
-__hyper__deref!(Prefer => Vec<Preference>);
-
-impl Header for Prefer {
-    fn header_name() -> &'static str {
-        "Prefer"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Prefer> {
-        let preferences = try!(from_comma_delimited(raw));
-        if !preferences.is_empty() {
-            Ok(Prefer(preferences))
-        } else {
-            Err(::Error::Header)
-        }
-    }
-}
-
-impl HeaderFormat for Prefer {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for Prefer {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt_comma_delimited(f, &self[..])
-    }
-}
-
-/// Prefer contains a list of these preferences.
-#[derive(PartialEq, Clone, Debug)]
-pub enum Preference {
-    /// "respond-async"
-    RespondAsync,
-    /// "return=representation"
-    ReturnRepresentation,
-    /// "return=minimal"
-    ReturnMinimal,
-    /// "handling=strict"
-    HandlingStrict,
-    /// "handling=leniant"
-    HandlingLeniant,
-    /// "wait=delta"
-    Wait(u32),
-
-    /// Extension preferences. Always has a value, if none is specified it is
-    /// just "". A preference can also have a list of parameters.
-    Extension(String, String, Vec<(String, String)>)
-}
-
-impl fmt::Display for Preference {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        use self::Preference::*;
-        fmt::Display::fmt(match *self {
-            RespondAsync => "respond-async",
-            ReturnRepresentation => "return=representation",
-            ReturnMinimal => "return=minimal",
-            HandlingStrict => "handling=strict",
-            HandlingLeniant => "handling=leniant",
-
-            Wait(secs) => return write!(f, "wait={}", secs),
-
-            Extension(ref name, ref value, ref params) => {
-                try!(write!(f, "{}", name));
-                if value != "" { try!(write!(f, "={}", value)); }
-                if params.len() > 0 {
-                    for &(ref name, ref value) in params {
-                        try!(write!(f, "; {}", name));
-                        if value != "" { try!(write!(f, "={}", value)); }
-                    }
-                }
-                return Ok(());
-            }
-        }, f)
-    }
-}
-
-impl FromStr for Preference {
-    type Err = Option<<u32 as FromStr>::Err>;
-    fn from_str(s: &str) -> Result<Preference, Option<<u32 as FromStr>::Err>> {
-        use self::Preference::*;
-        let mut params = s.split(';').map(|p| {
-            let mut param = p.splitn(2, '=');
-            match (param.next(), param.next()) {
-                (Some(name), Some(value)) => (name.trim(), value.trim().trim_matches('"')),
-                (Some(name), None) => (name.trim(), ""),
-                // This can safely be unreachable because the [`splitn`][1]
-                // function (used above) will always have at least one value.
-                //
-                // [1]: http://doc.rust-lang.org/std/primitive.str.html#method.splitn
-                _ => { unreachable!(); }
-            }
-        });
-        match params.nth(0) {
-            Some(param) => {
-                let rest: Vec<(String, String)> = params.map(|(l, r)| (l.to_owned(), r.to_owned())).collect();
-                match param {
-                    ("respond-async", "") => if rest.len() == 0 { Ok(RespondAsync) } else { Err(None) },
-                    ("return", "representation") => if rest.len() == 0 { Ok(ReturnRepresentation) } else { Err(None) },
-                    ("return", "minimal") => if rest.len() == 0 { Ok(ReturnMinimal) } else { Err(None) },
-                    ("handling", "strict") => if rest.len() == 0 { Ok(HandlingStrict) } else { Err(None) },
-                    ("handling", "leniant") => if rest.len() == 0 { Ok(HandlingLeniant) } else { Err(None) },
-                    ("wait", secs) => if rest.len() == 0 { secs.parse().map(Wait).map_err(Some) } else { Err(None) },
-                    (left, right) => Ok(Extension(left.to_owned(), right.to_owned(), rest))
-                }
-            },
-            None => Err(None)
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use header::Header;
-    use super::*;
-
-    #[test]
-    fn test_parse_multiple_headers() {
-        let prefer = Header::parse_header(&[b"respond-async, return=representation".to_vec()]);
-        assert_eq!(prefer.ok(), Some(Prefer(vec![Preference::RespondAsync,
-                                           Preference::ReturnRepresentation])))
-    }
-
-    #[test]
-    fn test_parse_argument() {
-        let prefer = Header::parse_header(&[b"wait=100, handling=leniant, respond-async".to_vec()]);
-        assert_eq!(prefer.ok(), Some(Prefer(vec![Preference::Wait(100),
-                                           Preference::HandlingLeniant,
-                                           Preference::RespondAsync])))
-    }
-
-    #[test]
-    fn test_parse_quote_form() {
-        let prefer = Header::parse_header(&[b"wait=\"200\", handling=\"strict\"".to_vec()]);
-        assert_eq!(prefer.ok(), Some(Prefer(vec![Preference::Wait(200),
-                                           Preference::HandlingStrict])))
-    }
-
-    #[test]
-    fn test_parse_extension() {
-        let prefer = Header::parse_header(&[b"foo, bar=baz, baz; foo; bar=baz, bux=\"\"; foo=\"\", buz=\"some parameter\"".to_vec()]);
-        assert_eq!(prefer.ok(), Some(Prefer(vec![
-            Preference::Extension("foo".to_owned(), "".to_owned(), vec![]),
-            Preference::Extension("bar".to_owned(), "baz".to_owned(), vec![]),
-            Preference::Extension("baz".to_owned(), "".to_owned(), vec![("foo".to_owned(), "".to_owned()), ("bar".to_owned(), "baz".to_owned())]),
-            Preference::Extension("bux".to_owned(), "".to_owned(), vec![("foo".to_owned(), "".to_owned())]),
-            Preference::Extension("buz".to_owned(), "some parameter".to_owned(), vec![])])))
-    }
-
-    #[test]
-    fn test_fail_with_args() {
-        let prefer: ::Result<Prefer> = Header::parse_header(&[b"respond-async; foo=bar".to_vec()]);
-        assert_eq!(prefer.ok(), None);
-    }
-}
-
-bench_header!(normal,
-    Prefer, { vec![b"respond-async, return=representation".to_vec(), b"wait=100".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/preference_applied.rs
+++ /dev/null
@@ -1,107 +0,0 @@
-use std::fmt;
-use header::{Header, HeaderFormat, Preference};
-use header::parsing::{from_comma_delimited, fmt_comma_delimited};
-
-/// `Preference-Applied` header, defined in [RFC7240](http://tools.ietf.org/html/rfc7240)
-///
-/// The `Preference-Applied` response header may be included within a
-/// response message as an indication as to which `Prefer` header tokens were
-/// honored by the server and applied to the processing of a request.
-///
-/// # ABNF
-/// ```plain
-/// Preference-Applied = "Preference-Applied" ":" 1#applied-pref
-/// applied-pref = token [ BWS "=" BWS word ]
-/// ```
-///
-/// # Example values
-/// * `respond-async`
-/// * `return=minimal`
-/// * `wait=30`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, PreferenceApplied, Preference};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     PreferenceApplied(vec![Preference::RespondAsync])
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, PreferenceApplied, Preference};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     PreferenceApplied(vec![
-///         Preference::RespondAsync,
-///         Preference::ReturnRepresentation,
-///         Preference::Wait(10u32),
-///         Preference::Extension("foo".to_owned(),
-///                               "bar".to_owned(),
-///                               vec![]),
-///     ])
-/// );
-/// ```
-#[derive(PartialEq, Clone, Debug)]
-pub struct PreferenceApplied(pub Vec<Preference>);
-
-__hyper__deref!(PreferenceApplied => Vec<Preference>);
-
-impl Header for PreferenceApplied {
-    fn header_name() -> &'static str {
-        "Preference-Applied"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<PreferenceApplied> {
-        let preferences = try!(from_comma_delimited(raw));
-        if !preferences.is_empty() {
-            Ok(PreferenceApplied(preferences))
-        } else {
-            Err(::Error::Header)
-        }
-    }
-}
-
-impl HeaderFormat for PreferenceApplied {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for PreferenceApplied {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        //TODO: format this without allocating a Vec and cloning contents
-        let preferences: Vec<_> = self.0.iter().map(|pref| match pref {
-            // The spec ignores parameters in `Preferences-Applied`
-            &Preference::Extension(ref name, ref value, _) => Preference::Extension(
-              name.to_owned(),
-              value.to_owned(),
-              vec![]
-            ),
-            preference @ _ => preference.clone()
-        }).collect();
-        fmt_comma_delimited(f, &preferences)
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use header::{HeaderFormat, Preference};
-    use super::*;
-
-    #[test]
-    fn test_format_ignore_parameters() {
-        assert_eq!(
-            format!("{}", &PreferenceApplied(vec![Preference::Extension(
-                "foo".to_owned(),
-                "bar".to_owned(),
-                vec![("bar".to_owned(), "foo".to_owned()), ("buz".to_owned(), "".to_owned())]
-            )]) as &(HeaderFormat + Send + Sync)),
-            "foo=bar".to_owned()
-        );
-    }
-}
-
-bench_header!(normal,
-    PreferenceApplied, { vec![b"respond-async, return=representation".to_vec(), b"wait=100".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/range.rs
+++ /dev/null
@@ -1,288 +0,0 @@
-use std::fmt::{self, Display};
-use std::str::FromStr;
-
-use header::{Header, HeaderFormat};
-use header::parsing::{from_one_raw_str, from_comma_delimited};
-
-/// `Range` header, defined in [RFC7233](https://tools.ietf.org/html/rfc7233#section-3.1)
-///
-/// The "Range" header field on a GET request modifies the method
-/// semantics to request transfer of only one or more subranges of the
-/// selected representation data, rather than the entire selected
-/// representation data.
-///
-/// # ABNF
-/// ```plain
-/// Range =	byte-ranges-specifier / other-ranges-specifier
-/// other-ranges-specifier = other-range-unit "=" other-range-set
-/// other-range-set = 1*VCHAR
-///
-/// bytes-unit = "bytes"
-///
-/// byte-ranges-specifier = bytes-unit "=" byte-range-set
-/// byte-range-set = 1#(byte-range-spec / suffix-byte-range-spec)
-/// byte-range-spec = first-byte-pos "-" [last-byte-pos]
-/// first-byte-pos = 1*DIGIT
-/// last-byte-pos = 1*DIGIT
-/// ```
-///
-/// # Example values
-/// * `bytes=1000-`
-/// * `bytes=-2000`
-/// * `bytes=0-1,30-40`
-/// * `bytes=0-10,20-90,-100`
-/// * `custom_unit=0-123`
-/// * `custom_unit=xxx-yyy`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Range, ByteRangeSpec};
-///
-/// let mut headers = Headers::new();
-/// headers.set(Range::Bytes(
-///     vec![ByteRangeSpec::FromTo(1, 100), ByteRangeSpec::AllFrom(200)]
-/// ));
-///
-/// headers.clear();
-/// headers.set(Range::Unregistered("letters".to_owned(), "a-f".to_owned()));
-/// ```
-/// ```
-/// use hyper::header::{Headers, Range};
-///
-/// let mut headers = Headers::new();
-/// headers.set(Range::bytes(1, 100));
-///
-/// headers.clear();
-/// headers.set(Range::bytes_multi(vec![(1, 100), (200, 300)]));
-/// ```
-#[derive(PartialEq, Clone, Debug)]
-pub enum Range {
-    /// Byte range
-    Bytes(Vec<ByteRangeSpec>),
-    /// Custom range, with unit not registered at IANA
-    /// (`other-range-unit`: String , `other-range-set`: String)
-    Unregistered(String, String)
-}
-
-/// Each `Range::Bytes` header can contain one or more `ByteRangeSpecs`.
-/// Each `ByteRangeSpec` defines a range of bytes to fetch
-#[derive(PartialEq, Clone, Debug)]
-pub enum ByteRangeSpec {
-    /// Get all bytes between x and y ("x-y")
-    FromTo(u64, u64),
-    /// Get all bytes starting from x ("x-")
-    AllFrom(u64),
-    /// Get last x bytes ("-x")
-    Last(u64)
-}
-
-impl Range {
-    /// Get the most common byte range header ("bytes=from-to")
-    pub fn bytes(from: u64, to: u64) -> Range {
-        Range::Bytes(vec![ByteRangeSpec::FromTo(from, to)])
-    }
-
-    /// Get byte range header with multiple subranges
-    /// ("bytes=from1-to1,from2-to2,fromX-toX")
-    pub fn bytes_multi(ranges: Vec<(u64, u64)>) -> Range {
-        Range::Bytes(ranges.iter().map(|r| ByteRangeSpec::FromTo(r.0, r.1)).collect())
-    }
-}
-
-
-impl fmt::Display for ByteRangeSpec {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            ByteRangeSpec::FromTo(from, to) => write!(f, "{}-{}", from, to),
-            ByteRangeSpec::Last(pos) => write!(f, "-{}", pos),
-            ByteRangeSpec::AllFrom(pos) => write!(f, "{}-", pos),
-        }
-    }
-}
-
-
-impl fmt::Display for Range {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            Range::Bytes(ref ranges) => {
-                try!(write!(f, "bytes="));
-
-                for (i, range) in ranges.iter().enumerate() {
-                    if i != 0 {
-                        try!(f.write_str(","));
-                    }
-                    try!(Display::fmt(range, f));
-                }
-                Ok(())
-            },
-            Range::Unregistered(ref unit, ref range_str) => {
-                write!(f, "{}={}", unit, range_str)
-            },
-        }
-    }
-}
-
-impl FromStr for Range {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<Range> {
-        let mut iter = s.splitn(2, "=");
-
-        match (iter.next(), iter.next()) {
-            (Some("bytes"), Some(ranges)) => {
-                match from_comma_delimited(&[ranges]) {
-                    Ok(ranges) => {
-                        if ranges.is_empty() {
-                            return Err(::Error::Header);
-                        }
-                        Ok(Range::Bytes(ranges))
-                    },
-                    Err(_) => Err(::Error::Header)
-                }
-            }
-            (Some(unit), Some(range_str)) if unit != "" && range_str != "" => {
-                Ok(Range::Unregistered(unit.to_owned(), range_str.to_owned()))
-
-            },
-            _ => Err(::Error::Header)
-        }
-    }
-}
-
-impl FromStr for ByteRangeSpec {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<ByteRangeSpec> {
-        let mut parts = s.splitn(2, "-");
-
-        match (parts.next(), parts.next()) {
-            (Some(""), Some(end)) => {
-                end.parse().or(Err(::Error::Header)).map(ByteRangeSpec::Last)
-            },
-            (Some(start), Some("")) => {
-                start.parse().or(Err(::Error::Header)).map(ByteRangeSpec::AllFrom)
-            },
-            (Some(start), Some(end)) => {
-                match (start.parse(), end.parse()) {
-                    (Ok(start), Ok(end)) if start <= end => Ok(ByteRangeSpec::FromTo(start, end)),
-                    _ => Err(::Error::Header)
-                }
-            },
-            _ => Err(::Error::Header)
-        }
-    }
-}
-
-impl Header for Range {
-
-    fn header_name() -> &'static str {
-        "Range"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Range> {
-        from_one_raw_str(raw)
-    }
-}
-
-impl HeaderFormat for Range {
-
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        Display::fmt(self, f)
-    }
-
-}
-
-#[test]
-fn test_parse_bytes_range_valid() {
-    let r: Range = Header::parse_header(&[b"bytes=1-100".to_vec()]).unwrap();
-    let r2: Range = Header::parse_header(&[b"bytes=1-100,-".to_vec()]).unwrap();
-    let r3 =  Range::bytes(1, 100);
-    assert_eq!(r, r2);
-    assert_eq!(r2, r3);
-
-    let r: Range = Header::parse_header(&[b"bytes=1-100,200-".to_vec()]).unwrap();
-    let r2: Range = Header::parse_header(&[b"bytes= 1-100 , 101-xxx,  200- ".to_vec()]).unwrap();
-    let r3 =  Range::Bytes(
-        vec![ByteRangeSpec::FromTo(1, 100), ByteRangeSpec::AllFrom(200)]
-    );
-    assert_eq!(r, r2);
-    assert_eq!(r2, r3);
-
-    let r: Range = Header::parse_header(&[b"bytes=1-100,-100".to_vec()]).unwrap();
-    let r2: Range = Header::parse_header(&[b"bytes=1-100, ,,-100".to_vec()]).unwrap();
-    let r3 =  Range::Bytes(
-        vec![ByteRangeSpec::FromTo(1, 100), ByteRangeSpec::Last(100)]
-    );
-    assert_eq!(r, r2);
-    assert_eq!(r2, r3);
-
-    let r: Range = Header::parse_header(&[b"custom=1-100,-100".to_vec()]).unwrap();
-    let r2 =  Range::Unregistered("custom".to_owned(), "1-100,-100".to_owned());
-    assert_eq!(r, r2);
-
-}
-
-#[test]
-fn test_parse_unregistered_range_valid() {
-    let r: Range = Header::parse_header(&[b"custom=1-100,-100".to_vec()]).unwrap();
-    let r2 =  Range::Unregistered("custom".to_owned(), "1-100,-100".to_owned());
-    assert_eq!(r, r2);
-
-    let r: Range = Header::parse_header(&[b"custom=abcd".to_vec()]).unwrap();
-    let r2 =  Range::Unregistered("custom".to_owned(), "abcd".to_owned());
-    assert_eq!(r, r2);
-
-    let r: Range = Header::parse_header(&[b"custom=xxx-yyy".to_vec()]).unwrap();
-    let r2 =  Range::Unregistered("custom".to_owned(), "xxx-yyy".to_owned());
-    assert_eq!(r, r2);
-}
-
-#[test]
-fn test_parse_invalid() {
-    let r: ::Result<Range> = Header::parse_header(&[b"bytes=1-a,-".to_vec()]);
-    assert_eq!(r.ok(), None);
-
-    let r: ::Result<Range> = Header::parse_header(&[b"bytes=1-2-3".to_vec()]);
-    assert_eq!(r.ok(), None);
-
-    let r: ::Result<Range> = Header::parse_header(&[b"abc".to_vec()]);
-    assert_eq!(r.ok(), None);
-
-    let r: ::Result<Range> = Header::parse_header(&[b"bytes=1-100=".to_vec()]);
-    assert_eq!(r.ok(), None);
-
-    let r: ::Result<Range> = Header::parse_header(&[b"bytes=".to_vec()]);
-    assert_eq!(r.ok(), None);
-
-    let r: ::Result<Range> = Header::parse_header(&[b"custom=".to_vec()]);
-    assert_eq!(r.ok(), None);
-
-    let r: ::Result<Range> = Header::parse_header(&[b"=1-100".to_vec()]);
-    assert_eq!(r.ok(), None);
-}
-
-#[test]
-fn test_fmt() {
-    use header::Headers;
-
-    let mut headers = Headers::new();
-
-    headers.set(
-        Range::Bytes(
-            vec![ByteRangeSpec::FromTo(0, 1000), ByteRangeSpec::AllFrom(2000)]
-    ));
-    assert_eq!(&headers.to_string(), "Range: bytes=0-1000,2000-\r\n");
-
-    headers.clear();
-    headers.set(Range::Bytes(vec![]));
-
-    assert_eq!(&headers.to_string(), "Range: bytes=\r\n");
-
-    headers.clear();
-    headers.set(Range::Unregistered("custom".to_owned(), "1-xxx".to_owned()));
-
-    assert_eq!(&headers.to_string(), "Range: custom=1-xxx\r\n");
-}
-
-bench_header!(bytes_multi, Range, { vec![b"bytes=1-1001,2001-3001,10001-".to_vec()]});
-bench_header!(custom_unit, Range, { vec![b"other=0-100000".to_vec()]});
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/referer.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-header! {
-    /// `Referer` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.5.2)
-    ///
-    /// The `Referer` [sic] header field allows the user agent to specify a
-    /// URI reference for the resource from which the target URI was obtained
-    /// (i.e., the "referrer", though the field name is misspelled).  A user
-    /// agent MUST NOT include the fragment and userinfo components of the
-    /// URI reference, if any, when generating the Referer field value.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Referer = absolute-URI / partial-URI
-    /// ```
-    ///
-    /// # Example values
-    /// * `http://www.example.org/hypertext/Overview.html`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, Referer};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Referer("/People.html#tim".to_owned()));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, Referer};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Referer("http://www.example.com/index.html".to_owned()));
-    /// ```
-    // TODO Use URL
-    (Referer, "Referer") => [String]
-
-    test_referer {
-        // Testcase from the RFC
-        test_header!(test1, vec![b"http://www.example.org/hypertext/Overview.html"]);
-    }
-}
-
-bench_header!(bench, Referer, { vec![b"http://foo.com/hello:3000".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/referrer_policy.rs
+++ /dev/null
@@ -1,119 +0,0 @@
-use std::fmt;
-use std::ascii::AsciiExt;
-
-use header::{Header, HeaderFormat, parsing};
-
-/// `Referrer-Policy` header, part of
-/// [Referrer Policy](https://www.w3.org/TR/referrer-policy/#referrer-policy-header)
-///
-/// The `Referrer-Policy` HTTP header specifies the referrer
-/// policy that the user agent applies when determining what
-/// referrer information should be included with requests made,
-/// and with browsing contexts created from the context of the
-/// protected resource.
-///
-/// # ABNF
-/// ```plain
-/// Referrer-Policy: 1#policy-token
-/// policy-token   = "no-referrer" / "no-referrer-when-downgrade"
-///                  / "same-origin" / "origin"
-///                  / "origin-when-cross-origin" / "unsafe-url"
-/// ```
-///
-/// # Example values
-/// * `no-referrer`
-///
-/// # Example
-/// ```
-/// use hyper::header::{Headers, ReferrerPolicy};
-///
-/// let mut headers = Headers::new();
-/// headers.set(ReferrerPolicy::NoReferrer);
-/// ```
-#[derive(Clone, PartialEq, Eq, Debug)]
-pub enum ReferrerPolicy {
-    /// `no-referrer`
-    NoReferrer,
-    /// `no-referrer-when-downgrade`
-    NoReferrerWhenDowngrade,
-    /// `same-origin`
-    SameOrigin,
-    /// `origin`
-    Origin,
-    /// `origin-when-cross-origin`
-    OriginWhenCrossOrigin,
-    /// `unsafe-url`
-    UnsafeUrl,
-     /// `strict-origin`
-    StrictOrigin,
-    ///`strict-origin-when-cross-origin`
-    StrictOriginWhenCrossOrigin,
-}
-
-impl Header for ReferrerPolicy {
-    fn header_name() -> &'static str {
-        static NAME: &'static str = "Referrer-Policy";
-        NAME
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<ReferrerPolicy> {
-        use self::ReferrerPolicy::*;
-        // See https://www.w3.org/TR/referrer-policy/#determine-policy-for-token
-        let headers: Vec<String> = try!(parsing::from_comma_delimited(raw));
-
-        for h in headers.iter().rev() {
-            let slice = &h.to_ascii_lowercase()[..];
-            match slice {
-                "no-referrer" | "never" => return Ok(NoReferrer),
-                "no-referrer-when-downgrade" | "default" => return Ok(NoReferrerWhenDowngrade),
-                "same-origin" => return Ok(SameOrigin),
-                "origin" => return Ok(Origin),
-                "origin-when-cross-origin" => return Ok(OriginWhenCrossOrigin),
-                "strict-origin" => return Ok(StrictOrigin),
-                "strict-origin-when-cross-origin" => return Ok(StrictOriginWhenCrossOrigin),
-                "unsafe-url" | "always" => return Ok(UnsafeUrl),
-                _ => continue,
-            }
-        }
-
-        Err(::Error::Header)
-    }
-}
-
-impl HeaderFormat for ReferrerPolicy {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for ReferrerPolicy {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        use self::ReferrerPolicy::*;
-        f.write_str(match *self {
-            NoReferrer => "no-referrer",
-            NoReferrerWhenDowngrade => "no-referrer-when-downgrade",
-            SameOrigin => "same-origin",
-            Origin => "origin",
-            OriginWhenCrossOrigin => "origin-when-cross-origin",
-            StrictOrigin => "strict-origin",
-            StrictOriginWhenCrossOrigin => "strict-origin-when-cross-origin",
-            UnsafeUrl => "unsafe-url",
-        })
-    }
-}
-
-#[test]
-fn test_parse_header() {
-    let a: ReferrerPolicy = Header::parse_header([b"origin".to_vec()].as_ref()).unwrap();
-    let b = ReferrerPolicy::Origin;
-    assert_eq!(a, b);
-    let e: ::Result<ReferrerPolicy> = Header::parse_header([b"foobar".to_vec()].as_ref());
-    assert!(e.is_err());
-}
-
-#[test]
-fn test_rightmost_header() {
-    let a: ReferrerPolicy = Header::parse_header(&["same-origin, origin, foobar".into()]).unwrap();
-    let b = ReferrerPolicy::Origin;
-    assert_eq!(a, b);
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/server.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-header! {
-    /// `Server` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.4.2)
-    ///
-    /// The `Server` header field contains information about the software
-    /// used by the origin server to handle the request, which is often used
-    /// by clients to help identify the scope of reported interoperability
-    /// problems, to work around or tailor requests to avoid particular
-    /// server limitations, and for analytics regarding server or operating
-    /// system use.  An origin server MAY generate a Server field in its
-    /// responses.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Server = product *( RWS ( product / comment ) )
-    /// ```
-    ///
-    /// # Example values
-    /// * `CERN/3.0 libwww/2.17`
-    ///
-    /// # Example
-    /// ```
-    /// use hyper::header::{Headers, Server};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Server("hyper/0.5.2".to_owned()));
-    /// ```
-    // TODO: Maybe parse as defined in the spec?
-    (Server, "Server") => [String]
-
-    test_server {
-        // Testcase from RFC
-        test_header!(test1, vec![b"CERN/3.0 libwww/2.17"]);
-    }
-}
-
-bench_header!(bench, Server, { vec![b"Some String".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/set_cookie.rs
+++ /dev/null
@@ -1,121 +0,0 @@
-use header::{Header, HeaderFormat};
-use std::fmt::{self};
-use std::str::from_utf8;
-
-
-/// `Set-Cookie` header, defined [RFC6265](http://tools.ietf.org/html/rfc6265#section-4.1)
-///
-/// The Set-Cookie HTTP response header is used to send cookies from the
-/// server to the user agent.
-///
-/// Informally, the Set-Cookie response header contains the header name
-/// "Set-Cookie" followed by a ":" and a cookie.  Each cookie begins with
-/// a name-value-pair, followed by zero or more attribute-value pairs.
-///
-/// # ABNF
-/// ```plain
-///  set-cookie-header = "Set-Cookie:" SP set-cookie-string
-/// set-cookie-string = cookie-pair *( ";" SP cookie-av )
-/// cookie-pair       = cookie-name "=" cookie-value
-/// cookie-name       = token
-/// cookie-value      = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
-/// cookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
-///                       ; US-ASCII characters excluding CTLs,
-///                       ; whitespace DQUOTE, comma, semicolon,
-///                       ; and backslash
-/// token             = <token, defined in [RFC2616], Section 2.2>
-///
-/// cookie-av         = expires-av / max-age-av / domain-av /
-///                    path-av / secure-av / httponly-av /
-///                     extension-av
-/// expires-av        = "Expires=" sane-cookie-date
-/// sane-cookie-date  = <rfc1123-date, defined in [RFC2616], Section 3.3.1>
-/// max-age-av        = "Max-Age=" non-zero-digit *DIGIT
-///                       ; In practice, both expires-av and max-age-av
-///                       ; are limited to dates representable by the
-///                       ; user agent.
-/// non-zero-digit    = %x31-39
-///                       ; digits 1 through 9
-/// domain-av         = "Domain=" domain-value
-/// domain-value      = <subdomain>
-///                       ; defined in [RFC1034], Section 3.5, as
-///                       ; enhanced by [RFC1123], Section 2.1
-/// path-av           = "Path=" path-value
-/// path-value        = <any CHAR except CTLs or ";">
-/// secure-av         = "Secure"
-/// httponly-av       = "HttpOnly"
-/// extension-av      = <any CHAR except CTLs or ";">
-/// ```
-///
-/// # Example values
-/// * `SID=31d4d96e407aad42`
-/// * `lang=en-US; Expires=Wed, 09 Jun 2021 10:18:14 GMT`
-/// * `lang=; Expires=Sun, 06 Nov 1994 08:49:37 GMT`
-/// * `lang=en-US; Path=/; Domain=example.com`
-///
-/// # Example
-/// ```
-/// use hyper::header::{Headers, SetCookie};
-///
-/// let mut headers = Headers::new();
-///
-/// headers.set(
-///     SetCookie(vec![
-///         String::from("foo=bar; Path=/path; Domain=example.com")
-///     ])
-/// );
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct SetCookie(pub Vec<String>);
-
-__hyper__deref!(SetCookie => Vec<String>);
-
-impl Header for SetCookie {
-    fn header_name() -> &'static str {
-        "Set-Cookie"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<SetCookie> {
-        let mut set_cookies = Vec::with_capacity(raw.len());
-        for set_cookies_raw in raw {
-            if let Ok(s) = from_utf8(&set_cookies_raw[..]) {
-                set_cookies.push(s.trim().to_owned());
-            }
-        }
-
-        if !set_cookies.is_empty() {
-            Ok(SetCookie(set_cookies))
-        } else {
-            Err(::Error::Header)
-        }
-    }
-
-}
-
-impl HeaderFormat for SetCookie {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        if self.0.len() == 1 {
-            write!(f, "{}", &self.0[0])
-        } else {
-            panic!("SetCookie with multiple cookies cannot be used with fmt_header, must use fmt_multi_header");
-        }
-    }
-
-    fn fmt_multi_header(&self, f: &mut ::header::MultilineFormatter) -> fmt::Result {
-        for cookie in &self.0 {
-            try!(f.fmt_line(cookie));
-        }
-        Ok(())
-    }
-}
-
-#[test]
-fn test_set_cookie_fmt() {
-    use ::header::Headers;
-    let mut headers = Headers::new();
-    headers.set(SetCookie(vec![
-        "foo=bar".into(),
-        "baz=quux".into(),
-    ]));
-    assert_eq!(headers.to_string(), "Set-Cookie: foo=bar\r\nSet-Cookie: baz=quux\r\n");
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/strict_transport_security.rs
+++ /dev/null
@@ -1,201 +0,0 @@
-use std::fmt;
-use std::str::{self, FromStr};
-
-use unicase::UniCase;
-
-use header::{Header, HeaderFormat, parsing};
-
-/// `StrictTransportSecurity` header, defined in [RFC6797](https://tools.ietf.org/html/rfc6797)
-///
-/// This specification defines a mechanism enabling web sites to declare
-/// themselves accessible only via secure connections and/or for users to be
-/// able to direct their user agent(s) to interact with given sites only over
-/// secure connections.  This overall policy is referred to as HTTP Strict
-/// Transport Security (HSTS).  The policy is declared by web sites via the
-/// Strict-Transport-Security HTTP response header field and/or by other means,
-/// such as user agent configuration, for example.
-///
-/// # ABNF
-///
-/// ```plain
-///      [ directive ]  *( ";" [ directive ] )
-///
-///      directive                 = directive-name [ "=" directive-value ]
-///      directive-name            = token
-///      directive-value           = token | quoted-string
-///
-/// ```
-///
-/// # Example values
-/// * `max-age=31536000`
-/// * `max-age=15768000 ; includeSubDomains`
-///
-/// # Example
-/// ```
-/// # extern crate hyper;
-/// # fn main() {
-/// use hyper::header::{Headers, StrictTransportSecurity};
-///
-/// let mut headers = Headers::new();
-///
-/// headers.set(
-///    StrictTransportSecurity::including_subdomains(31536000u64)
-/// );
-/// # }
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct StrictTransportSecurity {
-    /// Signals the UA that the HSTS Policy applies to this HSTS Host as well as
-    /// any subdomains of the host's domain name.
-    pub include_subdomains: bool,
-
-    /// Specifies the number of seconds, after the reception of the STS header
-    /// field, during which the UA regards the host (from whom the message was
-    /// received) as a Known HSTS Host.
-    pub max_age: u64
-}
-
-impl StrictTransportSecurity {
-    /// Create an STS header that includes subdomains
-    pub fn including_subdomains(max_age: u64) -> StrictTransportSecurity {
-        StrictTransportSecurity {
-            max_age: max_age,
-            include_subdomains: true
-        }
-    }
-
-    /// Create an STS header that excludes subdomains
-    pub fn excluding_subdomains(max_age: u64) -> StrictTransportSecurity {
-        StrictTransportSecurity {
-            max_age: max_age,
-            include_subdomains: false
-        }
-    }
-}
-
-enum Directive {
-    MaxAge(u64),
-    IncludeSubdomains,
-    Unknown
-}
-
-impl FromStr for StrictTransportSecurity {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<StrictTransportSecurity> {
-        s.split(';')
-            .map(str::trim)
-            .map(|sub| if UniCase(sub) == UniCase("includeSubdomains") {
-                Ok(Directive::IncludeSubdomains)
-            } else {
-                let mut sub = sub.splitn(2, '=');
-                match (sub.next(), sub.next()) {
-                    (Some(left), Some(right))
-                    if UniCase(left.trim()) == UniCase("max-age") => {
-                        right
-                            .trim()
-                            .trim_matches('"')
-                            .parse()
-                            .map(Directive::MaxAge)
-                    },
-                    _ => Ok(Directive::Unknown)
-                }
-            })
-            .fold(Ok((None, None)), |res, dir| match (res, dir) {
-                (Ok((None, sub)), Ok(Directive::MaxAge(age))) => Ok((Some(age), sub)),
-                (Ok((age, None)), Ok(Directive::IncludeSubdomains)) => Ok((age, Some(()))),
-                (Ok((Some(_), _)), Ok(Directive::MaxAge(_))) => Err(::Error::Header),
-                (Ok((_, Some(_))), Ok(Directive::IncludeSubdomains)) => Err(::Error::Header),
-                (_, Err(_)) => Err(::Error::Header),
-                (res, _) => res
-            })
-            .and_then(|res| match res {
-                (Some(age), sub) => Ok(StrictTransportSecurity {
-                    max_age: age,
-                    include_subdomains: sub.is_some()
-                }),
-                _ => Err(::Error::Header)
-            })
-    }
-}
-
-impl Header for StrictTransportSecurity {
-    fn header_name() -> &'static str {
-        "Strict-Transport-Security"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<StrictTransportSecurity> {
-        parsing::from_one_raw_str(raw)
-    }
-}
-
-impl HeaderFormat for StrictTransportSecurity {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for StrictTransportSecurity {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        if self.include_subdomains {
-            write!(f, "max-age={}; includeSubdomains", self.max_age)
-        } else {
-            write!(f, "max-age={}", self.max_age)
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::StrictTransportSecurity;
-    use header::Header;
-
-    #[test]
-    fn test_parse_max_age() {
-        let h = Header::parse_header(&[b"max-age=31536000".to_vec()][..]);
-        assert_eq!(h.ok(), Some(StrictTransportSecurity { include_subdomains: false, max_age: 31536000u64 }));
-    }
-
-    #[test]
-    fn test_parse_max_age_no_value() {
-        let h: ::Result<StrictTransportSecurity> = Header::parse_header(&[b"max-age".to_vec()][..]);
-        assert!(h.is_err());
-    }
-
-    #[test]
-    fn test_parse_quoted_max_age() {
-        let h = Header::parse_header(&[b"max-age=\"31536000\"".to_vec()][..]);
-        assert_eq!(h.ok(), Some(StrictTransportSecurity { include_subdomains: false, max_age: 31536000u64 }));
-    }
-
-    #[test]
-    fn test_parse_spaces_max_age() {
-        let h = Header::parse_header(&[b"max-age = 31536000".to_vec()][..]);
-        assert_eq!(h.ok(), Some(StrictTransportSecurity { include_subdomains: false, max_age: 31536000u64 }));
-    }
-
-    #[test]
-    fn test_parse_include_subdomains() {
-        let h = Header::parse_header(&[b"max-age=15768000 ; includeSubDomains".to_vec()][..]);
-        assert_eq!(h.ok(), Some(StrictTransportSecurity { include_subdomains: true, max_age: 15768000u64 }));
-    }
-
-    #[test]
-    fn test_parse_no_max_age() {
-        let h: ::Result<StrictTransportSecurity> = Header::parse_header(&[b"includeSubDomains".to_vec()][..]);
-        assert!(h.is_err());
-    }
-
-    #[test]
-    fn test_parse_max_age_nan() {
-        let h: ::Result<StrictTransportSecurity> = Header::parse_header(&[b"max-age = derp".to_vec()][..]);
-        assert!(h.is_err());
-    }
-
-    #[test]
-    fn test_parse_duplicate_directives() {
-        assert!(StrictTransportSecurity::parse_header(&[b"max-age=100; max-age=5; max-age=0".to_vec()][..]).is_err());
-    }
-}
-
-bench_header!(bench, StrictTransportSecurity, { vec![b"max-age=15768000 ; includeSubDomains".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/transfer_encoding.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-use header::Encoding;
-
-header! {
-    /// `Transfer-Encoding` header, defined in
-    /// [RFC7230](http://tools.ietf.org/html/rfc7230#section-3.3.1)
-    /// 
-    /// The `Transfer-Encoding` header field lists the transfer coding names
-    /// corresponding to the sequence of transfer codings that have been (or
-    /// will be) applied to the payload body in order to form the message
-    /// body.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Transfer-Encoding = 1#transfer-coding
-    /// ```
-    /// 
-    /// # Example values
-    /// * `gzip, chunked`
-    /// 
-    /// # Example
-    /// ```
-    /// use hyper::header::{Headers, TransferEncoding, Encoding};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     TransferEncoding(vec![
-    ///         Encoding::Gzip,
-    ///         Encoding::Chunked,
-    ///     ])
-    /// );
-    /// ```
-    (TransferEncoding, "Transfer-Encoding") => (Encoding)+
-
-    transfer_encoding {
-        test_header!(
-            test1,
-            vec![b"gzip, chunked"],
-            Some(HeaderField(
-                vec![Encoding::Gzip, Encoding::Chunked]
-                )));
-        // Issue: #683
-        test_header!(
-            test2,
-            vec![b"chunked", b"chunked"],
-            Some(HeaderField(
-                vec![Encoding::Chunked, Encoding::Chunked]
-            )));
-
-    }
-}
-
-bench_header!(normal, TransferEncoding, { vec![b"chunked, gzip".to_vec()] });
-bench_header!(ext, TransferEncoding, { vec![b"ext".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/upgrade.rs
+++ /dev/null
@@ -1,158 +0,0 @@
-use std::fmt::{self, Display};
-use std::str::FromStr;
-use unicase::UniCase;
-
-header! {
-    /// `Upgrade` header, defined in [RFC7230](http://tools.ietf.org/html/rfc7230#section-6.7)
-    ///
-    /// The `Upgrade` header field is intended to provide a simple mechanism
-    /// for transitioning from HTTP/1.1 to some other protocol on the same
-    /// connection.  A client MAY send a list of protocols in the Upgrade
-    /// header field of a request to invite the server to switch to one or
-    /// more of those protocols, in order of descending preference, before
-    /// sending the final response.  A server MAY ignore a received Upgrade
-    /// header field if it wishes to continue using the current protocol on
-    /// that connection.  Upgrade cannot be used to insist on a protocol
-    /// change.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Upgrade          = 1#protocol
-    ///
-    /// protocol         = protocol-name ["/" protocol-version]
-    /// protocol-name    = token
-    /// protocol-version = token
-    /// ```
-    ///
-    /// # Example values
-    /// * `HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, Upgrade, Protocol, ProtocolName};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Upgrade(vec![Protocol::new(ProtocolName::WebSocket, None)]));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, Upgrade, Protocol, ProtocolName};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     Upgrade(vec![
-    ///         Protocol::new(ProtocolName::Http, Some("2.0".to_owned())),
-    ///         Protocol::new(ProtocolName::Unregistered("SHTTP".to_owned()),
-    ///             Some("1.3".to_owned())),
-    ///         Protocol::new(ProtocolName::Unregistered("IRC".to_owned()),
-    ///             Some("6.9".to_owned())),
-    ///     ])
-    /// );
-    /// ```
-    (Upgrade, "Upgrade") => (Protocol)+
-
-    test_upgrade {
-        // Testcase from the RFC
-        test_header!(
-            test1,
-            vec![b"HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11"],
-            Some(Upgrade(vec![
-                Protocol::new(ProtocolName::Http, Some("2.0".to_owned())),
-                Protocol::new(ProtocolName::Unregistered("SHTTP".to_owned()),
-                    Some("1.3".to_owned())),
-                Protocol::new(ProtocolName::Unregistered("IRC".to_owned()), Some("6.9".to_owned())),
-                Protocol::new(ProtocolName::Unregistered("RTA".to_owned()), Some("x11".to_owned())),
-                ])));
-        // Own tests
-        test_header!(
-            test2, vec![b"websocket"],
-            Some(Upgrade(vec![Protocol::new(ProtocolName::WebSocket, None)])));
-        #[test]
-        fn test3() {
-            let x: ::Result<Upgrade> = Header::parse_header(&[b"WEbSOCKet".to_vec()]);
-            assert_eq!(x.ok(), Some(Upgrade(vec![Protocol::new(ProtocolName::WebSocket, None)])));
-        }
-    }
-}
-
-/// A protocol name used to identify a spefic protocol. Names are case-sensitive
-/// except for the `WebSocket` value.
-#[derive(Clone, Debug, Eq, PartialEq)]
-pub enum ProtocolName {
-    /// `HTTP` value, Hypertext Transfer Protocol
-    Http,
-    /// `TLS` value, Transport Layer Security [RFC2817](http://tools.ietf.org/html/rfc2817)
-    Tls,
-    /// `WebSocket` value, matched case insensitively,Web Socket Protocol
-    /// [RFC6455](http://tools.ietf.org/html/rfc6455)
-    WebSocket,
-    /// `h2c` value, HTTP/2 over cleartext TCP
-    H2c,
-    /// Any other protocol name not known to hyper
-    Unregistered(String),
-}
-
-impl FromStr for ProtocolName {
-    type Err = ();
-    fn from_str(s: &str) -> Result<ProtocolName, ()> {
-        Ok(match s {
-            "HTTP" => ProtocolName::Http,
-            "TLS" => ProtocolName::Tls,
-            "h2c" => ProtocolName::H2c,
-            _ => {
-                if UniCase(s) == UniCase("websocket") {
-                    ProtocolName::WebSocket
-                } else {
-                    ProtocolName::Unregistered(s.to_owned())
-                }
-            }
-        })
-    }
-}
-
-impl Display for ProtocolName {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(match *self {
-            ProtocolName::Http => "HTTP",
-            ProtocolName::Tls => "TLS",
-            ProtocolName::WebSocket => "websocket",
-            ProtocolName::H2c => "h2c",
-            ProtocolName::Unregistered(ref s) => s,
-        })
-    }
-}
-
-/// Protocols that appear in the `Upgrade` header field
-#[derive(Clone, Debug, Eq, PartialEq)]
-pub struct Protocol {
-    /// The protocol identifier
-    pub name: ProtocolName,
-    /// The optional version of the protocol, often in the format "DIGIT.DIGIT" (e.g.. "1.2")
-    pub version: Option<String>,
-}
-
-impl Protocol {
-    /// Creates a new Protocol with the given name and version
-    pub fn new(name: ProtocolName, version: Option<String>) -> Protocol {
-        Protocol { name: name, version: version }
-    }
-}
-
-impl FromStr for Protocol {
-    type Err =();
-    fn from_str(s: &str) -> Result<Protocol, ()> {
-        let mut parts = s.splitn(2, '/');
-        Ok(Protocol::new(try!(parts.next().unwrap().parse()), parts.next().map(|x| x.to_owned())))
-    }
-}
-
-impl Display for Protocol {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(fmt::Display::fmt(&self.name, f));
-        if let Some(ref version) = self.version {
-            try!(write!(f, "/{}", version));
-        }
-        Ok(())
-    }
-}
-
-bench_header!(bench, Upgrade, { vec![b"HTTP/2.0, RTA/x11, websocket".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/user_agent.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-header! {
-    /// `User-Agent` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.5.3)
-    ///
-    /// The `User-Agent` header field contains information about the user
-    /// agent originating the request, which is often used by servers to help
-    /// identify the scope of reported interoperability problems, to work
-    /// around or tailor responses to avoid particular user agent
-    /// limitations, and for analytics regarding browser or operating system
-    /// use.  A user agent SHOULD send a User-Agent field in each request
-    /// unless specifically configured not to do so.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// User-Agent = product *( RWS ( product / comment ) )
-    /// product         = token ["/" product-version]
-    /// product-version = token
-    /// ```
-    ///
-    /// # Example values
-    /// * `CERN-LineMode/2.15 libwww/2.17b3`
-    /// * `Bunnies`
-    ///
-    /// # Notes
-    /// * The parser does not split the value
-    ///
-    /// # Example
-    /// ```
-    /// use hyper::header::{Headers, UserAgent};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(UserAgent("hyper/0.5.2".to_owned()));
-    /// ```
-    (UserAgent, "User-Agent") => [String]
-
-    test_user_agent {
-        // Testcase from RFC
-        test_header!(test1, vec![b"CERN-LineMode/2.15 libwww/2.17b3"]);
-        // Own testcase
-        test_header!(test2, vec![b"Bunnies"], Some(UserAgent("Bunnies".to_owned())));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/vary.rs
+++ /dev/null
@@ -1,66 +0,0 @@
-use unicase::UniCase;
-
-header! {
-    /// `Vary` header, defined in [RFC7231](https://tools.ietf.org/html/rfc7231#section-7.1.4)
-    ///
-    /// The "Vary" header field in a response describes what parts of a
-    /// request message, aside from the method, Host header field, and
-    /// request target, might influence the origin server's process for
-    /// selecting and representing this response.  The value consists of
-    /// either a single asterisk ("*") or a list of header field names
-    /// (case-insensitive).
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Vary = "*" / 1#field-name
-    /// ```
-    ///
-    /// # Example values
-    /// * `accept-encoding, accept-language`
-    ///
-    /// # Example
-    /// ```
-    /// use hyper::header::{Headers, Vary};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Vary::Any);
-    /// ```
-    ///
-    /// # Example
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, Vary};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     Vary::Items(vec![
-    ///         UniCase("accept-encoding".to_owned()),
-    ///         UniCase("accept-language".to_owned()),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (Vary, "Vary") => {Any / (UniCase<String>)+}
-
-    test_vary {
-        test_header!(test1, vec![b"accept-encoding, accept-language"]);
-
-        #[test]
-        fn test2() {
-            let mut vary: ::Result<Vary>;
-
-            vary = Header::parse_header([b"*".to_vec()].as_ref());
-            assert_eq!(vary.ok(), Some(Vary::Any));
-
-            vary = Header::parse_header([b"etag,cookie,allow".to_vec()].as_ref());
-            assert_eq!(vary.ok(), Some(Vary::Items(vec!["eTag".parse().unwrap(),
-                                                        "cookIE".parse().unwrap(),
-                                                        "AlLOw".parse().unwrap(),])));
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/internals/cell.rs
+++ /dev/null
@@ -1,204 +0,0 @@
-use std::any::{Any, TypeId};
-use std::cell::UnsafeCell;
-use std::collections::HashMap;
-use std::fmt;
-use std::mem;
-use std::ops::Deref;
-
-pub struct OptCell<T>(UnsafeCell<Option<T>>);
-
-impl<T> OptCell<T> {
-    #[inline]
-    pub fn new(val: Option<T>) -> OptCell<T> {
-        OptCell(UnsafeCell::new(val))
-    }
-
-    #[inline]
-    pub fn set(&self, val: T) {
-        unsafe {
-            let opt = self.0.get();
-            debug_assert!((*opt).is_none());
-            *opt = Some(val)
-        }
-    }
-
-    #[inline]
-    pub unsafe fn get_mut(&mut self) -> &mut T {
-        let opt = &mut *self.0.get();
-        opt.as_mut().unwrap()
-    }
-}
-
-impl<T> Deref for OptCell<T> {
-    type Target = Option<T>;
-    #[inline]
-    fn deref(&self) -> &Option<T> {
-        unsafe { &*self.0.get() }
-    }
-}
-
-impl<T: Clone> Clone for OptCell<T> {
-    #[inline]
-    fn clone(&self) -> OptCell<T> {
-        OptCell::new((**self).clone())
-    }
-}
-
-pub struct PtrMapCell<V: ?Sized>(UnsafeCell<PtrMap<Box<V>>>);
-
-#[derive(Clone, Debug)]
-enum PtrMap<T> {
-    Empty,
-    One(TypeId, T),
-    Many(HashMap<TypeId, T>)
-}
-
-impl<V: ?Sized + fmt::Debug + Any + 'static> PtrMapCell<V> {
-    #[inline]
-    pub fn new() -> PtrMapCell<V> {
-        PtrMapCell(UnsafeCell::new(PtrMap::Empty))
-    }
-
-    #[inline]
-    pub fn get(&self, key: TypeId) -> Option<&V> {
-        let map = unsafe { &*self.0.get() };
-        match *map {
-            PtrMap::Empty => None,
-            PtrMap::One(id, ref v) => if id == key {
-                Some(v)
-            } else {
-                None
-            },
-            PtrMap::Many(ref hm) => hm.get(&key)
-        }.map(|val| &**val)
-    }
-
-    #[inline]
-    pub fn get_mut(&mut self, key: TypeId) -> Option<&mut V> {
-        let mut map = unsafe { &mut *self.0.get() };
-        match *map {
-            PtrMap::Empty => None,
-            PtrMap::One(id, ref mut v) => if id == key {
-                Some(v)
-            } else {
-                None
-            },
-            PtrMap::Many(ref mut hm) => hm.get_mut(&key)
-        }.map(|val| &mut **val)
-    }
-
-    #[inline]
-    pub unsafe fn insert(&self, key: TypeId, val: Box<V>) {
-        let mut map = &mut *self.0.get();
-        match *map {
-            PtrMap::Empty => *map = PtrMap::One(key, val),
-            PtrMap::One(..) => {
-                let one = mem::replace(map, PtrMap::Empty);
-                match one {
-                    PtrMap::One(id, one) => {
-                        debug_assert!(id != key);
-                        let mut hm = HashMap::with_capacity(2);
-                        hm.insert(id, one);
-                        hm.insert(key, val);
-                        mem::replace(map, PtrMap::Many(hm));
-                    },
-                    _ => unreachable!()
-                }
-            },
-            PtrMap::Many(ref mut hm) => { hm.insert(key, val); }
-        }
-    }
-
-    #[inline]
-    pub unsafe fn one(&self) -> &V {
-        let map = &*self.0.get();
-        match *map {
-            PtrMap::One(_, ref one) => one,
-            _ => panic!("not PtrMap::One value, {:?}", *map)
-        }
-    }
-}
-
-impl<V: ?Sized + fmt::Debug + Any + 'static> Clone for PtrMapCell<V> where Box<V>: Clone {
-    #[inline]
-    fn clone(&self) -> PtrMapCell<V> {
-        let cell = PtrMapCell::new();
-        unsafe {
-            *cell.0.get() = (&*self.0.get()).clone()
-        }
-        cell
-    }
-}
-
-#[cfg(test)]
-mod test {
-    use std::any::TypeId;
-    use super::*;
-
-    #[test]
-    fn test_opt_cell_set() {
-        let one:OptCell<u32> = OptCell::new(None);
-        one.set(1);
-        assert_eq!(*one,Some(1));
-    }
-
-    #[test]
-    fn test_opt_cell_clone() {
-        let one:OptCell<u32> = OptCell::new(Some(3));
-        let stored = *one.clone();
-        assert_eq!(stored,Some(3));
-    }
-
-
-    #[test]
-    fn test_ptr_map_cell_none() {
-        let type_id = TypeId::of::<u32>();
-        let pm:PtrMapCell<u32> = PtrMapCell::new();
-        assert_eq!(pm.get(type_id),None);
-    }
-
-    #[test]
-    fn test_ptr_map_cell_one() {
-        let type_id = TypeId::of::<String>();
-        let pm:PtrMapCell<String> = PtrMapCell::new();
-        unsafe { pm.insert(type_id, Box::new("a".to_string())); }
-        assert_eq!(pm.get(type_id), Some(&"a".to_string()));
-        assert_eq!(unsafe {pm.one()}, "a");
-    }
-
-    #[test]
-    fn test_ptr_map_cell_two() {
-        let type_id = TypeId::of::<String>();
-        let type_id2 = TypeId::of::<Vec<u8>>();
-        let pm:PtrMapCell<String> = PtrMapCell::new();
-        unsafe { pm.insert(type_id, Box::new("a".to_string())); }
-        unsafe { pm.insert(type_id2, Box::new("b".to_string())); }
-        assert_eq!(pm.get(type_id), Some(&"a".to_string()));
-        assert_eq!(pm.get(type_id2), Some(&"b".to_string()));
-    }
-
-    #[test]
-    fn test_ptr_map_cell_many() {
-        let id1 = TypeId::of::<String>();
-        let id2 = TypeId::of::<Vec<u8>>();
-        let id3 = TypeId::of::<OptCell<String>>();
-        let pm:PtrMapCell<String> = PtrMapCell::new();
-        unsafe { pm.insert(id1, Box::new("a".to_string())); }
-        unsafe { pm.insert(id2, Box::new("b".to_string())); }
-        unsafe { pm.insert(id3, Box::new("c".to_string())); }
-        assert_eq!(pm.get(id1), Some(&"a".to_string()));
-        assert_eq!(pm.get(id2), Some(&"b".to_string()));
-        assert_eq!(pm.get(id3), Some(&"c".to_string()));
-    }
-
-
-    #[test]
-    fn test_ptr_map_cell_clone() {
-        let type_id = TypeId::of::<String>();
-        let pm:PtrMapCell<String> = PtrMapCell::new();
-        unsafe { pm.insert(type_id, Box::new("a".to_string())); }
-        let cloned = pm.clone();
-        assert_eq!(cloned.get(type_id), Some(&"a".to_string()));
-    }
-
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/internals/item.rs
+++ /dev/null
@@ -1,121 +0,0 @@
-use std::any::Any;
-use std::any::TypeId;
-use std::fmt;
-use std::str::from_utf8;
-
-use super::cell::{OptCell, PtrMapCell};
-use header::{Header, HeaderFormat, MultilineFormatter};
-
-
-#[derive(Clone)]
-pub struct Item {
-    raw: OptCell<Vec<Vec<u8>>>,
-    typed: PtrMapCell<HeaderFormat + Send + Sync>
-}
-
-impl Item {
-    #[inline]
-    pub fn new_raw(data: Vec<Vec<u8>>) -> Item {
-        Item {
-            raw: OptCell::new(Some(data)),
-            typed: PtrMapCell::new(),
-        }
-    }
-
-    #[inline]
-    pub fn new_typed(ty: Box<HeaderFormat + Send + Sync>) -> Item {
-        let map = PtrMapCell::new();
-        unsafe { map.insert((*ty).get_type(), ty); }
-        Item {
-            raw: OptCell::new(None),
-            typed: map,
-        }
-    }
-
-    #[inline]
-    pub fn raw_mut(&mut self) -> &mut Vec<Vec<u8>> {
-        self.raw();
-        self.typed = PtrMapCell::new();
-        unsafe {
-            self.raw.get_mut()
-        }
-    }
-
-    pub fn raw(&self) -> &[Vec<u8>] {
-        if let Some(ref raw) = *self.raw {
-            return &raw[..];
-        }
-
-        let raw = vec![unsafe { self.typed.one() }.to_string().into_bytes()];
-        self.raw.set(raw);
-
-        let raw = self.raw.as_ref().unwrap();
-        &raw[..]
-    }
-
-    pub fn typed<H: Header + HeaderFormat + Any>(&self) -> Option<&H> {
-        let tid = TypeId::of::<H>();
-        match self.typed.get(tid) {
-            Some(val) => Some(val),
-            None => {
-                match parse::<H>(self.raw.as_ref().expect("item.raw must exist")) {
-                    Ok(typed) => {
-                        unsafe { self.typed.insert(tid, typed); }
-                        self.typed.get(tid)
-                    },
-                    Err(_) => None
-                }
-            }
-        }.map(|typed| unsafe { typed.downcast_ref_unchecked() })
-    }
-
-    pub fn typed_mut<H: Header + HeaderFormat>(&mut self) -> Option<&mut H> {
-        let tid = TypeId::of::<H>();
-        if self.typed.get_mut(tid).is_none() {
-            match parse::<H>(self.raw.as_ref().expect("item.raw must exist")) {
-                Ok(typed) => {
-                    unsafe { self.typed.insert(tid, typed); }
-                },
-                Err(_) => ()
-            }
-        }
-        if self.raw.is_some() && self.typed.get_mut(tid).is_some() {
-            self.raw = OptCell::new(None);
-        }
-        self.typed.get_mut(tid).map(|typed| unsafe { typed.downcast_mut_unchecked() })
-    }
-
-    pub fn write_h1(&self, f: &mut MultilineFormatter) -> fmt::Result {
-        match *self.raw {
-            Some(ref raw) => {
-                for part in raw.iter() {
-                    match from_utf8(&part[..]) {
-                        Ok(s) => {
-                            try!(f.fmt_line(&s));
-                        },
-                        Err(_) => {
-                            error!("raw header value is not utf8, value={:?}", part);
-                            return Err(fmt::Error);
-                        }
-                    }
-                }
-                Ok(())
-            },
-            None => {
-                let typed = unsafe { self.typed.one() };
-                typed.fmt_multi_header(f)
-            }
-        }
-    }
-}
-
-#[inline]
-fn parse<H: Header + HeaderFormat>(raw: &Vec<Vec<u8>>) ->
-        ::Result<Box<HeaderFormat + Send + Sync>> {
-    Header::parse_header(&raw[..]).map(|h: H| {
-        // FIXME: Use Type ascription
-        let h: Box<HeaderFormat + Send + Sync> = Box::new(h);
-        h
-    })
-}
-
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/internals/mod.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-pub use self::item::Item;
-pub use self::vec_map::{VecMap, Entry};
-
-mod cell;
-mod item;
-mod vec_map;
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/internals/vec_map.rs
+++ /dev/null
@@ -1,89 +0,0 @@
-#[derive(Clone)]
-pub struct VecMap<K, V> {
-    vec: Vec<(K, V)>,
-}
-
-impl<K: PartialEq, V> VecMap<K, V> {
-    pub fn new() -> VecMap<K, V> {
-        VecMap {
-            vec: Vec::new()
-        }
-    }
-
-    pub fn insert(&mut self, key: K, value: V) {
-        match self.find(&key) {
-            Some(pos) => self.vec[pos] = (key, value),
-            None => self.vec.push((key, value))
-        }
-    }
-
-    pub fn entry(&mut self, key: K) -> Entry<K, V> {
-        match self.find(&key) {
-            Some(pos) => Entry::Occupied(OccupiedEntry {
-                vec: self,
-                pos: pos,
-            }),
-            None => Entry::Vacant(VacantEntry {
-                vec: self,
-                key: key,
-            })
-        }
-    }
-
-    pub fn get(&self, key: &K) -> Option<&V> {
-        self.find(key).map(move |pos| &self.vec[pos].1)
-    }
-
-    pub fn get_mut(&mut self, key: &K) -> Option<&mut V> {
-        self.find(key).map(move |pos| &mut self.vec[pos].1)
-    }
-
-    pub fn contains_key(&self, key: &K) -> bool {
-        self.find(key).is_some()
-    }
-
-    pub fn len(&self) -> usize { self.vec.len() }
-    pub fn iter(&self) -> ::std::slice::Iter<(K, V)> {
-        self.vec.iter()
-    }
-    pub fn remove(&mut self, key: &K) -> Option<V> {
-        self.find(key).map(|pos| self.vec.remove(pos)).map(|(_, v)| v)
-    }
-    pub fn clear(&mut self) {
-        self.vec.clear();
-    }
-
-    fn find(&self, key: &K) -> Option<usize> {
-        self.vec.iter().position(|entry| key == &entry.0)
-    }
-}
-
-pub enum Entry<'a, K: 'a, V: 'a> {
-    Vacant(VacantEntry<'a, K, V>),
-    Occupied(OccupiedEntry<'a, K, V>)
-}
-
-pub struct VacantEntry<'a, K: 'a, V: 'a> {
-    vec: &'a mut VecMap<K, V>,
-    key: K,
-}
-
-impl<'a, K, V> VacantEntry<'a, K, V> {
-    pub fn insert(self, val: V) -> &'a mut V {
-        let mut vec = self.vec;
-        vec.vec.push((self.key, val));
-        let pos = vec.vec.len() - 1;
-        &mut vec.vec[pos].1
-    }
-}
-
-pub struct OccupiedEntry<'a, K: 'a, V: 'a> {
-    vec: &'a mut VecMap<K, V>,
-    pos: usize,
-}
-
-impl<'a, K, V> OccupiedEntry<'a, K, V> {
-    pub fn into_mut(self) -> &'a mut V {
-        &mut self.vec.vec[self.pos].1
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/mod.rs
+++ /dev/null
@@ -1,918 +0,0 @@
-//! Headers container, and common header fields.
-//!
-//! hyper has the opinion that Headers should be strongly-typed, because that's
-//! why we're using Rust in the first place. To set or get any header, an object
-//! must implement the `Header` trait from this module. Several common headers
-//! are already provided, such as `Host`, `ContentType`, `UserAgent`, and others.
-//!
-//! # Why Typed?
-//!
-//! Or, why not stringly-typed? Types give the following advantages:
-//!
-//! - More difficult to typo, since typos in types should be caught by the compiler
-//! - Parsing to a proper type by default
-//!
-//! # Defining Custom Headers
-//!
-//! Hyper provides many of the most commonly used headers in HTTP. If
-//! you need to define a custom header, it's easy to do while still taking
-//! advantage of the type system. Hyper includes a `header!` macro for defining
-//! many wrapper-style headers.
-//!
-//! ```
-//! #[macro_use] extern crate hyper;
-//! use hyper::header::Headers;
-//! header! { (XRequestGuid, "X-Request-Guid") => [String] }
-//!
-//! fn main () {
-//!     let mut headers = Headers::new();
-//!
-//!     headers.set(XRequestGuid("a proper guid".to_owned()))
-//! }
-//! ```
-//!
-//! This works well for simple "string" headers. But the header system
-//! actually involves 2 parts: parsing, and formatting. If you need to
-//! customize either part, you can do so.
-//!
-//! ## `Header` and `HeaderFormat`
-//!
-//! Consider a Do Not Track header. It can be true or false, but it represents
-//! that via the numerals `1` and `0`.
-//!
-//! ```
-//! use std::fmt;
-//! use hyper::header::{Header, HeaderFormat};
-//!
-//! #[derive(Debug, Clone, Copy)]
-//! struct Dnt(bool);
-//!
-//! impl Header for Dnt {
-//!     fn header_name() -> &'static str {
-//!         "DNT"
-//!     }
-//!
-//!     fn parse_header(raw: &[Vec<u8>]) -> hyper::Result<Dnt> {
-//!         if raw.len() == 1 {
-//!             let line = &raw[0];
-//!             if line.len() == 1 {
-//!                 let byte = line[0];
-//!                 match byte {
-//!                     b'0' => return Ok(Dnt(true)),
-//!                     b'1' => return Ok(Dnt(false)),
-//!                     _ => ()
-//!                 }
-//!             }
-//!         }
-//!         Err(hyper::Error::Header)
-//!     }
-//! }
-//!
-//! impl HeaderFormat for Dnt {
-//!     fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-//!         if self.0 {
-//!             f.write_str("1")
-//!         } else {
-//!             f.write_str("0")
-//!         }
-//!     }
-//! }
-//! ```
-use std::any::Any;
-use std::borrow::{Cow, ToOwned};
-//use std::collections::HashMap;
-//use std::collections::hash_map::{Iter, Entry};
-use std::iter::{FromIterator, IntoIterator};
-use std::ops::{Deref, DerefMut};
-use std::{mem, fmt};
-
-use {httparse, traitobject};
-use typeable::Typeable;
-use unicase::UniCase;
-
-use self::internals::{Item, VecMap, Entry};
-
-pub use self::shared::*;
-pub use self::common::*;
-
-mod common;
-mod internals;
-mod shared;
-pub mod parsing;
-
-type HeaderName = UniCase<CowStr>;
-
-/// A trait for any object that will represent a header field and value.
-///
-/// This trait represents the construction and identification of headers,
-/// and contains trait-object unsafe methods.
-pub trait Header: Clone + Any + Send + Sync {
-    /// Returns the name of the header field this belongs to.
-    ///
-    /// This will become an associated constant once available.
-    fn header_name() -> &'static str;
-    /// Parse a header from a raw stream of bytes.
-    ///
-    /// It's possible that a request can include a header field more than once,
-    /// and in that case, the slice will have a length greater than 1. However,
-    /// it's not necessarily the case that a Header is *allowed* to have more
-    /// than one field value. If that's the case, you **should** return `None`
-    /// if `raw.len() > 1`.
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Self>;
-
-}
-
-/// A trait for any object that will represent a header field and value.
-///
-/// This trait represents the formatting of a `Header` for output to a TcpStream.
-pub trait HeaderFormat: fmt::Debug + HeaderClone + Any + Typeable + Send + Sync {
-    /// Format a header to be output into a TcpStream.
-    ///
-    /// This method is not allowed to introduce an Err not produced
-    /// by the passed-in Formatter.
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result;
-
-    /// Formats a header over multiple lines.
-    ///
-    /// The main example here is `Set-Cookie`, which requires that every
-    /// cookie being set be specified in a separate line.
-    ///
-    /// The API here is still being explored, so this is hidden by default.
-    /// The passed in formatter doesn't have any public methods, so it would
-    /// be quite difficult to depend on this externally.
-    #[doc(hidden)]
-    #[inline]
-    fn fmt_multi_header(&self, f: &mut MultilineFormatter) -> fmt::Result {
-        f.fmt_line(&FmtHeader(self))
-    }
-}
-
-#[doc(hidden)]
-#[allow(missing_debug_implementations)]
-pub struct MultilineFormatter<'a, 'b: 'a>(Multi<'a, 'b>);
-
-enum Multi<'a, 'b: 'a> {
-    Line(&'a str, &'a mut fmt::Formatter<'b>),
-    Join(bool, &'a mut fmt::Formatter<'b>),
-}
-
-impl<'a, 'b> MultilineFormatter<'a, 'b> {
-    fn fmt_line(&mut self, line: &fmt::Display) -> fmt::Result {
-        use std::fmt::Write;
-        match self.0 {
-            Multi::Line(ref name, ref mut f) => {
-                try!(f.write_str(*name));
-                try!(f.write_str(": "));
-                try!(write!(NewlineReplacer(*f), "{}", line));
-                f.write_str("\r\n")
-            },
-            Multi::Join(ref mut first, ref mut f) => {
-                if !*first {
-                    try!(f.write_str(", "));
-                } else {
-                    *first = false;
-                }
-                write!(NewlineReplacer(*f), "{}", line)
-            }
-        }
-    }
-}
-
-// Internal helper to wrap fmt_header into a fmt::Display
-struct FmtHeader<'a, H: ?Sized + 'a>(&'a H);
-
-impl<'a, H: HeaderFormat + ?Sized + 'a> fmt::Display for FmtHeader<'a, H> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        self.0.fmt_header(f)
-    }
-}
-
-struct ValueString<'a>(&'a Item);
-
-impl<'a> fmt::Display for ValueString<'a> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        self.0.write_h1(&mut MultilineFormatter(Multi::Join(true, f)))
-    }
-}
-
-struct NewlineReplacer<'a, 'b: 'a>(&'a mut fmt::Formatter<'b>);
-
-impl<'a, 'b> fmt::Write for NewlineReplacer<'a, 'b> {
-    fn write_str(&mut self, s: &str) -> fmt::Result {
-        let mut since = 0;
-        for (i, &byte) in s.as_bytes().iter().enumerate() {
-            if byte == b'\r' || byte == b'\n' {
-                try!(self.0.write_str(&s[since..i]));
-                try!(self.0.write_str(" "));
-                since = i + 1;
-            }
-        }
-        if since < s.len() {
-            self.0.write_str(&s[since..])
-        } else {
-            Ok(())
-        }
-    }
-}
-
-#[doc(hidden)]
-pub trait HeaderClone {
-    fn clone_box(&self) -> Box<HeaderFormat + Send + Sync>;
-}
-
-impl<T: HeaderFormat + Clone> HeaderClone for T {
-    #[inline]
-    fn clone_box(&self) -> Box<HeaderFormat + Send + Sync> {
-        Box::new(self.clone())
-    }
-}
-
-impl HeaderFormat + Send + Sync {
-    #[inline]
-    unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T {
-        mem::transmute(traitobject::data(self))
-    }
-
-    #[inline]
-    unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T {
-        mem::transmute(traitobject::data_mut(self))
-    }
-}
-
-impl Clone for Box<HeaderFormat + Send + Sync> {
-    #[inline]
-    fn clone(&self) -> Box<HeaderFormat + Send + Sync> {
-        self.clone_box()
-    }
-}
-
-#[inline]
-fn header_name<T: Header>() -> &'static str {
-    <T as Header>::header_name()
-}
-
-/// A map of header fields on requests and responses.
-#[derive(Clone)]
-pub struct Headers {
-    //data: HashMap<HeaderName, Item>
-    data: VecMap<HeaderName, Item>,
-}
-
-impl Headers {
-
-    /// Creates a new, empty headers map.
-    pub fn new() -> Headers {
-        Headers {
-            data: VecMap::new()
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn from_raw(raw: &[httparse::Header]) -> ::Result<Headers> {
-        let mut headers = Headers::new();
-        for header in raw {
-            trace!("raw header: {:?}={:?}", header.name, &header.value[..]);
-            let name = UniCase(CowStr(Cow::Owned(header.name.to_owned())));
-            let mut item = match headers.data.entry(name) {
-                Entry::Vacant(entry) => entry.insert(Item::new_raw(vec![])),
-                Entry::Occupied(entry) => entry.into_mut()
-            };
-            let trim = header.value.iter().rev().take_while(|&&x| x == b' ').count();
-            let value = &header.value[.. header.value.len() - trim];
-            item.raw_mut().push(value.to_vec());
-        }
-        Ok(headers)
-    }
-
-    /// Set a header field to the corresponding value.
-    ///
-    /// The field is determined by the type of the value being set.
-    pub fn set<H: Header + HeaderFormat>(&mut self, value: H) {
-        trace!("Headers.set( {:?}, {:?} )", header_name::<H>(), value);
-        self.data.insert(UniCase(CowStr(Cow::Borrowed(header_name::<H>()))),
-                         Item::new_typed(Box::new(value)));
-    }
-
-    /// Access the raw value of a header.
-    ///
-    /// Prefer to use the typed getters instead.
-    ///
-    /// Example:
-    ///
-    /// ```
-    /// # use hyper::header::Headers;
-    /// # let mut headers = Headers::new();
-    /// let raw_content_type = headers.get_raw("content-type");
-    /// ```
-    pub fn get_raw(&self, name: &str) -> Option<&[Vec<u8>]> {
-        self.data
-            .get(&UniCase(CowStr(Cow::Borrowed(unsafe { mem::transmute::<&str, &str>(name) }))))
-            .map(Item::raw)
-    }
-
-    /// Set the raw value of a header, bypassing any typed headers.
-    ///
-    /// Note: This will completely replace any current value for this
-    /// header name.
-    ///
-    /// Example:
-    ///
-    /// ```
-    /// # use hyper::header::Headers;
-    /// # let mut headers = Headers::new();
-    /// headers.set_raw("content-length", vec![b"5".to_vec()]);
-    /// ```
-    pub fn set_raw<K: Into<Cow<'static, str>>>(&mut self, name: K,
-            value: Vec<Vec<u8>>) {
-        let name = name.into();
-        trace!("Headers.set_raw( {:?}, {:?} )", name, value);
-        self.data.insert(UniCase(CowStr(name)), Item::new_raw(value));
-    }
-
-    /// Append a value to raw value of this header.
-    ///
-    /// If a header already contains a value, this will add another line to it.
-    ///
-    /// If a header doesnot exist for this name, a new one will be created with
-    /// the value.
-    ///
-    /// Example:
-    ///
-    /// ```
-    /// # use hyper::header::Headers;
-    /// # let mut headers = Headers::new();
-    /// headers.append_raw("x-foo", b"bar".to_vec());
-    /// headers.append_raw("x-foo", b"quux".to_vec());
-    /// ```
-    pub fn append_raw<K: Into<Cow<'static, str>>>(&mut self, name: K, value: Vec<u8>) {
-        let name = name.into();
-        trace!("Headers.append_raw( {:?}, {:?} )", name, value);
-        let name = UniCase(CowStr(name));
-        if let Some(item) = self.data.get_mut(&name) {
-            item.raw_mut().push(value);
-            return;
-        }
-        self.data.insert(name, Item::new_raw(vec![value]));
-    }
-
-    /// Remove a header set by set_raw
-    pub fn remove_raw(&mut self, name: &str) {
-        trace!("Headers.remove_raw( {:?} )", name);
-        self.data.remove(
-            &UniCase(CowStr(Cow::Borrowed(unsafe { mem::transmute::<&str, &str>(name) })))
-        );
-    }
-
-    /// Get a reference to the header field's value, if it exists.
-    pub fn get<H: Header + HeaderFormat>(&self) -> Option<&H> {
-        self.data.get(&UniCase(CowStr(Cow::Borrowed(header_name::<H>()))))
-        .and_then(Item::typed::<H>)
-    }
-
-    /// Get a mutable reference to the header field's value, if it exists.
-    pub fn get_mut<H: Header + HeaderFormat>(&mut self) -> Option<&mut H> {
-        self.data.get_mut(&UniCase(CowStr(Cow::Borrowed(header_name::<H>()))))
-        .and_then(Item::typed_mut::<H>)
-    }
-
-    /// Returns a boolean of whether a certain header is in the map.
-    ///
-    /// Example:
-    ///
-    /// ```
-    /// # use hyper::header::Headers;
-    /// # use hyper::header::ContentType;
-    /// # let mut headers = Headers::new();
-    /// let has_type = headers.has::<ContentType>();
-    /// ```
-    pub fn has<H: Header + HeaderFormat>(&self) -> bool {
-        self.data.contains_key(&UniCase(CowStr(Cow::Borrowed(header_name::<H>()))))
-    }
-
-    /// Removes a header from the map, if one existed.
-    /// Returns true if a header has been removed.
-    pub fn remove<H: Header + HeaderFormat>(&mut self) -> bool {
-        trace!("Headers.remove( {:?} )", header_name::<H>());
-        self.data.remove(&UniCase(CowStr(Cow::Borrowed(header_name::<H>())))).is_some()
-    }
-
-    /// Returns an iterator over the header fields.
-    pub fn iter(&self) -> HeadersItems {
-        HeadersItems {
-            inner: self.data.iter()
-        }
-    }
-
-    /// Returns the number of headers in the map.
-    pub fn len(&self) -> usize {
-        self.data.len()
-    }
-
-    /// Remove all headers from the map.
-    pub fn clear(&mut self) {
-        self.data.clear()
-    }
-}
-
-impl PartialEq for Headers {
-    fn eq(&self, other: &Headers) -> bool {
-        if self.len() != other.len() {
-            return false;
-        }
-
-        for header in self.iter() {
-            match other.get_raw(header.name()) {
-                Some(val) if val == self.get_raw(header.name()).unwrap() => {},
-                _ => { return false; }
-            }
-        }
-        true
-    }
-}
-
-impl fmt::Display for Headers {
-   fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        for header in self.iter() {
-            try!(fmt::Display::fmt(&header, f));
-        }
-        Ok(())
-    }
-}
-
-impl fmt::Debug for Headers {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(f.write_str("Headers { "));
-        for header in self.iter() {
-            try!(write!(f, "{:?}, ", header));
-        }
-        try!(f.write_str("}"));
-        Ok(())
-    }
-}
-
-/// An `Iterator` over the fields in a `Headers` map.
-pub struct HeadersItems<'a> {
-    inner: ::std::slice::Iter<'a, (HeaderName, Item)>
-}
-
-impl<'a> Iterator for HeadersItems<'a> {
-    type Item = HeaderView<'a>;
-
-    fn next(&mut self) -> Option<HeaderView<'a>> {
-        self.inner.next().map(|&(ref k, ref v)| HeaderView(k, v))
-    }
-}
-
-/// Returned with the `HeadersItems` iterator.
-pub struct HeaderView<'a>(&'a HeaderName, &'a Item);
-
-impl<'a> HeaderView<'a> {
-    /// Check if a HeaderView is a certain Header.
-    #[inline]
-    pub fn is<H: Header>(&self) -> bool {
-        UniCase(CowStr(Cow::Borrowed(header_name::<H>()))) == *self.0
-    }
-
-    /// Get the Header name as a slice.
-    #[inline]
-    pub fn name(&self) -> &'a str {
-        self.0.as_ref()
-    }
-
-    /// Cast the value to a certain Header type.
-    #[inline]
-    pub fn value<H: Header + HeaderFormat>(&self) -> Option<&'a H> {
-        self.1.typed::<H>()
-    }
-
-    /// Get just the header value as a String.
-    ///
-    /// This will join multiple values of this header with a `, `.
-    ///
-    /// **Warning:** This may not be the format that should be used to send
-    /// a Request or Response.
-    #[inline]
-    pub fn value_string(&self) -> String {
-        ValueString(self.1).to_string()
-    }
-}
-
-impl<'a> fmt::Display for HeaderView<'a> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        self.1.write_h1(&mut MultilineFormatter(Multi::Line(&self.0, f)))
-    }
-}
-
-impl<'a> fmt::Debug for HeaderView<'a> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl<'a> Extend<HeaderView<'a>> for Headers {
-    fn extend<I: IntoIterator<Item=HeaderView<'a>>>(&mut self, iter: I) {
-        for header in iter {
-            self.data.insert((*header.0).clone(), (*header.1).clone());
-        }
-    }
-}
-
-impl<'a> FromIterator<HeaderView<'a>> for Headers {
-    fn from_iter<I: IntoIterator<Item=HeaderView<'a>>>(iter: I) -> Headers {
-        let mut headers = Headers::new();
-        headers.extend(iter);
-        headers
-    }
-}
-
-deprecated! {
-    #[deprecated(note="The semantics of formatting a HeaderFormat directly are not clear")]
-    impl<'a> fmt::Display for &'a (HeaderFormat + Send + Sync) {
-        #[inline]
-        fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-            let mut multi = MultilineFormatter(Multi::Join(true, f));
-            self.fmt_multi_header(&mut multi)
-        }
-    }
-}
-
-/// A wrapper around any Header with a Display impl that calls fmt_header.
-///
-/// This can be used like so: `format!("{}", HeaderFormatter(&header))` to
-/// get the 'value string' representation of this Header.
-///
-/// Note: This may not necessarily be the value written to stream, such
-/// as with the SetCookie header.
-deprecated! {
-    #[deprecated(note="The semantics of formatting a HeaderFormat directly are not clear")]
-    pub struct HeaderFormatter<'a, H: HeaderFormat>(pub &'a H);
-}
-
-#[allow(deprecated)]
-impl<'a, H: HeaderFormat> fmt::Display for HeaderFormatter<'a, H> {
-    #[inline]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let mut multi = MultilineFormatter(Multi::Join(true, f));
-        self.0.fmt_multi_header(&mut multi)
-    }
-}
-
-#[allow(deprecated)]
-impl<'a, H: HeaderFormat> fmt::Debug for HeaderFormatter<'a, H> {
-    #[inline]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-#[derive(Clone, Hash, Eq, PartialEq, PartialOrd, Ord)]
-struct CowStr(Cow<'static, str>);
-
-impl Deref for CowStr {
-    type Target = Cow<'static, str>;
-
-    fn deref(&self) -> &Cow<'static, str> {
-        &self.0
-    }
-}
-
-impl fmt::Debug for CowStr {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Debug::fmt(&self.0, f)
-    }
-}
-
-impl fmt::Display for CowStr {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self.0, f)
-    }
-}
-
-impl DerefMut for CowStr {
-    fn deref_mut(&mut self) -> &mut Cow<'static, str> {
-        &mut self.0
-    }
-}
-
-impl AsRef<str> for CowStr {
-    fn as_ref(&self) -> &str {
-        self
-    }
-}
-
-
-#[cfg(test)]
-mod tests {
-    use std::fmt;
-    use mime::Mime;
-    use mime::TopLevel::Text;
-    use mime::SubLevel::Plain;
-    use super::{Headers, Header, HeaderFormat, ContentLength, ContentType,
-                Accept, Host, qitem};
-    use httparse;
-
-    #[cfg(feature = "nightly")]
-    use test::Bencher;
-
-    // Slice.position_elem was unstable
-    fn index_of(slice: &[u8], byte: u8) -> Option<usize> {
-        for (index, &b) in slice.iter().enumerate() {
-            if b == byte {
-                return Some(index);
-            }
-        }
-        None
-    }
-
-    macro_rules! raw {
-        ($($line:expr),*) => ({
-            [$({
-                let line = $line;
-                let pos = index_of(line, b':').expect("raw splits on ':', not found");
-                httparse::Header {
-                    name: ::std::str::from_utf8(&line[..pos]).unwrap(),
-                    value: &line[pos + 2..]
-                }
-            }),*]
-        })
-    }
-
-    #[test]
-    fn test_from_raw() {
-        let headers = Headers::from_raw(&raw!(b"Content-Length: 10")).unwrap();
-        assert_eq!(headers.get(), Some(&ContentLength(10)));
-    }
-
-    #[test]
-    fn test_content_type() {
-        let content_type = Header::parse_header([b"text/plain".to_vec()].as_ref());
-        assert_eq!(content_type.ok(), Some(ContentType(Mime(Text, Plain, vec![]))));
-    }
-
-    #[test]
-    fn test_accept() {
-        let text_plain = qitem(Mime(Text, Plain, vec![]));
-        let application_vendor = "application/vnd.github.v3.full+json; q=0.5".parse().unwrap();
-
-        let accept = Header::parse_header([b"text/plain".to_vec()].as_ref());
-        assert_eq!(accept.ok(), Some(Accept(vec![text_plain.clone()])));
-
-        let bytevec = [b"application/vnd.github.v3.full+json; q=0.5, text/plain".to_vec()];
-        let accept = Header::parse_header(bytevec.as_ref());
-        assert_eq!(accept.ok(), Some(Accept(vec![application_vendor, text_plain])));
-    }
-
-    #[derive(Clone, PartialEq, Debug)]
-    struct CrazyLength(Option<bool>, usize);
-
-    impl Header for CrazyLength {
-        fn header_name() -> &'static str {
-            "content-length"
-        }
-        fn parse_header(raw: &[Vec<u8>]) -> ::Result<CrazyLength> {
-            use std::str::from_utf8;
-            use std::str::FromStr;
-
-            if raw.len() != 1 {
-                return Err(::Error::Header);
-            }
-            // we JUST checked that raw.len() == 1, so raw[0] WILL exist.
-            match match from_utf8(unsafe { &raw.get_unchecked(0)[..] }) {
-                Ok(s) => FromStr::from_str(s).ok(),
-                Err(_) => None
-            }.map(|u| CrazyLength(Some(false), u)) {
-                Some(x) => Ok(x),
-                None => Err(::Error::Header),
-            }
-        }
-    }
-
-    impl HeaderFormat for CrazyLength {
-        fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-            let CrazyLength(ref opt, ref value) = *self;
-            write!(f, "{:?}, {:?}", opt, value)
-        }
-    }
-
-    #[test]
-    fn test_different_structs_for_same_header() {
-        let headers = Headers::from_raw(&raw!(b"Content-Length: 10")).unwrap();
-        assert_eq!(headers.get::<ContentLength>(), Some(&ContentLength(10)));
-        assert_eq!(headers.get::<CrazyLength>(), Some(&CrazyLength(Some(false), 10)));
-    }
-
-    #[test]
-    fn test_trailing_whitespace() {
-        let headers = Headers::from_raw(&raw!(b"Content-Length: 10   ")).unwrap();
-        assert_eq!(headers.get::<ContentLength>(), Some(&ContentLength(10)));
-    }
-
-    #[test]
-    fn test_multiple_reads() {
-        let headers = Headers::from_raw(&raw!(b"Content-Length: 10")).unwrap();
-        let ContentLength(one) = *headers.get::<ContentLength>().unwrap();
-        let ContentLength(two) = *headers.get::<ContentLength>().unwrap();
-        assert_eq!(one, two);
-    }
-
-    #[test]
-    fn test_different_reads() {
-        let headers = Headers::from_raw(
-            &raw!(b"Content-Length: 10", b"Content-Type: text/plain")).unwrap();
-        let ContentLength(_) = *headers.get::<ContentLength>().unwrap();
-        let ContentType(_) = *headers.get::<ContentType>().unwrap();
-    }
-
-    #[test]
-    fn test_get_mutable() {
-        let mut headers = Headers::from_raw(&raw!(b"Content-Length: 10")).unwrap();
-        *headers.get_mut::<ContentLength>().unwrap() = ContentLength(20);
-        assert_eq!(headers.get_raw("content-length").unwrap(), &[b"20".to_vec()][..]);
-        assert_eq!(*headers.get::<ContentLength>().unwrap(), ContentLength(20));
-    }
-
-    #[test]
-    fn test_headers_fmt() {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(15));
-        headers.set(Host { hostname: "foo.bar".to_owned(), port: None });
-
-        let s = headers.to_string();
-        assert!(s.contains("Host: foo.bar\r\n"));
-        assert!(s.contains("Content-Length: 15\r\n"));
-    }
-
-    #[test]
-    fn test_headers_fmt_raw() {
-        let mut headers = Headers::from_raw(&raw!(b"Content-Length: 10")).unwrap();
-        headers.set_raw("x-foo", vec![b"foo".to_vec(), b"bar".to_vec()]);
-        let s = headers.to_string();
-        assert_eq!(s, "Content-Length: 10\r\nx-foo: foo\r\nx-foo: bar\r\n");
-    }
-
-    #[test]
-    fn test_set_raw() {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(10));
-        headers.set_raw("content-LENGTH", vec![b"20".to_vec()]);
-        assert_eq!(headers.get_raw("Content-length").unwrap(), &[b"20".to_vec()][..]);
-        assert_eq!(headers.get(), Some(&ContentLength(20)));
-    }
-
-    #[test]
-    fn test_append_raw() {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(10));
-        headers.append_raw("content-LENGTH", b"20".to_vec());
-        assert_eq!(headers.get_raw("Content-length").unwrap(), &[b"10".to_vec(), b"20".to_vec()][..]);
-        headers.append_raw("x-foo", b"bar".to_vec());
-        assert_eq!(headers.get_raw("x-foo"), Some(&[b"bar".to_vec()][..]));
-    }
-
-    #[test]
-    fn test_remove_raw() {
-        let mut headers = Headers::new();
-        headers.set_raw("content-LENGTH", vec![b"20".to_vec()]);
-        headers.remove_raw("content-LENGTH");
-        assert_eq!(headers.get_raw("Content-length"), None);
-    }
-
-    #[test]
-    fn test_len() {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(10));
-        assert_eq!(headers.len(), 1);
-        headers.set(ContentType(Mime(Text, Plain, vec![])));
-        assert_eq!(headers.len(), 2);
-        // Redundant, should not increase count.
-        headers.set(ContentLength(20));
-        assert_eq!(headers.len(), 2);
-    }
-
-    #[test]
-    fn test_clear() {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(10));
-        headers.set(ContentType(Mime(Text, Plain, vec![])));
-        assert_eq!(headers.len(), 2);
-        headers.clear();
-        assert_eq!(headers.len(), 0);
-    }
-
-    #[test]
-    fn test_iter() {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(11));
-        for header in headers.iter() {
-            assert!(header.is::<ContentLength>());
-            assert_eq!(header.name(), <ContentLength as Header>::header_name());
-            assert_eq!(header.value(), Some(&ContentLength(11)));
-            assert_eq!(header.value_string(), "11".to_owned());
-        }
-    }
-
-    #[test]
-    fn test_header_view_value_string() {
-        let mut headers = Headers::new();
-        headers.set_raw("foo", vec![b"one".to_vec(), b"two".to_vec()]);
-        for header in headers.iter() {
-            assert_eq!(header.name(), "foo");
-            assert_eq!(header.value_string(), "one, two");
-        }
-    }
-
-    #[test]
-    fn test_eq() {
-        let mut headers1 = Headers::new();
-        let mut headers2 = Headers::new();
-
-        assert_eq!(headers1, headers2);
-
-        headers1.set(ContentLength(11));
-        headers2.set(Host {hostname: "foo.bar".to_owned(), port: None});
-        assert!(headers1 != headers2);
-
-        headers1 = Headers::new();
-        headers2 = Headers::new();
-
-        headers1.set(ContentLength(11));
-        headers2.set(ContentLength(11));
-        assert_eq!(headers1, headers2);
-
-        headers1.set(ContentLength(10));
-        assert!(headers1 != headers2);
-
-        headers1 = Headers::new();
-        headers2 = Headers::new();
-
-        headers1.set(Host { hostname: "foo.bar".to_owned(), port: None });
-        headers1.set(ContentLength(11));
-        headers2.set(ContentLength(11));
-        assert!(headers1 != headers2);
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_new(b: &mut Bencher) {
-        b.iter(|| {
-            let mut h = Headers::new();
-            h.set(ContentLength(11));
-            h
-        })
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_from_raw(b: &mut Bencher) {
-        let raw = raw!(b"Content-Length: 10");
-        b.iter(|| Headers::from_raw(&raw).unwrap())
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_get(b: &mut Bencher) {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(11));
-        b.iter(|| assert_eq!(headers.get::<ContentLength>(), Some(&ContentLength(11))))
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_get_miss(b: &mut Bencher) {
-        let headers = Headers::new();
-        b.iter(|| assert!(headers.get::<ContentLength>().is_none()))
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_set(b: &mut Bencher) {
-        let mut headers = Headers::new();
-        b.iter(|| headers.set(ContentLength(12)))
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_has(b: &mut Bencher) {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(11));
-        b.iter(|| assert!(headers.has::<ContentLength>()))
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_view_is(b: &mut Bencher) {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(11));
-        let mut iter = headers.iter();
-        let view = iter.next().unwrap();
-        b.iter(|| assert!(view.is::<ContentLength>()))
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_fmt(b: &mut Bencher) {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(11));
-        b.iter(|| headers.to_string())
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/parsing.rs
+++ /dev/null
@@ -1,224 +0,0 @@
-//! Utility functions for Header implementations.
-
-use language_tags::LanguageTag;
-use std::str;
-use std::str::FromStr;
-use std::fmt::{self, Display};
-use url::percent_encoding;
-
-use header::shared::Charset;
-
-/// Reads a single raw string when parsing a header.
-pub fn from_one_raw_str<T: str::FromStr>(raw: &[Vec<u8>]) -> ::Result<T> {
-    if raw.len() != 1 || unsafe { raw.get_unchecked(0) } == b"" { return Err(::Error::Header) }
-    // we JUST checked that raw.len() == 1, so raw[0] WILL exist.
-    from_raw_str(& unsafe { raw.get_unchecked(0) })
-}
-
-/// Reads a raw string into a value.
-pub fn from_raw_str<T: str::FromStr>(raw: &[u8]) -> ::Result<T> {
-    let s = try!(str::from_utf8(raw));
-    T::from_str(s).or(Err(::Error::Header))
-}
-
-/// Reads a comma-delimited raw header into a Vec.
-#[inline]
-pub fn from_comma_delimited<T: str::FromStr, S: AsRef<[u8]>>(raw: &[S]) -> ::Result<Vec<T>> {
-    let mut result = Vec::new();
-    for s in raw {
-        let s = try!(str::from_utf8(s.as_ref()));
-        result.extend(s.split(',')
-                      .filter_map(|x| match x.trim() {
-                          "" => None,
-                          y => Some(y)
-                      })
-                      .filter_map(|x| x.parse().ok()))
-    }
-    Ok(result)
-}
-
-/// Format an array into a comma-delimited string.
-pub fn fmt_comma_delimited<T: Display>(f: &mut fmt::Formatter, parts: &[T]) -> fmt::Result {
-    for (i, part) in parts.iter().enumerate() {
-        if i != 0 {
-            try!(f.write_str(", "));
-        }
-        try!(Display::fmt(part, f));
-    }
-    Ok(())
-}
-
-/// An extended header parameter value (i.e., tagged with a character set and optionally,
-/// a language), as defined in [RFC 5987](https://tools.ietf.org/html/rfc5987#section-3.2).
-#[derive(Clone, Debug, PartialEq)]
-pub struct ExtendedValue {
-    /// The character set that is used to encode the `value` to a string.
-    pub charset: Charset,
-    /// The human language details of the `value`, if available.
-    pub language_tag: Option<LanguageTag>,
-    /// The parameter value, as expressed in octets.
-    pub value: Vec<u8>,
-}
-
-/// Parses extended header parameter values (`ext-value`), as defined in
-/// [RFC 5987](https://tools.ietf.org/html/rfc5987#section-3.2).
-///
-/// Extended values are denoted by parameter names that end with `*`.
-///
-/// ## ABNF
-/// ```plain
-/// ext-value     = charset  "'" [ language ] "'" value-chars
-///               ; like RFC 2231's <extended-initial-value>
-///               ; (see [RFC2231], Section 7)
-///
-/// charset       = "UTF-8" / "ISO-8859-1" / mime-charset
-///
-/// mime-charset  = 1*mime-charsetc
-/// mime-charsetc = ALPHA / DIGIT
-///               / "!" / "#" / "$" / "%" / "&"
-///               / "+" / "-" / "^" / "_" / "`"
-///               / "{" / "}" / "~"
-///               ; as <mime-charset> in Section 2.3 of [RFC2978]
-///               ; except that the single quote is not included
-///               ; SHOULD be registered in the IANA charset registry
-///
-/// language      = <Language-Tag, defined in [RFC5646], Section 2.1>
-///
-/// value-chars   = *( pct-encoded / attr-char )
-///
-/// pct-encoded   = "%" HEXDIG HEXDIG
-///               ; see [RFC3986], Section 2.1
-///
-/// attr-char     = ALPHA / DIGIT
-///               / "!" / "#" / "$" / "&" / "+" / "-" / "."
-///               / "^" / "_" / "`" / "|" / "~"
-///               ; token except ( "*" / "'" / "%" )
-/// ```
-pub fn parse_extended_value(val: &str) -> ::Result<ExtendedValue> {
-
-    // Break into three pieces separated by the single-quote character
-    let mut parts = val.splitn(3,'\'');
-
-    // Interpret the first piece as a Charset
-    let charset: Charset = match parts.next() {
-        None => return Err(::Error::Header),
-        Some(n) => try!(FromStr::from_str(n)),
-    };
-
-    // Interpret the second piece as a language tag
-    let lang: Option<LanguageTag> = match parts.next() {
-        None => return Err(::Error::Header),
-        Some("") => None,
-        Some(s) => match s.parse() {
-            Ok(lt) => Some(lt),
-            Err(_) => return Err(::Error::Header),
-        }
-    };
-
-    // Interpret the third piece as a sequence of value characters
-    let value: Vec<u8> = match parts.next() {
-        None => return Err(::Error::Header),
-        Some(v) => percent_encoding::percent_decode(v.as_bytes()).collect(),
-    };
-
-    Ok(ExtendedValue {
-        charset: charset,
-        language_tag: lang,
-        value: value,
-    })
-}
-
-define_encode_set! {
-    /// This encode set is used for HTTP header values and is defined at
-    /// https://tools.ietf.org/html/rfc5987#section-3.2
-    pub HTTP_VALUE = [percent_encoding::SIMPLE_ENCODE_SET] | {
-        ' ', '"', '%', '\'', '(', ')', '*', ',', '/', ':', ';', '<', '-', '>', '?',
-        '[', '\\', ']', '{', '}'
-    }
-}
-
-impl Display for ExtendedValue {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let encoded_value =
-            percent_encoding::percent_encode(&self.value[..], HTTP_VALUE);
-        if let Some(ref lang) = self.language_tag {
-            write!(f, "{}'{}'{}", self.charset, lang, encoded_value)
-        } else {
-            write!(f, "{}''{}", self.charset, encoded_value)
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use header::shared::Charset;
-    use super::{ExtendedValue, parse_extended_value};
-
-    #[test]
-    fn test_parse_extended_value_with_encoding_and_language_tag() {
-        let expected_language_tag = langtag!(en);
-        // RFC 5987, Section 3.2.2
-        // Extended notation, using the Unicode character U+00A3 (POUND SIGN)
-        let result = parse_extended_value("iso-8859-1'en'%A3%20rates");
-        assert!(result.is_ok());
-        let extended_value = result.unwrap();
-        assert_eq!(Charset::Iso_8859_1, extended_value.charset);
-        assert!(extended_value.language_tag.is_some());
-        assert_eq!(expected_language_tag, extended_value.language_tag.unwrap());
-        assert_eq!(vec![163, b' ', b'r', b'a', b't', b'e', b's'], extended_value.value);
-    }
-
-    #[test]
-    fn test_parse_extended_value_with_encoding() {
-        // RFC 5987, Section 3.2.2
-        // Extended notation, using the Unicode characters U+00A3 (POUND SIGN)
-        // and U+20AC (EURO SIGN)
-        let result = parse_extended_value("UTF-8''%c2%a3%20and%20%e2%82%ac%20rates");
-        assert!(result.is_ok());
-        let extended_value = result.unwrap();
-        assert_eq!(Charset::Ext("UTF-8".to_string()), extended_value.charset);
-        assert!(extended_value.language_tag.is_none());
-        assert_eq!(vec![194, 163, b' ', b'a', b'n', b'd', b' ', 226, 130, 172, b' ', b'r', b'a', b't', b'e', b's'], extended_value.value);
-    }
-
-    #[test]
-    fn test_parse_extended_value_missing_language_tag_and_encoding() {
-        // From: https://greenbytes.de/tech/tc2231/#attwithfn2231quot2
-        let result = parse_extended_value("foo%20bar.html");
-        assert!(result.is_err());
-    }
-
-    #[test]
-    fn test_parse_extended_value_partially_formatted() {
-        let result = parse_extended_value("UTF-8'missing third part");
-        assert!(result.is_err());
-    }
-
-    #[test]
-    fn test_parse_extended_value_partially_formatted_blank() {
-        let result = parse_extended_value("blank second part'");
-        assert!(result.is_err());
-    }
-
-    #[test]
-    fn test_fmt_extended_value_with_encoding_and_language_tag() {
-        let extended_value = ExtendedValue {
-            charset: Charset::Iso_8859_1,
-            language_tag: Some("en".parse().expect("Could not parse language tag")),
-            value: vec![163, b' ', b'r', b'a', b't', b'e', b's'],
-        };
-        assert_eq!("ISO-8859-1'en'%A3%20rates", format!("{}", extended_value));
-    }
-
-    #[test]
-    fn test_fmt_extended_value_with_encoding() {
-        let extended_value = ExtendedValue {
-            charset: Charset::Ext("UTF-8".to_string()),
-            language_tag: None,
-            value: vec![194, 163, b' ', b'a', b'n', b'd', b' ', 226, 130, 172, b' ', b'r', b'a',
-                        b't', b'e', b's'],
-        };
-        assert_eq!("UTF-8''%C2%A3%20and%20%E2%82%AC%20rates",
-                   format!("{}", extended_value));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/shared/charset.rs
+++ /dev/null
@@ -1,151 +0,0 @@
-use std::fmt::{self, Display};
-use std::str::FromStr;
-use std::ascii::AsciiExt;
-
-use self::Charset::*;
-
-/// A Mime charset.
-///
-/// The string representation is normalised to upper case.
-///
-/// See http://www.iana.org/assignments/character-sets/character-sets.xhtml
-#[derive(Clone,Debug,PartialEq)]
-#[allow(non_camel_case_types)]
-pub enum Charset{
-    /// US ASCII
-    Us_Ascii,
-    /// ISO-8859-1
-    Iso_8859_1,
-    /// ISO-8859-2
-    Iso_8859_2,
-    /// ISO-8859-3
-    Iso_8859_3,
-    /// ISO-8859-4
-    Iso_8859_4,
-    /// ISO-8859-5
-    Iso_8859_5,
-    /// ISO-8859-6
-    Iso_8859_6,
-    /// ISO-8859-7
-    Iso_8859_7,
-    /// ISO-8859-8
-    Iso_8859_8,
-    /// ISO-8859-9
-    Iso_8859_9,
-    /// ISO-8859-10
-    Iso_8859_10,
-    /// Shift_JIS
-    Shift_Jis,
-    /// EUC-JP
-    Euc_Jp,
-    /// ISO-2022-KR
-    Iso_2022_Kr,
-    /// EUC-KR
-    Euc_Kr,
-    /// ISO-2022-JP
-    Iso_2022_Jp,
-    /// ISO-2022-JP-2
-    Iso_2022_Jp_2,
-    /// ISO-8859-6-E
-    Iso_8859_6_E,
-    /// ISO-8859-6-I
-    Iso_8859_6_I,
-    /// ISO-8859-8-E
-    Iso_8859_8_E,
-    /// ISO-8859-8-I
-    Iso_8859_8_I,
-    /// GB2312
-    Gb2312,
-    /// Big5
-    Big5,
-    /// KOI8-R
-    Koi8_R,
-    /// An arbitrary charset specified as a string
-    Ext(String)
-}
-
-impl Charset {
-    fn name(&self) -> &str {
-        match *self {
-            Us_Ascii => "US-ASCII",
-            Iso_8859_1 => "ISO-8859-1",
-            Iso_8859_2 => "ISO-8859-2",
-            Iso_8859_3 => "ISO-8859-3",
-            Iso_8859_4 => "ISO-8859-4",
-            Iso_8859_5 => "ISO-8859-5",
-            Iso_8859_6 => "ISO-8859-6",
-            Iso_8859_7 => "ISO-8859-7",
-            Iso_8859_8 => "ISO-8859-8",
-            Iso_8859_9 => "ISO-8859-9",
-            Iso_8859_10 => "ISO-8859-10",
-            Shift_Jis => "Shift-JIS",
-            Euc_Jp => "EUC-JP",
-            Iso_2022_Kr => "ISO-2022-KR",
-            Euc_Kr => "EUC-KR",
-            Iso_2022_Jp => "ISO-2022-JP",
-            Iso_2022_Jp_2 => "ISO-2022-JP-2",
-            Iso_8859_6_E => "ISO-8859-6-E",
-            Iso_8859_6_I => "ISO-8859-6-I",
-            Iso_8859_8_E => "ISO-8859-8-E",
-            Iso_8859_8_I => "ISO-8859-8-I",
-            Gb2312 => "GB2312",
-            Big5 => "5",
-            Koi8_R => "KOI8-R",
-            Ext(ref s) => &s
-        }
-    }
-}
-
-impl Display for Charset {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(self.name())
-    }
-}
-
-impl FromStr for Charset {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<Charset> {
-        Ok(match s.to_ascii_uppercase().as_ref() {
-            "US-ASCII" => Us_Ascii,
-            "ISO-8859-1" => Iso_8859_1,
-            "ISO-8859-2" => Iso_8859_2,
-            "ISO-8859-3" => Iso_8859_3,
-            "ISO-8859-4" => Iso_8859_4,
-            "ISO-8859-5" => Iso_8859_5,
-            "ISO-8859-6" => Iso_8859_6,
-            "ISO-8859-7" => Iso_8859_7,
-            "ISO-8859-8" => Iso_8859_8,
-            "ISO-8859-9" => Iso_8859_9,
-            "ISO-8859-10" => Iso_8859_10,
-            "SHIFT-JIS" => Shift_Jis,
-            "EUC-JP" => Euc_Jp,
-            "ISO-2022-KR" => Iso_2022_Kr,
-            "EUC-KR" => Euc_Kr,
-            "ISO-2022-JP" => Iso_2022_Jp,
-            "ISO-2022-JP-2" => Iso_2022_Jp_2,
-            "ISO-8859-6-E" => Iso_8859_6_E,
-            "ISO-8859-6-I" => Iso_8859_6_I,
-            "ISO-8859-8-E" => Iso_8859_8_E,
-            "ISO-8859-8-I" => Iso_8859_8_I,
-            "GB2312" => Gb2312,
-            "5" => Big5,
-            "KOI8-R" => Koi8_R,
-            s => Ext(s.to_owned())
-        })
-    }
-}
-
-#[test]
-fn test_parse() {
-    assert_eq!(Us_Ascii,"us-ascii".parse().unwrap());
-    assert_eq!(Us_Ascii,"US-Ascii".parse().unwrap());
-    assert_eq!(Us_Ascii,"US-ASCII".parse().unwrap());
-    assert_eq!(Shift_Jis,"Shift-JIS".parse().unwrap());
-    assert_eq!(Ext("ABCD".to_owned()),"abcd".parse().unwrap());
-}
-
-#[test]
-fn test_display() {
-    assert_eq!("US-ASCII", format!("{}", Us_Ascii));
-    assert_eq!("ABCD", format!("{}", Ext("ABCD".to_owned())));
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/shared/encoding.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-use std::fmt;
-use std::str;
-
-pub use self::Encoding::{Chunked, Gzip, Deflate, Compress, Identity, EncodingExt};
-
-/// A value to represent an encoding used in `Transfer-Encoding`
-/// or `Accept-Encoding` header.
-#[derive(Clone, PartialEq, Debug)]
-pub enum Encoding {
-    /// The `chunked` encoding.
-    Chunked,
-    /// The `gzip` encoding.
-    Gzip,
-    /// The `deflate` encoding.
-    Deflate,
-    /// The `compress` encoding.
-    Compress,
-    /// The `identity` encoding.
-    Identity,
-    /// Some other encoding that is less common, can be any String.
-    EncodingExt(String)
-}
-
-impl fmt::Display for Encoding {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(match *self {
-            Chunked => "chunked",
-            Gzip => "gzip",
-            Deflate => "deflate",
-            Compress => "compress",
-            Identity => "identity",
-            EncodingExt(ref s) => s.as_ref()
-        })
-    }
-}
-
-impl str::FromStr for Encoding {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<Encoding> {
-        match s {
-            "chunked" => Ok(Chunked),
-            "deflate" => Ok(Deflate),
-            "gzip" => Ok(Gzip),
-            "compress" => Ok(Compress),
-            "identity" => Ok(Identity),
-            _ => Ok(EncodingExt(s.to_owned()))
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/shared/entity.rs
+++ /dev/null
@@ -1,215 +0,0 @@
-use std::str::FromStr;
-use std::fmt::{self, Display};
-
-// check that each char in the slice is either:
-// 1. %x21, or
-// 2. in the range %x23 to %x7E, or
-// 3. in the range %x80 to %xFF
-fn check_slice_validity(slice: &str) -> bool {
-    slice.bytes().all(|c|
-        c == b'\x21' || (c >= b'\x23' && c <= b'\x7e') | (c >= b'\x80' && c <= b'\xff'))
-}
-
-/// An entity tag, defined in [RFC7232](https://tools.ietf.org/html/rfc7232#section-2.3)
-///
-/// An entity tag consists of a string enclosed by two literal double quotes.
-/// Preceding the first double quote is an optional weakness indicator,
-/// which always looks like `W/`. Examples for valid tags are `"xyzzy"` and `W/"xyzzy"`.
-///
-/// # ABNF
-/// ```plain
-/// entity-tag = [ weak ] opaque-tag
-/// weak       = %x57.2F ; "W/", case-sensitive
-/// opaque-tag = DQUOTE *etagc DQUOTE
-/// etagc      = %x21 / %x23-7E / obs-text
-///            ; VCHAR except double quotes, plus obs-text
-/// ```
-///
-/// # Comparison
-/// To check if two entity tags are equivalent in an application always use the `strong_eq` or
-/// `weak_eq` methods based on the context of the Tag. Only use `==` to check if two tags are
-/// identical.
-///
-/// The example below shows the results for a set of entity-tag pairs and
-/// both the weak and strong comparison function results:
-///
-/// | ETag 1  | ETag 2  | Strong Comparison | Weak Comparison |
-/// |---------|---------|-------------------|-----------------|
-/// | `W/"1"` | `W/"1"` | no match          | match           |
-/// | `W/"1"` | `W/"2"` | no match          | no match        |
-/// | `W/"1"` | `"1"`   | no match          | match           |
-/// | `"1"`   | `"1"`   | match             | match           |
-#[derive(Clone, Debug, Eq, PartialEq)]
-pub struct EntityTag {
-    /// Weakness indicator for the tag
-    pub weak: bool,
-    /// The opaque string in between the DQUOTEs
-    tag: String
-}
-
-impl EntityTag {
-    /// Constructs a new EntityTag.
-    /// # Panics
-    /// If the tag contains invalid characters.
-    pub fn new(weak: bool, tag: String) -> EntityTag {
-        assert!(check_slice_validity(&tag), "Invalid tag: {:?}", tag);
-        EntityTag { weak: weak, tag: tag }
-    }
-
-    /// Constructs a new weak EntityTag.
-    /// # Panics
-    /// If the tag contains invalid characters.
-    pub fn weak(tag: String) -> EntityTag {
-        EntityTag::new(true, tag)
-    }
-
-    /// Constructs a new strong EntityTag.
-    /// # Panics
-    /// If the tag contains invalid characters.
-    pub fn strong(tag: String) -> EntityTag {
-        EntityTag::new(false, tag)
-    }
-
-    /// Get the tag.
-    pub fn tag(&self) -> &str {
-        self.tag.as_ref()
-    }
-
-    /// Set the tag.
-    /// # Panics
-    /// If the tag contains invalid characters.
-    pub fn set_tag(&mut self, tag: String) {
-        assert!(check_slice_validity(&tag), "Invalid tag: {:?}", tag);
-        self.tag = tag
-    }
-
-    /// For strong comparison two entity-tags are equivalent if both are not weak and their
-    /// opaque-tags match character-by-character.
-    pub fn strong_eq(&self, other: &EntityTag) -> bool {
-        !self.weak && !other.weak && self.tag == other.tag
-    }
-
-    /// For weak comparison two entity-tags are equivalent if their
-    /// opaque-tags match character-by-character, regardless of either or
-    /// both being tagged as "weak".
-    pub fn weak_eq(&self, other: &EntityTag) -> bool {
-        self.tag == other.tag
-    }
-
-    /// The inverse of `EntityTag.strong_eq()`.
-    pub fn strong_ne(&self, other: &EntityTag) -> bool {
-        !self.strong_eq(other)
-    }
-
-    /// The inverse of `EntityTag.weak_eq()`.
-    pub fn weak_ne(&self, other: &EntityTag) -> bool {
-        !self.weak_eq(other)
-    }
-}
-
-impl Display for EntityTag {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        if self.weak {
-            write!(f, "W/\"{}\"", self.tag)
-        } else {
-            write!(f, "\"{}\"", self.tag)
-        }
-    }
-}
-
-impl FromStr for EntityTag {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<EntityTag> {
-        let length: usize = s.len();
-        let slice = &s[..];
-        // Early exits if it doesn't terminate in a DQUOTE.
-        if !slice.ends_with('"') {
-            return Err(::Error::Header);
-        }
-        // The etag is weak if its first char is not a DQUOTE.
-        if slice.starts_with('"') && check_slice_validity(&slice[1..length-1]) {
-            // No need to check if the last char is a DQUOTE,
-            // we already did that above.
-            return Ok(EntityTag { weak: false, tag: slice[1..length-1].to_owned() });
-        } else if slice.starts_with("W/\"") && check_slice_validity(&slice[3..length-1]) {
-            return Ok(EntityTag { weak: true, tag: slice[3..length-1].to_owned() });
-        }
-        Err(::Error::Header)
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::EntityTag;
-
-    #[test]
-    fn test_etag_parse_success() {
-        // Expected success
-        assert_eq!("\"foobar\"".parse::<EntityTag>().unwrap(),
-            EntityTag::strong("foobar".to_owned()));
-        assert_eq!("\"\"".parse::<EntityTag>().unwrap(),
-            EntityTag::strong("".to_owned()));
-        assert_eq!("W/\"weaktag\"".parse::<EntityTag>().unwrap(),
-            EntityTag::weak("weaktag".to_owned()));
-        assert_eq!("W/\"\x65\x62\"".parse::<EntityTag>().unwrap(),
-            EntityTag::weak("\x65\x62".to_owned()));
-        assert_eq!("W/\"\"".parse::<EntityTag>().unwrap(), EntityTag::weak("".to_owned()));
-    }
-
-    #[test]
-    fn test_etag_parse_failures() {
-        // Expected failures
-        assert!("no-dquotes".parse::<EntityTag>().is_err());
-        assert!("w/\"the-first-w-is-case-sensitive\"".parse::<EntityTag>().is_err());
-        assert!("".parse::<EntityTag>().is_err());
-        assert!("\"unmatched-dquotes1".parse::<EntityTag>().is_err());
-        assert!("unmatched-dquotes2\"".parse::<EntityTag>().is_err());
-        assert!("matched-\"dquotes\"".parse::<EntityTag>().is_err());
-    }
-
-    #[test]
-    fn test_etag_fmt() {
-        assert_eq!(format!("{}", EntityTag::strong("foobar".to_owned())), "\"foobar\"");
-        assert_eq!(format!("{}", EntityTag::strong("".to_owned())), "\"\"");
-        assert_eq!(format!("{}", EntityTag::weak("weak-etag".to_owned())), "W/\"weak-etag\"");
-        assert_eq!(format!("{}", EntityTag::weak("\u{0065}".to_owned())), "W/\"\x65\"");
-        assert_eq!(format!("{}", EntityTag::weak("".to_owned())), "W/\"\"");
-    }
-
-    #[test]
-    fn test_cmp() {
-        // | ETag 1  | ETag 2  | Strong Comparison | Weak Comparison |
-        // |---------|---------|-------------------|-----------------|
-        // | `W/"1"` | `W/"1"` | no match          | match           |
-        // | `W/"1"` | `W/"2"` | no match          | no match        |
-        // | `W/"1"` | `"1"`   | no match          | match           |
-        // | `"1"`   | `"1"`   | match             | match           |
-        let mut etag1 = EntityTag::weak("1".to_owned());
-        let mut etag2 = EntityTag::weak("1".to_owned());
-        assert!(!etag1.strong_eq(&etag2));
-        assert!(etag1.weak_eq(&etag2));
-        assert!(etag1.strong_ne(&etag2));
-        assert!(!etag1.weak_ne(&etag2));
-
-        etag1 = EntityTag::weak("1".to_owned());
-        etag2 = EntityTag::weak("2".to_owned());
-        assert!(!etag1.strong_eq(&etag2));
-        assert!(!etag1.weak_eq(&etag2));
-        assert!(etag1.strong_ne(&etag2));
-        assert!(etag1.weak_ne(&etag2));
-
-        etag1 = EntityTag::weak("1".to_owned());
-        etag2 = EntityTag::strong("1".to_owned());
-        assert!(!etag1.strong_eq(&etag2));
-        assert!(etag1.weak_eq(&etag2));
-        assert!(etag1.strong_ne(&etag2));
-        assert!(!etag1.weak_ne(&etag2));
-
-        etag1 = EntityTag::strong("1".to_owned());
-        etag2 = EntityTag::strong("1".to_owned());
-        assert!(etag1.strong_eq(&etag2));
-        assert!(etag1.weak_eq(&etag2));
-        assert!(!etag1.strong_ne(&etag2));
-        assert!(!etag1.weak_ne(&etag2));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/shared/httpdate.rs
+++ /dev/null
@@ -1,91 +0,0 @@
-use std::str::FromStr;
-use std::fmt::{self, Display};
-
-use time;
-
-/// A `time::Time` with HTTP formatting and parsing
-///
-//   Prior to 1995, there were three different formats commonly used by
-//   servers to communicate timestamps.  For compatibility with old
-//   implementations, all three are defined here.  The preferred format is
-//   a fixed-length and single-zone subset of the date and time
-//   specification used by the Internet Message Format [RFC5322].
-//
-//     HTTP-date    = IMF-fixdate / obs-date
-//
-//   An example of the preferred format is
-//
-//     Sun, 06 Nov 1994 08:49:37 GMT    ; IMF-fixdate
-//
-//   Examples of the two obsolete formats are
-//
-//     Sunday, 06-Nov-94 08:49:37 GMT   ; obsolete RFC 850 format
-//     Sun Nov  6 08:49:37 1994         ; ANSI C's asctime() format
-//
-//   A recipient that parses a timestamp value in an HTTP header field
-//   MUST accept all three HTTP-date formats.  When a sender generates a
-//   header field that contains one or more timestamps defined as
-//   HTTP-date, the sender MUST generate those timestamps in the
-//   IMF-fixdate format.
-#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
-pub struct HttpDate(pub time::Tm);
-
-impl FromStr for HttpDate {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<HttpDate> {
-        match time::strptime(s, "%a, %d %b %Y %T %Z").or_else(|_| {
-            time::strptime(s, "%A, %d-%b-%y %T %Z")
-            }).or_else(|_| {
-                time::strptime(s, "%c")
-                }) {
-                    Ok(t) => Ok(HttpDate(t)),
-                    Err(_) => Err(::Error::Header),
-                    }
-    }
-}
-
-impl Display for HttpDate {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self.0.to_utc().rfc822(), f)
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use time::Tm;
-    use super::HttpDate;
-
-    const NOV_07: HttpDate = HttpDate(Tm {
-        tm_nsec: 0,
-        tm_sec: 37,
-        tm_min: 48,
-        tm_hour: 8,
-        tm_mday: 7,
-        tm_mon: 10,
-        tm_year: 94,
-        tm_wday: 0,
-        tm_isdst: 0,
-        tm_yday: 0,
-        tm_utcoff: 0,
-    });
-
-    #[test]
-    fn test_imf_fixdate() {
-        assert_eq!("Sun, 07 Nov 1994 08:48:37 GMT".parse::<HttpDate>().unwrap(), NOV_07);
-    }
-
-    #[test]
-    fn test_rfc_850() {
-        assert_eq!("Sunday, 07-Nov-94 08:48:37 GMT".parse::<HttpDate>().unwrap(), NOV_07);
-    }
-
-    #[test]
-    fn test_asctime() {
-        assert_eq!("Sun Nov  7 08:48:37 1994".parse::<HttpDate>().unwrap(), NOV_07);
-    }
-
-    #[test]
-    fn test_no_date() {
-        assert!("this-is-no-date".parse::<HttpDate>().is_err());
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/shared/mod.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-pub use self::charset::Charset;
-pub use self::encoding::Encoding;
-pub use self::entity::EntityTag;
-pub use self::httpdate::HttpDate;
-pub use self::quality_item::{Quality, QualityItem, qitem, q};
-
-mod charset;
-mod encoding;
-mod entity;
-mod httpdate;
-mod quality_item;
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/shared/quality_item.rs
+++ /dev/null
@@ -1,215 +0,0 @@
-use std::cmp;
-use std::default::Default;
-use std::fmt;
-use std::str;
-
-/// Represents a quality used in quality values.
-///
-/// Can be created with the `q` function.
-///
-/// # Implementation notes
-///
-/// The quality value is defined as a number between 0 and 1 with three decimal places. This means
-/// there are 1000 possible values. Since floating point numbers are not exact and the smallest
-/// floating point data type (`f32`) consumes four bytes, hyper uses an `u16` value to store the
-/// quality internally. For performance reasons you may set quality directly to a value between
-/// 0 and 1000 e.g. `Quality(532)` matches the quality `q=0.532`.
-///
-/// [RFC7231 Section 5.3.1](https://tools.ietf.org/html/rfc7231#section-5.3.1)
-/// gives more information on quality values in HTTP header fields.
-#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
-pub struct Quality(pub u16);
-
-impl fmt::Display for Quality {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match self.0 {
-            1000 => Ok(()),
-            0 => f.write_str("; q=0"),
-            x => write!(f, "; q=0.{}", format!("{:03}", x).trim_right_matches('0'))
-        }
-    }
-}
-
-impl Default for Quality {
-    fn default() -> Quality {
-        Quality(1000)
-    }
-}
-
-/// Represents an item with a quality value as defined in
-/// [RFC7231](https://tools.ietf.org/html/rfc7231#section-5.3.1).
-#[derive(Clone, PartialEq, Debug)]
-pub struct QualityItem<T> {
-    /// The actual contents of the field.
-    pub item: T,
-    /// The quality (client or server preference) for the value.
-    pub quality: Quality,
-}
-
-impl<T> QualityItem<T> {
-    /// Creates a new `QualityItem` from an item and a quality.
-    /// The item can be of any type.
-    /// The quality should be a value in the range [0, 1].
-    pub fn new(item: T, quality: Quality) -> QualityItem<T> {
-        QualityItem {
-            item: item,
-            quality: quality
-        }
-    }
-}
-
-impl<T: PartialEq> cmp::PartialOrd for QualityItem<T> {
-    fn partial_cmp(&self, other: &QualityItem<T>) -> Option<cmp::Ordering> {
-        self.quality.partial_cmp(&other.quality)
-    }
-}
-
-impl<T: fmt::Display> fmt::Display for QualityItem<T> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}{}", self.item, format!("{}", self.quality))
-    }
-}
-
-impl<T: str::FromStr> str::FromStr for QualityItem<T> {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<QualityItem<T>> {
-        // Set defaults used if parsing fails.
-        let mut raw_item = s;
-        let mut quality = 1f32;
-
-        let parts: Vec<&str> = s.rsplitn(2, ';').map(|x| x.trim()).collect();
-        if parts.len() == 2 {
-            let start = &parts[0][0..2];
-            if start == "q=" || start == "Q=" {
-                let q_part = &parts[0][2..parts[0].len()];
-                if q_part.len() > 5 {
-                    return Err(::Error::Header);
-                }
-                match q_part.parse::<f32>() {
-                    Ok(q_value) => {
-                        if 0f32 <= q_value && q_value <= 1f32 {
-                            quality = q_value;
-                            raw_item = parts[1];
-                            } else {
-                                return Err(::Error::Header);
-                            }
-                        },
-                    Err(_) => return Err(::Error::Header),
-                }
-            }
-        }
-        match raw_item.parse::<T>() {
-            // we already checked above that the quality is within range
-            Ok(item) => Ok(QualityItem::new(item, from_f32(quality))),
-            Err(_) => Err(::Error::Header),
-        }
-    }
-}
-
-fn from_f32(f: f32) -> Quality {
-    // this function is only used internally. A check that `f` is within range
-    // should be done before calling this method. Just in case, this
-    // debug_assert should catch if we were forgetful
-    debug_assert!(f >= 0f32 && f <= 1f32, "q value must be between 0.0 and 1.0");
-    Quality((f * 1000f32) as u16)
-}
-
-/// Convinience function to wrap a value in a `QualityItem`
-/// Sets `q` to the default 1.0
-pub fn qitem<T>(item: T) -> QualityItem<T> {
-    QualityItem::new(item, Default::default())
-}
-
-/// Convenience function to create a `Quality` from a float.
-pub fn q(f: f32) -> Quality {
-    assert!(f >= 0f32 && f <= 1f32, "q value must be between 0.0 and 1.0");
-    from_f32(f)
-}
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-    use super::super::encoding::*;
-
-    #[test]
-    fn test_quality_item_show1() {
-        let x = qitem(Chunked);
-        assert_eq!(format!("{}", x), "chunked");
-    }
-    #[test]
-    fn test_quality_item_show2() {
-        let x = QualityItem::new(Chunked, Quality(1));
-        assert_eq!(format!("{}", x), "chunked; q=0.001");
-    }
-    #[test]
-    fn test_quality_item_show3() {
-        // Custom value
-        let x = QualityItem{
-            item: EncodingExt("identity".to_owned()),
-            quality: Quality(500),
-        };
-        assert_eq!(format!("{}", x), "identity; q=0.5");
-    }
-
-    #[test]
-    fn test_quality_item_from_str1() {
-        let x: ::Result<QualityItem<Encoding>> = "chunked".parse();
-        assert_eq!(x.unwrap(), QualityItem{ item: Chunked, quality: Quality(1000), });
-    }
-    #[test]
-    fn test_quality_item_from_str2() {
-        let x: ::Result<QualityItem<Encoding>> = "chunked; q=1".parse();
-        assert_eq!(x.unwrap(), QualityItem{ item: Chunked, quality: Quality(1000), });
-    }
-    #[test]
-    fn test_quality_item_from_str3() {
-        let x: ::Result<QualityItem<Encoding>> = "gzip; q=0.5".parse();
-        assert_eq!(x.unwrap(), QualityItem{ item: Gzip, quality: Quality(500), });
-    }
-    #[test]
-    fn test_quality_item_from_str4() {
-        let x: ::Result<QualityItem<Encoding>> = "gzip; q=0.273".parse();
-        assert_eq!(x.unwrap(), QualityItem{ item: Gzip, quality: Quality(273), });
-    }
-    #[test]
-    fn test_quality_item_from_str5() {
-        let x: ::Result<QualityItem<Encoding>> = "gzip; q=0.2739999".parse();
-        assert!(x.is_err());
-    }
-    #[test]
-    fn test_quality_item_from_str6() {
-        let x: ::Result<QualityItem<Encoding>> = "gzip; q=2".parse();
-        assert!(x.is_err());
-    }
-    #[test]
-    fn test_quality_item_ordering() {
-        let x: QualityItem<Encoding> = "gzip; q=0.5".parse().ok().unwrap();
-        let y: QualityItem<Encoding> = "gzip; q=0.273".parse().ok().unwrap();
-        let comparision_result: bool = x.gt(&y);
-        assert!(comparision_result)
-    }
-
-    #[test]
-    fn test_quality() {
-        assert_eq!(q(0.5), Quality(500));
-    }
-
-    #[test]
-    fn test_quality2() {
-        assert_eq!(format!("{}", q(0.0)), "; q=0");
-    }
-
-    #[test]
-    #[should_panic] // FIXME - 32-bit msvc unwinding broken
-    #[cfg_attr(all(target_arch="x86", target_env="msvc"), ignore)]
-    fn test_quality_invalid() {
-        q(-1.0);
-    }
-
-    #[test]
-    #[should_panic] // FIXME - 32-bit msvc unwinding broken
-    #[cfg_attr(all(target_arch="x86", target_env="msvc"), ignore)]
-    fn test_quality_invalid2() {
-        q(2.0);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/http/h1.rs
+++ /dev/null
@@ -1,1177 +0,0 @@
-//! Adapts the HTTP/1.1 implementation into the `HttpMessage` API.
-use std::borrow::Cow;
-use std::cmp::min;
-use std::fmt;
-use std::io::{self, Write, BufWriter, BufRead, Read};
-use std::net::Shutdown;
-use std::time::Duration;
-
-use httparse;
-use url::Position as UrlPosition;
-
-use buffer::BufReader;
-use Error;
-use header::{Headers, ContentLength, TransferEncoding};
-use header::Encoding::Chunked;
-use method::{Method};
-use net::{NetworkConnector, NetworkStream};
-use status::StatusCode;
-use version::HttpVersion;
-use version::HttpVersion::{Http10, Http11};
-use uri::RequestUri;
-
-use self::HttpReader::{SizedReader, ChunkedReader, EofReader, EmptyReader};
-use self::HttpWriter::{ChunkedWriter, SizedWriter, EmptyWriter, ThroughWriter};
-
-use http::{
-    RawStatus,
-    Protocol,
-    HttpMessage,
-    RequestHead,
-    ResponseHead,
-};
-use header;
-use version;
-
-const MAX_INVALID_RESPONSE_BYTES: usize = 1024 * 128;
-
-#[derive(Debug)]
-struct Wrapper<T> {
-    obj: Option<T>,
-}
-
-impl<T> Wrapper<T> {
-    pub fn new(obj: T) -> Wrapper<T> {
-        Wrapper { obj: Some(obj) }
-    }
-
-    pub fn map_in_place<F>(&mut self, f: F) where F: FnOnce(T) -> T {
-        let obj = self.obj.take().unwrap();
-        let res = f(obj);
-        self.obj = Some(res);
-    }
-
-    pub fn into_inner(self) -> T { self.obj.unwrap() }
-    pub fn as_mut(&mut self) -> &mut T { self.obj.as_mut().unwrap() }
-    pub fn as_ref(&self) -> &T { self.obj.as_ref().unwrap() }
-}
-
-#[derive(Debug)]
-enum Stream {
-    Idle(Box<NetworkStream + Send>),
-    Writing(HttpWriter<BufWriter<Box<NetworkStream + Send>>>),
-    Reading(HttpReader<BufReader<Box<NetworkStream + Send>>>),
-}
-
-impl Stream {
-    fn writer_mut(&mut self) -> Option<&mut HttpWriter<BufWriter<Box<NetworkStream + Send>>>> {
-        match *self {
-            Stream::Writing(ref mut writer) => Some(writer),
-            _ => None,
-        }
-    }
-    fn reader_mut(&mut self) -> Option<&mut HttpReader<BufReader<Box<NetworkStream + Send>>>> {
-        match *self {
-            Stream::Reading(ref mut reader) => Some(reader),
-            _ => None,
-        }
-    }
-    fn reader_ref(&self) -> Option<&HttpReader<BufReader<Box<NetworkStream + Send>>>> {
-        match *self {
-            Stream::Reading(ref reader) => Some(reader),
-            _ => None,
-        }
-    }
-
-    fn new(stream: Box<NetworkStream + Send>) -> Stream {
-        Stream::Idle(stream)
-    }
-}
-
-/// An implementation of the `HttpMessage` trait for HTTP/1.1.
-#[derive(Debug)]
-pub struct Http11Message {
-    is_proxied: bool,
-    method: Option<Method>,
-    stream: Wrapper<Stream>,
-}
-
-impl Write for Http11Message {
-    #[inline]
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        match self.stream.as_mut().writer_mut() {
-            None => Err(io::Error::new(io::ErrorKind::Other,
-                                          "Not in a writable state")),
-            Some(ref mut writer) => writer.write(buf),
-        }
-    }
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        match self.stream.as_mut().writer_mut() {
-            None => Err(io::Error::new(io::ErrorKind::Other,
-                                          "Not in a writable state")),
-            Some(ref mut writer) => writer.flush(),
-        }
-    }
-}
-
-impl Read for Http11Message {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        match self.stream.as_mut().reader_mut() {
-            None => Err(io::Error::new(io::ErrorKind::Other,
-                                          "Not in a readable state")),
-            Some(ref mut reader) => reader.read(buf),
-        }
-    }
-}
-
-impl HttpMessage for Http11Message {
-    fn set_outgoing(&mut self, mut head: RequestHead) -> ::Result<RequestHead> {
-        let mut res = Err(Error::from(io::Error::new(
-                            io::ErrorKind::Other,
-                            "")));
-        let mut method = None;
-        let is_proxied = self.is_proxied;
-        self.stream.map_in_place(|stream: Stream| -> Stream {
-            let stream = match stream {
-                Stream::Idle(stream) => stream,
-                _ => {
-                    res = Err(Error::from(io::Error::new(
-                                io::ErrorKind::Other,
-                                "Message not idle, cannot start new outgoing")));
-                    return stream;
-                },
-            };
-            let mut stream = BufWriter::new(stream);
-
-            {
-                let uri = if is_proxied {
-                    head.url.as_ref()
-                } else {
-                    &head.url[UrlPosition::BeforePath..UrlPosition::AfterQuery]
-                };
-
-                let version = version::HttpVersion::Http11;
-                debug!("request line: {:?} {:?} {:?}", head.method, uri, version);
-                match write!(&mut stream, "{} {} {}{}",
-                             head.method, uri, version, LINE_ENDING) {
-                                 Err(e) => {
-                                     res = Err(From::from(e));
-                                     // TODO What should we do if the BufWriter doesn't wanna
-                                     // relinquish the stream?
-                                     return Stream::Idle(stream.into_inner().ok().unwrap());
-                                 },
-                                 Ok(_) => {},
-                             };
-            }
-
-            let stream = {
-                let write_headers = |mut stream: BufWriter<Box<NetworkStream + Send>>, head: &RequestHead| {
-                    debug!("headers={:?}", head.headers);
-                    match write!(&mut stream, "{}{}", head.headers, LINE_ENDING) {
-                        Ok(_) => Ok(stream),
-                        Err(e) => {
-                            Err((e, stream.into_inner().unwrap()))
-                        }
-                    }
-                };
-                match head.method {
-                    Method::Get | Method::Head => {
-                        let writer = match write_headers(stream, &head) {
-                            Ok(w) => w,
-                            Err(e) => {
-                                res = Err(From::from(e.0));
-                                return Stream::Idle(e.1);
-                            }
-                        };
-                        EmptyWriter(writer)
-                    },
-                    _ => {
-                        let mut chunked = true;
-                        let mut len = 0;
-
-                        match head.headers.get::<header::ContentLength>() {
-                            Some(cl) => {
-                                chunked = false;
-                                len = **cl;
-                            },
-                            None => ()
-                        };
-
-                        // can't do in match above, thanks borrowck
-                        if chunked {
-                            let encodings = match head.headers.get_mut::<header::TransferEncoding>() {
-                                Some(encodings) => {
-                                    //TODO: check if chunked is already in encodings. use HashSet?
-                                    encodings.push(header::Encoding::Chunked);
-                                    false
-                                },
-                                None => true
-                            };
-
-                            if encodings {
-                                head.headers.set(
-                                    header::TransferEncoding(vec![header::Encoding::Chunked]))
-                            }
-                        }
-
-                        let stream = match write_headers(stream, &head) {
-                            Ok(s) => s,
-                            Err(e) => {
-                                res = Err(From::from(e.0));
-                                return Stream::Idle(e.1);
-                            },
-                        };
-
-                        if chunked {
-                            ChunkedWriter(stream)
-                        } else {
-                            SizedWriter(stream, len)
-                        }
-                    }
-                }
-            };
-
-            method = Some(head.method.clone());
-            res = Ok(head);
-            Stream::Writing(stream)
-        });
-
-        self.method = method;
-        res
-    }
-
-    fn get_incoming(&mut self) -> ::Result<ResponseHead> {
-        try!(self.flush_outgoing());
-        let method = self.method.take().unwrap_or(Method::Get);
-        let mut res = Err(From::from(
-                        io::Error::new(io::ErrorKind::Other,
-                        "Read already in progress")));
-        self.stream.map_in_place(|stream| {
-            let stream = match stream {
-                Stream::Idle(stream) => stream,
-                _ => {
-                    // The message was already in the reading state...
-                    // TODO Decide what happens in case we try to get a new incoming at that point
-                    res = Err(From::from(
-                            io::Error::new(io::ErrorKind::Other,
-                                           "Read already in progress")));
-                    return stream;
-                }
-            };
-
-            let expected_no_content = stream.previous_response_expected_no_content();
-            trace!("previous_response_expected_no_content = {}", expected_no_content);
-
-            let mut stream = BufReader::new(stream);
-
-            let mut invalid_bytes_read = 0;
-            let head;
-            loop {
-                head = match parse_response(&mut stream) {
-                    Ok(head) => head,
-                    Err(::Error::Version)
-                        if expected_no_content && invalid_bytes_read < MAX_INVALID_RESPONSE_BYTES => {
-                            trace!("expected_no_content, found content");
-                            invalid_bytes_read += 1;
-                            stream.consume(1);
-                            continue;
-                        }
-                    Err(e) => {
-                        res = Err(e);
-                        return Stream::Idle(stream.into_inner());
-                    }
-                };
-                break;
-            }
-
-            let raw_status = head.subject;
-            let headers = head.headers;
-
-            let is_empty = !should_have_response_body(&method, raw_status.0);
-            stream.get_mut().set_previous_response_expected_no_content(is_empty);
-            // According to https://tools.ietf.org/html/rfc7230#section-3.3.3
-            // 1. HEAD reponses, and Status 1xx, 204, and 304 cannot have a body.
-            // 2. Status 2xx to a CONNECT cannot have a body.
-            // 3. Transfer-Encoding: chunked has a chunked body.
-            // 4. If multiple differing Content-Length headers or invalid, close connection.
-            // 5. Content-Length header has a sized body.
-            // 6. Not Client.
-            // 7. Read till EOF.
-            let reader = if is_empty {
-                EmptyReader(stream)
-            } else {
-                if let Some(&TransferEncoding(ref codings)) = headers.get() {
-                    if codings.last() == Some(&Chunked) {
-                        ChunkedReader(stream, None)
-                    } else {
-                        trace!("not chuncked. read till eof");
-                        EofReader(stream)
-                    }
-                } else if let Some(&ContentLength(len)) =  headers.get() {
-                    SizedReader(stream, len)
-                } else if headers.has::<ContentLength>() {
-                    trace!("illegal Content-Length: {:?}", headers.get_raw("Content-Length"));
-                    res = Err(Error::Header);
-                    return Stream::Idle(stream.into_inner());
-                } else {
-                    trace!("neither Transfer-Encoding nor Content-Length");
-                    EofReader(stream)
-                }
-            };
-
-            trace!("Http11Message.reader = {:?}", reader);
-
-
-            res = Ok(ResponseHead {
-                headers: headers,
-                raw_status: raw_status,
-                version: head.version,
-            });
-
-            Stream::Reading(reader)
-        });
-        res
-    }
-
-    fn has_body(&self) -> bool {
-        match self.stream.as_ref().reader_ref() {
-            Some(&EmptyReader(..)) |
-            Some(&SizedReader(_, 0)) |
-            Some(&ChunkedReader(_, Some(0))) => false,
-            // specifically EofReader is always true
-            _ => true
-        }
-    }
-
-    #[inline]
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.get_ref().set_read_timeout(dur)
-    }
-
-    #[inline]
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.get_ref().set_write_timeout(dur)
-    }
-
-    #[inline]
-    fn close_connection(&mut self) -> ::Result<()> {
-        try!(self.get_mut().close(Shutdown::Both));
-        Ok(())
-    }
-
-    #[inline]
-    fn set_proxied(&mut self, val: bool) {
-        self.is_proxied = val;
-    }
-}
-
-impl Http11Message {
-    /// Consumes the `Http11Message` and returns the underlying `NetworkStream`.
-    pub fn into_inner(self) -> Box<NetworkStream + Send> {
-        match self.stream.into_inner() {
-            Stream::Idle(stream) => stream,
-            Stream::Writing(stream) => stream.into_inner().into_inner().unwrap(),
-            Stream::Reading(stream) => stream.into_inner().into_inner(),
-        }
-    }
-
-    /// Gets a borrowed reference to the underlying `NetworkStream`, regardless of the state of the
-    /// `Http11Message`.
-    pub fn get_ref(&self) -> &(NetworkStream + Send) {
-        match *self.stream.as_ref() {
-            Stream::Idle(ref stream) => &**stream,
-            Stream::Writing(ref stream) => &**stream.get_ref().get_ref(),
-            Stream::Reading(ref stream) => &**stream.get_ref().get_ref()
-        }
-    }
-
-    /// Gets a mutable reference to the underlying `NetworkStream`, regardless of the state of the
-    /// `Http11Message`.
-    pub fn get_mut(&mut self) -> &mut (NetworkStream + Send) {
-        match *self.stream.as_mut() {
-            Stream::Idle(ref mut stream) => &mut **stream,
-            Stream::Writing(ref mut stream) => &mut **stream.get_mut().get_mut(),
-            Stream::Reading(ref mut stream) => &mut **stream.get_mut().get_mut()
-        }
-    }
-
-    /// Creates a new `Http11Message` that will use the given `NetworkStream` for communicating to
-    /// the peer.
-    pub fn with_stream(stream: Box<NetworkStream + Send>) -> Http11Message {
-        Http11Message {
-            is_proxied: false,
-            method: None,
-            stream: Wrapper::new(Stream::new(stream)),
-        }
-    }
-
-    /// Flushes the current outgoing content and moves the stream into the `stream` property.
-    ///
-    /// TODO It might be sensible to lift this up to the `HttpMessage` trait itself...
-    pub fn flush_outgoing(&mut self) -> ::Result<()> {
-        let mut res = Ok(());
-        self.stream.map_in_place(|stream| {
-            let writer = match stream {
-                Stream::Writing(writer) => writer,
-                _ => {
-                    res = Ok(());
-                    return stream;
-                },
-            };
-            // end() already flushes
-            let raw = match writer.end() {
-                Ok(buf) => buf.into_inner().unwrap(),
-                Err(e) => {
-                    res = Err(From::from(e.0));
-                    return Stream::Writing(e.1);
-                }
-            };
-            Stream::Idle(raw)
-        });
-        res
-    }
-}
-
-/// The `Protocol` implementation provides HTTP/1.1 messages.
-pub struct Http11Protocol {
-    connector: Connector,
-}
-
-impl Protocol for Http11Protocol {
-    fn new_message(&self, host: &str, port: u16, scheme: &str) -> ::Result<Box<HttpMessage>> {
-        let stream = try!(self.connector.connect(host, port, scheme)).into();
-
-        Ok(Box::new(Http11Message::with_stream(stream)))
-    }
-}
-
-impl Http11Protocol {
-    /// Creates a new `Http11Protocol` instance that will use the given `NetworkConnector` for
-    /// establishing HTTP connections.
-    pub fn with_connector<C, S>(c: C) -> Http11Protocol
-            where C: NetworkConnector<Stream=S> + Send + Sync + 'static,
-                  S: NetworkStream + Send {
-        Http11Protocol {
-            connector: Connector(Box::new(ConnAdapter(c))),
-        }
-    }
-}
-
-struct ConnAdapter<C: NetworkConnector + Send + Sync>(C);
-
-impl<C: NetworkConnector<Stream=S> + Send + Sync, S: NetworkStream + Send>
-        NetworkConnector for ConnAdapter<C> {
-    type Stream = Box<NetworkStream + Send>;
-    #[inline]
-    fn connect(&self, host: &str, port: u16, scheme: &str)
-        -> ::Result<Box<NetworkStream + Send>> {
-        Ok(try!(self.0.connect(host, port, scheme)).into())
-    }
-}
-
-struct Connector(Box<NetworkConnector<Stream=Box<NetworkStream + Send>> + Send + Sync>);
-
-impl NetworkConnector for Connector {
-    type Stream = Box<NetworkStream + Send>;
-    #[inline]
-    fn connect(&self, host: &str, port: u16, scheme: &str)
-        -> ::Result<Box<NetworkStream + Send>> {
-        Ok(try!(self.0.connect(host, port, scheme)).into())
-    }
-}
-
-
-/// Readers to handle different Transfer-Encodings.
-///
-/// If a message body does not include a Transfer-Encoding, it *should*
-/// include a Content-Length header.
-pub enum HttpReader<R> {
-    /// A Reader used when a Content-Length header is passed with a positive integer.
-    SizedReader(R, u64),
-    /// A Reader used when Transfer-Encoding is `chunked`.
-    ChunkedReader(R, Option<u64>),
-    /// A Reader used for responses that don't indicate a length or chunked.
-    ///
-    /// Note: This should only used for `Response`s. It is illegal for a
-    /// `Request` to be made with both `Content-Length` and
-    /// `Transfer-Encoding: chunked` missing, as explained from the spec:
-    ///
-    /// > If a Transfer-Encoding header field is present in a response and
-    /// > the chunked transfer coding is not the final encoding, the
-    /// > message body length is determined by reading the connection until
-    /// > it is closed by the server.  If a Transfer-Encoding header field
-    /// > is present in a request and the chunked transfer coding is not
-    /// > the final encoding, the message body length cannot be determined
-    /// > reliably; the server MUST respond with the 400 (Bad Request)
-    /// > status code and then close the connection.
-    EofReader(R),
-    /// A Reader used for messages that should never have a body.
-    ///
-    /// See https://tools.ietf.org/html/rfc7230#section-3.3.3
-    EmptyReader(R),
-}
-
-impl<R: Read> HttpReader<R> {
-
-    /// Unwraps this HttpReader and returns the underlying Reader.
-    pub fn into_inner(self) -> R {
-        match self {
-            SizedReader(r, _) => r,
-            ChunkedReader(r, _) => r,
-            EofReader(r) => r,
-            EmptyReader(r) => r,
-        }
-    }
-
-    /// Gets a borrowed reference to the underlying Reader.
-    pub fn get_ref(&self) -> &R {
-        match *self {
-            SizedReader(ref r, _) => r,
-            ChunkedReader(ref r, _) => r,
-            EofReader(ref r) => r,
-            EmptyReader(ref r) => r,
-        }
-    }
-
-    /// Gets a mutable reference to the underlying Reader.
-    pub fn get_mut(&mut self) -> &mut R {
-        match *self {
-            SizedReader(ref mut r, _) => r,
-            ChunkedReader(ref mut r, _) => r,
-            EofReader(ref mut r) => r,
-            EmptyReader(ref mut r) => r,
-        }
-    }
-}
-
-impl<R> fmt::Debug for HttpReader<R> {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            SizedReader(_,rem) => write!(fmt, "SizedReader(remaining={:?})", rem),
-            ChunkedReader(_, None) => write!(fmt, "ChunkedReader(chunk_remaining=unknown)"),
-            ChunkedReader(_, Some(rem)) => write!(fmt, "ChunkedReader(chunk_remaining={:?})", rem),
-            EofReader(_) => write!(fmt, "EofReader"),
-            EmptyReader(_) => write!(fmt, "EmptyReader"),
-        }
-    }
-}
-
-impl<R: Read> Read for HttpReader<R> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        if buf.is_empty() {
-            return Ok(0);
-        }
-        match *self {
-            SizedReader(ref mut body, ref mut remaining) => {
-                trace!("Sized read, remaining={:?}", remaining);
-                if *remaining == 0 {
-                    Ok(0)
-                } else {
-                    let to_read = min(*remaining as usize, buf.len());
-                    let num = try!(body.read(&mut buf[..to_read])) as u64;
-                    trace!("Sized read: {}", num);
-                    if num > *remaining {
-                        *remaining = 0;
-                    } else if num == 0 {
-                        return Err(io::Error::new(io::ErrorKind::Other, "early eof"));
-                    } else {
-                        *remaining -= num;
-                    }
-                    Ok(num as usize)
-                }
-            },
-            ChunkedReader(ref mut body, ref mut opt_remaining) => {
-                let mut rem = match *opt_remaining {
-                    Some(ref rem) => *rem,
-                    // None means we don't know the size of the next chunk
-                    None => try!(read_chunk_size(body))
-                };
-                trace!("Chunked read, remaining={:?}", rem);
-
-                if rem == 0 {
-                    if opt_remaining.is_none() {
-                        try!(eat(body, LINE_ENDING.as_bytes()));
-                    }
-
-                    *opt_remaining = Some(0);
-
-                    // chunk of size 0 signals the end of the chunked stream
-                    // if the 0 digit was missing from the stream, it would
-                    // be an InvalidInput error instead.
-                    trace!("end of chunked");
-
-                    return Ok(0)
-                }
-
-                let to_read = min(rem as usize, buf.len());
-                let count = try!(body.read(&mut buf[..to_read])) as u64;
-
-                if count == 0 {
-                    *opt_remaining = Some(0);
-                    return Err(io::Error::new(io::ErrorKind::Other, "early eof"));
-                }
-
-                rem -= count;
-                *opt_remaining = if rem > 0 {
-                    Some(rem)
-                } else {
-                    try!(eat(body, LINE_ENDING.as_bytes()));
-                    None
-                };
-                Ok(count as usize)
-            },
-            EofReader(ref mut body) => {
-                let r = body.read(buf);
-                trace!("eofread: {:?}", r);
-                r
-            },
-            EmptyReader(_) => Ok(0)
-        }
-    }
-}
-
-fn eat<R: Read>(rdr: &mut R, bytes: &[u8]) -> io::Result<()> {
-    let mut buf = [0];
-    for &b in bytes.iter() {
-        match try!(rdr.read(&mut buf)) {
-            1 if buf[0] == b => (),
-            _ => return Err(io::Error::new(io::ErrorKind::InvalidInput,
-                                          "Invalid characters found")),
-        }
-    }
-    Ok(())
-}
-
-/// Chunked chunks start with 1*HEXDIGIT, indicating the size of the chunk.
-fn read_chunk_size<R: Read>(rdr: &mut R) -> io::Result<u64> {
-    macro_rules! byte (
-        ($rdr:ident) => ({
-            let mut buf = [0];
-            match try!($rdr.read(&mut buf)) {
-                1 => buf[0],
-                _ => return Err(io::Error::new(io::ErrorKind::InvalidInput,
-                                                  "Invalid chunk size line")),
-
-            }
-        })
-    );
-    let mut size = 0u64;
-    let radix = 16;
-    let mut in_ext = false;
-    let mut in_chunk_size = true;
-    loop {
-        match byte!(rdr) {
-            b@b'0'...b'9' if in_chunk_size => {
-                size *= radix;
-                size += (b - b'0') as u64;
-            },
-            b@b'a'...b'f' if in_chunk_size => {
-                size *= radix;
-                size += (b + 10 - b'a') as u64;
-            },
-            b@b'A'...b'F' if in_chunk_size => {
-                size *= radix;
-                size += (b + 10 - b'A') as u64;
-            },
-            CR => {
-                match byte!(rdr) {
-                    LF => break,
-                    _ => return Err(io::Error::new(io::ErrorKind::InvalidInput,
-                                                  "Invalid chunk size line"))
-
-                }
-            },
-            // If we weren't in the extension yet, the ";" signals its start
-            b';' if !in_ext => {
-                in_ext = true;
-                in_chunk_size = false;
-            },
-            // "Linear white space" is ignored between the chunk size and the
-            // extension separator token (";") due to the "implied *LWS rule".
-            b'\t' | b' ' if !in_ext & !in_chunk_size => {},
-            // LWS can follow the chunk size, but no more digits can come
-            b'\t' | b' ' if in_chunk_size => in_chunk_size = false,
-            // We allow any arbitrary octet once we are in the extension, since
-            // they all get ignored anyway. According to the HTTP spec, valid
-            // extensions would have a more strict syntax:
-            //     (token ["=" (token | quoted-string)])
-            // but we gain nothing by rejecting an otherwise valid chunk size.
-            ext if in_ext => {
-                todo!("chunk extension byte={}", ext);
-            },
-            // Finally, if we aren't in the extension and we're reading any
-            // other octet, the chunk size line is invalid!
-            _ => {
-                return Err(io::Error::new(io::ErrorKind::InvalidInput,
-                                         "Invalid chunk size line"));
-            }
-        }
-    }
-    trace!("chunk size={:?}", size);
-    Ok(size)
-}
-
-fn should_have_response_body(method: &Method, status: u16) -> bool {
-    trace!("should_have_response_body({:?}, {})", method, status);
-    match (method, status) {
-        (&Method::Head, _) |
-        (_, 100...199) |
-        (_, 204) |
-        (_, 304) |
-        (&Method::Connect, 200...299) => false,
-        _ => true
-    }
-}
-
-/// Writers to handle different Transfer-Encodings.
-pub enum HttpWriter<W: Write> {
-    /// A no-op Writer, used initially before Transfer-Encoding is determined.
-    ThroughWriter(W),
-    /// A Writer for when Transfer-Encoding includes `chunked`.
-    ChunkedWriter(W),
-    /// A Writer for when Content-Length is set.
-    ///
-    /// Enforces that the body is not longer than the Content-Length header.
-    SizedWriter(W, u64),
-    /// A writer that should not write any body.
-    EmptyWriter(W),
-}
-
-impl<W: Write> HttpWriter<W> {
-    /// Unwraps the HttpWriter and returns the underlying Writer.
-    #[inline]
-    pub fn into_inner(self) -> W {
-        match self {
-            ThroughWriter(w) => w,
-            ChunkedWriter(w) => w,
-            SizedWriter(w, _) => w,
-            EmptyWriter(w) => w,
-        }
-    }
-
-    /// Access the inner Writer.
-    #[inline]
-    pub fn get_ref(&self) -> &W {
-        match *self {
-            ThroughWriter(ref w) => w,
-            ChunkedWriter(ref w) => w,
-            SizedWriter(ref w, _) => w,
-            EmptyWriter(ref w) => w,
-        }
-    }
-
-    /// Access the inner Writer mutably.
-    ///
-    /// Warning: You should not write to this directly, as you can corrupt
-    /// the state.
-    #[inline]
-    pub fn get_mut(&mut self) -> &mut W {
-        match *self {
-            ThroughWriter(ref mut w) => w,
-            ChunkedWriter(ref mut w) => w,
-            SizedWriter(ref mut w, _) => w,
-            EmptyWriter(ref mut w) => w,
-        }
-    }
-
-    /// Ends the HttpWriter, and returns the underlying Writer.
-    ///
-    /// A final `write_all()` is called with an empty message, and then flushed.
-    /// The ChunkedWriter variant will use this to write the 0-sized last-chunk.
-    #[inline]
-    pub fn end(mut self) -> Result<W, EndError<W>> {
-        fn inner<W: Write>(w: &mut W) -> io::Result<()> {
-            try!(w.write(&[]));
-            w.flush()
-        }
-
-        match inner(&mut self) {
-            Ok(..) => Ok(self.into_inner()),
-            Err(e) => Err(EndError(e, self))
-        }
-    }
-}
-
-#[derive(Debug)]
-pub struct EndError<W: Write>(io::Error, HttpWriter<W>);
-
-impl<W: Write> From<EndError<W>> for io::Error {
-    fn from(e: EndError<W>) -> io::Error {
-        e.0
-    }
-}
-
-impl<W: Write> Write for HttpWriter<W> {
-    #[inline]
-    fn write(&mut self, msg: &[u8]) -> io::Result<usize> {
-        match *self {
-            ThroughWriter(ref mut w) => w.write(msg),
-            ChunkedWriter(ref mut w) => {
-                let chunk_size = msg.len();
-                trace!("chunked write, size = {:?}", chunk_size);
-                try!(write!(w, "{:X}{}", chunk_size, LINE_ENDING));
-                try!(w.write_all(msg));
-                try!(w.write_all(LINE_ENDING.as_bytes()));
-                Ok(msg.len())
-            },
-            SizedWriter(ref mut w, ref mut remaining) => {
-                let len = msg.len() as u64;
-                if len > *remaining {
-                    let len = *remaining;
-                    *remaining = 0;
-                    try!(w.write_all(&msg[..len as usize]));
-                    Ok(len as usize)
-                } else {
-                    *remaining -= len;
-                    try!(w.write_all(msg));
-                    Ok(len as usize)
-                }
-            },
-            EmptyWriter(..) => {
-                if !msg.is_empty() {
-                    error!("Cannot include a body with this kind of message");
-                }
-                Ok(0)
-            }
-        }
-    }
-
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        match *self {
-            ThroughWriter(ref mut w) => w.flush(),
-            ChunkedWriter(ref mut w) => w.flush(),
-            SizedWriter(ref mut w, _) => w.flush(),
-            EmptyWriter(ref mut w) => w.flush(),
-        }
-    }
-}
-
-impl<W: Write> fmt::Debug for HttpWriter<W> {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            ThroughWriter(_) => write!(fmt, "ThroughWriter"),
-            ChunkedWriter(_) => write!(fmt, "ChunkedWriter"),
-            SizedWriter(_, rem) => write!(fmt, "SizedWriter(remaining={:?})", rem),
-            EmptyWriter(_) => write!(fmt, "EmptyWriter"),
-        }
-    }
-}
-
-const MAX_HEADERS: usize = 100;
-
-/// Parses a request into an Incoming message head.
-#[inline]
-pub fn parse_request<R: Read>(buf: &mut BufReader<R>) -> ::Result<Incoming<(Method, RequestUri)>> {
-    parse::<R, httparse::Request, (Method, RequestUri)>(buf)
-}
-
-/// Parses a response into an Incoming message head.
-#[inline]
-pub fn parse_response<R: Read>(buf: &mut BufReader<R>) -> ::Result<Incoming<RawStatus>> {
-    parse::<R, httparse::Response, RawStatus>(buf)
-}
-
-fn parse<R: Read, T: TryParse<Subject=I>, I>(rdr: &mut BufReader<R>) -> ::Result<Incoming<I>> {
-    loop {
-        match try!(try_parse::<R, T, I>(rdr)) {
-            httparse::Status::Complete((inc, len)) => {
-                rdr.consume(len);
-                return Ok(inc);
-            },
-            _partial => ()
-        }
-        match try!(rdr.read_into_buf()) {
-            0 if rdr.get_buf().is_empty() => {
-                return Err(Error::Io(io::Error::new(
-                    io::ErrorKind::ConnectionAborted,
-                    "Connection closed"
-                )))
-            },
-            0 => return Err(Error::TooLarge),
-            _ => ()
-        }
-    }
-}
-
-fn try_parse<R: Read, T: TryParse<Subject=I>, I>(rdr: &mut BufReader<R>) -> TryParseResult<I> {
-    let mut headers = [httparse::EMPTY_HEADER; MAX_HEADERS];
-    let buf = rdr.get_buf();
-    if buf.len() == 0 {
-        return Ok(httparse::Status::Partial);
-    }
-    trace!("try_parse({:?})", buf);
-    <T as TryParse>::try_parse(&mut headers, buf)
-}
-
-#[doc(hidden)]
-trait TryParse {
-    type Subject;
-    fn try_parse<'a>(headers: &'a mut [httparse::Header<'a>], buf: &'a [u8]) ->
-        TryParseResult<Self::Subject>;
-}
-
-type TryParseResult<T> = Result<httparse::Status<(Incoming<T>, usize)>, Error>;
-
-impl<'a> TryParse for httparse::Request<'a, 'a> {
-    type Subject = (Method, RequestUri);
-
-    fn try_parse<'b>(headers: &'b mut [httparse::Header<'b>], buf: &'b [u8]) ->
-            TryParseResult<(Method, RequestUri)> {
-        trace!("Request.try_parse([Header; {}], [u8; {}])", headers.len(), buf.len());
-        let mut req = httparse::Request::new(headers);
-        Ok(match try!(req.parse(buf)) {
-            httparse::Status::Complete(len) => {
-                trace!("Request.try_parse Complete({})", len);
-                httparse::Status::Complete((Incoming {
-                    version: if req.version.unwrap() == 1 { Http11 } else { Http10 },
-                    subject: (
-                        try!(req.method.unwrap().parse()),
-                        try!(req.path.unwrap().parse())
-                    ),
-                    headers: try!(Headers::from_raw(req.headers))
-                }, len))
-            },
-            httparse::Status::Partial => httparse::Status::Partial
-        })
-    }
-}
-
-impl<'a> TryParse for httparse::Response<'a, 'a> {
-    type Subject = RawStatus;
-
-    fn try_parse<'b>(headers: &'b mut [httparse::Header<'b>], buf: &'b [u8]) ->
-            TryParseResult<RawStatus> {
-        trace!("Response.try_parse([Header; {}], [u8; {}])", headers.len(), buf.len());
-        let mut res = httparse::Response::new(headers);
-        Ok(match try!(res.parse(buf)) {
-            httparse::Status::Complete(len) => {
-                trace!("Response.try_parse Complete({})", len);
-                let code = res.code.unwrap();
-                let reason = match StatusCode::from_u16(code).canonical_reason() {
-                    Some(reason) if reason == res.reason.unwrap() => Cow::Borrowed(reason),
-                    _ => Cow::Owned(res.reason.unwrap().to_owned())
-                };
-                httparse::Status::Complete((Incoming {
-                    version: if res.version.unwrap() == 1 { Http11 } else { Http10 },
-                    subject: RawStatus(code, reason),
-                    headers: try!(Headers::from_raw(res.headers))
-                }, len))
-            },
-            httparse::Status::Partial => httparse::Status::Partial
-        })
-    }
-}
-
-/// An Incoming Message head. Includes request/status line, and headers.
-#[derive(Debug)]
-pub struct Incoming<S> {
-    /// HTTP version of the message.
-    pub version: HttpVersion,
-    /// Subject (request line or status line) of Incoming message.
-    pub subject: S,
-    /// Headers of the Incoming message.
-    pub headers: Headers
-}
-
-/// The `\r` byte.
-pub const CR: u8 = b'\r';
-/// The `\n` byte.
-pub const LF: u8 = b'\n';
-/// The bytes `\r\n`.
-pub const LINE_ENDING: &'static str = "\r\n";
-
-#[cfg(test)]
-mod tests {
-    use std::error::Error;
-    use std::io::{self, Read, Write};
-
-
-    use buffer::BufReader;
-    use mock::MockStream;
-    use http::HttpMessage;
-
-    use super::{read_chunk_size, parse_request, parse_response, Http11Message};
-
-    #[test]
-    fn test_write_chunked() {
-        use std::str::from_utf8;
-        let mut w = super::HttpWriter::ChunkedWriter(Vec::new());
-        w.write_all(b"foo bar").unwrap();
-        w.write_all(b"baz quux herp").unwrap();
-        let buf = w.end().unwrap();
-        let s = from_utf8(buf.as_ref()).unwrap();
-        assert_eq!(s, "7\r\nfoo bar\r\nD\r\nbaz quux herp\r\n0\r\n\r\n");
-    }
-
-    #[test]
-    fn test_write_sized() {
-        use std::str::from_utf8;
-        let mut w = super::HttpWriter::SizedWriter(Vec::new(), 8);
-        w.write_all(b"foo bar").unwrap();
-        assert_eq!(w.write(b"baz").unwrap(), 1);
-
-        let buf = w.end().unwrap();
-        let s = from_utf8(buf.as_ref()).unwrap();
-        assert_eq!(s, "foo barb");
-    }
-
-    #[test]
-    fn test_read_chunk_size() {
-        fn read(s: &str, result: u64) {
-            assert_eq!(read_chunk_size(&mut s.as_bytes()).unwrap(), result);
-        }
-
-        fn read_err(s: &str) {
-            assert_eq!(read_chunk_size(&mut s.as_bytes()).unwrap_err().kind(),
-                io::ErrorKind::InvalidInput);
-        }
-
-        read("1\r\n", 1);
-        read("01\r\n", 1);
-        read("0\r\n", 0);
-        read("00\r\n", 0);
-        read("A\r\n", 10);
-        read("a\r\n", 10);
-        read("Ff\r\n", 255);
-        read("Ff   \r\n", 255);
-        // Missing LF or CRLF
-        read_err("F\rF");
-        read_err("F");
-        // Invalid hex digit
-        read_err("X\r\n");
-        read_err("1X\r\n");
-        read_err("-\r\n");
-        read_err("-1\r\n");
-        // Acceptable (if not fully valid) extensions do not influence the size
-        read("1;extension\r\n", 1);
-        read("a;ext name=value\r\n", 10);
-        read("1;extension;extension2\r\n", 1);
-        read("1;;;  ;\r\n", 1);
-        read("2; extension...\r\n", 2);
-        read("3   ; extension=123\r\n", 3);
-        read("3   ;\r\n", 3);
-        read("3   ;   \r\n", 3);
-        // Invalid extensions cause an error
-        read_err("1 invalid extension\r\n");
-        read_err("1 A\r\n");
-        read_err("1;no CRLF");
-    }
-
-    #[test]
-    fn test_read_sized_early_eof() {
-        let mut r = super::HttpReader::SizedReader(MockStream::with_input(b"foo bar"), 10);
-        let mut buf = [0u8; 10];
-        assert_eq!(r.read(&mut buf).unwrap(), 7);
-        let e = r.read(&mut buf).unwrap_err();
-        assert_eq!(e.kind(), io::ErrorKind::Other);
-        assert_eq!(e.description(), "early eof");
-    }
-
-    #[test]
-    fn test_read_chunked_early_eof() {
-        let mut r = super::HttpReader::ChunkedReader(MockStream::with_input(b"\
-            9\r\n\
-            foo bar\
-        "), None);
-
-        let mut buf = [0u8; 10];
-        assert_eq!(r.read(&mut buf).unwrap(), 7);
-        let e = r.read(&mut buf).unwrap_err();
-        assert_eq!(e.kind(), io::ErrorKind::Other);
-        assert_eq!(e.description(), "early eof");
-    }
-
-    #[test]
-    fn test_read_sized_zero_len_buf() {
-        let mut r = super::HttpReader::SizedReader(MockStream::with_input(b"foo bar"), 7);
-        let mut buf = [0u8; 0];
-        assert_eq!(r.read(&mut buf).unwrap(), 0);
-    }
-
-    #[test]
-    fn test_read_chunked_zero_len_buf() {
-        let mut r = super::HttpReader::ChunkedReader(MockStream::with_input(b"\
-            7\r\n\
-            foo bar\
-            0\r\n\r\n\
-        "), None);
-
-        let mut buf = [0u8; 0];
-        assert_eq!(r.read(&mut buf).unwrap(), 0);
-    }
-
-    #[test]
-    fn test_read_chunked_fully_consumes() {
-        let mut r = super::HttpReader::ChunkedReader(MockStream::with_input(b"0\r\n\r\n"), None);
-        let mut buf = [0; 1];
-        assert_eq!(r.read(&mut buf).unwrap(), 0);
-        assert_eq!(r.read(&mut buf).unwrap(), 0);
-
-        match r {
-            super::HttpReader::ChunkedReader(mut r, _) => assert_eq!(r.read(&mut buf).unwrap(), 0),
-            _ => unreachable!(),
-        }
-    }
-
-    #[test]
-    fn test_message_get_incoming_invalid_content_length() {
-        let raw = MockStream::with_input(
-            b"HTTP/1.1 200 OK\r\nContent-Length: asdf\r\n\r\n");
-        let mut msg = Http11Message::with_stream(Box::new(raw));
-        assert!(msg.get_incoming().is_err());
-        assert!(msg.close_connection().is_ok());
-    }
-
-    #[test]
-    fn test_parse_incoming() {
-        let mut raw = MockStream::with_input(b"GET /echo HTTP/1.1\r\nHost: hyper.rs\r\n\r\n");
-        let mut buf = BufReader::new(&mut raw);
-        parse_request(&mut buf).unwrap();
-    }
-
-    #[test]
-    fn test_parse_raw_status() {
-        let mut raw = MockStream::with_input(b"HTTP/1.1 200 OK\r\n\r\n");
-        let mut buf = BufReader::new(&mut raw);
-        let res = parse_response(&mut buf).unwrap();
-
-        assert_eq!(res.subject.1, "OK");
-
-        let mut raw = MockStream::with_input(b"HTTP/1.1 200 Howdy\r\n\r\n");
-        let mut buf = BufReader::new(&mut raw);
-        let res = parse_response(&mut buf).unwrap();
-
-        assert_eq!(res.subject.1, "Howdy");
-    }
-
-
-    #[test]
-    fn test_parse_tcp_closed() {
-        use std::io::ErrorKind;
-        use error::Error;
-
-        let mut empty = MockStream::new();
-        let mut buf = BufReader::new(&mut empty);
-        match parse_request(&mut buf) {
-            Err(Error::Io(ref e)) if e.kind() == ErrorKind::ConnectionAborted => (),
-            other => panic!("unexpected result: {:?}", other)
-        }
-    }
-
-    #[cfg(feature = "nightly")]
-    use test::Bencher;
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_parse_incoming(b: &mut Bencher) {
-        let mut raw = MockStream::with_input(b"GET /echo HTTP/1.1\r\nHost: hyper.rs\r\n\r\n");
-        let mut buf = BufReader::new(&mut raw);
-        b.iter(|| {
-            parse_request(&mut buf).unwrap();
-            buf.get_mut().read.set_position(0);
-        });
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/http/message.rs
+++ /dev/null
@@ -1,133 +0,0 @@
-//! Defines the `HttpMessage` trait that serves to encapsulate the operations of a single
-//! request-response cycle on any HTTP connection.
-
-use std::any::{Any, TypeId};
-use std::fmt::Debug;
-use std::io::{Read, Write};
-use std::mem;
-
-use std::io;
-use std::time::Duration;
-
-use typeable::Typeable;
-
-use header::Headers;
-use http::RawStatus;
-use url::Url;
-
-use method;
-use version;
-use traitobject;
-
-/// The trait provides an API for creating new `HttpMessage`s depending on the underlying HTTP
-/// protocol.
-pub trait Protocol {
-    /// Creates a fresh `HttpMessage` bound to the given host, based on the given protocol scheme.
-    fn new_message(&self, host: &str, port: u16, scheme: &str) -> ::Result<Box<HttpMessage>>;
-}
-
-/// Describes a request.
-#[derive(Clone, Debug)]
-pub struct RequestHead {
-    /// The headers of the request
-    pub headers: Headers,
-    /// The method of the request
-    pub method: method::Method,
-    /// The URL of the request
-    pub url: Url,
-}
-
-/// Describes a response.
-#[derive(Clone, Debug)]
-pub struct ResponseHead {
-    /// The headers of the reponse
-    pub headers: Headers,
-    /// The raw status line of the response
-    pub raw_status: RawStatus,
-    /// The HTTP/2 version which generated the response
-    pub version: version::HttpVersion,
-}
-
-/// The trait provides an API for sending an receiving HTTP messages.
-pub trait HttpMessage: Write + Read + Send + Any + Typeable + Debug {
-    /// Initiates a new outgoing request.
-    ///
-    /// Only the request's head is provided (in terms of the `RequestHead` struct).
-    ///
-    /// After this, the `HttpMessage` instance can be used as an `io::Write` in order to write the
-    /// body of the request.
-    fn set_outgoing(&mut self, head: RequestHead) -> ::Result<RequestHead>;
-    /// Obtains the incoming response and returns its head (i.e. the `ResponseHead` struct)
-    ///
-    /// After this, the `HttpMessage` instance can be used as an `io::Read` in order to read out
-    /// the response body.
-    fn get_incoming(&mut self) -> ::Result<ResponseHead>;
-    /// Set the read timeout duration for this message.
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()>;
-    /// Set the write timeout duration for this message.
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()>;
-    /// Closes the underlying HTTP connection.
-    fn close_connection(&mut self) -> ::Result<()>;
-    /// Returns whether the incoming message has a body.
-    fn has_body(&self) -> bool;
-    /// Called when the Client wishes to use a Proxy.
-    fn set_proxied(&mut self, val: bool) {
-        // default implementation so as to not be a breaking change.
-        warn!("default set_proxied({:?})", val);
-    }
-}
-
-impl HttpMessage {
-    unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T {
-        mem::transmute(traitobject::data(self))
-    }
-
-    unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T {
-        mem::transmute(traitobject::data_mut(self))
-    }
-
-    unsafe fn downcast_unchecked<T: 'static>(self: Box<HttpMessage>) -> Box<T>  {
-        let raw: *mut HttpMessage = mem::transmute(self);
-        mem::transmute(traitobject::data_mut(raw))
-    }
-}
-
-impl HttpMessage {
-    /// Is the underlying type in this trait object a T?
-    #[inline]
-    pub fn is<T: Any>(&self) -> bool {
-        (*self).get_type() == TypeId::of::<T>()
-    }
-
-    /// If the underlying type is T, get a reference to the contained data.
-    #[inline]
-    pub fn downcast_ref<T: Any>(&self) -> Option<&T> {
-        if self.is::<T>() {
-            Some(unsafe { self.downcast_ref_unchecked() })
-        } else {
-            None
-        }
-    }
-
-    /// If the underlying type is T, get a mutable reference to the contained
-    /// data.
-    #[inline]
-    pub fn downcast_mut<T: Any>(&mut self) -> Option<&mut T> {
-        if self.is::<T>() {
-            Some(unsafe { self.downcast_mut_unchecked() })
-        } else {
-            None
-        }
-    }
-
-    /// If the underlying type is T, extract it.
-    #[inline]
-    pub fn downcast<T: Any>(self: Box<HttpMessage>)
-            -> Result<Box<T>, Box<HttpMessage>> {
-        if self.is::<T>() {
-            Ok(unsafe { self.downcast_unchecked() })
-        } else {
-            Err(self)
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/http/mod.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-//! Pieces pertaining to the HTTP message protocol.
-use std::borrow::Cow;
-
-use header::Connection;
-use header::ConnectionOption::{KeepAlive, Close};
-use header::Headers;
-use version::HttpVersion;
-use version::HttpVersion::{Http10, Http11};
-
-
-pub use self::message::{HttpMessage, RequestHead, ResponseHead, Protocol};
-
-pub mod h1;
-pub mod message;
-
-/// The raw status code and reason-phrase.
-#[derive(Clone, PartialEq, Debug)]
-pub struct RawStatus(pub u16, pub Cow<'static, str>);
-
-/// Checks if a connection should be kept alive.
-#[inline]
-pub fn should_keep_alive(version: HttpVersion, headers: &Headers) -> bool {
-    trace!("should_keep_alive( {:?}, {:?} )", version, headers.get::<Connection>());
-    match (version, headers.get::<Connection>()) {
-        (Http10, None) => false,
-        (Http10, Some(conn)) if !conn.contains(&KeepAlive) => false,
-        (Http11, Some(conn)) if conn.contains(&Close)  => false,
-        _ => true
-    }
-}
-
-#[test]
-fn test_should_keep_alive() {
-    let mut headers = Headers::new();
-
-    assert!(!should_keep_alive(Http10, &headers));
-    assert!(should_keep_alive(Http11, &headers));
-
-    headers.set(Connection::close());
-    assert!(!should_keep_alive(Http10, &headers));
-    assert!(!should_keep_alive(Http11, &headers));
-
-    headers.set(Connection::keep_alive());
-    assert!(should_keep_alive(Http10, &headers));
-    assert!(should_keep_alive(Http11, &headers));
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/lib.rs
+++ /dev/null
@@ -1,215 +0,0 @@
-#![doc(html_root_url = "https://hyper.rs/hyper/v0.10.10/hyper")]
-#![cfg_attr(test, deny(missing_docs))]
-#![cfg_attr(test, deny(warnings))]
-#![cfg_attr(all(test, feature = "nightly"), feature(test))]
-
-//! # Hyper
-//!
-//! Hyper is a fast, modern HTTP implementation written in and for Rust. It
-//! is a low-level typesafe abstraction over raw HTTP, providing an elegant
-//! layer over "stringly-typed" HTTP.
-//!
-//! Hyper offers both a [Client](client/index.html) and a
-//! [Server](server/index.html) which can be used to drive complex web
-//! applications written entirely in Rust.
-//!
-//! ## Internal Design
-//!
-//! Hyper is designed as a relatively low-level wrapper over raw HTTP. It should
-//! allow the implementation of higher-level abstractions with as little pain as
-//! possible, and should not irrevocably hide any information from its users.
-//!
-//! ### Common Functionality
-//!
-//! Functionality and code shared between the Server and Client implementations
-//! can be found in `src` directly - this includes `NetworkStream`s, `Method`s,
-//! `StatusCode`, and so on.
-//!
-//! #### Methods
-//!
-//! Methods are represented as a single `enum` to remain as simple as possible.
-//! Extension Methods are represented as raw `String`s. A method's safety and
-//! idempotence can be accessed using the `safe` and `idempotent` methods.
-//!
-//! #### StatusCode
-//!
-//! Status codes are also represented as a single, exhaustive, `enum`. This
-//! representation is efficient, typesafe, and ergonomic as it allows the use of
-//! `match` to disambiguate known status codes.
-//!
-//! #### Headers
-//!
-//! Hyper's [header](header/index.html) representation is likely the most
-//! complex API exposed by Hyper.
-//!
-//! Hyper's headers are an abstraction over an internal `HashMap` and provides a
-//! typesafe API for interacting with headers that does not rely on the use of
-//! "string-typing."
-//!
-//! Each HTTP header in Hyper has an associated type and implementation of the
-//! `Header` trait, which defines an HTTP headers name as a string, how to parse
-//! that header, and how to format that header.
-//!
-//! Headers are then parsed from the string representation lazily when the typed
-//! representation of a header is requested and formatted back into their string
-//! representation when headers are written back to the client.
-//!
-//! #### NetworkStream and NetworkAcceptor
-//!
-//! These are found in `src/net.rs` and define the interface that acceptors and
-//! streams must fulfill for them to be used within Hyper. They are by and large
-//! internal tools and you should only need to mess around with them if you want to
-//! mock or replace `TcpStream` and `TcpAcceptor`.
-//!
-//! ### Server
-//!
-//! Server-specific functionality, such as `Request` and `Response`
-//! representations, are found in in `src/server`.
-//!
-//! #### Handler + Server
-//!
-//! A `Handler` in Hyper accepts a `Request` and `Response`. This is where
-//! user-code can handle each connection. The server accepts connections in a
-//! task pool with a customizable number of threads, and passes the Request /
-//! Response to the handler.
-//!
-//! #### Request
-//!
-//! An incoming HTTP Request is represented as a struct containing
-//! a `Reader` over a `NetworkStream`, which represents the body, headers, a remote
-//! address, an HTTP version, and a `Method` - relatively standard stuff.
-//!
-//! `Request` implements `Reader` itself, meaning that you can ergonomically get
-//! the body out of a `Request` using standard `Reader` methods and helpers.
-//!
-//! #### Response
-//!
-//! An outgoing HTTP Response is also represented as a struct containing a `Writer`
-//! over a `NetworkStream` which represents the Response body in addition to
-//! standard items such as the `StatusCode` and HTTP version. `Response`'s `Writer`
-//! implementation provides a streaming interface for sending data over to the
-//! client.
-//!
-//! One of the traditional problems with representing outgoing HTTP Responses is
-//! tracking the write-status of the Response - have we written the status-line,
-//! the headers, the body, etc.? Hyper tracks this information statically using the
-//! type system and prevents you, using the type system, from writing headers after
-//! you have started writing to the body or vice versa.
-//!
-//! Hyper does this through a phantom type parameter in the definition of Response,
-//! which tracks whether you are allowed to write to the headers or the body. This
-//! phantom type can have two values `Fresh` or `Streaming`, with `Fresh`
-//! indicating that you can write the headers and `Streaming` indicating that you
-//! may write to the body, but not the headers.
-//!
-//! ### Client
-//!
-//! Client-specific functionality, such as `Request` and `Response`
-//! representations, are found in `src/client`.
-//!
-//! #### Request
-//!
-//! An outgoing HTTP Request is represented as a struct containing a `Writer` over
-//! a `NetworkStream` which represents the Request body in addition to the standard
-//! information such as headers and the request method.
-//!
-//! Outgoing Requests track their write-status in almost exactly the same way as
-//! outgoing HTTP Responses do on the Server, so we will defer to the explanation
-//! in the documentation for server Response.
-//!
-//! Requests expose an efficient streaming interface instead of a builder pattern,
-//! but they also provide the needed interface for creating a builder pattern over
-//! the API exposed by core Hyper.
-//!
-//! #### Response
-//!
-//! Incoming HTTP Responses are represented as a struct containing a `Reader` over
-//! a `NetworkStream` and contain headers, a status, and an http version. They
-//! implement `Reader` and can be read to get the data out of a `Response`.
-//!
-
-extern crate base64;
-extern crate time;
-#[macro_use] extern crate url;
-extern crate unicase;
-extern crate httparse;
-extern crate num_cpus;
-extern crate traitobject;
-extern crate typeable;
-
-#[cfg_attr(test, macro_use)]
-extern crate language_tags;
-
-#[macro_use]
-extern crate mime as mime_crate;
-
-#[macro_use]
-extern crate log;
-
-#[cfg(all(test, feature = "nightly"))]
-extern crate test;
-
-
-pub use url::Url;
-pub use client::Client;
-pub use error::{Result, Error};
-pub use method::Method::{Get, Head, Post, Delete};
-pub use status::StatusCode::{Ok, BadRequest, NotFound};
-pub use server::Server;
-pub use language_tags::LanguageTag;
-
-macro_rules! todo(
-    ($($arg:tt)*) => (if cfg!(not(ndebug)) {
-        trace!("TODO: {:?}", format_args!($($arg)*))
-    })
-);
-
-macro_rules! inspect(
-    ($name:expr, $value:expr) => ({
-        let v = $value;
-        trace!("inspect: {:?} = {:?}", $name, v);
-        v
-    })
-);
-
-macro_rules! deprecated {
-    (#[$note:meta] $i:item) => (
-        #[cfg_attr(has_deprecated, $note)]
-        $i
-    );
-}
-
-#[cfg(test)]
-#[macro_use]
-mod mock;
-#[doc(hidden)]
-pub mod buffer;
-pub mod client;
-pub mod error;
-pub mod method;
-pub mod header;
-pub mod http;
-pub mod net;
-pub mod server;
-pub mod status;
-pub mod uri;
-pub mod version;
-
-/// Re-exporting the mime crate, for convenience.
-pub mod mime {
-    pub use mime_crate::*;
-}
-
-#[allow(unconditional_recursion)]
-fn _assert_send<T: Send>() {
-    _assert_send::<Client>();
-    _assert_send::<client::Request<net::Fresh>>();
-    _assert_send::<client::Response>();
-    _assert_send::<error::Error>();
-}
-
-#[allow(unconditional_recursion)]
-fn _assert_sync<T: Sync>() {
-    _assert_sync::<Client>();
-    _assert_sync::<error::Error>();
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/method.rs
+++ /dev/null
@@ -1,183 +0,0 @@
-//! The HTTP request method
-use std::fmt;
-use std::str::FromStr;
-use std::convert::AsRef;
-
-use error::Error;
-use self::Method::{Options, Get, Post, Put, Delete, Head, Trace, Connect, Patch,
-                   Extension};
-
-
-/// The Request Method (VERB)
-///
-/// Currently includes 8 variants representing the 8 methods defined in
-/// [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH,
-/// and an Extension variant for all extensions.
-///
-/// It may make sense to grow this to include all variants currently
-/// registered with IANA, if they are at all common to use.
-#[derive(Clone, PartialEq, Eq, Hash, Debug)]
-pub enum Method {
-    /// OPTIONS
-    Options,
-    /// GET
-    Get,
-    /// POST
-    Post,
-    /// PUT
-    Put,
-    /// DELETE
-    Delete,
-    /// HEAD
-    Head,
-    /// TRACE
-    Trace,
-    /// CONNECT
-    Connect,
-    /// PATCH
-    Patch,
-    /// Method extensions. An example would be `let m = Extension("FOO".to_string())`.
-    Extension(String)
-}
-
-impl AsRef<str> for Method {
-    fn as_ref(&self) -> &str {
-        match *self {
-            Options => "OPTIONS",
-            Get => "GET",
-            Post => "POST",
-            Put => "PUT",
-            Delete => "DELETE",
-            Head => "HEAD",
-            Trace => "TRACE",
-            Connect => "CONNECT",
-            Patch => "PATCH",
-            Extension(ref s) => s.as_ref()
-        }
-    }
-}
-
-impl Method {
-    /// Whether a method is considered "safe", meaning the request is
-    /// essentially read-only.
-    ///
-    /// See [the spec](https://tools.ietf.org/html/rfc7231#section-4.2.1)
-    /// for more words.
-    pub fn safe(&self) -> bool {
-        match *self {
-            Get | Head | Options | Trace => true,
-            _ => false
-        }
-    }
-
-    /// Whether a method is considered "idempotent", meaning the request has
-    /// the same result is executed multiple times.
-    ///
-    /// See [the spec](https://tools.ietf.org/html/rfc7231#section-4.2.2) for
-    /// more words.
-    pub fn idempotent(&self) -> bool {
-        if self.safe() {
-            true
-        } else {
-            match *self {
-                Put | Delete => true,
-                _ => false
-            }
-        }
-    }
-}
-
-impl FromStr for Method {
-    type Err = Error;
-    fn from_str(s: &str) -> Result<Method, Error> {
-        if s == "" {
-            Err(Error::Method)
-        } else {
-            Ok(match s {
-                "OPTIONS" => Options,
-                "GET" => Get,
-                "POST" => Post,
-                "PUT" => Put,
-                "DELETE" => Delete,
-                "HEAD" => Head,
-                "TRACE" => Trace,
-                "CONNECT" => Connect,
-                "PATCH" => Patch,
-                _ => Extension(s.to_owned())
-            })
-        }
-    }
-}
-
-impl fmt::Display for Method {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt.write_str(match *self {
-            Options => "OPTIONS",
-            Get => "GET",
-            Post => "POST",
-            Put => "PUT",
-            Delete => "DELETE",
-            Head => "HEAD",
-            Trace => "TRACE",
-            Connect => "CONNECT",
-            Patch => "PATCH",
-            Extension(ref s) => s.as_ref()
-        })
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use std::collections::HashMap;
-    use std::str::FromStr;
-    use error::Error;
-    use super::Method;
-    use super::Method::{Get, Post, Put, Extension};
-
-    #[test]
-    fn test_safe() {
-        assert_eq!(true, Get.safe());
-        assert_eq!(false, Post.safe());
-    }
-
-    #[test]
-    fn test_idempotent() {
-        assert_eq!(true, Get.idempotent());
-        assert_eq!(true, Put.idempotent());
-        assert_eq!(false, Post.idempotent());
-    }
-
-    #[test]
-    fn test_from_str() {
-        assert_eq!(Get, FromStr::from_str("GET").unwrap());
-        assert_eq!(Extension("MOVE".to_owned()),
-                   FromStr::from_str("MOVE").unwrap());
-        let x: Result<Method, _> = FromStr::from_str("");
-        if let Err(Error::Method) = x {
-        } else {
-            panic!("An empty method is invalid!")
-        }
-    }
-
-    #[test]
-    fn test_fmt() {
-        assert_eq!("GET".to_owned(), format!("{}", Get));
-        assert_eq!("MOVE".to_owned(),
-                   format!("{}", Extension("MOVE".to_owned())));
-    }
-
-    #[test]
-    fn test_hashable() {
-        let mut counter: HashMap<Method,usize> = HashMap::new();
-        counter.insert(Get, 1);
-        assert_eq!(Some(&1), counter.get(&Get));
-    }
-
-    #[test]
-    fn test_as_str() {
-        assert_eq!(Get.as_ref(), "GET");
-        assert_eq!(Post.as_ref(), "POST");
-        assert_eq!(Put.as_ref(), "PUT");
-        assert_eq!(Extension("MOVE".to_owned()).as_ref(), "MOVE");
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/mock.rs
+++ /dev/null
@@ -1,166 +0,0 @@
-use std::io::{self, Read, Write, Cursor};
-use std::net::{SocketAddr, Shutdown};
-use std::time::Duration;
-use std::cell::Cell;
-
-use net::{NetworkStream, NetworkConnector, SslClient};
-
-#[derive(Clone, Debug)]
-pub struct MockStream {
-    pub read: Cursor<Vec<u8>>,
-    next_reads: Vec<Vec<u8>>,
-    pub write: Vec<u8>,
-    pub is_closed: bool,
-    pub error_on_write: bool,
-    pub error_on_read: bool,
-    pub read_timeout: Cell<Option<Duration>>,
-    pub write_timeout: Cell<Option<Duration>>,
-}
-
-impl PartialEq for MockStream {
-    fn eq(&self, other: &MockStream) -> bool {
-        self.read.get_ref() == other.read.get_ref() && self.write == other.write
-    }
-}
-
-impl MockStream {
-    pub fn new() -> MockStream {
-        MockStream::with_input(b"")
-    }
-
-    pub fn with_input(input: &[u8]) -> MockStream {
-        MockStream::with_responses(vec![input])
-    }
-
-    pub fn with_responses(mut responses: Vec<&[u8]>) -> MockStream {
-        MockStream {
-            read: Cursor::new(responses.remove(0).to_vec()),
-            next_reads: responses.into_iter().map(|arr| arr.to_vec()).collect(),
-            write: vec![],
-            is_closed: false,
-            error_on_write: false,
-            error_on_read: false,
-            read_timeout: Cell::new(None),
-            write_timeout: Cell::new(None),
-        }
-    }
-}
-
-impl Read for MockStream {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        if self.error_on_read {
-            Err(io::Error::new(io::ErrorKind::Other, "mock error"))
-        } else {
-            match self.read.read(buf) {
-                Ok(n) => {
-                    if self.read.position() as usize == self.read.get_ref().len() {
-                        if self.next_reads.len() > 0 {
-                            self.read = Cursor::new(self.next_reads.remove(0));
-                        }
-                    }
-                    Ok(n)
-                },
-                r => r
-            }
-        }
-    }
-}
-
-impl Write for MockStream {
-    fn write(&mut self, msg: &[u8]) -> io::Result<usize> {
-        if self.error_on_write {
-            Err(io::Error::new(io::ErrorKind::Other, "mock error"))
-        } else {
-            Write::write(&mut self.write, msg)
-        }
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        Ok(())
-    }
-}
-
-impl NetworkStream for MockStream {
-    fn peer_addr(&mut self) -> io::Result<SocketAddr> {
-        Ok("127.0.0.1:1337".parse().unwrap())
-    }
-
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.read_timeout.set(dur);
-        Ok(())
-    }
-
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.write_timeout.set(dur);
-        Ok(())
-    }
-
-    fn close(&mut self, _how: Shutdown) -> io::Result<()> {
-        self.is_closed = true;
-        Ok(())
-    }
-}
-
-pub struct MockConnector;
-
-impl NetworkConnector for MockConnector {
-    type Stream = MockStream;
-
-    fn connect(&self, _host: &str, _port: u16, _scheme: &str) -> ::Result<MockStream> {
-        Ok(MockStream::new())
-    }
-}
-
-/// new connectors must be created if you wish to intercept requests.
-macro_rules! mock_connector (
-    ($name:ident {
-        $($url:expr => $res:expr)*
-    }) => (
-
-        struct $name;
-
-        impl $crate::net::NetworkConnector for $name {
-            type Stream = ::mock::MockStream;
-            fn connect(&self, host: &str, port: u16, scheme: &str)
-                    -> $crate::Result<::mock::MockStream> {
-                use std::collections::HashMap;
-                debug!("MockStream::connect({:?}, {:?}, {:?})", host, port, scheme);
-                let mut map = HashMap::new();
-                $(map.insert($url, $res);)*
-
-
-                let key = format!("{}://{}", scheme, host);
-                // ignore port for now
-                match map.get(&*key) {
-                    Some(&res) => Ok($crate::mock::MockStream::with_input(res.as_bytes())),
-                    None => panic!("{:?} doesn't know url {}", stringify!($name), key)
-                }
-            }
-        }
-
-    );
-
-    ($name:ident { $($response:expr),+ }) => (
-        struct $name;
-
-        impl $crate::net::NetworkConnector for $name {
-            type Stream = $crate::mock::MockStream;
-            fn connect(&self, _: &str, _: u16, _: &str)
-                    -> $crate::Result<$crate::mock::MockStream> {
-                Ok($crate::mock::MockStream::with_responses(vec![
-                    $($response),+
-                ]))
-            }
-        }
-    );
-);
-
-#[derive(Debug, Default)]
-pub struct MockSsl;
-
-impl<T: NetworkStream + Send + Clone> SslClient<T> for MockSsl {
-    type Stream = T;
-    fn wrap_client(&self, stream: T, _host: &str) -> ::Result<T> {
-        Ok(stream)
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/net.rs
+++ /dev/null
@@ -1,638 +0,0 @@
-//! A collection of traits abstracting over Listeners and Streams.
-use std::any::{Any, TypeId};
-use std::fmt;
-use std::io::{self, ErrorKind, Read, Write};
-use std::net::{SocketAddr, ToSocketAddrs, TcpStream, TcpListener, Shutdown};
-use std::mem;
-use std::sync::Arc;
-
-use std::time::Duration;
-
-use typeable::Typeable;
-use traitobject;
-
-/// The write-status indicating headers have not been written.
-pub enum Fresh {}
-
-/// The write-status indicating headers have been written.
-pub enum Streaming {}
-
-/// An abstraction to listen for connections on a certain port.
-pub trait NetworkListener: Clone {
-    /// The stream produced for each connection.
-    type Stream: NetworkStream + Send + Clone;
-
-    /// Returns an iterator of streams.
-    fn accept(&mut self) -> ::Result<Self::Stream>;
-
-    /// Get the address this Listener ended up listening on.
-    fn local_addr(&mut self) -> io::Result<SocketAddr>;
-
-    /// Returns an iterator over incoming connections.
-    fn incoming(&mut self) -> NetworkConnections<Self> {
-        NetworkConnections(self)
-    }
-
-    /// Sets the read timeout for all streams that are accepted
-    fn set_read_timeout(&mut self, _: Option<Duration>) {
-        // This default implementation is only here to prevent the addition of
-        // these methods from being a breaking change. They should be removed
-        // when the next breaking release is made.
-        warn!("Ignoring read timeout");
-    }
-
-    /// Sets the write timeout for all streams that are accepted
-    fn set_write_timeout(&mut self, _: Option<Duration>) {
-        // This default implementation is only here to prevent the addition of
-        // these methods from being a breaking change. They should be removed
-        // when the next breaking release is made.
-        warn!("Ignoring write timeout");
-    }
-}
-
-/// An iterator wrapper over a `NetworkAcceptor`.
-pub struct NetworkConnections<'a, N: NetworkListener + 'a>(&'a mut N);
-
-impl<'a, N: NetworkListener + 'a> Iterator for NetworkConnections<'a, N> {
-    type Item = ::Result<N::Stream>;
-    fn next(&mut self) -> Option<::Result<N::Stream>> {
-        Some(self.0.accept())
-    }
-}
-
-/// An abstraction over streams that a `Server` can utilize.
-pub trait NetworkStream: Read + Write + Any + Send + Typeable {
-    /// Get the remote address of the underlying connection.
-    fn peer_addr(&mut self) -> io::Result<SocketAddr>;
-
-    /// Set the maximum time to wait for a read to complete.
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()>;
-
-    /// Set the maximum time to wait for a write to complete.
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()>;
-
-    /// This will be called when Stream should no longer be kept alive.
-    #[inline]
-    fn close(&mut self, _how: Shutdown) -> io::Result<()> {
-        Ok(())
-    }
-
-    // Unsure about name and implementation...
-
-    #[doc(hidden)]
-    fn set_previous_response_expected_no_content(&mut self, _expected: bool) { }
-
-    #[doc(hidden)]
-    fn previous_response_expected_no_content(&self) -> bool {
-        false
-    }
-}
-
-/// A connector creates a NetworkStream.
-pub trait NetworkConnector {
-    /// Type of `Stream` to create
-    type Stream: Into<Box<NetworkStream + Send>>;
-
-    /// Connect to a remote address.
-    fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<Self::Stream>;
-}
-
-impl<T: NetworkStream + Send> From<T> for Box<NetworkStream + Send> {
-    fn from(s: T) -> Box<NetworkStream + Send> {
-        Box::new(s)
-    }
-}
-
-impl fmt::Debug for Box<NetworkStream + Send> {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt.pad("Box<NetworkStream>")
-    }
-}
-
-impl NetworkStream {
-    unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T {
-        mem::transmute(traitobject::data(self))
-    }
-
-    unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T {
-        mem::transmute(traitobject::data_mut(self))
-    }
-
-    unsafe fn downcast_unchecked<T: 'static>(self: Box<NetworkStream>) -> Box<T>  {
-        let raw: *mut NetworkStream = mem::transmute(self);
-        mem::transmute(traitobject::data_mut(raw))
-    }
-}
-
-impl NetworkStream {
-    /// Is the underlying type in this trait object a `T`?
-    #[inline]
-    pub fn is<T: Any>(&self) -> bool {
-        (*self).get_type() == TypeId::of::<T>()
-    }
-
-    /// If the underlying type is `T`, get a reference to the contained data.
-    #[inline]
-    pub fn downcast_ref<T: Any>(&self) -> Option<&T> {
-        if self.is::<T>() {
-            Some(unsafe { self.downcast_ref_unchecked() })
-        } else {
-            None
-        }
-    }
-
-    /// If the underlying type is `T`, get a mutable reference to the contained
-    /// data.
-    #[inline]
-    pub fn downcast_mut<T: Any>(&mut self) -> Option<&mut T> {
-        if self.is::<T>() {
-            Some(unsafe { self.downcast_mut_unchecked() })
-        } else {
-            None
-        }
-    }
-
-    /// If the underlying type is `T`, extract it.
-    #[inline]
-    pub fn downcast<T: Any>(self: Box<NetworkStream>)
-            -> Result<Box<T>, Box<NetworkStream>> {
-        if self.is::<T>() {
-            Ok(unsafe { self.downcast_unchecked() })
-        } else {
-            Err(self)
-        }
-    }
-}
-
-impl NetworkStream + Send {
-    unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T {
-        mem::transmute(traitobject::data(self))
-    }
-
-    unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T {
-        mem::transmute(traitobject::data_mut(self))
-    }
-
-    unsafe fn downcast_unchecked<T: 'static>(self: Box<NetworkStream + Send>) -> Box<T>  {
-        let raw: *mut NetworkStream = mem::transmute(self);
-        mem::transmute(traitobject::data_mut(raw))
-    }
-}
-
-impl NetworkStream + Send {
-    /// Is the underlying type in this trait object a `T`?
-    #[inline]
-    pub fn is<T: Any>(&self) -> bool {
-        (*self).get_type() == TypeId::of::<T>()
-    }
-
-    /// If the underlying type is `T`, get a reference to the contained data.
-    #[inline]
-    pub fn downcast_ref<T: Any>(&self) -> Option<&T> {
-        if self.is::<T>() {
-            Some(unsafe { self.downcast_ref_unchecked() })
-        } else {
-            None
-        }
-    }
-
-    /// If the underlying type is `T`, get a mutable reference to the contained
-    /// data.
-    #[inline]
-    pub fn downcast_mut<T: Any>(&mut self) -> Option<&mut T> {
-        if self.is::<T>() {
-            Some(unsafe { self.downcast_mut_unchecked() })
-        } else {
-            None
-        }
-    }
-
-    /// If the underlying type is `T`, extract it.
-    #[inline]
-    pub fn downcast<T: Any>(self: Box<NetworkStream + Send>)
-            -> Result<Box<T>, Box<NetworkStream + Send>> {
-        if self.is::<T>() {
-            Ok(unsafe { self.downcast_unchecked() })
-        } else {
-            Err(self)
-        }
-    }
-}
-
-/// A `NetworkListener` for `HttpStream`s.
-#[derive(Clone)]
-pub struct HttpListener {
-    listener: Arc<TcpListener>,
-
-    read_timeout : Option<Duration>,
-    write_timeout: Option<Duration>,
-}
-
-impl From<TcpListener> for HttpListener {
-    fn from(listener: TcpListener) -> HttpListener {
-        HttpListener {
-            listener: Arc::new(listener),
-
-            read_timeout : None,
-            write_timeout: None,
-        }
-    }
-}
-
-impl HttpListener {
-    /// Start listening to an address over HTTP.
-    pub fn new<To: ToSocketAddrs>(addr: To) -> ::Result<HttpListener> {
-        Ok(HttpListener::from(try!(TcpListener::bind(addr))))
-    }
-}
-
-impl NetworkListener for HttpListener {
-    type Stream = HttpStream;
-
-    #[inline]
-    fn accept(&mut self) -> ::Result<HttpStream> {
-        let stream = HttpStream(try!(self.listener.accept()).0);
-        try!(stream.set_read_timeout(self.read_timeout));
-        try!(stream.set_write_timeout(self.write_timeout));
-        Ok(stream)
-    }
-
-    #[inline]
-    fn local_addr(&mut self) -> io::Result<SocketAddr> {
-        self.listener.local_addr()
-    }
-
-    fn set_read_timeout(&mut self, duration: Option<Duration>) {
-        self.read_timeout = duration;
-    }
-
-    fn set_write_timeout(&mut self, duration: Option<Duration>) {
-        self.write_timeout = duration;
-    }
-}
-
-#[cfg(windows)]
-impl ::std::os::windows::io::AsRawSocket for HttpListener {
-    fn as_raw_socket(&self) -> ::std::os::windows::io::RawSocket {
-        self.listener.as_raw_socket()
-    }
-}
-
-#[cfg(windows)]
-impl ::std::os::windows::io::FromRawSocket for HttpListener {
-    unsafe fn from_raw_socket(sock: ::std::os::windows::io::RawSocket) -> HttpListener {
-        HttpListener::from(TcpListener::from_raw_socket(sock))
-    }
-}
-
-#[cfg(unix)]
-impl ::std::os::unix::io::AsRawFd for HttpListener {
-    fn as_raw_fd(&self) -> ::std::os::unix::io::RawFd {
-        self.listener.as_raw_fd()
-    }
-}
-
-#[cfg(unix)]
-impl ::std::os::unix::io::FromRawFd for HttpListener {
-    unsafe fn from_raw_fd(fd: ::std::os::unix::io::RawFd) -> HttpListener {
-        HttpListener::from(TcpListener::from_raw_fd(fd))
-    }
-}
-
-/// A wrapper around a `TcpStream`.
-pub struct HttpStream(pub TcpStream);
-
-impl Clone for HttpStream {
-    #[inline]
-    fn clone(&self) -> HttpStream {
-        HttpStream(self.0.try_clone().unwrap())
-    }
-}
-
-impl fmt::Debug for HttpStream {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str("HttpStream(_)")
-    }
-}
-
-impl Read for HttpStream {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        self.0.read(buf)
-    }
-}
-
-impl Write for HttpStream {
-    #[inline]
-    fn write(&mut self, msg: &[u8]) -> io::Result<usize> {
-        self.0.write(msg)
-    }
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        self.0.flush()
-    }
-}
-
-#[cfg(windows)]
-impl ::std::os::windows::io::AsRawSocket for HttpStream {
-    fn as_raw_socket(&self) -> ::std::os::windows::io::RawSocket {
-        self.0.as_raw_socket()
-    }
-}
-
-#[cfg(windows)]
-impl ::std::os::windows::io::FromRawSocket for HttpStream {
-    unsafe fn from_raw_socket(sock: ::std::os::windows::io::RawSocket) -> HttpStream {
-        HttpStream(TcpStream::from_raw_socket(sock))
-    }
-}
-
-#[cfg(unix)]
-impl ::std::os::unix::io::AsRawFd for HttpStream {
-    fn as_raw_fd(&self) -> ::std::os::unix::io::RawFd {
-        self.0.as_raw_fd()
-    }
-}
-
-#[cfg(unix)]
-impl ::std::os::unix::io::FromRawFd for HttpStream {
-    unsafe fn from_raw_fd(fd: ::std::os::unix::io::RawFd) -> HttpStream {
-        HttpStream(TcpStream::from_raw_fd(fd))
-    }
-}
-
-impl NetworkStream for HttpStream {
-    #[inline]
-    fn peer_addr(&mut self) -> io::Result<SocketAddr> {
-            self.0.peer_addr()
-    }
-
-    #[inline]
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.0.set_read_timeout(dur)
-    }
-
-    #[inline]
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.0.set_write_timeout(dur)
-    }
-
-    #[inline]
-    fn close(&mut self, how: Shutdown) -> io::Result<()> {
-        match self.0.shutdown(how) {
-            Ok(_) => Ok(()),
-            // see https://github.com/hyperium/hyper/issues/508
-            Err(ref e) if e.kind() == ErrorKind::NotConnected => Ok(()),
-            err => err
-        }
-    }
-}
-
-/// A connector that will produce HttpStreams.
-#[derive(Debug, Clone, Default)]
-pub struct HttpConnector;
-
-impl NetworkConnector for HttpConnector {
-    type Stream = HttpStream;
-
-    fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<HttpStream> {
-        let addr = &(host, port);
-        Ok(try!(match scheme {
-            "http" => {
-                debug!("http scheme");
-                Ok(HttpStream(try!(TcpStream::connect(addr))))
-            },
-            _ => {
-                Err(io::Error::new(io::ErrorKind::InvalidInput,
-                                "Invalid scheme for Http"))
-            }
-        }))
-    }
-}
-
-/// A closure as a connector used to generate `TcpStream`s per request
-///
-/// # Example
-///
-/// Basic example:
-///
-/// ```norun
-/// Client::with_connector(|addr: &str, port: u16, scheme: &str| {
-///     TcpStream::connect(&(addr, port))
-/// });
-/// ```
-///
-/// Example using `TcpBuilder` from the net2 crate if you want to configure your source socket:
-///
-/// ```norun
-/// Client::with_connector(|addr: &str, port: u16, scheme: &str| {
-///     let b = try!(TcpBuilder::new_v4());
-///     try!(b.bind("127.0.0.1:0"));
-///     b.connect(&(addr, port))
-/// });
-/// ```
-impl<F> NetworkConnector for F where F: Fn(&str, u16, &str) -> io::Result<TcpStream> {
-    type Stream = HttpStream;
-
-    fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<HttpStream> {
-        Ok(HttpStream(try!((*self)(host, port, scheme))))
-    }
-}
-
-/// An abstraction to allow any SSL implementation to be used with client-side HttpsStreams.
-pub trait SslClient<T: NetworkStream + Send + Clone = HttpStream> {
-    /// The protected stream.
-    type Stream: NetworkStream + Send + Clone;
-    /// Wrap a client stream with SSL.
-    fn wrap_client(&self, stream: T, host: &str) -> ::Result<Self::Stream>;
-}
-
-/// An abstraction to allow any SSL implementation to be used with server-side HttpsStreams.
-pub trait SslServer<T: NetworkStream + Send + Clone = HttpStream> {
-    /// The protected stream.
-    type Stream: NetworkStream + Send + Clone;
-    /// Wrap a server stream with SSL.
-    fn wrap_server(&self, stream: T) -> ::Result<Self::Stream>;
-}
-
-/// A stream over the HTTP protocol, possibly protected by SSL.
-#[derive(Debug, Clone)]
-pub enum HttpsStream<S: NetworkStream> {
-    /// A plain text stream.
-    Http(HttpStream),
-    /// A stream protected by SSL.
-    Https(S)
-}
-
-impl<S: NetworkStream> Read for HttpsStream<S> {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        match *self {
-            HttpsStream::Http(ref mut s) => s.read(buf),
-            HttpsStream::Https(ref mut s) => s.read(buf)
-        }
-    }
-}
-
-impl<S: NetworkStream> Write for HttpsStream<S> {
-    #[inline]
-    fn write(&mut self, msg: &[u8]) -> io::Result<usize> {
-        match *self {
-            HttpsStream::Http(ref mut s) => s.write(msg),
-            HttpsStream::Https(ref mut s) => s.write(msg)
-        }
-    }
-
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        match *self {
-            HttpsStream::Http(ref mut s) => s.flush(),
-            HttpsStream::Https(ref mut s) => s.flush()
-        }
-    }
-}
-
-impl<S: NetworkStream> NetworkStream for HttpsStream<S> {
-    #[inline]
-    fn peer_addr(&mut self) -> io::Result<SocketAddr> {
-        match *self {
-            HttpsStream::Http(ref mut s) => s.peer_addr(),
-            HttpsStream::Https(ref mut s) => s.peer_addr()
-        }
-    }
-
-    #[inline]
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        match *self {
-            HttpsStream::Http(ref inner) => inner.0.set_read_timeout(dur),
-            HttpsStream::Https(ref inner) => inner.set_read_timeout(dur)
-        }
-    }
-
-    #[inline]
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        match *self {
-            HttpsStream::Http(ref inner) => inner.0.set_write_timeout(dur),
-            HttpsStream::Https(ref inner) => inner.set_write_timeout(dur)
-        }
-    }
-
-    #[inline]
-    fn close(&mut self, how: Shutdown) -> io::Result<()> {
-        match *self {
-            HttpsStream::Http(ref mut s) => s.close(how),
-            HttpsStream::Https(ref mut s) => s.close(how)
-        }
-    }
-}
-
-/// A Http Listener over SSL.
-#[derive(Clone)]
-pub struct HttpsListener<S: SslServer> {
-    listener: HttpListener,
-    ssl: S,
-}
-
-impl<S: SslServer> HttpsListener<S> {
-    /// Start listening to an address over HTTPS.
-    pub fn new<To: ToSocketAddrs>(addr: To, ssl: S) -> ::Result<HttpsListener<S>> {
-        HttpListener::new(addr).map(|l| HttpsListener {
-            listener: l,
-            ssl: ssl
-        })
-    }
-
-    /// Construct an HttpsListener from a bound `TcpListener`.
-    pub fn with_listener(listener: HttpListener, ssl: S) -> HttpsListener<S> {
-        HttpsListener {
-            listener: listener,
-            ssl: ssl
-        }
-    }
-}
-
-impl<S: SslServer + Clone> NetworkListener for HttpsListener<S> {
-    type Stream = S::Stream;
-
-    #[inline]
-    fn accept(&mut self) -> ::Result<S::Stream> {
-        self.listener.accept().and_then(|s| self.ssl.wrap_server(s))
-    }
-
-    #[inline]
-    fn local_addr(&mut self) -> io::Result<SocketAddr> {
-        self.listener.local_addr()
-    }
-
-    fn set_read_timeout(&mut self, duration: Option<Duration>) {
-        self.listener.set_read_timeout(duration)
-    }
-
-    fn set_write_timeout(&mut self, duration: Option<Duration>) {
-        self.listener.set_write_timeout(duration)
-    }
-}
-
-/// A connector that can protect HTTP streams using SSL.
-#[derive(Debug, Default)]
-pub struct HttpsConnector<S: SslClient, C: NetworkConnector = HttpConnector> {
-    ssl: S,
-    connector: C,
-}
-
-impl<S: SslClient> HttpsConnector<S, HttpConnector> {
-    /// Create a new connector using the provided SSL implementation.
-    pub fn new(s: S) -> HttpsConnector<S, HttpConnector> {
-        HttpsConnector::with_connector(s, HttpConnector)
-    }
-}
-
-impl<S: SslClient, C: NetworkConnector> HttpsConnector<S, C> {
-    /// Create a new connector using the provided SSL implementation.
-    pub fn with_connector(s: S, connector: C) -> HttpsConnector<S, C> {
-        HttpsConnector { ssl: s, connector: connector }
-    }
-}
-
-impl<S: SslClient, C: NetworkConnector<Stream=HttpStream>> NetworkConnector for HttpsConnector<S, C> {
-    type Stream = HttpsStream<S::Stream>;
-
-    fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<Self::Stream> {
-        let stream = try!(self.connector.connect(host, port, "http"));
-        if scheme == "https" {
-            debug!("https scheme");
-            self.ssl.wrap_client(stream, host).map(HttpsStream::Https)
-        } else {
-            Ok(HttpsStream::Http(stream))
-        }
-    }
-}
-
-
-#[doc(hidden)]
-pub type DefaultConnector = HttpConnector;
-
-#[cfg(test)]
-mod tests {
-    use mock::MockStream;
-    use super::{NetworkStream};
-
-    #[test]
-    fn test_downcast_box_stream() {
-        // FIXME: Use Type ascription
-        let stream: Box<NetworkStream + Send> = Box::new(MockStream::new());
-
-        let mock = stream.downcast::<MockStream>().ok().unwrap();
-        assert_eq!(mock, Box::new(MockStream::new()));
-    }
-
-    #[test]
-    fn test_downcast_unchecked_box_stream() {
-        // FIXME: Use Type ascription
-        let stream: Box<NetworkStream + Send> = Box::new(MockStream::new());
-
-        let mock = unsafe { stream.downcast_unchecked::<MockStream>() };
-        assert_eq!(mock, Box::new(MockStream::new()));
-    }
-}
-
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/server/listener.rs
+++ /dev/null
@@ -1,79 +0,0 @@
-use std::sync::{Arc, mpsc};
-use std::thread;
-
-use net::NetworkListener;
-
-pub struct ListenerPool<A: NetworkListener> {
-    acceptor: A
-}
-
-impl<A: NetworkListener + Send + 'static> ListenerPool<A> {
-    /// Create a thread pool to manage the acceptor.
-    pub fn new(acceptor: A) -> ListenerPool<A> {
-        ListenerPool { acceptor: acceptor }
-    }
-
-    /// Runs the acceptor pool. Blocks until the acceptors are closed.
-    ///
-    /// ## Panics
-    ///
-    /// Panics if threads == 0.
-    pub fn accept<F>(self, work: F, threads: usize)
-        where F: Fn(A::Stream) + Send + Sync + 'static {
-        assert!(threads != 0, "Can't accept on 0 threads.");
-
-        let (super_tx, supervisor_rx) = mpsc::channel();
-
-        let work = Arc::new(work);
-
-        // Begin work.
-        for _ in 0..threads {
-            spawn_with(super_tx.clone(), work.clone(), self.acceptor.clone())
-        }
-
-        // Monitor for panics.
-        // FIXME(reem): This won't ever exit since we still have a super_tx handle.
-        for _ in supervisor_rx.iter() {
-            spawn_with(super_tx.clone(), work.clone(), self.acceptor.clone());
-        }
-    }
-}
-
-fn spawn_with<A, F>(supervisor: mpsc::Sender<()>, work: Arc<F>, mut acceptor: A)
-where A: NetworkListener + Send + 'static,
-      F: Fn(<A as NetworkListener>::Stream) + Send + Sync + 'static {
-    thread::spawn(move || {
-        let _sentinel = Sentinel::new(supervisor, ());
-
-        loop {
-            match acceptor.accept() {
-                Ok(stream) => work(stream),
-                Err(e) => {
-                    error!("Connection failed: {}", e);
-                }
-            }
-        }
-    });
-}
-
-struct Sentinel<T: Send + 'static> {
-    value: Option<T>,
-    supervisor: mpsc::Sender<T>,
-}
-
-impl<T: Send + 'static> Sentinel<T> {
-    fn new(channel: mpsc::Sender<T>, data: T) -> Sentinel<T> {
-        Sentinel {
-            value: Some(data),
-            supervisor: channel,
-        }
-    }
-}
-
-impl<T: Send + 'static> Drop for Sentinel<T> {
-    fn drop(&mut self) {
-        // Respawn ourselves
-        let _ = self.supervisor.send(self.value.take().unwrap());
-    }
-}
-
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/server/mod.rs
+++ /dev/null
@@ -1,500 +0,0 @@
-//! HTTP Server
-//!
-//! # Server
-//!
-//! A `Server` is created to listen on port, parse HTTP requests, and hand
-//! them off to a `Handler`. By default, the Server will listen across multiple
-//! threads, but that can be configured to a single thread if preferred.
-//!
-//! # Handling requests
-//!
-//! You must pass a `Handler` to the Server that will handle requests. There is
-//! a default implementation for `fn`s and closures, allowing you pass one of
-//! those easily.
-//!
-//!
-//! ```no_run
-//! use hyper::server::{Server, Request, Response};
-//!
-//! fn hello(req: Request, res: Response) {
-//!     // handle things here
-//! }
-//!
-//! Server::http("0.0.0.0:0").unwrap().handle(hello).unwrap();
-//! ```
-//!
-//! As with any trait, you can also define a struct and implement `Handler`
-//! directly on your own type, and pass that to the `Server` instead.
-//!
-//! ```no_run
-//! use std::sync::Mutex;
-//! use std::sync::mpsc::{channel, Sender};
-//! use hyper::server::{Handler, Server, Request, Response};
-//!
-//! struct SenderHandler {
-//!     sender: Mutex<Sender<&'static str>>
-//! }
-//!
-//! impl Handler for SenderHandler {
-//!     fn handle(&self, req: Request, res: Response) {
-//!         self.sender.lock().unwrap().send("start").unwrap();
-//!     }
-//! }
-//!
-//!
-//! let (tx, rx) = channel();
-//! Server::http("0.0.0.0:0").unwrap().handle(SenderHandler {
-//!     sender: Mutex::new(tx)
-//! }).unwrap();
-//! ```
-//!
-//! Since the `Server` will be listening on multiple threads, the `Handler`
-//! must implement `Sync`: any mutable state must be synchronized.
-//!
-//! ```no_run
-//! use std::sync::atomic::{AtomicUsize, Ordering};
-//! use hyper::server::{Server, Request, Response};
-//!
-//! let counter = AtomicUsize::new(0);
-//! Server::http("0.0.0.0:0").unwrap().handle(move |req: Request, res: Response| {
-//!     counter.fetch_add(1, Ordering::Relaxed);
-//! }).unwrap();
-//! ```
-//!
-//! # The `Request` and `Response` pair
-//!
-//! A `Handler` receives a pair of arguments, a `Request` and a `Response`. The
-//! `Request` includes access to the `method`, `uri`, and `headers` of the
-//! incoming HTTP request. It also implements `std::io::Read`, in order to
-//! read any body, such as with `POST` or `PUT` messages.
-//!
-//! Likewise, the `Response` includes ways to set the `status` and `headers`,
-//! and implements `std::io::Write` to allow writing the response body.
-//!
-//! ```no_run
-//! use std::io;
-//! use hyper::server::{Server, Request, Response};
-//! use hyper::status::StatusCode;
-//!
-//! Server::http("0.0.0.0:0").unwrap().handle(|mut req: Request, mut res: Response| {
-//!     match req.method {
-//!         hyper::Post => {
-//!             io::copy(&mut req, &mut res.start().unwrap()).unwrap();
-//!         },
-//!         _ => *res.status_mut() = StatusCode::MethodNotAllowed
-//!     }
-//! }).unwrap();
-//! ```
-//!
-//! ## An aside: Write Status
-//!
-//! The `Response` uses a phantom type parameter to determine its write status.
-//! What does that mean? In short, it ensures you never write a body before
-//! adding all headers, and never add a header after writing some of the body.
-//!
-//! This is often done in most implementations by include a boolean property
-//! on the response, such as `headers_written`, checking that each time the
-//! body has something to write, so as to make sure the headers are sent once,
-//! and only once. But this has 2 downsides:
-//!
-//! 1. You are typically never notified that your late header is doing nothing.
-//! 2. There's a runtime cost to checking on every write.
-//!
-//! Instead, hyper handles this statically, or at compile-time. A
-//! `Response<Fresh>` includes a `headers_mut()` method, allowing you add more
-//! headers. It also does not implement `Write`, so you can't accidentally
-//! write early. Once the "head" of the response is correct, you can "send" it
-//! out by calling `start` on the `Response<Fresh>`. This will return a new
-//! `Response<Streaming>` object, that no longer has `headers_mut()`, but does
-//! implement `Write`.
-use std::fmt;
-use std::io::{self, ErrorKind, BufWriter, Write};
-use std::net::{SocketAddr, ToSocketAddrs};
-use std::thread::{self, JoinHandle};
-use std::time::Duration;
-
-use num_cpus;
-
-pub use self::request::Request;
-pub use self::response::Response;
-
-pub use net::{Fresh, Streaming};
-
-use Error;
-use buffer::BufReader;
-use header::{Headers, Expect, Connection};
-use http;
-use method::Method;
-use net::{NetworkListener, NetworkStream, HttpListener, HttpsListener, SslServer};
-use status::StatusCode;
-use uri::RequestUri;
-use version::HttpVersion::Http11;
-
-use self::listener::ListenerPool;
-
-pub mod request;
-pub mod response;
-
-mod listener;
-
-/// A server can listen on a TCP socket.
-///
-/// Once listening, it will create a `Request`/`Response` pair for each
-/// incoming connection, and hand them to the provided handler.
-#[derive(Debug)]
-pub struct Server<L = HttpListener> {
-    listener: L,
-    timeouts: Timeouts,
-}
-
-#[derive(Clone, Copy, Debug)]
-struct Timeouts {
-    read: Option<Duration>,
-    keep_alive: Option<Duration>,
-}
-
-impl Default for Timeouts {
-    fn default() -> Timeouts {
-        Timeouts {
-            read: None,
-            keep_alive: Some(Duration::from_secs(5))
-        }
-    }
-}
-
-macro_rules! try_option(
-    ($e:expr) => {{
-        match $e {
-            Some(v) => v,
-            None => return None
-        }
-    }}
-);
-
-impl<L: NetworkListener> Server<L> {
-    /// Creates a new server with the provided handler.
-    #[inline]
-    pub fn new(listener: L) -> Server<L> {
-        Server {
-            listener: listener,
-            timeouts: Timeouts::default()
-        }
-    }
-
-    /// Controls keep-alive for this server.
-    ///
-    /// The timeout duration passed will be used to determine how long
-    /// to keep the connection alive before dropping it.
-    ///
-    /// Passing `None` will disable keep-alive.
-    ///
-    /// Default is enabled with a 5 second timeout.
-    #[inline]
-    pub fn keep_alive(&mut self, timeout: Option<Duration>) {
-        self.timeouts.keep_alive = timeout;
-    }
-
-    /// Sets the read timeout for all Request reads.
-    pub fn set_read_timeout(&mut self, dur: Option<Duration>) {
-        self.listener.set_read_timeout(dur);
-        self.timeouts.read = dur;
-    }
-
-    /// Sets the write timeout for all Response writes.
-    pub fn set_write_timeout(&mut self, dur: Option<Duration>) {
-        self.listener.set_write_timeout(dur);
-    }
-
-    /// Get the address that the server is listening on.
-    pub fn local_addr(&mut self) -> io::Result<SocketAddr> {
-        self.listener.local_addr()
-    }
-}
-
-impl Server<HttpListener> {
-    /// Creates a new server that will handle `HttpStream`s.
-    pub fn http<To: ToSocketAddrs>(addr: To) -> ::Result<Server<HttpListener>> {
-        HttpListener::new(addr).map(Server::new)
-    }
-}
-
-impl<S: SslServer + Clone + Send> Server<HttpsListener<S>> {
-    /// Creates a new server that will handle `HttpStream`s over SSL.
-    ///
-    /// You can use any SSL implementation, as long as implements `hyper::net::Ssl`.
-    pub fn https<A: ToSocketAddrs>(addr: A, ssl: S) -> ::Result<Server<HttpsListener<S>>> {
-        HttpsListener::new(addr, ssl).map(Server::new)
-    }
-}
-
-impl<L: NetworkListener + Send + 'static> Server<L> {
-    /// Binds to a socket and starts handling connections.
-    pub fn handle<H: Handler + 'static>(self, handler: H) -> ::Result<Listening> {
-        self.handle_threads(handler, num_cpus::get() * 5 / 4)
-    }
-
-    /// Binds to a socket and starts handling connections with the provided
-    /// number of threads.
-    pub fn handle_threads<H: Handler + 'static>(self, handler: H,
-            threads: usize) -> ::Result<Listening> {
-        handle(self, handler, threads)
-    }
-}
-
-fn handle<H, L>(mut server: Server<L>, handler: H, threads: usize) -> ::Result<Listening>
-where H: Handler + 'static, L: NetworkListener + Send + 'static {
-    let socket = try!(server.listener.local_addr());
-
-    debug!("threads = {:?}", threads);
-    let pool = ListenerPool::new(server.listener);
-    let worker = Worker::new(handler, server.timeouts);
-    let work = move |mut stream| worker.handle_connection(&mut stream);
-
-    let guard = thread::spawn(move || pool.accept(work, threads));
-
-    Ok(Listening {
-        _guard: Some(guard),
-        socket: socket,
-    })
-}
-
-struct Worker<H: Handler + 'static> {
-    handler: H,
-    timeouts: Timeouts,
-}
-
-impl<H: Handler + 'static> Worker<H> {
-    fn new(handler: H, timeouts: Timeouts) -> Worker<H> {
-        Worker {
-            handler: handler,
-            timeouts: timeouts,
-        }
-    }
-
-    fn handle_connection<S>(&self, mut stream: &mut S) where S: NetworkStream + Clone {
-        debug!("Incoming stream");
-
-        self.handler.on_connection_start();
-
-        let addr = match stream.peer_addr() {
-            Ok(addr) => addr,
-            Err(e) => {
-                error!("Peer Name error: {:?}", e);
-                return;
-            }
-        };
-
-        // FIXME: Use Type ascription
-        let stream_clone: &mut NetworkStream = &mut stream.clone();
-        let mut rdr = BufReader::new(stream_clone);
-        let mut wrt = BufWriter::new(stream);
-
-        while self.keep_alive_loop(&mut rdr, &mut wrt, addr) {
-            if let Err(e) = self.set_read_timeout(*rdr.get_ref(), self.timeouts.keep_alive) {
-                error!("set_read_timeout keep_alive {:?}", e);
-                break;
-            }
-        }
-
-        self.handler.on_connection_end();
-
-        debug!("keep_alive loop ending for {}", addr);
-    }
-
-    fn set_read_timeout(&self, s: &NetworkStream, timeout: Option<Duration>) -> io::Result<()> {
-        s.set_read_timeout(timeout)
-    }
-
-    fn keep_alive_loop<W: Write>(&self, mut rdr: &mut BufReader<&mut NetworkStream>,
-            wrt: &mut W, addr: SocketAddr) -> bool {
-        let req = match Request::new(rdr, addr) {
-            Ok(req) => req,
-            Err(Error::Io(ref e)) if e.kind() == ErrorKind::ConnectionAborted => {
-                trace!("tcp closed, cancelling keep-alive loop");
-                return false;
-            }
-            Err(Error::Io(e)) => {
-                debug!("ioerror in keepalive loop = {:?}", e);
-                return false;
-            }
-            Err(e) => {
-                //TODO: send a 400 response
-                error!("request error = {:?}", e);
-                return false;
-            }
-        };
-
-        if !self.handle_expect(&req, wrt) {
-            return false;
-        }
-
-        if let Err(e) = req.set_read_timeout(self.timeouts.read) {
-            error!("set_read_timeout {:?}", e);
-            return false;
-        }
-
-        let mut keep_alive = self.timeouts.keep_alive.is_some() &&
-            http::should_keep_alive(req.version, &req.headers);
-        let version = req.version;
-        let mut res_headers = Headers::new();
-        if !keep_alive {
-            res_headers.set(Connection::close());
-        }
-        {
-            let mut res = Response::new(wrt, &mut res_headers);
-            res.version = version;
-            self.handler.handle(req, res);
-        }
-
-        // if the request was keep-alive, we need to check that the server agrees
-        // if it wasn't, then the server cannot force it to be true anyways
-        if keep_alive {
-            keep_alive = http::should_keep_alive(version, &res_headers);
-        }
-
-        debug!("keep_alive = {:?} for {}", keep_alive, addr);
-        keep_alive
-    }
-
-    fn handle_expect<W: Write>(&self, req: &Request, wrt: &mut W) -> bool {
-         if req.version == Http11 && req.headers.get() == Some(&Expect::Continue) {
-            let status = self.handler.check_continue((&req.method, &req.uri, &req.headers));
-            match write!(wrt, "{} {}\r\n\r\n", Http11, status).and_then(|_| wrt.flush()) {
-                Ok(..) => (),
-                Err(e) => {
-                    error!("error writing 100-continue: {:?}", e);
-                    return false;
-                }
-            }
-
-            if status != StatusCode::Continue {
-                debug!("non-100 status ({}) for Expect 100 request", status);
-                return false;
-            }
-        }
-
-        true
-    }
-}
-
-/// A listening server, which can later be closed.
-pub struct Listening {
-    _guard: Option<JoinHandle<()>>,
-    /// The socket addresses that the server is bound to.
-    pub socket: SocketAddr,
-}
-
-impl fmt::Debug for Listening {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "Listening {{ socket: {:?} }}", self.socket)
-    }
-}
-
-impl Drop for Listening {
-    fn drop(&mut self) {
-        let _ = self._guard.take().map(|g| g.join());
-    }
-}
-
-impl Listening {
-    /// Warning: This function doesn't work. The server remains listening after you called
-    /// it. See https://github.com/hyperium/hyper/issues/338 for more details.
-    ///
-    /// Stop the server from listening to its socket address.
-    pub fn close(&mut self) -> ::Result<()> {
-        let _ = self._guard.take();
-        debug!("closing server");
-        Ok(())
-    }
-}
-
-/// A handler that can handle incoming requests for a server.
-pub trait Handler: Sync + Send {
-    /// Receives a `Request`/`Response` pair, and should perform some action on them.
-    ///
-    /// This could reading from the request, and writing to the response.
-    fn handle<'a, 'k>(&'a self, Request<'a, 'k>, Response<'a, Fresh>);
-
-    /// Called when a Request includes a `Expect: 100-continue` header.
-    ///
-    /// By default, this will always immediately response with a `StatusCode::Continue`,
-    /// but can be overridden with custom behavior.
-    fn check_continue(&self, _: (&Method, &RequestUri, &Headers)) -> StatusCode {
-        StatusCode::Continue
-    }
-
-    /// This is run after a connection is received, on a per-connection basis (not a
-    /// per-request basis, as a connection with keep-alive may handle multiple
-    /// requests)
-    fn on_connection_start(&self) { }
-
-    /// This is run before a connection is closed, on a per-connection basis (not a
-    /// per-request basis, as a connection with keep-alive may handle multiple
-    /// requests)
-    fn on_connection_end(&self) { }
-}
-
-impl<F> Handler for F where F: Fn(Request, Response<Fresh>), F: Sync + Send {
-    fn handle<'a, 'k>(&'a self, req: Request<'a, 'k>, res: Response<'a, Fresh>) {
-        self(req, res)
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use header::Headers;
-    use method::Method;
-    use mock::MockStream;
-    use status::StatusCode;
-    use uri::RequestUri;
-
-    use super::{Request, Response, Fresh, Handler, Worker};
-
-    #[test]
-    fn test_check_continue_default() {
-        let mut mock = MockStream::with_input(b"\
-            POST /upload HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Expect: 100-continue\r\n\
-            Content-Length: 10\r\n\
-            \r\n\
-            1234567890\
-        ");
-
-        fn handle(_: Request, res: Response<Fresh>) {
-            res.start().unwrap().end().unwrap();
-        }
-
-        Worker::new(handle, Default::default()).handle_connection(&mut mock);
-        let cont = b"HTTP/1.1 100 Continue\r\n\r\n";
-        assert_eq!(&mock.write[..cont.len()], cont);
-        let res = b"HTTP/1.1 200 OK\r\n";
-        assert_eq!(&mock.write[cont.len()..cont.len() + res.len()], res);
-    }
-
-    #[test]
-    fn test_check_continue_reject() {
-        struct Reject;
-        impl Handler for Reject {
-            fn handle<'a, 'k>(&'a self, _: Request<'a, 'k>, res: Response<'a, Fresh>) {
-                res.start().unwrap().end().unwrap();
-            }
-
-            fn check_continue(&self, _: (&Method, &RequestUri, &Headers)) -> StatusCode {
-                StatusCode::ExpectationFailed
-            }
-        }
-
-        let mut mock = MockStream::with_input(b"\
-            POST /upload HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Expect: 100-continue\r\n\
-            Content-Length: 10\r\n\
-            \r\n\
-            1234567890\
-        ");
-
-        Worker::new(Reject, Default::default()).handle_connection(&mut mock);
-        assert_eq!(mock.write, &b"HTTP/1.1 417 Expectation Failed\r\n\r\n"[..]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/server/request.rs
+++ /dev/null
@@ -1,307 +0,0 @@
-//! Server Requests
-//!
-//! These are requests that a `hyper::Server` receives, and include its method,
-//! target URI, headers, and message body.
-use std::io::{self, Read};
-use std::net::SocketAddr;
-use std::time::Duration;
-
-use buffer::BufReader;
-use net::NetworkStream;
-use version::{HttpVersion};
-use method::Method;
-use header::{Headers, ContentLength, TransferEncoding};
-use http::h1::{self, Incoming, HttpReader};
-use http::h1::HttpReader::{SizedReader, ChunkedReader, EmptyReader};
-use uri::RequestUri;
-
-/// A request bundles several parts of an incoming `NetworkStream`, given to a `Handler`.
-pub struct Request<'a, 'b: 'a> {
-    /// The IP address of the remote connection.
-    pub remote_addr: SocketAddr,
-    /// The `Method`, such as `Get`, `Post`, etc.
-    pub method: Method,
-    /// The headers of the incoming request.
-    pub headers: Headers,
-    /// The target request-uri for this request.
-    pub uri: RequestUri,
-    /// The version of HTTP for this request.
-    pub version: HttpVersion,
-    body: HttpReader<&'a mut BufReader<&'b mut NetworkStream>>
-}
-
-
-impl<'a, 'b: 'a> Request<'a, 'b> {
-    /// Create a new Request, reading the StartLine and Headers so they are
-    /// immediately useful.
-    pub fn new(mut stream: &'a mut BufReader<&'b mut NetworkStream>, addr: SocketAddr)
-        -> ::Result<Request<'a, 'b>> {
-
-        let Incoming { version, subject: (method, uri), headers } = try!(h1::parse_request(stream));
-        debug!("Request Line: {:?} {:?} {:?}", method, uri, version);
-        debug!("{:?}", headers);
-
-        let body = if headers.has::<ContentLength>() {
-            match headers.get::<ContentLength>() {
-                Some(&ContentLength(len)) => SizedReader(stream, len),
-                None => unreachable!()
-            }
-        } else if headers.has::<TransferEncoding>() {
-            todo!("check for Transfer-Encoding: chunked");
-            ChunkedReader(stream, None)
-        } else {
-            EmptyReader(stream)
-        };
-
-        Ok(Request {
-            remote_addr: addr,
-            method: method,
-            uri: uri,
-            headers: headers,
-            version: version,
-            body: body
-        })
-    }
-
-    /// Set the read timeout of the underlying NetworkStream.
-    #[inline]
-    pub fn set_read_timeout(&self, timeout: Option<Duration>) -> io::Result<()> {
-        self.body.get_ref().get_ref().set_read_timeout(timeout)
-    }
-
-    /// Get a reference to the underlying `NetworkStream`.
-    #[inline]
-    pub fn downcast_ref<T: NetworkStream>(&self) -> Option<&T> {
-        self.body.get_ref().get_ref().downcast_ref()
-    }
-
-    /// Get a reference to the underlying Ssl stream, if connected
-    /// over HTTPS.
-    ///
-    /// This is actually just an alias for `downcast_ref`.
-    #[inline]
-    pub fn ssl<T: NetworkStream>(&self) -> Option<&T> {
-        self.downcast_ref()
-    }
-
-    /// Deconstruct a Request into its constituent parts.
-    #[inline]
-    pub fn deconstruct(self) -> (SocketAddr, Method, Headers,
-                                 RequestUri, HttpVersion,
-                                 HttpReader<&'a mut BufReader<&'b mut NetworkStream>>) {
-        (self.remote_addr, self.method, self.headers,
-         self.uri, self.version, self.body)
-    }
-}
-
-impl<'a, 'b> Read for Request<'a, 'b> {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        self.body.read(buf)
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use buffer::BufReader;
-    use header::{Host, TransferEncoding, Encoding};
-    use net::NetworkStream;
-    use mock::MockStream;
-    use super::Request;
-
-    use std::io::{self, Read};
-    use std::net::SocketAddr;
-
-    fn sock(s: &str) -> SocketAddr {
-        s.parse().unwrap()
-    }
-
-    fn read_to_string(mut req: Request) -> io::Result<String> {
-        let mut s = String::new();
-        try!(req.read_to_string(&mut s));
-        Ok(s)
-    }
-
-    #[test]
-    fn test_get_empty_body() {
-        let mut mock = MockStream::with_input(b"\
-            GET / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            \r\n\
-            I'm a bad request.\r\n\
-        ");
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-        assert_eq!(read_to_string(req).unwrap(), "".to_owned());
-    }
-
-    #[test]
-    fn test_get_with_body() {
-        let mut mock = MockStream::with_input(b"\
-            GET / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Content-Length: 19\r\n\
-            \r\n\
-            I'm a good request.\r\n\
-        ");
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-        assert_eq!(read_to_string(req).unwrap(), "I'm a good request.".to_owned());
-    }
-
-    #[test]
-    fn test_head_empty_body() {
-        let mut mock = MockStream::with_input(b"\
-            HEAD / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            \r\n\
-            I'm a bad request.\r\n\
-        ");
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-        assert_eq!(read_to_string(req).unwrap(), "".to_owned());
-    }
-
-    #[test]
-    fn test_post_empty_body() {
-        let mut mock = MockStream::with_input(b"\
-            POST / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            \r\n\
-            I'm a bad request.\r\n\
-        ");
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-        assert_eq!(read_to_string(req).unwrap(), "".to_owned());
-    }
-
-    #[test]
-    fn test_parse_chunked_request() {
-        let mut mock = MockStream::with_input(b"\
-            POST / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            1\r\n\
-            q\r\n\
-            2\r\n\
-            we\r\n\
-            2\r\n\
-            rt\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-
-        // The headers are correct?
-        match req.headers.get::<Host>() {
-            Some(host) => {
-                assert_eq!("example.domain", host.hostname);
-            },
-            None => panic!("Host header expected!"),
-        };
-        match req.headers.get::<TransferEncoding>() {
-            Some(encodings) => {
-                assert_eq!(1, encodings.len());
-                assert_eq!(Encoding::Chunked, encodings[0]);
-            }
-            None => panic!("Transfer-Encoding: chunked expected!"),
-        };
-        // The content is correctly read?
-        assert_eq!(read_to_string(req).unwrap(), "qwert".to_owned());
-    }
-
-    /// Tests that when a chunk size is not a valid radix-16 number, an error
-    /// is returned.
-    #[test]
-    fn test_invalid_chunk_size_not_hex_digit() {
-        let mut mock = MockStream::with_input(b"\
-            POST / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            X\r\n\
-            1\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-
-        assert!(read_to_string(req).is_err());
-    }
-
-    /// Tests that when a chunk size contains an invalid extension, an error is
-    /// returned.
-    #[test]
-    fn test_invalid_chunk_size_extension() {
-        let mut mock = MockStream::with_input(b"\
-            POST / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            1 this is an invalid extension\r\n\
-            1\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-
-        assert!(read_to_string(req).is_err());
-    }
-
-    /// Tests that when a valid extension that contains a digit is appended to
-    /// the chunk size, the chunk is correctly read.
-    #[test]
-    fn test_chunk_size_with_extension() {
-        let mut mock = MockStream::with_input(b"\
-            POST / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            1;this is an extension with a digit 1\r\n\
-            1\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-
-        assert_eq!(read_to_string(req).unwrap(), "1".to_owned());
-    }
-
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/server/response.rs
+++ /dev/null
@@ -1,432 +0,0 @@
-//! Server Responses
-//!
-//! These are responses sent by a `hyper::Server` to clients, after
-//! receiving a request.
-use std::any::{Any, TypeId};
-use std::marker::PhantomData;
-use std::mem;
-use std::io::{self, Write};
-use std::ptr;
-use std::thread;
-
-use time::now_utc;
-
-use header;
-use http::h1::{LINE_ENDING, HttpWriter};
-use http::h1::HttpWriter::{ThroughWriter, ChunkedWriter, SizedWriter, EmptyWriter};
-use status;
-use net::{Fresh, Streaming};
-use version;
-
-
-/// The outgoing half for a Tcp connection, created by a `Server` and given to a `Handler`.
-///
-/// The default `StatusCode` for a `Response` is `200 OK`.
-///
-/// There is a `Drop` implementation for `Response` that will automatically
-/// write the head and flush the body, if the handler has not already done so,
-/// so that the server doesn't accidentally leave dangling requests.
-#[derive(Debug)]
-pub struct Response<'a, W: Any = Fresh> {
-    /// The HTTP version of this response.
-    pub version: version::HttpVersion,
-    // Stream the Response is writing to, not accessible through UnwrittenResponse
-    body: HttpWriter<&'a mut (Write + 'a)>,
-    // The status code for the request.
-    status: status::StatusCode,
-    // The outgoing headers on this response.
-    headers: &'a mut header::Headers,
-
-    _writing: PhantomData<W>
-}
-
-impl<'a, W: Any> Response<'a, W> {
-    /// The status of this response.
-    #[inline]
-    pub fn status(&self) -> status::StatusCode { self.status }
-
-    /// The headers of this response.
-    #[inline]
-    pub fn headers(&self) -> &header::Headers { &*self.headers }
-
-    /// Construct a Response from its constituent parts.
-    #[inline]
-    pub fn construct(version: version::HttpVersion,
-                     body: HttpWriter<&'a mut (Write + 'a)>,
-                     status: status::StatusCode,
-                     headers: &'a mut header::Headers) -> Response<'a, Fresh> {
-        Response {
-            status: status,
-            version: version,
-            body: body,
-            headers: headers,
-            _writing: PhantomData,
-        }
-    }
-
-    /// Deconstruct this Response into its constituent parts.
-    #[inline]
-    pub fn deconstruct(self) -> (version::HttpVersion, HttpWriter<&'a mut (Write + 'a)>,
-                                 status::StatusCode, &'a mut header::Headers) {
-        unsafe {
-            let parts = (
-                self.version,
-                ptr::read(&self.body),
-                self.status,
-                ptr::read(&self.headers)
-            );
-            mem::forget(self);
-            parts
-        }
-    }
-
-    fn write_head(&mut self) -> io::Result<Body> {
-        debug!("writing head: {:?} {:?}", self.version, self.status);
-        try!(write!(&mut self.body, "{} {}\r\n", self.version, self.status));
-
-        if !self.headers.has::<header::Date>() {
-            self.headers.set(header::Date(header::HttpDate(now_utc())));
-        }
-
-        let body_type = match self.status {
-            status::StatusCode::NoContent | status::StatusCode::NotModified => Body::Empty,
-            c if c.class() == status::StatusClass::Informational => Body::Empty,
-            _ => if let Some(cl) = self.headers.get::<header::ContentLength>() {
-                Body::Sized(**cl)
-            } else {
-                Body::Chunked
-            }
-        };
-
-        // can't do in match above, thanks borrowck
-        if body_type == Body::Chunked {
-            let encodings = match self.headers.get_mut::<header::TransferEncoding>() {
-                Some(&mut header::TransferEncoding(ref mut encodings)) => {
-                    //TODO: check if chunked is already in encodings. use HashSet?
-                    encodings.push(header::Encoding::Chunked);
-                    false
-                },
-                None => true
-            };
-
-            if encodings {
-                self.headers.set::<header::TransferEncoding>(
-                    header::TransferEncoding(vec![header::Encoding::Chunked]))
-            }
-        }
-
-
-        debug!("headers [\n{:?}]", self.headers);
-        try!(write!(&mut self.body, "{}", self.headers));
-        try!(write!(&mut self.body, "{}", LINE_ENDING));
-
-        Ok(body_type)
-    }
-}
-
-impl<'a> Response<'a, Fresh> {
-    /// Creates a new Response that can be used to write to a network stream.
-    #[inline]
-    pub fn new(stream: &'a mut (Write + 'a), headers: &'a mut header::Headers) ->
-            Response<'a, Fresh> {
-        Response {
-            status: status::StatusCode::Ok,
-            version: version::HttpVersion::Http11,
-            headers: headers,
-            body: ThroughWriter(stream),
-            _writing: PhantomData,
-        }
-    }
-
-    /// Writes the body and ends the response.
-    ///
-    /// This is a shortcut method for when you have a response with a fixed
-    /// size, and would only need a single `write` call normally.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// # use hyper::server::Response;
-    /// fn handler(res: Response) {
-    ///     res.send(b"Hello World!").unwrap();
-    /// }
-    /// ```
-    ///
-    /// The above is the same, but shorter, than the longer:
-    ///
-    /// ```
-    /// # use hyper::server::Response;
-    /// use std::io::Write;
-    /// use hyper::header::ContentLength;
-    /// fn handler(mut res: Response) {
-    ///     let body = b"Hello World!";
-    ///     res.headers_mut().set(ContentLength(body.len() as u64));
-    ///     let mut res = res.start().unwrap();
-    ///     res.write_all(body).unwrap();
-    /// }
-    /// ```
-    #[inline]
-    pub fn send(mut self, body: &[u8]) -> io::Result<()> {
-        self.headers.set(header::ContentLength(body.len() as u64));
-        let mut stream = try!(self.start());
-        try!(stream.write_all(body));
-        stream.end()
-    }
-
-    /// Consume this Response<Fresh>, writing the Headers and Status and
-    /// creating a Response<Streaming>
-    pub fn start(mut self) -> io::Result<Response<'a, Streaming>> {
-        let body_type = try!(self.write_head());
-        let (version, body, status, headers) = self.deconstruct();
-        let stream = match body_type {
-            Body::Chunked => ChunkedWriter(body.into_inner()),
-            Body::Sized(len) => SizedWriter(body.into_inner(), len),
-            Body::Empty => EmptyWriter(body.into_inner()),
-        };
-
-        // "copy" to change the phantom type
-        Ok(Response {
-            version: version,
-            body: stream,
-            status: status,
-            headers: headers,
-            _writing: PhantomData,
-        })
-    }
-    /// Get a mutable reference to the status.
-    #[inline]
-    pub fn status_mut(&mut self) -> &mut status::StatusCode { &mut self.status }
-
-    /// Get a mutable reference to the Headers.
-    #[inline]
-    pub fn headers_mut(&mut self) -> &mut header::Headers { self.headers }
-}
-
-
-impl<'a> Response<'a, Streaming> {
-    /// Flushes all writing of a response to the client.
-    #[inline]
-    pub fn end(self) -> io::Result<()> {
-        trace!("ending");
-        let (_, body, _, _) = self.deconstruct();
-        try!(body.end());
-        Ok(())
-    }
-}
-
-impl<'a> Write for Response<'a, Streaming> {
-    #[inline]
-    fn write(&mut self, msg: &[u8]) -> io::Result<usize> {
-        debug!("write {:?} bytes", msg.len());
-        self.body.write(msg)
-    }
-
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        self.body.flush()
-    }
-}
-
-#[derive(PartialEq)]
-enum Body {
-    Chunked,
-    Sized(u64),
-    Empty,
-}
-
-impl<'a, T: Any> Drop for Response<'a, T> {
-    fn drop(&mut self) {
-        if TypeId::of::<T>() == TypeId::of::<Fresh>() {
-            if thread::panicking() {
-                self.status = status::StatusCode::InternalServerError;
-            }
-
-            let mut body = match self.write_head() {
-                Ok(Body::Chunked) => ChunkedWriter(self.body.get_mut()),
-                Ok(Body::Sized(len)) => SizedWriter(self.body.get_mut(), len),
-                Ok(Body::Empty) => EmptyWriter(self.body.get_mut()),
-                Err(e) => {
-                    debug!("error dropping request: {:?}", e);
-                    return;
-                }
-            };
-            end(&mut body);
-        } else {
-            end(&mut self.body);
-        };
-
-
-        #[inline]
-        fn end<W: Write>(w: &mut W) {
-            match w.write(&[]) {
-                Ok(_) => match w.flush() {
-                    Ok(_) => debug!("drop successful"),
-                    Err(e) => debug!("error dropping request: {:?}", e)
-                },
-                Err(e) => debug!("error dropping request: {:?}", e)
-            }
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use header::Headers;
-    use mock::MockStream;
-    use super::Response;
-
-    macro_rules! lines {
-        ($s:ident = $($line:pat),+) => ({
-            let s = String::from_utf8($s.write).unwrap();
-            let mut lines = s.split_terminator("\r\n");
-
-            $(
-                match lines.next() {
-                    Some($line) => (),
-                    other => panic!("line mismatch: {:?} != {:?}", other, stringify!($line))
-                }
-            )+
-
-            assert_eq!(lines.next(), None);
-        })
-    }
-
-    #[test]
-    fn test_fresh_start() {
-        let mut headers = Headers::new();
-        let mut stream = MockStream::new();
-        {
-            let res = Response::new(&mut stream, &mut headers);
-            res.start().unwrap().deconstruct();
-        }
-
-        lines! { stream =
-            "HTTP/1.1 200 OK",
-            _date,
-            _transfer_encoding,
-            ""
-        }
-    }
-
-    #[test]
-    fn test_streaming_end() {
-        let mut headers = Headers::new();
-        let mut stream = MockStream::new();
-        {
-            let res = Response::new(&mut stream, &mut headers);
-            res.start().unwrap().end().unwrap();
-        }
-
-        lines! { stream =
-            "HTTP/1.1 200 OK",
-            _date,
-            _transfer_encoding,
-            "",
-            "0",
-            "" // empty zero body
-        }
-    }
-
-    #[test]
-    fn test_fresh_drop() {
-        use status::StatusCode;
-        let mut headers = Headers::new();
-        let mut stream = MockStream::new();
-        {
-            let mut res = Response::new(&mut stream, &mut headers);
-            *res.status_mut() = StatusCode::NotFound;
-        }
-
-        lines! { stream =
-            "HTTP/1.1 404 Not Found",
-            _date,
-            _transfer_encoding,
-            "",
-            "0",
-            "" // empty zero body
-        }
-    }
-
-    // x86 windows msvc does not support unwinding
-    // See https://github.com/rust-lang/rust/issues/25869
-    #[cfg(not(all(windows, target_arch="x86", target_env="msvc")))]
-    #[test]
-    fn test_fresh_drop_panicing() {
-        use std::thread;
-        use std::sync::{Arc, Mutex};
-
-        use status::StatusCode;
-
-        let stream = MockStream::new();
-        let stream = Arc::new(Mutex::new(stream));
-        let inner_stream = stream.clone();
-        let join_handle = thread::spawn(move || {
-            let mut headers = Headers::new();
-            let mut stream = inner_stream.lock().unwrap();
-            let mut res = Response::new(&mut *stream, &mut headers);
-            *res.status_mut() = StatusCode::NotFound;
-
-            panic!("inside")
-        });
-
-        assert!(join_handle.join().is_err());
-
-        let stream = match stream.lock() {
-            Err(poisoned) => poisoned.into_inner().clone(),
-            Ok(_) => unreachable!()
-        };
-
-        lines! { stream =
-            "HTTP/1.1 500 Internal Server Error",
-            _date,
-            _transfer_encoding,
-            "",
-            "0",
-            "" // empty zero body
-        }
-    }
-
-
-    #[test]
-    fn test_streaming_drop() {
-        use std::io::Write;
-        use status::StatusCode;
-        let mut headers = Headers::new();
-        let mut stream = MockStream::new();
-        {
-            let mut res = Response::new(&mut stream, &mut headers);
-            *res.status_mut() = StatusCode::NotFound;
-            let mut stream = res.start().unwrap();
-            stream.write_all(b"foo").unwrap();
-        }
-
-        lines! { stream =
-            "HTTP/1.1 404 Not Found",
-            _date,
-            _transfer_encoding,
-            "",
-            "3",
-            "foo",
-            "0",
-            "" // empty zero body
-        }
-    }
-
-    #[test]
-    fn test_no_content() {
-        use status::StatusCode;
-        let mut headers = Headers::new();
-        let mut stream = MockStream::new();
-        {
-            let mut res = Response::new(&mut stream, &mut headers);
-            *res.status_mut() = StatusCode::NoContent;
-            res.start().unwrap();
-        }
-
-        lines! { stream =
-            "HTTP/1.1 204 No Content",
-            _date,
-            ""
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/status.rs
+++ /dev/null
@@ -1,748 +0,0 @@
-//! HTTP status codes
-use std::fmt;
-use std::cmp::Ordering;
-
-// shamelessly lifted from Teepee. I tried a few schemes, this really
-// does seem like the best. Improved scheme to support arbitrary status codes.
-
-/// An HTTP status code (`status-code` in RFC 7230 et al.).
-///
-/// This enum contains all common status codes and an Unregistered
-/// extension variant. It allows status codes in the range [0, 65535], as any
-/// `u16` integer may be used as a status code for XHR requests. It is
-/// recommended to only use values between [100, 599], since only these are
-/// defined as valid status codes with a status class by HTTP.
-///
-/// If you encounter a status code that you do not know how to deal with, you
-/// should treat it as the `x00` status code—e.g. for code 123, treat it as
-/// 100 (Continue). This can be achieved with
-/// `self.class().default_code()`:
-///
-/// ```rust
-/// # use hyper::status::StatusCode;
-/// let status = StatusCode::Unregistered(123);
-/// assert_eq!(status.class().default_code(), StatusCode::Continue);
-/// ```
-///
-/// IANA maintain the [Hypertext Transfer Protocol (HTTP) Status Code
-/// Registry](http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) which is
-/// the source for this enum (with one exception, 418 I'm a teapot, which is
-/// inexplicably not in the register).
-#[derive(Debug, Hash)]
-pub enum StatusCode {
-    /// 100 Continue
-    /// [[RFC7231, Section 6.2.1](https://tools.ietf.org/html/rfc7231#section-6.2.1)]
-    Continue,
-    /// 101 Switching Protocols
-    /// [[RFC7231, Section 6.2.2](https://tools.ietf.org/html/rfc7231#section-6.2.2)]
-    SwitchingProtocols,
-    /// 102 Processing
-    /// [[RFC2518](https://tools.ietf.org/html/rfc2518)]
-    Processing,
-
-    /// 200 OK
-    /// [[RFC7231, Section 6.3.1](https://tools.ietf.org/html/rfc7231#section-6.3.1)]
-    Ok,
-    /// 201 Created
-    /// [[RFC7231, Section 6.3.2](https://tools.ietf.org/html/rfc7231#section-6.3.2)]
-    Created,
-    /// 202 Accepted
-    /// [[RFC7231, Section 6.3.3](https://tools.ietf.org/html/rfc7231#section-6.3.3)]
-    Accepted,
-    /// 203 Non-Authoritative Information
-    /// [[RFC7231, Section 6.3.4](https://tools.ietf.org/html/rfc7231#section-6.3.4)]
-    NonAuthoritativeInformation,
-    /// 204 No Content
-    /// [[RFC7231, Section 6.3.5](https://tools.ietf.org/html/rfc7231#section-6.3.5)]
-    NoContent,
-    /// 205 Reset Content
-    /// [[RFC7231, Section 6.3.6](https://tools.ietf.org/html/rfc7231#section-6.3.6)]
-    ResetContent,
-    /// 206 Partial Content
-    /// [[RFC7233, Section 4.1](https://tools.ietf.org/html/rfc7233#section-4.1)]
-    PartialContent,
-    /// 207 Multi-Status
-    /// [[RFC4918](https://tools.ietf.org/html/rfc4918)]
-    MultiStatus,
-    /// 208 Already Reported
-    /// [[RFC5842](https://tools.ietf.org/html/rfc5842)]
-    AlreadyReported,
-
-    /// 226 IM Used
-    /// [[RFC3229](https://tools.ietf.org/html/rfc3229)]
-    ImUsed,
-
-    /// 300 Multiple Choices
-    /// [[RFC7231, Section 6.4.1](https://tools.ietf.org/html/rfc7231#section-6.4.1)]
-    MultipleChoices,
-    /// 301 Moved Permanently
-    /// [[RFC7231, Section 6.4.2](https://tools.ietf.org/html/rfc7231#section-6.4.2)]
-    MovedPermanently,
-    /// 302 Found
-    /// [[RFC7231, Section 6.4.3](https://tools.ietf.org/html/rfc7231#section-6.4.3)]
-    Found,
-    /// 303 See Other
-    /// [[RFC7231, Section 6.4.4](https://tools.ietf.org/html/rfc7231#section-6.4.4)]
-    SeeOther,
-    /// 304 Not Modified
-    /// [[RFC7232, Section 4.1](https://tools.ietf.org/html/rfc7232#section-4.1)]
-    NotModified,
-    /// 305 Use Proxy
-    /// [[RFC7231, Section 6.4.5](https://tools.ietf.org/html/rfc7231#section-6.4.5)]
-    UseProxy,
-    /// 307 Temporary Redirect
-    /// [[RFC7231, Section 6.4.7](https://tools.ietf.org/html/rfc7231#section-6.4.7)]
-    TemporaryRedirect,
-    /// 308 Permanent Redirect
-    /// [[RFC7238](https://tools.ietf.org/html/rfc7238)]
-    PermanentRedirect,
-
-    /// 400 Bad Request
-    /// [[RFC7231, Section 6.5.1](https://tools.ietf.org/html/rfc7231#section-6.5.1)]
-    BadRequest,
-    /// 401 Unauthorized
-    /// [[RFC7235, Section 3.1](https://tools.ietf.org/html/rfc7235#section-3.1)]
-    Unauthorized,
-    /// 402 Payment Required
-    /// [[RFC7231, Section 6.5.2](https://tools.ietf.org/html/rfc7231#section-6.5.2)]
-    PaymentRequired,
-    /// 403 Forbidden
-    /// [[RFC7231, Section 6.5.3](https://tools.ietf.org/html/rfc7231#section-6.5.3)]
-    Forbidden,
-    /// 404 Not Found
-    /// [[RFC7231, Section 6.5.4](https://tools.ietf.org/html/rfc7231#section-6.5.4)]
-    NotFound,
-    /// 405 Method Not Allowed
-    /// [[RFC7231, Section 6.5.5](https://tools.ietf.org/html/rfc7231#section-6.5.5)]
-    MethodNotAllowed,
-    /// 406 Not Acceptable
-    /// [[RFC7231, Section 6.5.6](https://tools.ietf.org/html/rfc7231#section-6.5.6)]
-    NotAcceptable,
-    /// 407 Proxy Authentication Required
-    /// [[RFC7235, Section 3.2](https://tools.ietf.org/html/rfc7235#section-3.2)]
-    ProxyAuthenticationRequired,
-    /// 408 Request Timeout
-    /// [[RFC7231, Section 6.5.7](https://tools.ietf.org/html/rfc7231#section-6.5.7)]
-    RequestTimeout,
-    /// 409 Conflict
-    /// [[RFC7231, Section 6.5.8](https://tools.ietf.org/html/rfc7231#section-6.5.8)]
-    Conflict,
-    /// 410 Gone
-    /// [[RFC7231, Section 6.5.9](https://tools.ietf.org/html/rfc7231#section-6.5.9)]
-    Gone,
-    /// 411 Length Required
-    /// [[RFC7231, Section 6.5.10](https://tools.ietf.org/html/rfc7231#section-6.5.10)]
-    LengthRequired,
-    /// 412 Precondition Failed
-    /// [[RFC7232, Section 4.2](https://tools.ietf.org/html/rfc7232#section-4.2)]
-    PreconditionFailed,
-    /// 413 Payload Too Large
-    /// [[RFC7231, Section 6.5.11](https://tools.ietf.org/html/rfc7231#section-6.5.11)]
-    PayloadTooLarge,
-    /// 414 URI Too Long
-    /// [[RFC7231, Section 6.5.12](https://tools.ietf.org/html/rfc7231#section-6.5.12)]
-    UriTooLong,
-    /// 415 Unsupported Media Type
-    /// [[RFC7231, Section 6.5.13](https://tools.ietf.org/html/rfc7231#section-6.5.13)]
-    UnsupportedMediaType,
-    /// 416 Range Not Satisfiable
-    /// [[RFC7233, Section 4.4](https://tools.ietf.org/html/rfc7233#section-4.4)]
-    RangeNotSatisfiable,
-    /// 417 Expectation Failed
-    /// [[RFC7231, Section 6.5.14](https://tools.ietf.org/html/rfc7231#section-6.5.14)]
-    ExpectationFailed,
-    /// 418 I'm a teapot
-    /// [curiously, not registered by IANA, but [RFC2324](https://tools.ietf.org/html/rfc2324)]
-    ImATeapot,
-
-    /// 421 Misdirected Request
-    /// [RFC7540, Section 9.1.2](http://tools.ietf.org/html/rfc7540#section-9.1.2)
-    MisdirectedRequest,
-    /// 422 Unprocessable Entity
-    /// [[RFC4918](https://tools.ietf.org/html/rfc4918)]
-    UnprocessableEntity,
-    /// 423 Locked
-    /// [[RFC4918](https://tools.ietf.org/html/rfc4918)]
-    Locked,
-    /// 424 Failed Dependency
-    /// [[RFC4918](https://tools.ietf.org/html/rfc4918)]
-    FailedDependency,
-
-    /// 426 Upgrade Required
-    /// [[RFC7231, Section 6.5.15](https://tools.ietf.org/html/rfc7231#section-6.5.15)]
-    UpgradeRequired,
-
-    /// 428 Precondition Required
-    /// [[RFC6585](https://tools.ietf.org/html/rfc6585)]
-    PreconditionRequired,
-    /// 429 Too Many Requests
-    /// [[RFC6585](https://tools.ietf.org/html/rfc6585)]
-    TooManyRequests,
-
-    /// 431 Request Header Fields Too Large
-    /// [[RFC6585](https://tools.ietf.org/html/rfc6585)]
-    RequestHeaderFieldsTooLarge,
-
-    /// 451 Unavailable For Legal Reasons
-    /// [[RFC7725](http://tools.ietf.org/html/rfc7725)]
-    UnavailableForLegalReasons,
-
-    /// 500 Internal Server Error
-    /// [[RFC7231, Section 6.6.1](https://tools.ietf.org/html/rfc7231#section-6.6.1)]
-    InternalServerError,
-    /// 501 Not Implemented
-    /// [[RFC7231, Section 6.6.2](https://tools.ietf.org/html/rfc7231#section-6.6.2)]
-    NotImplemented,
-    /// 502 Bad Gateway
-    /// [[RFC7231, Section 6.6.3](https://tools.ietf.org/html/rfc7231#section-6.6.3)]
-    BadGateway,
-    /// 503 Service Unavailable
-    /// [[RFC7231, Section 6.6.4](https://tools.ietf.org/html/rfc7231#section-6.6.4)]
-    ServiceUnavailable,
-    /// 504 Gateway Timeout
-    /// [[RFC7231, Section 6.6.5](https://tools.ietf.org/html/rfc7231#section-6.6.5)]
-    GatewayTimeout,
-    /// 505 HTTP Version Not Supported
-    /// [[RFC7231, Section 6.6.6](https://tools.ietf.org/html/rfc7231#section-6.6.6)]
-    HttpVersionNotSupported,
-    /// 506 Variant Also Negotiates
-    /// [[RFC2295](https://tools.ietf.org/html/rfc2295)]
-    VariantAlsoNegotiates,
-    /// 507 Insufficient Storage
-    /// [[RFC4918](https://tools.ietf.org/html/rfc4918)]
-    InsufficientStorage,
-    /// 508 Loop Detected
-    /// [[RFC5842](https://tools.ietf.org/html/rfc5842)]
-    LoopDetected,
-
-    /// 510 Not Extended
-    /// [[RFC2774](https://tools.ietf.org/html/rfc2774)]
-    NotExtended,
-    /// 511 Network Authentication Required
-    /// [[RFC6585](https://tools.ietf.org/html/rfc6585)]
-    NetworkAuthenticationRequired,
-
-    /// A status code not in the IANA HTTP status code registry or very well known
-    // `ImATeapot` is not registered.
-    Unregistered(u16),
-}
-
-impl StatusCode {
-
-    #[doc(hidden)]
-    pub fn from_u16(n: u16) -> StatusCode {
-        match n {
-            100 => StatusCode::Continue,
-            101 => StatusCode::SwitchingProtocols,
-            102 => StatusCode::Processing,
-            200 => StatusCode::Ok,
-            201 => StatusCode::Created,
-            202 => StatusCode::Accepted,
-            203 => StatusCode::NonAuthoritativeInformation,
-            204 => StatusCode::NoContent,
-            205 => StatusCode::ResetContent,
-            206 => StatusCode::PartialContent,
-            207 => StatusCode::MultiStatus,
-            208 => StatusCode::AlreadyReported,
-            226 => StatusCode::ImUsed,
-            300 => StatusCode::MultipleChoices,
-            301 => StatusCode::MovedPermanently,
-            302 => StatusCode::Found,
-            303 => StatusCode::SeeOther,
-            304 => StatusCode::NotModified,
-            305 => StatusCode::UseProxy,
-            307 => StatusCode::TemporaryRedirect,
-            308 => StatusCode::PermanentRedirect,
-            400 => StatusCode::BadRequest,
-            401 => StatusCode::Unauthorized,
-            402 => StatusCode::PaymentRequired,
-            403 => StatusCode::Forbidden,
-            404 => StatusCode::NotFound,
-            405 => StatusCode::MethodNotAllowed,
-            406 => StatusCode::NotAcceptable,
-            407 => StatusCode::ProxyAuthenticationRequired,
-            408 => StatusCode::RequestTimeout,
-            409 => StatusCode::Conflict,
-            410 => StatusCode::Gone,
-            411 => StatusCode::LengthRequired,
-            412 => StatusCode::PreconditionFailed,
-            413 => StatusCode::PayloadTooLarge,
-            414 => StatusCode::UriTooLong,
-            415 => StatusCode::UnsupportedMediaType,
-            416 => StatusCode::RangeNotSatisfiable,
-            417 => StatusCode::ExpectationFailed,
-            418 => StatusCode::ImATeapot,
-            421 => StatusCode::MisdirectedRequest,
-            422 => StatusCode::UnprocessableEntity,
-            423 => StatusCode::Locked,
-            424 => StatusCode::FailedDependency,
-            426 => StatusCode::UpgradeRequired,
-            428 => StatusCode::PreconditionRequired,
-            429 => StatusCode::TooManyRequests,
-            431 => StatusCode::RequestHeaderFieldsTooLarge,
-            451 => StatusCode::UnavailableForLegalReasons,
-            500 => StatusCode::InternalServerError,
-            501 => StatusCode::NotImplemented,
-            502 => StatusCode::BadGateway,
-            503 => StatusCode::ServiceUnavailable,
-            504 => StatusCode::GatewayTimeout,
-            505 => StatusCode::HttpVersionNotSupported,
-            506 => StatusCode::VariantAlsoNegotiates,
-            507 => StatusCode::InsufficientStorage,
-            508 => StatusCode::LoopDetected,
-            510 => StatusCode::NotExtended,
-            511 => StatusCode::NetworkAuthenticationRequired,
-            _ => StatusCode::Unregistered(n),
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn to_u16(&self) -> u16 {
-        match *self {
-            StatusCode::Continue => 100,
-            StatusCode::SwitchingProtocols => 101,
-            StatusCode::Processing => 102,
-            StatusCode::Ok => 200,
-            StatusCode::Created => 201,
-            StatusCode::Accepted => 202,
-            StatusCode::NonAuthoritativeInformation => 203,
-            StatusCode::NoContent => 204,
-            StatusCode::ResetContent => 205,
-            StatusCode::PartialContent => 206,
-            StatusCode::MultiStatus => 207,
-            StatusCode::AlreadyReported => 208,
-            StatusCode::ImUsed => 226,
-            StatusCode::MultipleChoices => 300,
-            StatusCode::MovedPermanently => 301,
-            StatusCode::Found => 302,
-            StatusCode::SeeOther => 303,
-            StatusCode::NotModified => 304,
-            StatusCode::UseProxy => 305,
-            StatusCode::TemporaryRedirect => 307,
-            StatusCode::PermanentRedirect => 308,
-            StatusCode::BadRequest => 400,
-            StatusCode::Unauthorized => 401,
-            StatusCode::PaymentRequired => 402,
-            StatusCode::Forbidden => 403,
-            StatusCode::NotFound => 404,
-            StatusCode::MethodNotAllowed => 405,
-            StatusCode::NotAcceptable => 406,
-            StatusCode::ProxyAuthenticationRequired => 407,
-            StatusCode::RequestTimeout => 408,
-            StatusCode::Conflict => 409,
-            StatusCode::Gone => 410,
-            StatusCode::LengthRequired => 411,
-            StatusCode::PreconditionFailed => 412,
-            StatusCode::PayloadTooLarge => 413,
-            StatusCode::UriTooLong => 414,
-            StatusCode::UnsupportedMediaType => 415,
-            StatusCode::RangeNotSatisfiable => 416,
-            StatusCode::ExpectationFailed => 417,
-            StatusCode::ImATeapot => 418,
-            StatusCode::MisdirectedRequest => 421,
-            StatusCode::UnprocessableEntity => 422,
-            StatusCode::Locked => 423,
-            StatusCode::FailedDependency => 424,
-            StatusCode::UpgradeRequired => 426,
-            StatusCode::PreconditionRequired => 428,
-            StatusCode::TooManyRequests => 429,
-            StatusCode::RequestHeaderFieldsTooLarge => 431,
-            StatusCode::UnavailableForLegalReasons => 451,
-            StatusCode::InternalServerError => 500,
-            StatusCode::NotImplemented => 501,
-            StatusCode::BadGateway => 502,
-            StatusCode::ServiceUnavailable => 503,
-            StatusCode::GatewayTimeout => 504,
-            StatusCode::HttpVersionNotSupported => 505,
-            StatusCode::VariantAlsoNegotiates => 506,
-            StatusCode::InsufficientStorage => 507,
-            StatusCode::LoopDetected => 508,
-            StatusCode::NotExtended => 510,
-            StatusCode::NetworkAuthenticationRequired => 511,
-            StatusCode::Unregistered(n) => n,
-        }
-    }
-
-    /// Get the standardised `reason-phrase` for this status code.
-    ///
-    /// This is mostly here for servers writing responses, but could potentially have application
-    /// at other times.
-    ///
-    /// The reason phrase is defined as being exclusively for human readers. You should avoid
-    /// deriving any meaning from it at all costs.
-    ///
-    /// Bear in mind also that in HTTP/2.0 the reason phrase is abolished from transmission, and so
-    /// this canonical reason phrase really is the only reason phrase you’ll find.
-    pub fn canonical_reason(&self) -> Option<&'static str> {
-        match *self {
-            StatusCode::Continue => Some("Continue"),
-            StatusCode::SwitchingProtocols => Some("Switching Protocols"),
-            StatusCode::Processing => Some("Processing"),
-
-            StatusCode::Ok => Some("OK"),
-            StatusCode::Created => Some("Created"),
-            StatusCode::Accepted => Some("Accepted"),
-            StatusCode::NonAuthoritativeInformation => Some("Non-Authoritative Information"),
-            StatusCode::NoContent => Some("No Content"),
-            StatusCode::ResetContent => Some("Reset Content"),
-            StatusCode::PartialContent => Some("Partial Content"),
-            StatusCode::MultiStatus => Some("Multi-Status"),
-            StatusCode::AlreadyReported => Some("Already Reported"),
-
-            StatusCode::ImUsed => Some("IM Used"),
-
-            StatusCode::MultipleChoices => Some("Multiple Choices"),
-            StatusCode::MovedPermanently => Some("Moved Permanently"),
-            StatusCode::Found => Some("Found"),
-            StatusCode::SeeOther => Some("See Other"),
-            StatusCode::NotModified => Some("Not Modified"),
-            StatusCode::UseProxy => Some("Use Proxy"),
-
-            StatusCode::TemporaryRedirect => Some("Temporary Redirect"),
-            StatusCode::PermanentRedirect => Some("Permanent Redirect"),
-
-            StatusCode::BadRequest => Some("Bad Request"),
-            StatusCode::Unauthorized => Some("Unauthorized"),
-            StatusCode::PaymentRequired => Some("Payment Required"),
-            StatusCode::Forbidden => Some("Forbidden"),
-            StatusCode::NotFound => Some("Not Found"),
-            StatusCode::MethodNotAllowed => Some("Method Not Allowed"),
-            StatusCode::NotAcceptable => Some("Not Acceptable"),
-            StatusCode::ProxyAuthenticationRequired => Some("Proxy Authentication Required"),
-            StatusCode::RequestTimeout => Some("Request Timeout"),
-            StatusCode::Conflict => Some("Conflict"),
-            StatusCode::Gone => Some("Gone"),
-            StatusCode::LengthRequired => Some("Length Required"),
-            StatusCode::PreconditionFailed => Some("Precondition Failed"),
-            StatusCode::PayloadTooLarge => Some("Payload Too Large"),
-            StatusCode::UriTooLong => Some("URI Too Long"),
-            StatusCode::UnsupportedMediaType => Some("Unsupported Media Type"),
-            StatusCode::RangeNotSatisfiable => Some("Range Not Satisfiable"),
-            StatusCode::ExpectationFailed => Some("Expectation Failed"),
-            StatusCode::ImATeapot => Some("I'm a teapot"),
-
-            StatusCode::MisdirectedRequest => Some("Misdirected Request"),
-            StatusCode::UnprocessableEntity => Some("Unprocessable Entity"),
-            StatusCode::Locked => Some("Locked"),
-            StatusCode::FailedDependency => Some("Failed Dependency"),
-
-            StatusCode::UpgradeRequired => Some("Upgrade Required"),
-
-            StatusCode::PreconditionRequired => Some("Precondition Required"),
-            StatusCode::TooManyRequests => Some("Too Many Requests"),
-
-            StatusCode::RequestHeaderFieldsTooLarge => Some("Request Header Fields Too Large"),
-
-            StatusCode::UnavailableForLegalReasons => Some("Unavailable For Legal Reasons"),
-
-            StatusCode::InternalServerError => Some("Internal Server Error"),
-            StatusCode::NotImplemented => Some("Not Implemented"),
-            StatusCode::BadGateway => Some("Bad Gateway"),
-            StatusCode::ServiceUnavailable => Some("Service Unavailable"),
-            StatusCode::GatewayTimeout => Some("Gateway Timeout"),
-            StatusCode::HttpVersionNotSupported => Some("HTTP Version Not Supported"),
-            StatusCode::VariantAlsoNegotiates => Some("Variant Also Negotiates"),
-            StatusCode::InsufficientStorage => Some("Insufficient Storage"),
-            StatusCode::LoopDetected => Some("Loop Detected"),
-
-            StatusCode::NotExtended => Some("Not Extended"),
-            StatusCode::NetworkAuthenticationRequired => Some("Network Authentication Required"),
-            StatusCode::Unregistered(..) => None
-        }
-    }
-
-    /// Determine the class of a status code, based on its first digit.
-    pub fn class(&self) -> StatusClass {
-        match self.to_u16() {
-            100...199 => StatusClass::Informational,
-            200...299 => StatusClass::Success,
-            300...399 => StatusClass::Redirection,
-            400...499 => StatusClass::ClientError,
-            500...599 => StatusClass::ServerError,
-            _ => StatusClass::NoClass,
-        }
-    }
-
-    /// Check if class is Informational.
-    pub fn is_informational(&self) -> bool {
-        self.class() == StatusClass::Informational
-    }
-
-    /// Check if class is Success.
-    pub fn is_success(&self) -> bool {
-        self.class() == StatusClass::Success
-    }
-
-    /// Check if class is Redirection.
-    pub fn is_redirection(&self) -> bool {
-        self.class() == StatusClass::Redirection
-    }
-
-    /// Check if class is ClientError.
-    pub fn is_client_error(&self) -> bool {
-        self.class() == StatusClass::ClientError
-    }
-
-    /// Check if class is ServerError.
-    pub fn is_server_error(&self) -> bool {
-        self.class() == StatusClass::ServerError
-    }
-
-    /// Check if class is NoClass
-    pub fn is_strange_status(&self) -> bool {
-        self.class() == StatusClass::NoClass
-    }
-}
-
-impl Copy for StatusCode {}
-
-/// Formats the status code, *including* the canonical reason.
-///
-/// ```rust
-/// # use hyper::status::StatusCode::{ImATeapot, Unregistered};
-/// assert_eq!(format!("{}", ImATeapot), "418 I'm a teapot");
-/// assert_eq!(format!("{}", Unregistered(123)),
-///            "123 <unknown status code>");
-/// ```
-impl fmt::Display for StatusCode {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{} {}", self.to_u16(),
-               self.canonical_reason().unwrap_or("<unknown status code>"))
-    }
-}
-
-impl PartialEq for StatusCode {
-    #[inline]
-    fn eq(&self, other: &StatusCode) -> bool {
-        self.to_u16() == other.to_u16()
-    }
-}
-
-impl Eq for StatusCode {}
-
-impl Clone for StatusCode {
-    #[inline]
-    fn clone(&self) -> StatusCode {
-        *self
-    }
-}
-
-impl PartialOrd for StatusCode {
-    #[inline]
-    fn partial_cmp(&self, other: &StatusCode) -> Option<Ordering> {
-        self.to_u16().partial_cmp(&(other.to_u16()))
-    }
-}
-
-impl Ord for StatusCode {
-    #[inline]
-    fn cmp(&self, other: &StatusCode) -> Ordering {
-        if *self < *other {
-            Ordering::Less
-        } else if *self > *other {
-            Ordering::Greater
-        } else {
-            Ordering::Equal
-        }
-    }
-}
-
-/// The class of an HTTP `status-code`.
-///
-/// [RFC 7231, section 6 (Response Status Codes)](https://tools.ietf.org/html/rfc7231#section-6):
-///
-/// > The first digit of the status-code defines the class of response.
-/// > The last two digits do not have any categorization role.
-///
-/// And:
-///
-/// > HTTP status codes are extensible.  HTTP clients are not required to
-/// > understand the meaning of all registered status codes, though such
-/// > understanding is obviously desirable.  However, a client MUST
-/// > understand the class of any status code, as indicated by the first
-/// > digit, and treat an unrecognized status code as being equivalent to
-/// > the x00 status code of that class, with the exception that a
-/// > recipient MUST NOT cache a response with an unrecognized status code.
-/// >
-/// > For example, if an unrecognized status code of 471 is received by a
-/// > client, the client can assume that there was something wrong with its
-/// > request and treat the response as if it had received a 400 (Bad
-/// > Request) status code.  The response message will usually contain a
-/// > representation that explains the status.
-///
-/// This can be used in cases where a status code’s meaning is unknown, also,
-/// to get the appropriate *category* of status.
-#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Copy)]
-pub enum StatusClass {
-    /// 1xx (Informational): The request was received, continuing process
-    Informational,
-
-    /// 2xx (Success): The request was successfully received, understood, and accepted
-    Success,
-
-    /// 3xx (Redirection): Further action needs to be taken in order to complete the request
-    Redirection,
-
-    /// 4xx (Client Error): The request contains bad syntax or cannot be fulfilled
-    ClientError,
-
-    /// 5xx (Server Error): The server failed to fulfill an apparently valid request
-    ServerError,
-
-    /// A status code lower than 100 or higher than 599. These codes do no belong to any class.
-    NoClass,
-}
-
-impl StatusClass {
-    /// Get the default status code for the class.
-    ///
-    /// This produces the x00 status code; thus, for `ClientError` (4xx), for
-    /// example, this will produce `BadRequest` (400):
-    ///
-    /// ```rust
-    /// # use hyper::status::StatusClass::ClientError;
-    /// # use hyper::status::StatusCode::BadRequest;
-    /// assert_eq!(ClientError.default_code(), BadRequest);
-    /// ```
-    ///
-    /// The use for this is outlined in [RFC 7231, section 6 (Response Status
-    /// Codes)](https://tools.ietf.org/html/rfc7231#section-6):
-    ///
-    /// > HTTP status codes are extensible.  HTTP clients are not required to
-    /// > understand the meaning of all registered status codes, though such
-    /// > understanding is obviously desirable.  However, a client MUST
-    /// > understand the class of any status code, as indicated by the first
-    /// > digit, and treat an unrecognized status code as being equivalent to
-    /// > the x00 status code of that class, with the exception that a
-    /// > recipient MUST NOT cache a response with an unrecognized status code.
-    /// >
-    /// > For example, if an unrecognized status code of 471 is received by a
-    /// > client, the client can assume that there was something wrong with its
-    /// > request and treat the response as if it had received a 400 (Bad
-    /// > Request) status code.  The response message will usually contain a
-    /// > representation that explains the status.
-    ///
-    /// This is demonstrated thusly:
-    ///
-    /// ```rust
-    /// # use hyper::status::StatusCode::{Unregistered, BadRequest};
-    /// // Suppose we have received this status code.
-    /// // You will never directly create an unregistered status code.
-    /// let status = Unregistered(471);
-    ///
-    /// // Uh oh! Don’t know what to do with it.
-    /// // Let’s fall back to the default:
-    /// let status = status.class().default_code();
-    ///
-    /// // And look! That is 400 Bad Request.
-    /// assert_eq!(status, BadRequest);
-    /// // So now let’s treat it as that.
-    /// ```
-    /// All status codes that do not map to an existing status class are matched
-    /// by a `NoClass`, variant that resolves to 200 (Ok) as default code.
-    /// This is a common handling for unknown status codes in major browsers.
-    pub fn default_code(&self) -> StatusCode {
-        match *self {
-            StatusClass::Informational => StatusCode::Continue,
-            StatusClass::Success => StatusCode::Ok,
-            StatusClass::Redirection => StatusCode::MultipleChoices,
-            StatusClass::ClientError => StatusCode::BadRequest,
-            StatusClass::ServerError => StatusCode::InternalServerError,
-            StatusClass::NoClass => StatusCode::Ok,
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-    use super::StatusCode::*;
-
-    // Check that the following entities are properly inter-connected:
-    //   - numerical code
-    //   - status code
-    //   - default code (for the given status code)
-    //   - canonical reason
-    fn validate(num: u16, status_code: StatusCode, default_code: StatusCode, reason: Option<&str>) {
-        assert_eq!(StatusCode::from_u16(num), status_code);
-        assert_eq!(status_code.to_u16(), num);
-        assert_eq!(status_code.class().default_code(), default_code);
-        assert_eq!(status_code.canonical_reason(), reason);
-    }
-
-    #[test]
-    fn test_status_code() {
-        validate(99, Unregistered(99), Ok, None);
-
-        validate(100, Continue, Continue, Some("Continue"));
-        validate(101, SwitchingProtocols, Continue, Some("Switching Protocols"));
-        validate(102, Processing, Continue, Some("Processing"));
-
-        validate(200, Ok, Ok, Some("OK"));
-        validate(201, Created, Ok, Some("Created"));
-        validate(202, Accepted, Ok, Some("Accepted"));
-        validate(203, NonAuthoritativeInformation, Ok, Some("Non-Authoritative Information"));
-        validate(204, NoContent, Ok, Some("No Content"));
-        validate(205, ResetContent, Ok, Some("Reset Content"));
-        validate(206, PartialContent, Ok, Some("Partial Content"));
-        validate(207, MultiStatus, Ok, Some("Multi-Status"));
-        validate(208, AlreadyReported, Ok, Some("Already Reported"));
-        validate(226, ImUsed, Ok, Some("IM Used"));
-
-        validate(300, MultipleChoices, MultipleChoices, Some("Multiple Choices"));
-        validate(301, MovedPermanently, MultipleChoices, Some("Moved Permanently"));
-        validate(302, Found, MultipleChoices, Some("Found"));
-        validate(303, SeeOther, MultipleChoices, Some("See Other"));
-        validate(304, NotModified, MultipleChoices, Some("Not Modified"));
-        validate(305, UseProxy, MultipleChoices, Some("Use Proxy"));
-        validate(307, TemporaryRedirect, MultipleChoices, Some("Temporary Redirect"));
-        validate(308, PermanentRedirect, MultipleChoices, Some("Permanent Redirect"));
-
-        validate(400, BadRequest, BadRequest, Some("Bad Request"));
-        validate(401, Unauthorized, BadRequest, Some("Unauthorized"));
-        validate(402, PaymentRequired, BadRequest, Some("Payment Required"));
-        validate(403, Forbidden, BadRequest, Some("Forbidden"));
-        validate(404, NotFound, BadRequest, Some("Not Found"));
-        validate(405, MethodNotAllowed, BadRequest, Some("Method Not Allowed"));
-        validate(406, NotAcceptable, BadRequest, Some("Not Acceptable"));
-        validate(407, ProxyAuthenticationRequired, BadRequest,
-            Some("Proxy Authentication Required"));
-        validate(408, RequestTimeout, BadRequest, Some("Request Timeout"));
-        validate(409, Conflict, BadRequest, Some("Conflict"));
-        validate(410, Gone, BadRequest, Some("Gone"));
-        validate(411, LengthRequired, BadRequest, Some("Length Required"));
-        validate(412, PreconditionFailed, BadRequest, Some("Precondition Failed"));
-        validate(413, PayloadTooLarge, BadRequest, Some("Payload Too Large"));
-        validate(414, UriTooLong, BadRequest, Some("URI Too Long"));
-        validate(415, UnsupportedMediaType, BadRequest, Some("Unsupported Media Type"));
-        validate(416, RangeNotSatisfiable, BadRequest, Some("Range Not Satisfiable"));
-        validate(417, ExpectationFailed, BadRequest, Some("Expectation Failed"));
-        validate(418, ImATeapot, BadRequest, Some("I'm a teapot"));
-        validate(421, MisdirectedRequest, BadRequest, Some("Misdirected Request"));
-        validate(422, UnprocessableEntity, BadRequest, Some("Unprocessable Entity"));
-        validate(423, Locked, BadRequest, Some("Locked"));
-        validate(424, FailedDependency, BadRequest, Some("Failed Dependency"));
-        validate(426, UpgradeRequired, BadRequest, Some("Upgrade Required"));
-        validate(428, PreconditionRequired, BadRequest, Some("Precondition Required"));
-        validate(429, TooManyRequests, BadRequest, Some("Too Many Requests"));
-        validate(431, RequestHeaderFieldsTooLarge, BadRequest,
-            Some("Request Header Fields Too Large"));
-        validate(451, UnavailableForLegalReasons, BadRequest,
-            Some("Unavailable For Legal Reasons"));
-
-        validate(500, InternalServerError, InternalServerError, Some("Internal Server Error"));
-        validate(501, NotImplemented, InternalServerError, Some("Not Implemented"));
-        validate(502, BadGateway, InternalServerError, Some("Bad Gateway"));
-        validate(503, ServiceUnavailable, InternalServerError, Some("Service Unavailable"));
-        validate(504, GatewayTimeout, InternalServerError, Some("Gateway Timeout"));
-        validate(505, HttpVersionNotSupported, InternalServerError,
-            Some("HTTP Version Not Supported"));
-        validate(506, VariantAlsoNegotiates, InternalServerError, Some("Variant Also Negotiates"));
-        validate(507, InsufficientStorage, InternalServerError, Some("Insufficient Storage"));
-        validate(508, LoopDetected, InternalServerError, Some("Loop Detected"));
-        validate(510, NotExtended, InternalServerError, Some("Not Extended"));
-        validate(511, NetworkAuthenticationRequired, InternalServerError,
-            Some("Network Authentication Required"));
-
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/uri.rs
+++ /dev/null
@@ -1,110 +0,0 @@
-//! HTTP RequestUris
-use std::fmt::{Display, self};
-use std::str::FromStr;
-use url::Url;
-use url::ParseError as UrlError;
-
-use Error;
-
-/// The Request-URI of a Request's StartLine.
-///
-/// From Section 5.3, Request Target:
-/// > Once an inbound connection is obtained, the client sends an HTTP
-/// > request message (Section 3) with a request-target derived from the
-/// > target URI.  There are four distinct formats for the request-target,
-/// > depending on both the method being requested and whether the request
-/// > is to a proxy.
-/// >
-/// > ```notrust
-/// > request-target = origin-form
-/// >                / absolute-form
-/// >                / authority-form
-/// >                / asterisk-form
-/// > ```
-#[derive(Debug, PartialEq, Clone)]
-pub enum RequestUri {
-    /// The most common request target, an absolute path and optional query.
-    ///
-    /// For example, the line `GET /where?q=now HTTP/1.1` would parse the URI
-    /// as `AbsolutePath("/where?q=now".to_string())`.
-    AbsolutePath(String),
-
-    /// An absolute URI. Used in conjunction with proxies.
-    ///
-    /// > When making a request to a proxy, other than a CONNECT or server-wide
-    /// > OPTIONS request (as detailed below), a client MUST send the target
-    /// > URI in absolute-form as the request-target.
-    ///
-    /// An example StartLine with an `AbsoluteUri` would be
-    /// `GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1`.
-    AbsoluteUri(Url),
-
-    /// The authority form is only for use with `CONNECT` requests.
-    ///
-    /// An example StartLine: `CONNECT www.example.com:80 HTTP/1.1`.
-    Authority(String),
-
-    /// The star is used to target the entire server, instead of a specific resource.
-    ///
-    /// This is only used for a server-wide `OPTIONS` request.
-    Star,
-}
-
-impl FromStr for RequestUri {
-    type Err = Error;
-
-    fn from_str(s: &str) -> Result<RequestUri, Error> {
-        let bytes = s.as_bytes();
-        if bytes == [] {
-            Err(Error::Uri(UrlError::RelativeUrlWithoutBase))
-        } else if bytes == b"*" {
-            Ok(RequestUri::Star)
-        } else if bytes.starts_with(b"/") {
-            Ok(RequestUri::AbsolutePath(s.to_owned()))
-        } else if bytes.contains(&b'/') {
-            Ok(RequestUri::AbsoluteUri(try!(Url::parse(s))))
-        } else {
-            let mut temp = "http://".to_owned();
-            temp.push_str(s);
-            try!(Url::parse(&temp[..]));
-            todo!("compare vs u.authority()");
-            Ok(RequestUri::Authority(s.to_owned()))
-        }
-    }
-}
-
-impl Display for RequestUri {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            RequestUri::AbsolutePath(ref path) => f.write_str(path),
-            RequestUri::AbsoluteUri(ref url) => write!(f, "{}", url),
-            RequestUri::Authority(ref path) => f.write_str(path),
-            RequestUri::Star => f.write_str("*")
-        }
-    }
-}
-
-#[test]
-fn test_uri_fromstr() {
-    fn read(s: &str, result: RequestUri) {
-        assert_eq!(s.parse::<RequestUri>().unwrap(), result);
-    }
-
-    read("*", RequestUri::Star);
-    read("http://hyper.rs/", RequestUri::AbsoluteUri(Url::parse("http://hyper.rs/").unwrap()));
-    read("hyper.rs", RequestUri::Authority("hyper.rs".to_owned()));
-    read("/", RequestUri::AbsolutePath("/".to_owned()));
-}
-
-#[test]
-fn test_uri_display() {
-    fn assert_display(expected_string: &str, request_uri: RequestUri) {
-        assert_eq!(expected_string, format!("{}", request_uri));
-    }
-
-    assert_display("*", RequestUri::Star);
-    assert_display("http://hyper.rs/", RequestUri::AbsoluteUri(Url::parse("http://hyper.rs/").unwrap()));
-    assert_display("hyper.rs", RequestUri::Authority("hyper.rs".to_owned()));
-    assert_display("/", RequestUri::AbsolutePath("/".to_owned()));
-
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/version.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-//! HTTP Versions enum
-//!
-//! Instead of relying on typo-prone Strings, use expected HTTP versions as
-//! the `HttpVersion` enum.
-use std::fmt;
-
-use self::HttpVersion::{Http09, Http10, Http11, Http20};
-
-/// Represents a version of the HTTP spec.
-#[derive(PartialEq, PartialOrd, Copy, Clone, Eq, Ord, Hash, Debug)]
-pub enum HttpVersion {
-    /// `HTTP/0.9`
-    Http09,
-    /// `HTTP/1.0`
-    Http10,
-    /// `HTTP/1.1`
-    Http11,
-    /// `HTTP/2.0`
-    Http20
-}
-
-impl fmt::Display for HttpVersion {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt.write_str(match *self {
-            Http09 => "HTTP/0.9",
-            Http10 => "HTTP/1.0",
-            Http11 => "HTTP/1.1",
-            Http20 => "HTTP/2.0",
-        })
-    }
-}
--- a/third_party/rust/isatty/.cargo-checksum.json
+++ b/third_party/rust/isatty/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"2ba9a19a1a0fff61ee4b05feb0c4d83bdde6d5c43b33d13e26220018a806eb12","Cargo.toml":"e4013e5e76d932bc7eab290397a84f8575eb6276d667a3af392f8fcf35cef1ae","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"f40b08aaee5559ba4769e5449188fc2a6364d1e0eac57499cdac3fc2be30aeef","README.md":"b0c3a3c73eb9c5061f9b61fdc83a48f546087e130530bf7d9b92ab6ce41a3028","src/lib.rs":"7414e3aac91c23a8d56288d3b26d5562c1b665cd0d1a0e07cd84572f67a98ee7"},"package":"fa500db770a99afe2a0f2229be2a3d09c7ed9d7e4e8440bf71253141994e240f"}
\ No newline at end of file
+{"files":{".travis.yml":"023fbba79a890f1285fba26903ffb000e32c596cb1794d5e4ae64c003cf44f50","Cargo.toml":"3024d1fa541d30eba222b7b775b9bf7b4498b3b6168cf8052aa1d2de13403c50","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"f40b08aaee5559ba4769e5449188fc2a6364d1e0eac57499cdac3fc2be30aeef","README.md":"fcb9d4f832f28616afa8a9a79549331f78787dedfa167156ae59dee751a885cd","appveyor.yml":"17cb92b1e92399402ab1dd7639ba28cea71079d2bdd8fab5cd4d40ab4351940b","src/lib.rs":"71b6383cb72398d413c9fccc72c15e5962ec59b6c0dd53d1dfa059655e51f686"},"package":"00c9301a947a2eaee7ce2556b80285dcc89558d07088962e6e8b9c25730f9dc6"}
\ No newline at end of file
--- a/third_party/rust/isatty/.travis.yml
+++ b/third_party/rust/isatty/.travis.yml
@@ -1,11 +1,12 @@
 sudo: false
 
 language: rust
 
 rust:
+  - 1.8.0
   - stable
   - beta
   - nightly
 
 script:
   - cargo build --verbose
--- a/third_party/rust/isatty/Cargo.toml
+++ b/third_party/rust/isatty/Cargo.toml
@@ -1,16 +1,35 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
 [package]
 name = "isatty"
-version = "0.1.3"
+version = "0.1.5"
 authors = ["David Tolnay <dtolnay@gmail.com>"]
-license = "MIT/Apache-2.0"
 description = "libc::isatty that also works on Windows"
-repository = "https://github.com/dtolnay/isatty"
 documentation = "https://github.com/dtolnay/isatty"
+readme = "README.md"
 keywords = ["tty"]
-
-[target.'cfg(unix)'.dependencies]
-libc = "0.2"
+categories = ["command-line-interface"]
+license = "MIT/Apache-2.0"
+repository = "https://github.com/dtolnay/isatty"
+[target."cfg(windows)".dependencies.winapi]
+version = "0.2"
 
-[target.'cfg(windows)'.dependencies]
-kernel32-sys = "0.2"
-winapi = "0.2"
+[target."cfg(windows)".dependencies.kernel32-sys]
+version = "0.2"
+[target."cfg(unix)".dependencies.libc]
+version = "0.2"
+[badges.travis-ci]
+repository = "dtolnay/isatty"
+
+[badges.appveyor]
+repository = "dtolnay/isatty"
--- a/third_party/rust/isatty/README.md
+++ b/third_party/rust/isatty/README.md
@@ -1,41 +1,50 @@
 # Rust isatty
 
 [![Build Status](https://travis-ci.org/dtolnay/isatty.svg?branch=master)](https://travis-ci.org/dtolnay/isatty)
+[![Build Status](https://ci.appveyor.com/api/projects/status/5aq0inkv7eip6udp/branch/master?svg=true)](https://ci.appveyor.com/project/dtolnay/isatty/branch/master)
 [![Latest Version](https://img.shields.io/crates/v/isatty.svg)](https://crates.io/crates/isatty)
 
-This crate provides the following two functions:
+This crate provides the following three functions:
 
 ```rust
+fn stdin_isatty() -> bool
 fn stdout_isatty() -> bool
 fn stderr_isatty() -> bool
 ```
 
-On Linux and Mac they are implemented with
-[`libc::isatty`](http://man7.org/linux/man-pages/man3/isatty.3.html).
-On Windows they are implemented with
-[`kernel32::GetConsoleMode`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms683167.aspx).
+On Linux and Mac they are implemented with [`libc::isatty`]. On Windows they are
+implemented with [`kernel32::GetConsoleMode`].
+
+[`libc::isatty`]: http://man7.org/linux/man-pages/man3/isatty.3.html
+[`kernel32::GetConsoleMode`]: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683167.aspx
+
+The `stdin_isatty` function is not yet implemented for Windows. If you need it,
+please check [dtolnay/isatty#1] and contribute an implementation!
+
+[dtolnay/isatty#1]: https://github.com/dtolnay/isatty/issues/1
 
 ## Usage
 
 `Cargo.toml`
 
 > ```toml
 > [dependencies]
 > isatty = "0.1"
 > ```
 
 `src/main.rs`
 
 > ```rust
 > extern crate isatty;
-> use isatty::{stdout_isatty, stderr_isatty};
-> 
+> use isatty::{stdin_isatty, stdout_isatty, stderr_isatty};
+>
 > fn main() {
+>     println!("stdin: {}", stdin_isatty());
 >     println!("stdout: {}", stdout_isatty());
 >     println!("stderr: {}", stderr_isatty());
 > }
 > ```
 
 ## License
 
 Licensed under either of
new file mode 100644
--- /dev/null
+++ b/third_party/rust/isatty/appveyor.yml
@@ -0,0 +1,18 @@
+environment:
+  matrix:
+  - TARGET: x86_64-pc-windows-msvc
+  - TARGET: i686-pc-windows-msvc
+  - TARGET: i686-pc-windows-gnu
+
+install:
+  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
+  - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
+  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
+  - SET PATH=%PATH%;C:\MinGW\bin
+  - rustc -V
+  - cargo -V
+
+build: false
+
+test_script:
+  - cargo build --verbose
--- a/third_party/rust/isatty/src/lib.rs
+++ b/third_party/rust/isatty/src/lib.rs
@@ -1,37 +1,93 @@
+//! This crate provides the following three functions:
+//!
+//! ```rust
+//! # trait Ignore {
+//! fn stdin_isatty() -> bool
+//! # ;
+//! fn stdout_isatty() -> bool
+//! # ;
+//! fn stderr_isatty() -> bool
+//! # ;
+//! # }
+//! ```
+//!
+//! On Linux and Mac they are implemented with [`libc::isatty`]. On Windows they
+//! are implemented with [`kernel32::GetConsoleMode`].
+//!
+//! [`libc::isatty`]: http://man7.org/linux/man-pages/man3/isatty.3.html
+//! [`kernel32::GetConsoleMode`]: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683167.aspx
+//!
+//! The `stdin_isatty` function is not yet implemented for Windows. If you need
+//! it, please check [dtolnay/isatty#1] and contribute an implementation!
+//!
+//! [dtolnay/isatty#1]: https://github.com/dtolnay/isatty/issues/1
+//!
+//! ## Usage
+//!
+//! `Cargo.toml`
+//!
+//! > ```toml
+//! > [dependencies]
+//! > isatty = "0.1"
+//! > ```
+//!
+//! `src/main.rs`
+//!
+//! > ```rust
+//! > extern crate isatty;
+//! > use isatty::{stdin_isatty, stdout_isatty, stderr_isatty};
+//! >
+//! > fn main() {
+//! >     println!("stdin: {}", stdin_isatty());
+//! >     println!("stdout: {}", stdout_isatty());
+//! >     println!("stderr: {}", stderr_isatty());
+//! > }
+//! > ```
+
+#![doc(html_root_url = "https://docs.rs/isatty/0.1.5")]
+
 // Based on:
 //  - https://github.com/rust-lang/cargo/blob/099ad28104fe319f493dc42e0c694d468c65767d/src/cargo/lib.rs#L154-L178
 //  - https://github.com/BurntSushi/ripgrep/issues/94#issuecomment-261761687
 
+#[cfg(unix)]
+pub fn stdin_isatty() -> bool {
+    isatty(stream::Stream::Stdin)
+}
+
 pub fn stdout_isatty() -> bool {
     isatty(stream::Stream::Stdout)
 }
 
 pub fn stderr_isatty() -> bool {
     isatty(stream::Stream::Stderr)
 }
 
 mod stream {
     pub enum Stream {
+        #[cfg(unix)]
+        Stdin,
         Stdout,
         Stderr,
     }
 }
 
 #[cfg(unix)]
 use unix::isatty;
 #[cfg(unix)]
 mod unix {
     use stream::Stream;
 
     pub fn isatty(stream: Stream) -> bool {
         extern crate libc;
 
         let fd = match stream {
+            Stream::Stdin => libc::STDIN_FILENO,
             Stream::Stdout => libc::STDOUT_FILENO,
             Stream::Stderr => libc::STDERR_FILENO,
         };
 
         unsafe { libc::isatty(fd) != 0 }
     }
 }
 
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.2/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"b6983ce563e5ec756033bfef06e2f2b5f0ac2c1e8eb15803051c1929a328ce30","Cargo.toml":"01ccfeb6f1bfb8320bec14aa4681e4573b35ff0b7514dece1934924ff89bbeac","LICENSE":"79d26c3d855d83d92837c49a868339ec7c2ef7d2a19d7a779ebb4c30d160d90a","README.md":"932d081be16cf7b787400973604712c80b2bc119764c7b742c53cf093cd056fa","src/core_lazy.rs":"fb3e56b2480d2a970e3ac4e3104119b9b22c58b05b6f63dc5b6fd39082faa635","src/lazy.rs":"fcc9cf369e72d52da24307a98317e7001b339948e6063baa449e10294e80e94d","src/lib.rs":"92c3974a0a1c92e75cca75a287ad9241b436b807929854385435d1f4b80931f3","src/nightly_lazy.rs":"31619f7467766127ca049df5d14f82384f6f756db52fc388421ef8a39ba5465f","tests/no_std.rs":"2a5236bd3892a253855b4dc192f63138239165fa23b9c3421a9faa5482c780aa","tests/test.rs":"3133070a63f278c2204dbafa67734453ed003971947521c412b9d366daf62b73"},"package":"6abe0ee2e758cd6bc8a2cd56726359007748fbf4128da998b65d0b70f881e19b"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.2/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-language: rust
-rust:
-- nightly
-- beta
-- stable
-before_script:
-- |
-  pip install 'travis-cargo<0.2' --user &&
-  export PATH=$HOME/.local/bin:$PATH
-script:
-- |
-  travis-cargo build &&
-  travis-cargo test &&
-  travis-cargo bench &&
-  travis-cargo --only nightly build -- --features spin_no_std &&
-  travis-cargo --only nightly test -- --features spin_no_std &&
-  travis-cargo --only nightly bench -- --features spin_no_std &&
-  travis-cargo --only stable doc
-after_success:
-- travis-cargo --only stable doc-upload
-env:
-  global:
-  - TRAVIS_CARGO_NIGHTLY_FEATURE=nightly
-  - secure: YXu24LptjeYirjWYjWGsMT2m3mB7LvQATE6TVo7VEUXv8GYoy2ORIHD83PeImxC93MmZ01QeUezRzuCW51ZcK92VnNSBttlF60SvIX18VsJrV92tsAhievFstqYQ+fB8DIuQ8noU0jPz7GpI+R9dlTRSImAqWOnVIghA+Wzz7Js=
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.2/Cargo.toml
+++ /dev/null
@@ -1,20 +0,0 @@
-[package]
-name = "lazy_static"
-version = "0.2.2"
-authors = ["Marvin Löbel <loebel.marvin@gmail.com>"]
-license = "MIT"
-
-description = "A macro for declaring lazily evaluated statics in Rust."
-readme = "README.md"
-documentation = "http://rust-lang-nursery.github.io/lazy-static.rs/lazy_static/index.html"
-
-repository = "https://github.com/rust-lang-nursery/lazy-static.rs"
-keywords = ["macro", "lazy", "static"]
-
-[dependencies.spin]
-version = "0.4"
-optional = true
-
-[features]
-nightly = []
-spin_no_std = ["nightly", "spin"]
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.2/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Marvin Löbel
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.2/README.md
+++ /dev/null
@@ -1,81 +0,0 @@
-lazy-static.rs
-==============
-
-[![Travis-CI Status](https://travis-ci.org/rust-lang-nursery/lazy-static.rs.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/lazy-static.rs)
-
-A macro for declaring lazily evaluated statics in Rust.
-
-Using this macro, it is possible to have `static`s that require code to be
-executed at runtime in order to be initialized.
-This includes anything requiring heap allocations, like vectors or hash maps,
-as well as anything that requires function calls to be computed.
-
-# Syntax
-
-```rust
-lazy_static! {
-    [pub] static ref NAME_1: TYPE_1 = EXPR_1;
-    [pub] static ref NAME_2: TYPE_2 = EXPR_2;
-    ...
-    [pub] static ref NAME_N: TYPE_N = EXPR_N;
-}
-```
-
-# Semantic
-
-For a given `static ref NAME: TYPE = EXPR;`, the macro generates a
-unique type that implements `Deref<TYPE>` and stores it in a static with name `NAME`.
-
-On first deref, `EXPR` gets evaluated and stored internally, such that all further derefs
-can return a reference to the same object.
-
-Like regular `static mut`s, this macro only works for types that fulfill the `Sync`
-trait.
-
-# Getting Started
-
-[lazy-static.rs is available on crates.io](https://crates.io/crates/lazy_static).
-Add the following dependency to your Cargo manifest to get the latest version of the 0.1 branch:
-
-```toml
-[dependencies]
-lazy_static = "0.1.*"
-```
-
-To always get the latest version, add this git repository to your
-Cargo manifest:
-
-```toml
-[dependencies.lazy_static]
-git = "https://github.com/rust-lang-nursery/lazy-static.rs"
-```
-# Example
-
-Using the macro:
-
-```rust
-#[macro_use]
-extern crate lazy_static;
-
-use std::collections::HashMap;
-
-lazy_static! {
-    static ref HASHMAP: HashMap<u32, &'static str> = {
-        let mut m = HashMap::new();
-        m.insert(0, "foo");
-        m.insert(1, "bar");
-        m.insert(2, "baz");
-        m
-    };
-    static ref COUNT: usize = HASHMAP.len();
-    static ref NUMBER: u32 = times_two(21);
-}
-
-fn times_two(n: u32) -> u32 { n * 2 }
-
-fn main() {
-    println!("The map has {} entries.", *COUNT);
-    println!("The entry for `0` is \"{}\".", HASHMAP.get(&0).unwrap());
-    println!("An expensive calculation on a static results in: {}.", *NUMBER);
-}
-```
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.2/src/core_lazy.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-extern crate spin;
-
-use self::spin::Once;
-
-pub struct Lazy<T: Sync>(Once<T>);
-
-impl<T: Sync> Lazy<T> {
-    #[inline(always)]
-    pub const fn new() -> Self {
-        Lazy(Once::new())
-    }
-
-    #[inline(always)]
-    pub fn get<F>(&'static self, builder: F) -> &T
-        where F: FnOnce() -> T
-    {
-        self.0.call_once(builder)
-    }
-}
-
-#[macro_export]
-#[allow_internal_unstable]
-macro_rules! __lazy_static_create {
-    ($NAME:ident, $T:ty) => {
-        static $NAME: $crate::lazy::Lazy<$T> = $crate::lazy::Lazy::new();
-    }
-}
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.2/src/lazy.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-extern crate std;
-
-use self::std::prelude::v1::*;
-use self::std::sync::Once;
-
-pub struct Lazy<T: Sync>(pub *const T, pub Once);
-
-impl<T: Sync> Lazy<T> {
-    #[inline(always)]
-    pub fn get<F>(&'static mut self, f: F) -> &T
-        where F: FnOnce() -> T
-    {
-        unsafe {
-            let r = &mut self.0;
-            self.1.call_once(|| {
-                *r = Box::into_raw(Box::new(f()));
-            });
-
-            &*self.0
-        }
-    }
-}
-
-unsafe impl<T: Sync> Sync for Lazy<T> {}
-
-#[macro_export]
-macro_rules! __lazy_static_create {
-    ($NAME:ident, $T:ty) => {
-        use std::sync::ONCE_INIT;
-        static mut $NAME: $crate::lazy::Lazy<$T> = $crate::lazy::Lazy(0 as *const $T, ONCE_INIT);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.2/src/lib.rs
+++ /dev/null
@@ -1,137 +0,0 @@
-/*!
-A macro for declaring lazily evaluated statics.
-
-Using this macro, it is possible to have `static`s that require code to be
-executed at runtime in order to be initialized.
-This includes anything requiring heap allocations, like vectors or hash maps,
-as well as anything that requires function calls to be computed.
-
-# Syntax
-
-```ignore
-lazy_static! {
-    [pub] static ref NAME_1: TYPE_1 = EXPR_1;
-    [pub] static ref NAME_2: TYPE_2 = EXPR_2;
-    ...
-    [pub] static ref NAME_N: TYPE_N = EXPR_N;
-}
-```
-
-Metadata (such as doc comments) is allowed on each ref.
-
-# Semantic
-
-For a given `static ref NAME: TYPE = EXPR;`, the macro generates a unique type that
-implements `Deref<TYPE>` and stores it in a static with name `NAME`. (Metadata ends up
-attaching to this type.)
-
-On first deref, `EXPR` gets evaluated and stored internally, such that all further derefs
-can return a reference to the same object.
-
-Like regular `static mut`s, this macro only works for types that fulfill the `Sync`
-trait.
-
-# Example
-
-Using the macro:
-
-```rust
-#[macro_use]
-extern crate lazy_static;
-
-use std::collections::HashMap;
-
-lazy_static! {
-    static ref HASHMAP: HashMap<u32, &'static str> = {
-        let mut m = HashMap::new();
-        m.insert(0, "foo");
-        m.insert(1, "bar");
-        m.insert(2, "baz");
-        m
-    };
-    static ref COUNT: usize = HASHMAP.len();
-    static ref NUMBER: u32 = times_two(21);
-}
-
-fn times_two(n: u32) -> u32 { n * 2 }
-
-fn main() {
-    println!("The map has {} entries.", *COUNT);
-    println!("The entry for `0` is \"{}\".", HASHMAP.get(&0).unwrap());
-    println!("A expensive calculation on a static results in: {}.", *NUMBER);
-}
-```
-
-# Implementation details
-
-The `Deref` implementation uses a hidden static variable that is guarded by a atomic check on each access. On stable Rust, the macro may need to allocate each static on the heap.
-
-*/
-
-#![cfg_attr(feature="nightly", feature(const_fn, allow_internal_unstable, core_intrinsics))]
-
-#![no_std]
-
-#[cfg(not(feature="nightly"))]
-pub mod lazy;
-
-#[cfg(all(feature="nightly", not(feature="spin_no_std")))]
-#[path="nightly_lazy.rs"]
-pub mod lazy;
-
-#[cfg(all(feature="nightly", feature="spin_no_std"))]
-#[path="core_lazy.rs"]
-pub mod lazy;
-
-pub use core::ops::Deref as __Deref;
-
-#[macro_export]
-#[cfg_attr(feature="nightly", allow_internal_unstable)]
-macro_rules! lazy_static {
-    ($(#[$attr:meta])* static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
-        lazy_static!(@PRIV, $(#[$attr])* static ref $N : $T = $e; $($t)*);
-    };
-    ($(#[$attr:meta])* pub static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
-        lazy_static!(@PUB, $(#[$attr])* static ref $N : $T = $e; $($t)*);
-    };
-    (@$VIS:ident, $(#[$attr:meta])* static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
-        lazy_static!(@MAKE TY, $VIS, $(#[$attr])*, $N);
-        impl $crate::__Deref for $N {
-            type Target = $T;
-            #[allow(unsafe_code)]
-            fn deref<'a>(&'a self) -> &'a $T {
-                unsafe {
-                    #[inline(always)]
-                    fn __static_ref_initialize() -> $T { $e }
-
-                    #[inline(always)]
-                    unsafe fn __stability() -> &'static $T {
-                        __lazy_static_create!(LAZY, $T);
-                        LAZY.get(__static_ref_initialize)
-                    }
-                    __stability()
-                }
-            }
-        }
-        lazy_static!($($t)*);
-    };
-    (@MAKE TY, PUB, $(#[$attr:meta])*, $N:ident) => {
-        #[allow(missing_copy_implementations)]
-        #[allow(non_camel_case_types)]
-        #[allow(dead_code)]
-        $(#[$attr])*
-        pub struct $N {__private_field: ()}
-        #[doc(hidden)]
-        pub static $N: $N = $N {__private_field: ()};
-    };
-    (@MAKE TY, PRIV, $(#[$attr:meta])*, $N:ident) => {
-        #[allow(missing_copy_implementations)]
-        #[allow(non_camel_case_types)]
-        #[allow(dead_code)]
-        $(#[$attr])*
-        struct $N {__private_field: ()}
-        #[doc(hidden)]
-        static $N: $N = $N {__private_field: ()};
-    };
-    () => ()
-}
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.2/src/nightly_lazy.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-extern crate std;
-
-use self::std::prelude::v1::*;
-use self::std::cell::UnsafeCell;
-use self::std::sync::{Once, ONCE_INIT};
-
-pub struct Lazy<T: Sync>(UnsafeCell<Option<T>>, Once);
-
-impl<T: Sync> Lazy<T> {
-    #[inline(always)]
-    pub const fn new() -> Self {
-        Lazy(UnsafeCell::new(None), ONCE_INIT)
-    }
-
-    #[inline(always)]
-    pub fn get<F>(&'static self, f: F) -> &T
-        where F: FnOnce() -> T
-    {
-        unsafe {
-            self.1.call_once(|| {
-                *self.0.get() = Some(f());
-            });
-
-            match *self.0.get() {
-                Some(ref x) => x,
-                None => std::intrinsics::unreachable(),
-            }
-        }
-    }
-}
-
-unsafe impl<T: Sync> Sync for Lazy<T> {}
-
-#[macro_export]
-#[allow_internal_unstable]
-macro_rules! __lazy_static_create {
-    ($NAME:ident, $T:ty) => {
-        static $NAME: $crate::lazy::Lazy<$T> = $crate::lazy::Lazy::new();
-    }
-}
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.2/tests/no_std.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-#![cfg(feature="spin_no_std")]
-#![feature(const_fn)]
-
-#![no_std]
-
-#[macro_use]
-extern crate lazy_static;
-
-lazy_static! {
-    /// Documentation!
-    pub static ref NUMBER: u32 = times_two(3);
-}
-
-fn times_two(n: u32) -> u32 {
-    n * 2
-}
-
-#[test]
-fn test_basic() {
-    assert_eq!(*NUMBER, 6);
-}
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.2/tests/test.rs
+++ /dev/null
@@ -1,129 +0,0 @@
-#![cfg_attr(feature="nightly", feature(const_fn))]
-
-#[macro_use]
-extern crate lazy_static;
-use std::collections::HashMap;
-
-lazy_static! {
-    /// Documentation!
-    pub static ref NUMBER: u32 = times_two(3);
-
-    static ref ARRAY_BOXES: [Box<u32>; 3] = [Box::new(1), Box::new(2), Box::new(3)];
-
-    /// More documentation!
-    #[allow(unused_variables)]
-    #[derive(Copy, Clone, Debug)]
-    pub static ref STRING: String = "hello".to_string();
-
-    static ref HASHMAP: HashMap<u32, &'static str> = {
-        let mut m = HashMap::new();
-        m.insert(0, "abc");
-        m.insert(1, "def");
-        m.insert(2, "ghi");
-        m
-    };
-
-    // This should not compile if the unsafe is removed.
-    static ref UNSAFE: u32 = unsafe {
-        std::mem::transmute::<i32, u32>(-1)
-    };
-
-    // This *should* triggger warn(dead_code) by design.
-    static ref UNUSED: () = ();
-
-}
-
-lazy_static! {
-    static ref S1: &'static str = "a";
-    static ref S2: &'static str = "b";
-}
-lazy_static! {
-    static ref S3: String = [*S1, *S2].join("");
-}
-
-#[test]
-fn s3() {
-    assert_eq!(&*S3, "ab");
-}
-
-fn times_two(n: u32) -> u32 {
-    n * 2
-}
-
-#[test]
-fn test_basic() {
-    assert_eq!(&**STRING, "hello");
-    assert_eq!(*NUMBER, 6);
-    assert!(HASHMAP.get(&1).is_some());
-    assert!(HASHMAP.get(&3).is_none());
-    assert_eq!(&*ARRAY_BOXES, &[Box::new(1), Box::new(2), Box::new(3)]);
-    assert_eq!(*UNSAFE, std::u32::MAX);
-}
-
-#[test]
-fn test_repeat() {
-    assert_eq!(*NUMBER, 6);
-    assert_eq!(*NUMBER, 6);
-    assert_eq!(*NUMBER, 6);
-}
-
-#[test]
-fn test_meta() {
-    // this would not compile if STRING were not marked #[derive(Copy, Clone)]
-    let copy_of_string = STRING;
-    // just to make sure it was copied
-    assert!(&STRING as *const _ != &copy_of_string as *const _);
-
-    // this would not compile if STRING were not marked #[derive(Debug)]
-    assert_eq!(format!("{:?}", STRING), "STRING { __private_field: () }".to_string());
-}
-
-mod visibility {
-    lazy_static! {
-        pub static ref FOO: Box<u32> = Box::new(0);
-        static ref BAR: Box<u32> = Box::new(98);
-    }
-
-    #[test]
-    fn sub_test() {
-        assert_eq!(**FOO, 0);
-        assert_eq!(**BAR, 98);
-    }
-}
-
-#[test]
-fn test_visibility() {
-    assert_eq!(*visibility::FOO, Box::new(0));
-}
-
-// This should not cause a warning about a missing Copy implementation
-lazy_static! {
-    pub static ref VAR: i32 = { 0 };
-}
-
-#[derive(Copy, Clone, Debug, PartialEq)]
-struct X;
-struct Once(X);
-const ONCE_INIT: Once = Once(X);
-static DATA: X = X;
-static ONCE: X = X;
-fn require_sync() -> X { X }
-fn transmute() -> X { X }
-fn __static_ref_initialize() -> X { X }
-fn test(_: Vec<X>) -> X { X }
-
-// All these names should not be shadowed
-lazy_static! {
-    static ref ITEM_NAME_TEST: X = {
-        test(vec![X, Once(X).0, ONCE_INIT.0, DATA, ONCE,
-                  require_sync(), transmute(),
-                  // Except this, which will sadly be shadowed by internals:
-                  // __static_ref_initialize()
-                  ])
-    };
-}
-
-#[test]
-fn item_name_shadowing() {
-    assert_eq!(*ITEM_NAME_TEST, X);
-}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/.cargo-checksum.json
@@ -0,0 +1,1 @@
+{"files":{".travis.yml":"33e3da6639246eb3212ea9bd97faef5e79e62e5a3d5f99645c4db09ad2a5765b","Cargo.toml":"f9db49bdc868dfb8cd96896e7d7f3cdd3bb565f8dd771d4ac91fb41817fa4444","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"c8e2baa0e92a1760d9141c9542723e19748f241fd523014b1eee289cd467650b","appveyor.yml":"7e6d9391c542881ed2a471cb80c4be2d1ce9aff313a7b5e432f899bf00e99ecc","ci/README.md":"be804f15e2128e5fd4b160cb0b13cff5f19e7d77b55ec5254aa6fd8731c84f0d","ci/android-accept-licenses.sh":"84ad00815f628005ed22c5d6cd14990ebc97812a7163bd275b2877904eddab53","ci/android-install-ndk.sh":"725db9025c5905849916bf7c910f98ff0e753484397c2a1f836d48a576d10890","ci/android-install-sdk.sh":"891900fe4e4ceb04717b91a253753858270defc6d6401936d08c09801c1de178","ci/android-sysimage.sh":"901415631752827454c827e8c51906ba4260612e4021eda98eb7fff771c7d0e8","ci/docker/aarch64-linux-android/Dockerfile":"65e4a517d4f46b8104ea3e7a322912161dec4c7c1cce1fb0d6ef3ea8ad56c7e2","ci/docker/aarch64-unknown-linux-gnu/Dockerfile":"5f430271941e1eecdf9d1a5fb701dd5622e2c4b9da03140fd829bf216e55529d","ci/docker/arm-linux-androideabi/Dockerfile":"3ea1cded5b2950abcd75d59a7ee81ef8c3de66af822c510f787ac7ead0ead4ab","ci/docker/arm-unknown-linux-gnueabihf/Dockerfile":"dbb025b53b27e406893184290836a50133ecae8295711d5e05b4e41fac9bd262","ci/docker/asmjs-unknown-emscripten/Dockerfile":"0d9aea5119c2cd136cc2c0a578105d91210e45901ac49b17c5e45f458b1c7551","ci/docker/i686-linux-android/Dockerfile":"015b2188c8baacb24eeba7cdfbe2852134a0f43d99feb859657cebce6a4959b1","ci/docker/i686-unknown-linux-gnu/Dockerfile":"c3ba1da87558ba31889a60742b938f4162c17383929da6a8d8fbcf0bbfa9dcb7","ci/docker/i686-unknown-linux-musl/Dockerfile":"4ac86fe9e159d454616396a9f3f07ce0f5d99cc4b49898b8d2486e6bdbfed9e9","ci/docker/mips-unknown-linux-gnu/Dockerfile":"6d2a9daa299003497c1d441d07b69f730ad75ee49f34520f959b5158e60072e0","ci/docker/mips-unknown-linux-musl/Dockerfile":"f9e198c21b37b930758178a1a923c9478218c49c375b01d805b339b7a458b632","ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile":"7c4d26232f1c1553a6612d9b0b3faac9887e139eaffa025f70d34113dcee812f","ci/docker/mipsel-unknown-linux-musl/Dockerfile":"519c5468e223784809de41292480ffc5d7a141c8abe0457664d38af5f49969f7","ci/docker/powerpc-unknown-linux-gnu/Dockerfile":"4b247dcc399395815ec9153c1247cc03d764896c484eddcb196d0bf8650d6311","ci/docker/powerpc64-unknown-linux-gnu/Dockerfile":"e949717a8ba5e123940729ff47ce1c45989c8b8247c576f1488f698b534e0283","ci/docker/s390x-unknown-linux-gnu/Dockerfile":"63bb605e333b8351ee2366def0cfb77f206c66f43bc2d5d9ca18ee0119fa5672","ci/docker/wasm32-unknown-emscripten/Dockerfile":"bd072d6ae91a9160693e402dd77462d3c9dd0716711e719a62af330ae479eb4e","ci/docker/wasm32-unknown-emscripten/node-wrapper.sh":"6ec19745e08690b7b5d7f882004a8a63b69ac815d66e3f8c5a38d2c3e78b962e","ci/docker/x86_64-linux-android/Dockerfile":"aeeaa540189ca712369c564c9a14cbace63217dadcfaf879a2cb40fbdeb08199","ci/docker/x86_64-rumprun-netbsd/Dockerfile":"e8f9287b267c6058eec42d1bca0007cb9a78a1d244dd8e11088368cb61fb17d6","ci/docker/x86_64-rumprun-netbsd/runtest.rs":"53302e9ed39293c1ec68ab56287593907d4aaf5bac9c1c2857b29f754a71d62b","ci/docker/x86_64-unknown-freebsd/Dockerfile":"ef0f9f63065218728d2daafaa5ba71b17e4ccc23d72e859e0a7133fc64c0815e","ci/docker/x86_64-unknown-linux-gnu/Dockerfile":"72e629004d5e1f12ed13056e91ea8a767ff3139b9ba929532a52f2163b12710b","ci/docker/x86_64-unknown-linux-musl/Dockerfile":"e145784741473150473b1bef7cc3c2cf0c6339d4fc480113ac41b4247a9b38ec","ci/dox.sh":"9ea240a4a607036235fd68c01b5d2a59f365768d103d3be774dcf34aa3ff563e","ci/emscripten-entry.sh":"1c1384b4a8b0c055d8095d9d9b2c9dccbdcdb2d5f90fdca34a1976ca8fc379c6","ci/emscripten.sh":"6f66c7b5c3d34a41afc59ceb0a8c3b0880cd6fd9a6344b874ae80bac0639ccb2","ci/ios/deploy_and_run_on_ios_simulator.rs":"3175066fd7f82390f6226d881e1a1dda9767ea2705656870e0d7774e2731800e","ci/landing-page-footer.html":"b70b3112c2147f5c967e7481061ef38bc2d79a28dd55a16fb916d9c9426da2c4","ci/landing-page-head.html":"ad69663fac7924f27d0209bc519d55838e86edfc4133713a6fd08caadac1b142","ci/run-docker.sh":"be83bc5a8b5ef913a7c9941ffca24734716028650c9a876123c4c160672c18de","ci/run-qemu.sh":"bb859421170871ef23a8940c5e150efec0c01b95e32d2ce2d37b79a45d9d346c","ci/run.sh":"60588b98057151522d0717b6e7f1c740b12c88630984a3aaf1b3c768f84ebc2e","ci/runtest-android.rs":"a07ddbdd276aedda7876c7e676774178a60d9aeab95df01275a4ee95f59e3044","ci/style.rs":"60564abc1d5197ed1598426dd0d6ee9939a16d2875b03373538f58843bb616c4","src/dox.rs":"bb9a85519e0d4a8d3bfb81301759b9b938435d79da9ce2918248fb2b0df19638","src/lib.rs":"d748ddb88f68a78de6b5c7582bd048372882ac43fa7db5b3459ece84871ee0c4","src/macros.rs":"e1b0bf5db89faa8fcb39a3fd46cdb5fdcfabb7f3524eb2192157f0188b8a764b","src/redox.rs":"40b3eb15c9fcbd3b636c8f647d0b83624359f0cc10776db944303ee35c28bfc6","src/unix/bsd/apple/b32.rs":"d107376452f731f5d8a1e6b544bdcaac826c95a383d4b20e2032f115eb9f3256","src/unix/bsd/apple/b64.rs":"ab141ad0c8c58342c06858f6f34b75eef70e58cb58e7375d460a9be6739b5e6a","src/unix/bsd/apple/mod.rs":"62113d95e0fb5463a0410d0ac2cd67c2744e629021af98908bb903a22abf55fa","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"ec88ddec5253b8dba3d56a31d8c12767c5c3e2e471e6467fde642bae868a1193","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/freebsd/mod.rs":"6a1f7dbe5b31eb9038b4e69f90c2597e37138dfb623c35786e8dd8f7ce5c8592","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/mod.rs":"c9895c61e4b01f0b397cbd9d40c977e71774888cad85455bbb23eded85311284","src/unix/bsd/mod.rs":"d76857a17ce882ca2937105c81dd654a54ea22f69f8bb81b614a96f36dbe0bb8","src/unix/bsd/netbsdlike/mod.rs":"1b5519578130b8a525778406b6f51e783e5c8f7e4382503fb0427559967753e6","src/unix/bsd/netbsdlike/netbsd/mod.rs":"1c3c1668258762d28358000a28f68ec0f37688762bcdb373946349c531e354dc","src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs":"927eeccaf3269d299db4c2a55f8010807bf43dfa894aea6a783215f5d3560baa","src/unix/bsd/netbsdlike/netbsd/other/mod.rs":"4d9f7091af8e166943ac6f42ce85558909e5b6e61325039bff7adfbcf4b90212","src/unix/bsd/netbsdlike/openbsdlike/bitrig.rs":"f8cd05dacd3a3136c58da5a2fbe26f703767823b28e74fe8a2b57a7bd98d6d5c","src/unix/bsd/netbsdlike/openbsdlike/mod.rs":"b1db1069f6c088fb3149e17d700c4f1cb1d969e950044044d9295916c755ec6f","src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs":"302817036aa7e7afbc82248cf66b040ef1edfbcb136c9ad243fe20f98df8d6f8","src/unix/bsd/netbsdlike/openbsdlike/other/b32/mod.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/other/b64/mod.rs":"927eeccaf3269d299db4c2a55f8010807bf43dfa894aea6a783215f5d3560baa","src/unix/bsd/netbsdlike/openbsdlike/other/mod.rs":"f5d8db6f54efd05520b31b764a6bacbf612e1aebce097d2d5bfaaef3b91f37b5","src/unix/haiku/b32.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/haiku/b64.rs":"b422430c550c0ba833c9206d1350861e344e3a2eb33d7d58693efb35044be1cc","src/unix/haiku/mod.rs":"7a5332562caf7c2d0cc17ad1947505b6ec7c1a887c53332cec0da25e7475d8b5","src/unix/mod.rs":"e7f50e86b7e32c4d4857fc5e05e64bfe9ff9a7b09b543514b22808c6096e9e7f","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"5f10bb7d8d180bdd975f8aa2a4bd05d4d810970c6a7d1251ae46948213867ebc","src/unix/notbsd/android/b32/arm.rs":"a81acfebb008ad7a717539929dd204cfac4f82b2cffbbb665b57686ad692db64","src/unix/notbsd/android/b32/mod.rs":"e9ec6f08e20ea235cd7095604ea6e37c739c1276e9f40fa31a4db4951fa005af","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"0d8aa97b80f7790baf6f2f43defb5028fbf91cea6564bb28ed114a4e2d68bfbd","src/unix/notbsd/android/b64/mod.rs":"63290adc8122c040f9be369ef4180975bcf1a967a717aa75d30371162d5d5fa9","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"c642848963d685f236d57427a4a2be503e286142eca0bede8799c133be56ff1d","src/unix/notbsd/emscripten.rs":"f8d8acf5cef1acd1a6bdd41299054120820865d072c4c2e3c740fbd0c6e9b3e7","src/unix/notbsd/linux/mips/mips32.rs":"121a585f9189b28fff35c7345083dff9cc0f2dd5dadc9fa00f1669399ec7ca24","src/unix/notbsd/linux/mips/mips64.rs":"d3c232e548445eb96da07b262dd5ada4a1305e20b296c452c903803202971c27","src/unix/notbsd/linux/mips/mod.rs":"8ab59f91ac112bc4cf3f616fe4bcdb17869636e2c39f142ede9eab4fba842ebf","src/unix/notbsd/linux/mod.rs":"2508d5cb77c29fc04aa52b27dd2c287e1cfd570385fa753f6ef218aa47c95551","src/unix/notbsd/linux/musl/b32/arm.rs":"16b3aa4be930223cf7c6017ddc935638f8324d35680fa3736702a6eccdc26899","src/unix/notbsd/linux/musl/b32/mips.rs":"b1c198e9076933624de92ff3059283df863ad69aaa200160ac2c9c6a62822bc2","src/unix/notbsd/linux/musl/b32/mod.rs":"2f4d5fb5c0a93e2c572d4e86be06e240e3cd95357dd8b8cee799f0d1de588694","src/unix/notbsd/linux/musl/b32/x86.rs":"b4e8b810d694a12ccb4a9df9896b5a0ed6ebf2a69ff450c3940daa4a2bb60778","src/unix/notbsd/linux/musl/b64/aarch64.rs":"1afb00c4ebb1dfacf2b3b051ffa1ccb248a6645879ec044f0b34688104a3f173","src/unix/notbsd/linux/musl/b64/mod.rs":"3482855b3af80b665846b712ecca92c64aa345de1301f1a02e25fed2a0bf4cb6","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"c5a432d9e8e2c2620d738b123d85934da16c09c1002ce0473464aba638fc3731","src/unix/notbsd/linux/musl/b64/x86_64.rs":"8156abebf9446ed90c007c72e7f0d56f831f26e601e6fe81dc07abbec3ac057d","src/unix/notbsd/linux/musl/mod.rs":"fa917a4023255e9e741553155a89a13300a2cda71489c3f4edbea5698857e9eb","src/unix/notbsd/linux/other/b32/arm.rs":"5164bc8942eb6b58bfaaf77e5b420697bea5dfe0d94072d01cc51c59fe06d053","src/unix/notbsd/linux/other/b32/mod.rs":"2c9ee30b16e469bf9e0248ab3c18cfb263f38ee802570b7fed7a85ccd8df62d7","src/unix/notbsd/linux/other/b32/powerpc.rs":"99a2dd72974d9cd32d2c308f789788c062660b883f723744e0a10db4ef234b57","src/unix/notbsd/linux/other/b32/x86.rs":"7cd050575d8b468070e69555b5e5efeee947edfaa38a2b31a6d38be396cc1214","src/unix/notbsd/linux/other/b64/aarch64.rs":"7e47143b7c06f03d644a98887f0787e48f0db1bc915e5a092f9552c7b1c70713","src/unix/notbsd/linux/other/b64/mod.rs":"c8f8ecbe6ef3edf90ddab38f8449d86f482972fa07aaa82cc9a0f78e8b63b3e2","src/unix/notbsd/linux/other/b64/powerpc64.rs":"63173445e6c463da04aeacc91ef2e83b83695f9c9be31f8634be4cd33a835c70","src/unix/notbsd/linux/other/b64/sparc64.rs":"3d5106c11130af83d022e7b265b18964069f69bbfc56d4c9cf1f449dd4a5e1bb","src/unix/notbsd/linux/other/b64/x86_64.rs":"0193dbc33521074e408360b77a9e30f242c13117138f6882695e07b334f65724","src/unix/notbsd/linux/other/mod.rs":"53a83ca2512f8c34529c6e897c26c7f06b162e3000970992645198e56f8b05bf","src/unix/notbsd/linux/s390x.rs":"5184beecb8180713664e367748050a08fd67970469340d892453f7e629822c07","src/unix/notbsd/mod.rs":"a18d1389ee1cd34752174c451f62e307ec391924d6f70f0993f3dc52de40e871","src/unix/solaris/mod.rs":"9b367b10f736b7d59b63ea4022719229331a9e081c42990d44ad8292052a275d","src/unix/uclibc/mips/mips32.rs":"31b23e466cffb86116421ec9240b86e7419aacd84b0b1b04d23c7142c8717566","src/unix/uclibc/mips/mips64.rs":"e67eec1636a998b047d89a4cda1c99cb6bc3071db017762675179a68201c4438","src/unix/uclibc/mips/mod.rs":"74817a9b1ee3998d8e0b751a555d57225f70fd979c283c94ada344a162a8b856","src/unix/uclibc/mod.rs":"7043abc1b1db74c05a73a59d853c9541c6743641575426c6cc60883e002222f4","src/unix/uclibc/x86_64/l4re.rs":"54b4e58ce5a671348c32bc41c1607dbc5c13fa6818cc3e0e0e2b409c300a305e","src/unix/uclibc/x86_64/mod.rs":"963aedbcf87972d7ac0dd3abf1e795476e13dd80a8382ef9b09c72831fc6a868","src/windows.rs":"6a79e13e727b8c7277ebcc65b390ad5494d70c65b6578cb468c5565a166048d0"},"package":"2370ca07ec338939e356443dac2296f581453c35fe1e3a3ed06023c49435f915"}
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/.travis.yml
@@ -0,0 +1,98 @@
+language: rust
+rust: stable
+sudo: required
+dist: trusty
+services:
+  - docker
+install:
+  - if [ -z "$NO_ADD" ]; then rustup target add $TARGET; fi
+script:
+  - cargo build
+  - cargo build --no-default-features
+  - cargo generate-lockfile --manifest-path libc-test/Cargo.toml
+  - if [[ $TRAVIS_OS_NAME = "linux" ]]; then
+      sh ci/run-docker.sh $TARGET;
+    else
+      export CARGO_TARGET_DIR=`pwd`/target;
+      sh ci/run.sh $TARGET;
+    fi
+  - rustc ci/style.rs && ./style src
+env:
+  global:
+    secure: "e2/3QjgRN9atOuSHp22TrYG7QVKcYUWY48Hi9b60w+r1+BhPkTseIJLte7WefRhdXtqpjjUJTooKDhnurFOeHaCT+nmBgiv+FPU893sBl4bhesY4m0vgUJVbNZcs6lTImYekWVb+aqjGdgV/XAgCw7c3kPmrZV0MzGDWL64Xaps="
+matrix:
+  include:
+    # 1.0.0 compat
+    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
+      rust: 1.0.0
+      script: cargo build
+      install:
+
+    # build documentation
+    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
+      rust: nightly
+      script: sh ci/dox.sh
+
+    # stable compat
+    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
+    - env: TARGET=i686-unknown-linux-gnu
+    - os: osx
+      env: TARGET=x86_64-apple-darwin NO_ADD=1
+    - os: osx
+      env: TARGET=i686-apple-darwin
+    - env: TARGET=arm-linux-androideabi
+    - env: TARGET=aarch64-linux-android
+    - env: TARGET=i686-linux-android
+    - env: TARGET=x86_64-linux-android
+    - env: TARGET=x86_64-unknown-linux-musl
+    - env: TARGET=i686-unknown-linux-musl
+    - env: TARGET=arm-unknown-linux-gnueabihf
+    - env: TARGET=aarch64-unknown-linux-gnu
+    - os: osx
+      osx_image: xcode8.2
+      env: TARGET=i386-apple-ios
+           CARGO_TARGET_I386_APPLE_IOS_RUNNER=$HOME/runtest
+           RUSTFLAGS=-Clink-arg=-mios-simulator-version-min=7.0
+      before_install:
+        rustc ./ci/ios/deploy_and_run_on_ios_simulator.rs -o $HOME/runtest
+    - os: osx
+      osx_image: xcode8.2
+      env: TARGET=x86_64-apple-ios
+           CARGO_TARGET_X86_64_APPLE_IOS_RUNNER=$HOME/runtest
+           RUSTFLAGS=-Clink-arg=-mios-simulator-version-min=7.0
+      before_install:
+        rustc ./ci/ios/deploy_and_run_on_ios_simulator.rs -o $HOME/runtest
+    - env: TARGET=x86_64-rumprun-netbsd
+    - env: TARGET=powerpc-unknown-linux-gnu
+    - env: TARGET=powerpc64-unknown-linux-gnu
+    - env: TARGET=mips-unknown-linux-musl
+    - env: TARGET=mipsel-unknown-linux-musl
+    - env: TARGET=mips64-unknown-linux-gnuabi64
+    - env: TARGET=mips-unknown-linux-gnu
+    - env: TARGET=s390x-unknown-linux-gnu
+    - env: TARGET=asmjs-unknown-emscripten
+    - env: TARGET=wasm32-unknown-emscripten
+
+    # beta
+    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
+      rust: beta
+    - os: osx
+      env: TARGET=x86_64-apple-darwin NO_ADD=1
+      rust: beta
+
+    # nightly
+    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
+      rust: nightly
+    - os: osx
+      env: TARGET=x86_64-apple-darwin NO_ADD=1
+      rust: nightly
+
+    # QEMU based targets that compile in an emulator
+    - env: TARGET=x86_64-unknown-freebsd
+
+cache: cargo
+
+notifications:
+  email:
+    on_success: never
+  webhooks: https://buildbot.rust-lang.org/homu/travis
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/Cargo.toml
@@ -0,0 +1,31 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
+[package]
+name = "libc"
+version = "0.2.30"
+authors = ["The Rust Project Developers"]
+description = "A library for types and bindings to native C functions often found in libc or\nother common platform libraries.\n"
+homepage = "https://github.com/rust-lang/libc"
+documentation = "http://doc.rust-lang.org/libc"
+readme = "README.md"
+license = "MIT/Apache-2.0"
+repository = "https://github.com/rust-lang/libc"
+
+[features]
+default = ["use_std"]
+use_std = []
+[badges.travis-ci]
+repository = "rust-lang/libc"
+
+[badges.appveyor]
+repository = "rust-lang-libs/libc"
rename from third_party/rust/gcc-0.3.42/LICENSE-APACHE
rename to third_party/rust/libc-0.2.30/LICENSE-APACHE
rename from third_party/rust/log-0.3.6/LICENSE-MIT
rename to third_party/rust/libc-0.2.30/LICENSE-MIT
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/README.md
@@ -0,0 +1,156 @@
+libc
+====
+
+A Rust library with native bindings to the types and functions commonly found on
+various systems, including libc.
+
+[![Build Status](https://travis-ci.org/rust-lang/libc.svg?branch=master)](https://travis-ci.org/rust-lang/libc)
+[![Build status](https://ci.appveyor.com/api/projects/status/github/rust-lang/libc?svg=true)](https://ci.appveyor.com/project/rust-lang-libs/libc)
+
+[Documentation](#platforms-and-documentation)
+
+## Usage
+
+First, add the following to your `Cargo.toml`:
+
+```toml
+[dependencies]
+libc = "0.2"
+```
+
+Next, add this to your crate root:
+
+```rust
+extern crate libc;
+```
+
+Currently libc by default links to the standard library, but if you would
+instead like to use libc in a `#![no_std]` situation or crate you can request
+this via:
+
+```toml
+[dependencies]
+libc = { version = "0.2", default-features = false }
+```
+
+## What is libc?
+
+The primary purpose of this crate is to provide all of the definitions necessary
+to easily interoperate with C code (or "C-like" code) on each of the platforms
+that Rust supports. This includes type definitions (e.g. `c_int`), constants
+(e.g. `EINVAL`) as well as function headers (e.g. `malloc`).
+
+This crate does not strive to have any form of compatibility across platforms,
+but rather it is simply a straight binding to the system libraries on the
+platform in question.
+
+## Public API
+
+This crate exports all underlying platform types, functions, and constants under
+the crate root, so all items are accessible as `libc::foo`. The types and values
+of all the exported APIs match the platform that libc is compiled for.
+
+More detailed information about the design of this library can be found in its
+[associated RFC][rfc].
+
+[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1291-promote-libc.md
+
+## Adding an API
+
+Want to use an API which currently isn't bound in `libc`? It's quite easy to add
+one!
+
+The internal structure of this crate is designed to minimize the number of
+`#[cfg]` attributes in order to easily be able to add new items which apply
+to all platforms in the future. As a result, the crate is organized
+hierarchically based on platform. Each module has a number of `#[cfg]`'d
+children, but only one is ever actually compiled. Each module then reexports all
+the contents of its children.
+
+This means that for each platform that libc supports, the path from a
+leaf module to the root will contain all bindings for the platform in question.
+Consequently, this indicates where an API should be added! Adding an API at a
+particular level in the hierarchy means that it is supported on all the child
+platforms of that level. For example, when adding a Unix API it should be added
+to `src/unix/mod.rs`, but when adding a Linux-only API it should be added to
+`src/unix/notbsd/linux/mod.rs`.
+
+If you're not 100% sure at what level of the hierarchy an API should be added
+at, fear not! This crate has CI support which tests any binding against all
+platforms supported, so you'll see failures if an API is added at the wrong
+level or has different signatures across platforms.
+
+With that in mind, the steps for adding a new API are:
+
+1. Determine where in the module hierarchy your API should be added.
+2. Add the API.
+3. Send a PR to this repo.
+4. Wait for CI to pass, fixing errors.
+5. Wait for a merge!
+
+### Test before you commit
+
+We have two automated tests running on [Travis](https://travis-ci.org/rust-lang/libc):
+
+1. [`libc-test`](https://github.com/alexcrichton/ctest)
+  - `cd libc-test && cargo test`
+  - Use the `skip_*()` functions in `build.rs` if you really need a workaround.
+2. Style checker
+  - `rustc ci/style.rs && ./style src`
+
+### Releasing your change to crates.io
+
+Now that you've done the amazing job of landing your new API or your new
+platform in this crate, the next step is to get that sweet, sweet usage from
+crates.io! The only next step is to bump the version of libc and then publish
+it. If you'd like to get a release out ASAP you can follow these steps:
+
+1. Update the version number in `Cargo.toml`, you'll just be bumping the patch
+   version number.
+2. Run `cargo update` to regenerate the lockfile to encode your version bump in
+   the lock file. You may pull in some other updated dependencies, that's ok.
+3. Send a PR to this repository. It should [look like this][example], but it'd
+   also be nice to fill out the description with a small rationale for the
+   release (any rationale is ok though!)
+4. Once merged the release will be tagged and published by one of the libc crate
+   maintainers.
+
+[example]: https://github.com/rust-lang/libc/pull/583
+
+## Platforms and Documentation
+
+The following platforms are currently tested and have documentation available:
+
+Tested:
+  * [`i686-pc-windows-msvc`](https://doc.rust-lang.org/libc/i686-pc-windows-msvc/libc/)
+  * [`x86_64-pc-windows-msvc`](https://doc.rust-lang.org/libc/x86_64-pc-windows-msvc/libc/)
+    (Windows)
+  * [`i686-pc-windows-gnu`](https://doc.rust-lang.org/libc/i686-pc-windows-gnu/libc/)
+  * [`x86_64-pc-windows-gnu`](https://doc.rust-lang.org/libc/x86_64-pc-windows-gnu/libc/)
+  * [`i686-apple-darwin`](https://doc.rust-lang.org/libc/i686-apple-darwin/libc/)
+  * [`x86_64-apple-darwin`](https://doc.rust-lang.org/libc/x86_64-apple-darwin/libc/)
+    (OSX)
+  * `i386-apple-ios`
+  * `x86_64-apple-ios`
+  * [`i686-unknown-linux-gnu`](https://doc.rust-lang.org/libc/i686-unknown-linux-gnu/libc/)
+  * [`x86_64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-gnu/libc/)
+    (Linux)
+  * [`x86_64-unknown-linux-musl`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-musl/libc/)
+    (Linux MUSL)
+  * [`aarch64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/aarch64-unknown-linux-gnu/libc/)
+  * [`mips-unknown-linux-gnu`](https://doc.rust-lang.org/libc/mips-unknown-linux-gnu/libc/)
+  * [`arm-unknown-linux-gnueabihf`](https://doc.rust-lang.org/libc/arm-unknown-linux-gnueabihf/libc/)
+  * [`arm-linux-androideabi`](https://doc.rust-lang.org/libc/arm-linux-androideabi/libc/)
+    (Android)
+  * [`x86_64-unknown-freebsd`](https://doc.rust-lang.org/libc/x86_64-unknown-freebsd/libc/)
+  * [`x86_64-unknown-openbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-openbsd/libc/)
+  * [`x86_64-rumprun-netbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-netbsd/libc/)
+
+The following may be supported, but are not guaranteed to always work:
+
+  * `i686-unknown-freebsd`
+  * [`x86_64-unknown-bitrig`](https://doc.rust-lang.org/libc/x86_64-unknown-bitrig/libc/)
+  * [`x86_64-unknown-dragonfly`](https://doc.rust-lang.org/libc/x86_64-unknown-dragonfly/libc/)
+  * `i686-unknown-haiku`
+  * `x86_64-unknown-haiku`
+  * [`x86_64-unknown-netbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-netbsd/libc/)
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/appveyor.yml
@@ -0,0 +1,31 @@
+environment:
+  # When this was added there were revocation check failures when using the
+  # libcurl backend as libcurl checks by default, but rustup doesn't provide the
+  # switch to turn this off. Switch to Hyper which looks to not check for
+  # revocation by default like libcurl does.
+  RUSTUP_USE_HYPER: 1
+  CARGO_HTTP_CHECK_REVOKE: false
+  matrix:
+  - TARGET: x86_64-pc-windows-gnu
+    MSYS2_BITS: 64
+  - TARGET: i686-pc-windows-gnu
+    MSYS2_BITS: 32
+  - TARGET: x86_64-pc-windows-msvc
+  - TARGET: i686-pc-windows-msvc
+install:
+  - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
+  - rustup-init.exe -y --default-host %TARGET%
+  - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
+  - if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin
+  - rustc -V
+  - cargo -V
+
+build: false
+
+test_script:
+  - cargo test --target %TARGET%
+  - cargo test --manifest-path libc-test/Cargo.toml --target %TARGET%
+
+cache:
+  - target
+  - C:\Users\appveyor\.cargo\registry
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/README.md
@@ -0,0 +1,203 @@
+The goal of the libc crate is to have CI running everywhere to have the
+strongest guarantees about the definitions that this library contains, and as a
+result the CI is pretty complicated and also pretty large! Hopefully this can
+serve as a guide through the sea of scripts in this directory and elsewhere in
+this project.
+
+# Files
+
+First up, let's talk about the files in this directory:
+
+* `run-travis.sh` - a shell script run by all Travis builders, this is
+  responsible for setting up the rest of the environment such as installing new
+  packages, downloading Rust target libraries, etc.
+
+* `run.sh` - the actual script which runs tests for a particular architecture.
+  Called from the `run-travis.sh` script this will run all tests for the target
+  specified.
+
+* `cargo-config` - Cargo configuration of linkers to use copied into place by
+  the `run-travis.sh` script before builds are run.
+
+* `dox.sh` - script called from `run-travis.sh` on only the linux 64-bit nightly
+  Travis bots to build documentation for this crate.
+
+* `landing-page-*.html` - used by `dox.sh` to generate a landing page for all
+  architectures' documentation.
+
+* `run-qemu.sh` - see discussion about QEMU below
+
+* `mips`, `rumprun` - instructions to build the docker image for each respective
+  CI target
+
+# CI Systems
+
+Currently this repository leverages a combination of Travis CI and AppVeyor for
+running tests. The triples tested are:
+
+* AppVeyor
+  * `{i686,x86_64}-pc-windows-{msvc,gnu}`
+* Travis
+  * `{i686,x86_64,mips,aarch64}-unknown-linux-gnu`
+  * `x86_64-unknown-linux-musl`
+  * `arm-unknown-linux-gnueabihf`
+  * `arm-linux-androideabi`
+  * `{i686,x86_64}-apple-{darwin,ios}`
+  * `x86_64-rumprun-netbsd`
+  * `x86_64-unknown-freebsd`
+  * `x86_64-unknown-openbsd`
+
+The Windows triples are all pretty standard, they just set up their environment
+then run tests, no need for downloading any extra target libs (we just download
+the right installer). The Intel Linux/OSX builds are similar in that we just
+download the right target libs and run tests. Note that the Intel Linux/OSX
+builds are run on stable/beta/nightly, but are the only ones that do so.
+
+The remaining architectures look like:
+
+* Android runs in a [docker image][android-docker] with an emulator, the NDK,
+  and the SDK already set up. The entire build happens within the docker image.
+* The MIPS, ARM, and AArch64 builds all use the QEMU userspace emulator to run
+  the generated binary to actually verify the tests pass.
+* The MUSL build just has to download a MUSL compiler and target libraries and
+  then otherwise runs tests normally.
+* iOS builds need an extra linker flag currently, but beyond that they're built
+  as standard as everything else.
+* The rumprun target builds an entire kernel from the test suite and then runs
+  it inside QEMU using the serial console to test whether it succeeded or
+  failed.
+* The BSD builds, currently OpenBSD and FreeBSD, use QEMU to boot up a system
+  and compile/run tests. More information on that below.
+
+[android-docker]: https://github.com/rust-lang/rust-buildbot/blob/master/slaves/android/Dockerfile
+
+## QEMU
+
+Lots of the architectures tested here use QEMU in the tests, so it's worth going
+over all the crazy capabilities QEMU has and the various flavors in which we use
+it!
+
+First up, QEMU has userspace emulation where it doesn't boot a full kernel, it
+just runs a binary from another architecture (using the `qemu-<arch>` wrappers).
+We provide it the runtime path for the dynamically loaded system libraries,
+however. This strategy is used for all Linux architectures that aren't intel.
+Note that one downside of this QEMU system is that threads are barely
+implemented, so we're careful to not spawn many threads.
+
+For the rumprun target the only output is a kernel image, so we just use that
+plus the `rumpbake` command to create a full kernel image which is then run from
+within QEMU.
+
+Finally, the fun part, the BSDs. Quite a few hoops are jumped through to get CI
+working for these platforms, but the gist of it looks like:
+
+* Cross compiling from Linux to any of the BSDs seems to be quite non-standard.
+  We may be able to get it working but it might be difficult at that point to
+  ensure that the libc definitions align with what you'd get on the BSD itself.
+  As a result, we try to do compiles within the BSD distro.
+* On Travis we can't run a VM-in-a-VM, so we resort to userspace emulation
+  (QEMU).
+* Unfortunately on Travis we also can't use KVM, so the emulation is super slow.
+
+With all that in mind, the way BSD is tested looks like:
+
+1. Download a pre-prepared image for the OS being tested.
+2. Generate the tests for the OS being tested. This involves running the `ctest`
+   library over libc to generate a Rust file and a C file which will then be
+   compiled into the final test.
+3. Generate a disk image which will later be mounted by the OS being tested.
+   This image is mostly just the libc directory, but some modifications are made
+   to compile the generated files from step 2.
+4. The kernel is booted in QEMU, and it is configured to detect the libc-test
+   image being available, run the test script, and then shut down afterwards.
+5. Look for whether the tests passed in the serial console output of the kernel.
+
+There's some pretty specific instructions for setting up each image (detailed
+below), but the main gist of this is that we must avoid a vanilla `cargo run`
+inside of the `libc-test` directory (which is what it's intended for) because
+that would compile `syntex_syntax`, a large library, with userspace emulation.
+This invariably times out on Travis, so we can't do that.
+
+Once all those hoops are jumped through, however, we can be happy that we're
+testing almost everything!
+
+Below are some details of how to set up the initial OS images which are
+downloaded. Each image must be enabled have input/output over the serial
+console, log in automatically at the serial console, detect if a second drive in
+QEMU is available, and if so mount it, run a script (it'll specifically be
+`run-qemu.sh` in this folder which is copied into the generated image talked
+about above), and then shut down.
+
+### QEMU setup - FreeBSD
+
+1. Download CD installer (most minimal is fine)
+2. `qemu-img create -f qcow2 foo.qcow2 2G`
+3. `qemu -cdrom foo.iso -drive if=virtio,file=foo.qcow2 -net nic,model=virtio -net user`
+4. run installer
+5. `echo 'console="comconsole"' >> /boot/loader.conf`
+6. `echo 'autoboot_delay="0"' >> /boot/loader.conf`
+7. look at /etc/ttys, see what getty argument is for ttyu0
+8. edit /etc/gettytab, look for ttyu0 argument, prepend `:al=root` to line
+   beneath
+
+(note that the current image has a `freebsd` user, but this isn't really
+necessary)
+
+Once that's done, arrange for this script to run at login:
+
+```
+#!/bin/sh
+
+sudo kldload ext2fs
+[ -e /dev/vtbd1 ] || exit 0
+sudo mount -t ext2fs /dev/vtbd1 /mnt
+sh /mnt/run.sh /mnt
+sudo poweroff
+```
+
+Helpful links
+
+* https://en.wikibooks.org/wiki/QEMU/Images
+* https://blog.nekoconeko.nl/blog/2015/06/04/creating-an-openstack-freebsd-image.html
+* https://www.freebsd.org/doc/handbook/serialconsole-setup.html
+
+
+### QEMU setup - OpenBSD
+
+1. Download CD installer
+2. `qemu-img create -f qcow2 foo.qcow2 2G`
+3. `qemu -cdrom foo.iso -drive if=virtio,file=foo.qcow2 -net nic,model=virtio -net user`
+4. run installer
+5. `echo 'set tty com0' >> /etc/boot.conf`
+6. `echo 'boot' >> /etc/boot.conf`
+7. Modify /etc/ttys, change the `tty00` at the end from 'unknown off' to
+   'vt220 on secure'
+8. Modify same line in /etc/ttys to have `"/root/foo.sh"` as the shell
+9. Add this script to `/root/foo.sh`
+
+```
+#!/bin/sh
+exec 1>/dev/tty00
+exec 2>&1
+
+if mount -t ext2fs /dev/sd1c /mnt; then
+  sh /mnt/run.sh /mnt
+  shutdown -ph now
+fi
+
+# limited shell...
+exec /bin/sh < /dev/tty00
+```
+
+10. `chmod +x /root/foo.sh`
+
+Helpful links:
+
+* https://en.wikibooks.org/wiki/QEMU/Images
+* http://www.openbsd.org/faq/faq7.html#SerCon
+
+# Questions?
+
+Hopefully that's at least somewhat of an introduction to everything going on
+here, and feel free to ping @alexcrichton with questions!
+
new file mode 100755
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/android-accept-licenses.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/expect -f
+# ignore-license
+
+set timeout 1800
+set cmd [lindex $argv 0]
+set licenses [lindex $argv 1]
+
+spawn {*}$cmd
+expect {
+  "Do you accept the license '*'*" {
+        exp_send "y\r"
+        exp_continue
+  }
+  eof
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/android-install-ndk.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+# file at the top-level directory of this distribution and at
+# http://rust-lang.org/COPYRIGHT.
+#
+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+# option. This file may not be copied, modified, or distributed
+# except according to those terms.
+
+set -ex
+
+curl -O https://dl.google.com/android/repository/android-ndk-r15b-linux-x86_64.zip
+unzip -q android-ndk-r15b-linux-x86_64.zip
+
+case "$1" in
+  aarch64)
+    arch=arm64
+    ;;
+
+  i686)
+    arch=x86
+    ;;
+
+  *)
+    arch=$1
+    ;;
+esac;
+
+android-ndk-r15b/build/tools/make_standalone_toolchain.py \
+        --unified-headers \
+        --install-dir /android/ndk-$1 \
+        --arch $arch \
+        --api 24
+
+rm -rf ./android-ndk-r15b-linux-x86_64.zip ./android-ndk-r15b
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/android-install-sdk.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+# file at the top-level directory of this distribution and at
+# http://rust-lang.org/COPYRIGHT.
+#
+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+# option. This file may not be copied, modified, or distributed
+# except according to those terms.
+
+set -ex
+
+# Prep the SDK and emulator
+#
+# Note that the update process requires that we accept a bunch of licenses, and
+# we can't just pipe `yes` into it for some reason, so we take the same strategy
+# located in https://github.com/appunite/docker by just wrapping it in a script
+# which apparently magically accepts the licenses.
+
+mkdir sdk
+curl https://dl.google.com/android/repository/tools_r25.2.5-linux.zip -O
+unzip -d sdk tools_r25.2.5-linux.zip
+
+filter="platform-tools,android-24"
+
+case "$1" in
+  arm | armv7)
+    abi=armeabi-v7a
+    ;;
+
+  aarch64)
+    abi=arm64-v8a
+    ;;
+
+  i686)
+    abi=x86
+    ;;
+
+  x86_64)
+    abi=x86_64
+    ;;
+
+  *)
+    echo "invalid arch: $1"
+    exit 1
+    ;;
+esac;
+
+filter="$filter,sys-img-$abi-android-24"
+
+./android-accept-licenses.sh "android - update sdk -a --no-ui --filter $filter"
+
+echo "no" | android create avd \
+                --name $1 \
+                --target android-24 \
+                --abi $abi
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/android-sysimage.sh
@@ -0,0 +1,52 @@
+# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+# file at the top-level directory of this distribution and at
+# http://rust-lang.org/COPYRIGHT.
+#
+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+# option. This file may not be copied, modified, or distributed
+# except according to those terms.
+
+set -ex
+
+URL=https://dl.google.com/android/repository/sys-img/android
+
+main() {
+    local arch=$1
+    local name=$2
+    local dest=/system
+    local td=$(mktemp -d)
+
+    apt-get install --no-install-recommends e2tools
+
+    pushd $td
+    curl -O $URL/$name
+    unzip -q $name
+
+    local system=$(find . -name system.img)
+    mkdir -p $dest/{bin,lib,lib64}
+
+    # Extract android linker and libraries to /system
+    # This allows android executables to be run directly (or with qemu)
+    if [ $arch = "x86_64" -o $arch = "arm64" ]; then
+        e2cp -p $system:/bin/linker64 $dest/bin/
+        e2cp -p $system:/lib64/libdl.so $dest/lib64/
+        e2cp -p $system:/lib64/libc.so $dest/lib64/
+        e2cp -p $system:/lib64/libm.so $dest/lib64/
+    else
+        e2cp -p $system:/bin/linker $dest/bin/
+        e2cp -p $system:/lib/libdl.so $dest/lib/
+        e2cp -p $system:/lib/libc.so $dest/lib/
+        e2cp -p $system:/lib/libm.so $dest/lib/
+    fi
+
+    # clean up
+    apt-get purge --auto-remove -y e2tools
+
+    popd
+
+    rm -rf $td
+}
+
+main "${@}"
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/aarch64-linux-android/Dockerfile
@@ -0,0 +1,45 @@
+FROM ubuntu:16.04
+
+RUN dpkg --add-architecture i386 && \
+    apt-get update && \
+    apt-get install -y --no-install-recommends \
+  file \
+  curl \
+  ca-certificates \
+  python \
+  unzip \
+  expect \
+  openjdk-9-jre \
+  libstdc++6:i386 \
+  libpulse0 \
+  gcc \
+  libc6-dev
+
+WORKDIR /android/
+COPY android* /android/
+
+ENV ANDROID_ARCH=aarch64
+ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
+
+RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
+RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
+RUN mv /root/.android /tmp
+RUN chmod 777 -R /tmp/.android
+RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
+
+ENV PATH=$PATH:/rust/bin \
+    CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android-gcc \
+    CARGO_TARGET_AARCH64_LINUX_ANDROID_RUNNER=/tmp/runtest \
+    HOME=/tmp
+
+ADD runtest-android.rs /tmp/runtest.rs
+ENTRYPOINT [ \
+  "bash", \
+  "-c", \
+  # set SHELL so android can detect a 64bits system, see
+  # http://stackoverflow.com/a/41789144
+  "SHELL=/bin/dash emulator @aarch64 -no-window & \
+   rustc /tmp/runtest.rs -o /tmp/runtest && \
+   exec \"$@\"", \
+  "--" \
+]
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/aarch64-unknown-linux-gnu/Dockerfile
@@ -0,0 +1,7 @@
+FROM ubuntu:17.10
+RUN apt-get update && apt-get install -y --no-install-recommends \
+  gcc libc6-dev ca-certificates \
+  gcc-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user
+ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
+    CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="qemu-aarch64 -L /usr/aarch64-linux-gnu" \
+    PATH=$PATH:/rust/bin
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/arm-linux-androideabi/Dockerfile
@@ -0,0 +1,45 @@
+FROM ubuntu:16.04
+
+RUN dpkg --add-architecture i386 && \
+    apt-get update && \
+    apt-get install -y --no-install-recommends \
+  file \
+  curl \
+  ca-certificates \
+  python \
+  unzip \
+  expect \
+  openjdk-9-jre \
+  libstdc++6:i386 \
+  libpulse0 \
+  gcc \
+  libc6-dev
+
+WORKDIR /android/
+COPY android* /android/
+
+ENV ANDROID_ARCH=arm
+ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
+
+RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
+RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
+RUN mv /root/.android /tmp
+RUN chmod 777 -R /tmp/.android
+RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
+
+ENV PATH=$PATH:/rust/bin \
+    CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
+    CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER=/tmp/runtest \
+    HOME=/tmp
+
+ADD runtest-android.rs /tmp/runtest.rs
+ENTRYPOINT [ \
+  "bash", \
+  "-c", \
+  # set SHELL so android can detect a 64bits system, see
+  # http://stackoverflow.com/a/41789144
+  "SHELL=/bin/dash emulator @arm -no-window & \
+   rustc /tmp/runtest.rs -o /tmp/runtest && \
+   exec \"$@\"", \
+  "--" \
+]
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
@@ -0,0 +1,7 @@
+FROM ubuntu:17.10
+RUN apt-get update && apt-get install -y --no-install-recommends \
+  gcc libc6-dev ca-certificates \
+  gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user
+ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
+    CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER="qemu-arm -L /usr/arm-linux-gnueabihf" \
+    PATH=$PATH:/rust/bin
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/asmjs-unknown-emscripten/Dockerfile
@@ -0,0 +1,20 @@
+FROM ubuntu:16.04
+
+RUN apt-get update && \
+    apt-get install -y --no-install-recommends \
+    ca-certificates \
+    curl \
+    gcc \
+    git \
+    libc6-dev \
+    python \
+    xz-utils
+
+COPY emscripten.sh /
+RUN bash /emscripten.sh
+
+ENV PATH=$PATH:/rust/bin \
+    CARGO_TARGET_ASMJS_UNKNOWN_EMSCRIPTEN_RUNNER=node
+
+COPY emscripten-entry.sh /
+ENTRYPOINT ["/emscripten-entry.sh"]
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/i686-linux-android/Dockerfile
@@ -0,0 +1,45 @@
+FROM ubuntu:16.04
+
+RUN dpkg --add-architecture i386 && \
+    apt-get update && \
+    apt-get install -y --no-install-recommends \
+  file \
+  curl \
+  ca-certificates \
+  python \
+  unzip \
+  expect \
+  openjdk-9-jre \
+  libstdc++6:i386 \
+  libpulse0 \
+  gcc \
+  libc6-dev
+
+WORKDIR /android/
+COPY android* /android/
+
+ENV ANDROID_ARCH=i686
+ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
+
+RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
+RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
+RUN mv /root/.android /tmp
+RUN chmod 777 -R /tmp/.android
+RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
+
+ENV PATH=$PATH:/rust/bin \
+    CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
+    CARGO_TARGET_I686_LINUX_ANDROID_RUNNER=/tmp/runtest \
+    HOME=/tmp
+
+ADD runtest-android.rs /tmp/runtest.rs
+ENTRYPOINT [ \
+  "bash", \
+  "-c", \
+  # set SHELL so android can detect a 64bits system, see
+  # http://stackoverflow.com/a/41789144
+  "SHELL=/bin/dash emulator @i686 -no-window -no-accel & \
+   rustc /tmp/runtest.rs -o /tmp/runtest && \
+   exec \"$@\"", \
+  "--" \
+]
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/i686-unknown-linux-gnu/Dockerfile
@@ -0,0 +1,5 @@
+FROM ubuntu:17.10
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
+  gcc-multilib libc6-dev ca-certificates
+ENV PATH=$PATH:/rust/bin
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/i686-unknown-linux-musl/Dockerfile
@@ -0,0 +1,30 @@
+FROM ubuntu:17.10
+
+RUN dpkg --add-architecture i386
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
+  gcc-multilib make libc6-dev git curl ca-certificates libc6:i386
+# Below we're cross-compiling musl for i686 using the system compiler on an
+# x86_64 system. This is an awkward thing to be doing and so we have to jump
+# through a couple hoops to get musl to be happy. In particular:
+#
+# * We specifically pass -m32 in CFLAGS and override CC when running ./configure,
+#   since otherwise the script will fail to find a compiler.
+# * We manually unset CROSS_COMPILE when running make; otherwise the makefile
+#   will call the non-existent binary 'i686-ar'.
+RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
+    tar xzf - && \
+    cd musl-1.1.15 && \
+    CC=gcc CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \
+    make CROSS_COMPILE= install -j4 && \
+    cd .. && \
+    rm -rf musl-1.1.15 && \
+# Install linux kernel headers sanitized for use with musl
+    curl -L  https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
+    tar xzf - && \
+    cd kernel-headers-3.12.6-5 && \
+    make ARCH=i386 prefix=/musl-i686 install -j4 && \
+    cd .. && \
+    rm -rf kernel-headers-3.12.6-5
+ENV PATH=$PATH:/musl-i686/bin:/rust/bin \
+    CC_i686_unknown_linux_musl=musl-gcc
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/mips-unknown-linux-gnu/Dockerfile
@@ -0,0 +1,10 @@
+FROM ubuntu:17.10
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        gcc libc6-dev qemu-user ca-certificates \
+        gcc-mips-linux-gnu libc6-dev-mips-cross \
+        qemu-system-mips
+
+ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \
+    CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_RUNNER="qemu-mips -L /usr/mips-linux-gnu" \
+    PATH=$PATH:/rust/bin
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/mips-unknown-linux-musl/Dockerfile
@@ -0,0 +1,17 @@
+FROM ubuntu:17.10
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \
+        bzip2
+
+RUN mkdir /toolchain
+
+# Note that this originally came from:
+# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
+RUN curl -L https://s3.amazonaws.com/rust-lang-ci/libc/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
+      tar xjf - -C /toolchain --strip-components=1
+
+ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15/bin \
+    CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
+    CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-openwrt-linux-gcc \
+    CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mips -L /toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15"
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile
@@ -0,0 +1,11 @@
+FROM ubuntu:17.10
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        gcc libc6-dev qemu-user ca-certificates \
+        gcc-mips64-linux-gnuabi64 libc6-dev-mips64-cross \
+        qemu-system-mips64
+
+ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_LINKER=mips64-linux-gnuabi64-gcc \
+    CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_RUNNER="qemu-mips64 -L /usr/mips64-linux-gnuabi64" \
+    CC_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-gcc \
+    PATH=$PATH:/rust/bin
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/mipsel-unknown-linux-musl/Dockerfile
@@ -0,0 +1,17 @@
+FROM ubuntu:17.10
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \
+        bzip2
+
+RUN mkdir /toolchain
+
+# Note that this originally came from:
+# https://downloads.openwrt.org/snapshots/trunk/malta/generic/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
+RUN curl -L https://s3.amazonaws.com/rust-lang-ci/libc/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
+      tar xjf - -C /toolchain --strip-components=2
+
+ENV PATH=$PATH:/rust/bin:/toolchain/bin \
+    CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
+    CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-openwrt-linux-gcc \
+    CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mipsel -L /toolchain"
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/powerpc-unknown-linux-gnu/Dockerfile
@@ -0,0 +1,10 @@
+FROM ubuntu:17.10
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        gcc libc6-dev qemu-user ca-certificates \
+        gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \
+        qemu-system-ppc
+
+ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \
+    CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc -L /usr/powerpc-linux-gnu" \
+    PATH=$PATH:/rust/bin
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
@@ -0,0 +1,11 @@
+FROM ubuntu:17.10
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        gcc libc6-dev qemu-user ca-certificates \
+        gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross \
+        qemu-system-ppc
+
+ENV CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER=powerpc64-linux-gnu-gcc \
+    CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc64 -L /usr/powerpc64-linux-gnu" \
+    CC=powerpc64-linux-gnu-gcc \
+    PATH=$PATH:/rust/bin
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/s390x-unknown-linux-gnu/Dockerfile
@@ -0,0 +1,12 @@
+FROM ubuntu:17.10
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+        gcc libc6-dev qemu-user ca-certificates \
+        gcc-s390x-linux-gnu libc6-dev-s390x-cross
+
+ENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc \
+    # TODO: in theory we should execute this, but qemu segfaults immediately :(
+    # CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER="qemu-s390x -L /usr/s390x-linux-gnu" \
+    CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER=true \
+    CC_s390x_unknown_linux_gnu=s390x-linux-gnu-gcc \
+    PATH=$PATH:/rust/bin
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/wasm32-unknown-emscripten/Dockerfile
@@ -0,0 +1,21 @@
+FROM ubuntu:16.04
+
+RUN apt-get update && \
+    apt-get install -y --no-install-recommends \
+    ca-certificates \
+    curl \
+    gcc \
+    git \
+    libc6-dev \
+    python \
+    xz-utils
+
+COPY emscripten.sh /
+RUN bash /emscripten.sh
+
+ENV PATH=$PATH:/rust/bin \
+    CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node-wrapper.sh
+
+COPY emscripten-entry.sh /
+COPY docker/wasm32-unknown-emscripten/node-wrapper.sh /usr/local/bin/node-wrapper.sh
+ENTRYPOINT ["/emscripten-entry.sh"]
new file mode 100755
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/wasm32-unknown-emscripten/node-wrapper.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+me=$1
+shift
+dir=$(dirname $me)
+file=$(basename $me)
+
+cd $dir
+exec node $file "$@"
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/x86_64-linux-android/Dockerfile
@@ -0,0 +1,26 @@
+FROM ubuntu:16.04
+
+RUN apt-get update && \
+    apt-get install -y --no-install-recommends \
+  ca-certificates \
+  curl \
+  gcc \
+  libc-dev \
+  python \
+  unzip
+
+WORKDIR /android/
+ENV ANDROID_ARCH=x86_64
+COPY android-install-ndk.sh /android/
+RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
+
+# We do not run x86_64-linux-android tests on an android emulator.
+# See ci/android-sysimage.sh for informations about how tests are run.
+COPY android-sysimage.sh /android/
+RUN bash /android/android-sysimage.sh x86_64 x86_64-24_r07.zip
+
+ENV PATH=$PATH:/rust/bin:/android/ndk-$ANDROID_ARCH/bin \
+    CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android-gcc \
+    CC_x86_64_linux_android=x86_64-linux-android-gcc \
+    CXX_x86_64_linux_android=x86_64-linux-android-g++ \
+    HOME=/tmp
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/x86_64-rumprun-netbsd/Dockerfile
@@ -0,0 +1,10 @@
+FROM mato/rumprun-toolchain-hw-x86_64
+USER root
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
+  qemu
+ENV PATH=$PATH:/rust/bin \
+    CARGO_TARGET_X86_64_RUMPRUN_NETBSD_RUNNER=/tmp/runtest
+
+ADD docker/x86_64-rumprun-netbsd/runtest.rs /tmp/
+ENTRYPOINT ["sh", "-c", "rustc /tmp/runtest.rs -o /tmp/runtest && exec \"$@\"", "--"]
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/x86_64-rumprun-netbsd/runtest.rs
@@ -0,0 +1,54 @@
+use std::env;
+use std::process::{Command, Stdio};
+use std::sync::mpsc;
+use std::thread;
+use std::time::Duration;
+use std::io::{BufRead, BufReader, Read};
+
+fn main() {
+    assert_eq!(env::args().len(), 2);
+
+    let status = Command::new("rumprun-bake")
+        .arg("hw_virtio")
+        .arg("/tmp/libc-test.img")
+        .arg(env::args().nth(1).unwrap())
+        .status()
+        .expect("failed to run rumprun-bake");
+    assert!(status.success());
+
+    let mut child = Command::new("qemu-system-x86_64")
+        .arg("-nographic")
+        .arg("-vga").arg("none")
+        .arg("-m").arg("64")
+        .arg("-kernel").arg("/tmp/libc-test.img")
+        .stdout(Stdio::piped())
+        .stderr(Stdio::piped())
+        .spawn()
+        .expect("failed to spawn qemu");
+
+    let mut stdout = child.stdout.take().unwrap();
+    let mut stderr = child.stderr.take().unwrap();
+    let (tx, rx) = mpsc::channel();
+    let tx2 = tx.clone();
+    let t1 = thread::spawn(move || find_ok(&mut stdout, tx));
+    let t2 = thread::spawn(move || find_ok(&mut stderr, tx2));
+
+    let res = rx.recv_timeout(Duration::new(5, 0));
+    child.kill().unwrap();
+    t1.join().unwrap();
+    t2.join().unwrap();
+
+    if res.is_err() {
+        panic!("didn't find success");
+    }
+}
+
+fn find_ok(input: &mut Read, tx: mpsc::Sender<()>) {
+    for line in BufReader::new(input).lines() {
+        let line = line.unwrap();
+        println!("{}", line);
+        if line.starts_with("PASSED ") && line.contains(" tests") {
+            tx.send(()).unwrap();
+        }
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/x86_64-unknown-freebsd/Dockerfile
@@ -0,0 +1,13 @@
+FROM alexcrichton/rust-slave-linux-cross:2016-04-15
+USER root
+
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
+  qemu genext2fs
+
+ENTRYPOINT ["sh"]
+
+ENV PATH=$PATH:/rust/bin \
+    QEMU=2016-11-06/freebsd.qcow2.gz \
+    CAN_CROSS=1 \
+    CARGO_TARGET_X86_64_UNKNOWN_FREEBSD_LINKER=x86_64-unknown-freebsd10-gcc
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/x86_64-unknown-linux-gnu/Dockerfile
@@ -0,0 +1,5 @@
+FROM ubuntu:17.10
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
+  gcc libc6-dev ca-certificates
+ENV PATH=$PATH:/rust/bin
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/docker/x86_64-unknown-linux-musl/Dockerfile
@@ -0,0 +1,20 @@
+FROM ubuntu:17.10
+
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
+  gcc make libc6-dev git curl ca-certificates
+RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
+    tar xzf - && \
+    cd musl-1.1.15 && \
+    ./configure --prefix=/musl-x86_64 && \
+    make install -j4 && \
+    cd .. && \
+    rm -rf musl-1.1.15 && \
+# Install linux kernel headers sanitized for use with musl
+    curl -L  https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
+    tar xzf - && \
+    cd kernel-headers-3.12.6-5 && \
+    make ARCH=x86_64 prefix=/musl-x86_64 install -j4 && \
+    cd .. && \
+    rm -rf kernel-headers-3.12.6-5
+ENV PATH=$PATH:/musl-x86_64/bin:/rust/bin
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/dox.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# Builds documentation for all target triples that we have a registered URL for
+# in liblibc. This scrapes the list of triples to document from `src/lib.rs`
+# which has a bunch of `html_root_url` directives we pick up.
+
+set -e
+
+TARGETS=`grep html_root_url src/lib.rs | sed 's/.*".*\/\(.*\)"/\1/'`
+
+rm -rf target/doc
+mkdir -p target/doc
+
+cp ci/landing-page-head.html target/doc/index.html
+
+for target in $TARGETS; do
+  echo documenting $target
+
+  rustdoc -o target/doc/$target --target $target src/lib.rs --cfg dox \
+    --crate-name libc
+
+  echo "<li><a href="/libc/$target/libc/index.html">$target</a></li>" \
+    >> target/doc/index.html
+done
+
+cat ci/landing-page-footer.html >> target/doc/index.html
+
+# If we're on travis, not a PR, and on the right branch, publish!
+if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
+  pip install ghp_import --install-option="--prefix=$HOME/.local"
+  $HOME/.local/bin/ghp-import -n target/doc
+  git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
+fi
new file mode 100755
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/emscripten-entry.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+# file at the top-level directory of this distribution and at
+# http://rust-lang.org/COPYRIGHT.
+#
+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+# option. This file may not be copied, modified, or distributed
+# except according to those terms.
+
+set -ex
+
+source /emsdk-portable/emsdk_env.sh &> /dev/null
+
+# emsdk-portable provides a node binary, but we need version 8 to run wasm
+export PATH="/node-v8.0.0-linux-x64/bin:$PATH"
+
+exec "$@"
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/emscripten.sh
@@ -0,0 +1,54 @@
+# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+# file at the top-level directory of this distribution and at
+# http://rust-lang.org/COPYRIGHT.
+#
+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+# option. This file may not be copied, modified, or distributed
+# except according to those terms.
+
+set -ex
+
+hide_output() {
+  set +x
+  on_err="
+echo ERROR: An error was encountered with the build.
+cat /tmp/build.log
+exit 1
+"
+  trap "$on_err" ERR
+  bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
+  PING_LOOP_PID=$!
+  $@ &> /tmp/build.log
+  trap - ERR
+  kill $PING_LOOP_PID
+  rm -f /tmp/build.log
+  set -x
+}
+
+cd /
+curl -L https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
+    tar -xz
+
+cd /emsdk-portable
+./emsdk update
+hide_output ./emsdk install sdk-1.37.20-64bit
+./emsdk activate sdk-1.37.20-64bit
+
+# Compile and cache libc
+source ./emsdk_env.sh
+echo "main(){}" > a.c
+HOME=/emsdk-portable/ emcc a.c
+HOME=/emsdk-portable/ emcc -s BINARYEN=1 a.c
+rm -f a.*
+
+# Make emsdk usable by any user
+cp /root/.emscripten /emsdk-portable
+chmod a+rxw -R /emsdk-portable
+
+# node 8 is required to run wasm
+cd /
+curl -L https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz | \
+    tar -xJ
+
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/ios/deploy_and_run_on_ios_simulator.rs
@@ -0,0 +1,171 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// This is a script to deploy and execute a binary on an iOS simulator.
+// The primary use of this is to be able to run unit tests on the simulator and
+// retrieve the results.
+//
+// To do this through Cargo instead, use Dinghy
+// (https://github.com/snipsco/dinghy): cargo dinghy install, then cargo dinghy
+// test.
+
+use std::env;
+use std::fs::{self, File};
+use std::io::Write;
+use std::path::Path;
+use std::process;
+use std::process::Command;
+
+macro_rules! t {
+    ($e:expr) => (match $e {
+        Ok(e) => e,
+        Err(e) => panic!("{} failed with: {}", stringify!($e), e),
+    })
+}
+
+// Step one: Wrap as an app
+fn package_as_simulator_app(crate_name: &str, test_binary_path: &Path) {
+    println!("Packaging simulator app");
+    drop(fs::remove_dir_all("ios_simulator_app"));
+    t!(fs::create_dir("ios_simulator_app"));
+    t!(fs::copy(test_binary_path,
+                Path::new("ios_simulator_app").join(crate_name)));
+
+    let mut f = t!(File::create("ios_simulator_app/Info.plist"));
+    t!(f.write_all(format!(r#"
+        <?xml version="1.0" encoding="UTF-8"?>
+        <!DOCTYPE plist PUBLIC
+                "-//Apple//DTD PLIST 1.0//EN"
+                "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+        <plist version="1.0">
+            <dict>
+                <key>CFBundleExecutable</key>
+                <string>{}</string>
+                <key>CFBundleIdentifier</key>
+                <string>com.rust.unittests</string>
+            </dict>
+        </plist>
+    "#, crate_name).as_bytes()));
+}
+
+// Step two: Start the iOS simulator
+fn start_simulator() {
+    println!("Looking for iOS simulator");
+    let output = t!(Command::new("xcrun").arg("simctl").arg("list").output());
+    assert!(output.status.success());
+    let mut simulator_exists = false;
+    let mut simulator_booted = false;
+    let mut found_rust_sim = false;
+    let stdout = t!(String::from_utf8(output.stdout));
+    for line in stdout.lines() {
+        if line.contains("rust_ios") {
+            if found_rust_sim {
+                panic!("Duplicate rust_ios simulators found. Please \
+                        double-check xcrun simctl list.");
+            }
+            simulator_exists = true;
+            simulator_booted = line.contains("(Booted)");
+            found_rust_sim = true;
+        }
+    }
+
+    if simulator_exists == false {
+        println!("Creating iOS simulator");
+        Command::new("xcrun")
+                .arg("simctl")
+                .arg("create")
+                .arg("rust_ios")
+                .arg("com.apple.CoreSimulator.SimDeviceType.iPhone-SE")
+                .arg("com.apple.CoreSimulator.SimRuntime.iOS-10-2")
+                .check_status();
+    } else if simulator_booted == true {
+        println!("Shutting down already-booted simulator");
+        Command::new("xcrun")
+                .arg("simctl")
+                .arg("shutdown")
+                .arg("rust_ios")
+                .check_status();
+    }
+
+    println!("Starting iOS simulator");
+    // We can't uninstall the app (if present) as that will hang if the
+    // simulator isn't completely booted; just erase the simulator instead.
+    Command::new("xcrun").arg("simctl").arg("erase").arg("rust_ios").check_status();
+    Command::new("xcrun").arg("simctl").arg("boot").arg("rust_ios").check_status();
+}
+
+// Step three: Install the app
+fn install_app_to_simulator() {
+    println!("Installing app to simulator");
+    Command::new("xcrun")
+            .arg("simctl")
+            .arg("install")
+            .arg("booted")
+            .arg("ios_simulator_app/")
+            .check_status();
+}
+
+// Step four: Run the app
+fn run_app_on_simulator() {
+    println!("Running app");
+    let output = t!(Command::new("xcrun")
+                    .arg("simctl")
+                    .arg("launch")
+                    .arg("--console")
+                    .arg("booted")
+                    .arg("com.rust.unittests")
+                    .output());
+
+    println!("stdout --\n{}\n", String::from_utf8_lossy(&output.stdout));
+    println!("stderr --\n{}\n", String::from_utf8_lossy(&output.stderr));
+
+    let stdout = String::from_utf8_lossy(&output.stdout);
+    let passed = stdout.lines()
+                       .find(|l| l.contains("PASSED"))
+                       .map(|l| l.contains("tests"))
+                       .unwrap_or(false);
+
+    println!("Shutting down simulator");
+    Command::new("xcrun")
+        .arg("simctl")
+        .arg("shutdown")
+        .arg("rust_ios")
+        .check_status();
+    if !passed {
+        panic!("tests didn't pass");
+    }
+}
+
+trait CheckStatus {
+    fn check_status(&mut self);
+}
+
+impl CheckStatus for Command {
+    fn check_status(&mut self) {
+        println!("\trunning: {:?}", self);
+        assert!(t!(self.status()).success());
+    }
+}
+
+fn main() {
+    let args: Vec<String> = env::args().collect();
+    if args.len() != 2 {
+        println!("Usage: {} <executable>", args[0]);
+        process::exit(-1);
+    }
+
+    let test_binary_path = Path::new(&args[1]);
+    let crate_name = test_binary_path.file_name().unwrap();
+
+    package_as_simulator_app(crate_name.to_str().unwrap(), test_binary_path);
+    start_simulator();
+    install_app_to_simulator();
+    run_app_on_simulator();
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/landing-page-footer.html
@@ -0,0 +1,3 @@
+    </ul>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/landing-page-head.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <ul>
new file mode 100755
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/run-docker.sh
@@ -0,0 +1,36 @@
+# Small script to run tests for a target (or all targets) inside all the
+# respective docker images.
+
+set -ex
+
+run() {
+    echo $1
+    # use -f so we can use ci/ as build context
+    docker build -t libc -f ci/docker/$1/Dockerfile ci/
+    mkdir -p target
+    if [ -w /dev/kvm ]; then
+      kvm="--volume /dev/kvm:/dev/kvm"
+    fi
+    docker run \
+      --user `id -u`:`id -g` \
+      --rm \
+      --init \
+      --volume $HOME/.cargo:/cargo \
+      $kvm \
+      --env CARGO_HOME=/cargo \
+      --volume `rustc --print sysroot`:/rust:ro \
+      --volume `pwd`:/checkout:ro \
+      --volume `pwd`/target:/checkout/target \
+      --env CARGO_TARGET_DIR=/checkout/target \
+      --workdir /checkout \
+      libc \
+      ci/run.sh $1
+}
+
+if [ -z "$1" ]; then
+  for d in `ls ci/docker/`; do
+    run $d
+  done
+else
+  run $1
+fi
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/run-qemu.sh
@@ -0,0 +1,32 @@
+# Initial script which is run inside of all qemu images. The first argument to
+# this script (as arranged by the qemu image itself) is the path to where the
+# libc crate is mounted.
+#
+# For qemu images we currently need to install Rust manually as this wasn't done
+# by the initial run-travis.sh script
+#
+# FIXME: feels like run-travis.sh should be responsible for downloading the
+#        compiler.
+
+set -ex
+
+ROOT=$1
+cp -r $ROOT/libc /tmp/libc
+cd /tmp/libc
+
+TARGET=$(cat $ROOT/TARGET)
+export CARGO_TARGET_DIR=/tmp
+
+case $TARGET in
+  *-openbsd)
+    pkg_add cargo gcc%4.9 rust
+    export CC=egcc
+    ;;
+
+  *)
+    echo "Unknown target: $TARGET"
+    exit 1
+    ;;
+esac
+
+exec sh ci/run.sh $TARGET
new file mode 100755
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/run.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# Builds and runs tests for a particular target passed as an argument to this
+# script.
+
+set -ex
+
+TARGET=$1
+
+# If we're going to run tests inside of a qemu image, then we don't need any of
+# the scripts below. Instead, download the image, prepare a filesystem which has
+# the current state of this repository, and then run the image.
+#
+# It's assume that all images, when run with two disks, will run the `run.sh`
+# script from the second which we place inside.
+if [ "$QEMU" != "" ]; then
+  tmpdir=/tmp/qemu-img-creation
+  mkdir -p $tmpdir
+
+  if [ -z "${QEMU#*.gz}" ]; then
+    # image is .gz : download and uncompress it
+    qemufile=$(echo ${QEMU%.gz} | sed 's/\//__/g')
+    if [ ! -f $tmpdir/$qemufile ]; then
+      curl https://s3.amazonaws.com/rust-lang-ci/libc/$QEMU | \
+        gunzip -d > $tmpdir/$qemufile
+    fi
+  else
+    # plain qcow2 image: just download it
+    qemufile=$(echo ${QEMU} | sed 's/\//__/g')
+    if [ ! -f $tmpdir/$qemufile ]; then
+      curl https://s3.amazonaws.com/rust-lang-ci/libc/$QEMU \
+        > $tmpdir/$qemufile
+    fi
+  fi
+
+  # Create a mount a fresh new filesystem image that we'll later pass to QEMU.
+  # This will have a `run.sh` script will which use the artifacts inside to run
+  # on the host.
+  rm -f $tmpdir/libc-test.img
+  mkdir $tmpdir/mount
+
+  # Do the standard rigamarole of cross-compiling an executable and then the
+  # script to run just executes the binary.
+  cargo build --manifest-path libc-test/Cargo.toml --target $TARGET
+  cp $CARGO_TARGET_DIR/$TARGET/debug/libc-test $tmpdir/mount/
+  echo 'exec $1/libc-test' > $tmpdir/mount/run.sh
+
+  du -sh $tmpdir/mount
+  genext2fs \
+      --root $tmpdir/mount \
+      --size-in-blocks 100000 \
+      $tmpdir/libc-test.img
+
+  # Pass -snapshot to prevent tampering with the disk images, this helps when
+  # running this script in development. The two drives are then passed next,
+  # first is the OS and second is the one we just made. Next the network is
+  # configured to work (I'm not entirely sure how), and then finally we turn off
+  # graphics and redirect the serial console output to out.log.
+  qemu-system-x86_64 \
+    -m 1024 \
+    -snapshot \
+    -drive if=virtio,file=$tmpdir/$qemufile \
+    -drive if=virtio,file=$tmpdir/libc-test.img \
+    -net nic,model=virtio \
+    -net user \
+    -nographic \
+    -vga none 2>&1 | tee $CARGO_TARGET_DIR/out.log
+  exec grep "^PASSED .* tests" $CARGO_TARGET_DIR/out.log
+fi
+
+exec cargo test --manifest-path libc-test/Cargo.toml --target $TARGET
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/runtest-android.rs
@@ -0,0 +1,41 @@
+use std::env;
+use std::process::Command;
+use std::path::{Path, PathBuf};
+
+fn main() {
+    assert_eq!(env::args_os().len(), 2);
+    let test = PathBuf::from(env::args_os().nth(1).unwrap());
+    let dst = Path::new("/data/local/tmp").join(test.file_name().unwrap());
+
+    let status = Command::new("adb")
+        .arg("wait-for-device")
+        .status()
+        .expect("failed to run rumprun-bake");
+    assert!(status.success());
+
+    let status = Command::new("adb")
+        .arg("push")
+        .arg(&test)
+        .arg(&dst)
+        .status()
+        .expect("failed to run rumprun-bake");
+    assert!(status.success());
+
+    let output = Command::new("adb")
+        .arg("shell")
+        .arg(&dst)
+        .output()
+        .expect("failed to run rumprun-bake");
+    assert!(status.success());
+
+    println!("status: {}\nstdout ---\n{}\nstderr ---\n{}",
+             output.status,
+             String::from_utf8_lossy(&output.stdout),
+             String::from_utf8_lossy(&output.stderr));
+
+    let stdout = String::from_utf8_lossy(&output.stdout);
+    let mut lines = stdout.lines().filter(|l| l.starts_with("PASSED "));
+    if !lines.any(|l| l.contains(" tests")) {
+        panic!("failed to find successful test run");
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/ci/style.rs
@@ -0,0 +1,204 @@
+//! Simple script to verify the coding style of this library
+//!
+//! ## How to run
+//!
+//! The first argument to this script is the directory to run on, so running
+//! this script should be as simple as:
+//!
+//! ```notrust
+//! rustc ci/style.rs
+//! ./style src
+//! ```
+//!
+//! ## Guidelines
+//!
+//! The current style is:
+//!
+//! * No trailing whitespace
+//! * No tabs
+//! * 80-character lines
+//! * `extern` instead of `extern "C"`
+//! * Specific module layout:
+//!     1. use directives
+//!     2. typedefs
+//!     3. structs
+//!     4. constants
+//!     5. f! { ... } functions
+//!     6. extern functions
+//!     7. modules + pub use
+//!
+//! Things not verified:
+//!
+//! * alignment
+//! * 4-space tabs
+//! * leading colons on paths
+
+use std::env;
+use std::fs;
+use std::io::prelude::*;
+use std::path::Path;
+
+macro_rules! t {
+    ($e:expr) => (match $e {
+        Ok(e) => e,
+        Err(e) => panic!("{} failed with {}", stringify!($e), e),
+    })
+}
+
+fn main() {
+    let arg = env::args().skip(1).next().unwrap_or(".".to_string());
+
+    let mut errors = Errors { errs: false };
+    walk(Path::new(&arg), &mut errors);
+
+    if errors.errs {
+        panic!("found some lint errors");
+    } else {
+        println!("good style!");
+    }
+}
+
+fn walk(path: &Path, err: &mut Errors) {
+    for entry in t!(path.read_dir()).map(|e| t!(e)) {
+        let path = entry.path();
+        if t!(entry.file_type()).is_dir() {
+            walk(&path, err);
+            continue
+        }
+
+        let name = entry.file_name().into_string().unwrap();
+        match &name[..] {
+            n if !n.ends_with(".rs") => continue,
+
+            "dox.rs" |
+            "lib.rs" |
+            "macros.rs" => continue,
+
+            _ => {}
+        }
+
+        let mut contents = String::new();
+        t!(t!(fs::File::open(&path)).read_to_string(&mut contents));
+
+        check_style(&contents, &path, err);
+    }
+}
+
+struct Errors {
+    errs: bool,
+}
+
+#[derive(Clone, Copy, PartialEq)]
+enum State {
+    Start,
+    Imports,
+    Typedefs,
+    Structs,
+    Constants,
+    FunctionDefinitions,
+    Functions,
+    Modules,
+}
+
+fn check_style(file: &str, path: &Path, err: &mut Errors) {
+    let mut state = State::Start;
+    let mut s_macros = 0;
+    let mut f_macros = 0;
+    let mut prev_blank = false;
+
+    for (i, line) in file.lines().enumerate() {
+        if line == "" {
+            if prev_blank {
+                err.error(path, i, "double blank line");
+            }
+            prev_blank = true;
+        } else {
+            prev_blank = false;
+        }
+        if line != line.trim_right() {
+            err.error(path, i, "trailing whitespace");
+        }
+        if line.contains("\t") {
+            err.error(path, i, "tab character");
+        }
+        if line.len() > 80 {
+            err.error(path, i, "line longer than 80 chars");
+        }
+        if line.contains("extern \"C\"") {
+            err.error(path, i, "use `extern` instead of `extern \"C\"");
+        }
+        if line.contains("#[cfg(") && !line.contains(" if ") {
+            if state != State::Structs {
+                err.error(path, i, "use cfg_if! and submodules \
+                                    instead of #[cfg]");
+            }
+        }
+
+        let line = line.trim_left();
+        let is_pub = line.starts_with("pub ");
+        let line = if is_pub {&line[4..]} else {line};
+
+        let line_state = if line.starts_with("use ") {
+            if is_pub {
+                State::Modules
+            } else {
+                State::Imports
+            }
+        } else if line.starts_with("const ") {
+            State::Constants
+        } else if line.starts_with("type ") {
+            State::Typedefs
+        } else if line.starts_with("s! {") {
+            s_macros += 1;
+            State::Structs
+        } else if line.starts_with("f! {") {
+            f_macros += 1;
+            State::FunctionDefinitions
+        } else if line.starts_with("extern ") {
+            State::Functions
+        } else if line.starts_with("mod ") {
+            State::Modules
+        } else {
+            continue
+        };
+
+        if state as usize > line_state as usize {
+            err.error(path, i, &format!("{} found after {} when \
+                                         it belongs before",
+                                        line_state.desc(), state.desc()));
+        }
+
+        if f_macros == 2 {
+            f_macros += 1;
+            err.error(path, i, "multiple f! macros in one module");
+        }
+        if s_macros == 2 {
+            s_macros += 1;
+            err.error(path, i, "multiple s! macros in one module");
+        }
+
+        state = line_state;
+    }
+}
+
+impl State {
+    fn desc(&self) -> &str {
+        match *self {
+            State::Start => "start",
+            State::Imports => "import",
+            State::Typedefs => "typedef",
+            State::Structs => "struct",
+            State::Constants => "constant",
+            State::FunctionDefinitions => "function definition",
+            State::Functions => "extern function",
+            State::Modules => "module",
+        }
+    }
+}
+
+impl Errors {
+    fn error(&mut self, path: &Path, line: usize, msg: &str) {
+        self.errs = true;
+        println!("{}:{} - {}", path.display(), line + 1, msg);
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/dox.rs
@@ -0,0 +1,175 @@
+pub use self::imp::*;
+
+#[cfg(not(dox))]
+mod imp {
+    pub use core::option::Option;
+    pub use core::clone::Clone;
+    pub use core::marker::Copy;
+    pub use core::mem;
+}
+
+#[cfg(dox)]
+mod imp {
+    pub enum Option<T> {
+        Some(T),
+        None,
+    }
+    impl<T: Copy> Copy for Option<T> {}
+    impl<T: Clone> Clone for Option<T> {
+        fn clone(&self) -> Option<T> { loop {} }
+    }
+
+    pub trait Clone {
+        fn clone(&self) -> Self;
+    }
+
+    #[lang = "copy"]
+    pub trait Copy {}
+
+    #[lang = "freeze"]
+    pub trait Freeze {}
+
+    #[lang = "sync"]
+    pub trait Sync {}
+    impl<T> Sync for T {}
+
+    #[lang = "sized"]
+    pub trait Sized {}
+
+    macro_rules! each_int {
+        ($mac:ident) => (
+            $mac!(u8);
+            $mac!(u16);
+            $mac!(u32);
+            $mac!(u64);
+            $mac!(usize);
+            each_signed_int!($mac);
+        )
+    }
+
+    macro_rules! each_signed_int {
+        ($mac:ident) => (
+            $mac!(i8);
+            $mac!(i16);
+            $mac!(i32);
+            $mac!(i64);
+            $mac!(isize);
+        )
+    }
+
+    #[lang = "div"]
+    pub trait Div<RHS> {
+        type Output;
+        fn div(self, rhs: RHS) -> Self::Output;
+    }
+
+    macro_rules! impl_div {
+        ($($i:ident)*) => ($(
+            impl Div<$i> for $i {
+                type Output = $i;
+                fn div(self, rhs: $i) -> $i { self / rhs }
+            }
+        )*)
+    }
+    each_int!(impl_div);
+
+    #[lang = "shl"]
+    pub trait Shl<RHS> {
+        type Output;
+        fn shl(self, rhs: RHS) -> Self::Output;
+    }
+
+    macro_rules! impl_shl {
+        ($($i:ident)*) => ($(
+            impl Shl<$i> for $i {
+                type Output = $i;
+                fn shl(self, rhs: $i) -> $i { self << rhs }
+            }
+        )*)
+    }
+    each_int!(impl_shl);
+
+    #[lang = "mul"]
+    pub trait Mul<RHS=Self> {
+        type Output;
+        fn mul(self, rhs: RHS) -> Self::Output;
+    }
+
+    macro_rules! impl_mul {
+        ($($i:ident)*) => ($(
+            impl Mul for $i {
+                type Output = $i;
+                fn mul(self, rhs: $i) -> $i { self * rhs }
+            }
+        )*)
+    }
+    each_int!(impl_mul);
+
+    #[lang = "sub"]
+    pub trait Sub<RHS=Self> {
+        type Output;
+        fn sub(self, rhs: RHS) -> Self::Output;
+    }
+
+    macro_rules! impl_sub {
+        ($($i:ident)*) => ($(
+            impl Sub for $i {
+                type Output = $i;
+                fn sub(self, rhs: $i) -> $i { self - rhs }
+            }
+        )*)
+    }
+    each_int!(impl_sub);
+
+    #[lang = "bitor"]
+    pub trait Bitor<RHS=Self> {
+        type Output;
+        fn bitor(self, rhs: RHS) -> Self::Output;
+    }
+
+    macro_rules! impl_bitor {
+        ($($i:ident)*) => ($(
+            impl Bitor for $i {
+                type Output = $i;
+                fn bitor(self, rhs: $i) -> $i { self | rhs }
+            }
+        )*)
+    }
+    each_int!(impl_bitor);
+
+    #[lang = "neg"]
+    pub trait Neg {
+        type Output;
+        fn neg(self) -> Self::Output;
+    }
+
+    macro_rules! impl_neg {
+        ($($i:ident)*) => ($(
+            impl Neg for $i {
+                type Output = $i;
+                fn neg(self) -> $i { -self }
+            }
+        )*)
+    }
+    each_signed_int!(impl_neg);
+
+    #[lang = "not"]
+    pub trait Not {
+        type Output;
+        fn not(self) -> Self::Output;
+    }
+
+    macro_rules! impl_not {
+        ($($i:ident)*) => ($(
+            impl Not for $i {
+                type Output = $i;
+                fn not(self) -> $i { !self }
+            }
+        )*)
+    }
+    each_int!(impl_not);
+
+    pub mod mem {
+        pub fn size_of_val<T>(_: &T) -> usize { 4 }
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/lib.rs
@@ -0,0 +1,285 @@
+// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! Crate docs
+
+#![allow(bad_style, overflowing_literals, improper_ctypes)]
+#![crate_type = "rlib"]
+#![crate_name = "libc"]
+#![cfg_attr(dox, feature(no_core, lang_items))]
+#![cfg_attr(dox, no_core)]
+#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
+       html_favicon_url = "https://doc.rust-lang.org/favicon.ico")]
+
+#![cfg_attr(all(target_os = "linux", target_arch = "x86_64"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-linux-gnu"
+))]
+#![cfg_attr(all(target_os = "linux", target_arch = "x86"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/i686-unknown-linux-gnu"
+))]
+#![cfg_attr(all(target_os = "linux", target_arch = "arm"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/arm-unknown-linux-gnueabihf"
+))]
+#![cfg_attr(all(target_os = "linux", target_arch = "mips"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/mips-unknown-linux-gnu"
+))]
+#![cfg_attr(all(target_os = "linux", target_arch = "aarch64"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/aarch64-unknown-linux-gnu"
+))]
+#![cfg_attr(all(target_os = "linux", target_env = "musl"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-linux-musl"
+))]
+#![cfg_attr(all(target_os = "macos", target_arch = "x86_64"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/x86_64-apple-darwin"
+))]
+#![cfg_attr(all(target_os = "macos", target_arch = "x86"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/i686-apple-darwin"
+))]
+#![cfg_attr(all(windows, target_arch = "x86_64", target_env = "gnu"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/x86_64-pc-windows-gnu"
+))]
+#![cfg_attr(all(windows, target_arch = "x86", target_env = "gnu"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/i686-pc-windows-gnu"
+))]
+#![cfg_attr(all(windows, target_arch = "x86_64", target_env = "msvc"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/x86_64-pc-windows-msvc"
+))]
+#![cfg_attr(all(windows, target_arch = "x86", target_env = "msvc"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/i686-pc-windows-msvc"
+))]
+#![cfg_attr(target_os = "android", doc(
+    html_root_url = "https://doc.rust-lang.org/libc/arm-linux-androideabi"
+))]
+#![cfg_attr(target_os = "freebsd", doc(
+    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-freebsd"
+))]
+#![cfg_attr(target_os = "openbsd", doc(
+    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-openbsd"
+))]
+#![cfg_attr(target_os = "bitrig", doc(
+    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-bitrig"
+))]
+#![cfg_attr(target_os = "netbsd", doc(
+    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-netbsd"
+))]
+#![cfg_attr(target_os = "dragonfly", doc(
+    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-dragonfly"
+))]
+#![cfg_attr(all(target_os = "emscripten", target_arch = "asmjs"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/asmjs-unknown-emscripten"
+))]
+#![cfg_attr(all(target_os = "emscripten", target_arch = "wasm32"), doc(
+    html_root_url = "https://doc.rust-lang.org/libc/wasm32-unknown-emscripten"
+))]
+
+// Attributes needed when building as part of the standard library
+#![cfg_attr(stdbuild, feature(no_std, core, core_slice_ext, staged_api, custom_attribute, cfg_target_vendor))]
+#![cfg_attr(stdbuild, feature(link_cfg))]
+#![cfg_attr(stdbuild, no_std)]
+#![cfg_attr(stdbuild, staged_api)]
+#![cfg_attr(stdbuild, allow(warnings))]
+#![cfg_attr(stdbuild, unstable(feature = "libc",
+                               reason = "use `libc` from crates.io",
+                               issue = "27783"))]
+
+#![cfg_attr(not(feature = "use_std"), no_std)]
+
+#[cfg(all(not(stdbuild), not(dox), feature = "use_std"))]
+extern crate std as core;
+
+#[macro_use] mod macros;
+mod dox;
+
+// Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help enable
+// more optimization opportunities around it recognizing things like
+// malloc/free.
+#[repr(u8)]
+pub enum c_void {
+    // Two dummy variants so the #[repr] attribute can be used.
+    #[doc(hidden)]
+    __variant1,
+    #[doc(hidden)]
+    __variant2,
+}
+
+pub type int8_t = i8;
+pub type int16_t = i16;
+pub type int32_t = i32;
+pub type int64_t = i64;
+pub type uint8_t = u8;
+pub type uint16_t = u16;
+pub type uint32_t = u32;
+pub type uint64_t = u64;
+
+pub type c_schar = i8;
+pub type c_uchar = u8;
+pub type c_short = i16;
+pub type c_ushort = u16;
+pub type c_int = i32;
+pub type c_uint = u32;
+pub type c_float = f32;
+pub type c_double = f64;
+pub type c_longlong = i64;
+pub type c_ulonglong = u64;
+pub type intmax_t = i64;
+pub type uintmax_t = u64;
+
+pub type size_t = usize;
+pub type ptrdiff_t = isize;
+pub type intptr_t = isize;
+pub type uintptr_t = usize;
+pub type ssize_t = isize;
+
+pub enum FILE {}
+pub enum fpos_t {} // TODO: fill this out with a struct
+
+extern {
+    pub fn isalnum(c: c_int) -> c_int;
+    pub fn isalpha(c: c_int) -> c_int;
+    pub fn iscntrl(c: c_int) -> c_int;
+    pub fn isdigit(c: c_int) -> c_int;
+    pub fn isgraph(c: c_int) -> c_int;
+    pub fn islower(c: c_int) -> c_int;
+    pub fn isprint(c: c_int) -> c_int;
+    pub fn ispunct(c: c_int) -> c_int;
+    pub fn isspace(c: c_int) -> c_int;
+    pub fn isupper(c: c_int) -> c_int;
+    pub fn isxdigit(c: c_int) -> c_int;
+    pub fn tolower(c: c_int) -> c_int;
+    pub fn toupper(c: c_int) -> c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "fopen$UNIX2003")]
+    pub fn fopen(filename: *const c_char,
+                 mode: *const c_char) -> *mut FILE;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "freopen$UNIX2003")]
+    pub fn freopen(filename: *const c_char, mode: *const c_char,
+                   file: *mut FILE) -> *mut FILE;
+    pub fn fflush(file: *mut FILE) -> c_int;
+    pub fn fclose(file: *mut FILE) -> c_int;
+    pub fn remove(filename: *const c_char) -> c_int;
+    pub fn rename(oldname: *const c_char, newname: *const c_char) -> c_int;
+    pub fn tmpfile() -> *mut FILE;
+    pub fn setvbuf(stream: *mut FILE,
+                   buffer: *mut c_char,
+                   mode: c_int,
+                   size: size_t) -> c_int;
+    pub fn setbuf(stream: *mut FILE, buf: *mut c_char);
+    pub fn getchar() -> c_int;
+    pub fn putchar(c: c_int) -> c_int;
+    pub fn fgetc(stream: *mut FILE) -> c_int;
+    pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) -> *mut c_char;
+    pub fn fputc(c: c_int, stream: *mut FILE) -> c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "fputs$UNIX2003")]
+    pub fn fputs(s: *const c_char, stream: *mut FILE)-> c_int;
+    pub fn puts(s: *const c_char) -> c_int;
+    pub fn ungetc(c: c_int, stream: *mut FILE) -> c_int;
+    pub fn fread(ptr: *mut c_void,
+                 size: size_t,
+                 nobj: size_t,
+                 stream: *mut FILE)
+                 -> size_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "fwrite$UNIX2003")]
+    pub fn fwrite(ptr: *const c_void,
+                  size: size_t,
+                  nobj: size_t,
+                  stream: *mut FILE)
+                  -> size_t;
+    pub fn fseek(stream: *mut FILE, offset: c_long, whence: c_int) -> c_int;
+    pub fn ftell(stream: *mut FILE) -> c_long;
+    pub fn rewind(stream: *mut FILE);
+    #[cfg_attr(target_os = "netbsd", link_name = "__fgetpos50")]
+    pub fn fgetpos(stream: *mut FILE, ptr: *mut fpos_t) -> c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__fsetpos50")]
+    pub fn fsetpos(stream: *mut FILE, ptr: *const fpos_t) -> c_int;
+    pub fn feof(stream: *mut FILE) -> c_int;
+    pub fn ferror(stream: *mut FILE) -> c_int;
+    pub fn perror(s: *const c_char);
+    pub fn atoi(s: *const c_char) -> c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "strtod$UNIX2003")]
+    pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double;
+    pub fn strtol(s: *const c_char,
+                  endp: *mut *mut c_char, base: c_int) -> c_long;
+    pub fn strtoul(s: *const c_char, endp: *mut *mut c_char,
+                   base: c_int) -> c_ulong;
+    pub fn calloc(nobj: size_t, size: size_t) -> *mut c_void;
+    pub fn malloc(size: size_t) -> *mut c_void;
+    pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void;
+    pub fn free(p: *mut c_void);
+    pub fn abort() -> !;
+    pub fn exit(status: c_int) -> !;
+    pub fn _exit(status: c_int) -> !;
+    pub fn atexit(cb: extern fn()) -> c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "system$UNIX2003")]
+    pub fn system(s: *const c_char) -> c_int;
+    pub fn getenv(s: *const c_char) -> *mut c_char;
+
+    pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
+    pub fn strncpy(dst: *mut c_char, src: *const c_char, n: size_t)
+                   -> *mut c_char;
+    pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char;
+    pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char;
+    pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int;
+    pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int;
+    pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int;
+    pub fn strchr(cs: *const c_char, c: c_int) -> *mut c_char;
+    pub fn strrchr(cs: *const c_char, c: c_int) -> *mut c_char;
+    pub fn strspn(cs: *const c_char, ct: *const c_char) -> size_t;
+    pub fn strcspn(cs: *const c_char, ct: *const c_char) -> size_t;
+    pub fn strdup(cs: *const c_char) -> *mut c_char;
+    pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char;
+    pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char;
+    pub fn strlen(cs: *const c_char) -> size_t;
+    pub fn strnlen(cs: *const c_char, maxlen: size_t) -> size_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "strerror$UNIX2003")]
+    pub fn strerror(n: c_int) -> *mut c_char;
+    pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
+    pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
+    pub fn wcslen(buf: *const wchar_t) -> size_t;
+    pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> ::size_t;
+
+    pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void;
+    pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int;
+    pub fn memcpy(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void;
+    pub fn memmove(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void;
+    pub fn memset(dest: *mut c_void, c: c_int, n: size_t) -> *mut c_void;
+}
+
+// These are all inline functions on android, so they end up just being entirely
+// missing on that platform.
+#[cfg(not(target_os = "android"))]
+extern {
+    pub fn abs(i: c_int) -> c_int;
+    pub fn atof(s: *const c_char) -> c_double;
+    pub fn labs(i: c_long) -> c_long;
+    pub fn rand() -> c_int;
+    pub fn srand(seed: c_uint);
+}
+
+cfg_if! {
+    if #[cfg(windows)] {
+        mod windows;
+        pub use windows::*;
+    } else if #[cfg(target_os = "redox")] {
+        mod redox;
+        pub use redox::*;
+    } else if #[cfg(unix)] {
+        mod unix;
+        pub use unix::*;
+    } else {
+        // Unknown target_family
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/macros.rs
@@ -0,0 +1,71 @@
+/// A macro for defining #[cfg] if-else statements.
+///
+/// This is similar to the `if/elif` C preprocessor macro by allowing definition
+/// of a cascade of `#[cfg]` cases, emitting the implementation which matches
+/// first.
+///
+/// This allows you to conveniently provide a long list #[cfg]'d blocks of code
+/// without having to rewrite each clause multiple times.
+macro_rules! cfg_if {
+    ($(
+        if #[cfg($($meta:meta),*)] { $($it:item)* }
+    ) else * else {
+        $($it2:item)*
+    }) => {
+        __cfg_if_items! {
+            () ;
+            $( ( ($($meta),*) ($($it)*) ), )*
+            ( () ($($it2)*) ),
+        }
+    }
+}
+
+macro_rules! __cfg_if_items {
+    (($($not:meta,)*) ; ) => {};
+    (($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ), $($rest:tt)*) => {
+        __cfg_if_apply! { cfg(all(not(any($($not),*)), $($m,)*)), $($it)* }
+        __cfg_if_items! { ($($not,)* $($m,)*) ; $($rest)* }
+    }
+}
+
+macro_rules! __cfg_if_apply {
+    ($m:meta, $($it:item)*) => {
+        $(#[$m] $it)*
+    }
+}
+
+macro_rules! s {
+    ($($(#[$attr:meta])* pub struct $i:ident { $($field:tt)* })*) => ($(
+        __item! {
+            #[repr(C)]
+            $(#[$attr])*
+            pub struct $i { $($field)* }
+        }
+        impl ::dox::Copy for $i {}
+        impl ::dox::Clone for $i {
+            fn clone(&self) -> $i { *self }
+        }
+    )*)
+}
+
+macro_rules! f {
+    ($(pub fn $i:ident($($arg:ident: $argty:ty),*) -> $ret:ty {
+        $($body:stmt);*
+    })*) => ($(
+        #[inline]
+        #[cfg(not(dox))]
+        pub unsafe extern fn $i($($arg: $argty),*) -> $ret {
+            $($body);*
+        }
+
+        #[cfg(dox)]
+        #[allow(dead_code)]
+        pub unsafe extern fn $i($($arg: $argty),*) -> $ret {
+            loop {}
+        }
+    )*)
+}
+
+macro_rules! __item {
+    ($i:item) => ($i)
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/redox.rs
@@ -0,0 +1,96 @@
+pub type c_char = i8;
+pub type c_long = i64;
+pub type c_ulong = u64;
+
+pub type wchar_t = i16;
+
+pub type off_t = c_long;
+pub type mode_t = u16;
+pub type time_t = i64;
+pub type pid_t = usize;
+pub type gid_t = usize;
+pub type uid_t = usize;
+
+pub type in_addr_t = u32;
+pub type in_port_t = u16;
+
+pub type socklen_t = u32;
+pub type sa_family_t = u16;
+
+s! {
+    pub struct in_addr {
+        pub s_addr: in_addr_t,
+    }
+
+    pub struct in6_addr {
+        pub s6_addr: [u8; 16],
+        __align: [u32; 0],
+    }
+
+    pub struct sockaddr {
+        pub sa_family: sa_family_t,
+        pub sa_data: [::c_char; 14],
+    }
+
+    pub struct sockaddr_in {
+        pub sin_family: sa_family_t,
+        pub sin_port: ::in_port_t,
+        pub sin_addr: ::in_addr,
+        pub sin_zero: [u8; 8],
+    }
+
+    pub struct sockaddr_in6 {
+        pub sin6_family: sa_family_t,
+        pub sin6_port: in_port_t,
+        pub sin6_flowinfo: u32,
+        pub sin6_addr: ::in6_addr,
+        pub sin6_scope_id: u32,
+    }
+}
+
+pub const STDIN_FILENO: ::c_int = 0;
+pub const STDOUT_FILENO: ::c_int = 1;
+pub const STDERR_FILENO: ::c_int = 2;
+
+pub const EXIT_FAILURE: ::c_int = 1;
+pub const EXIT_SUCCESS: ::c_int = 0;
+
+pub const S_ISUID: ::c_int = 0x800;
+pub const S_ISGID: ::c_int = 0x400;
+pub const S_ISVTX: ::c_int = 0x200;
+
+pub const S_IFIFO: mode_t = 0x1000;
+pub const S_IFCHR: mode_t = 0x2000;
+pub const S_IFBLK: mode_t = 0x6000;
+pub const S_IFDIR: mode_t = 0x4000;
+pub const S_IFREG: mode_t = 0x8000;
+pub const S_IFLNK: mode_t = 0xA000;
+pub const S_IFSOCK: mode_t = 0xC000;
+pub const S_IFMT: mode_t = 0xF000;
+pub const S_IEXEC: mode_t = 0x40;
+pub const S_IWRITE: mode_t = 0x80;
+pub const S_IREAD: mode_t = 0x100;
+pub const S_IRWXU: mode_t = 0x1C0;
+pub const S_IXUSR: mode_t = 0x40;
+pub const S_IWUSR: mode_t = 0x80;
+pub const S_IRUSR: mode_t = 0x100;
+pub const S_IRWXG: mode_t = 0x38;
+pub const S_IXGRP: mode_t = 0x8;
+pub const S_IWGRP: mode_t = 0x10;
+pub const S_IRGRP: mode_t = 0x20;
+pub const S_IRWXO: mode_t = 0x7;
+pub const S_IXOTH: mode_t = 0x1;
+pub const S_IWOTH: mode_t = 0x2;
+pub const S_IROTH: mode_t = 0x4;
+
+extern {
+    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
+    pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t)
+                -> ::ssize_t;
+    pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t)
+                 -> ::ssize_t;
+}
+
+#[link(name = "c")]
+#[link(name = "m")]
+extern {}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/apple/b32.rs
@@ -0,0 +1,53 @@
+//! 32-bit specific Apple (ios/darwin) definitions
+
+pub type c_long = i32;
+pub type c_ulong = u32;
+pub type boolean_t = ::c_int;
+
+s! {
+    pub struct pthread_attr_t {
+        __sig: c_long,
+        __opaque: [::c_char; 36]
+    }
+
+    pub struct if_data {
+        pub ifi_type: ::c_uchar,
+        pub ifi_typelen: ::c_uchar,
+        pub ifi_physical: ::c_uchar,
+        pub ifi_addrlen: ::c_uchar,
+        pub ifi_hdrlen: ::c_uchar,
+        pub ifi_recvquota: ::c_uchar,
+        pub ifi_xmitquota: ::c_uchar,
+        pub ifi_unused1: ::c_uchar,
+        pub ifi_mtu: u32,
+        pub ifi_metric: u32,
+        pub ifi_baudrate: u32,
+        pub ifi_ipackets: u32,
+        pub ifi_ierrors: u32,
+        pub ifi_opackets: u32,
+        pub ifi_oerrors: u32,
+        pub ifi_collisions: u32,
+        pub ifi_ibytes: u32,
+        pub ifi_obytes: u32,
+        pub ifi_imcasts: u32,
+        pub ifi_omcasts: u32,
+        pub ifi_iqdrops: u32,
+        pub ifi_noproto: u32,
+        pub ifi_recvtiming: u32,
+        pub ifi_xmittiming: u32,
+        pub ifi_lastchange: ::timeval,
+        pub ifi_unused2: u32,
+        pub ifi_hwassist: u32,
+        pub ifi_reserved1: u32,
+        pub ifi_reserved2: u32,
+    }
+}
+
+pub const __PTHREAD_MUTEX_SIZE__: usize = 40;
+pub const __PTHREAD_COND_SIZE__: usize = 24;
+pub const __PTHREAD_CONDATTR_SIZE__: usize = 4;
+pub const __PTHREAD_RWLOCK_SIZE__: usize = 124;
+pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 12;
+
+pub const TIOCTIMESTAMP: ::c_ulong = 0x40087459;
+pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40087458;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/apple/b64.rs
@@ -0,0 +1,60 @@
+//! 64-bit specific Apple (ios/darwin) definitions
+
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type boolean_t = ::c_uint;
+
+s! {
+    pub struct pthread_attr_t {
+        __sig: c_long,
+        __opaque: [::c_char; 56]
+    }
+
+    pub struct timeval32 {
+        pub tv_sec: i32,
+        pub tv_usec: i32,
+    }
+
+    pub struct if_data {
+        pub ifi_type: ::c_uchar,
+        pub ifi_typelen: ::c_uchar,
+        pub ifi_physical: ::c_uchar,
+        pub ifi_addrlen: ::c_uchar,
+        pub ifi_hdrlen: ::c_uchar,
+        pub ifi_recvquota: ::c_uchar,
+        pub ifi_xmitquota: ::c_uchar,
+        pub ifi_unused1: ::c_uchar,
+        pub ifi_mtu: u32,
+        pub ifi_metric: u32,
+        pub ifi_baudrate: u32,
+        pub ifi_ipackets: u32,
+        pub ifi_ierrors: u32,
+        pub ifi_opackets: u32,
+        pub ifi_oerrors: u32,
+        pub ifi_collisions: u32,
+        pub ifi_ibytes: u32,
+        pub ifi_obytes: u32,
+        pub ifi_imcasts: u32,
+        pub ifi_omcasts: u32,
+        pub ifi_iqdrops: u32,
+        pub ifi_noproto: u32,
+        pub ifi_recvtiming: u32,
+        pub ifi_xmittiming: u32,
+        pub ifi_lastchange: timeval32,
+        pub ifi_unused2: u32,
+        pub ifi_hwassist: u32,
+        pub ifi_reserved1: u32,
+        pub ifi_reserved2: u32,
+    }
+}
+
+pub const __PTHREAD_MUTEX_SIZE__: usize = 56;
+pub const __PTHREAD_COND_SIZE__: usize = 40;
+pub const __PTHREAD_CONDATTR_SIZE__: usize = 8;
+pub const __PTHREAD_RWLOCK_SIZE__: usize = 192;
+pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 16;
+
+pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;
+pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40107458;
+
+pub const FIONREAD: ::c_ulong = 0x4004667f;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/apple/mod.rs
@@ -0,0 +1,1826 @@
+//! Apple (ios/darwin)-specific definitions
+//!
+//! This covers *-apple-* triples currently
+
+pub type clock_t = c_ulong;
+pub type time_t = c_long;
+pub type suseconds_t = i32;
+pub type dev_t = i32;
+pub type ino_t = u64;
+pub type mode_t = u16;
+pub type nlink_t = u16;
+pub type blksize_t = i32;
+pub type rlim_t = u64;
+pub type mach_timebase_info_data_t = mach_timebase_info;
+pub type pthread_key_t = c_ulong;
+pub type sigset_t = u32;
+pub type fsblkcnt_t = ::c_uint;
+pub type fsfilcnt_t = ::c_uint;
+pub type speed_t = ::c_ulong;
+pub type tcflag_t = ::c_ulong;
+pub type nl_item = ::c_int;
+pub type id_t = ::c_uint;
+pub type sem_t = ::c_int;
+pub type idtype_t = ::c_uint;
+
+pub enum timezone {}
+
+s! {
+    pub struct aiocb {
+        pub aio_fildes: ::c_int,
+        pub aio_offset: ::off_t,
+        pub aio_buf: *mut ::c_void,
+        pub aio_nbytes: ::size_t,
+        pub aio_reqprio: ::c_int,
+        pub aio_sigevent: sigevent,
+        pub aio_lio_opcode: ::c_int
+    }
+
+    pub struct utmpx {
+        pub ut_user: [::c_char; _UTX_USERSIZE],
+        pub ut_id: [::c_char; _UTX_IDSIZE],
+        pub ut_line: [::c_char; _UTX_LINESIZE],
+        pub ut_pid: ::pid_t,
+        pub ut_type: ::c_short,
+        pub ut_tv: ::timeval,
+        pub ut_host: [::c_char; _UTX_HOSTSIZE],
+        ut_pad: [::uint32_t; 16],
+    }
+
+    pub struct glob_t {
+        pub gl_pathc:  ::size_t,
+        __unused1: ::c_int,
+        pub gl_offs:   ::size_t,
+        __unused2: ::c_int,
+        pub gl_pathv:  *mut *mut ::c_char,
+
+        __unused3: *mut ::c_void,
+
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+        __unused6: *mut ::c_void,
+        __unused7: *mut ::c_void,
+        __unused8: *mut ::c_void,
+    }
+
+    pub struct sockaddr_storage {
+        pub ss_len: u8,
+        pub ss_family: ::sa_family_t,
+        __ss_pad1: [u8; 6],
+        __ss_align: i64,
+        __ss_pad2: [u8; 112],
+    }
+
+    pub struct addrinfo {
+        pub ai_flags: ::c_int,
+        pub ai_family: ::c_int,
+        pub ai_socktype: ::c_int,
+        pub ai_protocol: ::c_int,
+        pub ai_addrlen: ::socklen_t,
+        pub ai_canonname: *mut ::c_char,
+        pub ai_addr: *mut ::sockaddr,
+        pub ai_next: *mut addrinfo,
+    }
+
+    pub struct mach_timebase_info {
+        pub numer: u32,
+        pub denom: u32,
+    }
+
+    pub struct stat {
+        pub st_dev: dev_t,
+        pub st_mode: mode_t,
+        pub st_nlink: nlink_t,
+        pub st_ino: ino_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: dev_t,
+        pub st_atime: time_t,
+        pub st_atime_nsec: c_long,
+        pub st_mtime: time_t,
+        pub st_mtime_nsec: c_long,
+        pub st_ctime: time_t,
+        pub st_ctime_nsec: c_long,
+        pub st_birthtime: time_t,
+        pub st_birthtime_nsec: c_long,
+        pub st_size: ::off_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_blksize: blksize_t,
+        pub st_flags: ::uint32_t,
+        pub st_gen: ::uint32_t,
+        pub st_lspare: ::int32_t,
+        pub st_qspare: [::int64_t; 2],
+    }
+
+    pub struct dirent {
+        pub d_ino: u64,
+        pub d_seekoff: u64,
+        pub d_reclen: u16,
+        pub d_namlen: u16,
+        pub d_type: u8,
+        pub d_name: [::c_char; 1024],
+    }
+
+    pub struct pthread_mutex_t {
+        __sig: ::c_long,
+        __opaque: [u8; __PTHREAD_MUTEX_SIZE__],
+    }
+
+    pub struct pthread_mutexattr_t {
+        __sig: ::c_long,
+        __opaque: [u8; 8],
+    }
+
+    pub struct pthread_cond_t {
+        __sig: ::c_long,
+        __opaque: [u8; __PTHREAD_COND_SIZE__],
+    }
+
+    pub struct pthread_condattr_t {
+        __sig: ::c_long,
+        __opaque: [u8; __PTHREAD_CONDATTR_SIZE__],
+    }
+
+    pub struct pthread_rwlock_t {
+        __sig: ::c_long,
+        __opaque: [u8; __PTHREAD_RWLOCK_SIZE__],
+    }
+
+    pub struct pthread_rwlockattr_t {
+        __sig: ::c_long,
+        __opaque: [u8; __PTHREAD_RWLOCKATTR_SIZE__],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_errno: ::c_int,
+        pub si_code: ::c_int,
+        pub si_pid: ::pid_t,
+        pub si_uid: ::uid_t,
+        pub si_status: ::c_int,
+        pub si_addr: *mut ::c_void,
+        _pad: [usize; 9],
+    }
+
+    pub struct sigaction {
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: sigset_t,
+        pub sa_flags: ::c_int,
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_size: ::size_t,
+        pub ss_flags: ::c_int,
+    }
+
+    pub struct fstore_t {
+        pub fst_flags: ::c_uint,
+        pub fst_posmode: ::c_int,
+        pub fst_offset: ::off_t,
+        pub fst_length: ::off_t,
+        pub fst_bytesalloc: ::off_t,
+    }
+
+    pub struct radvisory {
+        pub ra_offset: ::off_t,
+        pub ra_count: ::c_int,
+    }
+
+    pub struct statvfs {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_favail: ::fsfilcnt_t,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+    }
+
+    pub struct Dl_info {
+        pub dli_fname: *const ::c_char,
+        pub dli_fbase: *mut ::c_void,
+        pub dli_sname: *const ::c_char,
+        pub dli_saddr: *mut ::c_void,
+    }
+
+    pub struct sockaddr_in {
+        pub sin_len: u8,
+        pub sin_family: ::sa_family_t,
+        pub sin_port: ::in_port_t,
+        pub sin_addr: ::in_addr,
+        pub sin_zero: [::c_char; 8],
+    }
+
+    pub struct statfs {
+        pub f_bsize: ::uint32_t,
+        pub f_iosize: ::int32_t,
+        pub f_blocks: ::uint64_t,
+        pub f_bfree: ::uint64_t,
+        pub f_bavail: ::uint64_t,
+        pub f_files: ::uint64_t,
+        pub f_ffree: ::uint64_t,
+        pub f_fsid: ::fsid_t,
+        pub f_owner: ::uid_t,
+        pub f_type: ::uint32_t,
+        pub f_flags: ::uint32_t,
+        pub f_fssubtype: ::uint32_t,
+        pub f_fstypename: [::c_char; 16],
+        pub f_mntonname: [::c_char; 1024],
+        pub f_mntfromname: [::c_char; 1024],
+        pub f_reserved: [::uint32_t; 8],
+    }
+
+    // FIXME: this should have align 4 but it's got align 8 on 64-bit
+    pub struct kevent {
+        pub ident: ::uintptr_t,
+        pub filter: ::int16_t,
+        pub flags: ::uint16_t,
+        pub fflags: ::uint32_t,
+        pub data: ::intptr_t,
+        pub udata: *mut ::c_void,
+    }
+
+    pub struct kevent64_s {
+        pub ident: ::uint64_t,
+        pub filter: ::int16_t,
+        pub flags: ::uint16_t,
+        pub fflags: ::uint32_t,
+        pub data: ::int64_t,
+        pub udata: ::uint64_t,
+        pub ext: [::uint64_t; 2],
+    }
+
+    pub struct dqblk {
+        pub dqb_bhardlimit: ::uint64_t,
+        pub dqb_bsoftlimit: ::uint64_t,
+        pub dqb_curbytes: ::uint64_t,
+        pub dqb_ihardlimit: ::uint32_t,
+        pub dqb_isoftlimit: ::uint32_t,
+        pub dqb_curinodes: ::uint32_t,
+        pub dqb_btime: ::uint32_t,
+        pub dqb_itime: ::uint32_t,
+        pub dqb_id: ::uint32_t,
+        pub dqb_spare: [::uint32_t; 4],
+    }
+
+    pub struct if_msghdr {
+        pub ifm_msglen: ::c_ushort,
+        pub ifm_version: ::c_uchar,
+        pub ifm_type: ::c_uchar,
+        pub ifm_addrs: ::c_int,
+        pub ifm_flags: ::c_int,
+        pub ifm_index: ::c_ushort,
+        pub ifm_data: if_data,
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_cc: [::cc_t; ::NCCS],
+        pub c_ispeed: ::speed_t,
+        pub c_ospeed: ::speed_t,
+    }
+
+    pub struct flock {
+        pub l_start: ::off_t,
+        pub l_len: ::off_t,
+        pub l_pid: ::pid_t,
+        pub l_type: ::c_short,
+        pub l_whence: ::c_short,
+    }
+
+    pub struct sf_hdtr {
+        pub headers: *mut ::iovec,
+        pub hdr_cnt: ::c_int,
+        pub trailers: *mut ::iovec,
+        pub trl_cnt: ::c_int,
+    }
+
+    pub struct lconv {
+        pub decimal_point: *mut ::c_char,
+        pub thousands_sep: *mut ::c_char,
+        pub grouping: *mut ::c_char,
+        pub int_curr_symbol: *mut ::c_char,
+        pub currency_symbol: *mut ::c_char,
+        pub mon_decimal_point: *mut ::c_char,
+        pub mon_thousands_sep: *mut ::c_char,
+        pub mon_grouping: *mut ::c_char,
+        pub positive_sign: *mut ::c_char,
+        pub negative_sign: *mut ::c_char,
+        pub int_frac_digits: ::c_char,
+        pub frac_digits: ::c_char,
+        pub p_cs_precedes: ::c_char,
+        pub p_sep_by_space: ::c_char,
+        pub n_cs_precedes: ::c_char,
+        pub n_sep_by_space: ::c_char,
+        pub p_sign_posn: ::c_char,
+        pub n_sign_posn: ::c_char,
+        pub int_p_cs_precedes: ::c_char,
+        pub int_n_cs_precedes: ::c_char,
+        pub int_p_sep_by_space: ::c_char,
+        pub int_n_sep_by_space: ::c_char,
+        pub int_p_sign_posn: ::c_char,
+        pub int_n_sign_posn: ::c_char,
+    }
+
+    pub struct sigevent {
+        pub sigev_notify: ::c_int,
+        pub sigev_signo: ::c_int,
+        pub sigev_value: ::sigval,
+        __unused1: *mut ::c_void,       //actually a function pointer
+        pub sigev_notify_attributes: *mut ::pthread_attr_t
+    }
+
+    pub struct proc_taskinfo {
+        pub pti_virtual_size: u64,
+        pub pti_resident_size: u64,
+        pub pti_total_user: u64,
+        pub pti_total_system: u64,
+        pub pti_threads_user: u64,
+        pub pti_threads_system: u64,
+        pub pti_policy: i32,
+        pub pti_faults: i32,
+        pub pti_pageins: i32,
+        pub pti_cow_faults: i32,
+        pub pti_messages_sent: i32,
+        pub pti_messages_received: i32,
+        pub pti_syscalls_mach: i32,
+        pub pti_syscalls_unix: i32,
+        pub pti_csw: i32,
+        pub pti_threadnum: i32,
+        pub pti_numrunning: i32,
+        pub pti_priority: i32,
+    }
+
+    pub struct proc_bsdinfo {
+        pub pbi_flags: u32,
+        pub pbi_status: u32,
+        pub pbi_xstatus: u32,
+        pub pbi_pid: u32,
+        pub pbi_ppid: u32,
+        pub pbi_uid: ::uid_t,
+        pub pbi_gid: ::gid_t,
+        pub pbi_ruid: ::uid_t,
+        pub pbi_rgid: ::gid_t,
+        pub pbi_svuid: ::uid_t,
+        pub pbi_svgid: ::gid_t,
+        pub rfu_1: u32,
+        pub pbi_comm: [::c_char; MAXCOMLEN],
+        pub pbi_name: [::c_char; 32], // MAXCOMLEN * 2, but macro isn't happy...
+        pub pbi_nfiles: u32,
+        pub pbi_pgid: u32,
+        pub pbi_pjobc: u32,
+        pub e_tdev: u32,
+        pub e_tpgid: u32,
+        pub pbi_nice: i32,
+        pub pbi_start_tvsec: u64,
+        pub pbi_start_tvusec: u64,
+    }
+
+    pub struct proc_taskallinfo {
+        pub pbsd: proc_bsdinfo,
+        pub ptinfo: proc_taskinfo,
+    }
+
+    pub struct proc_threadinfo {
+        pub pth_user_time: u64,
+        pub pth_system_time: u64,
+        pub pth_cpu_usage: i32,
+        pub pth_policy: i32,
+        pub pth_run_state: i32,
+        pub pth_flags: i32,
+        pub pth_sleep_time: i32,
+        pub pth_curpri: i32,
+        pub pth_priority: i32,
+        pub pth_maxpriority: i32,
+        pub pth_name: [::c_char; MAXTHREADNAMESIZE],
+    }
+
+    pub struct xsw_usage {
+        pub xsu_total: u64,
+        pub xsu_avail: u64,
+        pub xsu_used: u64,
+        pub xsu_pagesize: u32,
+        pub xsu_encrypted: ::boolean_t,
+    }
+}
+
+pub const _UTX_USERSIZE: usize = 256;
+pub const _UTX_LINESIZE: usize = 32;
+pub const _UTX_IDSIZE: usize = 4;
+pub const _UTX_HOSTSIZE: usize = 256;
+
+pub const EMPTY: ::c_short = 0;
+pub const RUN_LVL: ::c_short = 1;
+pub const BOOT_TIME: ::c_short = 2;
+pub const OLD_TIME: ::c_short = 3;
+pub const NEW_TIME: ::c_short = 4;
+pub const INIT_PROCESS: ::c_short = 5;
+pub const LOGIN_PROCESS: ::c_short = 6;
+pub const USER_PROCESS: ::c_short = 7;
+pub const DEAD_PROCESS: ::c_short = 8;
+pub const ACCOUNTING: ::c_short = 9;
+pub const SIGNATURE: ::c_short = 10;
+pub const SHUTDOWN_TIME: ::c_short = 11;
+
+pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
+pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
+pub const LC_MESSAGES_MASK: ::c_int = (1 << 2);
+pub const LC_MONETARY_MASK: ::c_int = (1 << 3);
+pub const LC_NUMERIC_MASK: ::c_int = (1 << 4);
+pub const LC_TIME_MASK: ::c_int = (1 << 5);
+pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
+                               | LC_CTYPE_MASK
+                               | LC_MESSAGES_MASK
+                               | LC_MONETARY_MASK
+                               | LC_NUMERIC_MASK
+                               | LC_TIME_MASK;
+
+pub const CODESET: ::nl_item = 0;
+pub const D_T_FMT: ::nl_item = 1;
+pub const D_FMT: ::nl_item = 2;
+pub const T_FMT: ::nl_item = 3;
+pub const T_FMT_AMPM: ::nl_item = 4;
+pub const AM_STR: ::nl_item = 5;
+pub const PM_STR: ::nl_item = 6;
+
+pub const DAY_1: ::nl_item = 7;
+pub const DAY_2: ::nl_item = 8;
+pub const DAY_3: ::nl_item = 9;
+pub const DAY_4: ::nl_item = 10;
+pub const DAY_5: ::nl_item = 11;
+pub const DAY_6: ::nl_item = 12;
+pub const DAY_7: ::nl_item = 13;
+
+pub const ABDAY_1: ::nl_item = 14;
+pub const ABDAY_2: ::nl_item = 15;
+pub const ABDAY_3: ::nl_item = 16;
+pub const ABDAY_4: ::nl_item = 17;
+pub const ABDAY_5: ::nl_item = 18;
+pub const ABDAY_6: ::nl_item = 19;
+pub const ABDAY_7: ::nl_item = 20;
+
+pub const MON_1: ::nl_item = 21;
+pub const MON_2: ::nl_item = 22;
+pub const MON_3: ::nl_item = 23;
+pub const MON_4: ::nl_item = 24;
+pub const MON_5: ::nl_item = 25;
+pub const MON_6: ::nl_item = 26;
+pub const MON_7: ::nl_item = 27;
+pub const MON_8: ::nl_item = 28;
+pub const MON_9: ::nl_item = 29;
+pub const MON_10: ::nl_item = 30;
+pub const MON_11: ::nl_item = 31;
+pub const MON_12: ::nl_item = 32;
+
+pub const ABMON_1: ::nl_item = 33;
+pub const ABMON_2: ::nl_item = 34;
+pub const ABMON_3: ::nl_item = 35;
+pub const ABMON_4: ::nl_item = 36;
+pub const ABMON_5: ::nl_item = 37;
+pub const ABMON_6: ::nl_item = 38;
+pub const ABMON_7: ::nl_item = 39;
+pub const ABMON_8: ::nl_item = 40;
+pub const ABMON_9: ::nl_item = 41;
+pub const ABMON_10: ::nl_item = 42;
+pub const ABMON_11: ::nl_item = 43;
+pub const ABMON_12: ::nl_item = 44;
+
+pub const ERA: ::nl_item = 45;
+pub const ERA_D_FMT: ::nl_item = 46;
+pub const ERA_D_T_FMT: ::nl_item = 47;
+pub const ERA_T_FMT: ::nl_item = 48;
+pub const ALT_DIGITS: ::nl_item = 49;
+
+pub const RADIXCHAR: ::nl_item = 50;
+pub const THOUSEP: ::nl_item = 51;
+
+pub const YESEXPR: ::nl_item = 52;
+pub const NOEXPR: ::nl_item = 53;
+
+pub const YESSTR: ::nl_item = 54;
+pub const NOSTR: ::nl_item = 55;
+
+pub const CRNCYSTR: ::nl_item = 56;
+
+pub const D_MD_ORDER: ::nl_item = 57;
+
+pub const EXIT_FAILURE: ::c_int = 1;
+pub const EXIT_SUCCESS: ::c_int = 0;
+pub const RAND_MAX: ::c_int = 2147483647;
+pub const EOF: ::c_int = -1;
+pub const SEEK_SET: ::c_int = 0;
+pub const SEEK_CUR: ::c_int = 1;
+pub const SEEK_END: ::c_int = 2;
+pub const _IOFBF: ::c_int = 0;
+pub const _IONBF: ::c_int = 2;
+pub const _IOLBF: ::c_int = 1;
+pub const BUFSIZ: ::c_uint = 1024;
+pub const FOPEN_MAX: ::c_uint = 20;
+pub const FILENAME_MAX: ::c_uint = 1024;
+pub const L_tmpnam: ::c_uint = 1024;
+pub const TMP_MAX: ::c_uint = 308915776;
+pub const _PC_LINK_MAX: ::c_int = 1;
+pub const _PC_MAX_CANON: ::c_int = 2;
+pub const _PC_MAX_INPUT: ::c_int = 3;
+pub const _PC_NAME_MAX: ::c_int = 4;
+pub const _PC_PATH_MAX: ::c_int = 5;
+pub const _PC_PIPE_BUF: ::c_int = 6;
+pub const _PC_CHOWN_RESTRICTED: ::c_int = 7;
+pub const _PC_NO_TRUNC: ::c_int = 8;
+pub const _PC_VDISABLE: ::c_int = 9;
+pub const O_DSYNC: ::c_int = 0x400000;
+pub const O_NOCTTY: ::c_int = 0x20000;
+pub const O_CLOEXEC: ::c_int = 0x1000000;
+pub const O_DIRECTORY: ::c_int = 0x100000;
+pub const S_IFIFO: mode_t = 4096;
+pub const S_IFCHR: mode_t = 8192;
+pub const S_IFBLK: mode_t = 24576;
+pub const S_IFDIR: mode_t = 16384;
+pub const S_IFREG: mode_t = 32768;
+pub const S_IFLNK: mode_t = 40960;
+pub const S_IFSOCK: mode_t = 49152;
+pub const S_IFMT: mode_t = 61440;
+pub const S_IEXEC: mode_t = 64;
+pub const S_IWRITE: mode_t = 128;
+pub const S_IREAD: mode_t = 256;
+pub const S_IRWXU: mode_t = 448;
+pub const S_IXUSR: mode_t = 64;
+pub const S_IWUSR: mode_t = 128;
+pub const S_IRUSR: mode_t = 256;
+pub const S_IRWXG: mode_t = 56;
+pub const S_IXGRP: mode_t = 8;
+pub const S_IWGRP: mode_t = 16;
+pub const S_IRGRP: mode_t = 32;
+pub const S_IRWXO: mode_t = 7;
+pub const S_IXOTH: mode_t = 1;
+pub const S_IWOTH: mode_t = 2;
+pub const S_IROTH: mode_t = 4;
+pub const F_OK: ::c_int = 0;
+pub const R_OK: ::c_int = 4;
+pub const W_OK: ::c_int = 2;
+pub const X_OK: ::c_int = 1;
+pub const STDIN_FILENO: ::c_int = 0;
+pub const STDOUT_FILENO: ::c_int = 1;
+pub const STDERR_FILENO: ::c_int = 2;
+pub const F_LOCK: ::c_int = 1;
+pub const F_TEST: ::c_int = 3;
+pub const F_TLOCK: ::c_int = 2;
+pub const F_ULOCK: ::c_int = 0;
+pub const F_GETLK: ::c_int = 7;
+pub const F_SETLK: ::c_int = 8;
+pub const F_SETLKW: ::c_int = 9;
+pub const SIGHUP: ::c_int = 1;
+pub const SIGINT: ::c_int = 2;
+pub const SIGQUIT: ::c_int = 3;
+pub const SIGILL: ::c_int = 4;
+pub const SIGABRT: ::c_int = 6;
+pub const SIGEMT: ::c_int = 7;
+pub const SIGFPE: ::c_int = 8;
+pub const SIGKILL: ::c_int = 9;
+pub const SIGSEGV: ::c_int = 11;
+pub const SIGPIPE: ::c_int = 13;
+pub const SIGALRM: ::c_int = 14;
+pub const SIGTERM: ::c_int = 15;
+
+pub const PROT_NONE: ::c_int = 0;
+pub const PROT_READ: ::c_int = 1;
+pub const PROT_WRITE: ::c_int = 2;
+pub const PROT_EXEC: ::c_int = 4;
+
+pub const MAP_FILE: ::c_int = 0x0000;
+pub const MAP_SHARED: ::c_int = 0x0001;
+pub const MAP_PRIVATE: ::c_int = 0x0002;
+pub const MAP_FIXED: ::c_int = 0x0010;
+pub const MAP_ANON: ::c_int = 0x1000;
+
+pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const MS_ASYNC: ::c_int = 0x0001;
+pub const MS_INVALIDATE: ::c_int = 0x0002;
+pub const MS_SYNC: ::c_int = 0x0010;
+
+pub const MS_KILLPAGES: ::c_int = 0x0004;
+pub const MS_DEACTIVATE: ::c_int = 0x0008;
+
+pub const EPERM: ::c_int = 1;
+pub const ENOENT: ::c_int = 2;
+pub const ESRCH: ::c_int = 3;
+pub const EINTR: ::c_int = 4;
+pub const EIO: ::c_int = 5;
+pub const ENXIO: ::c_int = 6;
+pub const E2BIG: ::c_int = 7;
+pub const ENOEXEC: ::c_int = 8;
+pub const EBADF: ::c_int = 9;
+pub const ECHILD: ::c_int = 10;
+pub const EDEADLK: ::c_int = 11;
+pub const ENOMEM: ::c_int = 12;
+pub const EACCES: ::c_int = 13;
+pub const EFAULT: ::c_int = 14;
+pub const ENOTBLK: ::c_int = 15;
+pub const EBUSY: ::c_int = 16;
+pub const EEXIST: ::c_int = 17;
+pub const EXDEV: ::c_int = 18;
+pub const ENODEV: ::c_int = 19;
+pub const ENOTDIR: ::c_int = 20;
+pub const EISDIR: ::c_int = 21;
+pub const EINVAL: ::c_int = 22;
+pub const ENFILE: ::c_int = 23;
+pub const EMFILE: ::c_int = 24;
+pub const ENOTTY: ::c_int = 25;
+pub const ETXTBSY: ::c_int = 26;
+pub const EFBIG: ::c_int = 27;
+pub const ENOSPC: ::c_int = 28;
+pub const ESPIPE: ::c_int = 29;
+pub const EROFS: ::c_int = 30;
+pub const EMLINK: ::c_int = 31;
+pub const EPIPE: ::c_int = 32;
+pub const EDOM: ::c_int = 33;
+pub const ERANGE: ::c_int = 34;
+pub const EAGAIN: ::c_int = 35;
+pub const EWOULDBLOCK: ::c_int = EAGAIN;
+pub const EINPROGRESS: ::c_int = 36;
+pub const EALREADY: ::c_int = 37;
+pub const ENOTSOCK: ::c_int = 38;
+pub const EDESTADDRREQ: ::c_int = 39;
+pub const EMSGSIZE: ::c_int = 40;
+pub const EPROTOTYPE: ::c_int = 41;
+pub const ENOPROTOOPT: ::c_int = 42;
+pub const EPROTONOSUPPORT: ::c_int = 43;
+pub const ESOCKTNOSUPPORT: ::c_int = 44;
+pub const ENOTSUP: ::c_int = 45;
+pub const EPFNOSUPPORT: ::c_int = 46;
+pub const EAFNOSUPPORT: ::c_int = 47;
+pub const EADDRINUSE: ::c_int = 48;
+pub const EADDRNOTAVAIL: ::c_int = 49;
+pub const ENETDOWN: ::c_int = 50;
+pub const ENETUNREACH: ::c_int = 51;
+pub const ENETRESET: ::c_int = 52;
+pub const ECONNABORTED: ::c_int = 53;
+pub const ECONNRESET: ::c_int = 54;
+pub const ENOBUFS: ::c_int = 55;
+pub const EISCONN: ::c_int = 56;
+pub const ENOTCONN: ::c_int = 57;
+pub const ESHUTDOWN: ::c_int = 58;
+pub const ETOOMANYREFS: ::c_int = 59;
+pub const ETIMEDOUT: ::c_int = 60;
+pub const ECONNREFUSED: ::c_int = 61;
+pub const ELOOP: ::c_int = 62;
+pub const ENAMETOOLONG: ::c_int = 63;
+pub const EHOSTDOWN: ::c_int = 64;
+pub const EHOSTUNREACH: ::c_int = 65;
+pub const ENOTEMPTY: ::c_int = 66;
+pub const EPROCLIM: ::c_int = 67;
+pub const EUSERS: ::c_int = 68;
+pub const EDQUOT: ::c_int = 69;
+pub const ESTALE: ::c_int = 70;
+pub const EREMOTE: ::c_int = 71;
+pub const EBADRPC: ::c_int = 72;
+pub const ERPCMISMATCH: ::c_int = 73;
+pub const EPROGUNAVAIL: ::c_int = 74;
+pub const EPROGMISMATCH: ::c_int = 75;
+pub const EPROCUNAVAIL: ::c_int = 76;
+pub const ENOLCK: ::c_int = 77;
+pub const ENOSYS: ::c_int = 78;
+pub const EFTYPE: ::c_int = 79;
+pub const EAUTH: ::c_int = 80;
+pub const ENEEDAUTH: ::c_int = 81;
+pub const EPWROFF: ::c_int = 82;
+pub const EDEVERR: ::c_int = 83;
+pub const EOVERFLOW: ::c_int = 84;
+pub const EBADEXEC: ::c_int = 85;
+pub const EBADARCH: ::c_int = 86;
+pub const ESHLIBVERS: ::c_int = 87;
+pub const EBADMACHO: ::c_int = 88;
+pub const ECANCELED: ::c_int = 89;
+pub const EIDRM: ::c_int = 90;
+pub const ENOMSG: ::c_int = 91;
+pub const EILSEQ: ::c_int = 92;
+pub const ENOATTR: ::c_int = 93;
+pub const EBADMSG: ::c_int = 94;
+pub const EMULTIHOP: ::c_int = 95;
+pub const ENODATA: ::c_int = 96;
+pub const ENOLINK: ::c_int = 97;
+pub const ENOSR: ::c_int = 98;
+pub const ENOSTR: ::c_int = 99;
+pub const EPROTO: ::c_int = 100;
+pub const ETIME: ::c_int = 101;
+pub const EOPNOTSUPP: ::c_int = 102;
+pub const ENOPOLICY: ::c_int = 103;
+pub const ENOTRECOVERABLE: ::c_int = 104;
+pub const EOWNERDEAD: ::c_int = 105;
+pub const EQFULL: ::c_int = 106;
+pub const ELAST: ::c_int = 106;
+
+pub const EAI_SYSTEM: ::c_int = 11;
+
+pub const F_DUPFD: ::c_int = 0;
+pub const F_DUPFD_CLOEXEC: ::c_int = 67;
+pub const F_GETFD: ::c_int = 1;
+pub const F_SETFD: ::c_int = 2;
+pub const F_GETFL: ::c_int = 3;
+pub const F_SETFL: ::c_int = 4;
+pub const F_PREALLOCATE: ::c_int = 42;
+pub const F_RDADVISE: ::c_int = 44;
+pub const F_RDAHEAD: ::c_int = 45;
+pub const F_NOCACHE: ::c_int = 48;
+pub const F_GETPATH: ::c_int = 50;
+pub const F_FULLFSYNC: ::c_int = 51;
+pub const F_FREEZE_FS: ::c_int = 53;
+pub const F_THAW_FS: ::c_int = 54;
+pub const F_GLOBAL_NOCACHE: ::c_int = 55;
+pub const F_NODIRECT: ::c_int = 62;
+
+pub const F_ALLOCATECONTIG: ::c_uint = 0x02;
+pub const F_ALLOCATEALL: ::c_uint = 0x04;
+
+pub const F_PEOFPOSMODE: ::c_int = 3;
+pub const F_VOLPOSMODE: ::c_int = 4;
+
+pub const AT_FDCWD: ::c_int = -2;
+pub const AT_EACCESS: ::c_int = 0x0010;
+pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x0020;
+pub const AT_SYMLINK_FOLLOW: ::c_int = 0x0040;
+pub const AT_REMOVEDIR: ::c_int = 0x0080;
+
+pub const TIOCMODG: ::c_ulong = 0x40047403;
+pub const TIOCMODS: ::c_ulong = 0x80047404;
+pub const TIOCM_LE: ::c_int = 0x1;
+pub const TIOCM_DTR: ::c_int = 0x2;
+pub const TIOCM_RTS: ::c_int = 0x4;
+pub const TIOCM_ST: ::c_int = 0x8;
+pub const TIOCM_SR: ::c_int = 0x10;
+pub const TIOCM_CTS: ::c_int = 0x20;
+pub const TIOCM_CAR: ::c_int = 0x40;
+pub const TIOCM_CD: ::c_int = 0x40;
+pub const TIOCM_RNG: ::c_int = 0x80;
+pub const TIOCM_RI: ::c_int = 0x80;
+pub const TIOCM_DSR: ::c_int = 0x100;
+pub const TIOCEXCL: ::c_int = 0x2000740d;
+pub const TIOCNXCL: ::c_int = 0x2000740e;
+pub const TIOCFLUSH: ::c_ulong = 0x80047410;
+pub const TIOCGETD: ::c_ulong = 0x4004741a;
+pub const TIOCSETD: ::c_ulong = 0x8004741b;
+pub const TIOCIXON: ::c_uint = 0x20007481;
+pub const TIOCIXOFF: ::c_uint = 0x20007480;
+pub const TIOCSBRK: ::c_uint = 0x2000747b;
+pub const TIOCCBRK: ::c_uint = 0x2000747a;
+pub const TIOCSDTR: ::c_uint = 0x20007479;
+pub const TIOCCDTR: ::c_uint = 0x20007478;
+pub const TIOCGPGRP: ::c_ulong = 0x40047477;
+pub const TIOCSPGRP: ::c_ulong = 0x80047476;
+pub const TIOCOUTQ: ::c_ulong = 0x40047473;
+pub const TIOCSTI: ::c_ulong = 0x80017472;
+pub const TIOCNOTTY: ::c_uint = 0x20007471;
+pub const TIOCPKT: ::c_ulong = 0x80047470;
+pub const TIOCPKT_DATA: ::c_int = 0x0;
+pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1;
+pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2;
+pub const TIOCPKT_STOP: ::c_int = 0x4;
+pub const TIOCPKT_START: ::c_int = 0x8;
+pub const TIOCPKT_NOSTOP: ::c_int = 0x10;
+pub const TIOCPKT_DOSTOP: ::c_int = 0x20;
+pub const TIOCPKT_IOCTL: ::c_int = 0x40;
+pub const TIOCSTOP: ::c_uint = 0x2000746f;
+pub const TIOCSTART: ::c_uint = 0x2000746e;
+pub const TIOCMSET: ::c_ulong = 0x8004746d;
+pub const TIOCMBIS: ::c_ulong = 0x8004746c;
+pub const TIOCMBIC: ::c_ulong = 0x8004746b;
+pub const TIOCMGET: ::c_ulong = 0x4004746a;
+pub const TIOCREMOTE: ::c_ulong = 0x80047469;
+pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
+pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
+pub const TIOCUCNTL: ::c_ulong = 0x80047466;
+pub const TIOCSTAT: ::c_uint = 0x20007465;
+pub const TIOCSCONS: ::c_uint = 0x20007463;
+pub const TIOCCONS: ::c_ulong = 0x80047462;
+pub const TIOCSCTTY: ::c_uint = 0x20007461;
+pub const TIOCEXT: ::c_ulong = 0x80047460;
+pub const TIOCSIG: ::c_uint = 0x2000745f;
+pub const TIOCDRAIN: ::c_uint = 0x2000745e;
+pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b;
+pub const TIOCMGDTRWAIT: ::c_ulong = 0x4004745a;
+pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457;
+pub const TIOCGDRAINWAIT: ::c_ulong = 0x40047456;
+pub const TIOCDSIMICROCODE: ::c_uint = 0x20007455;
+pub const TIOCPTYGRANT: ::c_uint = 0x20007454;
+pub const TIOCPTYGNAME: ::c_uint = 0x40807453;
+pub const TIOCPTYUNLK: ::c_uint = 0x20007452;
+
+pub const B0: speed_t = 0;
+pub const B50: speed_t = 50;
+pub const B75: speed_t = 75;
+pub const B110: speed_t = 110;
+pub const B134: speed_t = 134;
+pub const B150: speed_t = 150;
+pub const B200: speed_t = 200;
+pub const B300: speed_t = 300;
+pub const B600: speed_t = 600;
+pub const B1200: speed_t = 1200;
+pub const B1800: speed_t = 1800;
+pub const B2400: speed_t = 2400;
+pub const B4800: speed_t = 4800;
+pub const B9600: speed_t = 9600;
+pub const B19200: speed_t = 19200;
+pub const B38400: speed_t = 38400;
+pub const B7200: speed_t = 7200;
+pub const B14400: speed_t = 14400;
+pub const B28800: speed_t = 28800;
+pub const B57600: speed_t = 57600;
+pub const B76800: speed_t = 76800;
+pub const B115200: speed_t = 115200;
+pub const B230400: speed_t = 230400;
+pub const EXTA: speed_t = 19200;
+pub const EXTB: speed_t = 38400;
+
+pub const SIGTRAP: ::c_int = 5;
+
+pub const GLOB_APPEND  : ::c_int = 0x0001;
+pub const GLOB_DOOFFS  : ::c_int = 0x0002;
+pub const GLOB_ERR     : ::c_int = 0x0004;
+pub const GLOB_MARK    : ::c_int = 0x0008;
+pub const GLOB_NOCHECK : ::c_int = 0x0010;
+pub const GLOB_NOSORT  : ::c_int = 0x0020;
+pub const GLOB_NOESCAPE: ::c_int = 0x2000;
+
+pub const GLOB_NOSPACE : ::c_int = -1;
+pub const GLOB_ABORTED : ::c_int = -2;
+pub const GLOB_NOMATCH : ::c_int = -3;
+
+pub const POSIX_MADV_NORMAL: ::c_int = 0;
+pub const POSIX_MADV_RANDOM: ::c_int = 1;
+pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
+pub const POSIX_MADV_WILLNEED: ::c_int = 3;
+pub const POSIX_MADV_DONTNEED: ::c_int = 4;
+
+pub const _SC_IOV_MAX: ::c_int = 56;
+pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70;
+pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71;
+pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
+pub const _SC_MQ_PRIO_MAX: ::c_int = 75;
+pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82;
+pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85;
+pub const _SC_THREAD_KEYS_MAX: ::c_int = 86;
+pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87;
+pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88;
+pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89;
+pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90;
+pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91;
+pub const _SC_THREAD_STACK_MIN: ::c_int = 93;
+pub const _SC_THREAD_THREADS_MAX: ::c_int = 94;
+pub const _SC_THREADS: ::c_int = 96;
+pub const _SC_TTY_NAME_MAX: ::c_int = 101;
+pub const _SC_ATEXIT_MAX: ::c_int = 107;
+pub const _SC_XOPEN_CRYPT: ::c_int = 108;
+pub const _SC_XOPEN_ENH_I18N: ::c_int = 109;
+pub const _SC_XOPEN_LEGACY: ::c_int = 110;
+pub const _SC_XOPEN_REALTIME: ::c_int = 111;
+pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112;
+pub const _SC_XOPEN_SHM: ::c_int = 113;
+pub const _SC_XOPEN_UNIX: ::c_int = 115;
+pub const _SC_XOPEN_VERSION: ::c_int = 116;
+pub const _SC_XOPEN_XCU_VERSION: ::c_int = 121;
+
+pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 2;
+pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
+pub const PTHREAD_CREATE_JOINABLE: ::c_int = 1;
+pub const PTHREAD_CREATE_DETACHED: ::c_int = 2;
+pub const PTHREAD_STACK_MIN: ::size_t = 8192;
+
+pub const RLIMIT_CPU: ::c_int = 0;
+pub const RLIMIT_FSIZE: ::c_int = 1;
+pub const RLIMIT_DATA: ::c_int = 2;
+pub const RLIMIT_STACK: ::c_int = 3;
+pub const RLIMIT_CORE: ::c_int = 4;
+pub const RLIMIT_AS: ::c_int = 5;
+pub const RLIMIT_RSS: ::c_int = RLIMIT_AS;
+pub const RLIMIT_MEMLOCK: ::c_int = 6;
+pub const RLIMIT_NPROC: ::c_int = 7;
+pub const RLIMIT_NOFILE: ::c_int = 8;
+pub const RLIM_NLIMITS: ::c_int = 9;
+pub const _RLIMIT_POSIX_FLAG: ::c_int = 0x1000;
+
+pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff;
+
+pub const RUSAGE_SELF: ::c_int = 0;
+pub const RUSAGE_CHILDREN: ::c_int = -1;
+
+pub const MADV_NORMAL: ::c_int = 0;
+pub const MADV_RANDOM: ::c_int = 1;
+pub const MADV_SEQUENTIAL: ::c_int = 2;
+pub const MADV_WILLNEED: ::c_int = 3;
+pub const MADV_DONTNEED: ::c_int = 4;
+pub const MADV_FREE: ::c_int = 5;
+pub const MADV_ZERO_WIRED_PAGES: ::c_int = 6;
+pub const MADV_FREE_REUSABLE: ::c_int = 7;
+pub const MADV_FREE_REUSE: ::c_int = 8;
+pub const MADV_CAN_REUSE: ::c_int = 9;
+
+pub const MINCORE_INCORE: ::c_int =  0x1;
+pub const MINCORE_REFERENCED: ::c_int = 0x2;
+pub const MINCORE_MODIFIED: ::c_int = 0x4;
+pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8;
+pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10;
+
+pub const AF_UNSPEC: ::c_int = 0;
+pub const AF_LOCAL: ::c_int = 1;
+pub const AF_UNIX: ::c_int = AF_LOCAL;
+pub const AF_INET: ::c_int = 2;
+pub const AF_IMPLINK: ::c_int = 3;
+pub const AF_PUP: ::c_int = 4;
+pub const AF_CHAOS: ::c_int = 5;
+pub const AF_NS: ::c_int = 6;
+pub const AF_ISO: ::c_int = 7;
+pub const AF_OSI: ::c_int = AF_ISO;
+pub const AF_ECMA: ::c_int = 8;
+pub const AF_DATAKIT: ::c_int = 9;
+pub const AF_CCITT: ::c_int = 10;
+pub const AF_SNA: ::c_int = 11;
+pub const AF_DECnet: ::c_int = 12;
+pub const AF_DLI: ::c_int = 13;
+pub const AF_LAT: ::c_int = 14;
+pub const AF_HYLINK: ::c_int = 15;
+pub const AF_APPLETALK: ::c_int = 16;
+pub const AF_ROUTE: ::c_int = 17;
+pub const AF_LINK: ::c_int = 18;
+pub const pseudo_AF_XTP: ::c_int = 19;
+pub const AF_COIP: ::c_int = 20;
+pub const AF_CNT: ::c_int = 21;
+pub const pseudo_AF_RTIP: ::c_int = 22;
+pub const AF_IPX: ::c_int = 23;
+pub const AF_SIP: ::c_int = 24;
+pub const pseudo_AF_PIP: ::c_int = 25;
+pub const AF_ISDN: ::c_int = 28;
+pub const AF_E164: ::c_int = AF_ISDN;
+pub const pseudo_AF_KEY: ::c_int = 29;
+pub const AF_INET6: ::c_int = 30;
+pub const AF_NATM: ::c_int = 31;
+pub const AF_SYSTEM: ::c_int = 32;
+pub const AF_NETBIOS: ::c_int = 33;
+pub const AF_PPP: ::c_int = 34;
+pub const pseudo_AF_HDRCMPLT: ::c_int = 35;
+#[doc(hidden)]
+pub const AF_MAX: ::c_int = 40;
+pub const AF_SYS_CONTROL: ::c_int = 2;
+
+pub const SYSPROTO_EVENT: ::c_int = 1;
+pub const SYSPROTO_CONTROL: ::c_int = 2;
+
+pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
+pub const PF_LOCAL: ::c_int = AF_LOCAL;
+pub const PF_UNIX: ::c_int =  PF_LOCAL;
+pub const PF_INET: ::c_int =  AF_INET;
+pub const PF_IMPLINK: ::c_int = AF_IMPLINK;
+pub const PF_PUP: ::c_int =  AF_PUP;
+pub const PF_CHAOS: ::c_int = AF_CHAOS;
+pub const PF_NS: ::c_int =  AF_NS;
+pub const PF_ISO: ::c_int =  AF_ISO;
+pub const PF_OSI: ::c_int =  AF_ISO;
+pub const PF_ECMA: ::c_int =  AF_ECMA;
+pub const PF_DATAKIT: ::c_int = AF_DATAKIT;
+pub const PF_CCITT: ::c_int = AF_CCITT;
+pub const PF_SNA: ::c_int =  AF_SNA;
+pub const PF_DECnet: ::c_int = AF_DECnet;
+pub const PF_DLI: ::c_int =  AF_DLI;
+pub const PF_LAT: ::c_int =  AF_LAT;
+pub const PF_HYLINK: ::c_int = AF_HYLINK;
+pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
+pub const PF_ROUTE: ::c_int = AF_ROUTE;
+pub const PF_LINK: ::c_int =  AF_LINK;
+pub const PF_XTP: ::c_int =  pseudo_AF_XTP;
+pub const PF_COIP: ::c_int =  AF_COIP;
+pub const PF_CNT: ::c_int =  AF_CNT;
+pub const PF_SIP: ::c_int =  AF_SIP;
+pub const PF_IPX: ::c_int =  AF_IPX;
+pub const PF_RTIP: ::c_int =  pseudo_AF_RTIP;
+pub const PF_PIP: ::c_int =  pseudo_AF_PIP;
+pub const PF_ISDN: ::c_int =  AF_ISDN;
+pub const PF_KEY: ::c_int =  pseudo_AF_KEY;
+pub const PF_INET6: ::c_int = AF_INET6;
+pub const PF_NATM: ::c_int =  AF_NATM;
+pub const PF_SYSTEM: ::c_int = AF_SYSTEM;
+pub const PF_NETBIOS: ::c_int = AF_NETBIOS;
+pub const PF_PPP: ::c_int =  AF_PPP;
+#[doc(hidden)]
+pub const PF_MAX: ::c_int =  AF_MAX;
+
+#[doc(hidden)]
+pub const NET_MAXID: ::c_int = AF_MAX;
+
+pub const NET_RT_DUMP: ::c_int = 1;
+pub const NET_RT_FLAGS: ::c_int = 2;
+pub const NET_RT_IFLIST: ::c_int = 3;
+#[doc(hidden)]
+pub const NET_RT_MAXID: ::c_int = 10;
+
+pub const SOMAXCONN: ::c_int = 128;
+
+pub const SOCK_MAXADDRLEN: ::c_int = 255;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOCK_RAW: ::c_int = 3;
+pub const SOCK_RDM: ::c_int = 4;
+pub const SOCK_SEQPACKET: ::c_int = 5;
+pub const IP_TTL: ::c_int = 4;
+pub const IP_HDRINCL: ::c_int = 2;
+pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
+pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
+pub const IPV6_JOIN_GROUP: ::c_int = 12;
+pub const IPV6_LEAVE_GROUP: ::c_int = 13;
+
+pub const TCP_NODELAY: ::c_int = 0x01;
+pub const TCP_KEEPALIVE: ::c_int = 0x10;
+pub const SOL_SOCKET: ::c_int = 0xffff;
+
+pub const SO_DEBUG: ::c_int = 0x01;
+pub const SO_ACCEPTCONN: ::c_int = 0x0002;
+pub const SO_REUSEADDR: ::c_int = 0x0004;
+pub const SO_KEEPALIVE: ::c_int = 0x0008;
+pub const SO_DONTROUTE: ::c_int = 0x0010;
+pub const SO_BROADCAST: ::c_int = 0x0020;
+pub const SO_USELOOPBACK: ::c_int = 0x0040;
+pub const SO_LINGER: ::c_int = 0x0080;
+pub const SO_OOBINLINE: ::c_int = 0x0100;
+pub const SO_REUSEPORT: ::c_int = 0x0200;
+pub const SO_TIMESTAMP: ::c_int = 0x0400;
+pub const SO_TIMESTAMP_MONOTONIC: ::c_int = 0x0800;
+pub const SO_DONTTRUNC: ::c_int = 0x2000;
+pub const SO_WANTMORE: ::c_int = 0x4000;
+pub const SO_WANTOOBFLAG: ::c_int = 0x8000;
+pub const SO_SNDBUF: ::c_int = 0x1001;
+pub const SO_RCVBUF: ::c_int = 0x1002;
+pub const SO_SNDLOWAT: ::c_int = 0x1003;
+pub const SO_RCVLOWAT: ::c_int = 0x1004;
+pub const SO_SNDTIMEO: ::c_int = 0x1005;
+pub const SO_RCVTIMEO: ::c_int = 0x1006;
+pub const SO_ERROR: ::c_int = 0x1007;
+pub const SO_TYPE: ::c_int = 0x1008;
+pub const SO_LABEL: ::c_int = 0x1010;
+pub const SO_PEERLABEL: ::c_int = 0x1011;
+pub const SO_NREAD: ::c_int = 0x1020;
+pub const SO_NKE: ::c_int = 0x1021;
+pub const SO_NOSIGPIPE: ::c_int = 0x1022;
+pub const SO_NOADDRERR: ::c_int = 0x1023;
+pub const SO_NWRITE: ::c_int = 0x1024;
+pub const SO_REUSESHAREUID: ::c_int = 0x1025;
+pub const SO_NOTIFYCONFLICT: ::c_int = 0x1026;
+pub const SO_RANDOMPORT: ::c_int = 0x1082;
+pub const SO_NP_EXTENSIONS: ::c_int = 0x1083;
+
+pub const MSG_OOB: ::c_int =  0x1;
+pub const MSG_PEEK: ::c_int = 0x2;
+pub const MSG_DONTROUTE: ::c_int = 0x4;
+pub const MSG_EOR: ::c_int =  0x8;
+pub const MSG_TRUNC: ::c_int = 0x10;
+pub const MSG_CTRUNC: ::c_int = 0x20;
+pub const MSG_WAITALL: ::c_int = 0x40;
+pub const MSG_DONTWAIT: ::c_int = 0x80;
+pub const MSG_EOF: ::c_int =  0x100;
+pub const MSG_FLUSH: ::c_int = 0x400;
+pub const MSG_HOLD: ::c_int = 0x800;
+pub const MSG_SEND: ::c_int = 0x1000;
+pub const MSG_HAVEMORE: ::c_int = 0x2000;
+pub const MSG_RCVMORE: ::c_int = 0x4000;
+// pub const MSG_COMPAT: ::c_int = 0x8000;
+
+pub const SCM_TIMESTAMP: ::c_int = 0x02;
+pub const SCM_CREDS: ::c_int = 0x03;
+
+pub const IFF_LOOPBACK: ::c_int = 0x8;
+
+pub const SHUT_RD: ::c_int = 0;
+pub const SHUT_WR: ::c_int = 1;
+pub const SHUT_RDWR: ::c_int = 2;
+
+pub const LOCK_SH: ::c_int = 1;
+pub const LOCK_EX: ::c_int = 2;
+pub const LOCK_NB: ::c_int = 4;
+pub const LOCK_UN: ::c_int = 8;
+
+pub const MAP_COPY: ::c_int = 0x0002;
+pub const MAP_RENAME: ::c_int = 0x0020;
+pub const MAP_NORESERVE: ::c_int = 0x0040;
+pub const MAP_NOEXTEND: ::c_int = 0x0100;
+pub const MAP_HASSEMAPHORE: ::c_int = 0x0200;
+pub const MAP_NOCACHE: ::c_int = 0x0400;
+pub const MAP_JIT: ::c_int = 0x0800;
+
+pub const IPPROTO_RAW: ::c_int = 255;
+
+pub const _SC_ARG_MAX: ::c_int = 1;
+pub const _SC_CHILD_MAX: ::c_int = 2;
+pub const _SC_CLK_TCK: ::c_int = 3;
+pub const _SC_NGROUPS_MAX: ::c_int = 4;
+pub const _SC_OPEN_MAX: ::c_int = 5;
+pub const _SC_JOB_CONTROL: ::c_int = 6;
+pub const _SC_SAVED_IDS: ::c_int = 7;
+pub const _SC_VERSION: ::c_int = 8;
+pub const _SC_BC_BASE_MAX: ::c_int = 9;
+pub const _SC_BC_DIM_MAX: ::c_int = 10;
+pub const _SC_BC_SCALE_MAX: ::c_int = 11;
+pub const _SC_BC_STRING_MAX: ::c_int = 12;
+pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13;
+pub const _SC_EXPR_NEST_MAX: ::c_int = 14;
+pub const _SC_LINE_MAX: ::c_int = 15;
+pub const _SC_RE_DUP_MAX: ::c_int = 16;
+pub const _SC_2_VERSION: ::c_int = 17;
+pub const _SC_2_C_BIND: ::c_int = 18;
+pub const _SC_2_C_DEV: ::c_int = 19;
+pub const _SC_2_CHAR_TERM: ::c_int = 20;
+pub const _SC_2_FORT_DEV: ::c_int = 21;
+pub const _SC_2_FORT_RUN: ::c_int = 22;
+pub const _SC_2_LOCALEDEF: ::c_int = 23;
+pub const _SC_2_SW_DEV: ::c_int = 24;
+pub const _SC_2_UPE: ::c_int = 25;
+pub const _SC_STREAM_MAX: ::c_int = 26;
+pub const _SC_TZNAME_MAX: ::c_int = 27;
+pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28;
+pub const _SC_PAGESIZE: ::c_int = 29;
+pub const _SC_MEMLOCK: ::c_int = 30;
+pub const _SC_MEMLOCK_RANGE: ::c_int = 31;
+pub const _SC_MEMORY_PROTECTION: ::c_int = 32;
+pub const _SC_MESSAGE_PASSING: ::c_int = 33;
+pub const _SC_PRIORITIZED_IO: ::c_int = 34;
+pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35;
+pub const _SC_REALTIME_SIGNALS: ::c_int = 36;
+pub const _SC_SEMAPHORES: ::c_int = 37;
+pub const _SC_FSYNC: ::c_int = 38;
+pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39;
+pub const _SC_SYNCHRONIZED_IO: ::c_int = 40;
+pub const _SC_TIMERS: ::c_int = 41;
+pub const _SC_AIO_LISTIO_MAX: ::c_int = 42;
+pub const _SC_AIO_MAX: ::c_int = 43;
+pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44;
+pub const _SC_DELAYTIMER_MAX: ::c_int = 45;
+pub const _SC_MQ_OPEN_MAX: ::c_int = 46;
+pub const _SC_MAPPED_FILES: ::c_int = 47;
+pub const _SC_RTSIG_MAX: ::c_int = 48;
+pub const _SC_SEM_NSEMS_MAX: ::c_int = 49;
+pub const _SC_SEM_VALUE_MAX: ::c_int = 50;
+pub const _SC_SIGQUEUE_MAX: ::c_int = 51;
+pub const _SC_TIMER_MAX: ::c_int = 52;
+pub const _SC_NPROCESSORS_CONF: ::c_int = 57;
+pub const _SC_NPROCESSORS_ONLN: ::c_int = 58;
+pub const _SC_2_PBS: ::c_int = 59;
+pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60;
+pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61;
+pub const _SC_2_PBS_LOCATE: ::c_int = 62;
+pub const _SC_2_PBS_MESSAGE: ::c_int = 63;
+pub const _SC_2_PBS_TRACK: ::c_int = 64;
+pub const _SC_ADVISORY_INFO: ::c_int = 65;
+pub const _SC_BARRIERS: ::c_int = 66;
+pub const _SC_CLOCK_SELECTION: ::c_int = 67;
+pub const _SC_CPUTIME: ::c_int = 68;
+pub const _SC_FILE_LOCKING: ::c_int = 69;
+pub const _SC_HOST_NAME_MAX: ::c_int = 72;
+pub const _SC_MONOTONIC_CLOCK: ::c_int = 74;
+pub const _SC_READER_WRITER_LOCKS: ::c_int = 76;
+pub const _SC_REGEXP: ::c_int = 77;
+pub const _SC_SHELL: ::c_int = 78;
+pub const _SC_SPAWN: ::c_int = 79;
+pub const _SC_SPIN_LOCKS: ::c_int = 80;
+pub const _SC_SPORADIC_SERVER: ::c_int = 81;
+pub const _SC_THREAD_CPUTIME: ::c_int = 84;
+pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92;
+pub const _SC_TIMEOUTS: ::c_int = 95;
+pub const _SC_TRACE: ::c_int = 97;
+pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98;
+pub const _SC_TRACE_INHERIT: ::c_int = 99;
+pub const _SC_TRACE_LOG: ::c_int = 100;
+pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102;
+pub const _SC_V6_ILP32_OFF32: ::c_int = 103;
+pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104;
+pub const _SC_V6_LP64_OFF64: ::c_int = 105;
+pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106;
+pub const _SC_IPV6: ::c_int = 118;
+pub const _SC_RAW_SOCKETS: ::c_int = 119;
+pub const _SC_SYMLOOP_MAX: ::c_int = 120;
+pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
+pub const _SC_XOPEN_STREAMS: ::c_int = 114;
+pub const _SC_XBS5_ILP32_OFF32: ::c_int = 122;
+pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 123;
+pub const _SC_XBS5_LP64_OFF64: ::c_int = 124;
+pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 125;
+pub const _SC_SS_REPL_MAX: ::c_int = 126;
+pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 127;
+pub const _SC_TRACE_NAME_MAX: ::c_int = 128;
+pub const _SC_TRACE_SYS_MAX: ::c_int = 129;
+pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 130;
+pub const _SC_PASS_MAX: ::c_int = 131;
+
+pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
+pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
+pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
+pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
+pub const _PTHREAD_MUTEX_SIG_init: ::c_long = 0x32AAABA7;
+pub const _PTHREAD_COND_SIG_init: ::c_long = 0x3CB0B1BB;
+pub const _PTHREAD_RWLOCK_SIG_init: ::c_long = 0x2DA8B3B4;
+pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
+    __sig: _PTHREAD_MUTEX_SIG_init,
+    __opaque: [0; __PTHREAD_MUTEX_SIZE__],
+};
+pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
+    __sig: _PTHREAD_COND_SIG_init,
+    __opaque: [0; __PTHREAD_COND_SIZE__],
+};
+pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
+    __sig: _PTHREAD_RWLOCK_SIG_init,
+    __opaque: [0; __PTHREAD_RWLOCK_SIZE__],
+};
+
+pub const SIGSTKSZ: ::size_t = 131072;
+
+pub const FD_SETSIZE: usize = 1024;
+
+pub const ST_NOSUID: ::c_ulong = 2;
+
+pub const EVFILT_READ: ::int16_t = -1;
+pub const EVFILT_WRITE: ::int16_t = -2;
+pub const EVFILT_AIO: ::int16_t = -3;
+pub const EVFILT_VNODE: ::int16_t = -4;
+pub const EVFILT_PROC: ::int16_t = -5;
+pub const EVFILT_SIGNAL: ::int16_t = -6;
+pub const EVFILT_TIMER: ::int16_t = -7;
+pub const EVFILT_MACHPORT: ::int16_t = -8;
+pub const EVFILT_FS: ::int16_t = -9;
+pub const EVFILT_USER: ::int16_t = -10;
+pub const EVFILT_VM: ::int16_t = -12;
+
+pub const EV_ADD: ::uint16_t = 0x1;
+pub const EV_DELETE: ::uint16_t = 0x2;
+pub const EV_ENABLE: ::uint16_t = 0x4;
+pub const EV_DISABLE: ::uint16_t = 0x8;
+pub const EV_ONESHOT: ::uint16_t = 0x10;
+pub const EV_CLEAR: ::uint16_t = 0x20;
+pub const EV_RECEIPT: ::uint16_t = 0x40;
+pub const EV_DISPATCH: ::uint16_t = 0x80;
+pub const EV_FLAG0: ::uint16_t = 0x1000;
+pub const EV_POLL: ::uint16_t = 0x1000;
+pub const EV_FLAG1: ::uint16_t = 0x2000;
+pub const EV_OOBAND: ::uint16_t = 0x2000;
+pub const EV_ERROR: ::uint16_t = 0x4000;
+pub const EV_EOF: ::uint16_t = 0x8000;
+pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
+
+pub const NOTE_TRIGGER: ::uint32_t = 0x01000000;
+pub const NOTE_FFNOP: ::uint32_t = 0x00000000;
+pub const NOTE_FFAND: ::uint32_t = 0x40000000;
+pub const NOTE_FFOR: ::uint32_t = 0x80000000;
+pub const NOTE_FFCOPY: ::uint32_t = 0xc0000000;
+pub const NOTE_FFCTRLMASK: ::uint32_t = 0xc0000000;
+pub const NOTE_FFLAGSMASK: ::uint32_t = 0x00ffffff;
+pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
+pub const NOTE_DELETE: ::uint32_t = 0x00000001;
+pub const NOTE_WRITE: ::uint32_t = 0x00000002;
+pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
+pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
+pub const NOTE_LINK: ::uint32_t = 0x00000010;
+pub const NOTE_RENAME: ::uint32_t = 0x00000020;
+pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
+pub const NOTE_NONE: ::uint32_t = 0x00000080;
+pub const NOTE_EXIT: ::uint32_t = 0x80000000;
+pub const NOTE_FORK: ::uint32_t = 0x40000000;
+pub const NOTE_EXEC: ::uint32_t = 0x20000000;
+pub const NOTE_REAP: ::uint32_t = 0x10000000;
+pub const NOTE_SIGNAL: ::uint32_t = 0x08000000;
+pub const NOTE_EXITSTATUS: ::uint32_t = 0x04000000;
+pub const NOTE_EXIT_DETAIL: ::uint32_t = 0x02000000;
+pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
+pub const NOTE_PCTRLMASK: ::uint32_t = 0xfff00000;
+pub const NOTE_EXIT_REPARENTED: ::uint32_t = 0x00080000;
+pub const NOTE_EXIT_DETAIL_MASK: ::uint32_t = 0x00070000;
+pub const NOTE_EXIT_DECRYPTFAIL: ::uint32_t = 0x00010000;
+pub const NOTE_EXIT_MEMORY: ::uint32_t = 0x00020000;
+pub const NOTE_EXIT_CSERROR: ::uint32_t = 0x00040000;
+pub const NOTE_VM_PRESSURE: ::uint32_t = 0x80000000;
+pub const NOTE_VM_PRESSURE_TERMINATE: ::uint32_t = 0x40000000;
+pub const NOTE_VM_PRESSURE_SUDDEN_TERMINATE: ::uint32_t = 0x20000000;
+pub const NOTE_VM_ERROR: ::uint32_t = 0x10000000;
+pub const NOTE_SECONDS: ::uint32_t = 0x00000001;
+pub const NOTE_USECONDS: ::uint32_t = 0x00000002;
+pub const NOTE_NSECONDS: ::uint32_t = 0x00000004;
+pub const NOTE_ABSOLUTE: ::uint32_t = 0x00000008;
+pub const NOTE_LEEWAY: ::uint32_t = 0x00000010;
+pub const NOTE_CRITICAL: ::uint32_t = 0x00000020;
+pub const NOTE_BACKGROUND: ::uint32_t = 0x00000040;
+pub const NOTE_TRACK: ::uint32_t = 0x00000001;
+pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
+pub const NOTE_CHILD: ::uint32_t = 0x00000004;
+
+pub const OCRNL: ::c_int = 0x00000010;
+pub const ONOCR: ::c_int = 0x00000020;
+pub const ONLRET: ::c_int = 0x00000040;
+pub const OFILL: ::c_int = 0x00000080;
+pub const NLDLY: ::c_int = 0x00000300;
+pub const TABDLY: ::c_int = 0x00000c04;
+pub const CRDLY: ::c_int = 0x00003000;
+pub const FFDLY: ::c_int = 0x00004000;
+pub const BSDLY: ::c_int = 0x00008000;
+pub const VTDLY: ::c_int = 0x00010000;
+pub const OFDEL: ::c_int = 0x00020000;
+
+pub const NL0: ::c_int  = 0x00000000;
+pub const NL1: ::c_int  = 0x00000100;
+pub const TAB0: ::c_int = 0x00000000;
+pub const TAB1: ::c_int = 0x00000400;
+pub const TAB2: ::c_int = 0x00000800;
+pub const CR0: ::c_int  = 0x00000000;
+pub const CR1: ::c_int  = 0x00001000;
+pub const CR2: ::c_int  = 0x00002000;
+pub const CR3: ::c_int  = 0x00003000;
+pub const FF0: ::c_int  = 0x00000000;
+pub const FF1: ::c_int  = 0x00004000;
+pub const BS0: ::c_int  = 0x00000000;
+pub const BS1: ::c_int  = 0x00008000;
+pub const TAB3: ::c_int = 0x00000004;
+pub const VT0: ::c_int  = 0x00000000;
+pub const VT1: ::c_int  = 0x00010000;
+pub const IUTF8: ::tcflag_t = 0x00004000;
+pub const CRTSCTS: ::tcflag_t = 0x00030000;
+
+pub const NI_MAXHOST: ::socklen_t = 1025;
+
+pub const Q_GETQUOTA: ::c_int = 0x300;
+pub const Q_SETQUOTA: ::c_int = 0x400;
+
+pub const RTLD_LOCAL: ::c_int = 0x4;
+pub const RTLD_FIRST: ::c_int = 0x100;
+pub const RTLD_NODELETE: ::c_int = 0x80;
+pub const RTLD_NOLOAD: ::c_int = 0x10;
+pub const RTLD_GLOBAL: ::c_int = 0x8;
+
+pub const _WSTOPPED: ::c_int = 0o177;
+
+pub const LOG_NETINFO: ::c_int = 12 << 3;
+pub const LOG_REMOTEAUTH: ::c_int = 13 << 3;
+pub const LOG_INSTALL: ::c_int = 14 << 3;
+pub const LOG_RAS: ::c_int = 15 << 3;
+pub const LOG_LAUNCHD: ::c_int = 24 << 3;
+pub const LOG_NFACILITIES: ::c_int = 25;
+
+pub const CTLTYPE: ::c_int = 0xf;
+pub const CTLTYPE_NODE: ::c_int = 1;
+pub const CTLTYPE_INT: ::c_int = 2;
+pub const CTLTYPE_STRING: ::c_int = 3;
+pub const CTLTYPE_QUAD: ::c_int = 4;
+pub const CTLTYPE_OPAQUE: ::c_int = 5;
+pub const CTLTYPE_STRUCT: ::c_int = CTLTYPE_OPAQUE;
+pub const CTLFLAG_RD: ::c_int = 0x80000000;
+pub const CTLFLAG_WR: ::c_int = 0x40000000;
+pub const CTLFLAG_RW: ::c_int = CTLFLAG_RD | CTLFLAG_WR;
+pub const CTLFLAG_NOLOCK: ::c_int = 0x20000000;
+pub const CTLFLAG_ANYBODY: ::c_int = 0x10000000;
+pub const CTLFLAG_SECURE: ::c_int = 0x08000000;
+pub const CTLFLAG_MASKED: ::c_int = 0x04000000;
+pub const CTLFLAG_NOAUTO: ::c_int = 0x02000000;
+pub const CTLFLAG_KERN: ::c_int = 0x01000000;
+pub const CTLFLAG_LOCKED: ::c_int = 0x00800000;
+pub const CTLFLAG_OID2: ::c_int = 0x00400000;
+pub const CTL_UNSPEC: ::c_int = 0;
+pub const CTL_KERN: ::c_int = 1;
+pub const CTL_VM: ::c_int = 2;
+pub const CTL_VFS: ::c_int = 3;
+pub const CTL_NET: ::c_int = 4;
+pub const CTL_DEBUG: ::c_int = 5;
+pub const CTL_HW: ::c_int = 6;
+pub const CTL_MACHDEP: ::c_int = 7;
+pub const CTL_USER: ::c_int = 8;
+pub const CTL_MAXID: ::c_int = 9;
+pub const KERN_OSTYPE: ::c_int = 1;
+pub const KERN_OSRELEASE: ::c_int = 2;
+pub const KERN_OSREV: ::c_int = 3;
+pub const KERN_VERSION: ::c_int = 4;
+pub const KERN_MAXVNODES: ::c_int = 5;
+pub const KERN_MAXPROC: ::c_int = 6;
+pub const KERN_MAXFILES: ::c_int = 7;
+pub const KERN_ARGMAX: ::c_int = 8;
+pub const KERN_SECURELVL: ::c_int = 9;
+pub const KERN_HOSTNAME: ::c_int = 10;
+pub const KERN_HOSTID: ::c_int = 11;
+pub const KERN_CLOCKRATE: ::c_int = 12;
+pub const KERN_VNODE: ::c_int = 13;
+pub const KERN_PROC: ::c_int = 14;
+pub const KERN_FILE: ::c_int = 15;
+pub const KERN_PROF: ::c_int = 16;
+pub const KERN_POSIX1: ::c_int = 17;
+pub const KERN_NGROUPS: ::c_int = 18;
+pub const KERN_JOB_CONTROL: ::c_int = 19;
+pub const KERN_SAVED_IDS: ::c_int = 20;
+pub const KERN_BOOTTIME: ::c_int = 21;
+pub const KERN_NISDOMAINNAME: ::c_int = 22;
+pub const KERN_DOMAINNAME: ::c_int = KERN_NISDOMAINNAME;
+pub const KERN_MAXPARTITIONS: ::c_int = 23;
+pub const KERN_KDEBUG: ::c_int = 24;
+pub const KERN_UPDATEINTERVAL: ::c_int = 25;
+pub const KERN_OSRELDATE: ::c_int = 26;
+pub const KERN_NTP_PLL: ::c_int = 27;
+pub const KERN_BOOTFILE: ::c_int = 28;
+pub const KERN_MAXFILESPERPROC: ::c_int = 29;
+pub const KERN_MAXPROCPERUID: ::c_int = 30;
+pub const KERN_DUMPDEV: ::c_int = 31;
+pub const KERN_IPC: ::c_int = 32;
+pub const KERN_DUMMY: ::c_int = 33;
+pub const KERN_PS_STRINGS: ::c_int = 34;
+pub const KERN_USRSTACK32: ::c_int = 35;
+pub const KERN_LOGSIGEXIT: ::c_int = 36;
+pub const KERN_SYMFILE: ::c_int = 37;
+pub const KERN_PROCARGS: ::c_int = 38;
+pub const KERN_NETBOOT: ::c_int = 40;
+pub const KERN_SYSV: ::c_int = 42;
+pub const KERN_AFFINITY: ::c_int = 43;
+pub const KERN_TRANSLATE: ::c_int = 44;
+pub const KERN_CLASSIC: ::c_int = KERN_TRANSLATE;
+pub const KERN_EXEC: ::c_int = 45;
+pub const KERN_CLASSICHANDLER: ::c_int = KERN_EXEC;
+pub const KERN_AIOMAX: ::c_int = 46;
+pub const KERN_AIOPROCMAX: ::c_int = 47;
+pub const KERN_AIOTHREADS: ::c_int = 48;
+pub const KERN_COREFILE: ::c_int = 50;
+pub const KERN_COREDUMP: ::c_int = 51;
+pub const KERN_SUGID_COREDUMP: ::c_int = 52;
+pub const KERN_PROCDELAYTERM: ::c_int = 53;
+pub const KERN_SHREG_PRIVATIZABLE: ::c_int = 54;
+pub const KERN_LOW_PRI_WINDOW: ::c_int = 56;
+pub const KERN_LOW_PRI_DELAY: ::c_int = 57;
+pub const KERN_POSIX: ::c_int = 58;
+pub const KERN_USRSTACK64: ::c_int = 59;
+pub const KERN_NX_PROTECTION: ::c_int = 60;
+pub const KERN_TFP: ::c_int = 61;
+pub const KERN_PROCNAME: ::c_int = 62;
+pub const KERN_THALTSTACK: ::c_int = 63;
+pub const KERN_SPECULATIVE_READS: ::c_int = 64;
+pub const KERN_OSVERSION: ::c_int = 65;
+pub const KERN_SAFEBOOT: ::c_int = 66;
+pub const KERN_RAGEVNODE: ::c_int = 68;
+pub const KERN_TTY: ::c_int = 69;
+pub const KERN_CHECKOPENEVT: ::c_int = 70;
+pub const KERN_THREADNAME: ::c_int = 71;
+pub const KERN_MAXID: ::c_int = 72;
+pub const KERN_RAGE_PROC: ::c_int = 1;
+pub const KERN_RAGE_THREAD: ::c_int = 2;
+pub const KERN_UNRAGE_PROC: ::c_int = 3;
+pub const KERN_UNRAGE_THREAD: ::c_int = 4;
+pub const KERN_OPENEVT_PROC: ::c_int = 1;
+pub const KERN_UNOPENEVT_PROC: ::c_int = 2;
+pub const KERN_TFP_POLICY: ::c_int = 1;
+pub const KERN_TFP_POLICY_DENY: ::c_int = 0;
+pub const KERN_TFP_POLICY_DEFAULT: ::c_int = 2;
+pub const KERN_KDEFLAGS: ::c_int = 1;
+pub const KERN_KDDFLAGS: ::c_int = 2;
+pub const KERN_KDENABLE: ::c_int = 3;
+pub const KERN_KDSETBUF: ::c_int = 4;
+pub const KERN_KDGETBUF: ::c_int = 5;
+pub const KERN_KDSETUP: ::c_int = 6;
+pub const KERN_KDREMOVE: ::c_int = 7;
+pub const KERN_KDSETREG: ::c_int = 8;
+pub const KERN_KDGETREG: ::c_int = 9;
+pub const KERN_KDREADTR: ::c_int = 10;
+pub const KERN_KDPIDTR: ::c_int = 11;
+pub const KERN_KDTHRMAP: ::c_int = 12;
+pub const KERN_KDPIDEX: ::c_int = 14;
+pub const KERN_KDSETRTCDEC: ::c_int = 15;
+pub const KERN_KDGETENTROPY: ::c_int = 16;
+pub const KERN_KDWRITETR: ::c_int = 17;
+pub const KERN_KDWRITEMAP: ::c_int = 18;
+pub const KERN_KDENABLE_BG_TRACE: ::c_int = 19;
+pub const KERN_KDDISABLE_BG_TRACE: ::c_int = 20;
+pub const KERN_KDREADCURTHRMAP: ::c_int = 21;
+pub const KERN_KDSET_TYPEFILTER: ::c_int = 22;
+pub const KERN_KDBUFWAIT: ::c_int = 23;
+pub const KERN_KDCPUMAP: ::c_int = 24;
+pub const KERN_PROC_ALL: ::c_int = 0;
+pub const KERN_PROC_PID: ::c_int = 1;
+pub const KERN_PROC_PGRP: ::c_int = 2;
+pub const KERN_PROC_SESSION: ::c_int = 3;
+pub const KERN_PROC_TTY: ::c_int = 4;
+pub const KERN_PROC_UID: ::c_int = 5;
+pub const KERN_PROC_RUID: ::c_int = 6;
+pub const KERN_PROC_LCID: ::c_int = 7;
+pub const KIPC_MAXSOCKBUF: ::c_int = 1;
+pub const KIPC_SOCKBUF_WASTE: ::c_int = 2;
+pub const KIPC_SOMAXCONN: ::c_int = 3;
+pub const KIPC_MAX_LINKHDR: ::c_int = 4;
+pub const KIPC_MAX_PROTOHDR: ::c_int = 5;
+pub const KIPC_MAX_HDR: ::c_int = 6;
+pub const KIPC_MAX_DATALEN: ::c_int = 7;
+pub const KIPC_MBSTAT: ::c_int = 8;
+pub const KIPC_NMBCLUSTERS: ::c_int = 9;
+pub const KIPC_SOQLIMITCOMPAT: ::c_int = 10;
+pub const VM_METER: ::c_int = 1;
+pub const VM_LOADAVG: ::c_int = 2;
+pub const VM_MACHFACTOR: ::c_int = 4;
+pub const VM_SWAPUSAGE: ::c_int = 5;
+pub const VM_MAXID: ::c_int = 6;
+pub const HW_MACHINE: ::c_int = 1;
+pub const HW_MODEL: ::c_int = 2;
+pub const HW_NCPU: ::c_int = 3;
+pub const HW_BYTEORDER: ::c_int = 4;
+pub const HW_PHYSMEM: ::c_int = 5;
+pub const HW_USERMEM: ::c_int = 6;
+pub const HW_PAGESIZE: ::c_int = 7;
+pub const HW_DISKNAMES: ::c_int = 8;
+pub const HW_DISKSTATS: ::c_int = 9;
+pub const HW_EPOCH: ::c_int = 10;
+pub const HW_FLOATINGPT: ::c_int = 11;
+pub const HW_MACHINE_ARCH: ::c_int = 12;
+pub const HW_VECTORUNIT: ::c_int = 13;
+pub const HW_BUS_FREQ: ::c_int = 14;
+pub const HW_CPU_FREQ: ::c_int = 15;
+pub const HW_CACHELINE: ::c_int = 16;
+pub const HW_L1ICACHESIZE: ::c_int = 17;
+pub const HW_L1DCACHESIZE: ::c_int = 18;
+pub const HW_L2SETTINGS: ::c_int = 19;
+pub const HW_L2CACHESIZE: ::c_int = 20;
+pub const HW_L3SETTINGS: ::c_int = 21;
+pub const HW_L3CACHESIZE: ::c_int = 22;
+pub const HW_TB_FREQ: ::c_int = 23;
+pub const HW_MEMSIZE: ::c_int = 24;
+pub const HW_AVAILCPU: ::c_int = 25;
+pub const HW_MAXID: ::c_int = 26;
+pub const USER_CS_PATH: ::c_int = 1;
+pub const USER_BC_BASE_MAX: ::c_int = 2;
+pub const USER_BC_DIM_MAX: ::c_int = 3;
+pub const USER_BC_SCALE_MAX: ::c_int = 4;
+pub const USER_BC_STRING_MAX: ::c_int = 5;
+pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6;
+pub const USER_EXPR_NEST_MAX: ::c_int = 7;
+pub const USER_LINE_MAX: ::c_int = 8;
+pub const USER_RE_DUP_MAX: ::c_int = 9;
+pub const USER_POSIX2_VERSION: ::c_int = 10;
+pub const USER_POSIX2_C_BIND: ::c_int = 11;
+pub const USER_POSIX2_C_DEV: ::c_int = 12;
+pub const USER_POSIX2_CHAR_TERM: ::c_int = 13;
+pub const USER_POSIX2_FORT_DEV: ::c_int = 14;
+pub const USER_POSIX2_FORT_RUN: ::c_int = 15;
+pub const USER_POSIX2_LOCALEDEF: ::c_int = 16;
+pub const USER_POSIX2_SW_DEV: ::c_int = 17;
+pub const USER_POSIX2_UPE: ::c_int = 18;
+pub const USER_STREAM_MAX: ::c_int = 19;
+pub const USER_TZNAME_MAX: ::c_int = 20;
+pub const USER_MAXID: ::c_int = 21;
+pub const CTL_DEBUG_NAME: ::c_int = 0;
+pub const CTL_DEBUG_VALUE: ::c_int = 1;
+pub const CTL_DEBUG_MAXID: ::c_int = 20;
+
+pub const PRIO_DARWIN_THREAD: ::c_int = 3;
+pub const PRIO_DARWIN_PROCESS: ::c_int = 4;
+pub const PRIO_DARWIN_BG: ::c_int = 0x1000;
+pub const PRIO_DARWIN_NONUI: ::c_int = 0x1001;
+
+pub const SEM_FAILED: *mut sem_t = -1isize as *mut ::sem_t;
+
+pub const SIGEV_NONE: ::c_int = 0;
+pub const SIGEV_SIGNAL: ::c_int = 1;
+pub const SIGEV_THREAD: ::c_int = 3;
+
+pub const AIO_CANCELED: ::c_int = 2;
+pub const AIO_NOTCANCELED: ::c_int = 4;
+pub const AIO_ALLDONE: ::c_int = 1;
+pub const AIO_LISTIO_MAX: ::c_int = 16;
+pub const LIO_NOP: ::c_int = 0;
+pub const LIO_WRITE: ::c_int = 2;
+pub const LIO_READ: ::c_int = 1;
+pub const LIO_WAIT: ::c_int = 2;
+pub const LIO_NOWAIT: ::c_int = 1;
+
+pub const WEXITED: ::c_int = 0x00000004;
+pub const WSTOPPED: ::c_int = 0x00000008;
+pub const WCONTINUED: ::c_int = 0x00000010;
+pub const WNOWAIT: ::c_int = 0x00000020;
+
+pub const P_ALL: idtype_t = 0;
+pub const P_PID: idtype_t = 1;
+pub const P_PGID: idtype_t = 2;
+
+pub const XATTR_NOFOLLOW: ::c_int = 0x0001;
+pub const XATTR_CREATE: ::c_int = 0x0002;
+pub const XATTR_REPLACE: ::c_int = 0x0004;
+pub const XATTR_NOSECURITY: ::c_int = 0x0008;
+pub const XATTR_NODEFAULT: ::c_int = 0x0010;
+pub const XATTR_SHOWCOMPRESSION: ::c_int = 0x0020;
+
+pub const NET_RT_IFLIST2: ::c_int = 0x0006;
+pub const RTM_IFINFO2: ::c_int = 0x0012;
+
+pub const KERN_PROCARGS2: ::c_int = 49;
+
+pub const PROC_PIDTASKALLINFO: ::c_int = 2;
+pub const PROC_PIDTASKINFO: ::c_int = 4;
+pub const PROC_PIDTHREADINFO: ::c_int = 5;
+pub const MAXCOMLEN: usize = 16;
+pub const MAXTHREADNAMESIZE: usize = 64;
+
+f! {
+    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
+        status >> 8
+    }
+
+    pub fn _WSTATUS(status: ::c_int) -> ::c_int {
+        status & 0x7f
+    }
+
+    pub fn WIFCONTINUED(status: ::c_int) -> bool {
+        _WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) == 0x13
+    }
+
+    pub fn WIFSIGNALED(status: ::c_int) -> bool {
+        _WSTATUS(status) != _WSTOPPED && _WSTATUS(status) != 0
+    }
+
+    pub fn WIFSTOPPED(status: ::c_int) -> bool {
+        _WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) != 0x13
+    }
+}
+
+extern {
+    pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
+    pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
+    pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
+    pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
+    pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "aio_suspend$UNIX2003")]
+    pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
+                       timeout: *const ::timespec) -> ::c_int;
+    pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
+    pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
+                      nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
+
+    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
+
+    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
+
+    pub fn getutxent() -> *mut utmpx;
+    pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
+    pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
+    pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
+    pub fn setutxent();
+    pub fn endutxent();
+    pub fn utmpxname(file: *const ::c_char) -> ::c_int;
+
+    pub fn getnameinfo(sa: *const ::sockaddr,
+                       salen: ::socklen_t,
+                       host: *mut ::c_char,
+                       hostlen: ::socklen_t,
+                       serv: *mut ::c_char,
+                       sevlen: ::socklen_t,
+                       flags: ::c_int) -> ::c_int;
+    pub fn mincore(addr: *const ::c_void, len: ::size_t,
+                   vec: *mut ::c_char) -> ::c_int;
+    pub fn sysctlnametomib(name: *const ::c_char,
+                           mibp: *mut ::c_int,
+                           sizep: *mut ::size_t)
+                           -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "mprotect$UNIX2003")]
+    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
+                    -> ::c_int;
+    pub fn shm_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::c_int;
+    pub fn sysctl(name: *mut ::c_int,
+                  namelen: ::c_uint,
+                  oldp: *mut ::c_void,
+                  oldlenp: *mut ::size_t,
+                  newp: *mut ::c_void,
+                  newlen: ::size_t)
+                  -> ::c_int;
+    pub fn sysctlbyname(name: *const ::c_char,
+                        oldp: *mut ::c_void,
+                        oldlenp: *mut ::size_t,
+                        newp: *mut ::c_void,
+                        newlen: ::size_t)
+                        -> ::c_int;
+    pub fn mach_absolute_time() -> u64;
+    pub fn mach_timebase_info(info: *mut ::mach_timebase_info) -> ::c_int;
+    pub fn pthread_setname_np(name: *const ::c_char) -> ::c_int;
+    pub fn pthread_get_stackaddr_np(thread: ::pthread_t) -> *mut ::c_void;
+    pub fn pthread_get_stacksize_np(thread: ::pthread_t) -> ::size_t;
+    pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
+                                       pshared: ::c_int) -> ::c_int;
+    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
+                                       pshared: *mut ::c_int) -> ::c_int;
+    pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
+                                        pshared: ::c_int) -> ::c_int;
+    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
+                                        pshared: *mut ::c_int) -> ::c_int;
+    pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
+                                         val: *mut ::c_int) -> ::c_int;
+    pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
+                                         val: ::c_int) -> ::c_int;
+    pub fn __error() -> *mut ::c_int;
+    pub fn backtrace(buf: *mut *mut ::c_void,
+                     sz: ::c_int) -> ::c_int;
+    #[cfg_attr(target_os = "macos", link_name = "statfs$INODE64")]
+    pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
+    #[cfg_attr(target_os = "macos", link_name = "fstatfs$INODE64")]
+    pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
+    pub fn kevent(kq: ::c_int,
+                  changelist: *const ::kevent,
+                  nchanges: ::c_int,
+                  eventlist: *mut ::kevent,
+                  nevents: ::c_int,
+                  timeout: *const ::timespec) -> ::c_int;
+    pub fn kevent64(kq: ::c_int,
+                    changelist: *const ::kevent64_s,
+                    nchanges: ::c_int,
+                    eventlist: *mut ::kevent64_s,
+                    nevents: ::c_int,
+                    flags: ::c_uint,
+                    timeout: *const ::timespec) -> ::c_int;
+    pub fn mount(src: *const ::c_char,
+                 target: *const ::c_char,
+                 flags: ::c_int,
+                 data: *mut ::c_void) -> ::c_int;
+    pub fn ptrace(request: ::c_int,
+                  pid: ::pid_t,
+                  addr: *mut ::c_char,
+                  data: ::c_int) -> ::c_int;
+    pub fn quotactl(special: *const ::c_char,
+                    cmd: ::c_int,
+                    id: ::c_int,
+                    data: *mut ::c_char) -> ::c_int;
+    pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int;
+    pub fn sendfile(fd: ::c_int,
+                    s: ::c_int,
+                    offset: ::off_t,
+                    len: *mut ::off_t,
+                    hdtr: *mut ::sf_hdtr,
+                    flags: ::c_int) -> ::c_int;
+    pub fn openpty(amaster: *mut ::c_int,
+                   aslave: *mut ::c_int,
+                   name: *mut ::c_char,
+                   termp: *mut termios,
+                   winp: *mut ::winsize) -> ::c_int;
+    pub fn forkpty(amaster: *mut ::c_int,
+                   name: *mut ::c_char,
+                   termp: *mut termios,
+                   winp: *mut ::winsize) -> ::pid_t;
+    pub fn duplocale(base: ::locale_t) -> ::locale_t;
+    pub fn freelocale(loc: ::locale_t) -> ::c_int;
+    pub fn localeconv_l(loc: ::locale_t) -> *mut lconv;
+    pub fn newlocale(mask: ::c_int,
+                     locale: *const ::c_char,
+                     base: ::locale_t) -> ::locale_t;
+    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
+    pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
+    pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
+    pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
+
+    pub fn getxattr(path: *const ::c_char, name: *const ::c_char,
+                    value: *mut ::c_void, size: ::size_t, position: u32,
+                    flags: ::c_int) -> ::ssize_t;
+    pub fn fgetxattr(filedes: ::c_int, name: *const ::c_char,
+                     value: *mut ::c_void, size: ::size_t, position: u32,
+                     flags: ::c_int) -> ::ssize_t;
+    pub fn setxattr(path: *const ::c_char, name: *const ::c_char,
+                    value: *const ::c_void, size: ::size_t, position: u32,
+                    flags: ::c_int) -> ::c_int;
+    pub fn fsetxattr(filedes: ::c_int, name: *const ::c_char,
+                     value: *const ::c_void, size: ::size_t, position: u32,
+                     flags: ::c_int) -> ::c_int;
+    pub fn listxattr(path: *const ::c_char, list: *mut ::c_char,
+                     size: ::size_t, flags: ::c_int) -> ::ssize_t;
+    pub fn flistxattr(filedes: ::c_int, list: *mut ::c_char,
+                      size: ::size_t, flags: ::c_int) -> ::ssize_t;
+    pub fn removexattr(path: *const ::c_char, name: *const ::c_char,
+                       flags: ::c_int) -> ::c_int;
+    pub fn fremovexattr(filedes: ::c_int, name: *const ::c_char,
+                        flags: ::c_int) -> ::c_int;
+
+    pub fn getgrouplist(name: *const ::c_char,
+                        basegid: ::c_int,
+                        groups: *mut ::c_int,
+                        ngroups: *mut ::c_int) -> ::c_int;
+    pub fn initgroups(user: *const ::c_char, basegroup: ::c_int) -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "waitid$UNIX2003")]
+    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
+                  options: ::c_int) -> ::c_int;
+    pub fn brk(addr: *const ::c_void) -> *mut ::c_void;
+    pub fn sbrk(increment: ::c_int) -> *mut ::c_void;
+    pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(any(target_arch = "arm", target_arch = "x86"))] {
+        mod b32;
+        pub use self::b32::*;
+    } else if #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] {
+        mod b64;
+        pub use self::b64::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/freebsdlike/dragonfly/mod.rs
@@ -0,0 +1,478 @@
+pub type clock_t = u64;
+pub type ino_t = u64;
+pub type nlink_t = u32;
+pub type blksize_t = i64;
+pub type clockid_t = ::c_ulong;
+
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type time_t = i64;
+pub type suseconds_t = i64;
+
+pub type uuid_t = ::uuid;
+
+pub type fsblkcnt_t = u64;
+pub type fsfilcnt_t = u64;
+
+pub type sem_t = *mut sem;
+
+pub enum sem {}
+
+s! {
+
+    pub struct exit_status {
+        pub e_termination: u16,
+        pub e_exit: u16
+    }
+
+    pub struct utmpx {
+        pub ut_name: [::c_char; 32],
+        pub ut_id: [::c_char; 4],
+
+        pub ut_line: [::c_char; 32],
+        pub ut_host: [::c_char; 256],
+
+        pub ut_unused: [u8; 16],
+        pub ut_session: u16,
+        pub ut_type: u16,
+        pub ut_pid: ::pid_t,
+        ut_exit: exit_status,
+        ut_ss: ::sockaddr_storage,
+        pub ut_tv: ::timeval,
+        pub ut_unused2: [u8; 16],
+    }
+
+    pub struct aiocb {
+        pub aio_fildes: ::c_int,
+        pub aio_offset: ::off_t,
+        pub aio_buf: *mut ::c_void,
+        pub aio_nbytes: ::size_t,
+        pub aio_sigevent: sigevent,
+        pub aio_lio_opcode: ::c_int,
+        pub aio_reqprio: ::c_int,
+        _aio_val: ::c_int,
+        _aio_err: ::c_int
+    }
+
+    pub struct dirent {
+        pub d_fileno: ::ino_t,
+        pub d_namlen: u16,
+        pub d_type: u8,
+        __unused1: u8,
+        __unused2: u32,
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct uuid {
+        pub time_low: u32,
+        pub time_mid: u16,
+        pub time_hi_and_version: u16,
+        pub clock_seq_hi_and_reserved: u8,
+        pub clock_seq_low: u8,
+        pub node: [u8; 6],
+    }
+
+    pub struct sigevent {
+        pub sigev_notify: ::c_int,
+        // The union is 8-byte in size, so it is aligned at a 8-byte offset.
+        #[cfg(target_pointer_width = "64")]
+        __unused1: ::c_int,
+        pub sigev_signo: ::c_int,       //actually a union
+        // pad the union
+        #[cfg(target_pointer_width = "64")]
+        __unused2: ::c_int,
+        pub sigev_value: ::sigval,
+        __unused3: *mut ::c_void        //actually a function pointer
+    }
+
+    pub struct statvfs {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_favail: ::fsfilcnt_t,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        pub f_owner: ::uid_t,
+        pub f_type: ::c_uint,
+        pub f_syncreads: u64,
+        pub f_syncwrites: u64,
+        pub f_asyncreads: u64,
+        pub f_asyncwrites: u64,
+        pub f_fsid_uuid: ::uuid_t,
+        pub f_uid_uuid: ::uuid_t,
+    }
+
+    pub struct stat {
+        pub st_ino: ::ino_t,
+        pub st_nlink: ::nlink_t,
+        pub st_dev: ::dev_t,
+        pub st_mode: ::mode_t,
+        pub st_padding1: ::uint16_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_size: ::off_t,
+        pub st_blocks: ::int64_t,
+        pub st_blksize: ::uint32_t,
+        pub st_flags: ::uint32_t,
+        pub st_gen: ::uint32_t,
+        pub st_lspare: ::int32_t,
+        pub st_qspare1: ::int64_t,
+        pub st_qspare2: ::int64_t,
+    }
+
+    pub struct if_data {
+        pub ifi_type: ::c_uchar,
+        pub ifi_physical: ::c_uchar,
+        pub ifi_addrlen: ::c_uchar,
+        pub ifi_hdrlen: ::c_uchar,
+        pub ifi_recvquota: ::c_uchar,
+        pub ifi_xmitquota: ::c_uchar,
+        pub ifi_mtu: ::c_ulong,
+        pub ifi_metric: ::c_ulong,
+        pub ifi_link_state: ::c_ulong,
+        pub ifi_baudrate: u64,
+        pub ifi_ipackets: ::c_ulong,
+        pub ifi_ierrors: ::c_ulong,
+        pub ifi_opackets: ::c_ulong,
+        pub ifi_oerrors: ::c_ulong,
+        pub ifi_collisions: ::c_ulong,
+        pub ifi_ibytes: ::c_ulong,
+        pub ifi_obytes: ::c_ulong,
+        pub ifi_imcasts: ::c_ulong,
+        pub ifi_omcasts: ::c_ulong,
+        pub ifi_iqdrops: ::c_ulong,
+        pub ifi_noproto: ::c_ulong,
+        pub ifi_hwassist: ::c_ulong,
+        pub ifi_oqdrops: ::c_ulong,
+        pub ifi_lastchange: ::timeval,
+    }
+
+    pub struct if_msghdr {
+        pub ifm_msglen: ::c_ushort,
+        pub ifm_version: ::c_uchar,
+        pub ifm_type: ::c_uchar,
+        pub ifm_addrs: ::c_int,
+        pub ifm_flags: ::c_int,
+        pub ifm_index: ::c_ushort,
+        pub ifm_data: if_data,
+    }
+}
+
+pub const RAND_MAX: ::c_int = 0x7fff_ffff;
+pub const PTHREAD_STACK_MIN: ::size_t = 16384;
+pub const SIGSTKSZ: ::size_t = 40960;
+pub const MADV_INVAL: ::c_int = 10;
+pub const O_CLOEXEC: ::c_int = 0x00020000;
+pub const O_DIRECTORY: ::c_int = 0x08000000;
+pub const F_GETLK: ::c_int = 7;
+pub const F_SETLK: ::c_int = 8;
+pub const F_SETLKW: ::c_int = 9;
+pub const ELAST: ::c_int = 99;
+pub const RLIMIT_POSIXLOCKS: ::c_int = 11;
+pub const RLIM_NLIMITS: ::rlim_t = 12;
+
+pub const Q_GETQUOTA: ::c_int = 0x300;
+pub const Q_SETQUOTA: ::c_int = 0x400;
+
+pub const CLOCK_REALTIME: ::clockid_t = 0;
+pub const CLOCK_VIRTUAL: ::clockid_t = 1;
+pub const CLOCK_PROF: ::clockid_t = 2;
+pub const CLOCK_MONOTONIC: ::clockid_t = 4;
+pub const CLOCK_UPTIME: ::clockid_t = 5;
+pub const CLOCK_UPTIME_PRECISE: ::clockid_t = 7;
+pub const CLOCK_UPTIME_FAST: ::clockid_t = 8;
+pub const CLOCK_REALTIME_PRECISE: ::clockid_t = 9;
+pub const CLOCK_REALTIME_FAST: ::clockid_t = 10;
+pub const CLOCK_MONOTONIC_PRECISE: ::clockid_t = 11;
+pub const CLOCK_MONOTONIC_FAST: ::clockid_t = 12;
+pub const CLOCK_SECOND: ::clockid_t = 13;
+pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 14;
+pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 15;
+
+pub const CTL_UNSPEC: ::c_int = 0;
+pub const CTL_KERN: ::c_int = 1;
+pub const CTL_VM: ::c_int = 2;
+pub const CTL_VFS: ::c_int = 3;
+pub const CTL_NET: ::c_int = 4;
+pub const CTL_DEBUG: ::c_int = 5;
+pub const CTL_HW: ::c_int = 6;
+pub const CTL_MACHDEP: ::c_int = 7;
+pub const CTL_USER: ::c_int = 8;
+pub const CTL_P1003_1B: ::c_int = 9;
+pub const CTL_LWKT: ::c_int = 10;
+pub const CTL_MAXID: ::c_int = 11;
+pub const KERN_OSTYPE: ::c_int = 1;
+pub const KERN_OSRELEASE: ::c_int = 2;
+pub const KERN_OSREV: ::c_int = 3;
+pub const KERN_VERSION: ::c_int = 4;
+pub const KERN_MAXVNODES: ::c_int = 5;
+pub const KERN_MAXPROC: ::c_int = 6;
+pub const KERN_MAXFILES: ::c_int = 7;
+pub const KERN_ARGMAX: ::c_int = 8;
+pub const KERN_SECURELVL: ::c_int = 9;
+pub const KERN_HOSTNAME: ::c_int = 10;
+pub const KERN_HOSTID: ::c_int = 11;
+pub const KERN_CLOCKRATE: ::c_int = 12;
+pub const KERN_VNODE: ::c_int = 13;
+pub const KERN_PROC: ::c_int = 14;
+pub const KERN_FILE: ::c_int = 15;
+pub const KERN_PROF: ::c_int = 16;
+pub const KERN_POSIX1: ::c_int = 17;
+pub const KERN_NGROUPS: ::c_int = 18;
+pub const KERN_JOB_CONTROL: ::c_int = 19;
+pub const KERN_SAVED_IDS: ::c_int = 20;
+pub const KERN_BOOTTIME: ::c_int = 21;
+pub const KERN_NISDOMAINNAME: ::c_int = 22;
+pub const KERN_UPDATEINTERVAL: ::c_int = 23;
+pub const KERN_OSRELDATE: ::c_int = 24;
+pub const KERN_NTP_PLL: ::c_int = 25;
+pub const KERN_BOOTFILE: ::c_int = 26;
+pub const KERN_MAXFILESPERPROC: ::c_int = 27;
+pub const KERN_MAXPROCPERUID: ::c_int = 28;
+pub const KERN_DUMPDEV: ::c_int = 29;
+pub const KERN_IPC: ::c_int = 30;
+pub const KERN_DUMMY: ::c_int = 31;
+pub const KERN_PS_STRINGS: ::c_int = 32;
+pub const KERN_USRSTACK: ::c_int = 33;
+pub const KERN_LOGSIGEXIT: ::c_int = 34;
+pub const KERN_IOV_MAX: ::c_int = 35;
+pub const KERN_MAXPOSIXLOCKSPERUID: ::c_int = 36;
+pub const KERN_MAXID: ::c_int = 37;
+pub const KERN_PROC_ALL: ::c_int = 0;
+pub const KERN_PROC_PID: ::c_int = 1;
+pub const KERN_PROC_PGRP: ::c_int = 2;
+pub const KERN_PROC_SESSION: ::c_int = 3;
+pub const KERN_PROC_TTY: ::c_int = 4;
+pub const KERN_PROC_UID: ::c_int = 5;
+pub const KERN_PROC_RUID: ::c_int = 6;
+pub const KERN_PROC_ARGS: ::c_int = 7;
+pub const KERN_PROC_CWD: ::c_int = 8;
+pub const KERN_PROC_PATHNAME: ::c_int = 9;
+pub const KERN_PROC_FLAGMASK: ::c_int = 0x10;
+pub const KERN_PROC_FLAG_LWP: ::c_int = 0x10;
+pub const KIPC_MAXSOCKBUF: ::c_int = 1;
+pub const KIPC_SOCKBUF_WASTE: ::c_int = 2;
+pub const KIPC_SOMAXCONN: ::c_int = 3;
+pub const KIPC_MAX_LINKHDR: ::c_int = 4;
+pub const KIPC_MAX_PROTOHDR: ::c_int = 5;
+pub const KIPC_MAX_HDR: ::c_int = 6;
+pub const KIPC_MAX_DATALEN: ::c_int = 7;
+pub const KIPC_MBSTAT: ::c_int = 8;
+pub const KIPC_NMBCLUSTERS: ::c_int = 9;
+pub const HW_MACHINE: ::c_int = 1;
+pub const HW_MODEL: ::c_int = 2;
+pub const HW_NCPU: ::c_int = 3;
+pub const HW_BYTEORDER: ::c_int = 4;
+pub const HW_PHYSMEM: ::c_int = 5;
+pub const HW_USERMEM: ::c_int = 6;
+pub const HW_PAGESIZE: ::c_int = 7;
+pub const HW_DISKNAMES: ::c_int = 8;
+pub const HW_DISKSTATS: ::c_int = 9;
+pub const HW_FLOATINGPT: ::c_int = 10;
+pub const HW_MACHINE_ARCH: ::c_int = 11;
+pub const HW_MACHINE_PLATFORM: ::c_int = 12;
+pub const HW_SENSORS: ::c_int = 13;
+pub const HW_MAXID: ::c_int = 14;
+pub const USER_CS_PATH: ::c_int = 1;
+pub const USER_BC_BASE_MAX: ::c_int = 2;
+pub const USER_BC_DIM_MAX: ::c_int = 3;
+pub const USER_BC_SCALE_MAX: ::c_int = 4;
+pub const USER_BC_STRING_MAX: ::c_int = 5;
+pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6;
+pub const USER_EXPR_NEST_MAX: ::c_int = 7;
+pub const USER_LINE_MAX: ::c_int = 8;
+pub const USER_RE_DUP_MAX: ::c_int = 9;
+pub const USER_POSIX2_VERSION: ::c_int = 10;
+pub const USER_POSIX2_C_BIND: ::c_int = 11;
+pub const USER_POSIX2_C_DEV: ::c_int = 12;
+pub const USER_POSIX2_CHAR_TERM: ::c_int = 13;
+pub const USER_POSIX2_FORT_DEV: ::c_int = 14;
+pub const USER_POSIX2_FORT_RUN: ::c_int = 15;
+pub const USER_POSIX2_LOCALEDEF: ::c_int = 16;
+pub const USER_POSIX2_SW_DEV: ::c_int = 17;
+pub const USER_POSIX2_UPE: ::c_int = 18;
+pub const USER_STREAM_MAX: ::c_int = 19;
+pub const USER_TZNAME_MAX: ::c_int = 20;
+pub const USER_MAXID: ::c_int = 21;
+pub const CTL_P1003_1B_ASYNCHRONOUS_IO: ::c_int = 1;
+pub const CTL_P1003_1B_MAPPED_FILES: ::c_int = 2;
+pub const CTL_P1003_1B_MEMLOCK: ::c_int = 3;
+pub const CTL_P1003_1B_MEMLOCK_RANGE: ::c_int = 4;
+pub const CTL_P1003_1B_MEMORY_PROTECTION: ::c_int = 5;
+pub const CTL_P1003_1B_MESSAGE_PASSING: ::c_int = 6;
+pub const CTL_P1003_1B_PRIORITIZED_IO: ::c_int = 7;
+pub const CTL_P1003_1B_PRIORITY_SCHEDULING: ::c_int = 8;
+pub const CTL_P1003_1B_REALTIME_SIGNALS: ::c_int = 9;
+pub const CTL_P1003_1B_SEMAPHORES: ::c_int = 10;
+pub const CTL_P1003_1B_FSYNC: ::c_int = 11;
+pub const CTL_P1003_1B_SHARED_MEMORY_OBJECTS: ::c_int = 12;
+pub const CTL_P1003_1B_SYNCHRONIZED_IO: ::c_int = 13;
+pub const CTL_P1003_1B_TIMERS: ::c_int = 14;
+pub const CTL_P1003_1B_AIO_LISTIO_MAX: ::c_int = 15;
+pub const CTL_P1003_1B_AIO_MAX: ::c_int = 16;
+pub const CTL_P1003_1B_AIO_PRIO_DELTA_MAX: ::c_int = 17;
+pub const CTL_P1003_1B_DELAYTIMER_MAX: ::c_int = 18;
+pub const CTL_P1003_1B_UNUSED1: ::c_int = 19;
+pub const CTL_P1003_1B_PAGESIZE: ::c_int = 20;
+pub const CTL_P1003_1B_RTSIG_MAX: ::c_int = 21;
+pub const CTL_P1003_1B_SEM_NSEMS_MAX: ::c_int = 22;
+pub const CTL_P1003_1B_SEM_VALUE_MAX: ::c_int = 23;
+pub const CTL_P1003_1B_SIGQUEUE_MAX: ::c_int = 24;
+pub const CTL_P1003_1B_TIMER_MAX: ::c_int = 25;
+pub const CTL_P1003_1B_MAXID: ::c_int = 26;
+
+pub const EVFILT_READ: ::int16_t = -1;
+pub const EVFILT_WRITE: ::int16_t = -2;
+pub const EVFILT_AIO: ::int16_t = -3;
+pub const EVFILT_VNODE: ::int16_t = -4;
+pub const EVFILT_PROC: ::int16_t = -5;
+pub const EVFILT_SIGNAL: ::int16_t = -6;
+pub const EVFILT_TIMER: ::int16_t = -7;
+pub const EVFILT_EXCEPT: ::int16_t = -8;
+pub const EVFILT_USER: ::int16_t = -9;
+pub const EVFILT_FS: ::int16_t = -10;
+
+pub const EV_ADD: ::uint16_t = 0x1;
+pub const EV_DELETE: ::uint16_t = 0x2;
+pub const EV_ENABLE: ::uint16_t = 0x4;
+pub const EV_DISABLE: ::uint16_t = 0x8;
+pub const EV_ONESHOT: ::uint16_t = 0x10;
+pub const EV_CLEAR: ::uint16_t = 0x20;
+pub const EV_RECEIPT: ::uint16_t = 0x40;
+pub const EV_DISPATCH: ::uint16_t = 0x80;
+pub const EV_NODATA: ::uint16_t = 0x1000;
+pub const EV_FLAG1: ::uint16_t = 0x2000;
+pub const EV_ERROR: ::uint16_t = 0x4000;
+pub const EV_EOF: ::uint16_t = 0x8000;
+pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
+
+pub const NOTE_TRIGGER: ::uint32_t = 0x01000000;
+pub const NOTE_FFNOP: ::uint32_t = 0x00000000;
+pub const NOTE_FFAND: ::uint32_t = 0x40000000;
+pub const NOTE_FFOR: ::uint32_t = 0x80000000;
+pub const NOTE_FFCOPY: ::uint32_t = 0xc0000000;
+pub const NOTE_FFCTRLMASK: ::uint32_t = 0xc0000000;
+pub const NOTE_FFLAGSMASK: ::uint32_t = 0x00ffffff;
+pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
+pub const NOTE_OOB: ::uint32_t = 0x00000002;
+pub const NOTE_DELETE: ::uint32_t = 0x00000001;
+pub const NOTE_WRITE: ::uint32_t = 0x00000002;
+pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
+pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
+pub const NOTE_LINK: ::uint32_t = 0x00000010;
+pub const NOTE_RENAME: ::uint32_t = 0x00000020;
+pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
+pub const NOTE_EXIT: ::uint32_t = 0x80000000;
+pub const NOTE_FORK: ::uint32_t = 0x40000000;
+pub const NOTE_EXEC: ::uint32_t = 0x20000000;
+pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
+pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
+pub const NOTE_TRACK: ::uint32_t = 0x00000001;
+pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
+pub const NOTE_CHILD: ::uint32_t = 0x00000004;
+
+pub const SO_SNDSPACE: ::c_int = 0x100a;
+pub const SO_CPUHINT: ::c_int = 0x1030;
+
+pub const AF_BLUETOOTH: ::c_int = 33;
+pub const AF_MPLS: ::c_int = 34;
+pub const AF_IEEE80211: ::c_int = 35;
+pub const AF_MAX: ::c_int = 36;
+
+pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
+pub const PF_MAX: ::c_int = AF_MAX;
+
+pub const NET_RT_DUMP: ::c_int = 1;
+pub const NET_RT_FLAGS: ::c_int = 2;
+pub const NET_RT_IFLIST: ::c_int = 3;
+pub const NET_RT_MAXID: ::c_int = 4;
+
+pub const SOMAXOPT_SIZE: ::c_int = 65536;
+
+#[doc(hidden)]
+pub const NET_MAXID: ::c_int = AF_MAX;
+
+pub const MSG_UNUSED09: ::c_int = 0x00000200;
+pub const MSG_NOSIGNAL: ::c_int = 0x00000400;
+pub const MSG_SYNC: ::c_int = 0x00000800;
+pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00001000;
+pub const MSG_FBLOCKING: ::c_int = 0x00010000;
+pub const MSG_FNONBLOCKING: ::c_int = 0x00020000;
+pub const MSG_FMASK: ::c_int = 0xFFFF0000;
+
+pub const EMPTY: ::c_short = 0;
+pub const RUN_LVL: ::c_short = 1;
+pub const BOOT_TIME: ::c_short = 2;
+pub const OLD_TIME: ::c_short = 3;
+pub const NEW_TIME: ::c_short = 4;
+pub const INIT_PROCESS: ::c_short = 5;
+pub const LOGIN_PROCESS: ::c_short = 6;
+pub const USER_PROCESS: ::c_short = 7;
+pub const DEAD_PROCESS: ::c_short = 8;
+
+pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
+pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
+pub const LC_MONETARY_MASK: ::c_int = (1 << 2);
+pub const LC_NUMERIC_MASK: ::c_int = (1 << 3);
+pub const LC_TIME_MASK: ::c_int = (1 << 4);
+pub const LC_MESSAGES_MASK: ::c_int = (1 << 5);
+pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
+                               | LC_CTYPE_MASK
+                               | LC_MESSAGES_MASK
+                               | LC_MONETARY_MASK
+                               | LC_NUMERIC_MASK
+                               | LC_TIME_MASK;
+
+pub const TIOCSIG: ::c_uint = 0x2000745f;
+pub const BTUARTDISC: ::c_int = 0x7;
+pub const TIOCDCDTIMESTAMP: ::c_uint = 0x40107458;
+pub const TIOCISPTMASTER: ::c_uint = 0x20007455;
+pub const TIOCMODG: ::c_uint = 0x40047403;
+pub const TIOCMODS: ::c_ulong = 0x80047404;
+pub const TIOCREMOTE: ::c_ulong = 0x80047469;
+
+// Constants used by "at" family of system calls.
+pub const AT_FDCWD:            ::c_int = 0xFFFAFDCD; // invalid file descriptor
+pub const AT_SYMLINK_NOFOLLOW: ::c_int = 1;
+pub const AT_REMOVEDIR:        ::c_int = 2;
+pub const AT_EACCESS:          ::c_int = 4;
+pub const AT_SYMLINK_FOLLOW:   ::c_int = 8;
+
+pub const VCHECKPT: usize = 19;
+
+pub const _PC_2_SYMLINKS: ::c_int = 22;
+pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 23;
+
+pub const _SC_V7_ILP32_OFF32: ::c_int = 122;
+pub const _SC_V7_ILP32_OFFBIG: ::c_int = 123;
+pub const _SC_V7_LP64_OFF64: ::c_int = 124;
+pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 125;
+pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 126;
+pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 127;
+
+extern {
+    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
+                    -> ::c_int;
+    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+
+    pub fn setutxdb(_type: ::c_uint, file: *mut ::c_char) -> ::c_int;
+
+    pub fn aio_waitcomplete(iocbp: *mut *mut aiocb,
+                            timeout: *mut ::timespec) -> ::c_int;
+
+    pub fn freelocale(loc: ::locale_t);
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
@@ -0,0 +1,32 @@
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type time_t = i64;
+pub type suseconds_t = i64;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_size: ::off_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_blksize: ::blksize_t,
+        pub st_flags: ::fflags_t,
+        pub st_gen: ::uint32_t,
+        pub st_lspare: ::int32_t,
+        pub st_birthtime: ::time_t,
+        pub st_birthtime_nsec: ::c_long,
+    }
+}
+
+pub const MAP_32BIT: ::c_int = 0x00080000;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -0,0 +1,597 @@
+pub type fflags_t = u32;
+pub type clock_t = i32;
+pub type ino_t = u32;
+pub type lwpid_t = i32;
+pub type nlink_t = u16;
+pub type blksize_t = u32;
+pub type clockid_t = ::c_int;
+pub type sem_t = _sem;
+
+pub type fsblkcnt_t = ::uint64_t;
+pub type fsfilcnt_t = ::uint64_t;
+pub type idtype_t = ::c_uint;
+
+pub type key_t = ::c_long;
+pub type msglen_t = ::c_ulong;
+pub type msgqnum_t = ::c_ulong;
+
+s! {
+    pub struct utmpx {
+        pub ut_type: ::c_short,
+        pub ut_tv: ::timeval,
+        pub ut_id: [::c_char; 8],
+        pub ut_pid: ::pid_t,
+        pub ut_user: [::c_char; 32],
+        pub ut_line: [::c_char; 16],
+        pub ut_host: [::c_char; 128],
+        pub __ut_spare: [::c_char; 64],
+    }
+
+    pub struct aiocb {
+        pub aio_fildes: ::c_int,
+        pub aio_offset: ::off_t,
+        pub aio_buf: *mut ::c_void,
+        pub aio_nbytes: ::size_t,
+        __unused1: [::c_int; 2],
+        __unused2: *mut ::c_void,
+        pub aio_lio_opcode: ::c_int,
+        pub aio_reqprio: ::c_int,
+        // unused 3 through 5 are the __aiocb_private structure
+        __unused3: ::c_long,
+        __unused4: ::c_long,
+        __unused5: *mut ::c_void,
+        pub aio_sigevent: sigevent
+    }
+
+    pub struct dirent {
+        pub d_fileno: u32,
+        pub d_reclen: u16,
+        pub d_type: u8,
+        pub d_namlen: u8,
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct jail {
+        pub version: u32,
+        pub path: *mut ::c_char,
+        pub hostname: *mut ::c_char,
+        pub jailname: *mut ::c_char,
+        pub ip4s: ::c_uint,
+        pub ip6s: ::c_uint,
+        pub ip4: *mut ::in_addr,
+        pub ip6: *mut ::in6_addr,
+    }
+
+    pub struct sigevent {
+        pub sigev_notify: ::c_int,
+        pub sigev_signo: ::c_int,
+        pub sigev_value: ::sigval,
+        //The rest of the structure is actually a union.  We expose only
+        //sigev_notify_thread_id because it's the most useful union member.
+        pub sigev_notify_thread_id: ::lwpid_t,
+        #[cfg(target_pointer_width = "64")]
+        __unused1: ::c_int,
+        __unused2: [::c_long; 7]
+    }
+
+    pub struct statvfs {
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_favail: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_bsize: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_fsid: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+    }
+
+    // internal structure has changed over time
+    pub struct _sem {
+        data: [u32; 4],
+    }
+
+    pub struct ipc_perm {
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub mode: ::mode_t,
+        pub seq: ::c_ushort,
+        pub key: ::key_t,
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        __unused1: *mut ::c_void,
+        __unused2: *mut ::c_void,
+        pub msg_cbytes: ::msglen_t,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        pub msg_stime: ::time_t,
+        pub msg_rtime: ::time_t,
+        pub msg_ctime: ::time_t,
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_nattch: ::c_int,
+        pub shm_atime: ::time_t,
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+    }
+}
+
+pub const SIGEV_THREAD_ID: ::c_int = 4;
+
+pub const RAND_MAX: ::c_int = 0x7fff_fffd;
+pub const PTHREAD_STACK_MIN: ::size_t = 2048;
+pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 4;
+pub const SIGSTKSZ: ::size_t = 34816;
+pub const SF_NODISKIO: ::c_int = 0x00000001;
+pub const SF_MNOWAIT: ::c_int = 0x00000002;
+pub const SF_SYNC: ::c_int = 0x00000004;
+pub const O_CLOEXEC: ::c_int = 0x00100000;
+pub const O_DIRECTORY: ::c_int = 0x00020000;
+pub const O_EXEC: ::c_int = 0x00040000;
+pub const O_TTY_INIT: ::c_int = 0x00080000;
+pub const F_GETLK: ::c_int = 11;
+pub const F_SETLK: ::c_int = 12;
+pub const F_SETLKW: ::c_int = 13;
+pub const ELAST: ::c_int = 96;
+pub const RLIMIT_NPTS: ::c_int = 11;
+pub const RLIMIT_SWAP: ::c_int = 12;
+pub const RLIM_NLIMITS: ::rlim_t = 13;
+
+pub const Q_GETQUOTA: ::c_int = 0x700;
+pub const Q_SETQUOTA: ::c_int = 0x800;
+
+pub const POSIX_FADV_NORMAL: ::c_int = 0;
+pub const POSIX_FADV_RANDOM: ::c_int = 1;
+pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
+pub const POSIX_FADV_WILLNEED: ::c_int = 3;
+pub const POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
+
+pub const POLLINIGNEOF: ::c_short = 0x2000;
+
+pub const EVFILT_READ: ::int16_t = -1;
+pub const EVFILT_WRITE: ::int16_t = -2;
+pub const EVFILT_AIO: ::int16_t = -3;
+pub const EVFILT_VNODE: ::int16_t = -4;
+pub const EVFILT_PROC: ::int16_t = -5;
+pub const EVFILT_SIGNAL: ::int16_t = -6;
+pub const EVFILT_TIMER: ::int16_t = -7;
+pub const EVFILT_FS: ::int16_t = -9;
+pub const EVFILT_LIO: ::int16_t = -10;
+pub const EVFILT_USER: ::int16_t = -11;
+
+pub const EV_ADD: ::uint16_t = 0x1;
+pub const EV_DELETE: ::uint16_t = 0x2;
+pub const EV_ENABLE: ::uint16_t = 0x4;
+pub const EV_DISABLE: ::uint16_t = 0x8;
+pub const EV_ONESHOT: ::uint16_t = 0x10;
+pub const EV_CLEAR: ::uint16_t = 0x20;
+pub const EV_RECEIPT: ::uint16_t = 0x40;
+pub const EV_DISPATCH: ::uint16_t = 0x80;
+pub const EV_DROP: ::uint16_t = 0x1000;
+pub const EV_FLAG1: ::uint16_t = 0x2000;
+pub const EV_ERROR: ::uint16_t = 0x4000;
+pub const EV_EOF: ::uint16_t = 0x8000;
+pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
+
+pub const NOTE_TRIGGER: ::uint32_t = 0x01000000;
+pub const NOTE_FFNOP: ::uint32_t = 0x00000000;
+pub const NOTE_FFAND: ::uint32_t = 0x40000000;
+pub const NOTE_FFOR: ::uint32_t = 0x80000000;
+pub const NOTE_FFCOPY: ::uint32_t = 0xc0000000;
+pub const NOTE_FFCTRLMASK: ::uint32_t = 0xc0000000;
+pub const NOTE_FFLAGSMASK: ::uint32_t = 0x00ffffff;
+pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
+pub const NOTE_DELETE: ::uint32_t = 0x00000001;
+pub const NOTE_WRITE: ::uint32_t = 0x00000002;
+pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
+pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
+pub const NOTE_LINK: ::uint32_t = 0x00000010;
+pub const NOTE_RENAME: ::uint32_t = 0x00000020;
+pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
+pub const NOTE_EXIT: ::uint32_t = 0x80000000;
+pub const NOTE_FORK: ::uint32_t = 0x40000000;
+pub const NOTE_EXEC: ::uint32_t = 0x20000000;
+pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
+pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
+pub const NOTE_TRACK: ::uint32_t = 0x00000001;
+pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
+pub const NOTE_CHILD: ::uint32_t = 0x00000004;
+pub const NOTE_SECONDS: ::uint32_t = 0x00000001;
+pub const NOTE_MSECONDS: ::uint32_t = 0x00000002;
+pub const NOTE_USECONDS: ::uint32_t = 0x00000004;
+pub const NOTE_NSECONDS: ::uint32_t = 0x00000008;
+
+pub const MADV_PROTECT: ::c_int = 10;
+pub const RUSAGE_THREAD: ::c_int = 1;
+
+pub const CLOCK_REALTIME: ::clockid_t = 0;
+pub const CLOCK_VIRTUAL: ::clockid_t = 1;
+pub const CLOCK_PROF: ::clockid_t = 2;
+pub const CLOCK_MONOTONIC: ::clockid_t = 4;
+pub const CLOCK_UPTIME: ::clockid_t = 5;
+pub const CLOCK_UPTIME_PRECISE: ::clockid_t = 7;
+pub const CLOCK_UPTIME_FAST: ::clockid_t = 8;
+pub const CLOCK_REALTIME_PRECISE: ::clockid_t = 9;
+pub const CLOCK_REALTIME_FAST: ::clockid_t = 10;
+pub const CLOCK_MONOTONIC_PRECISE: ::clockid_t = 11;
+pub const CLOCK_MONOTONIC_FAST: ::clockid_t = 12;
+pub const CLOCK_SECOND: ::clockid_t = 13;
+pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 14;
+pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 15;
+
+pub const CTL_UNSPEC: ::c_int = 0;
+pub const CTL_KERN: ::c_int = 1;
+pub const CTL_VM: ::c_int = 2;
+pub const CTL_VFS: ::c_int = 3;
+pub const CTL_NET: ::c_int = 4;
+pub const CTL_DEBUG: ::c_int = 5;
+pub const CTL_HW: ::c_int = 6;
+pub const CTL_MACHDEP: ::c_int = 7;
+pub const CTL_USER: ::c_int = 8;
+pub const CTL_P1003_1B: ::c_int = 9;
+pub const KERN_OSTYPE: ::c_int = 1;
+pub const KERN_OSRELEASE: ::c_int = 2;
+pub const KERN_OSREV: ::c_int = 3;
+pub const KERN_VERSION: ::c_int = 4;
+pub const KERN_MAXVNODES: ::c_int = 5;
+pub const KERN_MAXPROC: ::c_int = 6;
+pub const KERN_MAXFILES: ::c_int = 7;
+pub const KERN_ARGMAX: ::c_int = 8;
+pub const KERN_SECURELVL: ::c_int = 9;
+pub const KERN_HOSTNAME: ::c_int = 10;
+pub const KERN_HOSTID: ::c_int = 11;
+pub const KERN_CLOCKRATE: ::c_int = 12;
+pub const KERN_VNODE: ::c_int = 13;
+pub const KERN_PROC: ::c_int = 14;
+pub const KERN_FILE: ::c_int = 15;
+pub const KERN_PROF: ::c_int = 16;
+pub const KERN_POSIX1: ::c_int = 17;
+pub const KERN_NGROUPS: ::c_int = 18;
+pub const KERN_JOB_CONTROL: ::c_int = 19;
+pub const KERN_SAVED_IDS: ::c_int = 20;
+pub const KERN_BOOTTIME: ::c_int = 21;
+pub const KERN_NISDOMAINNAME: ::c_int = 22;
+pub const KERN_UPDATEINTERVAL: ::c_int = 23;
+pub const KERN_OSRELDATE: ::c_int = 24;
+pub const KERN_NTP_PLL: ::c_int = 25;
+pub const KERN_BOOTFILE: ::c_int = 26;
+pub const KERN_MAXFILESPERPROC: ::c_int = 27;
+pub const KERN_MAXPROCPERUID: ::c_int = 28;
+pub const KERN_DUMPDEV: ::c_int = 29;
+pub const KERN_IPC: ::c_int = 30;
+pub const KERN_DUMMY: ::c_int = 31;
+pub const KERN_PS_STRINGS: ::c_int = 32;
+pub const KERN_USRSTACK: ::c_int = 33;
+pub const KERN_LOGSIGEXIT: ::c_int = 34;
+pub const KERN_IOV_MAX: ::c_int = 35;
+pub const KERN_HOSTUUID: ::c_int = 36;
+pub const KERN_ARND: ::c_int = 37;
+pub const KERN_PROC_ALL: ::c_int = 0;
+pub const KERN_PROC_PID: ::c_int = 1;
+pub const KERN_PROC_PGRP: ::c_int = 2;
+pub const KERN_PROC_SESSION: ::c_int = 3;
+pub const KERN_PROC_TTY: ::c_int = 4;
+pub const KERN_PROC_UID: ::c_int = 5;
+pub const KERN_PROC_RUID: ::c_int = 6;
+pub const KERN_PROC_ARGS: ::c_int = 7;
+pub const KERN_PROC_PROC: ::c_int = 8;
+pub const KERN_PROC_SV_NAME: ::c_int = 9;
+pub const KERN_PROC_RGID: ::c_int = 10;
+pub const KERN_PROC_GID: ::c_int = 11;
+pub const KERN_PROC_PATHNAME: ::c_int = 12;
+pub const KERN_PROC_OVMMAP: ::c_int = 13;
+pub const KERN_PROC_OFILEDESC: ::c_int = 14;
+pub const KERN_PROC_KSTACK: ::c_int = 15;
+pub const KERN_PROC_INC_THREAD: ::c_int = 0x10;
+pub const KERN_PROC_VMMAP: ::c_int = 32;
+pub const KERN_PROC_FILEDESC: ::c_int = 33;
+pub const KERN_PROC_GROUPS: ::c_int = 34;
+pub const KERN_PROC_ENV: ::c_int = 35;
+pub const KERN_PROC_AUXV: ::c_int = 36;
+pub const KERN_PROC_RLIMIT: ::c_int = 37;
+pub const KERN_PROC_PS_STRINGS: ::c_int = 38;
+pub const KERN_PROC_UMASK: ::c_int = 39;
+pub const KERN_PROC_OSREL: ::c_int = 40;
+pub const KERN_PROC_SIGTRAMP: ::c_int = 41;
+pub const KIPC_MAXSOCKBUF: ::c_int = 1;
+pub const KIPC_SOCKBUF_WASTE: ::c_int = 2;
+pub const KIPC_SOMAXCONN: ::c_int = 3;
+pub const KIPC_MAX_LINKHDR: ::c_int = 4;
+pub const KIPC_MAX_PROTOHDR: ::c_int = 5;
+pub const KIPC_MAX_HDR: ::c_int = 6;
+pub const KIPC_MAX_DATALEN: ::c_int = 7;
+pub const HW_MACHINE: ::c_int = 1;
+pub const HW_MODEL: ::c_int = 2;
+pub const HW_NCPU: ::c_int = 3;
+pub const HW_BYTEORDER: ::c_int = 4;
+pub const HW_PHYSMEM: ::c_int = 5;
+pub const HW_USERMEM: ::c_int = 6;
+pub const HW_PAGESIZE: ::c_int = 7;
+pub const HW_DISKNAMES: ::c_int = 8;
+pub const HW_DISKSTATS: ::c_int = 9;
+pub const HW_FLOATINGPT: ::c_int = 10;
+pub const HW_MACHINE_ARCH: ::c_int = 11;
+pub const HW_REALMEM: ::c_int = 12;
+pub const USER_CS_PATH: ::c_int = 1;
+pub const USER_BC_BASE_MAX: ::c_int = 2;
+pub const USER_BC_DIM_MAX: ::c_int = 3;
+pub const USER_BC_SCALE_MAX: ::c_int = 4;
+pub const USER_BC_STRING_MAX: ::c_int = 5;
+pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6;
+pub const USER_EXPR_NEST_MAX: ::c_int = 7;
+pub const USER_LINE_MAX: ::c_int = 8;
+pub const USER_RE_DUP_MAX: ::c_int = 9;
+pub const USER_POSIX2_VERSION: ::c_int = 10;
+pub const USER_POSIX2_C_BIND: ::c_int = 11;
+pub const USER_POSIX2_C_DEV: ::c_int = 12;
+pub const USER_POSIX2_CHAR_TERM: ::c_int = 13;
+pub const USER_POSIX2_FORT_DEV: ::c_int = 14;
+pub const USER_POSIX2_FORT_RUN: ::c_int = 15;
+pub const USER_POSIX2_LOCALEDEF: ::c_int = 16;
+pub const USER_POSIX2_SW_DEV: ::c_int = 17;
+pub const USER_POSIX2_UPE: ::c_int = 18;
+pub const USER_STREAM_MAX: ::c_int = 19;
+pub const USER_TZNAME_MAX: ::c_int = 20;
+pub const CTL_P1003_1B_ASYNCHRONOUS_IO: ::c_int = 1;
+pub const CTL_P1003_1B_MAPPED_FILES: ::c_int = 2;
+pub const CTL_P1003_1B_MEMLOCK: ::c_int = 3;
+pub const CTL_P1003_1B_MEMLOCK_RANGE: ::c_int = 4;
+pub const CTL_P1003_1B_MEMORY_PROTECTION: ::c_int = 5;
+pub const CTL_P1003_1B_MESSAGE_PASSING: ::c_int = 6;
+pub const CTL_P1003_1B_PRIORITIZED_IO: ::c_int = 7;
+pub const CTL_P1003_1B_PRIORITY_SCHEDULING: ::c_int = 8;
+pub const CTL_P1003_1B_REALTIME_SIGNALS: ::c_int = 9;
+pub const CTL_P1003_1B_SEMAPHORES: ::c_int = 10;
+pub const CTL_P1003_1B_FSYNC: ::c_int = 11;
+pub const CTL_P1003_1B_SHARED_MEMORY_OBJECTS: ::c_int = 12;
+pub const CTL_P1003_1B_SYNCHRONIZED_IO: ::c_int = 13;
+pub const CTL_P1003_1B_TIMERS: ::c_int = 14;
+pub const CTL_P1003_1B_AIO_LISTIO_MAX: ::c_int = 15;
+pub const CTL_P1003_1B_AIO_MAX: ::c_int = 16;
+pub const CTL_P1003_1B_AIO_PRIO_DELTA_MAX: ::c_int = 17;
+pub const CTL_P1003_1B_DELAYTIMER_MAX: ::c_int = 18;
+pub const CTL_P1003_1B_MQ_OPEN_MAX: ::c_int = 19;
+pub const CTL_P1003_1B_PAGESIZE: ::c_int = 20;
+pub const CTL_P1003_1B_RTSIG_MAX: ::c_int = 21;
+pub const CTL_P1003_1B_SEM_NSEMS_MAX: ::c_int = 22;
+pub const CTL_P1003_1B_SEM_VALUE_MAX: ::c_int = 23;
+pub const CTL_P1003_1B_SIGQUEUE_MAX: ::c_int = 24;
+pub const CTL_P1003_1B_TIMER_MAX: ::c_int = 25;
+pub const TIOCGPTN: ::c_uint = 0x4004740f;
+pub const TIOCPTMASTER: ::c_uint = 0x2000741c;
+pub const TIOCSIG: ::c_uint = 0x2004745f;
+pub const TIOCM_DCD: ::c_int = 0x40;
+pub const H4DISC: ::c_int = 0x7;
+
+pub const JAIL_API_VERSION: u32 = 2;
+pub const JAIL_CREATE: ::c_int = 0x01;
+pub const JAIL_UPDATE: ::c_int = 0x02;
+pub const JAIL_ATTACH: ::c_int = 0x04;
+pub const JAIL_DYING: ::c_int = 0x08;
+pub const JAIL_SET_MASK: ::c_int = 0x0f;
+pub const JAIL_GET_MASK: ::c_int = 0x08;
+pub const JAIL_SYS_DISABLE: ::c_int = 0;
+pub const JAIL_SYS_NEW: ::c_int = 1;
+pub const JAIL_SYS_INHERIT: ::c_int = 2;
+
+pub const SO_BINTIME: ::c_int = 0x2000;
+pub const SO_NO_OFFLOAD: ::c_int = 0x4000;
+pub const SO_NO_DDP: ::c_int = 0x8000;
+pub const SO_LABEL: ::c_int = 0x1009;
+pub const SO_PEERLABEL: ::c_int = 0x1010;
+pub const SO_LISTENQLIMIT: ::c_int = 0x1011;
+pub const SO_LISTENQLEN: ::c_int = 0x1012;
+pub const SO_LISTENINCQLEN: ::c_int = 0x1013;
+pub const SO_SETFIB: ::c_int = 0x1014;
+pub const SO_USER_COOKIE: ::c_int = 0x1015;
+pub const SO_PROTOCOL: ::c_int = 0x1016;
+pub const SO_PROTOTYPE: ::c_int = SO_PROTOCOL;
+pub const SO_VENDOR: ::c_int = 0x80000000;
+
+pub const AF_SLOW: ::c_int = 33;
+pub const AF_SCLUSTER: ::c_int = 34;
+pub const AF_ARP: ::c_int = 35;
+pub const AF_BLUETOOTH: ::c_int = 36;
+pub const AF_IEEE80211: ::c_int = 37;
+pub const AF_INET_SDP: ::c_int = 40;
+pub const AF_INET6_SDP: ::c_int = 42;
+#[doc(hidden)]
+pub const AF_MAX: ::c_int = 42;
+
+pub const IPPROTO_DIVERT: ::c_int = 258;
+
+pub const PF_SLOW: ::c_int = AF_SLOW;
+pub const PF_SCLUSTER: ::c_int = AF_SCLUSTER;
+pub const PF_ARP: ::c_int = AF_ARP;
+pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
+pub const PF_IEEE80211: ::c_int = AF_IEEE80211;
+pub const PF_INET_SDP: ::c_int = AF_INET_SDP;
+pub const PF_INET6_SDP: ::c_int = AF_INET6_SDP;
+#[doc(hidden)]
+pub const PF_MAX: ::c_int = AF_MAX;
+
+pub const NET_RT_DUMP: ::c_int = 1;
+pub const NET_RT_FLAGS: ::c_int = 2;
+pub const NET_RT_IFLIST: ::c_int = 3;
+pub const NET_RT_IFMALIST: ::c_int = 4;
+pub const NET_RT_IFLISTL: ::c_int = 5;
+
+// System V IPC
+pub const IPC_PRIVATE: ::key_t = 0;
+pub const IPC_CREAT: ::c_int = 0o1000;
+pub const IPC_EXCL: ::c_int = 0o2000;
+pub const IPC_NOWAIT: ::c_int = 0o4000;
+pub const IPC_RMID: ::c_int = 0;
+pub const IPC_SET: ::c_int = 1;
+pub const IPC_STAT: ::c_int = 2;
+pub const IPC_INFO: ::c_int = 3;
+pub const IPC_R : ::c_int = 0o400;
+pub const IPC_W : ::c_int = 0o200;
+pub const IPC_M : ::c_int = 0o10000;
+pub const MSG_NOERROR: ::c_int = 0o10000;
+pub const SHM_RDONLY: ::c_int = 0o10000;
+pub const SHM_RND: ::c_int = 0o20000;
+pub const SHM_R: ::c_int = 0o400;
+pub const SHM_W: ::c_int = 0o200;
+pub const SHM_LOCK: ::c_int = 11;
+pub const SHM_UNLOCK: ::c_int = 12;
+pub const SHM_STAT: ::c_int = 13;
+pub const SHM_INFO: ::c_int = 14;
+
+// The *_MAXID constants never should've been used outside of the
+// FreeBSD base system.  And with the exception of CTL_P1003_1B_MAXID,
+// they were all removed in svn r262489.  They remain here for backwards
+// compatibility only, and are scheduled to be removed in libc 1.0.0.
+#[doc(hidden)]
+pub const NET_MAXID: ::c_int = AF_MAX;
+#[doc(hidden)]
+pub const CTL_MAXID: ::c_int = 10;
+#[doc(hidden)]
+pub const KERN_MAXID: ::c_int = 38;
+#[doc(hidden)]
+pub const HW_MAXID: ::c_int = 13;
+#[doc(hidden)]
+pub const USER_MAXID: ::c_int = 21;
+#[doc(hidden)]
+pub const CTL_P1003_1B_MAXID: ::c_int = 26;
+
+pub const MSG_NOTIFICATION: ::c_int = 0x00002000;
+pub const MSG_NBIO: ::c_int = 0x00004000;
+pub const MSG_COMPAT: ::c_int = 0x00008000;
+pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00040000;
+pub const MSG_NOSIGNAL: ::c_int = 0x20000;
+
+pub const EMPTY: ::c_short = 0;
+pub const BOOT_TIME: ::c_short = 1;
+pub const OLD_TIME: ::c_short = 2;
+pub const NEW_TIME: ::c_short = 3;
+pub const USER_PROCESS: ::c_short = 4;
+pub const INIT_PROCESS: ::c_short = 5;
+pub const LOGIN_PROCESS: ::c_short = 6;
+pub const DEAD_PROCESS: ::c_short = 7;
+pub const SHUTDOWN_TIME: ::c_short = 8;
+
+pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
+pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
+pub const LC_MESSAGES_MASK: ::c_int = (1 << 2);
+pub const LC_MONETARY_MASK: ::c_int = (1 << 3);
+pub const LC_NUMERIC_MASK: ::c_int = (1 << 4);
+pub const LC_TIME_MASK: ::c_int = (1 << 5);
+pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
+                               | LC_CTYPE_MASK
+                               | LC_MESSAGES_MASK
+                               | LC_MONETARY_MASK
+                               | LC_NUMERIC_MASK
+                               | LC_TIME_MASK;
+
+pub const WSTOPPED: ::c_int = 2; // same as WUNTRACED
+pub const WCONTINUED: ::c_int = 4;
+pub const WNOWAIT: ::c_int = 8;
+pub const WEXITED: ::c_int = 16;
+pub const WTRAPPED: ::c_int = 32;
+
+// FreeBSD defines a great many more of these, we only expose the
+// standardized ones.
+pub const P_PID: idtype_t = 0;
+pub const P_PGID: idtype_t = 2;
+pub const P_ALL: idtype_t = 7;
+
+pub const B460800: ::speed_t = 460800;
+pub const B921600: ::speed_t = 921600;
+
+pub const AT_FDCWD: ::c_int = -100;
+pub const AT_EACCESS: ::c_int = 0x100;
+pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
+pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
+pub const AT_REMOVEDIR: ::c_int = 0x800;
+
+pub const TABDLY: ::tcflag_t = 0x00000004;
+pub const TAB0: ::tcflag_t = 0x00000000;
+pub const TAB3: ::tcflag_t = 0x00000004;
+
+pub const _PC_ACL_NFS4: ::c_int = 64;
+
+pub const _SC_CPUSET_SIZE: ::c_int = 122;
+
+extern {
+    pub fn __error() -> *mut ::c_int;
+
+    pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
+                    -> ::c_int;
+
+    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+
+    pub fn jail(jail: *mut ::jail) -> ::c_int;
+    pub fn jail_attach(jid: ::c_int) -> ::c_int;
+    pub fn jail_remove(jid: ::c_int) -> ::c_int;
+    pub fn jail_get(iov: *mut ::iovec, niov: ::c_uint, flags: ::c_int)
+                    -> ::c_int;
+    pub fn jail_set(iov: *mut ::iovec, niov: ::c_uint, flags: ::c_int)
+                    -> ::c_int;
+
+    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
+                           len: ::off_t) -> ::c_int;
+    pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t,
+                         advise: ::c_int) -> ::c_int;
+    pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
+    pub fn mkostemps(template: *mut ::c_char,
+                     suffixlen: ::c_int,
+                     flags: ::c_int) -> ::c_int;
+
+    pub fn getutxuser(user: *const ::c_char) -> *mut utmpx;
+    pub fn setutxdb(_type: ::c_int, file: *const ::c_char) -> ::c_int;
+
+    pub fn aio_waitcomplete(iocbp: *mut *mut aiocb,
+                            timeout: *mut ::timespec) -> ::ssize_t;
+
+    pub fn freelocale(loc: ::locale_t) -> ::c_int;
+    pub fn waitid(idtype: idtype_t, id: ::id_t, infop: *mut ::siginfo_t,
+                  options: ::c_int) -> ::c_int;
+
+    pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
+    pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
+    pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void,
+        shmflg: ::c_int) -> *mut ::c_void;
+    pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int;
+    pub fn shmctl(shmid: ::c_int, cmd: ::c_int,
+        buf: *mut ::shmid_ds) -> ::c_int;
+    pub fn msgctl(msqid: ::c_int, cmd: ::c_int,
+        buf: *mut ::msqid_ds) -> ::c_int;
+    pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
+    pub fn msgrcv(msqid: ::c_int, msgp: *mut ::c_void, msgsz: ::size_t,
+        msgtyp: ::c_long, msgflg: ::c_int) -> ::c_int;
+    pub fn msgsnd(msqid: ::c_int, msgp: *const ::c_void, msgsz: ::size_t,
+        msgflg: ::c_int) -> ::c_int;
+    pub fn cfmakesane(termios: *mut ::termios);
+}
+
+cfg_if! {
+    if #[cfg(target_arch = "x86")] {
+        mod x86;
+        pub use self::x86::*;
+    } else if #[cfg(target_arch = "x86_64")] {
+        mod x86_64;
+        pub use self::x86_64::*;
+    } else if #[cfg(target_arch = "aarch64")] {
+        mod aarch64;
+        pub use self::aarch64::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/freebsdlike/freebsd/x86.rs
@@ -0,0 +1,31 @@
+pub type c_long = i32;
+pub type c_ulong = u32;
+pub type time_t = i32;
+pub type suseconds_t = i32;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_size: ::off_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_blksize: ::blksize_t,
+        pub st_flags: ::fflags_t,
+        pub st_gen: ::uint32_t,
+        pub st_lspare: ::int32_t,
+        pub st_birthtime: ::time_t,
+        pub st_birthtime_nsec: ::c_long,
+        __unused: [u8; 8],
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/freebsdlike/freebsd/x86_64.rs
@@ -0,0 +1,32 @@
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type time_t = i64;
+pub type suseconds_t = i64;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_size: ::off_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_blksize: ::blksize_t,
+        pub st_flags: ::fflags_t,
+        pub st_gen: ::uint32_t,
+        pub st_lspare: ::int32_t,
+        pub st_birthtime: ::time_t,
+        pub st_birthtime_nsec: ::c_long,
+    }
+}
+
+pub const MAP_32BIT: ::c_int = 0x00080000;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/freebsdlike/mod.rs
@@ -0,0 +1,1125 @@
+pub type dev_t = u32;
+pub type mode_t = u16;
+pub type pthread_attr_t = *mut ::c_void;
+pub type rlim_t = i64;
+pub type pthread_mutex_t = *mut ::c_void;
+pub type pthread_mutexattr_t = *mut ::c_void;
+pub type pthread_cond_t = *mut ::c_void;
+pub type pthread_condattr_t = *mut ::c_void;
+pub type pthread_rwlock_t = *mut ::c_void;
+pub type pthread_rwlockattr_t = *mut ::c_void;
+pub type pthread_key_t = ::c_int;
+pub type tcflag_t = ::c_uint;
+pub type speed_t = ::c_uint;
+pub type nl_item = ::c_int;
+pub type id_t = i64;
+
+pub enum timezone {}
+
+s! {
+    pub struct glob_t {
+        pub gl_pathc:  ::size_t,
+        pub gl_matchc: ::size_t,
+        pub gl_offs:   ::size_t,
+        pub gl_flags:  ::c_int,
+        pub gl_pathv:  *mut *mut ::c_char,
+        __unused3: *mut ::c_void,
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+        __unused6: *mut ::c_void,
+        __unused7: *mut ::c_void,
+        __unused8: *mut ::c_void,
+    }
+
+    pub struct kevent {
+        pub ident: ::uintptr_t,
+        pub filter: ::c_short,
+        pub flags: ::c_ushort,
+        pub fflags: ::c_uint,
+        pub data: ::intptr_t,
+        pub udata: *mut ::c_void,
+    }
+
+    pub struct sockaddr_storage {
+        pub ss_len: u8,
+        pub ss_family: ::sa_family_t,
+        __ss_pad1: [u8; 6],
+        __ss_align: i64,
+        __ss_pad2: [u8; 112],
+    }
+
+    pub struct addrinfo {
+        pub ai_flags: ::c_int,
+        pub ai_family: ::c_int,
+        pub ai_socktype: ::c_int,
+        pub ai_protocol: ::c_int,
+        pub ai_addrlen: ::socklen_t,
+        pub ai_canonname: *mut ::c_char,
+        pub ai_addr: *mut ::sockaddr,
+        pub ai_next: *mut addrinfo,
+    }
+
+    pub struct sigset_t {
+        bits: [u32; 4],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_errno: ::c_int,
+        pub si_code: ::c_int,
+        pub si_pid: ::pid_t,
+        pub si_uid: ::uid_t,
+        pub si_status: ::c_int,
+        pub si_addr: *mut ::c_void,
+        _pad: [::c_int; 12],
+    }
+
+    pub struct sigaction {
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_flags: ::c_int,
+        pub sa_mask: sigset_t,
+    }
+
+    pub struct stack_t {
+        // In FreeBSD 11 and later, ss_sp is actually a void*
+        pub ss_sp: *mut ::c_char,
+        pub ss_size: ::size_t,
+        pub ss_flags: ::c_int,
+    }
+
+    pub struct sched_param {
+        pub sched_priority: ::c_int,
+    }
+
+    pub struct Dl_info {
+        pub dli_fname: *const ::c_char,
+        pub dli_fbase: *mut ::c_void,
+        pub dli_sname: *const ::c_char,
+        pub dli_saddr: *mut ::c_void,
+    }
+
+    pub struct sockaddr_in {
+        pub sin_len: u8,
+        pub sin_family: ::sa_family_t,
+        pub sin_port: ::in_port_t,
+        pub sin_addr: ::in_addr,
+        pub sin_zero: [::c_char; 8],
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_cc: [::cc_t; ::NCCS],
+        pub c_ispeed: ::speed_t,
+        pub c_ospeed: ::speed_t,
+    }
+
+    pub struct flock {
+        pub l_start: ::off_t,
+        pub l_len: ::off_t,
+        pub l_pid: ::pid_t,
+        pub l_type: ::c_short,
+        pub l_whence: ::c_short,
+        #[cfg(not(target_os = "dragonfly"))]
+        pub l_sysid: ::c_int,
+    }
+
+    pub struct sf_hdtr {
+        pub headers: *mut ::iovec,
+        pub hdr_cnt: ::c_int,
+        pub trailers: *mut ::iovec,
+        pub trl_cnt: ::c_int,
+    }
+
+    pub struct lconv {
+        pub decimal_point: *mut ::c_char,
+        pub thousands_sep: *mut ::c_char,
+        pub grouping: *mut ::c_char,
+        pub int_curr_symbol: *mut ::c_char,
+        pub currency_symbol: *mut ::c_char,
+        pub mon_decimal_point: *mut ::c_char,
+        pub mon_thousands_sep: *mut ::c_char,
+        pub mon_grouping: *mut ::c_char,
+        pub positive_sign: *mut ::c_char,
+        pub negative_sign: *mut ::c_char,
+        pub int_frac_digits: ::c_char,
+        pub frac_digits: ::c_char,
+        pub p_cs_precedes: ::c_char,
+        pub p_sep_by_space: ::c_char,
+        pub n_cs_precedes: ::c_char,
+        pub n_sep_by_space: ::c_char,
+        pub p_sign_posn: ::c_char,
+        pub n_sign_posn: ::c_char,
+        pub int_p_cs_precedes: ::c_char,
+        pub int_n_cs_precedes: ::c_char,
+        pub int_p_sep_by_space: ::c_char,
+        pub int_n_sep_by_space: ::c_char,
+        pub int_p_sign_posn: ::c_char,
+        pub int_n_sign_posn: ::c_char,
+    }
+}
+
+pub const AIO_LISTIO_MAX: ::c_int = 16;
+pub const AIO_CANCELED: ::c_int = 1;
+pub const AIO_NOTCANCELED: ::c_int = 2;
+pub const AIO_ALLDONE: ::c_int = 3;
+pub const LIO_NOP: ::c_int = 0;
+pub const LIO_WRITE: ::c_int = 1;
+pub const LIO_READ: ::c_int = 2;
+pub const LIO_WAIT: ::c_int = 1;
+pub const LIO_NOWAIT: ::c_int = 0;
+
+pub const SIGEV_NONE: ::c_int = 0;
+pub const SIGEV_SIGNAL: ::c_int = 1;
+pub const SIGEV_THREAD: ::c_int = 2;
+pub const SIGEV_KEVENT: ::c_int = 3;
+
+pub const CODESET: ::nl_item = 0;
+pub const D_T_FMT: ::nl_item = 1;
+pub const D_FMT: ::nl_item = 2;
+pub const T_FMT: ::nl_item = 3;
+pub const T_FMT_AMPM: ::nl_item = 4;
+pub const AM_STR: ::nl_item = 5;
+pub const PM_STR: ::nl_item = 6;
+
+pub const DAY_1: ::nl_item = 7;
+pub const DAY_2: ::nl_item = 8;
+pub const DAY_3: ::nl_item = 9;
+pub const DAY_4: ::nl_item = 10;
+pub const DAY_5: ::nl_item = 11;
+pub const DAY_6: ::nl_item = 12;
+pub const DAY_7: ::nl_item = 13;
+
+pub const ABDAY_1: ::nl_item = 14;
+pub const ABDAY_2: ::nl_item = 15;
+pub const ABDAY_3: ::nl_item = 16;
+pub const ABDAY_4: ::nl_item = 17;
+pub const ABDAY_5: ::nl_item = 18;
+pub const ABDAY_6: ::nl_item = 19;
+pub const ABDAY_7: ::nl_item = 20;
+
+pub const MON_1: ::nl_item = 21;
+pub const MON_2: ::nl_item = 22;
+pub const MON_3: ::nl_item = 23;
+pub const MON_4: ::nl_item = 24;
+pub const MON_5: ::nl_item = 25;
+pub const MON_6: ::nl_item = 26;
+pub const MON_7: ::nl_item = 27;
+pub const MON_8: ::nl_item = 28;
+pub const MON_9: ::nl_item = 29;
+pub const MON_10: ::nl_item = 30;
+pub const MON_11: ::nl_item = 31;
+pub const MON_12: ::nl_item = 32;
+
+pub const ABMON_1: ::nl_item = 33;
+pub const ABMON_2: ::nl_item = 34;
+pub const ABMON_3: ::nl_item = 35;
+pub const ABMON_4: ::nl_item = 36;
+pub const ABMON_5: ::nl_item = 37;
+pub const ABMON_6: ::nl_item = 38;
+pub const ABMON_7: ::nl_item = 39;
+pub const ABMON_8: ::nl_item = 40;
+pub const ABMON_9: ::nl_item = 41;
+pub const ABMON_10: ::nl_item = 42;
+pub const ABMON_11: ::nl_item = 43;
+pub const ABMON_12: ::nl_item = 44;
+
+pub const ERA: ::nl_item = 45;
+pub const ERA_D_FMT: ::nl_item = 46;
+pub const ERA_D_T_FMT: ::nl_item = 47;
+pub const ERA_T_FMT: ::nl_item = 48;
+pub const ALT_DIGITS: ::nl_item = 49;
+
+pub const RADIXCHAR: ::nl_item = 50;
+pub const THOUSEP: ::nl_item = 51;
+
+pub const YESEXPR: ::nl_item = 52;
+pub const NOEXPR: ::nl_item = 53;
+
+pub const YESSTR: ::nl_item = 54;
+pub const NOSTR: ::nl_item = 55;
+
+pub const CRNCYSTR: ::nl_item = 56;
+
+pub const D_MD_ORDER: ::nl_item = 57;
+
+pub const ALTMON_1: ::nl_item = 58;
+pub const ALTMON_2: ::nl_item = 59;
+pub const ALTMON_3: ::nl_item = 60;
+pub const ALTMON_4: ::nl_item = 61;
+pub const ALTMON_5: ::nl_item = 62;
+pub const ALTMON_6: ::nl_item = 63;
+pub const ALTMON_7: ::nl_item = 64;
+pub const ALTMON_8: ::nl_item = 65;
+pub const ALTMON_9: ::nl_item = 66;
+pub const ALTMON_10: ::nl_item = 67;
+pub const ALTMON_11: ::nl_item = 68;
+pub const ALTMON_12: ::nl_item = 69;
+
+pub const EXIT_FAILURE: ::c_int = 1;
+pub const EXIT_SUCCESS: ::c_int = 0;
+pub const EOF: ::c_int = -1;
+pub const SEEK_SET: ::c_int = 0;
+pub const SEEK_CUR: ::c_int = 1;
+pub const SEEK_END: ::c_int = 2;
+pub const SEEK_DATA: ::c_int = 3;
+pub const SEEK_HOLE: ::c_int = 4;
+pub const _IOFBF: ::c_int = 0;
+pub const _IONBF: ::c_int = 2;
+pub const _IOLBF: ::c_int = 1;
+pub const BUFSIZ: ::c_uint = 1024;
+pub const FOPEN_MAX: ::c_uint = 20;
+pub const FILENAME_MAX: ::c_uint = 1024;
+pub const L_tmpnam: ::c_uint = 1024;
+pub const TMP_MAX: ::c_uint = 308915776;
+
+pub const O_NOCTTY: ::c_int = 32768;
+pub const O_DIRECT: ::c_int = 0x00010000;
+
+pub const S_IFIFO: mode_t = 4096;
+pub const S_IFCHR: mode_t = 8192;
+pub const S_IFBLK: mode_t = 24576;
+pub const S_IFDIR: mode_t = 16384;
+pub const S_IFREG: mode_t = 32768;
+pub const S_IFLNK: mode_t = 40960;
+pub const S_IFSOCK: mode_t = 49152;
+pub const S_IFMT: mode_t = 61440;
+pub const S_IEXEC: mode_t = 64;
+pub const S_IWRITE: mode_t = 128;
+pub const S_IREAD: mode_t = 256;
+pub const S_IRWXU: mode_t = 448;
+pub const S_IXUSR: mode_t = 64;
+pub const S_IWUSR: mode_t = 128;
+pub const S_IRUSR: mode_t = 256;
+pub const S_IRWXG: mode_t = 56;
+pub const S_IXGRP: mode_t = 8;
+pub const S_IWGRP: mode_t = 16;
+pub const S_IRGRP: mode_t = 32;
+pub const S_IRWXO: mode_t = 7;
+pub const S_IXOTH: mode_t = 1;
+pub const S_IWOTH: mode_t = 2;
+pub const S_IROTH: mode_t = 4;
+pub const F_OK: ::c_int = 0;
+pub const R_OK: ::c_int = 4;
+pub const W_OK: ::c_int = 2;
+pub const X_OK: ::c_int = 1;
+pub const STDIN_FILENO: ::c_int = 0;
+pub const STDOUT_FILENO: ::c_int = 1;
+pub const STDERR_FILENO: ::c_int = 2;
+pub const F_LOCK: ::c_int = 1;
+pub const F_TEST: ::c_int = 3;
+pub const F_TLOCK: ::c_int = 2;
+pub const F_ULOCK: ::c_int = 0;
+pub const F_DUPFD_CLOEXEC: ::c_int = 17;
+pub const SIGHUP: ::c_int = 1;
+pub const SIGINT: ::c_int = 2;
+pub const SIGQUIT: ::c_int = 3;
+pub const SIGILL: ::c_int = 4;
+pub const SIGABRT: ::c_int = 6;
+pub const SIGEMT: ::c_int = 7;
+pub const SIGFPE: ::c_int = 8;
+pub const SIGKILL: ::c_int = 9;
+pub const SIGSEGV: ::c_int = 11;
+pub const SIGPIPE: ::c_int = 13;
+pub const SIGALRM: ::c_int = 14;
+pub const SIGTERM: ::c_int = 15;
+
+pub const PROT_NONE: ::c_int = 0;
+pub const PROT_READ: ::c_int = 1;
+pub const PROT_WRITE: ::c_int = 2;
+pub const PROT_EXEC: ::c_int = 4;
+
+pub const MAP_FILE: ::c_int = 0x0000;
+pub const MAP_SHARED: ::c_int = 0x0001;
+pub const MAP_PRIVATE: ::c_int = 0x0002;
+pub const MAP_FIXED: ::c_int = 0x0010;
+pub const MAP_ANON: ::c_int = 0x1000;
+pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
+
+pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const MS_SYNC: ::c_int = 0x0000;
+pub const MS_ASYNC: ::c_int = 0x0001;
+pub const MS_INVALIDATE: ::c_int = 0x0002;
+
+pub const EPERM: ::c_int = 1;
+pub const ENOENT: ::c_int = 2;
+pub const ESRCH: ::c_int = 3;
+pub const EINTR: ::c_int = 4;
+pub const EIO: ::c_int = 5;
+pub const ENXIO: ::c_int = 6;
+pub const E2BIG: ::c_int = 7;
+pub const ENOEXEC: ::c_int = 8;
+pub const EBADF: ::c_int = 9;
+pub const ECHILD: ::c_int = 10;
+pub const EDEADLK: ::c_int = 11;
+pub const ENOMEM: ::c_int = 12;
+pub const EACCES: ::c_int = 13;
+pub const EFAULT: ::c_int = 14;
+pub const ENOTBLK: ::c_int = 15;
+pub const EBUSY: ::c_int = 16;
+pub const EEXIST: ::c_int = 17;
+pub const EXDEV: ::c_int = 18;
+pub const ENODEV: ::c_int = 19;
+pub const ENOTDIR: ::c_int = 20;
+pub const EISDIR: ::c_int = 21;
+pub const EINVAL: ::c_int = 22;
+pub const ENFILE: ::c_int = 23;
+pub const EMFILE: ::c_int = 24;
+pub const ENOTTY: ::c_int = 25;
+pub const ETXTBSY: ::c_int = 26;
+pub const EFBIG: ::c_int = 27;
+pub const ENOSPC: ::c_int = 28;
+pub const ESPIPE: ::c_int = 29;
+pub const EROFS: ::c_int = 30;
+pub const EMLINK: ::c_int = 31;
+pub const EPIPE: ::c_int = 32;
+pub const EDOM: ::c_int = 33;
+pub const ERANGE: ::c_int = 34;
+pub const EAGAIN: ::c_int = 35;
+pub const EWOULDBLOCK: ::c_int = 35;
+pub const EINPROGRESS: ::c_int = 36;
+pub const EALREADY: ::c_int = 37;
+pub const ENOTSOCK: ::c_int = 38;
+pub const EDESTADDRREQ: ::c_int = 39;
+pub const EMSGSIZE: ::c_int = 40;
+pub const EPROTOTYPE: ::c_int = 41;
+pub const ENOPROTOOPT: ::c_int = 42;
+pub const EPROTONOSUPPORT: ::c_int = 43;
+pub const ESOCKTNOSUPPORT: ::c_int = 44;
+pub const EOPNOTSUPP: ::c_int = 45;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 46;
+pub const EAFNOSUPPORT: ::c_int = 47;
+pub const EADDRINUSE: ::c_int = 48;
+pub const EADDRNOTAVAIL: ::c_int = 49;
+pub const ENETDOWN: ::c_int = 50;
+pub const ENETUNREACH: ::c_int = 51;
+pub const ENETRESET: ::c_int = 52;
+pub const ECONNABORTED: ::c_int = 53;
+pub const ECONNRESET: ::c_int = 54;
+pub const ENOBUFS: ::c_int = 55;
+pub const EISCONN: ::c_int = 56;
+pub const ENOTCONN: ::c_int = 57;
+pub const ESHUTDOWN: ::c_int = 58;
+pub const ETOOMANYREFS: ::c_int = 59;
+pub const ETIMEDOUT: ::c_int = 60;
+pub const ECONNREFUSED: ::c_int = 61;
+pub const ELOOP: ::c_int = 62;
+pub const ENAMETOOLONG: ::c_int = 63;
+pub const EHOSTDOWN: ::c_int = 64;
+pub const EHOSTUNREACH: ::c_int = 65;
+pub const ENOTEMPTY: ::c_int = 66;
+pub const EPROCLIM: ::c_int = 67;
+pub const EUSERS: ::c_int = 68;
+pub const EDQUOT: ::c_int = 69;
+pub const ESTALE: ::c_int = 70;
+pub const EREMOTE: ::c_int = 71;
+pub const EBADRPC: ::c_int = 72;
+pub const ERPCMISMATCH: ::c_int = 73;
+pub const EPROGUNAVAIL: ::c_int = 74;
+pub const EPROGMISMATCH: ::c_int = 75;
+pub const EPROCUNAVAIL: ::c_int = 76;
+pub const ENOLCK: ::c_int = 77;
+pub const ENOSYS: ::c_int = 78;
+pub const EFTYPE: ::c_int = 79;
+pub const EAUTH: ::c_int = 80;
+pub const ENEEDAUTH: ::c_int = 81;
+pub const EIDRM: ::c_int = 82;
+pub const ENOMSG: ::c_int = 83;
+pub const EOVERFLOW: ::c_int = 84;
+pub const ECANCELED: ::c_int = 85;
+pub const EILSEQ: ::c_int = 86;
+pub const ENOATTR: ::c_int = 87;
+pub const EDOOFUS: ::c_int = 88;
+pub const EBADMSG: ::c_int = 89;
+pub const EMULTIHOP: ::c_int = 90;
+pub const ENOLINK: ::c_int = 91;
+pub const EPROTO: ::c_int = 92;
+
+pub const POLLSTANDARD: ::c_short = ::POLLIN | ::POLLPRI | ::POLLOUT |
+    ::POLLRDNORM | ::POLLRDBAND | ::POLLWRBAND | ::POLLERR |
+    ::POLLHUP | ::POLLNVAL;
+
+pub const EAI_SYSTEM: ::c_int = 11;
+
+pub const F_DUPFD: ::c_int = 0;
+pub const F_GETFD: ::c_int = 1;
+pub const F_SETFD: ::c_int = 2;
+pub const F_GETFL: ::c_int = 3;
+pub const F_SETFL: ::c_int = 4;
+
+pub const SIGTRAP: ::c_int = 5;
+
+pub const GLOB_APPEND  : ::c_int = 0x0001;
+pub const GLOB_DOOFFS  : ::c_int = 0x0002;
+pub const GLOB_ERR     : ::c_int = 0x0004;
+pub const GLOB_MARK    : ::c_int = 0x0008;
+pub const GLOB_NOCHECK : ::c_int = 0x0010;
+pub const GLOB_NOSORT  : ::c_int = 0x0020;
+pub const GLOB_NOESCAPE: ::c_int = 0x2000;
+
+pub const GLOB_NOSPACE : ::c_int = -1;
+pub const GLOB_ABORTED : ::c_int = -2;
+pub const GLOB_NOMATCH : ::c_int = -3;
+
+pub const POSIX_MADV_NORMAL: ::c_int = 0;
+pub const POSIX_MADV_RANDOM: ::c_int = 1;
+pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
+pub const POSIX_MADV_WILLNEED: ::c_int = 3;
+pub const POSIX_MADV_DONTNEED: ::c_int = 4;
+
+pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
+pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
+pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
+pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
+
+pub const RLIMIT_CPU: ::c_int = 0;
+pub const RLIMIT_FSIZE: ::c_int = 1;
+pub const RLIMIT_DATA: ::c_int = 2;
+pub const RLIMIT_STACK: ::c_int = 3;
+pub const RLIMIT_CORE: ::c_int = 4;
+pub const RLIMIT_RSS: ::c_int = 5;
+pub const RLIMIT_MEMLOCK: ::c_int = 6;
+pub const RLIMIT_NPROC: ::c_int = 7;
+pub const RLIMIT_NOFILE: ::c_int = 8;
+pub const RLIMIT_SBSIZE: ::c_int = 9;
+pub const RLIMIT_VMEM: ::c_int = 10;
+pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM;
+pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff;
+
+pub const RUSAGE_SELF: ::c_int = 0;
+pub const RUSAGE_CHILDREN: ::c_int = -1;
+
+pub const MADV_NORMAL: ::c_int = 0;
+pub const MADV_RANDOM: ::c_int = 1;
+pub const MADV_SEQUENTIAL: ::c_int = 2;
+pub const MADV_WILLNEED: ::c_int = 3;
+pub const MADV_DONTNEED: ::c_int = 4;
+pub const MADV_FREE: ::c_int = 5;
+pub const MADV_NOSYNC: ::c_int = 6;
+pub const MADV_AUTOSYNC: ::c_int = 7;
+pub const MADV_NOCORE: ::c_int = 8;
+pub const MADV_CORE: ::c_int = 9;
+
+pub const MINCORE_INCORE: ::c_int =  0x1;
+pub const MINCORE_REFERENCED: ::c_int = 0x2;
+pub const MINCORE_MODIFIED: ::c_int = 0x4;
+pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8;
+pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10;
+pub const MINCORE_SUPER: ::c_int = 0x20;
+
+pub const AF_UNSPEC: ::c_int = 0;
+pub const AF_LOCAL: ::c_int = 1;
+pub const AF_UNIX: ::c_int = AF_LOCAL;
+pub const AF_INET: ::c_int = 2;
+pub const AF_IMPLINK: ::c_int = 3;
+pub const AF_PUP: ::c_int = 4;
+pub const AF_CHAOS: ::c_int = 5;
+pub const AF_NETBIOS: ::c_int = 6;
+pub const AF_ISO: ::c_int = 7;
+pub const AF_OSI: ::c_int = AF_ISO;
+pub const AF_ECMA: ::c_int = 8;
+pub const AF_DATAKIT: ::c_int = 9;
+pub const AF_CCITT: ::c_int = 10;
+pub const AF_SNA: ::c_int = 11;
+pub const AF_DECnet: ::c_int = 12;
+pub const AF_DLI: ::c_int = 13;
+pub const AF_LAT: ::c_int = 14;
+pub const AF_HYLINK: ::c_int = 15;
+pub const AF_APPLETALK: ::c_int = 16;
+pub const AF_ROUTE: ::c_int = 17;
+pub const AF_LINK: ::c_int = 18;
+pub const pseudo_AF_XTP: ::c_int = 19;
+pub const AF_COIP: ::c_int = 20;
+pub const AF_CNT: ::c_int = 21;
+pub const pseudo_AF_RTIP: ::c_int = 22;
+pub const AF_IPX: ::c_int = 23;
+pub const AF_SIP: ::c_int = 24;
+pub const pseudo_AF_PIP: ::c_int = 25;
+pub const AF_ISDN: ::c_int = 26;
+pub const AF_E164: ::c_int = AF_ISDN;
+pub const pseudo_AF_KEY: ::c_int = 27;
+pub const AF_INET6: ::c_int = 28;
+pub const AF_NATM: ::c_int = 29;
+pub const AF_ATM: ::c_int = 30;
+pub const pseudo_AF_HDRCMPLT: ::c_int = 31;
+pub const AF_NETGRAPH: ::c_int = 32;
+
+pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
+pub const PF_LOCAL: ::c_int = AF_LOCAL;
+pub const PF_UNIX: ::c_int = PF_LOCAL;
+pub const PF_INET: ::c_int = AF_INET;
+pub const PF_IMPLINK: ::c_int = AF_IMPLINK;
+pub const PF_PUP: ::c_int = AF_PUP;
+pub const PF_CHAOS: ::c_int = AF_CHAOS;
+pub const PF_NETBIOS: ::c_int = AF_NETBIOS;
+pub const PF_ISO: ::c_int = AF_ISO;
+pub const PF_OSI: ::c_int = AF_ISO;
+pub const PF_ECMA: ::c_int = AF_ECMA;
+pub const PF_DATAKIT: ::c_int = AF_DATAKIT;
+pub const PF_CCITT: ::c_int = AF_CCITT;
+pub const PF_SNA: ::c_int = AF_SNA;
+pub const PF_DECnet: ::c_int = AF_DECnet;
+pub const PF_DLI: ::c_int = AF_DLI;
+pub const PF_LAT: ::c_int = AF_LAT;
+pub const PF_HYLINK: ::c_int = AF_HYLINK;
+pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
+pub const PF_ROUTE: ::c_int = AF_ROUTE;
+pub const PF_LINK: ::c_int = AF_LINK;
+pub const PF_XTP: ::c_int = pseudo_AF_XTP;
+pub const PF_COIP: ::c_int = AF_COIP;
+pub const PF_CNT: ::c_int = AF_CNT;
+pub const PF_SIP: ::c_int = AF_SIP;
+pub const PF_IPX: ::c_int = AF_IPX;
+pub const PF_RTIP: ::c_int = pseudo_AF_RTIP;
+pub const PF_PIP: ::c_int = pseudo_AF_PIP;
+pub const PF_ISDN: ::c_int = AF_ISDN;
+pub const PF_KEY: ::c_int = pseudo_AF_KEY;
+pub const PF_INET6: ::c_int = AF_INET6;
+pub const PF_NATM: ::c_int = AF_NATM;
+pub const PF_ATM: ::c_int = AF_ATM;
+pub const PF_NETGRAPH: ::c_int = AF_NETGRAPH;
+
+pub const SOMAXCONN: ::c_int = 128;
+
+pub const MSG_OOB: ::c_int = 0x00000001;
+pub const MSG_PEEK: ::c_int = 0x00000002;
+pub const MSG_DONTROUTE: ::c_int = 0x00000004;
+pub const MSG_EOR: ::c_int =  0x00000008;
+pub const MSG_TRUNC: ::c_int = 0x00000010;
+pub const MSG_CTRUNC: ::c_int = 0x00000020;
+pub const MSG_WAITALL: ::c_int = 0x00000040;
+pub const MSG_DONTWAIT: ::c_int = 0x00000080;
+pub const MSG_EOF: ::c_int = 0x00000100;
+
+pub const SCM_TIMESTAMP: ::c_int = 0x02;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOCK_RAW: ::c_int = 3;
+pub const SOCK_RDM: ::c_int = 4;
+pub const SOCK_SEQPACKET: ::c_int = 5;
+pub const SOCK_CLOEXEC: ::c_int = 0x10000000;
+pub const SOCK_NONBLOCK: ::c_int = 0x20000000;
+pub const SOCK_MAXADDRLEN: ::c_int = 255;
+pub const IP_TTL: ::c_int = 4;
+pub const IP_HDRINCL: ::c_int = 2;
+pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
+pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
+pub const IPV6_JOIN_GROUP: ::c_int = 12;
+pub const IPV6_LEAVE_GROUP: ::c_int = 13;
+
+pub const TCP_NODELAY: ::c_int = 1;
+pub const TCP_KEEPIDLE: ::c_int = 256;
+pub const SOL_SOCKET: ::c_int = 0xffff;
+pub const SO_DEBUG: ::c_int = 0x01;
+pub const SO_ACCEPTCONN: ::c_int = 0x0002;
+pub const SO_REUSEADDR: ::c_int = 0x0004;
+pub const SO_KEEPALIVE: ::c_int = 0x0008;
+pub const SO_DONTROUTE: ::c_int = 0x0010;
+pub const SO_BROADCAST: ::c_int = 0x0020;
+pub const SO_USELOOPBACK: ::c_int = 0x0040;
+pub const SO_LINGER: ::c_int = 0x0080;
+pub const SO_OOBINLINE: ::c_int = 0x0100;
+pub const SO_REUSEPORT: ::c_int = 0x0200;
+pub const SO_TIMESTAMP: ::c_int = 0x0400;
+pub const SO_NOSIGPIPE: ::c_int = 0x0800;
+pub const SO_ACCEPTFILTER: ::c_int = 0x1000;
+pub const SO_SNDBUF: ::c_int = 0x1001;
+pub const SO_RCVBUF: ::c_int = 0x1002;
+pub const SO_SNDLOWAT: ::c_int = 0x1003;
+pub const SO_RCVLOWAT: ::c_int = 0x1004;
+pub const SO_SNDTIMEO: ::c_int = 0x1005;
+pub const SO_RCVTIMEO: ::c_int = 0x1006;
+pub const SO_ERROR: ::c_int = 0x1007;
+pub const SO_TYPE: ::c_int = 0x1008;
+
+pub const IFF_LOOPBACK: ::c_int = 0x8;
+
+pub const SHUT_RD: ::c_int = 0;
+pub const SHUT_WR: ::c_int = 1;
+pub const SHUT_RDWR: ::c_int = 2;
+
+pub const LOCK_SH: ::c_int = 1;
+pub const LOCK_EX: ::c_int = 2;
+pub const LOCK_NB: ::c_int = 4;
+pub const LOCK_UN: ::c_int = 8;
+
+pub const MAP_COPY: ::c_int = 0x0002;
+pub const MAP_RENAME: ::c_int = 0x0020;
+pub const MAP_NORESERVE: ::c_int = 0x0040;
+pub const MAP_HASSEMAPHORE: ::c_int = 0x0200;
+pub const MAP_STACK: ::c_int = 0x0400;
+pub const MAP_NOSYNC: ::c_int = 0x0800;
+pub const MAP_NOCORE: ::c_int = 0x020000;
+
+pub const IPPROTO_RAW: ::c_int = 255;
+
+pub const _PC_LINK_MAX: ::c_int = 1;
+pub const _PC_MAX_CANON: ::c_int = 2;
+pub const _PC_MAX_INPUT: ::c_int = 3;
+pub const _PC_NAME_MAX: ::c_int = 4;
+pub const _PC_PATH_MAX: ::c_int = 5;
+pub const _PC_PIPE_BUF: ::c_int = 6;
+pub const _PC_CHOWN_RESTRICTED: ::c_int = 7;
+pub const _PC_NO_TRUNC: ::c_int = 8;
+pub const _PC_VDISABLE: ::c_int = 9;
+pub const _PC_ALLOC_SIZE_MIN: ::c_int = 10;
+pub const _PC_FILESIZEBITS: ::c_int = 12;
+pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
+pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
+pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
+pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
+pub const _PC_SYMLINK_MAX: ::c_int = 18;
+pub const _PC_MIN_HOLE_SIZE: ::c_int = 21;
+pub const _PC_ASYNC_IO: ::c_int = 53;
+pub const _PC_PRIO_IO: ::c_int = 54;
+pub const _PC_SYNC_IO: ::c_int = 55;
+pub const _PC_ACL_EXTENDED: ::c_int = 59;
+pub const _PC_ACL_PATH_MAX: ::c_int = 60;
+pub const _PC_CAP_PRESENT: ::c_int = 61;
+pub const _PC_INF_PRESENT: ::c_int = 62;
+pub const _PC_MAC_PRESENT: ::c_int = 63;
+
+pub const _SC_ARG_MAX: ::c_int = 1;
+pub const _SC_CHILD_MAX: ::c_int = 2;
+pub const _SC_CLK_TCK: ::c_int = 3;
+pub const _SC_NGROUPS_MAX: ::c_int = 4;
+pub const _SC_OPEN_MAX: ::c_int = 5;
+pub const _SC_JOB_CONTROL: ::c_int = 6;
+pub const _SC_SAVED_IDS: ::c_int = 7;
+pub const _SC_VERSION: ::c_int = 8;
+pub const _SC_BC_BASE_MAX: ::c_int = 9;
+pub const _SC_BC_DIM_MAX: ::c_int = 10;
+pub const _SC_BC_SCALE_MAX: ::c_int = 11;
+pub const _SC_BC_STRING_MAX: ::c_int = 12;
+pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13;
+pub const _SC_EXPR_NEST_MAX: ::c_int = 14;
+pub const _SC_LINE_MAX: ::c_int = 15;
+pub const _SC_RE_DUP_MAX: ::c_int = 16;
+pub const _SC_2_VERSION: ::c_int = 17;
+pub const _SC_2_C_BIND: ::c_int = 18;
+pub const _SC_2_C_DEV: ::c_int = 19;
+pub const _SC_2_CHAR_TERM: ::c_int = 20;
+pub const _SC_2_FORT_DEV: ::c_int = 21;
+pub const _SC_2_FORT_RUN: ::c_int = 22;
+pub const _SC_2_LOCALEDEF: ::c_int = 23;
+pub const _SC_2_SW_DEV: ::c_int = 24;
+pub const _SC_2_UPE: ::c_int = 25;
+pub const _SC_STREAM_MAX: ::c_int = 26;
+pub const _SC_TZNAME_MAX: ::c_int = 27;
+pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28;
+pub const _SC_MAPPED_FILES: ::c_int = 29;
+pub const _SC_MEMLOCK: ::c_int = 30;
+pub const _SC_MEMLOCK_RANGE: ::c_int = 31;
+pub const _SC_MEMORY_PROTECTION: ::c_int = 32;
+pub const _SC_MESSAGE_PASSING: ::c_int = 33;
+pub const _SC_PRIORITIZED_IO: ::c_int = 34;
+pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35;
+pub const _SC_REALTIME_SIGNALS: ::c_int = 36;
+pub const _SC_SEMAPHORES: ::c_int = 37;
+pub const _SC_FSYNC: ::c_int = 38;
+pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39;
+pub const _SC_SYNCHRONIZED_IO: ::c_int = 40;
+pub const _SC_TIMERS: ::c_int = 41;
+pub const _SC_AIO_LISTIO_MAX: ::c_int = 42;
+pub const _SC_AIO_MAX: ::c_int = 43;
+pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44;
+pub const _SC_DELAYTIMER_MAX: ::c_int = 45;
+pub const _SC_MQ_OPEN_MAX: ::c_int = 46;
+pub const _SC_PAGESIZE: ::c_int = 47;
+pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
+pub const _SC_RTSIG_MAX: ::c_int = 48;
+pub const _SC_SEM_NSEMS_MAX: ::c_int = 49;
+pub const _SC_SEM_VALUE_MAX: ::c_int = 50;
+pub const _SC_SIGQUEUE_MAX: ::c_int = 51;
+pub const _SC_TIMER_MAX: ::c_int = 52;
+pub const _SC_IOV_MAX: ::c_int = 56;
+pub const _SC_NPROCESSORS_CONF: ::c_int = 57;
+pub const _SC_2_PBS: ::c_int = 59;
+pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60;
+pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61;
+pub const _SC_2_PBS_LOCATE: ::c_int = 62;
+pub const _SC_2_PBS_MESSAGE: ::c_int = 63;
+pub const _SC_2_PBS_TRACK: ::c_int = 64;
+pub const _SC_ADVISORY_INFO: ::c_int = 65;
+pub const _SC_BARRIERS: ::c_int = 66;
+pub const _SC_CLOCK_SELECTION: ::c_int = 67;
+pub const _SC_CPUTIME: ::c_int = 68;
+pub const _SC_FILE_LOCKING: ::c_int = 69;
+pub const _SC_NPROCESSORS_ONLN: ::c_int = 58;
+pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70;
+pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71;
+pub const _SC_HOST_NAME_MAX: ::c_int = 72;
+pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
+pub const _SC_MONOTONIC_CLOCK: ::c_int = 74;
+pub const _SC_MQ_PRIO_MAX: ::c_int = 75;
+pub const _SC_READER_WRITER_LOCKS: ::c_int = 76;
+pub const _SC_REGEXP: ::c_int = 77;
+pub const _SC_SHELL: ::c_int = 78;
+pub const _SC_SPAWN: ::c_int = 79;
+pub const _SC_SPIN_LOCKS: ::c_int = 80;
+pub const _SC_SPORADIC_SERVER: ::c_int = 81;
+pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82;
+pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85;
+pub const _SC_THREAD_KEYS_MAX: ::c_int = 86;
+pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87;
+pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88;
+pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89;
+pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90;
+pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91;
+pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92;
+pub const _SC_THREAD_STACK_MIN: ::c_int = 93;
+pub const _SC_THREAD_THREADS_MAX: ::c_int = 94;
+pub const _SC_TIMEOUTS: ::c_int = 95;
+pub const _SC_THREADS: ::c_int = 96;
+pub const _SC_TRACE: ::c_int = 97;
+pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98;
+pub const _SC_TRACE_INHERIT: ::c_int = 99;
+pub const _SC_TRACE_LOG: ::c_int = 100;
+pub const _SC_TTY_NAME_MAX: ::c_int = 101;
+pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102;
+pub const _SC_V6_ILP32_OFF32: ::c_int = 103;
+pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104;
+pub const _SC_V6_LP64_OFF64: ::c_int = 105;
+pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106;
+pub const _SC_ATEXIT_MAX: ::c_int = 107;
+pub const _SC_XOPEN_CRYPT: ::c_int = 108;
+pub const _SC_XOPEN_ENH_I18N: ::c_int = 109;
+pub const _SC_XOPEN_LEGACY: ::c_int = 110;
+pub const _SC_XOPEN_REALTIME: ::c_int = 111;
+pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112;
+pub const _SC_XOPEN_SHM: ::c_int = 113;
+pub const _SC_XOPEN_STREAMS: ::c_int = 114;
+pub const _SC_XOPEN_UNIX: ::c_int = 115;
+pub const _SC_XOPEN_VERSION: ::c_int = 116;
+pub const _SC_XOPEN_XCU_VERSION: ::c_int = 117;
+pub const _SC_IPV6: ::c_int = 118;
+pub const _SC_RAW_SOCKETS: ::c_int = 119;
+pub const _SC_SYMLOOP_MAX: ::c_int = 120;
+pub const _SC_PHYS_PAGES: ::c_int = 121;
+
+pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _;
+pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;
+pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _;
+pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
+pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
+pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3;
+pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_ERRORCHECK;
+
+pub const SCHED_FIFO: ::c_int = 1;
+pub const SCHED_OTHER: ::c_int = 2;
+pub const SCHED_RR: ::c_int = 3;
+
+pub const FD_SETSIZE: usize = 1024;
+
+pub const ST_NOSUID: ::c_ulong = 2;
+
+pub const NI_MAXHOST: ::size_t = 1025;
+
+pub const RTLD_LOCAL: ::c_int = 0;
+pub const RTLD_NODELETE: ::c_int = 0x1000;
+pub const RTLD_NOLOAD: ::c_int = 0x2000;
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+
+pub const LOG_NTP: ::c_int = 12 << 3;
+pub const LOG_SECURITY: ::c_int = 13 << 3;
+pub const LOG_CONSOLE: ::c_int = 14 << 3;
+pub const LOG_NFACILITIES: ::c_int = 24;
+
+pub const TIOCEXCL: ::c_uint = 0x2000740d;
+pub const TIOCNXCL: ::c_uint = 0x2000740e;
+pub const TIOCFLUSH: ::c_ulong = 0x80047410;
+pub const TIOCGETA: ::c_uint = 0x402c7413;
+pub const TIOCSETA: ::c_ulong = 0x802c7414;
+pub const TIOCSETAW: ::c_ulong = 0x802c7415;
+pub const TIOCSETAF: ::c_ulong = 0x802c7416;
+pub const TIOCGETD: ::c_uint = 0x4004741a;
+pub const TIOCSETD: ::c_ulong = 0x8004741b;
+pub const TIOCGDRAINWAIT: ::c_uint = 0x40047456;
+pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457;
+pub const TIOCTIMESTAMP: ::c_uint = 0x40107459;
+pub const TIOCMGDTRWAIT: ::c_uint = 0x4004745a;
+pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b;
+pub const TIOCDRAIN: ::c_uint = 0x2000745e;
+pub const TIOCEXT: ::c_ulong = 0x80047460;
+pub const TIOCSCTTY: ::c_uint = 0x20007461;
+pub const TIOCCONS: ::c_ulong = 0x80047462;
+pub const TIOCGSID: ::c_uint = 0x40047463;
+pub const TIOCSTAT: ::c_uint = 0x20007465;
+pub const TIOCUCNTL: ::c_ulong = 0x80047466;
+pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
+pub const TIOCGWINSZ: ::c_uint = 0x40087468;
+pub const TIOCMGET: ::c_uint = 0x4004746a;
+pub const TIOCM_LE: ::c_int = 0x1;
+pub const TIOCM_DTR: ::c_int = 0x2;
+pub const TIOCM_RTS: ::c_int = 0x4;
+pub const TIOCM_ST: ::c_int = 0x8;
+pub const TIOCM_SR: ::c_int = 0x10;
+pub const TIOCM_CTS: ::c_int = 0x20;
+pub const TIOCM_RI: ::c_int = 0x80;
+pub const TIOCM_DSR: ::c_int = 0x100;
+pub const TIOCM_CD: ::c_int = 0x40;
+pub const TIOCM_CAR: ::c_int = 0x40;
+pub const TIOCM_RNG: ::c_int = 0x80;
+pub const TIOCMBIC: ::c_ulong = 0x8004746b;
+pub const TIOCMBIS: ::c_ulong = 0x8004746c;
+pub const TIOCMSET: ::c_ulong = 0x8004746d;
+pub const TIOCSTART: ::c_uint = 0x2000746e;
+pub const TIOCSTOP: ::c_uint = 0x2000746f;
+pub const TIOCPKT: ::c_ulong = 0x80047470;
+pub const TIOCPKT_DATA: ::c_int = 0x0;
+pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1;
+pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2;
+pub const TIOCPKT_STOP: ::c_int = 0x4;
+pub const TIOCPKT_START: ::c_int = 0x8;
+pub const TIOCPKT_NOSTOP: ::c_int = 0x10;
+pub const TIOCPKT_DOSTOP: ::c_int = 0x20;
+pub const TIOCPKT_IOCTL: ::c_int = 0x40;
+pub const TIOCNOTTY: ::c_uint = 0x20007471;
+pub const TIOCSTI: ::c_ulong = 0x80017472;
+pub const TIOCOUTQ: ::c_uint = 0x40047473;
+pub const TIOCSPGRP: ::c_ulong = 0x80047476;
+pub const TIOCGPGRP: ::c_uint = 0x40047477;
+pub const TIOCCDTR: ::c_uint = 0x20007478;
+pub const TIOCSDTR: ::c_uint = 0x20007479;
+pub const TIOCCBRK: ::c_uint = 0x2000747a;
+pub const TIOCSBRK: ::c_uint = 0x2000747b;
+pub const TTYDISC: ::c_int = 0x0;
+pub const SLIPDISC: ::c_int = 0x4;
+pub const PPPDISC: ::c_int = 0x5;
+pub const NETGRAPHDISC: ::c_int = 0x6;
+
+pub const B0: speed_t = 0;
+pub const B50: speed_t = 50;
+pub const B75: speed_t = 75;
+pub const B110: speed_t = 110;
+pub const B134: speed_t = 134;
+pub const B150: speed_t = 150;
+pub const B200: speed_t = 200;
+pub const B300: speed_t = 300;
+pub const B600: speed_t = 600;
+pub const B1200: speed_t = 1200;
+pub const B1800: speed_t = 1800;
+pub const B2400: speed_t = 2400;
+pub const B4800: speed_t = 4800;
+pub const B9600: speed_t = 9600;
+pub const B19200: speed_t = 19200;
+pub const B38400: speed_t = 38400;
+pub const B7200: speed_t = 7200;
+pub const B14400: speed_t = 14400;
+pub const B28800: speed_t = 28800;
+pub const B57600: speed_t = 57600;
+pub const B76800: speed_t = 76800;
+pub const B115200: speed_t = 115200;
+pub const B230400: speed_t = 230400;
+pub const EXTA: speed_t = 19200;
+pub const EXTB: speed_t = 38400;
+
+pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
+
+pub const CRTSCTS: ::tcflag_t = 0x00030000;
+pub const CCTS_OFLOW: ::tcflag_t = 0x00010000;
+pub const CRTS_IFLOW: ::tcflag_t = 0x00020000;
+pub const CDTR_IFLOW: ::tcflag_t = 0x00040000;
+pub const CDSR_OFLOW: ::tcflag_t = 0x00080000;
+pub const CCAR_OFLOW: ::tcflag_t = 0x00100000;
+pub const VERASE2: usize = 7;
+pub const OCRNL: ::tcflag_t = 0x10;
+pub const ONOCR: ::tcflag_t = 0x20;
+pub const ONLRET: ::tcflag_t = 0x40;
+
+f! {
+    pub fn WIFCONTINUED(status: ::c_int) -> bool {
+        status == 0x13
+    }
+
+    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
+        status >> 8
+    }
+
+    pub fn WIFSIGNALED(status: ::c_int) -> bool {
+        (status & 0o177) != 0o177 && (status & 0o177) != 0
+    }
+
+    pub fn WIFSTOPPED(status: ::c_int) -> bool {
+        (status & 0o177) == 0o177
+    }
+}
+
+extern {
+    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
+    pub fn endutxent();
+    pub fn getutxent() -> *mut utmpx;
+    pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
+    pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
+    pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
+    pub fn setutxent();
+    pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
+    pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
+    pub fn getgrouplist(name: *const ::c_char,
+                        basegid: ::gid_t,
+                        groups: *mut ::gid_t,
+                        ngroups: *mut ::c_int) -> ::c_int;
+    pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int;
+}
+
+#[link(name = "util")]
+extern {
+    pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
+    pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
+    pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
+    pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
+    pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
+    pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
+                       timeout: *const ::timespec) -> ::c_int;
+    pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
+    pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
+                      nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
+    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
+    pub fn getnameinfo(sa: *const ::sockaddr,
+                       salen: ::socklen_t,
+                       host: *mut ::c_char,
+                       hostlen: ::size_t,
+                       serv: *mut ::c_char,
+                       servlen: ::size_t,
+                       flags: ::c_int) -> ::c_int;
+    pub fn kevent(kq: ::c_int,
+                  changelist: *const ::kevent,
+                  nchanges: ::c_int,
+                  eventlist: *mut ::kevent,
+                  nevents: ::c_int,
+                  timeout: *const ::timespec) -> ::c_int;
+    pub fn mincore(addr: *const ::c_void, len: ::size_t,
+                   vec: *mut ::c_char) -> ::c_int;
+    pub fn pwritev(fd: ::c_int,
+                   iov: *const ::iovec,
+                   iovcnt: ::c_int,
+                   offset: ::off_t) -> ::ssize_t;
+    pub fn preadv(fd: ::c_int,
+                  iov: *const ::iovec,
+                  iovcnt: ::c_int,
+                  offset: ::off_t) -> ::ssize_t;
+    pub fn sysctlnametomib(name: *const ::c_char,
+                           mibp: *mut ::c_int,
+                           sizep: *mut ::size_t)
+                           -> ::c_int;
+    pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t)
+                    -> ::c_int;
+    pub fn sysctl(name: *const ::c_int,
+                  namelen: ::c_uint,
+                  oldp: *mut ::c_void,
+                  oldlenp: *mut ::size_t,
+                  newp: *const ::c_void,
+                  newlen: ::size_t)
+                  -> ::c_int;
+    pub fn sysctlbyname(name: *const ::c_char,
+                        oldp: *mut ::c_void,
+                        oldlenp: *mut ::size_t,
+                        newp: *const ::c_void,
+                        newlen: ::size_t)
+                        -> ::c_int;
+    pub fn sched_setscheduler(pid: ::pid_t,
+                              policy: ::c_int,
+                              param: *const ::sched_param) -> ::c_int;
+    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
+    pub fn memrchr(cx: *const ::c_void,
+                   c: ::c_int,
+                   n: ::size_t) -> *mut ::c_void;
+    pub fn sendfile(fd: ::c_int,
+                    s: ::c_int,
+                    offset: ::off_t,
+                    nbytes: ::size_t,
+                    hdtr: *mut ::sf_hdtr,
+                    sbytes: *mut ::off_t,
+                    flags: ::c_int) -> ::c_int;
+    pub fn sigtimedwait(set: *const sigset_t,
+                        info: *mut siginfo_t,
+                        timeout: *const ::timespec) -> ::c_int;
+    pub fn sigwaitinfo(set: *const sigset_t,
+                       info: *mut siginfo_t) -> ::c_int;
+    pub fn openpty(amaster: *mut ::c_int,
+                   aslave: *mut ::c_int,
+                   name: *mut ::c_char,
+                   termp: *mut termios,
+                   winp: *mut ::winsize) -> ::c_int;
+    pub fn forkpty(amaster: *mut ::c_int,
+                   name: *mut ::c_char,
+                   termp: *mut termios,
+                   winp: *mut ::winsize) -> ::pid_t;
+    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
+    pub fn duplocale(base: ::locale_t) -> ::locale_t;
+    pub fn newlocale(mask: ::c_int,
+                     locale: *const ::c_char,
+                     base: ::locale_t) -> ::locale_t;
+    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
+    pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
+    pub fn accept4(s: ::c_int, addr: *mut ::sockaddr,
+                   addrlen: *mut ::socklen_t, flags: ::c_int) -> ::c_int;
+    pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
+    pub fn pthread_attr_get_np(tid: ::pthread_t,
+                               attr: *mut ::pthread_attr_t) -> ::c_int;
+    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
+                                     guardsize: *mut ::size_t) -> ::c_int;
+    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
+                                 stackaddr: *mut *mut ::c_void,
+                                 stacksize: *mut ::size_t) -> ::c_int;
+    pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
+                                       pshared: ::c_int) -> ::c_int;
+    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
+                                       pshared: *mut ::c_int) -> ::c_int;
+    pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
+                                        pshared: ::c_int) -> ::c_int;
+    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
+                                        pshared: *mut ::c_int) -> ::c_int;
+    pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
+                                         val: *mut ::c_int) -> ::c_int;
+    pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
+                                         val: ::c_int) -> ::c_int;
+    pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int;
+    pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int;
+
+    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
+
+    pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
+                  mode: ::mode_t, dev: dev_t) -> ::c_int;
+    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
+                    mode: ::mode_t) -> ::c_int;
+    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
+                                     clock_id: *mut clockid_t) -> ::c_int;
+    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
+                                     clock_id: ::clockid_t) -> ::c_int;
+    pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int;
+    pub fn sem_timedwait(sem: *mut sem_t,
+                         abstime: *const ::timespec) -> ::c_int;
+    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
+                                   abstime: *const ::timespec) -> ::c_int;
+    pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
+    pub fn ppoll(fds: *mut ::pollfd,
+                 nfds: ::nfds_t,
+                 timeout: *const ::timespec,
+                 sigmask: *const sigset_t) -> ::c_int;
+    pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
+    pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
+                   envp: *const *const ::c_char)
+                   -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(target_os = "freebsd")] {
+        mod freebsd;
+        pub use self::freebsd::*;
+    } else if #[cfg(target_os = "dragonfly")] {
+        mod dragonfly;
+        pub use self::dragonfly::*;
+    } else {
+        // ...
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/mod.rs
@@ -0,0 +1,535 @@
+use dox::{mem, Option};
+
+pub type c_char = i8;
+pub type wchar_t = i32;
+pub type off_t = i64;
+pub type useconds_t = u32;
+pub type blkcnt_t = i64;
+pub type socklen_t = u32;
+pub type sa_family_t = u8;
+pub type pthread_t = ::uintptr_t;
+pub type nfds_t = ::c_uint;
+
+s! {
+    pub struct sockaddr {
+        pub sa_len: u8,
+        pub sa_family: sa_family_t,
+        pub sa_data: [::c_char; 14],
+    }
+
+    pub struct sockaddr_in6 {
+        pub sin6_len: u8,
+        pub sin6_family: sa_family_t,
+        pub sin6_port: ::in_port_t,
+        pub sin6_flowinfo: u32,
+        pub sin6_addr: ::in6_addr,
+        pub sin6_scope_id: u32,
+    }
+
+    pub struct sockaddr_un {
+        pub sun_len: u8,
+        pub sun_family: sa_family_t,
+        pub sun_path: [c_char; 104]
+    }
+
+    pub struct passwd {
+        pub pw_name: *mut ::c_char,
+        pub pw_passwd: *mut ::c_char,
+        pub pw_uid: ::uid_t,
+        pub pw_gid: ::gid_t,
+        pub pw_change: ::time_t,
+        pub pw_class: *mut ::c_char,
+        pub pw_gecos: *mut ::c_char,
+        pub pw_dir: *mut ::c_char,
+        pub pw_shell: *mut ::c_char,
+        pub pw_expire: ::time_t,
+
+        #[cfg(not(any(target_os = "macos",
+                      target_os = "ios",
+                      target_os = "netbsd",
+                      target_os = "openbsd")))]
+        pub pw_fields: ::c_int,
+    }
+
+    pub struct ifaddrs {
+        pub ifa_next: *mut ifaddrs,
+        pub ifa_name: *mut ::c_char,
+        pub ifa_flags: ::c_uint,
+        pub ifa_addr: *mut ::sockaddr,
+        pub ifa_netmask: *mut ::sockaddr,
+        pub ifa_dstaddr: *mut ::sockaddr,
+        pub ifa_data: *mut ::c_void
+    }
+
+    pub struct fd_set {
+        #[cfg(all(target_pointer_width = "64",
+                  any(target_os = "freebsd", target_os = "dragonfly")))]
+        fds_bits: [i64; FD_SETSIZE / 64],
+        #[cfg(not(all(target_pointer_width = "64",
+                      any(target_os = "freebsd", target_os = "dragonfly"))))]
+        fds_bits: [i32; FD_SETSIZE / 32],
+    }
+
+    pub struct tm {
+        pub tm_sec: ::c_int,
+        pub tm_min: ::c_int,
+        pub tm_hour: ::c_int,
+        pub tm_mday: ::c_int,
+        pub tm_mon: ::c_int,
+        pub tm_year: ::c_int,
+        pub tm_wday: ::c_int,
+        pub tm_yday: ::c_int,
+        pub tm_isdst: ::c_int,
+        pub tm_gmtoff: ::c_long,
+        pub tm_zone: *mut ::c_char,
+    }
+
+    pub struct utsname {
+        #[cfg(not(target_os = "dragonfly"))]
+        pub sysname: [::c_char; 256],
+        #[cfg(target_os = "dragonfly")]
+        pub sysname: [::c_char; 32],
+        #[cfg(not(target_os = "dragonfly"))]
+        pub nodename: [::c_char; 256],
+        #[cfg(target_os = "dragonfly")]
+        pub nodename: [::c_char; 32],
+        #[cfg(not(target_os = "dragonfly"))]
+        pub release: [::c_char; 256],
+        #[cfg(target_os = "dragonfly")]
+        pub release: [::c_char; 32],
+        #[cfg(not(target_os = "dragonfly"))]
+        pub version: [::c_char; 256],
+        #[cfg(target_os = "dragonfly")]
+        pub version: [::c_char; 32],
+        #[cfg(not(target_os = "dragonfly"))]
+        pub machine: [::c_char; 256],
+        #[cfg(target_os = "dragonfly")]
+        pub machine: [::c_char; 32],
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::c_int,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::socklen_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::socklen_t,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct fsid_t {
+        __fsid_val: [::int32_t; 2],
+    }
+
+    pub struct if_nameindex {
+        pub if_index: ::c_uint,
+        pub if_name: *mut ::c_char,
+    }
+}
+
+pub const LC_ALL: ::c_int = 0;
+pub const LC_COLLATE: ::c_int = 1;
+pub const LC_CTYPE: ::c_int = 2;
+pub const LC_MONETARY: ::c_int = 3;
+pub const LC_NUMERIC: ::c_int = 4;
+pub const LC_TIME: ::c_int = 5;
+pub const LC_MESSAGES: ::c_int = 6;
+
+pub const FIOCLEX: ::c_ulong = 0x20006601;
+pub const FIONBIO: ::c_ulong = 0x8004667e;
+
+pub const PATH_MAX: ::c_int = 1024;
+
+pub const SA_ONSTACK: ::c_int = 0x0001;
+pub const SA_SIGINFO: ::c_int = 0x0040;
+pub const SA_RESTART: ::c_int = 0x0002;
+pub const SA_RESETHAND: ::c_int = 0x0004;
+pub const SA_NOCLDSTOP: ::c_int = 0x0008;
+pub const SA_NODEFER: ::c_int = 0x0010;
+pub const SA_NOCLDWAIT: ::c_int = 0x0020;
+
+pub const SS_ONSTACK: ::c_int = 1;
+pub const SS_DISABLE: ::c_int = 4;
+
+pub const SIGCHLD: ::c_int = 20;
+pub const SIGBUS: ::c_int = 10;
+pub const SIGUSR1: ::c_int = 30;
+pub const SIGUSR2: ::c_int = 31;
+pub const SIGCONT: ::c_int = 19;
+pub const SIGSTOP: ::c_int = 17;
+pub const SIGTSTP: ::c_int = 18;
+pub const SIGURG: ::c_int = 16;
+pub const SIGIO: ::c_int = 23;
+pub const SIGSYS: ::c_int = 12;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
+pub const SIGINFO: ::c_int = 29;
+
+pub const SIG_SETMASK: ::c_int = 3;
+pub const SIG_BLOCK: ::c_int = 0x1;
+pub const SIG_UNBLOCK: ::c_int = 0x2;
+
+pub const IP_MULTICAST_IF: ::c_int = 9;
+pub const IP_MULTICAST_TTL: ::c_int = 10;
+pub const IP_MULTICAST_LOOP: ::c_int = 11;
+
+pub const IPV6_MULTICAST_LOOP: ::c_int = 11;
+pub const IPV6_V6ONLY: ::c_int = 27;
+
+pub const ST_RDONLY: ::c_ulong = 1;
+
+pub const SCM_RIGHTS: ::c_int = 0x01;
+
+pub const NCCS: usize = 20;
+
+pub const O_ACCMODE: ::c_int = 0x3;
+pub const O_RDONLY: ::c_int = 0;
+pub const O_WRONLY: ::c_int = 1;
+pub const O_RDWR: ::c_int = 2;
+pub const O_APPEND: ::c_int = 8;
+pub const O_CREAT: ::c_int = 512;
+pub const O_TRUNC: ::c_int = 1024;
+pub const O_EXCL: ::c_int = 2048;
+pub const O_ASYNC: ::c_int = 0x40;
+pub const O_SYNC: ::c_int = 0x80;
+pub const O_NONBLOCK: ::c_int = 0x4;
+pub const O_NOFOLLOW: ::c_int = 0x100;
+pub const O_SHLOCK: ::c_int = 0x10;
+pub const O_EXLOCK: ::c_int = 0x20;
+pub const O_FSYNC: ::c_int = O_SYNC;
+pub const O_NDELAY: ::c_int = O_NONBLOCK;
+
+pub const F_GETOWN: ::c_int = 5;
+pub const F_SETOWN: ::c_int = 6;
+
+pub const MNT_FORCE: ::c_int = 0x80000;
+
+pub const Q_SYNC: ::c_int = 0x600;
+pub const Q_QUOTAON: ::c_int = 0x100;
+pub const Q_QUOTAOFF: ::c_int = 0x200;
+
+pub const TCIOFF: ::c_int = 3;
+pub const TCION: ::c_int = 4;
+pub const TCOOFF: ::c_int = 1;
+pub const TCOON: ::c_int = 2;
+pub const TCIFLUSH: ::c_int = 1;
+pub const TCOFLUSH: ::c_int = 2;
+pub const TCIOFLUSH: ::c_int = 3;
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
+pub const VEOF: usize = 0;
+pub const VEOL: usize = 1;
+pub const VEOL2: usize = 2;
+pub const VERASE: usize = 3;
+pub const VWERASE: usize = 4;
+pub const VKILL: usize = 5;
+pub const VREPRINT: usize = 6;
+pub const VINTR: usize = 8;
+pub const VQUIT: usize = 9;
+pub const VSUSP: usize = 10;
+pub const VDSUSP: usize = 11;
+pub const VSTART: usize = 12;
+pub const VSTOP: usize = 13;
+pub const VLNEXT: usize = 14;
+pub const VDISCARD: usize = 15;
+pub const VMIN: usize = 16;
+pub const VTIME: usize = 17;
+pub const VSTATUS: usize = 18;
+pub const _POSIX_VDISABLE: ::cc_t = 0xff;
+pub const IGNBRK: ::tcflag_t = 0x00000001;
+pub const BRKINT: ::tcflag_t = 0x00000002;
+pub const IGNPAR: ::tcflag_t = 0x00000004;
+pub const PARMRK: ::tcflag_t = 0x00000008;
+pub const INPCK: ::tcflag_t = 0x00000010;
+pub const ISTRIP: ::tcflag_t = 0x00000020;
+pub const INLCR: ::tcflag_t = 0x00000040;
+pub const IGNCR: ::tcflag_t = 0x00000080;
+pub const ICRNL: ::tcflag_t = 0x00000100;
+pub const IXON: ::tcflag_t = 0x00000200;
+pub const IXOFF: ::tcflag_t = 0x00000400;
+pub const IXANY: ::tcflag_t = 0x00000800;
+pub const IMAXBEL: ::tcflag_t = 0x00002000;
+pub const OPOST: ::tcflag_t = 0x1;
+pub const ONLCR: ::tcflag_t = 0x2;
+pub const OXTABS: ::tcflag_t = 0x4;
+pub const ONOEOT: ::tcflag_t = 0x8;
+pub const CIGNORE: ::tcflag_t = 0x00000001;
+pub const CSIZE: ::tcflag_t = 0x00000300;
+pub const CS5: ::tcflag_t = 0x00000000;
+pub const CS6: ::tcflag_t = 0x00000100;
+pub const CS7: ::tcflag_t = 0x00000200;
+pub const CS8: ::tcflag_t = 0x00000300;
+pub const CSTOPB: ::tcflag_t = 0x00000400;
+pub const CREAD: ::tcflag_t = 0x00000800;
+pub const PARENB: ::tcflag_t = 0x00001000;
+pub const PARODD: ::tcflag_t = 0x00002000;
+pub const HUPCL: ::tcflag_t = 0x00004000;
+pub const CLOCAL: ::tcflag_t = 0x00008000;
+pub const ECHOKE: ::tcflag_t = 0x00000001;
+pub const ECHOE: ::tcflag_t = 0x00000002;
+pub const ECHOK: ::tcflag_t = 0x00000004;
+pub const ECHO: ::tcflag_t = 0x00000008;
+pub const ECHONL: ::tcflag_t = 0x00000010;
+pub const ECHOPRT: ::tcflag_t = 0x00000020;
+pub const ECHOCTL: ::tcflag_t = 0x00000040;
+pub const ISIG: ::tcflag_t = 0x00000080;
+pub const ICANON: ::tcflag_t = 0x00000100;
+pub const ALTWERASE: ::tcflag_t = 0x00000200;
+pub const IEXTEN: ::tcflag_t = 0x00000400;
+pub const EXTPROC: ::tcflag_t = 0x00000800;
+pub const TOSTOP: ::tcflag_t = 0x00400000;
+pub const FLUSHO: ::tcflag_t = 0x00800000;
+pub const NOKERNINFO: ::tcflag_t = 0x02000000;
+pub const PENDIN: ::tcflag_t = 0x20000000;
+pub const NOFLSH: ::tcflag_t = 0x80000000;
+pub const MDMBUF: ::tcflag_t = 0x00100000;
+
+pub const WNOHANG: ::c_int = 0x00000001;
+pub const WUNTRACED: ::c_int = 0x00000002;
+
+pub const RTLD_NOW: ::c_int = 0x2;
+pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void;
+pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void;
+pub const RTLD_SELF: *mut ::c_void = -3isize as *mut ::c_void;
+
+pub const LOG_CRON: ::c_int = 9 << 3;
+pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
+pub const LOG_FTP: ::c_int = 11 << 3;
+pub const LOG_PERROR: ::c_int = 0x20;
+
+pub const TCP_MAXSEG: ::c_int = 2;
+
+pub const PIPE_BUF: usize = 512;
+
+pub const POLLRDNORM: ::c_short = 0x040;
+pub const POLLWRNORM: ::c_short = 0x004;
+pub const POLLRDBAND: ::c_short = 0x080;
+pub const POLLWRBAND: ::c_short = 0x100;
+
+f! {
+    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
+        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        let fd = fd as usize;
+        (*set).fds_bits[fd / bits] &= !(1 << (fd % bits));
+        return
+    }
+
+    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
+        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        let fd = fd as usize;
+        return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0
+    }
+
+    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
+        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        let fd = fd as usize;
+        (*set).fds_bits[fd / bits] |= 1 << (fd % bits);
+        return
+    }
+
+    pub fn FD_ZERO(set: *mut fd_set) -> () {
+        for slot in (*set).fds_bits.iter_mut() {
+            *slot = 0;
+        }
+    }
+
+    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
+        status & 0o177
+    }
+
+    pub fn WIFEXITED(status: ::c_int) -> bool {
+        (status & 0o177) == 0
+    }
+
+    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
+        status >> 8
+    }
+
+    pub fn WCOREDUMP(status: ::c_int) -> bool {
+        (status & 0o200) != 0
+    }
+}
+
+extern {
+    pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
+    pub fn freeifaddrs(ifa: *mut ::ifaddrs);
+    pub fn setgroups(ngroups: ::c_int,
+                     ptr: *const ::gid_t) -> ::c_int;
+    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
+    pub fn kqueue() -> ::c_int;
+    pub fn unmount(target: *const ::c_char, arg: ::c_int) -> ::c_int;
+    pub fn syscall(num: ::c_int, ...) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwent50")]
+    pub fn getpwent() -> *mut passwd;
+    pub fn setpwent();
+    pub fn endpwent();
+    pub fn getprogname() -> *const ::c_char;
+    pub fn setprogname(name: *const ::c_char);
+    pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
+    pub fn if_nameindex() -> *mut if_nameindex;
+    pub fn if_freenameindex(ptr: *mut if_nameindex);
+
+    pub fn getpeereid(socket: ::c_int,
+                      euid: *mut ::uid_t,
+                      egid: *mut ::gid_t) -> ::c_int;
+
+    #[cfg_attr(target_os = "macos", link_name = "glob$INODE64")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__glob30")]
+    pub fn glob(pattern: *const ::c_char,
+                flags: ::c_int,
+                errfunc: Option<extern fn(epath: *const ::c_char,
+                                          errno: ::c_int) -> ::c_int>,
+                pglob: *mut ::glob_t) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__globfree30")]
+    pub fn globfree(pglob: *mut ::glob_t);
+
+    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
+                         -> ::c_int;
+
+    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
+               link_name = "seekdir$INODE64")]
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "seekdir$INODE64$UNIX2003")]
+    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
+               link_name = "telldir$INODE64")]
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "telldir$INODE64$UNIX2003")]
+    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
+    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
+                  -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "msync$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__msync13")]
+    pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "recvfrom$UNIX2003")]
+    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
+                    flags: ::c_int, addr: *mut ::sockaddr,
+                    addrlen: *mut ::socklen_t) -> ::ssize_t;
+    pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
+    pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int;
+    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "bind$UNIX2003")]
+    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
+                address_len: ::socklen_t) -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "writev$UNIX2003")]
+    pub fn writev(fd: ::c_int,
+                  iov: *const ::iovec,
+                  iovcnt: ::c_int) -> ::ssize_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "readv$UNIX2003")]
+    pub fn readv(fd: ::c_int,
+                 iov: *const ::iovec,
+                 iovcnt: ::c_int) -> ::ssize_t;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "sendmsg$UNIX2003")]
+    pub fn sendmsg(fd: ::c_int,
+                   msg: *const ::msghdr,
+                   flags: ::c_int) -> ::ssize_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "recvmsg$UNIX2003")]
+    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
+                   -> ::ssize_t;
+
+    pub fn sync();
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
+    pub fn getgrgid_r(uid: ::uid_t,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "sigaltstack$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
+    pub fn sigaltstack(ss: *const stack_t,
+                       oss: *mut stack_t) -> ::c_int;
+    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
+    pub fn getdtablesize() -> ::c_int;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
+    pub fn getgrnam_r(name: *const ::c_char,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_sigmask$UNIX2003")]
+    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
+                           oldset: *mut sigset_t) -> ::c_int;
+    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
+    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
+    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
+    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
+    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
+    pub fn getpwnam_r(name: *const ::c_char,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
+    pub fn getpwuid_r(uid: ::uid_t,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
+               link_name = "sigwait$UNIX2003")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
+    pub fn sigwait(set: *const sigset_t,
+                   sig: *mut ::c_int) -> ::c_int;
+    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
+                          parent: Option<unsafe extern fn()>,
+                          child: Option<unsafe extern fn()>) -> ::c_int;
+    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "popen$UNIX2003")]
+    pub fn popen(command: *const c_char,
+                 mode: *const c_char) -> *mut ::FILE;
+    pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
+                     mode: ::c_int, flags: ::c_int) -> ::c_int;
+    pub fn pthread_create(native: *mut ::pthread_t,
+                          attr: *const ::pthread_attr_t,
+                          f: extern fn(*mut ::c_void) -> *mut ::c_void,
+                          value: *mut ::c_void) -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(any(target_os = "macos", target_os = "ios"))] {
+        mod apple;
+        pub use self::apple::*;
+    } else if #[cfg(any(target_os = "openbsd", target_os = "netbsd",
+                        target_os = "bitrig"))] {
+        mod netbsdlike;
+        pub use self::netbsdlike::*;
+    } else if #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))] {
+        mod freebsdlike;
+        pub use self::freebsdlike::*;
+    } else {
+        // Unknown target_os
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/mod.rs
@@ -0,0 +1,640 @@
+pub type time_t = i64;
+pub type mode_t = u32;
+pub type nlink_t = ::uint32_t;
+pub type ino_t = ::uint64_t;
+pub type pthread_key_t = ::c_int;
+pub type rlim_t = u64;
+pub type speed_t = ::c_uint;
+pub type tcflag_t = ::c_uint;
+pub type nl_item = c_long;
+pub type clockid_t = ::c_int;
+pub type id_t = ::uint32_t;
+pub type sem_t = *mut sem;
+
+pub enum timezone {}
+pub enum sem {}
+
+s! {
+    pub struct sigaction {
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: ::sigset_t,
+        pub sa_flags: ::c_int,
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_size: ::size_t,
+        pub ss_flags: ::c_int,
+    }
+
+    pub struct sockaddr_in {
+        pub sin_len: u8,
+        pub sin_family: ::sa_family_t,
+        pub sin_port: ::in_port_t,
+        pub sin_addr: ::in_addr,
+        pub sin_zero: [::int8_t; 8],
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_cc: [::cc_t; ::NCCS],
+        pub c_ispeed: ::c_int,
+        pub c_ospeed: ::c_int,
+    }
+
+    pub struct flock {
+        pub l_start: ::off_t,
+        pub l_len: ::off_t,
+        pub l_pid: ::pid_t,
+        pub l_type: ::c_short,
+        pub l_whence: ::c_short,
+    }
+}
+
+pub const D_T_FMT: ::nl_item = 0;
+pub const D_FMT: ::nl_item = 1;
+pub const T_FMT: ::nl_item = 2;
+pub const T_FMT_AMPM: ::nl_item = 3;
+pub const AM_STR: ::nl_item = 4;
+pub const PM_STR: ::nl_item = 5;
+
+pub const DAY_1: ::nl_item = 6;
+pub const DAY_2: ::nl_item = 7;
+pub const DAY_3: ::nl_item = 8;
+pub const DAY_4: ::nl_item = 9;
+pub const DAY_5: ::nl_item = 10;
+pub const DAY_6: ::nl_item = 11;
+pub const DAY_7: ::nl_item = 12;
+
+pub const ABDAY_1: ::nl_item = 13;
+pub const ABDAY_2: ::nl_item = 14;
+pub const ABDAY_3: ::nl_item = 15;
+pub const ABDAY_4: ::nl_item = 16;
+pub const ABDAY_5: ::nl_item = 17;
+pub const ABDAY_6: ::nl_item = 18;
+pub const ABDAY_7: ::nl_item = 19;
+
+pub const MON_1: ::nl_item = 20;
+pub const MON_2: ::nl_item = 21;
+pub const MON_3: ::nl_item = 22;
+pub const MON_4: ::nl_item = 23;
+pub const MON_5: ::nl_item = 24;
+pub const MON_6: ::nl_item = 25;
+pub const MON_7: ::nl_item = 26;
+pub const MON_8: ::nl_item = 27;
+pub const MON_9: ::nl_item = 28;
+pub const MON_10: ::nl_item = 29;
+pub const MON_11: ::nl_item = 30;
+pub const MON_12: ::nl_item = 31;
+
+pub const ABMON_1: ::nl_item = 32;
+pub const ABMON_2: ::nl_item = 33;
+pub const ABMON_3: ::nl_item = 34;
+pub const ABMON_4: ::nl_item = 35;
+pub const ABMON_5: ::nl_item = 36;
+pub const ABMON_6: ::nl_item = 37;
+pub const ABMON_7: ::nl_item = 38;
+pub const ABMON_8: ::nl_item = 39;
+pub const ABMON_9: ::nl_item = 40;
+pub const ABMON_10: ::nl_item = 41;
+pub const ABMON_11: ::nl_item = 42;
+pub const ABMON_12: ::nl_item = 43;
+
+pub const RADIXCHAR: ::nl_item = 44;
+pub const THOUSEP: ::nl_item = 45;
+pub const YESSTR: ::nl_item = 46;
+pub const YESEXPR: ::nl_item = 47;
+pub const NOSTR: ::nl_item = 48;
+pub const NOEXPR: ::nl_item = 49;
+pub const CRNCYSTR: ::nl_item = 50;
+
+pub const CODESET: ::nl_item = 51;
+
+pub const EXIT_FAILURE : ::c_int = 1;
+pub const EXIT_SUCCESS : ::c_int = 0;
+pub const RAND_MAX : ::c_int = 2147483647;
+pub const EOF : ::c_int = -1;
+pub const SEEK_SET : ::c_int = 0;
+pub const SEEK_CUR : ::c_int = 1;
+pub const SEEK_END : ::c_int = 2;
+pub const _IOFBF : ::c_int = 0;
+pub const _IONBF : ::c_int = 2;
+pub const _IOLBF : ::c_int = 1;
+pub const BUFSIZ : ::c_uint = 1024;
+pub const FOPEN_MAX : ::c_uint = 20;
+pub const FILENAME_MAX : ::c_uint = 1024;
+pub const L_tmpnam : ::c_uint = 1024;
+pub const O_NOCTTY : ::c_int = 32768;
+pub const S_IFIFO : mode_t = 4096;
+pub const S_IFCHR : mode_t = 8192;
+pub const S_IFBLK : mode_t = 24576;
+pub const S_IFDIR : mode_t = 16384;
+pub const S_IFREG : mode_t = 32768;
+pub const S_IFLNK : mode_t = 40960;
+pub const S_IFSOCK : mode_t = 49152;
+pub const S_IFMT : mode_t = 61440;
+pub const S_IEXEC : mode_t = 64;
+pub const S_IWRITE : mode_t = 128;
+pub const S_IREAD : mode_t = 256;
+pub const S_IRWXU : mode_t = 448;
+pub const S_IXUSR : mode_t = 64;
+pub const S_IWUSR : mode_t = 128;
+pub const S_IRUSR : mode_t = 256;
+pub const S_IRWXG : mode_t = 56;
+pub const S_IXGRP : mode_t = 8;
+pub const S_IWGRP : mode_t = 16;
+pub const S_IRGRP : mode_t = 32;
+pub const S_IRWXO : mode_t = 7;
+pub const S_IXOTH : mode_t = 1;
+pub const S_IWOTH : mode_t = 2;
+pub const S_IROTH : mode_t = 4;
+pub const F_OK : ::c_int = 0;
+pub const R_OK : ::c_int = 4;
+pub const W_OK : ::c_int = 2;
+pub const X_OK : ::c_int = 1;
+pub const STDIN_FILENO : ::c_int = 0;
+pub const STDOUT_FILENO : ::c_int = 1;
+pub const STDERR_FILENO : ::c_int = 2;
+pub const F_LOCK : ::c_int = 1;
+pub const F_TEST : ::c_int = 3;
+pub const F_TLOCK : ::c_int = 2;
+pub const F_ULOCK : ::c_int = 0;
+pub const F_GETLK: ::c_int = 7;
+pub const F_SETLK: ::c_int = 8;
+pub const F_SETLKW: ::c_int = 9;
+pub const SIGHUP : ::c_int = 1;
+pub const SIGINT : ::c_int = 2;
+pub const SIGQUIT : ::c_int = 3;
+pub const SIGILL : ::c_int = 4;
+pub const SIGABRT : ::c_int = 6;
+pub const SIGEMT: ::c_int = 7;
+pub const SIGFPE : ::c_int = 8;
+pub const SIGKILL : ::c_int = 9;
+pub const SIGSEGV : ::c_int = 11;
+pub const SIGPIPE : ::c_int = 13;
+pub const SIGALRM : ::c_int = 14;
+pub const SIGTERM : ::c_int = 15;
+pub const SIGSTKSZ : ::size_t = 40960;
+
+pub const PROT_NONE : ::c_int = 0;
+pub const PROT_READ : ::c_int = 1;
+pub const PROT_WRITE : ::c_int = 2;
+pub const PROT_EXEC : ::c_int = 4;
+
+pub const MAP_FILE : ::c_int = 0x0000;
+pub const MAP_SHARED : ::c_int = 0x0001;
+pub const MAP_PRIVATE : ::c_int = 0x0002;
+pub const MAP_FIXED : ::c_int = 0x0010;
+pub const MAP_ANON : ::c_int = 0x1000;
+
+pub const MAP_FAILED : *mut ::c_void = !0 as *mut ::c_void;
+
+pub const MCL_CURRENT : ::c_int = 0x0001;
+pub const MCL_FUTURE : ::c_int = 0x0002;
+
+pub const MS_ASYNC : ::c_int = 0x0001;
+
+pub const EPERM : ::c_int = 1;
+pub const ENOENT : ::c_int = 2;
+pub const ESRCH : ::c_int = 3;
+pub const EINTR : ::c_int = 4;
+pub const EIO : ::c_int = 5;
+pub const ENXIO : ::c_int = 6;
+pub const E2BIG : ::c_int = 7;
+pub const ENOEXEC : ::c_int = 8;
+pub const EBADF : ::c_int = 9;
+pub const ECHILD : ::c_int = 10;
+pub const EDEADLK : ::c_int = 11;
+pub const ENOMEM : ::c_int = 12;
+pub const EACCES : ::c_int = 13;
+pub const EFAULT : ::c_int = 14;
+pub const ENOTBLK : ::c_int = 15;
+pub const EBUSY : ::c_int = 16;
+pub const EEXIST : ::c_int = 17;
+pub const EXDEV : ::c_int = 18;
+pub const ENODEV : ::c_int = 19;
+pub const ENOTDIR : ::c_int = 20;
+pub const EISDIR : ::c_int = 21;
+pub const EINVAL : ::c_int = 22;
+pub const ENFILE : ::c_int = 23;
+pub const EMFILE : ::c_int = 24;
+pub const ENOTTY : ::c_int = 25;
+pub const ETXTBSY : ::c_int = 26;
+pub const EFBIG : ::c_int = 27;
+pub const ENOSPC : ::c_int = 28;
+pub const ESPIPE : ::c_int = 29;
+pub const EROFS : ::c_int = 30;
+pub const EMLINK : ::c_int = 31;
+pub const EPIPE : ::c_int = 32;
+pub const EDOM : ::c_int = 33;
+pub const ERANGE : ::c_int = 34;
+pub const EAGAIN : ::c_int = 35;
+pub const EWOULDBLOCK : ::c_int = 35;
+pub const EINPROGRESS : ::c_int = 36;
+pub const EALREADY : ::c_int = 37;
+pub const ENOTSOCK : ::c_int = 38;
+pub const EDESTADDRREQ : ::c_int = 39;
+pub const EMSGSIZE : ::c_int = 40;
+pub const EPROTOTYPE : ::c_int = 41;
+pub const ENOPROTOOPT : ::c_int = 42;
+pub const EPROTONOSUPPORT : ::c_int = 43;
+pub const ESOCKTNOSUPPORT : ::c_int = 44;
+pub const EOPNOTSUPP : ::c_int = 45;
+pub const EPFNOSUPPORT : ::c_int = 46;
+pub const EAFNOSUPPORT : ::c_int = 47;
+pub const EADDRINUSE : ::c_int = 48;
+pub const EADDRNOTAVAIL : ::c_int = 49;
+pub const ENETDOWN : ::c_int = 50;
+pub const ENETUNREACH : ::c_int = 51;
+pub const ENETRESET : ::c_int = 52;
+pub const ECONNABORTED : ::c_int = 53;
+pub const ECONNRESET : ::c_int = 54;
+pub const ENOBUFS : ::c_int = 55;
+pub const EISCONN : ::c_int = 56;
+pub const ENOTCONN : ::c_int = 57;
+pub const ESHUTDOWN : ::c_int = 58;
+pub const ETOOMANYREFS : ::c_int = 59;
+pub const ETIMEDOUT : ::c_int = 60;
+pub const ECONNREFUSED : ::c_int = 61;
+pub const ELOOP : ::c_int = 62;
+pub const ENAMETOOLONG : ::c_int = 63;
+pub const EHOSTDOWN : ::c_int = 64;
+pub const EHOSTUNREACH : ::c_int = 65;
+pub const ENOTEMPTY : ::c_int = 66;
+pub const EPROCLIM : ::c_int = 67;
+pub const EUSERS : ::c_int = 68;
+pub const EDQUOT : ::c_int = 69;
+pub const ESTALE : ::c_int = 70;
+pub const EREMOTE : ::c_int = 71;
+pub const EBADRPC : ::c_int = 72;
+pub const ERPCMISMATCH : ::c_int = 73;
+pub const EPROGUNAVAIL : ::c_int = 74;
+pub const EPROGMISMATCH : ::c_int = 75;
+pub const EPROCUNAVAIL : ::c_int = 76;
+pub const ENOLCK : ::c_int = 77;
+pub const ENOSYS : ::c_int = 78;
+pub const EFTYPE : ::c_int = 79;
+pub const EAUTH : ::c_int = 80;
+pub const ENEEDAUTH : ::c_int = 81;
+
+pub const F_DUPFD : ::c_int = 0;
+pub const F_GETFD : ::c_int = 1;
+pub const F_SETFD : ::c_int = 2;
+pub const F_GETFL : ::c_int = 3;
+pub const F_SETFL : ::c_int = 4;
+
+pub const SIGTRAP : ::c_int = 5;
+
+pub const GLOB_APPEND   : ::c_int = 0x0001;
+pub const GLOB_DOOFFS   : ::c_int = 0x0002;
+pub const GLOB_ERR      : ::c_int = 0x0004;
+pub const GLOB_MARK     : ::c_int = 0x0008;
+pub const GLOB_NOCHECK  : ::c_int = 0x0010;
+pub const GLOB_NOSORT   : ::c_int = 0x0020;
+pub const GLOB_NOESCAPE : ::c_int = 0x1000;
+
+pub const GLOB_NOSPACE  : ::c_int = -1;
+pub const GLOB_ABORTED  : ::c_int = -2;
+pub const GLOB_NOMATCH  : ::c_int = -3;
+pub const GLOB_NOSYS : ::c_int = -4;
+
+pub const POSIX_MADV_NORMAL : ::c_int = 0;
+pub const POSIX_MADV_RANDOM : ::c_int = 1;
+pub const POSIX_MADV_SEQUENTIAL : ::c_int = 2;
+pub const POSIX_MADV_WILLNEED : ::c_int = 3;
+pub const POSIX_MADV_DONTNEED : ::c_int = 4;
+
+pub const PTHREAD_CREATE_JOINABLE : ::c_int = 0;
+pub const PTHREAD_CREATE_DETACHED : ::c_int = 1;
+
+// http://man.openbsd.org/OpenBSD-current/man2/clock_getres.2
+// The man page says clock_gettime(3) can accept various values as clockid_t but
+// http://fxr.watson.org/fxr/source/kern/kern_time.c?v=OPENBSD;im=excerpts#L161
+// the implementation rejects anything other than the below two
+//
+// http://netbsd.gw.com/cgi-bin/man-cgi?clock_gettime
+// https://github.com/jsonn/src/blob/HEAD/sys/kern/subr_time.c#L222
+// Basically the same goes for NetBSD
+pub const CLOCK_REALTIME: ::clockid_t = 0;
+pub const CLOCK_MONOTONIC: ::clockid_t = 3;
+
+pub const RLIMIT_CPU: ::c_int = 0;
+pub const RLIMIT_FSIZE: ::c_int = 1;
+pub const RLIMIT_DATA: ::c_int = 2;
+pub const RLIMIT_STACK: ::c_int = 3;
+pub const RLIMIT_CORE: ::c_int = 4;
+pub const RLIMIT_RSS: ::c_int = 5;
+pub const RLIMIT_MEMLOCK: ::c_int = 6;
+pub const RLIMIT_NPROC: ::c_int = 7;
+pub const RLIMIT_NOFILE: ::c_int = 8;
+
+pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff;
+pub const RLIM_SAVED_MAX: rlim_t = RLIM_INFINITY;
+pub const RLIM_SAVED_CUR: rlim_t = RLIM_INFINITY;
+
+pub const RUSAGE_SELF: ::c_int = 0;
+pub const RUSAGE_CHILDREN: ::c_int = -1;
+
+pub const MADV_NORMAL : ::c_int = 0;
+pub const MADV_RANDOM : ::c_int = 1;
+pub const MADV_SEQUENTIAL : ::c_int = 2;
+pub const MADV_WILLNEED : ::c_int = 3;
+pub const MADV_DONTNEED : ::c_int = 4;
+pub const MADV_FREE : ::c_int = 6;
+
+pub const AF_UNSPEC: ::c_int = 0;
+pub const AF_LOCAL: ::c_int = 1;
+pub const AF_UNIX: ::c_int = AF_LOCAL;
+pub const AF_INET: ::c_int = 2;
+pub const AF_IMPLINK: ::c_int = 3;
+pub const AF_PUP: ::c_int = 4;
+pub const AF_CHAOS: ::c_int = 5;
+pub const AF_NS: ::c_int = 6;
+pub const AF_ISO: ::c_int = 7;
+pub const AF_OSI: ::c_int = AF_ISO;
+pub const AF_DATAKIT: ::c_int = 9;
+pub const AF_CCITT: ::c_int = 10;
+pub const AF_SNA: ::c_int = 11;
+pub const AF_DECnet: ::c_int = 12;
+pub const AF_DLI: ::c_int = 13;
+pub const AF_LAT: ::c_int = 14;
+pub const AF_HYLINK: ::c_int = 15;
+pub const AF_APPLETALK: ::c_int = 16;
+pub const AF_LINK: ::c_int = 18;
+pub const pseudo_AF_XTP: ::c_int = 19;
+pub const AF_COIP: ::c_int = 20;
+pub const AF_CNT: ::c_int = 21;
+pub const pseudo_AF_RTIP: ::c_int = 22;
+pub const AF_IPX: ::c_int = 23;
+pub const AF_INET6: ::c_int = 24;
+pub const pseudo_AF_PIP: ::c_int = 25;
+pub const AF_ISDN: ::c_int = 26;
+pub const AF_E164: ::c_int = AF_ISDN;
+pub const AF_NATM: ::c_int = 27;
+
+pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
+pub const PF_LOCAL: ::c_int = AF_LOCAL;
+pub const PF_UNIX: ::c_int = PF_LOCAL;
+pub const PF_INET: ::c_int = AF_INET;
+pub const PF_IMPLINK: ::c_int = AF_IMPLINK;
+pub const PF_PUP: ::c_int = AF_PUP;
+pub const PF_CHAOS: ::c_int = AF_CHAOS;
+pub const PF_NS: ::c_int = AF_NS;
+pub const PF_ISO: ::c_int = AF_ISO;
+pub const PF_OSI: ::c_int = AF_ISO;
+pub const PF_DATAKIT: ::c_int = AF_DATAKIT;
+pub const PF_CCITT: ::c_int = AF_CCITT;
+pub const PF_SNA: ::c_int = AF_SNA;
+pub const PF_DECnet: ::c_int = AF_DECnet;
+pub const PF_DLI: ::c_int = AF_DLI;
+pub const PF_LAT: ::c_int = AF_LAT;
+pub const PF_HYLINK: ::c_int = AF_HYLINK;
+pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
+pub const PF_LINK: ::c_int = AF_LINK;
+pub const PF_XTP: ::c_int = pseudo_AF_XTP;
+pub const PF_COIP: ::c_int = AF_COIP;
+pub const PF_CNT: ::c_int = AF_CNT;
+pub const PF_IPX: ::c_int = AF_IPX;
+pub const PF_INET6: ::c_int = AF_INET6;
+pub const PF_RTIP: ::c_int = pseudo_AF_RTIP;
+pub const PF_PIP: ::c_int = pseudo_AF_PIP;
+pub const PF_ISDN: ::c_int = AF_ISDN;
+pub const PF_NATM: ::c_int = AF_NATM;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOCK_RAW: ::c_int = 3;
+pub const SOCK_RDM: ::c_int = 4;
+pub const SOCK_SEQPACKET: ::c_int = 5;
+pub const IP_TTL: ::c_int = 4;
+pub const IP_HDRINCL: ::c_int = 2;
+pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
+pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
+
+pub const TCP_NODELAY: ::c_int = 0x01;
+pub const SOL_SOCKET: ::c_int = 0xffff;
+pub const SO_DEBUG: ::c_int = 0x01;
+pub const SO_ACCEPTCONN: ::c_int = 0x0002;
+pub const SO_REUSEADDR: ::c_int = 0x0004;
+pub const SO_KEEPALIVE: ::c_int = 0x0008;
+pub const SO_DONTROUTE: ::c_int = 0x0010;
+pub const SO_BROADCAST: ::c_int = 0x0020;
+pub const SO_USELOOPBACK: ::c_int = 0x0040;
+pub const SO_LINGER: ::c_int = 0x0080;
+pub const SO_OOBINLINE: ::c_int = 0x0100;
+pub const SO_REUSEPORT: ::c_int = 0x0200;
+pub const SO_SNDBUF: ::c_int = 0x1001;
+pub const SO_RCVBUF: ::c_int = 0x1002;
+pub const SO_SNDLOWAT: ::c_int = 0x1003;
+pub const SO_RCVLOWAT: ::c_int = 0x1004;
+pub const SO_ERROR: ::c_int = 0x1007;
+pub const SO_TYPE: ::c_int = 0x1008;
+
+pub const SOMAXCONN: ::c_int = 128;
+
+pub const MSG_OOB: ::c_int = 0x1;
+pub const MSG_PEEK: ::c_int = 0x2;
+pub const MSG_DONTROUTE: ::c_int = 0x4;
+pub const MSG_EOR: ::c_int = 0x8;
+pub const MSG_TRUNC: ::c_int = 0x10;
+pub const MSG_CTRUNC: ::c_int = 0x20;
+pub const MSG_WAITALL: ::c_int = 0x40;
+pub const MSG_DONTWAIT: ::c_int = 0x80;
+pub const MSG_BCAST: ::c_int = 0x100;
+pub const MSG_MCAST: ::c_int = 0x200;
+pub const MSG_NOSIGNAL: ::c_int = 0x400;
+pub const MSG_CMSG_CLOEXEC: ::c_int = 0x800;
+
+pub const IFF_LOOPBACK: ::c_int = 0x8;
+
+pub const SHUT_RD: ::c_int = 0;
+pub const SHUT_WR: ::c_int = 1;
+pub const SHUT_RDWR: ::c_int = 2;
+
+pub const LOCK_SH: ::c_int = 1;
+pub const LOCK_EX: ::c_int = 2;
+pub const LOCK_NB: ::c_int = 4;
+pub const LOCK_UN: ::c_int = 8;
+
+pub const IPPROTO_RAW : ::c_int = 255;
+
+pub const _SC_ARG_MAX : ::c_int = 1;
+pub const _SC_CHILD_MAX : ::c_int = 2;
+pub const _SC_NGROUPS_MAX : ::c_int = 4;
+pub const _SC_OPEN_MAX : ::c_int = 5;
+pub const _SC_JOB_CONTROL : ::c_int = 6;
+pub const _SC_SAVED_IDS : ::c_int = 7;
+pub const _SC_VERSION : ::c_int = 8;
+pub const _SC_BC_BASE_MAX : ::c_int = 9;
+pub const _SC_BC_DIM_MAX : ::c_int = 10;
+pub const _SC_BC_SCALE_MAX : ::c_int = 11;
+pub const _SC_BC_STRING_MAX : ::c_int = 12;
+pub const _SC_COLL_WEIGHTS_MAX : ::c_int = 13;
+pub const _SC_EXPR_NEST_MAX : ::c_int = 14;
+pub const _SC_LINE_MAX : ::c_int = 15;
+pub const _SC_RE_DUP_MAX : ::c_int = 16;
+pub const _SC_2_VERSION : ::c_int = 17;
+pub const _SC_2_C_BIND : ::c_int = 18;
+pub const _SC_2_C_DEV : ::c_int = 19;
+pub const _SC_2_CHAR_TERM : ::c_int = 20;
+pub const _SC_2_FORT_DEV : ::c_int = 21;
+pub const _SC_2_FORT_RUN : ::c_int = 22;
+pub const _SC_2_LOCALEDEF : ::c_int = 23;
+pub const _SC_2_SW_DEV : ::c_int = 24;
+pub const _SC_2_UPE : ::c_int = 25;
+pub const _SC_STREAM_MAX : ::c_int = 26;
+pub const _SC_TZNAME_MAX : ::c_int = 27;
+pub const _SC_PAGESIZE : ::c_int = 28;
+pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
+pub const _SC_FSYNC : ::c_int = 29;
+pub const _SC_XOPEN_SHM : ::c_int = 30;
+
+pub const Q_GETQUOTA: ::c_int = 0x300;
+pub const Q_SETQUOTA: ::c_int = 0x400;
+
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+
+pub const LOG_NFACILITIES: ::c_int = 24;
+
+pub const HW_NCPU: ::c_int = 3;
+
+pub const B0: speed_t = 0;
+pub const B50: speed_t = 50;
+pub const B75: speed_t = 75;
+pub const B110: speed_t = 110;
+pub const B134: speed_t = 134;
+pub const B150: speed_t = 150;
+pub const B200: speed_t = 200;
+pub const B300: speed_t = 300;
+pub const B600: speed_t = 600;
+pub const B1200: speed_t = 1200;
+pub const B1800: speed_t = 1800;
+pub const B2400: speed_t = 2400;
+pub const B4800: speed_t = 4800;
+pub const B9600: speed_t = 9600;
+pub const B19200: speed_t = 19200;
+pub const B38400: speed_t = 38400;
+pub const B7200: speed_t = 7200;
+pub const B14400: speed_t = 14400;
+pub const B28800: speed_t = 28800;
+pub const B57600: speed_t = 57600;
+pub const B76800: speed_t = 76800;
+pub const B115200: speed_t = 115200;
+pub const B230400: speed_t = 230400;
+pub const EXTA: speed_t = 19200;
+pub const EXTB: speed_t = 38400;
+
+pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
+
+pub const CRTSCTS: ::tcflag_t = 0x00010000;
+pub const CRTS_IFLOW: ::tcflag_t = CRTSCTS;
+pub const CCTS_OFLOW: ::tcflag_t = CRTSCTS;
+pub const OCRNL: ::tcflag_t = 0x10;
+
+pub const TIOCM_LE: ::c_int = 0o0001;
+pub const TIOCM_DTR: ::c_int = 0o0002;
+pub const TIOCM_RTS: ::c_int = 0o0004;
+pub const TIOCM_ST: ::c_int = 0o0010;
+pub const TIOCM_SR: ::c_int = 0o0020;
+pub const TIOCM_CTS: ::c_int = 0o0040;
+pub const TIOCM_CAR: ::c_int = 0o0100;
+pub const TIOCM_RNG: ::c_int = 0o0200;
+pub const TIOCM_DSR: ::c_int = 0o0400;
+pub const TIOCM_CD: ::c_int = TIOCM_CAR;
+pub const TIOCM_RI: ::c_int = TIOCM_RNG;
+
+f! {
+    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
+        status >> 8
+    }
+
+    pub fn WIFSIGNALED(status: ::c_int) -> bool {
+        (status & 0o177) != 0o177 && (status & 0o177) != 0
+    }
+
+    pub fn WIFSTOPPED(status: ::c_int) -> bool {
+        (status & 0o177) == 0o177
+    }
+}
+
+#[link(name = "util")]
+extern {
+    pub fn mincore(addr: *mut ::c_void, len: ::size_t,
+                   vec: *mut ::c_char) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__clock_getres50")]
+    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__clock_gettime50")]
+    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__clock_settime50")]
+    pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+    pub fn __errno() -> *mut ::c_int;
+    pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t)
+                    -> ::c_int;
+    pub fn memrchr(cx: *const ::c_void,
+                   c: ::c_int,
+                   n: ::size_t) -> *mut ::c_void;
+    pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
+    pub fn mkostemps(template: *mut ::c_char,
+                     suffixlen: ::c_int,
+                     flags: ::c_int) -> ::c_int;
+    pub fn pwritev(fd: ::c_int,
+                   iov: *const ::iovec,
+                   iovcnt: ::c_int,
+                   offset: ::off_t) -> ::ssize_t;
+    pub fn preadv(fd: ::c_int,
+                  iov: *const ::iovec,
+                  iovcnt: ::c_int,
+                  offset: ::off_t) -> ::ssize_t;
+    pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
+    pub fn fdatasync(fd: ::c_int) -> ::c_int;
+    pub fn openpty(amaster: *mut ::c_int,
+                   aslave: *mut ::c_int,
+                   name: *mut ::c_char,
+                   termp: *mut termios,
+                   winp: *mut ::winsize) -> ::c_int;
+    pub fn forkpty(amaster: *mut ::c_int,
+                   name: *mut ::c_char,
+                   termp: *mut termios,
+                   winp: *mut ::winsize) -> ::pid_t;
+    pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
+    pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
+
+    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
+
+    pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
+                   mode: ::mode_t, dev: dev_t) -> ::c_int;
+    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
+                    mode: ::mode_t) -> ::c_int;
+    pub fn sem_timedwait(sem: *mut sem_t,
+                         abstime: *const ::timespec) -> ::c_int;
+    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
+                                     clock_id: ::clockid_t) -> ::c_int;
+    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
+    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
+                                   abstime: *const ::timespec) -> ::c_int;
+    pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
+
+    pub fn getgrouplist(name: *const ::c_char,
+                        basegid: ::gid_t,
+                        groups: *mut ::gid_t,
+                        ngroups: *mut ::c_int) -> ::c_int;
+    pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int;
+    pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
+                   envp: *const *const ::c_char)
+                   -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(target_os = "netbsd")] {
+        mod netbsd;
+        pub use self::netbsd::*;
+    } else if #[cfg(any(target_os = "openbsd", target_os = "bitrig"))] {
+        mod openbsdlike;
+        pub use self::openbsdlike::*;
+    } else {
+        // Unknown target_os
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -0,0 +1,832 @@
+pub type clock_t = ::c_uint;
+pub type suseconds_t = ::c_int;
+pub type dev_t = u64;
+pub type blksize_t = ::int32_t;
+pub type fsblkcnt_t = ::uint64_t;
+pub type fsfilcnt_t = ::uint64_t;
+pub type idtype_t = ::c_int;
+
+s! {
+    pub struct aiocb {
+        pub aio_offset: ::off_t,
+        pub aio_buf: *mut ::c_void,
+        pub aio_nbytes: ::size_t,
+        pub aio_fildes: ::c_int,
+        pub aio_lio_opcode: ::c_int,
+        pub aio_reqprio: ::c_int,
+        pub aio_sigevent: ::sigevent,
+        _state: ::c_int,
+        _errno: ::c_int,
+        _retval: ::ssize_t
+    }
+
+    pub struct dirent {
+        pub d_fileno: ::ino_t,
+        pub d_reclen: u16,
+        pub d_namlen: u16,
+        pub d_type: u8,
+        pub d_name: [::c_char; 512],
+    }
+
+    pub struct glob_t {
+        pub gl_pathc:   ::size_t,
+        pub gl_matchc:  ::size_t,
+        pub gl_offs:    ::size_t,
+        pub gl_flags:   ::c_int,
+        pub gl_pathv:   *mut *mut ::c_char,
+
+        __unused3: *mut ::c_void,
+
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+        __unused6: *mut ::c_void,
+        __unused7: *mut ::c_void,
+        __unused8: *mut ::c_void,
+    }
+
+    pub struct sigevent {
+        pub sigev_notify: ::c_int,
+        pub sigev_signo: ::c_int,
+        pub sigev_value: ::sigval,
+        __unused1: *mut ::c_void,       //actually a function pointer
+        pub sigev_notify_attributes: *mut ::c_void
+    }
+
+    pub struct sigset_t {
+        __bits: [u32; 4],
+    }
+
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_mode: ::mode_t,
+        pub st_ino: ::ino_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        pub st_atime: ::time_t,
+        pub st_atimensec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtimensec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctimensec: ::c_long,
+        pub st_birthtime: ::time_t,
+        pub st_birthtimensec: ::c_long,
+        pub st_size: ::off_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_blksize: ::blksize_t,
+        pub st_flags: ::uint32_t,
+        pub st_gen: ::uint32_t,
+        pub st_spare: [::uint32_t; 2],
+    }
+
+    pub struct statvfs {
+        pub f_flag: ::c_ulong,
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_iosize: ::c_ulong,
+
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_bresvd: ::fsblkcnt_t,
+
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_favail: ::fsfilcnt_t,
+        pub f_fresvd: ::fsfilcnt_t,
+
+        pub f_syncreads: ::uint64_t,
+        pub f_syncwrites: ::uint64_t,
+
+        pub f_asyncreads: ::uint64_t,
+        pub f_asyncwrites: ::uint64_t,
+
+        pub f_fsidx: ::fsid_t,
+        pub f_fsid: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        pub f_owner: ::uid_t,
+
+        pub f_spare: [::uint32_t; 4],
+
+        pub f_fstypename: [::c_char; 32],
+        pub f_mntonname: [::c_char; 1024],
+        pub f_mntfromname: [::c_char; 1024],
+    }
+
+    pub struct addrinfo {
+        pub ai_flags: ::c_int,
+        pub ai_family: ::c_int,
+        pub ai_socktype: ::c_int,
+        pub ai_protocol: ::c_int,
+        pub ai_addrlen: ::socklen_t,
+        pub ai_canonname: *mut ::c_char,
+        pub ai_addr: *mut ::sockaddr,
+        pub ai_next: *mut ::addrinfo,
+    }
+
+    pub struct sockaddr_storage {
+        pub ss_len: u8,
+        pub ss_family: ::sa_family_t,
+        __ss_pad1: [u8; 6],
+        __ss_pad2: i64,
+        __ss_pad3: [u8; 112],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_code: ::c_int,
+        pub si_errno: ::c_int,
+        __pad1: ::c_int,
+        pub si_addr: *mut ::c_void,
+        __pad2: [u64; 13],
+    }
+
+    pub struct pthread_attr_t {
+        pta_magic: ::c_uint,
+        pta_flags: ::c_int,
+        pta_private: *mut ::c_void,
+    }
+
+    pub struct pthread_mutex_t {
+        ptm_magic: ::c_uint,
+        ptm_errorcheck: ::c_uchar,
+        ptm_pad1: [u8; 3],
+        ptm_interlock: ::c_uchar,
+        ptm_pad2: [u8; 3],
+        ptm_owner: ::pthread_t,
+        ptm_waiters: *mut u8,
+        ptm_recursed: ::c_uint,
+        ptm_spare2: *mut ::c_void,
+    }
+
+    pub struct pthread_mutexattr_t {
+        ptma_magic: ::c_uint,
+        ptma_private: *mut ::c_void,
+    }
+
+    pub struct pthread_rwlockattr_t {
+        ptra_magic: ::c_uint,
+        ptra_private: *mut ::c_void,
+    }
+
+    pub struct pthread_cond_t {
+        ptc_magic: ::c_uint,
+        ptc_lock: ::c_uchar,
+        ptc_waiters_first: *mut u8,
+        ptc_waiters_last: *mut u8,
+        ptc_mutex: *mut ::pthread_mutex_t,
+        ptc_private: *mut ::c_void,
+    }
+
+    pub struct pthread_condattr_t {
+        ptca_magic: ::c_uint,
+        ptca_private: *mut ::c_void,
+    }
+
+    pub struct pthread_rwlock_t {
+        ptr_magic: ::c_uint,
+        ptr_interlock: ::c_uchar,
+        ptr_rblocked_first: *mut u8,
+        ptr_rblocked_last: *mut u8,
+        ptr_wblocked_first: *mut u8,
+        ptr_wblocked_last: *mut u8,
+        ptr_nreaders: ::c_uint,
+        ptr_owner: ::pthread_t,
+        ptr_private: *mut ::c_void,
+    }
+
+    pub struct kevent {
+        pub ident: ::uintptr_t,
+        pub filter: ::uint32_t,
+        pub flags: ::uint32_t,
+        pub fflags: ::uint32_t,
+        pub data: ::int64_t,
+        pub udata: ::intptr_t,
+    }
+
+    pub struct dqblk {
+        pub dqb_bhardlimit: ::uint32_t,
+        pub dqb_bsoftlimit: ::uint32_t,
+        pub dqb_curblocks: ::uint32_t,
+        pub dqb_ihardlimit: ::uint32_t,
+        pub dqb_isoftlimit: ::uint32_t,
+        pub dqb_curinodes: ::uint32_t,
+        pub dqb_btime: ::int32_t,
+        pub dqb_itime: ::int32_t,
+    }
+
+    pub struct Dl_info {
+        pub dli_fname: *const ::c_char,
+        pub dli_fbase: *mut ::c_void,
+        pub dli_sname: *const ::c_char,
+        pub dli_saddr: *const ::c_void,
+    }
+
+    pub struct lconv {
+        pub decimal_point: *mut ::c_char,
+        pub thousands_sep: *mut ::c_char,
+        pub grouping: *mut ::c_char,
+        pub int_curr_symbol: *mut ::c_char,
+        pub currency_symbol: *mut ::c_char,
+        pub mon_decimal_point: *mut ::c_char,
+        pub mon_thousands_sep: *mut ::c_char,
+        pub mon_grouping: *mut ::c_char,
+        pub positive_sign: *mut ::c_char,
+        pub negative_sign: *mut ::c_char,
+        pub int_frac_digits: ::c_char,
+        pub frac_digits: ::c_char,
+        pub p_cs_precedes: ::c_char,
+        pub p_sep_by_space: ::c_char,
+        pub n_cs_precedes: ::c_char,
+        pub n_sep_by_space: ::c_char,
+        pub p_sign_posn: ::c_char,
+        pub n_sign_posn: ::c_char,
+        pub int_p_cs_precedes: ::c_char,
+        pub int_n_cs_precedes: ::c_char,
+        pub int_p_sep_by_space: ::c_char,
+        pub int_n_sep_by_space: ::c_char,
+        pub int_p_sign_posn: ::c_char,
+        pub int_n_sign_posn: ::c_char,
+    }
+
+    pub struct if_data {
+        pub ifi_type: ::c_uchar,
+        pub ifi_addrlen: ::c_uchar,
+        pub ifi_hdrlen: ::c_uchar,
+        pub ifi_link_state: ::c_int,
+        pub ifi_mtu: u64,
+        pub ifi_metric: u64,
+        pub ifi_baudrate: u64,
+        pub ifi_ipackets: u64,
+        pub ifi_ierrors: u64,
+        pub ifi_opackets: u64,
+        pub ifi_oerrors: u64,
+        pub ifi_collisions: u64,
+        pub ifi_ibytes: u64,
+        pub ifi_obytes: u64,
+        pub ifi_imcasts: u64,
+        pub ifi_omcasts: u64,
+        pub ifi_iqdrops: u64,
+        pub ifi_noproto: u64,
+        pub ifi_lastchange: ::timespec,
+    }
+
+    pub struct if_msghdr {
+        pub ifm_msglen: ::c_ushort,
+        pub ifm_version: ::c_uchar,
+        pub ifm_type: ::c_uchar,
+        pub ifm_addrs: ::c_int,
+        pub ifm_flags: ::c_int,
+        pub ifm_index: ::c_ushort,
+        pub ifm_data: if_data,
+    }
+}
+
+pub const AT_FDCWD: ::c_int = -100;
+pub const AT_EACCESS: ::c_int = 0x100;
+pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
+pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
+pub const AT_REMOVEDIR: ::c_int = 0x800;
+
+pub const LC_COLLATE_MASK: ::c_int = (1 << ::LC_COLLATE);
+pub const LC_CTYPE_MASK: ::c_int = (1 << ::LC_CTYPE);
+pub const LC_MONETARY_MASK: ::c_int = (1 << ::LC_MONETARY);
+pub const LC_NUMERIC_MASK: ::c_int = (1 << ::LC_NUMERIC);
+pub const LC_TIME_MASK: ::c_int = (1 << ::LC_TIME);
+pub const LC_MESSAGES_MASK: ::c_int = (1 << ::LC_MESSAGES);
+pub const LC_ALL_MASK: ::c_int = !0;
+
+pub const ERA: ::nl_item = 52;
+pub const ERA_D_FMT: ::nl_item = 53;
+pub const ERA_D_T_FMT: ::nl_item = 54;
+pub const ERA_T_FMT: ::nl_item = 55;
+pub const ALT_DIGITS: ::nl_item = 56;
+
+pub const O_CLOEXEC: ::c_int = 0x400000;
+pub const O_ALT_IO: ::c_int = 0x40000;
+pub const O_NOSIGPIPE: ::c_int = 0x1000000;
+pub const O_SEARCH: ::c_int = 0x800000;
+pub const O_DIRECTORY: ::c_int = 0x200000;
+pub const O_DIRECT : ::c_int = 0x00080000;
+pub const O_RSYNC : ::c_int = 0x00020000;
+
+pub const MS_SYNC : ::c_int = 0x4;
+pub const MS_INVALIDATE : ::c_int = 0x2;
+
+pub const RLIM_NLIMITS: ::c_int = 12;
+
+pub const ENOATTR : ::c_int = 93;
+pub const EILSEQ : ::c_int = 85;
+pub const EOVERFLOW : ::c_int = 84;
+pub const ECANCELED : ::c_int = 87;
+pub const EIDRM : ::c_int = 82;
+pub const ENOMSG : ::c_int = 83;
+pub const ENOTSUP : ::c_int = 86;
+pub const ELAST : ::c_int = 96;
+
+pub const F_DUPFD_CLOEXEC : ::c_int = 12;
+pub const F_CLOSEM: ::c_int = 10;
+pub const F_GETNOSIGPIPE: ::c_int = 13;
+pub const F_SETNOSIGPIPE: ::c_int = 14;
+pub const F_MAXFD: ::c_int = 11;
+
+pub const IPV6_JOIN_GROUP: ::c_int = 12;
+pub const IPV6_LEAVE_GROUP: ::c_int = 13;
+
+pub const SOCK_CONN_DGRAM: ::c_int = 6;
+pub const SOCK_DCCP: ::c_int = SOCK_CONN_DGRAM;
+pub const SOCK_NOSIGPIPE: ::c_int = 0x40000000;
+pub const SOCK_FLAGS_MASK: ::c_int = 0xf0000000;
+
+pub const SO_SNDTIMEO: ::c_int = 0x100b;
+pub const SO_RCVTIMEO: ::c_int = 0x100c;
+pub const SO_ACCEPTFILTER: ::c_int = 0x1000;
+pub const SO_TIMESTAMP: ::c_int = 0x2000;
+pub const SO_OVERFLOWED: ::c_int = 0x1009;
+pub const SO_NOHEADER: ::c_int = 0x100a;
+
+pub const AF_OROUTE: ::c_int = 17;
+pub const AF_ARP: ::c_int = 28;
+pub const pseudo_AF_KEY: ::c_int = 29;
+pub const pseudo_AF_HDRCMPLT: ::c_int = 30;
+pub const AF_BLUETOOTH: ::c_int = 31;
+pub const AF_IEEE80211: ::c_int = 32;
+pub const AF_MPLS: ::c_int = 33;
+pub const AF_ROUTE: ::c_int = 34;
+pub const AF_MAX: ::c_int = 35;
+
+pub const NET_MAXID: ::c_int = AF_MAX;
+pub const NET_RT_DUMP: ::c_int = 1;
+pub const NET_RT_FLAGS: ::c_int = 2;
+pub const NET_RT_OOIFLIST: ::c_int = 3;
+pub const NET_RT_OIFLIST: ::c_int = 4;
+pub const NET_RT_IFLIST: ::c_int = 5;
+pub const NET_RT_MAXID: ::c_int = 6;
+
+pub const PF_OROUTE: ::c_int = AF_OROUTE;
+pub const PF_ARP: ::c_int = AF_ARP;
+pub const PF_KEY: ::c_int = pseudo_AF_KEY;
+pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
+pub const PF_MPLS: ::c_int = AF_MPLS;
+pub const PF_ROUTE: ::c_int = AF_ROUTE;
+pub const PF_MAX: ::c_int = AF_MAX;
+
+pub const MSG_NBIO: ::c_int = 0x1000;
+pub const MSG_WAITFORONE: ::c_int = 0x2000;
+pub const MSG_NOTIFICATION: ::c_int = 0x4000;
+
+pub const SCM_TIMESTAMP: ::c_int = 0x08;
+pub const SCM_CREDS: ::c_int = 0x10;
+
+pub const O_DSYNC : ::c_int = 0x10000;
+
+pub const MAP_RENAME : ::c_int = 0x20;
+pub const MAP_NORESERVE : ::c_int = 0x40;
+pub const MAP_HASSEMAPHORE : ::c_int = 0x200;
+pub const MAP_WIRED: ::c_int = 0x800;
+
+pub const _PC_LINK_MAX : ::c_int = 1;
+pub const _PC_MAX_CANON : ::c_int = 2;
+pub const _PC_MAX_INPUT : ::c_int = 3;
+pub const _PC_NAME_MAX : ::c_int = 4;
+pub const _PC_PATH_MAX : ::c_int = 5;
+pub const _PC_PIPE_BUF : ::c_int = 6;
+pub const _PC_CHOWN_RESTRICTED : ::c_int = 7;
+pub const _PC_NO_TRUNC : ::c_int = 8;
+pub const _PC_VDISABLE : ::c_int = 9;
+pub const _PC_SYNC_IO : ::c_int = 10;
+pub const _PC_FILESIZEBITS : ::c_int = 11;
+pub const _PC_SYMLINK_MAX : ::c_int = 12;
+pub const _PC_2_SYMLINKS : ::c_int = 13;
+pub const _PC_ACL_EXTENDED : ::c_int = 14;
+pub const _PC_MIN_HOLE_SIZE : ::c_int = 15;
+
+pub const _SC_SYNCHRONIZED_IO : ::c_int = 31;
+pub const _SC_IOV_MAX : ::c_int = 32;
+pub const _SC_MAPPED_FILES : ::c_int = 33;
+pub const _SC_MEMLOCK : ::c_int = 34;
+pub const _SC_MEMLOCK_RANGE : ::c_int = 35;
+pub const _SC_MEMORY_PROTECTION : ::c_int = 36;
+pub const _SC_LOGIN_NAME_MAX : ::c_int = 37;
+pub const _SC_MONOTONIC_CLOCK : ::c_int = 38;
+pub const _SC_CLK_TCK : ::c_int = 39;
+pub const _SC_ATEXIT_MAX : ::c_int = 40;
+pub const _SC_THREADS : ::c_int = 41;
+pub const _SC_SEMAPHORES : ::c_int = 42;
+pub const _SC_BARRIERS : ::c_int = 43;
+pub const _SC_TIMERS : ::c_int = 44;
+pub const _SC_SPIN_LOCKS : ::c_int = 45;
+pub const _SC_READER_WRITER_LOCKS : ::c_int = 46;
+pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 47;
+pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 48;
+pub const _SC_CLOCK_SELECTION : ::c_int = 49;
+pub const _SC_ASYNCHRONOUS_IO : ::c_int = 50;
+pub const _SC_AIO_LISTIO_MAX : ::c_int = 51;
+pub const _SC_AIO_MAX : ::c_int = 52;
+pub const _SC_MESSAGE_PASSING : ::c_int = 53;
+pub const _SC_MQ_OPEN_MAX : ::c_int = 54;
+pub const _SC_MQ_PRIO_MAX : ::c_int = 55;
+pub const _SC_PRIORITY_SCHEDULING : ::c_int = 56;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 57;
+pub const _SC_THREAD_KEYS_MAX : ::c_int = 58;
+pub const _SC_THREAD_STACK_MIN : ::c_int = 59;
+pub const _SC_THREAD_THREADS_MAX : ::c_int = 60;
+pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 61;
+pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 62;
+pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 63;
+pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 64;
+pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 65;
+pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 66;
+pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 67;
+pub const _SC_TTY_NAME_MAX : ::c_int = 68;
+pub const _SC_HOST_NAME_MAX : ::c_int = 69;
+pub const _SC_PASS_MAX : ::c_int = 70;
+pub const _SC_REGEXP : ::c_int = 71;
+pub const _SC_SHELL : ::c_int = 72;
+pub const _SC_SYMLOOP_MAX : ::c_int = 73;
+pub const _SC_V6_ILP32_OFF32 : ::c_int = 74;
+pub const _SC_V6_ILP32_OFFBIG : ::c_int = 75;
+pub const _SC_V6_LP64_OFF64 : ::c_int = 76;
+pub const _SC_V6_LPBIG_OFFBIG : ::c_int = 77;
+pub const _SC_2_PBS : ::c_int = 80;
+pub const _SC_2_PBS_ACCOUNTING : ::c_int = 81;
+pub const _SC_2_PBS_CHECKPOINT : ::c_int = 82;
+pub const _SC_2_PBS_LOCATE : ::c_int = 83;
+pub const _SC_2_PBS_MESSAGE : ::c_int = 84;
+pub const _SC_2_PBS_TRACK : ::c_int = 85;
+pub const _SC_SPAWN : ::c_int = 86;
+pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 87;
+pub const _SC_TIMER_MAX : ::c_int = 88;
+pub const _SC_SEM_NSEMS_MAX : ::c_int = 89;
+pub const _SC_CPUTIME : ::c_int = 90;
+pub const _SC_THREAD_CPUTIME : ::c_int = 91;
+pub const _SC_DELAYTIMER_MAX : ::c_int = 92;
+// These two variables will be supported in NetBSD 8.0
+// pub const _SC_SIGQUEUE_MAX : ::c_int = 93;
+// pub const _SC_REALTIME_SIGNALS : ::c_int = 94;
+pub const _SC_PHYS_PAGES : ::c_int = 121;
+pub const _SC_NPROCESSORS_CONF : ::c_int = 1001;
+pub const _SC_NPROCESSORS_ONLN : ::c_int = 1002;
+pub const _SC_SCHED_RT_TS : ::c_int = 2001;
+pub const _SC_SCHED_PRI_MIN : ::c_int = 2002;
+pub const _SC_SCHED_PRI_MAX : ::c_int = 2003;
+
+pub const FD_SETSIZE: usize = 0x100;
+
+pub const ST_NOSUID: ::c_ulong = 8;
+
+pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
+    ptm_magic: 0x33330003,
+    ptm_errorcheck: 0,
+    ptm_interlock: 0,
+    ptm_waiters: 0 as *mut _,
+    ptm_owner: 0,
+    ptm_pad1: [0; 3],
+    ptm_pad2: [0; 3],
+    ptm_recursed: 0,
+    ptm_spare2: 0 as *mut _,
+};
+pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
+    ptc_magic: 0x55550005,
+    ptc_lock: 0,
+    ptc_waiters_first: 0 as *mut _,
+    ptc_waiters_last: 0 as *mut _,
+    ptc_mutex: 0 as *mut _,
+    ptc_private: 0 as *mut _,
+};
+pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
+    ptr_magic: 0x99990009,
+    ptr_interlock: 0,
+    ptr_rblocked_first: 0 as *mut _,
+    ptr_rblocked_last: 0 as *mut _,
+    ptr_wblocked_first: 0 as *mut _,
+    ptr_wblocked_last: 0 as *mut _,
+    ptr_nreaders: 0,
+    ptr_owner: 0,
+    ptr_private: 0 as *mut _,
+};
+pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
+pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
+pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
+pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
+
+pub const EVFILT_AIO: ::int32_t = 2;
+pub const EVFILT_PROC: ::int32_t = 4;
+pub const EVFILT_READ: ::int32_t = 0;
+pub const EVFILT_SIGNAL: ::int32_t = 5;
+pub const EVFILT_TIMER: ::int32_t = 6;
+pub const EVFILT_VNODE: ::int32_t = 3;
+pub const EVFILT_WRITE: ::int32_t = 1;
+
+pub const EV_ADD: ::uint32_t = 0x1;
+pub const EV_DELETE: ::uint32_t = 0x2;
+pub const EV_ENABLE: ::uint32_t = 0x4;
+pub const EV_DISABLE: ::uint32_t = 0x8;
+pub const EV_ONESHOT: ::uint32_t = 0x10;
+pub const EV_CLEAR: ::uint32_t = 0x20;
+pub const EV_RECEIPT: ::uint32_t = 0x40;
+pub const EV_DISPATCH: ::uint32_t = 0x80;
+pub const EV_FLAG1: ::uint32_t = 0x2000;
+pub const EV_ERROR: ::uint32_t = 0x4000;
+pub const EV_EOF: ::uint32_t = 0x8000;
+pub const EV_SYSFLAGS: ::uint32_t = 0xf000;
+
+pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
+pub const NOTE_DELETE: ::uint32_t = 0x00000001;
+pub const NOTE_WRITE: ::uint32_t = 0x00000002;
+pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
+pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
+pub const NOTE_LINK: ::uint32_t = 0x00000010;
+pub const NOTE_RENAME: ::uint32_t = 0x00000020;
+pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
+pub const NOTE_EXIT: ::uint32_t = 0x80000000;
+pub const NOTE_FORK: ::uint32_t = 0x40000000;
+pub const NOTE_EXEC: ::uint32_t = 0x20000000;
+pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
+pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
+pub const NOTE_TRACK: ::uint32_t = 0x00000001;
+pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
+pub const NOTE_CHILD: ::uint32_t = 0x00000004;
+
+pub const TMP_MAX : ::c_uint = 308915776;
+
+pub const NI_MAXHOST: ::socklen_t = 1025;
+
+pub const RTLD_NOLOAD: ::c_int = 0x2000;
+pub const RTLD_LOCAL: ::c_int = 0x200;
+
+pub const CTL_MAXNAME: ::c_int = 12;
+pub const SYSCTL_NAMELEN: ::c_int = 32;
+pub const SYSCTL_DEFSIZE: ::c_int = 8;
+pub const CTLTYPE_NODE: ::c_int = 1;
+pub const CTLTYPE_INT: ::c_int = 2;
+pub const CTLTYPE_STRING: ::c_int = 3;
+pub const CTLTYPE_QUAD: ::c_int = 4;
+pub const CTLTYPE_STRUCT: ::c_int = 5;
+pub const CTLTYPE_BOOL: ::c_int = 6;
+pub const CTLFLAG_READONLY: ::c_int = 0x00000000;
+pub const CTLFLAG_READWRITE: ::c_int = 0x00000070;
+pub const CTLFLAG_ANYWRITE: ::c_int = 0x00000080;
+pub const CTLFLAG_PRIVATE: ::c_int = 0x00000100;
+pub const CTLFLAG_PERMANENT: ::c_int = 0x00000200;
+pub const CTLFLAG_OWNDATA: ::c_int = 0x00000400;
+pub const CTLFLAG_IMMEDIATE: ::c_int = 0x00000800;
+pub const CTLFLAG_HEX: ::c_int = 0x00001000;
+pub const CTLFLAG_ROOT: ::c_int = 0x00002000;
+pub const CTLFLAG_ANYNUMBER: ::c_int = 0x00004000;
+pub const CTLFLAG_HIDDEN: ::c_int = 0x00008000;
+pub const CTLFLAG_ALIAS: ::c_int = 0x00010000;
+pub const CTLFLAG_MMAP: ::c_int = 0x00020000;
+pub const CTLFLAG_OWNDESC: ::c_int = 0x00040000;
+pub const CTLFLAG_UNSIGNED: ::c_int = 0x00080000;
+pub const SYSCTL_VERS_MASK: ::c_int = 0xff000000;
+pub const SYSCTL_VERS_0: ::c_int = 0x00000000;
+pub const SYSCTL_VERS_1: ::c_int = 0x01000000;
+pub const SYSCTL_VERSION: ::c_int = SYSCTL_VERS_1;
+pub const CTL_EOL: ::c_int = -1;
+pub const CTL_QUERY: ::c_int = -2;
+pub const CTL_CREATE: ::c_int = -3;
+pub const CTL_CREATESYM: ::c_int = -4;
+pub const CTL_DESTROY: ::c_int = -5;
+pub const CTL_MMAP: ::c_int = -6;
+pub const CTL_DESCRIBE: ::c_int = -7;
+pub const CTL_UNSPEC: ::c_int = 0;
+pub const CTL_KERN: ::c_int = 1;
+pub const CTL_VM: ::c_int = 2;
+pub const CTL_VFS: ::c_int = 3;
+pub const CTL_NET: ::c_int = 4;
+pub const CTL_DEBUG: ::c_int = 5;
+pub const CTL_HW: ::c_int = 6;
+pub const CTL_MACHDEP: ::c_int = 7;
+pub const CTL_USER: ::c_int = 8;
+pub const CTL_DDB: ::c_int = 9;
+pub const CTL_PROC: ::c_int = 10;
+pub const CTL_VENDOR: ::c_int = 11;
+pub const CTL_EMUL: ::c_int = 12;
+pub const CTL_SECURITY: ::c_int = 13;
+pub const CTL_MAXID: ::c_int = 14;
+pub const KERN_OSTYPE: ::c_int = 1;
+pub const KERN_OSRELEASE: ::c_int = 2;
+pub const KERN_OSREV: ::c_int = 3;
+pub const KERN_VERSION: ::c_int = 4;
+pub const KERN_MAXVNODES: ::c_int = 5;
+pub const KERN_MAXPROC: ::c_int = 6;
+pub const KERN_MAXFILES: ::c_int = 7;
+pub const KERN_ARGMAX: ::c_int = 8;
+pub const KERN_SECURELVL: ::c_int = 9;
+pub const KERN_HOSTNAME: ::c_int = 10;
+pub const KERN_HOSTID: ::c_int = 11;
+pub const KERN_CLOCKRATE: ::c_int = 12;
+pub const KERN_VNODE: ::c_int = 13;
+pub const KERN_PROC: ::c_int = 14;
+pub const KERN_FILE: ::c_int = 15;
+pub const KERN_PROF: ::c_int = 16;
+pub const KERN_POSIX1: ::c_int = 17;
+pub const KERN_NGROUPS: ::c_int = 18;
+pub const KERN_JOB_CONTROL: ::c_int = 19;
+pub const KERN_SAVED_IDS: ::c_int = 20;
+pub const KERN_OBOOTTIME: ::c_int = 21;
+pub const KERN_DOMAINNAME: ::c_int = 22;
+pub const KERN_MAXPARTITIONS: ::c_int = 23;
+pub const KERN_RAWPARTITION: ::c_int = 24;
+pub const KERN_NTPTIME: ::c_int = 25;
+pub const KERN_TIMEX: ::c_int = 26;
+pub const KERN_AUTONICETIME: ::c_int = 27;
+pub const KERN_AUTONICEVAL: ::c_int = 28;
+pub const KERN_RTC_OFFSET: ::c_int = 29;
+pub const KERN_ROOT_DEVICE: ::c_int = 30;
+pub const KERN_MSGBUFSIZE: ::c_int = 31;
+pub const KERN_FSYNC: ::c_int = 32;
+pub const KERN_OLDSYSVMSG: ::c_int = 33;
+pub const KERN_OLDSYSVSEM: ::c_int = 34;
+pub const KERN_OLDSYSVSHM: ::c_int = 35;
+pub const KERN_OLDSHORTCORENAME: ::c_int = 36;
+pub const KERN_SYNCHRONIZED_IO: ::c_int = 37;
+pub const KERN_IOV_MAX: ::c_int = 38;
+pub const KERN_MBUF: ::c_int = 39;
+pub const KERN_MAPPED_FILES: ::c_int = 40;
+pub const KERN_MEMLOCK: ::c_int = 41;
+pub const KERN_MEMLOCK_RANGE: ::c_int = 42;
+pub const KERN_MEMORY_PROTECTION: ::c_int = 43;
+pub const KERN_LOGIN_NAME_MAX: ::c_int = 44;
+pub const KERN_DEFCORENAME: ::c_int = 45;
+pub const KERN_LOGSIGEXIT: ::c_int = 46;
+pub const KERN_PROC2: ::c_int = 47;
+pub const KERN_PROC_ARGS: ::c_int = 48;
+pub const KERN_FSCALE: ::c_int = 49;
+pub const KERN_CCPU: ::c_int = 50;
+pub const KERN_CP_TIME: ::c_int = 51;
+pub const KERN_OLDSYSVIPC_INFO: ::c_int = 52;
+pub const KERN_MSGBUF: ::c_int = 53;
+pub const KERN_CONSDEV: ::c_int = 54;
+pub const KERN_MAXPTYS: ::c_int = 55;
+pub const KERN_PIPE: ::c_int = 56;
+pub const KERN_MAXPHYS: ::c_int = 57;
+pub const KERN_SBMAX: ::c_int = 58;
+pub const KERN_TKSTAT: ::c_int = 59;
+pub const KERN_MONOTONIC_CLOCK: ::c_int = 60;
+pub const KERN_URND: ::c_int = 61;
+pub const KERN_LABELSECTOR: ::c_int = 62;
+pub const KERN_LABELOFFSET: ::c_int = 63;
+pub const KERN_LWP: ::c_int = 64;
+pub const KERN_FORKFSLEEP: ::c_int = 65;
+pub const KERN_POSIX_THREADS: ::c_int = 66;
+pub const KERN_POSIX_SEMAPHORES: ::c_int = 67;
+pub const KERN_POSIX_BARRIERS: ::c_int = 68;
+pub const KERN_POSIX_TIMERS: ::c_int = 69;
+pub const KERN_POSIX_SPIN_LOCKS: ::c_int = 70;
+pub const KERN_POSIX_READER_WRITER_LOCKS: ::c_int = 71;
+pub const KERN_DUMP_ON_PANIC: ::c_int = 72;
+pub const KERN_SOMAXKVA: ::c_int = 73;
+pub const KERN_ROOT_PARTITION: ::c_int = 74;
+pub const KERN_DRIVERS: ::c_int = 75;
+pub const KERN_BUF: ::c_int = 76;
+pub const KERN_FILE2: ::c_int = 77;
+pub const KERN_VERIEXEC: ::c_int = 78;
+pub const KERN_CP_ID: ::c_int = 79;
+pub const KERN_HARDCLOCK_TICKS: ::c_int = 80;
+pub const KERN_ARND: ::c_int = 81;
+pub const KERN_SYSVIPC: ::c_int = 82;
+pub const KERN_BOOTTIME: ::c_int = 83;
+pub const KERN_EVCNT: ::c_int = 84;
+pub const KERN_MAXID: ::c_int = 85;
+pub const KERN_PROC_ALL: ::c_int = 0;
+pub const KERN_PROC_PID: ::c_int = 1;
+pub const KERN_PROC_PGRP: ::c_int = 2;
+pub const KERN_PROC_SESSION: ::c_int = 3;
+pub const KERN_PROC_TTY: ::c_int = 4;
+pub const KERN_PROC_UID: ::c_int = 5;
+pub const KERN_PROC_RUID: ::c_int = 6;
+pub const KERN_PROC_GID: ::c_int = 7;
+pub const KERN_PROC_RGID: ::c_int = 8;
+
+pub const EAI_SYSTEM: ::c_int = 11;
+
+pub const AIO_CANCELED: ::c_int = 1;
+pub const AIO_NOTCANCELED: ::c_int = 2;
+pub const AIO_ALLDONE: ::c_int = 3;
+pub const LIO_NOP: ::c_int = 0;
+pub const LIO_WRITE: ::c_int = 1;
+pub const LIO_READ: ::c_int = 2;
+pub const LIO_WAIT: ::c_int = 1;
+pub const LIO_NOWAIT: ::c_int = 0;
+
+pub const SIGEV_NONE: ::c_int = 0;
+pub const SIGEV_SIGNAL: ::c_int = 1;
+pub const SIGEV_THREAD: ::c_int = 2;
+
+pub const WSTOPPED: ::c_int = 0x00000002; // same as WUNTRACED
+pub const WCONTINUED: ::c_int = 0x00000010;
+pub const WEXITED: ::c_int = 0x000000020;
+pub const WNOWAIT: ::c_int = 0x00010000;
+
+pub const P_ALL: idtype_t = 0;
+pub const P_PID: idtype_t = 1;
+pub const P_PGID: idtype_t = 4;
+
+pub const B460800: ::speed_t = 460800;
+pub const B921600: ::speed_t = 921600;
+
+pub const ONOCR: ::tcflag_t = 0x20;
+pub const ONLRET: ::tcflag_t = 0x40;
+pub const CDTRCTS: ::tcflag_t = 0x00020000;
+pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS | ::CDTRCTS;
+
+pub const SOCK_CLOEXEC: ::c_int = 0x10000000;
+pub const SOCK_NONBLOCK: ::c_int = 0x20000000;
+
+// dirfd() is a macro on netbsd to access
+// the first field of the struct where dirp points to:
+// http://cvsweb.netbsd.org/bsdweb.cgi/src/include/dirent.h?rev=1.36
+f! {
+    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int {
+        unsafe { *(dirp as *const ::c_int) }
+    }
+
+    pub fn WIFCONTINUED(status: ::c_int) -> bool {
+        status == 0xffff
+    }
+}
+
+extern {
+    pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
+    pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
+    pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
+    pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
+    pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
+    #[link_name = "__aio_suspend50"]
+    pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
+                       timeout: *const ::timespec) -> ::c_int;
+    pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
+    pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
+                      nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
+
+    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
+    pub fn getnameinfo(sa: *const ::sockaddr,
+                       salen: ::socklen_t,
+                       host: *mut ::c_char,
+                       hostlen: ::socklen_t,
+                       serv: *mut ::c_char,
+                       sevlen: ::socklen_t,
+                       flags: ::c_int) -> ::c_int;
+    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
+                    -> ::c_int;
+    pub fn sysctl(name: *const ::c_int,
+                  namelen: ::c_uint,
+                  oldp: *mut ::c_void,
+                  oldlenp: *mut ::size_t,
+                  newp: *const ::c_void,
+                  newlen: ::size_t)
+                  -> ::c_int;
+    pub fn sysctlbyname(name: *const ::c_char,
+                        oldp: *mut ::c_void,
+                        oldlenp: *mut ::size_t,
+                        newp: *const ::c_void,
+                        newlen: ::size_t)
+                        -> ::c_int;
+    #[link_name = "__kevent50"]
+    pub fn kevent(kq: ::c_int,
+                  changelist: *const ::kevent,
+                  nchanges: ::size_t,
+                  eventlist: *mut ::kevent,
+                  nevents: ::size_t,
+                  timeout: *const ::timespec) -> ::c_int;
+    #[link_name = "__mount50"]
+    pub fn mount(src: *const ::c_char,
+                 target: *const ::c_char,
+                 flags: ::c_int,
+                 data: *mut ::c_void,
+                 size: ::size_t) -> ::c_int;
+    pub fn ptrace(request: ::c_int,
+                  pid: ::pid_t,
+                  addr: *mut ::c_void,
+                  data: ::c_int) -> ::c_int;
+    pub fn pthread_setname_np(t: ::pthread_t,
+                              name: *const ::c_char,
+                              arg: *mut ::c_void) -> ::c_int;
+    pub fn pthread_getattr_np(native: ::pthread_t,
+                              attr: *mut ::pthread_attr_t) -> ::c_int;
+    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
+                                     guardsize: *mut ::size_t) -> ::c_int;
+    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
+                                 stackaddr: *mut *mut ::c_void,
+                                 stacksize: *mut ::size_t) -> ::c_int;
+    #[link_name = "__sigtimedwait50"]
+    pub fn sigtimedwait(set: *const sigset_t,
+                        info: *mut siginfo_t,
+                        timeout: *const ::timespec) -> ::c_int;
+    pub fn sigwaitinfo(set: *const sigset_t,
+                       info: *mut siginfo_t) -> ::c_int;
+    pub fn duplocale(base: ::locale_t) -> ::locale_t;
+    pub fn freelocale(loc: ::locale_t);
+    pub fn localeconv_l(loc: ::locale_t) -> *mut lconv;
+    pub fn newlocale(mask: ::c_int,
+                     locale: *const ::c_char,
+                     base: ::locale_t) -> ::locale_t;
+    #[link_name = "__settimeofday50"]
+    pub fn settimeofday(tv: *const ::timeval, tz: *const ::c_void) -> ::c_int;
+}
+
+mod other;
+pub use self::other::*;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs
@@ -0,0 +1,2 @@
+pub type c_long = i32;
+pub type c_ulong = u32;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs
@@ -0,0 +1,2 @@
+pub type c_long = i64;
+pub type c_ulong = u64;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/netbsd/other/mod.rs
@@ -0,0 +1,14 @@
+cfg_if! {
+    if #[cfg(any(target_arch = "sparc64",
+                 target_arch = "x86_64"))] {
+        mod b64;
+        pub use self::b64::*;
+    } else if #[cfg(any(target_arch = "arm",
+                        target_arch = "powerpc",
+                        target_arch = "x86"))] {
+        mod b32;
+        pub use self::b32::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/openbsdlike/bitrig.rs
@@ -0,0 +1,75 @@
+s! {
+    pub struct lconv {
+        pub decimal_point: *mut ::c_char,
+        pub thousands_sep: *mut ::c_char,
+        pub grouping: *mut ::c_char,
+        pub int_curr_symbol: *mut ::c_char,
+        pub currency_symbol: *mut ::c_char,
+        pub mon_decimal_point: *mut ::c_char,
+        pub mon_thousands_sep: *mut ::c_char,
+        pub mon_grouping: *mut ::c_char,
+        pub positive_sign: *mut ::c_char,
+        pub negative_sign: *mut ::c_char,
+        pub int_frac_digits: ::c_char,
+        pub frac_digits: ::c_char,
+        pub p_cs_precedes: ::c_char,
+        pub p_sep_by_space: ::c_char,
+        pub n_cs_precedes: ::c_char,
+        pub n_sep_by_space: ::c_char,
+        pub p_sign_posn: ::c_char,
+        pub n_sign_posn: ::c_char,
+        pub int_p_cs_precedes: ::c_char,
+        pub int_n_cs_precedes: ::c_char,
+        pub int_p_sep_by_space: ::c_char,
+        pub int_n_sep_by_space: ::c_char,
+        pub int_p_sign_posn: ::c_char,
+        pub int_n_sign_posn: ::c_char,
+    }
+}
+
+pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
+pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
+pub const LC_MESSAGES_MASK: ::c_int = (1 << 2);
+pub const LC_MONETARY_MASK: ::c_int = (1 << 3);
+pub const LC_NUMERIC_MASK: ::c_int = (1 << 4);
+pub const LC_TIME_MASK: ::c_int = (1 << 5);
+pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
+                               | LC_CTYPE_MASK
+                               | LC_MESSAGES_MASK
+                               | LC_MONETARY_MASK
+                               | LC_NUMERIC_MASK
+                               | LC_TIME_MASK;
+
+pub const ERA: ::nl_item = 52;
+pub const ERA_D_FMT: ::nl_item = 53;
+pub const ERA_D_T_FMT: ::nl_item = 54;
+pub const ERA_T_FMT: ::nl_item = 55;
+pub const ALT_DIGITS: ::nl_item = 56;
+
+pub const D_MD_ORDER: ::nl_item = 57;
+
+pub const ALTMON_1: ::nl_item = 58;
+pub const ALTMON_2: ::nl_item = 59;
+pub const ALTMON_3: ::nl_item = 60;
+pub const ALTMON_4: ::nl_item = 61;
+pub const ALTMON_5: ::nl_item = 62;
+pub const ALTMON_6: ::nl_item = 63;
+pub const ALTMON_7: ::nl_item = 64;
+pub const ALTMON_8: ::nl_item = 65;
+pub const ALTMON_9: ::nl_item = 66;
+pub const ALTMON_10: ::nl_item = 67;
+pub const ALTMON_11: ::nl_item = 68;
+pub const ALTMON_12: ::nl_item = 69;
+
+pub const KERN_RND: ::c_int = 31;
+
+extern {
+    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
+    pub fn duplocale(base: ::locale_t) -> ::locale_t;
+    pub fn freelocale(loc: ::locale_t) -> ::c_int;
+    pub fn newlocale(mask: ::c_int,
+                     locale: *const ::c_char,
+                     base: ::locale_t) -> ::locale_t;
+    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
+    pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
@@ -0,0 +1,642 @@
+use unix::bsd::O_SYNC;
+
+pub type clock_t = i64;
+pub type suseconds_t = ::c_long;
+pub type dev_t = i32;
+pub type sigset_t = ::c_uint;
+pub type blksize_t = ::int32_t;
+pub type fsblkcnt_t = ::uint64_t;
+pub type fsfilcnt_t = ::uint64_t;
+pub type pthread_attr_t = *mut ::c_void;
+pub type pthread_mutex_t = *mut ::c_void;
+pub type pthread_mutexattr_t = *mut ::c_void;
+pub type pthread_cond_t = *mut ::c_void;
+pub type pthread_condattr_t = *mut ::c_void;
+pub type pthread_rwlock_t = *mut ::c_void;
+pub type pthread_rwlockattr_t = *mut ::c_void;
+
+s! {
+    pub struct dirent {
+        pub d_fileno: ::ino_t,
+        pub d_off: ::off_t,
+        pub d_reclen: u16,
+        pub d_type: u8,
+        pub d_namlen: u8,
+        __d_padding: [u8; 4],
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct glob_t {
+        pub gl_pathc:   ::c_int,
+        pub gl_matchc:  ::c_int,
+        pub gl_offs:    ::c_int,
+        pub gl_flags:   ::c_int,
+        pub gl_pathv:   *mut *mut ::c_char,
+        __unused1: *mut ::c_void,
+        __unused2: *mut ::c_void,
+        __unused3: *mut ::c_void,
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+        __unused6: *mut ::c_void,
+        __unused7: *mut ::c_void,
+    }
+
+    pub struct kevent {
+        pub ident: ::uintptr_t,
+        pub filter: ::c_short,
+        pub flags: ::c_ushort,
+        pub fflags: ::c_uint,
+        pub data: ::int64_t,
+        pub udata: *mut ::c_void,
+    }
+
+    pub struct stat {
+        pub st_mode: ::mode_t,
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_size: ::off_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_blksize: ::blksize_t,
+        pub st_flags: ::uint32_t,
+        pub st_gen: ::uint32_t,
+        pub st_birthtime: ::time_t,
+        pub st_birthtime_nsec: ::c_long,
+    }
+
+    pub struct statvfs {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_favail: ::fsfilcnt_t,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+    }
+
+    pub struct addrinfo {
+        pub ai_flags: ::c_int,
+        pub ai_family: ::c_int,
+        pub ai_socktype: ::c_int,
+        pub ai_protocol: ::c_int,
+        pub ai_addrlen: ::socklen_t,
+        pub ai_addr: *mut ::sockaddr,
+        pub ai_canonname: *mut ::c_char,
+        pub ai_next: *mut ::addrinfo,
+    }
+
+    pub struct sockaddr_storage {
+        pub ss_len: u8,
+        pub ss_family: ::sa_family_t,
+        __ss_pad1: [u8; 6],
+        __ss_pad2: i64,
+        __ss_pad3: [u8; 240],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_code: ::c_int,
+        pub si_errno: ::c_int,
+        pub si_addr: *mut ::c_char,
+        #[cfg(target_pointer_width = "32")]
+        __pad: [u8; 112],
+        #[cfg(target_pointer_width = "64")]
+        __pad: [u8; 108],
+    }
+
+    pub struct Dl_info {
+        pub dli_fname: *const ::c_char,
+        pub dli_fbase: *mut ::c_void,
+        pub dli_sname: *const ::c_char,
+        pub dli_saddr: *mut ::c_void,
+    }
+
+    pub struct lastlog {
+        ll_time: ::time_t,
+        ll_line: [::c_char; UT_LINESIZE],
+        ll_host: [::c_char; UT_HOSTSIZE],
+    }
+
+    pub struct utmp {
+        pub ut_line: [::c_char; UT_LINESIZE],
+        pub ut_name: [::c_char; UT_NAMESIZE],
+        pub ut_host: [::c_char; UT_HOSTSIZE],
+        pub ut_time: ::time_t,
+    }
+
+    pub struct if_data {
+        pub ifi_type: ::c_uchar,
+        pub ifi_addrlen: ::c_uchar,
+        pub ifi_hdrlen: ::c_uchar,
+        pub ifi_link_state: ::c_uchar,
+        pub ifi_mtu: u32,
+        pub ifi_metric: u32,
+        pub ifi_rdomain: u32,
+        pub ifi_baudrate: u64,
+        pub ifi_ipackets: u64,
+        pub ifi_ierrors: u64,
+        pub ifi_opackets: u64,
+        pub ifi_oerrors: u64,
+        pub ifi_collisions: u64,
+        pub ifi_ibytes: u64,
+        pub ifi_obytes: u64,
+        pub ifi_imcasts: u64,
+        pub ifi_omcasts: u64,
+        pub ifi_iqdrops: u64,
+        pub ifi_oqdrops: u64,
+        pub ifi_noproto: u64,
+        pub ifi_capabilities: u32,
+        pub ifi_lastchange: ::timeval,
+    }
+
+    pub struct if_msghdr {
+        pub ifm_msglen: ::c_ushort,
+        pub ifm_version: ::c_uchar,
+        pub ifm_type: ::c_uchar,
+        pub ifm_hdrlen: ::c_ushort,
+        pub ifm_index: ::c_ushort,
+        pub ifm_tableid: ::c_ushort,
+        pub ifm_pad1: ::c_uchar,
+        pub ifm_pad2: ::c_uchar,
+        pub ifm_addrs: ::c_int,
+        pub ifm_flags: ::c_int,
+        pub ifm_xflags: ::c_int,
+        pub ifm_data: if_data,
+    }
+}
+
+pub const UT_NAMESIZE: usize = 32;
+pub const UT_LINESIZE: usize = 8;
+pub const UT_HOSTSIZE: usize = 256;
+
+pub const O_CLOEXEC: ::c_int = 0x10000;
+pub const O_DIRECTORY: ::c_int = 0x20000;
+pub const O_RSYNC: ::c_int = O_SYNC;
+
+pub const MS_SYNC : ::c_int = 0x0002;
+pub const MS_INVALIDATE : ::c_int = 0x0004;
+
+pub const PTHREAD_STACK_MIN : ::size_t = 2048;
+
+pub const POLLNORM: ::c_short = ::POLLRDNORM;
+
+pub const ENOATTR : ::c_int = 83;
+pub const EILSEQ : ::c_int = 84;
+pub const EOVERFLOW : ::c_int = 87;
+pub const ECANCELED : ::c_int = 88;
+pub const EIDRM : ::c_int = 89;
+pub const ENOMSG : ::c_int = 90;
+pub const ENOTSUP : ::c_int = 91;
+pub const ELAST : ::c_int = 91;
+
+pub const F_DUPFD_CLOEXEC : ::c_int = 10;
+
+pub const AT_FDCWD: ::c_int = -100;
+pub const AT_EACCESS: ::c_int = 0x01;
+pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x02;
+pub const AT_SYMLINK_FOLLOW: ::c_int = 0x04;
+pub const AT_REMOVEDIR: ::c_int = 0x08;
+
+pub const RLIM_NLIMITS: ::c_int = 9;
+
+pub const SO_TIMESTAMP: ::c_int = 0x0800;
+pub const SO_SNDTIMEO: ::c_int = 0x1005;
+pub const SO_RCVTIMEO: ::c_int = 0x1006;
+pub const SO_BINDANY: ::c_int = 0x1000;
+pub const SO_NETPROC: ::c_int = 0x1020;
+pub const SO_RTABLE: ::c_int = 0x1021;
+pub const SO_PEERCRED: ::c_int = 0x1022;
+pub const SO_SPLICE: ::c_int = 0x1023;
+
+pub const AF_ECMA: ::c_int = 8;
+pub const AF_ROUTE: ::c_int = 17;
+pub const AF_ENCAP: ::c_int = 28;
+pub const AF_SIP: ::c_int = 29;
+pub const AF_KEY: ::c_int = 30;
+pub const pseudo_AF_HDRCMPLT: ::c_int = 31;
+pub const AF_BLUETOOTH: ::c_int = 32;
+pub const AF_MPLS: ::c_int = 33;
+pub const pseudo_AF_PFLOW: ::c_int = 34;
+pub const pseudo_AF_PIPEX: ::c_int = 35;
+#[doc(hidden)]
+pub const AF_MAX: ::c_int = 36;
+
+#[doc(hidden)]
+pub const NET_MAXID: ::c_int = AF_MAX;
+pub const NET_RT_DUMP: ::c_int = 1;
+pub const NET_RT_FLAGS: ::c_int = 2;
+pub const NET_RT_IFLIST: ::c_int = 3;
+pub const NET_RT_STATS: ::c_int = 4;
+pub const NET_RT_TABLE: ::c_int = 5;
+pub const NET_RT_IFNAMES: ::c_int = 6;
+#[doc(hidden)]
+pub const NET_RT_MAXID: ::c_int = 7;
+
+pub const IPV6_JOIN_GROUP: ::c_int = 12;
+pub const IPV6_LEAVE_GROUP: ::c_int = 13;
+
+pub const PF_ROUTE: ::c_int = AF_ROUTE;
+pub const PF_ECMA: ::c_int = AF_ECMA;
+pub const PF_ENCAP: ::c_int = AF_ENCAP;
+pub const PF_SIP: ::c_int = AF_SIP;
+pub const PF_KEY: ::c_int = AF_KEY;
+pub const PF_BPF: ::c_int = pseudo_AF_HDRCMPLT;
+pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
+pub const PF_MPLS: ::c_int = AF_MPLS;
+pub const PF_PFLOW: ::c_int = pseudo_AF_PFLOW;
+pub const PF_PIPEX: ::c_int = pseudo_AF_PIPEX;
+#[doc(hidden)]
+pub const PF_MAX: ::c_int = AF_MAX;
+
+pub const SCM_TIMESTAMP: ::c_int = 0x04;
+
+pub const O_DSYNC : ::c_int = 128;
+
+pub const MAP_RENAME : ::c_int = 0x0000;
+pub const MAP_NORESERVE : ::c_int = 0x0000;
+pub const MAP_HASSEMAPHORE : ::c_int = 0x0000;
+
+pub const EIPSEC : ::c_int = 82;
+pub const ENOMEDIUM : ::c_int = 85;
+pub const EMEDIUMTYPE : ::c_int = 86;
+
+pub const EAI_SYSTEM: ::c_int = -11;
+
+pub const RUSAGE_THREAD: ::c_int = 1;
+
+pub const MAP_COPY : ::c_int = 0x0002;
+pub const MAP_NOEXTEND : ::c_int = 0x0000;
+
+pub const _PC_LINK_MAX : ::c_int = 1;
+pub const _PC_MAX_CANON : ::c_int = 2;
+pub const _PC_MAX_INPUT : ::c_int = 3;
+pub const _PC_NAME_MAX : ::c_int = 4;
+pub const _PC_PATH_MAX : ::c_int = 5;
+pub const _PC_PIPE_BUF : ::c_int = 6;
+pub const _PC_CHOWN_RESTRICTED : ::c_int = 7;
+pub const _PC_NO_TRUNC : ::c_int = 8;
+pub const _PC_VDISABLE : ::c_int = 9;
+pub const _PC_2_SYMLINKS : ::c_int = 10;
+pub const _PC_ALLOC_SIZE_MIN : ::c_int = 11;
+pub const _PC_ASYNC_IO : ::c_int = 12;
+pub const _PC_FILESIZEBITS : ::c_int = 13;
+pub const _PC_PRIO_IO : ::c_int = 14;
+pub const _PC_REC_INCR_XFER_SIZE : ::c_int = 15;
+pub const _PC_REC_MAX_XFER_SIZE : ::c_int = 16;
+pub const _PC_REC_MIN_XFER_SIZE : ::c_int = 17;
+pub const _PC_REC_XFER_ALIGN : ::c_int = 18;
+pub const _PC_SYMLINK_MAX : ::c_int = 19;
+pub const _PC_SYNC_IO : ::c_int = 20;
+pub const _PC_TIMESTAMP_RESOLUTION : ::c_int = 21;
+
+pub const _SC_CLK_TCK : ::c_int = 3;
+pub const _SC_SEM_NSEMS_MAX : ::c_int = 31;
+pub const _SC_SEM_VALUE_MAX : ::c_int = 32;
+pub const _SC_HOST_NAME_MAX : ::c_int = 33;
+pub const _SC_MONOTONIC_CLOCK : ::c_int = 34;
+pub const _SC_2_PBS : ::c_int = 35;
+pub const _SC_2_PBS_ACCOUNTING : ::c_int = 36;
+pub const _SC_2_PBS_CHECKPOINT : ::c_int = 37;
+pub const _SC_2_PBS_LOCATE : ::c_int = 38;
+pub const _SC_2_PBS_MESSAGE : ::c_int = 39;
+pub const _SC_2_PBS_TRACK : ::c_int = 40;
+pub const _SC_ADVISORY_INFO : ::c_int = 41;
+pub const _SC_AIO_LISTIO_MAX : ::c_int = 42;
+pub const _SC_AIO_MAX : ::c_int = 43;
+pub const _SC_AIO_PRIO_DELTA_MAX : ::c_int = 44;
+pub const _SC_ASYNCHRONOUS_IO : ::c_int = 45;
+pub const _SC_ATEXIT_MAX : ::c_int = 46;
+pub const _SC_BARRIERS : ::c_int = 47;
+pub const _SC_CLOCK_SELECTION : ::c_int = 48;
+pub const _SC_CPUTIME : ::c_int = 49;
+pub const _SC_DELAYTIMER_MAX : ::c_int = 50;
+pub const _SC_IOV_MAX : ::c_int = 51;
+pub const _SC_IPV6 : ::c_int = 52;
+pub const _SC_MAPPED_FILES : ::c_int = 53;
+pub const _SC_MEMLOCK : ::c_int = 54;
+pub const _SC_MEMLOCK_RANGE : ::c_int = 55;
+pub const _SC_MEMORY_PROTECTION : ::c_int = 56;
+pub const _SC_MESSAGE_PASSING : ::c_int = 57;
+pub const _SC_MQ_OPEN_MAX : ::c_int = 58;
+pub const _SC_MQ_PRIO_MAX : ::c_int = 59;
+pub const _SC_PRIORITIZED_IO : ::c_int = 60;
+pub const _SC_PRIORITY_SCHEDULING : ::c_int = 61;
+pub const _SC_RAW_SOCKETS : ::c_int = 62;
+pub const _SC_READER_WRITER_LOCKS : ::c_int = 63;
+pub const _SC_REALTIME_SIGNALS : ::c_int = 64;
+pub const _SC_REGEXP : ::c_int = 65;
+pub const _SC_RTSIG_MAX : ::c_int = 66;
+pub const _SC_SEMAPHORES : ::c_int = 67;
+pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 68;
+pub const _SC_SHELL : ::c_int = 69;
+pub const _SC_SIGQUEUE_MAX : ::c_int = 70;
+pub const _SC_SPAWN : ::c_int = 71;
+pub const _SC_SPIN_LOCKS : ::c_int = 72;
+pub const _SC_SPORADIC_SERVER : ::c_int = 73;
+pub const _SC_SS_REPL_MAX : ::c_int = 74;
+pub const _SC_SYNCHRONIZED_IO : ::c_int = 75;
+pub const _SC_SYMLOOP_MAX : ::c_int = 76;
+pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77;
+pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78;
+pub const _SC_THREAD_CPUTIME : ::c_int = 79;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 80;
+pub const _SC_THREAD_KEYS_MAX : ::c_int = 81;
+pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 82;
+pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 83;
+pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 84;
+pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 85;
+pub const _SC_THREAD_ROBUST_PRIO_INHERIT : ::c_int = 86;
+pub const _SC_THREAD_ROBUST_PRIO_PROTECT : ::c_int = 87;
+pub const _SC_THREAD_SPORADIC_SERVER : ::c_int = 88;
+pub const _SC_THREAD_STACK_MIN : ::c_int = 89;
+pub const _SC_THREAD_THREADS_MAX : ::c_int = 90;
+pub const _SC_THREADS : ::c_int = 91;
+pub const _SC_TIMEOUTS : ::c_int = 92;
+pub const _SC_TIMER_MAX : ::c_int = 93;
+pub const _SC_TIMERS : ::c_int = 94;
+pub const _SC_TRACE : ::c_int = 95;
+pub const _SC_TRACE_EVENT_FILTER : ::c_int = 96;
+pub const _SC_TRACE_EVENT_NAME_MAX : ::c_int = 97;
+pub const _SC_TRACE_INHERIT : ::c_int = 98;
+pub const _SC_TRACE_LOG : ::c_int = 99;
+pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100;
+pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101;
+pub const _SC_LOGIN_NAME_MAX : ::c_int = 102;
+pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 103;
+pub const _SC_TRACE_NAME_MAX : ::c_int = 104;
+pub const _SC_TRACE_SYS_MAX : ::c_int = 105;
+pub const _SC_TRACE_USER_EVENT_MAX : ::c_int = 106;
+pub const _SC_TTY_NAME_MAX : ::c_int = 107;
+pub const _SC_TYPED_MEMORY_OBJECTS : ::c_int = 108;
+pub const _SC_V6_ILP32_OFF32 : ::c_int = 109;
+pub const _SC_V6_ILP32_OFFBIG : ::c_int = 110;
+pub const _SC_V6_LP64_OFF64 : ::c_int = 111;
+pub const _SC_V6_LPBIG_OFFBIG : ::c_int = 112;
+pub const _SC_V7_ILP32_OFF32 : ::c_int = 113;
+pub const _SC_V7_ILP32_OFFBIG : ::c_int = 114;
+pub const _SC_V7_LP64_OFF64 : ::c_int = 115;
+pub const _SC_V7_LPBIG_OFFBIG : ::c_int = 116;
+pub const _SC_XOPEN_CRYPT : ::c_int = 117;
+pub const _SC_XOPEN_ENH_I18N : ::c_int = 118;
+pub const _SC_XOPEN_LEGACY : ::c_int = 119;
+pub const _SC_XOPEN_REALTIME : ::c_int = 120;
+pub const _SC_XOPEN_REALTIME_THREADS : ::c_int = 121;
+pub const _SC_XOPEN_STREAMS : ::c_int = 122;
+pub const _SC_XOPEN_UNIX : ::c_int = 123;
+pub const _SC_XOPEN_UUCP : ::c_int = 124;
+pub const _SC_XOPEN_VERSION : ::c_int = 125;
+pub const _SC_PHYS_PAGES : ::c_int = 500;
+pub const _SC_AVPHYS_PAGES : ::c_int = 501;
+pub const _SC_NPROCESSORS_CONF : ::c_int = 502;
+pub const _SC_NPROCESSORS_ONLN : ::c_int = 503;
+
+pub const FD_SETSIZE: usize = 1024;
+
+pub const ST_NOSUID: ::c_ulong = 2;
+
+pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _;
+pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;
+pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _;
+
+pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
+pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
+pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3;
+pub const PTHREAD_MUTEX_STRICT_NP: ::c_int = 4;
+pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_STRICT_NP;
+
+pub const EVFILT_AIO: ::int16_t = -3;
+pub const EVFILT_PROC: ::int16_t = -5;
+pub const EVFILT_READ: ::int16_t = -1;
+pub const EVFILT_SIGNAL: ::int16_t = -6;
+pub const EVFILT_TIMER: ::int16_t = -7;
+pub const EVFILT_VNODE: ::int16_t = -4;
+pub const EVFILT_WRITE: ::int16_t = -2;
+
+pub const EV_ADD: ::uint16_t = 0x1;
+pub const EV_DELETE: ::uint16_t = 0x2;
+pub const EV_ENABLE: ::uint16_t = 0x4;
+pub const EV_DISABLE: ::uint16_t = 0x8;
+pub const EV_ONESHOT: ::uint16_t = 0x10;
+pub const EV_CLEAR: ::uint16_t = 0x20;
+pub const EV_RECEIPT: ::uint16_t = 0x40;
+pub const EV_DISPATCH: ::uint16_t = 0x80;
+pub const EV_FLAG1: ::uint16_t = 0x2000;
+pub const EV_ERROR: ::uint16_t = 0x4000;
+pub const EV_EOF: ::uint16_t = 0x8000;
+pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
+
+pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
+pub const NOTE_EOF: ::uint32_t = 0x00000002;
+pub const NOTE_DELETE: ::uint32_t = 0x00000001;
+pub const NOTE_WRITE: ::uint32_t = 0x00000002;
+pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
+pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
+pub const NOTE_LINK: ::uint32_t = 0x00000010;
+pub const NOTE_RENAME: ::uint32_t = 0x00000020;
+pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
+pub const NOTE_TRUNCATE: ::uint32_t = 0x00000080;
+pub const NOTE_EXIT: ::uint32_t = 0x80000000;
+pub const NOTE_FORK: ::uint32_t = 0x40000000;
+pub const NOTE_EXEC: ::uint32_t = 0x20000000;
+pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
+pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
+pub const NOTE_TRACK: ::uint32_t = 0x00000001;
+pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
+pub const NOTE_CHILD: ::uint32_t = 0x00000004;
+
+pub const TMP_MAX : ::c_uint = 0x7fffffff;
+
+pub const NI_MAXHOST: ::size_t = 256;
+
+pub const RTLD_LOCAL: ::c_int = 0;
+pub const CTL_MAXNAME: ::c_int = 12;
+pub const CTLTYPE_NODE: ::c_int = 1;
+pub const CTLTYPE_INT: ::c_int = 2;
+pub const CTLTYPE_STRING: ::c_int = 3;
+pub const CTLTYPE_QUAD: ::c_int = 4;
+pub const CTLTYPE_STRUCT: ::c_int = 5;
+pub const CTL_UNSPEC: ::c_int = 0;
+pub const CTL_KERN: ::c_int = 1;
+pub const CTL_VM: ::c_int = 2;
+pub const CTL_FS: ::c_int = 3;
+pub const CTL_NET: ::c_int = 4;
+pub const CTL_DEBUG: ::c_int = 5;
+pub const CTL_HW: ::c_int = 6;
+pub const CTL_MACHDEP: ::c_int = 7;
+pub const CTL_DDB: ::c_int = 9;
+pub const CTL_VFS: ::c_int = 10;
+pub const CTL_MAXID: ::c_int = 11;
+pub const KERN_OSTYPE: ::c_int = 1;
+pub const KERN_OSRELEASE: ::c_int = 2;
+pub const KERN_OSREV: ::c_int = 3;
+pub const KERN_VERSION: ::c_int = 4;
+pub const KERN_MAXVNODES: ::c_int = 5;
+pub const KERN_MAXPROC: ::c_int = 6;
+pub const KERN_MAXFILES: ::c_int = 7;
+pub const KERN_ARGMAX: ::c_int = 8;
+pub const KERN_SECURELVL: ::c_int = 9;
+pub const KERN_HOSTNAME: ::c_int = 10;
+pub const KERN_HOSTID: ::c_int = 11;
+pub const KERN_CLOCKRATE: ::c_int = 12;
+pub const KERN_PROF: ::c_int = 16;
+pub const KERN_POSIX1: ::c_int = 17;
+pub const KERN_NGROUPS: ::c_int = 18;
+pub const KERN_JOB_CONTROL: ::c_int = 19;
+pub const KERN_SAVED_IDS: ::c_int = 20;
+pub const KERN_BOOTTIME: ::c_int = 21;
+pub const KERN_DOMAINNAME: ::c_int = 22;
+pub const KERN_MAXPARTITIONS: ::c_int = 23;
+pub const KERN_RAWPARTITION: ::c_int = 24;
+pub const KERN_MAXTHREAD: ::c_int = 25;
+pub const KERN_NTHREADS: ::c_int = 26;
+pub const KERN_OSVERSION: ::c_int = 27;
+pub const KERN_SOMAXCONN: ::c_int = 28;
+pub const KERN_SOMINCONN: ::c_int = 29;
+pub const KERN_USERMOUNT: ::c_int = 30;
+pub const KERN_NOSUIDCOREDUMP: ::c_int = 32;
+pub const KERN_FSYNC: ::c_int = 33;
+pub const KERN_SYSVMSG: ::c_int = 34;
+pub const KERN_SYSVSEM: ::c_int = 35;
+pub const KERN_SYSVSHM: ::c_int = 36;
+pub const KERN_ARND: ::c_int = 37;
+pub const KERN_MSGBUFSIZE: ::c_int = 38;
+pub const KERN_MALLOCSTATS: ::c_int = 39;
+pub const KERN_CPTIME: ::c_int = 40;
+pub const KERN_NCHSTATS: ::c_int = 41;
+pub const KERN_FORKSTAT: ::c_int = 42;
+pub const KERN_NSELCOLL: ::c_int = 43;
+pub const KERN_TTY: ::c_int = 44;
+pub const KERN_CCPU: ::c_int = 45;
+pub const KERN_FSCALE: ::c_int = 46;
+pub const KERN_NPROCS: ::c_int = 47;
+pub const KERN_MSGBUF: ::c_int = 48;
+pub const KERN_POOL: ::c_int = 49;
+pub const KERN_STACKGAPRANDOM: ::c_int = 50;
+pub const KERN_SYSVIPC_INFO: ::c_int = 51;
+pub const KERN_SPLASSERT: ::c_int = 54;
+pub const KERN_PROC_ARGS: ::c_int = 55;
+pub const KERN_NFILES: ::c_int = 56;
+pub const KERN_TTYCOUNT: ::c_int = 57;
+pub const KERN_NUMVNODES: ::c_int = 58;
+pub const KERN_MBSTAT: ::c_int = 59;
+pub const KERN_SEMINFO: ::c_int = 61;
+pub const KERN_SHMINFO: ::c_int = 62;
+pub const KERN_INTRCNT: ::c_int = 63;
+pub const KERN_WATCHDOG: ::c_int = 64;
+pub const KERN_PROC: ::c_int = 66;
+pub const KERN_MAXCLUSTERS: ::c_int = 67;
+pub const KERN_EVCOUNT: ::c_int = 68;
+pub const KERN_TIMECOUNTER: ::c_int = 69;
+pub const KERN_MAXLOCKSPERUID: ::c_int = 70;
+pub const KERN_CPTIME2: ::c_int = 71;
+pub const KERN_CACHEPCT: ::c_int = 72;
+pub const KERN_FILE: ::c_int = 73;
+pub const KERN_CONSDEV: ::c_int = 75;
+pub const KERN_NETLIVELOCKS: ::c_int = 76;
+pub const KERN_POOL_DEBUG: ::c_int = 77;
+pub const KERN_PROC_CWD: ::c_int = 78;
+pub const KERN_PROC_NOBROADCASTKILL: ::c_int = 79;
+pub const KERN_PROC_VMMAP: ::c_int = 80;
+pub const KERN_GLOBAL_PTRACE: ::c_int = 81;
+pub const KERN_CONSBUFSIZE: ::c_int = 82;
+pub const KERN_CONSBUF: ::c_int = 83;
+pub const KERN_MAXID: ::c_int = 84;
+pub const KERN_PROC_ALL: ::c_int = 0;
+pub const KERN_PROC_PID: ::c_int = 1;
+pub const KERN_PROC_PGRP: ::c_int = 2;
+pub const KERN_PROC_SESSION: ::c_int = 3;
+pub const KERN_PROC_TTY: ::c_int = 4;
+pub const KERN_PROC_UID: ::c_int = 5;
+pub const KERN_PROC_RUID: ::c_int = 6;
+pub const KERN_PROC_KTHREAD: ::c_int = 7;
+pub const KERN_PROC_SHOW_THREADS: ::c_int = 0x40000000;
+pub const KERN_SYSVIPC_MSG_INFO: ::c_int = 1;
+pub const KERN_SYSVIPC_SEM_INFO: ::c_int = 2;
+pub const KERN_SYSVIPC_SHM_INFO: ::c_int = 3;
+pub const KERN_PROC_ARGV: ::c_int = 1;
+pub const KERN_PROC_NARGV: ::c_int = 2;
+pub const KERN_PROC_ENV: ::c_int = 3;
+pub const KERN_PROC_NENV: ::c_int = 4;
+pub const KI_NGROUPS: ::c_int = 16;
+pub const KI_MAXCOMLEN: ::c_int = 24;
+pub const KI_WMESGLEN: ::c_int = 8;
+pub const KI_MAXLOGNAME: ::c_int = 32;
+pub const KI_EMULNAMELEN: ::c_int = 8;
+
+pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS;
+pub const OLCUC: ::tcflag_t = 0x20;
+pub const ONOCR: ::tcflag_t = 0x40;
+pub const ONLRET: ::tcflag_t = 0x80;
+
+pub const SOCK_CLOEXEC: ::c_int = 0x8000;
+pub const SOCK_NONBLOCK: ::c_int = 0x4000;
+pub const SOCK_DNS: ::c_int = 0x1000;
+
+f! {
+    pub fn WIFCONTINUED(status: ::c_int) -> bool {
+        status & 0o177777 == 0o177777
+    }
+}
+
+extern {
+    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
+    pub fn getnameinfo(sa: *const ::sockaddr,
+                       salen: ::socklen_t,
+                       host: *mut ::c_char,
+                       hostlen: ::size_t,
+                       serv: *mut ::c_char,
+                       servlen: ::size_t,
+                       flags: ::c_int) -> ::c_int;
+    pub fn kevent(kq: ::c_int,
+                  changelist: *const ::kevent,
+                  nchanges: ::c_int,
+                  eventlist: *mut ::kevent,
+                  nevents: ::c_int,
+                  timeout: *const ::timespec) -> ::c_int;
+    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
+                    -> ::c_int;
+    pub fn pthread_main_np() -> ::c_int;
+    pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
+    pub fn pthread_stackseg_np(thread: ::pthread_t,
+                               sinfo: *mut ::stack_t) -> ::c_int;
+    pub fn sysctl(name: *const ::c_int,
+                  namelen: ::c_uint,
+                  oldp: *mut ::c_void,
+                  oldlenp: *mut ::size_t,
+                  newp: *mut ::c_void,
+                  newlen: ::size_t)
+                  -> ::c_int;
+    pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
+    pub fn pledge(promises: *const ::c_char,
+                  paths: *mut *const ::c_char) -> ::c_int;
+    pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
+    pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(target_os = "openbsd")] {
+        mod openbsd;
+        pub use self::openbsd::*;
+    } else if #[cfg(target_os = "bitrig")] {
+        mod bitrig;
+        pub use self::bitrig::*;
+    } else {
+        // Unknown target_os
+    }
+}
+
+mod other;
+pub use self::other::*;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs
@@ -0,0 +1,35 @@
+s! {
+    pub struct lconv {
+        pub decimal_point: *mut ::c_char,
+        pub thousands_sep: *mut ::c_char,
+        pub grouping: *mut ::c_char,
+        pub int_curr_symbol: *mut ::c_char,
+        pub currency_symbol: *mut ::c_char,
+        pub mon_decimal_point: *mut ::c_char,
+        pub mon_thousands_sep: *mut ::c_char,
+        pub mon_grouping: *mut ::c_char,
+        pub positive_sign: *mut ::c_char,
+        pub negative_sign: *mut ::c_char,
+        pub int_frac_digits: ::c_char,
+        pub frac_digits: ::c_char,
+        pub p_cs_precedes: ::c_char,
+        pub p_sep_by_space: ::c_char,
+        pub n_cs_precedes: ::c_char,
+        pub n_sep_by_space: ::c_char,
+        pub p_sign_posn: ::c_char,
+        pub n_sign_posn: ::c_char,
+        pub int_p_cs_precedes: ::c_char,
+        pub int_p_sep_by_space: ::c_char,
+        pub int_n_cs_precedes: ::c_char,
+        pub int_n_sep_by_space: ::c_char,
+        pub int_p_sign_posn: ::c_char,
+        pub int_n_sign_posn: ::c_char,
+    }
+}
+
+extern {
+    pub fn accept4(s: ::c_int, addr: *mut ::sockaddr,
+                   addrlen: *mut ::socklen_t, flags: ::c_int) -> ::c_int;
+    pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
+                   envp: *const *const ::c_char) -> ::c_int;
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/openbsdlike/other/b32/mod.rs
@@ -0,0 +1,2 @@
+pub type c_long = i32;
+pub type c_ulong = u32;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/openbsdlike/other/b64/mod.rs
@@ -0,0 +1,2 @@
+pub type c_long = i64;
+pub type c_ulong = u64;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/bsd/netbsdlike/openbsdlike/other/mod.rs
@@ -0,0 +1,11 @@
+cfg_if! {
+    if #[cfg(target_arch = "x86_64")] {
+        mod b64;
+        pub use self::b64::*;
+    } else if #[cfg(target_arch = "x86")] {
+        mod b32;
+        pub use self::b32::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/haiku/b32.rs
@@ -0,0 +1,2 @@
+pub type c_long = i32;
+pub type c_ulong = u32;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/haiku/b64.rs
@@ -0,0 +1,2 @@
+pub type c_ulong = u64;
+pub type c_long = i64;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/haiku/mod.rs
@@ -0,0 +1,936 @@
+use dox::{mem, Option};
+
+pub type rlim_t = ::uintptr_t;
+pub type sa_family_t = u8;
+pub type pthread_key_t = ::c_int;
+pub type nfds_t = ::c_long;
+pub type tcflag_t = ::c_uint;
+pub type speed_t = ::c_uint;
+pub type c_char = i8;
+pub type clock_t = i32;
+pub type clockid_t = i32;
+pub type time_t = i32;
+pub type suseconds_t = i32;
+pub type wchar_t = i32;
+pub type off_t = i64;
+pub type ino_t = i64;
+pub type blkcnt_t = i64;
+pub type blksize_t = i32;
+pub type dev_t = i32;
+pub type mode_t = u32;
+pub type nlink_t = i32;
+pub type useconds_t = u32;
+pub type socklen_t = u32;
+pub type pthread_t = ::uintptr_t;
+pub type pthread_mutexattr_t = ::uintptr_t;
+pub type pthread_rwlockattr_t = ::uintptr_t;
+pub type sigset_t = u64;
+pub type fsblkcnt_t = i64;
+pub type fsfilcnt_t = i64;
+pub type pthread_attr_t = *mut ::c_void;
+pub type nl_item = ::c_int;
+pub type id_t = i32;
+pub type idtype_t = ::c_uint;
+
+pub enum timezone {}
+
+s! {
+    pub struct sockaddr {
+        pub sa_len: u8,
+        pub sa_family: sa_family_t,
+        pub sa_data: [::c_char; 30],
+    }
+
+    pub struct sockaddr_in {
+        pub sin_len: u8,
+        pub sin_family: sa_family_t,
+        pub sin_port: ::in_port_t,
+        pub sin_addr: ::in_addr,
+        pub sin_zero: [u8; 24],
+    }
+
+    pub struct sockaddr_in6 {
+        pub sin6_len: u8,
+        pub sin6_family: sa_family_t,
+        pub sin6_port: ::in_port_t,
+        pub sin6_flowinfo: u32,
+        pub sin6_addr: ::in6_addr,
+        pub sin6_scope_id: u32,
+    }
+
+    pub struct sockaddr_un {
+        pub sun_len: u8,
+        pub sun_family: sa_family_t,
+        pub sun_path: [::c_char; 126]
+    }
+
+    pub struct sockaddr_storage {
+        pub ss_len: u8,
+        pub ss_family: sa_family_t,
+        __ss_pad1: [u8; 6],
+        __ss_pad2: u64,
+        __ss_pad3: [u8; 112],
+    }
+
+    pub struct addrinfo {
+        pub ai_flags: ::c_int,
+        pub ai_family: ::c_int,
+        pub ai_socktype: ::c_int,
+        pub ai_protocol: ::c_int,
+        pub ai_addrlen: socklen_t,
+        pub ai_canonname: *mut c_char,
+        pub ai_addr: *mut ::sockaddr,
+        pub ai_next: *mut addrinfo,
+    }
+
+    pub struct fd_set {
+        fds_bits: [c_ulong; FD_SETSIZE / ULONG_SIZE],
+    }
+
+    pub struct tm {
+        pub tm_sec: ::c_int,
+        pub tm_min: ::c_int,
+        pub tm_hour: ::c_int,
+        pub tm_mday: ::c_int,
+        pub tm_mon: ::c_int,
+        pub tm_year: ::c_int,
+        pub tm_wday: ::c_int,
+        pub tm_yday: ::c_int,
+        pub tm_isdst: ::c_int,
+        pub tm_gmtoff: ::c_long,
+        pub tm_zone: *const ::c_char,
+    }
+
+    pub struct utsname {
+        pub sysname: [::c_char; 32],
+        pub nodename: [::c_char; 32],
+        pub release: [::c_char; 32],
+        pub version: [::c_char; 32],
+        pub machine: [::c_char; 32],
+    }
+
+    pub struct lconv {
+        pub decimal_point: *mut ::c_char,
+        pub thousands_sep: *mut ::c_char,
+        pub grouping: *mut ::c_char,
+        pub int_curr_symbol: *mut ::c_char,
+        pub currency_symbol: *mut ::c_char,
+        pub mon_decimal_point: *mut ::c_char,
+        pub mon_thousands_sep: *mut ::c_char,
+        pub mon_grouping: *mut ::c_char,
+        pub positive_sign: *mut ::c_char,
+        pub negative_sign: *mut ::c_char,
+        pub int_frac_digits: ::c_char,
+        pub frac_digits: ::c_char,
+        pub p_cs_precedes: ::c_char,
+        pub p_sep_by_space: ::c_char,
+        pub n_cs_precedes: ::c_char,
+        pub n_sep_by_space: ::c_char,
+        pub p_sign_posn: ::c_char,
+        pub n_sign_posn: ::c_char,
+        pub int_p_cs_precedes: ::c_char,
+        pub int_p_sep_by_space: ::c_char,
+        pub int_n_cs_precedes: ::c_char,
+        pub int_n_sep_by_space: ::c_char,
+        pub int_p_sign_posn: ::c_char,
+        pub int_n_sign_posn: ::c_char,
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::c_int,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::socklen_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::size_t,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct Dl_info {
+        pub dli_fname: *const ::c_char,
+        pub dli_fbase: *mut ::c_void,
+        pub dli_sname: *const ::c_char,
+        pub dli_saddr: *mut ::c_void,
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_line:  ::c_char,
+        pub c_ispeed: ::speed_t,
+        pub c_ospeed: ::speed_t,
+        pub c_cc: [::cc_t; ::NCCS],
+    }
+
+    pub struct stat {
+        pub st_dev: dev_t,
+        pub st_ino: ino_t,
+        pub st_mode: mode_t,
+        pub st_nlink: nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_size: off_t,
+        pub st_rdev: dev_t,
+        pub st_blksize: blksize_t,
+        pub st_atime: time_t,
+        pub st_atime_nsec: c_long,
+        pub st_mtime: time_t,
+        pub st_mtime_nsec: c_long,
+        pub st_ctime: time_t,
+        pub st_ctime_nsec: c_long,
+        pub st_crtime: time_t,
+        pub st_crtime_nsec: c_long,
+        pub st_type: u32,
+        pub st_blocks: blkcnt_t,
+    }
+
+    pub struct dirent {
+        pub d_dev: dev_t,
+        pub d_pdev: dev_t,
+        pub d_ino: ino_t,
+        pub d_pino: i64,
+        pub d_reclen: ::c_ushort,
+        pub d_name: [::c_char; 1024], // Max length is _POSIX_PATH_MAX
+    }
+
+    pub struct glob_t {
+        pub gl_pathc: ::size_t,
+        __unused1: ::size_t,
+        pub gl_offs: ::size_t,
+        __unused2: ::size_t,
+        pub gl_pathv: *mut *mut c_char,
+
+        __unused3: *mut ::c_void,
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+        __unused6: *mut ::c_void,
+        __unused7: *mut ::c_void,
+        __unused8: *mut ::c_void,
+    }
+
+    pub struct pthread_mutex_t {
+        flags: u32,
+        lock: i32,
+        unused: i32,
+        owner: i32,
+        owner_count: i32,
+    }
+
+    pub struct pthread_cond_t {
+        flags: u32,
+        unused: i32,
+        mutex: *mut ::c_void,
+        waiter_count: i32,
+        lock: i32,
+    }
+
+    pub struct pthread_rwlock_t {
+        flags: u32,
+        owner: i32,
+        lock_sem: i32,      // this is actually a union
+        lock_count: i32,
+        reader_count: i32,
+        writer_count: i32,
+        waiters: [*mut ::c_void; 2],
+    }
+
+    pub struct passwd {
+        pub pw_name: *mut ::c_char,
+        pub pw_passwd: *mut ::c_char,
+        pub pw_uid: ::uid_t,
+        pub pw_gid: ::gid_t,
+        pub pw_dir: *mut ::c_char,
+        pub pw_shell: *mut ::c_char,
+        pub pw_gecos: *mut ::c_char,
+    }
+
+    pub struct statvfs {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_favail: ::fsfilcnt_t,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_size: ::size_t,
+        pub ss_flags: ::c_int,
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_code: ::c_int,
+        pub si_errno: ::c_int,
+        pub si_pid: ::pid_t,
+        pub si_uid: ::uid_t,
+        pub si_addr: *mut ::c_void,
+        pub si_status: ::c_int,
+        pub si_band: c_long,
+        pub sigval: *mut ::c_void,
+    }
+
+    pub struct sigaction {
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: ::sigset_t,
+        pub sa_flags: ::c_int,
+        sa_userdata: *mut ::c_void,
+    }
+
+    pub struct sem_t {
+        pub se_type: i32,
+        pub se_named_id: i32, // this is actually a union
+        pub se_unnamed: i32,
+        pub se_padding: [i32; 4],
+    }
+
+    pub struct pthread_condattr_t {
+        pub process_shared: bool,
+        pub clock_id: i32,
+    }
+}
+
+// intentionally not public, only used for fd_set
+cfg_if! {
+    if #[cfg(target_pointer_width = "32")] {
+        const ULONG_SIZE: usize = 32;
+    } else if #[cfg(target_pointer_width = "64")] {
+        const ULONG_SIZE: usize = 64;
+    } else {
+        // Unknown target_pointer_width
+    }
+}
+
+pub const EXIT_FAILURE: ::c_int = 1;
+pub const EXIT_SUCCESS: ::c_int = 0;
+pub const RAND_MAX: ::c_int = 2147483647;
+pub const EOF: ::c_int = -1;
+pub const SEEK_SET: ::c_int = 0;
+pub const SEEK_CUR: ::c_int = 1;
+pub const SEEK_END: ::c_int = 2;
+pub const _IOFBF: ::c_int = 0;
+pub const _IONBF: ::c_int = 2;
+pub const _IOLBF: ::c_int = 1;
+
+pub const F_DUPFD: ::c_int = 0x0001;
+pub const F_GETFD: ::c_int = 0x0002;
+pub const F_SETFD: ::c_int = 0x0004;
+pub const F_GETFL: ::c_int = 0x0008;
+pub const F_SETFL: ::c_int = 0x0010;
+
+pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
+pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
+
+pub const CLOCK_REALTIME: ::c_int = -1;
+pub const CLOCK_MONOTONIC: ::c_int = 0;
+
+pub const RLIMIT_CORE: ::c_int = 0;
+pub const RLIMIT_CPU: ::c_int = 1;
+pub const RLIMIT_DATA: ::c_int = 2;
+pub const RLIMIT_FSIZE: ::c_int = 3;
+pub const RLIMIT_NOFILE: ::c_int = 4;
+pub const RLIMIT_AS: ::c_int = 6;
+// Haiku specific
+pub const RLIMIT_NOVMON: ::c_int = 7;
+pub const RLIMIT_NLIMITS: ::c_int = 8;
+
+pub const RUSAGE_SELF: ::c_int = 0;
+
+pub const NCCS: usize = 11;
+
+pub const O_RDONLY: ::c_int = 0x0000;
+pub const O_WRONLY: ::c_int = 0x0001;
+pub const O_RDWR: ::c_int = 0x0002;
+pub const O_ACCMODE: ::c_int = 0x0003;
+
+pub const O_EXCL: ::c_int = 0x0100;
+pub const O_CREAT: ::c_int = 0x0200;
+pub const O_TRUNC: ::c_int = 0x0400;
+pub const O_NOCTTY: ::c_int = 0x1000;
+pub const O_NOTRAVERSE: ::c_int = 0x2000;
+
+pub const O_CLOEXEC: ::c_int = 0x00000040;
+pub const O_NONBLOCK: ::c_int = 0x00000080;
+pub const O_APPEND: ::c_int = 0x00000800;
+pub const O_SYNC: ::c_int = 0x00010000;
+pub const O_RSYNC: ::c_int = 0x00020000;
+pub const O_DSYNC: ::c_int = 0x00040000;
+pub const O_NOFOLLOW: ::c_int = 0x00080000;
+pub const O_NOCACHE: ::c_int = 0x00100000;
+pub const O_DIRECTORY: ::c_int = 0x00200000;
+
+pub const S_IFIFO: ::mode_t = 61440;
+pub const S_IFCHR: ::mode_t = 49152;
+pub const S_IFBLK: ::mode_t = 24576;
+pub const S_IFDIR: ::mode_t = 16384;
+pub const S_IFREG: ::mode_t = 32768;
+pub const S_IFLNK: ::mode_t = 40960;
+pub const S_IFSOCK: ::mode_t = 49152;
+pub const S_IFMT: ::mode_t = 61440;
+pub const S_IRWXU: ::mode_t = 448;
+pub const S_IXUSR: ::mode_t = 64;
+pub const S_IWUSR: ::mode_t = 128;
+pub const S_IRUSR: ::mode_t = 256;
+pub const S_IRWXG: ::mode_t = 70;
+pub const S_IXGRP: ::mode_t = 10;
+pub const S_IWGRP: ::mode_t = 20;
+pub const S_IRGRP: ::mode_t = 40;
+pub const S_IRWXO: ::mode_t = 7;
+pub const S_IXOTH: ::mode_t = 1;
+pub const S_IWOTH: ::mode_t = 2;
+pub const S_IROTH: ::mode_t = 4;
+pub const F_OK: ::c_int = 0;
+pub const R_OK: ::c_int = 4;
+pub const W_OK: ::c_int = 2;
+pub const X_OK: ::c_int = 1;
+pub const STDIN_FILENO: ::c_int = 0;
+pub const STDOUT_FILENO: ::c_int = 1;
+pub const STDERR_FILENO: ::c_int = 2;
+
+pub const SIGHUP: ::c_int = 1;
+pub const SIGINT: ::c_int = 2;
+pub const SIGQUIT: ::c_int = 3;
+pub const SIGILL: ::c_int = 4;
+pub const SIGCHLD: ::c_int = 5;
+pub const SIGABRT: ::c_int = 6;
+pub const SIGPIPE: ::c_int = 7;
+pub const SIGFPE: ::c_int = 8;
+pub const SIGKILL: ::c_int = 9;
+pub const SIGSTOP: ::c_int = 10;
+pub const SIGSEGV: ::c_int = 11;
+pub const SIGCONT: ::c_int = 12;
+pub const SIGTSTP: ::c_int = 13;
+pub const SIGALRM: ::c_int = 14;
+pub const SIGTERM: ::c_int = 15;
+pub const SIGTTIN: ::c_int = 16;
+pub const SIGTTOU: ::c_int = 17;
+pub const SIGUSR1: ::c_int = 18;
+pub const SIGUSR2: ::c_int = 19;
+pub const SIGWINCH: ::c_int = 20;
+pub const SIGKILLTHR: ::c_int = 21;
+pub const SIGTRAP: ::c_int = 22;
+pub const SIGPOLL: ::c_int = 23;
+pub const SIGPROF: ::c_int = 24;
+pub const SIGSYS: ::c_int = 25;
+pub const SIGURG: ::c_int = 26;
+pub const SIGVTALRM: ::c_int = 27;
+pub const SIGXCPU: ::c_int = 28;
+pub const SIGXFSZ: ::c_int = 29;
+pub const SIGBUS: ::c_int = 30;
+
+pub const EAI_SYSTEM: ::c_int = 11;
+
+pub const PROT_NONE: ::c_int = 0;
+pub const PROT_READ: ::c_int = 1;
+pub const PROT_WRITE: ::c_int = 2;
+pub const PROT_EXEC: ::c_int = 4;
+
+pub const LC_ALL: ::c_int = 0;
+pub const LC_COLLATE: ::c_int = 1;
+pub const LC_CTYPE: ::c_int = 2;
+pub const LC_MONETARY: ::c_int = 3;
+pub const LC_NUMERIC: ::c_int = 4;
+pub const LC_TIME: ::c_int = 5;
+pub const LC_MESSAGES: ::c_int = 6;
+
+// TODO: Haiku does not have MAP_FILE, but libstd/os.rs requires it
+pub const MAP_FILE: ::c_int = 0x00;
+pub const MAP_SHARED: ::c_int = 0x01;
+pub const MAP_PRIVATE: ::c_int = 0x02;
+pub const MAP_FIXED: ::c_int = 0x004;
+
+pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
+
+pub const MS_ASYNC: ::c_int = 0x01;
+pub const MS_INVALIDATE: ::c_int = 0x04;
+pub const MS_SYNC: ::c_int = 0x02;
+
+pub const EPERM : ::c_int = -2147483633;
+pub const ENOENT : ::c_int = -2147459069;
+pub const ESRCH : ::c_int = -2147454963;
+pub const EINTR : ::c_int = -2147483638;
+pub const EIO : ::c_int = -2147483647;
+pub const ENXIO : ::c_int = -2147454965;
+pub const E2BIG : ::c_int = -2147454975;
+pub const ENOEXEC : ::c_int = -2147478782;
+pub const EBADF : ::c_int = -2147459072;
+pub const ECHILD : ::c_int = -2147454974;
+pub const EDEADLK : ::c_int = -2147454973;
+pub const ENOMEM : ::c_int = -2147454976;
+pub const EACCES : ::c_int = -2147483646;
+pub const EFAULT : ::c_int = -2147478783;
+// pub const ENOTBLK : ::c_int = 15;
+pub const EBUSY : ::c_int = -2147483634;
+pub const EEXIST : ::c_int = -2147459070;
+pub const EXDEV : ::c_int = -2147459061;
+pub const ENODEV : ::c_int = -2147454969;
+pub const ENOTDIR : ::c_int = -2147459067;
+pub const EISDIR : ::c_int = -2147459063;
+pub const EINVAL : ::c_int = -2147483643;
+pub const ENFILE : ::c_int = -2147454970;
+pub const EMFILE : ::c_int = -2147459062;
+pub const ENOTTY : ::c_int = -2147454966;
+pub const ETXTBSY : ::c_int = -2147454917;
+pub const EFBIG : ::c_int = -2147454972;
+pub const ENOSPC : ::c_int = -2147459065;
+pub const ESPIPE : ::c_int = -2147454964;
+pub const EROFS : ::c_int = -2147459064;
+pub const EMLINK : ::c_int = -2147454971;
+pub const EPIPE : ::c_int = -2147459059;
+pub const EDOM : ::c_int = -2147454960;
+pub const ERANGE : ::c_int = -2147454959;
+pub const EAGAIN : ::c_int = -2147483637;
+pub const EWOULDBLOCK : ::c_int = -2147483637;
+
+pub const EINPROGRESS : ::c_int = -2147454940;
+pub const EALREADY : ::c_int = -2147454939;
+pub const ENOTSOCK : ::c_int = -2147454932;
+pub const EDESTADDRREQ : ::c_int = -2147454928;
+pub const EMSGSIZE : ::c_int = -2147454934;
+pub const EPROTOTYPE : ::c_int = -2147454958;
+pub const ENOPROTOOPT : ::c_int = -2147454942;
+pub const EPROTONOSUPPORT : ::c_int = -2147454957;
+pub const EOPNOTSUPP : ::c_int = -2147454933;
+pub const EPFNOSUPPORT : ::c_int = -2147454956;
+pub const EAFNOSUPPORT : ::c_int = -2147454955;
+pub const EADDRINUSE : ::c_int = -2147454954;
+pub const EADDRNOTAVAIL : ::c_int = -2147454953;
+pub const ENETDOWN : ::c_int = -2147454953;
+pub const ENETUNREACH : ::c_int = -2147454951;
+pub const ENETRESET : ::c_int = -2147454950;
+pub const ECONNABORTED : ::c_int = -2147454949;
+pub const ECONNRESET : ::c_int = -2147454948;
+pub const ENOBUFS : ::c_int = -2147454941;
+pub const EISCONN : ::c_int = -2147454947;
+pub const ENOTCONN : ::c_int = -2147454946;
+pub const ESHUTDOWN : ::c_int = -2147454945;
+pub const ETIMEDOUT : ::c_int = -2147483639;
+pub const ECONNREFUSED : ::c_int = -2147454944;
+pub const ELOOP : ::c_int = -2147459060;
+pub const ENAMETOOLONG : ::c_int = -2147459068;
+pub const EHOSTDOWN : ::c_int = -2147454931;
+pub const EHOSTUNREACH : ::c_int = -2147454943;
+pub const ENOTEMPTY : ::c_int = -2147459066;
+pub const EDQUOT : ::c_int = -2147454927;
+pub const ESTALE : ::c_int = -2147454936;
+pub const ENOLCK : ::c_int = -2147454968;
+pub const ENOSYS : ::c_int = -2147454967;
+pub const EIDRM : ::c_int = -2147454926;
+pub const ENOMSG : ::c_int = -2147454937;
+pub const EOVERFLOW : ::c_int = -2147454935;
+pub const ECANCELED : ::c_int = -2147454929;
+pub const EILSEQ : ::c_int = -2147454938;
+pub const ENOATTR : ::c_int = -2147454916;
+pub const EBADMSG : ::c_int = -2147454930;
+pub const EMULTIHOP : ::c_int = -2147454925;
+pub const ENOLINK : ::c_int = -2147454923;
+pub const EPROTO : ::c_int = -2147454919;
+
+pub const IPPROTO_RAW: ::c_int = 255;
+
+// These are prefixed with POSIX_ on Haiku
+pub const MADV_NORMAL: ::c_int = 1;
+pub const MADV_SEQUENTIAL: ::c_int = 2;
+pub const MADV_RANDOM: ::c_int = 3;
+pub const MADV_WILLNEED: ::c_int = 4;
+pub const MADV_DONTNEED: ::c_int = 5;
+
+pub const IFF_LOOPBACK: ::c_int = 0x0008;
+
+pub const AF_UNIX: ::c_int = 9;
+pub const AF_INET: ::c_int = 1;
+pub const AF_INET6: ::c_int = 6;
+pub const SOCK_RAW: ::c_int = 3;
+pub const IP_MULTICAST_TTL: ::c_int = 10;
+pub const IP_MULTICAST_LOOP: ::c_int = 11;
+pub const IP_TTL: ::c_int = 4;
+pub const IP_HDRINCL: ::c_int = 2;
+pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
+pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
+
+pub const TCP_NODELAY: ::c_int = 0x01;
+pub const TCP_MAXSEG: ::c_int = 0x02;
+pub const TCP_NOPUSH: ::c_int = 0x04;
+pub const TCP_NOOPT: ::c_int = 0x08;
+
+pub const IPV6_MULTICAST_LOOP: ::c_int = 26;
+pub const IPV6_JOIN_GROUP: ::c_int = 28;
+pub const IPV6_LEAVE_GROUP: ::c_int = 29;
+pub const IPV6_V6ONLY: ::c_int = 30;
+
+pub const SO_DEBUG: ::c_int = 0x00000004;
+
+pub const MSG_PEEK: ::c_int = 0x2;
+pub const MSG_NOSIGNAL: ::c_int = 0x0800;
+
+pub const SHUT_RD: ::c_int = 0;
+pub const SHUT_WR: ::c_int = 1;
+pub const SHUT_RDWR: ::c_int = 2;
+
+pub const LOCK_SH: ::c_int = 0x01;
+pub const LOCK_EX: ::c_int = 0x02;
+pub const LOCK_NB: ::c_int = 0x04;
+pub const LOCK_UN: ::c_int = 0x08;
+
+pub const SIGSTKSZ: ::size_t = 16384;
+
+pub const SA_NODEFER: ::c_int = 0x08;
+pub const SA_RESETHAND: ::c_int = 0x04;
+pub const SA_RESTART: ::c_int = 0x10;
+pub const SA_NOCLDSTOP: ::c_int = 0x01;
+
+pub const FD_SETSIZE: usize = 1024;
+
+pub const RTLD_NOW: ::c_int = 0x1;
+pub const RTLD_DEFAULT: *mut ::c_void = 0isize as *mut ::c_void;
+
+pub const BUFSIZ: ::c_uint = 8192;
+pub const FILENAME_MAX: ::c_uint = 256;
+pub const FOPEN_MAX: ::c_uint = 128;
+pub const L_tmpnam: ::c_uint = 512;
+pub const TMP_MAX: ::c_uint = 32768;
+pub const _PC_NAME_MAX: ::c_int = 4;
+
+pub const FIONBIO: ::c_int = 0xbe000000;
+
+pub const _SC_IOV_MAX : ::c_int = 32;
+pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 25;
+pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 26;
+pub const _SC_PAGESIZE : ::c_int = 27;
+pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 48;
+pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 49;
+pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 50;
+pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 46;
+pub const _SC_THREAD_STACK_MIN : ::c_int = 47;
+pub const _SC_THREADS : ::c_int = 31;
+pub const _SC_ATEXIT_MAX : ::c_int = 37;
+
+pub const PTHREAD_STACK_MIN: ::size_t = 8192;
+
+pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
+    flags: 0,
+    lock: 0,
+    unused: -42,
+    owner: -1,
+    owner_count: 0,
+};
+pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
+    flags: 0,
+    unused: -42,
+    mutex: 0 as *mut _,
+    waiter_count: 0,
+    lock: 0,
+};
+pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
+    flags: 0,
+    owner: 0,
+    lock_sem: 0,
+    lock_count: 0,
+    reader_count: 0,
+    writer_count: 0,
+    waiters: [0 as *mut _; 2],
+};
+
+pub const PTHREAD_MUTEX_DEFAULT: ::c_int = 0;
+pub const PTHREAD_MUTEX_NORMAL: ::c_int = 1;
+pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
+pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 3;
+
+pub const FIOCLEX: c_ulong = 0; // TODO: does not exist on Haiku!
+
+pub const SA_ONSTACK: c_ulong = 0x20;
+pub const SA_SIGINFO: c_ulong = 0x40;
+pub const SA_NOCLDWAIT: c_ulong = 0x02;
+
+pub const SIG_SETMASK: ::c_int = 3;
+
+pub const RUSAGE_CHILDREN: ::c_int = -1;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+
+pub const SOL_SOCKET: ::c_int = -1;
+pub const SO_ACCEPTCONN: ::c_int = 0x00000001;
+pub const SO_BROADCAST: ::c_int = 0x00000002;
+pub const SO_DONTROUTE: ::c_int = 0x00000008;
+pub const SO_KEEPALIVE: ::c_int = 0x00000010;
+pub const SO_OOBINLINE: ::c_int = 0x00000020;
+pub const SO_REUSEADDR: ::c_int = 0x00000040;
+pub const SO_REUSEPORT: ::c_int = 0x00000080;
+pub const SO_USELOOPBACK: ::c_int = 0x00000100;
+pub const SO_LINGER: ::c_int = 0x00000200;
+pub const SO_SNDBUF: ::c_int = 0x40000001;
+pub const SO_SNDLOWAT: ::c_int = 0x40000002;
+pub const SO_SNDTIMEO: ::c_int = 0x40000003;
+pub const SO_RCVBUF: ::c_int = 0x40000004;
+pub const SO_RCVLOWAT: ::c_int = 0x40000005;
+pub const SO_RCVTIMEO: ::c_int = 0x40000006;
+pub const SO_ERROR: ::c_int = 0x40000007;
+pub const SO_TYPE: ::c_int = 0x40000008;
+pub const SO_NONBLOCK: ::c_int = 0x40000009;
+pub const SO_BINDTODEVICE: ::c_int = 0x4000000a;
+pub const SO_PEERCRED: ::c_int = 0x4000000b;
+
+pub const NI_MAXHOST: ::size_t = 1025;
+
+pub const WNOHANG: ::c_int = 0x01;
+pub const WUNTRACED: ::c_int = 0x02;
+pub const WCONTINUED: ::c_int = 0x04;
+pub const WEXITED: ::c_int = 0x08;
+pub const WSTOPPED: ::c_int = 0x10;
+pub const WNOWAIT: ::c_int = 0x20;
+
+pub const P_ALL: idtype_t = 0;
+pub const P_PID: idtype_t = 1;
+pub const P_PGID: idtype_t = 2;
+
+pub const VINTR: usize = 0;
+pub const VQUIT: usize = 1;
+pub const VERASE: usize = 2;
+pub const VKILL: usize = 3;
+pub const VEOF: usize = 4;
+pub const VEOL: usize = 5;
+pub const VMIN: usize = 4;
+pub const VTIME: usize = 5;
+pub const VEOL2: usize = 6;
+pub const VSWTCH: usize = 7;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VSUSP: usize = 10;
+pub const OLCUC:  ::tcflag_t = 0o000002;
+pub const OCRNL:  ::tcflag_t = 0o000010;
+pub const ONOCR:  ::tcflag_t = 0o000020;
+pub const ONLRET: ::tcflag_t = 0o000040;
+pub const OFILL:  ::tcflag_t = 0o000100;
+pub const OFDEL:  ::tcflag_t = 0o000200;
+pub const NLDLY:  ::tcflag_t = 0o000400;
+pub const NL0:    ::tcflag_t = 0o000000;
+pub const NL1:    ::tcflag_t = 0o000400;
+pub const CRDLY:  ::tcflag_t = 0o003000;
+pub const CR0:    ::tcflag_t = 0o000000;
+pub const CR1:    ::tcflag_t = 0o001000;
+pub const CR2:    ::tcflag_t = 0o002000;
+pub const CR3:    ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const TAB0:   ::tcflag_t = 0o000000;
+pub const TAB1:   ::tcflag_t = 0o004000;
+pub const TAB2:   ::tcflag_t = 0o010000;
+pub const TAB3:   ::tcflag_t = 0o014000;
+pub const BSDLY:  ::tcflag_t = 0o020000;
+pub const BS0:    ::tcflag_t = 0o000000;
+pub const BS1:    ::tcflag_t = 0o020000;
+pub const FFDLY:  ::tcflag_t = 0o100000;
+pub const FF0:    ::tcflag_t = 0o000000;
+pub const FF1:    ::tcflag_t = 0o100000;
+pub const VTDLY:  ::tcflag_t = 0o040000;
+pub const VT0:    ::tcflag_t = 0o000000;
+pub const VT1:    ::tcflag_t = 0o040000;
+
+pub const TCGB_CTS: ::c_int = 0x01;
+pub const TCGB_DSR: ::c_int = 0x02;
+pub const TCGB_RI: ::c_int = 0x04;
+pub const TCGB_DCD: ::c_int = 0x08;
+pub const TIOCM_CTS: ::c_int = TCGB_CTS;
+pub const TIOCM_CD: ::c_int = TCGB_DCD;
+pub const TIOCM_CAR: ::c_int = TIOCM_CD;
+pub const TIOCM_RI: ::c_int = TCGB_RI;
+pub const TIOCM_DSR: ::c_int = TCGB_DSR;
+pub const TIOCM_DTR: ::c_int = 0x10;
+pub const TIOCM_RTS: ::c_int = 0x20;
+
+f! {
+    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
+        let fd = fd as usize;
+        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        (*set).fds_bits[fd / size] &= !(1 << (fd % size));
+        return
+    }
+
+    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
+        let fd = fd as usize;
+        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0
+    }
+
+    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
+        let fd = fd as usize;
+        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        (*set).fds_bits[fd / size] |= 1 << (fd % size);
+        return
+    }
+
+    pub fn FD_ZERO(set: *mut fd_set) -> () {
+        for slot in (*set).fds_bits.iter_mut() {
+            *slot = 0;
+        }
+    }
+
+    pub fn WIFEXITED(status: ::c_int) -> bool {
+        (status >> 8) == 0
+    }
+
+    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
+        (status & 0xff)
+    }
+
+    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
+        (status >> 8) & 0xff
+    }
+}
+
+extern {
+    pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_settime(clk_id: ::c_int, tp: *const ::timespec) -> ::c_int;
+    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
+                                     guardsize: *mut ::size_t) -> ::c_int;
+    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
+                                 stackaddr: *mut *mut ::c_void,
+                                 stacksize: *mut ::size_t) -> ::c_int;
+    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
+                                     clock_id: *mut clockid_t) -> ::c_int;
+    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
+                                     clock_id: ::clockid_t) -> ::c_int;
+    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
+    pub fn setgroups(ngroups: ::size_t,
+                     ptr: *const ::gid_t) -> ::c_int;
+    pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
+    pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
+                    -> ::c_int;
+    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
+    pub fn getnameinfo(sa: *const ::sockaddr,
+                       salen: ::socklen_t,
+                       host: *mut ::c_char,
+                       hostlen: ::size_t,
+                       serv: *mut ::c_char,
+                       sevlen: ::size_t,
+                       flags: ::c_int) -> ::c_int;
+    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
+                                   abstime: *const ::timespec) -> ::c_int;
+    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
+                  options: ::c_int) -> ::c_int;
+
+    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
+    pub fn glob(pattern: *const ::c_char,
+                flags: ::c_int,
+                errfunc: Option<extern fn(epath: *const ::c_char,
+                                          errno: ::c_int) -> ::c_int>,
+                pglob: *mut ::glob_t) -> ::c_int;
+    pub fn globfree(pglob: *mut ::glob_t);
+
+    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
+                         -> ::c_int;
+
+    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
+
+    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
+
+    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
+    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
+                  -> ::c_int;
+
+    pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
+
+    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
+                    flags: ::c_int, addr: *mut ::sockaddr,
+                    addrlen: *mut ::socklen_t) -> ::ssize_t;
+    pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
+    pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int;
+    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
+
+    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
+                address_len: ::socklen_t) -> ::c_int;
+
+    pub fn writev(fd: ::c_int,
+                  iov: *const ::iovec,
+                  iovcnt: ::c_int) -> ::ssize_t;
+    pub fn readv(fd: ::c_int,
+                 iov: *const ::iovec,
+                 iovcnt: ::c_int) -> ::ssize_t;
+
+    pub fn sendmsg(fd: ::c_int,
+                   msg: *const ::msghdr,
+                   flags: ::c_int) -> ::ssize_t;
+    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
+                   -> ::ssize_t;
+    pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
+                   environment: *const *const ::c_char) -> ::c_int;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
+    pub fn getgrgid_r(uid: ::uid_t,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "sigaltstack$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
+    pub fn sigaltstack(ss: *const stack_t,
+                       oss: *mut stack_t) -> ::c_int;
+    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
+    pub fn getdtablesize() -> ::c_int;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
+    pub fn getgrnam_r(name: *const ::c_char,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_sigmask$UNIX2003")]
+    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
+                           oldset: *mut sigset_t) -> ::c_int;
+    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
+    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
+    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
+    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
+    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
+    pub fn getpwnam_r(name: *const ::c_char,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
+    pub fn getpwuid_r(uid: ::uid_t,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
+               link_name = "sigwait$UNIX2003")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
+    pub fn sigwait(set: *const sigset_t,
+                   sig: *mut ::c_int) -> ::c_int;
+    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
+                          parent: Option<unsafe extern fn()>,
+                          child: Option<unsafe extern fn()>) -> ::c_int;
+    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "popen$UNIX2003")]
+    pub fn popen(command: *const c_char,
+                 mode: *const c_char) -> *mut ::FILE;
+}
+
+cfg_if! {
+    if #[cfg(target_pointer_width = "64")] {
+        mod b64;
+        pub use self::b64::*;
+    } else {
+        mod b32;
+        pub use self::b32::*;
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/mod.rs
@@ -0,0 +1,899 @@
+//! Definitions found commonly among almost all Unix derivatives
+//!
+//! More functions and definitions can be found in the more specific modules
+//! according to the platform in question.
+
+use dox::Option;
+
+pub type pid_t = i32;
+pub type uid_t = u32;
+pub type gid_t = u32;
+pub type in_addr_t = u32;
+pub type in_port_t = u16;
+pub type sighandler_t = ::size_t;
+pub type cc_t = ::c_uchar;
+
+pub enum DIR {}
+pub enum locale_t {}
+
+s! {
+    pub struct group {
+        pub gr_name: *mut ::c_char,
+        pub gr_passwd: *mut ::c_char,
+        pub gr_gid: ::gid_t,
+        pub gr_mem: *mut *mut ::c_char,
+    }
+
+    pub struct utimbuf {
+        pub actime: time_t,
+        pub modtime: time_t,
+    }
+
+    pub struct timeval {
+        pub tv_sec: time_t,
+        pub tv_usec: suseconds_t,
+    }
+
+    pub struct timespec {
+        pub tv_sec: time_t,
+        pub tv_nsec: c_long,
+    }
+
+    pub struct rlimit {
+        pub rlim_cur: rlim_t,
+        pub rlim_max: rlim_t,
+    }
+
+    pub struct rusage {
+        pub ru_utime: timeval,
+        pub ru_stime: timeval,
+        pub ru_maxrss: c_long,
+        pub ru_ixrss: c_long,
+        pub ru_idrss: c_long,
+        pub ru_isrss: c_long,
+        pub ru_minflt: c_long,
+        pub ru_majflt: c_long,
+        pub ru_nswap: c_long,
+        pub ru_inblock: c_long,
+        pub ru_oublock: c_long,
+        pub ru_msgsnd: c_long,
+        pub ru_msgrcv: c_long,
+        pub ru_nsignals: c_long,
+        pub ru_nvcsw: c_long,
+        pub ru_nivcsw: c_long,
+
+        #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+        __reserved: [c_long; 16],
+    }
+
+    #[cfg_attr(target_os = "netbsd", repr(packed))]
+    pub struct in_addr {
+        pub s_addr: in_addr_t,
+    }
+
+    pub struct in6_addr {
+        pub s6_addr: [u8; 16],
+        __align: [u32; 0],
+    }
+
+    pub struct ip_mreq {
+        pub imr_multiaddr: in_addr,
+        pub imr_interface: in_addr,
+    }
+
+    pub struct ipv6_mreq {
+        pub ipv6mr_multiaddr: in6_addr,
+        #[cfg(target_os = "android")]
+        pub ipv6mr_interface: ::c_int,
+        #[cfg(not(target_os = "android"))]
+        pub ipv6mr_interface: ::c_uint,
+    }
+
+    pub struct hostent {
+        pub h_name: *mut ::c_char,
+        pub h_aliases: *mut *mut ::c_char,
+        pub h_addrtype: ::c_int,
+        pub h_length: ::c_int,
+        pub h_addr_list: *mut *mut ::c_char,
+    }
+
+    pub struct iovec {
+        pub iov_base: *mut ::c_void,
+        pub iov_len: ::size_t,
+    }
+
+    pub struct pollfd {
+        pub fd: ::c_int,
+        pub events: ::c_short,
+        pub revents: ::c_short,
+    }
+
+    pub struct winsize {
+        pub ws_row: ::c_ushort,
+        pub ws_col: ::c_ushort,
+        pub ws_xpixel: ::c_ushort,
+        pub ws_ypixel: ::c_ushort,
+    }
+
+    pub struct linger {
+        pub l_onoff: ::c_int,
+        pub l_linger: ::c_int,
+    }
+
+    pub struct sigval {
+        // Actually a union of an int and a void*
+        pub sival_ptr: *mut ::c_void
+    }
+
+    // <sys/time.h>
+    pub struct itimerval {
+        pub it_interval: ::timeval,
+        pub it_value: ::timeval,
+    }
+
+    // <sys/times.h>
+    pub struct tms {
+        pub tms_utime: ::clock_t,
+        pub tms_stime: ::clock_t,
+        pub tms_cutime: ::clock_t,
+        pub tms_cstime: ::clock_t,
+    }
+}
+
+pub const SIG_DFL: sighandler_t = 0 as sighandler_t;
+pub const SIG_IGN: sighandler_t = 1 as sighandler_t;
+pub const SIG_ERR: sighandler_t = !0 as sighandler_t;
+
+pub const DT_FIFO: u8 = 1;
+pub const DT_CHR: u8 = 2;
+pub const DT_DIR: u8 = 4;
+pub const DT_BLK: u8 = 6;
+pub const DT_REG: u8 = 8;
+pub const DT_LNK: u8 = 10;
+pub const DT_SOCK: u8 = 12;
+
+pub const FD_CLOEXEC: ::c_int = 0x1;
+
+pub const USRQUOTA: ::c_int = 0;
+pub const GRPQUOTA: ::c_int = 1;
+
+pub const SIGIOT: ::c_int = 6;
+
+pub const S_ISUID: ::c_int = 0x800;
+pub const S_ISGID: ::c_int = 0x400;
+pub const S_ISVTX: ::c_int = 0x200;
+
+pub const POLLIN: ::c_short = 0x1;
+pub const POLLPRI: ::c_short = 0x2;
+pub const POLLOUT: ::c_short = 0x4;
+pub const POLLERR: ::c_short = 0x8;
+pub const POLLHUP: ::c_short = 0x10;
+pub const POLLNVAL: ::c_short = 0x20;
+
+pub const IF_NAMESIZE: ::size_t = 16;
+
+pub const RTLD_LAZY: ::c_int = 0x1;
+
+pub const LOG_EMERG: ::c_int = 0;
+pub const LOG_ALERT: ::c_int = 1;
+pub const LOG_CRIT: ::c_int = 2;
+pub const LOG_ERR: ::c_int = 3;
+pub const LOG_WARNING: ::c_int = 4;
+pub const LOG_NOTICE: ::c_int = 5;
+pub const LOG_INFO: ::c_int = 6;
+pub const LOG_DEBUG: ::c_int = 7;
+
+pub const LOG_KERN: ::c_int = 0;
+pub const LOG_USER: ::c_int = 1 << 3;
+pub const LOG_MAIL: ::c_int = 2 << 3;
+pub const LOG_DAEMON: ::c_int = 3 << 3;
+pub const LOG_AUTH: ::c_int = 4 << 3;
+pub const LOG_SYSLOG: ::c_int = 5 << 3;
+pub const LOG_LPR: ::c_int = 6 << 3;
+pub const LOG_NEWS: ::c_int = 7 << 3;
+pub const LOG_UUCP: ::c_int = 8 << 3;
+pub const LOG_LOCAL0: ::c_int = 16 << 3;
+pub const LOG_LOCAL1: ::c_int = 17 << 3;
+pub const LOG_LOCAL2: ::c_int = 18 << 3;
+pub const LOG_LOCAL3: ::c_int = 19 << 3;
+pub const LOG_LOCAL4: ::c_int = 20 << 3;
+pub const LOG_LOCAL5: ::c_int = 21 << 3;
+pub const LOG_LOCAL6: ::c_int = 22 << 3;
+pub const LOG_LOCAL7: ::c_int = 23 << 3;
+
+pub const LOG_PID: ::c_int = 0x01;
+pub const LOG_CONS: ::c_int = 0x02;
+pub const LOG_ODELAY: ::c_int = 0x04;
+pub const LOG_NDELAY: ::c_int = 0x08;
+pub const LOG_NOWAIT: ::c_int = 0x10;
+
+pub const LOG_PRIMASK: ::c_int = 7;
+pub const LOG_FACMASK: ::c_int = 0x3f8;
+
+pub const PRIO_PROCESS: ::c_int = 0;
+pub const PRIO_PGRP: ::c_int = 1;
+pub const PRIO_USER: ::c_int = 2;
+
+pub const PRIO_MIN: ::c_int = -20;
+pub const PRIO_MAX: ::c_int = 20;
+
+pub const IPPROTO_ICMP: ::c_int = 1;
+pub const IPPROTO_ICMPV6: ::c_int = 58;
+pub const IPPROTO_TCP: ::c_int = 6;
+pub const IPPROTO_UDP: ::c_int = 17;
+pub const IPPROTO_IP: ::c_int = 0;
+pub const IPPROTO_IPV6: ::c_int = 41;
+
+pub const INADDR_LOOPBACK: in_addr_t = 2130706433;
+pub const INADDR_ANY: in_addr_t = 0;
+pub const INADDR_BROADCAST: in_addr_t = 4294967295;
+pub const INADDR_NONE: in_addr_t = 4294967295;
+
+cfg_if! {
+    if #[cfg(dox)] {
+        // on dox builds don't pull in anything
+    } else if #[cfg(target_os = "l4re")] {
+        // required libraries for L4Re are linked externally, ATM
+    } else if #[cfg(all(not(stdbuild), feature = "use_std"))] {
+        // cargo build, don't pull in anything extra as the libstd  dep
+        // already pulls in all libs.
+    } else if #[cfg(any(all(target_env = "musl", not(target_arch = "mips"))))] {
+        #[link(name = "c", kind = "static", cfg(target_feature = "crt-static"))]
+        #[link(name = "c", cfg(not(target_feature = "crt-static")))]
+        extern {}
+    } else if #[cfg(target_os = "emscripten")] {
+        #[link(name = "c")]
+        extern {}
+    } else if #[cfg(all(target_os = "netbsd", target_vendor = "rumprun"))] {
+        // Since we don't use -nodefaultlibs on Rumprun, libc is always pulled
+        // in automatically by the linker. We avoid passing it explicitly, as it
+        // causes some versions of binutils to crash with an assertion failure.
+        #[link(name = "m")]
+        extern {}
+    } else if #[cfg(any(target_os = "macos",
+                        target_os = "ios",
+                        target_os = "android",
+                        target_os = "openbsd",
+                        target_os = "bitrig"))] {
+        #[link(name = "c")]
+        #[link(name = "m")]
+        extern {}
+    } else if #[cfg(target_os = "haiku")] {
+        #[link(name = "root")]
+        #[link(name = "network")]
+        extern {}
+    } else if #[cfg(target_os = "fuchsia")] {
+        #[link(name = "c")]
+        #[link(name = "mxio")]
+        extern {}
+    } else if #[cfg(target_env = "newlib")] {
+        #[link(name = "c")]
+        #[link(name = "m")]
+        extern {}
+    } else {
+        #[link(name = "c")]
+        #[link(name = "m")]
+        #[link(name = "rt")]
+        #[link(name = "pthread")]
+        extern {}
+    }
+}
+
+extern {
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam50")]
+    pub fn getpwnam(name: *const ::c_char) -> *mut passwd;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid50")]
+    pub fn getpwuid(uid: ::uid_t) -> *mut passwd;
+
+    pub fn fprintf(stream: *mut ::FILE,
+                   format: *const ::c_char, ...) -> ::c_int;
+    pub fn printf(format: *const ::c_char, ...) -> ::c_int;
+    pub fn snprintf(s: *mut ::c_char, n: ::size_t,
+                    format: *const ::c_char, ...) -> ::c_int;
+    pub fn sprintf(s: *mut ::c_char, format: *const ::c_char, ...) -> ::c_int;
+    pub fn fscanf(stream: *mut ::FILE, format: *const ::c_char, ...) -> ::c_int;
+    pub fn scanf(format: *const ::c_char, ...) -> ::c_int;
+    pub fn sscanf(s: *const ::c_char, format: *const ::c_char, ...) -> ::c_int;
+    pub fn getchar_unlocked() -> ::c_int;
+    pub fn putchar_unlocked(c: ::c_int) -> ::c_int;
+
+    #[cfg_attr(target_os = "netbsd", link_name = "__socket30")]
+    pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "connect$UNIX2003")]
+    pub fn connect(socket: ::c_int, address: *const sockaddr,
+                   len: socklen_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "listen$UNIX2003")]
+    pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "accept$UNIX2003")]
+    pub fn accept(socket: ::c_int, address: *mut sockaddr,
+                  address_len: *mut socklen_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "getpeername$UNIX2003")]
+    pub fn getpeername(socket: ::c_int, address: *mut sockaddr,
+                       address_len: *mut socklen_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "getsockname$UNIX2003")]
+    pub fn getsockname(socket: ::c_int, address: *mut sockaddr,
+                       address_len: *mut socklen_t) -> ::c_int;
+    pub fn setsockopt(socket: ::c_int, level: ::c_int, name: ::c_int,
+                      value: *const ::c_void,
+                      option_len: socklen_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "socketpair$UNIX2003")]
+    pub fn socketpair(domain: ::c_int, type_: ::c_int, protocol: ::c_int,
+                      socket_vector: *mut ::c_int) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "sendto$UNIX2003")]
+    pub fn sendto(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
+                  flags: ::c_int, addr: *const sockaddr,
+                  addrlen: socklen_t) -> ::ssize_t;
+    pub fn shutdown(socket: ::c_int, how: ::c_int) -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "chmod$UNIX2003")]
+    pub fn chmod(path: *const c_char, mode: mode_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "fchmod$UNIX2003")]
+    pub fn fchmod(fd: ::c_int, mode: mode_t) -> ::c_int;
+
+    #[cfg_attr(target_os = "macos", link_name = "fstat$INODE64")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__fstat50")]
+    pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int;
+
+    pub fn mkdir(path: *const c_char, mode: mode_t) -> ::c_int;
+
+    #[cfg_attr(target_os = "macos", link_name = "stat$INODE64")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__stat50")]
+    pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int;
+
+    pub fn pclose(stream: *mut ::FILE) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "fdopen$UNIX2003")]
+    pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE;
+    pub fn fileno(stream: *mut ::FILE) -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "open$UNIX2003")]
+    pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "creat$UNIX2003")]
+    pub fn creat(path: *const c_char, mode: mode_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "fcntl$UNIX2003")]
+    pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
+               link_name = "opendir$INODE64")]
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "opendir$INODE64$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__opendir30")]
+    pub fn opendir(dirname: *const c_char) -> *mut ::DIR;
+    #[cfg_attr(target_os = "macos", link_name = "readdir$INODE64")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__readdir30")]
+    pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent;
+    #[cfg_attr(target_os = "macos", link_name = "readdir_r$INODE64")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__readdir_r30")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_readdir_r")]
+    pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent,
+                     result: *mut *mut ::dirent) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "closedir$UNIX2003")]
+    pub fn closedir(dirp: *mut ::DIR) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
+               link_name = "rewinddir$INODE64")]
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "rewinddir$INODE64$UNIX2003")]
+    pub fn rewinddir(dirp: *mut ::DIR);
+
+    pub fn openat(dirfd: ::c_int, pathname: *const ::c_char,
+                  flags: ::c_int, ...) -> ::c_int;
+    pub fn fchmodat(dirfd: ::c_int, pathname: *const ::c_char,
+                    mode: ::mode_t, flags: ::c_int) -> ::c_int;
+    pub fn fchown(fd: ::c_int,
+                  owner: ::uid_t,
+                  group: ::gid_t) -> ::c_int;
+    pub fn fchownat(dirfd: ::c_int, pathname: *const ::c_char,
+                    owner: ::uid_t, group: ::gid_t,
+                    flags: ::c_int) -> ::c_int;
+    #[cfg_attr(target_os = "macos", link_name = "fstatat$INODE64")]
+    pub fn fstatat(dirfd: ::c_int, pathname: *const ::c_char,
+                   buf: *mut stat, flags: ::c_int) -> ::c_int;
+    pub fn linkat(olddirfd: ::c_int, oldpath: *const ::c_char,
+                  newdirfd: ::c_int, newpath: *const ::c_char,
+                  flags: ::c_int) -> ::c_int;
+    pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char,
+                   mode: ::mode_t) -> ::c_int;
+    pub fn readlinkat(dirfd: ::c_int, pathname: *const ::c_char,
+                      buf: *mut ::c_char, bufsiz: ::size_t) -> ::ssize_t;
+    pub fn renameat(olddirfd: ::c_int, oldpath: *const ::c_char,
+                    newdirfd: ::c_int, newpath: *const ::c_char)
+                    -> ::c_int;
+    pub fn symlinkat(target: *const ::c_char, newdirfd: ::c_int,
+                     linkpath: *const ::c_char) -> ::c_int;
+    pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
+                    flags: ::c_int) -> ::c_int;
+
+    pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int;
+    pub fn alarm(seconds: ::c_uint) -> ::c_uint;
+    pub fn chdir(dir: *const c_char) -> ::c_int;
+    pub fn fchdir(dirfd: ::c_int) -> ::c_int;
+    pub fn chown(path: *const c_char, uid: uid_t,
+                 gid: gid_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "lchown$UNIX2003")]
+    pub fn lchown(path: *const c_char, uid: uid_t,
+                  gid: gid_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "close$NOCANCEL$UNIX2003")]
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
+               link_name = "close$NOCANCEL")]
+    pub fn close(fd: ::c_int) -> ::c_int;
+    pub fn dup(fd: ::c_int) -> ::c_int;
+    pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int;
+    pub fn execl(path: *const c_char,
+                 arg0: *const c_char, ...) -> ::c_int;
+    pub fn execle(path: *const ::c_char,
+                  arg0: *const ::c_char, ...) -> ::c_int;
+    pub fn execlp(file: *const ::c_char,
+                  arg0: *const ::c_char, ...) -> ::c_int;
+    pub fn execv(prog: *const c_char,
+                 argv: *const *const c_char) -> ::c_int;
+    pub fn execve(prog: *const c_char, argv: *const *const c_char,
+                  envp: *const *const c_char)
+                  -> ::c_int;
+    pub fn execvp(c: *const c_char,
+                  argv: *const *const c_char) -> ::c_int;
+    pub fn fork() -> pid_t;
+    pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long;
+    pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char;
+    pub fn getegid() -> gid_t;
+    pub fn geteuid() -> uid_t;
+    pub fn getgid() -> gid_t;
+    pub fn getgroups(ngroups_max: ::c_int, groups: *mut gid_t)
+                     -> ::c_int;
+    pub fn getlogin() -> *mut c_char;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "getopt$UNIX2003")]
+    pub fn getopt(argc: ::c_int, argv: *const *mut c_char,
+                  optstr: *const c_char) -> ::c_int;
+    pub fn getpgid(pid: pid_t) -> pid_t;
+    pub fn getpgrp() -> pid_t;
+    pub fn getpid() -> pid_t;
+    pub fn getppid() -> pid_t;
+    pub fn getuid() -> uid_t;
+    pub fn isatty(fd: ::c_int) -> ::c_int;
+    pub fn link(src: *const c_char, dst: *const c_char) -> ::c_int;
+    pub fn lseek(fd: ::c_int, offset: off_t, whence: ::c_int) -> off_t;
+    pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pause$UNIX2003")]
+    pub fn pause() -> ::c_int;
+    pub fn pipe(fds: *mut ::c_int) -> ::c_int;
+    pub fn posix_memalign(memptr: *mut *mut ::c_void,
+                      align: ::size_t,
+                      size: ::size_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "read$UNIX2003")]
+    pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t)
+                -> ::ssize_t;
+    pub fn rmdir(path: *const c_char) -> ::c_int;
+    pub fn seteuid(uid: uid_t) -> ::c_int;
+    pub fn setgid(gid: gid_t) -> ::c_int;
+    pub fn setpgid(pid: pid_t, pgid: pid_t) -> ::c_int;
+    pub fn setsid() -> pid_t;
+    pub fn setuid(uid: uid_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "sleep$UNIX2003")]
+    pub fn sleep(secs: ::c_uint) -> ::c_uint;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "nanosleep$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__nanosleep50")]
+    pub fn nanosleep(rqtp: *const timespec,
+                     rmtp: *mut timespec) -> ::c_int;
+    pub fn tcgetpgrp(fd: ::c_int) -> pid_t;
+    pub fn tcsetpgrp(fd: ::c_int, pgrp: ::pid_t) -> ::c_int;
+    pub fn ttyname(fd: ::c_int) -> *mut c_char;
+    pub fn unlink(c: *const c_char) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "wait$UNIX2003")]
+    pub fn wait(status: *mut ::c_int) -> pid_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "waitpid$UNIX2003")]
+    pub fn waitpid(pid: pid_t, status: *mut ::c_int, options: ::c_int)
+                   -> pid_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "write$UNIX2003")]
+    pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t)
+                 -> ::ssize_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pread$UNIX2003")]
+    pub fn pread(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
+                 offset: off_t) -> ::ssize_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pwrite$UNIX2003")]
+    pub fn pwrite(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
+                  offset: off_t) -> ::ssize_t;
+    pub fn umask(mask: mode_t) -> mode_t;
+
+    #[cfg_attr(target_os = "netbsd", link_name = "__utime50")]
+    pub fn utime(file: *const c_char, buf: *const utimbuf) -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+                   link_name = "kill$UNIX2003")]
+    pub fn kill(pid: pid_t, sig: ::c_int) -> ::c_int;
+
+    pub fn mlock(addr: *const ::c_void, len: ::size_t) -> ::c_int;
+    pub fn munlock(addr: *const ::c_void, len: ::size_t) -> ::c_int;
+    pub fn mlockall(flags: ::c_int) -> ::c_int;
+    pub fn munlockall() -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "mmap$UNIX2003")]
+    pub fn mmap(addr: *mut ::c_void,
+                len: ::size_t,
+                prot: ::c_int,
+                flags: ::c_int,
+                fd: ::c_int,
+                offset: off_t)
+                -> *mut ::c_void;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "munmap$UNIX2003")]
+    pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int;
+
+    pub fn if_nametoindex(ifname: *const c_char) -> ::c_uint;
+    pub fn if_indextoname(ifindex: ::c_uint,
+                          ifname: *mut ::c_char) -> *mut ::c_char;
+
+    #[cfg_attr(target_os = "macos", link_name = "lstat$INODE64")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__lstat50")]
+    pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "fsync$UNIX2003")]
+    pub fn fsync(fd: ::c_int) -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "setenv$UNIX2003")]
+    pub fn setenv(name: *const c_char, val: *const c_char,
+                  overwrite: ::c_int) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "unsetenv$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__unsetenv13")]
+    pub fn unsetenv(name: *const c_char) -> ::c_int;
+
+    pub fn symlink(path1: *const c_char,
+                   path2: *const c_char) -> ::c_int;
+
+    pub fn ftruncate(fd: ::c_int, length: off_t) -> ::c_int;
+
+    pub fn signal(signum: ::c_int, handler: sighandler_t) -> sighandler_t;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "getrlimit$UNIX2003")]
+    pub fn getrlimit(resource: ::c_int, rlim: *mut rlimit) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "setrlimit$UNIX2003")]
+    pub fn setrlimit(resource: ::c_int, rlim: *const rlimit) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getrusage50")]
+    pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int;
+
+    #[cfg_attr(any(target_os = "macos", target_os = "ios"),
+               link_name = "realpath$DARWIN_EXTSN")]
+    pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char)
+                    -> *mut ::c_char;
+
+    pub fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int;
+
+    #[cfg_attr(target_os = "netbsd", link_name = "__gettimeofday50")]
+    pub fn gettimeofday(tp: *mut ::timeval,
+                        tz: *mut ::c_void) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__times13")]
+    pub fn times(buf: *mut ::tms) -> ::clock_t;
+
+    pub fn pthread_self() -> ::pthread_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_join$UNIX2003")]
+    pub fn pthread_join(native: ::pthread_t,
+                        value: *mut *mut ::c_void) -> ::c_int;
+    pub fn pthread_exit(value: *mut ::c_void);
+    pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int;
+    pub fn pthread_attr_destroy(attr: *mut ::pthread_attr_t) -> ::c_int;
+    pub fn pthread_attr_setstacksize(attr: *mut ::pthread_attr_t,
+                                     stack_size: ::size_t) -> ::c_int;
+    pub fn pthread_attr_setdetachstate(attr: *mut ::pthread_attr_t,
+                                       state: ::c_int) -> ::c_int;
+    pub fn pthread_detach(thread: ::pthread_t) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__libc_thr_yield")]
+    pub fn sched_yield() -> ::c_int;
+    pub fn pthread_key_create(key: *mut pthread_key_t,
+                              dtor: Option<unsafe extern fn(*mut ::c_void)>)
+                              -> ::c_int;
+    pub fn pthread_key_delete(key: pthread_key_t) -> ::c_int;
+    pub fn pthread_getspecific(key: pthread_key_t) -> *mut ::c_void;
+    pub fn pthread_setspecific(key: pthread_key_t, value: *const ::c_void)
+                               -> ::c_int;
+    pub fn pthread_mutex_init(lock: *mut pthread_mutex_t,
+                              attr: *const pthread_mutexattr_t) -> ::c_int;
+    pub fn pthread_mutex_destroy(lock: *mut pthread_mutex_t) -> ::c_int;
+    pub fn pthread_mutex_lock(lock: *mut pthread_mutex_t) -> ::c_int;
+    pub fn pthread_mutex_trylock(lock: *mut pthread_mutex_t) -> ::c_int;
+    pub fn pthread_mutex_unlock(lock: *mut pthread_mutex_t) -> ::c_int;
+
+    pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_mutexattr_destroy$UNIX2003")]
+    pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> ::c_int;
+    pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t,
+                                     _type: ::c_int) -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_cond_init$UNIX2003")]
+    pub fn pthread_cond_init(cond: *mut pthread_cond_t,
+                             attr: *const pthread_condattr_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_cond_wait$UNIX2003")]
+    pub fn pthread_cond_wait(cond: *mut pthread_cond_t,
+                             lock: *mut pthread_mutex_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_cond_timedwait$UNIX2003")]
+    pub fn pthread_cond_timedwait(cond: *mut pthread_cond_t,
+                              lock: *mut pthread_mutex_t,
+                              abstime: *const ::timespec) -> ::c_int;
+    pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> ::c_int;
+    pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> ::c_int;
+    pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> ::c_int;
+    pub fn pthread_condattr_init(attr: *mut pthread_condattr_t) -> ::c_int;
+    pub fn pthread_condattr_destroy(attr: *mut pthread_condattr_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_rwlock_init$UNIX2003")]
+    pub fn pthread_rwlock_init(lock: *mut pthread_rwlock_t,
+                               attr: *const pthread_rwlockattr_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_rwlock_destroy$UNIX2003")]
+    pub fn pthread_rwlock_destroy(lock: *mut pthread_rwlock_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_rwlock_rdlock$UNIX2003")]
+    pub fn pthread_rwlock_rdlock(lock: *mut pthread_rwlock_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_rwlock_tryrdlock$UNIX2003")]
+    pub fn pthread_rwlock_tryrdlock(lock: *mut pthread_rwlock_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_rwlock_wrlock$UNIX2003")]
+    pub fn pthread_rwlock_wrlock(lock: *mut pthread_rwlock_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_rwlock_trywrlock$UNIX2003")]
+    pub fn pthread_rwlock_trywrlock(lock: *mut pthread_rwlock_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_rwlock_unlock$UNIX2003")]
+    pub fn pthread_rwlock_unlock(lock: *mut pthread_rwlock_t) -> ::c_int;
+    pub fn pthread_rwlockattr_init(attr: *mut pthread_rwlockattr_t) -> ::c_int;
+    pub fn pthread_rwlockattr_destroy(attr: *mut pthread_rwlockattr_t)
+                                      -> ::c_int;
+    #[cfg_attr(all(target_os = "linux", not(target_env = "musl")),
+               link_name = "__xpg_strerror_r")]
+    pub fn strerror_r(errnum: ::c_int, buf: *mut c_char,
+                      buflen: ::size_t) -> ::c_int;
+
+    pub fn getsockopt(sockfd: ::c_int,
+                      level: ::c_int,
+                      optname: ::c_int,
+                      optval: *mut ::c_void,
+                      optlen: *mut ::socklen_t) -> ::c_int;
+    pub fn raise(signum: ::c_int) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigaction14")]
+    pub fn sigaction(signum: ::c_int,
+                     act: *const sigaction,
+                     oldact: *mut sigaction) -> ::c_int;
+
+    #[cfg_attr(target_os = "netbsd", link_name = "__utimes50")]
+    pub fn utimes(filename: *const ::c_char,
+                  times: *const ::timeval) -> ::c_int;
+    pub fn dlopen(filename: *const ::c_char,
+                  flag: ::c_int) -> *mut ::c_void;
+    pub fn dlerror() -> *mut ::c_char;
+    pub fn dlsym(handle: *mut ::c_void,
+                 symbol: *const ::c_char) -> *mut ::c_void;
+    pub fn dlclose(handle: *mut ::c_void) -> ::c_int;
+    pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int;
+
+    pub fn getaddrinfo(node: *const c_char,
+                       service: *const c_char,
+                       hints: *const addrinfo,
+                       res: *mut *mut addrinfo) -> ::c_int;
+    pub fn freeaddrinfo(res: *mut addrinfo);
+    pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char;
+    #[cfg_attr(any(
+                   all(target_os = "linux", not(target_env = "musl")),
+                   target_os = "freebsd",
+                   target_os = "dragonfly"),
+               link_name = "__res_init")]
+    #[cfg_attr(any(target_os = "macos", target_os = "ios"),
+               link_name = "res_9_init")]
+    pub fn res_init() -> ::c_int;
+
+    #[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")]
+    pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
+    #[cfg_attr(target_os = "netbsd", link_name = "__localtime_r50")]
+    pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "mktime$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__mktime50")]
+    pub fn mktime(tm: *mut tm) -> time_t;
+    #[cfg_attr(target_os = "netbsd", link_name = "__time50")]
+    pub fn time(time: *mut time_t) -> time_t;
+    #[cfg_attr(target_os = "netbsd", link_name = "__gmtime50")]
+    pub fn gmtime(time_p: *const time_t) -> *mut tm;
+    #[cfg_attr(target_os = "netbsd", link_name = "__locatime50")]
+    pub fn localtime(time_p: *const time_t) -> *mut tm;
+
+    #[cfg_attr(target_os = "netbsd", link_name = "__mknod50")]
+    pub fn mknod(pathname: *const ::c_char, mode: ::mode_t,
+                 dev: ::dev_t) -> ::c_int;
+    pub fn uname(buf: *mut ::utsname) -> ::c_int;
+    pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
+    pub fn chroot(name: *const ::c_char) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "usleep$UNIX2003")]
+    pub fn usleep(secs: ::c_uint) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "send$UNIX2003")]
+    pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
+                flags: ::c_int) -> ::ssize_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "recv$UNIX2003")]
+    pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
+                flags: ::c_int) -> ::ssize_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "putenv$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__putenv50")]
+    pub fn putenv(string: *mut c_char) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "poll$UNIX2003")]
+    pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
+               link_name = "select$1050")]
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "select$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__select50")]
+    pub fn select(nfds: ::c_int,
+                  readfs: *mut fd_set,
+                  writefds: *mut fd_set,
+                  errorfds: *mut fd_set,
+                  timeout: *mut timeval) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__setlocale50")]
+    pub fn setlocale(category: ::c_int,
+                     locale: *const ::c_char) -> *mut ::c_char;
+    pub fn localeconv() -> *mut lconv;
+
+    pub fn sem_destroy(sem: *mut sem_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "sem_wait$UNIX2003")]
+    pub fn sem_wait(sem: *mut sem_t) -> ::c_int;
+    pub fn sem_trywait(sem: *mut sem_t) -> ::c_int;
+    pub fn sem_post(sem: *mut sem_t) -> ::c_int;
+    pub fn sem_init(sem: *mut sem_t,
+                    pshared: ::c_int,
+                    value: ::c_uint)
+                    -> ::c_int;
+    pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> ::c_int;
+    pub fn fstatvfs(fd: ::c_int, buf: *mut statvfs) -> ::c_int;
+
+    pub fn readlink(path: *const c_char,
+                    buf: *mut c_char,
+                    bufsz: ::size_t)
+                    -> ::ssize_t;
+
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigemptyset14")]
+    pub fn sigemptyset(set: *mut sigset_t) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigaddset14")]
+    pub fn sigaddset(set: *mut sigset_t, signum: ::c_int) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigfillset14")]
+    pub fn sigfillset(set: *mut sigset_t) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigdelset14")]
+    pub fn sigdelset(set: *mut sigset_t, signum: ::c_int) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigismember14")]
+    pub fn sigismember(set: *const sigset_t, signum: ::c_int) -> ::c_int;
+
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigprocmask14")]
+    pub fn sigprocmask(how: ::c_int,
+                       set: *const sigset_t,
+                       oldset: *mut sigset_t)
+                       -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigpending14")]
+    pub fn sigpending(set: *mut sigset_t) -> ::c_int;
+
+    #[cfg_attr(target_os = "netbsd", link_name = "__timegm50")]
+    pub fn timegm(tm: *mut ::tm) -> time_t;
+
+    pub fn getsid(pid: pid_t) -> pid_t;
+
+    pub fn sysconf(name: ::c_int) -> ::c_long;
+
+    pub fn mkfifo(path: *const c_char, mode: mode_t) -> ::c_int;
+
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
+               link_name = "pselect$1050")]
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pselect$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__pselect50")]
+    pub fn pselect(nfds: ::c_int,
+                   readfs: *mut fd_set,
+                   writefds: *mut fd_set,
+                   errorfds: *mut fd_set,
+                   timeout: *const timespec,
+                   sigmask: *const sigset_t) -> ::c_int;
+    pub fn fseeko(stream: *mut ::FILE,
+                  offset: ::off_t,
+                  whence: ::c_int) -> ::c_int;
+    pub fn ftello(stream: *mut ::FILE) -> ::off_t;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "tcdrain$UNIX2003")]
+    pub fn tcdrain(fd: ::c_int) -> ::c_int;
+    pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t;
+    pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t;
+    pub fn cfmakeraw(termios: *mut ::termios);
+    pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
+    pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
+    pub fn cfsetspeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
+    pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int;
+    pub fn tcsetattr(fd: ::c_int,
+                     optional_actions: ::c_int,
+                     termios: *const ::termios) -> ::c_int;
+    pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int;
+    pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int;
+    pub fn tcgetsid(fd: ::c_int) -> ::pid_t;
+    pub fn tcsendbreak(fd: ::c_int, duration: ::c_int) -> ::c_int;
+    pub fn mkstemp(template: *mut ::c_char) -> ::c_int;
+    pub fn mkdtemp(template: *mut ::c_char) -> *mut ::c_char;
+
+    pub fn tmpnam(ptr: *mut ::c_char) -> *mut ::c_char;
+
+    pub fn openlog(ident: *const ::c_char, logopt: ::c_int, facility: ::c_int);
+    pub fn closelog();
+    pub fn setlogmask(maskpri: ::c_int) -> ::c_int;
+    pub fn syslog(priority: ::c_int, message: *const ::c_char, ...);
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "nice$UNIX2003")]
+    pub fn nice(incr: ::c_int) -> ::c_int;
+
+    pub fn grantpt(fd: ::c_int) -> ::c_int;
+    pub fn posix_openpt(flags: ::c_int) -> ::c_int;
+    pub fn ptsname(fd: ::c_int) -> *mut ::c_char;
+    pub fn unlockpt(fd: ::c_int) -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(target_env = "uclibc")] {
+        mod uclibc;
+        pub use self::uclibc::*;
+    } else if #[cfg(target_env = "newlib")] {
+        mod newlib;
+        pub use self::newlib::*;
+    } else if #[cfg(any(target_os = "linux",
+                        target_os = "android",
+                        target_os = "emscripten",
+                        target_os = "fuchsia"))] {
+        mod notbsd;
+        pub use self::notbsd::*;
+    } else if #[cfg(any(target_os = "macos",
+                        target_os = "ios",
+                        target_os = "freebsd",
+                        target_os = "dragonfly",
+                        target_os = "openbsd",
+                        target_os = "netbsd",
+                        target_os = "bitrig"))] {
+        mod bsd;
+        pub use self::bsd::*;
+    } else if #[cfg(target_os = "solaris")] {
+        mod solaris;
+        pub use self::solaris::*;
+    } else if #[cfg(target_os = "haiku")] {
+        mod haiku;
+        pub use self::haiku::*;
+    } else {
+        // Unknown target_os
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/newlib/arm/mod.rs
@@ -0,0 +1,5 @@
+pub type c_char = u8;
+pub type wchar_t = u32;
+
+pub type c_long = i32;
+pub type c_ulong = u32;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/newlib/mod.rs
@@ -0,0 +1,658 @@
+use dox::mem;
+
+pub type blkcnt_t = i32;
+pub type blksize_t = i32;
+pub type clock_t = i32;
+pub type clockid_t = ::c_ulong;
+pub type dev_t = u32;
+pub type fsblkcnt_t = u64;
+pub type fsfilcnt_t = u32;
+pub type id_t = u32;
+pub type ino_t = u32;
+pub type key_t = ::c_int;
+pub type loff_t = ::c_longlong;
+pub type mode_t = ::c_uint;
+pub type nfds_t = u32;
+pub type nlink_t = ::c_ushort;
+pub type off_t = i64;
+pub type pthread_t = ::c_ulong;
+pub type pthread_key_t = ::c_uint;
+pub type rlim_t = u32;
+pub type sa_family_t = u8;
+pub type socklen_t = u32;
+pub type speed_t = u32;
+pub type suseconds_t = i32;
+pub type tcflag_t = ::c_uint;
+pub type time_t = i32;
+pub type useconds_t = u32;
+
+s! {
+    pub struct sockaddr {
+        pub sa_family: sa_family_t,
+        pub sa_data: [::c_char; 14],
+    }
+
+    pub struct sockaddr_in {
+        pub sin_family: sa_family_t,
+        pub sin_port: ::in_port_t,
+        pub sin_addr: ::in_addr,
+        pub sin_zero: [u8; 8],
+    }
+
+    pub struct sockaddr_in6 { // Unverified
+        pub sin6_family: sa_family_t,
+        pub sin6_port: ::in_port_t,
+        pub sin6_flowinfo: u32,
+        pub sin6_addr: ::in6_addr,
+        pub sin6_scope_id: u32,
+    }
+
+    pub struct sockaddr_storage {
+        pub ss_family: sa_family_t,
+        pub __ss_padding: [u8; 26],
+    }
+
+    pub struct addrinfo {
+        pub ai_flags: ::c_int,
+        pub ai_family: ::c_int,
+        pub ai_socktype: ::c_int,
+        pub ai_protocol: ::c_int,
+        pub ai_addrlen: socklen_t,
+        pub ai_canonname: *mut ::c_char,
+        pub ai_addr: *mut sockaddr,
+        pub ai_next: *mut addrinfo,
+    }
+
+    pub struct ip_mreq {
+        pub imr_multiaddr: in_addr,
+        pub imr_interface: in_addr,
+    }
+
+    pub struct linger {
+        pub l_onoff: ::c_int,
+        pub l_linger: ::c_int,
+    }
+
+    pub struct in_addr {
+            pub s_addr: ::in_addr_t,
+    }
+
+    pub struct hostent {
+            pub h_name: *mut ::c_char,
+            pub h_aliases: *mut *mut ::c_char,
+            pub h_addrtype: ::c_int,
+            pub h_length: ::c_int,
+            pub h_addr_list: *mut *mut ::c_char,
+            pub h_addr: *mut ::c_char,
+    }
+
+    pub struct pollfd {
+        pub fd: ::c_int,
+        pub events: ::c_int,
+        pub revents: ::c_int,
+    }
+
+    pub struct lconv {
+        pub decimal_point: *mut ::c_char,
+        pub thousands_sep: *mut ::c_char,
+        pub grouping: *mut ::c_char,
+        pub int_curr_symbol: *mut ::c_char,
+        pub currency_symbol: *mut ::c_char,
+        pub mon_decimal_point: *mut ::c_char,
+        pub mon_thousands_sep: *mut ::c_char,
+        pub mon_grouping: *mut ::c_char,
+        pub positive_sign: *mut ::c_char,
+        pub negative_sign: *mut ::c_char,
+        pub int_frac_digits: ::c_char,
+        pub frac_digits: ::c_char,
+        pub p_cs_precedes: ::c_char,
+        pub p_sep_by_space: ::c_char,
+        pub n_cs_precedes: ::c_char,
+        pub n_sep_by_space: ::c_char,
+        pub p_sign_posn: ::c_char,
+        pub n_sign_posn: ::c_char,
+        pub int_n_cs_precedes: ::c_char,
+        pub int_n_sep_by_space: ::c_char,
+        pub int_n_sign_posn: ::c_char,
+        pub int_p_cs_precedes: ::c_char,
+        pub int_p_sep_by_space: ::c_char,
+        pub int_p_sign_posn: ::c_char,
+    }
+
+    pub struct tm {
+        pub tm_sec: ::c_int,
+        pub tm_min: ::c_int,
+        pub tm_hour: ::c_int,
+        pub tm_mday: ::c_int,
+        pub tm_mon: ::c_int,
+        pub tm_year: ::c_int,
+        pub tm_wday: ::c_int,
+        pub tm_yday: ::c_int,
+        pub tm_isdst: ::c_int,
+    }
+
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: dev_t,
+        pub st_size: off_t,
+        pub st_atime: time_t,
+        pub st_spare1: ::c_long,
+        pub st_mtime: time_t,
+        pub st_spare2: ::c_long,
+        pub st_ctime: time_t,
+        pub st_spare3: ::c_long,
+        pub st_blksize: blksize_t,
+        pub st_blocks: blkcnt_t,
+        pub st_spare4: [::c_long; 2usize],
+    }
+
+    pub struct statvfs {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: fsblkcnt_t,
+        pub f_bfree: fsblkcnt_t,
+        pub f_bavail: fsblkcnt_t,
+        pub f_files: fsfilcnt_t,
+        pub f_ffree: fsfilcnt_t,
+        pub f_favail: fsfilcnt_t,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+    }
+
+    pub struct sigset_t {
+        __val: [::c_ulong; 16],
+    }
+
+    pub struct sigaction {
+        pub sa_handler: extern fn(arg1: ::c_int),
+        pub sa_mask: sigset_t,
+        pub sa_flags: ::c_int,
+    }
+
+    pub struct dirent {
+        pub d_ino: ino_t,
+        pub d_type: ::c_uchar,
+        pub d_name: [::c_char; 256usize],
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_flags: ::c_int,
+        pub ss_size: usize,
+    }
+
+    pub struct fd_set { // Unverified
+        fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
+    }
+
+    pub struct passwd { // Unverified
+        pub pw_name: *mut ::c_char,
+        pub pw_passwd: *mut ::c_char,
+        pub pw_uid: ::uid_t,
+        pub pw_gid: ::gid_t,
+        pub pw_gecos: *mut ::c_char,
+        pub pw_dir: *mut ::c_char,
+        pub pw_shell: *mut ::c_char,
+    }
+
+    pub struct termios { // Unverified
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_line: ::cc_t,
+        pub c_cc: [::cc_t; ::NCCS],
+    }
+
+    pub struct sem_t { // Unverified
+        __size: [::c_char; 16],
+    }
+
+    pub struct Dl_info { // Unverified
+        pub dli_fname: *const ::c_char,
+        pub dli_fbase: *mut ::c_void,
+        pub dli_sname: *const ::c_char,
+        pub dli_saddr: *mut ::c_void,
+    }
+
+    pub struct utsname { // Unverified
+        pub sysname: [::c_char; 65],
+        pub nodename: [::c_char; 65],
+        pub release: [::c_char; 65],
+        pub version: [::c_char; 65],
+        pub machine: [::c_char; 65],
+        pub domainname: [::c_char; 65]
+    }
+
+    pub struct cpu_set_t { // Unverified
+        bits: [u32; 32],
+    }
+
+    pub struct pthread_attr_t { // Unverified
+        __size: [u64; 7]
+    }
+
+    pub struct pthread_mutex_t { // Unverified
+        #[cfg(any(target_arch = "mips", target_arch = "arm",
+                  target_arch = "powerpc"))]
+        __align: [::c_long; 0],
+        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
+                      target_arch = "powerpc")))]
+        __align: [::c_longlong; 0],
+        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
+    }
+
+    pub struct pthread_rwlock_t { // Unverified
+        #[cfg(any(target_arch = "mips", target_arch = "arm",
+                  target_arch = "powerpc"))]
+        __align: [::c_long; 0],
+        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
+                      target_arch = "powerpc")))]
+        __align: [::c_longlong; 0],
+        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
+    }
+
+    pub struct pthread_mutexattr_t { // Unverified
+        #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
+                  target_arch = "mips64", target_arch = "s390x",
+                  target_arch = "sparc64"))]
+        __align: [::c_int; 0],
+        #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
+                      target_arch = "mips64", target_arch = "s390x",
+                      target_arch = "sparc64")))]
+        __align: [::c_long; 0],
+        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
+    }
+
+    pub struct pthread_rwlockattr_t { // Unverified
+        __lockkind: ::c_int,
+        __pshared: ::c_int,
+    }
+
+    pub struct pthread_cond_t { // Unverified
+        __align: [::c_longlong; 0],
+        size: [u8; __SIZEOF_PTHREAD_COND_T],
+    }
+
+    pub struct pthread_condattr_t { // Unverified
+        __align: [::c_int; 0],
+        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
+    }
+
+}
+
+// unverified constants
+pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
+    __align: [],
+    size: [0; __SIZEOF_PTHREAD_MUTEX_T],
+};
+pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
+    __align: [],
+    size: [0; __SIZEOF_PTHREAD_COND_T],
+};
+pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
+    __align: [],
+    size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
+};
+pub const NCCS: usize = 32;
+pub const __SIZEOF_PTHREAD_ATTR_T: usize = 56;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
+pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
+pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32;
+pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4;
+pub const __PTHREAD_MUTEX_HAVE_PREV: usize = 1;
+pub const __PTHREAD_RWLOCK_INT_FLAGS_SHARED: usize = 1;
+pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
+pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
+pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
+pub const FD_SETSIZE: usize = 1024;
+// intentionally not public, only used for fd_set
+const ULONG_SIZE: usize = 32;
+
+// Other constants
+pub const EPERM: ::c_int = 1;
+pub const ENOENT: ::c_int = 2;
+pub const ESRCH: ::c_int = 3;
+pub const EINTR: ::c_int = 4;
+pub const EIO: ::c_int = 5;
+pub const ENXIO: ::c_int = 6;
+pub const E2BIG: ::c_int = 7;
+pub const ENOEXEC: ::c_int = 8;
+pub const EBADF: ::c_int = 9;
+pub const ECHILD: ::c_int = 10;
+pub const EAGAIN: ::c_int = 11;
+pub const ENOMEM: ::c_int = 12;
+pub const EACCES: ::c_int = 13;
+pub const EFAULT: ::c_int = 14;
+pub const EBUSY: ::c_int = 16;
+pub const EEXIST: ::c_int = 17;
+pub const EXDEV: ::c_int = 18;
+pub const ENODEV: ::c_int = 19;
+pub const ENOTDIR: ::c_int = 20;
+pub const EISDIR: ::c_int = 21;
+pub const EINVAL: ::c_int = 22;
+pub const ENFILE: ::c_int = 23;
+pub const EMFILE: ::c_int = 24;
+pub const ENOTTY: ::c_int = 25;
+pub const ETXTBSY: ::c_int = 26;
+pub const EFBIG: ::c_int = 27;
+pub const ENOSPC: ::c_int = 28;
+pub const ESPIPE: ::c_int = 29;
+pub const EROFS: ::c_int = 30;
+pub const EMLINK: ::c_int = 31;
+pub const EPIPE: ::c_int = 32;
+pub const EDOM: ::c_int = 33;
+pub const ERANGE: ::c_int = 34;
+pub const ENOMSG: ::c_int = 35;
+pub const EIDRM: ::c_int = 36;
+pub const EDEADLK: ::c_int = 45;
+pub const ENOLCK: ::c_int = 46;
+pub const ENOSTR: ::c_int = 60;
+pub const ENODATA: ::c_int = 61;
+pub const ETIME: ::c_int = 62;
+pub const ENOSR: ::c_int = 63;
+pub const ENOLINK: ::c_int = 67;
+pub const EPROTO: ::c_int = 71;
+pub const EMULTIHOP: ::c_int = 74;
+pub const EBADMSG: ::c_int = 77;
+pub const EFTYPE: ::c_int = 79;
+pub const ENOSYS: ::c_int = 88;
+pub const ENOTEMPTY: ::c_int = 90;
+pub const ENAMETOOLONG: ::c_int = 91;
+pub const ELOOP: ::c_int = 92;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const ECONNRESET: ::c_int = 104;
+pub const ENOBUFS: ::c_int = 105;
+pub const EAFNOSUPPORT: ::c_int = 106;
+pub const EPROTOTYPE: ::c_int = 107;
+pub const ENOTSOCK: ::c_int = 108;
+pub const ENOPROTOOPT: ::c_int = 109;
+pub const ECONNREFUSED: ::c_int = 111;
+pub const EADDRINUSE: ::c_int = 112;
+pub const ECONNABORTED: ::c_int = 113;
+pub const ENETUNREACH: ::c_int = 114;
+pub const ENETDOWN: ::c_int = 115;
+pub const ETIMEDOUT: ::c_int = 116;
+pub const EHOSTDOWN: ::c_int = 117;
+pub const EHOSTUNREACH: ::c_int = 118;
+pub const EINPROGRESS: ::c_int = 119;
+pub const EALREADY: ::c_int = 120;
+pub const EDESTADDRREQ: ::c_int = 121;
+pub const EMSGSIZE: ::c_int = 122;
+pub const EPROTONOSUPPORT: ::c_int = 123;
+pub const EADDRNOTAVAIL: ::c_int = 125;
+pub const ENETRESET: ::c_int = 126;
+pub const EISCONN: ::c_int = 127;
+pub const ENOTCONN: ::c_int = 128;
+pub const ETOOMANYREFS: ::c_int = 129;
+pub const EDQUOT: ::c_int = 132;
+pub const ESTALE: ::c_int = 133;
+pub const ENOTSUP: ::c_int = 134;
+pub const EILSEQ: ::c_int = 138;
+pub const EOVERFLOW: ::c_int = 139;
+pub const ECANCELED: ::c_int = 140;
+pub const ENOTRECOVERABLE: ::c_int = 141;
+pub const EOWNERDEAD: ::c_int = 142;
+pub const EWOULDBLOCK: ::c_int = 11;
+
+pub const F_DUPFD: ::c_int = 0;
+pub const F_GETFD: ::c_int = 1;
+pub const F_SETFD: ::c_int = 2;
+pub const F_GETFL: ::c_int = 3;
+pub const F_SETFL: ::c_int = 4;
+pub const F_GETOWN: ::c_int = 5;
+pub const F_SETOWN: ::c_int = 6;
+pub const F_GETLK: ::c_int = 7;
+pub const F_SETLK: ::c_int = 8;
+pub const F_SETLKW: ::c_int = 9;
+pub const F_RGETLK: ::c_int = 10;
+pub const F_RSETLK: ::c_int = 11;
+pub const F_CNVT: ::c_int = 12;
+pub const F_RSETLKW: ::c_int = 13;
+pub const F_DUPFD_CLOEXEC: ::c_int = 14;
+
+pub const O_RDONLY: ::c_int = 0;
+pub const O_WRONLY: ::c_int = 1;
+pub const O_RDWR: ::c_int = 2;
+pub const O_APPEND: ::c_int = 8;
+pub const O_CREAT: ::c_int = 512;
+pub const O_TRUNC: ::c_int = 1024;
+pub const O_EXCL: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 8192;
+pub const O_NONBLOCK: ::c_int = 16384;
+
+pub const O_ACCMODE: ::c_int = 3;
+pub const O_CLOEXEC: ::c_int = 0x80000;
+
+pub const STDIN_FILENO: ::c_int = 0;
+pub const STDOUT_FILENO: ::c_int = 1;
+pub const STDERR_FILENO: ::c_int = 2;
+
+pub const SEEK_SET: ::c_int = 0;
+pub const SEEK_CUR: ::c_int = 1;
+pub const SEEK_END: ::c_int = 2;
+
+pub const FIONBIO: ::c_int = 1;
+
+pub const S_BLKSIZE: ::mode_t = 1024;
+pub const S_IREAD: ::mode_t = 256;
+pub const S_IWRITE: ::mode_t = 128;
+pub const S_IEXEC: ::mode_t = 64;
+pub const S_ENFMT: ::mode_t = 1024;
+pub const S_IFMT: ::mode_t = 61440;
+pub const S_IFDIR: ::mode_t = 16384;
+pub const S_IFCHR: ::mode_t = 8192;
+pub const S_IFBLK: ::mode_t = 24576;
+pub const S_IFREG: ::mode_t = 32768;
+pub const S_IFLNK: ::mode_t = 40960;
+pub const S_IFSOCK: ::mode_t = 49152;
+pub const S_IFIFO: ::mode_t = 4096;
+pub const S_IRUSR: ::mode_t = 256;
+pub const S_IWUSR: ::mode_t = 128;
+pub const S_IXUSR: ::mode_t = 64;
+pub const S_IRGRP: ::mode_t = 32;
+pub const S_IWGRP: ::mode_t = 16;
+pub const S_IXGRP: ::mode_t = 8;
+pub const S_IROTH: ::mode_t = 4;
+pub const S_IWOTH: ::mode_t = 2;
+pub const S_IXOTH: ::mode_t = 1;
+
+pub const SOL_SOCKET: ::c_int = 65535;
+pub const SOL_TCP: ::c_int = 6;
+
+pub const PF_UNSPEC: ::c_int = 0;
+pub const PF_INET: ::c_int = 2;
+pub const PF_INET6: ::c_int = 23;
+
+pub const AF_UNSPEC: ::c_int = 0;
+pub const AF_INET: ::c_int = 2;
+pub const AF_INET6: ::c_int = 23;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+
+pub const MSG_OOB: ::c_int = 1;
+pub const MSG_PEEK: ::c_int = 2;
+pub const MSG_DONTWAIT: ::c_int = 4;
+pub const MSG_DONTROUTE: ::c_int = 0;
+pub const MSG_WAITALL: ::c_int = 0;
+pub const MSG_MORE: ::c_int = 0;
+pub const MSG_NOSIGNAL: ::c_int = 0;
+
+pub const SHUT_RD: ::c_int = 0;
+pub const SHUT_WR: ::c_int = 1;
+pub const SHUT_RDWR: ::c_int = 2;
+
+pub const SO_REUSEADDR: ::c_int = 4;
+pub const SO_LINGER: ::c_int = 128;
+pub const SO_OOBINLINE: ::c_int = 256;
+pub const SO_SNDBUF: ::c_int = 4097;
+pub const SO_RCVBUF: ::c_int = 4098;
+pub const SO_SNDLOWAT: ::c_int = 4099;
+pub const SO_RCVLOWAT: ::c_int = 4100;
+pub const SO_TYPE: ::c_int = 4104;
+pub const SO_ERROR: ::c_int = 4105;
+
+pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
+
+pub const INET_ADDRSTRLEN: ::c_int = 16;
+
+pub const IPPROTO_IP: ::c_int = 0;
+pub const IPPROTO_UDP: ::c_int = 17;
+pub const IPPROTO_TCP: ::c_int = 6;
+
+pub const TCP_NODELAY: ::c_int = 8193;
+pub const TCP_MAXSEG: ::c_int = 8194;
+
+pub const IP_TOS: ::c_int = 7;
+pub const IP_TTL: ::c_int = 8;
+pub const IP_MULTICAST_LOOP: ::c_int = 9;
+pub const IP_MULTICAST_TTL: ::c_int = 10;
+pub const IP_ADD_MEMBERSHIP: ::c_int = 11;
+pub const IP_DROP_MEMBERSHIP: ::c_int = 12;
+
+pub const HOST_NOT_FOUND: ::c_int = 1;
+pub const NO_DATA: ::c_int = 2;
+pub const NO_ADDRESS: ::c_int = 2;
+pub const NO_RECOVERY: ::c_int = 3;
+pub const TRY_AGAIN: ::c_int = 4;
+
+pub const AI_PASSIVE: ::c_int = 1;
+pub const AI_CANONNAME: ::c_int = 2;
+pub const AI_NUMERICHOST: ::c_int = 4;
+pub const AI_NUMERICSERV: ::c_int = 0;
+pub const AI_ADDRCONFIG: ::c_int = 0;
+
+pub const NI_MAXHOST: ::c_int = 1025;
+pub const NI_MAXSERV: ::c_int = 32;
+pub const NI_NOFQDN: ::c_int = 1;
+pub const NI_NUMERICHOST: ::c_int = 2;
+pub const NI_NAMEREQD: ::c_int = 4;
+pub const NI_NUMERICSERV: ::c_int = 0;
+pub const NI_DGRAM: ::c_int = 0;
+
+pub const EAI_FAMILY: ::c_int = -303;
+pub const EAI_MEMORY: ::c_int = -304;
+pub const EAI_NONAME: ::c_int = -305;
+pub const EAI_SOCKTYPE: ::c_int = -307;
+
+f! {
+    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
+        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        let fd = fd as usize;
+        (*set).fds_bits[fd / bits] &= !(1 << (fd % bits));
+        return
+    }
+
+    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
+        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        let fd = fd as usize;
+        return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0
+    }
+
+    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
+        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        let fd = fd as usize;
+        (*set).fds_bits[fd / bits] |= 1 << (fd % bits);
+        return
+    }
+
+    pub fn FD_ZERO(set: *mut fd_set) -> () {
+        for slot in (*set).fds_bits.iter_mut() {
+            *slot = 0;
+        }
+    }
+}
+
+extern {
+    pub fn bind(fd: ::c_int, addr: *const sockaddr, len: socklen_t) -> ::c_int;
+    pub fn closesocket(sockfd: ::c_int) -> ::c_int;
+    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
+    pub fn recvfrom(fd: ::c_int, buf: *mut ::c_void, n: usize, flags: ::c_int,
+                    addr: *mut sockaddr, addr_len: *mut socklen_t) -> isize;
+    pub fn getnameinfo(sa: *const sockaddr, salen: socklen_t,
+                       host: *mut ::c_char, hostlen: socklen_t,
+                       serv: *mut ::c_char, servlen: socklen_t,
+                       flags: ::c_int) -> ::c_int;
+    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
+    pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
+                   envp: *const *const ::c_char)
+                   -> ::c_int;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
+    pub fn getgrgid_r(uid: ::uid_t,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "sigaltstack$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
+    pub fn sigaltstack(ss: *const stack_t,
+                       oss: *mut stack_t) -> ::c_int;
+    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
+    pub fn getdtablesize() -> ::c_int;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
+    pub fn getgrnam_r(name: *const ::c_char,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_sigmask$UNIX2003")]
+    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
+                           oldset: *mut sigset_t) -> ::c_int;
+    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
+    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
+    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
+    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
+    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
+    pub fn getpwnam_r(name: *const ::c_char,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
+    pub fn getpwuid_r(uid: ::uid_t,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
+               link_name = "sigwait$UNIX2003")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
+    pub fn sigwait(set: *const sigset_t,
+                   sig: *mut ::c_int) -> ::c_int;
+    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
+                          parent: Option<unsafe extern fn()>,
+                          child: Option<unsafe extern fn()>) -> ::c_int;
+    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "popen$UNIX2003")]
+    pub fn popen(command: *const c_char,
+                 mode: *const c_char) -> *mut ::FILE;
+}
+
+cfg_if! {
+    if #[cfg(target_arch = "arm")] {
+        mod arm;
+        pub use self::arm::*;
+    } else {
+        // Only tested on ARM so far. Other platforms might have different
+        // definitions for types and constants.
+        pub use target_arch_not_implemented;
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/android/b32/arm.rs
@@ -0,0 +1,12 @@
+pub type c_char = u8;
+pub type wchar_t = u32;
+
+pub const O_DIRECT: ::c_int = 0x10000;
+pub const O_DIRECTORY: ::c_int = 0x4000;
+pub const O_NOFOLLOW: ::c_int = 0x8000;
+pub const O_LARGEFILE: ::c_int = 0o400000;
+
+pub const SYS_pivot_root: ::c_long = 218;
+pub const SYS_gettid: ::c_long = 224;
+pub const SYS_perf_event_open: ::c_long = 364;
+pub const SYS_memfd_create: ::c_long = 385;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/android/b32/mod.rs
@@ -0,0 +1,230 @@
+// The following definitions are correct for arm and i686,
+// but may be wrong for mips
+
+pub type c_long = i32;
+pub type c_ulong = u32;
+pub type mode_t = u16;
+pub type off64_t = ::c_longlong;
+pub type sigset_t = ::c_ulong;
+pub type socklen_t = i32;
+pub type time64_t = i64;
+
+s! {
+    pub struct sigaction {
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: ::sigset_t,
+        pub sa_flags: ::c_ulong,
+        pub sa_restorer: ::dox::Option<extern fn()>,
+    }
+
+    pub struct rlimit64 {
+        pub rlim_cur: u64,
+        pub rlim_max: u64,
+    }
+
+    pub struct stat {
+        pub st_dev: ::c_ulonglong,
+        __pad0: [::c_uchar; 4],
+        __st_ino: ::ino_t,
+        pub st_mode: ::c_uint,
+        pub st_nlink: ::c_uint,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::c_ulonglong,
+        __pad3: [::c_uchar; 4],
+        pub st_size: ::c_longlong,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::c_ulonglong,
+        pub st_atime: ::c_ulong,
+        pub st_atime_nsec: ::c_ulong,
+        pub st_mtime: ::c_ulong,
+        pub st_mtime_nsec: ::c_ulong,
+        pub st_ctime: ::c_ulong,
+        pub st_ctime_nsec: ::c_ulong,
+        pub st_ino: ::c_ulonglong,
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::c_ulonglong,
+        __pad0: [::c_uchar; 4],
+        __st_ino: ::ino_t,
+        pub st_mode: ::c_uint,
+        pub st_nlink: ::c_uint,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::c_ulonglong,
+        __pad3: [::c_uchar; 4],
+        pub st_size: ::c_longlong,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::c_ulonglong,
+        pub st_atime: ::c_ulong,
+        pub st_atime_nsec: ::c_ulong,
+        pub st_mtime: ::c_ulong,
+        pub st_mtime_nsec: ::c_ulong,
+        pub st_ctime: ::c_ulong,
+        pub st_ctime_nsec: ::c_ulong,
+        pub st_ino: ::c_ulonglong,
+    }
+
+    pub struct statfs64 {
+        pub f_type: u32,
+        pub f_bsize: u32,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        f_fsid: [u32; 2],
+        pub f_namelen: u32,
+        pub f_frsize: u32,
+        pub f_flags: u32,
+        pub f_spare: [u32; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::c_ulong,
+        pub f_bfree: ::c_ulong,
+        pub f_bavail: ::c_ulong,
+        pub f_files: ::c_ulong,
+        pub f_ffree: ::c_ulong,
+        pub f_favail: ::c_ulong,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+    }
+
+    pub struct pthread_attr_t {
+        pub flags: ::uint32_t,
+        pub stack_base: *mut ::c_void,
+        pub stack_size: ::size_t,
+        pub guard_size: ::size_t,
+        pub sched_policy: ::int32_t,
+        pub sched_priority: ::int32_t,
+    }
+
+    pub struct pthread_mutex_t { value: ::c_int }
+
+    pub struct pthread_cond_t { value: ::c_int }
+
+    pub struct pthread_rwlock_t {
+        lock: pthread_mutex_t,
+        cond: pthread_cond_t,
+        numLocks: ::c_int,
+        writerThreadId: ::c_int,
+        pendingReaders: ::c_int,
+        pendingWriters: ::c_int,
+        attr: i32,
+        __reserved: [::c_char; 12],
+    }
+
+    pub struct passwd {
+        pub pw_name: *mut ::c_char,
+        pub pw_passwd: *mut ::c_char,
+        pub pw_uid: ::uid_t,
+        pub pw_gid: ::gid_t,
+        pub pw_dir: *mut ::c_char,
+        pub pw_shell: *mut ::c_char,
+    }
+
+    pub struct statfs {
+        pub f_type: ::uint32_t,
+        pub f_bsize: ::uint32_t,
+        pub f_blocks: ::uint64_t,
+        pub f_bfree: ::uint64_t,
+        pub f_bavail: ::uint64_t,
+        pub f_files: ::uint64_t,
+        pub f_ffree: ::uint64_t,
+        pub f_fsid: ::__fsid_t,
+        pub f_namelen: ::uint32_t,
+        pub f_frsize: ::uint32_t,
+        pub f_flags: ::uint32_t,
+        pub f_spare: [::uint32_t; 4],
+    }
+
+    pub struct sysinfo {
+        pub uptime: ::c_long,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
+        pub procs: ::c_ushort,
+        pub pad: ::c_ushort,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
+        pub mem_unit: ::c_uint,
+        pub _f: [::c_char; 8],
+    }
+}
+
+pub const RTLD_GLOBAL: ::c_int = 2;
+pub const RTLD_NOW: ::c_int = 0;
+pub const RTLD_DEFAULT: *mut ::c_void = -1isize as *mut ::c_void;
+
+pub const PTRACE_GETFPREGS: ::c_int = 14;
+pub const PTRACE_SETFPREGS: ::c_int = 15;
+pub const PTRACE_GETREGS: ::c_int = 12;
+pub const PTRACE_SETREGS: ::c_int = 13;
+
+pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
+    value: 0,
+};
+pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
+    value: 0,
+};
+pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
+    lock: PTHREAD_MUTEX_INITIALIZER,
+    cond: PTHREAD_COND_INITIALIZER,
+    numLocks: 0,
+    writerThreadId: 0,
+    pendingReaders: 0,
+    pendingWriters: 0,
+    attr: 0,
+    __reserved: [0; 12],
+};
+pub const PTHREAD_STACK_MIN: ::size_t = 4096 * 2;
+pub const CPU_SETSIZE: ::size_t = 32;
+pub const __CPU_BITS: ::size_t = 32;
+
+pub const UT_LINESIZE: usize = 8;
+pub const UT_NAMESIZE: usize = 8;
+pub const UT_HOSTSIZE: usize = 16;
+
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
+
+extern {
+    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
+                address_len: socklen_t) -> ::c_int;
+
+    pub fn writev(fd: ::c_int,
+                  iov: *const ::iovec,
+                  iovcnt: ::c_int) -> ::ssize_t;
+    pub fn readv(fd: ::c_int,
+                 iov: *const ::iovec,
+                 iovcnt: ::c_int) -> ::ssize_t;
+
+    pub fn sendmsg(fd: ::c_int,
+                   msg: *const ::msghdr,
+                   flags: ::c_int) -> ::ssize_t;
+    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
+                   -> ::ssize_t;
+
+    pub fn timegm64(tm: *const ::tm) -> ::time64_t;
+}
+
+cfg_if! {
+    if #[cfg(target_arch = "x86")] {
+        mod x86;
+        pub use self::x86::*;
+    } else if #[cfg(target_arch = "arm")] {
+        mod arm;
+        pub use self::arm::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/android/b32/x86.rs
@@ -0,0 +1,415 @@
+pub type c_char = i8;
+pub type wchar_t = i32;
+
+pub const O_DIRECT: ::c_int = 0x4000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+pub const O_LARGEFILE: ::c_int = 0o0100000;
+
+pub const MAP_32BIT: ::c_int = 0x40;
+
+// Syscall table
+pub const SYS_restart_syscall: ::c_long = 0;
+pub const SYS_exit: ::c_long = 1;
+pub const SYS_fork: ::c_long = 2;
+pub const SYS_read: ::c_long = 3;
+pub const SYS_write: ::c_long = 4;
+pub const SYS_open: ::c_long = 5;
+pub const SYS_close: ::c_long = 6;
+pub const SYS_waitpid: ::c_long = 7;
+pub const SYS_creat: ::c_long = 8;
+pub const SYS_link: ::c_long = 9;
+pub const SYS_unlink: ::c_long = 10;
+pub const SYS_execve: ::c_long = 11;
+pub const SYS_chdir: ::c_long = 12;
+pub const SYS_time: ::c_long = 13;
+pub const SYS_mknod: ::c_long = 14;
+pub const SYS_chmod: ::c_long = 15;
+pub const SYS_lchown: ::c_long = 16;
+pub const SYS_break: ::c_long = 17;
+pub const SYS_oldstat: ::c_long = 18;
+pub const SYS_lseek: ::c_long = 19;
+pub const SYS_getpid: ::c_long = 20;
+pub const SYS_mount: ::c_long = 21;
+pub const SYS_umount: ::c_long = 22;
+pub const SYS_setuid: ::c_long = 23;
+pub const SYS_getuid: ::c_long = 24;
+pub const SYS_stime: ::c_long = 25;
+pub const SYS_ptrace: ::c_long = 26;
+pub const SYS_alarm: ::c_long = 27;
+pub const SYS_oldfstat: ::c_long = 28;
+pub const SYS_pause: ::c_long = 29;
+pub const SYS_utime: ::c_long = 30;
+pub const SYS_stty: ::c_long = 31;
+pub const SYS_gtty: ::c_long = 32;
+pub const SYS_access: ::c_long = 33;
+pub const SYS_nice: ::c_long = 34;
+pub const SYS_ftime: ::c_long = 35;
+pub const SYS_sync: ::c_long = 36;
+pub const SYS_kill: ::c_long = 37;
+pub const SYS_rename: ::c_long = 38;
+pub const SYS_mkdir: ::c_long = 39;
+pub const SYS_rmdir: ::c_long = 40;
+pub const SYS_dup: ::c_long = 41;
+pub const SYS_pipe: ::c_long = 42;
+pub const SYS_times: ::c_long = 43;
+pub const SYS_prof: ::c_long = 44;
+pub const SYS_brk: ::c_long = 45;
+pub const SYS_setgid: ::c_long = 46;
+pub const SYS_getgid: ::c_long = 47;
+pub const SYS_signal: ::c_long = 48;
+pub const SYS_geteuid: ::c_long = 49;
+pub const SYS_getegid: ::c_long = 50;
+pub const SYS_acct: ::c_long = 51;
+pub const SYS_umount2: ::c_long = 52;
+pub const SYS_lock: ::c_long = 53;
+pub const SYS_ioctl: ::c_long = 54;
+pub const SYS_fcntl: ::c_long = 55;
+pub const SYS_mpx: ::c_long = 56;
+pub const SYS_setpgid: ::c_long = 57;
+pub const SYS_ulimit: ::c_long = 58;
+pub const SYS_oldolduname: ::c_long = 59;
+pub const SYS_umask: ::c_long = 60;
+pub const SYS_chroot: ::c_long = 61;
+pub const SYS_ustat: ::c_long = 62;
+pub const SYS_dup2: ::c_long = 63;
+pub const SYS_getppid: ::c_long = 64;
+pub const SYS_getpgrp: ::c_long = 65;
+pub const SYS_setsid: ::c_long = 66;
+pub const SYS_sigaction: ::c_long = 67;
+pub const SYS_sgetmask: ::c_long = 68;
+pub const SYS_ssetmask: ::c_long = 69;
+pub const SYS_setreuid: ::c_long = 70;
+pub const SYS_setregid: ::c_long = 71;
+pub const SYS_sigsuspend: ::c_long = 72;
+pub const SYS_sigpending: ::c_long = 73;
+pub const SYS_sethostname: ::c_long = 74;
+pub const SYS_setrlimit: ::c_long = 75;
+pub const SYS_getrlimit: ::c_long = 76;
+pub const SYS_getrusage: ::c_long = 77;
+pub const SYS_gettimeofday: ::c_long = 78;
+pub const SYS_settimeofday: ::c_long = 79;
+pub const SYS_getgroups: ::c_long = 80;
+pub const SYS_setgroups: ::c_long = 81;
+pub const SYS_select: ::c_long = 82;
+pub const SYS_symlink: ::c_long = 83;
+pub const SYS_oldlstat: ::c_long = 84;
+pub const SYS_readlink: ::c_long = 85;
+pub const SYS_uselib: ::c_long = 86;
+pub const SYS_swapon: ::c_long = 87;
+pub const SYS_reboot: ::c_long = 88;
+pub const SYS_readdir: ::c_long = 89;
+pub const SYS_mmap: ::c_long = 90;
+pub const SYS_munmap: ::c_long = 91;
+pub const SYS_truncate: ::c_long = 92;
+pub const SYS_ftruncate: ::c_long = 93;
+pub const SYS_fchmod: ::c_long = 94;
+pub const SYS_fchown: ::c_long = 95;
+pub const SYS_getpriority: ::c_long = 96;
+pub const SYS_setpriority: ::c_long = 97;
+pub const SYS_profil: ::c_long = 98;
+pub const SYS_statfs: ::c_long = 99;
+pub const SYS_fstatfs: ::c_long = 100;
+pub const SYS_ioperm: ::c_long = 101;
+pub const SYS_socketcall: ::c_long = 102;
+pub const SYS_syslog: ::c_long = 103;
+pub const SYS_setitimer: ::c_long = 104;
+pub const SYS_getitimer: ::c_long = 105;
+pub const SYS_stat: ::c_long = 106;
+pub const SYS_lstat: ::c_long = 107;
+pub const SYS_fstat: ::c_long = 108;
+pub const SYS_olduname: ::c_long = 109;
+pub const SYS_iopl: ::c_long = 110;
+pub const SYS_vhangup: ::c_long = 111;
+pub const SYS_idle: ::c_long = 112;
+pub const SYS_vm86old: ::c_long = 113;
+pub const SYS_wait4: ::c_long = 114;
+pub const SYS_swapoff: ::c_long = 115;
+pub const SYS_sysinfo: ::c_long = 116;
+pub const SYS_ipc: ::c_long = 117;
+pub const SYS_fsync: ::c_long = 118;
+pub const SYS_sigreturn: ::c_long = 119;
+pub const SYS_clone: ::c_long = 120;
+pub const SYS_setdomainname: ::c_long = 121;
+pub const SYS_uname: ::c_long = 122;
+pub const SYS_modify_ldt: ::c_long = 123;
+pub const SYS_adjtimex: ::c_long = 124;
+pub const SYS_mprotect: ::c_long = 125;
+pub const SYS_sigprocmask: ::c_long = 126;
+pub const SYS_create_module: ::c_long = 127;
+pub const SYS_init_module: ::c_long = 128;
+pub const SYS_delete_module: ::c_long = 129;
+pub const SYS_get_kernel_syms: ::c_long = 130;
+pub const SYS_quotactl: ::c_long = 131;
+pub const SYS_getpgid: ::c_long = 132;
+pub const SYS_fchdir: ::c_long = 133;
+pub const SYS_bdflush: ::c_long = 134;
+pub const SYS_sysfs: ::c_long = 135;
+pub const SYS_personality: ::c_long = 136;
+pub const SYS_afs_syscall: ::c_long = 137;
+pub const SYS_setfsuid: ::c_long = 138;
+pub const SYS_setfsgid: ::c_long = 139;
+// FIXME: SYS__llseek is in the NDK sources but for some reason is
+//        not available in the tests
+// pub const SYS__llseek: ::c_long = 140;
+pub const SYS_getdents: ::c_long = 141;
+// FIXME: SYS__newselect is in the NDK sources but for some reason is
+//        not available in the tests
+// pub const SYS__newselect: ::c_long = 142;
+pub const SYS_flock: ::c_long = 143;
+pub const SYS_msync: ::c_long = 144;
+pub const SYS_readv: ::c_long = 145;
+pub const SYS_writev: ::c_long = 146;
+pub const SYS_getsid: ::c_long = 147;
+pub const SYS_fdatasync: ::c_long = 148;
+// FIXME: SYS__llseek is in the NDK sources but for some reason is
+//        not available in the tests
+// pub const SYS__sysctl: ::c_long = 149;
+pub const SYS_mlock: ::c_long = 150;
+pub const SYS_munlock: ::c_long = 151;
+pub const SYS_mlockall: ::c_long = 152;
+pub const SYS_munlockall: ::c_long = 153;
+pub const SYS_sched_setparam: ::c_long = 154;
+pub const SYS_sched_getparam: ::c_long = 155;
+pub const SYS_sched_setscheduler: ::c_long = 156;
+pub const SYS_sched_getscheduler: ::c_long = 157;
+pub const SYS_sched_yield: ::c_long = 158;
+pub const SYS_sched_get_priority_max: ::c_long = 159;
+pub const SYS_sched_get_priority_min: ::c_long = 160;
+pub const SYS_sched_rr_get_interval: ::c_long = 161;
+pub const SYS_nanosleep: ::c_long = 162;
+pub const SYS_mremap: ::c_long = 163;
+pub const SYS_setresuid: ::c_long = 164;
+pub const SYS_getresuid: ::c_long = 165;
+pub const SYS_vm86: ::c_long = 166;
+pub const SYS_query_module: ::c_long = 167;
+pub const SYS_poll: ::c_long = 168;
+pub const SYS_nfsservctl: ::c_long = 169;
+pub const SYS_setresgid: ::c_long = 170;
+pub const SYS_getresgid: ::c_long = 171;
+pub const SYS_prctl: ::c_long = 172;
+pub const SYS_rt_sigreturn: ::c_long = 173;
+pub const SYS_rt_sigaction: ::c_long = 174;
+pub const SYS_rt_sigprocmask: ::c_long = 175;
+pub const SYS_rt_sigpending: ::c_long = 176;
+pub const SYS_rt_sigtimedwait: ::c_long = 177;
+pub const SYS_rt_sigqueueinfo: ::c_long = 178;
+pub const SYS_rt_sigsuspend: ::c_long = 179;
+pub const SYS_pread64: ::c_long = 180;
+pub const SYS_pwrite64: ::c_long = 181;
+pub const SYS_chown: ::c_long = 182;
+pub const SYS_getcwd: ::c_long = 183;
+pub const SYS_capget: ::c_long = 184;
+pub const SYS_capset: ::c_long = 185;
+pub const SYS_sigaltstack: ::c_long = 186;
+pub const SYS_sendfile: ::c_long = 187;
+pub const SYS_getpmsg: ::c_long = 188;
+pub const SYS_putpmsg: ::c_long = 189;
+pub const SYS_vfork: ::c_long = 190;
+pub const SYS_ugetrlimit: ::c_long = 191;
+pub const SYS_mmap2: ::c_long = 192;
+pub const SYS_truncate64: ::c_long = 193;
+pub const SYS_ftruncate64: ::c_long = 194;
+pub const SYS_stat64: ::c_long = 195;
+pub const SYS_lstat64: ::c_long = 196;
+pub const SYS_fstat64: ::c_long = 197;
+pub const SYS_lchown32: ::c_long = 198;
+pub const SYS_getuid32: ::c_long = 199;
+pub const SYS_getgid32: ::c_long = 200;
+pub const SYS_geteuid32: ::c_long = 201;
+pub const SYS_getegid32: ::c_long = 202;
+pub const SYS_setreuid32: ::c_long = 203;
+pub const SYS_setregid32: ::c_long = 204;
+pub const SYS_getgroups32: ::c_long = 205;
+pub const SYS_setgroups32: ::c_long = 206;
+pub const SYS_fchown32: ::c_long = 207;
+pub const SYS_setresuid32: ::c_long = 208;
+pub const SYS_getresuid32: ::c_long = 209;
+pub const SYS_setresgid32: ::c_long = 210;
+pub const SYS_getresgid32: ::c_long = 211;
+pub const SYS_chown32: ::c_long = 212;
+pub const SYS_setuid32: ::c_long = 213;
+pub const SYS_setgid32: ::c_long = 214;
+pub const SYS_setfsuid32: ::c_long = 215;
+pub const SYS_setfsgid32: ::c_long = 216;
+pub const SYS_pivot_root: ::c_long = 217;
+pub const SYS_mincore: ::c_long = 218;
+pub const SYS_madvise: ::c_long = 219;
+pub const SYS_getdents64: ::c_long = 220;
+pub const SYS_fcntl64: ::c_long = 221;
+pub const SYS_gettid: ::c_long = 224;
+pub const SYS_readahead: ::c_long = 225;
+pub const SYS_setxattr: ::c_long = 226;
+pub const SYS_lsetxattr: ::c_long = 227;
+pub const SYS_fsetxattr: ::c_long = 228;
+pub const SYS_getxattr: ::c_long = 229;
+pub const SYS_lgetxattr: ::c_long = 230;
+pub const SYS_fgetxattr: ::c_long = 231;
+pub const SYS_listxattr: ::c_long = 232;
+pub const SYS_llistxattr: ::c_long = 233;
+pub const SYS_flistxattr: ::c_long = 234;
+pub const SYS_removexattr: ::c_long = 235;
+pub const SYS_lremovexattr: ::c_long = 236;
+pub const SYS_fremovexattr: ::c_long = 237;
+pub const SYS_tkill: ::c_long = 238;
+pub const SYS_sendfile64: ::c_long = 239;
+pub const SYS_futex: ::c_long = 240;
+pub const SYS_sched_setaffinity: ::c_long = 241;
+pub const SYS_sched_getaffinity: ::c_long = 242;
+pub const SYS_set_thread_area: ::c_long = 243;
+pub const SYS_get_thread_area: ::c_long = 244;
+pub const SYS_io_setup: ::c_long = 245;
+pub const SYS_io_destroy: ::c_long = 246;
+pub const SYS_io_getevents: ::c_long = 247;
+pub const SYS_io_submit: ::c_long = 248;
+pub const SYS_io_cancel: ::c_long = 249;
+pub const SYS_fadvise64: ::c_long = 250;
+pub const SYS_exit_group: ::c_long = 252;
+pub const SYS_lookup_dcookie: ::c_long = 253;
+pub const SYS_epoll_create: ::c_long = 254;
+pub const SYS_epoll_ctl: ::c_long = 255;
+pub const SYS_epoll_wait: ::c_long = 256;
+pub const SYS_remap_file_pages: ::c_long = 257;
+pub const SYS_set_tid_address: ::c_long = 258;
+pub const SYS_timer_create: ::c_long = 259;
+pub const SYS_timer_settime: ::c_long = 260;
+pub const SYS_timer_gettime: ::c_long = 261;
+pub const SYS_timer_getoverrun: ::c_long = 262;
+pub const SYS_timer_delete: ::c_long = 263;
+pub const SYS_clock_settime: ::c_long = 264;
+pub const SYS_clock_gettime: ::c_long = 265;
+pub const SYS_clock_getres: ::c_long = 266;
+pub const SYS_clock_nanosleep: ::c_long = 267;
+pub const SYS_statfs64: ::c_long = 268;
+pub const SYS_fstatfs64: ::c_long = 269;
+pub const SYS_tgkill: ::c_long = 270;
+pub const SYS_utimes: ::c_long = 271;
+pub const SYS_fadvise64_64: ::c_long = 272;
+pub const SYS_vserver: ::c_long = 273;
+pub const SYS_mbind: ::c_long = 274;
+pub const SYS_get_mempolicy: ::c_long = 275;
+pub const SYS_set_mempolicy: ::c_long = 276;
+pub const SYS_mq_open: ::c_long = 277;
+pub const SYS_mq_unlink: ::c_long = 278;
+pub const SYS_mq_timedsend: ::c_long = 279;
+pub const SYS_mq_timedreceive: ::c_long = 280;
+pub const SYS_mq_notify: ::c_long = 281;
+pub const SYS_mq_getsetattr: ::c_long = 282;
+pub const SYS_kexec_load: ::c_long = 283;
+pub const SYS_waitid: ::c_long = 284;
+pub const SYS_add_key: ::c_long = 286;
+pub const SYS_request_key: ::c_long = 287;
+pub const SYS_keyctl: ::c_long = 288;
+pub const SYS_ioprio_set: ::c_long = 289;
+pub const SYS_ioprio_get: ::c_long = 290;
+pub const SYS_inotify_init: ::c_long = 291;
+pub const SYS_inotify_add_watch: ::c_long = 292;
+pub const SYS_inotify_rm_watch: ::c_long = 293;
+pub const SYS_migrate_pages: ::c_long = 294;
+pub const SYS_openat: ::c_long = 295;
+pub const SYS_mkdirat: ::c_long = 296;
+pub const SYS_mknodat: ::c_long = 297;
+pub const SYS_fchownat: ::c_long = 298;
+pub const SYS_futimesat: ::c_long = 299;
+pub const SYS_fstatat64: ::c_long = 300;
+pub const SYS_unlinkat: ::c_long = 301;
+pub const SYS_renameat: ::c_long = 302;
+pub const SYS_linkat: ::c_long = 303;
+pub const SYS_symlinkat: ::c_long = 304;
+pub const SYS_readlinkat: ::c_long = 305;
+pub const SYS_fchmodat: ::c_long = 306;
+pub const SYS_faccessat: ::c_long = 307;
+pub const SYS_pselect6: ::c_long = 308;
+pub const SYS_ppoll: ::c_long = 309;
+pub const SYS_unshare: ::c_long = 310;
+pub const SYS_set_robust_list: ::c_long = 311;
+pub const SYS_get_robust_list: ::c_long = 312;
+pub const SYS_splice: ::c_long = 313;
+pub const SYS_sync_file_range: ::c_long = 314;
+pub const SYS_tee: ::c_long = 315;
+pub const SYS_vmsplice: ::c_long = 316;
+pub const SYS_move_pages: ::c_long = 317;
+pub const SYS_getcpu: ::c_long = 318;
+pub const SYS_epoll_pwait: ::c_long = 319;
+pub const SYS_utimensat: ::c_long = 320;
+pub const SYS_signalfd: ::c_long = 321;
+pub const SYS_timerfd_create: ::c_long = 322;
+pub const SYS_eventfd: ::c_long = 323;
+pub const SYS_fallocate: ::c_long = 324;
+pub const SYS_timerfd_settime: ::c_long = 325;
+pub const SYS_timerfd_gettime: ::c_long = 326;
+pub const SYS_signalfd4: ::c_long = 327;
+pub const SYS_eventfd2: ::c_long = 328;
+pub const SYS_epoll_create1: ::c_long = 329;
+pub const SYS_dup3: ::c_long = 330;
+pub const SYS_pipe2: ::c_long = 331;
+pub const SYS_inotify_init1: ::c_long = 332;
+pub const SYS_preadv: ::c_long = 333;
+pub const SYS_pwritev: ::c_long = 334;
+pub const SYS_rt_tgsigqueueinfo: ::c_long = 335;
+pub const SYS_perf_event_open: ::c_long = 336;
+pub const SYS_recvmmsg: ::c_long = 337;
+pub const SYS_fanotify_init: ::c_long = 338;
+pub const SYS_fanotify_mark: ::c_long = 339;
+pub const SYS_prlimit64: ::c_long = 340;
+pub const SYS_name_to_handle_at: ::c_long = 341;
+pub const SYS_open_by_handle_at: ::c_long = 342;
+pub const SYS_clock_adjtime: ::c_long = 343;
+pub const SYS_syncfs: ::c_long = 344;
+pub const SYS_sendmmsg: ::c_long = 345;
+pub const SYS_setns: ::c_long = 346;
+pub const SYS_process_vm_readv: ::c_long = 347;
+pub const SYS_process_vm_writev: ::c_long = 348;
+pub const SYS_kcmp: ::c_long = 349;
+pub const SYS_finit_module: ::c_long = 350;
+pub const SYS_sched_setattr: ::c_long = 351;
+pub const SYS_sched_getattr: ::c_long = 352;
+pub const SYS_renameat2: ::c_long = 353;
+pub const SYS_seccomp: ::c_long = 354;
+pub const SYS_getrandom: ::c_long = 355;
+pub const SYS_memfd_create: ::c_long = 356;
+pub const SYS_bpf: ::c_long = 357;
+pub const SYS_execveat: ::c_long = 358;
+pub const SYS_socket: ::c_long = 359;
+pub const SYS_socketpair: ::c_long = 360;
+pub const SYS_bind: ::c_long = 361;
+pub const SYS_connect: ::c_long = 362;
+pub const SYS_listen: ::c_long = 363;
+pub const SYS_accept4: ::c_long = 364;
+pub const SYS_getsockopt: ::c_long = 365;
+pub const SYS_setsockopt: ::c_long = 366;
+pub const SYS_getsockname: ::c_long = 367;
+pub const SYS_getpeername: ::c_long = 368;
+pub const SYS_sendto: ::c_long = 369;
+pub const SYS_sendmsg: ::c_long = 370;
+pub const SYS_recvfrom: ::c_long = 371;
+pub const SYS_recvmsg: ::c_long = 372;
+pub const SYS_shutdown: ::c_long = 373;
+pub const SYS_userfaultfd: ::c_long = 374;
+pub const SYS_membarrier: ::c_long = 375;
+pub const SYS_mlock2: ::c_long = 376;
+pub const SYS_copy_file_range: ::c_long = 377;
+pub const SYS_preadv2: ::c_long = 378;
+pub const SYS_pwritev2: ::c_long = 379;
+pub const SYS_pkey_mprotect: ::c_long = 380;
+pub const SYS_pkey_alloc: ::c_long = 381;
+pub const SYS_pkey_free: ::c_long = 382;
+
+// offsets in user_regs_structs, from sys/reg.h
+pub const EBX: ::c_int = 0;
+pub const ECX: ::c_int = 1;
+pub const EDX: ::c_int = 2;
+pub const ESI: ::c_int = 3;
+pub const EDI: ::c_int = 4;
+pub const EBP: ::c_int = 5;
+pub const EAX: ::c_int = 6;
+pub const DS: ::c_int = 7;
+pub const ES: ::c_int = 8;
+pub const FS: ::c_int = 9;
+pub const GS: ::c_int = 10;
+pub const ORIG_EAX: ::c_int = 11;
+pub const EIP: ::c_int = 12;
+pub const CS: ::c_int = 13;
+pub const EFL: ::c_int = 14;
+pub const UESP: ::c_int = 15;
+pub const SS: ::c_int = 16;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/android/b64/aarch64.rs
@@ -0,0 +1,63 @@
+pub type c_char = u8;
+pub type wchar_t = u32;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_mode: ::c_uint,
+        pub st_nlink: ::c_uint,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __pad1: ::c_ulong,
+        pub st_size: ::off64_t,
+        pub st_blksize: ::c_int,
+        __pad2: ::c_int,
+        pub st_blocks: ::c_long,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_ulong,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_ulong,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_ulong,
+        __unused4: ::c_uint,
+        __unused5: ::c_uint,
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_mode: ::c_uint,
+        pub st_nlink: ::c_uint,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __pad1: ::c_ulong,
+        pub st_size: ::off64_t,
+        pub st_blksize: ::c_int,
+        __pad2: ::c_int,
+        pub st_blocks: ::c_long,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_ulong,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_ulong,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_ulong,
+        __unused4: ::c_uint,
+        __unused5: ::c_uint,
+    }
+}
+
+pub const O_DIRECT: ::c_int = 0x10000;
+pub const O_DIRECTORY: ::c_int = 0x4000;
+pub const O_NOFOLLOW: ::c_int = 0x8000;
+pub const O_LARGEFILE: ::c_int = 0o400000;
+
+pub const SYS_pivot_root: ::c_long = 41;
+pub const SYS_gettid: ::c_long = 178;
+pub const SYS_perf_event_open: ::c_long = 241;
+pub const SYS_memfd_create: ::c_long = 279;
+
+pub const SIGSTKSZ: ::size_t = 16384;
+pub const MINSIGSTKSZ: ::size_t = 5120;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/android/b64/mod.rs
@@ -0,0 +1,192 @@
+// The following definitions are correct for aarch64 and x86_64,
+// but may be wrong for mips64
+
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type mode_t = u32;
+pub type off64_t = i64;
+pub type socklen_t = u32;
+
+s! {
+    pub struct sigset_t {
+        __val: [::c_ulong; 1],
+    }
+
+    pub struct sigaction {
+        pub sa_flags: ::c_uint,
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: ::sigset_t,
+        pub sa_restorer: ::dox::Option<extern fn()>,
+    }
+
+    pub struct rlimit64 {
+        pub rlim_cur: ::c_ulonglong,
+        pub rlim_max: ::c_ulonglong,
+    }
+
+    pub struct pthread_attr_t {
+        pub flags: ::uint32_t,
+        pub stack_base: *mut ::c_void,
+        pub stack_size: ::size_t,
+        pub guard_size: ::size_t,
+        pub sched_policy: ::int32_t,
+        pub sched_priority: ::int32_t,
+        __reserved: [::c_char; 16],
+    }
+
+    pub struct pthread_mutex_t {
+        value: ::c_int,
+        __reserved: [::c_char; 36],
+    }
+
+    pub struct pthread_cond_t {
+        value: ::c_int,
+        __reserved: [::c_char; 44],
+    }
+
+    pub struct pthread_rwlock_t {
+        numLocks: ::c_int,
+        writerThreadId: ::c_int,
+        pendingReaders: ::c_int,
+        pendingWriters: ::c_int,
+        attr: i32,
+        __reserved: [::c_char; 36],
+    }
+
+    pub struct passwd {
+        pub pw_name: *mut ::c_char,
+        pub pw_passwd: *mut ::c_char,
+        pub pw_uid: ::uid_t,
+        pub pw_gid: ::gid_t,
+        pub pw_gecos: *mut ::c_char,
+        pub pw_dir: *mut ::c_char,
+        pub pw_shell: *mut ::c_char,
+    }
+
+    pub struct statfs {
+        pub f_type: ::uint64_t,
+        pub f_bsize: ::uint64_t,
+        pub f_blocks: ::uint64_t,
+        pub f_bfree: ::uint64_t,
+        pub f_bavail: ::uint64_t,
+        pub f_files: ::uint64_t,
+        pub f_ffree: ::uint64_t,
+        pub f_fsid: ::__fsid_t,
+        pub f_namelen: ::uint64_t,
+        pub f_frsize: ::uint64_t,
+        pub f_flags: ::uint64_t,
+        pub f_spare: [::uint64_t; 4],
+    }
+
+    pub struct sysinfo {
+        pub uptime: ::c_long,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
+        pub procs: ::c_ushort,
+        pub pad: ::c_ushort,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
+        pub mem_unit: ::c_uint,
+        pub _f: [::c_char; 0],
+    }
+
+    pub struct statfs64 {
+        pub f_type: u64,
+        pub f_bsize: u64,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        f_fsid: [u32; 2],
+        pub f_namelen: u64,
+        pub f_frsize: u64,
+        pub f_flags: u64,
+        pub f_spare: [u64; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+}
+
+pub const RTLD_GLOBAL: ::c_int = 0x00100;
+pub const RTLD_NOW: ::c_int = 2;
+pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
+
+pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
+    value: 0,
+    __reserved: [0; 36],
+};
+pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
+    value: 0,
+    __reserved: [0; 44],
+};
+pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
+    numLocks: 0,
+    writerThreadId: 0,
+    pendingReaders: 0,
+    pendingWriters: 0,
+    attr: 0,
+    __reserved: [0; 36],
+};
+pub const PTHREAD_STACK_MIN: ::size_t = 4096 * 4;
+pub const CPU_SETSIZE: ::size_t = 1024;
+pub const __CPU_BITS: ::size_t = 64;
+
+pub const UT_LINESIZE: usize = 32;
+pub const UT_NAMESIZE: usize = 32;
+pub const UT_HOSTSIZE: usize = 256;
+
+// Some weirdness in Android
+extern {
+    // address_len should be socklen_t, but it is c_int!
+    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
+                address_len: ::c_int) -> ::c_int;
+
+    // the return type should be ::ssize_t, but it is c_int!
+    pub fn writev(fd: ::c_int,
+                  iov: *const ::iovec,
+                  iovcnt: ::c_int) -> ::c_int;
+
+    // the return type should be ::ssize_t, but it is c_int!
+    pub fn readv(fd: ::c_int,
+                 iov: *const ::iovec,
+                 iovcnt: ::c_int) -> ::c_int;
+
+    // the return type should be ::ssize_t, but it is c_int!
+    pub fn sendmsg(fd: ::c_int,
+                   msg: *const ::msghdr,
+                   flags: ::c_int) -> ::c_int;
+
+    // the return type should be ::ssize_t, but it is c_int!
+    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(target_arch = "x86_64")] {
+        mod x86_64;
+        pub use self::x86_64::*;
+    } else if #[cfg(target_arch = "aarch64")] {
+        mod aarch64;
+        pub use self::aarch64::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/android/b64/x86_64.rs
@@ -0,0 +1,420 @@
+pub type c_char = i8;
+pub type wchar_t = i32;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_nlink: ::c_ulong,
+        pub st_mode: ::c_uint,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        pub st_size: ::off64_t,
+        pub st_blksize: ::c_long,
+        pub st_blocks: ::c_long,
+        pub st_atime: ::c_ulong,
+        pub st_atime_nsec: ::c_ulong,
+        pub st_mtime: ::c_ulong,
+        pub st_mtime_nsec: ::c_ulong,
+        pub st_ctime: ::c_ulong,
+        pub st_ctime_nsec: ::c_ulong,
+        __unused: [::c_long; 3],
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_nlink: ::c_ulong,
+        pub st_mode: ::c_uint,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        pub st_size: ::off64_t,
+        pub st_blksize: ::c_long,
+        pub st_blocks: ::c_long,
+        pub st_atime: ::c_ulong,
+        pub st_atime_nsec: ::c_ulong,
+        pub st_mtime: ::c_ulong,
+        pub st_mtime_nsec: ::c_ulong,
+        pub st_ctime: ::c_ulong,
+        pub st_ctime_nsec: ::c_ulong,
+        __unused: [::c_long; 3],
+    }
+}
+
+pub const O_DIRECT: ::c_int = 0x4000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+pub const O_LARGEFILE: ::c_int = 0o0100000;
+
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
+
+pub const MAP_32BIT: ::c_int = 0x40;
+
+// Syscall table
+
+pub const SYS_read: ::c_long = 0;
+pub const SYS_write: ::c_long = 1;
+pub const SYS_open: ::c_long = 2;
+pub const SYS_close: ::c_long = 3;
+pub const SYS_stat: ::c_long = 4;
+pub const SYS_fstat: ::c_long = 5;
+pub const SYS_lstat: ::c_long = 6;
+pub const SYS_poll: ::c_long = 7;
+pub const SYS_lseek: ::c_long = 8;
+pub const SYS_mmap: ::c_long = 9;
+pub const SYS_mprotect: ::c_long = 10;
+pub const SYS_munmap: ::c_long = 11;
+pub const SYS_brk: ::c_long = 12;
+pub const SYS_rt_sigaction: ::c_long = 13;
+pub const SYS_rt_sigprocmask: ::c_long = 14;
+pub const SYS_rt_sigreturn: ::c_long = 15;
+pub const SYS_ioctl: ::c_long = 16;
+pub const SYS_pread64: ::c_long = 17;
+pub const SYS_pwrite64: ::c_long = 18;
+pub const SYS_readv: ::c_long = 19;
+pub const SYS_writev: ::c_long = 20;
+pub const SYS_access: ::c_long = 21;
+pub const SYS_pipe: ::c_long = 22;
+pub const SYS_select: ::c_long = 23;
+pub const SYS_sched_yield: ::c_long = 24;
+pub const SYS_mremap: ::c_long = 25;
+pub const SYS_msync: ::c_long = 26;
+pub const SYS_mincore: ::c_long = 27;
+pub const SYS_madvise: ::c_long = 28;
+pub const SYS_shmget: ::c_long = 29;
+pub const SYS_shmat: ::c_long = 30;
+pub const SYS_shmctl: ::c_long = 31;
+pub const SYS_dup: ::c_long = 32;
+pub const SYS_dup2: ::c_long = 33;
+pub const SYS_pause: ::c_long = 34;
+pub const SYS_nanosleep: ::c_long = 35;
+pub const SYS_getitimer: ::c_long = 36;
+pub const SYS_alarm: ::c_long = 37;
+pub const SYS_setitimer: ::c_long = 38;
+pub const SYS_getpid: ::c_long = 39;
+pub const SYS_sendfile: ::c_long = 40;
+pub const SYS_socket: ::c_long = 41;
+pub const SYS_connect: ::c_long = 42;
+pub const SYS_accept: ::c_long = 43;
+pub const SYS_sendto: ::c_long = 44;
+pub const SYS_recvfrom: ::c_long = 45;
+pub const SYS_sendmsg: ::c_long = 46;
+pub const SYS_recvmsg: ::c_long = 47;
+pub const SYS_shutdown: ::c_long = 48;
+pub const SYS_bind: ::c_long = 49;
+pub const SYS_listen: ::c_long = 50;
+pub const SYS_getsockname: ::c_long = 51;
+pub const SYS_getpeername: ::c_long = 52;
+pub const SYS_socketpair: ::c_long = 53;
+pub const SYS_setsockopt: ::c_long = 54;
+pub const SYS_getsockopt: ::c_long = 55;
+pub const SYS_clone: ::c_long = 56;
+pub const SYS_fork: ::c_long = 57;
+pub const SYS_vfork: ::c_long = 58;
+pub const SYS_execve: ::c_long = 59;
+pub const SYS_exit: ::c_long = 60;
+pub const SYS_wait4: ::c_long = 61;
+pub const SYS_kill: ::c_long = 62;
+pub const SYS_uname: ::c_long = 63;
+pub const SYS_semget: ::c_long = 64;
+pub const SYS_semop: ::c_long = 65;
+pub const SYS_semctl: ::c_long = 66;
+pub const SYS_shmdt: ::c_long = 67;
+pub const SYS_msgget: ::c_long = 68;
+pub const SYS_msgsnd: ::c_long = 69;
+pub const SYS_msgrcv: ::c_long = 70;
+pub const SYS_msgctl: ::c_long = 71;
+pub const SYS_fcntl: ::c_long = 72;
+pub const SYS_flock: ::c_long = 73;
+pub const SYS_fsync: ::c_long = 74;
+pub const SYS_fdatasync: ::c_long = 75;
+pub const SYS_truncate: ::c_long = 76;
+pub const SYS_ftruncate: ::c_long = 77;
+pub const SYS_getdents: ::c_long = 78;
+pub const SYS_getcwd: ::c_long = 79;
+pub const SYS_chdir: ::c_long = 80;
+pub const SYS_fchdir: ::c_long = 81;
+pub const SYS_rename: ::c_long = 82;
+pub const SYS_mkdir: ::c_long = 83;
+pub const SYS_rmdir: ::c_long = 84;
+pub const SYS_creat: ::c_long = 85;
+pub const SYS_link: ::c_long = 86;
+pub const SYS_unlink: ::c_long = 87;
+pub const SYS_symlink: ::c_long = 88;
+pub const SYS_readlink: ::c_long = 89;
+pub const SYS_chmod: ::c_long = 90;
+pub const SYS_fchmod: ::c_long = 91;
+pub const SYS_chown: ::c_long = 92;
+pub const SYS_fchown: ::c_long = 93;
+pub const SYS_lchown: ::c_long = 94;
+pub const SYS_umask: ::c_long = 95;
+pub const SYS_gettimeofday: ::c_long = 96;
+pub const SYS_getrlimit: ::c_long = 97;
+pub const SYS_getrusage: ::c_long = 98;
+pub const SYS_sysinfo: ::c_long = 99;
+pub const SYS_times: ::c_long = 100;
+pub const SYS_ptrace: ::c_long = 101;
+pub const SYS_getuid: ::c_long = 102;
+pub const SYS_syslog: ::c_long = 103;
+pub const SYS_getgid: ::c_long = 104;
+pub const SYS_setuid: ::c_long = 105;
+pub const SYS_setgid: ::c_long = 106;
+pub const SYS_geteuid: ::c_long = 107;
+pub const SYS_getegid: ::c_long = 108;
+pub const SYS_setpgid: ::c_long = 109;
+pub const SYS_getppid: ::c_long = 110;
+pub const SYS_getpgrp: ::c_long = 111;
+pub const SYS_setsid: ::c_long = 112;
+pub const SYS_setreuid: ::c_long = 113;
+pub const SYS_setregid: ::c_long = 114;
+pub const SYS_getgroups: ::c_long = 115;
+pub const SYS_setgroups: ::c_long = 116;
+pub const SYS_setresuid: ::c_long = 117;
+pub const SYS_getresuid: ::c_long = 118;
+pub const SYS_setresgid: ::c_long = 119;
+pub const SYS_getresgid: ::c_long = 120;
+pub const SYS_getpgid: ::c_long = 121;
+pub const SYS_setfsuid: ::c_long = 122;
+pub const SYS_setfsgid: ::c_long = 123;
+pub const SYS_getsid: ::c_long = 124;
+pub const SYS_capget: ::c_long = 125;
+pub const SYS_capset: ::c_long = 126;
+pub const SYS_rt_sigpending: ::c_long = 127;
+pub const SYS_rt_sigtimedwait: ::c_long = 128;
+pub const SYS_rt_sigqueueinfo: ::c_long = 129;
+pub const SYS_rt_sigsuspend: ::c_long = 130;
+pub const SYS_sigaltstack: ::c_long = 131;
+pub const SYS_utime: ::c_long = 132;
+pub const SYS_mknod: ::c_long = 133;
+pub const SYS_uselib: ::c_long = 134;
+pub const SYS_personality: ::c_long = 135;
+pub const SYS_ustat: ::c_long = 136;
+pub const SYS_statfs: ::c_long = 137;
+pub const SYS_fstatfs: ::c_long = 138;
+pub const SYS_sysfs: ::c_long = 139;
+pub const SYS_getpriority: ::c_long = 140;
+pub const SYS_setpriority: ::c_long = 141;
+pub const SYS_sched_setparam: ::c_long = 142;
+pub const SYS_sched_getparam: ::c_long = 143;
+pub const SYS_sched_setscheduler: ::c_long = 144;
+pub const SYS_sched_getscheduler: ::c_long = 145;
+pub const SYS_sched_get_priority_max: ::c_long = 146;
+pub const SYS_sched_get_priority_min: ::c_long = 147;
+pub const SYS_sched_rr_get_interval: ::c_long = 148;
+pub const SYS_mlock: ::c_long = 149;
+pub const SYS_munlock: ::c_long = 150;
+pub const SYS_mlockall: ::c_long = 151;
+pub const SYS_munlockall: ::c_long = 152;
+pub const SYS_vhangup: ::c_long = 153;
+pub const SYS_modify_ldt: ::c_long = 154;
+pub const SYS_pivot_root: ::c_long = 155;
+// FIXME: SYS__sysctl is in the NDK sources but for some reason is
+//        not available in the tests
+// pub const SYS__sysctl: ::c_long = 156;
+pub const SYS_prctl: ::c_long = 157;
+pub const SYS_arch_prctl: ::c_long = 158;
+pub const SYS_adjtimex: ::c_long = 159;
+pub const SYS_setrlimit: ::c_long = 160;
+pub const SYS_chroot: ::c_long = 161;
+pub const SYS_sync: ::c_long = 162;
+pub const SYS_acct: ::c_long = 163;
+pub const SYS_settimeofday: ::c_long = 164;
+pub const SYS_mount: ::c_long = 165;
+pub const SYS_umount2: ::c_long = 166;
+pub const SYS_swapon: ::c_long = 167;
+pub const SYS_swapoff: ::c_long = 168;
+pub const SYS_reboot: ::c_long = 169;
+pub const SYS_sethostname: ::c_long = 170;
+pub const SYS_setdomainname: ::c_long = 171;
+pub const SYS_iopl: ::c_long = 172;
+pub const SYS_ioperm: ::c_long = 173;
+pub const SYS_create_module: ::c_long = 174;
+pub const SYS_init_module: ::c_long = 175;
+pub const SYS_delete_module: ::c_long = 176;
+pub const SYS_get_kernel_syms: ::c_long = 177;
+pub const SYS_query_module: ::c_long = 178;
+pub const SYS_quotactl: ::c_long = 179;
+pub const SYS_nfsservctl: ::c_long = 180;
+pub const SYS_getpmsg: ::c_long = 181;
+pub const SYS_putpmsg: ::c_long = 182;
+pub const SYS_afs_syscall: ::c_long = 183;
+pub const SYS_tuxcall: ::c_long = 184;
+pub const SYS_security: ::c_long = 185;
+pub const SYS_gettid: ::c_long = 186;
+pub const SYS_readahead: ::c_long = 187;
+pub const SYS_setxattr: ::c_long = 188;
+pub const SYS_lsetxattr: ::c_long = 189;
+pub const SYS_fsetxattr: ::c_long = 190;
+pub const SYS_getxattr: ::c_long = 191;
+pub const SYS_lgetxattr: ::c_long = 192;
+pub const SYS_fgetxattr: ::c_long = 193;
+pub const SYS_listxattr: ::c_long = 194;
+pub const SYS_llistxattr: ::c_long = 195;
+pub const SYS_flistxattr: ::c_long = 196;
+pub const SYS_removexattr: ::c_long = 197;
+pub const SYS_lremovexattr: ::c_long = 198;
+pub const SYS_fremovexattr: ::c_long = 199;
+pub const SYS_tkill: ::c_long = 200;
+pub const SYS_time: ::c_long = 201;
+pub const SYS_futex: ::c_long = 202;
+pub const SYS_sched_setaffinity: ::c_long = 203;
+pub const SYS_sched_getaffinity: ::c_long = 204;
+pub const SYS_set_thread_area: ::c_long = 205;
+pub const SYS_io_setup: ::c_long = 206;
+pub const SYS_io_destroy: ::c_long = 207;
+pub const SYS_io_getevents: ::c_long = 208;
+pub const SYS_io_submit: ::c_long = 209;
+pub const SYS_io_cancel: ::c_long = 210;
+pub const SYS_get_thread_area: ::c_long = 211;
+pub const SYS_lookup_dcookie: ::c_long = 212;
+pub const SYS_epoll_create: ::c_long = 213;
+pub const SYS_epoll_ctl_old: ::c_long = 214;
+pub const SYS_epoll_wait_old: ::c_long = 215;
+pub const SYS_remap_file_pages: ::c_long = 216;
+pub const SYS_getdents64: ::c_long = 217;
+pub const SYS_set_tid_address: ::c_long = 218;
+pub const SYS_restart_syscall: ::c_long = 219;
+pub const SYS_semtimedop: ::c_long = 220;
+pub const SYS_fadvise64: ::c_long = 221;
+pub const SYS_timer_create: ::c_long = 222;
+pub const SYS_timer_settime: ::c_long = 223;
+pub const SYS_timer_gettime: ::c_long = 224;
+pub const SYS_timer_getoverrun: ::c_long = 225;
+pub const SYS_timer_delete: ::c_long = 226;
+pub const SYS_clock_settime: ::c_long = 227;
+pub const SYS_clock_gettime: ::c_long = 228;
+pub const SYS_clock_getres: ::c_long = 229;
+pub const SYS_clock_nanosleep: ::c_long = 230;
+pub const SYS_exit_group: ::c_long = 231;
+pub const SYS_epoll_wait: ::c_long = 232;
+pub const SYS_epoll_ctl: ::c_long = 233;
+pub const SYS_tgkill: ::c_long = 234;
+pub const SYS_utimes: ::c_long = 235;
+pub const SYS_vserver: ::c_long = 236;
+pub const SYS_mbind: ::c_long = 237;
+pub const SYS_set_mempolicy: ::c_long = 238;
+pub const SYS_get_mempolicy: ::c_long = 239;
+pub const SYS_mq_open: ::c_long = 240;
+pub const SYS_mq_unlink: ::c_long = 241;
+pub const SYS_mq_timedsend: ::c_long = 242;
+pub const SYS_mq_timedreceive: ::c_long = 243;
+pub const SYS_mq_notify: ::c_long = 244;
+pub const SYS_mq_getsetattr: ::c_long = 245;
+pub const SYS_kexec_load: ::c_long = 246;
+pub const SYS_waitid: ::c_long = 247;
+pub const SYS_add_key: ::c_long = 248;
+pub const SYS_request_key: ::c_long = 249;
+pub const SYS_keyctl: ::c_long = 250;
+pub const SYS_ioprio_set: ::c_long = 251;
+pub const SYS_ioprio_get: ::c_long = 252;
+pub const SYS_inotify_init: ::c_long = 253;
+pub const SYS_inotify_add_watch: ::c_long = 254;
+pub const SYS_inotify_rm_watch: ::c_long = 255;
+pub const SYS_migrate_pages: ::c_long = 256;
+pub const SYS_openat: ::c_long = 257;
+pub const SYS_mkdirat: ::c_long = 258;
+pub const SYS_mknodat: ::c_long = 259;
+pub const SYS_fchownat: ::c_long = 260;
+pub const SYS_futimesat: ::c_long = 261;
+pub const SYS_newfstatat: ::c_long = 262;
+pub const SYS_unlinkat: ::c_long = 263;
+pub const SYS_renameat: ::c_long = 264;
+pub const SYS_linkat: ::c_long = 265;
+pub const SYS_symlinkat: ::c_long = 266;
+pub const SYS_readlinkat: ::c_long = 267;
+pub const SYS_fchmodat: ::c_long = 268;
+pub const SYS_faccessat: ::c_long = 269;
+pub const SYS_pselect6: ::c_long = 270;
+pub const SYS_ppoll: ::c_long = 271;
+pub const SYS_unshare: ::c_long = 272;
+pub const SYS_set_robust_list: ::c_long = 273;
+pub const SYS_get_robust_list: ::c_long = 274;
+pub const SYS_splice: ::c_long = 275;
+pub const SYS_tee: ::c_long = 276;
+pub const SYS_sync_file_range: ::c_long = 277;
+pub const SYS_vmsplice: ::c_long = 278;
+pub const SYS_move_pages: ::c_long = 279;
+pub const SYS_utimensat: ::c_long = 280;
+pub const SYS_epoll_pwait: ::c_long = 281;
+pub const SYS_signalfd: ::c_long = 282;
+pub const SYS_timerfd_create: ::c_long = 283;
+pub const SYS_eventfd: ::c_long = 284;
+pub const SYS_fallocate: ::c_long = 285;
+pub const SYS_timerfd_settime: ::c_long = 286;
+pub const SYS_timerfd_gettime: ::c_long = 287;
+pub const SYS_accept4: ::c_long = 288;
+pub const SYS_signalfd4: ::c_long = 289;
+pub const SYS_eventfd2: ::c_long = 290;
+pub const SYS_epoll_create1: ::c_long = 291;
+pub const SYS_dup3: ::c_long = 292;
+pub const SYS_pipe2: ::c_long = 293;
+pub const SYS_inotify_init1: ::c_long = 294;
+pub const SYS_preadv: ::c_long = 295;
+pub const SYS_pwritev: ::c_long = 296;
+pub const SYS_rt_tgsigqueueinfo: ::c_long = 297;
+pub const SYS_perf_event_open: ::c_long = 298;
+pub const SYS_recvmmsg: ::c_long = 299;
+pub const SYS_fanotify_init: ::c_long = 300;
+pub const SYS_fanotify_mark: ::c_long = 301;
+pub const SYS_prlimit64: ::c_long = 302;
+pub const SYS_name_to_handle_at: ::c_long = 303;
+pub const SYS_open_by_handle_at: ::c_long = 304;
+pub const SYS_clock_adjtime: ::c_long = 305;
+pub const SYS_syncfs: ::c_long = 306;
+pub const SYS_sendmmsg: ::c_long = 307;
+pub const SYS_setns: ::c_long = 308;
+pub const SYS_getcpu: ::c_long = 309;
+pub const SYS_process_vm_readv: ::c_long = 310;
+pub const SYS_process_vm_writev: ::c_long = 311;
+pub const SYS_kcmp: ::c_long = 312;
+pub const SYS_finit_module: ::c_long = 313;
+pub const SYS_sched_setattr: ::c_long = 314;
+pub const SYS_sched_getattr: ::c_long = 315;
+pub const SYS_renameat2: ::c_long = 316;
+pub const SYS_seccomp: ::c_long = 317;
+pub const SYS_getrandom: ::c_long = 318;
+pub const SYS_memfd_create: ::c_long = 319;
+pub const SYS_kexec_file_load: ::c_long = 320;
+pub const SYS_bpf: ::c_long = 321;
+pub const SYS_execveat: ::c_long = 322;
+pub const SYS_userfaultfd: ::c_long = 323;
+pub const SYS_membarrier: ::c_long = 324;
+pub const SYS_mlock2: ::c_long = 325;
+pub const SYS_copy_file_range: ::c_long = 326;
+pub const SYS_preadv2: ::c_long = 327;
+pub const SYS_pwritev2: ::c_long = 328;
+pub const SYS_pkey_mprotect: ::c_long = 329;
+pub const SYS_pkey_alloc: ::c_long = 330;
+pub const SYS_pkey_free: ::c_long = 331;
+
+// offsets in user_regs_structs, from sys/reg.h
+pub const R15: ::c_int = 0;
+pub const R14: ::c_int = 1;
+pub const R13: ::c_int = 2;
+pub const R12: ::c_int = 3;
+pub const RBP: ::c_int = 4;
+pub const RBX: ::c_int = 5;
+pub const R11: ::c_int = 6;
+pub const R10: ::c_int = 7;
+pub const R9: ::c_int = 8;
+pub const R8: ::c_int = 9;
+pub const RAX: ::c_int = 10;
+pub const RCX: ::c_int = 11;
+pub const RDX: ::c_int = 12;
+pub const RSI: ::c_int = 13;
+pub const RDI: ::c_int = 14;
+pub const ORIG_RAX: ::c_int = 15;
+pub const RIP: ::c_int = 16;
+pub const CS: ::c_int = 17;
+pub const EFLAGS: ::c_int = 18;
+pub const RSP: ::c_int = 19;
+pub const SS: ::c_int = 20;
+pub const FS_BASE: ::c_int = 21;
+pub const GS_BASE: ::c_int = 22;
+pub const DS: ::c_int = 23;
+pub const ES: ::c_int = 24;
+pub const FS: ::c_int = 25;
+pub const GS: ::c_int = 26;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/android/mod.rs
@@ -0,0 +1,1092 @@
+//! Android-specific definitions for linux-like values
+
+use dox::{mem, Option};
+
+pub type clock_t = ::c_long;
+pub type time_t = ::c_long;
+pub type suseconds_t = ::c_long;
+pub type off_t = ::c_long;
+pub type blkcnt_t = ::c_ulong;
+pub type blksize_t = ::c_ulong;
+pub type nlink_t = u32;
+pub type useconds_t = u32;
+pub type pthread_t = ::c_long;
+pub type pthread_mutexattr_t = ::c_long;
+pub type pthread_rwlockattr_t = ::c_long;
+pub type pthread_condattr_t = ::c_long;
+pub type fsfilcnt_t = ::c_ulong;
+pub type fsblkcnt_t = ::c_ulong;
+pub type nfds_t = ::c_uint;
+pub type rlim_t = ::c_ulong;
+pub type dev_t = ::c_ulong;
+pub type ino_t = ::c_ulong;
+pub type __CPU_BITTYPE = ::c_ulong;
+pub type idtype_t = ::c_int;
+pub type loff_t = ::c_longlong;
+
+s! {
+    pub struct dirent {
+        pub d_ino: u64,
+        pub d_off: i64,
+        pub d_reclen: ::c_ushort,
+        pub d_type: ::c_uchar,
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct dirent64 {
+        pub d_ino: u64,
+        pub d_off: i64,
+        pub d_reclen: ::c_ushort,
+        pub d_type: ::c_uchar,
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_flags: ::c_int,
+        pub ss_size: ::size_t
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_errno: ::c_int,
+        pub si_code: ::c_int,
+        pub _pad: [::c_int; 29],
+        _align: [usize; 0],
+    }
+
+    pub struct __fsid_t {
+        __val: [::c_int; 2],
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::size_t,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::size_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::size_t,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_line: ::cc_t,
+        pub c_cc: [::cc_t; ::NCCS],
+    }
+
+    pub struct flock {
+        pub l_type: ::c_short,
+        pub l_whence: ::c_short,
+        pub l_start: ::off_t,
+        pub l_len: ::off_t,
+        pub l_pid: ::pid_t,
+    }
+
+    pub struct cpu_set_t {
+        #[cfg(target_pointer_width = "64")]
+        __bits: [__CPU_BITTYPE; 16],
+        #[cfg(target_pointer_width = "32")]
+        __bits: [__CPU_BITTYPE; 1],
+    }
+
+    pub struct sem_t {
+        count: ::c_uint,
+        #[cfg(target_pointer_width = "64")]
+        __reserved: [::c_int; 3],
+    }
+
+    pub struct lastlog {
+        ll_time: ::time_t,
+        ll_line: [::c_char; UT_LINESIZE],
+        ll_host: [::c_char; UT_HOSTSIZE],
+    }
+
+    pub struct exit_status {
+        pub e_termination: ::c_short,
+        pub e_exit: ::c_short,
+    }
+
+    pub struct utmp {
+        pub ut_type: ::c_short,
+        pub ut_pid: ::pid_t,
+        pub ut_line: [::c_char; UT_LINESIZE],
+        pub ut_id: [::c_char; 4],
+
+        pub ut_user: [::c_char; UT_NAMESIZE],
+        pub ut_host: [::c_char; UT_HOSTSIZE],
+        pub ut_exit: exit_status,
+        pub ut_session: ::c_long,
+        pub ut_tv: ::timeval,
+
+        pub ut_addr_v6: [::int32_t; 4],
+        unused: [::c_char; 20],
+    }
+
+    pub struct statvfs {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_favail: ::fsfilcnt_t,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        #[cfg(target_pointer_width = "64")]
+        __f_reserved: [u32; 6],
+    }
+
+    pub struct signalfd_siginfo {
+        pub ssi_signo: ::uint32_t,
+        pub ssi_errno: ::int32_t,
+        pub ssi_code: ::int32_t,
+        pub ssi_pid: ::uint32_t,
+        pub ssi_uid: ::uint32_t,
+        pub ssi_fd: ::int32_t,
+        pub ssi_tid: ::uint32_t,
+        pub ssi_band: ::uint32_t,
+        pub ssi_overrun: ::uint32_t,
+        pub ssi_trapno: ::uint32_t,
+        pub ssi_status: ::int32_t,
+        pub ssi_int: ::int32_t,
+        pub ssi_ptr: ::c_ulonglong,
+        pub ssi_utime: ::c_ulonglong,
+        pub ssi_stime: ::c_ulonglong,
+        pub ssi_addr: ::c_ulonglong,
+        pub ssi_addr_lsb: ::uint16_t,
+        _pad: [::uint8_t; 46],
+    }
+}
+
+pub const O_TRUNC: ::c_int = 512;
+pub const O_CLOEXEC: ::c_int = 0x80000;
+pub const O_PATH: ::c_int = 0o10000000;
+pub const O_NOATIME: ::c_int = 0o1000000;
+
+pub const EBFONT: ::c_int = 59;
+pub const ENOSTR: ::c_int = 60;
+pub const ENODATA: ::c_int = 61;
+pub const ETIME: ::c_int = 62;
+pub const ENOSR: ::c_int = 63;
+pub const ENONET: ::c_int = 64;
+pub const ENOPKG: ::c_int = 65;
+pub const EREMOTE: ::c_int = 66;
+pub const ENOLINK: ::c_int = 67;
+pub const EADV: ::c_int = 68;
+pub const ESRMNT: ::c_int = 69;
+pub const ECOMM: ::c_int = 70;
+pub const EPROTO: ::c_int = 71;
+pub const EDOTDOT: ::c_int = 73;
+
+pub const SA_NODEFER: ::c_int = 0x40000000;
+pub const SA_RESETHAND: ::c_int = 0x80000000;
+pub const SA_RESTART: ::c_int = 0x10000000;
+pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
+
+pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
+pub const EPOLLONESHOT: ::c_int = 0x40000000;
+pub const EPOLLRDHUP: ::c_int = 0x00002000;
+pub const EPOLLWAKEUP: ::c_int = 0x20000000;
+
+pub const EFD_CLOEXEC: ::c_int = 0x80000;
+
+pub const USER_PROCESS: ::c_short = 7;
+
+pub const BUFSIZ: ::c_uint = 1024;
+pub const FILENAME_MAX: ::c_uint = 1024;
+pub const FOPEN_MAX: ::c_uint = 20;
+pub const POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
+pub const L_tmpnam: ::c_uint = 1024;
+pub const TMP_MAX: ::c_uint = 308915776;
+pub const _PC_LINK_MAX: ::c_int = 1;
+pub const _PC_MAX_CANON: ::c_int = 2;
+pub const _PC_MAX_INPUT: ::c_int = 3;
+pub const _PC_NAME_MAX: ::c_int = 4;
+pub const _PC_PATH_MAX: ::c_int = 5;
+pub const _PC_PIPE_BUF: ::c_int = 6;
+pub const _PC_2_SYMLINKS: ::c_int = 7;
+pub const _PC_ALLOC_SIZE_MIN: ::c_int = 8;
+pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 9;
+pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 10;
+pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 11;
+pub const _PC_REC_XFER_ALIGN: ::c_int = 12;
+pub const _PC_SYMLINK_MAX: ::c_int = 13;
+pub const _PC_CHOWN_RESTRICTED: ::c_int = 14;
+pub const _PC_NO_TRUNC: ::c_int = 15;
+pub const _PC_VDISABLE: ::c_int = 16;
+pub const _PC_ASYNC_IO: ::c_int = 17;
+pub const _PC_PRIO_IO: ::c_int = 18;
+pub const _PC_SYNC_IO: ::c_int = 19;
+
+pub const FIONBIO: ::c_int = 0x5421;
+
+pub const _SC_ARG_MAX: ::c_int = 0;
+pub const _SC_BC_BASE_MAX: ::c_int = 1;
+pub const _SC_BC_DIM_MAX: ::c_int = 2;
+pub const _SC_BC_SCALE_MAX: ::c_int = 3;
+pub const _SC_BC_STRING_MAX: ::c_int = 4;
+pub const _SC_CHILD_MAX: ::c_int = 5;
+pub const _SC_CLK_TCK: ::c_int = 6;
+pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 7;
+pub const _SC_EXPR_NEST_MAX: ::c_int = 8;
+pub const _SC_LINE_MAX: ::c_int = 9;
+pub const _SC_NGROUPS_MAX: ::c_int = 10;
+pub const _SC_OPEN_MAX: ::c_int = 11;
+pub const _SC_PASS_MAX: ::c_int = 12;
+pub const _SC_2_C_BIND: ::c_int = 13;
+pub const _SC_2_C_DEV: ::c_int = 14;
+pub const _SC_2_C_VERSION: ::c_int = 15;
+pub const _SC_2_CHAR_TERM: ::c_int = 16;
+pub const _SC_2_FORT_DEV: ::c_int = 17;
+pub const _SC_2_FORT_RUN: ::c_int = 18;
+pub const _SC_2_LOCALEDEF: ::c_int = 19;
+pub const _SC_2_SW_DEV: ::c_int = 20;
+pub const _SC_2_UPE: ::c_int = 21;
+pub const _SC_2_VERSION: ::c_int = 22;
+pub const _SC_JOB_CONTROL: ::c_int = 23;
+pub const _SC_SAVED_IDS: ::c_int = 24;
+pub const _SC_VERSION: ::c_int = 25;
+pub const _SC_RE_DUP_MAX: ::c_int = 26;
+pub const _SC_STREAM_MAX: ::c_int = 27;
+pub const _SC_TZNAME_MAX: ::c_int = 28;
+pub const _SC_XOPEN_CRYPT: ::c_int = 29;
+pub const _SC_XOPEN_ENH_I18N: ::c_int = 30;
+pub const _SC_XOPEN_SHM: ::c_int = 31;
+pub const _SC_XOPEN_VERSION: ::c_int = 32;
+pub const _SC_XOPEN_XCU_VERSION: ::c_int = 33;
+pub const _SC_XOPEN_REALTIME: ::c_int = 34;
+pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 35;
+pub const _SC_XOPEN_LEGACY: ::c_int = 36;
+pub const _SC_ATEXIT_MAX: ::c_int = 37;
+pub const _SC_IOV_MAX: ::c_int = 38;
+pub const _SC_PAGESIZE: ::c_int = 39;
+pub const _SC_PAGE_SIZE: ::c_int = 40;
+pub const _SC_XOPEN_UNIX: ::c_int = 41;
+pub const _SC_XBS5_ILP32_OFF32: ::c_int = 42;
+pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 43;
+pub const _SC_XBS5_LP64_OFF64: ::c_int = 44;
+pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 45;
+pub const _SC_AIO_LISTIO_MAX: ::c_int = 46;
+pub const _SC_AIO_MAX: ::c_int = 47;
+pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 48;
+pub const _SC_DELAYTIMER_MAX: ::c_int = 49;
+pub const _SC_MQ_OPEN_MAX: ::c_int = 50;
+pub const _SC_MQ_PRIO_MAX: ::c_int = 51;
+pub const _SC_RTSIG_MAX: ::c_int = 52;
+pub const _SC_SEM_NSEMS_MAX: ::c_int = 53;
+pub const _SC_SEM_VALUE_MAX: ::c_int = 54;
+pub const _SC_SIGQUEUE_MAX: ::c_int = 55;
+pub const _SC_TIMER_MAX: ::c_int = 56;
+pub const _SC_ASYNCHRONOUS_IO: ::c_int = 57;
+pub const _SC_FSYNC: ::c_int = 58;
+pub const _SC_MAPPED_FILES: ::c_int = 59;
+pub const _SC_MEMLOCK: ::c_int = 60;
+pub const _SC_MEMLOCK_RANGE: ::c_int = 61;
+pub const _SC_MEMORY_PROTECTION: ::c_int = 62;
+pub const _SC_MESSAGE_PASSING: ::c_int = 63;
+pub const _SC_PRIORITIZED_IO: ::c_int = 64;
+pub const _SC_PRIORITY_SCHEDULING: ::c_int = 65;
+pub const _SC_REALTIME_SIGNALS: ::c_int = 66;
+pub const _SC_SEMAPHORES: ::c_int = 67;
+pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 68;
+pub const _SC_SYNCHRONIZED_IO: ::c_int = 69;
+pub const _SC_TIMERS: ::c_int = 70;
+pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 71;
+pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 72;
+pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 74;
+pub const _SC_THREAD_KEYS_MAX: ::c_int = 75;
+pub const _SC_THREAD_STACK_MIN: ::c_int = 76;
+pub const _SC_THREAD_THREADS_MAX: ::c_int = 77;
+pub const _SC_TTY_NAME_MAX: ::c_int = 78;
+pub const _SC_THREADS: ::c_int = 79;
+pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 80;
+pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 81;
+pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 82;
+pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 83;
+pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 84;
+pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 85;
+pub const _SC_NPROCESSORS_CONF: ::c_int = 96;
+pub const _SC_NPROCESSORS_ONLN: ::c_int = 97;
+pub const _SC_PHYS_PAGES: ::c_int = 98;
+pub const _SC_AVPHYS_PAGES: ::c_int = 99;
+pub const _SC_MONOTONIC_CLOCK: ::c_int = 100;
+
+pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
+pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
+pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
+pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
+
+pub const FIOCLEX: ::c_int = 0x5451;
+
+pub const SA_ONSTACK: ::c_ulong = 0x08000000;
+pub const SA_SIGINFO: ::c_ulong = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_ulong = 0x00000002;
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGUNUSED: ::c_int = 31;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
+
+pub const RUSAGE_CHILDREN: ::c_int = -1;
+
+pub const LC_PAPER: ::c_int = 7;
+pub const LC_NAME: ::c_int = 8;
+pub const LC_ADDRESS: ::c_int = 9;
+pub const LC_TELEPHONE: ::c_int = 10;
+pub const LC_MEASUREMENT: ::c_int = 11;
+pub const LC_IDENTIFICATION: ::c_int = 12;
+pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
+pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
+pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
+pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
+pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
+pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
+pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
+                               | ::LC_NUMERIC_MASK
+                               | ::LC_TIME_MASK
+                               | ::LC_COLLATE_MASK
+                               | ::LC_MONETARY_MASK
+                               | ::LC_MESSAGES_MASK
+                               | LC_PAPER_MASK
+                               | LC_NAME_MASK
+                               | LC_ADDRESS_MASK
+                               | LC_TELEPHONE_MASK
+                               | LC_MEASUREMENT_MASK
+                               | LC_IDENTIFICATION_MASK;
+
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_ANONYMOUS: ::c_int = 0x0020;
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+pub const MAP_DENYWRITE: ::c_int = 0x0800;
+pub const MAP_EXECUTABLE: ::c_int = 0x01000;
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_POPULATE: ::c_int = 0x08000;
+pub const MAP_NONBLOCK: ::c_int = 0x010000;
+pub const MAP_STACK: ::c_int = 0x020000;
+
+pub const EDEADLK: ::c_int = 35;
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+
+pub const EMULTIHOP: ::c_int = 72;
+pub const EBADMSG: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ENETDOWN: ::c_int = 100;
+pub const ENETUNREACH: ::c_int = 101;
+pub const ENETRESET: ::c_int = 102;
+pub const ECONNABORTED: ::c_int = 103;
+pub const ECONNRESET: ::c_int = 104;
+pub const ENOBUFS: ::c_int = 105;
+pub const EISCONN: ::c_int = 106;
+pub const ENOTCONN: ::c_int = 107;
+pub const ESHUTDOWN: ::c_int = 108;
+pub const ETOOMANYREFS: ::c_int = 109;
+pub const ETIMEDOUT: ::c_int = 110;
+pub const ECONNREFUSED: ::c_int = 111;
+pub const EHOSTDOWN: ::c_int = 112;
+pub const EHOSTUNREACH: ::c_int = 113;
+pub const EALREADY: ::c_int = 114;
+pub const EINPROGRESS: ::c_int = 115;
+pub const ESTALE: ::c_int = 116;
+pub const EUCLEAN: ::c_int = 117;
+pub const ENOTNAM: ::c_int = 118;
+pub const ENAVAIL: ::c_int = 119;
+pub const EISNAM: ::c_int = 120;
+pub const EREMOTEIO: ::c_int = 121;
+pub const EDQUOT: ::c_int = 122;
+pub const ENOMEDIUM: ::c_int = 123;
+pub const EMEDIUMTYPE: ::c_int = 124;
+pub const ECANCELED: ::c_int = 125;
+pub const ENOKEY: ::c_int = 126;
+pub const EKEYEXPIRED: ::c_int = 127;
+pub const EKEYREVOKED: ::c_int = 128;
+pub const EKEYREJECTED: ::c_int = 129;
+pub const EOWNERDEAD: ::c_int = 130;
+pub const ENOTRECOVERABLE: ::c_int = 131;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOCK_SEQPACKET: ::c_int = 5;
+
+pub const SOL_SOCKET: ::c_int = 1;
+pub const SOL_SCTP: ::c_int = 132;
+pub const SOL_IPX: ::c_int = 256;
+pub const SOL_AX25: ::c_int = 257;
+pub const SOL_ATALK: ::c_int = 258;
+pub const SOL_NETROM: ::c_int = 259;
+pub const SOL_ROSE: ::c_int = 260;
+
+#[doc(hidden)]
+pub const AF_MAX: ::c_int = 43;
+#[doc(hidden)]
+pub const PF_MAX: ::c_int = AF_MAX;
+
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_PASSCRED: ::c_int = 16;
+pub const SO_PEERCRED: ::c_int = 17;
+pub const SO_RCVLOWAT: ::c_int = 18;
+pub const SO_SNDLOWAT: ::c_int = 19;
+pub const SO_RCVTIMEO: ::c_int = 20;
+pub const SO_SNDTIMEO: ::c_int = 21;
+pub const SO_BINDTODEVICE: ::c_int = 25;
+pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_MARK: ::c_int = 36;
+pub const SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
+pub const SO_RXQ_OVFL: ::c_int = 40;
+pub const SO_PEEK_OFF: ::c_int = 42;
+pub const SO_BUSY_POLL: ::c_int = 46;
+
+pub const O_ACCMODE: ::c_int = 3;
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 0x101000;
+pub const O_ASYNC: ::c_int = 0x2000;
+pub const O_NDELAY: ::c_int = 0x800;
+pub const O_DSYNC: ::c_int = 4096;
+
+pub const NI_MAXHOST: ::size_t = 1025;
+
+pub const NCCS: usize = 19;
+pub const TCSBRKP: ::c_int = 0x5425;
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 0x1;
+pub const TCSAFLUSH: ::c_int = 0x2;
+pub const VEOF: usize = 4;
+pub const VEOL: usize = 11;
+pub const VEOL2: usize = 16;
+pub const VMIN: usize = 6;
+pub const IEXTEN: ::tcflag_t = 0x00008000;
+pub const TOSTOP: ::tcflag_t = 0x00000100;
+pub const FLUSHO: ::tcflag_t = 0x00001000;
+pub const EXTPROC: ::tcflag_t = 0o200000;
+
+pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
+pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
+pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
+pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
+pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
+pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
+pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
+pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
+pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
+pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
+pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
+pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
+pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
+pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
+pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
+pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
+pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
+pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
+pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
+pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
+pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
+pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
+pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
+pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
+pub const TMPFS_MAGIC: ::c_long = 0x01021994;
+pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
+
+pub const MAP_HUGETLB: ::c_int = 0x040000;
+
+pub const PTRACE_TRACEME: ::c_int = 0;
+pub const PTRACE_PEEKTEXT: ::c_int = 1;
+pub const PTRACE_PEEKDATA: ::c_int = 2;
+pub const PTRACE_PEEKUSER: ::c_int = 3;
+pub const PTRACE_POKETEXT: ::c_int = 4;
+pub const PTRACE_POKEDATA: ::c_int = 5;
+pub const PTRACE_POKEUSER: ::c_int = 6;
+pub const PTRACE_CONT: ::c_int = 7;
+pub const PTRACE_KILL: ::c_int = 8;
+pub const PTRACE_SINGLESTEP: ::c_int = 9;
+pub const PTRACE_ATTACH: ::c_int = 16;
+pub const PTRACE_DETACH: ::c_int = 17;
+pub const PTRACE_SYSCALL: ::c_int = 24;
+pub const PTRACE_SETOPTIONS: ::c_int = 0x4200;
+pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201;
+pub const PTRACE_GETSIGINFO: ::c_int = 0x4202;
+pub const PTRACE_SETSIGINFO: ::c_int = 0x4203;
+
+pub const EFD_NONBLOCK: ::c_int = 0x800;
+
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETOWN: ::c_int = 8;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+
+pub const TCGETS: ::c_int = 0x5401;
+pub const TCSETS: ::c_int = 0x5402;
+pub const TCSETSW: ::c_int = 0x5403;
+pub const TCSETSF: ::c_int = 0x5404;
+pub const TCGETA: ::c_int = 0x5405;
+pub const TCSETA: ::c_int = 0x5406;
+pub const TCSETAW: ::c_int = 0x5407;
+pub const TCSETAF: ::c_int = 0x5408;
+pub const TCSBRK: ::c_int = 0x5409;
+pub const TCXONC: ::c_int = 0x540A;
+pub const TCFLSH: ::c_int = 0x540B;
+pub const TIOCGSOFTCAR: ::c_int = 0x5419;
+pub const TIOCSSOFTCAR: ::c_int = 0x541A;
+pub const TIOCINQ: ::c_int = 0x541B;
+pub const TIOCLINUX: ::c_int = 0x541C;
+pub const TIOCGSERIAL: ::c_int = 0x541E;
+pub const TIOCEXCL: ::c_int = 0x540C;
+pub const TIOCNXCL: ::c_int = 0x540D;
+pub const TIOCSCTTY: ::c_int = 0x540E;
+pub const TIOCGPGRP: ::c_int = 0x540F;
+pub const TIOCSPGRP: ::c_int = 0x5410;
+pub const TIOCOUTQ: ::c_int = 0x5411;
+pub const TIOCSTI: ::c_int = 0x5412;
+pub const TIOCGWINSZ: ::c_int = 0x5413;
+pub const TIOCSWINSZ: ::c_int = 0x5414;
+pub const TIOCMGET: ::c_int = 0x5415;
+pub const TIOCMBIS: ::c_int = 0x5416;
+pub const TIOCMBIC: ::c_int = 0x5417;
+pub const TIOCMSET: ::c_int = 0x5418;
+pub const FIONREAD: ::c_int = 0x541B;
+pub const TIOCCONS: ::c_int = 0x541D;
+
+pub const RTLD_NOLOAD: ::c_int = 0x4;
+
+pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
+
+pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
+pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
+pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
+pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
+pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
+
+pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
+pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
+pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
+pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
+pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
+pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
+pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
+pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const CBAUD: ::tcflag_t = 0o0010017;
+pub const TAB1: ::c_int = 0x00000800;
+pub const TAB2: ::c_int = 0x00001000;
+pub const TAB3: ::c_int = 0x00001800;
+pub const CR1: ::c_int  = 0x00000200;
+pub const CR2: ::c_int  = 0x00000400;
+pub const CR3: ::c_int  = 0x00000600;
+pub const FF1: ::c_int  = 0x00008000;
+pub const BS1: ::c_int  = 0x00002000;
+pub const VT1: ::c_int  = 0x00004000;
+pub const VWERASE: usize = 14;
+pub const VREPRINT: usize = 12;
+pub const VSUSP: usize = 10;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VDISCARD: usize = 13;
+pub const VTIME: usize = 5;
+pub const IXON: ::tcflag_t = 0x00000400;
+pub const IXOFF: ::tcflag_t = 0x00001000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x00000030;
+pub const CS6: ::tcflag_t = 0x00000010;
+pub const CS7: ::tcflag_t = 0x00000020;
+pub const CS8: ::tcflag_t = 0x00000030;
+pub const CSTOPB: ::tcflag_t = 0x00000040;
+pub const CREAD: ::tcflag_t = 0x00000080;
+pub const PARENB: ::tcflag_t = 0x00000100;
+pub const PARODD: ::tcflag_t = 0x00000200;
+pub const HUPCL: ::tcflag_t = 0x00000400;
+pub const CLOCAL: ::tcflag_t = 0x00000800;
+pub const ECHOKE: ::tcflag_t = 0x00000800;
+pub const ECHOE: ::tcflag_t = 0x00000010;
+pub const ECHOK: ::tcflag_t = 0x00000020;
+pub const ECHONL: ::tcflag_t = 0x00000040;
+pub const ECHOPRT: ::tcflag_t = 0x00000400;
+pub const ECHOCTL: ::tcflag_t = 0x00000200;
+pub const ISIG: ::tcflag_t = 0x00000001;
+pub const ICANON: ::tcflag_t = 0x00000002;
+pub const PENDIN: ::tcflag_t = 0x00004000;
+pub const NOFLSH: ::tcflag_t = 0x00000080;
+pub const VSWTC: usize = 7;
+pub const OLCUC:  ::tcflag_t = 0o000002;
+pub const NLDLY:  ::tcflag_t = 0o000400;
+pub const CRDLY:  ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const BSDLY:  ::tcflag_t = 0o020000;
+pub const FFDLY:  ::tcflag_t = 0o100000;
+pub const VTDLY:  ::tcflag_t = 0o040000;
+pub const XTABS:  ::tcflag_t = 0o014000;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+
+pub const EAI_SYSTEM: ::c_int = 11;
+
+pub const NETLINK_ROUTE: ::c_int = 0;
+pub const NETLINK_UNUSED: ::c_int = 1;
+pub const NETLINK_USERSOCK: ::c_int = 2;
+pub const NETLINK_FIREWALL: ::c_int = 3;
+pub const NETLINK_SOCK_DIAG: ::c_int = 4;
+pub const NETLINK_NFLOG: ::c_int = 5;
+pub const NETLINK_XFRM: ::c_int = 6;
+pub const NETLINK_SELINUX: ::c_int = 7;
+pub const NETLINK_ISCSI: ::c_int = 8;
+pub const NETLINK_AUDIT: ::c_int = 9;
+pub const NETLINK_FIB_LOOKUP: ::c_int = 10;
+pub const NETLINK_CONNECTOR: ::c_int = 11;
+pub const NETLINK_NETFILTER: ::c_int = 12;
+pub const NETLINK_IP6_FW: ::c_int = 13;
+pub const NETLINK_DNRTMSG: ::c_int = 14;
+pub const NETLINK_KOBJECT_UEVENT: ::c_int = 15;
+pub const NETLINK_GENERIC: ::c_int = 16;
+pub const NETLINK_SCSITRANSPORT: ::c_int = 18;
+pub const NETLINK_ECRYPTFS: ::c_int = 19;
+pub const NETLINK_RDMA: ::c_int = 20;
+pub const NETLINK_CRYPTO: ::c_int = 21;
+pub const NETLINK_INET_DIAG: ::c_int = NETLINK_SOCK_DIAG;
+
+pub const MAX_LINKS: ::c_int = 32;
+
+pub const NLM_F_REQUEST: ::c_int = 1;
+pub const NLM_F_MULTI: ::c_int = 2;
+pub const NLM_F_ACK: ::c_int = 4;
+pub const NLM_F_ECHO: ::c_int = 8;
+pub const NLM_F_DUMP_INTR: ::c_int = 16;
+
+pub const NLM_F_ROOT: ::c_int = 0x100;
+pub const NLM_F_MATCH: ::c_int = 0x200;
+pub const NLM_F_ATOMIC: ::c_int = 0x400;
+pub const NLM_F_DUMP: ::c_int = NLM_F_ROOT | NLM_F_MATCH;
+
+pub const NLM_F_REPLACE: ::c_int = 0x100;
+pub const NLM_F_EXCL: ::c_int = 0x200;
+pub const NLM_F_CREATE: ::c_int = 0x400;
+pub const NLM_F_APPEND: ::c_int = 0x800;
+
+pub const NLMSG_NOOP: ::c_int = 0x1;
+pub const NLMSG_ERROR: ::c_int = 0x2;
+pub const NLMSG_DONE: ::c_int = 0x3;
+pub const NLMSG_OVERRUN: ::c_int = 0x4;
+pub const NLMSG_MIN_TYPE: ::c_int = 0x10;
+
+pub const NETLINK_ADD_MEMBERSHIP: ::c_int = 1;
+pub const NETLINK_DROP_MEMBERSHIP: ::c_int = 2;
+pub const NETLINK_PKTINFO: ::c_int = 3;
+pub const NETLINK_BROADCAST_ERROR: ::c_int = 4;
+pub const NETLINK_NO_ENOBUFS: ::c_int = 5;
+pub const NETLINK_RX_RING: ::c_int = 6;
+pub const NETLINK_TX_RING: ::c_int = 7;
+
+pub const NLA_F_NESTED: ::c_int = 1 << 15;
+pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14;
+pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER);
+
+pub const SIGEV_THREAD_ID: ::c_int = 4;
+
+pub const CIBAUD: ::tcflag_t = 0o02003600000;
+pub const CBAUDEX: ::tcflag_t = 0o010000;
+
+pub const TIOCM_LE: ::c_int = 0x001;
+pub const TIOCM_DTR: ::c_int = 0x002;
+pub const TIOCM_RTS: ::c_int = 0x004;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+pub const TIOCM_CD: ::c_int = TIOCM_CAR;
+pub const TIOCM_RI: ::c_int = TIOCM_RNG;
+
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const SFD_CLOEXEC: ::c_int = O_CLOEXEC;
+pub const SFD_NONBLOCK: ::c_int = O_NONBLOCK;
+
+pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
+
+pub const SO_ORIGINAL_DST: ::c_int = 80;
+pub const IUTF8: ::tcflag_t = 0x00004000;
+pub const CMSPAR: ::tcflag_t = 0o10000000000;
+pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
+
+f! {
+    pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
+        for slot in cpuset.__bits.iter_mut() {
+            *slot = 0;
+        }
+    }
+
+    pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
+        let size_in___bits = 8 * mem::size_of_val(&cpuset.__bits[0]);
+        let (idx, offset) = (cpu / size_in___bits, cpu % size_in___bits);
+        cpuset.__bits[idx] |= 1 << offset;
+        ()
+    }
+
+    pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
+        let size_in___bits = 8 * mem::size_of_val(&cpuset.__bits[0]);
+        let (idx, offset) = (cpu / size_in___bits, cpu % size_in___bits);
+        cpuset.__bits[idx] &= !(1 << offset);
+        ()
+    }
+
+    pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
+        let size_in___bits = 8 * mem::size_of_val(&cpuset.__bits[0]);
+        let (idx, offset) = (cpu / size_in___bits, cpu % size_in___bits);
+        0 != (cpuset.__bits[idx] & (1 << offset))
+    }
+
+    pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
+        set1.__bits == set2.__bits
+    }
+    pub fn major(dev: ::dev_t) -> ::c_int {
+        ((dev >> 8) & 0xfff) as ::c_int
+    }
+    pub fn minor(dev: ::dev_t) -> ::c_int {
+        ((dev & 0xff) | ((dev >> 12) & 0xfff00)) as ::c_int
+    }
+    pub fn makedev(ma: ::c_int, mi: ::c_int) -> ::dev_t {
+        let ma = ma as ::dev_t;
+        let mi = mi as ::dev_t;
+        ((ma & 0xfff) << 8) | (mi & 0xff) | ((mi & 0xfff00) << 12)
+    }
+}
+
+extern {
+    static mut __progname: *mut ::c_char;
+}
+
+extern {
+    pub fn madvise(addr: *const ::c_void, len: ::size_t, advice: ::c_int)
+                   -> ::c_int;
+    pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
+    pub fn msync(addr: *const ::c_void, len: ::size_t,
+                 flags: ::c_int) -> ::c_int;
+    pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
+                    -> ::c_int;
+    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
+                    flags: ::c_int, addr: *const ::sockaddr,
+                    addrlen: *mut ::socklen_t) -> ::ssize_t;
+    pub fn getnameinfo(sa: *const ::sockaddr,
+                       salen: ::socklen_t,
+                       host: *mut ::c_char,
+                       hostlen: ::size_t,
+                       serv: *mut ::c_char,
+                       sevlen: ::size_t,
+                       flags: ::c_int) -> ::c_int;
+    pub fn ptrace(request: ::c_int, ...) -> ::c_long;
+    pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int;
+    pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int;
+    pub fn __sched_cpualloc(count: ::size_t) -> *mut ::cpu_set_t;
+    pub fn __sched_cpufree(set: *mut ::cpu_set_t);
+    pub fn __sched_cpucount(setsize: ::size_t, set: *mut cpu_set_t) -> ::c_int;
+    pub fn sched_getcpu() -> ::c_int;
+
+    pub fn utmpname(name: *const ::c_char) -> ::c_int;
+    pub fn setutent();
+    pub fn getutent() -> *mut utmp;
+
+    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
+                           len: ::off_t) -> ::c_int;
+    pub fn signalfd(fd: ::c_int, mask: *const ::sigset_t, flags: ::c_int)
+                    -> ::c_int;
+    pub fn syscall(num: ::c_long, ...) -> ::c_long;
+    pub fn sched_getaffinity(pid: ::pid_t,
+                             cpusetsize: ::size_t,
+                             cpuset: *mut cpu_set_t) -> ::c_int;
+    pub fn sched_setaffinity(pid: ::pid_t,
+                             cpusetsize: ::size_t,
+                             cpuset: *const cpu_set_t) -> ::c_int;
+    pub fn epoll_create(size: ::c_int) -> ::c_int;
+    pub fn epoll_create1(flags: ::c_int) -> ::c_int;
+    pub fn epoll_wait(epfd: ::c_int,
+                      events: *mut ::epoll_event,
+                      maxevents: ::c_int,
+                      timeout: ::c_int) -> ::c_int;
+    pub fn epoll_ctl(epfd: ::c_int,
+                     op: ::c_int,
+                     fd: ::c_int,
+                     event: *mut ::epoll_event) -> ::c_int;
+    pub fn pthread_getschedparam(native: ::pthread_t,
+                                 policy: *mut ::c_int,
+                                 param: *mut ::sched_param) -> ::c_int;
+    pub fn unshare(flags: ::c_int) -> ::c_int;
+    pub fn umount(target: *const ::c_char) -> ::c_int;
+    pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
+    pub fn tee(fd_in: ::c_int,
+               fd_out: ::c_int,
+               len: ::size_t,
+               flags: ::c_uint) -> ::ssize_t;
+    pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
+    pub fn splice(fd_in: ::c_int,
+                  off_in: *mut ::loff_t,
+                  fd_out: ::c_int,
+                  off_out: *mut ::loff_t,
+                  len: ::size_t,
+                  flags: ::c_uint) -> ::ssize_t;
+    pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
+    pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn sem_timedwait(sem: *mut sem_t,
+                         abstime: *const ::timespec) -> ::c_int;
+    pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int;
+    pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
+    pub fn swapoff(puath: *const ::c_char) -> ::c_int;
+    pub fn vmsplice(fd: ::c_int,
+                    iov: *const ::iovec,
+                    nr_segs: ::size_t,
+                    flags: ::c_uint) -> ::ssize_t;
+    pub fn mount(src: *const ::c_char,
+                 target: *const ::c_char,
+                 fstype: *const ::c_char,
+                 flags: ::c_ulong,
+                 data: *const ::c_void) -> ::c_int;
+    pub fn personality(persona: ::c_ulong) -> ::c_int;
+    pub fn prctl(option: ::c_int, ...) -> ::c_int;
+    pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int;
+    pub fn ppoll(fds: *mut ::pollfd,
+                 nfds: nfds_t,
+                 timeout: *const ::timespec,
+                 sigmask: *const sigset_t) -> ::c_int;
+    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
+                                   abstime: *const ::timespec) -> ::c_int;
+    pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int,
+                 child_stack: *mut ::c_void,
+                 flags: ::c_int,
+                 arg: *mut ::c_void, ...) -> ::c_int;
+    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
+    pub fn clock_nanosleep(clk_id: ::clockid_t,
+                           flags: ::c_int,
+                           rqtp: *const ::timespec,
+                           rmtp:  *mut ::timespec) -> ::c_int;
+    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
+                                     guardsize: *mut ::size_t) -> ::c_int;
+    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
+    pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
+    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
+                                       pshared: *mut ::c_int) -> ::c_int;
+    pub fn sysinfo(info: *mut ::sysinfo) -> ::c_int;
+    pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int;
+    pub fn pthread_setschedparam(native: ::pthread_t,
+                                 policy: ::c_int,
+                                 param: *const ::sched_param) -> ::c_int;
+    pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int;
+    pub fn sched_setscheduler(pid: ::pid_t,
+                              policy: ::c_int,
+                              param: *const ::sched_param) -> ::c_int;
+    pub fn sendfile(out_fd: ::c_int,
+                    in_fd: ::c_int,
+                    offset: *mut off_t,
+                    count: ::size_t) -> ::ssize_t;
+    pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
+    pub fn getgrgid_r(uid: ::uid_t,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "sigaltstack$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
+    pub fn sigaltstack(ss: *const stack_t,
+                       oss: *mut stack_t) -> ::c_int;
+    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
+    pub fn getdtablesize() -> ::c_int;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
+    pub fn getgrnam_r(name: *const ::c_char,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_sigmask$UNIX2003")]
+    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
+                           oldset: *mut sigset_t) -> ::c_int;
+    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
+    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
+    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
+    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
+    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
+    pub fn getpwnam_r(name: *const ::c_char,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
+    pub fn getpwuid_r(uid: ::uid_t,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
+               link_name = "sigwait$UNIX2003")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
+    pub fn sigwait(set: *const sigset_t,
+                   sig: *mut ::c_int) -> ::c_int;
+    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
+                          parent: Option<unsafe extern fn()>,
+                          child: Option<unsafe extern fn()>) -> ::c_int;
+    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
+    pub fn getgrouplist(user: *const ::c_char,
+                        group: ::gid_t,
+                        groups: *mut ::gid_t,
+                        ngroups: *mut ::c_int) -> ::c_int;
+    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
+                                        pshared: *mut ::c_int) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "popen$UNIX2003")]
+    pub fn popen(command: *const c_char,
+                 mode: *const c_char) -> *mut ::FILE;
+    pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
+                     mode: ::c_int, flags: ::c_int) -> ::c_int;
+    pub fn pthread_create(native: *mut ::pthread_t,
+                          attr: *const ::pthread_attr_t,
+                          f: extern fn(*mut ::c_void) -> *mut ::c_void,
+                          value: *mut ::c_void) -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(target_pointer_width = "32")] {
+        mod b32;
+        pub use self::b32::*;
+    } else if #[cfg(target_pointer_width = "64")] {
+        mod b64;
+        pub use self::b64::*;
+    } else {
+        // Unknown target_pointer_width
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/emscripten.rs
@@ -0,0 +1,1667 @@
+use dox::{mem, Option};
+
+pub type c_char = i8;
+pub type wchar_t = i32;
+pub type useconds_t = u32;
+pub type dev_t = u32;
+pub type socklen_t = u32;
+pub type pthread_t = c_ulong;
+pub type mode_t = u32;
+pub type ino64_t = u32;
+pub type off64_t = i32;
+pub type blkcnt64_t = i32;
+pub type rlim64_t = u64;
+pub type shmatt_t = ::c_ulong;
+pub type mqd_t = ::c_int;
+pub type msgqnum_t = ::c_ulong;
+pub type msglen_t = ::c_ulong;
+pub type nfds_t = ::c_ulong;
+pub type nl_item = ::c_int;
+pub type idtype_t = ::c_uint;
+pub type loff_t = i32;
+
+pub type clock_t = c_long;
+pub type time_t = c_long;
+pub type suseconds_t = c_long;
+pub type ino_t = u32;
+pub type off_t = i32;
+pub type blkcnt_t = i32;
+
+pub type blksize_t = c_long;
+pub type fsblkcnt_t = u32;
+pub type fsfilcnt_t = u32;
+pub type rlim_t = ::c_ulonglong;
+pub type c_long = i32;
+pub type c_ulong = u32;
+pub type nlink_t = u32;
+
+pub enum fpos64_t {} // TODO: fill this out with a struct
+
+s! {
+    pub struct dirent {
+        pub d_ino: ::ino_t,
+        pub d_off: ::off_t,
+        pub d_reclen: ::c_ushort,
+        pub d_type: ::c_uchar,
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct dirent64 {
+        pub d_ino: ::ino64_t,
+        pub d_off: ::off64_t,
+        pub d_reclen: ::c_ushort,
+        pub d_type: ::c_uchar,
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct rlimit64 {
+        pub rlim_cur: rlim64_t,
+        pub rlim_max: rlim64_t,
+    }
+
+    pub struct glob_t {
+        pub gl_pathc: ::size_t,
+        pub gl_pathv: *mut *mut c_char,
+        pub gl_offs: ::size_t,
+        pub gl_flags: ::c_int,
+
+        __unused1: *mut ::c_void,
+        __unused2: *mut ::c_void,
+        __unused3: *mut ::c_void,
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+    }
+
+    pub struct ifaddrs {
+        pub ifa_next: *mut ifaddrs,
+        pub ifa_name: *mut c_char,
+        pub ifa_flags: ::c_uint,
+        pub ifa_addr: *mut ::sockaddr,
+        pub ifa_netmask: *mut ::sockaddr,
+        pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union
+        pub ifa_data: *mut ::c_void
+    }
+
+    pub struct pthread_mutex_t {
+        __align: [::c_long; 0],
+        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
+    }
+
+    pub struct pthread_rwlock_t {
+        __align: [::c_long; 0],
+        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
+    }
+
+    pub struct pthread_mutexattr_t {
+        __align: [::c_int; 0],
+        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
+    }
+
+    pub struct pthread_rwlockattr_t {
+        __align: [::c_int; 0],
+        size: [u8; __SIZEOF_PTHREAD_RWLOCKATTR_T],
+    }
+
+    pub struct pthread_cond_t {
+        __align: [*const ::c_void; 0],
+        size: [u8; __SIZEOF_PTHREAD_COND_T],
+    }
+
+    pub struct pthread_condattr_t {
+        __align: [::c_int; 0],
+        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
+    }
+
+    pub struct passwd {
+        pub pw_name: *mut ::c_char,
+        pub pw_passwd: *mut ::c_char,
+        pub pw_uid: ::uid_t,
+        pub pw_gid: ::gid_t,
+        pub pw_gecos: *mut ::c_char,
+        pub pw_dir: *mut ::c_char,
+        pub pw_shell: *mut ::c_char,
+    }
+
+    pub struct spwd {
+        pub sp_namp: *mut ::c_char,
+        pub sp_pwdp: *mut ::c_char,
+        pub sp_lstchg: ::c_long,
+        pub sp_min: ::c_long,
+        pub sp_max: ::c_long,
+        pub sp_warn: ::c_long,
+        pub sp_inact: ::c_long,
+        pub sp_expire: ::c_long,
+        pub sp_flag: ::c_ulong,
+    }
+
+    pub struct statvfs {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_favail: ::fsfilcnt_t,
+        pub f_fsid: ::c_ulong,
+        __f_unused: ::c_int,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct dqblk {
+        pub dqb_bhardlimit: ::uint64_t,
+        pub dqb_bsoftlimit: ::uint64_t,
+        pub dqb_curspace: ::uint64_t,
+        pub dqb_ihardlimit: ::uint64_t,
+        pub dqb_isoftlimit: ::uint64_t,
+        pub dqb_curinodes: ::uint64_t,
+        pub dqb_btime: ::uint64_t,
+        pub dqb_itime: ::uint64_t,
+        pub dqb_valid: ::uint32_t,
+    }
+
+    pub struct signalfd_siginfo {
+        pub ssi_signo: ::uint32_t,
+        pub ssi_errno: ::int32_t,
+        pub ssi_code: ::int32_t,
+        pub ssi_pid: ::uint32_t,
+        pub ssi_uid: ::uint32_t,
+        pub ssi_fd: ::int32_t,
+        pub ssi_tid: ::uint32_t,
+        pub ssi_band: ::uint32_t,
+        pub ssi_overrun: ::uint32_t,
+        pub ssi_trapno: ::uint32_t,
+        pub ssi_status: ::int32_t,
+        pub ssi_int: ::int32_t,
+        pub ssi_ptr: ::uint64_t,
+        pub ssi_utime: ::uint64_t,
+        pub ssi_stime: ::uint64_t,
+        pub ssi_addr: ::uint64_t,
+        _pad: [::uint8_t; 48],
+    }
+
+    pub struct fsid_t {
+        __val: [::c_int; 2],
+    }
+
+    pub struct mq_attr {
+        pub mq_flags: ::c_long,
+        pub mq_maxmsg: ::c_long,
+        pub mq_msgsize: ::c_long,
+        pub mq_curmsgs: ::c_long,
+        pad: [::c_long; 4]
+    }
+
+    pub struct cpu_set_t {
+        bits: [u32; 32],
+    }
+
+    pub struct if_nameindex {
+        pub if_index: ::c_uint,
+        pub if_name: *mut ::c_char,
+    }
+
+    // System V IPC
+    pub struct msginfo {
+        pub msgpool: ::c_int,
+        pub msgmap: ::c_int,
+        pub msgmax: ::c_int,
+        pub msgmnb: ::c_int,
+        pub msgmni: ::c_int,
+        pub msgssz: ::c_int,
+        pub msgtql: ::c_int,
+        pub msgseg: ::c_ushort,
+    }
+
+    pub struct mmsghdr {
+        pub msg_hdr: ::msghdr,
+        pub msg_len: ::c_uint,
+    }
+
+    pub struct sembuf {
+        pub sem_num: ::c_ushort,
+        pub sem_op: ::c_short,
+        pub sem_flg: ::c_short,
+    }
+
+    pub struct aiocb {
+        pub aio_fildes: ::c_int,
+        pub aio_lio_opcode: ::c_int,
+        pub aio_reqprio: ::c_int,
+        pub aio_buf: *mut ::c_void,
+        pub aio_nbytes: ::size_t,
+        pub aio_sigevent: ::sigevent,
+        __td: *mut ::c_void,
+        __lock: [::c_int; 2],
+        __err: ::c_int,
+        __ret: ::ssize_t,
+        pub aio_offset: off_t,
+        __next: *mut ::c_void,
+        __prev: *mut ::c_void,
+        __dummy4: [::c_char; 24],
+    }
+
+    pub struct sigaction {
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: ::sigset_t,
+        pub sa_flags: ::c_int,
+        pub sa_restorer: ::dox::Option<extern fn()>,
+    }
+
+    pub struct ipc_perm {
+        pub __ipc_perm_key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::mode_t,
+        pub __seq: ::c_int,
+        __unused1: ::c_long,
+        __unused2: ::c_long
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_line: ::cc_t,
+        pub c_cc: [::cc_t; ::NCCS],
+        pub __c_ispeed: ::speed_t,
+        pub __c_ospeed: ::speed_t,
+    }
+
+    pub struct flock {
+        pub l_type: ::c_short,
+        pub l_whence: ::c_short,
+        pub l_start: ::off_t,
+        pub l_len: ::off_t,
+        pub l_pid: ::pid_t,
+    }
+
+    pub struct sysinfo {
+        pub uptime: ::c_ulong,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
+        pub procs: ::c_ushort,
+        pub pad: ::c_ushort,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
+        pub mem_unit: ::c_uint,
+        pub __reserved: [::c_char; 256],
+    }
+
+    pub struct pthread_attr_t {
+        __size: [u32; 11]
+    }
+
+    pub struct sigset_t {
+        __val: [::c_ulong; 32],
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::c_int,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::socklen_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::socklen_t,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct sem_t {
+        __val: [::c_int; 4],
+    }
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        __st_dev_padding: ::c_int,
+        __st_ino_truncated: ::c_long,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __st_rdev_padding: ::c_int,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_ino: ::ino_t,
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        __st_dev_padding: ::c_int,
+        __st_ino_truncated: ::c_long,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __st_rdev_padding: ::c_int,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_ino: ::ino_t,
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_flags: ::c_int,
+        pub ss_size: ::size_t
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        __unused1: ::c_int,
+        pub shm_dtime: ::time_t,
+        __unused2: ::c_int,
+        pub shm_ctime: ::time_t,
+        __unused3: ::c_int,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::c_ulong,
+        __pad1: ::c_ulong,
+        __pad2: ::c_ulong,
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        pub msg_stime: ::time_t,
+        __unused1: ::c_int,
+        pub msg_rtime: ::time_t,
+        __unused2: ::c_int,
+        pub msg_ctime: ::time_t,
+        __unused3: ::c_int,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __pad1: ::c_ulong,
+        __pad2: ::c_ulong,
+    }
+
+    pub struct statfs {
+        pub f_type: ::c_ulong,
+        pub f_bsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_flags: ::c_ulong,
+        pub f_spare: [::c_ulong; 4],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_errno: ::c_int,
+        pub si_code: ::c_int,
+        pub _pad: [::c_int; 29],
+        _align: [usize; 0],
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::c_ulong,
+        pub f_bsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_flags: ::c_ulong,
+        pub f_spare: [::c_ulong; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u32,
+        pub f_bfree: u32,
+        pub f_bavail: u32,
+        pub f_files: u32,
+        pub f_ffree: u32,
+        pub f_favail: u32,
+        pub f_fsid: ::c_ulong,
+        __f_unused: ::c_int,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+}
+
+pub const ABDAY_1: ::nl_item = 0x20000;
+pub const ABDAY_2: ::nl_item = 0x20001;
+pub const ABDAY_3: ::nl_item = 0x20002;
+pub const ABDAY_4: ::nl_item = 0x20003;
+pub const ABDAY_5: ::nl_item = 0x20004;
+pub const ABDAY_6: ::nl_item = 0x20005;
+pub const ABDAY_7: ::nl_item = 0x20006;
+
+pub const DAY_1: ::nl_item = 0x20007;
+pub const DAY_2: ::nl_item = 0x20008;
+pub const DAY_3: ::nl_item = 0x20009;
+pub const DAY_4: ::nl_item = 0x2000A;
+pub const DAY_5: ::nl_item = 0x2000B;
+pub const DAY_6: ::nl_item = 0x2000C;
+pub const DAY_7: ::nl_item = 0x2000D;
+
+pub const ABMON_1: ::nl_item = 0x2000E;
+pub const ABMON_2: ::nl_item = 0x2000F;
+pub const ABMON_3: ::nl_item = 0x20010;
+pub const ABMON_4: ::nl_item = 0x20011;
+pub const ABMON_5: ::nl_item = 0x20012;
+pub const ABMON_6: ::nl_item = 0x20013;
+pub const ABMON_7: ::nl_item = 0x20014;
+pub const ABMON_8: ::nl_item = 0x20015;
+pub const ABMON_9: ::nl_item = 0x20016;
+pub const ABMON_10: ::nl_item = 0x20017;
+pub const ABMON_11: ::nl_item = 0x20018;
+pub const ABMON_12: ::nl_item = 0x20019;
+
+pub const MON_1: ::nl_item = 0x2001A;
+pub const MON_2: ::nl_item = 0x2001B;
+pub const MON_3: ::nl_item = 0x2001C;
+pub const MON_4: ::nl_item = 0x2001D;
+pub const MON_5: ::nl_item = 0x2001E;
+pub const MON_6: ::nl_item = 0x2001F;
+pub const MON_7: ::nl_item = 0x20020;
+pub const MON_8: ::nl_item = 0x20021;
+pub const MON_9: ::nl_item = 0x20022;
+pub const MON_10: ::nl_item = 0x20023;
+pub const MON_11: ::nl_item = 0x20024;
+pub const MON_12: ::nl_item = 0x20025;
+
+pub const AM_STR: ::nl_item = 0x20026;
+pub const PM_STR: ::nl_item = 0x20027;
+
+pub const D_T_FMT: ::nl_item = 0x20028;
+pub const D_FMT: ::nl_item = 0x20029;
+pub const T_FMT: ::nl_item = 0x2002A;
+pub const T_FMT_AMPM: ::nl_item = 0x2002B;
+
+pub const ERA: ::nl_item = 0x2002C;
+pub const ERA_D_FMT: ::nl_item = 0x2002E;
+pub const ALT_DIGITS: ::nl_item = 0x2002F;
+pub const ERA_D_T_FMT: ::nl_item = 0x20030;
+pub const ERA_T_FMT: ::nl_item = 0x20031;
+
+pub const CODESET: ::nl_item = 14;
+
+pub const CRNCYSTR: ::nl_item = 0x4000F;
+
+pub const RUSAGE_THREAD: ::c_int = 1;
+pub const RUSAGE_CHILDREN: ::c_int = -1;
+
+pub const RADIXCHAR: ::nl_item = 0x10000;
+pub const THOUSEP: ::nl_item = 0x10001;
+
+pub const YESEXPR: ::nl_item = 0x50000;
+pub const NOEXPR: ::nl_item = 0x50001;
+pub const YESSTR: ::nl_item = 0x50002;
+pub const NOSTR: ::nl_item = 0x50003;
+
+pub const FILENAME_MAX: ::c_uint = 4096;
+pub const L_tmpnam: ::c_uint = 20;
+pub const _PC_LINK_MAX: ::c_int = 0;
+pub const _PC_MAX_CANON: ::c_int = 1;
+pub const _PC_MAX_INPUT: ::c_int = 2;
+pub const _PC_NAME_MAX: ::c_int = 3;
+pub const _PC_PATH_MAX: ::c_int = 4;
+pub const _PC_PIPE_BUF: ::c_int = 5;
+pub const _PC_CHOWN_RESTRICTED: ::c_int = 6;
+pub const _PC_NO_TRUNC: ::c_int = 7;
+pub const _PC_VDISABLE: ::c_int = 8;
+pub const _PC_SYNC_IO: ::c_int = 9;
+pub const _PC_ASYNC_IO: ::c_int = 10;
+pub const _PC_PRIO_IO: ::c_int = 11;
+pub const _PC_SOCK_MAXBUF: ::c_int = 12;
+pub const _PC_FILESIZEBITS: ::c_int = 13;
+pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
+pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
+pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
+pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
+pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18;
+pub const _PC_SYMLINK_MAX: ::c_int = 19;
+pub const _PC_2_SYMLINKS: ::c_int = 20;
+
+pub const _SC_ARG_MAX: ::c_int = 0;
+pub const _SC_CHILD_MAX: ::c_int = 1;
+pub const _SC_CLK_TCK: ::c_int = 2;
+pub const _SC_NGROUPS_MAX: ::c_int = 3;
+pub const _SC_OPEN_MAX: ::c_int = 4;
+pub const _SC_STREAM_MAX: ::c_int = 5;
+pub const _SC_TZNAME_MAX: ::c_int = 6;
+pub const _SC_JOB_CONTROL: ::c_int = 7;
+pub const _SC_SAVED_IDS: ::c_int = 8;
+pub const _SC_REALTIME_SIGNALS: ::c_int = 9;
+pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10;
+pub const _SC_TIMERS: ::c_int = 11;
+pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12;
+pub const _SC_PRIORITIZED_IO: ::c_int = 13;
+pub const _SC_SYNCHRONIZED_IO: ::c_int = 14;
+pub const _SC_FSYNC: ::c_int = 15;
+pub const _SC_MAPPED_FILES: ::c_int = 16;
+pub const _SC_MEMLOCK: ::c_int = 17;
+pub const _SC_MEMLOCK_RANGE: ::c_int = 18;
+pub const _SC_MEMORY_PROTECTION: ::c_int = 19;
+pub const _SC_MESSAGE_PASSING: ::c_int = 20;
+pub const _SC_SEMAPHORES: ::c_int = 21;
+pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22;
+pub const _SC_AIO_LISTIO_MAX: ::c_int = 23;
+pub const _SC_AIO_MAX: ::c_int = 24;
+pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25;
+pub const _SC_DELAYTIMER_MAX: ::c_int = 26;
+pub const _SC_MQ_OPEN_MAX: ::c_int = 27;
+pub const _SC_MQ_PRIO_MAX: ::c_int = 28;
+pub const _SC_VERSION: ::c_int = 29;
+pub const _SC_PAGESIZE: ::c_int = 30;
+pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
+pub const _SC_RTSIG_MAX: ::c_int = 31;
+pub const _SC_SEM_NSEMS_MAX: ::c_int = 32;
+pub const _SC_SEM_VALUE_MAX: ::c_int = 33;
+pub const _SC_SIGQUEUE_MAX: ::c_int = 34;
+pub const _SC_TIMER_MAX: ::c_int = 35;
+pub const _SC_BC_BASE_MAX: ::c_int = 36;
+pub const _SC_BC_DIM_MAX: ::c_int = 37;
+pub const _SC_BC_SCALE_MAX: ::c_int = 38;
+pub const _SC_BC_STRING_MAX: ::c_int = 39;
+pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40;
+pub const _SC_EXPR_NEST_MAX: ::c_int = 42;
+pub const _SC_LINE_MAX: ::c_int = 43;
+pub const _SC_RE_DUP_MAX: ::c_int = 44;
+pub const _SC_2_VERSION: ::c_int = 46;
+pub const _SC_2_C_BIND: ::c_int = 47;
+pub const _SC_2_C_DEV: ::c_int = 48;
+pub const _SC_2_FORT_DEV: ::c_int = 49;
+pub const _SC_2_FORT_RUN: ::c_int = 50;
+pub const _SC_2_SW_DEV: ::c_int = 51;
+pub const _SC_2_LOCALEDEF: ::c_int = 52;
+pub const _SC_UIO_MAXIOV: ::c_int = 60;
+pub const _SC_IOV_MAX: ::c_int = 60;
+pub const _SC_THREADS: ::c_int = 67;
+pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68;
+pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69;
+pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70;
+pub const _SC_LOGIN_NAME_MAX: ::c_int = 71;
+pub const _SC_TTY_NAME_MAX: ::c_int = 72;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73;
+pub const _SC_THREAD_KEYS_MAX: ::c_int = 74;
+pub const _SC_THREAD_STACK_MIN: ::c_int = 75;
+pub const _SC_THREAD_THREADS_MAX: ::c_int = 76;
+pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77;
+pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78;
+pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79;
+pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80;
+pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81;
+pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 82;
+pub const _SC_NPROCESSORS_CONF: ::c_int = 83;
+pub const _SC_NPROCESSORS_ONLN: ::c_int = 84;
+pub const _SC_PHYS_PAGES: ::c_int = 85;
+pub const _SC_AVPHYS_PAGES: ::c_int = 86;
+pub const _SC_ATEXIT_MAX: ::c_int = 87;
+pub const _SC_PASS_MAX: ::c_int = 88;
+pub const _SC_XOPEN_VERSION: ::c_int = 89;
+pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90;
+pub const _SC_XOPEN_UNIX: ::c_int = 91;
+pub const _SC_XOPEN_CRYPT: ::c_int = 92;
+pub const _SC_XOPEN_ENH_I18N: ::c_int = 93;
+pub const _SC_XOPEN_SHM: ::c_int = 94;
+pub const _SC_2_CHAR_TERM: ::c_int = 95;
+pub const _SC_2_UPE: ::c_int = 97;
+pub const _SC_XOPEN_XPG2: ::c_int = 98;
+pub const _SC_XOPEN_XPG3: ::c_int = 99;
+pub const _SC_XOPEN_XPG4: ::c_int = 100;
+pub const _SC_NZERO: ::c_int = 109;
+pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125;
+pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126;
+pub const _SC_XBS5_LP64_OFF64: ::c_int = 127;
+pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128;
+pub const _SC_XOPEN_LEGACY: ::c_int = 129;
+pub const _SC_XOPEN_REALTIME: ::c_int = 130;
+pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131;
+pub const _SC_ADVISORY_INFO: ::c_int = 132;
+pub const _SC_BARRIERS: ::c_int = 133;
+pub const _SC_CLOCK_SELECTION: ::c_int = 137;
+pub const _SC_CPUTIME: ::c_int = 138;
+pub const _SC_THREAD_CPUTIME: ::c_int = 139;
+pub const _SC_MONOTONIC_CLOCK: ::c_int = 149;
+pub const _SC_READER_WRITER_LOCKS: ::c_int = 153;
+pub const _SC_SPIN_LOCKS: ::c_int = 154;
+pub const _SC_REGEXP: ::c_int = 155;
+pub const _SC_SHELL: ::c_int = 157;
+pub const _SC_SPAWN: ::c_int = 159;
+pub const _SC_SPORADIC_SERVER: ::c_int = 160;
+pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 161;
+pub const _SC_TIMEOUTS: ::c_int = 164;
+pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 165;
+pub const _SC_2_PBS: ::c_int = 168;
+pub const _SC_2_PBS_ACCOUNTING: ::c_int = 169;
+pub const _SC_2_PBS_LOCATE: ::c_int = 170;
+pub const _SC_2_PBS_MESSAGE: ::c_int = 171;
+pub const _SC_2_PBS_TRACK: ::c_int = 172;
+pub const _SC_SYMLOOP_MAX: ::c_int = 173;
+pub const _SC_STREAMS: ::c_int = 174;
+pub const _SC_2_PBS_CHECKPOINT: ::c_int = 175;
+pub const _SC_V6_ILP32_OFF32: ::c_int = 176;
+pub const _SC_V6_ILP32_OFFBIG: ::c_int = 177;
+pub const _SC_V6_LP64_OFF64: ::c_int = 178;
+pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 179;
+pub const _SC_HOST_NAME_MAX: ::c_int = 180;
+pub const _SC_TRACE: ::c_int = 181;
+pub const _SC_TRACE_EVENT_FILTER: ::c_int = 182;
+pub const _SC_TRACE_INHERIT: ::c_int = 183;
+pub const _SC_TRACE_LOG: ::c_int = 184;
+pub const _SC_IPV6: ::c_int = 235;
+pub const _SC_RAW_SOCKETS: ::c_int = 236;
+pub const _SC_V7_ILP32_OFF32: ::c_int = 237;
+pub const _SC_V7_ILP32_OFFBIG: ::c_int = 238;
+pub const _SC_V7_LP64_OFF64: ::c_int = 239;
+pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 240;
+pub const _SC_SS_REPL_MAX: ::c_int = 241;
+pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 242;
+pub const _SC_TRACE_NAME_MAX: ::c_int = 243;
+pub const _SC_TRACE_SYS_MAX: ::c_int = 244;
+pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 245;
+pub const _SC_XOPEN_STREAMS: ::c_int = 246;
+pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 247;
+pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 248;
+
+pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY;
+pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY;
+
+pub const GLOB_ERR: ::c_int = 1 << 0;
+pub const GLOB_MARK: ::c_int = 1 << 1;
+pub const GLOB_NOSORT: ::c_int = 1 << 2;
+pub const GLOB_DOOFFS: ::c_int = 1 << 3;
+pub const GLOB_NOCHECK: ::c_int = 1 << 4;
+pub const GLOB_APPEND: ::c_int = 1 << 5;
+pub const GLOB_NOESCAPE: ::c_int = 1 << 6;
+
+pub const GLOB_NOSPACE: ::c_int = 1;
+pub const GLOB_ABORTED: ::c_int = 2;
+pub const GLOB_NOMATCH: ::c_int = 3;
+
+pub const POSIX_MADV_NORMAL: ::c_int = 0;
+pub const POSIX_MADV_RANDOM: ::c_int = 1;
+pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
+pub const POSIX_MADV_WILLNEED: ::c_int = 3;
+
+pub const S_IEXEC: mode_t = 64;
+pub const S_IWRITE: mode_t = 128;
+pub const S_IREAD: mode_t = 256;
+
+pub const F_LOCK: ::c_int = 1;
+pub const F_TEST: ::c_int = 3;
+pub const F_TLOCK: ::c_int = 2;
+pub const F_ULOCK: ::c_int = 0;
+
+pub const ST_RDONLY: ::c_ulong = 1;
+pub const ST_NOSUID: ::c_ulong = 2;
+pub const ST_NODEV: ::c_ulong = 4;
+pub const ST_NOEXEC: ::c_ulong = 8;
+pub const ST_SYNCHRONOUS: ::c_ulong = 16;
+pub const ST_MANDLOCK: ::c_ulong = 64;
+pub const ST_WRITE: ::c_ulong = 128;
+pub const ST_APPEND: ::c_ulong = 256;
+pub const ST_IMMUTABLE: ::c_ulong = 512;
+pub const ST_NOATIME: ::c_ulong = 1024;
+pub const ST_NODIRATIME: ::c_ulong = 2048;
+
+pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void;
+pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
+pub const RTLD_NODELETE: ::c_int = 0x1000;
+pub const RTLD_NOW: ::c_int = 0x2;
+
+pub const TCP_MD5SIG: ::c_int = 14;
+
+pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
+    __align: [],
+    size: [0; __SIZEOF_PTHREAD_MUTEX_T],
+};
+pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
+    __align: [],
+    size: [0; __SIZEOF_PTHREAD_COND_T],
+};
+pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
+    __align: [],
+    size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
+};
+pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
+pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
+pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
+pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
+pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
+pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
+pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
+
+pub const SCHED_OTHER: ::c_int = 0;
+pub const SCHED_FIFO: ::c_int = 1;
+pub const SCHED_RR: ::c_int = 2;
+pub const SCHED_BATCH: ::c_int = 3;
+pub const SCHED_IDLE: ::c_int = 5;
+
+pub const AF_IB: ::c_int = 27;
+pub const AF_MPLS: ::c_int = 28;
+pub const AF_NFC: ::c_int = 39;
+pub const AF_VSOCK: ::c_int = 40;
+#[doc(hidden)]
+pub const AF_MAX: ::c_int = 42;
+pub const PF_IB: ::c_int = AF_IB;
+pub const PF_MPLS: ::c_int = AF_MPLS;
+pub const PF_NFC: ::c_int = AF_NFC;
+pub const PF_VSOCK: ::c_int = AF_VSOCK;
+#[doc(hidden)]
+pub const PF_MAX: ::c_int = AF_MAX;
+
+// System V IPC
+pub const IPC_PRIVATE: ::key_t = 0;
+
+pub const IPC_CREAT: ::c_int = 0o1000;
+pub const IPC_EXCL: ::c_int = 0o2000;
+pub const IPC_NOWAIT: ::c_int = 0o4000;
+
+pub const IPC_RMID: ::c_int = 0;
+pub const IPC_SET: ::c_int = 1;
+pub const IPC_STAT: ::c_int = 2;
+pub const IPC_INFO: ::c_int = 3;
+pub const MSG_STAT: ::c_int = 11;
+pub const MSG_INFO: ::c_int = 12;
+
+pub const MSG_NOERROR: ::c_int = 0o10000;
+pub const MSG_EXCEPT: ::c_int = 0o20000;
+pub const MSG_COPY: ::c_int = 0o40000;
+
+pub const SHM_R: ::c_int = 0o400;
+pub const SHM_W: ::c_int = 0o200;
+
+pub const SHM_RDONLY: ::c_int = 0o10000;
+pub const SHM_RND: ::c_int = 0o20000;
+pub const SHM_REMAP: ::c_int = 0o40000;
+pub const SHM_EXEC: ::c_int = 0o100000;
+
+pub const SHM_LOCK: ::c_int = 11;
+pub const SHM_UNLOCK: ::c_int = 12;
+
+pub const SHM_HUGETLB: ::c_int = 0o4000;
+pub const SHM_NORESERVE: ::c_int = 0o10000;
+
+pub const EPOLLRDHUP: ::c_int = 0x2000;
+pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000;
+pub const EPOLLONESHOT: ::c_int = 0x40000000;
+
+pub const QFMT_VFS_OLD: ::c_int = 1;
+pub const QFMT_VFS_V0: ::c_int = 2;
+
+pub const EFD_SEMAPHORE: ::c_int = 0x1;
+
+pub const LOG_NFACILITIES: ::c_int = 24;
+
+pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
+
+pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32;
+pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32;
+pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32;
+pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32;
+pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32;
+pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2u32 as i32;
+pub const RB_KEXEC: ::c_int = 0x45584543u32 as i32;
+
+pub const AI_PASSIVE: ::c_int = 0x0001;
+pub const AI_CANONNAME: ::c_int = 0x0002;
+pub const AI_NUMERICHOST: ::c_int = 0x0004;
+pub const AI_V4MAPPED: ::c_int = 0x0008;
+pub const AI_ALL: ::c_int = 0x0010;
+pub const AI_ADDRCONFIG: ::c_int = 0x0020;
+
+pub const AI_NUMERICSERV: ::c_int = 0x0400;
+
+pub const EAI_BADFLAGS: ::c_int = -1;
+pub const EAI_NONAME: ::c_int = -2;
+pub const EAI_AGAIN: ::c_int = -3;
+pub const EAI_FAIL: ::c_int = -4;
+pub const EAI_FAMILY: ::c_int = -6;
+pub const EAI_SOCKTYPE: ::c_int = -7;
+pub const EAI_SERVICE: ::c_int = -8;
+pub const EAI_MEMORY: ::c_int = -10;
+pub const EAI_OVERFLOW: ::c_int = -12;
+
+pub const NI_NUMERICHOST: ::c_int = 1;
+pub const NI_NUMERICSERV: ::c_int = 2;
+pub const NI_NOFQDN: ::c_int = 4;
+pub const NI_NAMEREQD: ::c_int = 8;
+pub const NI_DGRAM: ::c_int = 16;
+
+pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::c_uint = 1;
+pub const SYNC_FILE_RANGE_WRITE: ::c_uint = 2;
+pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4;
+
+pub const EAI_SYSTEM: ::c_int = -11;
+
+pub const AIO_CANCELED: ::c_int = 0;
+pub const AIO_NOTCANCELED: ::c_int = 1;
+pub const AIO_ALLDONE: ::c_int = 2;
+pub const LIO_READ: ::c_int = 0;
+pub const LIO_WRITE: ::c_int = 1;
+pub const LIO_NOP: ::c_int = 2;
+pub const LIO_WAIT: ::c_int = 0;
+pub const LIO_NOWAIT: ::c_int = 1;
+
+pub const MREMAP_MAYMOVE: ::c_int = 1;
+pub const MREMAP_FIXED: ::c_int = 2;
+
+pub const PR_SET_PDEATHSIG: ::c_int = 1;
+pub const PR_GET_PDEATHSIG: ::c_int = 2;
+
+pub const PR_GET_DUMPABLE: ::c_int = 3;
+pub const PR_SET_DUMPABLE: ::c_int = 4;
+
+pub const PR_GET_UNALIGN: ::c_int = 5;
+pub const PR_SET_UNALIGN: ::c_int = 6;
+pub const PR_UNALIGN_NOPRINT: ::c_int = 1;
+pub const PR_UNALIGN_SIGBUS: ::c_int = 2;
+
+pub const PR_GET_KEEPCAPS: ::c_int = 7;
+pub const PR_SET_KEEPCAPS: ::c_int = 8;
+
+pub const PR_GET_FPEMU: ::c_int = 9;
+pub const PR_SET_FPEMU: ::c_int = 10;
+pub const PR_FPEMU_NOPRINT: ::c_int = 1;
+pub const PR_FPEMU_SIGFPE: ::c_int = 2;
+
+pub const PR_GET_FPEXC: ::c_int = 11;
+pub const PR_SET_FPEXC: ::c_int = 12;
+pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80;
+pub const PR_FP_EXC_DIV: ::c_int = 0x010000;
+pub const PR_FP_EXC_OVF: ::c_int = 0x020000;
+pub const PR_FP_EXC_UND: ::c_int = 0x040000;
+pub const PR_FP_EXC_RES: ::c_int = 0x080000;
+pub const PR_FP_EXC_INV: ::c_int = 0x100000;
+pub const PR_FP_EXC_DISABLED: ::c_int = 0;
+pub const PR_FP_EXC_NONRECOV: ::c_int = 1;
+pub const PR_FP_EXC_ASYNC: ::c_int = 2;
+pub const PR_FP_EXC_PRECISE: ::c_int = 3;
+
+pub const PR_GET_TIMING: ::c_int = 13;
+pub const PR_SET_TIMING: ::c_int = 14;
+pub const PR_TIMING_STATISTICAL: ::c_int = 0;
+pub const PR_TIMING_TIMESTAMP: ::c_int = 1;
+
+pub const PR_SET_NAME: ::c_int = 15;
+pub const PR_GET_NAME: ::c_int = 16;
+
+pub const PR_GET_ENDIAN: ::c_int = 19;
+pub const PR_SET_ENDIAN: ::c_int = 20;
+pub const PR_ENDIAN_BIG: ::c_int = 0;
+pub const PR_ENDIAN_LITTLE: ::c_int = 1;
+pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2;
+
+pub const PR_GET_SECCOMP: ::c_int = 21;
+pub const PR_SET_SECCOMP: ::c_int = 22;
+
+pub const PR_CAPBSET_READ: ::c_int = 23;
+pub const PR_CAPBSET_DROP: ::c_int = 24;
+
+pub const PR_GET_TSC: ::c_int = 25;
+pub const PR_SET_TSC: ::c_int = 26;
+pub const PR_TSC_ENABLE: ::c_int = 1;
+pub const PR_TSC_SIGSEGV: ::c_int = 2;
+
+pub const PR_GET_SECUREBITS: ::c_int = 27;
+pub const PR_SET_SECUREBITS: ::c_int = 28;
+
+pub const PR_SET_TIMERSLACK: ::c_int = 29;
+pub const PR_GET_TIMERSLACK: ::c_int = 30;
+
+pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31;
+pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32;
+
+pub const PR_MCE_KILL: ::c_int = 33;
+pub const PR_MCE_KILL_CLEAR: ::c_int = 0;
+pub const PR_MCE_KILL_SET: ::c_int = 1;
+
+pub const PR_MCE_KILL_LATE: ::c_int = 0;
+pub const PR_MCE_KILL_EARLY: ::c_int = 1;
+pub const PR_MCE_KILL_DEFAULT: ::c_int = 2;
+
+pub const PR_MCE_KILL_GET: ::c_int = 34;
+
+pub const PR_SET_MM: ::c_int = 35;
+pub const PR_SET_MM_START_CODE: ::c_int = 1;
+pub const PR_SET_MM_END_CODE: ::c_int = 2;
+pub const PR_SET_MM_START_DATA: ::c_int = 3;
+pub const PR_SET_MM_END_DATA: ::c_int = 4;
+pub const PR_SET_MM_START_STACK: ::c_int = 5;
+pub const PR_SET_MM_START_BRK: ::c_int = 6;
+pub const PR_SET_MM_BRK: ::c_int = 7;
+pub const PR_SET_MM_ARG_START: ::c_int = 8;
+pub const PR_SET_MM_ARG_END: ::c_int = 9;
+pub const PR_SET_MM_ENV_START: ::c_int = 10;
+pub const PR_SET_MM_ENV_END: ::c_int = 11;
+pub const PR_SET_MM_AUXV: ::c_int = 12;
+pub const PR_SET_MM_EXE_FILE: ::c_int = 13;
+pub const PR_SET_MM_MAP: ::c_int = 14;
+pub const PR_SET_MM_MAP_SIZE: ::c_int = 15;
+
+pub const PR_SET_PTRACER: ::c_int = 0x59616d61;
+
+pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36;
+pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37;
+
+pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38;
+pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39;
+
+pub const PR_GET_TID_ADDRESS: ::c_int = 40;
+
+pub const PR_SET_THP_DISABLE: ::c_int = 41;
+pub const PR_GET_THP_DISABLE: ::c_int = 42;
+
+pub const PR_MPX_ENABLE_MANAGEMENT: ::c_int = 43;
+pub const PR_MPX_DISABLE_MANAGEMENT: ::c_int = 44;
+
+pub const PR_SET_FP_MODE: ::c_int = 45;
+pub const PR_GET_FP_MODE: ::c_int = 46;
+pub const PR_FP_MODE_FR: ::c_int = 1 << 0;
+pub const PR_FP_MODE_FRE: ::c_int = 1 << 1;
+
+pub const PR_CAP_AMBIENT: ::c_int = 47;
+pub const PR_CAP_AMBIENT_IS_SET: ::c_int = 1;
+pub const PR_CAP_AMBIENT_RAISE: ::c_int = 2;
+pub const PR_CAP_AMBIENT_LOWER: ::c_int = 3;
+pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4;
+
+pub const ITIMER_REAL: ::c_int = 0;
+pub const ITIMER_VIRTUAL: ::c_int = 1;
+pub const ITIMER_PROF: ::c_int = 2;
+
+pub const XATTR_CREATE: ::c_int = 0x1;
+pub const XATTR_REPLACE: ::c_int = 0x2;
+
+pub const _POSIX_VDISABLE: ::cc_t = 0;
+
+pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
+pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
+pub const FALLOC_FL_COLLAPSE_RANGE: ::c_int = 0x08;
+pub const FALLOC_FL_ZERO_RANGE: ::c_int = 0x10;
+pub const FALLOC_FL_INSERT_RANGE: ::c_int = 0x20;
+pub const FALLOC_FL_UNSHARE_RANGE: ::c_int = 0x40;
+
+// On Linux, libc doesn't define this constant, libattr does instead.
+// We still define it for Linux as it's defined by libc on other platforms,
+// and it's mentioned in the man pages for getxattr and setxattr.
+pub const SFD_CLOEXEC: ::c_int = 0x080000;
+
+pub const NCCS: usize = 32;
+
+pub const O_TRUNC: ::c_int = 512;
+pub const O_NOATIME: ::c_int = 0o1000000;
+pub const O_CLOEXEC: ::c_int = 0x80000;
+
+pub const EBFONT: ::c_int = 59;
+pub const ENOSTR: ::c_int = 60;
+pub const ENODATA: ::c_int = 61;
+pub const ETIME: ::c_int = 62;
+pub const ENOSR: ::c_int = 63;
+pub const ENONET: ::c_int = 64;
+pub const ENOPKG: ::c_int = 65;
+pub const EREMOTE: ::c_int = 66;
+pub const ENOLINK: ::c_int = 67;
+pub const EADV: ::c_int = 68;
+pub const ESRMNT: ::c_int = 69;
+pub const ECOMM: ::c_int = 70;
+pub const EPROTO: ::c_int = 71;
+pub const EDOTDOT: ::c_int = 73;
+
+pub const SA_NODEFER: ::c_int = 0x40000000;
+pub const SA_RESETHAND: ::c_int = 0x80000000;
+pub const SA_RESTART: ::c_int = 0x10000000;
+pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
+
+pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
+
+pub const EFD_CLOEXEC: ::c_int = 0x80000;
+
+pub const BUFSIZ: ::c_uint = 1024;
+pub const TMP_MAX: ::c_uint = 10000;
+pub const FOPEN_MAX: ::c_uint = 1000;
+pub const O_PATH: ::c_int = 0o10000000;
+pub const O_EXEC: ::c_int = 0o10000000;
+pub const O_SEARCH: ::c_int = 0o10000000;
+pub const O_ACCMODE: ::c_int = 0o10000003;
+pub const O_NDELAY: ::c_int = O_NONBLOCK;
+pub const NI_MAXHOST: ::socklen_t = 255;
+pub const PTHREAD_STACK_MIN: ::size_t = 2048;
+pub const POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
+
+pub const POSIX_MADV_DONTNEED: ::c_int = 0;
+
+pub const RLIM_INFINITY: ::rlim_t = !0;
+pub const RLIMIT_RTTIME: ::c_int = 15;
+pub const RLIMIT_NLIMITS: ::c_int = 16;
+
+pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
+
+pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
+pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
+pub const TCP_THIN_DUPACK: ::c_int = 17;
+pub const TCP_USER_TIMEOUT: ::c_int = 18;
+pub const TCP_REPAIR: ::c_int = 19;
+pub const TCP_REPAIR_QUEUE: ::c_int = 20;
+pub const TCP_QUEUE_SEQ: ::c_int = 21;
+pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
+pub const TCP_FASTOPEN: ::c_int = 23;
+pub const TCP_TIMESTAMP: ::c_int = 24;
+
+pub const SIGUNUSED: ::c_int = ::SIGSYS;
+
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
+
+pub const CPU_SETSIZE: ::c_int = 128;
+
+pub const QFMT_VFS_V1: ::c_int = 4;
+
+pub const PTRACE_TRACEME: ::c_int = 0;
+pub const PTRACE_PEEKTEXT: ::c_int = 1;
+pub const PTRACE_PEEKDATA: ::c_int = 2;
+pub const PTRACE_PEEKUSER: ::c_int = 3;
+pub const PTRACE_POKETEXT: ::c_int = 4;
+pub const PTRACE_POKEDATA: ::c_int = 5;
+pub const PTRACE_POKEUSER: ::c_int = 6;
+pub const PTRACE_CONT: ::c_int = 7;
+pub const PTRACE_KILL: ::c_int = 8;
+pub const PTRACE_SINGLESTEP: ::c_int = 9;
+pub const PTRACE_ATTACH: ::c_int = 16;
+pub const PTRACE_DETACH: ::c_int = 17;
+pub const PTRACE_SYSCALL: ::c_int = 24;
+pub const PTRACE_SETOPTIONS: ::c_int = 0x4200;
+pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201;
+pub const PTRACE_GETSIGINFO: ::c_int = 0x4202;
+pub const PTRACE_SETSIGINFO: ::c_int = 0x4203;
+pub const PTRACE_GETREGSET: ::c_int = 0x4204;
+pub const PTRACE_SETREGSET: ::c_int = 0x4205;
+pub const PTRACE_SEIZE: ::c_int = 0x4206;
+pub const PTRACE_INTERRUPT: ::c_int = 0x4207;
+pub const PTRACE_LISTEN: ::c_int = 0x4208;
+pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209;
+
+pub const EPOLLWAKEUP: ::c_int = 0x20000000;
+
+pub const PTRACE_GETFPREGS: ::c_uint = 14;
+pub const PTRACE_SETFPREGS: ::c_uint = 15;
+pub const PTRACE_GETFPXREGS: ::c_uint = 18;
+pub const PTRACE_SETFPXREGS: ::c_uint = 19;
+pub const PTRACE_GETREGS: ::c_uint = 12;
+pub const PTRACE_SETREGS: ::c_uint = 13;
+
+pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
+
+pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
+
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
+
+pub const TIOCINQ: ::c_int = ::FIONREAD;
+
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
+
+// TODO(#247) Temporarily musl-specific (available since musl 0.9.12 / Linux
+// kernel 3.10).  See also notbsd/mod.rs
+pub const CLOCK_SGI_CYCLE: ::clockid_t = 10;
+pub const CLOCK_TAI: ::clockid_t = 11;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
+pub const CBAUD: ::tcflag_t = 0o0010017;
+pub const TAB1: ::c_int = 0x00000800;
+pub const TAB2: ::c_int = 0x00001000;
+pub const TAB3: ::c_int = 0x00001800;
+pub const CR1: ::c_int  = 0x00000200;
+pub const CR2: ::c_int  = 0x00000400;
+pub const CR3: ::c_int  = 0x00000600;
+pub const FF1: ::c_int  = 0x00008000;
+pub const BS1: ::c_int  = 0x00002000;
+pub const VT1: ::c_int  = 0x00004000;
+pub const VWERASE: usize = 14;
+pub const VREPRINT: usize = 12;
+pub const VSUSP: usize = 10;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VDISCARD: usize = 13;
+pub const VTIME: usize = 5;
+pub const IXON: ::tcflag_t = 0x00000400;
+pub const IXOFF: ::tcflag_t = 0x00001000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x00000030;
+pub const CS6: ::tcflag_t = 0x00000010;
+pub const CS7: ::tcflag_t = 0x00000020;
+pub const CS8: ::tcflag_t = 0x00000030;
+pub const CSTOPB: ::tcflag_t = 0x00000040;
+pub const CREAD: ::tcflag_t = 0x00000080;
+pub const PARENB: ::tcflag_t = 0x00000100;
+pub const PARODD: ::tcflag_t = 0x00000200;
+pub const HUPCL: ::tcflag_t = 0x00000400;
+pub const CLOCAL: ::tcflag_t = 0x00000800;
+pub const ECHOKE: ::tcflag_t = 0x00000800;
+pub const ECHOE: ::tcflag_t = 0x00000010;
+pub const ECHOK: ::tcflag_t = 0x00000020;
+pub const ECHONL: ::tcflag_t = 0x00000040;
+pub const ECHOPRT: ::tcflag_t = 0x00000400;
+pub const ECHOCTL: ::tcflag_t = 0x00000200;
+pub const ISIG: ::tcflag_t = 0x00000001;
+pub const ICANON: ::tcflag_t = 0x00000002;
+pub const PENDIN: ::tcflag_t = 0x00004000;
+pub const NOFLSH: ::tcflag_t = 0x00000080;
+pub const CBAUDEX: ::tcflag_t = 0o010000;
+pub const VSWTC: usize = 7;
+pub const OLCUC:  ::tcflag_t = 0o000002;
+pub const NLDLY:  ::tcflag_t = 0o000400;
+pub const CRDLY:  ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const BSDLY:  ::tcflag_t = 0o020000;
+pub const FFDLY:  ::tcflag_t = 0o100000;
+pub const VTDLY:  ::tcflag_t = 0o040000;
+pub const XTABS:  ::tcflag_t = 0o014000;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+
+pub const SO_BINDTODEVICE: ::c_int = 25;
+pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SO_MARK: ::c_int = 36;
+pub const SO_RXQ_OVFL: ::c_int = 40;
+pub const SO_PEEK_OFF: ::c_int = 42;
+pub const SO_BUSY_POLL: ::c_int = 46;
+
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 28;
+
+pub const O_DIRECT: ::c_int = 0x4000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+pub const O_ASYNC: ::c_int = 0x2000;
+
+pub const FIOCLEX: ::c_int = 0x5451;
+pub const FIONBIO: ::c_int = 0x5421;
+
+pub const RLIMIT_RSS: ::c_int = 5;
+pub const RLIMIT_NOFILE: ::c_int = 7;
+pub const RLIMIT_AS: ::c_int = 9;
+pub const RLIMIT_NPROC: ::c_int = 6;
+pub const RLIMIT_MEMLOCK: ::c_int = 8;
+
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 1052672;
+pub const O_RSYNC: ::c_int = 1052672;
+pub const O_DSYNC: ::c_int = 4096;
+
+pub const SOCK_NONBLOCK: ::c_int = 2048;
+
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+pub const MAP_DENYWRITE: ::c_int = 0x0800;
+pub const MAP_EXECUTABLE: ::c_int = 0x01000;
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_POPULATE: ::c_int = 0x08000;
+pub const MAP_NONBLOCK: ::c_int = 0x010000;
+pub const MAP_STACK: ::c_int = 0x020000;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOCK_SEQPACKET: ::c_int = 5;
+
+pub const SOL_SOCKET: ::c_int = 1;
+
+pub const EDEADLK: ::c_int = 35;
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+pub const EDEADLOCK: ::c_int = EDEADLK;
+pub const EMULTIHOP: ::c_int = 72;
+pub const EBADMSG: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ENETDOWN: ::c_int = 100;
+pub const ENETUNREACH: ::c_int = 101;
+pub const ENETRESET: ::c_int = 102;
+pub const ECONNABORTED: ::c_int = 103;
+pub const ECONNRESET: ::c_int = 104;
+pub const ENOBUFS: ::c_int = 105;
+pub const EISCONN: ::c_int = 106;
+pub const ENOTCONN: ::c_int = 107;
+pub const ESHUTDOWN: ::c_int = 108;
+pub const ETOOMANYREFS: ::c_int = 109;
+pub const ETIMEDOUT: ::c_int = 110;
+pub const ECONNREFUSED: ::c_int = 111;
+pub const EHOSTDOWN: ::c_int = 112;
+pub const EHOSTUNREACH: ::c_int = 113;
+pub const EALREADY: ::c_int = 114;
+pub const EINPROGRESS: ::c_int = 115;
+pub const ESTALE: ::c_int = 116;
+pub const EUCLEAN: ::c_int = 117;
+pub const ENOTNAM: ::c_int = 118;
+pub const ENAVAIL: ::c_int = 119;
+pub const EISNAM: ::c_int = 120;
+pub const EREMOTEIO: ::c_int = 121;
+pub const EDQUOT: ::c_int = 122;
+pub const ENOMEDIUM: ::c_int = 123;
+pub const EMEDIUMTYPE: ::c_int = 124;
+pub const ECANCELED: ::c_int = 125;
+pub const ENOKEY: ::c_int = 126;
+pub const EKEYEXPIRED: ::c_int = 127;
+pub const EKEYREVOKED: ::c_int = 128;
+pub const EKEYREJECTED: ::c_int = 129;
+pub const EOWNERDEAD: ::c_int = 130;
+pub const ENOTRECOVERABLE: ::c_int = 131;
+pub const ERFKILL: ::c_int = 132;
+pub const EHWPOISON: ::c_int = 133;
+
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_RCVLOWAT: ::c_int = 18;
+pub const SO_SNDLOWAT: ::c_int = 19;
+pub const SO_RCVTIMEO: ::c_int = 20;
+pub const SO_SNDTIMEO: ::c_int = 21;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
+
+pub const EXTPROC: ::tcflag_t = 0x00010000;
+
+pub const MAP_HUGETLB: ::c_int = 0x040000;
+
+pub const F_GETLK: ::c_int = 12;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETLK: ::c_int = 13;
+pub const F_SETLKW: ::c_int = 14;
+pub const F_SETOWN: ::c_int = 8;
+
+pub const VEOF: usize = 4;
+pub const VEOL: usize = 11;
+pub const VEOL2: usize = 16;
+pub const VMIN: usize = 6;
+pub const IEXTEN: ::tcflag_t = 0x00008000;
+pub const TOSTOP: ::tcflag_t = 0x00000100;
+pub const FLUSHO: ::tcflag_t = 0x00001000;
+
+pub const TCGETS: ::c_int = 0x5401;
+pub const TCSETS: ::c_int = 0x5402;
+pub const TCSETSW: ::c_int = 0x5403;
+pub const TCSETSF: ::c_int = 0x5404;
+pub const TCGETA: ::c_int = 0x5405;
+pub const TCSETA: ::c_int = 0x5406;
+pub const TCSETAW: ::c_int = 0x5407;
+pub const TCSETAF: ::c_int = 0x5408;
+pub const TCSBRK: ::c_int = 0x5409;
+pub const TCXONC: ::c_int = 0x540A;
+pub const TCFLSH: ::c_int = 0x540B;
+pub const TIOCGSOFTCAR: ::c_int = 0x5419;
+pub const TIOCSSOFTCAR: ::c_int = 0x541A;
+pub const TIOCLINUX: ::c_int = 0x541C;
+pub const TIOCGSERIAL: ::c_int = 0x541E;
+pub const TIOCEXCL: ::c_int = 0x540C;
+pub const TIOCNXCL: ::c_int = 0x540D;
+pub const TIOCSCTTY: ::c_int = 0x540E;
+pub const TIOCGPGRP: ::c_int = 0x540F;
+pub const TIOCSPGRP: ::c_int = 0x5410;
+pub const TIOCOUTQ: ::c_int = 0x5411;
+pub const TIOCSTI: ::c_int = 0x5412;
+pub const TIOCGWINSZ: ::c_int = 0x5413;
+pub const TIOCSWINSZ: ::c_int = 0x5414;
+pub const TIOCMGET: ::c_int = 0x5415;
+pub const TIOCMBIS: ::c_int = 0x5416;
+pub const TIOCMBIC: ::c_int = 0x5417;
+pub const TIOCMSET: ::c_int = 0x5418;
+pub const FIONREAD: ::c_int = 0x541B;
+pub const TIOCCONS: ::c_int = 0x541D;
+
+pub const SYS_gettid: ::c_long = 224; // Valid for arm (32-bit) and x86 (32-bit)
+
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const TIOCM_LE: ::c_int = 0x001;
+pub const TIOCM_DTR: ::c_int = 0x002;
+pub const TIOCM_RTS: ::c_int = 0x004;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+pub const TIOCM_CD: ::c_int = TIOCM_CAR;
+pub const TIOCM_RI: ::c_int = TIOCM_RNG;
+pub const O_TMPFILE: ::c_int = 0x400000;
+
+f! {
+    pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
+        for slot in cpuset.bits.iter_mut() {
+            *slot = 0;
+        }
+    }
+
+    pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
+        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
+        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
+        cpuset.bits[idx] |= 1 << offset;
+        ()
+    }
+
+    pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
+        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
+        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
+        cpuset.bits[idx] &= !(1 << offset);
+        ()
+    }
+
+    pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
+        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]);
+        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
+        0 != (cpuset.bits[idx] & (1 << offset))
+    }
+
+    pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
+        set1.bits == set2.bits
+    }
+
+    pub fn major(dev: ::dev_t) -> ::c_uint {
+        // see
+        // https://github.com/kripken/emscripten/blob/
+        // master/system/include/libc/sys/sysmacros.h
+        let mut major = 0;
+        major |= (dev & 0x00000fff) >> 8;
+        major |= (dev & 0xfffff000) >> 31 >> 1;
+        major as ::c_uint
+    }
+
+    pub fn minor(dev: ::dev_t) -> ::c_uint {
+        // see
+        // https://github.com/kripken/emscripten/blob/
+        // master/system/include/libc/sys/sysmacros.h
+        let mut minor = 0;
+        minor |= (dev & 0x000000ff) >> 0;
+        minor |= (dev & 0xffffff00) >> 12;
+        minor as ::c_uint
+    }
+
+    pub fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t {
+        let major = major as ::dev_t;
+        let minor = minor as ::dev_t;
+        let mut dev = 0;
+        dev |= (major & 0x00000fff) << 8;
+        dev |= (major & 0xfffff000) << 31 << 1;
+        dev |= (minor & 0x000000ff) << 0;
+        dev |= (minor & 0xffffff00) << 12;
+        dev
+    }
+}
+
+extern {
+    pub fn setpwent();
+    pub fn endpwent();
+    pub fn getpwent() -> *mut passwd;
+
+    pub fn shm_open(name: *const c_char, oflag: ::c_int,
+                    mode: mode_t) -> ::c_int;
+
+    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
+                    -> ::c_int;
+    pub fn __errno_location() -> *mut ::c_int;
+
+    pub fn fopen64(filename: *const c_char,
+                   mode: *const c_char) -> *mut ::FILE;
+    pub fn freopen64(filename: *const c_char, mode: *const c_char,
+                     file: *mut ::FILE) -> *mut ::FILE;
+    pub fn tmpfile64() -> *mut ::FILE;
+    pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int;
+    pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
+    pub fn fseeko64(stream: *mut ::FILE,
+                    offset: ::off64_t,
+                    whence: ::c_int) -> ::c_int;
+    pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
+    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
+                           len: ::off_t) -> ::c_int;
+    pub fn pwritev(fd: ::c_int,
+                   iov: *const ::iovec,
+                   iovcnt: ::c_int,
+                   offset: ::off_t) -> ::ssize_t;
+    pub fn preadv(fd: ::c_int,
+                  iov: *const ::iovec,
+                  iovcnt: ::c_int,
+                  offset: ::off_t) -> ::ssize_t;
+    pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
+    pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
+    pub fn mkostemps(template: *mut ::c_char,
+                     suffixlen: ::c_int,
+                     flags: ::c_int) -> ::c_int;
+    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
+    pub fn getnameinfo(sa: *const ::sockaddr,
+                       salen: ::socklen_t,
+                       host: *mut ::c_char,
+                       hostlen: ::socklen_t,
+                       serv: *mut ::c_char,
+                       sevlen: ::socklen_t,
+                       flags: ::c_int) -> ::c_int;
+    pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
+
+    // Not available now on Android
+    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
+                    mode: ::mode_t) -> ::c_int;
+    pub fn if_nameindex() -> *mut if_nameindex;
+    pub fn if_freenameindex(ptr: *mut if_nameindex);
+    pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
+    pub fn freeifaddrs(ifa: *mut ::ifaddrs);
+
+    pub fn mremap(addr: *mut ::c_void,
+                  len: ::size_t,
+                  new_len: ::size_t,
+                  flags: ::c_int,
+                  ...) -> *mut ::c_void;
+
+    pub fn glob(pattern: *const c_char,
+                flags: ::c_int,
+                errfunc: Option<extern fn(epath: *const c_char,
+                                          errno: ::c_int) -> ::c_int>,
+                pglob: *mut ::glob_t) -> ::c_int;
+    pub fn globfree(pglob: *mut ::glob_t);
+
+    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
+                         -> ::c_int;
+
+    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
+
+    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
+
+    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
+    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
+                  -> ::c_int;
+
+    pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
+
+    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
+                    flags: ::c_int, addr: *mut ::sockaddr,
+                    addrlen: *mut ::socklen_t) -> ::ssize_t;
+    pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
+    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
+
+    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
+                address_len: ::socklen_t) -> ::c_int;
+
+    pub fn writev(fd: ::c_int,
+                  iov: *const ::iovec,
+                  iovcnt: ::c_int) -> ::ssize_t;
+    pub fn readv(fd: ::c_int,
+                 iov: *const ::iovec,
+                 iovcnt: ::c_int) -> ::ssize_t;
+
+    pub fn sendmsg(fd: ::c_int,
+                   msg: *const ::msghdr,
+                   flags: ::c_int) -> ::ssize_t;
+    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
+                   -> ::ssize_t;
+    pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
+    pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
+    pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
+                    flags: ::c_int) -> ::c_int;
+    pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
+                    flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
+    pub fn sync();
+    pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
+    pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
+    pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
+    pub fn pthread_create(native: *mut ::pthread_t,
+                          attr: *const ::pthread_attr_t,
+                          f: extern fn(*mut ::c_void) -> *mut ::c_void,
+                          value: *mut ::c_void) -> ::c_int;
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/mips/mips32.rs
@@ -0,0 +1,276 @@
+pub type c_char = i8;
+pub type c_long = i32;
+pub type c_ulong = u32;
+pub type clock_t = i32;
+pub type time_t = i32;
+pub type suseconds_t = i32;
+pub type wchar_t = i32;
+pub type off_t = i32;
+pub type ino_t = u32;
+pub type blkcnt_t = i32;
+pub type blksize_t = i32;
+pub type nlink_t = u32;
+pub type __u64 = ::c_ulonglong;
+
+s! {
+    pub struct aiocb {
+        pub aio_fildes: ::c_int,
+        pub aio_lio_opcode: ::c_int,
+        pub aio_reqprio: ::c_int,
+        pub aio_buf: *mut ::c_void,
+        pub aio_nbytes: ::size_t,
+        pub aio_sigevent: ::sigevent,
+        __next_prio: *mut aiocb,
+        __abs_prio: ::c_int,
+        __policy: ::c_int,
+        __error_code: ::c_int,
+        __return_value: ::ssize_t,
+        pub aio_offset: off_t,
+        __unused1: [::c_char; 4],
+        __glibc_reserved: [::c_char; 32]
+    }
+
+    pub struct stat {
+        pub st_dev: ::c_ulong,
+        st_pad1: [::c_long; 3],
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::c_ulong,
+        pub st_pad2: [::c_long; 2],
+        pub st_size: ::off_t,
+        st_pad3: ::c_long,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        st_pad5: [::c_long; 14],
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::c_ulong,
+        st_pad1: [::c_long; 3],
+        pub st_ino: ::ino64_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::c_ulong,
+        st_pad2: [::c_long; 2],
+        pub st_size: ::off64_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        st_pad3: ::c_long,
+        pub st_blocks: ::blkcnt64_t,
+        st_pad5: [::c_long; 14],
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::c_long,
+        pub f_bsize: ::c_long,
+        pub f_frsize: ::c_long,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_bavail: u64,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_long,
+        pub f_flags: ::c_long,
+        pub f_spare: [::c_long; 5],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        #[cfg(target_endian = "little")]
+        pub f_fsid: ::c_ulong,
+        __f_unused: ::c_int,
+        #[cfg(target_endian = "big")]
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct pthread_attr_t {
+        __size: [u32; 9]
+    }
+
+    pub struct sigaction {
+        pub sa_flags: ::c_int,
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: sigset_t,
+        pub sa_restorer: ::dox::Option<extern fn()>,
+        _resv: [::c_int; 1],
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_size: ::size_t,
+        pub ss_flags: ::c_int,
+    }
+
+    pub struct sigset_t {
+        __val: [::c_ulong; 32],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_code: ::c_int,
+        pub si_errno: ::c_int,
+        pub _pad: [::c_int; 29],
+    }
+
+    pub struct ipc_perm {
+        pub __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::c_uint,
+        pub __seq: ::c_ushort,
+        __pad1: ::c_ushort,
+        __unused1: ::c_ulong,
+        __unused2: ::c_ulong
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __unused4: ::c_ulong,
+        __unused5: ::c_ulong
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        #[cfg(target_endian = "big")]
+        __glibc_reserved1: ::c_ulong,
+        pub msg_stime: ::time_t,
+        #[cfg(target_endian = "little")]
+        __glibc_reserved1: ::c_ulong,
+        #[cfg(target_endian = "big")]
+        __glibc_reserved2: ::c_ulong,
+        pub msg_rtime: ::time_t,
+        #[cfg(target_endian = "little")]
+        __glibc_reserved2: ::c_ulong,
+        #[cfg(target_endian = "big")]
+        __glibc_reserved3: ::c_ulong,
+        pub msg_ctime: ::time_t,
+        #[cfg(target_endian = "little")]
+        __glibc_reserved3: ::c_ulong,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __glibc_reserved4: ::c_ulong,
+        __glibc_reserved5: ::c_ulong,
+    }
+
+    pub struct statfs {
+        pub f_type: ::c_long,
+        pub f_bsize: ::c_long,
+        pub f_frsize: ::c_long,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_files: ::fsblkcnt_t,
+        pub f_ffree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_fsid: ::fsid_t,
+
+        pub f_namelen: ::c_long,
+        f_spare: [::c_long; 6],
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::size_t,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::size_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::size_t,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_line: ::cc_t,
+        pub c_cc: [::cc_t; ::NCCS],
+    }
+
+    pub struct flock {
+        pub l_type: ::c_short,
+        pub l_whence: ::c_short,
+        pub l_start: ::off_t,
+        pub l_len: ::off_t,
+        pub l_sysid: ::c_long,
+        pub l_pid: ::pid_t,
+        pad: [::c_long; 4],
+    }
+
+    pub struct sysinfo {
+        pub uptime: ::c_long,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
+        pub procs: ::c_ushort,
+        pub pad: ::c_ushort,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
+        pub mem_unit: ::c_uint,
+        pub _f: [::c_char; 8],
+    }
+}
+
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
+
+pub const O_LARGEFILE: ::c_int = 0x2000;
+
+pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
+
+// Valid for O32
+pub const SYS_pivot_root: ::c_long = 4216;
+pub const SYS_gettid: ::c_long = 4222;
+pub const SYS_perf_event_open: ::c_long = 4333;
+pub const SYS_memfd_create: ::c_long = 4354;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/mips/mips64.rs
@@ -0,0 +1,257 @@
+pub type blkcnt_t = i64;
+pub type blksize_t = i64;
+pub type c_char = i8;
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type ino_t = u64;
+pub type nlink_t = u64;
+pub type off_t = i64;
+pub type suseconds_t = i64;
+pub type time_t = i64;
+pub type wchar_t = i32;
+pub type clock_t = i64;
+pub type __u64 = ::c_ulong;
+
+s! {
+    pub struct aiocb {
+        pub aio_fildes: ::c_int,
+        pub aio_lio_opcode: ::c_int,
+        pub aio_reqprio: ::c_int,
+        pub aio_buf: *mut ::c_void,
+        pub aio_nbytes: ::size_t,
+        pub aio_sigevent: ::sigevent,
+        __next_prio: *mut aiocb,
+        __abs_prio: ::c_int,
+        __policy: ::c_int,
+        __error_code: ::c_int,
+        __return_value: ::ssize_t,
+        pub aio_offset: off_t,
+        __glibc_reserved: [::c_char; 32]
+    }
+
+    pub struct stat {
+        pub st_dev: ::c_ulong,
+        st_pad1: [::c_long; 2],
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::c_ulong,
+        st_pad2: [::c_ulong; 1],
+        pub st_size: ::off_t,
+        st_pad3: ::c_long,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        st_pad4: ::c_long,
+        pub st_blocks: ::blkcnt_t,
+        st_pad5: [::c_long; 7],
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::c_ulong,
+        st_pad1: [::c_long; 2],
+        pub st_ino: ::ino64_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::c_ulong,
+        st_pad2: [::c_long; 2],
+        pub st_size: ::off64_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        st_pad3: ::c_long,
+        pub st_blocks: ::blkcnt64_t,
+        st_pad5: [::c_long; 7],
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::c_long,
+        pub f_bsize: ::c_long,
+        pub f_frsize: ::c_long,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_bavail: u64,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_long,
+        pub f_flags: ::c_long,
+        pub f_spare: [::c_long; 5],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct pthread_attr_t {
+        __size: [::c_ulong; 7]
+    }
+
+    pub struct sigaction {
+        pub sa_flags: ::c_int,
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: sigset_t,
+        pub sa_restorer: ::dox::Option<extern fn()>,
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_size: ::size_t,
+        pub ss_flags: ::c_int,
+    }
+
+    pub struct sigset_t {
+        __size: [::c_ulong; 16],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_code: ::c_int,
+        pub si_errno: ::c_int,
+        _pad: ::c_int,
+        _pad2: [::c_long; 14],
+    }
+
+    pub struct ipc_perm {
+        pub __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::c_uint,
+        pub __seq: ::c_ushort,
+        __pad1: ::c_ushort,
+        __unused1: ::c_ulong,
+        __unused2: ::c_ulong
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __unused4: ::c_ulong,
+        __unused5: ::c_ulong
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        pub msg_stime: ::time_t,
+        pub msg_rtime: ::time_t,
+        pub msg_ctime: ::time_t,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __glibc_reserved4: ::c_ulong,
+        __glibc_reserved5: ::c_ulong,
+    }
+
+    pub struct statfs {
+        pub f_type: ::c_long,
+        pub f_bsize: ::c_long,
+        pub f_frsize: ::c_long,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_files: ::fsblkcnt_t,
+        pub f_ffree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_fsid: ::fsid_t,
+
+        pub f_namelen: ::c_long,
+        f_spare: [::c_long; 6],
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::size_t,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::size_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::size_t,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_line: ::cc_t,
+        pub c_cc: [::cc_t; ::NCCS],
+    }
+
+    pub struct flock {
+        pub l_type: ::c_short,
+        pub l_whence: ::c_short,
+        pub l_start: ::off_t,
+        pub l_len: ::off_t,
+        pub l_pid: ::pid_t,
+    }
+
+    pub struct sysinfo {
+        pub uptime: ::c_long,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
+        pub procs: ::c_ushort,
+        pub pad: ::c_ushort,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
+        pub mem_unit: ::c_uint,
+        pub _f: [::c_char; 0],
+    }
+}
+
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
+pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
+
+pub const O_LARGEFILE: ::c_int = 0;
+
+pub const RLIM_INFINITY: ::rlim_t = 0xffff_ffff_ffff_ffff;
+
+// Valid for n64
+pub const SYS_pivot_root: ::c_long = 5151;
+pub const SYS_gettid: ::c_long = 5178;
+pub const SYS_memfd_create: ::c_long = 5314;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/mips/mod.rs
@@ -0,0 +1,674 @@
+pub type fsblkcnt_t = ::c_ulong;
+pub type fsfilcnt_t = ::c_ulong;
+pub type rlim_t = c_ulong;
+pub type __priority_which_t = ::c_uint;
+
+s! {
+    pub struct glob64_t {
+        pub gl_pathc: ::size_t,
+        pub gl_pathv: *mut *mut ::c_char,
+        pub gl_offs: ::size_t,
+        pub gl_flags: ::c_int,
+
+        __unused1: *mut ::c_void,
+        __unused2: *mut ::c_void,
+        __unused3: *mut ::c_void,
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+    }
+
+    // FIXME this is actually a union
+    pub struct sem_t {
+        #[cfg(target_pointer_width = "32")]
+        __size: [::c_char; 16],
+        #[cfg(target_pointer_width = "64")]
+        __size: [::c_char; 32],
+        __align: [::c_long; 0],
+    }
+}
+
+pub const SFD_CLOEXEC: ::c_int = 0x080000;
+
+pub const NCCS: usize = 32;
+
+pub const O_TRUNC: ::c_int = 512;
+
+pub const O_NOATIME: ::c_int = 0o1000000;
+pub const O_CLOEXEC: ::c_int = 0x80000;
+pub const O_PATH: ::c_int = 0o10000000;
+
+pub const EBFONT: ::c_int = 59;
+pub const ENOSTR: ::c_int = 60;
+pub const ENODATA: ::c_int = 61;
+pub const ETIME: ::c_int = 62;
+pub const ENOSR: ::c_int = 63;
+pub const ENONET: ::c_int = 64;
+pub const ENOPKG: ::c_int = 65;
+pub const EREMOTE: ::c_int = 66;
+pub const ENOLINK: ::c_int = 67;
+pub const EADV: ::c_int = 68;
+pub const ESRMNT: ::c_int = 69;
+pub const ECOMM: ::c_int = 70;
+pub const EPROTO: ::c_int = 71;
+pub const EDOTDOT: ::c_int = 73;
+
+pub const SA_NODEFER: ::c_int = 0x40000000;
+pub const SA_RESETHAND: ::c_int = 0x80000000;
+pub const SA_RESTART: ::c_int = 0x10000000;
+pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
+
+pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
+
+pub const EFD_CLOEXEC: ::c_int = 0x80000;
+
+pub const BUFSIZ: ::c_uint = 8192;
+pub const TMP_MAX: ::c_uint = 238328;
+pub const FOPEN_MAX: ::c_uint = 16;
+pub const POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
+pub const POSIX_MADV_DONTNEED: ::c_int = 4;
+pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
+pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
+pub const _SC_PII: ::c_int = 53;
+pub const _SC_PII_XTI: ::c_int = 54;
+pub const _SC_PII_SOCKET: ::c_int = 55;
+pub const _SC_PII_INTERNET: ::c_int = 56;
+pub const _SC_PII_OSI: ::c_int = 57;
+pub const _SC_POLL: ::c_int = 58;
+pub const _SC_SELECT: ::c_int = 59;
+pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
+pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
+pub const _SC_PII_OSI_COTS: ::c_int = 63;
+pub const _SC_PII_OSI_CLTS: ::c_int = 64;
+pub const _SC_PII_OSI_M: ::c_int = 65;
+pub const _SC_T_IOV_MAX: ::c_int = 66;
+pub const _SC_2_C_VERSION: ::c_int = 96;
+pub const _SC_CHAR_BIT: ::c_int = 101;
+pub const _SC_CHAR_MAX: ::c_int = 102;
+pub const _SC_CHAR_MIN: ::c_int = 103;
+pub const _SC_INT_MAX: ::c_int = 104;
+pub const _SC_INT_MIN: ::c_int = 105;
+pub const _SC_LONG_BIT: ::c_int = 106;
+pub const _SC_WORD_BIT: ::c_int = 107;
+pub const _SC_MB_LEN_MAX: ::c_int = 108;
+pub const _SC_SSIZE_MAX: ::c_int = 110;
+pub const _SC_SCHAR_MAX: ::c_int = 111;
+pub const _SC_SCHAR_MIN: ::c_int = 112;
+pub const _SC_SHRT_MAX: ::c_int = 113;
+pub const _SC_SHRT_MIN: ::c_int = 114;
+pub const _SC_UCHAR_MAX: ::c_int = 115;
+pub const _SC_UINT_MAX: ::c_int = 116;
+pub const _SC_ULONG_MAX: ::c_int = 117;
+pub const _SC_USHRT_MAX: ::c_int = 118;
+pub const _SC_NL_ARGMAX: ::c_int = 119;
+pub const _SC_NL_LANGMAX: ::c_int = 120;
+pub const _SC_NL_MSGMAX: ::c_int = 121;
+pub const _SC_NL_NMAX: ::c_int = 122;
+pub const _SC_NL_SETMAX: ::c_int = 123;
+pub const _SC_NL_TEXTMAX: ::c_int = 124;
+pub const _SC_BASE: ::c_int = 134;
+pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
+pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
+pub const _SC_DEVICE_IO: ::c_int = 140;
+pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
+pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
+pub const _SC_FD_MGMT: ::c_int = 143;
+pub const _SC_FIFO: ::c_int = 144;
+pub const _SC_PIPE: ::c_int = 145;
+pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
+pub const _SC_FILE_LOCKING: ::c_int = 147;
+pub const _SC_FILE_SYSTEM: ::c_int = 148;
+pub const _SC_MULTI_PROCESS: ::c_int = 150;
+pub const _SC_SINGLE_PROCESS: ::c_int = 151;
+pub const _SC_NETWORKING: ::c_int = 152;
+pub const _SC_REGEX_VERSION: ::c_int = 156;
+pub const _SC_SIGNALS: ::c_int = 158;
+pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
+pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
+pub const _SC_USER_GROUPS: ::c_int = 166;
+pub const _SC_USER_GROUPS_R: ::c_int = 167;
+pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
+pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
+pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
+pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
+pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
+pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
+pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
+pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
+pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
+pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
+pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
+pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
+pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
+pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
+pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
+pub const O_ACCMODE: ::c_int = 3;
+pub const O_DIRECT: ::c_int = 0x8000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+pub const ST_RELATIME: ::c_ulong = 4096;
+pub const NI_MAXHOST: ::socklen_t = 1025;
+
+pub const RLIMIT_NOFILE: ::c_int = 5;
+pub const RLIMIT_AS: ::c_int = 6;
+pub const RLIMIT_RSS: ::c_int = 7;
+pub const RLIMIT_NPROC: ::c_int = 8;
+pub const RLIMIT_MEMLOCK: ::c_int = 9;
+pub const RLIMIT_NLIMITS: ::c_int = 16;
+
+pub const O_APPEND: ::c_int = 8;
+pub const O_CREAT: ::c_int = 256;
+pub const O_EXCL: ::c_int = 1024;
+pub const O_NOCTTY: ::c_int = 2048;
+pub const O_NONBLOCK: ::c_int = 128;
+pub const O_SYNC: ::c_int = 0x4010;
+pub const O_RSYNC: ::c_int = 0x4010;
+pub const O_DSYNC: ::c_int = 0x10;
+pub const O_FSYNC: ::c_int = 0x4010;
+pub const O_ASYNC: ::c_int = 0x1000;
+pub const O_NDELAY: ::c_int = 0x80;
+
+pub const SOCK_NONBLOCK: ::c_int = 128;
+
+pub const EDEADLK: ::c_int = 45;
+pub const ENAMETOOLONG: ::c_int = 78;
+pub const ENOLCK: ::c_int = 46;
+pub const ENOSYS: ::c_int = 89;
+pub const ENOTEMPTY: ::c_int = 93;
+pub const ELOOP: ::c_int = 90;
+pub const ENOMSG: ::c_int = 35;
+pub const EIDRM: ::c_int = 36;
+pub const ECHRNG: ::c_int = 37;
+pub const EL2NSYNC: ::c_int = 38;
+pub const EL3HLT: ::c_int = 39;
+pub const EL3RST: ::c_int = 40;
+pub const ELNRNG: ::c_int = 41;
+pub const EUNATCH: ::c_int = 42;
+pub const ENOCSI: ::c_int = 43;
+pub const EL2HLT: ::c_int = 44;
+pub const EBADE: ::c_int = 50;
+pub const EBADR: ::c_int = 51;
+pub const EXFULL: ::c_int = 52;
+pub const ENOANO: ::c_int = 53;
+pub const EBADRQC: ::c_int = 54;
+pub const EBADSLT: ::c_int = 55;
+pub const EDEADLOCK: ::c_int = 56;
+pub const EMULTIHOP: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 79;
+pub const ENOTUNIQ: ::c_int = 80;
+pub const EBADFD: ::c_int = 81;
+pub const EBADMSG: ::c_int = 77;
+pub const EREMCHG: ::c_int = 82;
+pub const ELIBACC: ::c_int = 83;
+pub const ELIBBAD: ::c_int = 84;
+pub const ELIBSCN: ::c_int = 85;
+pub const ELIBMAX: ::c_int = 86;
+pub const ELIBEXEC: ::c_int = 87;
+pub const EILSEQ: ::c_int = 88;
+pub const ERESTART: ::c_int = 91;
+pub const ESTRPIPE: ::c_int = 92;
+pub const EUSERS: ::c_int = 94;
+pub const ENOTSOCK: ::c_int = 95;
+pub const EDESTADDRREQ: ::c_int = 96;
+pub const EMSGSIZE: ::c_int = 97;
+pub const EPROTOTYPE: ::c_int = 98;
+pub const ENOPROTOOPT: ::c_int = 99;
+pub const EPROTONOSUPPORT: ::c_int = 120;
+pub const ESOCKTNOSUPPORT: ::c_int = 121;
+pub const EOPNOTSUPP: ::c_int = 122;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 123;
+pub const EAFNOSUPPORT: ::c_int = 124;
+pub const EADDRINUSE: ::c_int = 125;
+pub const EADDRNOTAVAIL: ::c_int = 126;
+pub const ENETDOWN: ::c_int = 127;
+pub const ENETUNREACH: ::c_int = 128;
+pub const ENETRESET: ::c_int = 129;
+pub const ECONNABORTED: ::c_int = 130;
+pub const ECONNRESET: ::c_int = 131;
+pub const ENOBUFS: ::c_int = 132;
+pub const EISCONN: ::c_int = 133;
+pub const ENOTCONN: ::c_int = 134;
+pub const ESHUTDOWN: ::c_int = 143;
+pub const ETOOMANYREFS: ::c_int = 144;
+pub const ETIMEDOUT: ::c_int = 145;
+pub const ECONNREFUSED: ::c_int = 146;
+pub const EHOSTDOWN: ::c_int = 147;
+pub const EHOSTUNREACH: ::c_int = 148;
+pub const EALREADY: ::c_int = 149;
+pub const EINPROGRESS: ::c_int = 150;
+pub const ESTALE: ::c_int = 151;
+pub const EUCLEAN: ::c_int = 135;
+pub const ENOTNAM: ::c_int = 137;
+pub const ENAVAIL: ::c_int = 138;
+pub const EISNAM: ::c_int = 139;
+pub const EREMOTEIO: ::c_int = 140;
+pub const EDQUOT: ::c_int = 1133;
+pub const ENOMEDIUM: ::c_int = 159;
+pub const EMEDIUMTYPE: ::c_int = 160;
+pub const ECANCELED: ::c_int = 158;
+pub const ENOKEY: ::c_int = 161;
+pub const EKEYEXPIRED: ::c_int = 162;
+pub const EKEYREVOKED: ::c_int = 163;
+pub const EKEYREJECTED: ::c_int = 164;
+pub const EOWNERDEAD: ::c_int = 165;
+pub const ENOTRECOVERABLE: ::c_int = 166;
+pub const ERFKILL: ::c_int = 167;
+
+pub const LC_PAPER: ::c_int = 7;
+pub const LC_NAME: ::c_int = 8;
+pub const LC_ADDRESS: ::c_int = 9;
+pub const LC_TELEPHONE: ::c_int = 10;
+pub const LC_MEASUREMENT: ::c_int = 11;
+pub const LC_IDENTIFICATION: ::c_int = 12;
+pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
+pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
+pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
+pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
+pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
+pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
+pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
+                               | ::LC_NUMERIC_MASK
+                               | ::LC_TIME_MASK
+                               | ::LC_COLLATE_MASK
+                               | ::LC_MONETARY_MASK
+                               | ::LC_MESSAGES_MASK
+                               | LC_PAPER_MASK
+                               | LC_NAME_MASK
+                               | LC_ADDRESS_MASK
+                               | LC_TELEPHONE_MASK
+                               | LC_MEASUREMENT_MASK
+                               | LC_IDENTIFICATION_MASK;
+
+pub const MAP_NORESERVE: ::c_int = 0x400;
+pub const MAP_ANON: ::c_int = 0x800;
+pub const MAP_ANONYMOUS: ::c_int = 0x800;
+pub const MAP_GROWSDOWN: ::c_int = 0x1000;
+pub const MAP_DENYWRITE: ::c_int = 0x2000;
+pub const MAP_EXECUTABLE: ::c_int = 0x4000;
+pub const MAP_LOCKED: ::c_int = 0x8000;
+pub const MAP_POPULATE: ::c_int = 0x10000;
+pub const MAP_NONBLOCK: ::c_int = 0x20000;
+pub const MAP_STACK: ::c_int = 0x40000;
+
+pub const SOCK_STREAM: ::c_int = 2;
+pub const SOCK_DGRAM: ::c_int = 1;
+pub const SOCK_SEQPACKET: ::c_int = 5;
+
+pub const SOL_SOCKET: ::c_int = 0xffff;
+
+pub const SO_REUSEADDR: ::c_int = 0x0004;
+pub const SO_KEEPALIVE: ::c_int = 0x0008;
+pub const SO_DONTROUTE: ::c_int = 0x0010;
+pub const SO_BROADCAST: ::c_int = 0x0020;
+pub const SO_LINGER: ::c_int = 0x0080;
+pub const SO_OOBINLINE: ::c_int = 0x0100;
+pub const SO_REUSEPORT: ::c_int = 0x0200;
+pub const SO_TYPE: ::c_int = 0x1008;
+pub const SO_STYLE: ::c_int = SO_TYPE;
+pub const SO_ERROR: ::c_int = 0x1007;
+pub const SO_SNDBUF: ::c_int = 0x1001;
+pub const SO_RCVBUF: ::c_int = 0x1002;
+pub const SO_SNDLOWAT: ::c_int = 0x1003;
+pub const SO_RCVLOWAT: ::c_int = 0x1004;
+pub const SO_SNDTIMEO: ::c_int = 0x1005;
+pub const SO_RCVTIMEO: ::c_int = 0x1006;
+pub const SO_ACCEPTCONN: ::c_int = 0x1009;
+pub const SO_PROTOCOL: ::c_int = 0x1028;
+pub const SO_DOMAIN: ::c_int = 0x1029;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_PASSCRED: ::c_int = 17;
+pub const SO_PEERCRED: ::c_int = 18;
+pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
+pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
+pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
+pub const SO_BINDTODEVICE: ::c_int = 25;
+pub const SO_ATTACH_FILTER: ::c_int = 26;
+pub const SO_DETACH_FILTER: ::c_int = 27;
+pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
+pub const SO_PEERNAME: ::c_int = 28;
+pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SO_PEERSEC: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 31;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_PASSSEC: ::c_int = 34;
+pub const SO_TIMESTAMPNS: ::c_int = 35;
+pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
+pub const SO_MARK: ::c_int = 36;
+pub const SO_TIMESTAMPING: ::c_int = 37;
+pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
+pub const SO_RXQ_OVFL: ::c_int = 40;
+pub const SO_WIFI_STATUS: ::c_int = 41;
+pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
+pub const SO_PEEK_OFF: ::c_int = 42;
+pub const SO_NOFCS: ::c_int = 43;
+pub const SO_LOCK_FILTER: ::c_int = 44;
+pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
+pub const SO_BUSY_POLL: ::c_int = 46;
+pub const SO_MAX_PACING_RATE: ::c_int = 47;
+pub const SO_BPF_EXTENSIONS: ::c_int = 48;
+pub const SO_INCOMING_CPU: ::c_int = 49;
+pub const SO_ATTACH_BPF: ::c_int = 50;
+pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
+
+pub const FIOCLEX: ::c_ulong = 0x6601;
+pub const FIONBIO: ::c_ulong = 0x667e;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000008;
+pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
+
+pub const SIGCHLD: ::c_int = 18;
+pub const SIGBUS: ::c_int = 10;
+pub const SIGTTIN: ::c_int = 26;
+pub const SIGTTOU: ::c_int = 27;
+pub const SIGXCPU: ::c_int = 30;
+pub const SIGXFSZ: ::c_int = 31;
+pub const SIGVTALRM: ::c_int = 28;
+pub const SIGPROF: ::c_int = 29;
+pub const SIGWINCH: ::c_int = 20;
+pub const SIGUSR1: ::c_int = 16;
+pub const SIGUSR2: ::c_int = 17;
+pub const SIGCONT: ::c_int = 25;
+pub const SIGSTOP: ::c_int = 23;
+pub const SIGTSTP: ::c_int = 24;
+pub const SIGURG: ::c_int = 21;
+pub const SIGIO: ::c_int = 22;
+pub const SIGSYS: ::c_int = 12;
+pub const SIGPOLL: ::c_int = 22;
+pub const SIGPWR: ::c_int = 19;
+pub const SIG_SETMASK: ::c_int = 3;
+pub const SIG_BLOCK: ::c_int = 0x1;
+pub const SIG_UNBLOCK: ::c_int = 0x2;
+
+pub const POLLWRNORM: ::c_short = 0x004;
+pub const POLLWRBAND: ::c_short = 0x100;
+
+pub const PTHREAD_STACK_MIN: ::size_t = 131072;
+
+pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
+pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
+pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
+pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
+pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
+pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
+pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
+pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
+pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
+pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
+pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
+pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
+pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
+pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
+pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
+pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
+pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
+pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
+pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
+pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
+pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
+pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
+pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
+pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
+pub const TMPFS_MAGIC: ::c_long = 0x01021994;
+pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
+
+pub const VEOF: usize = 16;
+pub const VEOL: usize = 17;
+pub const VEOL2: usize = 6;
+pub const VMIN: usize = 4;
+pub const IEXTEN: ::tcflag_t = 0x00000100;
+pub const TOSTOP: ::tcflag_t = 0x00008000;
+pub const FLUSHO: ::tcflag_t = 0x00002000;
+pub const EXTPROC: ::tcflag_t = 0o200000;
+pub const TCSANOW: ::c_int = 0x540e;
+pub const TCSADRAIN: ::c_int = 0x540f;
+pub const TCSAFLUSH: ::c_int = 0x5410;
+
+pub const CPU_SETSIZE: ::c_int = 0x400;
+
+pub const PTRACE_TRACEME: ::c_uint = 0;
+pub const PTRACE_PEEKTEXT: ::c_uint = 1;
+pub const PTRACE_PEEKDATA: ::c_uint = 2;
+pub const PTRACE_PEEKUSER: ::c_uint = 3;
+pub const PTRACE_POKETEXT: ::c_uint = 4;
+pub const PTRACE_POKEDATA: ::c_uint = 5;
+pub const PTRACE_POKEUSER: ::c_uint = 6;
+pub const PTRACE_CONT: ::c_uint = 7;
+pub const PTRACE_KILL: ::c_uint = 8;
+pub const PTRACE_SINGLESTEP: ::c_uint = 9;
+pub const PTRACE_ATTACH: ::c_uint = 16;
+pub const PTRACE_DETACH: ::c_uint = 17;
+pub const PTRACE_SYSCALL: ::c_uint = 24;
+pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
+pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
+pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
+pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
+pub const PTRACE_GETFPREGS: ::c_uint = 14;
+pub const PTRACE_SETFPREGS: ::c_uint = 15;
+pub const PTRACE_GETFPXREGS: ::c_uint = 18;
+pub const PTRACE_SETFPXREGS: ::c_uint = 19;
+pub const PTRACE_GETREGS: ::c_uint = 12;
+pub const PTRACE_SETREGS: ::c_uint = 13;
+
+pub const MAP_HUGETLB: ::c_int = 0x080000;
+
+pub const EFD_NONBLOCK: ::c_int = 0x80;
+
+pub const F_GETLK: ::c_int = 14;
+pub const F_GETOWN: ::c_int = 23;
+pub const F_SETOWN: ::c_int = 24;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+
+pub const SFD_NONBLOCK: ::c_int = 0x80;
+
+pub const TCGETS: ::c_ulong = 0x540d;
+pub const TCSETS: ::c_ulong = 0x540e;
+pub const TCSETSW: ::c_ulong = 0x540f;
+pub const TCSETSF: ::c_ulong = 0x5410;
+pub const TCGETA: ::c_ulong = 0x5401;
+pub const TCSETA: ::c_ulong = 0x5402;
+pub const TCSETAW: ::c_ulong = 0x5403;
+pub const TCSETAF: ::c_ulong = 0x5404;
+pub const TCSBRK: ::c_ulong = 0x5405;
+pub const TCXONC: ::c_ulong = 0x5406;
+pub const TCFLSH: ::c_ulong = 0x5407;
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
+pub const TIOCINQ: ::c_ulong = 0x467f;
+pub const TIOCLINUX: ::c_ulong = 0x5483;
+pub const TIOCGSERIAL: ::c_ulong = 0x5484;
+pub const TIOCEXCL: ::c_ulong = 0x740d;
+pub const TIOCNXCL: ::c_ulong = 0x740e;
+pub const TIOCSCTTY: ::c_ulong = 0x5480;
+pub const TIOCGPGRP: ::c_ulong = 0x40047477;
+pub const TIOCSPGRP: ::c_ulong = 0x80047476;
+pub const TIOCOUTQ: ::c_ulong = 0x7472;
+pub const TIOCSTI: ::c_ulong = 0x5472;
+pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
+pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
+pub const TIOCMGET: ::c_ulong = 0x741d;
+pub const TIOCMBIS: ::c_ulong = 0x741b;
+pub const TIOCMBIC: ::c_ulong = 0x741c;
+pub const TIOCMSET: ::c_ulong = 0x741a;
+pub const FIONREAD: ::c_ulong = 0x467f;
+pub const TIOCCONS: ::c_ulong = 0x80047478;
+
+pub const RTLD_DEEPBIND: ::c_int = 0x10;
+pub const RTLD_GLOBAL: ::c_int = 0x4;
+pub const RTLD_NOLOAD: ::c_int = 0x8;
+
+pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
+pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
+pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
+pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
+pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
+
+pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
+pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
+pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
+pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
+pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
+pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
+pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
+pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
+pub const CBAUD: ::tcflag_t = 0o0010017;
+pub const TAB1: ::c_int = 0x00000800;
+pub const TAB2: ::c_int = 0x00001000;
+pub const TAB3: ::c_int = 0x00001800;
+pub const CR1: ::c_int  = 0x00000200;
+pub const CR2: ::c_int  = 0x00000400;
+pub const CR3: ::c_int  = 0x00000600;
+pub const FF1: ::c_int  = 0x00008000;
+pub const BS1: ::c_int  = 0x00002000;
+pub const VT1: ::c_int  = 0x00004000;
+pub const VWERASE: usize = 14;
+pub const VREPRINT: usize = 12;
+pub const VSUSP: usize = 10;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VDISCARD: usize = 13;
+pub const VTIME: usize = 5;
+pub const IXON: ::tcflag_t = 0x00000400;
+pub const IXOFF: ::tcflag_t = 0x00001000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x00000030;
+pub const CS6: ::tcflag_t = 0x00000010;
+pub const CS7: ::tcflag_t = 0x00000020;
+pub const CS8: ::tcflag_t = 0x00000030;
+pub const CSTOPB: ::tcflag_t = 0x00000040;
+pub const CREAD: ::tcflag_t = 0x00000080;
+pub const PARENB: ::tcflag_t = 0x00000100;
+pub const PARODD: ::tcflag_t = 0x00000200;
+pub const HUPCL: ::tcflag_t = 0x00000400;
+pub const CLOCAL: ::tcflag_t = 0x00000800;
+pub const ECHOKE: ::tcflag_t = 0x00000800;
+pub const ECHOE: ::tcflag_t = 0x00000010;
+pub const ECHOK: ::tcflag_t = 0x00000020;
+pub const ECHONL: ::tcflag_t = 0x00000040;
+pub const ECHOPRT: ::tcflag_t = 0x00000400;
+pub const ECHOCTL: ::tcflag_t = 0x00000200;
+pub const ISIG: ::tcflag_t = 0x00000001;
+pub const ICANON: ::tcflag_t = 0x00000002;
+pub const PENDIN: ::tcflag_t = 0x00004000;
+pub const NOFLSH: ::tcflag_t = 0x00000080;
+pub const CIBAUD: ::tcflag_t = 0o02003600000;
+pub const CBAUDEX: ::tcflag_t = 0o010000;
+pub const VSWTC: usize = 7;
+pub const OLCUC:  ::tcflag_t = 0o000002;
+pub const NLDLY:  ::tcflag_t = 0o000400;
+pub const CRDLY:  ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const BSDLY:  ::tcflag_t = 0o020000;
+pub const FFDLY:  ::tcflag_t = 0o100000;
+pub const VTDLY:  ::tcflag_t = 0o040000;
+pub const XTABS:  ::tcflag_t = 0o014000;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+
+pub const TIOCM_LE: ::c_int = 0x001;
+pub const TIOCM_DTR: ::c_int = 0x002;
+pub const TIOCM_RTS: ::c_int = 0x004;
+pub const TIOCM_ST: ::c_int = 0x010;
+pub const TIOCM_SR: ::c_int = 0x020;
+pub const TIOCM_CTS: ::c_int = 0x040;
+pub const TIOCM_CAR: ::c_int = 0x100;
+pub const TIOCM_CD: ::c_int = TIOCM_CAR;
+pub const TIOCM_RNG: ::c_int = 0x200;
+pub const TIOCM_RI: ::c_int = TIOCM_RNG;
+pub const TIOCM_DSR: ::c_int = 0x400;
+
+pub const EHWPOISON: ::c_int = 168;
+pub const SIGEV_THREAD_ID: ::c_int = 4;
+pub const EPOLLWAKEUP: ::c_int = 0x20000000;
+
+#[link(name = "util")]
+extern {
+    pub fn sysctl(name: *mut ::c_int,
+                  namelen: ::c_int,
+                  oldp: *mut ::c_void,
+                  oldlenp: *mut ::size_t,
+                  newp: *mut ::c_void,
+                  newlen: ::size_t)
+                  -> ::c_int;
+    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
+    pub fn backtrace(buf: *mut *mut ::c_void,
+                     sz: ::c_int) -> ::c_int;
+    pub fn glob64(pattern: *const ::c_char,
+                  flags: ::c_int,
+                  errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
+                                                   errno: ::c_int)
+                                                   -> ::c_int>,
+                  pglob: *mut glob64_t) -> ::c_int;
+    pub fn globfree64(pglob: *mut glob64_t);
+    pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
+    pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
+                                       cpusetsize: ::size_t,
+                                       cpuset: *mut ::cpu_set_t) -> ::c_int;
+    pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
+                                       cpusetsize: ::size_t,
+                                       cpuset: *const ::cpu_set_t) -> ::c_int;
+    pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
+    pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
+                                       prio: ::c_int) -> ::c_int;
+    pub fn pthread_getaffinity_np(thread: ::pthread_t,
+                                  cpusetsize: ::size_t,
+                                  cpuset: *mut ::cpu_set_t) -> ::c_int;
+    pub fn pthread_setaffinity_np(thread: ::pthread_t,
+                                  cpusetsize: ::size_t,
+                                  cpuset: *const ::cpu_set_t) -> ::c_int;
+    pub fn sched_getcpu() -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(target_arch = "mips")] {
+        mod mips32;
+        pub use self::mips32::*;
+    } else if #[cfg(target_arch = "mips64")] {
+        mod mips64;
+        pub use self::mips64::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/mod.rs
@@ -0,0 +1,1389 @@
+//! Linux-specific definitions for linux-like values
+
+use dox::{mem, Option};
+
+pub type useconds_t = u32;
+pub type dev_t = u64;
+pub type socklen_t = u32;
+pub type pthread_t = c_ulong;
+pub type mode_t = u32;
+pub type ino64_t = u64;
+pub type off64_t = i64;
+pub type blkcnt64_t = i64;
+pub type rlim64_t = u64;
+pub type shmatt_t = ::c_ulong;
+pub type mqd_t = ::c_int;
+pub type msgqnum_t = ::c_ulong;
+pub type msglen_t = ::c_ulong;
+pub type nfds_t = ::c_ulong;
+pub type nl_item = ::c_int;
+pub type idtype_t = ::c_uint;
+pub type loff_t = ::c_longlong;
+
+pub type __u8 = ::c_uchar;
+pub type __u16 = ::c_ushort;
+pub type __s16 = ::c_short;
+pub type __u32 = ::c_uint;
+pub type __s32 = ::c_int;
+
+pub enum fpos64_t {} // TODO: fill this out with a struct
+
+s! {
+    pub struct dirent {
+        pub d_ino: ::ino_t,
+        pub d_off: ::off_t,
+        pub d_reclen: ::c_ushort,
+        pub d_type: ::c_uchar,
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct dirent64 {
+        pub d_ino: ::ino64_t,
+        pub d_off: ::off64_t,
+        pub d_reclen: ::c_ushort,
+        pub d_type: ::c_uchar,
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct rlimit64 {
+        pub rlim_cur: rlim64_t,
+        pub rlim_max: rlim64_t,
+    }
+
+    pub struct glob_t {
+        pub gl_pathc: ::size_t,
+        pub gl_pathv: *mut *mut c_char,
+        pub gl_offs: ::size_t,
+        pub gl_flags: ::c_int,
+
+        __unused1: *mut ::c_void,
+        __unused2: *mut ::c_void,
+        __unused3: *mut ::c_void,
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+    }
+
+    pub struct ifaddrs {
+        pub ifa_next: *mut ifaddrs,
+        pub ifa_name: *mut c_char,
+        pub ifa_flags: ::c_uint,
+        pub ifa_addr: *mut ::sockaddr,
+        pub ifa_netmask: *mut ::sockaddr,
+        pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union
+        pub ifa_data: *mut ::c_void
+    }
+
+    pub struct pthread_mutex_t {
+        #[cfg(any(target_arch = "mips", target_arch = "arm",
+                  target_arch = "powerpc"))]
+        __align: [::c_long; 0],
+        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
+                      target_arch = "powerpc")))]
+        __align: [::c_longlong; 0],
+        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
+    }
+
+    pub struct pthread_rwlock_t {
+        #[cfg(any(target_arch = "mips", target_arch = "arm",
+                  target_arch = "powerpc"))]
+        __align: [::c_long; 0],
+        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
+                      target_arch = "powerpc")))]
+        __align: [::c_longlong; 0],
+        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
+    }
+
+    pub struct pthread_mutexattr_t {
+        #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
+                  target_arch = "mips64", target_arch = "s390x",
+                  target_arch = "sparc64"))]
+        __align: [::c_int; 0],
+        #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
+                      target_arch = "mips64", target_arch = "s390x",
+                      target_arch = "sparc64")))]
+        __align: [::c_long; 0],
+        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
+    }
+
+    pub struct pthread_rwlockattr_t {
+        #[cfg(any(target_env = "musl"))]
+        __align: [::c_int; 0],
+        #[cfg(not(any(target_env = "musl")))]
+        __align: [::c_long; 0],
+        size: [u8; __SIZEOF_PTHREAD_RWLOCKATTR_T],
+    }
+
+    pub struct pthread_cond_t {
+        #[cfg(any(target_env = "musl"))]
+        __align: [*const ::c_void; 0],
+        #[cfg(not(any(target_env = "musl")))]
+        __align: [::c_longlong; 0],
+        size: [u8; __SIZEOF_PTHREAD_COND_T],
+    }
+
+    pub struct pthread_condattr_t {
+        __align: [::c_int; 0],
+        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
+    }
+
+    pub struct passwd {
+        pub pw_name: *mut ::c_char,
+        pub pw_passwd: *mut ::c_char,
+        pub pw_uid: ::uid_t,
+        pub pw_gid: ::gid_t,
+        pub pw_gecos: *mut ::c_char,
+        pub pw_dir: *mut ::c_char,
+        pub pw_shell: *mut ::c_char,
+    }
+
+    pub struct spwd {
+        pub sp_namp: *mut ::c_char,
+        pub sp_pwdp: *mut ::c_char,
+        pub sp_lstchg: ::c_long,
+        pub sp_min: ::c_long,
+        pub sp_max: ::c_long,
+        pub sp_warn: ::c_long,
+        pub sp_inact: ::c_long,
+        pub sp_expire: ::c_long,
+        pub sp_flag: ::c_ulong,
+    }
+
+    pub struct statvfs {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_favail: ::fsfilcnt_t,
+        #[cfg(target_endian = "little")]
+        pub f_fsid: ::c_ulong,
+        #[cfg(target_pointer_width = "32")]
+        __f_unused: ::c_int,
+        #[cfg(target_endian = "big")]
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct dqblk {
+        pub dqb_bhardlimit: ::uint64_t,
+        pub dqb_bsoftlimit: ::uint64_t,
+        pub dqb_curspace: ::uint64_t,
+        pub dqb_ihardlimit: ::uint64_t,
+        pub dqb_isoftlimit: ::uint64_t,
+        pub dqb_curinodes: ::uint64_t,
+        pub dqb_btime: ::uint64_t,
+        pub dqb_itime: ::uint64_t,
+        pub dqb_valid: ::uint32_t,
+    }
+
+    pub struct signalfd_siginfo {
+        pub ssi_signo: ::uint32_t,
+        pub ssi_errno: ::int32_t,
+        pub ssi_code: ::int32_t,
+        pub ssi_pid: ::uint32_t,
+        pub ssi_uid: ::uint32_t,
+        pub ssi_fd: ::int32_t,
+        pub ssi_tid: ::uint32_t,
+        pub ssi_band: ::uint32_t,
+        pub ssi_overrun: ::uint32_t,
+        pub ssi_trapno: ::uint32_t,
+        pub ssi_status: ::int32_t,
+        pub ssi_int: ::int32_t,
+        pub ssi_ptr: ::uint64_t,
+        pub ssi_utime: ::uint64_t,
+        pub ssi_stime: ::uint64_t,
+        pub ssi_addr: ::uint64_t,
+        _pad: [::uint8_t; 48],
+    }
+
+    pub struct fsid_t {
+        __val: [::c_int; 2],
+    }
+
+    pub struct mq_attr {
+        pub mq_flags: ::c_long,
+        pub mq_maxmsg: ::c_long,
+        pub mq_msgsize: ::c_long,
+        pub mq_curmsgs: ::c_long,
+        pad: [::c_long; 4]
+    }
+
+    pub struct cpu_set_t {
+        #[cfg(target_pointer_width = "32")]
+        bits: [u32; 32],
+        #[cfg(target_pointer_width = "64")]
+        bits: [u64; 16],
+    }
+
+    pub struct if_nameindex {
+        pub if_index: ::c_uint,
+        pub if_name: *mut ::c_char,
+    }
+
+    // System V IPC
+    pub struct msginfo {
+        pub msgpool: ::c_int,
+        pub msgmap: ::c_int,
+        pub msgmax: ::c_int,
+        pub msgmnb: ::c_int,
+        pub msgmni: ::c_int,
+        pub msgssz: ::c_int,
+        pub msgtql: ::c_int,
+        pub msgseg: ::c_ushort,
+    }
+
+    pub struct mmsghdr {
+        pub msg_hdr: ::msghdr,
+        pub msg_len: ::c_uint,
+    }
+
+    pub struct sembuf {
+        pub sem_num: ::c_ushort,
+        pub sem_op: ::c_short,
+        pub sem_flg: ::c_short,
+    }
+
+    pub struct input_event {
+        pub time: ::timeval,
+        pub type_: ::__u16,
+        pub code: ::__u16,
+        pub value: ::__s32,
+    }
+
+    pub struct input_id {
+        pub bustype: ::__u16,
+        pub vendor: ::__u16,
+        pub product: ::__u16,
+        pub version: ::__u16,
+    }
+
+    pub struct input_absinfo {
+        pub value: ::__s32,
+        pub minimum: ::__s32,
+        pub maximum: ::__s32,
+        pub fuzz: ::__s32,
+        pub flat: ::__s32,
+        pub resolution: ::__s32,
+    }
+
+    pub struct input_keymap_entry {
+        pub flags: ::__u8,
+        pub len: ::__u8,
+        pub index: ::__u16,
+        pub keycode: ::__u32,
+        pub scancode: [::__u8; 32],
+    }
+
+    pub struct input_mask {
+        pub type_: ::__u32,
+        pub codes_size: ::__u32,
+        pub codes_ptr: ::__u64,
+    }
+
+    pub struct ff_replay {
+        pub length: ::__u16,
+        pub delay: ::__u16,
+    }
+
+    pub struct ff_trigger {
+        pub button: ::__u16,
+        pub interval: ::__u16,
+    }
+
+    pub struct ff_envelope {
+        pub attack_length: ::__u16,
+        pub attack_level: ::__u16,
+        pub fade_length: ::__u16,
+        pub fade_level: ::__u16,
+    }
+
+    pub struct ff_constant_effect {
+        pub level: ::__s16,
+        pub envelope: ff_envelope,
+    }
+
+    pub struct ff_ramp_effect {
+        pub start_level: ::__s16,
+        pub end_level: ::__s16,
+        pub envelope: ff_envelope,
+    }
+
+    pub struct ff_condition_effect {
+        pub right_saturation: ::__u16,
+        pub left_saturation: ::__u16,
+
+        pub right_coeff: ::__s16,
+        pub left_coeff: ::__s16,
+
+        pub deadband: ::__u16,
+        pub center: ::__s16,
+    }
+
+    pub struct ff_periodic_effect {
+        pub waveform: ::__u16,
+        pub period: ::__u16,
+        pub magnitude: ::__s16,
+        pub offset: ::__s16,
+        pub phase: ::__u16,
+
+        pub envelope: ff_envelope,
+
+        pub custom_len: ::__u32,
+        pub custom_data: *mut ::__s16,
+    }
+
+    pub struct ff_rumble_effect {
+        pub strong_magnitude: ::__u16,
+        pub weak_magnitude: ::__u16,
+    }
+
+    pub struct ff_effect {
+        pub type_: ::__u16,
+        pub id: ::__s16,
+        pub direction: ::__u16,
+        pub trigger: ff_trigger,
+        pub replay: ff_replay,
+        // FIXME this is actually a union
+        #[cfg(target_pointer_width = "64")]
+        pub u: [u64; 4],
+        #[cfg(target_pointer_width = "32")]
+        pub u: [u32; 7],
+    }
+}
+
+pub const ABDAY_1: ::nl_item = 0x20000;
+pub const ABDAY_2: ::nl_item = 0x20001;
+pub const ABDAY_3: ::nl_item = 0x20002;
+pub const ABDAY_4: ::nl_item = 0x20003;
+pub const ABDAY_5: ::nl_item = 0x20004;
+pub const ABDAY_6: ::nl_item = 0x20005;
+pub const ABDAY_7: ::nl_item = 0x20006;
+
+pub const DAY_1: ::nl_item = 0x20007;
+pub const DAY_2: ::nl_item = 0x20008;
+pub const DAY_3: ::nl_item = 0x20009;
+pub const DAY_4: ::nl_item = 0x2000A;
+pub const DAY_5: ::nl_item = 0x2000B;
+pub const DAY_6: ::nl_item = 0x2000C;
+pub const DAY_7: ::nl_item = 0x2000D;
+
+pub const ABMON_1: ::nl_item = 0x2000E;
+pub const ABMON_2: ::nl_item = 0x2000F;
+pub const ABMON_3: ::nl_item = 0x20010;
+pub const ABMON_4: ::nl_item = 0x20011;
+pub const ABMON_5: ::nl_item = 0x20012;
+pub const ABMON_6: ::nl_item = 0x20013;
+pub const ABMON_7: ::nl_item = 0x20014;
+pub const ABMON_8: ::nl_item = 0x20015;
+pub const ABMON_9: ::nl_item = 0x20016;
+pub const ABMON_10: ::nl_item = 0x20017;
+pub const ABMON_11: ::nl_item = 0x20018;
+pub const ABMON_12: ::nl_item = 0x20019;
+
+pub const MON_1: ::nl_item = 0x2001A;
+pub const MON_2: ::nl_item = 0x2001B;
+pub const MON_3: ::nl_item = 0x2001C;
+pub const MON_4: ::nl_item = 0x2001D;
+pub const MON_5: ::nl_item = 0x2001E;
+pub const MON_6: ::nl_item = 0x2001F;
+pub const MON_7: ::nl_item = 0x20020;
+pub const MON_8: ::nl_item = 0x20021;
+pub const MON_9: ::nl_item = 0x20022;
+pub const MON_10: ::nl_item = 0x20023;
+pub const MON_11: ::nl_item = 0x20024;
+pub const MON_12: ::nl_item = 0x20025;
+
+pub const AM_STR: ::nl_item = 0x20026;
+pub const PM_STR: ::nl_item = 0x20027;
+
+pub const D_T_FMT: ::nl_item = 0x20028;
+pub const D_FMT: ::nl_item = 0x20029;
+pub const T_FMT: ::nl_item = 0x2002A;
+pub const T_FMT_AMPM: ::nl_item = 0x2002B;
+
+pub const ERA: ::nl_item = 0x2002C;
+pub const ERA_D_FMT: ::nl_item = 0x2002E;
+pub const ALT_DIGITS: ::nl_item = 0x2002F;
+pub const ERA_D_T_FMT: ::nl_item = 0x20030;
+pub const ERA_T_FMT: ::nl_item = 0x20031;
+
+pub const CODESET: ::nl_item = 14;
+
+pub const CRNCYSTR: ::nl_item = 0x4000F;
+
+pub const RUSAGE_THREAD: ::c_int = 1;
+pub const RUSAGE_CHILDREN: ::c_int = -1;
+
+pub const RADIXCHAR: ::nl_item = 0x10000;
+pub const THOUSEP: ::nl_item = 0x10001;
+
+pub const YESEXPR: ::nl_item = 0x50000;
+pub const NOEXPR: ::nl_item = 0x50001;
+pub const YESSTR: ::nl_item = 0x50002;
+pub const NOSTR: ::nl_item = 0x50003;
+
+pub const FILENAME_MAX: ::c_uint = 4096;
+pub const L_tmpnam: ::c_uint = 20;
+pub const _PC_LINK_MAX: ::c_int = 0;
+pub const _PC_MAX_CANON: ::c_int = 1;
+pub const _PC_MAX_INPUT: ::c_int = 2;
+pub const _PC_NAME_MAX: ::c_int = 3;
+pub const _PC_PATH_MAX: ::c_int = 4;
+pub const _PC_PIPE_BUF: ::c_int = 5;
+pub const _PC_CHOWN_RESTRICTED: ::c_int = 6;
+pub const _PC_NO_TRUNC: ::c_int = 7;
+pub const _PC_VDISABLE: ::c_int = 8;
+pub const _PC_SYNC_IO: ::c_int = 9;
+pub const _PC_ASYNC_IO: ::c_int = 10;
+pub const _PC_PRIO_IO: ::c_int = 11;
+pub const _PC_SOCK_MAXBUF: ::c_int = 12;
+pub const _PC_FILESIZEBITS: ::c_int = 13;
+pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
+pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
+pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
+pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
+pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18;
+pub const _PC_SYMLINK_MAX: ::c_int = 19;
+pub const _PC_2_SYMLINKS: ::c_int = 20;
+
+pub const _SC_ARG_MAX: ::c_int = 0;
+pub const _SC_CHILD_MAX: ::c_int = 1;
+pub const _SC_CLK_TCK: ::c_int = 2;
+pub const _SC_NGROUPS_MAX: ::c_int = 3;
+pub const _SC_OPEN_MAX: ::c_int = 4;
+pub const _SC_STREAM_MAX: ::c_int = 5;
+pub const _SC_TZNAME_MAX: ::c_int = 6;
+pub const _SC_JOB_CONTROL: ::c_int = 7;
+pub const _SC_SAVED_IDS: ::c_int = 8;
+pub const _SC_REALTIME_SIGNALS: ::c_int = 9;
+pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10;
+pub const _SC_TIMERS: ::c_int = 11;
+pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12;
+pub const _SC_PRIORITIZED_IO: ::c_int = 13;
+pub const _SC_SYNCHRONIZED_IO: ::c_int = 14;
+pub const _SC_FSYNC: ::c_int = 15;
+pub const _SC_MAPPED_FILES: ::c_int = 16;
+pub const _SC_MEMLOCK: ::c_int = 17;
+pub const _SC_MEMLOCK_RANGE: ::c_int = 18;
+pub const _SC_MEMORY_PROTECTION: ::c_int = 19;
+pub const _SC_MESSAGE_PASSING: ::c_int = 20;
+pub const _SC_SEMAPHORES: ::c_int = 21;
+pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22;
+pub const _SC_AIO_LISTIO_MAX: ::c_int = 23;
+pub const _SC_AIO_MAX: ::c_int = 24;
+pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25;
+pub const _SC_DELAYTIMER_MAX: ::c_int = 26;
+pub const _SC_MQ_OPEN_MAX: ::c_int = 27;
+pub const _SC_MQ_PRIO_MAX: ::c_int = 28;
+pub const _SC_VERSION: ::c_int = 29;
+pub const _SC_PAGESIZE: ::c_int = 30;
+pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
+pub const _SC_RTSIG_MAX: ::c_int = 31;
+pub const _SC_SEM_NSEMS_MAX: ::c_int = 32;
+pub const _SC_SEM_VALUE_MAX: ::c_int = 33;
+pub const _SC_SIGQUEUE_MAX: ::c_int = 34;
+pub const _SC_TIMER_MAX: ::c_int = 35;
+pub const _SC_BC_BASE_MAX: ::c_int = 36;
+pub const _SC_BC_DIM_MAX: ::c_int = 37;
+pub const _SC_BC_SCALE_MAX: ::c_int = 38;
+pub const _SC_BC_STRING_MAX: ::c_int = 39;
+pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40;
+pub const _SC_EXPR_NEST_MAX: ::c_int = 42;
+pub const _SC_LINE_MAX: ::c_int = 43;
+pub const _SC_RE_DUP_MAX: ::c_int = 44;
+pub const _SC_2_VERSION: ::c_int = 46;
+pub const _SC_2_C_BIND: ::c_int = 47;
+pub const _SC_2_C_DEV: ::c_int = 48;
+pub const _SC_2_FORT_DEV: ::c_int = 49;
+pub const _SC_2_FORT_RUN: ::c_int = 50;
+pub const _SC_2_SW_DEV: ::c_int = 51;
+pub const _SC_2_LOCALEDEF: ::c_int = 52;
+pub const _SC_UIO_MAXIOV: ::c_int = 60;
+pub const _SC_IOV_MAX: ::c_int = 60;
+pub const _SC_THREADS: ::c_int = 67;
+pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68;
+pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69;
+pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70;
+pub const _SC_LOGIN_NAME_MAX: ::c_int = 71;
+pub const _SC_TTY_NAME_MAX: ::c_int = 72;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73;
+pub const _SC_THREAD_KEYS_MAX: ::c_int = 74;
+pub const _SC_THREAD_STACK_MIN: ::c_int = 75;
+pub const _SC_THREAD_THREADS_MAX: ::c_int = 76;
+pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77;
+pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78;
+pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79;
+pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80;
+pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81;
+pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 82;
+pub const _SC_NPROCESSORS_CONF: ::c_int = 83;
+pub const _SC_NPROCESSORS_ONLN: ::c_int = 84;
+pub const _SC_PHYS_PAGES: ::c_int = 85;
+pub const _SC_AVPHYS_PAGES: ::c_int = 86;
+pub const _SC_ATEXIT_MAX: ::c_int = 87;
+pub const _SC_PASS_MAX: ::c_int = 88;
+pub const _SC_XOPEN_VERSION: ::c_int = 89;
+pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90;
+pub const _SC_XOPEN_UNIX: ::c_int = 91;
+pub const _SC_XOPEN_CRYPT: ::c_int = 92;
+pub const _SC_XOPEN_ENH_I18N: ::c_int = 93;
+pub const _SC_XOPEN_SHM: ::c_int = 94;
+pub const _SC_2_CHAR_TERM: ::c_int = 95;
+pub const _SC_2_UPE: ::c_int = 97;
+pub const _SC_XOPEN_XPG2: ::c_int = 98;
+pub const _SC_XOPEN_XPG3: ::c_int = 99;
+pub const _SC_XOPEN_XPG4: ::c_int = 100;
+pub const _SC_NZERO: ::c_int = 109;
+pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125;
+pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126;
+pub const _SC_XBS5_LP64_OFF64: ::c_int = 127;
+pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128;
+pub const _SC_XOPEN_LEGACY: ::c_int = 129;
+pub const _SC_XOPEN_REALTIME: ::c_int = 130;
+pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131;
+pub const _SC_ADVISORY_INFO: ::c_int = 132;
+pub const _SC_BARRIERS: ::c_int = 133;
+pub const _SC_CLOCK_SELECTION: ::c_int = 137;
+pub const _SC_CPUTIME: ::c_int = 138;
+pub const _SC_THREAD_CPUTIME: ::c_int = 139;
+pub const _SC_MONOTONIC_CLOCK: ::c_int = 149;
+pub const _SC_READER_WRITER_LOCKS: ::c_int = 153;
+pub const _SC_SPIN_LOCKS: ::c_int = 154;
+pub const _SC_REGEXP: ::c_int = 155;
+pub const _SC_SHELL: ::c_int = 157;
+pub const _SC_SPAWN: ::c_int = 159;
+pub const _SC_SPORADIC_SERVER: ::c_int = 160;
+pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 161;
+pub const _SC_TIMEOUTS: ::c_int = 164;
+pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 165;
+pub const _SC_2_PBS: ::c_int = 168;
+pub const _SC_2_PBS_ACCOUNTING: ::c_int = 169;
+pub const _SC_2_PBS_LOCATE: ::c_int = 170;
+pub const _SC_2_PBS_MESSAGE: ::c_int = 171;
+pub const _SC_2_PBS_TRACK: ::c_int = 172;
+pub const _SC_SYMLOOP_MAX: ::c_int = 173;
+pub const _SC_STREAMS: ::c_int = 174;
+pub const _SC_2_PBS_CHECKPOINT: ::c_int = 175;
+pub const _SC_V6_ILP32_OFF32: ::c_int = 176;
+pub const _SC_V6_ILP32_OFFBIG: ::c_int = 177;
+pub const _SC_V6_LP64_OFF64: ::c_int = 178;
+pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 179;
+pub const _SC_HOST_NAME_MAX: ::c_int = 180;
+pub const _SC_TRACE: ::c_int = 181;
+pub const _SC_TRACE_EVENT_FILTER: ::c_int = 182;
+pub const _SC_TRACE_INHERIT: ::c_int = 183;
+pub const _SC_TRACE_LOG: ::c_int = 184;
+pub const _SC_IPV6: ::c_int = 235;
+pub const _SC_RAW_SOCKETS: ::c_int = 236;
+pub const _SC_V7_ILP32_OFF32: ::c_int = 237;
+pub const _SC_V7_ILP32_OFFBIG: ::c_int = 238;
+pub const _SC_V7_LP64_OFF64: ::c_int = 239;
+pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 240;
+pub const _SC_SS_REPL_MAX: ::c_int = 241;
+pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 242;
+pub const _SC_TRACE_NAME_MAX: ::c_int = 243;
+pub const _SC_TRACE_SYS_MAX: ::c_int = 244;
+pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 245;
+pub const _SC_XOPEN_STREAMS: ::c_int = 246;
+pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 247;
+pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 248;
+
+pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY;
+pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY;
+
+pub const GLOB_ERR: ::c_int = 1 << 0;
+pub const GLOB_MARK: ::c_int = 1 << 1;
+pub const GLOB_NOSORT: ::c_int = 1 << 2;
+pub const GLOB_DOOFFS: ::c_int = 1 << 3;
+pub const GLOB_NOCHECK: ::c_int = 1 << 4;
+pub const GLOB_APPEND: ::c_int = 1 << 5;
+pub const GLOB_NOESCAPE: ::c_int = 1 << 6;
+
+pub const GLOB_NOSPACE: ::c_int = 1;
+pub const GLOB_ABORTED: ::c_int = 2;
+pub const GLOB_NOMATCH: ::c_int = 3;
+
+pub const POSIX_MADV_NORMAL: ::c_int = 0;
+pub const POSIX_MADV_RANDOM: ::c_int = 1;
+pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
+pub const POSIX_MADV_WILLNEED: ::c_int = 3;
+
+pub const S_IEXEC: mode_t = 64;
+pub const S_IWRITE: mode_t = 128;
+pub const S_IREAD: mode_t = 256;
+
+pub const F_LOCK: ::c_int = 1;
+pub const F_TEST: ::c_int = 3;
+pub const F_TLOCK: ::c_int = 2;
+pub const F_ULOCK: ::c_int = 0;
+
+pub const ST_RDONLY: ::c_ulong = 1;
+pub const ST_NOSUID: ::c_ulong = 2;
+pub const ST_NODEV: ::c_ulong = 4;
+pub const ST_NOEXEC: ::c_ulong = 8;
+pub const ST_SYNCHRONOUS: ::c_ulong = 16;
+pub const ST_MANDLOCK: ::c_ulong = 64;
+pub const ST_WRITE: ::c_ulong = 128;
+pub const ST_APPEND: ::c_ulong = 256;
+pub const ST_IMMUTABLE: ::c_ulong = 512;
+pub const ST_NOATIME: ::c_ulong = 1024;
+pub const ST_NODIRATIME: ::c_ulong = 2048;
+
+pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void;
+pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
+pub const RTLD_NODELETE: ::c_int = 0x1000;
+pub const RTLD_NOW: ::c_int = 0x2;
+
+pub const TCP_MD5SIG: ::c_int = 14;
+
+pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
+    __align: [],
+    size: [0; __SIZEOF_PTHREAD_MUTEX_T],
+};
+pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
+    __align: [],
+    size: [0; __SIZEOF_PTHREAD_COND_T],
+};
+pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
+    __align: [],
+    size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
+};
+pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
+pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
+pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
+pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
+pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
+pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
+pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
+
+pub const SCHED_OTHER: ::c_int = 0;
+pub const SCHED_FIFO: ::c_int = 1;
+pub const SCHED_RR: ::c_int = 2;
+pub const SCHED_BATCH: ::c_int = 3;
+pub const SCHED_IDLE: ::c_int = 5;
+
+pub const AF_IB: ::c_int = 27;
+pub const AF_MPLS: ::c_int = 28;
+pub const AF_NFC: ::c_int = 39;
+pub const AF_VSOCK: ::c_int = 40;
+#[doc(hidden)]
+pub const AF_MAX: ::c_int = 42;
+pub const PF_IB: ::c_int = AF_IB;
+pub const PF_MPLS: ::c_int = AF_MPLS;
+pub const PF_NFC: ::c_int = AF_NFC;
+pub const PF_VSOCK: ::c_int = AF_VSOCK;
+#[doc(hidden)]
+pub const PF_MAX: ::c_int = AF_MAX;
+
+// System V IPC
+pub const IPC_PRIVATE: ::key_t = 0;
+
+pub const IPC_CREAT: ::c_int = 0o1000;
+pub const IPC_EXCL: ::c_int = 0o2000;
+pub const IPC_NOWAIT: ::c_int = 0o4000;
+
+pub const IPC_RMID: ::c_int = 0;
+pub const IPC_SET: ::c_int = 1;
+pub const IPC_STAT: ::c_int = 2;
+pub const IPC_INFO: ::c_int = 3;
+pub const MSG_STAT: ::c_int = 11;
+pub const MSG_INFO: ::c_int = 12;
+
+pub const MSG_NOERROR: ::c_int = 0o10000;
+pub const MSG_EXCEPT: ::c_int = 0o20000;
+pub const MSG_COPY: ::c_int = 0o40000;
+
+pub const SHM_R: ::c_int = 0o400;
+pub const SHM_W: ::c_int = 0o200;
+
+pub const SHM_RDONLY: ::c_int = 0o10000;
+pub const SHM_RND: ::c_int = 0o20000;
+pub const SHM_REMAP: ::c_int = 0o40000;
+pub const SHM_EXEC: ::c_int = 0o100000;
+
+pub const SHM_LOCK: ::c_int = 11;
+pub const SHM_UNLOCK: ::c_int = 12;
+
+pub const SHM_HUGETLB: ::c_int = 0o4000;
+pub const SHM_NORESERVE: ::c_int = 0o10000;
+
+pub const EPOLLRDHUP: ::c_int = 0x2000;
+pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000;
+pub const EPOLLONESHOT: ::c_int = 0x40000000;
+
+pub const QFMT_VFS_OLD: ::c_int = 1;
+pub const QFMT_VFS_V0: ::c_int = 2;
+
+pub const EFD_SEMAPHORE: ::c_int = 0x1;
+
+pub const LOG_NFACILITIES: ::c_int = 24;
+
+pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
+
+pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32;
+pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32;
+pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32;
+pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32;
+pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32;
+pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2u32 as i32;
+pub const RB_KEXEC: ::c_int = 0x45584543u32 as i32;
+
+pub const AI_PASSIVE: ::c_int = 0x0001;
+pub const AI_CANONNAME: ::c_int = 0x0002;
+pub const AI_NUMERICHOST: ::c_int = 0x0004;
+pub const AI_V4MAPPED: ::c_int = 0x0008;
+pub const AI_ALL: ::c_int = 0x0010;
+pub const AI_ADDRCONFIG: ::c_int = 0x0020;
+
+pub const AI_NUMERICSERV: ::c_int = 0x0400;
+
+pub const EAI_BADFLAGS: ::c_int = -1;
+pub const EAI_NONAME: ::c_int = -2;
+pub const EAI_AGAIN: ::c_int = -3;
+pub const EAI_FAIL: ::c_int = -4;
+pub const EAI_FAMILY: ::c_int = -6;
+pub const EAI_SOCKTYPE: ::c_int = -7;
+pub const EAI_SERVICE: ::c_int = -8;
+pub const EAI_MEMORY: ::c_int = -10;
+pub const EAI_OVERFLOW: ::c_int = -12;
+
+pub const NI_NUMERICHOST: ::c_int = 1;
+pub const NI_NUMERICSERV: ::c_int = 2;
+pub const NI_NOFQDN: ::c_int = 4;
+pub const NI_NAMEREQD: ::c_int = 8;
+pub const NI_DGRAM: ::c_int = 16;
+
+pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::c_uint = 1;
+pub const SYNC_FILE_RANGE_WRITE: ::c_uint = 2;
+pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4;
+
+pub const EAI_SYSTEM: ::c_int = -11;
+
+pub const AIO_CANCELED: ::c_int = 0;
+pub const AIO_NOTCANCELED: ::c_int = 1;
+pub const AIO_ALLDONE: ::c_int = 2;
+pub const LIO_READ: ::c_int = 0;
+pub const LIO_WRITE: ::c_int = 1;
+pub const LIO_NOP: ::c_int = 2;
+pub const LIO_WAIT: ::c_int = 0;
+pub const LIO_NOWAIT: ::c_int = 1;
+
+pub const MREMAP_MAYMOVE: ::c_int = 1;
+pub const MREMAP_FIXED: ::c_int = 2;
+
+pub const PR_SET_PDEATHSIG: ::c_int = 1;
+pub const PR_GET_PDEATHSIG: ::c_int = 2;
+
+pub const PR_GET_DUMPABLE: ::c_int = 3;
+pub const PR_SET_DUMPABLE: ::c_int = 4;
+
+pub const PR_GET_UNALIGN: ::c_int = 5;
+pub const PR_SET_UNALIGN: ::c_int = 6;
+pub const PR_UNALIGN_NOPRINT: ::c_int = 1;
+pub const PR_UNALIGN_SIGBUS: ::c_int = 2;
+
+pub const PR_GET_KEEPCAPS: ::c_int = 7;
+pub const PR_SET_KEEPCAPS: ::c_int = 8;
+
+pub const PR_GET_FPEMU: ::c_int = 9;
+pub const PR_SET_FPEMU: ::c_int = 10;
+pub const PR_FPEMU_NOPRINT: ::c_int = 1;
+pub const PR_FPEMU_SIGFPE: ::c_int = 2;
+
+pub const PR_GET_FPEXC: ::c_int = 11;
+pub const PR_SET_FPEXC: ::c_int = 12;
+pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80;
+pub const PR_FP_EXC_DIV: ::c_int = 0x010000;
+pub const PR_FP_EXC_OVF: ::c_int = 0x020000;
+pub const PR_FP_EXC_UND: ::c_int = 0x040000;
+pub const PR_FP_EXC_RES: ::c_int = 0x080000;
+pub const PR_FP_EXC_INV: ::c_int = 0x100000;
+pub const PR_FP_EXC_DISABLED: ::c_int = 0;
+pub const PR_FP_EXC_NONRECOV: ::c_int = 1;
+pub const PR_FP_EXC_ASYNC: ::c_int = 2;
+pub const PR_FP_EXC_PRECISE: ::c_int = 3;
+
+pub const PR_GET_TIMING: ::c_int = 13;
+pub const PR_SET_TIMING: ::c_int = 14;
+pub const PR_TIMING_STATISTICAL: ::c_int = 0;
+pub const PR_TIMING_TIMESTAMP: ::c_int = 1;
+
+pub const PR_SET_NAME: ::c_int = 15;
+pub const PR_GET_NAME: ::c_int = 16;
+
+pub const PR_GET_ENDIAN: ::c_int = 19;
+pub const PR_SET_ENDIAN: ::c_int = 20;
+pub const PR_ENDIAN_BIG: ::c_int = 0;
+pub const PR_ENDIAN_LITTLE: ::c_int = 1;
+pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2;
+
+pub const PR_GET_SECCOMP: ::c_int = 21;
+pub const PR_SET_SECCOMP: ::c_int = 22;
+
+pub const PR_CAPBSET_READ: ::c_int = 23;
+pub const PR_CAPBSET_DROP: ::c_int = 24;
+
+pub const PR_GET_TSC: ::c_int = 25;
+pub const PR_SET_TSC: ::c_int = 26;
+pub const PR_TSC_ENABLE: ::c_int = 1;
+pub const PR_TSC_SIGSEGV: ::c_int = 2;
+
+pub const PR_GET_SECUREBITS: ::c_int = 27;
+pub const PR_SET_SECUREBITS: ::c_int = 28;
+
+pub const PR_SET_TIMERSLACK: ::c_int = 29;
+pub const PR_GET_TIMERSLACK: ::c_int = 30;
+
+pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31;
+pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32;
+
+pub const PR_MCE_KILL: ::c_int = 33;
+pub const PR_MCE_KILL_CLEAR: ::c_int = 0;
+pub const PR_MCE_KILL_SET: ::c_int = 1;
+
+pub const PR_MCE_KILL_LATE: ::c_int = 0;
+pub const PR_MCE_KILL_EARLY: ::c_int = 1;
+pub const PR_MCE_KILL_DEFAULT: ::c_int = 2;
+
+pub const PR_MCE_KILL_GET: ::c_int = 34;
+
+pub const PR_SET_MM: ::c_int = 35;
+pub const PR_SET_MM_START_CODE: ::c_int = 1;
+pub const PR_SET_MM_END_CODE: ::c_int = 2;
+pub const PR_SET_MM_START_DATA: ::c_int = 3;
+pub const PR_SET_MM_END_DATA: ::c_int = 4;
+pub const PR_SET_MM_START_STACK: ::c_int = 5;
+pub const PR_SET_MM_START_BRK: ::c_int = 6;
+pub const PR_SET_MM_BRK: ::c_int = 7;
+pub const PR_SET_MM_ARG_START: ::c_int = 8;
+pub const PR_SET_MM_ARG_END: ::c_int = 9;
+pub const PR_SET_MM_ENV_START: ::c_int = 10;
+pub const PR_SET_MM_ENV_END: ::c_int = 11;
+pub const PR_SET_MM_AUXV: ::c_int = 12;
+pub const PR_SET_MM_EXE_FILE: ::c_int = 13;
+pub const PR_SET_MM_MAP: ::c_int = 14;
+pub const PR_SET_MM_MAP_SIZE: ::c_int = 15;
+
+pub const PR_SET_PTRACER: ::c_int = 0x59616d61;
+
+pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36;
+pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37;
+
+pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38;
+pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39;
+
+pub const PR_GET_TID_ADDRESS: ::c_int = 40;
+
+pub const PR_SET_THP_DISABLE: ::c_int = 41;
+pub const PR_GET_THP_DISABLE: ::c_int = 42;
+
+pub const PR_MPX_ENABLE_MANAGEMENT: ::c_int = 43;
+pub const PR_MPX_DISABLE_MANAGEMENT: ::c_int = 44;
+
+pub const PR_SET_FP_MODE: ::c_int = 45;
+pub const PR_GET_FP_MODE: ::c_int = 46;
+pub const PR_FP_MODE_FR: ::c_int = 1 << 0;
+pub const PR_FP_MODE_FRE: ::c_int = 1 << 1;
+
+pub const PR_CAP_AMBIENT: ::c_int = 47;
+pub const PR_CAP_AMBIENT_IS_SET: ::c_int = 1;
+pub const PR_CAP_AMBIENT_RAISE: ::c_int = 2;
+pub const PR_CAP_AMBIENT_LOWER: ::c_int = 3;
+pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4;
+
+pub const ITIMER_REAL: ::c_int = 0;
+pub const ITIMER_VIRTUAL: ::c_int = 1;
+pub const ITIMER_PROF: ::c_int = 2;
+
+pub const XATTR_CREATE: ::c_int = 0x1;
+pub const XATTR_REPLACE: ::c_int = 0x2;
+
+pub const _POSIX_VDISABLE: ::cc_t = 0;
+
+pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
+pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
+pub const FALLOC_FL_COLLAPSE_RANGE: ::c_int = 0x08;
+pub const FALLOC_FL_ZERO_RANGE: ::c_int = 0x10;
+pub const FALLOC_FL_INSERT_RANGE: ::c_int = 0x20;
+pub const FALLOC_FL_UNSHARE_RANGE: ::c_int = 0x40;
+
+// On Linux, libc doesn't define this constant, libattr does instead.
+// We still define it for Linux as it's defined by libc on other platforms,
+// and it's mentioned in the man pages for getxattr and setxattr.
+pub const ENOATTR: ::c_int = ::ENODATA;
+
+pub const SO_ORIGINAL_DST: ::c_int = 80;
+pub const IUTF8: ::tcflag_t = 0x00004000;
+pub const CMSPAR: ::tcflag_t = 0o10000000000;
+pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
+
+f! {
+    pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
+        for slot in cpuset.bits.iter_mut() {
+            *slot = 0;
+        }
+    }
+
+    pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
+        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
+        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
+        cpuset.bits[idx] |= 1 << offset;
+        ()
+    }
+
+    pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
+        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
+        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
+        cpuset.bits[idx] &= !(1 << offset);
+        ()
+    }
+
+    pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
+        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]);
+        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
+        0 != (cpuset.bits[idx] & (1 << offset))
+    }
+
+    pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
+        set1.bits == set2.bits
+    }
+
+    pub fn major(dev: ::dev_t) -> ::c_uint {
+        let mut major = 0;
+        major |= (dev & 0x00000000000fff00) >> 8;
+        major |= (dev & 0xfffff00000000000) >> 32;
+        major as ::c_uint
+    }
+
+    pub fn minor(dev: ::dev_t) -> ::c_uint {
+        let mut minor = 0;
+        minor |= (dev & 0xfffff00000000000) >> 0;
+        minor |= (dev & 0x00000ffffff00000) >> 12;
+        minor as ::c_uint
+    }
+
+    pub fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t {
+        let major = major as ::dev_t;
+        let minor = minor as ::dev_t;
+        let mut dev = 0;
+        dev |= (major & 0x00000fff) << 8;
+        dev |= (major & 0xfffff000) << 32;
+        dev |= (minor & 0x000000ff) << 0;
+        dev |= (minor & 0xffffff00) << 12;
+        dev
+    }
+}
+
+extern {
+    pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
+    pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
+    pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
+    pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
+    pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
+    pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
+                       timeout: *const ::timespec) -> ::c_int;
+    pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
+    pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
+                      nitems: ::c_int, sevp: *mut ::sigevent) -> ::c_int;
+
+    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
+
+    pub fn setpwent();
+    pub fn endpwent();
+    pub fn getpwent() -> *mut passwd;
+    pub fn setspent();
+    pub fn endspent();
+    pub fn getspent() -> *mut spwd;
+    pub fn getspnam(__name: *const ::c_char) -> *mut spwd;
+
+    pub fn shm_open(name: *const c_char, oflag: ::c_int,
+                    mode: mode_t) -> ::c_int;
+
+    // System V IPC
+    pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
+    pub fn shmat(shmid: ::c_int,
+                 shmaddr: *const ::c_void,
+                 shmflg: ::c_int) -> *mut ::c_void;
+    pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int;
+    pub fn shmctl(shmid: ::c_int,
+                  cmd: ::c_int,
+                  buf: *mut ::shmid_ds) -> ::c_int;
+    pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
+    pub fn semget(key: ::key_t, nsems: ::c_int, semflag: ::c_int) -> ::c_int;
+    pub fn semop(semid: ::c_int,
+                 sops: *mut ::sembuf, nsops: ::size_t) -> ::c_int;
+    pub fn semctl(semid: ::c_int,
+                  semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int;
+    pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int;
+    pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
+    pub fn msgrcv(msqid: ::c_int, msgp: *mut ::c_void, msgsz: ::size_t,
+                  msgtyp: ::c_long, msgflg: ::c_int) -> ::ssize_t;
+    pub fn msgsnd(msqid: ::c_int, msgp: *const ::c_void, msgsz: ::size_t,
+                  msgflg: ::c_int) -> ::c_int;
+
+    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
+                    -> ::c_int;
+    pub fn __errno_location() -> *mut ::c_int;
+
+    pub fn fopen64(filename: *const c_char,
+                   mode: *const c_char) -> *mut ::FILE;
+    pub fn freopen64(filename: *const c_char, mode: *const c_char,
+                     file: *mut ::FILE) -> *mut ::FILE;
+    pub fn tmpfile64() -> *mut ::FILE;
+    pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int;
+    pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
+    pub fn fseeko64(stream: *mut ::FILE,
+                    offset: ::off64_t,
+                    whence: ::c_int) -> ::c_int;
+    pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
+    pub fn fallocate(fd: ::c_int, mode: ::c_int,
+                     offset: ::off_t, len: ::off_t) -> ::c_int;
+    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
+                           len: ::off_t) -> ::c_int;
+    pub fn readahead(fd: ::c_int, offset: ::off64_t,
+                     count: ::size_t) -> ::ssize_t;
+    pub fn getxattr(path: *const c_char, name: *const c_char,
+                    value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
+    pub fn lgetxattr(path: *const c_char, name: *const c_char,
+                     value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
+    pub fn fgetxattr(filedes: ::c_int, name: *const c_char,
+                     value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
+    pub fn setxattr(path: *const c_char, name: *const c_char,
+                    value: *const ::c_void, size: ::size_t,
+                    flags: ::c_int) -> ::c_int;
+    pub fn lsetxattr(path: *const c_char, name: *const c_char,
+                     value: *const ::c_void, size: ::size_t,
+                     flags: ::c_int) -> ::c_int;
+    pub fn fsetxattr(filedes: ::c_int, name: *const c_char,
+                     value: *const ::c_void, size: ::size_t,
+                     flags: ::c_int) -> ::c_int;
+    pub fn listxattr(path: *const c_char, list: *mut c_char,
+                     size: ::size_t) -> ::ssize_t;
+    pub fn llistxattr(path: *const c_char, list: *mut c_char,
+                      size: ::size_t) -> ::ssize_t;
+    pub fn flistxattr(filedes: ::c_int, list: *mut c_char,
+                      size: ::size_t) -> ::ssize_t;
+    pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int;
+    pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int;
+    pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int;
+    pub fn signalfd(fd: ::c_int,
+                    mask: *const ::sigset_t,
+                    flags: ::c_int) -> ::c_int;
+    pub fn pwritev(fd: ::c_int,
+                   iov: *const ::iovec,
+                   iovcnt: ::c_int,
+                   offset: ::off_t) -> ::ssize_t;
+    pub fn preadv(fd: ::c_int,
+                  iov: *const ::iovec,
+                  iovcnt: ::c_int,
+                  offset: ::off_t) -> ::ssize_t;
+    pub fn quotactl(cmd: ::c_int,
+                    special: *const ::c_char,
+                    id: ::c_int,
+                    data: *mut ::c_char) -> ::c_int;
+    pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
+    pub fn mq_close(mqd: ::mqd_t) -> ::c_int;
+    pub fn mq_unlink(name: *const ::c_char) -> ::c_int;
+    pub fn mq_receive(mqd: ::mqd_t,
+                      msg_ptr: *mut ::c_char,
+                      msg_len: ::size_t,
+                      msq_prio: *mut ::c_uint) -> ::ssize_t;
+    pub fn mq_send(mqd: ::mqd_t,
+                   msg_ptr: *const ::c_char,
+                   msg_len: ::size_t,
+                   msq_prio: ::c_uint) -> ::c_int;
+    pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;
+    pub fn mq_setattr(mqd: ::mqd_t,
+                      newattr: *const ::mq_attr,
+                      oldattr: *mut ::mq_attr) -> ::c_int;
+    pub fn epoll_pwait(epfd: ::c_int,
+                       events: *mut ::epoll_event,
+                       maxevents: ::c_int,
+                       timeout: ::c_int,
+                       sigmask: *const ::sigset_t) -> ::c_int;
+    pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
+    pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
+    pub fn mkostemps(template: *mut ::c_char,
+                     suffixlen: ::c_int,
+                     flags: ::c_int) -> ::c_int;
+    pub fn sigtimedwait(set: *const sigset_t,
+                        info: *mut siginfo_t,
+                        timeout: *const ::timespec) -> ::c_int;
+    pub fn sigwaitinfo(set: *const sigset_t,
+                       info: *mut siginfo_t) -> ::c_int;
+    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
+    pub fn getnameinfo(sa: *const ::sockaddr,
+                       salen: ::socklen_t,
+                       host: *mut ::c_char,
+                       hostlen: ::socklen_t,
+                       serv: *mut ::c_char,
+                       sevlen: ::socklen_t,
+                       flags: ::c_int) -> ::c_int;
+    pub fn pthread_setschedprio(native: ::pthread_t,
+                                priority: ::c_int) -> ::c_int;
+    pub fn prlimit(pid: ::pid_t, resource: ::c_int, new_limit: *const ::rlimit,
+                   old_limit: *mut ::rlimit) -> ::c_int;
+    pub fn prlimit64(pid: ::pid_t,
+                     resource: ::c_int,
+                     new_limit: *const ::rlimit64,
+                     old_limit: *mut ::rlimit64) -> ::c_int;
+    pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
+    pub fn process_vm_readv(pid: ::pid_t,
+                            local_iov: *const ::iovec,
+                            liovcnt: ::c_ulong,
+                            remote_iov: *const ::iovec,
+                            riovcnt: ::c_ulong,
+                            flags: ::c_ulong) -> isize;
+    pub fn process_vm_writev(pid: ::pid_t,
+                             local_iov: *const ::iovec,
+                             liovcnt: ::c_ulong,
+                             remote_iov: *const ::iovec,
+                             riovcnt: ::c_ulong,
+                             flags: ::c_ulong) -> isize;
+    pub fn reboot(how_to: ::c_int) -> ::c_int;
+    pub fn setfsgid(gid: ::gid_t) -> ::c_int;
+    pub fn setfsuid(uid: ::uid_t) -> ::c_int;
+
+    // Not available now on Android
+    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
+                    mode: ::mode_t) -> ::c_int;
+    pub fn if_nameindex() -> *mut if_nameindex;
+    pub fn if_freenameindex(ptr: *mut if_nameindex);
+    pub fn sync_file_range(fd: ::c_int, offset: ::off64_t,
+                           nbytes: ::off64_t, flags: ::c_uint) -> ::c_int;
+    pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
+    pub fn freeifaddrs(ifa: *mut ::ifaddrs);
+
+    pub fn mremap(addr: *mut ::c_void,
+                  len: ::size_t,
+                  new_len: ::size_t,
+                  flags: ::c_int,
+                  ...) -> *mut ::c_void;
+
+    pub fn glob(pattern: *const c_char,
+                flags: ::c_int,
+                errfunc: Option<extern fn(epath: *const c_char,
+                                          errno: ::c_int) -> ::c_int>,
+                pglob: *mut ::glob_t) -> ::c_int;
+    pub fn globfree(pglob: *mut ::glob_t);
+
+    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
+                         -> ::c_int;
+
+    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
+
+    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
+
+    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
+    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
+                  -> ::c_int;
+
+    pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
+
+    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
+                    flags: ::c_int, addr: *mut ::sockaddr,
+                    addrlen: *mut ::socklen_t) -> ::ssize_t;
+    pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
+    pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int;
+    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
+
+    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
+                address_len: ::socklen_t) -> ::c_int;
+
+    pub fn writev(fd: ::c_int,
+                  iov: *const ::iovec,
+                  iovcnt: ::c_int) -> ::ssize_t;
+    pub fn readv(fd: ::c_int,
+                 iov: *const ::iovec,
+                 iovcnt: ::c_int) -> ::ssize_t;
+
+    pub fn sendmsg(fd: ::c_int,
+                   msg: *const ::msghdr,
+                   flags: ::c_int) -> ::ssize_t;
+    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
+                   -> ::ssize_t;
+    pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
+    pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
+    pub fn vhangup() -> ::c_int;
+    pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
+                    flags: ::c_int) -> ::c_int;
+    pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
+                    flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
+    pub fn sync();
+    pub fn syscall(num: ::c_long, ...) -> ::c_long;
+    pub fn sched_getaffinity(pid: ::pid_t,
+                             cpusetsize: ::size_t,
+                             cpuset: *mut cpu_set_t) -> ::c_int;
+    pub fn sched_setaffinity(pid: ::pid_t,
+                             cpusetsize: ::size_t,
+                             cpuset: *const cpu_set_t) -> ::c_int;
+    pub fn epoll_create(size: ::c_int) -> ::c_int;
+    pub fn epoll_create1(flags: ::c_int) -> ::c_int;
+    pub fn epoll_wait(epfd: ::c_int,
+                      events: *mut ::epoll_event,
+                      maxevents: ::c_int,
+                      timeout: ::c_int) -> ::c_int;
+    pub fn epoll_ctl(epfd: ::c_int,
+                     op: ::c_int,
+                     fd: ::c_int,
+                     event: *mut ::epoll_event) -> ::c_int;
+    pub fn pthread_getschedparam(native: ::pthread_t,
+                                 policy: *mut ::c_int,
+                                 param: *mut ::sched_param) -> ::c_int;
+    pub fn unshare(flags: ::c_int) -> ::c_int;
+    pub fn umount(target: *const ::c_char) -> ::c_int;
+    pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
+    pub fn tee(fd_in: ::c_int,
+               fd_out: ::c_int,
+               len: ::size_t,
+               flags: ::c_uint) -> ::ssize_t;
+    pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
+    pub fn splice(fd_in: ::c_int,
+                  off_in: *mut ::loff_t,
+                  fd_out: ::c_int,
+                  off_out: *mut ::loff_t,
+                  len: ::size_t,
+                  flags: ::c_uint) -> ::ssize_t;
+    pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
+    pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn sem_timedwait(sem: *mut sem_t,
+                         abstime: *const ::timespec) -> ::c_int;
+    pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int;
+    pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
+    pub fn swapoff(puath: *const ::c_char) -> ::c_int;
+    pub fn vmsplice(fd: ::c_int,
+                    iov: *const ::iovec,
+                    nr_segs: ::size_t,
+                    flags: ::c_uint) -> ::ssize_t;
+    pub fn mount(src: *const ::c_char,
+                 target: *const ::c_char,
+                 fstype: *const ::c_char,
+                 flags: ::c_ulong,
+                 data: *const ::c_void) -> ::c_int;
+    pub fn personality(persona: ::c_ulong) -> ::c_int;
+    pub fn prctl(option: ::c_int, ...) -> ::c_int;
+    pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int;
+    pub fn ppoll(fds: *mut ::pollfd,
+                 nfds: nfds_t,
+                 timeout: *const ::timespec,
+                 sigmask: *const sigset_t) -> ::c_int;
+    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
+                                   abstime: *const ::timespec) -> ::c_int;
+    pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int,
+                 child_stack: *mut ::c_void,
+                 flags: ::c_int,
+                 arg: *mut ::c_void, ...) -> ::c_int;
+    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
+    pub fn clock_nanosleep(clk_id: ::clockid_t,
+                           flags: ::c_int,
+                           rqtp: *const ::timespec,
+                           rmtp:  *mut ::timespec) -> ::c_int;
+    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
+                                     guardsize: *mut ::size_t) -> ::c_int;
+    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
+    pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
+    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
+                                       pshared: *mut ::c_int) -> ::c_int;
+    pub fn sysinfo(info: *mut ::sysinfo) -> ::c_int;
+    pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int;
+    pub fn pthread_setschedparam(native: ::pthread_t,
+                                 policy: ::c_int,
+                                 param: *const ::sched_param) -> ::c_int;
+    pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int;
+    pub fn sched_setscheduler(pid: ::pid_t,
+                              policy: ::c_int,
+                              param: *const ::sched_param) -> ::c_int;
+    pub fn sendfile(out_fd: ::c_int,
+                    in_fd: ::c_int,
+                    offset: *mut off_t,
+                    count: ::size_t) -> ::ssize_t;
+    pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
+    pub fn getgrgid_r(uid: ::uid_t,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "sigaltstack$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
+    pub fn sigaltstack(ss: *const stack_t,
+                       oss: *mut stack_t) -> ::c_int;
+    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
+    pub fn getdtablesize() -> ::c_int;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
+    pub fn getgrnam_r(name: *const ::c_char,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_sigmask$UNIX2003")]
+    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
+                           oldset: *mut sigset_t) -> ::c_int;
+    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
+    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
+    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
+    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
+    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
+    pub fn getpwnam_r(name: *const ::c_char,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
+    pub fn getpwuid_r(uid: ::uid_t,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
+               link_name = "sigwait$UNIX2003")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
+    pub fn sigwait(set: *const sigset_t,
+                   sig: *mut ::c_int) -> ::c_int;
+    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
+                          parent: Option<unsafe extern fn()>,
+                          child: Option<unsafe extern fn()>) -> ::c_int;
+    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
+    pub fn getgrouplist(user: *const ::c_char,
+                        group: ::gid_t,
+                        groups: *mut ::gid_t,
+                        ngroups: *mut ::c_int) -> ::c_int;
+    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
+                                        pshared: *mut ::c_int) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "popen$UNIX2003")]
+    pub fn popen(command: *const c_char,
+                 mode: *const c_char) -> *mut ::FILE;
+    pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
+                     mode: ::c_int, flags: ::c_int) -> ::c_int;
+    pub fn pthread_create(native: *mut ::pthread_t,
+                          attr: *const ::pthread_attr_t,
+                          f: extern fn(*mut ::c_void) -> *mut ::c_void,
+                          value: *mut ::c_void) -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(any(target_env = "musl", target_os = "fuchsia"))] {
+        mod musl;
+        pub use self::musl::*;
+    } else if #[cfg(any(target_arch = "mips",
+                        target_arch = "mips64"))] {
+        mod mips;
+        pub use self::mips::*;
+    } else if #[cfg(any(target_arch = "s390x"))] {
+        mod s390x;
+        pub use self::s390x::*;
+    } else {
+        mod other;
+        pub use self::other::*;
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b32/arm.rs
@@ -0,0 +1,392 @@
+pub type c_char = u8;
+pub type wchar_t = u32;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        __st_dev_padding: ::c_int,
+        __st_ino_truncated: ::c_long,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __st_rdev_padding: ::c_int,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_ino: ::ino_t,
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        __st_dev_padding: ::c_int,
+        __st_ino_truncated: ::c_long,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __st_rdev_padding: ::c_int,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_ino: ::ino_t,
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_flags: ::c_int,
+        pub ss_size: ::size_t
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        __unused1: ::c_int,
+        pub shm_dtime: ::time_t,
+        __unused2: ::c_int,
+        pub shm_ctime: ::time_t,
+        __unused3: ::c_int,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::c_ulong,
+        __pad1: ::c_ulong,
+        __pad2: ::c_ulong,
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        pub msg_stime: ::time_t,
+        __unused1: ::c_int,
+        pub msg_rtime: ::time_t,
+        __unused2: ::c_int,
+        pub msg_ctime: ::time_t,
+        __unused3: ::c_int,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __pad1: ::c_ulong,
+        __pad2: ::c_ulong,
+    }
+
+    pub struct statfs {
+        pub f_type: ::c_ulong,
+        pub f_bsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_flags: ::c_ulong,
+        pub f_spare: [::c_ulong; 4],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_errno: ::c_int,
+        pub si_code: ::c_int,
+        pub _pad: [::c_int; 29],
+        _align: [usize; 0],
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::c_ulong,
+        pub f_bsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_flags: ::c_ulong,
+        pub f_spare: [::c_ulong; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        pub f_fsid: ::c_ulong,
+        __f_unused: ::c_int,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+}
+
+pub const O_DIRECT: ::c_int = 0x4000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+pub const O_ASYNC: ::c_int = 0x2000;
+pub const O_LARGEFILE: ::c_int = 0o400000;
+
+pub const FIOCLEX: ::c_int = 0x5451;
+pub const FIONBIO: ::c_int = 0x5421;
+
+pub const RLIMIT_RSS: ::c_int = 5;
+pub const RLIMIT_NOFILE: ::c_int = 7;
+pub const RLIMIT_AS: ::c_int = 9;
+pub const RLIMIT_NPROC: ::c_int = 6;
+pub const RLIMIT_MEMLOCK: ::c_int = 8;
+
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 1052672;
+pub const O_RSYNC: ::c_int = 1052672;
+pub const O_DSYNC: ::c_int = 4096;
+
+pub const SOCK_NONBLOCK: ::c_int = 2048;
+
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+pub const MAP_DENYWRITE: ::c_int = 0x0800;
+pub const MAP_EXECUTABLE: ::c_int = 0x01000;
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_POPULATE: ::c_int = 0x08000;
+pub const MAP_NONBLOCK: ::c_int = 0x010000;
+pub const MAP_STACK: ::c_int = 0x020000;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOCK_SEQPACKET: ::c_int = 5;
+
+pub const SOL_SOCKET: ::c_int = 1;
+
+pub const EDEADLK: ::c_int = 35;
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+pub const EDEADLOCK: ::c_int = EDEADLK;
+pub const EMULTIHOP: ::c_int = 72;
+pub const EBADMSG: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ENETDOWN: ::c_int = 100;
+pub const ENETUNREACH: ::c_int = 101;
+pub const ENETRESET: ::c_int = 102;
+pub const ECONNABORTED: ::c_int = 103;
+pub const ECONNRESET: ::c_int = 104;
+pub const ENOBUFS: ::c_int = 105;
+pub const EISCONN: ::c_int = 106;
+pub const ENOTCONN: ::c_int = 107;
+pub const ESHUTDOWN: ::c_int = 108;
+pub const ETOOMANYREFS: ::c_int = 109;
+pub const ETIMEDOUT: ::c_int = 110;
+pub const ECONNREFUSED: ::c_int = 111;
+pub const EHOSTDOWN: ::c_int = 112;
+pub const EHOSTUNREACH: ::c_int = 113;
+pub const EALREADY: ::c_int = 114;
+pub const EINPROGRESS: ::c_int = 115;
+pub const ESTALE: ::c_int = 116;
+pub const EUCLEAN: ::c_int = 117;
+pub const ENOTNAM: ::c_int = 118;
+pub const ENAVAIL: ::c_int = 119;
+pub const EISNAM: ::c_int = 120;
+pub const EREMOTEIO: ::c_int = 121;
+pub const EDQUOT: ::c_int = 122;
+pub const ENOMEDIUM: ::c_int = 123;
+pub const EMEDIUMTYPE: ::c_int = 124;
+pub const ECANCELED: ::c_int = 125;
+pub const ENOKEY: ::c_int = 126;
+pub const EKEYEXPIRED: ::c_int = 127;
+pub const EKEYREVOKED: ::c_int = 128;
+pub const EKEYREJECTED: ::c_int = 129;
+pub const EOWNERDEAD: ::c_int = 130;
+pub const ENOTRECOVERABLE: ::c_int = 131;
+pub const ERFKILL: ::c_int = 132;
+pub const EHWPOISON: ::c_int = 133;
+
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_PASSCRED: ::c_int = 16;
+pub const SO_PEERCRED: ::c_int = 17;
+pub const SO_RCVLOWAT: ::c_int = 18;
+pub const SO_SNDLOWAT: ::c_int = 19;
+pub const SO_RCVTIMEO: ::c_int = 20;
+pub const SO_SNDTIMEO: ::c_int = 21;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
+
+pub const EXTPROC: ::tcflag_t = 0x00010000;
+
+pub const MAP_HUGETLB: ::c_int = 0x040000;
+
+pub const F_GETLK: ::c_int = 12;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETLK: ::c_int = 13;
+pub const F_SETLKW: ::c_int = 14;
+pub const F_SETOWN: ::c_int = 8;
+
+pub const VEOF: usize = 4;
+pub const VEOL: usize = 11;
+pub const VEOL2: usize = 16;
+pub const VMIN: usize = 6;
+pub const IEXTEN: ::tcflag_t = 0x00008000;
+pub const TOSTOP: ::tcflag_t = 0x00000100;
+pub const FLUSHO: ::tcflag_t = 0x00001000;
+
+pub const TCGETS: ::c_int = 0x5401;
+pub const TCSETS: ::c_int = 0x5402;
+pub const TCSETSW: ::c_int = 0x5403;
+pub const TCSETSF: ::c_int = 0x5404;
+pub const TCGETA: ::c_int = 0x5405;
+pub const TCSETA: ::c_int = 0x5406;
+pub const TCSETAW: ::c_int = 0x5407;
+pub const TCSETAF: ::c_int = 0x5408;
+pub const TCSBRK: ::c_int = 0x5409;
+pub const TCXONC: ::c_int = 0x540A;
+pub const TCFLSH: ::c_int = 0x540B;
+pub const TIOCGSOFTCAR: ::c_int = 0x5419;
+pub const TIOCSSOFTCAR: ::c_int = 0x541A;
+pub const TIOCLINUX: ::c_int = 0x541C;
+pub const TIOCGSERIAL: ::c_int = 0x541E;
+pub const TIOCEXCL: ::c_int = 0x540C;
+pub const TIOCNXCL: ::c_int = 0x540D;
+pub const TIOCSCTTY: ::c_int = 0x540E;
+pub const TIOCGPGRP: ::c_int = 0x540F;
+pub const TIOCSPGRP: ::c_int = 0x5410;
+pub const TIOCOUTQ: ::c_int = 0x5411;
+pub const TIOCSTI: ::c_int = 0x5412;
+pub const TIOCGWINSZ: ::c_int = 0x5413;
+pub const TIOCSWINSZ: ::c_int = 0x5414;
+pub const TIOCMGET: ::c_int = 0x5415;
+pub const TIOCMBIS: ::c_int = 0x5416;
+pub const TIOCMBIC: ::c_int = 0x5417;
+pub const TIOCMSET: ::c_int = 0x5418;
+pub const FIONREAD: ::c_int = 0x541B;
+pub const TIOCCONS: ::c_int = 0x541D;
+
+pub const SYS_pivot_root: ::c_long = 218;
+pub const SYS_gettid: ::c_long = 224;
+pub const SYS_perf_event_open: ::c_long = 364;
+pub const SYS_memfd_create: ::c_long = 385;
+
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const TIOCM_LE: ::c_int = 0x001;
+pub const TIOCM_DTR: ::c_int = 0x002;
+pub const TIOCM_RTS: ::c_int = 0x004;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+pub const TIOCM_CD: ::c_int = TIOCM_CAR;
+pub const TIOCM_RI: ::c_int = TIOCM_RNG;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b32/mips.rs
@@ -0,0 +1,404 @@
+pub type c_char = i8;
+pub type wchar_t = ::c_int;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        __st_padding1: [::c_long; 2],
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __st_padding2: [::c_long; 2],
+        pub st_size: ::off_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        __st_padding3: ::c_long,
+        pub st_blocks: ::blkcnt_t,
+        __st_padding4: [::c_long; 14],
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        __st_padding1: [::c_long; 2],
+        pub st_ino: ::ino64_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __st_padding2: [::c_long; 2],
+        pub st_size: ::off_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        __st_padding3: ::c_long,
+        pub st_blocks: ::blkcnt64_t,
+        __st_padding4: [::c_long; 14],
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_size: ::size_t,
+        pub ss_flags: ::c_int,
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::c_ulong,
+        __pad1: ::c_ulong,
+        __pad2: ::c_ulong,
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        #[cfg(target_endian = "big")]
+        __unused1: ::c_int,
+        pub msg_stime: ::time_t,
+        #[cfg(target_endian = "little")]
+        __unused1: ::c_int,
+        #[cfg(target_endian = "big")]
+        __unused2: ::c_int,
+        pub msg_rtime: ::time_t,
+        #[cfg(target_endian = "little")]
+        __unused2: ::c_int,
+        #[cfg(target_endian = "big")]
+        __unused3: ::c_int,
+        pub msg_ctime: ::time_t,
+        #[cfg(target_endian = "little")]
+        __unused3: ::c_int,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __pad1: ::c_ulong,
+        __pad2: ::c_ulong,
+    }
+
+    pub struct statfs {
+        pub f_type: ::c_ulong,
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_ulong,
+        pub f_flags: ::c_ulong,
+        pub f_spare: [::c_ulong; 5],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_code: ::c_int,
+        pub si_errno: ::c_int,
+        pub _pad: [::c_int; 29],
+        _align: [usize; 0],
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::c_ulong,
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_ulong,
+        pub f_flags: ::c_ulong,
+        pub f_spare: [::c_ulong; 5],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        #[cfg(target_endian = "little")]
+        pub f_fsid: ::c_ulong,
+        __f_unused: ::c_int,
+        #[cfg(target_endian = "big")]
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+}
+
+pub const O_DIRECT: ::c_int = 0o100000;
+pub const O_DIRECTORY: ::c_int = 0o200000;
+pub const O_NOFOLLOW: ::c_int = 0o400000;
+pub const O_ASYNC: ::c_int = 0o10000;
+pub const O_LARGEFILE: ::c_int = 0x2000;
+
+pub const FIOCLEX: ::c_int = 0x6601;
+pub const FIONBIO: ::c_int = 0x667E;
+
+pub const RLIMIT_RSS: ::c_int = 7;
+pub const RLIMIT_NOFILE: ::c_int = 5;
+pub const RLIMIT_AS: ::c_int = 6;
+pub const RLIMIT_NPROC: ::c_int = 8;
+pub const RLIMIT_MEMLOCK: ::c_int = 9;
+
+pub const O_APPEND: ::c_int = 0o010;
+pub const O_CREAT: ::c_int = 0o400;
+pub const O_EXCL: ::c_int = 0o2000;
+pub const O_NOCTTY: ::c_int = 0o4000;
+pub const O_NONBLOCK: ::c_int = 0o200;
+pub const O_SYNC: ::c_int = 0o40020;
+pub const O_RSYNC: ::c_int = 0o40020;
+pub const O_DSYNC: ::c_int = 0o020;
+
+pub const SOCK_NONBLOCK: ::c_int = 0o200;
+
+pub const MAP_ANON: ::c_int = 0x800;
+pub const MAP_GROWSDOWN: ::c_int = 0x1000;
+pub const MAP_DENYWRITE: ::c_int = 0x2000;
+pub const MAP_EXECUTABLE: ::c_int = 0x4000;
+pub const MAP_LOCKED: ::c_int = 0x8000;
+pub const MAP_NORESERVE: ::c_int = 0x0400;
+pub const MAP_POPULATE: ::c_int = 0x10000;
+pub const MAP_NONBLOCK: ::c_int = 0x20000;
+pub const MAP_STACK: ::c_int = 0x40000;
+
+pub const EDEADLK: ::c_int = 45;
+pub const ENAMETOOLONG: ::c_int = 78;
+pub const ENOLCK: ::c_int = 46;
+pub const ENOSYS: ::c_int = 89;
+pub const ENOTEMPTY: ::c_int = 93;
+pub const ELOOP: ::c_int = 90;
+pub const ENOMSG: ::c_int = 35;
+pub const EIDRM: ::c_int = 36;
+pub const ECHRNG: ::c_int = 37;
+pub const EL2NSYNC: ::c_int = 38;
+pub const EL3HLT: ::c_int = 39;
+pub const EL3RST: ::c_int = 40;
+pub const ELNRNG: ::c_int = 41;
+pub const EUNATCH: ::c_int = 42;
+pub const ENOCSI: ::c_int = 43;
+pub const EL2HLT: ::c_int = 44;
+pub const EBADE: ::c_int = 50;
+pub const EBADR: ::c_int = 51;
+pub const EXFULL: ::c_int = 52;
+pub const ENOANO: ::c_int = 53;
+pub const EBADRQC: ::c_int = 54;
+pub const EBADSLT: ::c_int = 55;
+pub const EDEADLOCK: ::c_int = 56;
+pub const EMULTIHOP: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 79;
+pub const ENOTUNIQ: ::c_int = 80;
+pub const EBADFD: ::c_int = 81;
+pub const EBADMSG: ::c_int = 77;
+pub const EREMCHG: ::c_int = 82;
+pub const ELIBACC: ::c_int = 83;
+pub const ELIBBAD: ::c_int = 84;
+pub const ELIBSCN: ::c_int = 85;
+pub const ELIBMAX: ::c_int = 86;
+pub const ELIBEXEC: ::c_int = 87;
+pub const EILSEQ: ::c_int = 88;
+pub const ERESTART: ::c_int = 91;
+pub const ESTRPIPE: ::c_int = 92;
+pub const EUSERS: ::c_int = 94;
+pub const ENOTSOCK: ::c_int = 95;
+pub const EDESTADDRREQ: ::c_int = 96;
+pub const EMSGSIZE: ::c_int = 97;
+pub const EPROTOTYPE: ::c_int = 98;
+pub const ENOPROTOOPT: ::c_int = 99;
+pub const EPROTONOSUPPORT: ::c_int = 120;
+pub const ESOCKTNOSUPPORT: ::c_int = 121;
+pub const EOPNOTSUPP: ::c_int = 122;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 123;
+pub const EAFNOSUPPORT: ::c_int = 124;
+pub const EADDRINUSE: ::c_int = 125;
+pub const EADDRNOTAVAIL: ::c_int = 126;
+pub const ENETDOWN: ::c_int = 127;
+pub const ENETUNREACH: ::c_int = 128;
+pub const ENETRESET: ::c_int = 129;
+pub const ECONNABORTED: ::c_int = 130;
+pub const ECONNRESET: ::c_int = 131;
+pub const ENOBUFS: ::c_int = 132;
+pub const EISCONN: ::c_int = 133;
+pub const ENOTCONN: ::c_int = 134;
+pub const ESHUTDOWN: ::c_int = 143;
+pub const ETOOMANYREFS: ::c_int = 144;
+pub const ETIMEDOUT: ::c_int = 145;
+pub const ECONNREFUSED: ::c_int = 146;
+pub const EHOSTDOWN: ::c_int = 147;
+pub const EHOSTUNREACH: ::c_int = 148;
+pub const EALREADY: ::c_int = 149;
+pub const EINPROGRESS: ::c_int = 150;
+pub const ESTALE: ::c_int = 151;
+pub const EUCLEAN: ::c_int = 135;
+pub const ENOTNAM: ::c_int = 137;
+pub const ENAVAIL: ::c_int = 138;
+pub const EISNAM: ::c_int = 139;
+pub const EREMOTEIO: ::c_int = 140;
+pub const EDQUOT: ::c_int = 1133;
+pub const ENOMEDIUM: ::c_int = 159;
+pub const EMEDIUMTYPE: ::c_int = 160;
+pub const ECANCELED: ::c_int = 158;
+pub const ENOKEY: ::c_int = 161;
+pub const EKEYEXPIRED: ::c_int = 162;
+pub const EKEYREVOKED: ::c_int = 163;
+pub const EKEYREJECTED: ::c_int = 164;
+pub const EOWNERDEAD: ::c_int = 165;
+pub const ENOTRECOVERABLE: ::c_int = 166;
+pub const EHWPOISON: ::c_int = 168;
+pub const ERFKILL: ::c_int = 167;
+
+pub const SOCK_STREAM: ::c_int = 2;
+pub const SOCK_DGRAM: ::c_int = 1;
+pub const SOCK_SEQPACKET: ::c_int = 5;
+
+pub const SOL_SOCKET: ::c_int = 65535;
+
+pub const SO_REUSEADDR: ::c_int = 0x0004;
+pub const SO_KEEPALIVE: ::c_int = 0x0008;
+pub const SO_DONTROUTE: ::c_int = 0x0010;
+pub const SO_BROADCAST: ::c_int = 0x0020;
+pub const SO_LINGER: ::c_int = 0x0080;
+pub const SO_OOBINLINE: ::c_int = 0x0100;
+pub const SO_REUSEPORT: ::c_int = 0x0200;
+pub const SO_SNDBUF: ::c_int = 0x1001;
+pub const SO_RCVBUF: ::c_int = 0x1002;
+pub const SO_SNDLOWAT: ::c_int = 0x1003;
+pub const SO_RCVLOWAT: ::c_int = 0x1004;
+pub const SO_RCVTIMEO: ::c_int = 0x1006;
+pub const SO_SNDTIMEO: ::c_int = 0x1005;
+pub const SO_ERROR: ::c_int = 0x1007;
+pub const SO_TYPE: ::c_int = 0x1008;
+pub const SO_ACCEPTCONN: ::c_int = 0x1009;
+pub const SO_PROTOCOL: ::c_int = 0x1028;
+pub const SO_DOMAIN: ::c_int = 0x1029;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_PASSCRED: ::c_int = 17;
+pub const SO_PEERCRED: ::c_int = 18;
+pub const SO_SNDBUFFORCE: ::c_int = 31;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 8;
+pub const SA_NOCLDWAIT: ::c_int = 0x10000;
+
+pub const SIGCHLD: ::c_int = 18;
+pub const SIGBUS: ::c_int = 10;
+pub const SIGTTIN: ::c_int = 26;
+pub const SIGTTOU: ::c_int = 27;
+pub const SIGXCPU: ::c_int = 30;
+pub const SIGXFSZ: ::c_int = 31;
+pub const SIGVTALRM: ::c_int = 28;
+pub const SIGPROF: ::c_int = 29;
+pub const SIGWINCH: ::c_int = 20;
+pub const SIGUSR1: ::c_int = 16;
+pub const SIGUSR2: ::c_int = 17;
+pub const SIGCONT: ::c_int = 25;
+pub const SIGSTOP: ::c_int = 23;
+pub const SIGTSTP: ::c_int = 24;
+pub const SIGURG: ::c_int = 21;
+pub const SIGIO: ::c_int = 22;
+pub const SIGSYS: ::c_int = 12;
+pub const SIGSTKFLT: ::c_int = 7;
+pub const SIGPOLL: ::c_int = ::SIGIO;
+pub const SIGPWR: ::c_int = 19;
+pub const SIG_SETMASK: ::c_int = 3;
+pub const SIG_BLOCK: ::c_int = 1;
+pub const SIG_UNBLOCK: ::c_int = 2;
+
+pub const EXTPROC: ::tcflag_t = 0o200000;
+
+pub const MAP_HUGETLB: ::c_int = 0x80000;
+
+pub const F_GETLK: ::c_int = 33;
+pub const F_GETOWN: ::c_int = 23;
+pub const F_SETLK: ::c_int = 34;
+pub const F_SETLKW: ::c_int = 35;
+pub const F_SETOWN: ::c_int = 24;
+
+pub const VEOF: usize = 16;
+pub const VEOL: usize = 17;
+pub const VEOL2: usize = 6;
+pub const VMIN: usize = 4;
+pub const IEXTEN: ::tcflag_t = 0o000400;
+pub const TOSTOP: ::tcflag_t = 0o100000;
+pub const FLUSHO: ::tcflag_t = 0o020000;
+
+pub const TCGETS: ::c_int = 0x540D;
+pub const TCSETS: ::c_int = 0x540E;
+pub const TCSETSW: ::c_int = 0x540F;
+pub const TCSETSF: ::c_int = 0x5410;
+pub const TCGETA: ::c_int = 0x5401;
+pub const TCSETA: ::c_int = 0x5402;
+pub const TCSETAW: ::c_int = 0x5403;
+pub const TCSETAF: ::c_int = 0x5404;
+pub const TCSBRK: ::c_int = 0x5405;
+pub const TCXONC: ::c_int = 0x5406;
+pub const TCFLSH: ::c_int = 0x5407;
+pub const TIOCGSOFTCAR: ::c_int = 0x5481;
+pub const TIOCSSOFTCAR: ::c_int = 0x5482;
+pub const TIOCLINUX: ::c_int = 0x5483;
+pub const TIOCGSERIAL: ::c_int = 0x5484;
+pub const TIOCEXCL: ::c_int = 0x740D;
+pub const TIOCNXCL: ::c_int = 0x740E;
+pub const TIOCSCTTY: ::c_int = 0x5480;
+pub const TIOCGPGRP: ::c_int = 0x40047477;
+pub const TIOCSPGRP: ::c_int = 0x80047476;
+pub const TIOCOUTQ: ::c_int = 0x7472;
+pub const TIOCSTI: ::c_int = 0x5472;
+pub const TIOCGWINSZ: ::c_int = 0x40087468;
+pub const TIOCSWINSZ: ::c_int = 0x80087467;
+pub const TIOCMGET: ::c_int = 0x741D;
+pub const TIOCMBIS: ::c_int = 0x741B;
+pub const TIOCMBIC: ::c_int = 0x741C;
+pub const TIOCMSET: ::c_int = 0x741A;
+pub const FIONREAD: ::c_int = 0x467F;
+pub const TIOCCONS: ::c_int = 0x80047478;
+
+// Valid for O32
+pub const SYS_pivot_root: ::c_long = 4216;
+pub const SYS_gettid: ::c_long = 4222;
+pub const SYS_perf_event_open: ::c_long = 4333;
+pub const SYS_memfd_create: ::c_long = 4354;
+
+pub const POLLWRNORM: ::c_short = 0x4;
+pub const POLLWRBAND: ::c_short = 0x100;
+
+pub const TIOCM_LE: ::c_int = 0x001;
+pub const TIOCM_DTR: ::c_int = 0x002;
+pub const TIOCM_RTS: ::c_int = 0x004;
+pub const TIOCM_ST: ::c_int = 0x010;
+pub const TIOCM_SR: ::c_int = 0x020;
+pub const TIOCM_CTS: ::c_int = 0x040;
+pub const TIOCM_CAR: ::c_int = 0x100;
+pub const TIOCM_CD: ::c_int = TIOCM_CAR;
+pub const TIOCM_RNG: ::c_int = 0x200;
+pub const TIOCM_RI: ::c_int = TIOCM_RNG;
+pub const TIOCM_DSR: ::c_int = 0x400;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b32/mod.rs
@@ -0,0 +1,52 @@
+pub type c_long = i32;
+pub type c_ulong = u32;
+pub type nlink_t = u32;
+pub type __u64 = ::c_ulonglong;
+
+s! {
+    pub struct pthread_attr_t {
+        __size: [u32; 9]
+    }
+
+    pub struct sigset_t {
+        __val: [::c_ulong; 32],
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::c_int,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::socklen_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::socklen_t,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct sem_t {
+        __val: [::c_int; 4],
+    }
+}
+
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
+
+cfg_if! {
+    if #[cfg(any(target_arch = "x86"))] {
+        mod x86;
+        pub use self::x86::*;
+    } else if #[cfg(any(target_arch = "mips"))] {
+        mod mips;
+        pub use self::mips::*;
+    } else if #[cfg(any(target_arch = "arm"))] {
+        mod arm;
+        pub use self::arm::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b32/x86.rs
@@ -0,0 +1,800 @@
+pub type c_char = i8;
+pub type wchar_t = i32;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        __st_dev_padding: ::c_int,
+        __st_ino_truncated: ::c_long,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __st_rdev_padding: ::c_int,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_ino: ::ino_t,
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        __st_dev_padding: ::c_int,
+        __st_ino_truncated: ::c_long,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __st_rdev_padding: ::c_int,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_ino: ::ino_t,
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_flags: ::c_int,
+        pub ss_size: ::size_t
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        __unused1: ::c_int,
+        pub shm_dtime: ::time_t,
+        __unused2: ::c_int,
+        pub shm_ctime: ::time_t,
+        __unused3: ::c_int,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::c_ulong,
+        __pad1: ::c_ulong,
+        __pad2: ::c_ulong,
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        pub msg_stime: ::time_t,
+        __unused1: ::c_int,
+        pub msg_rtime: ::time_t,
+        __unused2: ::c_int,
+        pub msg_ctime: ::time_t,
+        __unused3: ::c_int,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __pad1: ::c_ulong,
+        __pad2: ::c_ulong,
+    }
+
+    pub struct statfs {
+        pub f_type: ::c_ulong,
+        pub f_bsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_flags: ::c_ulong,
+        pub f_spare: [::c_ulong; 4],
+    }
+
+    pub struct mcontext_t {
+        __private: [u32; 22]
+    }
+
+    pub struct ucontext_t {
+        pub uc_flags: ::c_ulong,
+        pub uc_link: *mut ucontext_t,
+        pub uc_stack: ::stack_t,
+        pub uc_mcontext: mcontext_t,
+        pub uc_sigmask: ::sigset_t,
+        __private: [u8; 112],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_errno: ::c_int,
+        pub si_code: ::c_int,
+        pub _pad: [::c_int; 29],
+        _align: [usize; 0],
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::c_ulong,
+        pub f_bsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_flags: ::c_ulong,
+        pub f_spare: [::c_ulong; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        pub f_fsid: ::c_ulong,
+        __f_unused: ::c_int,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+}
+
+pub const O_DIRECT: ::c_int = 0x4000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+pub const O_ASYNC: ::c_int = 0x2000;
+pub const O_LARGEFILE: ::c_int = 0o0100000;
+
+pub const FIOCLEX: ::c_int = 0x5451;
+pub const FIONBIO: ::c_int = 0x5421;
+
+pub const RLIMIT_RSS: ::c_int = 5;
+pub const RLIMIT_NOFILE: ::c_int = 7;
+pub const RLIMIT_AS: ::c_int = 9;
+pub const RLIMIT_NPROC: ::c_int = 6;
+pub const RLIMIT_MEMLOCK: ::c_int = 8;
+
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 1052672;
+pub const O_RSYNC: ::c_int = 1052672;
+pub const O_DSYNC: ::c_int = 4096;
+
+pub const SOCK_NONBLOCK: ::c_int = 2048;
+
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+pub const MAP_DENYWRITE: ::c_int = 0x0800;
+pub const MAP_EXECUTABLE: ::c_int = 0x01000;
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_POPULATE: ::c_int = 0x08000;
+pub const MAP_NONBLOCK: ::c_int = 0x010000;
+pub const MAP_STACK: ::c_int = 0x020000;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOCK_SEQPACKET: ::c_int = 5;
+
+pub const SOL_SOCKET: ::c_int = 1;
+
+pub const EDEADLK: ::c_int = 35;
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+pub const EDEADLOCK: ::c_int = EDEADLK;
+pub const EMULTIHOP: ::c_int = 72;
+pub const EBADMSG: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ENETDOWN: ::c_int = 100;
+pub const ENETUNREACH: ::c_int = 101;
+pub const ENETRESET: ::c_int = 102;
+pub const ECONNABORTED: ::c_int = 103;
+pub const ECONNRESET: ::c_int = 104;
+pub const ENOBUFS: ::c_int = 105;
+pub const EISCONN: ::c_int = 106;
+pub const ENOTCONN: ::c_int = 107;
+pub const ESHUTDOWN: ::c_int = 108;
+pub const ETOOMANYREFS: ::c_int = 109;
+pub const ETIMEDOUT: ::c_int = 110;
+pub const ECONNREFUSED: ::c_int = 111;
+pub const EHOSTDOWN: ::c_int = 112;
+pub const EHOSTUNREACH: ::c_int = 113;
+pub const EALREADY: ::c_int = 114;
+pub const EINPROGRESS: ::c_int = 115;
+pub const ESTALE: ::c_int = 116;
+pub const EUCLEAN: ::c_int = 117;
+pub const ENOTNAM: ::c_int = 118;
+pub const ENAVAIL: ::c_int = 119;
+pub const EISNAM: ::c_int = 120;
+pub const EREMOTEIO: ::c_int = 121;
+pub const EDQUOT: ::c_int = 122;
+pub const ENOMEDIUM: ::c_int = 123;
+pub const EMEDIUMTYPE: ::c_int = 124;
+pub const ECANCELED: ::c_int = 125;
+pub const ENOKEY: ::c_int = 126;
+pub const EKEYEXPIRED: ::c_int = 127;
+pub const EKEYREVOKED: ::c_int = 128;
+pub const EKEYREJECTED: ::c_int = 129;
+pub const EOWNERDEAD: ::c_int = 130;
+pub const ENOTRECOVERABLE: ::c_int = 131;
+pub const ERFKILL: ::c_int = 132;
+pub const EHWPOISON: ::c_int = 133;
+
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_PASSCRED: ::c_int = 16;
+pub const SO_PEERCRED: ::c_int = 17;
+pub const SO_RCVLOWAT: ::c_int = 18;
+pub const SO_SNDLOWAT: ::c_int = 19;
+pub const SO_RCVTIMEO: ::c_int = 20;
+pub const SO_SNDTIMEO: ::c_int = 21;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
+
+pub const EXTPROC: ::tcflag_t = 0x00010000;
+
+pub const MAP_HUGETLB: ::c_int = 0x040000;
+pub const MAP_32BIT: ::c_int = 0x0040;
+
+pub const F_GETLK: ::c_int = 12;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETLK: ::c_int = 13;
+pub const F_SETLKW: ::c_int = 14;
+pub const F_SETOWN: ::c_int = 8;
+
+pub const VEOF: usize = 4;
+pub const VEOL: usize = 11;
+pub const VEOL2: usize = 16;
+pub const VMIN: usize = 6;
+pub const IEXTEN: ::tcflag_t = 0x00008000;
+pub const TOSTOP: ::tcflag_t = 0x00000100;
+pub const FLUSHO: ::tcflag_t = 0x00001000;
+
+pub const TCGETS: ::c_int = 0x5401;
+pub const TCSETS: ::c_int = 0x5402;
+pub const TCSETSW: ::c_int = 0x5403;
+pub const TCSETSF: ::c_int = 0x5404;
+pub const TCGETA: ::c_int = 0x5405;
+pub const TCSETA: ::c_int = 0x5406;
+pub const TCSETAW: ::c_int = 0x5407;
+pub const TCSETAF: ::c_int = 0x5408;
+pub const TCSBRK: ::c_int = 0x5409;
+pub const TCXONC: ::c_int = 0x540A;
+pub const TCFLSH: ::c_int = 0x540B;
+pub const TIOCGSOFTCAR: ::c_int = 0x5419;
+pub const TIOCSSOFTCAR: ::c_int = 0x541A;
+pub const TIOCLINUX: ::c_int = 0x541C;
+pub const TIOCGSERIAL: ::c_int = 0x541E;
+pub const TIOCEXCL: ::c_int = 0x540C;
+pub const TIOCNXCL: ::c_int = 0x540D;
+pub const TIOCSCTTY: ::c_int = 0x540E;
+pub const TIOCGPGRP: ::c_int = 0x540F;
+pub const TIOCSPGRP: ::c_int = 0x5410;
+pub const TIOCOUTQ: ::c_int = 0x5411;
+pub const TIOCSTI: ::c_int = 0x5412;
+pub const TIOCGWINSZ: ::c_int = 0x5413;
+pub const TIOCSWINSZ: ::c_int = 0x5414;
+pub const TIOCMGET: ::c_int = 0x5415;
+pub const TIOCMBIS: ::c_int = 0x5416;
+pub const TIOCMBIC: ::c_int = 0x5417;
+pub const TIOCMSET: ::c_int = 0x5418;
+pub const FIONREAD: ::c_int = 0x541B;
+pub const TIOCCONS: ::c_int = 0x541D;
+
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const TIOCM_LE: ::c_int = 0x001;
+pub const TIOCM_DTR: ::c_int = 0x002;
+pub const TIOCM_RTS: ::c_int = 0x004;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+pub const TIOCM_CD: ::c_int = TIOCM_CAR;
+pub const TIOCM_RI: ::c_int = TIOCM_RNG;
+
+// Syscall table
+pub const SYS_restart_syscall: ::c_long = 0;
+pub const SYS_exit: ::c_long = 1;
+pub const SYS_fork: ::c_long = 2;
+pub const SYS_read: ::c_long = 3;
+pub const SYS_write: ::c_long = 4;
+pub const SYS_open: ::c_long = 5;
+pub const SYS_close: ::c_long = 6;
+pub const SYS_waitpid: ::c_long = 7;
+pub const SYS_creat: ::c_long = 8;
+pub const SYS_link: ::c_long = 9;
+pub const SYS_unlink: ::c_long = 10;
+pub const SYS_execve: ::c_long = 11;
+pub const SYS_chdir: ::c_long = 12;
+pub const SYS_time: ::c_long = 13;
+pub const SYS_mknod: ::c_long = 14;
+pub const SYS_chmod: ::c_long = 15;
+pub const SYS_lchown: ::c_long = 16;
+pub const SYS_break: ::c_long = 17;
+pub const SYS_oldstat: ::c_long = 18;
+pub const SYS_lseek: ::c_long = 19;
+pub const SYS_getpid: ::c_long = 20;
+pub const SYS_mount: ::c_long = 21;
+pub const SYS_umount: ::c_long = 22;
+pub const SYS_setuid: ::c_long = 23;
+pub const SYS_getuid: ::c_long = 24;
+pub const SYS_stime: ::c_long = 25;
+pub const SYS_ptrace: ::c_long = 26;
+pub const SYS_alarm: ::c_long = 27;
+pub const SYS_oldfstat: ::c_long = 28;
+pub const SYS_pause: ::c_long = 29;
+pub const SYS_utime: ::c_long = 30;
+pub const SYS_stty: ::c_long = 31;
+pub const SYS_gtty: ::c_long = 32;
+pub const SYS_access: ::c_long = 33;
+pub const SYS_nice: ::c_long = 34;
+pub const SYS_ftime: ::c_long = 35;
+pub const SYS_sync: ::c_long = 36;
+pub const SYS_kill: ::c_long = 37;
+pub const SYS_rename: ::c_long = 38;
+pub const SYS_mkdir: ::c_long = 39;
+pub const SYS_rmdir: ::c_long = 40;
+pub const SYS_dup: ::c_long = 41;
+pub const SYS_pipe: ::c_long = 42;
+pub const SYS_times: ::c_long = 43;
+pub const SYS_prof: ::c_long = 44;
+pub const SYS_brk: ::c_long = 45;
+pub const SYS_setgid: ::c_long = 46;
+pub const SYS_getgid: ::c_long = 47;
+pub const SYS_signal: ::c_long = 48;
+pub const SYS_geteuid: ::c_long = 49;
+pub const SYS_getegid: ::c_long = 50;
+pub const SYS_acct: ::c_long = 51;
+pub const SYS_umount2: ::c_long = 52;
+pub const SYS_lock: ::c_long = 53;
+pub const SYS_ioctl: ::c_long = 54;
+pub const SYS_fcntl: ::c_long = 55;
+pub const SYS_mpx: ::c_long = 56;
+pub const SYS_setpgid: ::c_long = 57;
+pub const SYS_ulimit: ::c_long = 58;
+pub const SYS_oldolduname: ::c_long = 59;
+pub const SYS_umask: ::c_long = 60;
+pub const SYS_chroot: ::c_long = 61;
+pub const SYS_ustat: ::c_long = 62;
+pub const SYS_dup2: ::c_long = 63;
+pub const SYS_getppid: ::c_long = 64;
+pub const SYS_getpgrp: ::c_long = 65;
+pub const SYS_setsid: ::c_long = 66;
+pub const SYS_sigaction: ::c_long = 67;
+pub const SYS_sgetmask: ::c_long = 68;
+pub const SYS_ssetmask: ::c_long = 69;
+pub const SYS_setreuid: ::c_long = 70;
+pub const SYS_setregid: ::c_long = 71;
+pub const SYS_sigsuspend: ::c_long = 72;
+pub const SYS_sigpending: ::c_long = 73;
+pub const SYS_sethostname: ::c_long = 74;
+pub const SYS_setrlimit: ::c_long = 75;
+pub const SYS_getrlimit: ::c_long = 76;
+pub const SYS_getrusage: ::c_long = 77;
+pub const SYS_gettimeofday: ::c_long = 78;
+pub const SYS_settimeofday: ::c_long = 79;
+pub const SYS_getgroups: ::c_long = 80;
+pub const SYS_setgroups: ::c_long = 81;
+pub const SYS_select: ::c_long = 82;
+pub const SYS_symlink: ::c_long = 83;
+pub const SYS_oldlstat: ::c_long = 84;
+pub const SYS_readlink: ::c_long = 85;
+pub const SYS_uselib: ::c_long = 86;
+pub const SYS_swapon: ::c_long = 87;
+pub const SYS_reboot: ::c_long = 88;
+pub const SYS_readdir: ::c_long = 89;
+pub const SYS_mmap: ::c_long = 90;
+pub const SYS_munmap: ::c_long = 91;
+pub const SYS_truncate: ::c_long = 92;
+pub const SYS_ftruncate: ::c_long = 93;
+pub const SYS_fchmod: ::c_long = 94;
+pub const SYS_fchown: ::c_long = 95;
+pub const SYS_getpriority: ::c_long = 96;
+pub const SYS_setpriority: ::c_long = 97;
+pub const SYS_profil: ::c_long = 98;
+pub const SYS_statfs: ::c_long = 99;
+pub const SYS_fstatfs: ::c_long = 100;
+pub const SYS_ioperm: ::c_long = 101;
+pub const SYS_socketcall: ::c_long = 102;
+pub const SYS_syslog: ::c_long = 103;
+pub const SYS_setitimer: ::c_long = 104;
+pub const SYS_getitimer: ::c_long = 105;
+pub const SYS_stat: ::c_long = 106;
+pub const SYS_lstat: ::c_long = 107;
+pub const SYS_fstat: ::c_long = 108;
+pub const SYS_olduname: ::c_long = 109;
+pub const SYS_iopl: ::c_long = 110;
+pub const SYS_vhangup: ::c_long = 111;
+pub const SYS_idle: ::c_long = 112;
+pub const SYS_vm86old: ::c_long = 113;
+pub const SYS_wait4: ::c_long = 114;
+pub const SYS_swapoff: ::c_long = 115;
+pub const SYS_sysinfo: ::c_long = 116;
+pub const SYS_ipc: ::c_long = 117;
+pub const SYS_fsync: ::c_long = 118;
+pub const SYS_sigreturn: ::c_long = 119;
+pub const SYS_clone: ::c_long = 120;
+pub const SYS_setdomainname: ::c_long = 121;
+pub const SYS_uname: ::c_long = 122;
+pub const SYS_modify_ldt: ::c_long = 123;
+pub const SYS_adjtimex: ::c_long = 124;
+pub const SYS_mprotect: ::c_long = 125;
+pub const SYS_sigprocmask: ::c_long = 126;
+pub const SYS_create_module: ::c_long = 127;
+pub const SYS_init_module: ::c_long = 128;
+pub const SYS_delete_module: ::c_long = 129;
+pub const SYS_get_kernel_syms: ::c_long = 130;
+pub const SYS_quotactl: ::c_long = 131;
+pub const SYS_getpgid: ::c_long = 132;
+pub const SYS_fchdir: ::c_long = 133;
+pub const SYS_bdflush: ::c_long = 134;
+pub const SYS_sysfs: ::c_long = 135;
+pub const SYS_personality: ::c_long = 136;
+pub const SYS_afs_syscall: ::c_long = 137;
+pub const SYS_setfsuid: ::c_long = 138;
+pub const SYS_setfsgid: ::c_long = 139;
+pub const SYS__llseek: ::c_long = 140;
+pub const SYS_getdents: ::c_long = 141;
+pub const SYS__newselect: ::c_long = 142;
+pub const SYS_flock: ::c_long = 143;
+pub const SYS_msync: ::c_long = 144;
+pub const SYS_readv: ::c_long = 145;
+pub const SYS_writev: ::c_long = 146;
+pub const SYS_getsid: ::c_long = 147;
+pub const SYS_fdatasync: ::c_long = 148;
+pub const SYS__sysctl: ::c_long = 149;
+pub const SYS_mlock: ::c_long = 150;
+pub const SYS_munlock: ::c_long = 151;
+pub const SYS_mlockall: ::c_long = 152;
+pub const SYS_munlockall: ::c_long = 153;
+pub const SYS_sched_setparam: ::c_long = 154;
+pub const SYS_sched_getparam: ::c_long = 155;
+pub const SYS_sched_setscheduler: ::c_long = 156;
+pub const SYS_sched_getscheduler: ::c_long = 157;
+pub const SYS_sched_yield: ::c_long = 158;
+pub const SYS_sched_get_priority_max: ::c_long = 159;
+pub const SYS_sched_get_priority_min: ::c_long = 160;
+pub const SYS_sched_rr_get_interval: ::c_long = 161;
+pub const SYS_nanosleep: ::c_long = 162;
+pub const SYS_mremap: ::c_long = 163;
+pub const SYS_setresuid: ::c_long = 164;
+pub const SYS_getresuid: ::c_long = 165;
+pub const SYS_vm86: ::c_long = 166;
+pub const SYS_query_module: ::c_long = 167;
+pub const SYS_poll: ::c_long = 168;
+pub const SYS_nfsservctl: ::c_long = 169;
+pub const SYS_setresgid: ::c_long = 170;
+pub const SYS_getresgid: ::c_long = 171;
+pub const SYS_prctl: ::c_long = 172;
+pub const SYS_rt_sigreturn: ::c_long = 173;
+pub const SYS_rt_sigaction: ::c_long = 174;
+pub const SYS_rt_sigprocmask: ::c_long = 175;
+pub const SYS_rt_sigpending: ::c_long = 176;
+pub const SYS_rt_sigtimedwait: ::c_long = 177;
+pub const SYS_rt_sigqueueinfo: ::c_long = 178;
+pub const SYS_rt_sigsuspend: ::c_long = 179;
+pub const SYS_pread64: ::c_long = 180;
+pub const SYS_pwrite64: ::c_long = 181;
+pub const SYS_chown: ::c_long = 182;
+pub const SYS_getcwd: ::c_long = 183;
+pub const SYS_capget: ::c_long = 184;
+pub const SYS_capset: ::c_long = 185;
+pub const SYS_sigaltstack: ::c_long = 186;
+pub const SYS_sendfile: ::c_long = 187;
+pub const SYS_getpmsg: ::c_long = 188;
+pub const SYS_putpmsg: ::c_long = 189;
+pub const SYS_vfork: ::c_long = 190;
+pub const SYS_ugetrlimit: ::c_long = 191;
+pub const SYS_mmap2: ::c_long = 192;
+pub const SYS_truncate64: ::c_long = 193;
+pub const SYS_ftruncate64: ::c_long = 194;
+pub const SYS_stat64: ::c_long = 195;
+pub const SYS_lstat64: ::c_long = 196;
+pub const SYS_fstat64: ::c_long = 197;
+pub const SYS_lchown32: ::c_long = 198;
+pub const SYS_getuid32: ::c_long = 199;
+pub const SYS_getgid32: ::c_long = 200;
+pub const SYS_geteuid32: ::c_long = 201;
+pub const SYS_getegid32: ::c_long = 202;
+pub const SYS_setreuid32: ::c_long = 203;
+pub const SYS_setregid32: ::c_long = 204;
+pub const SYS_getgroups32: ::c_long = 205;
+pub const SYS_setgroups32: ::c_long = 206;
+pub const SYS_fchown32: ::c_long = 207;
+pub const SYS_setresuid32: ::c_long = 208;
+pub const SYS_getresuid32: ::c_long = 209;
+pub const SYS_setresgid32: ::c_long = 210;
+pub const SYS_getresgid32: ::c_long = 211;
+pub const SYS_chown32: ::c_long = 212;
+pub const SYS_setuid32: ::c_long = 213;
+pub const SYS_setgid32: ::c_long = 214;
+pub const SYS_setfsuid32: ::c_long = 215;
+pub const SYS_setfsgid32: ::c_long = 216;
+pub const SYS_pivot_root: ::c_long = 217;
+pub const SYS_mincore: ::c_long = 218;
+pub const SYS_madvise: ::c_long = 219;
+pub const SYS_getdents64: ::c_long = 220;
+pub const SYS_fcntl64: ::c_long = 221;
+pub const SYS_gettid: ::c_long = 224;
+pub const SYS_readahead: ::c_long = 225;
+pub const SYS_setxattr: ::c_long = 226;
+pub const SYS_lsetxattr: ::c_long = 227;
+pub const SYS_fsetxattr: ::c_long = 228;
+pub const SYS_getxattr: ::c_long = 229;
+pub const SYS_lgetxattr: ::c_long = 230;
+pub const SYS_fgetxattr: ::c_long = 231;
+pub const SYS_listxattr: ::c_long = 232;
+pub const SYS_llistxattr: ::c_long = 233;
+pub const SYS_flistxattr: ::c_long = 234;
+pub const SYS_removexattr: ::c_long = 235;
+pub const SYS_lremovexattr: ::c_long = 236;
+pub const SYS_fremovexattr: ::c_long = 237;
+pub const SYS_tkill: ::c_long = 238;
+pub const SYS_sendfile64: ::c_long = 239;
+pub const SYS_futex: ::c_long = 240;
+pub const SYS_sched_setaffinity: ::c_long = 241;
+pub const SYS_sched_getaffinity: ::c_long = 242;
+pub const SYS_set_thread_area: ::c_long = 243;
+pub const SYS_get_thread_area: ::c_long = 244;
+pub const SYS_io_setup: ::c_long = 245;
+pub const SYS_io_destroy: ::c_long = 246;
+pub const SYS_io_getevents: ::c_long = 247;
+pub const SYS_io_submit: ::c_long = 248;
+pub const SYS_io_cancel: ::c_long = 249;
+pub const SYS_fadvise64: ::c_long = 250;
+pub const SYS_exit_group: ::c_long = 252;
+pub const SYS_lookup_dcookie: ::c_long = 253;
+pub const SYS_epoll_create: ::c_long = 254;
+pub const SYS_epoll_ctl: ::c_long = 255;
+pub const SYS_epoll_wait: ::c_long = 256;
+pub const SYS_remap_file_pages: ::c_long = 257;
+pub const SYS_set_tid_address: ::c_long = 258;
+pub const SYS_timer_create: ::c_long = 259;
+pub const SYS_timer_settime: ::c_long = 260;
+pub const SYS_timer_gettime: ::c_long = 261;
+pub const SYS_timer_getoverrun: ::c_long = 262;
+pub const SYS_timer_delete: ::c_long = 263;
+pub const SYS_clock_settime: ::c_long = 264;
+pub const SYS_clock_gettime: ::c_long = 265;
+pub const SYS_clock_getres: ::c_long = 266;
+pub const SYS_clock_nanosleep: ::c_long = 267;
+pub const SYS_statfs64: ::c_long = 268;
+pub const SYS_fstatfs64: ::c_long = 269;
+pub const SYS_tgkill: ::c_long = 270;
+pub const SYS_utimes: ::c_long = 271;
+pub const SYS_fadvise64_64: ::c_long = 272;
+pub const SYS_vserver: ::c_long = 273;
+pub const SYS_mbind: ::c_long = 274;
+pub const SYS_get_mempolicy: ::c_long = 275;
+pub const SYS_set_mempolicy: ::c_long = 276;
+pub const SYS_mq_open: ::c_long = 277;
+pub const SYS_mq_unlink: ::c_long = 278;
+pub const SYS_mq_timedsend: ::c_long = 279;
+pub const SYS_mq_timedreceive: ::c_long = 280;
+pub const SYS_mq_notify: ::c_long = 281;
+pub const SYS_mq_getsetattr: ::c_long = 282;
+pub const SYS_kexec_load: ::c_long = 283;
+pub const SYS_waitid: ::c_long = 284;
+pub const SYS_add_key: ::c_long = 286;
+pub const SYS_request_key: ::c_long = 287;
+pub const SYS_keyctl: ::c_long = 288;
+pub const SYS_ioprio_set: ::c_long = 289;
+pub const SYS_ioprio_get: ::c_long = 290;
+pub const SYS_inotify_init: ::c_long = 291;
+pub const SYS_inotify_add_watch: ::c_long = 292;
+pub const SYS_inotify_rm_watch: ::c_long = 293;
+pub const SYS_migrate_pages: ::c_long = 294;
+pub const SYS_openat: ::c_long = 295;
+pub const SYS_mkdirat: ::c_long = 296;
+pub const SYS_mknodat: ::c_long = 297;
+pub const SYS_fchownat: ::c_long = 298;
+pub const SYS_futimesat: ::c_long = 299;
+pub const SYS_fstatat64: ::c_long = 300;
+pub const SYS_unlinkat: ::c_long = 301;
+pub const SYS_renameat: ::c_long = 302;
+pub const SYS_linkat: ::c_long = 303;
+pub const SYS_symlinkat: ::c_long = 304;
+pub const SYS_readlinkat: ::c_long = 305;
+pub const SYS_fchmodat: ::c_long = 306;
+pub const SYS_faccessat: ::c_long = 307;
+pub const SYS_pselect6: ::c_long = 308;
+pub const SYS_ppoll: ::c_long = 309;
+pub const SYS_unshare: ::c_long = 310;
+pub const SYS_set_robust_list: ::c_long = 311;
+pub const SYS_get_robust_list: ::c_long = 312;
+pub const SYS_splice: ::c_long = 313;
+pub const SYS_sync_file_range: ::c_long = 314;
+pub const SYS_tee: ::c_long = 315;
+pub const SYS_vmsplice: ::c_long = 316;
+pub const SYS_move_pages: ::c_long = 317;
+pub const SYS_getcpu: ::c_long = 318;
+pub const SYS_epoll_pwait: ::c_long = 319;
+pub const SYS_utimensat: ::c_long = 320;
+pub const SYS_signalfd: ::c_long = 321;
+pub const SYS_timerfd_create: ::c_long = 322;
+pub const SYS_eventfd: ::c_long = 323;
+pub const SYS_fallocate: ::c_long = 324;
+pub const SYS_timerfd_settime: ::c_long = 325;
+pub const SYS_timerfd_gettime: ::c_long = 326;
+pub const SYS_signalfd4: ::c_long = 327;
+pub const SYS_eventfd2: ::c_long = 328;
+pub const SYS_epoll_create1: ::c_long = 329;
+pub const SYS_dup3: ::c_long = 330;
+pub const SYS_pipe2: ::c_long = 331;
+pub const SYS_inotify_init1: ::c_long = 332;
+pub const SYS_preadv: ::c_long = 333;
+pub const SYS_pwritev: ::c_long = 334;
+pub const SYS_rt_tgsigqueueinfo: ::c_long = 335;
+pub const SYS_perf_event_open: ::c_long = 336;
+pub const SYS_recvmmsg: ::c_long = 337;
+pub const SYS_fanotify_init: ::c_long = 338;
+pub const SYS_fanotify_mark: ::c_long = 339;
+pub const SYS_prlimit64: ::c_long = 340;
+pub const SYS_name_to_handle_at: ::c_long = 341;
+pub const SYS_open_by_handle_at: ::c_long = 342;
+pub const SYS_clock_adjtime: ::c_long = 343;
+pub const SYS_syncfs: ::c_long = 344;
+pub const SYS_sendmmsg: ::c_long = 345;
+pub const SYS_setns: ::c_long = 346;
+pub const SYS_process_vm_readv: ::c_long = 347;
+pub const SYS_process_vm_writev: ::c_long = 348;
+pub const SYS_kcmp: ::c_long = 349;
+pub const SYS_finit_module: ::c_long = 350;
+pub const SYS_sched_setattr: ::c_long = 351;
+pub const SYS_sched_getattr: ::c_long = 352;
+pub const SYS_renameat2: ::c_long = 353;
+pub const SYS_seccomp: ::c_long = 354;
+pub const SYS_getrandom: ::c_long = 355;
+pub const SYS_memfd_create: ::c_long = 356;
+pub const SYS_bpf: ::c_long = 357;
+pub const SYS_execveat: ::c_long = 358;
+pub const SYS_socket: ::c_long = 359;
+pub const SYS_socketpair: ::c_long = 360;
+pub const SYS_bind: ::c_long = 361;
+pub const SYS_connect: ::c_long = 362;
+pub const SYS_listen: ::c_long = 363;
+pub const SYS_accept4: ::c_long = 364;
+pub const SYS_getsockopt: ::c_long = 365;
+pub const SYS_setsockopt: ::c_long = 366;
+pub const SYS_getsockname: ::c_long = 367;
+pub const SYS_getpeername: ::c_long = 368;
+pub const SYS_sendto: ::c_long = 369;
+pub const SYS_sendmsg: ::c_long = 370;
+pub const SYS_recvfrom: ::c_long = 371;
+pub const SYS_recvmsg: ::c_long = 372;
+pub const SYS_shutdown: ::c_long = 373;
+pub const SYS_userfaultfd: ::c_long = 374;
+pub const SYS_membarrier: ::c_long = 375;
+pub const SYS_mlock2: ::c_long = 376;
+pub const SYS_copy_file_range: ::c_long = 377;
+pub const SYS_preadv2: ::c_long = 378;
+pub const SYS_pwritev2: ::c_long = 379;
+// FIXME syscalls 380-382 have been added in musl 1.16
+// See discussion https://github.com/rust-lang/libc/pull/699
+
+// offsets in user_regs_structs, from sys/reg.h
+pub const EBX: ::c_int = 0;
+pub const ECX: ::c_int = 1;
+pub const EDX: ::c_int = 2;
+pub const ESI: ::c_int = 3;
+pub const EDI: ::c_int = 4;
+pub const EBP: ::c_int = 5;
+pub const EAX: ::c_int = 6;
+pub const DS: ::c_int = 7;
+pub const ES: ::c_int = 8;
+pub const FS: ::c_int = 9;
+pub const GS: ::c_int = 10;
+pub const ORIG_EAX: ::c_int = 11;
+pub const EIP: ::c_int = 12;
+pub const CS: ::c_int = 13;
+pub const EFL: ::c_int = 14;
+pub const UESP: ::c_int = 15;
+pub const SS: ::c_int = 16;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b64/aarch64.rs
@@ -0,0 +1,7 @@
+pub type c_char = u8;
+pub type __u64 = ::c_ulonglong;
+
+pub const SYS_pivot_root: ::c_long = 41;
+pub const SYS_gettid: ::c_long = 178;
+pub const SYS_perf_event_open: ::c_long = 241;
+pub const SYS_memfd_create: ::c_long = 279;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b64/mod.rs
@@ -0,0 +1,430 @@
+pub type wchar_t = i32;
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type nlink_t = u64;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_nlink: ::nlink_t,
+        pub st_mode: ::mode_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        __pad0: ::c_int,
+        pub st_rdev: ::dev_t,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        __unused: [::c_long; 3],
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino64_t,
+        pub st_nlink: ::nlink_t,
+        pub st_mode: ::mode_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        __pad0: ::c_int,
+        pub st_rdev: ::dev_t,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt64_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        __reserved: [::c_long; 3],
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::c_ulong,
+        pub f_bsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_flags: ::c_ulong,
+        pub f_spare: [::c_ulong; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_flags: ::c_int,
+        pub ss_size: ::size_t
+    }
+
+    pub struct pthread_attr_t {
+        __size: [u64; 7]
+    }
+
+    pub struct sigset_t {
+        __val: [::c_ulong; 16],
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::c_ulong,
+        __pad1: ::c_ulong,
+        __pad2: ::c_ulong,
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        pub msg_stime: ::time_t,
+        pub msg_rtime: ::time_t,
+        pub msg_ctime: ::time_t,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __pad1: ::c_ulong,
+        __pad2: ::c_ulong,
+    }
+
+    pub struct statfs {
+        pub f_type: ::c_ulong,
+        pub f_bsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_flags: ::c_ulong,
+        pub f_spare: [::c_ulong; 4],
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::c_int,
+        __pad1: ::c_int,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::socklen_t,
+        __pad2: ::socklen_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::socklen_t,
+        pub __pad1: ::c_int,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct sem_t {
+        __val: [::c_int; 8],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_errno: ::c_int,
+        pub si_code: ::c_int,
+        pub _pad: [::c_int; 29],
+        _align: [usize; 0],
+    }
+}
+
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
+
+pub const O_DIRECT: ::c_int = 0x4000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+pub const O_ASYNC: ::c_int = 0x2000;
+pub const O_LARGEFILE: ::c_int = 0;
+
+pub const FIOCLEX: ::c_int = 0x5451;
+pub const FIONBIO: ::c_int = 0x5421;
+
+pub const RLIMIT_RSS: ::c_int = 5;
+pub const RLIMIT_NOFILE: ::c_int = 7;
+pub const RLIMIT_AS: ::c_int = 9;
+pub const RLIMIT_NPROC: ::c_int = 6;
+pub const RLIMIT_MEMLOCK: ::c_int = 8;
+
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 1052672;
+pub const O_RSYNC: ::c_int = 1052672;
+pub const O_DSYNC: ::c_int = 4096;
+
+pub const SOCK_NONBLOCK: ::c_int = 2048;
+
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+pub const MAP_DENYWRITE: ::c_int = 0x0800;
+pub const MAP_EXECUTABLE: ::c_int = 0x01000;
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_POPULATE: ::c_int = 0x08000;
+pub const MAP_NONBLOCK: ::c_int = 0x010000;
+pub const MAP_STACK: ::c_int = 0x020000;
+pub const MAP_32BIT: ::c_int = 0x0040;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOCK_SEQPACKET: ::c_int = 5;
+
+pub const SOL_SOCKET: ::c_int = 1;
+
+pub const EDEADLK: ::c_int = 35;
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+pub const EDEADLOCK: ::c_int = EDEADLK;
+pub const EMULTIHOP: ::c_int = 72;
+pub const EBADMSG: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ENETDOWN: ::c_int = 100;
+pub const ENETUNREACH: ::c_int = 101;
+pub const ENETRESET: ::c_int = 102;
+pub const ECONNABORTED: ::c_int = 103;
+pub const ECONNRESET: ::c_int = 104;
+pub const ENOBUFS: ::c_int = 105;
+pub const EISCONN: ::c_int = 106;
+pub const ENOTCONN: ::c_int = 107;
+pub const ESHUTDOWN: ::c_int = 108;
+pub const ETOOMANYREFS: ::c_int = 109;
+pub const ETIMEDOUT: ::c_int = 110;
+pub const ECONNREFUSED: ::c_int = 111;
+pub const EHOSTDOWN: ::c_int = 112;
+pub const EHOSTUNREACH: ::c_int = 113;
+pub const EALREADY: ::c_int = 114;
+pub const EINPROGRESS: ::c_int = 115;
+pub const ESTALE: ::c_int = 116;
+pub const EUCLEAN: ::c_int = 117;
+pub const ENOTNAM: ::c_int = 118;
+pub const ENAVAIL: ::c_int = 119;
+pub const EISNAM: ::c_int = 120;
+pub const EREMOTEIO: ::c_int = 121;
+pub const EDQUOT: ::c_int = 122;
+pub const ENOMEDIUM: ::c_int = 123;
+pub const EMEDIUMTYPE: ::c_int = 124;
+pub const ECANCELED: ::c_int = 125;
+pub const ENOKEY: ::c_int = 126;
+pub const EKEYEXPIRED: ::c_int = 127;
+pub const EKEYREVOKED: ::c_int = 128;
+pub const EKEYREJECTED: ::c_int = 129;
+pub const EOWNERDEAD: ::c_int = 130;
+pub const ENOTRECOVERABLE: ::c_int = 131;
+pub const ERFKILL: ::c_int = 132;
+pub const EHWPOISON: ::c_int = 133;
+
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_PASSCRED: ::c_int = 16;
+pub const SO_PEERCRED: ::c_int = 17;
+pub const SO_RCVLOWAT: ::c_int = 18;
+pub const SO_SNDLOWAT: ::c_int = 19;
+pub const SO_RCVTIMEO: ::c_int = 20;
+pub const SO_SNDTIMEO: ::c_int = 21;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
+
+pub const EXTPROC: ::tcflag_t = 0x00010000;
+
+pub const MAP_HUGETLB: ::c_int = 0x040000;
+
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+pub const F_SETOWN: ::c_int = 8;
+
+pub const VEOF: usize = 4;
+pub const VEOL: usize = 11;
+pub const VEOL2: usize = 16;
+pub const VMIN: usize = 6;
+pub const IEXTEN: ::tcflag_t = 0x00008000;
+pub const TOSTOP: ::tcflag_t = 0x00000100;
+pub const FLUSHO: ::tcflag_t = 0x00001000;
+
+pub const TCGETS: ::c_int = 0x5401;
+pub const TCSETS: ::c_int = 0x5402;
+pub const TCSETSW: ::c_int = 0x5403;
+pub const TCSETSF: ::c_int = 0x5404;
+pub const TCGETA: ::c_int = 0x5405;
+pub const TCSETA: ::c_int = 0x5406;
+pub const TCSETAW: ::c_int = 0x5407;
+pub const TCSETAF: ::c_int = 0x5408;
+pub const TCSBRK: ::c_int = 0x5409;
+pub const TCXONC: ::c_int = 0x540A;
+pub const TCFLSH: ::c_int = 0x540B;
+pub const TIOCGSOFTCAR: ::c_int = 0x5419;
+pub const TIOCSSOFTCAR: ::c_int = 0x541A;
+pub const TIOCLINUX: ::c_int = 0x541C;
+pub const TIOCGSERIAL: ::c_int = 0x541E;
+pub const TIOCEXCL: ::c_int = 0x540C;
+pub const TIOCNXCL: ::c_int = 0x540D;
+pub const TIOCSCTTY: ::c_int = 0x540E;
+pub const TIOCGPGRP: ::c_int = 0x540F;
+pub const TIOCSPGRP: ::c_int = 0x5410;
+pub const TIOCOUTQ: ::c_int = 0x5411;
+pub const TIOCSTI: ::c_int = 0x5412;
+pub const TIOCGWINSZ: ::c_int = 0x5413;
+pub const TIOCSWINSZ: ::c_int = 0x5414;
+pub const TIOCMGET: ::c_int = 0x5415;
+pub const TIOCMBIS: ::c_int = 0x5416;
+pub const TIOCMBIC: ::c_int = 0x5417;
+pub const TIOCMSET: ::c_int = 0x5418;
+pub const FIONREAD: ::c_int = 0x541B;
+pub const TIOCCONS: ::c_int = 0x541D;
+
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const TIOCM_LE: ::c_int = 0x001;
+pub const TIOCM_DTR: ::c_int = 0x002;
+pub const TIOCM_RTS: ::c_int = 0x004;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+pub const TIOCM_CD: ::c_int = TIOCM_CAR;
+pub const TIOCM_RI: ::c_int = TIOCM_RNG;
+
+cfg_if! {
+    if #[cfg(target_arch = "aarch64")] {
+        mod aarch64;
+        pub use self::aarch64::*;
+    } else if #[cfg(any(target_arch = "powerpc64"))] {
+        mod powerpc64;
+        pub use self::powerpc64::*;
+    } else if #[cfg(any(target_arch = "x86_64"))] {
+        mod x86_64;
+        pub use self::x86_64::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b64/powerpc64.rs
@@ -0,0 +1,7 @@
+pub type c_char = u8;
+pub type __u64 = ::c_ulong;
+
+pub const SYS_pivot_root: ::c_long = 203;
+pub const SYS_gettid: ::c_long = 207;
+pub const SYS_perf_event_open: ::c_long = 319;
+pub const SYS_memfd_create: ::c_long = 360;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/b64/x86_64.rs
@@ -0,0 +1,380 @@
+pub type c_char = i8;
+pub type __u64 = ::c_ulonglong;
+
+s! {
+    pub struct mcontext_t {
+        __private: [u64; 32],
+    }
+
+    pub struct ucontext_t {
+        pub uc_flags: ::c_ulong,
+        pub uc_link: *mut ucontext_t,
+        pub uc_stack: ::stack_t,
+        pub uc_mcontext: mcontext_t,
+        pub uc_sigmask: ::sigset_t,
+        __private: [u8; 512],
+    }
+}
+
+// Syscall table
+
+pub const SYS_read: ::c_long = 0;
+pub const SYS_write: ::c_long = 1;
+pub const SYS_open: ::c_long = 2;
+pub const SYS_close: ::c_long = 3;
+pub const SYS_stat: ::c_long = 4;
+pub const SYS_fstat: ::c_long = 5;
+pub const SYS_lstat: ::c_long = 6;
+pub const SYS_poll: ::c_long = 7;
+pub const SYS_lseek: ::c_long = 8;
+pub const SYS_mmap: ::c_long = 9;
+pub const SYS_mprotect: ::c_long = 10;
+pub const SYS_munmap: ::c_long = 11;
+pub const SYS_brk: ::c_long = 12;
+pub const SYS_rt_sigaction: ::c_long = 13;
+pub const SYS_rt_sigprocmask: ::c_long = 14;
+pub const SYS_rt_sigreturn: ::c_long = 15;
+pub const SYS_ioctl: ::c_long = 16;
+pub const SYS_pread64: ::c_long = 17;
+pub const SYS_pwrite64: ::c_long = 18;
+pub const SYS_readv: ::c_long = 19;
+pub const SYS_writev: ::c_long = 20;
+pub const SYS_access: ::c_long = 21;
+pub const SYS_pipe: ::c_long = 22;
+pub const SYS_select: ::c_long = 23;
+pub const SYS_sched_yield: ::c_long = 24;
+pub const SYS_mremap: ::c_long = 25;
+pub const SYS_msync: ::c_long = 26;
+pub const SYS_mincore: ::c_long = 27;
+pub const SYS_madvise: ::c_long = 28;
+pub const SYS_shmget: ::c_long = 29;
+pub const SYS_shmat: ::c_long = 30;
+pub const SYS_shmctl: ::c_long = 31;
+pub const SYS_dup: ::c_long = 32;
+pub const SYS_dup2: ::c_long = 33;
+pub const SYS_pause: ::c_long = 34;
+pub const SYS_nanosleep: ::c_long = 35;
+pub const SYS_getitimer: ::c_long = 36;
+pub const SYS_alarm: ::c_long = 37;
+pub const SYS_setitimer: ::c_long = 38;
+pub const SYS_getpid: ::c_long = 39;
+pub const SYS_sendfile: ::c_long = 40;
+pub const SYS_socket: ::c_long = 41;
+pub const SYS_connect: ::c_long = 42;
+pub const SYS_accept: ::c_long = 43;
+pub const SYS_sendto: ::c_long = 44;
+pub const SYS_recvfrom: ::c_long = 45;
+pub const SYS_sendmsg: ::c_long = 46;
+pub const SYS_recvmsg: ::c_long = 47;
+pub const SYS_shutdown: ::c_long = 48;
+pub const SYS_bind: ::c_long = 49;
+pub const SYS_listen: ::c_long = 50;
+pub const SYS_getsockname: ::c_long = 51;
+pub const SYS_getpeername: ::c_long = 52;
+pub const SYS_socketpair: ::c_long = 53;
+pub const SYS_setsockopt: ::c_long = 54;
+pub const SYS_getsockopt: ::c_long = 55;
+pub const SYS_clone: ::c_long = 56;
+pub const SYS_fork: ::c_long = 57;
+pub const SYS_vfork: ::c_long = 58;
+pub const SYS_execve: ::c_long = 59;
+pub const SYS_exit: ::c_long = 60;
+pub const SYS_wait4: ::c_long = 61;
+pub const SYS_kill: ::c_long = 62;
+pub const SYS_uname: ::c_long = 63;
+pub const SYS_semget: ::c_long = 64;
+pub const SYS_semop: ::c_long = 65;
+pub const SYS_semctl: ::c_long = 66;
+pub const SYS_shmdt: ::c_long = 67;
+pub const SYS_msgget: ::c_long = 68;
+pub const SYS_msgsnd: ::c_long = 69;
+pub const SYS_msgrcv: ::c_long = 70;
+pub const SYS_msgctl: ::c_long = 71;
+pub const SYS_fcntl: ::c_long = 72;
+pub const SYS_flock: ::c_long = 73;
+pub const SYS_fsync: ::c_long = 74;
+pub const SYS_fdatasync: ::c_long = 75;
+pub const SYS_truncate: ::c_long = 76;
+pub const SYS_ftruncate: ::c_long = 77;
+pub const SYS_getdents: ::c_long = 78;
+pub const SYS_getcwd: ::c_long = 79;
+pub const SYS_chdir: ::c_long = 80;
+pub const SYS_fchdir: ::c_long = 81;
+pub const SYS_rename: ::c_long = 82;
+pub const SYS_mkdir: ::c_long = 83;
+pub const SYS_rmdir: ::c_long = 84;
+pub const SYS_creat: ::c_long = 85;
+pub const SYS_link: ::c_long = 86;
+pub const SYS_unlink: ::c_long = 87;
+pub const SYS_symlink: ::c_long = 88;
+pub const SYS_readlink: ::c_long = 89;
+pub const SYS_chmod: ::c_long = 90;
+pub const SYS_fchmod: ::c_long = 91;
+pub const SYS_chown: ::c_long = 92;
+pub const SYS_fchown: ::c_long = 93;
+pub const SYS_lchown: ::c_long = 94;
+pub const SYS_umask: ::c_long = 95;
+pub const SYS_gettimeofday: ::c_long = 96;
+pub const SYS_getrlimit: ::c_long = 97;
+pub const SYS_getrusage: ::c_long = 98;
+pub const SYS_sysinfo: ::c_long = 99;
+pub const SYS_times: ::c_long = 100;
+pub const SYS_ptrace: ::c_long = 101;
+pub const SYS_getuid: ::c_long = 102;
+pub const SYS_syslog: ::c_long = 103;
+pub const SYS_getgid: ::c_long = 104;
+pub const SYS_setuid: ::c_long = 105;
+pub const SYS_setgid: ::c_long = 106;
+pub const SYS_geteuid: ::c_long = 107;
+pub const SYS_getegid: ::c_long = 108;
+pub const SYS_setpgid: ::c_long = 109;
+pub const SYS_getppid: ::c_long = 110;
+pub const SYS_getpgrp: ::c_long = 111;
+pub const SYS_setsid: ::c_long = 112;
+pub const SYS_setreuid: ::c_long = 113;
+pub const SYS_setregid: ::c_long = 114;
+pub const SYS_getgroups: ::c_long = 115;
+pub const SYS_setgroups: ::c_long = 116;
+pub const SYS_setresuid: ::c_long = 117;
+pub const SYS_getresuid: ::c_long = 118;
+pub const SYS_setresgid: ::c_long = 119;
+pub const SYS_getresgid: ::c_long = 120;
+pub const SYS_getpgid: ::c_long = 121;
+pub const SYS_setfsuid: ::c_long = 122;
+pub const SYS_setfsgid: ::c_long = 123;
+pub const SYS_getsid: ::c_long = 124;
+pub const SYS_capget: ::c_long = 125;
+pub const SYS_capset: ::c_long = 126;
+pub const SYS_rt_sigpending: ::c_long = 127;
+pub const SYS_rt_sigtimedwait: ::c_long = 128;
+pub const SYS_rt_sigqueueinfo: ::c_long = 129;
+pub const SYS_rt_sigsuspend: ::c_long = 130;
+pub const SYS_sigaltstack: ::c_long = 131;
+pub const SYS_utime: ::c_long = 132;
+pub const SYS_mknod: ::c_long = 133;
+pub const SYS_uselib: ::c_long = 134;
+pub const SYS_personality: ::c_long = 135;
+pub const SYS_ustat: ::c_long = 136;
+pub const SYS_statfs: ::c_long = 137;
+pub const SYS_fstatfs: ::c_long = 138;
+pub const SYS_sysfs: ::c_long = 139;
+pub const SYS_getpriority: ::c_long = 140;
+pub const SYS_setpriority: ::c_long = 141;
+pub const SYS_sched_setparam: ::c_long = 142;
+pub const SYS_sched_getparam: ::c_long = 143;
+pub const SYS_sched_setscheduler: ::c_long = 144;
+pub const SYS_sched_getscheduler: ::c_long = 145;
+pub const SYS_sched_get_priority_max: ::c_long = 146;
+pub const SYS_sched_get_priority_min: ::c_long = 147;
+pub const SYS_sched_rr_get_interval: ::c_long = 148;
+pub const SYS_mlock: ::c_long = 149;
+pub const SYS_munlock: ::c_long = 150;
+pub const SYS_mlockall: ::c_long = 151;
+pub const SYS_munlockall: ::c_long = 152;
+pub const SYS_vhangup: ::c_long = 153;
+pub const SYS_modify_ldt: ::c_long = 154;
+pub const SYS_pivot_root: ::c_long = 155;
+pub const SYS__sysctl: ::c_long = 156;
+pub const SYS_prctl: ::c_long = 157;
+pub const SYS_arch_prctl: ::c_long = 158;
+pub const SYS_adjtimex: ::c_long = 159;
+pub const SYS_setrlimit: ::c_long = 160;
+pub const SYS_chroot: ::c_long = 161;
+pub const SYS_sync: ::c_long = 162;
+pub const SYS_acct: ::c_long = 163;
+pub const SYS_settimeofday: ::c_long = 164;
+pub const SYS_mount: ::c_long = 165;
+pub const SYS_umount2: ::c_long = 166;
+pub const SYS_swapon: ::c_long = 167;
+pub const SYS_swapoff: ::c_long = 168;
+pub const SYS_reboot: ::c_long = 169;
+pub const SYS_sethostname: ::c_long = 170;
+pub const SYS_setdomainname: ::c_long = 171;
+pub const SYS_iopl: ::c_long = 172;
+pub const SYS_ioperm: ::c_long = 173;
+pub const SYS_create_module: ::c_long = 174;
+pub const SYS_init_module: ::c_long = 175;
+pub const SYS_delete_module: ::c_long = 176;
+pub const SYS_get_kernel_syms: ::c_long = 177;
+pub const SYS_query_module: ::c_long = 178;
+pub const SYS_quotactl: ::c_long = 179;
+pub const SYS_nfsservctl: ::c_long = 180;
+pub const SYS_getpmsg: ::c_long = 181;
+pub const SYS_putpmsg: ::c_long = 182;
+pub const SYS_afs_syscall: ::c_long = 183;
+pub const SYS_tuxcall: ::c_long = 184;
+pub const SYS_security: ::c_long = 185;
+pub const SYS_gettid: ::c_long = 186;
+pub const SYS_readahead: ::c_long = 187;
+pub const SYS_setxattr: ::c_long = 188;
+pub const SYS_lsetxattr: ::c_long = 189;
+pub const SYS_fsetxattr: ::c_long = 190;
+pub const SYS_getxattr: ::c_long = 191;
+pub const SYS_lgetxattr: ::c_long = 192;
+pub const SYS_fgetxattr: ::c_long = 193;
+pub const SYS_listxattr: ::c_long = 194;
+pub const SYS_llistxattr: ::c_long = 195;
+pub const SYS_flistxattr: ::c_long = 196;
+pub const SYS_removexattr: ::c_long = 197;
+pub const SYS_lremovexattr: ::c_long = 198;
+pub const SYS_fremovexattr: ::c_long = 199;
+pub const SYS_tkill: ::c_long = 200;
+pub const SYS_time: ::c_long = 201;
+pub const SYS_futex: ::c_long = 202;
+pub const SYS_sched_setaffinity: ::c_long = 203;
+pub const SYS_sched_getaffinity: ::c_long = 204;
+pub const SYS_set_thread_area: ::c_long = 205;
+pub const SYS_io_setup: ::c_long = 206;
+pub const SYS_io_destroy: ::c_long = 207;
+pub const SYS_io_getevents: ::c_long = 208;
+pub const SYS_io_submit: ::c_long = 209;
+pub const SYS_io_cancel: ::c_long = 210;
+pub const SYS_get_thread_area: ::c_long = 211;
+pub const SYS_lookup_dcookie: ::c_long = 212;
+pub const SYS_epoll_create: ::c_long = 213;
+pub const SYS_epoll_ctl_old: ::c_long = 214;
+pub const SYS_epoll_wait_old: ::c_long = 215;
+pub const SYS_remap_file_pages: ::c_long = 216;
+pub const SYS_getdents64: ::c_long = 217;
+pub const SYS_set_tid_address: ::c_long = 218;
+pub const SYS_restart_syscall: ::c_long = 219;
+pub const SYS_semtimedop: ::c_long = 220;
+pub const SYS_fadvise64: ::c_long = 221;
+pub const SYS_timer_create: ::c_long = 222;
+pub const SYS_timer_settime: ::c_long = 223;
+pub const SYS_timer_gettime: ::c_long = 224;
+pub const SYS_timer_getoverrun: ::c_long = 225;
+pub const SYS_timer_delete: ::c_long = 226;
+pub const SYS_clock_settime: ::c_long = 227;
+pub const SYS_clock_gettime: ::c_long = 228;
+pub const SYS_clock_getres: ::c_long = 229;
+pub const SYS_clock_nanosleep: ::c_long = 230;
+pub const SYS_exit_group: ::c_long = 231;
+pub const SYS_epoll_wait: ::c_long = 232;
+pub const SYS_epoll_ctl: ::c_long = 233;
+pub const SYS_tgkill: ::c_long = 234;
+pub const SYS_utimes: ::c_long = 235;
+pub const SYS_vserver: ::c_long = 236;
+pub const SYS_mbind: ::c_long = 237;
+pub const SYS_set_mempolicy: ::c_long = 238;
+pub const SYS_get_mempolicy: ::c_long = 239;
+pub const SYS_mq_open: ::c_long = 240;
+pub const SYS_mq_unlink: ::c_long = 241;
+pub const SYS_mq_timedsend: ::c_long = 242;
+pub const SYS_mq_timedreceive: ::c_long = 243;
+pub const SYS_mq_notify: ::c_long = 244;
+pub const SYS_mq_getsetattr: ::c_long = 245;
+pub const SYS_kexec_load: ::c_long = 246;
+pub const SYS_waitid: ::c_long = 247;
+pub const SYS_add_key: ::c_long = 248;
+pub const SYS_request_key: ::c_long = 249;
+pub const SYS_keyctl: ::c_long = 250;
+pub const SYS_ioprio_set: ::c_long = 251;
+pub const SYS_ioprio_get: ::c_long = 252;
+pub const SYS_inotify_init: ::c_long = 253;
+pub const SYS_inotify_add_watch: ::c_long = 254;
+pub const SYS_inotify_rm_watch: ::c_long = 255;
+pub const SYS_migrate_pages: ::c_long = 256;
+pub const SYS_openat: ::c_long = 257;
+pub const SYS_mkdirat: ::c_long = 258;
+pub const SYS_mknodat: ::c_long = 259;
+pub const SYS_fchownat: ::c_long = 260;
+pub const SYS_futimesat: ::c_long = 261;
+pub const SYS_newfstatat: ::c_long = 262;
+pub const SYS_unlinkat: ::c_long = 263;
+pub const SYS_renameat: ::c_long = 264;
+pub const SYS_linkat: ::c_long = 265;
+pub const SYS_symlinkat: ::c_long = 266;
+pub const SYS_readlinkat: ::c_long = 267;
+pub const SYS_fchmodat: ::c_long = 268;
+pub const SYS_faccessat: ::c_long = 269;
+pub const SYS_pselect6: ::c_long = 270;
+pub const SYS_ppoll: ::c_long = 271;
+pub const SYS_unshare: ::c_long = 272;
+pub const SYS_set_robust_list: ::c_long = 273;
+pub const SYS_get_robust_list: ::c_long = 274;
+pub const SYS_splice: ::c_long = 275;
+pub const SYS_tee: ::c_long = 276;
+pub const SYS_sync_file_range: ::c_long = 277;
+pub const SYS_vmsplice: ::c_long = 278;
+pub const SYS_move_pages: ::c_long = 279;
+pub const SYS_utimensat: ::c_long = 280;
+pub const SYS_epoll_pwait: ::c_long = 281;
+pub const SYS_signalfd: ::c_long = 282;
+pub const SYS_timerfd_create: ::c_long = 283;
+pub const SYS_eventfd: ::c_long = 284;
+pub const SYS_fallocate: ::c_long = 285;
+pub const SYS_timerfd_settime: ::c_long = 286;
+pub const SYS_timerfd_gettime: ::c_long = 287;
+pub const SYS_accept4: ::c_long = 288;
+pub const SYS_signalfd4: ::c_long = 289;
+pub const SYS_eventfd2: ::c_long = 290;
+pub const SYS_epoll_create1: ::c_long = 291;
+pub const SYS_dup3: ::c_long = 292;
+pub const SYS_pipe2: ::c_long = 293;
+pub const SYS_inotify_init1: ::c_long = 294;
+pub const SYS_preadv: ::c_long = 295;
+pub const SYS_pwritev: ::c_long = 296;
+pub const SYS_rt_tgsigqueueinfo: ::c_long = 297;
+pub const SYS_perf_event_open: ::c_long = 298;
+pub const SYS_recvmmsg: ::c_long = 299;
+pub const SYS_fanotify_init: ::c_long = 300;
+pub const SYS_fanotify_mark: ::c_long = 301;
+pub const SYS_prlimit64: ::c_long = 302;
+pub const SYS_name_to_handle_at: ::c_long = 303;
+pub const SYS_open_by_handle_at: ::c_long = 304;
+pub const SYS_clock_adjtime: ::c_long = 305;
+pub const SYS_syncfs: ::c_long = 306;
+pub const SYS_sendmmsg: ::c_long = 307;
+pub const SYS_setns: ::c_long = 308;
+pub const SYS_getcpu: ::c_long = 309;
+pub const SYS_process_vm_readv: ::c_long = 310;
+pub const SYS_process_vm_writev: ::c_long = 311;
+pub const SYS_kcmp: ::c_long = 312;
+pub const SYS_finit_module: ::c_long = 313;
+pub const SYS_sched_setattr: ::c_long = 314;
+pub const SYS_sched_getattr: ::c_long = 315;
+pub const SYS_renameat2: ::c_long = 316;
+pub const SYS_seccomp: ::c_long = 317;
+pub const SYS_getrandom: ::c_long = 318;
+pub const SYS_memfd_create: ::c_long = 319;
+pub const SYS_kexec_file_load: ::c_long = 320;
+pub const SYS_bpf: ::c_long = 321;
+pub const SYS_execveat: ::c_long = 322;
+pub const SYS_userfaultfd: ::c_long = 323;
+pub const SYS_membarrier: ::c_long = 324;
+pub const SYS_mlock2: ::c_long = 325;
+pub const SYS_copy_file_range: ::c_long = 326;
+pub const SYS_preadv2: ::c_long = 327;
+pub const SYS_pwritev2: ::c_long = 328;
+// FIXME syscalls 329-331 have been added in musl 1.16
+// See discussion https://github.com/rust-lang/libc/pull/699
+
+// offsets in user_regs_structs, from sys/reg.h
+pub const R15: ::c_int = 0;
+pub const R14: ::c_int = 1;
+pub const R13: ::c_int = 2;
+pub const R12: ::c_int = 3;
+pub const RBP: ::c_int = 4;
+pub const RBX: ::c_int = 5;
+pub const R11: ::c_int = 6;
+pub const R10: ::c_int = 7;
+pub const R9: ::c_int = 8;
+pub const R8: ::c_int = 9;
+pub const RAX: ::c_int = 10;
+pub const RCX: ::c_int = 11;
+pub const RDX: ::c_int = 12;
+pub const RSI: ::c_int = 13;
+pub const RDI: ::c_int = 14;
+pub const ORIG_RAX: ::c_int = 15;
+pub const RIP: ::c_int = 16;
+pub const CS: ::c_int = 17;
+pub const EFLAGS: ::c_int = 18;
+pub const RSP: ::c_int = 19;
+pub const SS: ::c_int = 20;
+pub const FS_BASE: ::c_int = 21;
+pub const GS_BASE: ::c_int = 22;
+pub const DS: ::c_int = 23;
+pub const ES: ::c_int = 24;
+pub const FS: ::c_int = 25;
+pub const GS: ::c_int = 26;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/musl/mod.rs
@@ -0,0 +1,329 @@
+pub type clock_t = c_long;
+pub type time_t = c_long;
+pub type suseconds_t = c_long;
+pub type ino_t = u64;
+pub type off_t = i64;
+pub type blkcnt_t = i64;
+
+pub type blksize_t = c_long;
+pub type fsblkcnt_t = ::c_ulonglong;
+pub type fsfilcnt_t = ::c_ulonglong;
+pub type rlim_t = ::c_ulonglong;
+
+s! {
+    pub struct aiocb {
+        pub aio_fildes: ::c_int,
+        pub aio_lio_opcode: ::c_int,
+        pub aio_reqprio: ::c_int,
+        pub aio_buf: *mut ::c_void,
+        pub aio_nbytes: ::size_t,
+        pub aio_sigevent: ::sigevent,
+        __td: *mut ::c_void,
+        __lock: [::c_int; 2],
+        __err: ::c_int,
+        __ret: ::ssize_t,
+        pub aio_offset: off_t,
+        __next: *mut ::c_void,
+        __prev: *mut ::c_void,
+        #[cfg(target_pointer_width = "32")]
+        __dummy4: [::c_char; 24],
+        #[cfg(target_pointer_width = "64")]
+        __dummy4: [::c_char; 16],
+    }
+
+    pub struct sigaction {
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: ::sigset_t,
+        pub sa_flags: ::c_int,
+        pub sa_restorer: ::dox::Option<extern fn()>,
+    }
+
+    pub struct ipc_perm {
+        pub __ipc_perm_key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::mode_t,
+        pub __seq: ::c_int,
+        __unused1: ::c_long,
+        __unused2: ::c_long
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_line: ::cc_t,
+        pub c_cc: [::cc_t; ::NCCS],
+        pub __c_ispeed: ::speed_t,
+        pub __c_ospeed: ::speed_t,
+    }
+
+    pub struct flock {
+        pub l_type: ::c_short,
+        pub l_whence: ::c_short,
+        pub l_start: ::off_t,
+        pub l_len: ::off_t,
+        pub l_pid: ::pid_t,
+    }
+
+    pub struct sysinfo {
+        pub uptime: ::c_ulong,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
+        pub procs: ::c_ushort,
+        pub pad: ::c_ushort,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
+        pub mem_unit: ::c_uint,
+        pub __reserved: [::c_char; 256],
+    }
+}
+
+pub const SFD_CLOEXEC: ::c_int = 0x080000;
+
+pub const NCCS: usize = 32;
+
+pub const O_TRUNC: ::c_int = 512;
+pub const O_NOATIME: ::c_int = 0o1000000;
+pub const O_CLOEXEC: ::c_int = 0x80000;
+
+pub const EBFONT: ::c_int = 59;
+pub const ENOSTR: ::c_int = 60;
+pub const ENODATA: ::c_int = 61;
+pub const ETIME: ::c_int = 62;
+pub const ENOSR: ::c_int = 63;
+pub const ENONET: ::c_int = 64;
+pub const ENOPKG: ::c_int = 65;
+pub const EREMOTE: ::c_int = 66;
+pub const ENOLINK: ::c_int = 67;
+pub const EADV: ::c_int = 68;
+pub const ESRMNT: ::c_int = 69;
+pub const ECOMM: ::c_int = 70;
+pub const EPROTO: ::c_int = 71;
+pub const EDOTDOT: ::c_int = 73;
+
+pub const SA_NODEFER: ::c_int = 0x40000000;
+pub const SA_RESETHAND: ::c_int = 0x80000000;
+pub const SA_RESTART: ::c_int = 0x10000000;
+pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
+
+pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
+
+pub const EFD_CLOEXEC: ::c_int = 0x80000;
+
+pub const BUFSIZ: ::c_uint = 1024;
+pub const TMP_MAX: ::c_uint = 10000;
+pub const FOPEN_MAX: ::c_uint = 1000;
+pub const O_PATH: ::c_int = 0o10000000;
+pub const O_EXEC: ::c_int = 0o10000000;
+pub const O_SEARCH: ::c_int = 0o10000000;
+pub const O_ACCMODE: ::c_int = 0o10000003;
+pub const O_NDELAY: ::c_int = O_NONBLOCK;
+pub const NI_MAXHOST: ::socklen_t = 255;
+pub const PTHREAD_STACK_MIN: ::size_t = 2048;
+pub const POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
+
+pub const POSIX_MADV_DONTNEED: ::c_int = 4;
+
+pub const RLIM_INFINITY: ::rlim_t = !0;
+pub const RLIMIT_RTTIME: ::c_int = 15;
+pub const RLIMIT_NLIMITS: ::c_int = 16;
+
+pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
+
+pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
+pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
+pub const TCP_THIN_DUPACK: ::c_int = 17;
+pub const TCP_USER_TIMEOUT: ::c_int = 18;
+pub const TCP_REPAIR: ::c_int = 19;
+pub const TCP_REPAIR_QUEUE: ::c_int = 20;
+pub const TCP_QUEUE_SEQ: ::c_int = 21;
+pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
+pub const TCP_FASTOPEN: ::c_int = 23;
+pub const TCP_TIMESTAMP: ::c_int = 24;
+
+pub const SIGUNUSED: ::c_int = ::SIGSYS;
+
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
+
+pub const CPU_SETSIZE: ::c_int = 128;
+
+pub const QFMT_VFS_V1: ::c_int = 4;
+
+pub const PTRACE_TRACEME: ::c_int = 0;
+pub const PTRACE_PEEKTEXT: ::c_int = 1;
+pub const PTRACE_PEEKDATA: ::c_int = 2;
+pub const PTRACE_PEEKUSER: ::c_int = 3;
+pub const PTRACE_POKETEXT: ::c_int = 4;
+pub const PTRACE_POKEDATA: ::c_int = 5;
+pub const PTRACE_POKEUSER: ::c_int = 6;
+pub const PTRACE_CONT: ::c_int = 7;
+pub const PTRACE_KILL: ::c_int = 8;
+pub const PTRACE_SINGLESTEP: ::c_int = 9;
+pub const PTRACE_GETREGS: ::c_int = 12;
+pub const PTRACE_SETREGS: ::c_int = 13;
+pub const PTRACE_GETFPREGS: ::c_int = 14;
+pub const PTRACE_SETFPREGS: ::c_int = 15;
+pub const PTRACE_ATTACH: ::c_int = 16;
+pub const PTRACE_DETACH: ::c_int = 17;
+pub const PTRACE_GETFPXREGS: ::c_int = 18;
+pub const PTRACE_SETFPXREGS: ::c_int = 19;
+pub const PTRACE_SYSCALL: ::c_int = 24;
+pub const PTRACE_SETOPTIONS: ::c_int = 0x4200;
+pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201;
+pub const PTRACE_GETSIGINFO: ::c_int = 0x4202;
+pub const PTRACE_SETSIGINFO: ::c_int = 0x4203;
+pub const PTRACE_GETREGSET: ::c_int = 0x4204;
+pub const PTRACE_SETREGSET: ::c_int = 0x4205;
+pub const PTRACE_SEIZE: ::c_int = 0x4206;
+pub const PTRACE_INTERRUPT: ::c_int = 0x4207;
+pub const PTRACE_LISTEN: ::c_int = 0x4208;
+pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209;
+
+pub const EPOLLWAKEUP: ::c_int = 0x20000000;
+
+pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
+
+pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
+
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
+
+pub const TIOCINQ: ::c_int = ::FIONREAD;
+
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
+
+// TODO(#247) Temporarily musl-specific (available since musl 0.9.12 / Linux
+// kernel 3.10).  See also notbsd/mod.rs
+pub const CLOCK_SGI_CYCLE: ::clockid_t = 10;
+pub const CLOCK_TAI: ::clockid_t = 11;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
+pub const CBAUD: ::tcflag_t = 0o0010017;
+pub const TAB1: ::c_int = 0x00000800;
+pub const TAB2: ::c_int = 0x00001000;
+pub const TAB3: ::c_int = 0x00001800;
+pub const CR1: ::c_int  = 0x00000200;
+pub const CR2: ::c_int  = 0x00000400;
+pub const CR3: ::c_int  = 0x00000600;
+pub const FF1: ::c_int  = 0x00008000;
+pub const BS1: ::c_int  = 0x00002000;
+pub const VT1: ::c_int  = 0x00004000;
+pub const VWERASE: usize = 14;
+pub const VREPRINT: usize = 12;
+pub const VSUSP: usize = 10;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VDISCARD: usize = 13;
+pub const VTIME: usize = 5;
+pub const IXON: ::tcflag_t = 0x00000400;
+pub const IXOFF: ::tcflag_t = 0x00001000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x00000030;
+pub const CS6: ::tcflag_t = 0x00000010;
+pub const CS7: ::tcflag_t = 0x00000020;
+pub const CS8: ::tcflag_t = 0x00000030;
+pub const CSTOPB: ::tcflag_t = 0x00000040;
+pub const CREAD: ::tcflag_t = 0x00000080;
+pub const PARENB: ::tcflag_t = 0x00000100;
+pub const PARODD: ::tcflag_t = 0x00000200;
+pub const HUPCL: ::tcflag_t = 0x00000400;
+pub const CLOCAL: ::tcflag_t = 0x00000800;
+pub const ECHOKE: ::tcflag_t = 0x00000800;
+pub const ECHOE: ::tcflag_t = 0x00000010;
+pub const ECHOK: ::tcflag_t = 0x00000020;
+pub const ECHONL: ::tcflag_t = 0x00000040;
+pub const ECHOPRT: ::tcflag_t = 0x00000400;
+pub const ECHOCTL: ::tcflag_t = 0x00000200;
+pub const ISIG: ::tcflag_t = 0x00000001;
+pub const ICANON: ::tcflag_t = 0x00000002;
+pub const PENDIN: ::tcflag_t = 0x00004000;
+pub const NOFLSH: ::tcflag_t = 0x00000080;
+pub const CIBAUD: ::tcflag_t = 0o02003600000;
+pub const CBAUDEX: ::tcflag_t = 0o010000;
+pub const VSWTC: usize = 7;
+pub const OLCUC:  ::tcflag_t = 0o000002;
+pub const NLDLY:  ::tcflag_t = 0o000400;
+pub const CRDLY:  ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const BSDLY:  ::tcflag_t = 0o020000;
+pub const FFDLY:  ::tcflag_t = 0o100000;
+pub const VTDLY:  ::tcflag_t = 0o040000;
+pub const XTABS:  ::tcflag_t = 0o014000;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+
+pub const SO_BINDTODEVICE: ::c_int = 25;
+pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SO_MARK: ::c_int = 36;
+pub const SO_RXQ_OVFL: ::c_int = 40;
+pub const SO_PEEK_OFF: ::c_int = 42;
+pub const SO_BUSY_POLL: ::c_int = 46;
+
+extern {
+    pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
+    pub fn ptrace(request: ::c_int, ...) -> ::c_long;
+    pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
+    pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] {
+        mod b64;
+        pub use self::b64::*;
+    } else if #[cfg(any(target_arch = "x86",
+                        target_arch = "mips",
+                        target_arch = "arm"))] {
+        mod b32;
+        pub use self::b32::*;
+    } else { }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b32/arm.rs
@@ -0,0 +1,251 @@
+pub type c_char = u8;
+pub type wchar_t = u32;
+
+s! {
+    pub struct ipc_perm {
+        pub __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::c_ushort,
+        __pad1: ::c_ushort,
+        pub __seq: ::c_ushort,
+        __pad2: ::c_ushort,
+        __unused1: ::c_ulong,
+        __unused2: ::c_ulong
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        __pad1: ::c_uint,
+        __st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __pad2: ::c_uint,
+        pub st_size: ::off64_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt64_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_ino: ::ino64_t,
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::__fsword_t,
+        pub f_bsize: ::__fsword_t,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::__fsword_t,
+        pub f_frsize: ::__fsword_t,
+        pub f_flags: ::__fsword_t,
+        pub f_spare: [::__fsword_t; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        pub f_fsid: ::c_ulong,
+        __f_unused: ::c_int,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        __unused1: ::c_ulong,
+        pub shm_dtime: ::time_t,
+        __unused2: ::c_ulong,
+        pub shm_ctime: ::time_t,
+        __unused3: ::c_ulong,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __unused4: ::c_ulong,
+        __unused5: ::c_ulong
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        pub msg_stime: ::time_t,
+        __glibc_reserved1: ::c_ulong,
+        pub msg_rtime: ::time_t,
+        __glibc_reserved2: ::c_ulong,
+        pub msg_ctime: ::time_t,
+        __glibc_reserved3: ::c_ulong,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __glibc_reserved4: ::c_ulong,
+        __glibc_reserved5: ::c_ulong,
+    }
+}
+
+pub const O_DIRECT: ::c_int = 0x10000;
+pub const O_DIRECTORY: ::c_int = 0x4000;
+pub const O_NOFOLLOW: ::c_int = 0x8000;
+pub const O_LARGEFILE: ::c_int = 0o400000;
+
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+
+pub const EDEADLOCK: ::c_int = 35;
+
+pub const SO_PASSCRED: ::c_int = 16;
+pub const SO_PEERCRED: ::c_int = 17;
+pub const SO_RCVLOWAT: ::c_int = 18;
+pub const SO_SNDLOWAT: ::c_int = 19;
+pub const SO_RCVTIMEO: ::c_int = 20;
+pub const SO_SNDTIMEO: ::c_int = 21;
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+
+pub const FIOCLEX: ::c_ulong = 0x5451;
+pub const FIONBIO: ::c_ulong = 0x5421;
+
+pub const SYS_pivot_root: ::c_long = 218;
+pub const SYS_gettid: ::c_long = 224;
+pub const SYS_perf_event_open: ::c_long = 364;
+pub const SYS_memfd_create: ::c_long = 385;
+
+pub const PTRACE_GETFPXREGS: ::c_uint = 18;
+pub const PTRACE_SETFPXREGS: ::c_uint = 19;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
+pub const CBAUD: ::tcflag_t = 0o0010017;
+pub const TAB1: ::c_int = 0x00000800;
+pub const TAB2: ::c_int = 0x00001000;
+pub const TAB3: ::c_int = 0x00001800;
+pub const CR1: ::c_int  = 0x00000200;
+pub const CR2: ::c_int  = 0x00000400;
+pub const CR3: ::c_int  = 0x00000600;
+pub const FF1: ::c_int  = 0x00008000;
+pub const BS1: ::c_int  = 0x00002000;
+pub const VT1: ::c_int  = 0x00004000;
+pub const VWERASE: usize = 14;
+pub const VREPRINT: usize = 12;
+pub const VSUSP: usize = 10;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VDISCARD: usize = 13;
+pub const VTIME: usize = 5;
+pub const IXON: ::tcflag_t = 0x00000400;
+pub const IXOFF: ::tcflag_t = 0x00001000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x00000030;
+pub const CS6: ::tcflag_t = 0x00000010;
+pub const CS7: ::tcflag_t = 0x00000020;
+pub const CS8: ::tcflag_t = 0x00000030;
+pub const CSTOPB: ::tcflag_t = 0x00000040;
+pub const CREAD: ::tcflag_t = 0x00000080;
+pub const PARENB: ::tcflag_t = 0x00000100;
+pub const PARODD: ::tcflag_t = 0x00000200;
+pub const HUPCL: ::tcflag_t = 0x00000400;
+pub const CLOCAL: ::tcflag_t = 0x00000800;
+pub const ECHOKE: ::tcflag_t = 0x00000800;
+pub const ECHOE: ::tcflag_t = 0x00000010;
+pub const ECHOK: ::tcflag_t = 0x00000020;
+pub const ECHONL: ::tcflag_t = 0x00000040;
+pub const ECHOPRT: ::tcflag_t = 0x00000400;
+pub const ECHOCTL: ::tcflag_t = 0x00000200;
+pub const ISIG: ::tcflag_t = 0x00000001;
+pub const ICANON: ::tcflag_t = 0x00000002;
+pub const PENDIN: ::tcflag_t = 0x00004000;
+pub const NOFLSH: ::tcflag_t = 0x00000080;
+pub const CIBAUD: ::tcflag_t = 0o02003600000;
+pub const CBAUDEX: ::tcflag_t = 0o010000;
+pub const VSWTC: usize = 7;
+pub const OLCUC:  ::tcflag_t = 0o000002;
+pub const NLDLY:  ::tcflag_t = 0o000400;
+pub const CRDLY:  ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const BSDLY:  ::tcflag_t = 0o020000;
+pub const FFDLY:  ::tcflag_t = 0o100000;
+pub const VTDLY:  ::tcflag_t = 0o040000;
+pub const XTABS:  ::tcflag_t = 0o014000;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+
+pub const VEOL: usize = 11;
+pub const VEOL2: usize = 16;
+pub const VMIN: usize = 6;
+pub const IEXTEN: ::tcflag_t = 0x00008000;
+pub const TOSTOP: ::tcflag_t = 0x00000100;
+pub const FLUSHO: ::tcflag_t = 0x00001000;
+pub const EXTPROC: ::tcflag_t = 0x00010000;
+pub const TCGETS: ::c_ulong = 0x5401;
+pub const TCSETS: ::c_ulong = 0x5402;
+pub const TCSETSW: ::c_ulong = 0x5403;
+pub const TCSETSF: ::c_ulong = 0x5404;
+pub const TCGETA: ::c_ulong = 0x5405;
+pub const TCSETA: ::c_ulong = 0x5406;
+pub const TCSETAW: ::c_ulong = 0x5407;
+pub const TCSETAF: ::c_ulong = 0x5408;
+pub const TCSBRK: ::c_ulong = 0x5409;
+pub const TCXONC: ::c_ulong = 0x540A;
+pub const TCFLSH: ::c_ulong = 0x540B;
+pub const TIOCINQ: ::c_ulong = 0x541B;
+pub const TIOCGPGRP: ::c_ulong = 0x540F;
+pub const TIOCSPGRP: ::c_ulong = 0x5410;
+pub const TIOCOUTQ: ::c_ulong = 0x5411;
+pub const TIOCGWINSZ: ::c_ulong = 0x5413;
+pub const TIOCSWINSZ: ::c_ulong = 0x5414;
+pub const FIONREAD: ::c_ulong = 0x541B;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b32/mod.rs
@@ -0,0 +1,297 @@
+//! 32-bit specific definitions for linux-like values
+
+pub type c_long = i32;
+pub type c_ulong = u32;
+pub type clock_t = i32;
+pub type time_t = i32;
+pub type suseconds_t = i32;
+pub type ino_t = u32;
+pub type off_t = i32;
+pub type blkcnt_t = i32;
+pub type __fsword_t = i32;
+
+pub type blksize_t = i32;
+pub type nlink_t = u32;
+pub type __u64 = ::c_ulonglong;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        __pad1: ::c_short,
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __pad2: ::c_short,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        __unused4: ::c_long,
+        __unused5: ::c_long,
+    }
+
+    pub struct pthread_attr_t {
+        __size: [u32; 9]
+    }
+
+    pub struct sigset_t {
+        __val: [::c_ulong; 32],
+    }
+
+    pub struct sysinfo {
+        pub uptime: ::c_long,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
+        pub procs: ::c_ushort,
+        pub pad: ::c_ushort,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
+        pub mem_unit: ::c_uint,
+        pub _f: [::c_char; 8],
+    }
+}
+
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
+
+pub const RLIMIT_NOFILE: ::c_int = 7;
+pub const RLIMIT_NPROC: ::c_int = 6;
+
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 1052672;
+pub const O_RSYNC: ::c_int = 1052672;
+pub const O_DSYNC: ::c_int = 4096;
+pub const O_FSYNC: ::c_int = 0x101000;
+pub const O_NOATIME: ::c_int = 0o1000000;
+pub const O_PATH: ::c_int = 0o10000000;
+
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+
+pub const EDEADLK: ::c_int = 35;
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+pub const EMULTIHOP: ::c_int = 72;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EBADMSG: ::c_int = 74;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ENETDOWN: ::c_int = 100;
+pub const ENETUNREACH: ::c_int = 101;
+pub const ENETRESET: ::c_int = 102;
+pub const ECONNABORTED: ::c_int = 103;
+pub const ECONNRESET: ::c_int = 104;
+pub const ENOBUFS: ::c_int = 105;
+pub const EISCONN: ::c_int = 106;
+pub const ENOTCONN: ::c_int = 107;
+pub const ESHUTDOWN: ::c_int = 108;
+pub const ETOOMANYREFS: ::c_int = 109;
+pub const ETIMEDOUT: ::c_int = 110;
+pub const ECONNREFUSED: ::c_int = 111;
+pub const EHOSTDOWN: ::c_int = 112;
+pub const EHOSTUNREACH: ::c_int = 113;
+pub const EALREADY: ::c_int = 114;
+pub const EINPROGRESS: ::c_int = 115;
+pub const ESTALE: ::c_int = 116;
+pub const EDQUOT: ::c_int = 122;
+pub const ENOMEDIUM: ::c_int = 123;
+pub const EMEDIUMTYPE: ::c_int = 124;
+pub const ECANCELED: ::c_int = 125;
+pub const ENOKEY: ::c_int = 126;
+pub const EKEYEXPIRED: ::c_int = 127;
+pub const EKEYREVOKED: ::c_int = 128;
+pub const EKEYREJECTED: ::c_int = 129;
+pub const EOWNERDEAD: ::c_int = 130;
+pub const ENOTRECOVERABLE: ::c_int = 131;
+pub const EHWPOISON: ::c_int = 133;
+pub const ERFKILL: ::c_int = 132;
+
+pub const SOL_SOCKET: ::c_int = 1;
+
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_BINDTODEVICE: ::c_int = 25;
+pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+pub const SO_MARK: ::c_int = 36;
+pub const SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
+pub const SO_RXQ_OVFL: ::c_int = 40;
+pub const SO_PEEK_OFF: ::c_int = 42;
+pub const SO_BUSY_POLL: ::c_int = 46;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGUNUSED: ::c_int = 31;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
+
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const O_ASYNC: ::c_int = 0x2000;
+pub const O_NDELAY: ::c_int = 0x800;
+
+pub const PTRACE_DETACH: ::c_uint = 17;
+
+pub const EFD_NONBLOCK: ::c_int = 0x800;
+
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETOWN: ::c_int = 8;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+
+pub const SFD_NONBLOCK: ::c_int = 0x0800;
+
+pub const TIOCEXCL: ::c_ulong = 0x540C;
+pub const TIOCNXCL: ::c_ulong = 0x540D;
+pub const TIOCSCTTY: ::c_ulong = 0x540E;
+pub const TIOCSTI: ::c_ulong = 0x5412;
+pub const TIOCMGET: ::c_ulong = 0x5415;
+pub const TIOCMBIS: ::c_ulong = 0x5416;
+pub const TIOCMBIC: ::c_ulong = 0x5417;
+pub const TIOCMSET: ::c_ulong = 0x5418;
+pub const TIOCCONS: ::c_ulong = 0x541D;
+
+pub const SFD_CLOEXEC: ::c_int = 0x080000;
+
+pub const NCCS: usize = 32;
+
+pub const O_TRUNC: ::c_int = 512;
+
+pub const O_CLOEXEC: ::c_int = 0x80000;
+
+pub const EBFONT: ::c_int = 59;
+pub const ENOSTR: ::c_int = 60;
+pub const ENODATA: ::c_int = 61;
+pub const ETIME: ::c_int = 62;
+pub const ENOSR: ::c_int = 63;
+pub const ENONET: ::c_int = 64;
+pub const ENOPKG: ::c_int = 65;
+pub const EREMOTE: ::c_int = 66;
+pub const ENOLINK: ::c_int = 67;
+pub const EADV: ::c_int = 68;
+pub const ESRMNT: ::c_int = 69;
+pub const ECOMM: ::c_int = 70;
+pub const EPROTO: ::c_int = 71;
+pub const EDOTDOT: ::c_int = 73;
+
+pub const SA_NODEFER: ::c_int = 0x40000000;
+pub const SA_RESETHAND: ::c_int = 0x80000000;
+pub const SA_RESTART: ::c_int = 0x10000000;
+pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
+
+pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
+
+pub const EFD_CLOEXEC: ::c_int = 0x80000;
+
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
+
+pub const PTRACE_GETFPREGS: ::c_uint = 14;
+pub const PTRACE_SETFPREGS: ::c_uint = 15;
+pub const PTRACE_GETREGS: ::c_uint = 12;
+pub const PTRACE_SETREGS: ::c_uint = 13;
+
+cfg_if! {
+    if #[cfg(target_arch = "x86")] {
+        mod x86;
+        pub use self::x86::*;
+    } else if #[cfg(target_arch = "arm")] {
+        mod arm;
+        pub use self::arm::*;
+    } else if #[cfg(target_arch = "powerpc")] {
+        mod powerpc;
+        pub use self::powerpc::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b32/powerpc.rs
@@ -0,0 +1,248 @@
+pub type c_char = u8;
+pub type wchar_t = i32;
+
+s! {
+    pub struct ipc_perm {
+        __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::mode_t,
+        __seq: ::uint32_t,
+        __pad1: ::uint32_t,
+        __glibc_reserved1: ::uint64_t,
+        __glibc_reserved2: ::uint64_t,
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino64_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __pad2: ::c_ushort,
+        pub st_size: ::off64_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt64_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        __glibc_reserved4: ::c_ulong,
+        __glibc_reserved5: ::c_ulong,
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::__fsword_t,
+        pub f_bsize: ::__fsword_t,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::__fsword_t,
+        pub f_frsize: ::__fsword_t,
+        pub f_flags: ::__fsword_t,
+        pub f_spare: [::__fsword_t; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        pub f_fsid: ::c_ulong,
+        __f_unused: ::c_int,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        __glibc_reserved1: ::c_uint,
+        pub shm_atime: ::time_t,
+        __glibc_reserved2: ::c_uint,
+        pub shm_dtime: ::time_t,
+        __glibc_reserved3: ::c_uint,
+        pub shm_ctime: ::time_t,
+        __glibc_reserved4: ::c_uint,
+        pub shm_segsz: ::size_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __glibc_reserved5: ::c_ulong,
+        __glibc_reserved6: ::c_ulong,
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        __glibc_reserved1: ::c_uint,
+        pub msg_stime: ::time_t,
+        __glibc_reserved2: ::c_uint,
+        pub msg_rtime: ::time_t,
+        __glibc_reserved3: ::c_uint,
+        pub msg_ctime: ::time_t,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __glibc_reserved4: ::c_ulong,
+        __glibc_reserved5: ::c_ulong,
+    }
+}
+
+pub const O_DIRECT: ::c_int = 0x20000;
+pub const O_DIRECTORY: ::c_int = 0x4000;
+pub const O_NOFOLLOW: ::c_int = 0x8000;
+pub const O_LARGEFILE: ::c_int = 0o200000;
+
+pub const MAP_LOCKED: ::c_int = 0x00080;
+pub const MAP_NORESERVE: ::c_int = 0x00040;
+
+pub const EDEADLOCK: ::c_int = 58;
+
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_RCVLOWAT: ::c_int = 16;
+pub const SO_SNDLOWAT: ::c_int = 17;
+pub const SO_RCVTIMEO: ::c_int = 18;
+pub const SO_SNDTIMEO: ::c_int = 19;
+pub const SO_PASSCRED: ::c_int = 20;
+pub const SO_PEERCRED: ::c_int = 21;
+
+pub const FIOCLEX: ::c_ulong = 0x20006601;
+pub const FIONBIO: ::c_ulong = 0x8004667e;
+
+pub const SYS_pivot_root: ::c_long = 203;
+pub const SYS_gettid: ::c_long = 207;
+pub const SYS_perf_event_open: ::c_long = 319;
+pub const SYS_memfd_create: ::c_long = 360;
+
+pub const MCL_CURRENT: ::c_int = 0x2000;
+pub const MCL_FUTURE: ::c_int = 0x4000;
+
+pub const SIGSTKSZ: ::size_t = 0x4000;
+pub const MINSIGSTKSZ: ::size_t = 4096;
+pub const CBAUD: ::tcflag_t = 0xff;
+pub const TAB1: ::c_int = 0x400;
+pub const TAB2: ::c_int = 0x800;
+pub const TAB3: ::c_int = 0xc00;
+pub const CR1: ::c_int  = 0x1000;
+pub const CR2: ::c_int  = 0x2000;
+pub const CR3: ::c_int  = 0x3000;
+pub const FF1: ::c_int  = 0x4000;
+pub const BS1: ::c_int  = 0x8000;
+pub const VT1: ::c_int  = 0x10000;
+pub const VWERASE: usize = 0xa;
+pub const VREPRINT: usize = 0xb;
+pub const VSUSP: usize = 0xc;
+pub const VSTART: usize = 0xd;
+pub const VSTOP: usize = 0xe;
+pub const VDISCARD: usize = 0x10;
+pub const VTIME: usize = 0x7;
+pub const IXON: ::tcflag_t = 0x200;
+pub const IXOFF: ::tcflag_t = 0x400;
+pub const ONLCR: ::tcflag_t = 0x2;
+pub const CSIZE: ::tcflag_t = 0x300;
+pub const CS6: ::tcflag_t = 0x100;
+pub const CS7: ::tcflag_t = 0x200;
+pub const CS8: ::tcflag_t = 0x300;
+pub const CSTOPB: ::tcflag_t = 0x400;
+pub const CREAD: ::tcflag_t = 0x800;
+pub const PARENB: ::tcflag_t = 0x1000;
+pub const PARODD: ::tcflag_t = 0x2000;
+pub const HUPCL: ::tcflag_t = 0x4000;
+pub const CLOCAL: ::tcflag_t = 0x8000;
+pub const ECHOKE: ::tcflag_t = 0x1;
+pub const ECHOE: ::tcflag_t = 0x2;
+pub const ECHOK: ::tcflag_t = 0x4;
+pub const ECHONL: ::tcflag_t = 0x10;
+pub const ECHOPRT: ::tcflag_t = 0x20;
+pub const ECHOCTL: ::tcflag_t = 0x40;
+pub const ISIG: ::tcflag_t = 0x80;
+pub const ICANON: ::tcflag_t = 0x100;
+pub const PENDIN: ::tcflag_t = 0x20000000;
+pub const NOFLSH: ::tcflag_t = 0x80000000;
+pub const VSWTC: usize = 9;
+pub const OLCUC:  ::tcflag_t = 0o000004;
+pub const NLDLY:  ::tcflag_t = 0o001400;
+pub const CRDLY:  ::tcflag_t = 0o030000;
+pub const TABDLY: ::tcflag_t = 0o006000;
+pub const BSDLY:  ::tcflag_t = 0o100000;
+pub const FFDLY:  ::tcflag_t = 0o040000;
+pub const VTDLY:  ::tcflag_t = 0o200000;
+pub const XTABS:  ::tcflag_t = 0o006000;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const CBAUDEX: ::speed_t = 0o000020;
+pub const B57600: ::speed_t = 0o0020;
+pub const B115200: ::speed_t = 0o0021;
+pub const B230400: ::speed_t = 0o0022;
+pub const B460800: ::speed_t = 0o0023;
+pub const B500000: ::speed_t = 0o0024;
+pub const B576000: ::speed_t = 0o0025;
+pub const B921600: ::speed_t = 0o0026;
+pub const B1000000: ::speed_t = 0o0027;
+pub const B1152000: ::speed_t = 0o0030;
+pub const B1500000: ::speed_t = 0o0031;
+pub const B2000000: ::speed_t = 0o0032;
+pub const B2500000: ::speed_t = 0o0033;
+pub const B3000000: ::speed_t = 0o0034;
+pub const B3500000: ::speed_t = 0o0035;
+pub const B4000000: ::speed_t = 0o0036;
+
+pub const VEOL: usize = 6;
+pub const VEOL2: usize = 8;
+pub const VMIN: usize = 5;
+pub const IEXTEN: ::tcflag_t = 0x400;
+pub const TOSTOP: ::tcflag_t = 0x400000;
+pub const FLUSHO: ::tcflag_t = 0x800000;
+pub const EXTPROC: ::tcflag_t = 0x10000000;
+pub const TCGETS: ::c_ulong = 0x403c7413;
+pub const TCSETS: ::c_ulong = 0x803c7414;
+pub const TCSETSW: ::c_ulong = 0x803c7415;
+pub const TCSETSF: ::c_ulong = 0x803c7416;
+pub const TCGETA: ::c_ulong = 0x40147417;
+pub const TCSETA: ::c_ulong = 0x80147418;
+pub const TCSETAW: ::c_ulong = 0x80147419;
+pub const TCSETAF: ::c_ulong = 0x8014741c;
+pub const TCSBRK: ::c_ulong = 0x2000741d;
+pub const TCXONC: ::c_ulong = 0x2000741e;
+pub const TCFLSH: ::c_ulong = 0x2000741f;
+pub const TIOCINQ: ::c_ulong = 0x4004667f;
+pub const TIOCGPGRP: ::c_ulong = 0x40047477;
+pub const TIOCSPGRP: ::c_ulong = 0x80047476;
+pub const TIOCOUTQ: ::c_ulong = 0x40047473;
+pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
+pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
+pub const FIONREAD: ::c_ulong = 0x4004667f;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b32/x86.rs
@@ -0,0 +1,757 @@
+pub type c_char = i8;
+pub type wchar_t = i32;
+pub type greg_t = i32;
+
+s! {
+    pub struct _libc_fpreg {
+        pub significand: [u16; 4],
+        pub exponent: u16,
+    }
+
+    pub struct _libc_fpstate {
+        pub cw: ::c_ulong,
+        pub sw: ::c_ulong,
+        pub tag: ::c_ulong,
+        pub ipoff: ::c_ulong,
+        pub cssel: ::c_ulong,
+        pub dataoff: ::c_ulong,
+        pub datasel: ::c_ulong,
+        pub _st: [_libc_fpreg; 8],
+        pub status: ::c_ulong,
+    }
+
+    pub struct user_fpregs_struct {
+        pub cwd: ::c_long,
+        pub swd: ::c_long,
+        pub twd: ::c_long,
+        pub fip: ::c_long,
+        pub fcs: ::c_long,
+        pub foo: ::c_long,
+        pub fos: ::c_long,
+        pub st_space: [::c_long; 20],
+    }
+
+    pub struct user_fpxregs_struct {
+        pub cwd: ::c_ushort,
+        pub swd: ::c_ushort,
+        pub twd: ::c_ushort,
+        pub fop: ::c_ushort,
+        pub fip: ::c_long,
+        pub fcs: ::c_long,
+        pub foo: ::c_long,
+        pub fos: ::c_long,
+        pub mxcsr: ::c_long,
+        __reserved: ::c_long,
+        pub st_space: [::c_long; 32],
+        pub xmm_space: [::c_long; 32],
+        padding: [::c_long; 56],
+    }
+
+    pub struct user_regs_struct {
+        pub ebx: ::c_long,
+        pub ecx: ::c_long,
+        pub edx: ::c_long,
+        pub esi: ::c_long,
+        pub edi: ::c_long,
+        pub ebp: ::c_long,
+        pub eax: ::c_long,
+        pub xds: ::c_long,
+        pub xes: ::c_long,
+        pub xfs: ::c_long,
+        pub xgs: ::c_long,
+        pub orig_eax: ::c_long,
+        pub eip: ::c_long,
+        pub xcs: ::c_long,
+        pub eflags: ::c_long,
+        pub esp: ::c_long,
+        pub xss: ::c_long,
+    }
+
+    pub struct user {
+        pub regs: user_regs_struct,
+        pub u_fpvalid: ::c_int,
+        pub i387: user_fpregs_struct,
+        pub u_tsize: ::c_ulong,
+        pub u_dsize: ::c_ulong,
+        pub u_ssize: ::c_ulong,
+        pub start_code: ::c_ulong,
+        pub start_stack: ::c_ulong,
+        pub signal: ::c_long,
+        __reserved: ::c_int,
+        pub u_ar0: *mut user_regs_struct,
+        pub u_fpstate: *mut user_fpregs_struct,
+        pub magic: ::c_ulong,
+        pub u_comm: [c_char; 32],
+        pub u_debugreg: [::c_int; 8],
+    }
+
+    pub struct mcontext_t {
+        pub gregs: [greg_t; 19],
+        pub fpregs: *mut _libc_fpstate,
+        pub oldmask: ::c_ulong,
+        pub cr2: ::c_ulong,
+    }
+
+    pub struct ucontext_t {
+        pub uc_flags: ::c_ulong,
+        pub uc_link: *mut ucontext_t,
+        pub uc_stack: ::stack_t,
+        pub uc_mcontext: mcontext_t,
+        pub uc_sigmask: ::sigset_t,
+        __private: [u8; 112],
+    }
+
+    pub struct ipc_perm {
+        pub __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::c_ushort,
+        __pad1: ::c_ushort,
+        pub __seq: ::c_ushort,
+        __pad2: ::c_ushort,
+        __unused1: ::c_ulong,
+        __unused2: ::c_ulong
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        __pad1: ::c_uint,
+        __st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __pad2: ::c_uint,
+        pub st_size: ::off64_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt64_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_ino: ::ino64_t,
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::__fsword_t,
+        pub f_bsize: ::__fsword_t,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::__fsword_t,
+        pub f_frsize: ::__fsword_t,
+        pub f_flags: ::__fsword_t,
+        pub f_spare: [::__fsword_t; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        pub f_fsid: ::c_ulong,
+        __f_unused: ::c_int,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        __unused1: ::c_ulong,
+        pub shm_dtime: ::time_t,
+        __unused2: ::c_ulong,
+        pub shm_ctime: ::time_t,
+        __unused3: ::c_ulong,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __unused4: ::c_ulong,
+        __unused5: ::c_ulong
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        pub msg_stime: ::time_t,
+        __glibc_reserved1: ::c_ulong,
+        pub msg_rtime: ::time_t,
+        __glibc_reserved2: ::c_ulong,
+        pub msg_ctime: ::time_t,
+        __glibc_reserved3: ::c_ulong,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __glibc_reserved4: ::c_ulong,
+        __glibc_reserved5: ::c_ulong,
+    }
+}
+
+pub const O_DIRECT: ::c_int = 0x4000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+pub const O_LARGEFILE: ::c_int = 0o0100000;
+
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_32BIT: ::c_int = 0x0040;
+
+pub const EDEADLOCK: ::c_int = 35;
+
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PASSCRED: ::c_int = 16;
+pub const SO_PEERCRED: ::c_int = 17;
+pub const SO_RCVLOWAT: ::c_int = 18;
+pub const SO_SNDLOWAT: ::c_int = 19;
+pub const SO_RCVTIMEO: ::c_int = 20;
+pub const SO_SNDTIMEO: ::c_int = 21;
+
+pub const FIOCLEX: ::c_ulong = 0x5451;
+pub const FIONBIO: ::c_ulong = 0x5421;
+
+pub const PTRACE_GETFPXREGS: ::c_uint = 18;
+pub const PTRACE_SETFPXREGS: ::c_uint = 19;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
+pub const CBAUD: ::tcflag_t = 0o0010017;
+pub const TAB1: ::c_int = 0x00000800;
+pub const TAB2: ::c_int = 0x00001000;
+pub const TAB3: ::c_int = 0x00001800;
+pub const CR1: ::c_int  = 0x00000200;
+pub const CR2: ::c_int  = 0x00000400;
+pub const CR3: ::c_int  = 0x00000600;
+pub const FF1: ::c_int  = 0x00008000;
+pub const BS1: ::c_int  = 0x00002000;
+pub const VT1: ::c_int  = 0x00004000;
+pub const VWERASE: usize = 14;
+pub const VREPRINT: usize = 12;
+pub const VSUSP: usize = 10;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VDISCARD: usize = 13;
+pub const VTIME: usize = 5;
+pub const IXON: ::tcflag_t = 0x00000400;
+pub const IXOFF: ::tcflag_t = 0x00001000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x00000030;
+pub const CS6: ::tcflag_t = 0x00000010;
+pub const CS7: ::tcflag_t = 0x00000020;
+pub const CS8: ::tcflag_t = 0x00000030;
+pub const CSTOPB: ::tcflag_t = 0x00000040;
+pub const CREAD: ::tcflag_t = 0x00000080;
+pub const PARENB: ::tcflag_t = 0x00000100;
+pub const PARODD: ::tcflag_t = 0x00000200;
+pub const HUPCL: ::tcflag_t = 0x00000400;
+pub const CLOCAL: ::tcflag_t = 0x00000800;
+pub const ECHOKE: ::tcflag_t = 0x00000800;
+pub const ECHOE: ::tcflag_t = 0x00000010;
+pub const ECHOK: ::tcflag_t = 0x00000020;
+pub const ECHONL: ::tcflag_t = 0x00000040;
+pub const ECHOPRT: ::tcflag_t = 0x00000400;
+pub const ECHOCTL: ::tcflag_t = 0x00000200;
+pub const ISIG: ::tcflag_t = 0x00000001;
+pub const ICANON: ::tcflag_t = 0x00000002;
+pub const PENDIN: ::tcflag_t = 0x00004000;
+pub const NOFLSH: ::tcflag_t = 0x00000080;
+pub const CIBAUD: ::tcflag_t = 0o02003600000;
+pub const CBAUDEX: ::tcflag_t = 0o010000;
+pub const VSWTC: usize = 7;
+pub const OLCUC:  ::tcflag_t = 0o000002;
+pub const NLDLY:  ::tcflag_t = 0o000400;
+pub const CRDLY:  ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const BSDLY:  ::tcflag_t = 0o020000;
+pub const FFDLY:  ::tcflag_t = 0o100000;
+pub const VTDLY:  ::tcflag_t = 0o040000;
+pub const XTABS:  ::tcflag_t = 0o014000;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+
+pub const VEOL: usize = 11;
+pub const VEOL2: usize = 16;
+pub const VMIN: usize = 6;
+pub const IEXTEN: ::tcflag_t = 0x00008000;
+pub const TOSTOP: ::tcflag_t = 0x00000100;
+pub const FLUSHO: ::tcflag_t = 0x00001000;
+pub const EXTPROC: ::tcflag_t = 0x00010000;
+pub const TCGETS: ::c_ulong = 0x5401;
+pub const TCSETS: ::c_ulong = 0x5402;
+pub const TCSETSW: ::c_ulong = 0x5403;
+pub const TCSETSF: ::c_ulong = 0x5404;
+pub const TCGETA: ::c_ulong = 0x5405;
+pub const TCSETA: ::c_ulong = 0x5406;
+pub const TCSETAW: ::c_ulong = 0x5407;
+pub const TCSETAF: ::c_ulong = 0x5408;
+pub const TCSBRK: ::c_ulong = 0x5409;
+pub const TCXONC: ::c_ulong = 0x540A;
+pub const TCFLSH: ::c_ulong = 0x540B;
+pub const TIOCINQ: ::c_ulong = 0x541B;
+pub const TIOCGPGRP: ::c_ulong = 0x540F;
+pub const TIOCSPGRP: ::c_ulong = 0x5410;
+pub const TIOCOUTQ: ::c_ulong = 0x5411;
+pub const TIOCGWINSZ: ::c_ulong = 0x5413;
+pub const TIOCSWINSZ: ::c_ulong = 0x5414;
+pub const FIONREAD: ::c_ulong = 0x541B;
+
+// Syscall table
+pub const SYS_restart_syscall: ::c_long = 0;
+pub const SYS_exit: ::c_long = 1;
+pub const SYS_fork: ::c_long = 2;
+pub const SYS_read: ::c_long = 3;
+pub const SYS_write: ::c_long = 4;
+pub const SYS_open: ::c_long = 5;
+pub const SYS_close: ::c_long = 6;
+pub const SYS_waitpid: ::c_long = 7;
+pub const SYS_creat: ::c_long = 8;
+pub const SYS_link: ::c_long = 9;
+pub const SYS_unlink: ::c_long = 10;
+pub const SYS_execve: ::c_long = 11;
+pub const SYS_chdir: ::c_long = 12;
+pub const SYS_time: ::c_long = 13;
+pub const SYS_mknod: ::c_long = 14;
+pub const SYS_chmod: ::c_long = 15;
+pub const SYS_lchown: ::c_long = 16;
+pub const SYS_break: ::c_long = 17;
+pub const SYS_oldstat: ::c_long = 18;
+pub const SYS_lseek: ::c_long = 19;
+pub const SYS_getpid: ::c_long = 20;
+pub const SYS_mount: ::c_long = 21;
+pub const SYS_umount: ::c_long = 22;
+pub const SYS_setuid: ::c_long = 23;
+pub const SYS_getuid: ::c_long = 24;
+pub const SYS_stime: ::c_long = 25;
+pub const SYS_ptrace: ::c_long = 26;
+pub const SYS_alarm: ::c_long = 27;
+pub const SYS_oldfstat: ::c_long = 28;
+pub const SYS_pause: ::c_long = 29;
+pub const SYS_utime: ::c_long = 30;
+pub const SYS_stty: ::c_long = 31;
+pub const SYS_gtty: ::c_long = 32;
+pub const SYS_access: ::c_long = 33;
+pub const SYS_nice: ::c_long = 34;
+pub const SYS_ftime: ::c_long = 35;
+pub const SYS_sync: ::c_long = 36;
+pub const SYS_kill: ::c_long = 37;
+pub const SYS_rename: ::c_long = 38;
+pub const SYS_mkdir: ::c_long = 39;
+pub const SYS_rmdir: ::c_long = 40;
+pub const SYS_dup: ::c_long = 41;
+pub const SYS_pipe: ::c_long = 42;
+pub const SYS_times: ::c_long = 43;
+pub const SYS_prof: ::c_long = 44;
+pub const SYS_brk: ::c_long = 45;
+pub const SYS_setgid: ::c_long = 46;
+pub const SYS_getgid: ::c_long = 47;
+pub const SYS_signal: ::c_long = 48;
+pub const SYS_geteuid: ::c_long = 49;
+pub const SYS_getegid: ::c_long = 50;
+pub const SYS_acct: ::c_long = 51;
+pub const SYS_umount2: ::c_long = 52;
+pub const SYS_lock: ::c_long = 53;
+pub const SYS_ioctl: ::c_long = 54;
+pub const SYS_fcntl: ::c_long = 55;
+pub const SYS_mpx: ::c_long = 56;
+pub const SYS_setpgid: ::c_long = 57;
+pub const SYS_ulimit: ::c_long = 58;
+pub const SYS_oldolduname: ::c_long = 59;
+pub const SYS_umask: ::c_long = 60;
+pub const SYS_chroot: ::c_long = 61;
+pub const SYS_ustat: ::c_long = 62;
+pub const SYS_dup2: ::c_long = 63;
+pub const SYS_getppid: ::c_long = 64;
+pub const SYS_getpgrp: ::c_long = 65;
+pub const SYS_setsid: ::c_long = 66;
+pub const SYS_sigaction: ::c_long = 67;
+pub const SYS_sgetmask: ::c_long = 68;
+pub const SYS_ssetmask: ::c_long = 69;
+pub const SYS_setreuid: ::c_long = 70;
+pub const SYS_setregid: ::c_long = 71;
+pub const SYS_sigsuspend: ::c_long = 72;
+pub const SYS_sigpending: ::c_long = 73;
+pub const SYS_sethostname: ::c_long = 74;
+pub const SYS_setrlimit: ::c_long = 75;
+pub const SYS_getrlimit: ::c_long = 76;
+pub const SYS_getrusage: ::c_long = 77;
+pub const SYS_gettimeofday: ::c_long = 78;
+pub const SYS_settimeofday: ::c_long = 79;
+pub const SYS_getgroups: ::c_long = 80;
+pub const SYS_setgroups: ::c_long = 81;
+pub const SYS_select: ::c_long = 82;
+pub const SYS_symlink: ::c_long = 83;
+pub const SYS_oldlstat: ::c_long = 84;
+pub const SYS_readlink: ::c_long = 85;
+pub const SYS_uselib: ::c_long = 86;
+pub const SYS_swapon: ::c_long = 87;
+pub const SYS_reboot: ::c_long = 88;
+pub const SYS_readdir: ::c_long = 89;
+pub const SYS_mmap: ::c_long = 90;
+pub const SYS_munmap: ::c_long = 91;
+pub const SYS_truncate: ::c_long = 92;
+pub const SYS_ftruncate: ::c_long = 93;
+pub const SYS_fchmod: ::c_long = 94;
+pub const SYS_fchown: ::c_long = 95;
+pub const SYS_getpriority: ::c_long = 96;
+pub const SYS_setpriority: ::c_long = 97;
+pub const SYS_profil: ::c_long = 98;
+pub const SYS_statfs: ::c_long = 99;
+pub const SYS_fstatfs: ::c_long = 100;
+pub const SYS_ioperm: ::c_long = 101;
+pub const SYS_socketcall: ::c_long = 102;
+pub const SYS_syslog: ::c_long = 103;
+pub const SYS_setitimer: ::c_long = 104;
+pub const SYS_getitimer: ::c_long = 105;
+pub const SYS_stat: ::c_long = 106;
+pub const SYS_lstat: ::c_long = 107;
+pub const SYS_fstat: ::c_long = 108;
+pub const SYS_olduname: ::c_long = 109;
+pub const SYS_iopl: ::c_long = 110;
+pub const SYS_vhangup: ::c_long = 111;
+pub const SYS_idle: ::c_long = 112;
+pub const SYS_vm86old: ::c_long = 113;
+pub const SYS_wait4: ::c_long = 114;
+pub const SYS_swapoff: ::c_long = 115;
+pub const SYS_sysinfo: ::c_long = 116;
+pub const SYS_ipc: ::c_long = 117;
+pub const SYS_fsync: ::c_long = 118;
+pub const SYS_sigreturn: ::c_long = 119;
+pub const SYS_clone: ::c_long = 120;
+pub const SYS_setdomainname: ::c_long = 121;
+pub const SYS_uname: ::c_long = 122;
+pub const SYS_modify_ldt: ::c_long = 123;
+pub const SYS_adjtimex: ::c_long = 124;
+pub const SYS_mprotect: ::c_long = 125;
+pub const SYS_sigprocmask: ::c_long = 126;
+pub const SYS_create_module: ::c_long = 127;
+pub const SYS_init_module: ::c_long = 128;
+pub const SYS_delete_module: ::c_long = 129;
+pub const SYS_get_kernel_syms: ::c_long = 130;
+pub const SYS_quotactl: ::c_long = 131;
+pub const SYS_getpgid: ::c_long = 132;
+pub const SYS_fchdir: ::c_long = 133;
+pub const SYS_bdflush: ::c_long = 134;
+pub const SYS_sysfs: ::c_long = 135;
+pub const SYS_personality: ::c_long = 136;
+pub const SYS_afs_syscall: ::c_long = 137;
+pub const SYS_setfsuid: ::c_long = 138;
+pub const SYS_setfsgid: ::c_long = 139;
+pub const SYS__llseek: ::c_long = 140;
+pub const SYS_getdents: ::c_long = 141;
+pub const SYS__newselect: ::c_long = 142;
+pub const SYS_flock: ::c_long = 143;
+pub const SYS_msync: ::c_long = 144;
+pub const SYS_readv: ::c_long = 145;
+pub const SYS_writev: ::c_long = 146;
+pub const SYS_getsid: ::c_long = 147;
+pub const SYS_fdatasync: ::c_long = 148;
+pub const SYS__sysctl: ::c_long = 149;
+pub const SYS_mlock: ::c_long = 150;
+pub const SYS_munlock: ::c_long = 151;
+pub const SYS_mlockall: ::c_long = 152;
+pub const SYS_munlockall: ::c_long = 153;
+pub const SYS_sched_setparam: ::c_long = 154;
+pub const SYS_sched_getparam: ::c_long = 155;
+pub const SYS_sched_setscheduler: ::c_long = 156;
+pub const SYS_sched_getscheduler: ::c_long = 157;
+pub const SYS_sched_yield: ::c_long = 158;
+pub const SYS_sched_get_priority_max: ::c_long = 159;
+pub const SYS_sched_get_priority_min: ::c_long = 160;
+pub const SYS_sched_rr_get_interval: ::c_long = 161;
+pub const SYS_nanosleep: ::c_long = 162;
+pub const SYS_mremap: ::c_long = 163;
+pub const SYS_setresuid: ::c_long = 164;
+pub const SYS_getresuid: ::c_long = 165;
+pub const SYS_vm86: ::c_long = 166;
+pub const SYS_query_module: ::c_long = 167;
+pub const SYS_poll: ::c_long = 168;
+pub const SYS_nfsservctl: ::c_long = 169;
+pub const SYS_setresgid: ::c_long = 170;
+pub const SYS_getresgid: ::c_long = 171;
+pub const SYS_prctl: ::c_long = 172;
+pub const SYS_rt_sigreturn: ::c_long = 173;
+pub const SYS_rt_sigaction: ::c_long = 174;
+pub const SYS_rt_sigprocmask: ::c_long = 175;
+pub const SYS_rt_sigpending: ::c_long = 176;
+pub const SYS_rt_sigtimedwait: ::c_long = 177;
+pub const SYS_rt_sigqueueinfo: ::c_long = 178;
+pub const SYS_rt_sigsuspend: ::c_long = 179;
+pub const SYS_pread64: ::c_long = 180;
+pub const SYS_pwrite64: ::c_long = 181;
+pub const SYS_chown: ::c_long = 182;
+pub const SYS_getcwd: ::c_long = 183;
+pub const SYS_capget: ::c_long = 184;
+pub const SYS_capset: ::c_long = 185;
+pub const SYS_sigaltstack: ::c_long = 186;
+pub const SYS_sendfile: ::c_long = 187;
+pub const SYS_getpmsg: ::c_long = 188;
+pub const SYS_putpmsg: ::c_long = 189;
+pub const SYS_vfork: ::c_long = 190;
+pub const SYS_ugetrlimit: ::c_long = 191;
+pub const SYS_mmap2: ::c_long = 192;
+pub const SYS_truncate64: ::c_long = 193;
+pub const SYS_ftruncate64: ::c_long = 194;
+pub const SYS_stat64: ::c_long = 195;
+pub const SYS_lstat64: ::c_long = 196;
+pub const SYS_fstat64: ::c_long = 197;
+pub const SYS_lchown32: ::c_long = 198;
+pub const SYS_getuid32: ::c_long = 199;
+pub const SYS_getgid32: ::c_long = 200;
+pub const SYS_geteuid32: ::c_long = 201;
+pub const SYS_getegid32: ::c_long = 202;
+pub const SYS_setreuid32: ::c_long = 203;
+pub const SYS_setregid32: ::c_long = 204;
+pub const SYS_getgroups32: ::c_long = 205;
+pub const SYS_setgroups32: ::c_long = 206;
+pub const SYS_fchown32: ::c_long = 207;
+pub const SYS_setresuid32: ::c_long = 208;
+pub const SYS_getresuid32: ::c_long = 209;
+pub const SYS_setresgid32: ::c_long = 210;
+pub const SYS_getresgid32: ::c_long = 211;
+pub const SYS_chown32: ::c_long = 212;
+pub const SYS_setuid32: ::c_long = 213;
+pub const SYS_setgid32: ::c_long = 214;
+pub const SYS_setfsuid32: ::c_long = 215;
+pub const SYS_setfsgid32: ::c_long = 216;
+pub const SYS_pivot_root: ::c_long = 217;
+pub const SYS_mincore: ::c_long = 218;
+pub const SYS_madvise: ::c_long = 219;
+pub const SYS_getdents64: ::c_long = 220;
+pub const SYS_fcntl64: ::c_long = 221;
+pub const SYS_gettid: ::c_long = 224;
+pub const SYS_readahead: ::c_long = 225;
+pub const SYS_setxattr: ::c_long = 226;
+pub const SYS_lsetxattr: ::c_long = 227;
+pub const SYS_fsetxattr: ::c_long = 228;
+pub const SYS_getxattr: ::c_long = 229;
+pub const SYS_lgetxattr: ::c_long = 230;
+pub const SYS_fgetxattr: ::c_long = 231;
+pub const SYS_listxattr: ::c_long = 232;
+pub const SYS_llistxattr: ::c_long = 233;
+pub const SYS_flistxattr: ::c_long = 234;
+pub const SYS_removexattr: ::c_long = 235;
+pub const SYS_lremovexattr: ::c_long = 236;
+pub const SYS_fremovexattr: ::c_long = 237;
+pub const SYS_tkill: ::c_long = 238;
+pub const SYS_sendfile64: ::c_long = 239;
+pub const SYS_futex: ::c_long = 240;
+pub const SYS_sched_setaffinity: ::c_long = 241;
+pub const SYS_sched_getaffinity: ::c_long = 242;
+pub const SYS_set_thread_area: ::c_long = 243;
+pub const SYS_get_thread_area: ::c_long = 244;
+pub const SYS_io_setup: ::c_long = 245;
+pub const SYS_io_destroy: ::c_long = 246;
+pub const SYS_io_getevents: ::c_long = 247;
+pub const SYS_io_submit: ::c_long = 248;
+pub const SYS_io_cancel: ::c_long = 249;
+pub const SYS_fadvise64: ::c_long = 250;
+pub const SYS_exit_group: ::c_long = 252;
+pub const SYS_lookup_dcookie: ::c_long = 253;
+pub const SYS_epoll_create: ::c_long = 254;
+pub const SYS_epoll_ctl: ::c_long = 255;
+pub const SYS_epoll_wait: ::c_long = 256;
+pub const SYS_remap_file_pages: ::c_long = 257;
+pub const SYS_set_tid_address: ::c_long = 258;
+pub const SYS_timer_create: ::c_long = 259;
+pub const SYS_timer_settime: ::c_long = 260;
+pub const SYS_timer_gettime: ::c_long = 261;
+pub const SYS_timer_getoverrun: ::c_long = 262;
+pub const SYS_timer_delete: ::c_long = 263;
+pub const SYS_clock_settime: ::c_long = 264;
+pub const SYS_clock_gettime: ::c_long = 265;
+pub const SYS_clock_getres: ::c_long = 266;
+pub const SYS_clock_nanosleep: ::c_long = 267;
+pub const SYS_statfs64: ::c_long = 268;
+pub const SYS_fstatfs64: ::c_long = 269;
+pub const SYS_tgkill: ::c_long = 270;
+pub const SYS_utimes: ::c_long = 271;
+pub const SYS_fadvise64_64: ::c_long = 272;
+pub const SYS_vserver: ::c_long = 273;
+pub const SYS_mbind: ::c_long = 274;
+pub const SYS_get_mempolicy: ::c_long = 275;
+pub const SYS_set_mempolicy: ::c_long = 276;
+pub const SYS_mq_open: ::c_long = 277;
+pub const SYS_mq_unlink: ::c_long = 278;
+pub const SYS_mq_timedsend: ::c_long = 279;
+pub const SYS_mq_timedreceive: ::c_long = 280;
+pub const SYS_mq_notify: ::c_long = 281;
+pub const SYS_mq_getsetattr: ::c_long = 282;
+pub const SYS_kexec_load: ::c_long = 283;
+pub const SYS_waitid: ::c_long = 284;
+pub const SYS_add_key: ::c_long = 286;
+pub const SYS_request_key: ::c_long = 287;
+pub const SYS_keyctl: ::c_long = 288;
+pub const SYS_ioprio_set: ::c_long = 289;
+pub const SYS_ioprio_get: ::c_long = 290;
+pub const SYS_inotify_init: ::c_long = 291;
+pub const SYS_inotify_add_watch: ::c_long = 292;
+pub const SYS_inotify_rm_watch: ::c_long = 293;
+pub const SYS_migrate_pages: ::c_long = 294;
+pub const SYS_openat: ::c_long = 295;
+pub const SYS_mkdirat: ::c_long = 296;
+pub const SYS_mknodat: ::c_long = 297;
+pub const SYS_fchownat: ::c_long = 298;
+pub const SYS_futimesat: ::c_long = 299;
+pub const SYS_fstatat64: ::c_long = 300;
+pub const SYS_unlinkat: ::c_long = 301;
+pub const SYS_renameat: ::c_long = 302;
+pub const SYS_linkat: ::c_long = 303;
+pub const SYS_symlinkat: ::c_long = 304;
+pub const SYS_readlinkat: ::c_long = 305;
+pub const SYS_fchmodat: ::c_long = 306;
+pub const SYS_faccessat: ::c_long = 307;
+pub const SYS_pselect6: ::c_long = 308;
+pub const SYS_ppoll: ::c_long = 309;
+pub const SYS_unshare: ::c_long = 310;
+pub const SYS_set_robust_list: ::c_long = 311;
+pub const SYS_get_robust_list: ::c_long = 312;
+pub const SYS_splice: ::c_long = 313;
+pub const SYS_sync_file_range: ::c_long = 314;
+pub const SYS_tee: ::c_long = 315;
+pub const SYS_vmsplice: ::c_long = 316;
+pub const SYS_move_pages: ::c_long = 317;
+pub const SYS_getcpu: ::c_long = 318;
+pub const SYS_epoll_pwait: ::c_long = 319;
+pub const SYS_utimensat: ::c_long = 320;
+pub const SYS_signalfd: ::c_long = 321;
+pub const SYS_timerfd_create: ::c_long = 322;
+pub const SYS_eventfd: ::c_long = 323;
+pub const SYS_fallocate: ::c_long = 324;
+pub const SYS_timerfd_settime: ::c_long = 325;
+pub const SYS_timerfd_gettime: ::c_long = 326;
+pub const SYS_signalfd4: ::c_long = 327;
+pub const SYS_eventfd2: ::c_long = 328;
+pub const SYS_epoll_create1: ::c_long = 329;
+pub const SYS_dup3: ::c_long = 330;
+pub const SYS_pipe2: ::c_long = 331;
+pub const SYS_inotify_init1: ::c_long = 332;
+pub const SYS_preadv: ::c_long = 333;
+pub const SYS_pwritev: ::c_long = 334;
+pub const SYS_rt_tgsigqueueinfo: ::c_long = 335;
+pub const SYS_perf_event_open: ::c_long = 336;
+pub const SYS_recvmmsg: ::c_long = 337;
+pub const SYS_fanotify_init: ::c_long = 338;
+pub const SYS_fanotify_mark: ::c_long = 339;
+pub const SYS_prlimit64: ::c_long = 340;
+pub const SYS_name_to_handle_at: ::c_long = 341;
+pub const SYS_open_by_handle_at: ::c_long = 342;
+pub const SYS_clock_adjtime: ::c_long = 343;
+pub const SYS_syncfs: ::c_long = 344;
+pub const SYS_sendmmsg: ::c_long = 345;
+pub const SYS_setns: ::c_long = 346;
+pub const SYS_process_vm_readv: ::c_long = 347;
+pub const SYS_process_vm_writev: ::c_long = 348;
+pub const SYS_kcmp: ::c_long = 349;
+pub const SYS_finit_module: ::c_long = 350;
+pub const SYS_sched_setattr: ::c_long = 351;
+pub const SYS_sched_getattr: ::c_long = 352;
+pub const SYS_renameat2: ::c_long = 353;
+pub const SYS_seccomp: ::c_long = 354;
+pub const SYS_getrandom: ::c_long = 355;
+pub const SYS_memfd_create: ::c_long = 356;
+pub const SYS_bpf: ::c_long = 357;
+pub const SYS_execveat: ::c_long = 358;
+pub const SYS_socket: ::c_long = 359;
+pub const SYS_socketpair: ::c_long = 360;
+pub const SYS_bind: ::c_long = 361;
+pub const SYS_connect: ::c_long = 362;
+pub const SYS_listen: ::c_long = 363;
+pub const SYS_accept4: ::c_long = 364;
+pub const SYS_getsockopt: ::c_long = 365;
+pub const SYS_setsockopt: ::c_long = 366;
+pub const SYS_getsockname: ::c_long = 367;
+pub const SYS_getpeername: ::c_long = 368;
+pub const SYS_sendto: ::c_long = 369;
+pub const SYS_sendmsg: ::c_long = 370;
+pub const SYS_recvfrom: ::c_long = 371;
+pub const SYS_recvmsg: ::c_long = 372;
+pub const SYS_shutdown: ::c_long = 373;
+pub const SYS_userfaultfd: ::c_long = 374;
+pub const SYS_membarrier: ::c_long = 375;
+pub const SYS_mlock2: ::c_long = 376;
+pub const SYS_copy_file_range: ::c_long = 377;
+pub const SYS_preadv2: ::c_long = 378;
+pub const SYS_pwritev2: ::c_long = 379;
+pub const SYS_pkey_mprotect: ::c_long = 380;
+pub const SYS_pkey_alloc: ::c_long = 381;
+pub const SYS_pkey_free: ::c_long = 382;
+
+// offsets in user_regs_structs, from sys/reg.h
+pub const EBX: ::c_int = 0;
+pub const ECX: ::c_int = 1;
+pub const EDX: ::c_int = 2;
+pub const ESI: ::c_int = 3;
+pub const EDI: ::c_int = 4;
+pub const EBP: ::c_int = 5;
+pub const EAX: ::c_int = 6;
+pub const DS: ::c_int = 7;
+pub const ES: ::c_int = 8;
+pub const FS: ::c_int = 9;
+pub const GS: ::c_int = 10;
+pub const ORIG_EAX: ::c_int = 11;
+pub const EIP: ::c_int = 12;
+pub const CS: ::c_int = 13;
+pub const EFL: ::c_int = 14;
+pub const UESP: ::c_int = 15;
+pub const SS: ::c_int = 16;
+
+extern {
+    pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
+    pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
+    pub fn makecontext(ucp: *mut ucontext_t,
+                       func:  extern fn (),
+                       argc: ::c_int, ...);
+    pub fn swapcontext(uocp: *mut ucontext_t,
+                       ucp: *const ucontext_t) -> ::c_int;
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b64/aarch64.rs
@@ -0,0 +1,490 @@
+//! AArch64-specific definitions for 64-bit linux-like values
+
+pub type c_char = u8;
+pub type wchar_t = u32;
+pub type nlink_t = u32;
+pub type blksize_t = i32;
+pub type suseconds_t = i64;
+pub type __u64 = ::c_ulonglong;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __pad1: ::dev_t,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        __pad2: ::c_int,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        __unused: [::c_int; 2],
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __pad1: ::dev_t,
+        pub st_size: ::off64_t,
+        pub st_blksize: ::blksize_t,
+        __pad2: ::c_int,
+        pub st_blocks: ::blkcnt64_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        __unused: [::c_int; 2],
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::__fsword_t,
+        pub f_bsize: ::__fsword_t,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::__fsword_t,
+        pub f_frsize: ::__fsword_t,
+        pub f_flags: ::__fsword_t,
+        pub f_spare: [::__fsword_t; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct pthread_attr_t {
+        __size: [u64; 8]
+    }
+
+    pub struct ipc_perm {
+        pub __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::c_uint,
+        pub __seq: ::c_ushort,
+        __pad1: ::c_ushort,
+        __unused1: ::c_ulong,
+        __unused2: ::c_ulong
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __unused4: ::c_ulong,
+        __unused5: ::c_ulong
+    }
+}
+
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
+
+pub const RLIMIT_NOFILE: ::c_int = 7;
+pub const RLIMIT_NPROC: ::c_int = 6;
+
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 1052672;
+pub const O_RSYNC: ::c_int = 1052672;
+pub const O_DSYNC: ::c_int = 4096;
+pub const O_FSYNC: ::c_int = 0x101000;
+pub const O_NOATIME: ::c_int = 0o1000000;
+pub const O_PATH: ::c_int = 0o10000000;
+
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+
+pub const EDEADLK: ::c_int = 35;
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+pub const EMULTIHOP: ::c_int = 72;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EBADMSG: ::c_int = 74;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ENETDOWN: ::c_int = 100;
+pub const ENETUNREACH: ::c_int = 101;
+pub const ENETRESET: ::c_int = 102;
+pub const ECONNABORTED: ::c_int = 103;
+pub const ECONNRESET: ::c_int = 104;
+pub const ENOBUFS: ::c_int = 105;
+pub const EISCONN: ::c_int = 106;
+pub const ENOTCONN: ::c_int = 107;
+pub const ESHUTDOWN: ::c_int = 108;
+pub const ETOOMANYREFS: ::c_int = 109;
+pub const ETIMEDOUT: ::c_int = 110;
+pub const ECONNREFUSED: ::c_int = 111;
+pub const EHOSTDOWN: ::c_int = 112;
+pub const EHOSTUNREACH: ::c_int = 113;
+pub const EALREADY: ::c_int = 114;
+pub const EINPROGRESS: ::c_int = 115;
+pub const ESTALE: ::c_int = 116;
+pub const EDQUOT: ::c_int = 122;
+pub const ENOMEDIUM: ::c_int = 123;
+pub const EMEDIUMTYPE: ::c_int = 124;
+pub const ECANCELED: ::c_int = 125;
+pub const ENOKEY: ::c_int = 126;
+pub const EKEYEXPIRED: ::c_int = 127;
+pub const EKEYREVOKED: ::c_int = 128;
+pub const EKEYREJECTED: ::c_int = 129;
+pub const EOWNERDEAD: ::c_int = 130;
+pub const ENOTRECOVERABLE: ::c_int = 131;
+pub const EHWPOISON: ::c_int = 133;
+pub const ERFKILL: ::c_int = 132;
+
+pub const SOL_SOCKET: ::c_int = 1;
+
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_PASSCRED: ::c_int = 16;
+pub const SO_PEERCRED: ::c_int = 17;
+pub const SO_RCVLOWAT: ::c_int = 18;
+pub const SO_SNDLOWAT: ::c_int = 19;
+pub const SO_RCVTIMEO: ::c_int = 20;
+pub const SO_SNDTIMEO: ::c_int = 21;
+pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
+pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
+pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
+pub const SO_BINDTODEVICE: ::c_int = 25;
+pub const SO_ATTACH_FILTER: ::c_int = 26;
+pub const SO_DETACH_FILTER: ::c_int = 27;
+pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
+pub const SO_PEERNAME: ::c_int = 28;
+pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+pub const SO_PEERSEC: ::c_int = 31;
+pub const SO_PASSSEC: ::c_int = 34;
+pub const SO_TIMESTAMPNS: ::c_int = 35;
+pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
+pub const SO_MARK: ::c_int = 36;
+pub const SO_TIMESTAMPING: ::c_int = 37;
+pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
+pub const SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
+pub const SO_RXQ_OVFL: ::c_int = 40;
+pub const SO_WIFI_STATUS: ::c_int = 41;
+pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
+pub const SO_PEEK_OFF: ::c_int = 42;
+pub const SO_NOFCS: ::c_int = 43;
+pub const SO_LOCK_FILTER: ::c_int = 44;
+pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
+pub const SO_BUSY_POLL: ::c_int = 46;
+pub const SO_MAX_PACING_RATE: ::c_int = 47;
+pub const SO_BPF_EXTENSIONS: ::c_int = 48;
+pub const SO_INCOMING_CPU: ::c_int = 49;
+pub const SO_ATTACH_BPF: ::c_int = 50;
+pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGUNUSED: ::c_int = 31;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
+
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const O_ASYNC: ::c_int = 0x2000;
+pub const O_NDELAY: ::c_int = 0x800;
+
+pub const PTRACE_DETACH: ::c_uint = 17;
+
+pub const EFD_NONBLOCK: ::c_int = 0x800;
+
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETOWN: ::c_int = 8;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+
+pub const SFD_NONBLOCK: ::c_int = 0x0800;
+
+pub const TIOCEXCL: ::c_ulong = 0x540C;
+pub const TIOCNXCL: ::c_ulong = 0x540D;
+pub const TIOCSCTTY: ::c_ulong = 0x540E;
+pub const TIOCSTI: ::c_ulong = 0x5412;
+pub const TIOCMGET: ::c_ulong = 0x5415;
+pub const TIOCMBIS: ::c_ulong = 0x5416;
+pub const TIOCMBIC: ::c_ulong = 0x5417;
+pub const TIOCMSET: ::c_ulong = 0x5418;
+pub const TIOCCONS: ::c_ulong = 0x541D;
+
+pub const SFD_CLOEXEC: ::c_int = 0x080000;
+
+pub const NCCS: usize = 32;
+
+pub const O_TRUNC: ::c_int = 512;
+
+pub const O_CLOEXEC: ::c_int = 0x80000;
+
+pub const EBFONT: ::c_int = 59;
+pub const ENOSTR: ::c_int = 60;
+pub const ENODATA: ::c_int = 61;
+pub const ETIME: ::c_int = 62;
+pub const ENOSR: ::c_int = 63;
+pub const ENONET: ::c_int = 64;
+pub const ENOPKG: ::c_int = 65;
+pub const EREMOTE: ::c_int = 66;
+pub const ENOLINK: ::c_int = 67;
+pub const EADV: ::c_int = 68;
+pub const ESRMNT: ::c_int = 69;
+pub const ECOMM: ::c_int = 70;
+pub const EPROTO: ::c_int = 71;
+pub const EDOTDOT: ::c_int = 73;
+
+pub const SA_NODEFER: ::c_int = 0x40000000;
+pub const SA_RESETHAND: ::c_int = 0x80000000;
+pub const SA_RESTART: ::c_int = 0x10000000;
+pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
+
+pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
+
+pub const EFD_CLOEXEC: ::c_int = 0x80000;
+
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 8;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 48;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 8;
+
+pub const O_DIRECT: ::c_int = 0x10000;
+pub const O_DIRECTORY: ::c_int = 0x4000;
+pub const O_NOFOLLOW: ::c_int = 0x8000;
+
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+
+pub const EDEADLOCK: ::c_int = 35;
+
+pub const FIOCLEX: ::c_ulong = 0x5451;
+pub const FIONBIO: ::c_ulong = 0x5421;
+
+pub const SYS_pivot_root: ::c_long = 41;
+pub const SYS_gettid: ::c_long = 178;
+pub const SYS_perf_event_open: ::c_long = 241;
+pub const SYS_memfd_create: ::c_long = 279;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const SIGSTKSZ: ::size_t = 16384;
+pub const MINSIGSTKSZ: ::size_t = 5120;
+pub const CBAUD: ::tcflag_t = 0o0010017;
+pub const TAB1: ::c_int = 0x00000800;
+pub const TAB2: ::c_int = 0x00001000;
+pub const TAB3: ::c_int = 0x00001800;
+pub const CR1: ::c_int  = 0x00000200;
+pub const CR2: ::c_int  = 0x00000400;
+pub const CR3: ::c_int  = 0x00000600;
+pub const FF1: ::c_int  = 0x00008000;
+pub const BS1: ::c_int  = 0x00002000;
+pub const VT1: ::c_int  = 0x00004000;
+pub const VWERASE: usize = 14;
+pub const VREPRINT: usize = 12;
+pub const VSUSP: usize = 10;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VDISCARD: usize = 13;
+pub const VTIME: usize = 5;
+pub const IXON: ::tcflag_t = 0x00000400;
+pub const IXOFF: ::tcflag_t = 0x00001000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x00000030;
+pub const CS6: ::tcflag_t = 0x00000010;
+pub const CS7: ::tcflag_t = 0x00000020;
+pub const CS8: ::tcflag_t = 0x00000030;
+pub const CSTOPB: ::tcflag_t = 0x00000040;
+pub const CREAD: ::tcflag_t = 0x00000080;
+pub const PARENB: ::tcflag_t = 0x00000100;
+pub const PARODD: ::tcflag_t = 0x00000200;
+pub const HUPCL: ::tcflag_t = 0x00000400;
+pub const CLOCAL: ::tcflag_t = 0x00000800;
+pub const ECHOKE: ::tcflag_t = 0x00000800;
+pub const ECHOE: ::tcflag_t = 0x00000010;
+pub const ECHOK: ::tcflag_t = 0x00000020;
+pub const ECHONL: ::tcflag_t = 0x00000040;
+pub const ECHOPRT: ::tcflag_t = 0x00000400;
+pub const ECHOCTL: ::tcflag_t = 0x00000200;
+pub const ISIG: ::tcflag_t = 0x00000001;
+pub const ICANON: ::tcflag_t = 0x00000002;
+pub const PENDIN: ::tcflag_t = 0x00004000;
+pub const NOFLSH: ::tcflag_t = 0x00000080;
+pub const CIBAUD: ::tcflag_t = 0o02003600000;
+pub const CBAUDEX: ::tcflag_t = 0o010000;
+pub const VSWTC: usize = 7;
+pub const OLCUC:  ::tcflag_t = 0o000002;
+pub const NLDLY:  ::tcflag_t = 0o000400;
+pub const CRDLY:  ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const BSDLY:  ::tcflag_t = 0o020000;
+pub const FFDLY:  ::tcflag_t = 0o100000;
+pub const VTDLY:  ::tcflag_t = 0o040000;
+pub const XTABS:  ::tcflag_t = 0o014000;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+
+pub const VEOL: usize = 11;
+pub const VEOL2: usize = 16;
+pub const VMIN: usize = 6;
+pub const IEXTEN: ::tcflag_t = 0x00008000;
+pub const TOSTOP: ::tcflag_t = 0x00000100;
+pub const FLUSHO: ::tcflag_t = 0x00001000;
+pub const EXTPROC: ::tcflag_t = 0x00010000;
+pub const TCGETS: ::c_ulong = 0x5401;
+pub const TCSETS: ::c_ulong = 0x5402;
+pub const TCSETSW: ::c_ulong = 0x5403;
+pub const TCSETSF: ::c_ulong = 0x5404;
+pub const TCGETA: ::c_ulong = 0x5405;
+pub const TCSETA: ::c_ulong = 0x5406;
+pub const TCSETAW: ::c_ulong = 0x5407;
+pub const TCSETAF: ::c_ulong = 0x5408;
+pub const TCSBRK: ::c_ulong = 0x5409;
+pub const TCXONC: ::c_ulong = 0x540A;
+pub const TCFLSH: ::c_ulong = 0x540B;
+pub const TIOCINQ: ::c_ulong = 0x541B;
+pub const TIOCGPGRP: ::c_ulong = 0x540F;
+pub const TIOCSPGRP: ::c_ulong = 0x5410;
+pub const TIOCOUTQ: ::c_ulong = 0x5411;
+pub const TIOCGWINSZ: ::c_ulong = 0x5413;
+pub const TIOCSWINSZ: ::c_ulong = 0x5414;
+pub const FIONREAD: ::c_ulong = 0x541B;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b64/mod.rs
@@ -0,0 +1,70 @@
+//! 64-bit specific definitions for linux-like values
+
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type clock_t = i64;
+pub type time_t = i64;
+pub type ino_t = u64;
+pub type off_t = i64;
+pub type blkcnt_t = i64;
+pub type __fsword_t = ::c_long;
+
+s! {
+    pub struct sigset_t {
+        __val: [::c_ulong; 16],
+    }
+
+    pub struct sysinfo {
+        pub uptime: ::c_long,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
+        pub procs: ::c_ushort,
+        pub pad: ::c_ushort,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
+        pub mem_unit: ::c_uint,
+        pub _f: [::c_char; 0],
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        pub msg_stime: ::time_t,
+        pub msg_rtime: ::time_t,
+        pub msg_ctime: ::time_t,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __glibc_reserved4: ::c_ulong,
+        __glibc_reserved5: ::c_ulong,
+    }
+}
+
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
+pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
+
+pub const O_LARGEFILE: ::c_int = 0;
+
+cfg_if! {
+    if #[cfg(target_arch = "aarch64")] {
+        mod aarch64;
+        pub use self::aarch64::*;
+    } else if #[cfg(any(target_arch = "powerpc64"))] {
+        mod powerpc64;
+        pub use self::powerpc64::*;
+    } else if #[cfg(any(target_arch = "sparc64"))] {
+        mod sparc64;
+        pub use self::sparc64::*;
+    } else if #[cfg(any(target_arch = "x86_64"))] {
+        mod x86_64;
+        pub use self::x86_64::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b64/powerpc64.rs
@@ -0,0 +1,487 @@
+//! PowerPC64-specific definitions for 64-bit linux-like values
+
+pub type c_char = u8;
+pub type wchar_t = i32;
+pub type nlink_t = u64;
+pub type blksize_t = i64;
+pub type suseconds_t = i64;
+pub type __u64 = ::c_ulong;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_nlink: ::nlink_t,
+        pub st_mode: ::mode_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        __pad0: ::c_int,
+        pub st_rdev: ::dev_t,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        __unused: [::c_long; 3],
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino64_t,
+        pub st_nlink: ::nlink_t,
+        pub st_mode: ::mode_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        __pad0: ::c_int,
+        pub st_rdev: ::dev_t,
+        pub st_size: ::off64_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt64_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        __reserved: [::c_long; 3],
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::__fsword_t,
+        pub f_bsize: ::__fsword_t,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::__fsword_t,
+        pub f_frsize: ::__fsword_t,
+        pub f_flags: ::__fsword_t,
+        pub f_spare: [::__fsword_t; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct pthread_attr_t {
+        __size: [u64; 7]
+    }
+
+    pub struct ipc_perm {
+        pub __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::mode_t,
+        pub __seq: ::uint32_t,
+        __pad1: ::uint32_t,
+        __unused1: ::uint64_t,
+        __unused2: ::c_ulong,
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_atime: ::time_t,
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+        pub shm_segsz: ::size_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __unused4: ::c_ulong,
+        __unused5: ::c_ulong
+    }
+}
+
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
+
+pub const RLIMIT_NOFILE: ::c_int = 7;
+pub const RLIMIT_NPROC: ::c_int = 6;
+
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 1052672;
+pub const O_RSYNC: ::c_int = 1052672;
+pub const O_DSYNC: ::c_int = 4096;
+pub const O_FSYNC: ::c_int = 0x101000;
+pub const O_NOATIME: ::c_int = 0o1000000;
+pub const O_PATH: ::c_int = 0o10000000;
+
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+
+pub const EDEADLK: ::c_int = 35;
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+pub const EMULTIHOP: ::c_int = 72;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EBADMSG: ::c_int = 74;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ENETDOWN: ::c_int = 100;
+pub const ENETUNREACH: ::c_int = 101;
+pub const ENETRESET: ::c_int = 102;
+pub const ECONNABORTED: ::c_int = 103;
+pub const ECONNRESET: ::c_int = 104;
+pub const ENOBUFS: ::c_int = 105;
+pub const EISCONN: ::c_int = 106;
+pub const ENOTCONN: ::c_int = 107;
+pub const ESHUTDOWN: ::c_int = 108;
+pub const ETOOMANYREFS: ::c_int = 109;
+pub const ETIMEDOUT: ::c_int = 110;
+pub const ECONNREFUSED: ::c_int = 111;
+pub const EHOSTDOWN: ::c_int = 112;
+pub const EHOSTUNREACH: ::c_int = 113;
+pub const EALREADY: ::c_int = 114;
+pub const EINPROGRESS: ::c_int = 115;
+pub const ESTALE: ::c_int = 116;
+pub const EDQUOT: ::c_int = 122;
+pub const ENOMEDIUM: ::c_int = 123;
+pub const EMEDIUMTYPE: ::c_int = 124;
+pub const ECANCELED: ::c_int = 125;
+pub const ENOKEY: ::c_int = 126;
+pub const EKEYEXPIRED: ::c_int = 127;
+pub const EKEYREVOKED: ::c_int = 128;
+pub const EKEYREJECTED: ::c_int = 129;
+pub const EOWNERDEAD: ::c_int = 130;
+pub const ENOTRECOVERABLE: ::c_int = 131;
+pub const EHWPOISON: ::c_int = 133;
+pub const ERFKILL: ::c_int = 132;
+
+pub const SOL_SOCKET: ::c_int = 1;
+
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_PASSCRED: ::c_int = 20;
+pub const SO_PEERCRED: ::c_int = 21;
+pub const SO_RCVLOWAT: ::c_int = 16;
+pub const SO_SNDLOWAT: ::c_int = 17;
+pub const SO_RCVTIMEO: ::c_int = 18;
+pub const SO_SNDTIMEO: ::c_int = 19;
+pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
+pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
+pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
+pub const SO_BINDTODEVICE: ::c_int = 25;
+pub const SO_ATTACH_FILTER: ::c_int = 26;
+pub const SO_DETACH_FILTER: ::c_int = 27;
+pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
+pub const SO_PEERNAME: ::c_int = 28;
+pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+pub const SO_PEERSEC: ::c_int = 31;
+pub const SO_PASSSEC: ::c_int = 34;
+pub const SO_TIMESTAMPNS: ::c_int = 35;
+pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
+pub const SO_MARK: ::c_int = 36;
+pub const SO_TIMESTAMPING: ::c_int = 37;
+pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
+pub const SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
+pub const SO_RXQ_OVFL: ::c_int = 40;
+pub const SO_WIFI_STATUS: ::c_int = 41;
+pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
+pub const SO_PEEK_OFF: ::c_int = 42;
+pub const SO_NOFCS: ::c_int = 43;
+pub const SO_LOCK_FILTER: ::c_int = 44;
+pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
+pub const SO_BUSY_POLL: ::c_int = 46;
+pub const SO_MAX_PACING_RATE: ::c_int = 47;
+pub const SO_BPF_EXTENSIONS: ::c_int = 48;
+pub const SO_INCOMING_CPU: ::c_int = 49;
+pub const SO_ATTACH_BPF: ::c_int = 50;
+pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGUNUSED: ::c_int = 31;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
+
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const O_ASYNC: ::c_int = 0x2000;
+pub const O_NDELAY: ::c_int = 0x800;
+
+pub const PTRACE_DETACH: ::c_uint = 17;
+
+pub const EFD_NONBLOCK: ::c_int = 0x800;
+
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETOWN: ::c_int = 8;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+
+pub const SFD_NONBLOCK: ::c_int = 0x0800;
+
+pub const TIOCEXCL: ::c_ulong = 0x540C;
+pub const TIOCNXCL: ::c_ulong = 0x540D;
+pub const TIOCSCTTY: ::c_ulong = 0x540E;
+pub const TIOCSTI: ::c_ulong = 0x5412;
+pub const TIOCMGET: ::c_ulong = 0x5415;
+pub const TIOCMBIS: ::c_ulong = 0x5416;
+pub const TIOCMBIC: ::c_ulong = 0x5417;
+pub const TIOCMSET: ::c_ulong = 0x5418;
+pub const TIOCCONS: ::c_ulong = 0x541D;
+
+pub const SFD_CLOEXEC: ::c_int = 0x080000;
+
+pub const NCCS: usize = 32;
+
+pub const O_TRUNC: ::c_int = 512;
+
+pub const O_CLOEXEC: ::c_int = 0x80000;
+
+pub const EBFONT: ::c_int = 59;
+pub const ENOSTR: ::c_int = 60;
+pub const ENODATA: ::c_int = 61;
+pub const ETIME: ::c_int = 62;
+pub const ENOSR: ::c_int = 63;
+pub const ENONET: ::c_int = 64;
+pub const ENOPKG: ::c_int = 65;
+pub const EREMOTE: ::c_int = 66;
+pub const ENOLINK: ::c_int = 67;
+pub const EADV: ::c_int = 68;
+pub const ESRMNT: ::c_int = 69;
+pub const ECOMM: ::c_int = 70;
+pub const EPROTO: ::c_int = 71;
+pub const EDOTDOT: ::c_int = 73;
+
+pub const SA_NODEFER: ::c_int = 0x40000000;
+pub const SA_RESETHAND: ::c_int = 0x80000000;
+pub const SA_RESTART: ::c_int = 0x10000000;
+pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
+
+pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
+
+pub const EFD_CLOEXEC: ::c_int = 0x80000;
+
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+
+pub const O_DIRECTORY: ::c_int = 0x4000;
+pub const O_NOFOLLOW: ::c_int = 0x8000;
+pub const O_DIRECT: ::c_int = 0x20000;
+
+pub const MAP_LOCKED: ::c_int = 0x00080;
+pub const MAP_NORESERVE: ::c_int = 0x00040;
+
+pub const EDEADLOCK: ::c_int = 58;
+
+pub const FIOCLEX: ::c_ulong = 0x20006601;
+pub const FIONBIO: ::c_ulong = 0x8004667e;
+
+pub const SYS_pivot_root: ::c_long = 203;
+pub const SYS_gettid: ::c_long = 207;
+pub const SYS_perf_event_open: ::c_long = 319;
+pub const SYS_memfd_create: ::c_long = 360;
+
+pub const MCL_CURRENT: ::c_int = 0x2000;
+pub const MCL_FUTURE: ::c_int = 0x4000;
+
+pub const SIGSTKSZ: ::size_t = 0x4000;
+pub const MINSIGSTKSZ: ::size_t = 4096;
+pub const CBAUD: ::tcflag_t = 0xff;
+pub const TAB1: ::c_int = 0x400;
+pub const TAB2: ::c_int = 0x800;
+pub const TAB3: ::c_int = 0xc00;
+pub const CR1: ::c_int  = 0x1000;
+pub const CR2: ::c_int  = 0x2000;
+pub const CR3: ::c_int  = 0x3000;
+pub const FF1: ::c_int  = 0x4000;
+pub const BS1: ::c_int  = 0x8000;
+pub const VT1: ::c_int  = 0x10000;
+pub const VWERASE: usize = 0xa;
+pub const VREPRINT: usize = 0xb;
+pub const VSUSP: usize = 0xc;
+pub const VSTART: usize = 0xd;
+pub const VSTOP: usize = 0xe;
+pub const VDISCARD: usize = 0x10;
+pub const VTIME: usize = 0x7;
+pub const IXON: ::tcflag_t = 0x200;
+pub const IXOFF: ::tcflag_t = 0x400;
+pub const ONLCR: ::tcflag_t = 0x2;
+pub const CSIZE: ::tcflag_t = 0x300;
+pub const CS6: ::tcflag_t = 0x100;
+pub const CS7: ::tcflag_t = 0x200;
+pub const CS8: ::tcflag_t = 0x300;
+pub const CSTOPB: ::tcflag_t = 0x400;
+pub const CREAD: ::tcflag_t = 0x800;
+pub const PARENB: ::tcflag_t = 0x1000;
+pub const PARODD: ::tcflag_t = 0x2000;
+pub const HUPCL: ::tcflag_t = 0x4000;
+pub const CLOCAL: ::tcflag_t = 0x8000;
+pub const ECHOKE: ::tcflag_t = 0x1;
+pub const ECHOE: ::tcflag_t = 0x2;
+pub const ECHOK: ::tcflag_t = 0x4;
+pub const ECHONL: ::tcflag_t = 0x10;
+pub const ECHOPRT: ::tcflag_t = 0x20;
+pub const ECHOCTL: ::tcflag_t = 0x40;
+pub const ISIG: ::tcflag_t = 0x80;
+pub const ICANON: ::tcflag_t = 0x100;
+pub const PENDIN: ::tcflag_t = 0x20000000;
+pub const NOFLSH: ::tcflag_t = 0x80000000;
+pub const VSWTC: usize = 9;
+pub const OLCUC:  ::tcflag_t = 0o000004;
+pub const NLDLY:  ::tcflag_t = 0o001400;
+pub const CRDLY:  ::tcflag_t = 0o030000;
+pub const TABDLY: ::tcflag_t = 0o006000;
+pub const BSDLY:  ::tcflag_t = 0o100000;
+pub const FFDLY:  ::tcflag_t = 0o040000;
+pub const VTDLY:  ::tcflag_t = 0o200000;
+pub const XTABS:  ::tcflag_t = 0o006000;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const CBAUDEX: ::speed_t = 0o000020;
+pub const B57600: ::speed_t = 0o0020;
+pub const B115200: ::speed_t = 0o0021;
+pub const B230400: ::speed_t = 0o0022;
+pub const B460800: ::speed_t = 0o0023;
+pub const B500000: ::speed_t = 0o0024;
+pub const B576000: ::speed_t = 0o0025;
+pub const B921600: ::speed_t = 0o0026;
+pub const B1000000: ::speed_t = 0o0027;
+pub const B1152000: ::speed_t = 0o0030;
+pub const B1500000: ::speed_t = 0o0031;
+pub const B2000000: ::speed_t = 0o0032;
+pub const B2500000: ::speed_t = 0o0033;
+pub const B3000000: ::speed_t = 0o0034;
+pub const B3500000: ::speed_t = 0o0035;
+pub const B4000000: ::speed_t = 0o0036;
+
+pub const VEOL: usize = 6;
+pub const VEOL2: usize = 8;
+pub const VMIN: usize = 5;
+pub const IEXTEN: ::tcflag_t = 0x400;
+pub const TOSTOP: ::tcflag_t = 0x400000;
+pub const FLUSHO: ::tcflag_t = 0x800000;
+pub const EXTPROC: ::tcflag_t = 0x10000000;
+pub const TCGETS: ::c_ulong = 0x403c7413;
+pub const TCSETS: ::c_ulong = 0x803c7414;
+pub const TCSETSW: ::c_ulong = 0x803c7415;
+pub const TCSETSF: ::c_ulong = 0x803c7416;
+pub const TCGETA: ::c_ulong = 0x40147417;
+pub const TCSETA: ::c_ulong = 0x80147418;
+pub const TCSETAW: ::c_ulong = 0x80147419;
+pub const TCSETAF: ::c_ulong = 0x8014741c;
+pub const TCSBRK: ::c_ulong = 0x2000741d;
+pub const TCXONC: ::c_ulong = 0x2000741e;
+pub const TCFLSH: ::c_ulong = 0x2000741f;
+pub const TIOCINQ: ::c_ulong = 0x4004667f;
+pub const TIOCGPGRP: ::c_ulong = 0x40047477;
+pub const TIOCSPGRP: ::c_ulong = 0x80047476;
+pub const TIOCOUTQ: ::c_ulong = 0x40047473;
+pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
+pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
+pub const FIONREAD: ::c_ulong = 0x4004667f;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b64/sparc64.rs
@@ -0,0 +1,391 @@
+//! SPARC64-specific definitions for 64-bit linux-like values
+
+pub type c_char = i8;
+pub type wchar_t = i32;
+pub type nlink_t = u32;
+pub type blksize_t = i64;
+pub type suseconds_t = i32;
+pub type __u64 = ::c_ulonglong;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        __pad0: u64,
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __pad1: u64,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        __unused: [::c_long; 2],
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        __pad0: u64,
+        pub st_ino: ::ino64_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        __pad2: ::c_int,
+        pub st_size: ::off64_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt64_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        __reserved: [::c_long; 2],
+    }
+
+    pub struct pthread_attr_t {
+        __size: [u64; 7]
+    }
+
+    pub struct ipc_perm {
+        pub __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::mode_t,
+        __pad0: u16,
+        pub __seq: ::c_ushort,
+        __unused1: ::c_ulonglong,
+        __unused2: ::c_ulonglong,
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_atime: ::time_t,
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+        pub shm_segsz: ::size_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __reserved1: ::c_ulong,
+        __reserved2: ::c_ulong
+    }
+}
+
+pub const TIOCGSOFTCAR: ::c_ulong = 0x40047464;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x80047465;
+
+pub const RLIMIT_NOFILE: ::c_int = 6;
+pub const RLIMIT_NPROC: ::c_int = 7;
+
+pub const O_APPEND: ::c_int = 0x8;
+pub const O_CREAT: ::c_int = 0x200;
+pub const O_EXCL: ::c_int = 0x800;
+pub const O_NOCTTY: ::c_int = 0x8000;
+pub const O_NONBLOCK: ::c_int = 0x4000;
+pub const O_SYNC: ::c_int = 0x802000;
+pub const O_RSYNC: ::c_int = 0x802000;
+pub const O_DSYNC: ::c_int = 0x2000;
+pub const O_FSYNC: ::c_int = 0x802000;
+pub const O_NOATIME: ::c_int = 0x200000;
+pub const O_PATH: ::c_int = 0x1000000;
+
+pub const MAP_GROWSDOWN: ::c_int = 0x0200;
+
+pub const EDEADLK: ::c_int = 78;
+pub const ENAMETOOLONG: ::c_int = 63;
+pub const ENOLCK: ::c_int = 79;
+pub const ENOSYS: ::c_int = 90;
+pub const ENOTEMPTY: ::c_int = 66;
+pub const ELOOP: ::c_int = 62;
+pub const ENOMSG: ::c_int = 75;
+pub const EIDRM: ::c_int = 77;
+pub const ECHRNG: ::c_int = 94;
+pub const EL2NSYNC: ::c_int = 95;
+pub const EL3HLT: ::c_int = 96;
+pub const EL3RST: ::c_int = 97;
+pub const ELNRNG: ::c_int = 98;
+pub const EUNATCH: ::c_int = 99;
+pub const ENOCSI: ::c_int = 100;
+pub const EL2HLT: ::c_int = 101;
+pub const EBADE: ::c_int = 102;
+pub const EBADR: ::c_int = 103;
+pub const EXFULL: ::c_int = 104;
+pub const ENOANO: ::c_int = 105;
+pub const EBADRQC: ::c_int = 106;
+pub const EBADSLT: ::c_int = 107;
+pub const EMULTIHOP: ::c_int = 87;
+pub const EOVERFLOW: ::c_int = 92;
+pub const ENOTUNIQ: ::c_int = 115;
+pub const EBADFD: ::c_int = 93;
+pub const EBADMSG: ::c_int = 76;
+pub const EREMCHG: ::c_int = 89;
+pub const ELIBACC: ::c_int = 114;
+pub const ELIBBAD: ::c_int = 112;
+pub const ELIBSCN: ::c_int = 124;
+pub const ELIBMAX: ::c_int = 123;
+pub const ELIBEXEC: ::c_int = 110;
+pub const EILSEQ: ::c_int = 122;
+pub const ERESTART: ::c_int = 116;
+pub const ESTRPIPE: ::c_int = 91;
+pub const EUSERS: ::c_int = 68;
+pub const ENOTSOCK: ::c_int = 38;
+pub const EDESTADDRREQ: ::c_int = 39;
+pub const EMSGSIZE: ::c_int = 40;
+pub const EPROTOTYPE: ::c_int = 41;
+pub const ENOPROTOOPT: ::c_int = 42;
+pub const EPROTONOSUPPORT: ::c_int = 43;
+pub const ESOCKTNOSUPPORT: ::c_int = 44;
+pub const EOPNOTSUPP: ::c_int = 45;
+pub const EPFNOSUPPORT: ::c_int = 46;
+pub const EAFNOSUPPORT: ::c_int = 47;
+pub const EADDRINUSE: ::c_int = 48;
+pub const EADDRNOTAVAIL: ::c_int = 49;
+pub const ENETDOWN: ::c_int = 50;
+pub const ENETUNREACH: ::c_int = 51;
+pub const ENETRESET: ::c_int = 52;
+pub const ECONNABORTED: ::c_int = 53;
+pub const ECONNRESET: ::c_int = 54;
+pub const ENOBUFS: ::c_int = 55;
+pub const EISCONN: ::c_int = 56;
+pub const ENOTCONN: ::c_int = 57;
+pub const ESHUTDOWN: ::c_int = 58;
+pub const ETOOMANYREFS: ::c_int = 59;
+pub const ETIMEDOUT: ::c_int = 60;
+pub const ECONNREFUSED: ::c_int = 61;
+pub const EHOSTDOWN: ::c_int = 64;
+pub const EHOSTUNREACH: ::c_int = 65;
+pub const EALREADY: ::c_int = 37;
+pub const EINPROGRESS: ::c_int = 36;
+pub const ESTALE: ::c_int = 70;
+pub const EDQUOT: ::c_int = 69;
+pub const ENOMEDIUM: ::c_int = 125;
+pub const EMEDIUMTYPE: ::c_int = 126;
+pub const ECANCELED: ::c_int = 127;
+pub const ENOKEY: ::c_int = 128;
+pub const EKEYEXPIRED: ::c_int = 129;
+pub const EKEYREVOKED: ::c_int = 130;
+pub const EKEYREJECTED: ::c_int = 131;
+pub const EOWNERDEAD: ::c_int = 132;
+pub const ENOTRECOVERABLE: ::c_int = 133;
+pub const EHWPOISON: ::c_int = 135;
+pub const ERFKILL: ::c_int = 134;
+
+pub const SOL_SOCKET: ::c_int = 0xffff;
+
+pub const SO_REUSEADDR: ::c_int = 4;
+pub const SO_BINDTODEVICE: ::c_int = 0x000d;
+pub const SO_TIMESTAMP: ::c_int = 0x001d;
+pub const SO_MARK: ::c_int = 0x0022;
+pub const SO_RXQ_OVFL: ::c_int = 0x0024;
+pub const SO_PEEK_OFF: ::c_int = 0x0026;
+pub const SO_BUSY_POLL: ::c_int = 0x0030;
+pub const SO_TYPE: ::c_int = 0x1008;
+pub const SO_ERROR: ::c_int = 0x1007;
+pub const SO_DONTROUTE: ::c_int = 16;
+pub const SO_BROADCAST: ::c_int = 32;
+pub const SO_SNDBUF: ::c_int = 0x1001;
+pub const SO_RCVBUF: ::c_int = 0x1002;
+pub const SO_DOMAIN: ::c_int = 0x1029;
+pub const SO_KEEPALIVE: ::c_int = 8;
+pub const SO_OOBINLINE: ::c_int = 0x100;
+pub const SO_LINGER: ::c_int = 128;
+pub const SO_REUSEPORT: ::c_int = 0x200;
+pub const SO_ACCEPTCONN: ::c_int = 0x8000;
+
+pub const SA_ONSTACK: ::c_int = 1;
+pub const SA_SIGINFO: ::c_int = 0x200;
+pub const SA_NOCLDWAIT: ::c_int = 0x100;
+
+pub const SIGCHLD: ::c_int = 20;
+pub const SIGBUS: ::c_int = 10;
+pub const SIGUSR1: ::c_int = 30;
+pub const SIGUSR2: ::c_int = 31;
+pub const SIGCONT: ::c_int = 19;
+pub const SIGSTOP: ::c_int = 17;
+pub const SIGTSTP: ::c_int = 18;
+pub const SIGURG: ::c_int = 16;
+pub const SIGIO: ::c_int = 23;
+pub const SIGSYS: ::c_int = 12;
+pub const SIGPOLL: ::c_int = 23;
+pub const SIGPWR: ::c_int = 29;
+pub const SIG_SETMASK: ::c_int = 4;
+pub const SIG_BLOCK: ::c_int = 1;
+pub const SIG_UNBLOCK: ::c_int = 2;
+
+pub const POLLWRNORM: ::c_short = 4;
+pub const POLLWRBAND: ::c_short = 0x100;
+
+pub const O_ASYNC: ::c_int = 0x40;
+pub const O_NDELAY: ::c_int = 0x4004;
+
+pub const PTRACE_DETACH: ::c_uint = 11;
+
+pub const EFD_NONBLOCK: ::c_int = 0x4000;
+
+pub const F_GETLK: ::c_int = 7;
+pub const F_GETOWN: ::c_int = 5;
+pub const F_SETOWN: ::c_int = 6;
+pub const F_SETLK: ::c_int = 8;
+pub const F_SETLKW: ::c_int = 9;
+
+pub const SFD_NONBLOCK: ::c_int = 0x4000;
+
+pub const TIOCEXCL: ::c_ulong = 0x2000740d;
+pub const TIOCNXCL: ::c_ulong = 0x2000740e;
+pub const TIOCSCTTY: ::c_ulong = 0x20007484;
+pub const TIOCSTI: ::c_ulong = 0x80017472;
+pub const TIOCMGET: ::c_ulong = 0x4004746a;
+pub const TIOCMBIS: ::c_ulong = 0x8004746c;
+pub const TIOCMBIC: ::c_ulong = 0x8004746b;
+pub const TIOCMSET: ::c_ulong = 0x8004746d;
+pub const TIOCCONS: ::c_ulong = 0x20007424;
+
+pub const SFD_CLOEXEC: ::c_int = 0x400000;
+
+pub const NCCS: usize = 17;
+pub const O_TRUNC: ::c_int = 0x400;
+
+pub const O_CLOEXEC: ::c_int = 0x400000;
+
+pub const EBFONT: ::c_int = 109;
+pub const ENOSTR: ::c_int = 72;
+pub const ENODATA: ::c_int = 111;
+pub const ETIME: ::c_int = 73;
+pub const ENOSR: ::c_int = 74;
+pub const ENONET: ::c_int = 80;
+pub const ENOPKG: ::c_int = 113;
+pub const EREMOTE: ::c_int = 71;
+pub const ENOLINK: ::c_int = 82;
+pub const EADV: ::c_int = 83;
+pub const ESRMNT: ::c_int = 84;
+pub const ECOMM: ::c_int = 85;
+pub const EPROTO: ::c_int = 86;
+pub const EDOTDOT: ::c_int = 88;
+
+pub const SA_NODEFER: ::c_int = 0x20;
+pub const SA_RESETHAND: ::c_int = 0x4;
+pub const SA_RESTART: ::c_int = 0x2;
+pub const SA_NOCLDSTOP: ::c_int = 0x00000008;
+
+pub const EPOLL_CLOEXEC: ::c_int = 0x400000;
+
+pub const EFD_CLOEXEC: ::c_int = 0x400000;
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+
+pub const O_DIRECTORY: ::c_int = 0o200000;
+pub const O_NOFOLLOW: ::c_int = 0o400000;
+pub const O_DIRECT: ::c_int = 0x100000;
+
+pub const MAP_LOCKED: ::c_int = 0x0100;
+pub const MAP_NORESERVE: ::c_int = 0x00040;
+
+pub const EDEADLOCK: ::c_int = 108;
+
+pub const SO_PEERCRED: ::c_int = 0x40;
+pub const SO_RCVLOWAT: ::c_int = 0x800;
+pub const SO_SNDLOWAT: ::c_int = 0x1000;
+pub const SO_RCVTIMEO: ::c_int = 0x2000;
+pub const SO_SNDTIMEO: ::c_int = 0x4000;
+
+pub const FIOCLEX: ::c_ulong = 0x20006601;
+pub const FIONBIO: ::c_ulong = 0x8004667e;
+
+pub const SYS_gettid: ::c_long = 143;
+pub const SYS_perf_event_open: ::c_long = 327;
+
+pub const MCL_CURRENT: ::c_int = 0x2000;
+pub const MCL_FUTURE: ::c_int = 0x4000;
+
+pub const SIGSTKSZ: ::size_t = 16384;
+pub const MINSIGSTKSZ: ::size_t = 4096;
+pub const CBAUD: ::tcflag_t = 0x0000100f;
+pub const TAB1: ::c_int = 0x800;
+pub const TAB2: ::c_int = 0x1000;
+pub const TAB3: ::c_int = 0x1800;
+pub const CR1: ::c_int  = 0x200;
+pub const CR2: ::c_int  = 0x400;
+pub const CR3: ::c_int  = 0x600;
+pub const FF1: ::c_int  = 0x8000;
+pub const BS1: ::c_int  = 0x2000;
+pub const VT1: ::c_int  = 0x4000;
+pub const VWERASE: usize = 0xe;
+pub const VREPRINT: usize = 0xc;
+pub const VSUSP: usize = 0xa;
+pub const VSTART: usize = 0x8;
+pub const VSTOP: usize = 0x9;
+pub const VDISCARD: usize = 0xd;
+pub const VTIME: usize = 0x5;
+pub const IXON: ::tcflag_t = 0x400;
+pub const IXOFF: ::tcflag_t = 0x1000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x30;
+pub const CS6: ::tcflag_t = 0x10;
+pub const CS7: ::tcflag_t = 0x20;
+pub const CS8: ::tcflag_t = 0x30;
+pub const CSTOPB: ::tcflag_t = 0x40;
+pub const CREAD: ::tcflag_t = 0x80;
+pub const PARENB: ::tcflag_t = 0x100;
+pub const PARODD: ::tcflag_t = 0x200;
+pub const HUPCL: ::tcflag_t = 0x400;
+pub const CLOCAL: ::tcflag_t = 0x800;
+pub const ECHOKE: ::tcflag_t = 0x800;
+pub const ECHOE: ::tcflag_t = 0x10;
+pub const ECHOK: ::tcflag_t = 0x20;
+pub const ECHONL: ::tcflag_t = 0x40;
+pub const ECHOPRT: ::tcflag_t = 0x400;
+pub const ECHOCTL: ::tcflag_t = 0x200;
+pub const ISIG: ::tcflag_t = 0x1;
+pub const ICANON: ::tcflag_t = 0x2;
+pub const PENDIN: ::tcflag_t = 0x4000;
+pub const NOFLSH: ::tcflag_t = 0x80;
+pub const CIBAUD: ::tcflag_t = 0o02003600000;
+pub const CBAUDEX: ::tcflag_t = 0x00001000;
+pub const VSWTC: usize = 7;
+pub const OLCUC:  ::tcflag_t = 0o000002;
+pub const NLDLY:  ::tcflag_t = 0o000400;
+pub const CRDLY:  ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const BSDLY:  ::tcflag_t = 0o020000;
+pub const FFDLY:  ::tcflag_t = 0o100000;
+pub const VTDLY:  ::tcflag_t = 0o040000;
+pub const XTABS:  ::tcflag_t = 0o014000;
+
+pub const VEOL: usize = 5;
+pub const VEOL2: usize = 6;
+pub const VMIN: usize = 4;
+pub const IEXTEN: ::tcflag_t = 0x8000;
+pub const TOSTOP: ::tcflag_t = 0x100;
+pub const FLUSHO: ::tcflag_t = 0x2000;
+pub const EXTPROC: ::tcflag_t = 0x10000;
+pub const TCGETS: ::c_ulong = 0x40245408;
+pub const TCSETS: ::c_ulong = 0x80245409;
+pub const TCSETSW: ::c_ulong = 0x8024540a;
+pub const TCSETSF: ::c_ulong = 0x8024540b;
+pub const TCGETA: ::c_ulong = 0x40125401;
+pub const TCSETA: ::c_ulong = 0x80125402;
+pub const TCSETAW: ::c_ulong = 0x80125403;
+pub const TCSETAF: ::c_ulong = 0x80125404;
+pub const TCSBRK: ::c_ulong = 0x20005405;
+pub const TCXONC: ::c_ulong = 0x20005406;
+pub const TCFLSH: ::c_ulong = 0x20005407;
+pub const TIOCINQ: ::c_ulong = 0x4004667f;
+pub const TIOCGPGRP: ::c_ulong = 0x40047483;
+pub const TIOCSPGRP: ::c_ulong = 0x80047482;
+pub const TIOCOUTQ: ::c_ulong = 0x40047473;
+pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
+pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
+pub const FIONREAD: ::c_ulong = 0x4004667f;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/b64/x86_64.rs
@@ -0,0 +1,972 @@
+//! x86_64-specific definitions for 64-bit linux-like values
+
+pub type c_char = i8;
+pub type wchar_t = i32;
+pub type nlink_t = u64;
+pub type blksize_t = i64;
+pub type greg_t = i64;
+pub type suseconds_t = i64;
+pub type __u64 = ::c_ulonglong;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_nlink: ::nlink_t,
+        pub st_mode: ::mode_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        __pad0: ::c_int,
+        pub st_rdev: ::dev_t,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        __unused: [::c_long; 3],
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino64_t,
+        pub st_nlink: ::nlink_t,
+        pub st_mode: ::mode_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        __pad0: ::c_int,
+        pub st_rdev: ::dev_t,
+        pub st_size: ::off_t,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt64_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        __reserved: [::c_long; 3],
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::__fsword_t,
+        pub f_bsize: ::__fsword_t,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::__fsword_t,
+        pub f_frsize: ::__fsword_t,
+        pub f_flags: ::__fsword_t,
+        pub f_spare: [::__fsword_t; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct pthread_attr_t {
+        __size: [u64; 7]
+    }
+
+    pub struct _libc_fpxreg {
+        pub significand: [u16; 4],
+        pub exponent: u16,
+        __private: [u16; 3],
+    }
+
+    pub struct _libc_xmmreg {
+        pub element: [u32; 4],
+    }
+
+    pub struct _libc_fpstate {
+        pub cwd: u16,
+        pub swd: u16,
+        pub ftw: u16,
+        pub fop: u16,
+        pub rip: u64,
+        pub rdp: u64,
+        pub mxcsr: u32,
+        pub mxcr_mask: u32,
+        pub _st: [_libc_fpxreg; 8],
+        pub _xmm: [_libc_xmmreg; 16],
+        __private: [u64; 12],
+    }
+
+    pub struct user_fpregs_struct {
+        pub cwd: ::c_ushort,
+        pub swd: ::c_ushort,
+        pub ftw: ::c_ushort,
+        pub fop: ::c_ushort,
+        pub rip: ::c_ulonglong,
+        pub rdp: ::c_ulonglong,
+        pub mxcsr: ::c_uint,
+        pub mxcr_mask: ::c_uint,
+        pub st_space: [::c_uint; 32],
+        pub xmm_space: [::c_uint; 64],
+        padding: [::c_uint; 24],
+    }
+
+    pub struct user_regs_struct {
+        pub r15: ::c_ulonglong,
+        pub r14: ::c_ulonglong,
+        pub r13: ::c_ulonglong,
+        pub r12: ::c_ulonglong,
+        pub rbp: ::c_ulonglong,
+        pub rbx: ::c_ulonglong,
+        pub r11: ::c_ulonglong,
+        pub r10: ::c_ulonglong,
+        pub r9: ::c_ulonglong,
+        pub r8: ::c_ulonglong,
+        pub rax: ::c_ulonglong,
+        pub rcx: ::c_ulonglong,
+        pub rdx: ::c_ulonglong,
+        pub rsi: ::c_ulonglong,
+        pub rdi: ::c_ulonglong,
+        pub orig_rax: ::c_ulonglong,
+        pub rip: ::c_ulonglong,
+        pub cs: ::c_ulonglong,
+        pub eflags: ::c_ulonglong,
+        pub rsp: ::c_ulonglong,
+        pub ss: ::c_ulonglong,
+        pub fs_base: ::c_ulonglong,
+        pub gs_base: ::c_ulonglong,
+        pub ds: ::c_ulonglong,
+        pub es: ::c_ulonglong,
+        pub fs: ::c_ulonglong,
+        pub gs: ::c_ulonglong,
+    }
+
+    pub struct user {
+        pub regs: user_regs_struct,
+        pub u_fpvalid: ::c_int,
+        pub i387: user_fpregs_struct,
+        pub u_tsize: ::c_ulonglong,
+        pub u_dsize: ::c_ulonglong,
+        pub u_ssize: ::c_ulonglong,
+        pub start_code: ::c_ulonglong,
+        pub start_stack: ::c_ulonglong,
+        pub signal: ::c_longlong,
+        __reserved: ::c_int,
+        pub u_ar0: *mut user_regs_struct,
+        pub u_fpstate: *mut user_fpregs_struct,
+        pub magic: ::c_ulonglong,
+        pub u_comm: [::c_char; 32],
+        pub u_debugreg: [::c_ulonglong; 8],
+    }
+
+    pub struct mcontext_t {
+        pub gregs: [greg_t; 23],
+        pub fpregs: *mut _libc_fpstate,
+        __private: [u64; 8],
+    }
+
+    pub struct ucontext_t {
+        pub uc_flags: ::c_ulong,
+        pub uc_link: *mut ucontext_t,
+        pub uc_stack: ::stack_t,
+        pub uc_mcontext: mcontext_t,
+        pub uc_sigmask: ::sigset_t,
+        __private: [u8; 512],
+    }
+
+    pub struct ipc_perm {
+        pub __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::c_ushort,
+        __pad1: ::c_ushort,
+        pub __seq: ::c_ushort,
+        __pad2: ::c_ushort,
+        __unused1: ::c_ulong,
+        __unused2: ::c_ulong
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __unused4: ::c_ulong,
+        __unused5: ::c_ulong
+    }
+}
+
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
+
+pub const RLIMIT_NOFILE: ::c_int = 7;
+pub const RLIMIT_NPROC: ::c_int = 6;
+
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const O_SYNC: ::c_int = 1052672;
+pub const O_RSYNC: ::c_int = 1052672;
+pub const O_DSYNC: ::c_int = 4096;
+pub const O_FSYNC: ::c_int = 0x101000;
+pub const O_NOATIME: ::c_int = 0o1000000;
+pub const O_PATH: ::c_int = 0o10000000;
+
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+
+pub const EDEADLK: ::c_int = 35;
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+pub const EMULTIHOP: ::c_int = 72;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EBADMSG: ::c_int = 74;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ENETDOWN: ::c_int = 100;
+pub const ENETUNREACH: ::c_int = 101;
+pub const ENETRESET: ::c_int = 102;
+pub const ECONNABORTED: ::c_int = 103;
+pub const ECONNRESET: ::c_int = 104;
+pub const ENOBUFS: ::c_int = 105;
+pub const EISCONN: ::c_int = 106;
+pub const ENOTCONN: ::c_int = 107;
+pub const ESHUTDOWN: ::c_int = 108;
+pub const ETOOMANYREFS: ::c_int = 109;
+pub const ETIMEDOUT: ::c_int = 110;
+pub const ECONNREFUSED: ::c_int = 111;
+pub const EHOSTDOWN: ::c_int = 112;
+pub const EHOSTUNREACH: ::c_int = 113;
+pub const EALREADY: ::c_int = 114;
+pub const EINPROGRESS: ::c_int = 115;
+pub const ESTALE: ::c_int = 116;
+pub const EDQUOT: ::c_int = 122;
+pub const ENOMEDIUM: ::c_int = 123;
+pub const EMEDIUMTYPE: ::c_int = 124;
+pub const ECANCELED: ::c_int = 125;
+pub const ENOKEY: ::c_int = 126;
+pub const EKEYEXPIRED: ::c_int = 127;
+pub const EKEYREVOKED: ::c_int = 128;
+pub const EKEYREJECTED: ::c_int = 129;
+pub const EOWNERDEAD: ::c_int = 130;
+pub const ENOTRECOVERABLE: ::c_int = 131;
+pub const EHWPOISON: ::c_int = 133;
+pub const ERFKILL: ::c_int = 132;
+
+pub const SOL_SOCKET: ::c_int = 1;
+
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_PASSCRED: ::c_int = 16;
+pub const SO_PEERCRED: ::c_int = 17;
+pub const SO_RCVLOWAT: ::c_int = 18;
+pub const SO_SNDLOWAT: ::c_int = 19;
+pub const SO_RCVTIMEO: ::c_int = 20;
+pub const SO_SNDTIMEO: ::c_int = 21;
+pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
+pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
+pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
+pub const SO_BINDTODEVICE: ::c_int = 25;
+pub const SO_ATTACH_FILTER: ::c_int = 26;
+pub const SO_DETACH_FILTER: ::c_int = 27;
+pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
+pub const SO_PEERNAME: ::c_int = 28;
+pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+pub const SO_PEERSEC: ::c_int = 31;
+pub const SO_PASSSEC: ::c_int = 34;
+pub const SO_TIMESTAMPNS: ::c_int = 35;
+pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
+pub const SO_MARK: ::c_int = 36;
+pub const SO_TIMESTAMPING: ::c_int = 37;
+pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
+pub const SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
+pub const SO_RXQ_OVFL: ::c_int = 40;
+pub const SO_WIFI_STATUS: ::c_int = 41;
+pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
+pub const SO_PEEK_OFF: ::c_int = 42;
+pub const SO_NOFCS: ::c_int = 43;
+pub const SO_LOCK_FILTER: ::c_int = 44;
+pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
+pub const SO_BUSY_POLL: ::c_int = 46;
+pub const SO_MAX_PACING_RATE: ::c_int = 47;
+pub const SO_BPF_EXTENSIONS: ::c_int = 48;
+pub const SO_INCOMING_CPU: ::c_int = 49;
+pub const SO_ATTACH_BPF: ::c_int = 50;
+pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGUNUSED: ::c_int = 31;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
+
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const O_ASYNC: ::c_int = 0x2000;
+pub const O_NDELAY: ::c_int = 0x800;
+
+pub const PTRACE_DETACH: ::c_uint = 17;
+
+pub const EFD_NONBLOCK: ::c_int = 0x800;
+
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETOWN: ::c_int = 8;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+
+pub const SFD_NONBLOCK: ::c_int = 0x0800;
+
+pub const TIOCEXCL: ::c_ulong = 0x540C;
+pub const TIOCNXCL: ::c_ulong = 0x540D;
+pub const TIOCSCTTY: ::c_ulong = 0x540E;
+pub const TIOCSTI: ::c_ulong = 0x5412;
+pub const TIOCMGET: ::c_ulong = 0x5415;
+pub const TIOCMBIS: ::c_ulong = 0x5416;
+pub const TIOCMBIC: ::c_ulong = 0x5417;
+pub const TIOCMSET: ::c_ulong = 0x5418;
+pub const TIOCCONS: ::c_ulong = 0x541D;
+
+pub const SFD_CLOEXEC: ::c_int = 0x080000;
+
+pub const NCCS: usize = 32;
+
+pub const O_TRUNC: ::c_int = 512;
+
+pub const O_CLOEXEC: ::c_int = 0x80000;
+
+pub const EBFONT: ::c_int = 59;
+pub const ENOSTR: ::c_int = 60;
+pub const ENODATA: ::c_int = 61;
+pub const ETIME: ::c_int = 62;
+pub const ENOSR: ::c_int = 63;
+pub const ENONET: ::c_int = 64;
+pub const ENOPKG: ::c_int = 65;
+pub const EREMOTE: ::c_int = 66;
+pub const ENOLINK: ::c_int = 67;
+pub const EADV: ::c_int = 68;
+pub const ESRMNT: ::c_int = 69;
+pub const ECOMM: ::c_int = 70;
+pub const EPROTO: ::c_int = 71;
+pub const EDOTDOT: ::c_int = 73;
+
+pub const SA_NODEFER: ::c_int = 0x40000000;
+pub const SA_RESETHAND: ::c_int = 0x80000000;
+pub const SA_RESTART: ::c_int = 0x10000000;
+pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
+
+pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
+
+pub const EFD_CLOEXEC: ::c_int = 0x80000;
+
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+
+pub const O_DIRECT: ::c_int = 0x4000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_32BIT: ::c_int = 0x0040;
+
+pub const EDEADLOCK: ::c_int = 35;
+
+pub const FIOCLEX: ::c_ulong = 0x5451;
+pub const FIONBIO: ::c_ulong = 0x5421;
+
+pub const PTRACE_GETFPREGS: ::c_uint = 14;
+pub const PTRACE_SETFPREGS: ::c_uint = 15;
+pub const PTRACE_GETFPXREGS: ::c_uint = 18;
+pub const PTRACE_SETFPXREGS: ::c_uint = 19;
+pub const PTRACE_GETREGS: ::c_uint = 12;
+pub const PTRACE_SETREGS: ::c_uint = 13;
+pub const PTRACE_PEEKSIGINFO_SHARED: ::c_uint = 1;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
+pub const CBAUD: ::tcflag_t = 0o0010017;
+pub const TAB1: ::c_int = 0x00000800;
+pub const TAB2: ::c_int = 0x00001000;
+pub const TAB3: ::c_int = 0x00001800;
+pub const CR1: ::c_int  = 0x00000200;
+pub const CR2: ::c_int  = 0x00000400;
+pub const CR3: ::c_int  = 0x00000600;
+pub const FF1: ::c_int  = 0x00008000;
+pub const BS1: ::c_int  = 0x00002000;
+pub const VT1: ::c_int  = 0x00004000;
+pub const VWERASE: usize = 14;
+pub const VREPRINT: usize = 12;
+pub const VSUSP: usize = 10;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VDISCARD: usize = 13;
+pub const VTIME: usize = 5;
+pub const IXON: ::tcflag_t = 0x00000400;
+pub const IXOFF: ::tcflag_t = 0x00001000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x00000030;
+pub const CS6: ::tcflag_t = 0x00000010;
+pub const CS7: ::tcflag_t = 0x00000020;
+pub const CS8: ::tcflag_t = 0x00000030;
+pub const CSTOPB: ::tcflag_t = 0x00000040;
+pub const CREAD: ::tcflag_t = 0x00000080;
+pub const PARENB: ::tcflag_t = 0x00000100;
+pub const PARODD: ::tcflag_t = 0x00000200;
+pub const HUPCL: ::tcflag_t = 0x00000400;
+pub const CLOCAL: ::tcflag_t = 0x00000800;
+pub const ECHOKE: ::tcflag_t = 0x00000800;
+pub const ECHOE: ::tcflag_t = 0x00000010;
+pub const ECHOK: ::tcflag_t = 0x00000020;
+pub const ECHONL: ::tcflag_t = 0x00000040;
+pub const ECHOPRT: ::tcflag_t = 0x00000400;
+pub const ECHOCTL: ::tcflag_t = 0x00000200;
+pub const ISIG: ::tcflag_t = 0x00000001;
+pub const ICANON: ::tcflag_t = 0x00000002;
+pub const PENDIN: ::tcflag_t = 0x00004000;
+pub const NOFLSH: ::tcflag_t = 0x00000080;
+pub const CIBAUD: ::tcflag_t = 0o02003600000;
+pub const CBAUDEX: ::tcflag_t = 0o010000;
+pub const VSWTC: usize = 7;
+pub const OLCUC:  ::tcflag_t = 0o000002;
+pub const NLDLY:  ::tcflag_t = 0o000400;
+pub const CRDLY:  ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const BSDLY:  ::tcflag_t = 0o020000;
+pub const FFDLY:  ::tcflag_t = 0o100000;
+pub const VTDLY:  ::tcflag_t = 0o040000;
+pub const XTABS:  ::tcflag_t = 0o014000;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+
+pub const VEOL: usize = 11;
+pub const VEOL2: usize = 16;
+pub const VMIN: usize = 6;
+pub const IEXTEN: ::tcflag_t = 0x00008000;
+pub const TOSTOP: ::tcflag_t = 0x00000100;
+pub const FLUSHO: ::tcflag_t = 0x00001000;
+pub const EXTPROC: ::tcflag_t = 0x00010000;
+pub const TCGETS: ::c_ulong = 0x5401;
+pub const TCSETS: ::c_ulong = 0x5402;
+pub const TCSETSW: ::c_ulong = 0x5403;
+pub const TCSETSF: ::c_ulong = 0x5404;
+pub const TCGETA: ::c_ulong = 0x5405;
+pub const TCSETA: ::c_ulong = 0x5406;
+pub const TCSETAW: ::c_ulong = 0x5407;
+pub const TCSETAF: ::c_ulong = 0x5408;
+pub const TCSBRK: ::c_ulong = 0x5409;
+pub const TCXONC: ::c_ulong = 0x540A;
+pub const TCFLSH: ::c_ulong = 0x540B;
+pub const TIOCINQ: ::c_ulong = 0x541B;
+pub const TIOCGPGRP: ::c_ulong = 0x540F;
+pub const TIOCSPGRP: ::c_ulong = 0x5410;
+pub const TIOCOUTQ: ::c_ulong = 0x5411;
+pub const TIOCGWINSZ: ::c_ulong = 0x5413;
+pub const TIOCSWINSZ: ::c_ulong = 0x5414;
+pub const FIONREAD: ::c_ulong = 0x541B;
+
+// Syscall table
+
+pub const SYS_read: ::c_long = 0;
+pub const SYS_write: ::c_long = 1;
+pub const SYS_open: ::c_long = 2;
+pub const SYS_close: ::c_long = 3;
+pub const SYS_stat: ::c_long = 4;
+pub const SYS_fstat: ::c_long = 5;
+pub const SYS_lstat: ::c_long = 6;
+pub const SYS_poll: ::c_long = 7;
+pub const SYS_lseek: ::c_long = 8;
+pub const SYS_mmap: ::c_long = 9;
+pub const SYS_mprotect: ::c_long = 10;
+pub const SYS_munmap: ::c_long = 11;
+pub const SYS_brk: ::c_long = 12;
+pub const SYS_rt_sigaction: ::c_long = 13;
+pub const SYS_rt_sigprocmask: ::c_long = 14;
+pub const SYS_rt_sigreturn: ::c_long = 15;
+pub const SYS_ioctl: ::c_long = 16;
+pub const SYS_pread64: ::c_long = 17;
+pub const SYS_pwrite64: ::c_long = 18;
+pub const SYS_readv: ::c_long = 19;
+pub const SYS_writev: ::c_long = 20;
+pub const SYS_access: ::c_long = 21;
+pub const SYS_pipe: ::c_long = 22;
+pub const SYS_select: ::c_long = 23;
+pub const SYS_sched_yield: ::c_long = 24;
+pub const SYS_mremap: ::c_long = 25;
+pub const SYS_msync: ::c_long = 26;
+pub const SYS_mincore: ::c_long = 27;
+pub const SYS_madvise: ::c_long = 28;
+pub const SYS_shmget: ::c_long = 29;
+pub const SYS_shmat: ::c_long = 30;
+pub const SYS_shmctl: ::c_long = 31;
+pub const SYS_dup: ::c_long = 32;
+pub const SYS_dup2: ::c_long = 33;
+pub const SYS_pause: ::c_long = 34;
+pub const SYS_nanosleep: ::c_long = 35;
+pub const SYS_getitimer: ::c_long = 36;
+pub const SYS_alarm: ::c_long = 37;
+pub const SYS_setitimer: ::c_long = 38;
+pub const SYS_getpid: ::c_long = 39;
+pub const SYS_sendfile: ::c_long = 40;
+pub const SYS_socket: ::c_long = 41;
+pub const SYS_connect: ::c_long = 42;
+pub const SYS_accept: ::c_long = 43;
+pub const SYS_sendto: ::c_long = 44;
+pub const SYS_recvfrom: ::c_long = 45;
+pub const SYS_sendmsg: ::c_long = 46;
+pub const SYS_recvmsg: ::c_long = 47;
+pub const SYS_shutdown: ::c_long = 48;
+pub const SYS_bind: ::c_long = 49;
+pub const SYS_listen: ::c_long = 50;
+pub const SYS_getsockname: ::c_long = 51;
+pub const SYS_getpeername: ::c_long = 52;
+pub const SYS_socketpair: ::c_long = 53;
+pub const SYS_setsockopt: ::c_long = 54;
+pub const SYS_getsockopt: ::c_long = 55;
+pub const SYS_clone: ::c_long = 56;
+pub const SYS_fork: ::c_long = 57;
+pub const SYS_vfork: ::c_long = 58;
+pub const SYS_execve: ::c_long = 59;
+pub const SYS_exit: ::c_long = 60;
+pub const SYS_wait4: ::c_long = 61;
+pub const SYS_kill: ::c_long = 62;
+pub const SYS_uname: ::c_long = 63;
+pub const SYS_semget: ::c_long = 64;
+pub const SYS_semop: ::c_long = 65;
+pub const SYS_semctl: ::c_long = 66;
+pub const SYS_shmdt: ::c_long = 67;
+pub const SYS_msgget: ::c_long = 68;
+pub const SYS_msgsnd: ::c_long = 69;
+pub const SYS_msgrcv: ::c_long = 70;
+pub const SYS_msgctl: ::c_long = 71;
+pub const SYS_fcntl: ::c_long = 72;
+pub const SYS_flock: ::c_long = 73;
+pub const SYS_fsync: ::c_long = 74;
+pub const SYS_fdatasync: ::c_long = 75;
+pub const SYS_truncate: ::c_long = 76;
+pub const SYS_ftruncate: ::c_long = 77;
+pub const SYS_getdents: ::c_long = 78;
+pub const SYS_getcwd: ::c_long = 79;
+pub const SYS_chdir: ::c_long = 80;
+pub const SYS_fchdir: ::c_long = 81;
+pub const SYS_rename: ::c_long = 82;
+pub const SYS_mkdir: ::c_long = 83;
+pub const SYS_rmdir: ::c_long = 84;
+pub const SYS_creat: ::c_long = 85;
+pub const SYS_link: ::c_long = 86;
+pub const SYS_unlink: ::c_long = 87;
+pub const SYS_symlink: ::c_long = 88;
+pub const SYS_readlink: ::c_long = 89;
+pub const SYS_chmod: ::c_long = 90;
+pub const SYS_fchmod: ::c_long = 91;
+pub const SYS_chown: ::c_long = 92;
+pub const SYS_fchown: ::c_long = 93;
+pub const SYS_lchown: ::c_long = 94;
+pub const SYS_umask: ::c_long = 95;
+pub const SYS_gettimeofday: ::c_long = 96;
+pub const SYS_getrlimit: ::c_long = 97;
+pub const SYS_getrusage: ::c_long = 98;
+pub const SYS_sysinfo: ::c_long = 99;
+pub const SYS_times: ::c_long = 100;
+pub const SYS_ptrace: ::c_long = 101;
+pub const SYS_getuid: ::c_long = 102;
+pub const SYS_syslog: ::c_long = 103;
+pub const SYS_getgid: ::c_long = 104;
+pub const SYS_setuid: ::c_long = 105;
+pub const SYS_setgid: ::c_long = 106;
+pub const SYS_geteuid: ::c_long = 107;
+pub const SYS_getegid: ::c_long = 108;
+pub const SYS_setpgid: ::c_long = 109;
+pub const SYS_getppid: ::c_long = 110;
+pub const SYS_getpgrp: ::c_long = 111;
+pub const SYS_setsid: ::c_long = 112;
+pub const SYS_setreuid: ::c_long = 113;
+pub const SYS_setregid: ::c_long = 114;
+pub const SYS_getgroups: ::c_long = 115;
+pub const SYS_setgroups: ::c_long = 116;
+pub const SYS_setresuid: ::c_long = 117;
+pub const SYS_getresuid: ::c_long = 118;
+pub const SYS_setresgid: ::c_long = 119;
+pub const SYS_getresgid: ::c_long = 120;
+pub const SYS_getpgid: ::c_long = 121;
+pub const SYS_setfsuid: ::c_long = 122;
+pub const SYS_setfsgid: ::c_long = 123;
+pub const SYS_getsid: ::c_long = 124;
+pub const SYS_capget: ::c_long = 125;
+pub const SYS_capset: ::c_long = 126;
+pub const SYS_rt_sigpending: ::c_long = 127;
+pub const SYS_rt_sigtimedwait: ::c_long = 128;
+pub const SYS_rt_sigqueueinfo: ::c_long = 129;
+pub const SYS_rt_sigsuspend: ::c_long = 130;
+pub const SYS_sigaltstack: ::c_long = 131;
+pub const SYS_utime: ::c_long = 132;
+pub const SYS_mknod: ::c_long = 133;
+pub const SYS_uselib: ::c_long = 134;
+pub const SYS_personality: ::c_long = 135;
+pub const SYS_ustat: ::c_long = 136;
+pub const SYS_statfs: ::c_long = 137;
+pub const SYS_fstatfs: ::c_long = 138;
+pub const SYS_sysfs: ::c_long = 139;
+pub const SYS_getpriority: ::c_long = 140;
+pub const SYS_setpriority: ::c_long = 141;
+pub const SYS_sched_setparam: ::c_long = 142;
+pub const SYS_sched_getparam: ::c_long = 143;
+pub const SYS_sched_setscheduler: ::c_long = 144;
+pub const SYS_sched_getscheduler: ::c_long = 145;
+pub const SYS_sched_get_priority_max: ::c_long = 146;
+pub const SYS_sched_get_priority_min: ::c_long = 147;
+pub const SYS_sched_rr_get_interval: ::c_long = 148;
+pub const SYS_mlock: ::c_long = 149;
+pub const SYS_munlock: ::c_long = 150;
+pub const SYS_mlockall: ::c_long = 151;
+pub const SYS_munlockall: ::c_long = 152;
+pub const SYS_vhangup: ::c_long = 153;
+pub const SYS_modify_ldt: ::c_long = 154;
+pub const SYS_pivot_root: ::c_long = 155;
+pub const SYS__sysctl: ::c_long = 156;
+pub const SYS_prctl: ::c_long = 157;
+pub const SYS_arch_prctl: ::c_long = 158;
+pub const SYS_adjtimex: ::c_long = 159;
+pub const SYS_setrlimit: ::c_long = 160;
+pub const SYS_chroot: ::c_long = 161;
+pub const SYS_sync: ::c_long = 162;
+pub const SYS_acct: ::c_long = 163;
+pub const SYS_settimeofday: ::c_long = 164;
+pub const SYS_mount: ::c_long = 165;
+pub const SYS_umount2: ::c_long = 166;
+pub const SYS_swapon: ::c_long = 167;
+pub const SYS_swapoff: ::c_long = 168;
+pub const SYS_reboot: ::c_long = 169;
+pub const SYS_sethostname: ::c_long = 170;
+pub const SYS_setdomainname: ::c_long = 171;
+pub const SYS_iopl: ::c_long = 172;
+pub const SYS_ioperm: ::c_long = 173;
+pub const SYS_create_module: ::c_long = 174;
+pub const SYS_init_module: ::c_long = 175;
+pub const SYS_delete_module: ::c_long = 176;
+pub const SYS_get_kernel_syms: ::c_long = 177;
+pub const SYS_query_module: ::c_long = 178;
+pub const SYS_quotactl: ::c_long = 179;
+pub const SYS_nfsservctl: ::c_long = 180;
+pub const SYS_getpmsg: ::c_long = 181;
+pub const SYS_putpmsg: ::c_long = 182;
+pub const SYS_afs_syscall: ::c_long = 183;
+pub const SYS_tuxcall: ::c_long = 184;
+pub const SYS_security: ::c_long = 185;
+pub const SYS_gettid: ::c_long = 186;
+pub const SYS_readahead: ::c_long = 187;
+pub const SYS_setxattr: ::c_long = 188;
+pub const SYS_lsetxattr: ::c_long = 189;
+pub const SYS_fsetxattr: ::c_long = 190;
+pub const SYS_getxattr: ::c_long = 191;
+pub const SYS_lgetxattr: ::c_long = 192;
+pub const SYS_fgetxattr: ::c_long = 193;
+pub const SYS_listxattr: ::c_long = 194;
+pub const SYS_llistxattr: ::c_long = 195;
+pub const SYS_flistxattr: ::c_long = 196;
+pub const SYS_removexattr: ::c_long = 197;
+pub const SYS_lremovexattr: ::c_long = 198;
+pub const SYS_fremovexattr: ::c_long = 199;
+pub const SYS_tkill: ::c_long = 200;
+pub const SYS_time: ::c_long = 201;
+pub const SYS_futex: ::c_long = 202;
+pub const SYS_sched_setaffinity: ::c_long = 203;
+pub const SYS_sched_getaffinity: ::c_long = 204;
+pub const SYS_set_thread_area: ::c_long = 205;
+pub const SYS_io_setup: ::c_long = 206;
+pub const SYS_io_destroy: ::c_long = 207;
+pub const SYS_io_getevents: ::c_long = 208;
+pub const SYS_io_submit: ::c_long = 209;
+pub const SYS_io_cancel: ::c_long = 210;
+pub const SYS_get_thread_area: ::c_long = 211;
+pub const SYS_lookup_dcookie: ::c_long = 212;
+pub const SYS_epoll_create: ::c_long = 213;
+pub const SYS_epoll_ctl_old: ::c_long = 214;
+pub const SYS_epoll_wait_old: ::c_long = 215;
+pub const SYS_remap_file_pages: ::c_long = 216;
+pub const SYS_getdents64: ::c_long = 217;
+pub const SYS_set_tid_address: ::c_long = 218;
+pub const SYS_restart_syscall: ::c_long = 219;
+pub const SYS_semtimedop: ::c_long = 220;
+pub const SYS_fadvise64: ::c_long = 221;
+pub const SYS_timer_create: ::c_long = 222;
+pub const SYS_timer_settime: ::c_long = 223;
+pub const SYS_timer_gettime: ::c_long = 224;
+pub const SYS_timer_getoverrun: ::c_long = 225;
+pub const SYS_timer_delete: ::c_long = 226;
+pub const SYS_clock_settime: ::c_long = 227;
+pub const SYS_clock_gettime: ::c_long = 228;
+pub const SYS_clock_getres: ::c_long = 229;
+pub const SYS_clock_nanosleep: ::c_long = 230;
+pub const SYS_exit_group: ::c_long = 231;
+pub const SYS_epoll_wait: ::c_long = 232;
+pub const SYS_epoll_ctl: ::c_long = 233;
+pub const SYS_tgkill: ::c_long = 234;
+pub const SYS_utimes: ::c_long = 235;
+pub const SYS_vserver: ::c_long = 236;
+pub const SYS_mbind: ::c_long = 237;
+pub const SYS_set_mempolicy: ::c_long = 238;
+pub const SYS_get_mempolicy: ::c_long = 239;
+pub const SYS_mq_open: ::c_long = 240;
+pub const SYS_mq_unlink: ::c_long = 241;
+pub const SYS_mq_timedsend: ::c_long = 242;
+pub const SYS_mq_timedreceive: ::c_long = 243;
+pub const SYS_mq_notify: ::c_long = 244;
+pub const SYS_mq_getsetattr: ::c_long = 245;
+pub const SYS_kexec_load: ::c_long = 246;
+pub const SYS_waitid: ::c_long = 247;
+pub const SYS_add_key: ::c_long = 248;
+pub const SYS_request_key: ::c_long = 249;
+pub const SYS_keyctl: ::c_long = 250;
+pub const SYS_ioprio_set: ::c_long = 251;
+pub const SYS_ioprio_get: ::c_long = 252;
+pub const SYS_inotify_init: ::c_long = 253;
+pub const SYS_inotify_add_watch: ::c_long = 254;
+pub const SYS_inotify_rm_watch: ::c_long = 255;
+pub const SYS_migrate_pages: ::c_long = 256;
+pub const SYS_openat: ::c_long = 257;
+pub const SYS_mkdirat: ::c_long = 258;
+pub const SYS_mknodat: ::c_long = 259;
+pub const SYS_fchownat: ::c_long = 260;
+pub const SYS_futimesat: ::c_long = 261;
+pub const SYS_newfstatat: ::c_long = 262;
+pub const SYS_unlinkat: ::c_long = 263;
+pub const SYS_renameat: ::c_long = 264;
+pub const SYS_linkat: ::c_long = 265;
+pub const SYS_symlinkat: ::c_long = 266;
+pub const SYS_readlinkat: ::c_long = 267;
+pub const SYS_fchmodat: ::c_long = 268;
+pub const SYS_faccessat: ::c_long = 269;
+pub const SYS_pselect6: ::c_long = 270;
+pub const SYS_ppoll: ::c_long = 271;
+pub const SYS_unshare: ::c_long = 272;
+pub const SYS_set_robust_list: ::c_long = 273;
+pub const SYS_get_robust_list: ::c_long = 274;
+pub const SYS_splice: ::c_long = 275;
+pub const SYS_tee: ::c_long = 276;
+pub const SYS_sync_file_range: ::c_long = 277;
+pub const SYS_vmsplice: ::c_long = 278;
+pub const SYS_move_pages: ::c_long = 279;
+pub const SYS_utimensat: ::c_long = 280;
+pub const SYS_epoll_pwait: ::c_long = 281;
+pub const SYS_signalfd: ::c_long = 282;
+pub const SYS_timerfd_create: ::c_long = 283;
+pub const SYS_eventfd: ::c_long = 284;
+pub const SYS_fallocate: ::c_long = 285;
+pub const SYS_timerfd_settime: ::c_long = 286;
+pub const SYS_timerfd_gettime: ::c_long = 287;
+pub const SYS_accept4: ::c_long = 288;
+pub const SYS_signalfd4: ::c_long = 289;
+pub const SYS_eventfd2: ::c_long = 290;
+pub const SYS_epoll_create1: ::c_long = 291;
+pub const SYS_dup3: ::c_long = 292;
+pub const SYS_pipe2: ::c_long = 293;
+pub const SYS_inotify_init1: ::c_long = 294;
+pub const SYS_preadv: ::c_long = 295;
+pub const SYS_pwritev: ::c_long = 296;
+pub const SYS_rt_tgsigqueueinfo: ::c_long = 297;
+pub const SYS_perf_event_open: ::c_long = 298;
+pub const SYS_recvmmsg: ::c_long = 299;
+pub const SYS_fanotify_init: ::c_long = 300;
+pub const SYS_fanotify_mark: ::c_long = 301;
+pub const SYS_prlimit64: ::c_long = 302;
+pub const SYS_name_to_handle_at: ::c_long = 303;
+pub const SYS_open_by_handle_at: ::c_long = 304;
+pub const SYS_clock_adjtime: ::c_long = 305;
+pub const SYS_syncfs: ::c_long = 306;
+pub const SYS_sendmmsg: ::c_long = 307;
+pub const SYS_setns: ::c_long = 308;
+pub const SYS_getcpu: ::c_long = 309;
+pub const SYS_process_vm_readv: ::c_long = 310;
+pub const SYS_process_vm_writev: ::c_long = 311;
+pub const SYS_kcmp: ::c_long = 312;
+pub const SYS_finit_module: ::c_long = 313;
+pub const SYS_sched_setattr: ::c_long = 314;
+pub const SYS_sched_getattr: ::c_long = 315;
+pub const SYS_renameat2: ::c_long = 316;
+pub const SYS_seccomp: ::c_long = 317;
+pub const SYS_getrandom: ::c_long = 318;
+pub const SYS_memfd_create: ::c_long = 319;
+pub const SYS_kexec_file_load: ::c_long = 320;
+pub const SYS_bpf: ::c_long = 321;
+pub const SYS_execveat: ::c_long = 322;
+pub const SYS_userfaultfd: ::c_long = 323;
+pub const SYS_membarrier: ::c_long = 324;
+pub const SYS_mlock2: ::c_long = 325;
+pub const SYS_copy_file_range: ::c_long = 326;
+pub const SYS_preadv2: ::c_long = 327;
+pub const SYS_pwritev2: ::c_long = 328;
+pub const SYS_pkey_mprotect: ::c_long = 329;
+pub const SYS_pkey_alloc: ::c_long = 330;
+pub const SYS_pkey_free: ::c_long = 331;
+
+// offsets in user_regs_structs, from sys/reg.h
+pub const R15: ::c_int = 0;
+pub const R14: ::c_int = 1;
+pub const R13: ::c_int = 2;
+pub const R12: ::c_int = 3;
+pub const RBP: ::c_int = 4;
+pub const RBX: ::c_int = 5;
+pub const R11: ::c_int = 6;
+pub const R10: ::c_int = 7;
+pub const R9: ::c_int = 8;
+pub const R8: ::c_int = 9;
+pub const RAX: ::c_int = 10;
+pub const RCX: ::c_int = 11;
+pub const RDX: ::c_int = 12;
+pub const RSI: ::c_int = 13;
+pub const RDI: ::c_int = 14;
+pub const ORIG_RAX: ::c_int = 15;
+pub const RIP: ::c_int = 16;
+pub const CS: ::c_int = 17;
+pub const EFLAGS: ::c_int = 18;
+pub const RSP: ::c_int = 19;
+pub const SS: ::c_int = 20;
+pub const FS_BASE: ::c_int = 21;
+pub const GS_BASE: ::c_int = 22;
+pub const DS: ::c_int = 23;
+pub const ES: ::c_int = 24;
+pub const FS: ::c_int = 25;
+pub const GS: ::c_int = 26;
+
+extern {
+    pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
+    pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
+    pub fn makecontext(ucp: *mut ucontext_t,
+                       func:  extern fn (),
+                       argc: ::c_int, ...);
+    pub fn swapcontext(uocp: *mut ucontext_t,
+                       ucp: *const ucontext_t) -> ::c_int;
+    pub fn iopl(level: ::c_int) -> ::c_int;
+    pub fn ioperm(from: ::c_ulong, num: ::c_ulong,
+                  turn_on: ::c_int) -> ::c_int;
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/other/mod.rs
@@ -0,0 +1,600 @@
+pub type fsblkcnt_t = ::c_ulong;
+pub type fsfilcnt_t = ::c_ulong;
+pub type rlim_t = c_ulong;
+pub type __priority_which_t = ::c_uint;
+
+s! {
+    pub struct aiocb {
+        pub aio_fildes: ::c_int,
+        pub aio_lio_opcode: ::c_int,
+        pub aio_reqprio: ::c_int,
+        pub aio_buf: *mut ::c_void,
+        pub aio_nbytes: ::size_t,
+        pub aio_sigevent: ::sigevent,
+        __next_prio: *mut aiocb,
+        __abs_prio: ::c_int,
+        __policy: ::c_int,
+        __error_code: ::c_int,
+        __return_value: ::ssize_t,
+        pub aio_offset: off_t,
+        #[cfg(target_pointer_width = "32")]
+        __unused1: [::c_char; 4],
+        __glibc_reserved: [::c_char; 32]
+    }
+
+    pub struct __exit_status {
+        pub e_termination: ::c_short,
+        pub e_exit: ::c_short,
+    }
+
+    pub struct __timeval {
+        pub tv_sec: ::int32_t,
+        pub tv_usec: ::int32_t,
+    }
+
+    pub struct utmpx {
+        pub ut_type: ::c_short,
+        pub ut_pid: ::pid_t,
+        pub ut_line: [::c_char; __UT_LINESIZE],
+        pub ut_id: [::c_char; 4],
+
+        pub ut_user: [::c_char; __UT_NAMESIZE],
+        pub ut_host: [::c_char; __UT_HOSTSIZE],
+        pub ut_exit: __exit_status,
+
+        #[cfg(any(target_arch = "aarch64",
+                  target_arch = "sparc64",
+                  target_pointer_width = "32"))]
+        pub ut_session: ::c_long,
+        #[cfg(any(target_arch = "aarch64",
+                  target_arch = "sparc64",
+                  target_pointer_width = "32"))]
+        pub ut_tv: ::timeval,
+
+        #[cfg(not(any(target_arch = "aarch64",
+                      target_arch = "sparc64",
+                      target_pointer_width = "32")))]
+        pub ut_session: ::int32_t,
+        #[cfg(not(any(target_arch = "aarch64",
+                      target_arch = "sparc64",
+                      target_pointer_width = "32")))]
+        pub ut_tv: __timeval,
+
+        pub ut_addr_v6: [::int32_t; 4],
+        __glibc_reserved: [::c_char; 20],
+    }
+
+    pub struct sigaction {
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: ::sigset_t,
+        #[cfg(target_arch = "sparc64")]
+        __reserved0: ::c_int,
+        pub sa_flags: ::c_int,
+        pub sa_restorer: ::dox::Option<extern fn()>,
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_flags: ::c_int,
+        pub ss_size: ::size_t
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_errno: ::c_int,
+        pub si_code: ::c_int,
+        pub _pad: [::c_int; 29],
+        _align: [usize; 0],
+    }
+
+    pub struct glob64_t {
+        pub gl_pathc: ::size_t,
+        pub gl_pathv: *mut *mut ::c_char,
+        pub gl_offs: ::size_t,
+        pub gl_flags: ::c_int,
+
+        __unused1: *mut ::c_void,
+        __unused2: *mut ::c_void,
+        __unused3: *mut ::c_void,
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+    }
+
+    pub struct ucred {
+        pub pid: ::pid_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+    }
+
+    pub struct statfs {
+        pub f_type: __fsword_t,
+        pub f_bsize: __fsword_t,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_fsid: ::fsid_t,
+
+        pub f_namelen: __fsword_t,
+        pub f_frsize: __fsword_t,
+        f_spare: [__fsword_t; 5],
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::size_t,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::size_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::size_t,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_line: ::cc_t,
+        pub c_cc: [::cc_t; ::NCCS],
+        #[cfg(not(target_arch = "sparc64"))]
+        pub c_ispeed: ::speed_t,
+        #[cfg(not(target_arch = "sparc64"))]
+        pub c_ospeed: ::speed_t,
+    }
+
+    pub struct flock {
+        pub l_type: ::c_short,
+        pub l_whence: ::c_short,
+        pub l_start: ::off_t,
+        pub l_len: ::off_t,
+        pub l_pid: ::pid_t,
+    }
+
+    // FIXME this is actually a union
+    pub struct sem_t {
+        #[cfg(target_pointer_width = "32")]
+        __size: [::c_char; 16],
+        #[cfg(target_pointer_width = "64")]
+        __size: [::c_char; 32],
+        __align: [::c_long; 0],
+    }
+}
+
+pub const __UT_LINESIZE: usize = 32;
+pub const __UT_NAMESIZE: usize = 32;
+pub const __UT_HOSTSIZE: usize = 256;
+pub const EMPTY: ::c_short = 0;
+pub const RUN_LVL: ::c_short = 1;
+pub const BOOT_TIME: ::c_short = 2;
+pub const NEW_TIME: ::c_short = 3;
+pub const OLD_TIME: ::c_short = 4;
+pub const INIT_PROCESS: ::c_short = 5;
+pub const LOGIN_PROCESS: ::c_short = 6;
+pub const USER_PROCESS: ::c_short = 7;
+pub const DEAD_PROCESS: ::c_short = 8;
+pub const ACCOUNTING: ::c_short = 9;
+
+pub const RLIMIT_RSS: ::c_int = 5;
+pub const RLIMIT_AS: ::c_int = 9;
+pub const RLIMIT_MEMLOCK: ::c_int = 8;
+pub const RLIM_INFINITY: ::rlim_t = !0;
+pub const RLIMIT_RTTIME: ::c_int = 15;
+pub const RLIMIT_NLIMITS: ::c_int = 16;
+
+pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
+
+pub const SOL_RXRPC: ::c_int = 272;
+pub const SOL_PPPOL2TP: ::c_int = 273;
+pub const SOL_BLUETOOTH: ::c_int = 274;
+pub const SOL_PNPIPE: ::c_int = 275;
+pub const SOL_RDS: ::c_int = 276;
+pub const SOL_IUCV: ::c_int = 277;
+pub const SOL_CAIF: ::c_int = 278;
+pub const SOL_ALG: ::c_int = 279;
+pub const SOL_NFC: ::c_int = 280;
+
+pub const MSG_TRYHARD: ::c_int = 4;
+
+pub const LC_PAPER: ::c_int = 7;
+pub const LC_NAME: ::c_int = 8;
+pub const LC_ADDRESS: ::c_int = 9;
+pub const LC_TELEPHONE: ::c_int = 10;
+pub const LC_MEASUREMENT: ::c_int = 11;
+pub const LC_IDENTIFICATION: ::c_int = 12;
+pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
+pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
+pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
+pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
+pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
+pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
+pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
+                               | ::LC_NUMERIC_MASK
+                               | ::LC_TIME_MASK
+                               | ::LC_COLLATE_MASK
+                               | ::LC_MONETARY_MASK
+                               | ::LC_MESSAGES_MASK
+                               | LC_PAPER_MASK
+                               | LC_NAME_MASK
+                               | LC_ADDRESS_MASK
+                               | LC_TELEPHONE_MASK
+                               | LC_MEASUREMENT_MASK
+                               | LC_IDENTIFICATION_MASK;
+
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_ANONYMOUS: ::c_int = 0x0020;
+pub const MAP_DENYWRITE: ::c_int = 0x0800;
+pub const MAP_EXECUTABLE: ::c_int = 0x01000;
+pub const MAP_POPULATE: ::c_int = 0x08000;
+pub const MAP_NONBLOCK: ::c_int = 0x010000;
+pub const MAP_STACK: ::c_int = 0x020000;
+
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EUCLEAN: ::c_int = 117;
+pub const ENOTNAM: ::c_int = 118;
+pub const ENAVAIL: ::c_int = 119;
+pub const EISNAM: ::c_int = 120;
+pub const EREMOTEIO: ::c_int = 121;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOCK_SEQPACKET: ::c_int = 5;
+
+pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
+pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
+pub const TCP_THIN_DUPACK: ::c_int = 17;
+pub const TCP_USER_TIMEOUT: ::c_int = 18;
+pub const TCP_REPAIR: ::c_int = 19;
+pub const TCP_REPAIR_QUEUE: ::c_int = 20;
+pub const TCP_QUEUE_SEQ: ::c_int = 21;
+pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
+pub const TCP_FASTOPEN: ::c_int = 23;
+pub const TCP_TIMESTAMP: ::c_int = 24;
+
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
+
+pub const SIGEV_THREAD_ID: ::c_int = 4;
+
+pub const BUFSIZ: ::c_uint = 8192;
+pub const TMP_MAX: ::c_uint = 238328;
+pub const FOPEN_MAX: ::c_uint = 16;
+pub const POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
+pub const POSIX_MADV_DONTNEED: ::c_int = 4;
+pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
+pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
+pub const _SC_PII: ::c_int = 53;
+pub const _SC_PII_XTI: ::c_int = 54;
+pub const _SC_PII_SOCKET: ::c_int = 55;
+pub const _SC_PII_INTERNET: ::c_int = 56;
+pub const _SC_PII_OSI: ::c_int = 57;
+pub const _SC_POLL: ::c_int = 58;
+pub const _SC_SELECT: ::c_int = 59;
+pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
+pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
+pub const _SC_PII_OSI_COTS: ::c_int = 63;
+pub const _SC_PII_OSI_CLTS: ::c_int = 64;
+pub const _SC_PII_OSI_M: ::c_int = 65;
+pub const _SC_T_IOV_MAX: ::c_int = 66;
+pub const _SC_2_C_VERSION: ::c_int = 96;
+pub const _SC_CHAR_BIT: ::c_int = 101;
+pub const _SC_CHAR_MAX: ::c_int = 102;
+pub const _SC_CHAR_MIN: ::c_int = 103;
+pub const _SC_INT_MAX: ::c_int = 104;
+pub const _SC_INT_MIN: ::c_int = 105;
+pub const _SC_LONG_BIT: ::c_int = 106;
+pub const _SC_WORD_BIT: ::c_int = 107;
+pub const _SC_MB_LEN_MAX: ::c_int = 108;
+pub const _SC_SSIZE_MAX: ::c_int = 110;
+pub const _SC_SCHAR_MAX: ::c_int = 111;
+pub const _SC_SCHAR_MIN: ::c_int = 112;
+pub const _SC_SHRT_MAX: ::c_int = 113;
+pub const _SC_SHRT_MIN: ::c_int = 114;
+pub const _SC_UCHAR_MAX: ::c_int = 115;
+pub const _SC_UINT_MAX: ::c_int = 116;
+pub const _SC_ULONG_MAX: ::c_int = 117;
+pub const _SC_USHRT_MAX: ::c_int = 118;
+pub const _SC_NL_ARGMAX: ::c_int = 119;
+pub const _SC_NL_LANGMAX: ::c_int = 120;
+pub const _SC_NL_MSGMAX: ::c_int = 121;
+pub const _SC_NL_NMAX: ::c_int = 122;
+pub const _SC_NL_SETMAX: ::c_int = 123;
+pub const _SC_NL_TEXTMAX: ::c_int = 124;
+pub const _SC_BASE: ::c_int = 134;
+pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
+pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
+pub const _SC_DEVICE_IO: ::c_int = 140;
+pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
+pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
+pub const _SC_FD_MGMT: ::c_int = 143;
+pub const _SC_FIFO: ::c_int = 144;
+pub const _SC_PIPE: ::c_int = 145;
+pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
+pub const _SC_FILE_LOCKING: ::c_int = 147;
+pub const _SC_FILE_SYSTEM: ::c_int = 148;
+pub const _SC_MULTI_PROCESS: ::c_int = 150;
+pub const _SC_SINGLE_PROCESS: ::c_int = 151;
+pub const _SC_NETWORKING: ::c_int = 152;
+pub const _SC_REGEX_VERSION: ::c_int = 156;
+pub const _SC_SIGNALS: ::c_int = 158;
+pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
+pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
+pub const _SC_USER_GROUPS: ::c_int = 166;
+pub const _SC_USER_GROUPS_R: ::c_int = 167;
+pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
+pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
+pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
+pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
+pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
+pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
+pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
+pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
+pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
+pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
+pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
+pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
+pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
+pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
+pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
+pub const O_ACCMODE: ::c_int = 3;
+pub const ST_RELATIME: ::c_ulong = 4096;
+pub const NI_MAXHOST: ::socklen_t = 1025;
+
+pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
+pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
+pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
+pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
+pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
+pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
+pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
+pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
+pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
+pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
+pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
+pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
+pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
+pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
+pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
+pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
+pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
+pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
+pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
+pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
+pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
+pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
+pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
+pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
+pub const TMPFS_MAGIC: ::c_long = 0x01021994;
+pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
+
+pub const VEOF: usize = 4;
+
+pub const CPU_SETSIZE: ::c_int = 0x400;
+
+pub const QFMT_VFS_V1: ::c_int = 4;
+
+pub const PTRACE_TRACEME: ::c_uint = 0;
+pub const PTRACE_PEEKTEXT: ::c_uint = 1;
+pub const PTRACE_PEEKDATA: ::c_uint = 2;
+pub const PTRACE_PEEKUSER: ::c_uint = 3;
+pub const PTRACE_POKETEXT: ::c_uint = 4;
+pub const PTRACE_POKEDATA: ::c_uint = 5;
+pub const PTRACE_POKEUSER: ::c_uint = 6;
+pub const PTRACE_CONT: ::c_uint = 7;
+pub const PTRACE_KILL: ::c_uint = 8;
+pub const PTRACE_SINGLESTEP: ::c_uint = 9;
+pub const PTRACE_ATTACH: ::c_uint = 16;
+pub const PTRACE_SYSCALL: ::c_uint = 24;
+pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
+pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
+pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
+pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
+pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
+pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
+pub const PTRACE_SEIZE: ::c_uint = 0x4206;
+pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
+pub const PTRACE_LISTEN: ::c_uint = 0x4208;
+pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
+
+pub const EPOLLWAKEUP: ::c_int = 0x20000000;
+
+pub const MAP_HUGETLB: ::c_int = 0x040000;
+
+pub const SEEK_DATA: ::c_int = 3;
+pub const SEEK_HOLE: ::c_int = 4;
+
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
+
+pub const TIOCLINUX: ::c_ulong = 0x541C;
+pub const TIOCGSERIAL: ::c_ulong = 0x541E;
+
+pub const RTLD_DEEPBIND: ::c_int = 0x8;
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
+
+pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
+pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
+pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
+pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
+pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
+
+pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
+pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
+pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
+pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
+pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
+pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
+pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
+pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
+
+pub const NETLINK_ROUTE: ::c_int = 0;
+pub const NETLINK_UNUSED: ::c_int = 1;
+pub const NETLINK_USERSOCK: ::c_int = 2;
+pub const NETLINK_FIREWALL: ::c_int = 3;
+pub const NETLINK_SOCK_DIAG: ::c_int = 4;
+pub const NETLINK_NFLOG: ::c_int = 5;
+pub const NETLINK_XFRM: ::c_int = 6;
+pub const NETLINK_SELINUX: ::c_int = 7;
+pub const NETLINK_ISCSI: ::c_int = 8;
+pub const NETLINK_AUDIT: ::c_int = 9;
+pub const NETLINK_FIB_LOOKUP: ::c_int = 10;
+pub const NETLINK_CONNECTOR: ::c_int = 11;
+pub const NETLINK_NETFILTER: ::c_int = 12;
+pub const NETLINK_IP6_FW: ::c_int = 13;
+pub const NETLINK_DNRTMSG: ::c_int = 14;
+pub const NETLINK_KOBJECT_UEVENT: ::c_int = 15;
+pub const NETLINK_GENERIC: ::c_int = 16;
+pub const NETLINK_SCSITRANSPORT: ::c_int = 18;
+pub const NETLINK_ECRYPTFS: ::c_int = 19;
+pub const NETLINK_RDMA: ::c_int = 20;
+pub const NETLINK_CRYPTO: ::c_int = 21;
+pub const NETLINK_INET_DIAG: ::c_int = NETLINK_SOCK_DIAG;
+
+pub const MAX_LINKS: ::c_int = 32;
+
+pub const NLM_F_REQUEST: ::c_int = 1;
+pub const NLM_F_MULTI: ::c_int = 2;
+pub const NLM_F_ACK: ::c_int = 4;
+pub const NLM_F_ECHO: ::c_int = 8;
+pub const NLM_F_DUMP_INTR: ::c_int = 16;
+pub const NLM_F_DUMP_FILTERED: ::c_int = 32;
+
+pub const NLM_F_ROOT: ::c_int = 0x100;
+pub const NLM_F_MATCH: ::c_int = 0x200;
+pub const NLM_F_ATOMIC: ::c_int = 0x400;
+pub const NLM_F_DUMP: ::c_int = NLM_F_ROOT | NLM_F_MATCH;
+
+pub const NLM_F_REPLACE: ::c_int = 0x100;
+pub const NLM_F_EXCL: ::c_int = 0x200;
+pub const NLM_F_CREATE: ::c_int = 0x400;
+pub const NLM_F_APPEND: ::c_int = 0x800;
+
+pub const NLMSG_NOOP: ::c_int = 0x1;
+pub const NLMSG_ERROR: ::c_int = 0x2;
+pub const NLMSG_DONE: ::c_int = 0x3;
+pub const NLMSG_OVERRUN: ::c_int = 0x4;
+pub const NLMSG_MIN_TYPE: ::c_int = 0x10;
+
+pub const NETLINK_ADD_MEMBERSHIP: ::c_int = 1;
+pub const NETLINK_DROP_MEMBERSHIP: ::c_int = 2;
+pub const NETLINK_PKTINFO: ::c_int = 3;
+pub const NETLINK_BROADCAST_ERROR: ::c_int = 4;
+pub const NETLINK_NO_ENOBUFS: ::c_int = 5;
+pub const NETLINK_RX_RING: ::c_int = 6;
+pub const NETLINK_TX_RING: ::c_int = 7;
+pub const NETLINK_LISTEN_ALL_NSID: ::c_int = 8;
+pub const NETLINK_LIST_MEMBERSHIPS: ::c_int = 9;
+pub const NETLINK_CAP_ACK: ::c_int = 10;
+
+pub const NLA_F_NESTED: ::c_int = 1 << 15;
+pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14;
+pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER);
+
+pub const TIOCM_LE: ::c_int = 0x001;
+pub const TIOCM_DTR: ::c_int = 0x002;
+pub const TIOCM_RTS: ::c_int = 0x004;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+pub const TIOCM_CD: ::c_int = TIOCM_CAR;
+pub const TIOCM_RI: ::c_int = TIOCM_RNG;
+
+cfg_if! {
+    if #[cfg(any(target_arch = "arm", target_arch = "x86",
+                 target_arch = "x86_64"))] {
+        pub const PTHREAD_STACK_MIN: ::size_t = 16384;
+    } else if #[cfg(target_arch = "sparc64")] {
+        pub const PTHREAD_STACK_MIN: ::size_t = 0x6000;
+    } else {
+        pub const PTHREAD_STACK_MIN: ::size_t = 131072;
+    }
+}
+
+extern {
+    pub fn utmpxname(file: *const ::c_char) -> ::c_int;
+    pub fn getutxent() -> *mut utmpx;
+    pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
+    pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
+    pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
+    pub fn setutxent();
+    pub fn endutxent();
+    pub fn getpt() -> ::c_int;
+}
+
+#[link(name = "util")]
+extern {
+    pub fn sysctl(name: *mut ::c_int,
+                  namelen: ::c_int,
+                  oldp: *mut ::c_void,
+                  oldlenp: *mut ::size_t,
+                  newp: *mut ::c_void,
+                  newlen: ::size_t)
+                  -> ::c_int;
+    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
+    pub fn backtrace(buf: *mut *mut ::c_void,
+                     sz: ::c_int) -> ::c_int;
+    pub fn glob64(pattern: *const ::c_char,
+                  flags: ::c_int,
+                  errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
+                                                   errno: ::c_int)
+                                                   -> ::c_int>,
+                  pglob: *mut glob64_t) -> ::c_int;
+    pub fn globfree64(pglob: *mut glob64_t);
+    pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
+    pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
+                                       cpusetsize: ::size_t,
+                                       cpuset: *mut ::cpu_set_t) -> ::c_int;
+    pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
+                                       cpusetsize: ::size_t,
+                                       cpuset: *const ::cpu_set_t) -> ::c_int;
+    pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
+    pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
+                                       prio: ::c_int) -> ::c_int;
+    pub fn pthread_getaffinity_np(thread: ::pthread_t,
+                                  cpusetsize: ::size_t,
+                                  cpuset: *mut ::cpu_set_t) -> ::c_int;
+    pub fn pthread_setaffinity_np(thread: ::pthread_t,
+                                  cpusetsize: ::size_t,
+                                  cpuset: *const ::cpu_set_t) -> ::c_int;
+    pub fn pthread_rwlockattr_getkind_np(attr: *const ::pthread_rwlockattr_t,
+                                         val: *mut ::c_int) -> ::c_int;
+    pub fn pthread_rwlockattr_setkind_np(attr: *mut ::pthread_rwlockattr_t,
+                                         val: ::c_int) -> ::c_int;
+    pub fn sched_getcpu() -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(any(target_arch = "x86",
+                 target_arch = "arm",
+                 target_arch = "powerpc"))] {
+        mod b32;
+        pub use self::b32::*;
+    } else if #[cfg(any(target_arch = "x86_64",
+                        target_arch = "aarch64",
+                        target_arch = "powerpc64",
+                        target_arch = "sparc64"))] {
+        mod b64;
+        pub use self::b64::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/linux/s390x.rs
@@ -0,0 +1,957 @@
+pub type blkcnt_t = i64;
+pub type blksize_t = i64;
+pub type c_char = u8;
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type fsblkcnt_t = u64;
+pub type fsfilcnt_t = u64;
+pub type ino_t = u64;
+pub type nlink_t = u64;
+pub type off_t = i64;
+pub type rlim_t = u64;
+pub type suseconds_t = i64;
+pub type time_t = i64;
+pub type wchar_t = i32;
+pub type greg_t = u64;
+pub type clock_t = i64;
+pub type __fsword_t = ::c_long;
+pub type __priority_which_t = ::c_uint;
+pub type __u64 = u64;
+
+s! {
+    pub struct aiocb {
+        pub aio_fildes: ::c_int,
+        pub aio_lio_opcode: ::c_int,
+        pub aio_reqprio: ::c_int,
+        pub aio_buf: *mut ::c_void,
+        pub aio_nbytes: ::size_t,
+        pub aio_sigevent: ::sigevent,
+        __next_prio: *mut aiocb,
+        __abs_prio: ::c_int,
+        __policy: ::c_int,
+        __error_code: ::c_int,
+        __return_value: ::ssize_t,
+        pub aio_offset: off_t,
+        #[cfg(target_pointer_width = "32")]
+        __unused1: [::c_char; 4],
+        __glibc_reserved: [::c_char; 32]
+    }
+
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_nlink: ::nlink_t,
+        pub st_mode: ::mode_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        st_pad0: ::c_int,
+        pub st_rdev: ::dev_t,
+        pub st_size: ::off_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        __glibc_reserved: [::c_long; 3],
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino64_t,
+        pub st_nlink: ::nlink_t,
+        pub st_mode: ::mode_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        st_pad0: ::c_int,
+        pub st_rdev: ::dev_t,
+        pub st_size: ::off_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt64_t,
+        __glibc_reserved: [::c_long; 3],
+    }
+
+    pub struct pthread_attr_t {
+        __size: [::c_ulong; 7]
+    }
+
+    pub struct sigaction {
+        pub sa_sigaction: ::sighandler_t,
+        __glibc_reserved0: ::c_int,
+        pub sa_flags: ::c_int,
+        pub sa_restorer: ::dox::Option<extern fn()>,
+        pub sa_mask: sigset_t,
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_flags: ::c_int,
+        pub ss_size: ::size_t,
+    }
+
+    pub struct sigset_t {
+        __size: [::c_ulong; 16],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_errno: ::c_int,
+        pub si_code: ::c_int,
+        _pad: ::c_int,
+        _pad2: [::c_long; 14],
+    }
+
+    pub struct ipc_perm {
+        pub __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::mode_t,
+        pub __seq: ::c_ushort,
+        __pad1: ::c_ushort,
+        __unused1: ::c_ulong,
+        __unused2: ::c_ulong
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __unused4: ::c_ulong,
+        __unused5: ::c_ulong
+    }
+
+    pub struct statfs {
+        pub f_type: ::c_uint,
+        pub f_bsize: ::c_uint,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_uint,
+        pub f_frsize: ::c_uint,
+        pub f_flags: ::c_uint,
+        f_spare: [::c_uint; 4],
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::size_t,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::size_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::size_t,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_line: ::cc_t,
+        pub c_cc: [::cc_t; ::NCCS],
+        pub c_ispeed: ::speed_t,
+        pub c_ospeed: ::speed_t,
+    }
+
+    pub struct sysinfo {
+        pub uptime: ::c_long,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
+        pub procs: ::c_ushort,
+        pub pad: ::c_ushort,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
+        pub mem_unit: ::c_uint,
+        pub _f: [::c_char; 0],
+    }
+
+    pub struct glob64_t {
+        pub gl_pathc: ::size_t,
+        pub gl_pathv: *mut *mut ::c_char,
+        pub gl_offs: ::size_t,
+        pub gl_flags: ::c_int,
+
+        __unused1: *mut ::c_void,
+        __unused2: *mut ::c_void,
+        __unused3: *mut ::c_void,
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+    }
+
+    pub struct ucred {
+        pub pid: ::pid_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+    }
+
+    pub struct flock {
+        pub l_type: ::c_short,
+        pub l_whence: ::c_short,
+        pub l_start: ::off_t,
+        pub l_len: ::off_t,
+        pub l_pid: ::pid_t,
+    }
+
+    // FIXME this is actually a union
+    pub struct sem_t {
+        __size: [::c_char; 32],
+        __align: [::c_long; 0],
+    }
+
+    pub struct __psw_t {
+        pub mask: u64,
+        pub addr: u64,
+    }
+
+    // FIXME: This is actually a union.
+    pub struct fpreg_t {
+        pub d: ::c_double,
+        // f: ::c_float,
+    }
+
+    pub struct fpregset_t {
+        pub fpc: u32,
+        __pad: u32,
+        pub fprs: [fpreg_t; 16],
+    }
+
+    pub struct mcontext_t {
+        pub psw: __psw_t,
+        pub gregs: [u64; 16],
+        pub aregs: [u32; 16],
+        pub fpregs: fpregset_t,
+    }
+
+    pub struct ucontext_t {
+        pub uc_flags: ::c_ulong,
+        pub uc_link: *mut ucontext_t,
+        pub uc_stack: ::stack_t,
+        pub uc_mcontext: mcontext_t,
+        pub uc_sigmask: ::sigset_t,
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        pub msg_stime: ::time_t,
+        pub msg_rtime: ::time_t,
+        pub msg_ctime: ::time_t,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __glibc_reserved4: ::c_ulong,
+        __glibc_reserved5: ::c_ulong,
+    }
+
+    pub struct statfs64 {
+        pub f_type: ::c_uint,
+        pub f_bsize: ::c_uint,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: ::c_uint,
+        pub f_frsize: ::c_uint,
+        pub f_flags: ::c_uint,
+        pub f_spare: [::c_uint; 4],
+    }
+
+    pub struct statvfs64 {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: u64,
+        pub f_bfree: u64,
+        pub f_bavail: u64,
+        pub f_files: u64,
+        pub f_ffree: u64,
+        pub f_favail: u64,
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+}
+
+pub const SFD_CLOEXEC: ::c_int = 0x080000;
+
+pub const NCCS: usize = 32;
+
+pub const O_TRUNC: ::c_int = 512;
+pub const O_LARGEFILE: ::c_int = 0o0100000;
+pub const O_NOATIME: ::c_int = 0o1000000;
+pub const O_CLOEXEC: ::c_int = 0x80000;
+pub const O_PATH: ::c_int = 0o10000000;
+
+pub const EBFONT: ::c_int = 59;
+pub const ENOSTR: ::c_int = 60;
+pub const ENODATA: ::c_int = 61;
+pub const ETIME: ::c_int = 62;
+pub const ENOSR: ::c_int = 63;
+pub const ENONET: ::c_int = 64;
+pub const ENOPKG: ::c_int = 65;
+pub const EREMOTE: ::c_int = 66;
+pub const ENOLINK: ::c_int = 67;
+pub const EADV: ::c_int = 68;
+pub const ESRMNT: ::c_int = 69;
+pub const ECOMM: ::c_int = 70;
+pub const EPROTO: ::c_int = 71;
+pub const EDOTDOT: ::c_int = 73;
+
+pub const SA_NODEFER: ::c_int = 0x40000000;
+pub const SA_RESETHAND: ::c_int = 0x80000000;
+pub const SA_RESTART: ::c_int = 0x10000000;
+pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
+
+pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
+
+pub const EFD_CLOEXEC: ::c_int = 0x80000;
+
+pub const POSIX_FADV_DONTNEED: ::c_int = 6;
+pub const POSIX_FADV_NOREUSE: ::c_int = 7;
+
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
+pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
+
+pub const EADDRINUSE: ::c_int = 98;
+pub const EADDRNOTAVAIL: ::c_int = 99;
+pub const ECONNABORTED: ::c_int = 103;
+pub const ECONNREFUSED: ::c_int = 111;
+pub const ECONNRESET: ::c_int = 104;
+pub const EDEADLK: ::c_int = 35;
+pub const ENOSYS: ::c_int = 38;
+pub const ENOTCONN: ::c_int = 107;
+pub const ETIMEDOUT: ::c_int = 110;
+pub const FIOCLEX: ::c_ulong = 0x5451;
+pub const FIONBIO: ::c_ulong = 0x5421;
+pub const MAP_ANON: ::c_int = 0x20;
+pub const O_ACCMODE: ::c_int = 3;
+pub const O_APPEND: ::c_int = 1024;
+pub const O_CREAT: ::c_int = 64;
+pub const O_EXCL: ::c_int = 128;
+pub const O_NONBLOCK: ::c_int = 2048;
+pub const PTHREAD_STACK_MIN: ::size_t = 16384;
+pub const RLIM_INFINITY: ::rlim_t = 0xffffffffffffffff;
+pub const SA_NOCLDWAIT: ::c_int = 2;
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 4;
+pub const SIGBUS: ::c_int = 7;
+pub const SIGSTKSZ: ::size_t = 0x2000;
+pub const MINSIGSTKSZ: ::size_t = 2048;
+pub const SIG_SETMASK: ::c_int = 2;
+pub const SOCK_DGRAM: ::c_int = 2;
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOL_SOCKET: ::c_int = 1;
+pub const SO_BROADCAST: ::c_int = 6;
+pub const SO_ERROR: ::c_int = 4;
+pub const SO_RCVTIMEO: ::c_int = 20;
+pub const SO_REUSEADDR: ::c_int = 2;
+pub const SO_SNDTIMEO: ::c_int = 21;
+pub const SO_BINDTODEVICE: ::c_int = 25;
+pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SO_MARK: ::c_int = 36;
+pub const SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
+pub const SO_RXQ_OVFL: ::c_int = 40;
+pub const SO_PEEK_OFF: ::c_int = 42;
+pub const SO_BUSY_POLL: ::c_int = 46;
+
+pub const RLIMIT_RSS: ::c_int = 5;
+pub const RLIMIT_NOFILE: ::c_int = 7;
+pub const RLIMIT_AS: ::c_int = 9;
+pub const RLIMIT_NPROC: ::c_int = 6;
+pub const RLIMIT_MEMLOCK: ::c_int = 8;
+pub const RLIMIT_RTTIME: ::c_int = 15;
+pub const RLIMIT_NLIMITS: ::c_int = 16;
+
+pub const O_NOCTTY: ::c_int = 256;
+pub const O_SYNC: ::c_int = 1052672;
+pub const O_RSYNC: ::c_int = 1052672;
+pub const O_DSYNC: ::c_int = 4096;
+pub const O_FSYNC: ::c_int = 0x101000;
+pub const O_DIRECT: ::c_int = 0x4000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+
+pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
+
+pub const LC_PAPER: ::c_int = 7;
+pub const LC_NAME: ::c_int = 8;
+pub const LC_ADDRESS: ::c_int = 9;
+pub const LC_TELEPHONE: ::c_int = 10;
+pub const LC_MEASUREMENT: ::c_int = 11;
+pub const LC_IDENTIFICATION: ::c_int = 12;
+pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
+pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
+pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
+pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
+pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
+pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
+pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
+                               | ::LC_NUMERIC_MASK
+                               | ::LC_TIME_MASK
+                               | ::LC_COLLATE_MASK
+                               | ::LC_MONETARY_MASK
+                               | ::LC_MESSAGES_MASK
+                               | LC_PAPER_MASK
+                               | LC_NAME_MASK
+                               | LC_ADDRESS_MASK
+                               | LC_TELEPHONE_MASK
+                               | LC_MEASUREMENT_MASK
+                               | LC_IDENTIFICATION_MASK;
+
+pub const MAP_ANONYMOUS: ::c_int = 0x0020;
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+pub const MAP_DENYWRITE: ::c_int = 0x0800;
+pub const MAP_EXECUTABLE: ::c_int = 0x01000;
+pub const MAP_LOCKED: ::c_int = 0x02000;
+pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_POPULATE: ::c_int = 0x08000;
+pub const MAP_NONBLOCK: ::c_int = 0x010000;
+pub const MAP_STACK: ::c_int = 0x020000;
+
+pub const EDEADLOCK: ::c_int = 35;
+pub const ENAMETOOLONG: ::c_int = 36;
+pub const ENOLCK: ::c_int = 37;
+pub const ENOTEMPTY: ::c_int = 39;
+pub const ELOOP: ::c_int = 40;
+pub const ENOMSG: ::c_int = 42;
+pub const EIDRM: ::c_int = 43;
+pub const ECHRNG: ::c_int = 44;
+pub const EL2NSYNC: ::c_int = 45;
+pub const EL3HLT: ::c_int = 46;
+pub const EL3RST: ::c_int = 47;
+pub const ELNRNG: ::c_int = 48;
+pub const EUNATCH: ::c_int = 49;
+pub const ENOCSI: ::c_int = 50;
+pub const EL2HLT: ::c_int = 51;
+pub const EBADE: ::c_int = 52;
+pub const EBADR: ::c_int = 53;
+pub const EXFULL: ::c_int = 54;
+pub const ENOANO: ::c_int = 55;
+pub const EBADRQC: ::c_int = 56;
+pub const EBADSLT: ::c_int = 57;
+pub const EMULTIHOP: ::c_int = 72;
+pub const EOVERFLOW: ::c_int = 75;
+pub const ENOTUNIQ: ::c_int = 76;
+pub const EBADFD: ::c_int = 77;
+pub const EBADMSG: ::c_int = 74;
+pub const EREMCHG: ::c_int = 78;
+pub const ELIBACC: ::c_int = 79;
+pub const ELIBBAD: ::c_int = 80;
+pub const ELIBSCN: ::c_int = 81;
+pub const ELIBMAX: ::c_int = 82;
+pub const ELIBEXEC: ::c_int = 83;
+pub const EILSEQ: ::c_int = 84;
+pub const ERESTART: ::c_int = 85;
+pub const ESTRPIPE: ::c_int = 86;
+pub const EUSERS: ::c_int = 87;
+pub const ENOTSOCK: ::c_int = 88;
+pub const EDESTADDRREQ: ::c_int = 89;
+pub const EMSGSIZE: ::c_int = 90;
+pub const EPROTOTYPE: ::c_int = 91;
+pub const ENOPROTOOPT: ::c_int = 92;
+pub const EPROTONOSUPPORT: ::c_int = 93;
+pub const ESOCKTNOSUPPORT: ::c_int = 94;
+pub const EOPNOTSUPP: ::c_int = 95;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 96;
+pub const EAFNOSUPPORT: ::c_int = 97;
+pub const ENETDOWN: ::c_int = 100;
+pub const ENETUNREACH: ::c_int = 101;
+pub const ENETRESET: ::c_int = 102;
+pub const ENOBUFS: ::c_int = 105;
+pub const EISCONN: ::c_int = 106;
+pub const ESHUTDOWN: ::c_int = 108;
+pub const ETOOMANYREFS: ::c_int = 109;
+pub const EHOSTDOWN: ::c_int = 112;
+pub const EHOSTUNREACH: ::c_int = 113;
+pub const EALREADY: ::c_int = 114;
+pub const EINPROGRESS: ::c_int = 115;
+pub const ESTALE: ::c_int = 116;
+pub const EUCLEAN: ::c_int = 117;
+pub const ENOTNAM: ::c_int = 118;
+pub const ENAVAIL: ::c_int = 119;
+pub const EISNAM: ::c_int = 120;
+pub const EREMOTEIO: ::c_int = 121;
+pub const EDQUOT: ::c_int = 122;
+pub const ENOMEDIUM: ::c_int = 123;
+pub const EMEDIUMTYPE: ::c_int = 124;
+pub const ECANCELED: ::c_int = 125;
+pub const ENOKEY: ::c_int = 126;
+pub const EKEYEXPIRED: ::c_int = 127;
+pub const EKEYREVOKED: ::c_int = 128;
+pub const EKEYREJECTED: ::c_int = 129;
+pub const EOWNERDEAD: ::c_int = 130;
+pub const ENOTRECOVERABLE: ::c_int = 131;
+pub const EHWPOISON: ::c_int = 133;
+pub const ERFKILL: ::c_int = 132;
+
+pub const SOCK_SEQPACKET: ::c_int = 5;
+
+pub const SO_TYPE: ::c_int = 3;
+pub const SO_DONTROUTE: ::c_int = 5;
+pub const SO_SNDBUF: ::c_int = 7;
+pub const SO_RCVBUF: ::c_int = 8;
+pub const SO_KEEPALIVE: ::c_int = 9;
+pub const SO_OOBINLINE: ::c_int = 10;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_LINGER: ::c_int = 13;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_REUSEPORT: ::c_int = 15;
+pub const SO_PASSCRED: ::c_int = 16;
+pub const SO_PEERCRED: ::c_int = 17;
+pub const SO_RCVLOWAT: ::c_int = 18;
+pub const SO_SNDLOWAT: ::c_int = 19;
+pub const SO_ACCEPTCONN: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 32;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+
+pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
+pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
+pub const TCP_THIN_DUPACK: ::c_int = 17;
+pub const TCP_USER_TIMEOUT: ::c_int = 18;
+pub const TCP_REPAIR: ::c_int = 19;
+pub const TCP_REPAIR_QUEUE: ::c_int = 20;
+pub const TCP_QUEUE_SEQ: ::c_int = 21;
+pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
+pub const TCP_FASTOPEN: ::c_int = 23;
+pub const TCP_TIMESTAMP: ::c_int = 24;
+
+pub const SIGCHLD: ::c_int = 17;
+pub const SIGUSR1: ::c_int = 10;
+pub const SIGUSR2: ::c_int = 12;
+pub const SIGCONT: ::c_int = 18;
+pub const SIGSTOP: ::c_int = 19;
+pub const SIGTSTP: ::c_int = 20;
+pub const SIGURG: ::c_int = 23;
+pub const SIGIO: ::c_int = 29;
+pub const SIGSYS: ::c_int = 31;
+pub const SIGSTKFLT: ::c_int = 16;
+pub const SIGUNUSED: ::c_int = 31;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
+pub const SIGPOLL: ::c_int = 29;
+pub const SIGPWR: ::c_int = 30;
+pub const SIG_BLOCK: ::c_int = 0x000000;
+pub const SIG_UNBLOCK: ::c_int = 0x01;
+
+pub const BUFSIZ: ::c_uint = 8192;
+pub const TMP_MAX: ::c_uint = 238328;
+pub const FOPEN_MAX: ::c_uint = 16;
+pub const POSIX_MADV_DONTNEED: ::c_int = 4;
+pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
+pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
+pub const _SC_PII: ::c_int = 53;
+pub const _SC_PII_XTI: ::c_int = 54;
+pub const _SC_PII_SOCKET: ::c_int = 55;
+pub const _SC_PII_INTERNET: ::c_int = 56;
+pub const _SC_PII_OSI: ::c_int = 57;
+pub const _SC_POLL: ::c_int = 58;
+pub const _SC_SELECT: ::c_int = 59;
+pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
+pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
+pub const _SC_PII_OSI_COTS: ::c_int = 63;
+pub const _SC_PII_OSI_CLTS: ::c_int = 64;
+pub const _SC_PII_OSI_M: ::c_int = 65;
+pub const _SC_T_IOV_MAX: ::c_int = 66;
+pub const _SC_2_C_VERSION: ::c_int = 96;
+pub const _SC_CHAR_BIT: ::c_int = 101;
+pub const _SC_CHAR_MAX: ::c_int = 102;
+pub const _SC_CHAR_MIN: ::c_int = 103;
+pub const _SC_INT_MAX: ::c_int = 104;
+pub const _SC_INT_MIN: ::c_int = 105;
+pub const _SC_LONG_BIT: ::c_int = 106;
+pub const _SC_WORD_BIT: ::c_int = 107;
+pub const _SC_MB_LEN_MAX: ::c_int = 108;
+pub const _SC_SSIZE_MAX: ::c_int = 110;
+pub const _SC_SCHAR_MAX: ::c_int = 111;
+pub const _SC_SCHAR_MIN: ::c_int = 112;
+pub const _SC_SHRT_MAX: ::c_int = 113;
+pub const _SC_SHRT_MIN: ::c_int = 114;
+pub const _SC_UCHAR_MAX: ::c_int = 115;
+pub const _SC_UINT_MAX: ::c_int = 116;
+pub const _SC_ULONG_MAX: ::c_int = 117;
+pub const _SC_USHRT_MAX: ::c_int = 118;
+pub const _SC_NL_ARGMAX: ::c_int = 119;
+pub const _SC_NL_LANGMAX: ::c_int = 120;
+pub const _SC_NL_MSGMAX: ::c_int = 121;
+pub const _SC_NL_NMAX: ::c_int = 122;
+pub const _SC_NL_SETMAX: ::c_int = 123;
+pub const _SC_NL_TEXTMAX: ::c_int = 124;
+pub const _SC_BASE: ::c_int = 134;
+pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
+pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
+pub const _SC_DEVICE_IO: ::c_int = 140;
+pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
+pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
+pub const _SC_FD_MGMT: ::c_int = 143;
+pub const _SC_FIFO: ::c_int = 144;
+pub const _SC_PIPE: ::c_int = 145;
+pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
+pub const _SC_FILE_LOCKING: ::c_int = 147;
+pub const _SC_FILE_SYSTEM: ::c_int = 148;
+pub const _SC_MULTI_PROCESS: ::c_int = 150;
+pub const _SC_SINGLE_PROCESS: ::c_int = 151;
+pub const _SC_NETWORKING: ::c_int = 152;
+pub const _SC_REGEX_VERSION: ::c_int = 156;
+pub const _SC_SIGNALS: ::c_int = 158;
+pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
+pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
+pub const _SC_USER_GROUPS: ::c_int = 166;
+pub const _SC_USER_GROUPS_R: ::c_int = 167;
+pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
+pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
+pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
+pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
+pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
+pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
+pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
+pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
+pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
+pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
+pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
+pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
+pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
+pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
+pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
+pub const O_ASYNC: ::c_int = 0x2000;
+pub const O_NDELAY: ::c_int = 0x800;
+pub const ST_RELATIME: ::c_ulong = 4096;
+pub const NI_MAXHOST: ::socklen_t = 1025;
+
+pub const ADFS_SUPER_MAGIC: ::c_int = 0x0000adf5;
+pub const AFFS_SUPER_MAGIC: ::c_int = 0x0000adff;
+pub const CODA_SUPER_MAGIC: ::c_int = 0x73757245;
+pub const CRAMFS_MAGIC: ::c_int = 0x28cd3d45;
+pub const EFS_SUPER_MAGIC: ::c_int = 0x00414a53;
+pub const EXT2_SUPER_MAGIC: ::c_int = 0x0000ef53;
+pub const EXT3_SUPER_MAGIC: ::c_int = 0x0000ef53;
+pub const EXT4_SUPER_MAGIC: ::c_int = 0x0000ef53;
+pub const HPFS_SUPER_MAGIC: ::c_int = 0xf995e849;
+pub const HUGETLBFS_MAGIC: ::c_int = 0x958458f6;
+pub const ISOFS_SUPER_MAGIC: ::c_int = 0x00009660;
+pub const JFFS2_SUPER_MAGIC: ::c_int = 0x000072b6;
+pub const MINIX_SUPER_MAGIC: ::c_int = 0x0000137f;
+pub const MINIX_SUPER_MAGIC2: ::c_int = 0x0000138f;
+pub const MINIX2_SUPER_MAGIC: ::c_int = 0x00002468;
+pub const MINIX2_SUPER_MAGIC2: ::c_int = 0x00002478;
+pub const MSDOS_SUPER_MAGIC: ::c_int = 0x00004d44;
+pub const NCP_SUPER_MAGIC: ::c_int = 0x0000564c;
+pub const NFS_SUPER_MAGIC: ::c_int = 0x00006969;
+pub const OPENPROM_SUPER_MAGIC: ::c_int = 0x00009fa1;
+pub const PROC_SUPER_MAGIC: ::c_int = 0x00009fa0;
+pub const QNX4_SUPER_MAGIC: ::c_int = 0x0000002f;
+pub const REISERFS_SUPER_MAGIC: ::c_int = 0x52654973;
+pub const SMB_SUPER_MAGIC: ::c_int = 0x0000517b;
+pub const TMPFS_MAGIC: ::c_int = 0x01021994;
+pub const USBDEVICE_SUPER_MAGIC: ::c_int = 0x00009fa2;
+
+pub const VEOF: usize = 4;
+pub const VEOL: usize = 11;
+pub const VEOL2: usize = 16;
+pub const VMIN: usize = 6;
+pub const IEXTEN: ::tcflag_t = 0x00008000;
+pub const TOSTOP: ::tcflag_t = 0x00000100;
+pub const FLUSHO: ::tcflag_t = 0x00001000;
+
+pub const CPU_SETSIZE: ::c_int = 0x400;
+
+pub const EXTPROC: ::tcflag_t = 0x00010000;
+
+pub const QFMT_VFS_V1: ::c_int = 4;
+
+pub const PTRACE_TRACEME: ::c_uint = 0;
+pub const PTRACE_PEEKTEXT: ::c_uint = 1;
+pub const PTRACE_PEEKDATA: ::c_uint = 2;
+pub const PTRACE_PEEKUSER: ::c_uint = 3;
+pub const PTRACE_POKETEXT: ::c_uint = 4;
+pub const PTRACE_POKEDATA: ::c_uint = 5;
+pub const PTRACE_POKEUSER: ::c_uint = 6;
+pub const PTRACE_CONT: ::c_uint = 7;
+pub const PTRACE_KILL: ::c_uint = 8;
+pub const PTRACE_SINGLESTEP: ::c_uint = 9;
+pub const PTRACE_GETREGS: ::c_uint = 12;
+pub const PTRACE_SETREGS: ::c_uint = 13;
+pub const PTRACE_GETFPREGS: ::c_uint = 14;
+pub const PTRACE_SETFPREGS: ::c_uint = 15;
+pub const PTRACE_ATTACH: ::c_uint = 16;
+pub const PTRACE_DETACH: ::c_uint = 17;
+pub const PTRACE_SYSCALL: ::c_uint = 24;
+pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
+pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
+pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
+pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
+pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
+pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
+pub const PTRACE_SEIZE: ::c_uint = 0x4206;
+pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
+pub const PTRACE_LISTEN: ::c_uint = 0x4208;
+pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
+
+pub const EPOLLWAKEUP: ::c_int = 0x20000000;
+
+pub const MAP_HUGETLB: ::c_int = 0x040000;
+
+pub const EFD_NONBLOCK: ::c_int = 0x800;
+
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETOWN: ::c_int = 8;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+
+pub const SEEK_DATA: ::c_int = 3;
+pub const SEEK_HOLE: ::c_int = 4;
+
+pub const SFD_NONBLOCK: ::c_int = 0x0800;
+
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
+
+pub const TCGETS: ::c_ulong = 0x5401;
+pub const TCSETS: ::c_ulong = 0x5402;
+pub const TCSETSW: ::c_ulong = 0x5403;
+pub const TCSETSF: ::c_ulong = 0x5404;
+pub const TCGETA: ::c_ulong = 0x5405;
+pub const TCSETA: ::c_ulong = 0x5406;
+pub const TCSETAW: ::c_ulong = 0x5407;
+pub const TCSETAF: ::c_ulong = 0x5408;
+pub const TCSBRK: ::c_ulong = 0x5409;
+pub const TCXONC: ::c_ulong = 0x540A;
+pub const TCFLSH: ::c_ulong = 0x540B;
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
+pub const TIOCINQ: ::c_ulong = 0x541B;
+pub const TIOCLINUX: ::c_ulong = 0x541C;
+pub const TIOCGSERIAL: ::c_ulong = 0x541E;
+pub const TIOCEXCL: ::c_ulong = 0x540C;
+pub const TIOCNXCL: ::c_ulong = 0x540D;
+pub const TIOCSCTTY: ::c_ulong = 0x540E;
+pub const TIOCGPGRP: ::c_ulong = 0x540F;
+pub const TIOCSPGRP: ::c_ulong = 0x5410;
+pub const TIOCOUTQ: ::c_ulong = 0x5411;
+pub const TIOCSTI: ::c_ulong = 0x5412;
+pub const TIOCGWINSZ: ::c_ulong = 0x5413;
+pub const TIOCSWINSZ: ::c_ulong = 0x5414;
+pub const TIOCMGET: ::c_ulong = 0x5415;
+pub const TIOCMBIS: ::c_ulong = 0x5416;
+pub const TIOCMBIC: ::c_ulong = 0x5417;
+pub const TIOCMSET: ::c_ulong = 0x5418;
+pub const FIONREAD: ::c_ulong = 0x541B;
+pub const TIOCCONS: ::c_ulong = 0x541D;
+
+pub const RTLD_DEEPBIND: ::c_int = 0x8;
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
+
+pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
+pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
+pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
+pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
+pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
+
+pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
+pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
+pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
+pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
+pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
+pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
+pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
+pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
+
+pub const SYS_pivot_root: ::c_long = 217;
+pub const SYS_gettid: ::c_long = 236;
+pub const SYS_perf_event_open: ::c_long = 331;
+pub const SYS_memfd_create: ::c_long = 350;
+
+pub const VTIME: usize = 5;
+pub const VSWTC: usize = 7;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VSUSP: usize = 10;
+pub const VREPRINT: usize = 12;
+pub const VDISCARD: usize = 13;
+pub const VWERASE: usize = 14;
+pub const OLCUC: ::tcflag_t = 0o000002;
+pub const ONLCR: ::tcflag_t = 0o000004;
+pub const NLDLY: ::tcflag_t = 0o000400;
+pub const CRDLY: ::tcflag_t = 0o003000;
+pub const CR1: ::tcflag_t  = 0x00000200;
+pub const CR2: ::tcflag_t  = 0x00000400;
+pub const CR3: ::tcflag_t  = 0x00000600;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const TAB1: ::tcflag_t = 0x00000800;
+pub const TAB2: ::tcflag_t = 0x00001000;
+pub const TAB3: ::tcflag_t = 0x00001800;
+pub const BSDLY:  ::tcflag_t = 0o020000;
+pub const BS1: ::tcflag_t  = 0x00002000;
+pub const FFDLY:  ::tcflag_t = 0o100000;
+pub const FF1: ::tcflag_t  = 0x00008000;
+pub const VTDLY:  ::tcflag_t = 0o040000;
+pub const VT1: ::tcflag_t  = 0x00004000;
+pub const XTABS:  ::tcflag_t = 0o014000;
+
+pub const TIOCM_LE: ::c_int = 0x001;
+pub const TIOCM_DTR: ::c_int = 0x002;
+pub const TIOCM_RTS: ::c_int = 0x004;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+pub const TIOCM_CD: ::c_int = TIOCM_CAR;
+pub const TIOCM_RI: ::c_int = TIOCM_RNG;
+
+pub const SIGEV_THREAD_ID: ::c_int = 4;
+
+pub const CBAUD: ::speed_t = 0o010017;
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const CSIZE: ::tcflag_t = 0o000060;
+pub const CS6: ::tcflag_t = 0o000020;
+pub const CS7: ::tcflag_t = 0o000040;
+pub const CS8: ::tcflag_t = 0o000060;
+pub const CSTOPB: ::tcflag_t = 0o000100;
+pub const CREAD: ::tcflag_t = 0o000200;
+pub const PARENB: ::tcflag_t = 0o000400;
+pub const PARODD: ::tcflag_t = 0o001000;
+pub const HUPCL: ::tcflag_t = 0o002000;
+pub const CLOCAL: ::tcflag_t = 0o004000;
+pub const CBAUDEX: ::tcflag_t = 0o010000;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+pub const CIBAUD: ::tcflag_t = 0o02003600000;
+
+pub const ISIG: ::tcflag_t = 0o000001;
+pub const ICANON: ::tcflag_t = 0o000002;
+pub const XCASE: ::tcflag_t = 0o000004;
+pub const ECHOE: ::tcflag_t = 0o000020;
+pub const ECHOK: ::tcflag_t = 0o000040;
+pub const ECHONL: ::tcflag_t = 0o000100;
+pub const NOFLSH: ::tcflag_t = 0o000200;
+pub const ECHOCTL: ::tcflag_t = 0o001000;
+pub const ECHOPRT: ::tcflag_t = 0o002000;
+pub const ECHOKE: ::tcflag_t = 0o004000;
+pub const PENDIN: ::tcflag_t = 0o040000;
+
+pub const POLLWRNORM: ::c_short = 0x004;
+pub const POLLWRBAND: ::c_short = 0x100;
+
+pub const IXON: ::tcflag_t = 0o002000;
+pub const IXOFF: ::tcflag_t = 0o010000;
+
+#[link(name = "util")]
+extern {
+    pub fn sysctl(name: *mut ::c_int,
+                  namelen: ::c_int,
+                  oldp: *mut ::c_void,
+                  oldlenp: *mut ::size_t,
+                  newp: *mut ::c_void,
+                  newlen: ::size_t)
+                  -> ::c_int;
+    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
+    pub fn backtrace(buf: *mut *mut ::c_void,
+                     sz: ::c_int) -> ::c_int;
+    pub fn glob64(pattern: *const ::c_char,
+                  flags: ::c_int,
+                  errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
+                                                   errno: ::c_int)
+                                                   -> ::c_int>,
+                  pglob: *mut glob64_t) -> ::c_int;
+    pub fn globfree64(pglob: *mut glob64_t);
+    pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
+    pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
+                                       cpusetsize: ::size_t,
+                                       cpuset: *mut ::cpu_set_t) -> ::c_int;
+    pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
+                                       cpusetsize: ::size_t,
+                                       cpuset: *const ::cpu_set_t) -> ::c_int;
+    pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
+    pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
+                                       prio: ::c_int) -> ::c_int;
+    pub fn pthread_getaffinity_np(thread: ::pthread_t,
+                                  cpusetsize: ::size_t,
+                                  cpuset: *mut ::cpu_set_t) -> ::c_int;
+    pub fn pthread_setaffinity_np(thread: ::pthread_t,
+                                  cpusetsize: ::size_t,
+                                  cpuset: *const ::cpu_set_t) -> ::c_int;
+    pub fn sched_getcpu() -> ::c_int;
+    pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
+    pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
+    pub fn makecontext(ucp: *mut ucontext_t,
+                       func:  extern fn (),
+                       argc: ::c_int, ...);
+    pub fn swapcontext(uocp: *mut ucontext_t,
+                       ucp: *const ucontext_t) -> ::c_int;
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/notbsd/mod.rs
@@ -0,0 +1,996 @@
+use dox::mem;
+
+pub type sa_family_t = u16;
+pub type pthread_key_t = ::c_uint;
+pub type speed_t = ::c_uint;
+pub type tcflag_t = ::c_uint;
+pub type clockid_t = ::c_int;
+pub type key_t = ::c_int;
+pub type id_t = ::c_uint;
+
+pub enum timezone {}
+
+s! {
+    pub struct sockaddr {
+        pub sa_family: sa_family_t,
+        pub sa_data: [::c_char; 14],
+    }
+
+    pub struct sockaddr_in {
+        pub sin_family: sa_family_t,
+        pub sin_port: ::in_port_t,
+        pub sin_addr: ::in_addr,
+        pub sin_zero: [u8; 8],
+    }
+
+    pub struct sockaddr_in6 {
+        pub sin6_family: sa_family_t,
+        pub sin6_port: ::in_port_t,
+        pub sin6_flowinfo: u32,
+        pub sin6_addr: ::in6_addr,
+        pub sin6_scope_id: u32,
+    }
+
+    pub struct sockaddr_un {
+        pub sun_family: sa_family_t,
+        pub sun_path: [::c_char; 108]
+    }
+
+    pub struct sockaddr_storage {
+        pub ss_family: sa_family_t,
+        __ss_align: ::size_t,
+        #[cfg(target_pointer_width = "32")]
+        __ss_pad2: [u8; 128 - 2 * 4],
+        #[cfg(target_pointer_width = "64")]
+        __ss_pad2: [u8; 128 - 2 * 8],
+    }
+
+    pub struct addrinfo {
+        pub ai_flags: ::c_int,
+        pub ai_family: ::c_int,
+        pub ai_socktype: ::c_int,
+        pub ai_protocol: ::c_int,
+        pub ai_addrlen: socklen_t,
+
+        #[cfg(any(target_os = "linux",
+                  target_os = "emscripten",
+                  target_os = "fuchsia"))]
+        pub ai_addr: *mut ::sockaddr,
+
+        pub ai_canonname: *mut c_char,
+
+        #[cfg(target_os = "android")]
+        pub ai_addr: *mut ::sockaddr,
+
+        pub ai_next: *mut addrinfo,
+    }
+
+    pub struct sockaddr_nl {
+        pub nl_family: ::sa_family_t,
+        nl_pad: ::c_ushort,
+        pub nl_pid: u32,
+        pub nl_groups: u32
+    }
+
+    pub struct sockaddr_ll {
+        pub sll_family: ::c_ushort,
+        pub sll_protocol: ::c_ushort,
+        pub sll_ifindex: ::c_int,
+        pub sll_hatype: ::c_ushort,
+        pub sll_pkttype: ::c_uchar,
+        pub sll_halen: ::c_uchar,
+        pub sll_addr: [::c_uchar; 8]
+    }
+
+    pub struct fd_set {
+        fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
+    }
+
+    pub struct tm {
+        pub tm_sec: ::c_int,
+        pub tm_min: ::c_int,
+        pub tm_hour: ::c_int,
+        pub tm_mday: ::c_int,
+        pub tm_mon: ::c_int,
+        pub tm_year: ::c_int,
+        pub tm_wday: ::c_int,
+        pub tm_yday: ::c_int,
+        pub tm_isdst: ::c_int,
+        pub tm_gmtoff: ::c_long,
+        pub tm_zone: *const ::c_char,
+    }
+
+    pub struct sched_param {
+        pub sched_priority: ::c_int,
+        #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+        pub sched_ss_low_priority: ::c_int,
+        #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+        pub sched_ss_repl_period: ::timespec,
+        #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+        pub sched_ss_init_budget: ::timespec,
+        #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+        pub sched_ss_max_repl: ::c_int,
+    }
+
+    pub struct Dl_info {
+        pub dli_fname: *const ::c_char,
+        pub dli_fbase: *mut ::c_void,
+        pub dli_sname: *const ::c_char,
+        pub dli_saddr: *mut ::c_void,
+    }
+
+    #[cfg_attr(any(all(target_arch = "x86",
+                       not(target_env = "musl"),
+                       not(target_os = "android")),
+                   target_arch = "x86_64"),
+               repr(packed))]
+    pub struct epoll_event {
+        pub events: ::uint32_t,
+        pub u64: ::uint64_t,
+    }
+
+    pub struct utsname {
+        pub sysname: [::c_char; 65],
+        pub nodename: [::c_char; 65],
+        pub release: [::c_char; 65],
+        pub version: [::c_char; 65],
+        pub machine: [::c_char; 65],
+        pub domainname: [::c_char; 65]
+    }
+
+    pub struct lconv {
+        pub decimal_point: *mut ::c_char,
+        pub thousands_sep: *mut ::c_char,
+        pub grouping: *mut ::c_char,
+        pub int_curr_symbol: *mut ::c_char,
+        pub currency_symbol: *mut ::c_char,
+        pub mon_decimal_point: *mut ::c_char,
+        pub mon_thousands_sep: *mut ::c_char,
+        pub mon_grouping: *mut ::c_char,
+        pub positive_sign: *mut ::c_char,
+        pub negative_sign: *mut ::c_char,
+        pub int_frac_digits: ::c_char,
+        pub frac_digits: ::c_char,
+        pub p_cs_precedes: ::c_char,
+        pub p_sep_by_space: ::c_char,
+        pub n_cs_precedes: ::c_char,
+        pub n_sep_by_space: ::c_char,
+        pub p_sign_posn: ::c_char,
+        pub n_sign_posn: ::c_char,
+        pub int_p_cs_precedes: ::c_char,
+        pub int_p_sep_by_space: ::c_char,
+        pub int_n_cs_precedes: ::c_char,
+        pub int_n_sep_by_space: ::c_char,
+        pub int_p_sign_posn: ::c_char,
+        pub int_n_sign_posn: ::c_char,
+    }
+
+    pub struct sigevent {
+        pub sigev_value: ::sigval,
+        pub sigev_signo: ::c_int,
+        pub sigev_notify: ::c_int,
+        // Actually a union.  We only expose sigev_notify_thread_id because it's
+        // the most useful member
+        pub sigev_notify_thread_id: ::c_int,
+        #[cfg(target_pointer_width = "64")]
+        __unused1: [::c_int; 11],
+        #[cfg(target_pointer_width = "32")]
+        __unused1: [::c_int; 12]
+    }
+}
+
+// intentionally not public, only used for fd_set
+cfg_if! {
+    if #[cfg(target_pointer_width = "32")] {
+        const ULONG_SIZE: usize = 32;
+    } else if #[cfg(target_pointer_width = "64")] {
+        const ULONG_SIZE: usize = 64;
+    } else {
+        // Unknown target_pointer_width
+    }
+}
+
+pub const EXIT_FAILURE: ::c_int = 1;
+pub const EXIT_SUCCESS: ::c_int = 0;
+pub const RAND_MAX: ::c_int = 2147483647;
+pub const EOF: ::c_int = -1;
+pub const SEEK_SET: ::c_int = 0;
+pub const SEEK_CUR: ::c_int = 1;
+pub const SEEK_END: ::c_int = 2;
+pub const _IOFBF: ::c_int = 0;
+pub const _IONBF: ::c_int = 2;
+pub const _IOLBF: ::c_int = 1;
+
+pub const F_DUPFD: ::c_int = 0;
+pub const F_GETFD: ::c_int = 1;
+pub const F_SETFD: ::c_int = 2;
+pub const F_GETFL: ::c_int = 3;
+pub const F_SETFL: ::c_int = 4;
+
+// Linux-specific fcntls
+pub const F_SETLEASE: ::c_int = 1024;
+pub const F_GETLEASE: ::c_int = 1025;
+pub const F_NOTIFY: ::c_int = 1026;
+pub const F_CANCELLK: ::c_int = 1029;
+pub const F_DUPFD_CLOEXEC: ::c_int = 1030;
+pub const F_SETPIPE_SZ: ::c_int = 1031;
+pub const F_GETPIPE_SZ: ::c_int = 1032;
+pub const F_ADD_SEALS: ::c_int = 1033;
+pub const F_GET_SEALS: ::c_int = 1034;
+
+pub const F_SEAL_SEAL: ::c_int = 0x0001;
+pub const F_SEAL_SHRINK: ::c_int = 0x0002;
+pub const F_SEAL_GROW: ::c_int = 0x0004;
+pub const F_SEAL_WRITE: ::c_int = 0x0008;
+
+// TODO(#235): Include file sealing fcntls once we have a way to verify them.
+
+pub const SIGTRAP: ::c_int = 5;
+
+pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
+pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
+
+pub const CLOCK_REALTIME: ::clockid_t = 0;
+pub const CLOCK_MONOTONIC: ::clockid_t = 1;
+pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2;
+pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 3;
+pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4;
+pub const CLOCK_REALTIME_COARSE: ::clockid_t = 5;
+pub const CLOCK_MONOTONIC_COARSE: ::clockid_t = 6;
+pub const CLOCK_BOOTTIME: ::clockid_t = 7;
+pub const CLOCK_REALTIME_ALARM: ::clockid_t = 8;
+pub const CLOCK_BOOTTIME_ALARM: ::clockid_t = 9;
+// TODO(#247) Someday our Travis shall have glibc 2.21 (released in Sep
+// 2014.) See also musl/mod.rs
+// pub const CLOCK_SGI_CYCLE: ::clockid_t = 10;
+// pub const CLOCK_TAI: ::clockid_t = 11;
+pub const TIMER_ABSTIME: ::c_int = 1;
+
+pub const RLIMIT_CPU: ::c_int = 0;
+pub const RLIMIT_FSIZE: ::c_int = 1;
+pub const RLIMIT_DATA: ::c_int = 2;
+pub const RLIMIT_STACK: ::c_int = 3;
+pub const RLIMIT_CORE: ::c_int = 4;
+pub const RLIMIT_LOCKS: ::c_int = 10;
+pub const RLIMIT_SIGPENDING: ::c_int = 11;
+pub const RLIMIT_MSGQUEUE: ::c_int = 12;
+pub const RLIMIT_NICE: ::c_int = 13;
+pub const RLIMIT_RTPRIO: ::c_int = 14;
+
+pub const RUSAGE_SELF: ::c_int = 0;
+
+pub const O_RDONLY: ::c_int = 0;
+pub const O_WRONLY: ::c_int = 1;
+pub const O_RDWR: ::c_int = 2;
+
+pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
+
+pub const S_IFIFO: ::mode_t = 4096;
+pub const S_IFCHR: ::mode_t = 8192;
+pub const S_IFBLK: ::mode_t = 24576;
+pub const S_IFDIR: ::mode_t = 16384;
+pub const S_IFREG: ::mode_t = 32768;
+pub const S_IFLNK: ::mode_t = 40960;
+pub const S_IFSOCK: ::mode_t = 49152;
+pub const S_IFMT: ::mode_t = 61440;
+pub const S_IRWXU: ::mode_t = 448;
+pub const S_IXUSR: ::mode_t = 64;
+pub const S_IWUSR: ::mode_t = 128;
+pub const S_IRUSR: ::mode_t = 256;
+pub const S_IRWXG: ::mode_t = 56;
+pub const S_IXGRP: ::mode_t = 8;
+pub const S_IWGRP: ::mode_t = 16;
+pub const S_IRGRP: ::mode_t = 32;
+pub const S_IRWXO: ::mode_t = 7;
+pub const S_IXOTH: ::mode_t = 1;
+pub const S_IWOTH: ::mode_t = 2;
+pub const S_IROTH: ::mode_t = 4;
+pub const F_OK: ::c_int = 0;
+pub const R_OK: ::c_int = 4;
+pub const W_OK: ::c_int = 2;
+pub const X_OK: ::c_int = 1;
+pub const STDIN_FILENO: ::c_int = 0;
+pub const STDOUT_FILENO: ::c_int = 1;
+pub const STDERR_FILENO: ::c_int = 2;
+pub const SIGHUP: ::c_int = 1;
+pub const SIGINT: ::c_int = 2;
+pub const SIGQUIT: ::c_int = 3;
+pub const SIGILL: ::c_int = 4;
+pub const SIGABRT: ::c_int = 6;
+pub const SIGFPE: ::c_int = 8;
+pub const SIGKILL: ::c_int = 9;
+pub const SIGSEGV: ::c_int = 11;
+pub const SIGPIPE: ::c_int = 13;
+pub const SIGALRM: ::c_int = 14;
+pub const SIGTERM: ::c_int = 15;
+
+pub const PROT_NONE: ::c_int = 0;
+pub const PROT_READ: ::c_int = 1;
+pub const PROT_WRITE: ::c_int = 2;
+pub const PROT_EXEC: ::c_int = 4;
+
+pub const LC_CTYPE: ::c_int = 0;
+pub const LC_NUMERIC: ::c_int = 1;
+pub const LC_TIME: ::c_int = 2;
+pub const LC_COLLATE: ::c_int = 3;
+pub const LC_MONETARY: ::c_int = 4;
+pub const LC_MESSAGES: ::c_int = 5;
+pub const LC_ALL: ::c_int = 6;
+pub const LC_CTYPE_MASK: ::c_int = (1 << LC_CTYPE);
+pub const LC_NUMERIC_MASK: ::c_int = (1 << LC_NUMERIC);
+pub const LC_TIME_MASK: ::c_int = (1 << LC_TIME);
+pub const LC_COLLATE_MASK: ::c_int = (1 << LC_COLLATE);
+pub const LC_MONETARY_MASK: ::c_int = (1 << LC_MONETARY);
+pub const LC_MESSAGES_MASK: ::c_int = (1 << LC_MESSAGES);
+// LC_ALL_MASK defined per platform
+
+pub const MAP_FILE: ::c_int = 0x0000;
+pub const MAP_SHARED: ::c_int = 0x0001;
+pub const MAP_PRIVATE: ::c_int = 0x0002;
+pub const MAP_FIXED: ::c_int = 0x0010;
+
+pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
+
+// MS_ flags for msync(2)
+pub const MS_ASYNC: ::c_int = 0x0001;
+pub const MS_INVALIDATE: ::c_int = 0x0002;
+pub const MS_SYNC: ::c_int = 0x0004;
+
+// MS_ flags for mount(2)
+pub const MS_RDONLY: ::c_ulong = 0x01;
+pub const MS_NOSUID: ::c_ulong = 0x02;
+pub const MS_NODEV: ::c_ulong = 0x04;
+pub const MS_NOEXEC: ::c_ulong = 0x08;
+pub const MS_SYNCHRONOUS: ::c_ulong = 0x10;
+pub const MS_REMOUNT: ::c_ulong = 0x20;
+pub const MS_MANDLOCK: ::c_ulong = 0x40;
+pub const MS_DIRSYNC: ::c_ulong = 0x80;
+pub const MS_NOATIME: ::c_ulong = 0x0400;
+pub const MS_NODIRATIME: ::c_ulong = 0x0800;
+pub const MS_BIND: ::c_ulong = 0x1000;
+pub const MS_MOVE: ::c_ulong = 0x2000;
+pub const MS_REC: ::c_ulong = 0x4000;
+pub const MS_SILENT: ::c_ulong = 0x8000;
+pub const MS_POSIXACL: ::c_ulong = 0x010000;
+pub const MS_UNBINDABLE: ::c_ulong = 0x020000;
+pub const MS_PRIVATE: ::c_ulong = 0x040000;
+pub const MS_SLAVE: ::c_ulong = 0x080000;
+pub const MS_SHARED: ::c_ulong = 0x100000;
+pub const MS_RELATIME: ::c_ulong = 0x200000;
+pub const MS_KERNMOUNT: ::c_ulong = 0x400000;
+pub const MS_I_VERSION: ::c_ulong = 0x800000;
+pub const MS_STRICTATIME: ::c_ulong = 0x1000000;
+pub const MS_ACTIVE: ::c_ulong = 0x40000000;
+pub const MS_NOUSER: ::c_ulong = 0x80000000;
+pub const MS_MGC_VAL: ::c_ulong = 0xc0ed0000;
+pub const MS_MGC_MSK: ::c_ulong = 0xffff0000;
+pub const MS_RMT_MASK: ::c_ulong = 0x800051;
+
+pub const EPERM: ::c_int = 1;
+pub const ENOENT: ::c_int = 2;
+pub const ESRCH: ::c_int = 3;
+pub const EINTR: ::c_int = 4;
+pub const EIO: ::c_int = 5;
+pub const ENXIO: ::c_int = 6;
+pub const E2BIG: ::c_int = 7;
+pub const ENOEXEC: ::c_int = 8;
+pub const EBADF: ::c_int = 9;
+pub const ECHILD: ::c_int = 10;
+pub const EAGAIN: ::c_int = 11;
+pub const ENOMEM: ::c_int = 12;
+pub const EACCES: ::c_int = 13;
+pub const EFAULT: ::c_int = 14;
+pub const ENOTBLK: ::c_int = 15;
+pub const EBUSY: ::c_int = 16;
+pub const EEXIST: ::c_int = 17;
+pub const EXDEV: ::c_int = 18;
+pub const ENODEV: ::c_int = 19;
+pub const ENOTDIR: ::c_int = 20;
+pub const EISDIR: ::c_int = 21;
+pub const EINVAL: ::c_int = 22;
+pub const ENFILE: ::c_int = 23;
+pub const EMFILE: ::c_int = 24;
+pub const ENOTTY: ::c_int = 25;
+pub const ETXTBSY: ::c_int = 26;
+pub const EFBIG: ::c_int = 27;
+pub const ENOSPC: ::c_int = 28;
+pub const ESPIPE: ::c_int = 29;
+pub const EROFS: ::c_int = 30;
+pub const EMLINK: ::c_int = 31;
+pub const EPIPE: ::c_int = 32;
+pub const EDOM: ::c_int = 33;
+pub const ERANGE: ::c_int = 34;
+pub const EWOULDBLOCK: ::c_int = EAGAIN;
+
+pub const SCM_RIGHTS: ::c_int = 0x01;
+pub const SCM_CREDENTIALS: ::c_int = 0x02;
+
+pub const IPPROTO_RAW: ::c_int = 255;
+
+pub const PROT_GROWSDOWN: ::c_int = 0x1000000;
+pub const PROT_GROWSUP: ::c_int = 0x2000000;
+
+pub const MAP_TYPE: ::c_int = 0x000f;
+
+pub const MADV_NORMAL: ::c_int = 0;
+pub const MADV_RANDOM: ::c_int = 1;
+pub const MADV_SEQUENTIAL: ::c_int = 2;
+pub const MADV_WILLNEED: ::c_int = 3;
+pub const MADV_DONTNEED: ::c_int = 4;
+pub const MADV_FREE: ::c_int = 8;
+pub const MADV_REMOVE: ::c_int = 9;
+pub const MADV_DONTFORK: ::c_int = 10;
+pub const MADV_DOFORK: ::c_int = 11;
+pub const MADV_MERGEABLE: ::c_int = 12;
+pub const MADV_UNMERGEABLE: ::c_int = 13;
+pub const MADV_HUGEPAGE: ::c_int = 14;
+pub const MADV_NOHUGEPAGE: ::c_int = 15;
+pub const MADV_DONTDUMP: ::c_int = 16;
+pub const MADV_DODUMP: ::c_int = 17;
+pub const MADV_HWPOISON: ::c_int = 100;
+pub const MADV_SOFT_OFFLINE: ::c_int = 101;
+
+pub const IFF_UP: ::c_int = 0x1;
+pub const IFF_BROADCAST: ::c_int = 0x2;
+pub const IFF_DEBUG: ::c_int = 0x4;
+pub const IFF_LOOPBACK: ::c_int = 0x8;
+pub const IFF_POINTOPOINT: ::c_int = 0x10;
+pub const IFF_NOTRAILERS: ::c_int = 0x20;
+pub const IFF_RUNNING: ::c_int = 0x40;
+pub const IFF_NOARP: ::c_int = 0x80;
+pub const IFF_PROMISC: ::c_int = 0x100;
+pub const IFF_ALLMULTI: ::c_int = 0x200;
+pub const IFF_MASTER: ::c_int = 0x400;
+pub const IFF_SLAVE: ::c_int = 0x800;
+pub const IFF_MULTICAST: ::c_int = 0x1000;
+pub const IFF_PORTSEL: ::c_int = 0x2000;
+pub const IFF_AUTOMEDIA: ::c_int = 0x4000;
+pub const IFF_DYNAMIC: ::c_int = 0x8000;
+
+pub const SOL_IP: ::c_int = 0;
+pub const SOL_TCP: ::c_int = 6;
+pub const SOL_UDP: ::c_int = 17;
+pub const SOL_IPV6: ::c_int = 41;
+pub const SOL_ICMPV6: ::c_int = 58;
+pub const SOL_RAW: ::c_int = 255;
+pub const SOL_DECNET: ::c_int = 261;
+pub const SOL_X25: ::c_int = 262;
+pub const SOL_PACKET: ::c_int = 263;
+pub const SOL_ATM: ::c_int = 264;
+pub const SOL_AAL: ::c_int = 265;
+pub const SOL_IRDA: ::c_int = 266;
+pub const SOL_NETBEUI: ::c_int = 267;
+pub const SOL_LLC: ::c_int = 268;
+pub const SOL_DCCP: ::c_int = 269;
+pub const SOL_NETLINK: ::c_int = 270;
+pub const SOL_TIPC: ::c_int = 271;
+
+pub const AF_UNSPEC: ::c_int = 0;
+pub const AF_UNIX: ::c_int = 1;
+pub const AF_LOCAL: ::c_int = 1;
+pub const AF_INET: ::c_int = 2;
+pub const AF_AX25: ::c_int = 3;
+pub const AF_IPX: ::c_int = 4;
+pub const AF_APPLETALK: ::c_int = 5;
+pub const AF_NETROM: ::c_int = 6;
+pub const AF_BRIDGE: ::c_int = 7;
+pub const AF_ATMPVC: ::c_int = 8;
+pub const AF_X25: ::c_int = 9;
+pub const AF_INET6: ::c_int = 10;
+pub const AF_ROSE: ::c_int = 11;
+pub const AF_DECnet: ::c_int = 12;
+pub const AF_NETBEUI: ::c_int = 13;
+pub const AF_SECURITY: ::c_int = 14;
+pub const AF_KEY: ::c_int = 15;
+pub const AF_NETLINK: ::c_int = 16;
+pub const AF_ROUTE: ::c_int = AF_NETLINK;
+pub const AF_PACKET: ::c_int = 17;
+pub const AF_ASH: ::c_int = 18;
+pub const AF_ECONET: ::c_int = 19;
+pub const AF_ATMSVC: ::c_int = 20;
+pub const AF_RDS: ::c_int = 21;
+pub const AF_SNA: ::c_int = 22;
+pub const AF_IRDA: ::c_int = 23;
+pub const AF_PPPOX: ::c_int = 24;
+pub const AF_WANPIPE: ::c_int = 25;
+pub const AF_LLC: ::c_int = 26;
+pub const AF_CAN: ::c_int = 29;
+pub const AF_TIPC: ::c_int = 30;
+pub const AF_BLUETOOTH: ::c_int = 31;
+pub const AF_IUCV: ::c_int = 32;
+pub const AF_RXRPC: ::c_int = 33;
+pub const AF_ISDN: ::c_int = 34;
+pub const AF_PHONET: ::c_int = 35;
+pub const AF_IEEE802154: ::c_int = 36;
+pub const AF_CAIF: ::c_int = 37;
+pub const AF_ALG: ::c_int = 38;
+
+pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
+pub const PF_UNIX: ::c_int = AF_UNIX;
+pub const PF_LOCAL: ::c_int = AF_LOCAL;
+pub const PF_INET: ::c_int = AF_INET;
+pub const PF_AX25: ::c_int = AF_AX25;
+pub const PF_IPX: ::c_int = AF_IPX;
+pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
+pub const PF_NETROM: ::c_int = AF_NETROM;
+pub const PF_BRIDGE: ::c_int = AF_BRIDGE;
+pub const PF_ATMPVC: ::c_int = AF_ATMPVC;
+pub const PF_X25: ::c_int = AF_X25;
+pub const PF_INET6: ::c_int = AF_INET6;
+pub const PF_ROSE: ::c_int = AF_ROSE;
+pub const PF_DECnet: ::c_int = AF_DECnet;
+pub const PF_NETBEUI: ::c_int = AF_NETBEUI;
+pub const PF_SECURITY: ::c_int = AF_SECURITY;
+pub const PF_KEY: ::c_int = AF_KEY;
+pub const PF_NETLINK: ::c_int = AF_NETLINK;
+pub const PF_ROUTE: ::c_int = AF_ROUTE;
+pub const PF_PACKET: ::c_int = AF_PACKET;
+pub const PF_ASH: ::c_int = AF_ASH;
+pub const PF_ECONET: ::c_int = AF_ECONET;
+pub const PF_ATMSVC: ::c_int = AF_ATMSVC;
+pub const PF_RDS: ::c_int = AF_RDS;
+pub const PF_SNA: ::c_int = AF_SNA;
+pub const PF_IRDA: ::c_int = AF_IRDA;
+pub const PF_PPPOX: ::c_int = AF_PPPOX;
+pub const PF_WANPIPE: ::c_int = AF_WANPIPE;
+pub const PF_LLC: ::c_int = AF_LLC;
+pub const PF_CAN: ::c_int = AF_CAN;
+pub const PF_TIPC: ::c_int = AF_TIPC;
+pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
+pub const PF_IUCV: ::c_int = AF_IUCV;
+pub const PF_RXRPC: ::c_int = AF_RXRPC;
+pub const PF_ISDN: ::c_int = AF_ISDN;
+pub const PF_PHONET: ::c_int = AF_PHONET;
+pub const PF_IEEE802154: ::c_int = AF_IEEE802154;
+pub const PF_CAIF: ::c_int = AF_CAIF;
+pub const PF_ALG: ::c_int = AF_ALG;
+
+pub const SOMAXCONN: ::c_int = 128;
+
+pub const MSG_OOB: ::c_int = 1;
+pub const MSG_PEEK: ::c_int = 2;
+pub const MSG_DONTROUTE: ::c_int = 4;
+pub const MSG_CTRUNC: ::c_int = 8;
+pub const MSG_TRUNC: ::c_int = 0x20;
+pub const MSG_DONTWAIT: ::c_int = 0x40;
+pub const MSG_EOR: ::c_int = 0x80;
+pub const MSG_WAITALL: ::c_int = 0x100;
+pub const MSG_FIN: ::c_int = 0x200;
+pub const MSG_SYN: ::c_int = 0x400;
+pub const MSG_CONFIRM: ::c_int = 0x800;
+pub const MSG_RST: ::c_int = 0x1000;
+pub const MSG_ERRQUEUE: ::c_int = 0x2000;
+pub const MSG_NOSIGNAL: ::c_int = 0x4000;
+pub const MSG_MORE: ::c_int = 0x8000;
+pub const MSG_WAITFORONE: ::c_int = 0x10000;
+pub const MSG_FASTOPEN: ::c_int = 0x20000000;
+pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000;
+
+pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
+
+pub const SOCK_RAW: ::c_int = 3;
+pub const SOCK_RDM: ::c_int = 4;
+pub const IP_MULTICAST_IF: ::c_int = 32;
+pub const IP_MULTICAST_TTL: ::c_int = 33;
+pub const IP_MULTICAST_LOOP: ::c_int = 34;
+pub const IP_TTL: ::c_int = 2;
+pub const IP_HDRINCL: ::c_int = 3;
+pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
+pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
+pub const IP_TRANSPARENT: ::c_int = 19;
+pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20;
+pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21;
+
+pub const TCP_NODELAY: ::c_int = 1;
+pub const TCP_MAXSEG: ::c_int = 2;
+pub const TCP_CORK: ::c_int = 3;
+pub const TCP_KEEPIDLE: ::c_int = 4;
+pub const TCP_KEEPINTVL: ::c_int = 5;
+pub const TCP_KEEPCNT: ::c_int = 6;
+pub const TCP_SYNCNT: ::c_int = 7;
+pub const TCP_LINGER2: ::c_int = 8;
+pub const TCP_DEFER_ACCEPT: ::c_int = 9;
+pub const TCP_WINDOW_CLAMP: ::c_int = 10;
+pub const TCP_INFO: ::c_int = 11;
+pub const TCP_QUICKACK: ::c_int = 12;
+pub const TCP_CONGESTION: ::c_int = 13;
+
+pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
+pub const IPV6_V6ONLY: ::c_int = 26;
+
+pub const SO_DEBUG: ::c_int = 1;
+
+pub const SHUT_RD: ::c_int = 0;
+pub const SHUT_WR: ::c_int = 1;
+pub const SHUT_RDWR: ::c_int = 2;
+
+pub const LOCK_SH: ::c_int = 1;
+pub const LOCK_EX: ::c_int = 2;
+pub const LOCK_NB: ::c_int = 4;
+pub const LOCK_UN: ::c_int = 8;
+
+pub const SS_ONSTACK: ::c_int = 1;
+pub const SS_DISABLE: ::c_int = 2;
+
+pub const PATH_MAX: ::c_int = 4096;
+
+pub const FD_SETSIZE: usize = 1024;
+
+pub const EPOLLIN: ::c_int = 0x1;
+pub const EPOLLPRI: ::c_int = 0x2;
+pub const EPOLLOUT: ::c_int = 0x4;
+pub const EPOLLRDNORM: ::c_int = 0x40;
+pub const EPOLLRDBAND: ::c_int = 0x80;
+pub const EPOLLWRNORM: ::c_int = 0x100;
+pub const EPOLLWRBAND: ::c_int = 0x200;
+pub const EPOLLMSG: ::c_int = 0x400;
+pub const EPOLLERR: ::c_int = 0x8;
+pub const EPOLLHUP: ::c_int = 0x10;
+pub const EPOLLET: ::c_int = 0x80000000;
+
+pub const EPOLL_CTL_ADD: ::c_int = 1;
+pub const EPOLL_CTL_MOD: ::c_int = 3;
+pub const EPOLL_CTL_DEL: ::c_int = 2;
+
+pub const MNT_DETACH: ::c_int = 0x2;
+pub const MNT_EXPIRE: ::c_int = 0x4;
+
+pub const Q_GETFMT: ::c_int = 0x800004;
+pub const Q_GETINFO: ::c_int = 0x800005;
+pub const Q_SETINFO: ::c_int = 0x800006;
+pub const QIF_BLIMITS: ::uint32_t = 1;
+pub const QIF_SPACE: ::uint32_t = 2;
+pub const QIF_ILIMITS: ::uint32_t = 4;
+pub const QIF_INODES: ::uint32_t = 8;
+pub const QIF_BTIME: ::uint32_t = 16;
+pub const QIF_ITIME: ::uint32_t = 32;
+pub const QIF_LIMITS: ::uint32_t = 5;
+pub const QIF_USAGE: ::uint32_t = 10;
+pub const QIF_TIMES: ::uint32_t = 48;
+pub const QIF_ALL: ::uint32_t = 63;
+
+pub const MNT_FORCE: ::c_int = 0x1;
+
+pub const Q_SYNC: ::c_int = 0x800001;
+pub const Q_QUOTAON: ::c_int = 0x800002;
+pub const Q_QUOTAOFF: ::c_int = 0x800003;
+pub const Q_GETQUOTA: ::c_int = 0x800007;
+pub const Q_SETQUOTA: ::c_int = 0x800008;
+
+pub const TCIOFF: ::c_int = 2;
+pub const TCION: ::c_int = 3;
+pub const TCOOFF: ::c_int = 0;
+pub const TCOON: ::c_int = 1;
+pub const TCIFLUSH: ::c_int = 0;
+pub const TCOFLUSH: ::c_int = 1;
+pub const TCIOFLUSH: ::c_int = 2;
+pub const NL0: ::c_int  = 0x00000000;
+pub const NL1: ::c_int  = 0x00000100;
+pub const TAB0: ::c_int = 0x00000000;
+pub const CR0: ::c_int  = 0x00000000;
+pub const FF0: ::c_int  = 0x00000000;
+pub const BS0: ::c_int  = 0x00000000;
+pub const VT0: ::c_int  = 0x00000000;
+pub const VERASE: usize = 2;
+pub const VKILL: usize = 3;
+pub const VINTR: usize = 0;
+pub const VQUIT: usize = 1;
+pub const VLNEXT: usize = 15;
+pub const IGNBRK: ::tcflag_t = 0x00000001;
+pub const BRKINT: ::tcflag_t = 0x00000002;
+pub const IGNPAR: ::tcflag_t = 0x00000004;
+pub const PARMRK: ::tcflag_t = 0x00000008;
+pub const INPCK: ::tcflag_t = 0x00000010;
+pub const ISTRIP: ::tcflag_t = 0x00000020;
+pub const INLCR: ::tcflag_t = 0x00000040;
+pub const IGNCR: ::tcflag_t = 0x00000080;
+pub const ICRNL: ::tcflag_t = 0x00000100;
+pub const IXANY: ::tcflag_t = 0x00000800;
+pub const IMAXBEL: ::tcflag_t = 0x00002000;
+pub const OPOST: ::tcflag_t = 0x1;
+pub const CS5: ::tcflag_t = 0x00000000;
+pub const CRTSCTS: ::tcflag_t = 0x80000000;
+pub const ECHO: ::tcflag_t = 0x00000008;
+pub const OCRNL:  ::tcflag_t = 0o000010;
+pub const ONOCR:  ::tcflag_t = 0o000020;
+pub const ONLRET: ::tcflag_t = 0o000040;
+pub const OFILL:  ::tcflag_t = 0o000100;
+pub const OFDEL:  ::tcflag_t = 0o000200;
+
+pub const CLONE_VM: ::c_int = 0x100;
+pub const CLONE_FS: ::c_int = 0x200;
+pub const CLONE_FILES: ::c_int = 0x400;
+pub const CLONE_SIGHAND: ::c_int = 0x800;
+pub const CLONE_PTRACE: ::c_int = 0x2000;
+pub const CLONE_VFORK: ::c_int = 0x4000;
+pub const CLONE_PARENT: ::c_int = 0x8000;
+pub const CLONE_THREAD: ::c_int = 0x10000;
+pub const CLONE_NEWNS: ::c_int = 0x20000;
+pub const CLONE_SYSVSEM: ::c_int = 0x40000;
+pub const CLONE_SETTLS: ::c_int = 0x80000;
+pub const CLONE_PARENT_SETTID: ::c_int = 0x100000;
+pub const CLONE_CHILD_CLEARTID: ::c_int = 0x200000;
+pub const CLONE_DETACHED: ::c_int = 0x400000;
+pub const CLONE_UNTRACED: ::c_int = 0x800000;
+pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000;
+pub const CLONE_NEWUTS: ::c_int = 0x04000000;
+pub const CLONE_NEWIPC: ::c_int = 0x08000000;
+pub const CLONE_NEWUSER: ::c_int = 0x10000000;
+pub const CLONE_NEWPID: ::c_int = 0x20000000;
+pub const CLONE_NEWNET: ::c_int = 0x40000000;
+pub const CLONE_IO: ::c_int = 0x80000000;
+pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
+
+pub const WNOHANG: ::c_int = 0x00000001;
+pub const WUNTRACED: ::c_int = 0x00000002;
+pub const WSTOPPED: ::c_int = WUNTRACED;
+pub const WEXITED: ::c_int = 0x00000004;
+pub const WCONTINUED: ::c_int = 0x00000008;
+pub const WNOWAIT: ::c_int = 0x01000000;
+
+// Options set using PTRACE_SETOPTIONS.
+pub const PTRACE_O_TRACESYSGOOD: ::c_int = 0x00000001;
+pub const PTRACE_O_TRACEFORK: ::c_int = 0x00000002;
+pub const PTRACE_O_TRACEVFORK: ::c_int = 0x00000004;
+pub const PTRACE_O_TRACECLONE: ::c_int = 0x00000008;
+pub const PTRACE_O_TRACEEXEC: ::c_int = 0x00000010;
+pub const PTRACE_O_TRACEVFORKDONE: ::c_int = 0x00000020;
+pub const PTRACE_O_TRACEEXIT: ::c_int = 0x00000040;
+pub const PTRACE_O_TRACESECCOMP: ::c_int = 0x00000080;
+pub const PTRACE_O_EXITKILL: ::c_int = 0x00100000;
+pub const PTRACE_O_SUSPEND_SECCOMP: ::c_int = 0x00200000;
+pub const PTRACE_O_MASK: ::c_int = 0x003000ff;
+
+// Wait extended result codes for the above trace options.
+pub const PTRACE_EVENT_FORK: ::c_int = 1;
+pub const PTRACE_EVENT_VFORK: ::c_int = 2;
+pub const PTRACE_EVENT_CLONE: ::c_int = 3;
+pub const PTRACE_EVENT_EXEC: ::c_int = 4;
+pub const PTRACE_EVENT_VFORK_DONE: ::c_int = 5;
+pub const PTRACE_EVENT_EXIT: ::c_int = 6;
+pub const PTRACE_EVENT_SECCOMP: ::c_int = 7;
+// PTRACE_EVENT_STOP was added to glibc in 2.26
+// pub const PTRACE_EVENT_STOP: ::c_int = 128;
+
+pub const __WNOTHREAD: ::c_int = 0x20000000;
+pub const __WALL: ::c_int = 0x40000000;
+pub const __WCLONE: ::c_int = 0x80000000;
+
+pub const SPLICE_F_MOVE: ::c_uint = 0x01;
+pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02;
+pub const SPLICE_F_MORE: ::c_uint = 0x04;
+pub const SPLICE_F_GIFT: ::c_uint = 0x08;
+
+pub const RTLD_LOCAL: ::c_int = 0;
+
+pub const POSIX_FADV_NORMAL: ::c_int = 0;
+pub const POSIX_FADV_RANDOM: ::c_int = 1;
+pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
+pub const POSIX_FADV_WILLNEED: ::c_int = 3;
+
+pub const AT_FDCWD: ::c_int = -100;
+pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x100;
+pub const AT_REMOVEDIR: ::c_int = 0x200;
+pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
+pub const AT_NO_AUTOMOUNT: ::c_int = 0x800;
+pub const AT_EMPTY_PATH: ::c_int = 0x1000;
+
+pub const LOG_CRON: ::c_int = 9 << 3;
+pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
+pub const LOG_FTP: ::c_int = 11 << 3;
+pub const LOG_PERROR: ::c_int = 0x20;
+
+pub const PIPE_BUF: usize = 4096;
+
+pub const SI_LOAD_SHIFT: ::c_uint = 16;
+
+pub const SIGEV_SIGNAL: ::c_int = 0;
+pub const SIGEV_NONE: ::c_int = 1;
+pub const SIGEV_THREAD: ::c_int = 2;
+
+pub const P_ALL: idtype_t = 0;
+pub const P_PID: idtype_t = 1;
+pub const P_PGID: idtype_t = 2;
+
+pub const UTIME_OMIT: c_long = 1073741822;
+pub const UTIME_NOW: c_long = 1073741823;
+
+pub const POLLRDNORM: ::c_short = 0x040;
+pub const POLLRDBAND: ::c_short = 0x080;
+
+f! {
+    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
+        let fd = fd as usize;
+        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        (*set).fds_bits[fd / size] &= !(1 << (fd % size));
+        return
+    }
+
+    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
+        let fd = fd as usize;
+        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0
+    }
+
+    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
+        let fd = fd as usize;
+        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        (*set).fds_bits[fd / size] |= 1 << (fd % size);
+        return
+    }
+
+    pub fn FD_ZERO(set: *mut fd_set) -> () {
+        for slot in (*set).fds_bits.iter_mut() {
+            *slot = 0;
+        }
+    }
+
+    pub fn WIFSTOPPED(status: ::c_int) -> bool {
+        (status & 0xff) == 0x7f
+    }
+
+    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
+        (status >> 8) & 0xff
+    }
+
+    pub fn WIFCONTINUED(status: ::c_int) -> bool {
+        status == 0xffff
+    }
+
+    pub fn WIFSIGNALED(status: ::c_int) -> bool {
+        ((status & 0x7f) + 1) as i8 >= 2
+    }
+
+    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
+        status & 0x7f
+    }
+
+    pub fn WIFEXITED(status: ::c_int) -> bool {
+        (status & 0x7f) == 0
+    }
+
+    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
+        (status >> 8) & 0xff
+    }
+
+    pub fn WCOREDUMP(status: ::c_int) -> bool {
+        (status & 0x80) != 0
+    }
+}
+
+extern {
+    pub fn fdatasync(fd: ::c_int) -> ::c_int;
+    pub fn mincore(addr: *mut ::c_void, len: ::size_t,
+                   vec: *mut ::c_uchar) -> ::c_int;
+    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
+
+    pub fn pthread_getattr_np(native: ::pthread_t,
+                              attr: *mut ::pthread_attr_t) -> ::c_int;
+    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
+                                 stackaddr: *mut *mut ::c_void,
+                                 stacksize: *mut ::size_t) -> ::c_int;
+    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
+    pub fn setgroups(ngroups: ::size_t,
+                     ptr: *const ::gid_t) -> ::c_int;
+    pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
+    pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
+    pub fn statfs64(path: *const ::c_char, buf: *mut statfs64) -> ::c_int;
+    pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
+    pub fn fstatfs64(fd: ::c_int, buf: *mut statfs64) -> ::c_int;
+    pub fn statvfs64(path: *const ::c_char, buf: *mut statvfs64) -> ::c_int;
+    pub fn fstatvfs64(fd: ::c_int, buf: *mut statvfs64) -> ::c_int;
+    pub fn memrchr(cx: *const ::c_void,
+                   c: ::c_int,
+                   n: ::size_t) -> *mut ::c_void;
+
+    pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t,
+                         advise: ::c_int) -> ::c_int;
+    pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
+    pub fn utimensat(dirfd: ::c_int, path: *const ::c_char,
+                     times: *const ::timespec, flag: ::c_int) -> ::c_int;
+    pub fn duplocale(base: ::locale_t) -> ::locale_t;
+    pub fn freelocale(loc: ::locale_t);
+    pub fn newlocale(mask: ::c_int,
+                     locale: *const ::c_char,
+                     base: ::locale_t) -> ::locale_t;
+    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
+    pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int;
+    pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int;
+    pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int;
+    pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int;
+    pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t;
+    pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
+    pub fn mmap64(addr: *mut ::c_void,
+                  len: ::size_t,
+                  prot: ::c_int,
+                  flags: ::c_int,
+                  fd: ::c_int,
+                  offset: off64_t)
+                  -> *mut ::c_void;
+    pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
+    pub fn openat64(fd: ::c_int,
+                    path: *const c_char,
+                    oflag: ::c_int, ...) -> ::c_int;
+    pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
+                   offset: off64_t) -> ::ssize_t;
+    pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
+                    offset: off64_t) -> ::ssize_t;
+    pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64;
+    pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64,
+                       result: *mut *mut ::dirent64) -> ::c_int;
+    pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
+    pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
+    pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int;
+
+    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
+
+    pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
+                   mode: ::mode_t, dev: dev_t) -> ::c_int;
+    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
+                                     clock_id: *mut clockid_t) -> ::c_int;
+    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
+                                     clock_id: ::clockid_t) -> ::c_int;
+    pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
+                                       pshared: ::c_int) -> ::c_int;
+    pub fn accept4(fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t,
+                   flg: ::c_int) -> ::c_int;
+    pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
+                                        pshared: ::c_int) -> ::c_int;
+    pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
+                                         val: *mut ::c_int) -> ::c_int;
+    pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
+                                         val: ::c_int) -> ::c_int;
+    pub fn ptsname_r(fd: ::c_int,
+                     buf: *mut ::c_char,
+                     buflen: ::size_t) -> ::c_int;
+    pub fn clearenv() -> ::c_int;
+    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
+                  options: ::c_int) -> ::c_int;
+    pub fn setreuid(ruid: ::uid_t, euid: ::uid_t) -> ::c_int;
+    pub fn setregid(rgid: ::gid_t, egid: ::gid_t) -> ::c_int;
+    pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t,
+                     suid: *mut ::uid_t) -> ::c_int;
+    pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t,
+                     sgid: *mut ::gid_t) -> ::c_int;
+    pub fn acct(filename: *const ::c_char) -> ::c_int;
+    pub fn brk(addr: *mut ::c_void) -> ::c_int;
+    pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void;
+    pub fn vfork() -> ::pid_t;
+    pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
+    pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
+    pub fn wait4(pid: ::pid_t, status: *mut ::c_int, options: ::c_int,
+                 rusage: *mut ::rusage) -> ::pid_t;
+    pub fn openpty(amaster: *mut ::c_int,
+                aslave: *mut ::c_int,
+                name: *mut ::c_char,
+                termp: *const termios,
+                winp: *const ::winsize) -> ::c_int;
+    pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
+                   envp: *const *const ::c_char) -> ::c_int;
+    pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
+                   envp: *const *const ::c_char)
+                   -> ::c_int;
+}
+
+cfg_if! {
+    if #[cfg(target_os = "emscripten")] {
+        mod emscripten;
+        pub use self::emscripten::*;
+    } else if #[cfg(any(target_os = "linux", target_os = "fuchsia"))] {
+        mod linux;
+        pub use self::linux::*;
+    } else if #[cfg(target_os = "android")] {
+        mod android;
+        pub use self::android::*;
+    } else {
+        // Unknown target_os
+    }
+}
+    // pub fn forkpty(amaster: *mut ::c_int,
+    //             name: *mut ::c_char,
+    //             termp: *const termios,
+    //             winp: *const ::winsize) -> ::pid_t;
+    // pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/solaris/mod.rs
@@ -0,0 +1,1339 @@
+use dox::{mem, Option};
+
+pub type c_char = i8;
+pub type c_long = i64;
+pub type c_ulong = u64;
+
+pub type clockid_t = ::c_int;
+pub type blkcnt_t = ::c_long;
+pub type clock_t = ::c_long;
+pub type daddr_t = ::c_long;
+pub type dev_t = ::c_ulong;
+pub type fsblkcnt_t = ::c_ulong;
+pub type fsfilcnt_t = ::c_ulong;
+pub type ino_t = ::c_ulong;
+pub type key_t = ::c_int;
+pub type major_t = ::c_uint;
+pub type minor_t = ::c_uint;
+pub type mode_t = ::c_uint;
+pub type nlink_t = ::c_uint;
+pub type rlim_t = ::c_ulong;
+pub type speed_t = ::c_uint;
+pub type tcflag_t = ::c_uint;
+pub type time_t = ::c_long;
+pub type wchar_t = ::c_int;
+pub type nfds_t = ::c_ulong;
+
+pub type suseconds_t = ::c_long;
+pub type off_t = ::c_long;
+pub type useconds_t = ::c_uint;
+pub type socklen_t = ::c_uint;
+pub type sa_family_t = u16;
+pub type pthread_t = ::c_uint;
+pub type pthread_key_t = ::c_uint;
+pub type blksize_t = ::c_int;
+pub type fflags_t = ::c_int;
+pub type nl_item = ::c_int;
+pub type id_t = ::c_int;
+pub type idtype_t = ::c_uint;
+
+pub enum timezone {}
+
+s! {
+    pub struct sockaddr {
+        pub sa_family: sa_family_t,
+        pub sa_data: [::c_char; 14],
+    }
+
+    pub struct sockaddr_in {
+        pub sin_family: sa_family_t,
+        pub sin_port: ::in_port_t,
+        pub sin_addr: ::in_addr,
+        pub sin_zero: [::c_char; 8]
+    }
+
+    pub struct sockaddr_in6 {
+        pub sin6_family: sa_family_t,
+        pub sin6_port: ::in_port_t,
+        pub sin6_flowinfo: u32,
+        pub sin6_addr: ::in6_addr,
+        pub sin6_scope_id: u32,
+        pub __sin6_src_id: u32
+    }
+
+    pub struct sockaddr_un {
+        pub sun_family: sa_family_t,
+        pub sun_path: [c_char; 108]
+    }
+
+    pub struct passwd {
+        pub pw_name: *mut ::c_char,
+        pub pw_passwd: *mut ::c_char,
+        pub pw_uid: ::uid_t,
+        pub pw_gid: ::gid_t,
+        pub pw_age: *mut ::c_char,
+        pub pw_comment: *mut ::c_char,
+        pub pw_gecos: *mut ::c_char,
+        pub pw_dir: *mut ::c_char,
+        pub pw_shell: *mut ::c_char
+    }
+
+    pub struct ifaddrs {
+        pub ifa_next: *mut ifaddrs,
+        pub ifa_name: *mut ::c_char,
+        pub ifa_flags: ::c_ulong,
+        pub ifa_addr: *mut ::sockaddr,
+        pub ifa_netmask: *mut ::sockaddr,
+        pub ifa_dstaddr: *mut ::sockaddr,
+        pub ifa_data: *mut ::c_void
+    }
+
+    pub struct tm {
+        pub tm_sec: ::c_int,
+        pub tm_min: ::c_int,
+        pub tm_hour: ::c_int,
+        pub tm_mday: ::c_int,
+        pub tm_mon: ::c_int,
+        pub tm_year: ::c_int,
+        pub tm_wday: ::c_int,
+        pub tm_yday: ::c_int,
+        pub tm_isdst: ::c_int
+    }
+
+    pub struct utsname {
+        pub sysname: [::c_char; 257],
+        pub nodename: [::c_char; 257],
+        pub release: [::c_char; 257],
+        pub version: [::c_char; 257],
+        pub machine: [::c_char; 257],
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::c_int,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::socklen_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::size_t,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct fd_set {
+        #[cfg(target_pointer_width = "64")]
+        fds_bits: [i64; FD_SETSIZE / 64],
+        #[cfg(target_pointer_width = "32")]
+        fds_bits: [i32; FD_SETSIZE / 32],
+    }
+
+    pub struct pthread_attr_t {
+        __pthread_attrp: *mut ::c_void
+    }
+
+    pub struct pthread_mutex_t {
+        __pthread_mutex_flag1: u16,
+        __pthread_mutex_flag2: u8,
+        __pthread_mutex_ceiling: u8,
+        __pthread_mutex_type: u16,
+        __pthread_mutex_magic: u16,
+        __pthread_mutex_lock: u64,
+        __pthread_mutex_data: u64
+    }
+
+    pub struct pthread_mutexattr_t {
+        __pthread_mutexattrp: *mut ::c_void
+    }
+
+    pub struct pthread_cond_t {
+        __pthread_cond_flag: [u8; 4],
+        __pthread_cond_type: u16,
+        __pthread_cond_magic: u16,
+        __pthread_cond_data: u64
+    }
+
+    pub struct pthread_condattr_t {
+        __pthread_condattrp: *mut ::c_void,
+    }
+
+    pub struct pthread_rwlock_t {
+        __pthread_rwlock_readers: i32,
+        __pthread_rwlock_type: u16,
+        __pthread_rwlock_magic: u16,
+        __pthread_rwlock_mutex: ::pthread_mutex_t,
+        __pthread_rwlock_readercv: ::pthread_cond_t,
+        __pthread_rwlock_writercv: ::pthread_cond_t
+    }
+
+    pub struct pthread_rwlockattr_t {
+        __pthread_rwlockattrp: *mut ::c_void,
+    }
+
+    pub struct dirent {
+        pub d_ino: ::ino_t,
+        pub d_off: ::off_t,
+        pub d_reclen: u16,
+        pub d_name: [::c_char; 1]
+    }
+
+    pub struct glob_t {
+        pub gl_pathc: ::size_t,
+        pub gl_pathv:  *mut *mut ::c_char,
+        pub gl_offs: ::size_t,
+        __unused1: *mut ::c_void,
+        __unused2: ::c_int,
+        __unused3: ::c_int,
+        __unused4: ::c_int,
+        __unused5: *mut ::c_void,
+        __unused6: *mut ::c_void,
+        __unused7: *mut ::c_void,
+        __unused8: *mut ::c_void,
+        __unused9: *mut ::c_void,
+        __unused10: *mut ::c_void,
+    }
+
+    pub struct sockaddr_storage {
+        pub ss_family: ::sa_family_t,
+        __ss_pad1: [u8; 6],
+        __ss_align: i64,
+        __ss_pad2: [u8; 240],
+    }
+
+    pub struct addrinfo {
+        pub ai_flags: ::c_int,
+        pub ai_family: ::c_int,
+        pub ai_socktype: ::c_int,
+        pub ai_protocol: ::c_int,
+        #[cfg(target_arch = "sparc64")]
+        __sparcv9_pad: ::c_int,
+        pub ai_addrlen: ::socklen_t,
+        pub ai_canonname: *mut ::c_char,
+        pub ai_addr: *mut ::sockaddr,
+        pub ai_next: *mut addrinfo,
+    }
+
+    pub struct sigset_t {
+        bits: [u32; 4],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_code: ::c_int,
+        pub si_errno: ::c_int,
+        pub si_pad: ::c_int,
+        pub si_addr: *mut ::c_void,
+        __pad: [u8; 232],
+    }
+
+    pub struct sigaction {
+        pub sa_flags: ::c_int,
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: sigset_t,
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_size: ::size_t,
+        pub ss_flags: ::c_int,
+    }
+
+    pub struct statvfs {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_favail: ::fsfilcnt_t,
+        pub f_fsid: ::c_ulong,
+        pub f_basetype: [::c_char; 16],
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        pub f_fstr: [::c_char; 32]
+    }
+
+    pub struct sched_param {
+        pub sched_priority: ::c_int,
+        sched_pad: [::c_int; 8]
+    }
+
+    pub struct Dl_info {
+        pub dli_fname: *const ::c_char,
+        pub dli_fbase: *mut ::c_void,
+        pub dli_sname: *const ::c_char,
+        pub dli_saddr: *mut ::c_void,
+    }
+
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        pub st_size: ::off_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        __unused: [::c_char; 16]
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_cc: [::cc_t; ::NCCS]
+    }
+
+    pub struct lconv {
+        pub decimal_point: *mut ::c_char,
+        pub thousands_sep: *mut ::c_char,
+        pub grouping: *mut ::c_char,
+        pub int_curr_symbol: *mut ::c_char,
+        pub currency_symbol: *mut ::c_char,
+        pub mon_decimal_point: *mut ::c_char,
+        pub mon_thousands_sep: *mut ::c_char,
+        pub mon_grouping: *mut ::c_char,
+        pub positive_sign: *mut ::c_char,
+        pub negative_sign: *mut ::c_char,
+        pub int_frac_digits: ::c_char,
+        pub frac_digits: ::c_char,
+        pub p_cs_precedes: ::c_char,
+        pub p_sep_by_space: ::c_char,
+        pub n_cs_precedes: ::c_char,
+        pub n_sep_by_space: ::c_char,
+        pub p_sign_posn: ::c_char,
+        pub n_sign_posn: ::c_char,
+        pub int_p_cs_precedes: ::c_char,
+        pub int_p_sep_by_space: ::c_char,
+        pub int_n_cs_precedes: ::c_char,
+        pub int_n_sep_by_space: ::c_char,
+        pub int_p_sign_posn: ::c_char,
+        pub int_n_sign_posn: ::c_char,
+    }
+
+    pub struct sem_t {
+        pub sem_count: u32,
+        pub sem_type: u16,
+        pub sem_magic: u16,
+        pub sem_pad1: [u64; 3],
+        pub sem_pad2: [u64; 2]
+    }
+
+    pub struct flock {
+        pub l_type: ::c_short,
+        pub l_whence: ::c_short,
+        pub l_start: ::off_t,
+        pub l_len: ::off_t,
+        pub l_sysid: ::c_int,
+        pub l_pid: ::pid_t,
+        pub l_pad: [::c_long; 4]
+    }
+
+    pub struct if_nameindex {
+        pub if_index: ::c_uint,
+        pub if_name: *mut ::c_char,
+    }
+
+    pub struct port_event {
+        pub portev_events: ::c_int,
+        pub portev_source: ::c_ushort,
+        pub portev_pad: ::c_ushort,
+        pub portev_object: ::uintptr_t,
+        pub portev_user: ::uintptr_t,
+    }
+}
+
+pub const LC_CTYPE: ::c_int = 0;
+pub const LC_NUMERIC: ::c_int = 1;
+pub const LC_TIME: ::c_int = 2;
+pub const LC_COLLATE: ::c_int = 3;
+pub const LC_MONETARY: ::c_int = 4;
+pub const LC_MESSAGES: ::c_int = 5;
+pub const LC_ALL: ::c_int = 6;
+pub const LC_CTYPE_MASK: ::c_int = (1 << LC_CTYPE);
+pub const LC_NUMERIC_MASK: ::c_int = (1 << LC_NUMERIC);
+pub const LC_TIME_MASK: ::c_int = (1 << LC_TIME);
+pub const LC_COLLATE_MASK: ::c_int = (1 << LC_COLLATE);
+pub const LC_MONETARY_MASK: ::c_int = (1 << LC_MONETARY);
+pub const LC_MESSAGES_MASK: ::c_int = (1 << LC_MESSAGES);
+pub const LC_ALL_MASK: ::c_int = LC_CTYPE_MASK
+                               | LC_NUMERIC_MASK
+                               | LC_TIME_MASK
+                               | LC_COLLATE_MASK
+                               | LC_MONETARY_MASK
+                               | LC_MESSAGES_MASK;
+
+pub const DAY_1: ::nl_item = 1;
+pub const DAY_2: ::nl_item = 2;
+pub const DAY_3: ::nl_item = 3;
+pub const DAY_4: ::nl_item = 4;
+pub const DAY_5: ::nl_item = 5;
+pub const DAY_6: ::nl_item = 6;
+pub const DAY_7: ::nl_item = 7;
+
+pub const ABDAY_1: ::nl_item = 8;
+pub const ABDAY_2: ::nl_item = 9;
+pub const ABDAY_3: ::nl_item = 10;
+pub const ABDAY_4: ::nl_item = 11;
+pub const ABDAY_5: ::nl_item = 12;
+pub const ABDAY_6: ::nl_item = 13;
+pub const ABDAY_7: ::nl_item = 14;
+
+pub const MON_1: ::nl_item = 15;
+pub const MON_2: ::nl_item = 16;
+pub const MON_3: ::nl_item = 17;
+pub const MON_4: ::nl_item = 18;
+pub const MON_5: ::nl_item = 19;
+pub const MON_6: ::nl_item = 20;
+pub const MON_7: ::nl_item = 21;
+pub const MON_8: ::nl_item = 22;
+pub const MON_9: ::nl_item = 23;
+pub const MON_10: ::nl_item = 24;
+pub const MON_11: ::nl_item = 25;
+pub const MON_12: ::nl_item = 26;
+
+pub const ABMON_1: ::nl_item = 27;
+pub const ABMON_2: ::nl_item = 28;
+pub const ABMON_3: ::nl_item = 29;
+pub const ABMON_4: ::nl_item = 30;
+pub const ABMON_5: ::nl_item = 31;
+pub const ABMON_6: ::nl_item = 32;
+pub const ABMON_7: ::nl_item = 33;
+pub const ABMON_8: ::nl_item = 34;
+pub const ABMON_9: ::nl_item = 35;
+pub const ABMON_10: ::nl_item = 36;
+pub const ABMON_11: ::nl_item = 37;
+pub const ABMON_12: ::nl_item = 38;
+
+pub const RADIXCHAR: ::nl_item = 39;
+pub const THOUSEP: ::nl_item = 40;
+pub const YESSTR: ::nl_item = 41;
+pub const NOSTR: ::nl_item = 42;
+pub const CRNCYSTR: ::nl_item = 43;
+
+pub const D_T_FMT: ::nl_item = 44;
+pub const D_FMT: ::nl_item = 45;
+pub const T_FMT: ::nl_item = 46;
+pub const AM_STR: ::nl_item = 47;
+pub const PM_STR: ::nl_item = 48;
+
+pub const CODESET: ::nl_item = 49;
+pub const T_FMT_AMPM: ::nl_item = 50;
+pub const ERA: ::nl_item = 51;
+pub const ERA_D_FMT: ::nl_item = 52;
+pub const ERA_D_T_FMT: ::nl_item = 53;
+pub const ERA_T_FMT: ::nl_item = 54;
+pub const ALT_DIGITS: ::nl_item = 55;
+pub const YESEXPR: ::nl_item = 56;
+pub const NOEXPR: ::nl_item = 57;
+pub const _DATE_FMT: ::nl_item = 58;
+pub const MAXSTRMSG: ::nl_item = 58;
+
+pub const PATH_MAX: ::c_int = 1024;
+
+pub const SA_ONSTACK: ::c_int = 0x00000001;
+pub const SA_RESETHAND: ::c_int = 0x00000002;
+pub const SA_RESTART: ::c_int = 0x00000004;
+pub const SA_SIGINFO: ::c_int = 0x00000008;
+pub const SA_NODEFER: ::c_int = 0x00000010;
+pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
+pub const SA_NOCLDSTOP: ::c_int = 0x00020000;
+
+pub const SS_ONSTACK: ::c_int = 1;
+pub const SS_DISABLE: ::c_int = 2;
+
+pub const FIOCLEX: ::c_int = 0x20006601;
+pub const FIONCLEX: ::c_int = 0x20006602;
+pub const FIONREAD: ::c_int = 0x4004667f;
+pub const FIONBIO: ::c_int = 0x8004667e;
+pub const FIOASYNC: ::c_int = 0x8004667d;
+pub const FIOSETOWN: ::c_int = 0x8004667c;
+pub const FIOGETOWN: ::c_int = 0x4004667b;
+
+pub const SIGCHLD: ::c_int = 18;
+pub const SIGBUS: ::c_int = 10;
+pub const SIGINFO: ::c_int = 41;
+pub const SIG_BLOCK: ::c_int = 1;
+pub const SIG_UNBLOCK: ::c_int = 2;
+pub const SIG_SETMASK: ::c_int = 3;
+
+pub const IPV6_MULTICAST_LOOP: ::c_int = 0x8;
+pub const IPV6_V6ONLY: ::c_int = 0x27;
+
+cfg_if! {
+    if #[cfg(target_pointer_width = "64")] {
+        pub const FD_SETSIZE: usize = 65536;
+    } else {
+        pub const FD_SETSIZE: usize = 1024;
+    }
+}
+
+pub const ST_RDONLY: ::c_ulong = 1;
+pub const ST_NOSUID: ::c_ulong = 2;
+
+pub const NI_MAXHOST: ::socklen_t = 1025;
+
+pub const EXIT_FAILURE: ::c_int = 1;
+pub const EXIT_SUCCESS: ::c_int = 0;
+pub const RAND_MAX: ::c_int = 32767;
+pub const EOF: ::c_int = -1;
+pub const SEEK_SET: ::c_int = 0;
+pub const SEEK_CUR: ::c_int = 1;
+pub const SEEK_END: ::c_int = 2;
+pub const _IOFBF: ::c_int = 0;
+pub const _IONBF: ::c_int = 4;
+pub const _IOLBF: ::c_int = 64;
+pub const BUFSIZ: ::c_uint = 1024;
+pub const FOPEN_MAX: ::c_uint = 20;
+pub const FILENAME_MAX: ::c_uint = 1024;
+pub const L_tmpnam: ::c_uint = 25;
+pub const TMP_MAX: ::c_uint = 17576;
+
+pub const O_RDONLY: ::c_int = 0;
+pub const O_WRONLY: ::c_int = 1;
+pub const O_RDWR: ::c_int = 2;
+pub const O_SEARCH: ::c_int = 0x200000;
+pub const O_EXEC: ::c_int = 0x400000;
+pub const O_APPEND: ::c_int = 8;
+pub const O_CREAT: ::c_int = 256;
+pub const O_EXCL: ::c_int = 1024;
+pub const O_NOCTTY: ::c_int = 2048;
+pub const O_TRUNC: ::c_int = 512;
+pub const O_CLOEXEC: ::c_int = 0x800000;
+pub const O_ACCMODE: ::c_int = 0x600003;
+pub const S_IFIFO: mode_t = 4096;
+pub const S_IFCHR: mode_t = 8192;
+pub const S_IFBLK: mode_t = 24576;
+pub const S_IFDIR: mode_t = 16384;
+pub const S_IFREG: mode_t = 32768;
+pub const S_IFLNK: mode_t = 40960;
+pub const S_IFSOCK: mode_t = 49152;
+pub const S_IFMT: mode_t = 61440;
+pub const S_IEXEC: mode_t = 64;
+pub const S_IWRITE: mode_t = 128;
+pub const S_IREAD: mode_t = 256;
+pub const S_IRWXU: mode_t = 448;
+pub const S_IXUSR: mode_t = 64;
+pub const S_IWUSR: mode_t = 128;
+pub const S_IRUSR: mode_t = 256;
+pub const S_IRWXG: mode_t = 56;
+pub const S_IXGRP: mode_t = 8;
+pub const S_IWGRP: mode_t = 16;
+pub const S_IRGRP: mode_t = 32;
+pub const S_IRWXO: mode_t = 7;
+pub const S_IXOTH: mode_t = 1;
+pub const S_IWOTH: mode_t = 2;
+pub const S_IROTH: mode_t = 4;
+pub const F_OK: ::c_int = 0;
+pub const R_OK: ::c_int = 4;
+pub const W_OK: ::c_int = 2;
+pub const X_OK: ::c_int = 1;
+pub const STDIN_FILENO: ::c_int = 0;
+pub const STDOUT_FILENO: ::c_int = 1;
+pub const STDERR_FILENO: ::c_int = 2;
+pub const F_LOCK: ::c_int = 1;
+pub const F_TEST: ::c_int = 3;
+pub const F_TLOCK: ::c_int = 2;
+pub const F_ULOCK: ::c_int = 0;
+pub const F_DUPFD_CLOEXEC: ::c_int = 37;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+pub const F_GETLK: ::c_int = 14;
+pub const SIGHUP: ::c_int = 1;
+pub const SIGINT: ::c_int = 2;
+pub const SIGQUIT: ::c_int = 3;
+pub const SIGILL: ::c_int = 4;
+pub const SIGABRT: ::c_int = 6;
+pub const SIGEMT: ::c_int = 7;
+pub const SIGFPE: ::c_int = 8;
+pub const SIGKILL: ::c_int = 9;
+pub const SIGSEGV: ::c_int = 11;
+pub const SIGSYS: ::c_int = 12;
+pub const SIGPIPE: ::c_int = 13;
+pub const SIGALRM: ::c_int = 14;
+pub const SIGTERM: ::c_int = 15;
+pub const SIGUSR1: ::c_int = 16;
+pub const SIGUSR2: ::c_int = 17;
+pub const SIGPWR: ::c_int = 19;
+pub const SIGWINCH: ::c_int = 20;
+pub const SIGURG: ::c_int = 21;
+pub const SIGPOLL: ::c_int = 22;
+pub const SIGIO: ::c_int = SIGPOLL;
+pub const SIGSTOP: ::c_int = 23;
+pub const SIGTSTP: ::c_int = 24;
+pub const SIGCONT: ::c_int = 25;
+pub const SIGTTIN: ::c_int = 26;
+pub const SIGTTOU: ::c_int = 27;
+pub const SIGVTALRM: ::c_int = 28;
+pub const SIGPROF: ::c_int = 29;
+pub const SIGXCPU: ::c_int = 30;
+pub const SIGXFSZ: ::c_int = 31;
+
+pub const WNOHANG: ::c_int = 0x40;
+pub const WUNTRACED: ::c_int = 0x04;
+
+pub const WEXITED: ::c_int = 0x01;
+pub const WTRAPPED: ::c_int = 0x02;
+pub const WSTOPPED: ::c_int = WUNTRACED;
+pub const WCONTINUED: ::c_int = 0x08;
+pub const WNOWAIT: ::c_int = 0x80;
+
+// Solaris defines a great many more of these; we only expose the
+// standardized ones.
+pub const P_PID: idtype_t = 0;
+pub const P_PGID: idtype_t = 2;
+pub const P_ALL: idtype_t = 7;
+
+pub const PROT_NONE: ::c_int = 0;
+pub const PROT_READ: ::c_int = 1;
+pub const PROT_WRITE: ::c_int = 2;
+pub const PROT_EXEC: ::c_int = 4;
+
+pub const MAP_SHARED: ::c_int = 0x0001;
+pub const MAP_PRIVATE: ::c_int = 0x0002;
+pub const MAP_FIXED: ::c_int = 0x0010;
+pub const MAP_NORESERVE: ::c_int = 0x40;
+pub const MAP_ANON: ::c_int = 0x0100;
+pub const MAP_RENAME: ::c_int = 0x20;
+pub const MAP_ALIGN: ::c_int = 0x200;
+pub const MAP_TEXT: ::c_int = 0x400;
+pub const MAP_INITDATA: ::c_int = 0x800;
+pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const MS_SYNC: ::c_int = 0x0004;
+pub const MS_ASYNC: ::c_int = 0x0001;
+pub const MS_INVALIDATE: ::c_int = 0x0002;
+pub const MS_INVALCURPROC: ::c_int = 0x0008;
+
+pub const EPERM: ::c_int = 1;
+pub const ENOENT: ::c_int = 2;
+pub const ESRCH: ::c_int = 3;
+pub const EINTR: ::c_int = 4;
+pub const EIO: ::c_int = 5;
+pub const ENXIO: ::c_int = 6;
+pub const E2BIG: ::c_int = 7;
+pub const ENOEXEC: ::c_int = 8;
+pub const EBADF: ::c_int = 9;
+pub const ECHILD: ::c_int = 10;
+pub const EAGAIN: ::c_int = 11;
+pub const ENOMEM: ::c_int = 12;
+pub const EACCES: ::c_int = 13;
+pub const EFAULT: ::c_int = 14;
+pub const ENOTBLK: ::c_int = 15;
+pub const EBUSY: ::c_int = 16;
+pub const EEXIST: ::c_int = 17;
+pub const EXDEV: ::c_int = 18;
+pub const ENODEV: ::c_int = 19;
+pub const ENOTDIR: ::c_int = 20;
+pub const EISDIR: ::c_int = 21;
+pub const EINVAL: ::c_int = 22;
+pub const ENFILE: ::c_int = 23;
+pub const EMFILE: ::c_int = 24;
+pub const ENOTTY: ::c_int = 25;
+pub const ETXTBSY: ::c_int = 26;
+pub const EFBIG: ::c_int = 27;
+pub const ENOSPC: ::c_int = 28;
+pub const ESPIPE: ::c_int = 29;
+pub const EROFS: ::c_int = 30;
+pub const EMLINK: ::c_int = 31;
+pub const EPIPE: ::c_int = 32;
+pub const EDOM: ::c_int = 33;
+pub const ERANGE: ::c_int = 34;
+pub const ENOMSG: ::c_int = 35;
+pub const EIDRM: ::c_int = 36;
+pub const ECHRNG: ::c_int = 37;
+pub const EL2NSYNC: ::c_int = 38;
+pub const EL3HLT: ::c_int = 39;
+pub const EL3RST: ::c_int = 40;
+pub const ELNRNG: ::c_int = 41;
+pub const EUNATCH: ::c_int = 42;
+pub const ENOCSI: ::c_int = 43;
+pub const EL2HLT: ::c_int = 44;
+pub const EDEADLK: ::c_int = 45;
+pub const ENOLCK: ::c_int = 46;
+pub const ECANCELED: ::c_int = 47;
+pub const ENOTSUP: ::c_int = 48;
+pub const EDQUOT: ::c_int = 49;
+pub const EBADE: ::c_int = 50;
+pub const EBADR: ::c_int = 51;
+pub const EXFULL: ::c_int = 52;
+pub const ENOANO: ::c_int = 53;
+pub const EBADRQC: ::c_int = 54;
+pub const EBADSLT: ::c_int = 55;
+pub const EDEADLOCK: ::c_int = 56;
+pub const EBFONT: ::c_int = 57;
+pub const EOWNERDEAD: ::c_int = 58;
+pub const ENOTRECOVERABLE: ::c_int = 59;
+pub const ENOSTR: ::c_int = 60;
+pub const ENODATA: ::c_int = 61;
+pub const ETIME: ::c_int = 62;
+pub const ENOSR: ::c_int = 63;
+pub const ENONET: ::c_int = 64;
+pub const ENOPKG: ::c_int = 65;
+pub const EREMOTE: ::c_int = 66;
+pub const ENOLINK: ::c_int = 67;
+pub const EADV: ::c_int = 68;
+pub const ESRMNT: ::c_int = 69;
+pub const ECOMM: ::c_int = 70;
+pub const EPROTO: ::c_int = 71;
+pub const ELOCKUNMAPPED: ::c_int = 72;
+pub const ENOTACTIVE: ::c_int = 73;
+pub const EMULTIHOP: ::c_int = 74;
+pub const EADI: ::c_int = 75;
+pub const EBADMSG: ::c_int = 77;
+pub const ENAMETOOLONG: ::c_int = 78;
+pub const EOVERFLOW: ::c_int = 79;
+pub const ENOTUNIQ: ::c_int = 80;
+pub const EBADFD: ::c_int = 81;
+pub const EREMCHG: ::c_int = 82;
+pub const ELIBACC: ::c_int = 83;
+pub const ELIBBAD: ::c_int = 84;
+pub const ELIBSCN: ::c_int = 85;
+pub const ELIBMAX: ::c_int = 86;
+pub const ELIBEXEC: ::c_int = 87;
+pub const EILSEQ: ::c_int = 88;
+pub const ENOSYS: ::c_int = 89;
+pub const ELOOP: ::c_int = 90;
+pub const ERESTART: ::c_int = 91;
+pub const ESTRPIPE: ::c_int = 92;
+pub const ENOTEMPTY: ::c_int = 93;
+pub const EUSERS: ::c_int = 94;
+pub const ENOTSOCK: ::c_int = 95;
+pub const EDESTADDRREQ: ::c_int = 96;
+pub const EMSGSIZE: ::c_int = 97;
+pub const EPROTOTYPE: ::c_int = 98;
+pub const ENOPROTOOPT: ::c_int = 99;
+pub const EPROTONOSUPPORT: ::c_int = 120;
+pub const ESOCKTNOSUPPORT: ::c_int = 121;
+pub const EOPNOTSUPP: ::c_int = 122;
+pub const EPFNOSUPPORT: ::c_int = 123;
+pub const EAFNOSUPPORT: ::c_int = 124;
+pub const EADDRINUSE: ::c_int = 125;
+pub const EADDRNOTAVAIL: ::c_int = 126;
+pub const ENETDOWN: ::c_int = 127;
+pub const ENETUNREACH: ::c_int = 128;
+pub const ENETRESET: ::c_int = 129;
+pub const ECONNABORTED: ::c_int = 130;
+pub const ECONNRESET: ::c_int = 131;
+pub const ENOBUFS: ::c_int = 132;
+pub const EISCONN: ::c_int = 133;
+pub const ENOTCONN: ::c_int = 134;
+pub const ESHUTDOWN: ::c_int = 143;
+pub const ETOOMANYREFS: ::c_int = 144;
+pub const ETIMEDOUT: ::c_int = 145;
+pub const ECONNREFUSED: ::c_int = 146;
+pub const EHOSTDOWN: ::c_int = 147;
+pub const EHOSTUNREACH: ::c_int = 148;
+pub const EWOULDBLOCK: ::c_int = EAGAIN;
+pub const EALREADY: ::c_int = 149;
+pub const EINPROGRESS: ::c_int = 150;
+
+pub const EAI_SYSTEM: ::c_int = 11;
+
+pub const F_DUPFD: ::c_int = 0;
+pub const F_GETFD: ::c_int = 1;
+pub const F_SETFD: ::c_int = 2;
+pub const F_GETFL: ::c_int = 3;
+pub const F_SETFL: ::c_int = 4;
+
+pub const SIGTRAP: ::c_int = 5;
+
+pub const GLOB_APPEND  : ::c_int = 32;
+pub const GLOB_DOOFFS  : ::c_int = 16;
+pub const GLOB_ERR     : ::c_int = 1;
+pub const GLOB_MARK    : ::c_int = 2;
+pub const GLOB_NOCHECK : ::c_int = 8;
+pub const GLOB_NOSORT  : ::c_int = 4;
+pub const GLOB_NOESCAPE: ::c_int = 64;
+
+pub const GLOB_NOSPACE : ::c_int = -2;
+pub const GLOB_ABORTED : ::c_int = -1;
+pub const GLOB_NOMATCH : ::c_int = -3;
+
+pub const POSIX_MADV_NORMAL: ::c_int = 0;
+pub const POSIX_MADV_RANDOM: ::c_int = 1;
+pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
+pub const POSIX_MADV_WILLNEED: ::c_int = 3;
+pub const POSIX_MADV_DONTNEED: ::c_int = 4;
+
+pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
+pub const PTHREAD_CREATE_DETACHED: ::c_int = 0x40;
+pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
+pub const PTHREAD_PROCESS_PRIVATE: ::c_ushort = 0;
+pub const PTHREAD_STACK_MIN: ::size_t = 4096;
+
+pub const SIGSTKSZ: ::size_t = 8192;
+
+// https://illumos.org/man/3c/clock_gettime
+// https://github.com/illumos/illumos-gate/
+//   blob/HEAD/usr/src/lib/libc/amd64/sys/__clock_gettime.s
+// clock_gettime(3c) doesn't seem to accept anything other than CLOCK_REALTIME
+// or __CLOCK_REALTIME0
+//
+// https://github.com/illumos/illumos-gate/
+//   blob/HEAD/usr/src/uts/common/sys/time_impl.h
+// Confusing! CLOCK_HIGHRES==CLOCK_MONOTONIC==4
+// __CLOCK_REALTIME0==0 is an obsoleted version of CLOCK_REALTIME==3
+pub const CLOCK_REALTIME: ::clockid_t = 3;
+pub const CLOCK_MONOTONIC: ::clockid_t = 4;
+pub const TIMER_RELTIME: ::c_int = 0;
+pub const TIMER_ABSTIME: ::c_int = 1;
+
+pub const RLIMIT_CPU: ::c_int = 0;
+pub const RLIMIT_FSIZE: ::c_int = 1;
+pub const RLIMIT_DATA: ::c_int = 2;
+pub const RLIMIT_STACK: ::c_int = 3;
+pub const RLIMIT_CORE: ::c_int = 4;
+pub const RLIMIT_NOFILE: ::c_int = 5;
+pub const RLIMIT_VMEM: ::c_int = 6;
+pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM;
+
+pub const RLIM_NLIMITS: rlim_t = 7;
+pub const RLIM_INFINITY: rlim_t = 0x7fffffff;
+
+pub const RUSAGE_SELF: ::c_int = 0;
+pub const RUSAGE_CHILDREN: ::c_int = -1;
+
+pub const MADV_NORMAL: ::c_int = 0;
+pub const MADV_RANDOM: ::c_int = 1;
+pub const MADV_SEQUENTIAL: ::c_int = 2;
+pub const MADV_WILLNEED: ::c_int = 3;
+pub const MADV_DONTNEED: ::c_int = 4;
+pub const MADV_FREE: ::c_int = 5;
+
+pub const AF_INET: ::c_int = 2;
+pub const AF_INET6: ::c_int = 26;
+pub const AF_UNIX: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 1;
+pub const SOCK_STREAM: ::c_int = 2;
+pub const SOCK_RAW: ::c_int = 4;
+pub const SOCK_RDM: ::c_int = 5;
+pub const SOCK_SEQPACKET: ::c_int = 6;
+pub const IP_MULTICAST_TTL: ::c_int = 17;
+pub const IP_MULTICAST_LOOP: ::c_int = 18;
+pub const IP_TTL: ::c_int = 4;
+pub const IP_HDRINCL: ::c_int = 2;
+pub const IP_ADD_MEMBERSHIP: ::c_int = 19;
+pub const IP_DROP_MEMBERSHIP: ::c_int = 20;
+pub const IPV6_JOIN_GROUP: ::c_int = 9;
+pub const IPV6_LEAVE_GROUP: ::c_int = 10;
+
+pub const TCP_NODELAY: ::c_int = 1;
+pub const TCP_KEEPIDLE: ::c_int = 34;
+pub const SOL_SOCKET: ::c_int = 0xffff;
+pub const SO_DEBUG: ::c_int = 0x01;
+pub const SO_ACCEPTCONN: ::c_int = 0x0002;
+pub const SO_REUSEADDR: ::c_int = 0x0004;
+pub const SO_KEEPALIVE: ::c_int = 0x0008;
+pub const SO_DONTROUTE: ::c_int = 0x0010;
+pub const SO_BROADCAST: ::c_int = 0x0020;
+pub const SO_USELOOPBACK: ::c_int = 0x0040;
+pub const SO_LINGER: ::c_int = 0x0080;
+pub const SO_OOBINLINE: ::c_int = 0x0100;
+pub const SO_SNDBUF: ::c_int = 0x1001;
+pub const SO_RCVBUF: ::c_int = 0x1002;
+pub const SO_SNDLOWAT: ::c_int = 0x1003;
+pub const SO_RCVLOWAT: ::c_int = 0x1004;
+pub const SO_SNDTIMEO: ::c_int = 0x1005;
+pub const SO_RCVTIMEO: ::c_int = 0x1006;
+pub const SO_ERROR: ::c_int = 0x1007;
+pub const SO_TYPE: ::c_int = 0x1008;
+
+pub const MSG_PEEK: ::c_int = 0x2;
+
+pub const IFF_LOOPBACK: ::c_int = 0x8;
+
+pub const SHUT_RD: ::c_int = 0;
+pub const SHUT_WR: ::c_int = 1;
+pub const SHUT_RDWR: ::c_int = 2;
+
+pub const LOCK_SH: ::c_int = 1;
+pub const LOCK_EX: ::c_int = 2;
+pub const LOCK_NB: ::c_int = 4;
+pub const LOCK_UN: ::c_int = 8;
+
+pub const F_RDLCK: ::c_short = 1;
+pub const F_WRLCK: ::c_short = 2;
+pub const F_UNLCK: ::c_short = 3;
+
+pub const O_SYNC: ::c_int = 16;
+pub const O_NONBLOCK: ::c_int = 128;
+
+pub const IPPROTO_RAW: ::c_int = 255;
+
+pub const _PC_LINK_MAX: ::c_int = 1;
+pub const _PC_MAX_CANON: ::c_int = 2;
+pub const _PC_MAX_INPUT: ::c_int = 3;
+pub const _PC_NAME_MAX: ::c_int = 4;
+pub const _PC_PATH_MAX: ::c_int = 5;
+pub const _PC_PIPE_BUF: ::c_int = 6;
+pub const _PC_NO_TRUNC: ::c_int = 7;
+pub const _PC_VDISABLE: ::c_int = 8;
+pub const _PC_CHOWN_RESTRICTED: ::c_int = 9;
+pub const _PC_ASYNC_IO: ::c_int = 10;
+pub const _PC_PRIO_IO: ::c_int = 11;
+pub const _PC_SYNC_IO: ::c_int = 12;
+pub const _PC_ALLOC_SIZE_MIN: ::c_int = 13;
+pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
+pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
+pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
+pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
+pub const _PC_SYMLINK_MAX: ::c_int = 18;
+pub const _PC_2_SYMLINKS: ::c_int = 19;
+pub const _PC_ACL_ENABLED: ::c_int = 20;
+pub const _PC_MIN_HOLE_SIZE: ::c_int = 21;
+pub const _PC_CASE_BEHAVIOR: ::c_int = 22;
+pub const _PC_SATTR_ENABLED: ::c_int = 23;
+pub const _PC_SATTR_EXISTS: ::c_int = 24;
+pub const _PC_ACCESS_FILTERING: ::c_int = 25;
+pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 26;
+pub const _PC_FILESIZEBITS: ::c_int = 67;
+pub const _PC_XATTR_ENABLED: ::c_int = 100;
+pub const _PC_LAST: ::c_int = 101;
+pub const _PC_XATTR_EXISTS: ::c_int = 101;
+
+pub const _SC_ARG_MAX: ::c_int = 1;
+pub const _SC_CHILD_MAX: ::c_int = 2;
+pub const _SC_CLK_TCK: ::c_int = 3;
+pub const _SC_NGROUPS_MAX: ::c_int = 4;
+pub const _SC_OPEN_MAX: ::c_int = 5;
+pub const _SC_JOB_CONTROL: ::c_int = 6;
+pub const _SC_SAVED_IDS: ::c_int = 7;
+pub const _SC_VERSION: ::c_int = 8;
+pub const _SC_PASS_MAX: ::c_int = 9;
+pub const _SC_LOGNAME_MAX: ::c_int = 10;
+pub const _SC_PAGESIZE: ::c_int = 11;
+pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
+pub const _SC_XOPEN_VERSION: ::c_int = 12;
+pub const _SC_NPROCESSORS_CONF: ::c_int = 14;
+pub const _SC_NPROCESSORS_ONLN: ::c_int = 15;
+pub const _SC_STREAM_MAX: ::c_int = 16;
+pub const _SC_TZNAME_MAX: ::c_int = 17;
+pub const _SC_AIO_LISTIO_MAX: ::c_int = 18;
+pub const _SC_AIO_MAX: ::c_int = 19;
+pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 20;
+pub const _SC_ASYNCHRONOUS_IO: ::c_int = 21;
+pub const _SC_DELAYTIMER_MAX: ::c_int = 22;
+pub const _SC_FSYNC: ::c_int = 23;
+pub const _SC_MAPPED_FILES: ::c_int = 24;
+pub const _SC_MEMLOCK: ::c_int = 25;
+pub const _SC_MEMLOCK_RANGE: ::c_int = 26;
+pub const _SC_MEMORY_PROTECTION: ::c_int = 27;
+pub const _SC_MESSAGE_PASSING: ::c_int = 28;
+pub const _SC_MQ_OPEN_MAX: ::c_int = 29;
+pub const _SC_MQ_PRIO_MAX: ::c_int = 30;
+pub const _SC_PRIORITIZED_IO: ::c_int = 31;
+pub const _SC_PRIORITY_SCHEDULING: ::c_int = 32;
+pub const _SC_REALTIME_SIGNALS: ::c_int = 33;
+pub const _SC_RTSIG_MAX: ::c_int = 34;
+pub const _SC_SEMAPHORES: ::c_int = 35;
+pub const _SC_SEM_NSEMS_MAX: ::c_int = 36;
+pub const _SC_SEM_VALUE_MAX: ::c_int = 37;
+pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 38;
+pub const _SC_SIGQUEUE_MAX: ::c_int = 39;
+pub const _SC_SIGRT_MIN: ::c_int = 40;
+pub const _SC_SIGRT_MAX: ::c_int = 41;
+pub const _SC_SYNCHRONIZED_IO: ::c_int = 42;
+pub const _SC_TIMERS: ::c_int = 43;
+pub const _SC_TIMER_MAX: ::c_int = 44;
+pub const _SC_2_C_BIND: ::c_int = 45;
+pub const _SC_2_C_DEV: ::c_int = 46;
+pub const _SC_2_C_VERSION: ::c_int = 47;
+pub const _SC_2_FORT_DEV: ::c_int = 48;
+pub const _SC_2_FORT_RUN: ::c_int = 49;
+pub const _SC_2_LOCALEDEF: ::c_int = 50;
+pub const _SC_2_SW_DEV: ::c_int = 51;
+pub const _SC_2_UPE: ::c_int = 52;
+pub const _SC_2_VERSION: ::c_int = 53;
+pub const _SC_BC_BASE_MAX: ::c_int = 54;
+pub const _SC_BC_DIM_MAX: ::c_int = 55;
+pub const _SC_BC_SCALE_MAX: ::c_int = 56;
+pub const _SC_BC_STRING_MAX: ::c_int = 57;
+pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 58;
+pub const _SC_EXPR_NEST_MAX: ::c_int = 59;
+pub const _SC_LINE_MAX: ::c_int = 60;
+pub const _SC_RE_DUP_MAX: ::c_int = 61;
+pub const _SC_XOPEN_CRYPT: ::c_int = 62;
+pub const _SC_XOPEN_ENH_I18N: ::c_int = 63;
+pub const _SC_XOPEN_SHM: ::c_int = 64;
+pub const _SC_2_CHAR_TERM: ::c_int = 66;
+pub const _SC_XOPEN_XCU_VERSION: ::c_int = 67;
+pub const _SC_ATEXIT_MAX: ::c_int = 76;
+pub const _SC_IOV_MAX: ::c_int = 77;
+pub const _SC_XOPEN_UNIX: ::c_int = 78;
+pub const _SC_T_IOV_MAX: ::c_int = 79;
+pub const _SC_PHYS_PAGES: ::c_int = 500;
+pub const _SC_AVPHYS_PAGES: ::c_int = 501;
+pub const _SC_COHER_BLKSZ: ::c_int = 503;
+pub const _SC_SPLIT_CACHE: ::c_int = 504;
+pub const _SC_ICACHE_SZ: ::c_int = 505;
+pub const _SC_DCACHE_SZ: ::c_int = 506;
+pub const _SC_ICACHE_LINESZ: ::c_int = 507;
+pub const _SC_DCACHE_LINESZ: ::c_int = 508;
+pub const _SC_ICACHE_BLKSZ: ::c_int = 509;
+pub const _SC_DCACHE_BLKSZ: ::c_int = 510;
+pub const _SC_DCACHE_TBLKSZ: ::c_int = 511;
+pub const _SC_ICACHE_ASSOC: ::c_int = 512;
+pub const _SC_DCACHE_ASSOC: ::c_int = 513;
+pub const _SC_MAXPID: ::c_int = 514;
+pub const _SC_STACK_PROT: ::c_int = 515;
+pub const _SC_NPROCESSORS_MAX: ::c_int = 516;
+pub const _SC_CPUID_MAX: ::c_int = 517;
+pub const _SC_EPHID_MAX: ::c_int = 518;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 568;
+pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 569;
+pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 570;
+pub const _SC_LOGIN_NAME_MAX: ::c_int = 571;
+pub const _SC_THREAD_KEYS_MAX: ::c_int = 572;
+pub const _SC_THREAD_STACK_MIN: ::c_int = 573;
+pub const _SC_THREAD_THREADS_MAX: ::c_int = 574;
+pub const _SC_TTY_NAME_MAX: ::c_int = 575;
+pub const _SC_THREADS: ::c_int = 576;
+pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 577;
+pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 578;
+pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 579;
+pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 580;
+pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 581;
+pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 582;
+pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 583;
+pub const _SC_XOPEN_LEGACY: ::c_int = 717;
+pub const _SC_XOPEN_REALTIME: ::c_int = 718;
+pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 719;
+pub const _SC_XBS5_ILP32_OFF32: ::c_int = 720;
+pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 721;
+pub const _SC_XBS5_LP64_OFF64: ::c_int = 722;
+pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 723;
+pub const _SC_2_PBS: ::c_int = 724;
+pub const _SC_2_PBS_ACCOUNTING: ::c_int = 725;
+pub const _SC_2_PBS_CHECKPOINT: ::c_int = 726;
+pub const _SC_2_PBS_LOCATE: ::c_int = 728;
+pub const _SC_2_PBS_MESSAGE: ::c_int = 729;
+pub const _SC_2_PBS_TRACK: ::c_int = 730;
+pub const _SC_ADVISORY_INFO: ::c_int = 731;
+pub const _SC_BARRIERS: ::c_int = 732;
+pub const _SC_CLOCK_SELECTION: ::c_int = 733;
+pub const _SC_CPUTIME: ::c_int = 734;
+pub const _SC_HOST_NAME_MAX: ::c_int = 735;
+pub const _SC_MONOTONIC_CLOCK: ::c_int = 736;
+pub const _SC_READER_WRITER_LOCKS: ::c_int = 737;
+pub const _SC_REGEXP: ::c_int = 738;
+pub const _SC_SHELL: ::c_int = 739;
+pub const _SC_SPAWN: ::c_int = 740;
+pub const _SC_SPIN_LOCKS: ::c_int = 741;
+pub const _SC_SPORADIC_SERVER: ::c_int = 742;
+pub const _SC_SS_REPL_MAX: ::c_int = 743;
+pub const _SC_SYMLOOP_MAX: ::c_int = 744;
+pub const _SC_THREAD_CPUTIME: ::c_int = 745;
+pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 746;
+pub const _SC_TIMEOUTS: ::c_int = 747;
+pub const _SC_TRACE: ::c_int = 748;
+pub const _SC_TRACE_EVENT_FILTER: ::c_int = 749;
+pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 750;
+pub const _SC_TRACE_INHERIT: ::c_int = 751;
+pub const _SC_TRACE_LOG: ::c_int = 752;
+pub const _SC_TRACE_NAME_MAX: ::c_int = 753;
+pub const _SC_TRACE_SYS_MAX: ::c_int = 754;
+pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 755;
+pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 756;
+pub const _SC_V6_ILP32_OFF32: ::c_int = 757;
+pub const _SC_V6_ILP32_OFFBIG: ::c_int = 758;
+pub const _SC_V6_LP64_OFF64: ::c_int = 759;
+pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 760;
+pub const _SC_XOPEN_STREAMS: ::c_int = 761;
+pub const _SC_IPV6: ::c_int = 762;
+pub const _SC_RAW_SOCKETS: ::c_int = 763;
+
+pub const _MUTEX_MAGIC: u16 = 0x4d58; // MX
+pub const _COND_MAGIC: u16 = 0x4356;  // CV
+pub const _RWL_MAGIC: u16 = 0x5257;   // RW
+
+pub const NCCS: usize = 19;
+
+pub const LOG_CRON: ::c_int = 15 << 3;
+
+pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
+    __pthread_mutex_flag1: 0,
+    __pthread_mutex_flag2: 0,
+    __pthread_mutex_ceiling: 0,
+    __pthread_mutex_type: PTHREAD_PROCESS_PRIVATE,
+    __pthread_mutex_magic: _MUTEX_MAGIC,
+    __pthread_mutex_lock: 0,
+    __pthread_mutex_data: 0
+};
+pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
+    __pthread_cond_flag: [0; 4],
+    __pthread_cond_type: PTHREAD_PROCESS_PRIVATE,
+    __pthread_cond_magic: _COND_MAGIC,
+    __pthread_cond_data: 0
+};
+pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
+    __pthread_rwlock_readers: 0,
+    __pthread_rwlock_type: PTHREAD_PROCESS_PRIVATE,
+    __pthread_rwlock_magic: _RWL_MAGIC,
+    __pthread_rwlock_mutex: PTHREAD_MUTEX_INITIALIZER,
+    __pthread_rwlock_readercv: PTHREAD_COND_INITIALIZER,
+    __pthread_rwlock_writercv: PTHREAD_COND_INITIALIZER
+};
+pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
+pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
+pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 4;
+pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
+
+pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void;
+pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void;
+pub const RTLD_SELF: *mut ::c_void = -3isize as *mut ::c_void;
+pub const RTLD_PROBE: *mut ::c_void = -4isize as *mut ::c_void;
+
+pub const RTLD_NOW: ::c_int = 0x2;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_LOCAL: ::c_int = 0x0;
+pub const RTLD_PARENT: ::c_int = 0x200;
+pub const RTLD_GROUP: ::c_int = 0x400;
+pub const RTLD_WORLD: ::c_int = 0x800;
+pub const RTLD_NODELETE: ::c_int = 0x1000;
+pub const RTLD_FIRST: ::c_int = 0x2000;
+pub const RTLD_CONFGEN: ::c_int = 0x10000;
+
+pub const PORT_SOURCE_AIO: ::c_int = 1;
+pub const PORT_SOURCE_TIMER: ::c_int = 2;
+pub const PORT_SOURCE_USER: ::c_int = 3;
+pub const PORT_SOURCE_FD: ::c_int = 4;
+pub const PORT_SOURCE_ALERT: ::c_int = 5;
+pub const PORT_SOURCE_MQ: ::c_int = 6;
+pub const PORT_SOURCE_FILE: ::c_int = 7;
+pub const PORT_SOURCE_POSTWAIT: ::c_int = 8;
+pub const PORT_SOURCE_SIGNAL: ::c_int = 9;
+
+f! {
+    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
+        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        let fd = fd as usize;
+        (*set).fds_bits[fd / bits] &= !(1 << (fd % bits));
+        return
+    }
+
+    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
+        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        let fd = fd as usize;
+        return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0
+    }
+
+    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
+        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        let fd = fd as usize;
+        (*set).fds_bits[fd / bits] |= 1 << (fd % bits);
+        return
+    }
+
+    pub fn FD_ZERO(set: *mut fd_set) -> () {
+        for slot in (*set).fds_bits.iter_mut() {
+            *slot = 0;
+        }
+    }
+
+    pub fn WIFEXITED(status: ::c_int) -> bool {
+        (status & 0xFF) == 0
+    }
+
+    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
+        (status >> 8) & 0xFF
+    }
+
+    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
+        status & 0x7F
+    }
+}
+
+extern {
+    pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
+    pub fn freeifaddrs(ifa: *mut ::ifaddrs);
+
+    pub fn stack_getbounds(sp: *mut ::stack_t) -> ::c_int;
+    pub fn mincore(addr: *const ::c_void, len: ::size_t,
+                   vec: *mut c_char) -> ::c_int;
+    pub fn setgroups(ngroups: ::c_int,
+                     ptr: *const ::gid_t) -> ::c_int;
+    pub fn ioctl(fildes: ::c_int, request: ::c_int, ...) -> ::c_int;
+    pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
+                    -> ::c_int;
+    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_nanosleep(clk_id: ::clockid_t,
+                           flags: ::c_int,
+                           rqtp: *const ::timespec,
+                           rmtp:  *mut ::timespec) -> ::c_int;
+    pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+    pub fn getnameinfo(sa: *const ::sockaddr,
+                       salen: ::socklen_t,
+                       host: *mut ::c_char,
+                       hostlen: ::socklen_t,
+                       serv: *mut ::c_char,
+                       sevlen: ::socklen_t,
+                       flags: ::c_int) -> ::c_int;
+    pub fn setpwent();
+    pub fn endpwent();
+    pub fn getpwent() -> *mut passwd;
+    pub fn fdatasync(fd: ::c_int) -> ::c_int;
+    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
+    pub fn duplocale(base: ::locale_t) -> ::locale_t;
+    pub fn freelocale(loc: ::locale_t);
+    pub fn newlocale(mask: ::c_int,
+                     locale: *const ::c_char,
+                     base: ::locale_t) -> ::locale_t;
+    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
+    pub fn getprogname() -> *const ::c_char;
+    pub fn setprogname(name: *const ::c_char);
+    pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
+    pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int;
+    pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int;
+
+    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
+
+    pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
+                   mode: ::mode_t, dev: dev_t) -> ::c_int;
+    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
+                    mode: ::mode_t) -> ::c_int;
+    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
+    pub fn if_nameindex() -> *mut if_nameindex;
+    pub fn if_freenameindex(ptr: *mut if_nameindex);
+    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
+                                     clock_id: *mut clockid_t) -> ::c_int;
+    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
+                                     clock_id: ::clockid_t) -> ::c_int;
+    pub fn sem_timedwait(sem: *mut sem_t,
+                         abstime: *const ::timespec) -> ::c_int;
+    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
+                                   abstime: *const ::timespec) -> ::c_int;
+    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
+                  options: ::c_int) -> ::c_int;
+
+    pub fn glob(pattern: *const ::c_char,
+                flags: ::c_int,
+                errfunc: Option<extern fn(epath: *const ::c_char,
+                                          errno: ::c_int) -> ::c_int>,
+                pglob: *mut ::glob_t) -> ::c_int;
+
+    pub fn globfree(pglob: *mut ::glob_t);
+
+    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
+                         -> ::c_int;
+
+    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
+
+    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
+
+    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
+    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
+                  -> ::c_int;
+
+    pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
+
+    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
+                    flags: ::c_int, addr: *mut ::sockaddr,
+                    addrlen: *mut ::socklen_t) -> ::ssize_t;
+    pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
+    pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int;
+    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
+
+    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
+                address_len: ::socklen_t) -> ::c_int;
+
+    pub fn writev(fd: ::c_int,
+                  iov: *const ::iovec,
+                  iovcnt: ::c_int) -> ::ssize_t;
+    pub fn readv(fd: ::c_int,
+                 iov: *const ::iovec,
+                 iovcnt: ::c_int) -> ::ssize_t;
+
+    pub fn sendmsg(fd: ::c_int,
+                   msg: *const ::msghdr,
+                   flags: ::c_int) -> ::ssize_t;
+    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
+                   -> ::ssize_t;
+
+    pub fn port_create() -> ::c_int;
+    pub fn port_associate(port: ::c_int, source: ::c_int, object: ::uintptr_t,
+                          events: ::c_int, user: ::uintptr_t) -> ::c_int;
+    pub fn port_dissociate(port: ::c_int, source: ::c_int, object: ::uintptr_t)
+                           -> ::c_int;
+    pub fn port_get(port: ::c_int, pe: *mut port_event,
+                    timeout: *const ::timespec) -> ::c_int;
+    pub fn port_getn(port: ::c_int, pe_list: *mut port_event, max: ::c_uint,
+                     nget: *mut ::c_uint, timeout: *const ::timespec)
+                     -> ::c_int;
+    pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
+                   envp: *const *const ::c_char)
+                   -> ::c_int;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
+    pub fn getgrgid_r(uid: ::uid_t,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "sigaltstack$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
+    pub fn sigaltstack(ss: *const stack_t,
+                       oss: *mut stack_t) -> ::c_int;
+    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
+    pub fn getdtablesize() -> ::c_int;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
+    pub fn getgrnam_r(name: *const ::c_char,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_sigmask$UNIX2003")]
+    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
+                           oldset: *mut sigset_t) -> ::c_int;
+    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
+    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
+    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
+    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
+    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
+    pub fn getpwnam_r(name: *const ::c_char,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
+    pub fn getpwuid_r(uid: ::uid_t,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
+               link_name = "sigwait$UNIX2003")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
+    pub fn sigwait(set: *const sigset_t,
+                   sig: *mut ::c_int) -> ::c_int;
+    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
+                          parent: Option<unsafe extern fn()>,
+                          child: Option<unsafe extern fn()>) -> ::c_int;
+    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "popen$UNIX2003")]
+    pub fn popen(command: *const c_char,
+                 mode: *const c_char) -> *mut ::FILE;
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/uclibc/mips/mips32.rs
@@ -0,0 +1,269 @@
+pub type c_char = i8;
+pub type c_long = i32;
+pub type c_ulong = u32;
+pub type clock_t = i32;
+pub type time_t = i32;
+pub type suseconds_t = i32;
+pub type wchar_t = i32;
+pub type off_t = i32;
+pub type ino_t = u32;
+pub type blkcnt_t = i32;
+pub type blksize_t = i32;
+pub type nlink_t = u32;
+pub type fsblkcnt_t = ::c_ulong;
+pub type fsfilcnt_t = ::c_ulong;
+pub type rlim_t = c_ulong;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::dev_t,
+        st_pad1: [::c_long; 2],
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        pub st_pad2: [::c_long; 1],
+        pub st_size: ::off_t,
+        st_pad3: ::c_long,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        st_pad5: [::c_long; 14],
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::dev_t,
+        st_pad1: [::c_long; 2],
+        pub st_ino: ::ino64_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::dev_t,
+        st_pad2: [::c_long; 2],
+        pub st_size: ::off64_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        st_pad3: ::c_long,
+        pub st_blocks: ::blkcnt64_t,
+        st_pad5: [::c_long; 14],
+    }
+
+    pub struct pthread_attr_t {
+        __size: [u32; 9]
+    }
+
+    pub struct sigaction {
+        pub sa_flags: ::c_uint,
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: sigset_t,
+        _restorer: *mut ::c_void,
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_size: ::size_t,
+        pub ss_flags: ::c_int,
+    }
+
+    pub struct sigset_t {
+        __val: [::c_ulong; 4],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_code: ::c_int,
+        pub si_errno: ::c_int,
+        pub _pad: [::c_int; 29],
+    }
+
+    pub struct glob64_t {
+        pub gl_pathc: ::size_t,
+        pub gl_pathv: *mut *mut ::c_char,
+        pub gl_offs: ::size_t,
+        pub gl_flags: ::c_int,
+
+        __unused1: *mut ::c_void,
+        __unused2: *mut ::c_void,
+        __unused3: *mut ::c_void,
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+    }
+
+    pub struct ipc_perm {
+        pub __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::c_uint,
+        pub __seq: ::c_ushort,
+        __pad1: ::c_ushort,
+        __unused1: ::c_ulong,
+        __unused2: ::c_ulong
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __unused4: ::c_ulong,
+        __unused5: ::c_ulong
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        #[cfg(target_endian = "big")]
+        __glibc_reserved1: ::c_ulong,
+        pub msg_stime: ::time_t,
+        #[cfg(target_endian = "little")]
+        __glibc_reserved1: ::c_ulong,
+        #[cfg(target_endian = "big")]
+        __glibc_reserved2: ::c_ulong,
+        pub msg_rtime: ::time_t,
+        #[cfg(target_endian = "little")]
+        __glibc_reserved2: ::c_ulong,
+        #[cfg(target_endian = "big")]
+        __glibc_reserved3: ::c_ulong,
+        pub msg_ctime: ::time_t,
+        #[cfg(target_endian = "little")]
+        __glibc_reserved3: ::c_ulong,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __glibc_reserved4: ::c_ulong,
+        __glibc_reserved5: ::c_ulong,
+    }
+
+    pub struct statfs {
+        pub f_type: ::c_long,
+        pub f_bsize: ::c_long,
+        pub f_frsize: ::c_long,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_files: ::fsblkcnt_t,
+        pub f_ffree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_fsid: ::fsid_t,
+
+        pub f_namelen: ::c_long,
+        f_spare: [::c_long; 6],
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::c_int,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::size_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::size_t,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_line: ::cc_t,
+        pub c_cc: [::cc_t; ::NCCS],
+    }
+
+    pub struct flock {
+        pub l_type: ::c_short,
+        pub l_whence: ::c_short,
+        pub l_start: ::off_t,
+        pub l_len: ::off_t,
+        pub l_sysid: ::c_long,
+        pub l_pid: ::pid_t,
+        pad: [::c_long; 4],
+    }
+
+    pub struct sysinfo {
+        pub uptime: ::c_long,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
+        pub procs: ::c_ushort,
+        pub pad: ::c_ushort,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
+        pub mem_unit: ::c_uint,
+        pub _f: [::c_char; 8],
+    }
+
+    // FIXME this is actually a union
+    pub struct sem_t {
+        #[cfg(target_pointer_width = "32")]
+        __size: [::c_char; 16],
+        #[cfg(target_pointer_width = "64")]
+        __size: [::c_char; 32],
+        __align: [::c_long; 0],
+    }
+}
+
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+
+pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
+
+pub const SYS_gettid: ::c_long = 4222;   // Valid for O32
+
+#[link(name = "util")]
+extern {
+    pub fn sysctl(name: *mut ::c_int,
+                  namelen: ::c_int,
+                  oldp: *mut ::c_void,
+                  oldlenp: *mut ::size_t,
+                  newp: *mut ::c_void,
+                  newlen: ::size_t)
+                  -> ::c_int;
+    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
+    pub fn backtrace(buf: *mut *mut ::c_void,
+                     sz: ::c_int) -> ::c_int;
+    pub fn glob64(pattern: *const ::c_char,
+                  flags: ::c_int,
+                  errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
+                                                   errno: ::c_int)
+                                                   -> ::c_int>,
+                  pglob: *mut glob64_t) -> ::c_int;
+    pub fn globfree64(pglob: *mut glob64_t);
+    pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
+    pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
+                                       cpusetsize: ::size_t,
+                                       cpuset: *mut ::cpu_set_t) -> ::c_int;
+    pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
+                                       cpusetsize: ::size_t,
+                                       cpuset: *const ::cpu_set_t) -> ::c_int;
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/uclibc/mips/mips64.rs
@@ -0,0 +1,209 @@
+pub type blkcnt_t = i64;
+pub type blksize_t = i64;
+pub type c_char = i8;
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type fsblkcnt_t = ::c_ulong;
+pub type fsfilcnt_t = ::c_ulong;
+pub type ino_t = u64;
+pub type nlink_t = u64;
+pub type off_t = i64;
+pub type rlim_t = ::c_ulong;
+pub type suseconds_t = i64;
+pub type time_t = i64;
+pub type wchar_t = i32;
+
+s! {
+    pub struct stat {
+        pub st_dev: ::c_ulong,
+        st_pad1: [::c_long; 2],
+        pub st_ino: ::ino_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::c_ulong,
+        st_pad2: [::c_ulong; 1],
+        pub st_size: ::off_t,
+        st_pad3: ::c_long,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        st_pad4: ::c_long,
+        pub st_blocks: ::blkcnt_t,
+        st_pad5: [::c_long; 7],
+    }
+
+    pub struct stat64 {
+        pub st_dev: ::c_ulong,
+        st_pad1: [::c_long; 2],
+        pub st_ino: ::ino64_t,
+        pub st_mode: ::mode_t,
+        pub st_nlink: ::nlink_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::c_ulong,
+        st_pad2: [::c_long; 2],
+        pub st_size: ::off64_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_long,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_long,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        st_pad3: ::c_long,
+        pub st_blocks: ::blkcnt64_t,
+        st_pad5: [::c_long; 7],
+    }
+
+    pub struct pthread_attr_t {
+        __size: [::c_ulong; 7]
+    }
+
+    pub struct sigaction {
+        pub sa_flags: ::c_int,
+        pub sa_sigaction: ::sighandler_t,
+        pub sa_mask: sigset_t,
+        _restorer: *mut ::c_void,
+    }
+
+    pub struct stack_t {
+        pub ss_sp: *mut ::c_void,
+        pub ss_size: ::size_t,
+        pub ss_flags: ::c_int,
+    }
+
+    pub struct sigset_t {
+        __size: [::c_ulong; 16],
+    }
+
+    pub struct siginfo_t {
+        pub si_signo: ::c_int,
+        pub si_code: ::c_int,
+        pub si_errno: ::c_int,
+        _pad: ::c_int,
+        _pad2: [::c_long; 14],
+    }
+
+    pub struct ipc_perm {
+        pub __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::c_uint,
+        pub __seq: ::c_ushort,
+        __pad1: ::c_ushort,
+        __unused1: ::c_ulong,
+        __unused2: ::c_ulong
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t,
+        pub shm_atime: ::time_t,
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __unused4: ::c_ulong,
+        __unused5: ::c_ulong
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        pub msg_stime: ::time_t,
+        pub msg_rtime: ::time_t,
+        pub msg_ctime: ::time_t,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __glibc_reserved4: ::c_ulong,
+        __glibc_reserved5: ::c_ulong,
+    }
+
+    pub struct statfs {
+        pub f_type: ::c_long,
+        pub f_bsize: ::c_long,
+        pub f_frsize: ::c_long,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_files: ::fsblkcnt_t,
+        pub f_ffree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_fsid: ::fsid_t,
+
+        pub f_namelen: ::c_long,
+        f_spare: [::c_long; 6],
+    }
+
+    pub struct msghdr {
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::size_t,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::size_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct cmsghdr {
+        pub cmsg_len: ::size_t,
+        pub cmsg_level: ::c_int,
+        pub cmsg_type: ::c_int,
+    }
+
+    pub struct termios {
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_line: ::cc_t,
+        pub c_cc: [::cc_t; ::NCCS],
+    }
+
+    pub struct sysinfo {
+        pub uptime: ::c_long,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
+        pub procs: ::c_ushort,
+        pub pad: ::c_ushort,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
+        pub mem_unit: ::c_uint,
+        pub _f: [::c_char; 0],
+    }
+
+    // FIXME this is actually a union
+    pub struct sem_t {
+        __size: [::c_char; 32],
+        __align: [::c_long; 0],
+    }
+}
+
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
+
+pub const RLIM_INFINITY: ::rlim_t = 0xffff_ffff_ffff_ffff;
+
+pub const SYS_gettid: ::c_long = 5178;   // Valid for n64
+
+#[link(name = "util")]
+extern {
+    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/uclibc/mips/mod.rs
@@ -0,0 +1,476 @@
+pub const SFD_CLOEXEC: ::c_int = 0x080000;
+
+pub const NCCS: usize = 32;
+
+pub const O_TRUNC: ::c_int = 512;
+
+pub const O_CLOEXEC: ::c_int = 0x80000;
+
+pub const EBFONT: ::c_int = 59;
+pub const ENOSTR: ::c_int = 60;
+pub const ENODATA: ::c_int = 61;
+pub const ETIME: ::c_int = 62;
+pub const ENOSR: ::c_int = 63;
+pub const ENONET: ::c_int = 64;
+pub const ENOPKG: ::c_int = 65;
+pub const EREMOTE: ::c_int = 66;
+pub const ENOLINK: ::c_int = 67;
+pub const EADV: ::c_int = 68;
+pub const ESRMNT: ::c_int = 69;
+pub const ECOMM: ::c_int = 70;
+pub const EPROTO: ::c_int = 71;
+pub const EDOTDOT: ::c_int = 73;
+
+pub const SA_NODEFER: ::c_int = 0x40000000;
+pub const SA_RESETHAND: ::c_int = 0x80000000;
+pub const SA_RESTART: ::c_int = 0x10000000;
+pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
+
+pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
+
+pub const EFD_CLOEXEC: ::c_int = 0x80000;
+
+pub const BUFSIZ: ::c_uint = 4096;
+pub const TMP_MAX: ::c_uint = 238328;
+pub const FOPEN_MAX: ::c_uint = 16;
+pub const POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
+pub const POSIX_MADV_DONTNEED: ::c_int = 4;
+pub const _SC_2_C_VERSION: ::c_int = 96;
+pub const O_ACCMODE: ::c_int = 3;
+pub const O_DIRECT: ::c_int = 0x8000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+pub const ST_RELATIME: ::c_ulong = 4096;
+pub const NI_MAXHOST: ::socklen_t = 1025;
+
+pub const RLIMIT_NOFILE: ::c_int = 5;
+pub const RLIMIT_AS: ::c_int = 6;
+pub const RLIMIT_RSS: ::c_int = 7;
+pub const RLIMIT_NPROC: ::c_int = 8;
+pub const RLIMIT_MEMLOCK: ::c_int = 9;
+pub const RLIMIT_NLIMITS: ::c_int = 15;
+
+pub const O_APPEND: ::c_int = 8;
+pub const O_CREAT: ::c_int = 256;
+pub const O_EXCL: ::c_int = 1024;
+pub const O_NOCTTY: ::c_int = 2048;
+pub const O_NONBLOCK: ::c_int = 128;
+pub const O_SYNC: ::c_int = 0x10;
+pub const O_RSYNC: ::c_int = 0x10;
+pub const O_DSYNC: ::c_int = 0x10;
+pub const O_FSYNC: ::c_int = 0x10;
+pub const O_ASYNC: ::c_int = 0x1000;
+pub const O_NDELAY: ::c_int = 0x80;
+
+pub const SOCK_NONBLOCK: ::c_int = 128;
+
+pub const EDEADLK: ::c_int = 45;
+pub const ENAMETOOLONG: ::c_int = 78;
+pub const ENOLCK: ::c_int = 46;
+pub const ENOSYS: ::c_int = 89;
+pub const ENOTEMPTY: ::c_int = 93;
+pub const ELOOP: ::c_int = 90;
+pub const ENOMSG: ::c_int = 35;
+pub const EIDRM: ::c_int = 36;
+pub const ECHRNG: ::c_int = 37;
+pub const EL2NSYNC: ::c_int = 38;
+pub const EL3HLT: ::c_int = 39;
+pub const EL3RST: ::c_int = 40;
+pub const ELNRNG: ::c_int = 41;
+pub const EUNATCH: ::c_int = 42;
+pub const ENOCSI: ::c_int = 43;
+pub const EL2HLT: ::c_int = 44;
+pub const EBADE: ::c_int = 50;
+pub const EBADR: ::c_int = 51;
+pub const EXFULL: ::c_int = 52;
+pub const ENOANO: ::c_int = 53;
+pub const EBADRQC: ::c_int = 54;
+pub const EBADSLT: ::c_int = 55;
+pub const EDEADLOCK: ::c_int = 56;
+pub const EMULTIHOP: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 79;
+pub const ENOTUNIQ: ::c_int = 80;
+pub const EBADFD: ::c_int = 81;
+pub const EBADMSG: ::c_int = 77;
+pub const EREMCHG: ::c_int = 82;
+pub const ELIBACC: ::c_int = 83;
+pub const ELIBBAD: ::c_int = 84;
+pub const ELIBSCN: ::c_int = 85;
+pub const ELIBMAX: ::c_int = 86;
+pub const ELIBEXEC: ::c_int = 87;
+pub const EILSEQ: ::c_int = 88;
+pub const ERESTART: ::c_int = 91;
+pub const ESTRPIPE: ::c_int = 92;
+pub const EUSERS: ::c_int = 94;
+pub const ENOTSOCK: ::c_int = 95;
+pub const EDESTADDRREQ: ::c_int = 96;
+pub const EMSGSIZE: ::c_int = 97;
+pub const EPROTOTYPE: ::c_int = 98;
+pub const ENOPROTOOPT: ::c_int = 99;
+pub const EPROTONOSUPPORT: ::c_int = 120;
+pub const ESOCKTNOSUPPORT: ::c_int = 121;
+pub const EOPNOTSUPP: ::c_int = 122;
+pub const ENOTSUP: ::c_int = EOPNOTSUPP;
+pub const EPFNOSUPPORT: ::c_int = 123;
+pub const EAFNOSUPPORT: ::c_int = 124;
+pub const EADDRINUSE: ::c_int = 125;
+pub const EADDRNOTAVAIL: ::c_int = 126;
+pub const ENETDOWN: ::c_int = 127;
+pub const ENETUNREACH: ::c_int = 128;
+pub const ENETRESET: ::c_int = 129;
+pub const ECONNABORTED: ::c_int = 130;
+pub const ECONNRESET: ::c_int = 131;
+pub const ENOBUFS: ::c_int = 132;
+pub const EISCONN: ::c_int = 133;
+pub const ENOTCONN: ::c_int = 134;
+pub const ESHUTDOWN: ::c_int = 143;
+pub const ETOOMANYREFS: ::c_int = 144;
+pub const ETIMEDOUT: ::c_int = 145;
+pub const ECONNREFUSED: ::c_int = 146;
+pub const EHOSTDOWN: ::c_int = 147;
+pub const EHOSTUNREACH: ::c_int = 148;
+pub const EALREADY: ::c_int = 149;
+pub const EINPROGRESS: ::c_int = 150;
+pub const ESTALE: ::c_int = 151;
+pub const EUCLEAN: ::c_int = 135;
+pub const ENOTNAM: ::c_int = 137;
+pub const ENAVAIL: ::c_int = 138;
+pub const EISNAM: ::c_int = 139;
+pub const EREMOTEIO: ::c_int = 140;
+pub const EDQUOT: ::c_int = 1133;
+pub const ENOMEDIUM: ::c_int = 159;
+pub const EMEDIUMTYPE: ::c_int = 160;
+pub const ECANCELED: ::c_int = 158;
+pub const ENOKEY: ::c_int = 161;
+pub const EKEYEXPIRED: ::c_int = 162;
+pub const EKEYREVOKED: ::c_int = 163;
+pub const EKEYREJECTED: ::c_int = 164;
+pub const EOWNERDEAD: ::c_int = 165;
+pub const ENOTRECOVERABLE: ::c_int = 166;
+pub const ERFKILL: ::c_int = 167;
+
+pub const MAP_NORESERVE: ::c_int = 0x400;
+pub const MAP_ANON: ::c_int = 0x800;
+pub const MAP_ANONYMOUS: ::c_int = 0x800;
+pub const MAP_GROWSDOWN: ::c_int = 0x1000;
+pub const MAP_DENYWRITE: ::c_int = 0x2000;
+pub const MAP_EXECUTABLE: ::c_int = 0x4000;
+pub const MAP_LOCKED: ::c_int = 0x8000;
+pub const MAP_POPULATE: ::c_int = 0x10000;
+pub const MAP_NONBLOCK: ::c_int = 0x20000;
+pub const MAP_STACK: ::c_int = 0x40000;
+
+pub const SOCK_STREAM: ::c_int = 2;
+pub const SOCK_DGRAM: ::c_int = 1;
+pub const SOCK_SEQPACKET: ::c_int = 5;
+
+pub const SOL_SOCKET: ::c_int = 0xffff;
+
+pub const SO_REUSEADDR: ::c_int = 0x0004;
+pub const SO_KEEPALIVE: ::c_int = 0x0008;
+pub const SO_DONTROUTE: ::c_int = 0x0010;
+pub const SO_BROADCAST: ::c_int = 0x0020;
+pub const SO_LINGER: ::c_int = 0x0080;
+pub const SO_OOBINLINE: ::c_int = 0x0100;
+pub const SO_REUSEPORT: ::c_int = 0x0200;
+pub const SO_TYPE: ::c_int = 0x1008;
+pub const SO_STYLE: ::c_int = SO_TYPE;
+pub const SO_ERROR: ::c_int = 0x1007;
+pub const SO_SNDBUF: ::c_int = 0x1001;
+pub const SO_RCVBUF: ::c_int = 0x1002;
+pub const SO_SNDLOWAT: ::c_int = 0x1003;
+pub const SO_RCVLOWAT: ::c_int = 0x1004;
+pub const SO_SNDTIMEO: ::c_int = 0x1005;
+pub const SO_RCVTIMEO: ::c_int = 0x1006;
+pub const SO_ACCEPTCONN: ::c_int = 0x1009;
+pub const SO_PROTOCOL: ::c_int = 0x1028;
+pub const SO_DOMAIN: ::c_int = 0x1029;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_PASSCRED: ::c_int = 17;
+pub const SO_PEERCRED: ::c_int = 18;
+pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
+pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
+pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
+pub const SO_BINDTODEVICE: ::c_int = 25;
+pub const SO_ATTACH_FILTER: ::c_int = 26;
+pub const SO_DETACH_FILTER: ::c_int = 27;
+pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
+pub const SO_PEERNAME: ::c_int = 28;
+pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
+pub const SO_PEERSEC: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 31;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_PASSSEC: ::c_int = 34;
+pub const SO_TIMESTAMPNS: ::c_int = 35;
+pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
+pub const SO_MARK: ::c_int = 36;
+pub const SO_TIMESTAMPING: ::c_int = 37;
+pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
+pub const SO_RXQ_OVFL: ::c_int = 40;
+pub const SO_WIFI_STATUS: ::c_int = 41;
+pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
+pub const SO_PEEK_OFF: ::c_int = 42;
+pub const SO_NOFCS: ::c_int = 43;
+pub const SO_LOCK_FILTER: ::c_int = 44;
+pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
+pub const SO_BUSY_POLL: ::c_int = 46;
+pub const SO_MAX_PACING_RATE: ::c_int = 47;
+pub const SO_BPF_EXTENSIONS: ::c_int = 48;
+
+pub const FIOCLEX: ::c_ulong = 0x6601;
+pub const FIONBIO: ::c_ulong = 0x667e;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000008;
+pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
+
+pub const SIGCHLD: ::c_int = 18;
+pub const SIGBUS: ::c_int = 10;
+pub const SIGTTIN: ::c_int = 26;
+pub const SIGTTOU: ::c_int = 27;
+pub const SIGXCPU: ::c_int = 30;
+pub const SIGXFSZ: ::c_int = 31;
+pub const SIGVTALRM: ::c_int = 28;
+pub const SIGPROF: ::c_int = 29;
+pub const SIGWINCH: ::c_int = 20;
+pub const SIGUSR1: ::c_int = 16;
+pub const SIGUSR2: ::c_int = 17;
+pub const SIGCONT: ::c_int = 25;
+pub const SIGSTOP: ::c_int = 23;
+pub const SIGTSTP: ::c_int = 24;
+pub const SIGURG: ::c_int = 21;
+pub const SIGIO: ::c_int = 22;
+pub const SIGSYS: ::c_int = 12;
+pub const SIGPOLL: ::c_int = 22;
+pub const SIGPWR: ::c_int = 19;
+pub const SIG_SETMASK: ::c_int = 3;
+pub const SIG_BLOCK: ::c_int = 0x1;
+pub const SIG_UNBLOCK: ::c_int = 0x2;
+
+pub const POLLRDNORM: ::c_short = 0x040;
+pub const POLLWRNORM: ::c_short = 0x004;
+pub const POLLRDBAND: ::c_short = 0x080;
+pub const POLLWRBAND: ::c_short = 0x100;
+
+pub const PTHREAD_STACK_MIN: ::size_t = 16384;
+
+pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
+pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
+pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
+pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
+pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
+pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
+pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
+pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
+pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
+pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
+pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
+pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
+pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
+pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
+pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
+pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
+pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
+pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
+pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
+pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
+pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
+pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
+pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
+pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
+pub const TMPFS_MAGIC: ::c_long = 0x01021994;
+pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
+
+pub const VEOF: usize = 16;
+pub const VEOL: usize = 17;
+pub const VEOL2: usize = 6;
+pub const VMIN: usize = 4;
+pub const IEXTEN: ::tcflag_t = 0x00000100;
+pub const TOSTOP: ::tcflag_t = 0x00008000;
+pub const FLUSHO: ::tcflag_t = 0x00002000;
+pub const IUTF8: ::tcflag_t = 0x00004000;
+pub const TCSANOW: ::c_int = 0x540e;
+pub const TCSADRAIN: ::c_int = 0x540f;
+pub const TCSAFLUSH: ::c_int = 0x5410;
+
+pub const CPU_SETSIZE: ::c_int = 0x400;
+
+pub const PTRACE_TRACEME: ::c_uint = 0;
+pub const PTRACE_PEEKTEXT: ::c_uint = 1;
+pub const PTRACE_PEEKDATA: ::c_uint = 2;
+pub const PTRACE_PEEKUSER: ::c_uint = 3;
+pub const PTRACE_POKETEXT: ::c_uint = 4;
+pub const PTRACE_POKEDATA: ::c_uint = 5;
+pub const PTRACE_POKEUSER: ::c_uint = 6;
+pub const PTRACE_CONT: ::c_uint = 7;
+pub const PTRACE_KILL: ::c_uint = 8;
+pub const PTRACE_SINGLESTEP: ::c_uint = 9;
+pub const PTRACE_ATTACH: ::c_uint = 16;
+pub const PTRACE_DETACH: ::c_uint = 17;
+pub const PTRACE_SYSCALL: ::c_uint = 24;
+pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
+pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
+pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
+pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
+pub const PTRACE_GETFPREGS: ::c_uint = 14;
+pub const PTRACE_SETFPREGS: ::c_uint = 15;
+pub const PTRACE_GETFPXREGS: ::c_uint = 18;
+pub const PTRACE_SETFPXREGS: ::c_uint = 19;
+pub const PTRACE_GETREGS: ::c_uint = 12;
+pub const PTRACE_SETREGS: ::c_uint = 13;
+
+pub const EFD_NONBLOCK: ::c_int = 0x80;
+
+pub const F_GETLK: ::c_int = 14;
+pub const F_GETOWN: ::c_int = 23;
+pub const F_SETOWN: ::c_int = 24;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+
+pub const SFD_NONBLOCK: ::c_int = 0x80;
+
+pub const TCGETS: ::c_ulong = 0x540d;
+pub const TCSETS: ::c_ulong = 0x540e;
+pub const TCSETSW: ::c_ulong = 0x540f;
+pub const TCSETSF: ::c_ulong = 0x5410;
+pub const TCGETA: ::c_ulong = 0x5401;
+pub const TCSETA: ::c_ulong = 0x5402;
+pub const TCSETAW: ::c_ulong = 0x5403;
+pub const TCSETAF: ::c_ulong = 0x5404;
+pub const TCSBRK: ::c_ulong = 0x5405;
+pub const TCXONC: ::c_ulong = 0x5406;
+pub const TCFLSH: ::c_ulong = 0x5407;
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
+pub const TIOCINQ: ::c_ulong = 0x467f;
+pub const TIOCLINUX: ::c_ulong = 0x5483;
+pub const TIOCGSERIAL: ::c_ulong = 0x5484;
+pub const TIOCEXCL: ::c_ulong = 0x740d;
+pub const TIOCNXCL: ::c_ulong = 0x740e;
+pub const TIOCSCTTY: ::c_ulong = 0x5480;
+pub const TIOCGPGRP: ::c_ulong = 0x40047477;
+pub const TIOCSPGRP: ::c_ulong = 0x80047476;
+pub const TIOCOUTQ: ::c_ulong = 0x7472;
+pub const TIOCSTI: ::c_ulong = 0x5472;
+pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
+pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
+pub const TIOCMGET: ::c_ulong = 0x741d;
+pub const TIOCMBIS: ::c_ulong = 0x741b;
+pub const TIOCMBIC: ::c_ulong = 0x741c;
+pub const TIOCMSET: ::c_ulong = 0x741a;
+pub const FIONREAD: ::c_ulong = 0x467f;
+pub const TIOCCONS: ::c_ulong = 0x80047478;
+
+pub const RTLD_DEEPBIND: ::c_int = 0x10;
+pub const RTLD_GLOBAL: ::c_int = 0x4;
+pub const RTLD_NOLOAD: ::c_int = 0x8;
+
+pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
+pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
+pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
+pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
+pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
+
+pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
+pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
+pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
+pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
+pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
+pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
+pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
+pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const CBAUD: ::tcflag_t = 0o0010017;
+pub const TAB1: ::c_int = 0x00000800;
+pub const TAB2: ::c_int = 0x00001000;
+pub const TAB3: ::c_int = 0x00001800;
+pub const CR1: ::c_int  = 0x00000200;
+pub const CR2: ::c_int  = 0x00000400;
+pub const CR3: ::c_int  = 0x00000600;
+pub const FF1: ::c_int  = 0x00008000;
+pub const BS1: ::c_int  = 0x00002000;
+pub const VT1: ::c_int  = 0x00004000;
+pub const VWERASE: usize = 14;
+pub const VREPRINT: usize = 12;
+pub const VSUSP: usize = 10;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VDISCARD: usize = 13;
+pub const VTIME: usize = 5;
+pub const IXON: ::tcflag_t = 0x00000400;
+pub const IXOFF: ::tcflag_t = 0x00001000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x00000030;
+pub const CS6: ::tcflag_t = 0x00000010;
+pub const CS7: ::tcflag_t = 0x00000020;
+pub const CS8: ::tcflag_t = 0x00000030;
+pub const CSTOPB: ::tcflag_t = 0x00000040;
+pub const CREAD: ::tcflag_t = 0x00000080;
+pub const PARENB: ::tcflag_t = 0x00000100;
+pub const PARODD: ::tcflag_t = 0x00000200;
+pub const HUPCL: ::tcflag_t = 0x00000400;
+pub const CLOCAL: ::tcflag_t = 0x00000800;
+pub const ECHOKE: ::tcflag_t = 0x00000800;
+pub const ECHOE: ::tcflag_t = 0x00000010;
+pub const ECHOK: ::tcflag_t = 0x00000020;
+pub const ECHONL: ::tcflag_t = 0x00000040;
+pub const ECHOPRT: ::tcflag_t = 0x00000400;
+pub const ECHOCTL: ::tcflag_t = 0x00000200;
+pub const ISIG: ::tcflag_t = 0x00000001;
+pub const ICANON: ::tcflag_t = 0x00000002;
+pub const PENDIN: ::tcflag_t = 0x00004000;
+pub const NOFLSH: ::tcflag_t = 0x00000080;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+
+cfg_if! {
+    if #[cfg(target_arch = "mips")] {
+        mod mips32;
+        pub use self::mips32::*;
+    } else if #[cfg(target_arch = "mips64")] {
+        mod mips64;
+        pub use self::mips64::*;
+    } else {
+        // Unknown target_arch
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/uclibc/mod.rs
@@ -0,0 +1,1825 @@
+use dox::{mem, Option};
+
+pub type sa_family_t = u16;
+pub type pthread_key_t = ::c_uint;
+pub type speed_t = ::c_uint;
+pub type tcflag_t = ::c_uint;
+pub type loff_t = ::c_longlong;
+pub type clockid_t = ::c_int;
+pub type key_t = ::c_int;
+pub type id_t = ::c_uint;
+pub type useconds_t = u32;
+pub type dev_t = u64;
+pub type socklen_t = u32;
+pub type pthread_t = ::c_ulong;
+pub type mode_t = u32;
+pub type ino64_t = u64;
+pub type off64_t = i64;
+pub type blkcnt64_t = i64;
+pub type rlim64_t = u64;
+pub type shmatt_t = ::c_ulong;
+pub type mqd_t = ::c_int;
+pub type msgqnum_t = ::c_ulong;
+pub type msglen_t = ::c_ulong;
+pub type nfds_t = ::c_ulong;
+pub type nl_item = ::c_int;
+pub type idtype_t = ::c_uint;
+
+pub enum fpos64_t {} // TODO: fill this out with a struct
+
+pub enum timezone {}
+
+s! {
+    pub struct sockaddr {
+        pub sa_family: sa_family_t,
+        pub sa_data: [::c_char; 14],
+    }
+
+    pub struct sockaddr_in {
+        pub sin_family: sa_family_t,
+        pub sin_port: ::in_port_t,
+        pub sin_addr: ::in_addr,
+        pub sin_zero: [u8; 8],
+    }
+
+    pub struct sockaddr_in6 {
+        pub sin6_family: sa_family_t,
+        pub sin6_port: ::in_port_t,
+        pub sin6_flowinfo: u32,
+        pub sin6_addr: ::in6_addr,
+        pub sin6_scope_id: u32,
+    }
+
+    pub struct sockaddr_un {
+        pub sun_family: sa_family_t,
+        pub sun_path: [::c_char; 108]
+    }
+
+    pub struct sockaddr_storage {
+        pub ss_family: sa_family_t,
+        __ss_align: ::size_t,
+        #[cfg(target_pointer_width = "32")]
+        __ss_pad2: [u8; 128 - 2 * 4],
+        #[cfg(target_pointer_width = "64")]
+        __ss_pad2: [u8; 128 - 2 * 8],
+    }
+
+    pub struct addrinfo {
+        pub ai_flags: ::c_int,
+        pub ai_family: ::c_int,
+        pub ai_socktype: ::c_int,
+        pub ai_protocol: ::c_int,
+        pub ai_addrlen: socklen_t,
+
+        pub ai_addr: *mut ::sockaddr,
+
+        pub ai_canonname: *mut c_char,
+
+        pub ai_next: *mut addrinfo,
+    }
+
+    pub struct sockaddr_nl {
+        pub nl_family: ::sa_family_t,
+        nl_pad: ::c_ushort,
+        pub nl_pid: u32,
+        pub nl_groups: u32
+    }
+
+    pub struct sockaddr_ll {
+        pub sll_family: ::c_ushort,
+        pub sll_protocol: ::c_ushort,
+        pub sll_ifindex: ::c_int,
+        pub sll_hatype: ::c_ushort,
+        pub sll_pkttype: ::c_uchar,
+        pub sll_halen: ::c_uchar,
+        pub sll_addr: [::c_uchar; 8]
+    }
+
+    pub struct fd_set {
+        fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
+    }
+
+    pub struct tm {
+        pub tm_sec: ::c_int,
+        pub tm_min: ::c_int,
+        pub tm_hour: ::c_int,
+        pub tm_mday: ::c_int,
+        pub tm_mon: ::c_int,
+        pub tm_year: ::c_int,
+        pub tm_wday: ::c_int,
+        pub tm_yday: ::c_int,
+        pub tm_isdst: ::c_int,
+        pub tm_gmtoff: ::c_long,
+        pub tm_zone: *const ::c_char,
+    }
+
+    pub struct sched_param {
+        pub sched_priority: ::c_int,
+    }
+
+    pub struct Dl_info {
+        pub dli_fname: *const ::c_char,
+        pub dli_fbase: *mut ::c_void,
+        pub dli_sname: *const ::c_char,
+        pub dli_saddr: *mut ::c_void,
+    }
+
+    #[cfg_attr(any(all(target_arch = "x86",
+                   target_arch = "x86_64")),
+               repr(packed))]
+    pub struct epoll_event {
+        pub events: ::uint32_t,
+        pub u64: ::uint64_t,
+    }
+
+    pub struct utsname {
+        pub sysname: [::c_char; 65],
+        pub nodename: [::c_char; 65],
+        pub release: [::c_char; 65],
+        pub version: [::c_char; 65],
+        pub machine: [::c_char; 65],
+        pub domainname: [::c_char; 65]
+    }
+
+    pub struct lconv {
+        pub decimal_point: *mut ::c_char,
+        pub thousands_sep: *mut ::c_char,
+        pub grouping: *mut ::c_char,
+        pub int_curr_symbol: *mut ::c_char,
+        pub currency_symbol: *mut ::c_char,
+        pub mon_decimal_point: *mut ::c_char,
+        pub mon_thousands_sep: *mut ::c_char,
+        pub mon_grouping: *mut ::c_char,
+        pub positive_sign: *mut ::c_char,
+        pub negative_sign: *mut ::c_char,
+        pub int_frac_digits: ::c_char,
+        pub frac_digits: ::c_char,
+        pub p_cs_precedes: ::c_char,
+        pub p_sep_by_space: ::c_char,
+        pub n_cs_precedes: ::c_char,
+        pub n_sep_by_space: ::c_char,
+        pub p_sign_posn: ::c_char,
+        pub n_sign_posn: ::c_char,
+        pub int_p_cs_precedes: ::c_char,
+        pub int_p_sep_by_space: ::c_char,
+        pub int_n_cs_precedes: ::c_char,
+        pub int_n_sep_by_space: ::c_char,
+        pub int_p_sign_posn: ::c_char,
+        pub int_n_sign_posn: ::c_char,
+    }
+
+    pub struct sigevent {
+        pub sigev_value: ::sigval,
+        pub sigev_signo: ::c_int,
+        pub sigev_notify: ::c_int,
+        // Actually a union.  We only expose sigev_notify_thread_id because it's
+        // the most useful member
+        pub sigev_notify_thread_id: ::c_int,
+        #[cfg(target_pointer_width = "64")]
+        __unused1: [::c_int; 11],
+        #[cfg(target_pointer_width = "32")]
+        __unused1: [::c_int; 12]
+    }
+
+    pub struct dirent {
+        pub d_ino: ::ino_t,
+        pub d_off: ::off_t,
+        pub d_reclen: ::c_ushort,
+        pub d_type: ::c_uchar,
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct dirent64 {
+        pub d_ino: ::ino64_t,
+        pub d_off: ::off64_t,
+        pub d_reclen: ::c_ushort,
+        pub d_type: ::c_uchar,
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct rlimit64 {
+        pub rlim_cur: rlim64_t,
+        pub rlim_max: rlim64_t,
+    }
+
+    pub struct glob_t {
+        pub gl_pathc: ::size_t,
+        pub gl_pathv: *mut *mut c_char,
+        pub gl_offs: ::size_t,
+        pub gl_flags: ::c_int,
+
+        __unused1: *mut ::c_void,
+        __unused2: *mut ::c_void,
+        __unused3: *mut ::c_void,
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+    }
+
+    pub struct ifaddrs {
+        pub ifa_next: *mut ifaddrs,
+        pub ifa_name: *mut c_char,
+        pub ifa_flags: ::c_uint,
+        pub ifa_addr: *mut ::sockaddr,
+        pub ifa_netmask: *mut ::sockaddr,
+        pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union
+        pub ifa_data: *mut ::c_void
+    }
+
+    pub struct pthread_mutex_t {
+        #[cfg(any(target_arch = "mips", target_arch = "arm",
+                  target_arch = "powerpc"))]
+        __align: [::c_long; 0],
+        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
+                      target_arch = "powerpc")))]
+        __align: [::c_longlong; 0],
+        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
+    }
+
+    pub struct pthread_rwlock_t {
+        #[cfg(any(target_arch = "mips", target_arch = "arm",
+                  target_arch = "powerpc"))]
+        __align: [::c_long; 0],
+        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
+                      target_arch = "powerpc")))]
+        __align: [::c_longlong; 0],
+        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
+    }
+
+    pub struct pthread_mutexattr_t {
+        #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
+                  target_arch = "mips64", target_arch = "s390x",
+                  target_arch = "sparc64"))]
+        __align: [::c_int; 0],
+        #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
+                      target_arch = "mips64", target_arch = "s390x",
+                      target_arch = "sparc64")))]
+        __align: [::c_long; 0],
+        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
+    }
+
+    pub struct pthread_rwlockattr_t {
+        __lockkind: ::c_int,
+        __pshared: ::c_int,
+    }
+
+    pub struct pthread_cond_t {
+        __align: [::c_longlong; 0],
+        size: [u8; __SIZEOF_PTHREAD_COND_T],
+    }
+
+    pub struct pthread_condattr_t {
+        __align: [::c_int; 0],
+        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
+    }
+
+    pub struct passwd {
+        pub pw_name: *mut ::c_char,
+        pub pw_passwd: *mut ::c_char,
+        pub pw_uid: ::uid_t,
+        pub pw_gid: ::gid_t,
+        pub pw_gecos: *mut ::c_char,
+        pub pw_dir: *mut ::c_char,
+        pub pw_shell: *mut ::c_char,
+    }
+
+    pub struct spwd {
+        pub sp_namp: *mut ::c_char,
+        pub sp_pwdp: *mut ::c_char,
+        pub sp_lstchg: ::c_long,
+        pub sp_min: ::c_long,
+        pub sp_max: ::c_long,
+        pub sp_warn: ::c_long,
+        pub sp_inact: ::c_long,
+        pub sp_expire: ::c_long,
+        pub sp_flag: ::c_ulong,
+    }
+
+    pub struct statvfs {
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_favail: ::fsfilcnt_t,
+        #[cfg(target_endian = "little")]
+        pub f_fsid: ::c_ulong,
+        #[cfg(target_pointer_width = "32")]
+        __f_unused: ::c_int,
+        #[cfg(target_endian = "big")]
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct dqblk {
+        pub dqb_bhardlimit: ::uint32_t,
+        pub dqb_bsoftlimit: ::uint32_t,
+        pub dqb_curblocks: ::uint32_t,
+        pub dqb_ihardlimit: ::uint32_t,
+        pub dqb_isoftlimit: ::uint32_t,
+        pub dqb_curinodes: ::uint32_t,
+        pub dqb_btime: ::time_t,
+        pub dqb_itime: ::time_t,
+    }
+
+    pub struct signalfd_siginfo {
+        pub ssi_signo: ::uint32_t,
+        pub ssi_errno: ::int32_t,
+        pub ssi_code: ::int32_t,
+        pub ssi_pid: ::uint32_t,
+        pub ssi_uid: ::uint32_t,
+        pub ssi_fd: ::int32_t,
+        pub ssi_tid: ::uint32_t,
+        pub ssi_band: ::uint32_t,
+        pub ssi_overrun: ::uint32_t,
+        pub ssi_trapno: ::uint32_t,
+        pub ssi_status: ::int32_t,
+        pub ssi_int: ::int32_t,
+        pub ssi_ptr: ::uint64_t,
+        pub ssi_utime: ::uint64_t,
+        pub ssi_stime: ::uint64_t,
+        pub ssi_addr: ::uint64_t,
+        _pad: [::uint8_t; 48],
+    }
+
+    pub struct fsid_t {
+        __val: [::c_int; 2],
+    }
+
+    pub struct mq_attr {
+        pub mq_flags: ::c_long,
+        pub mq_maxmsg: ::c_long,
+        pub mq_msgsize: ::c_long,
+        pub mq_curmsgs: ::c_long,
+        pad: [::c_long; 4]
+    }
+
+    pub struct cpu_set_t {
+        #[cfg(target_pointer_width = "32")]
+        bits: [u32; 32],
+        #[cfg(target_pointer_width = "64")]
+        bits: [u64; 16],
+    }
+
+    pub struct if_nameindex {
+        pub if_index: ::c_uint,
+        pub if_name: *mut ::c_char,
+    }
+
+    // System V IPC
+    pub struct msginfo {
+        pub msgpool: ::c_int,
+        pub msgmap: ::c_int,
+        pub msgmax: ::c_int,
+        pub msgmnb: ::c_int,
+        pub msgmni: ::c_int,
+        pub msgssz: ::c_int,
+        pub msgtql: ::c_int,
+        pub msgseg: ::c_ushort,
+    }
+}
+
+// intentionally not public, only used for fd_set
+cfg_if! {
+    if #[cfg(target_pointer_width = "32")] {
+        const ULONG_SIZE: usize = 32;
+    } else if #[cfg(target_pointer_width = "64")] {
+        const ULONG_SIZE: usize = 64;
+    } else {
+        // Unknown target_pointer_width
+    }
+}
+
+pub const EXIT_FAILURE: ::c_int = 1;
+pub const EXIT_SUCCESS: ::c_int = 0;
+pub const RAND_MAX: ::c_int = 2147483647;
+pub const EOF: ::c_int = -1;
+pub const SEEK_SET: ::c_int = 0;
+pub const SEEK_CUR: ::c_int = 1;
+pub const SEEK_END: ::c_int = 2;
+pub const _IOFBF: ::c_int = 0;
+pub const _IONBF: ::c_int = 2;
+pub const _IOLBF: ::c_int = 1;
+
+pub const F_DUPFD: ::c_int = 0;
+pub const F_GETFD: ::c_int = 1;
+pub const F_SETFD: ::c_int = 2;
+pub const F_GETFL: ::c_int = 3;
+pub const F_SETFL: ::c_int = 4;
+
+// Linux-specific fcntls
+pub const F_SETLEASE: ::c_int = 1024;
+pub const F_GETLEASE: ::c_int = 1025;
+pub const F_NOTIFY: ::c_int = 1026;
+pub const F_DUPFD_CLOEXEC: ::c_int = 1030;
+
+// TODO(#235): Include file sealing fcntls once we have a way to verify them.
+
+pub const SIGTRAP: ::c_int = 5;
+
+pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
+pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
+
+pub const CLOCK_REALTIME: ::clockid_t = 0;
+pub const CLOCK_MONOTONIC: ::clockid_t = 1;
+pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2;
+pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 3;
+// TODO(#247) Someday our Travis shall have glibc 2.21 (released in Sep
+// 2014.) See also musl/mod.rs
+// pub const CLOCK_SGI_CYCLE: ::clockid_t = 10;
+// pub const CLOCK_TAI: ::clockid_t = 11;
+pub const TIMER_ABSTIME: ::c_int = 1;
+
+pub const RLIMIT_CPU: ::c_int = 0;
+pub const RLIMIT_FSIZE: ::c_int = 1;
+pub const RLIMIT_DATA: ::c_int = 2;
+pub const RLIMIT_STACK: ::c_int = 3;
+pub const RLIMIT_CORE: ::c_int = 4;
+pub const RLIMIT_LOCKS: ::c_int = 10;
+pub const RLIMIT_SIGPENDING: ::c_int = 11;
+pub const RLIMIT_MSGQUEUE: ::c_int = 12;
+pub const RLIMIT_NICE: ::c_int = 13;
+pub const RLIMIT_RTPRIO: ::c_int = 14;
+
+pub const RUSAGE_SELF: ::c_int = 0;
+
+pub const O_RDONLY: ::c_int = 0;
+pub const O_WRONLY: ::c_int = 1;
+pub const O_RDWR: ::c_int = 2;
+
+pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
+
+pub const S_IFIFO: ::mode_t = 4096;
+pub const S_IFCHR: ::mode_t = 8192;
+pub const S_IFBLK: ::mode_t = 24576;
+pub const S_IFDIR: ::mode_t = 16384;
+pub const S_IFREG: ::mode_t = 32768;
+pub const S_IFLNK: ::mode_t = 40960;
+pub const S_IFSOCK: ::mode_t = 49152;
+pub const S_IFMT: ::mode_t = 61440;
+pub const S_IRWXU: ::mode_t = 448;
+pub const S_IXUSR: ::mode_t = 64;
+pub const S_IWUSR: ::mode_t = 128;
+pub const S_IRUSR: ::mode_t = 256;
+pub const S_IRWXG: ::mode_t = 56;
+pub const S_IXGRP: ::mode_t = 8;
+pub const S_IWGRP: ::mode_t = 16;
+pub const S_IRGRP: ::mode_t = 32;
+pub const S_IRWXO: ::mode_t = 7;
+pub const S_IXOTH: ::mode_t = 1;
+pub const S_IWOTH: ::mode_t = 2;
+pub const S_IROTH: ::mode_t = 4;
+pub const F_OK: ::c_int = 0;
+pub const R_OK: ::c_int = 4;
+pub const W_OK: ::c_int = 2;
+pub const X_OK: ::c_int = 1;
+pub const STDIN_FILENO: ::c_int = 0;
+pub const STDOUT_FILENO: ::c_int = 1;
+pub const STDERR_FILENO: ::c_int = 2;
+pub const SIGHUP: ::c_int = 1;
+pub const SIGINT: ::c_int = 2;
+pub const SIGQUIT: ::c_int = 3;
+pub const SIGILL: ::c_int = 4;
+pub const SIGABRT: ::c_int = 6;
+pub const SIGFPE: ::c_int = 8;
+pub const SIGKILL: ::c_int = 9;
+pub const SIGSEGV: ::c_int = 11;
+pub const SIGPIPE: ::c_int = 13;
+pub const SIGALRM: ::c_int = 14;
+pub const SIGTERM: ::c_int = 15;
+
+pub const PROT_NONE: ::c_int = 0;
+pub const PROT_READ: ::c_int = 1;
+pub const PROT_WRITE: ::c_int = 2;
+pub const PROT_EXEC: ::c_int = 4;
+
+pub const LC_CTYPE: ::c_int = 0;
+pub const LC_NUMERIC: ::c_int = 1;
+pub const LC_MONETARY: ::c_int = 2;
+pub const LC_TIME: ::c_int = 3;
+pub const LC_COLLATE: ::c_int = 4;
+pub const LC_MESSAGES: ::c_int = 5;
+pub const LC_ALL: ::c_int = 6;
+pub const LC_CTYPE_MASK: ::c_int = (1 << LC_CTYPE);
+pub const LC_NUMERIC_MASK: ::c_int = (1 << LC_NUMERIC);
+pub const LC_TIME_MASK: ::c_int = (1 << LC_TIME);
+pub const LC_COLLATE_MASK: ::c_int = (1 << LC_COLLATE);
+pub const LC_MONETARY_MASK: ::c_int = (1 << LC_MONETARY);
+pub const LC_MESSAGES_MASK: ::c_int = (1 << LC_MESSAGES);
+// LC_ALL_MASK defined per platform
+
+pub const MAP_FILE: ::c_int = 0x0000;
+pub const MAP_SHARED: ::c_int = 0x0001;
+pub const MAP_PRIVATE: ::c_int = 0x0002;
+pub const MAP_FIXED: ::c_int = 0x0010;
+
+pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
+
+// MS_ flags for msync(2)
+pub const MS_ASYNC: ::c_int = 0x0001;
+pub const MS_INVALIDATE: ::c_int = 0x0002;
+pub const MS_SYNC: ::c_int = 0x0004;
+
+// MS_ flags for mount(2)
+pub const MS_RDONLY: ::c_ulong = 0x01;
+pub const MS_NOSUID: ::c_ulong = 0x02;
+pub const MS_NODEV: ::c_ulong = 0x04;
+pub const MS_NOEXEC: ::c_ulong = 0x08;
+pub const MS_SYNCHRONOUS: ::c_ulong = 0x10;
+pub const MS_REMOUNT: ::c_ulong = 0x20;
+pub const MS_MANDLOCK: ::c_ulong = 0x40;
+pub const MS_NOATIME: ::c_ulong = 0x0400;
+pub const MS_NODIRATIME: ::c_ulong = 0x0800;
+pub const MS_BIND: ::c_ulong = 0x1000;
+pub const MS_NOUSER: ::c_ulong = 0x80000000;
+pub const MS_MGC_VAL: ::c_ulong = 0xc0ed0000;
+pub const MS_MGC_MSK: ::c_ulong = 0xffff0000;
+pub const MS_RMT_MASK: ::c_ulong = 0x800051;
+
+pub const EPERM: ::c_int = 1;
+pub const ENOENT: ::c_int = 2;
+pub const ESRCH: ::c_int = 3;
+pub const EINTR: ::c_int = 4;
+pub const EIO: ::c_int = 5;
+pub const ENXIO: ::c_int = 6;
+pub const E2BIG: ::c_int = 7;
+pub const ENOEXEC: ::c_int = 8;
+pub const EBADF: ::c_int = 9;
+pub const ECHILD: ::c_int = 10;
+pub const EAGAIN: ::c_int = 11;
+pub const ENOMEM: ::c_int = 12;
+pub const EACCES: ::c_int = 13;
+pub const EFAULT: ::c_int = 14;
+pub const ENOTBLK: ::c_int = 15;
+pub const EBUSY: ::c_int = 16;
+pub const EEXIST: ::c_int = 17;
+pub const EXDEV: ::c_int = 18;
+pub const ENODEV: ::c_int = 19;
+pub const ENOTDIR: ::c_int = 20;
+pub const EISDIR: ::c_int = 21;
+pub const EINVAL: ::c_int = 22;
+pub const ENFILE: ::c_int = 23;
+pub const EMFILE: ::c_int = 24;
+pub const ENOTTY: ::c_int = 25;
+pub const ETXTBSY: ::c_int = 26;
+pub const EFBIG: ::c_int = 27;
+pub const ENOSPC: ::c_int = 28;
+pub const ESPIPE: ::c_int = 29;
+pub const EROFS: ::c_int = 30;
+pub const EMLINK: ::c_int = 31;
+pub const EPIPE: ::c_int = 32;
+pub const EDOM: ::c_int = 33;
+pub const ERANGE: ::c_int = 34;
+pub const EWOULDBLOCK: ::c_int = EAGAIN;
+
+pub const SCM_RIGHTS: ::c_int = 0x01;
+pub const SCM_CREDENTIALS: ::c_int = 0x02;
+
+pub const IPPROTO_RAW: ::c_int = 255;
+
+pub const PROT_GROWSDOWN: ::c_int = 0x1000000;
+pub const PROT_GROWSUP: ::c_int = 0x2000000;
+
+pub const MAP_TYPE: ::c_int = 0x000f;
+
+pub const MADV_NORMAL: ::c_int = 0;
+pub const MADV_RANDOM: ::c_int = 1;
+pub const MADV_SEQUENTIAL: ::c_int = 2;
+pub const MADV_WILLNEED: ::c_int = 3;
+pub const MADV_DONTNEED: ::c_int = 4;
+pub const MADV_REMOVE: ::c_int = 9;
+pub const MADV_DONTFORK: ::c_int = 10;
+pub const MADV_DOFORK: ::c_int = 11;
+pub const MADV_MERGEABLE: ::c_int = 12;
+pub const MADV_UNMERGEABLE: ::c_int = 13;
+pub const MADV_HWPOISON: ::c_int = 100;
+
+pub const IFF_UP: ::c_int = 0x1;
+pub const IFF_BROADCAST: ::c_int = 0x2;
+pub const IFF_DEBUG: ::c_int = 0x4;
+pub const IFF_LOOPBACK: ::c_int = 0x8;
+pub const IFF_POINTOPOINT: ::c_int = 0x10;
+pub const IFF_NOTRAILERS: ::c_int = 0x20;
+pub const IFF_RUNNING: ::c_int = 0x40;
+pub const IFF_NOARP: ::c_int = 0x80;
+pub const IFF_PROMISC: ::c_int = 0x100;
+pub const IFF_ALLMULTI: ::c_int = 0x200;
+pub const IFF_MASTER: ::c_int = 0x400;
+pub const IFF_SLAVE: ::c_int = 0x800;
+pub const IFF_MULTICAST: ::c_int = 0x1000;
+pub const IFF_PORTSEL: ::c_int = 0x2000;
+pub const IFF_AUTOMEDIA: ::c_int = 0x4000;
+pub const IFF_DYNAMIC: ::c_int = 0x8000;
+
+pub const SOL_IP: ::c_int = 0;
+pub const SOL_TCP: ::c_int = 6;
+pub const SOL_IPV6: ::c_int = 41;
+pub const SOL_ICMPV6: ::c_int = 58;
+pub const SOL_RAW: ::c_int = 255;
+pub const SOL_DECNET: ::c_int = 261;
+pub const SOL_X25: ::c_int = 262;
+pub const SOL_PACKET: ::c_int = 263;
+pub const SOL_ATM: ::c_int = 264;
+pub const SOL_AAL: ::c_int = 265;
+pub const SOL_IRDA: ::c_int = 266;
+
+pub const AF_UNSPEC: ::c_int = 0;
+pub const AF_UNIX: ::c_int = 1;
+pub const AF_LOCAL: ::c_int = 1;
+pub const AF_INET: ::c_int = 2;
+pub const AF_AX25: ::c_int = 3;
+pub const AF_IPX: ::c_int = 4;
+pub const AF_APPLETALK: ::c_int = 5;
+pub const AF_NETROM: ::c_int = 6;
+pub const AF_BRIDGE: ::c_int = 7;
+pub const AF_ATMPVC: ::c_int = 8;
+pub const AF_X25: ::c_int = 9;
+pub const AF_INET6: ::c_int = 10;
+pub const AF_ROSE: ::c_int = 11;
+pub const AF_DECnet: ::c_int = 12;
+pub const AF_NETBEUI: ::c_int = 13;
+pub const AF_SECURITY: ::c_int = 14;
+pub const AF_KEY: ::c_int = 15;
+pub const AF_NETLINK: ::c_int = 16;
+pub const AF_ROUTE: ::c_int = AF_NETLINK;
+pub const AF_PACKET: ::c_int = 17;
+pub const AF_ASH: ::c_int = 18;
+pub const AF_ECONET: ::c_int = 19;
+pub const AF_ATMSVC: ::c_int = 20;
+pub const AF_SNA: ::c_int = 22;
+pub const AF_IRDA: ::c_int = 23;
+pub const AF_PPPOX: ::c_int = 24;
+pub const AF_WANPIPE: ::c_int = 25;
+pub const AF_LLC: ::c_int = 26;
+pub const AF_CAN: ::c_int = 29;
+pub const AF_TIPC: ::c_int = 30;
+pub const AF_BLUETOOTH: ::c_int = 31;
+pub const AF_IUCV: ::c_int = 32;
+pub const AF_RXRPC: ::c_int = 33;
+pub const AF_ISDN: ::c_int = 34;
+pub const AF_PHONET: ::c_int = 35;
+pub const AF_IEEE802154: ::c_int = 36;
+pub const AF_CAIF: ::c_int = 37;
+pub const AF_ALG: ::c_int = 38;
+
+pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
+pub const PF_UNIX: ::c_int = AF_UNIX;
+pub const PF_LOCAL: ::c_int = AF_LOCAL;
+pub const PF_INET: ::c_int = AF_INET;
+pub const PF_AX25: ::c_int = AF_AX25;
+pub const PF_IPX: ::c_int = AF_IPX;
+pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
+pub const PF_NETROM: ::c_int = AF_NETROM;
+pub const PF_BRIDGE: ::c_int = AF_BRIDGE;
+pub const PF_ATMPVC: ::c_int = AF_ATMPVC;
+pub const PF_X25: ::c_int = AF_X25;
+pub const PF_INET6: ::c_int = AF_INET6;
+pub const PF_ROSE: ::c_int = AF_ROSE;
+pub const PF_DECnet: ::c_int = AF_DECnet;
+pub const PF_NETBEUI: ::c_int = AF_NETBEUI;
+pub const PF_SECURITY: ::c_int = AF_SECURITY;
+pub const PF_KEY: ::c_int = AF_KEY;
+pub const PF_NETLINK: ::c_int = AF_NETLINK;
+pub const PF_ROUTE: ::c_int = AF_ROUTE;
+pub const PF_PACKET: ::c_int = AF_PACKET;
+pub const PF_ASH: ::c_int = AF_ASH;
+pub const PF_ECONET: ::c_int = AF_ECONET;
+pub const PF_ATMSVC: ::c_int = AF_ATMSVC;
+pub const PF_SNA: ::c_int = AF_SNA;
+pub const PF_IRDA: ::c_int = AF_IRDA;
+pub const PF_PPPOX: ::c_int = AF_PPPOX;
+pub const PF_WANPIPE: ::c_int = AF_WANPIPE;
+pub const PF_LLC: ::c_int = AF_LLC;
+pub const PF_CAN: ::c_int = AF_CAN;
+pub const PF_TIPC: ::c_int = AF_TIPC;
+pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
+pub const PF_IUCV: ::c_int = AF_IUCV;
+pub const PF_RXRPC: ::c_int = AF_RXRPC;
+pub const PF_ISDN: ::c_int = AF_ISDN;
+pub const PF_PHONET: ::c_int = AF_PHONET;
+pub const PF_IEEE802154: ::c_int = AF_IEEE802154;
+pub const PF_CAIF: ::c_int = AF_CAIF;
+pub const PF_ALG: ::c_int = AF_ALG;
+
+pub const SOMAXCONN: ::c_int = 128;
+
+pub const MSG_OOB: ::c_int = 1;
+pub const MSG_PEEK: ::c_int = 2;
+pub const MSG_DONTROUTE: ::c_int = 4;
+pub const MSG_CTRUNC: ::c_int = 8;
+pub const MSG_TRUNC: ::c_int = 0x20;
+pub const MSG_DONTWAIT: ::c_int = 0x40;
+pub const MSG_EOR: ::c_int = 0x80;
+pub const MSG_WAITALL: ::c_int = 0x100;
+pub const MSG_FIN: ::c_int = 0x200;
+pub const MSG_SYN: ::c_int = 0x400;
+pub const MSG_CONFIRM: ::c_int = 0x800;
+pub const MSG_RST: ::c_int = 0x1000;
+pub const MSG_ERRQUEUE: ::c_int = 0x2000;
+pub const MSG_NOSIGNAL: ::c_int = 0x4000;
+pub const MSG_MORE: ::c_int = 0x8000;
+pub const MSG_WAITFORONE: ::c_int = 0x10000;
+pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000;
+
+pub const SOCK_RAW: ::c_int = 3;
+pub const IP_MULTICAST_TTL: ::c_int = 33;
+pub const IP_MULTICAST_LOOP: ::c_int = 34;
+pub const IP_TTL: ::c_int = 2;
+pub const IP_HDRINCL: ::c_int = 3;
+pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
+pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
+
+pub const IPV6_JOIN_GROUP: ::c_int = 20;
+pub const IPV6_LEAVE_GROUP: ::c_int = 21;
+
+pub const TCP_NODELAY: ::c_int = 1;
+pub const TCP_MAXSEG: ::c_int = 2;
+pub const TCP_CORK: ::c_int = 3;
+pub const TCP_KEEPIDLE: ::c_int = 4;
+pub const TCP_KEEPINTVL: ::c_int = 5;
+pub const TCP_KEEPCNT: ::c_int = 6;
+pub const TCP_SYNCNT: ::c_int = 7;
+pub const TCP_LINGER2: ::c_int = 8;
+pub const TCP_DEFER_ACCEPT: ::c_int = 9;
+pub const TCP_WINDOW_CLAMP: ::c_int = 10;
+pub const TCP_INFO: ::c_int = 11;
+pub const TCP_QUICKACK: ::c_int = 12;
+pub const TCP_CONGESTION: ::c_int = 13;
+
+pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
+pub const IPV6_V6ONLY: ::c_int = 26;
+
+pub const SO_DEBUG: ::c_int = 1;
+
+pub const SHUT_RD: ::c_int = 0;
+pub const SHUT_WR: ::c_int = 1;
+pub const SHUT_RDWR: ::c_int = 2;
+
+pub const LOCK_SH: ::c_int = 1;
+pub const LOCK_EX: ::c_int = 2;
+pub const LOCK_NB: ::c_int = 4;
+pub const LOCK_UN: ::c_int = 8;
+
+pub const SS_ONSTACK: ::c_int = 1;
+pub const SS_DISABLE: ::c_int = 2;
+
+pub const PATH_MAX: ::c_int = 4096;
+
+pub const FD_SETSIZE: usize = 1024;
+
+pub const EPOLLIN: ::c_int = 0x1;
+pub const EPOLLPRI: ::c_int = 0x2;
+pub const EPOLLOUT: ::c_int = 0x4;
+pub const EPOLLRDNORM: ::c_int = 0x40;
+pub const EPOLLRDBAND: ::c_int = 0x80;
+pub const EPOLLWRNORM: ::c_int = 0x100;
+pub const EPOLLWRBAND: ::c_int = 0x200;
+pub const EPOLLMSG: ::c_int = 0x400;
+pub const EPOLLERR: ::c_int = 0x8;
+pub const EPOLLHUP: ::c_int = 0x10;
+pub const EPOLLET: ::c_int = 0x80000000;
+
+pub const EPOLL_CTL_ADD: ::c_int = 1;
+pub const EPOLL_CTL_MOD: ::c_int = 3;
+pub const EPOLL_CTL_DEL: ::c_int = 2;
+
+pub const MNT_DETACH: ::c_int = 0x2;
+pub const MNT_EXPIRE: ::c_int = 0x4;
+
+pub const MNT_FORCE: ::c_int = 0x1;
+
+pub const Q_SYNC: ::c_int = 0x600;
+pub const Q_QUOTAON: ::c_int = 0x100;
+pub const Q_QUOTAOFF: ::c_int = 0x200;
+pub const Q_GETQUOTA: ::c_int = 0x300;
+pub const Q_SETQUOTA: ::c_int = 0x400;
+
+pub const TCIOFF: ::c_int = 2;
+pub const TCION: ::c_int = 3;
+pub const TCOOFF: ::c_int = 0;
+pub const TCOON: ::c_int = 1;
+pub const TCIFLUSH: ::c_int = 0;
+pub const TCOFLUSH: ::c_int = 1;
+pub const TCIOFLUSH: ::c_int = 2;
+pub const NL0: ::c_int  = 0x00000000;
+pub const NL1: ::c_int  = 0x00000100;
+pub const TAB0: ::c_int = 0x00000000;
+pub const CR0: ::c_int  = 0x00000000;
+pub const FF0: ::c_int  = 0x00000000;
+pub const BS0: ::c_int  = 0x00000000;
+pub const VT0: ::c_int  = 0x00000000;
+pub const VERASE: usize = 2;
+pub const VKILL: usize = 3;
+pub const VINTR: usize = 0;
+pub const VQUIT: usize = 1;
+pub const VLNEXT: usize = 15;
+pub const IGNBRK: ::tcflag_t = 0x00000001;
+pub const BRKINT: ::tcflag_t = 0x00000002;
+pub const IGNPAR: ::tcflag_t = 0x00000004;
+pub const PARMRK: ::tcflag_t = 0x00000008;
+pub const INPCK: ::tcflag_t = 0x00000010;
+pub const ISTRIP: ::tcflag_t = 0x00000020;
+pub const INLCR: ::tcflag_t = 0x00000040;
+pub const IGNCR: ::tcflag_t = 0x00000080;
+pub const ICRNL: ::tcflag_t = 0x00000100;
+pub const IXANY: ::tcflag_t = 0x00000800;
+pub const IMAXBEL: ::tcflag_t = 0x00002000;
+pub const OPOST: ::tcflag_t = 0x1;
+pub const CS5: ::tcflag_t = 0x00000000;
+pub const CRTSCTS: ::tcflag_t = 0x80000000;
+pub const ECHO: ::tcflag_t = 0x00000008;
+
+pub const CLONE_VM: ::c_int = 0x100;
+pub const CLONE_FS: ::c_int = 0x200;
+pub const CLONE_FILES: ::c_int = 0x400;
+pub const CLONE_SIGHAND: ::c_int = 0x800;
+pub const CLONE_PTRACE: ::c_int = 0x2000;
+pub const CLONE_VFORK: ::c_int = 0x4000;
+pub const CLONE_PARENT: ::c_int = 0x8000;
+pub const CLONE_THREAD: ::c_int = 0x10000;
+pub const CLONE_NEWNS: ::c_int = 0x20000;
+pub const CLONE_SYSVSEM: ::c_int = 0x40000;
+pub const CLONE_SETTLS: ::c_int = 0x80000;
+pub const CLONE_PARENT_SETTID: ::c_int = 0x100000;
+pub const CLONE_CHILD_CLEARTID: ::c_int = 0x200000;
+pub const CLONE_DETACHED: ::c_int = 0x400000;
+pub const CLONE_UNTRACED: ::c_int = 0x800000;
+pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000;
+pub const CLONE_NEWUTS: ::c_int = 0x04000000;
+pub const CLONE_NEWIPC: ::c_int = 0x08000000;
+pub const CLONE_NEWUSER: ::c_int = 0x10000000;
+pub const CLONE_NEWPID: ::c_int = 0x20000000;
+pub const CLONE_NEWNET: ::c_int = 0x40000000;
+pub const CLONE_IO: ::c_int = 0x80000000;
+
+pub const WNOHANG: ::c_int = 0x00000001;
+pub const WUNTRACED: ::c_int = 0x00000002;
+pub const WSTOPPED: ::c_int = WUNTRACED;
+pub const WEXITED: ::c_int = 0x00000004;
+pub const WCONTINUED: ::c_int = 0x00000008;
+pub const WNOWAIT: ::c_int = 0x01000000;
+
+pub const __WNOTHREAD: ::c_int = 0x20000000;
+pub const __WALL: ::c_int = 0x40000000;
+pub const __WCLONE: ::c_int = 0x80000000;
+
+pub const SPLICE_F_MOVE: ::c_uint = 0x01;
+pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02;
+pub const SPLICE_F_MORE: ::c_uint = 0x04;
+pub const SPLICE_F_GIFT: ::c_uint = 0x08;
+
+pub const RTLD_LOCAL: ::c_int = 0;
+
+pub const POSIX_FADV_NORMAL: ::c_int = 0;
+pub const POSIX_FADV_RANDOM: ::c_int = 1;
+pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
+pub const POSIX_FADV_WILLNEED: ::c_int = 3;
+
+pub const AT_FDCWD: ::c_int = -100;
+pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x100;
+pub const AT_REMOVEDIR: ::c_int = 0x200;
+pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
+
+pub const LOG_CRON: ::c_int = 9 << 3;
+pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
+pub const LOG_FTP: ::c_int = 11 << 3;
+pub const LOG_PERROR: ::c_int = 0x20;
+
+pub const PIPE_BUF: usize = 4096;
+
+pub const SI_LOAD_SHIFT: ::c_uint = 16;
+
+pub const SIGEV_SIGNAL: ::c_int = 0;
+pub const SIGEV_NONE: ::c_int = 1;
+pub const SIGEV_THREAD: ::c_int = 2;
+
+pub const P_ALL: idtype_t = 0;
+pub const P_PID: idtype_t = 1;
+pub const P_PGID: idtype_t = 2;
+
+pub const UTIME_OMIT: c_long = 1073741822;
+pub const UTIME_NOW: c_long = 1073741823;
+
+pub const L_tmpnam: ::c_uint = 20;
+pub const _PC_LINK_MAX: ::c_int = 0;
+pub const _PC_MAX_CANON: ::c_int = 1;
+pub const _PC_MAX_INPUT: ::c_int = 2;
+pub const _PC_NAME_MAX: ::c_int = 3;
+pub const _PC_PATH_MAX: ::c_int = 4;
+pub const _PC_PIPE_BUF: ::c_int = 5;
+pub const _PC_CHOWN_RESTRICTED: ::c_int = 6;
+pub const _PC_NO_TRUNC: ::c_int = 7;
+pub const _PC_VDISABLE: ::c_int = 8;
+
+pub const _SC_ARG_MAX: ::c_int = 0;
+pub const _SC_CHILD_MAX: ::c_int = 1;
+pub const _SC_CLK_TCK: ::c_int = 2;
+pub const _SC_NGROUPS_MAX: ::c_int = 3;
+pub const _SC_OPEN_MAX: ::c_int = 4;
+pub const _SC_STREAM_MAX: ::c_int = 5;
+pub const _SC_TZNAME_MAX: ::c_int = 6;
+pub const _SC_JOB_CONTROL: ::c_int = 7;
+pub const _SC_SAVED_IDS: ::c_int = 8;
+pub const _SC_REALTIME_SIGNALS: ::c_int = 9;
+pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10;
+pub const _SC_TIMERS: ::c_int = 11;
+pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12;
+pub const _SC_PRIORITIZED_IO: ::c_int = 13;
+pub const _SC_SYNCHRONIZED_IO: ::c_int = 14;
+pub const _SC_FSYNC: ::c_int = 15;
+pub const _SC_MAPPED_FILES: ::c_int = 16;
+pub const _SC_MEMLOCK: ::c_int = 17;
+pub const _SC_MEMLOCK_RANGE: ::c_int = 18;
+pub const _SC_MEMORY_PROTECTION: ::c_int = 19;
+pub const _SC_MESSAGE_PASSING: ::c_int = 20;
+pub const _SC_SEMAPHORES: ::c_int = 21;
+pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22;
+pub const _SC_AIO_LISTIO_MAX: ::c_int = 23;
+pub const _SC_AIO_MAX: ::c_int = 24;
+pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25;
+pub const _SC_DELAYTIMER_MAX: ::c_int = 26;
+pub const _SC_MQ_OPEN_MAX: ::c_int = 27;
+pub const _SC_MQ_PRIO_MAX: ::c_int = 28;
+pub const _SC_VERSION: ::c_int = 29;
+pub const _SC_PAGESIZE: ::c_int = 30;
+pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
+pub const _SC_RTSIG_MAX: ::c_int = 31;
+pub const _SC_SEM_NSEMS_MAX: ::c_int = 32;
+pub const _SC_SEM_VALUE_MAX: ::c_int = 33;
+pub const _SC_SIGQUEUE_MAX: ::c_int = 34;
+pub const _SC_TIMER_MAX: ::c_int = 35;
+pub const _SC_BC_BASE_MAX: ::c_int = 36;
+pub const _SC_BC_DIM_MAX: ::c_int = 37;
+pub const _SC_BC_SCALE_MAX: ::c_int = 38;
+pub const _SC_BC_STRING_MAX: ::c_int = 39;
+pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40;
+pub const _SC_EXPR_NEST_MAX: ::c_int = 42;
+pub const _SC_LINE_MAX: ::c_int = 43;
+pub const _SC_RE_DUP_MAX: ::c_int = 44;
+pub const _SC_2_VERSION: ::c_int = 46;
+pub const _SC_2_C_BIND: ::c_int = 47;
+pub const _SC_2_C_DEV: ::c_int = 48;
+pub const _SC_2_FORT_DEV: ::c_int = 49;
+pub const _SC_2_FORT_RUN: ::c_int = 50;
+pub const _SC_2_SW_DEV: ::c_int = 51;
+pub const _SC_2_LOCALEDEF: ::c_int = 52;
+pub const _SC_IOV_MAX: ::c_int = 60;
+pub const _SC_THREADS: ::c_int = 67;
+pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68;
+pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69;
+pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70;
+pub const _SC_LOGIN_NAME_MAX: ::c_int = 71;
+pub const _SC_TTY_NAME_MAX: ::c_int = 72;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73;
+pub const _SC_THREAD_KEYS_MAX: ::c_int = 74;
+pub const _SC_THREAD_STACK_MIN: ::c_int = 75;
+pub const _SC_THREAD_THREADS_MAX: ::c_int = 76;
+pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77;
+pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78;
+pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79;
+pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80;
+pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81;
+pub const _SC_NPROCESSORS_ONLN: ::c_int = 84;
+pub const _SC_ATEXIT_MAX: ::c_int = 87;
+pub const _SC_XOPEN_VERSION: ::c_int = 89;
+pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90;
+pub const _SC_XOPEN_UNIX: ::c_int = 91;
+pub const _SC_XOPEN_CRYPT: ::c_int = 92;
+pub const _SC_XOPEN_ENH_I18N: ::c_int = 93;
+pub const _SC_XOPEN_SHM: ::c_int = 94;
+pub const _SC_2_CHAR_TERM: ::c_int = 95;
+pub const _SC_2_UPE: ::c_int = 97;
+pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125;
+pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126;
+pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128;
+pub const _SC_XOPEN_LEGACY: ::c_int = 129;
+pub const _SC_XOPEN_REALTIME: ::c_int = 130;
+pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131;
+pub const _SC_HOST_NAME_MAX: ::c_int = 180;
+
+pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY;
+pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY;
+
+pub const GLOB_ERR: ::c_int = 1 << 0;
+pub const GLOB_MARK: ::c_int = 1 << 1;
+pub const GLOB_NOSORT: ::c_int = 1 << 2;
+pub const GLOB_DOOFFS: ::c_int = 1 << 3;
+pub const GLOB_NOCHECK: ::c_int = 1 << 4;
+pub const GLOB_APPEND: ::c_int = 1 << 5;
+pub const GLOB_NOESCAPE: ::c_int = 1 << 6;
+
+pub const GLOB_NOSPACE: ::c_int = 1;
+pub const GLOB_ABORTED: ::c_int = 2;
+pub const GLOB_NOMATCH: ::c_int = 3;
+
+pub const POSIX_MADV_NORMAL: ::c_int = 0;
+pub const POSIX_MADV_RANDOM: ::c_int = 1;
+pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
+pub const POSIX_MADV_WILLNEED: ::c_int = 3;
+
+pub const S_IEXEC: mode_t = 64;
+pub const S_IWRITE: mode_t = 128;
+pub const S_IREAD: mode_t = 256;
+
+pub const F_LOCK: ::c_int = 1;
+pub const F_TEST: ::c_int = 3;
+pub const F_TLOCK: ::c_int = 2;
+pub const F_ULOCK: ::c_int = 0;
+
+pub const ST_RDONLY: ::c_ulong = 1;
+pub const ST_NOSUID: ::c_ulong = 2;
+pub const ST_NODEV: ::c_ulong = 4;
+pub const ST_NOEXEC: ::c_ulong = 8;
+pub const ST_SYNCHRONOUS: ::c_ulong = 16;
+pub const ST_MANDLOCK: ::c_ulong = 64;
+pub const ST_WRITE: ::c_ulong = 128;
+pub const ST_APPEND: ::c_ulong = 256;
+pub const ST_IMMUTABLE: ::c_ulong = 512;
+pub const ST_NOATIME: ::c_ulong = 1024;
+pub const ST_NODIRATIME: ::c_ulong = 2048;
+
+pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void;
+pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
+pub const RTLD_NODELETE: ::c_int = 0x1000;
+pub const RTLD_NOW: ::c_int = 0x2;
+
+pub const TCP_MD5SIG: ::c_int = 14;
+
+pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
+    __align: [],
+    size: [0; __SIZEOF_PTHREAD_MUTEX_T],
+};
+pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
+    __align: [],
+    size: [0; __SIZEOF_PTHREAD_COND_T],
+};
+pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
+    __align: [],
+    size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
+};
+pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
+pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
+pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
+pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
+pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
+
+pub const SCHED_OTHER: ::c_int = 0;
+pub const SCHED_FIFO: ::c_int = 1;
+pub const SCHED_RR: ::c_int = 2;
+pub const SCHED_BATCH: ::c_int = 3;
+pub const SCHED_IDLE: ::c_int = 5;
+
+// System V IPC
+pub const IPC_PRIVATE: ::key_t = 0;
+
+pub const IPC_CREAT: ::c_int = 0o1000;
+pub const IPC_EXCL: ::c_int = 0o2000;
+pub const IPC_NOWAIT: ::c_int = 0o4000;
+
+pub const IPC_RMID: ::c_int = 0;
+pub const IPC_SET: ::c_int = 1;
+pub const IPC_STAT: ::c_int = 2;
+pub const IPC_INFO: ::c_int = 3;
+pub const MSG_STAT: ::c_int = 11;
+pub const MSG_INFO: ::c_int = 12;
+
+pub const MSG_NOERROR: ::c_int = 0o10000;
+pub const MSG_EXCEPT: ::c_int = 0o20000;
+
+pub const SHM_R: ::c_int = 0o400;
+pub const SHM_W: ::c_int = 0o200;
+
+pub const SHM_RDONLY: ::c_int = 0o10000;
+pub const SHM_RND: ::c_int = 0o20000;
+pub const SHM_REMAP: ::c_int = 0o40000;
+
+pub const SHM_LOCK: ::c_int = 11;
+pub const SHM_UNLOCK: ::c_int = 12;
+
+pub const SHM_HUGETLB: ::c_int = 0o4000;
+pub const SHM_NORESERVE: ::c_int = 0o10000;
+
+pub const EPOLLRDHUP: ::c_int = 0x2000;
+pub const EPOLLONESHOT: ::c_int = 0x40000000;
+
+pub const QFMT_VFS_OLD: ::c_int = 1;
+pub const QFMT_VFS_V0: ::c_int = 2;
+
+pub const EFD_SEMAPHORE: ::c_int = 0x1;
+
+pub const LOG_NFACILITIES: ::c_int = 24;
+
+pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
+
+pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32;
+pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32;
+pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32;
+pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32;
+pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32;
+
+pub const AI_PASSIVE: ::c_int = 0x0001;
+pub const AI_CANONNAME: ::c_int = 0x0002;
+pub const AI_NUMERICHOST: ::c_int = 0x0004;
+pub const AI_V4MAPPED: ::c_int = 0x0008;
+pub const AI_ALL: ::c_int = 0x0010;
+pub const AI_ADDRCONFIG: ::c_int = 0x0020;
+
+pub const AI_NUMERICSERV: ::c_int = 0x0400;
+
+pub const EAI_BADFLAGS: ::c_int = -1;
+pub const EAI_NONAME: ::c_int = -2;
+pub const EAI_AGAIN: ::c_int = -3;
+pub const EAI_FAIL: ::c_int = -4;
+pub const EAI_FAMILY: ::c_int = -6;
+pub const EAI_SOCKTYPE: ::c_int = -7;
+pub const EAI_SERVICE: ::c_int = -8;
+pub const EAI_MEMORY: ::c_int = -10;
+pub const EAI_OVERFLOW: ::c_int = -12;
+
+pub const NI_NUMERICHOST: ::c_int = 1;
+pub const NI_NUMERICSERV: ::c_int = 2;
+pub const NI_NOFQDN: ::c_int = 4;
+pub const NI_NAMEREQD: ::c_int = 8;
+pub const NI_DGRAM: ::c_int = 16;
+
+pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::c_uint = 1;
+pub const SYNC_FILE_RANGE_WRITE: ::c_uint = 2;
+pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4;
+
+pub const EAI_SYSTEM: ::c_int = -11;
+
+pub const MREMAP_MAYMOVE: ::c_int = 1;
+pub const MREMAP_FIXED: ::c_int = 2;
+
+pub const PR_SET_PDEATHSIG: ::c_int = 1;
+pub const PR_GET_PDEATHSIG: ::c_int = 2;
+
+pub const PR_GET_DUMPABLE: ::c_int = 3;
+pub const PR_SET_DUMPABLE: ::c_int = 4;
+
+pub const PR_GET_UNALIGN: ::c_int = 5;
+pub const PR_SET_UNALIGN: ::c_int = 6;
+pub const PR_UNALIGN_NOPRINT: ::c_int = 1;
+pub const PR_UNALIGN_SIGBUS: ::c_int = 2;
+
+pub const PR_GET_KEEPCAPS: ::c_int = 7;
+pub const PR_SET_KEEPCAPS: ::c_int = 8;
+
+pub const PR_GET_FPEMU: ::c_int = 9;
+pub const PR_SET_FPEMU: ::c_int = 10;
+pub const PR_FPEMU_NOPRINT: ::c_int = 1;
+pub const PR_FPEMU_SIGFPE: ::c_int = 2;
+
+pub const PR_GET_FPEXC: ::c_int = 11;
+pub const PR_SET_FPEXC: ::c_int = 12;
+pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80;
+pub const PR_FP_EXC_DIV: ::c_int = 0x010000;
+pub const PR_FP_EXC_OVF: ::c_int = 0x020000;
+pub const PR_FP_EXC_UND: ::c_int = 0x040000;
+pub const PR_FP_EXC_RES: ::c_int = 0x080000;
+pub const PR_FP_EXC_INV: ::c_int = 0x100000;
+pub const PR_FP_EXC_DISABLED: ::c_int = 0;
+pub const PR_FP_EXC_NONRECOV: ::c_int = 1;
+pub const PR_FP_EXC_ASYNC: ::c_int = 2;
+pub const PR_FP_EXC_PRECISE: ::c_int = 3;
+
+pub const PR_GET_TIMING: ::c_int = 13;
+pub const PR_SET_TIMING: ::c_int = 14;
+pub const PR_TIMING_STATISTICAL: ::c_int = 0;
+pub const PR_TIMING_TIMESTAMP: ::c_int = 1;
+
+pub const PR_SET_NAME: ::c_int = 15;
+pub const PR_GET_NAME: ::c_int = 16;
+
+pub const PR_GET_ENDIAN: ::c_int = 19;
+pub const PR_SET_ENDIAN: ::c_int = 20;
+pub const PR_ENDIAN_BIG: ::c_int = 0;
+pub const PR_ENDIAN_LITTLE: ::c_int = 1;
+pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2;
+
+pub const PR_GET_SECCOMP: ::c_int = 21;
+pub const PR_SET_SECCOMP: ::c_int = 22;
+
+pub const PR_CAPBSET_READ: ::c_int = 23;
+pub const PR_CAPBSET_DROP: ::c_int = 24;
+
+pub const PR_GET_TSC: ::c_int = 25;
+pub const PR_SET_TSC: ::c_int = 26;
+pub const PR_TSC_ENABLE: ::c_int = 1;
+pub const PR_TSC_SIGSEGV: ::c_int = 2;
+
+pub const PR_GET_SECUREBITS: ::c_int = 27;
+pub const PR_SET_SECUREBITS: ::c_int = 28;
+
+pub const PR_SET_TIMERSLACK: ::c_int = 29;
+pub const PR_GET_TIMERSLACK: ::c_int = 30;
+
+pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31;
+pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32;
+
+pub const PR_MCE_KILL: ::c_int = 33;
+pub const PR_MCE_KILL_CLEAR: ::c_int = 0;
+pub const PR_MCE_KILL_SET: ::c_int = 1;
+
+pub const PR_MCE_KILL_LATE: ::c_int = 0;
+pub const PR_MCE_KILL_EARLY: ::c_int = 1;
+pub const PR_MCE_KILL_DEFAULT: ::c_int = 2;
+
+pub const PR_MCE_KILL_GET: ::c_int = 34;
+
+pub const PR_SET_MM: ::c_int = 35;
+pub const PR_SET_MM_START_CODE: ::c_int = 1;
+pub const PR_SET_MM_END_CODE: ::c_int = 2;
+pub const PR_SET_MM_START_DATA: ::c_int = 3;
+pub const PR_SET_MM_END_DATA: ::c_int = 4;
+pub const PR_SET_MM_START_STACK: ::c_int = 5;
+pub const PR_SET_MM_START_BRK: ::c_int = 6;
+pub const PR_SET_MM_BRK: ::c_int = 7;
+pub const PR_SET_MM_ARG_START: ::c_int = 8;
+pub const PR_SET_MM_ARG_END: ::c_int = 9;
+pub const PR_SET_MM_ENV_START: ::c_int = 10;
+pub const PR_SET_MM_ENV_END: ::c_int = 11;
+pub const PR_SET_MM_AUXV: ::c_int = 12;
+pub const PR_SET_MM_EXE_FILE: ::c_int = 13;
+pub const PR_SET_MM_MAP: ::c_int = 14;
+pub const PR_SET_MM_MAP_SIZE: ::c_int = 15;
+
+pub const PR_SET_PTRACER: ::c_int = 0x59616d61;
+
+pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36;
+pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37;
+
+pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38;
+pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39;
+
+pub const PR_GET_TID_ADDRESS: ::c_int = 40;
+
+pub const PR_SET_THP_DISABLE: ::c_int = 41;
+pub const PR_GET_THP_DISABLE: ::c_int = 42;
+
+pub const ABDAY_1: ::nl_item = 0x300;
+pub const ABDAY_2: ::nl_item = 0x301;
+pub const ABDAY_3: ::nl_item = 0x302;
+pub const ABDAY_4: ::nl_item = 0x303;
+pub const ABDAY_5: ::nl_item = 0x304;
+pub const ABDAY_6: ::nl_item = 0x305;
+pub const ABDAY_7: ::nl_item = 0x306;
+
+pub const DAY_1: ::nl_item = 0x307;
+pub const DAY_2: ::nl_item = 0x308;
+pub const DAY_3: ::nl_item = 0x309;
+pub const DAY_4: ::nl_item = 0x30A;
+pub const DAY_5: ::nl_item = 0x30B;
+pub const DAY_6: ::nl_item = 0x30C;
+pub const DAY_7: ::nl_item = 0x30D;
+
+pub const ABMON_1: ::nl_item = 0x30E;
+pub const ABMON_2: ::nl_item = 0x30F;
+pub const ABMON_3: ::nl_item = 0x310;
+pub const ABMON_4: ::nl_item = 0x311;
+pub const ABMON_5: ::nl_item = 0x312;
+pub const ABMON_6: ::nl_item = 0x313;
+pub const ABMON_7: ::nl_item = 0x314;
+pub const ABMON_8: ::nl_item = 0x315;
+pub const ABMON_9: ::nl_item = 0x316;
+pub const ABMON_10: ::nl_item = 0x317;
+pub const ABMON_11: ::nl_item = 0x318;
+pub const ABMON_12: ::nl_item = 0x319;
+
+pub const MON_1: ::nl_item = 0x31A;
+pub const MON_2: ::nl_item = 0x31B;
+pub const MON_3: ::nl_item = 0x31C;
+pub const MON_4: ::nl_item = 0x31D;
+pub const MON_5: ::nl_item = 0x31E;
+pub const MON_6: ::nl_item = 0x31F;
+pub const MON_7: ::nl_item = 0x320;
+pub const MON_8: ::nl_item = 0x321;
+pub const MON_9: ::nl_item = 0x322;
+pub const MON_10: ::nl_item = 0x323;
+pub const MON_11: ::nl_item = 0x324;
+pub const MON_12: ::nl_item = 0x325;
+
+pub const AM_STR: ::nl_item = 0x326;
+pub const PM_STR: ::nl_item = 0x327;
+
+pub const D_T_FMT: ::nl_item = 0x328;
+pub const D_FMT: ::nl_item = 0x329;
+pub const T_FMT: ::nl_item = 0x32A;
+pub const T_FMT_AMPM: ::nl_item = 0x32B;
+
+pub const ERA: ::nl_item = 0x32C;
+pub const ERA_D_FMT: ::nl_item = 0x32E;
+pub const ALT_DIGITS: ::nl_item = 0x32F;
+pub const ERA_D_T_FMT: ::nl_item = 0x330;
+pub const ERA_T_FMT: ::nl_item = 0x331;
+
+pub const CODESET: ::nl_item = 10;
+
+pub const CRNCYSTR: ::nl_item = 0x215;
+
+pub const RADIXCHAR: ::nl_item = 0x100;
+pub const THOUSEP: ::nl_item = 0x101;
+
+pub const NOEXPR: ::nl_item = 0x501;
+pub const YESSTR: ::nl_item = 0x502;
+pub const NOSTR: ::nl_item = 0x503;
+
+pub const FILENAME_MAX: ::c_uint = 4095;
+
+pub const AF_MAX: ::c_int = 39;
+
+f! {
+    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
+        let fd = fd as usize;
+        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        (*set).fds_bits[fd / size] &= !(1 << (fd % size));
+        return
+    }
+
+    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
+        let fd = fd as usize;
+        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0
+    }
+
+    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
+        let fd = fd as usize;
+        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+        (*set).fds_bits[fd / size] |= 1 << (fd % size);
+        return
+    }
+
+    pub fn FD_ZERO(set: *mut fd_set) -> () {
+        for slot in (*set).fds_bits.iter_mut() {
+            *slot = 0;
+        }
+    }
+
+    pub fn WIFSTOPPED(status: ::c_int) -> bool {
+        (status & 0xff) == 0x7f
+    }
+
+    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
+        (status >> 8) & 0xff
+    }
+
+    pub fn WIFCONTINUED(status: ::c_int) -> bool {
+        status == 0xffff
+    }
+
+    pub fn WIFSIGNALED(status: ::c_int) -> bool {
+        ((status & 0x7f) + 1) as i8 >= 2
+    }
+
+    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
+        status & 0x7f
+    }
+
+    pub fn WIFEXITED(status: ::c_int) -> bool {
+        (status & 0x7f) == 0
+    }
+
+    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
+        (status >> 8) & 0xff
+    }
+
+    pub fn WCOREDUMP(status: ::c_int) -> bool {
+        (status & 0x80) != 0
+    }
+
+    pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
+        for slot in cpuset.bits.iter_mut() {
+            *slot = 0;
+        }
+    }
+
+    pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
+        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
+        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
+        cpuset.bits[idx] |= 1 << offset;
+        ()
+    }
+
+    pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
+        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
+        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
+        cpuset.bits[idx] &= !(1 << offset);
+        ()
+    }
+
+    pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
+        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]);
+        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
+        0 != (cpuset.bits[idx] & (1 << offset))
+    }
+
+    pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
+        set1.bits == set2.bits
+    }
+}
+
+extern {
+    pub fn fdatasync(fd: ::c_int) -> ::c_int;
+    pub fn mincore(addr: *mut ::c_void, len: ::size_t,
+                   vec: *mut ::c_uchar) -> ::c_int;
+    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_nanosleep(clk_id: ::clockid_t,
+                           flags: ::c_int,
+                           rqtp: *const ::timespec,
+                           rmtp:  *mut ::timespec) -> ::c_int;
+    pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+    pub fn prctl(option: ::c_int, ...) -> ::c_int;
+    pub fn pthread_getattr_np(native: ::pthread_t,
+                              attr: *mut ::pthread_attr_t) -> ::c_int;
+    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
+                                     guardsize: *mut ::size_t) -> ::c_int;
+    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
+                                 stackaddr: *mut *mut ::c_void,
+                                 stacksize: *mut ::size_t) -> ::c_int;
+    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
+    pub fn setgroups(ngroups: ::size_t,
+                     ptr: *const ::gid_t) -> ::c_int;
+    pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
+    pub fn sched_setscheduler(pid: ::pid_t,
+                              policy: ::c_int,
+                              param: *const ::sched_param) -> ::c_int;
+    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
+    pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
+    pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
+    pub fn epoll_create(size: ::c_int) -> ::c_int;
+    pub fn epoll_create1(flags: ::c_int) -> ::c_int;
+    pub fn epoll_ctl(epfd: ::c_int,
+                     op: ::c_int,
+                     fd: ::c_int,
+                     event: *mut ::epoll_event) -> ::c_int;
+    pub fn epoll_wait(epfd: ::c_int,
+                      events: *mut ::epoll_event,
+                      maxevents: ::c_int,
+                      timeout: ::c_int) -> ::c_int;
+    pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
+    pub fn mount(src: *const ::c_char,
+                 target: *const ::c_char,
+                 fstype: *const ::c_char,
+                 flags: ::c_ulong,
+                 data: *const ::c_void) -> ::c_int;
+    pub fn umount(target: *const ::c_char) -> ::c_int;
+    pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int;
+    pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int,
+                 child_stack: *mut ::c_void,
+                 flags: ::c_int,
+                 arg: *mut ::c_void, ...) -> ::c_int;
+    pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
+    pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
+    pub fn memrchr(cx: *const ::c_void,
+                   c: ::c_int,
+                   n: ::size_t) -> *mut ::c_void;
+    pub fn syscall(num: ::c_long, ...) -> ::c_long;
+    pub fn sendfile(out_fd: ::c_int,
+                    in_fd: ::c_int,
+                    offset: *mut off_t,
+                    count: ::size_t) -> ::ssize_t;
+    pub fn splice(fd_in: ::c_int,
+                  off_in: *mut ::loff_t,
+                  fd_out: ::c_int,
+                  off_out: *mut ::loff_t,
+                  len: ::size_t,
+                  flags: ::c_uint) -> ::ssize_t;
+    pub fn tee(fd_in: ::c_int,
+               fd_out: ::c_int,
+               len: ::size_t,
+               flags: ::c_uint) -> ::ssize_t;
+    pub fn vmsplice(fd: ::c_int,
+                    iov: *const ::iovec,
+                    nr_segs: ::size_t,
+                    flags: ::c_uint) -> ::ssize_t;
+
+    pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t,
+                         advise: ::c_int) -> ::c_int;
+    pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
+    pub fn utimensat(dirfd: ::c_int, path: *const ::c_char,
+                     times: *const ::timespec, flag: ::c_int) -> ::c_int;
+    pub fn duplocale(base: ::locale_t) -> ::locale_t;
+    pub fn freelocale(loc: ::locale_t);
+    pub fn newlocale(mask: ::c_int,
+                     locale: *const ::c_char,
+                     base: ::locale_t) -> ::locale_t;
+    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
+    pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int;
+    pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int;
+    pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int;
+    pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int;
+    pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t;
+    pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
+    pub fn mmap64(addr: *mut ::c_void,
+                  len: ::size_t,
+                  prot: ::c_int,
+                  flags: ::c_int,
+                  fd: ::c_int,
+                  offset: off64_t)
+                  -> *mut ::c_void;
+    pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
+    pub fn openat64(fd: ::c_int,
+                    path: *const c_char,
+                    oflag: ::c_int, ...) -> ::c_int;
+    pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
+                   offset: off64_t) -> ::ssize_t;
+    pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
+                    offset: off64_t) -> ::ssize_t;
+    pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64;
+    pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64,
+                       result: *mut *mut ::dirent64) -> ::c_int;
+    pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
+    pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
+    pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int;
+    pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
+
+    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
+
+    pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
+                   mode: ::mode_t, dev: dev_t) -> ::c_int;
+    pub fn ppoll(fds: *mut ::pollfd,
+                 nfds: nfds_t,
+                 timeout: *const ::timespec,
+                 sigmask: *const sigset_t) -> ::c_int;
+    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
+                                     clock_id: *mut clockid_t) -> ::c_int;
+    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
+                                     clock_id: ::clockid_t) -> ::c_int;
+    pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
+                                       pshared: ::c_int) -> ::c_int;
+    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
+                                       pshared: *mut ::c_int) -> ::c_int;
+    pub fn sched_getaffinity(pid: ::pid_t,
+                             cpusetsize: ::size_t,
+                             cpuset: *mut cpu_set_t) -> ::c_int;
+    pub fn sched_setaffinity(pid: ::pid_t,
+                             cpusetsize: ::size_t,
+                             cpuset: *const cpu_set_t) -> ::c_int;
+    pub fn unshare(flags: ::c_int) -> ::c_int;
+    pub fn sem_timedwait(sem: *mut sem_t,
+                         abstime: *const ::timespec) -> ::c_int;
+    pub fn accept4(fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t,
+                   flg: ::c_int) -> ::c_int;
+    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
+                                   abstime: *const ::timespec) -> ::c_int;
+    pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
+                                        pshared: ::c_int) -> ::c_int;
+    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
+                                        pshared: *mut ::c_int) -> ::c_int;
+    pub fn pthread_rwlockattr_getkind_np(attr: *const pthread_rwlockattr_t,
+                                         val: *mut ::c_int) -> ::c_int;
+    pub fn pthread_rwlockattr_setkind_np(attr: *mut pthread_rwlockattr_t,
+                                         val: ::c_int) -> ::c_int;
+    pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
+                                         val: *mut ::c_int) -> ::c_int;
+    pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
+                                         val: ::c_int) -> ::c_int;
+    pub fn ptsname_r(fd: ::c_int,
+                     buf: *mut ::c_char,
+                     buflen: ::size_t) -> ::c_int;
+    pub fn clearenv() -> ::c_int;
+    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
+                  options: ::c_int) -> ::c_int;
+
+    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
+
+    pub fn setpwent();
+    pub fn endpwent();
+    pub fn getpwent() -> *mut passwd;
+    pub fn setspent();
+    pub fn endspent();
+    pub fn getspent() -> *mut spwd;
+    pub fn getspnam(__name: *const ::c_char) -> *mut spwd;
+
+    pub fn shm_open(name: *const c_char, oflag: ::c_int,
+                    mode: mode_t) -> ::c_int;
+
+    // System V IPC
+    pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
+    pub fn shmat(shmid: ::c_int,
+                 shmaddr: *const ::c_void,
+                 shmflg: ::c_int) -> *mut ::c_void;
+    pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int;
+    pub fn shmctl(shmid: ::c_int,
+                  cmd: ::c_int,
+                  buf: *mut ::shmid_ds) -> ::c_int;
+    pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
+    pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int;
+    pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
+    pub fn msgrcv(msqid: ::c_int, msgp: *mut ::c_void, msgsz: ::size_t,
+                  msgtyp: ::c_long, msgflg: ::c_int) -> ::ssize_t;
+    pub fn msgsnd(msqid: ::c_int, msgp: *const ::c_void, msgsz: ::size_t,
+                  msgflg: ::c_int) -> ::c_int;
+
+    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
+                    -> ::c_int;
+    pub fn __errno_location() -> *mut ::c_int;
+
+    pub fn fopen64(filename: *const c_char,
+                   mode: *const c_char) -> *mut ::FILE;
+    pub fn freopen64(filename: *const c_char, mode: *const c_char,
+                     file: *mut ::FILE) -> *mut ::FILE;
+    pub fn tmpfile64() -> *mut ::FILE;
+    pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int;
+    pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
+    pub fn fseeko64(stream: *mut ::FILE,
+                    offset: ::off64_t,
+                    whence: ::c_int) -> ::c_int;
+    pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
+    pub fn readahead(fd: ::c_int, offset: ::off64_t,
+                     count: ::size_t) -> ::ssize_t;
+    pub fn getxattr(path: *const c_char, name: *const c_char,
+                    value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
+    pub fn lgetxattr(path: *const c_char, name: *const c_char,
+                     value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
+    pub fn fgetxattr(filedes: ::c_int, name: *const c_char,
+                     value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
+    pub fn setxattr(path: *const c_char, name: *const c_char,
+                    value: *const ::c_void, size: ::size_t,
+                    flags: ::c_int) -> ::c_int;
+    pub fn lsetxattr(path: *const c_char, name: *const c_char,
+                     value: *const ::c_void, size: ::size_t,
+                     flags: ::c_int) -> ::c_int;
+    pub fn fsetxattr(filedes: ::c_int, name: *const c_char,
+                     value: *const ::c_void, size: ::size_t,
+                     flags: ::c_int) -> ::c_int;
+    pub fn listxattr(path: *const c_char, list: *mut c_char,
+                     size: ::size_t) -> ::ssize_t;
+    pub fn llistxattr(path: *const c_char, list: *mut c_char,
+                      size: ::size_t) -> ::ssize_t;
+    pub fn flistxattr(filedes: ::c_int, list: *mut c_char,
+                      size: ::size_t) -> ::ssize_t;
+    pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int;
+    pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int;
+    pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int;
+    pub fn signalfd(fd: ::c_int,
+                    mask: *const ::sigset_t,
+                    flags: ::c_int) -> ::c_int;
+    pub fn quotactl(cmd: ::c_int,
+                    special: *const ::c_char,
+                    id: ::c_int,
+                    data: *mut ::c_char) -> ::c_int;
+    pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
+    pub fn mq_close(mqd: ::mqd_t) -> ::c_int;
+    pub fn mq_unlink(name: *const ::c_char) -> ::c_int;
+    pub fn mq_receive(mqd: ::mqd_t,
+                      msg_ptr: *mut ::c_char,
+                      msg_len: ::size_t,
+                      msq_prio: *mut ::c_uint) -> ::ssize_t;
+    pub fn mq_send(mqd: ::mqd_t,
+                   msg_ptr: *const ::c_char,
+                   msg_len: ::size_t,
+                   msq_prio: ::c_uint) -> ::c_int;
+    pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;
+    pub fn mq_setattr(mqd: ::mqd_t,
+                      newattr: *const ::mq_attr,
+                      oldattr: *mut ::mq_attr) -> ::c_int;
+    pub fn epoll_pwait(epfd: ::c_int,
+                       events: *mut ::epoll_event,
+                       maxevents: ::c_int,
+                       timeout: ::c_int,
+                       sigmask: *const ::sigset_t) -> ::c_int;
+    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
+    pub fn sigtimedwait(set: *const sigset_t,
+                        info: *mut siginfo_t,
+                        timeout: *const ::timespec) -> ::c_int;
+    pub fn sigwaitinfo(set: *const sigset_t,
+                       info: *mut siginfo_t) -> ::c_int;
+    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
+    pub fn prlimit(pid: ::pid_t, resource: ::c_int, new_limit: *const ::rlimit,
+                   old_limit: *mut ::rlimit) -> ::c_int;
+    pub fn prlimit64(pid: ::pid_t,
+                     resource: ::c_int,
+                     new_limit: *const ::rlimit64,
+                     old_limit: *mut ::rlimit64) -> ::c_int;
+    pub fn reboot(how_to: ::c_int) -> ::c_int;
+    pub fn setfsgid(gid: ::gid_t) -> ::c_int;
+    pub fn setfsuid(uid: ::uid_t) -> ::c_int;
+    pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
+    pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
+
+    // Not available now on Android
+    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
+                    mode: ::mode_t) -> ::c_int;
+    pub fn if_nameindex() -> *mut if_nameindex;
+    pub fn if_freenameindex(ptr: *mut if_nameindex);
+    pub fn sync_file_range(fd: ::c_int, offset: ::off64_t,
+                           nbytes: ::off64_t, flags: ::c_uint) -> ::c_int;
+    pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
+    pub fn freeifaddrs(ifa: *mut ::ifaddrs);
+
+    pub fn mremap(addr: *mut ::c_void,
+                  len: ::size_t,
+                  new_len: ::size_t,
+                  flags: ::c_int,
+                  ...) -> *mut ::c_void;
+
+    pub fn glob(pattern: *const c_char,
+                flags: ::c_int,
+                errfunc: Option<extern fn(epath: *const c_char,
+                                          errno: ::c_int) -> ::c_int>,
+                pglob: *mut ::glob_t) -> ::c_int;
+    pub fn globfree(pglob: *mut ::glob_t);
+
+    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
+
+    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
+
+    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
+    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
+                  -> ::c_int;
+
+    pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
+
+    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
+                    flags: ::c_int, addr: *mut ::sockaddr,
+                    addrlen: *mut ::socklen_t) -> ::ssize_t;
+    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
+
+    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
+                address_len: ::socklen_t) -> ::c_int;
+
+    pub fn writev(fd: ::c_int,
+                  iov: *const ::iovec,
+                  iovcnt: ::c_int) -> ::ssize_t;
+    pub fn readv(fd: ::c_int,
+                 iov: *const ::iovec,
+                 iovcnt: ::c_int) -> ::ssize_t;
+
+    pub fn sendmsg(fd: ::c_int,
+                   msg: *const ::msghdr,
+                   flags: ::c_int) -> ::ssize_t;
+    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
+                   -> ::ssize_t;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
+    pub fn getgrgid_r(uid: ::uid_t,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "sigaltstack$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
+    pub fn sigaltstack(ss: *const stack_t,
+                       oss: *mut stack_t) -> ::c_int;
+    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
+    pub fn getdtablesize() -> ::c_int;
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
+    pub fn getgrnam_r(name: *const ::c_char,
+                      grp: *mut ::group,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut ::group) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_sigmask$UNIX2003")]
+    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
+                           oldset: *mut sigset_t) -> ::c_int;
+    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
+    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
+    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
+    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
+    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
+    pub fn getpwnam_r(name: *const ::c_char,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
+    pub fn getpwuid_r(uid: ::uid_t,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
+               link_name = "sigwait$UNIX2003")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
+    pub fn sigwait(set: *const sigset_t,
+                   sig: *mut ::c_int) -> ::c_int;
+    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
+                          parent: Option<unsafe extern fn()>,
+                          child: Option<unsafe extern fn()>) -> ::c_int;
+    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "popen$UNIX2003")]
+    pub fn popen(command: *const c_char,
+                 mode: *const c_char) -> *mut ::FILE;
+}
+
+cfg_if! {
+    if #[cfg(target_arch = "mips")] {
+        mod mips;
+        pub use self::mips::*;
+    } else if #[cfg(target_arch = "x86_64")] {
+        mod x86_64;
+        pub use self::x86_64::*;
+    } else {
+        pub use unsupported_target;
+    }
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/uclibc/x86_64/l4re.rs
@@ -0,0 +1,46 @@
+/// L4Re specifics
+/// This module contains definitions required by various L4Re libc backends.
+/// Some of them are formally not part of the libc, but are a dependency of the
+/// libc and hence we should provide them here.
+
+pub type l4_umword_t = ::c_ulong; // Unsigned machine word.
+
+s! {
+    /// CPU sets.
+    pub struct l4_sched_cpu_set_t {
+        // from the L4Re docs
+        /// Combination of granularity and offset.
+        ///
+        /// The granularity defines how many CPUs each bit in map describes.
+        /// The offset is the numer of the first CPU described by the first
+        /// bit in the bitmap.
+        /// offset must be a multiple of 2^graularity.
+        ///
+        /// | MSB              |                 LSB |
+        /// | ---------------- | ------------------- |
+        /// | 8bit granularity | 24bit offset ..     |
+        gran_offset: l4_umword_t ,
+        /// Bitmap of CPUs.
+        map: l4_umword_t ,
+    }
+}
+
+#[cfg(target_os = "l4re")]
+pub struct pthread_attr_t {
+    pub __detachstate: ::c_int,
+    pub __schedpolicy: ::c_int,
+    pub __schedparam: super::__sched_param,
+    pub __inheritsched: ::c_int,
+    pub __scope: ::c_int,
+    pub __guardsize: ::size_t,
+    pub __stackaddr_set: ::c_int,
+    pub __stackaddr: *mut ::c_void, // better don't use it
+    pub __stacksize: ::size_t,
+    // L4Re specifics
+    pub affinity: l4_sched_cpu_set_t,
+    pub create_flags: ::c_uint,
+}
+
+// L4Re requires a min stack size of 64k; that isn't defined in uClibc, but
+// somewhere in the core libraries. uClibc wants 16k, but that's not enough.
+pub const PTHREAD_STACK_MIN: usize = 65536;
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/unix/uclibc/x86_64/mod.rs
@@ -0,0 +1,349 @@
+//! Definitions for uclibc on 64bit systems
+//!
+pub type blkcnt_t = i64;
+pub type blksize_t = i64;
+pub type clock_t = i64;
+pub type c_char = u8;
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type fsblkcnt_t = ::c_ulong;
+pub type fsfilcnt_t = ::c_ulong;
+pub type fsword_t = ::c_long;
+pub type ino_t = ::c_ulong;
+pub type nlink_t = ::c_uint;
+pub type off_t = ::c_long;
+pub type rlim_t = c_ulong;
+pub type rlim64_t = u64;
+// [uClibc docs] Note stat64 has the same shape as stat for x86-64.
+pub type stat64 = stat;
+pub type suseconds_t = ::c_long;
+pub type time_t = ::c_int;
+pub type wchar_t = ::c_int;
+
+pub type nfds_t = ::c_ulong;
+
+s! {
+    pub struct dirent {
+        pub d_ino: ::ino64_t,
+        pub d_off: ::off64_t,
+        pub d_reclen: u16,
+        pub d_type: u8,
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct dirent64 {
+        pub d_ino: ::ino64_t,
+        pub d_off: ::off64_t,
+        pub d_reclen: u16,
+        pub d_type: u8,
+        pub d_name: [::c_char; 256],
+    }
+
+    pub struct ipc_perm {
+        pub __key: ::key_t,
+        pub uid: ::uid_t,
+        pub gid: ::gid_t,
+        pub cuid: ::uid_t,
+        pub cgid: ::gid_t,
+        pub mode: ::c_ushort, // read / write
+        __pad1: ::c_ushort,
+        pub __seq: ::c_ushort,
+        __pad2: ::c_ushort,
+        __unused1: ::c_ulong,
+        __unused2: ::c_ulong
+    }
+
+    #[cfg(not(target_os = "l4re"))]
+    pub struct pthread_attr_t {
+        __detachstate: ::c_int,
+        __schedpolicy: ::c_int,
+        __schedparam: __sched_param,
+        __inheritsched: ::c_int,
+        __scope: ::c_int,
+        __guardsize: ::size_t,
+        __stackaddr_set: ::c_int,
+        __stackaddr: *mut ::c_void, // better don't use it
+        __stacksize: ::size_t,
+    }
+
+    pub struct __sched_param {
+        __sched_priority: ::c_int,
+    }
+
+    pub struct siginfo_t {
+        si_signo: ::c_int, // signal number
+        si_errno: ::c_int, // if not zero: error value of signal, see errno.h
+        si_code: ::c_int,  // signal code
+        pub _pad: [::c_int; 28], // unported union
+        _align: [usize; 0],
+    }
+
+    pub struct shmid_ds {
+        pub shm_perm: ::ipc_perm,
+        pub shm_segsz: ::size_t, // segment size in bytes
+        pub shm_atime: ::time_t, // time of last shmat()
+        pub shm_dtime: ::time_t,
+        pub shm_ctime: ::time_t,
+        pub shm_cpid: ::pid_t,
+        pub shm_lpid: ::pid_t,
+        pub shm_nattch: ::shmatt_t,
+        __unused1: ::c_ulong,
+        __unused2: ::c_ulong
+    }
+
+    pub struct msqid_ds {
+        pub msg_perm: ::ipc_perm,
+        pub msg_stime: ::time_t,
+        pub msg_rtime: ::time_t,
+        pub msg_ctime: ::time_t,
+        __msg_cbytes: ::c_ulong,
+        pub msg_qnum: ::msgqnum_t,
+        pub msg_qbytes: ::msglen_t,
+        pub msg_lspid: ::pid_t,
+        pub msg_lrpid: ::pid_t,
+        __ignored1: ::c_ulong,
+        __ignored2: ::c_ulong,
+    }
+
+    pub struct sockaddr {
+        pub sa_family: ::sa_family_t,
+        pub sa_data: [::c_char; 14],
+    }
+
+    pub struct sockaddr_in {
+        pub sin_family: ::sa_family_t,
+        pub sin_port: ::in_port_t,
+        pub sin_addr: ::in_addr,
+        pub sin_zero: [u8; 8],
+    }
+
+    pub struct sockaddr_in6 {
+        pub sin6_family: ::sa_family_t,
+        pub sin6_port: ::in_port_t,
+        pub sin6_flowinfo: u32,
+        pub sin6_addr: ::in6_addr,
+        pub sin6_scope_id: u32,
+    }
+
+    // ------------------------------------------------------------
+    // definitions below are *unverified* and might **break** the software
+//    pub struct in_addr {
+//        pub s_addr: in_addr_t,
+//    }
+//
+//    pub struct in6_addr {
+//        pub s6_addr: [u8; 16],
+//        __align: [u32; 0],
+//    }
+
+    pub struct stat {
+        pub st_dev: ::c_ulong,
+        pub st_ino: ::ino_t,
+        // According to uclibc/libc/sysdeps/linux/x86_64/bits/stat.h, order of
+        // nlink and mode are swapped on 64 bit systems.
+        pub st_nlink: ::nlink_t,
+        pub st_mode: ::mode_t,
+        pub st_uid: ::uid_t,
+        pub st_gid: ::gid_t,
+        pub st_rdev: ::c_ulong, // dev_t
+        pub st_size: off_t, // file size
+        pub st_blksize: ::blksize_t,
+        pub st_blocks: ::blkcnt_t,
+        pub st_atime: ::time_t,
+        pub st_atime_nsec: ::c_ulong,
+        pub st_mtime: ::time_t,
+        pub st_mtime_nsec: ::c_ulong,
+        pub st_ctime: ::time_t,
+        pub st_ctime_nsec: ::c_ulong,
+        st_pad4: [::c_long; 3]
+    }
+
+    pub struct sigaction {
+        pub sa_handler: ::sighandler_t,
+        pub sa_flags: ::c_ulong,
+        pub sa_restorer: *mut ::c_void,
+        pub sa_mask: ::sigset_t,
+    }
+
+    pub struct stack_t { // ToDo
+        pub ss_sp: *mut ::c_void,
+        pub ss_flags: ::c_int,
+        pub ss_size: ::size_t
+    }
+
+    pub struct statfs { // ToDo
+        pub f_type: fsword_t,
+        pub f_bsize: fsword_t,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_fsid: ::fsid_t,
+        pub f_namelen: fsword_t,
+        pub f_frsize: fsword_t,
+        f_spare: [fsword_t; 5],
+    }
+
+    pub struct msghdr { // ToDo
+        pub msg_name: *mut ::c_void,
+        pub msg_namelen: ::socklen_t,
+        pub msg_iov: *mut ::iovec,
+        pub msg_iovlen: ::size_t,
+        pub msg_control: *mut ::c_void,
+        pub msg_controllen: ::size_t,
+        pub msg_flags: ::c_int,
+    }
+
+    pub struct termios { // ToDo
+        pub c_iflag: ::tcflag_t,
+        pub c_oflag: ::tcflag_t,
+        pub c_cflag: ::tcflag_t,
+        pub c_lflag: ::tcflag_t,
+        pub c_line: ::cc_t,
+        pub c_cc: [::cc_t; ::NCCS],
+    }
+
+    pub struct sem_t { // ToDo
+        #[cfg(target_pointer_width = "32")]
+        __size: [::c_char; 16],
+        #[cfg(target_pointer_width = "64")]
+        __size: [::c_char; 32],
+        __align: [::c_long; 0],
+    }
+
+    pub struct pthread_mutex_t { // ToDo
+        #[cfg(any(target_arch = "mips", target_arch = "arm",
+                  target_arch = "powerpc"))]
+        __align: [::c_long; 0],
+        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
+                      target_arch = "powerpc")))]
+        __align: [::c_longlong; 0],
+        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
+    }
+
+    pub struct pthread_mutexattr_t { // ToDo
+        #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
+                  target_arch = "mips64", target_arch = "s390x",
+                  target_arch = "sparc64"))]
+        __align: [::c_int; 0],
+        #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
+                      target_arch = "mips64", target_arch = "s390x",
+                      target_arch = "sparc64")))]
+        __align: [::c_long; 0],
+        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
+    }
+
+    pub struct pthread_cond_t { // ToDo
+        __align: [::c_longlong; 0],
+        size: [u8; __SIZEOF_PTHREAD_COND_T],
+    }
+
+    pub struct pthread_condattr_t { // ToDo
+        __align: [::c_int; 0],
+        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
+    }
+
+    pub struct pthread_rwlock_t { // ToDo
+        #[cfg(any(target_arch = "mips", target_arch = "arm",
+                  target_arch = "powerpc"))]
+        __align: [::c_long; 0],
+        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
+                      target_arch = "powerpc")))]
+        __align: [::c_longlong; 0],
+        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
+    }
+
+    pub struct sigset_t { // ToDo
+        __val: [::c_ulong; 16],
+    }
+
+    pub struct sysinfo { // ToDo
+        pub uptime: ::c_long,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
+        pub procs: ::c_ushort,
+        pub pad: ::c_ushort,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
+        pub mem_unit: ::c_uint,
+        pub _f: [::c_char; 0],
+    }
+
+    pub struct glob_t { // ToDo
+        pub gl_pathc: ::size_t,
+        pub gl_pathv: *mut *mut c_char,
+        pub gl_offs: ::size_t,
+        pub gl_flags: ::c_int,
+        __unused1: *mut ::c_void,
+        __unused2: *mut ::c_void,
+        __unused3: *mut ::c_void,
+        __unused4: *mut ::c_void,
+        __unused5: *mut ::c_void,
+    }
+
+    pub struct rlimit64 { // ToDo
+        pub rlim_cur: rlim64_t,
+        pub rlim_max: rlim64_t,
+    }
+
+    pub struct cpu_set_t { // ToDo
+        #[cfg(target_pointer_width = "32")]
+        bits: [u32; 32],
+        #[cfg(target_pointer_width = "64")]
+        bits: [u64; 16],
+    }
+
+    pub struct fsid_t { // ToDo
+        __val: [::c_int; 2],
+    }
+}
+
+// constants
+pub const EADDRINUSE: ::c_int = 98; // Address already in use
+pub const EADDRNOTAVAIL: ::c_int = 99; // Cannot assign requested address
+pub const ECONNABORTED: ::c_int = 103; // Software caused connection abort
+pub const ECONNREFUSED: ::c_int = 111; // Connection refused
+pub const ECONNRESET: ::c_int = 104; // Connection reset by peer
+pub const EDEADLK: ::c_int = 35; // Resource deadlock would occur
+pub const ENOSYS: ::c_int = 38; // Function not implemented
+pub const ENOTCONN: ::c_int = 107; // Transport endpoint is not connected
+pub const ETIMEDOUT: ::c_int = 110; // connection timed out
+pub const O_APPEND: ::c_int = 02000;
+pub const O_ACCMODE: ::c_int = 0003;
+pub const O_CLOEXEC: ::c_int = 0x80000;
+pub const O_CREAT: ::c_int = 0100;
+pub const O_DIRECTORY: ::c_int = 0200000;
+pub const O_EXCL: ::c_int = 0200;
+pub const O_NONBLOCK: ::c_int = 04000;
+pub const O_TRUNC: ::c_int = 01000;
+pub const NCCS: usize = 32;
+pub const SIG_SETMASK: ::c_int = 2; // Set the set of blocked signals
+pub const PTHREAD_STACK_MIN: usize = 16384;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
+pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
+pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
+pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
+pub const RLIM_INFINITY: u64 = 0xffffffffffffffff;
+pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
+pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
+
+extern {
+    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
+}
+
+cfg_if! {
+    if #[cfg(target_os = "l4re")] {
+        mod l4re;
+        pub use self::l4re::*;
+    } else { }
+}
+
new file mode 100644
--- /dev/null
+++ b/third_party/rust/libc-0.2.30/src/windows.rs
@@ -0,0 +1,247 @@
+//! Windows CRT definitions
+
+pub type c_char = i8;
+pub type c_long = i32;
+pub type c_ulong = u32;
+pub type wchar_t = u16;
+
+pub type clock_t = i32;
+
+cfg_if! {
+    if #[cfg(all(target_arch = "x86", target_env = "gnu"))] {
+        pub type time_t = i32;
+    } else {
+        pub type time_t = i64;
+    }
+}
+
+pub type off_t = i32;
+pub type dev_t = u32;
+pub type ino_t = u16;
+pub enum timezone {}
+pub type time64_t = i64;
+
+s! {
+    // note this is the struct called stat64 in Windows. Not stat, nor stati64.
+    pub struct stat {
+        pub st_dev: dev_t,
+        pub st_ino: ino_t,
+        pub st_mode: u16,
+        pub st_nlink: ::c_short,
+        pub st_uid: ::c_short,
+        pub st_gid: ::c_short,
+        pub st_rdev: dev_t,
+        pub st_size: i64,
+        pub st_atime: time64_t,
+        pub st_mtime: time64_t,
+        pub st_ctime: time64_t,
+    }
+
+    // note that this is called utimbuf64 in Windows
+    pub struct utimbuf {
+        pub actime: time64_t,
+        pub modtime: time64_t,
+    }
+
+    pub struct tm {
+        tm_sec: ::c_int,
+        tm_min: ::c_int,
+        tm_hour: ::c_int,
+        tm_mday: ::c_int,
+        tm_mon: ::c_int,
+        tm_year: ::c_int,
+        tm_wday: ::c_int,
+        tm_yday: ::c_int,
+        tm_isdst: ::c_int,
+    }
+
+    pub struct timeval {
+        pub tv_sec: c_long,
+        pub tv_usec: c_long,
+    }
+
+    pub struct timespec {
+        pub tv_sec: time_t,
+        pub tv_nsec: c_long,
+    }
+}
+
+pub const EXIT_FAILURE: ::c_int = 1;
+pub const EXIT_SUCCESS: ::c_int = 0;
+pub const RAND_MAX: ::c_int = 32767;
+pub const EOF: ::c_int = -1;
+pub const SEEK_SET: ::c_int = 0;
+pub const SEEK_CUR: ::c_int = 1;
+pub const SEEK_END: ::c_int = 2;
+pub const _IOFBF: ::c_int = 0;
+pub const _IONBF: ::c_int = 4;
+pub const _IOLBF: ::c_int = 64;
+pub const BUFSIZ: ::c_uint = 512;
+pub const FOPEN_MAX: ::c_uint = 20;
+pub const FILENAME_MAX: ::c_uint = 260;
+
+cfg_if! {
+    if #[cfg(all(target_env = "gnu"))] {
+        pub const L_tmpnam: ::c_uint = 14;
+        pub const TMP_MAX: ::c_uint = 0x7fff;
+    } else if #[cfg(all(target_env = "msvc"))] {
+        pub const L_tmpnam: ::c_uint = 260;
+        pub const TMP_MAX: ::c_uint = 0x7fff_ffff;
+    } else {
+        // Unknown target_env
+    }
+}
+
+pub const O_RDONLY: ::c_int = 0;
+pub const O_WRONLY: ::c_int = 1;
+pub const O_RDWR: ::c_int = 2;
+pub const O_APPEND: ::c_int = 8;
+pub const O_CREAT: ::c_int = 256;
+pub const O_EXCL: ::c_int = 1024;
+pub const O_TEXT: ::c_int = 16384;
+pub const O_BINARY: ::c_int = 32768;
+pub const O_NOINHERIT: ::c_int = 128;
+pub const O_TRUNC: ::c_int = 512;
+pub const S_IFCHR: ::c_int = 8192;
+pub const S_IFDIR: ::c_int = 16384;
+pub const S_IFREG: ::c_int = 32768;
+pub const S_IFMT: ::c_int = 61440;
+pub const S_IEXEC: ::c_int = 64;
+pub const S_IWRITE: ::c_int = 128;
+pub const S_IREAD: ::c_int = 256;
+
+pub const LC_ALL: ::c_int = 0;
+pub const LC_COLLATE: ::c_int = 1;
+pub const LC_CTYPE: ::c_int = 2;
+pub const LC_MONETARY: ::c_int = 3;
+pub const LC_NUMERIC: ::c_int = 4;
+pub const LC_TIME: ::c_int = 5;
+
+pub const EPERM: ::c_int = 1;
+pub const ENOENT: ::c_int = 2;
+pub const ESRCH: ::c_int = 3;
+pub const EINTR: ::c_int = 4;
+pub const EIO: ::c_int = 5;
+pub const ENXIO: ::c_int = 6;
+pub const E2BIG: ::c_int = 7;
+pub const ENOEXEC: ::c_int = 8;
+pub const EBADF: ::c_int = 9;
+pub const ECHILD: ::c_int = 10;
+pub const EAGAIN: ::c_int = 11;
+pub const ENOMEM: ::c_int = 12;
+pub const EACCES: ::c_int = 13;
+pub const EFAULT: ::c_int = 14;
+pub const EBUSY: ::c_int = 16;
+pub const EEXIST: ::c_int = 17;
+pub const EXDEV: ::c_int = 18;
+pub const ENODEV: ::c_int = 19;
+pub const ENOTDIR: ::c_int = 20;
+pub const EISDIR: ::c_int = 21;
+pub const EINVAL: ::c_int = 22;
+pub const ENFILE: ::c_int = 23;
+pub const EMFILE: ::c_int = 24;
+pub const ENOTTY: ::c_int = 25;
+pub const EFBIG: ::c_int = 27;
+pub const ENOSPC: ::c_int = 28;
+pub const ESPIPE: ::c_int = 29;
+pub const EROFS: ::c_int = 30;
+pub const EMLINK: ::c_int = 31;
+pub const EPIPE: ::c_int = 32;
+pub const EDOM: ::c_int = 33;
+pub const ERANGE: ::c_int = 34;
+pub const EDEADLK: ::c_int = 36;
+pub const EDEADLOCK: ::c_int = 36;
+pub const ENAMETOOLONG: ::c_int = 38;
+pub const ENOLCK: ::c_int = 39;
+pub const ENOSYS: ::c_int = 40;
+pub const ENOTEMPTY: ::c_int = 41;
+pub const EILSEQ: ::c_int = 42;
+pub const STRUNCATE: ::c_int = 80;
+
+#[cfg(all(target_env = "msvc", stdbuild))] // " if " -- appease style checker
+#[link(name = "msvcrt", cfg(not(target_feature = "crt-static")))]
+#[link(name = "libcmt", cfg(target_feature = "crt-static"))]
+extern {}
+
+extern {
+    #[link_name = "_chmod"]
+    pub fn chmod(path: *const c_char, mode: ::c_int) -> ::c_int;
+    #[link_name = "_wchmod"]
+    pub fn wchmod(path: *const wchar_t, mode: ::c_int) -> ::c_int;
+    #[link_name = "_mkdir"]
+    pub fn mkdir(path: *const c_char) -> ::c_int;
+    #[link_name = "_wrmdir"]
+    pub fn wrmdir(path: *const wchar_t) -> ::c_int;
+    #[link_name = "_fstat64"]
+    pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int;
+    #[link_name = "_stat64"]
+    pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int;
+    #[link_name = "_wstat64"]
+    pub fn wstat(path: *const wchar_t, buf: *mut stat) -> ::c_int;
+    #[link_name = "_wutime64"]
+    pub fn wutime(file: *const wchar_t, buf: *mut utimbuf) -> ::c_int;
+    #[link_name = "_popen"]
+    pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE;
+    #[link_name = "_pclose"]
+    pub fn pclose(stream: *mut ::FILE) -> ::c_int;
+    #[link_name = "_fdopen"]
+    pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE;
+    #[link_name = "_fileno"]
+    pub fn fileno(stream: *mut ::FILE) -> ::c_int;
+    #[link_name = "_open"]
+    pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
+    #[link_name = "_wopen"]
+    pub fn wopen(path: *const wchar_t, oflag: ::c_int, ...) -> ::c_int;
+    #[link_name = "_creat"]
+    pub fn creat(path: *const c_char, mode: ::c_int) -> ::c_int;
+    #[link_name = "_access"]
+    pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int;
+    #[link_name = "_chdir"]
+    pub fn chdir(dir: *const c_char) -> ::c_int;
+    #[link_name = "_close"]
+    pub fn close(fd: ::c_int) -> ::c_int;
+    #[link_name = "_dup"]
+    pub fn dup(fd: ::c_int) -> ::c_int;
+    #[link_name = "_dup2"]
+    pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int;
+    #[link_name = "_execv"]
+    pub fn execv(prog: *const c_char, argv: *const *const c_char) -> ::intptr_t;
+    #[link_name = "_execve"]
+    pub fn execve(prog: *const c_char, argv: *const *const c_char,
+                  envp: *const *const c_char) -> ::c_int;
+    #[link_name = "_execvp"]
+    pub fn execvp(c: *const c_char, argv: *const *const c_char) -> ::c_int;
+    #[link_name = "_execvpe"]
+    pub fn execvpe(c: *const c_char, argv: *const *const c_char,
+                   envp: *const *const c_char) -> ::c_int;
+    #[link_name = "_getcwd"]
+    pub fn getcwd(buf: *mut c_char, size: ::c_int) -> *mut c_char;
+    #[link_name = "_getpid"]
+    pub fn getpid() -> ::c_int;
+    #[link_name = "_isatty"]
+    pub fn isatty(fd: ::c_int) -> ::c_int;
+    #[link_name = "_lseek"]
+    pub fn lseek(fd: ::c_int, offset: c_long, origin: ::c_int) -> c_long;
+    #[link_name = "_pipe"]
+    pub fn pipe(fds: *mut ::c_int,
+                psize: ::c_uint,
+                textmode: ::c_int) -> ::c_int;
+    #[link_name = "_read"]
+    pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::c_uint) -> ::c_int;
+    #[link_name = "_rmdir"]
+    pub fn rmdir(path: *const c_char) -> ::c_int;
+    #[link_name = "_unlink"]
+    pub fn unlink(c: *const c_char) -> ::c_int;
+    #[link_name = "_write"]
+    pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::c_uint) -> ::c_int;
+    #[link_name = "_commit"]
+    pub fn commit(fd: ::c_int) -> ::c_int;
+    #[link_name = "_get_osfhandle"]
+    pub fn get_osfhandle(fd: ::c_int) -> ::intptr_t;
+    #[link_name = "_open_osfhandle"]
+    pub fn open_osfhandle(osfhandle: ::intptr_t, flags: ::c_int) -> ::c_int;
+    pub fn setlocale(category: ::c_int, locale: *const c_char) -> *mut c_char;
+    #[link_name = "_wsetlocale"]
+    pub fn wsetlocale(category: ::c_int,
+                      locale: *const wchar_t) -> *mut wchar_t;
+}
deleted file mode 100644
--- a/third_party/rust/log-0.3.6/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"7e59fac4ef16079658aa829fc2f0bce2de96225ba72f1ef8fea6d55d5be37fe2","Cargo.toml":"021b91ff433a559e29fabddbe01c1e4cdba33317c0b8f399c61b4335771cbca4","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"7c831cff45cfd33333cc246815dccb25bfa0b981053656e707828fe3f25151da","appveyor.yml":"c61473b8c780ad2626282ce2b2ba0ef278082b6afe151a62ff419f33eaf90221","src/lib.rs":"0c05947b6f133fa9818f3a71f8f98549cf4c8f8840559fce6d0e33998af449d4","src/macros.rs":"9068d69d32e989ac273ce73659125d31cf4a166076eefdad74dfbdf9506cf9c4","tests/filters.rs":"cc61ed41a6cd77e5aef91cc8c76216b492d8de34f00635254f3835a3d964ce22"},"package":"ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/log-0.3.6/.travis.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-language: rust
-sudo: false
-rust:
-  - stable
-  - beta
-  - nightly
-script:
-  - cargo build --verbose
-  - ([ $TRAVIS_RUST_VERSION != nightly ] || cargo build --verbose --no-default-features)
-  - ([ $TRAVIS_RUST_VERSION != nightly ] || cargo build --verbose --features nightly)
-  - cargo test --verbose
-  - ([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --no-default-features)
-  - cargo test --verbose --manifest-path env/Cargo.toml
-  - cargo run --verbose --manifest-path tests/max_level_features/Cargo.toml
-  - cargo run --verbose --manifest-path tests/max_level_features/Cargo.toml --release
-  - ([ $TRAVIS_RUST_VERSION != nightly ] || cargo doc --no-deps --features nightly)
-  - CARGO_TARGET_DIR=target cargo doc --no-deps --manifest-path env/Cargo.toml
-after_success: |
-  [ $TRAVIS_BRANCH = master ] &&
-  [ $TRAVIS_PULL_REQUEST = false ] &&
-  [ $TRAVIS_RUST_VERSION = nightly ] &&
-  echo '<meta http-equiv=refresh content=0;url=log/index.html>' > target/doc/index.html &&
-  pip install ghp-import --user $USER &&
-  $HOME/.local/bin/ghp-import -n target/doc &&
-  git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
-env:
-  global:
-    secure: bNUxFmA5uEdKKdVDtgb+5WQuMRDZ6QxK5152sIZWSimxyr/x5erNZ1uacPh02Ng92dbUQ66wz90WPmqTwoL0EeJ/FmZDd29hRHXe82MNpz47QX3cGMgFNldQ2GmJmCHBXKu373B80o/ZB+BTVcYcl1ksTXuIhQg2wZtXh8bZ9F4=
-notifications:
-  email:
-    on_success: never
deleted file mode 100644
--- a/third_party/rust/log-0.3.6/Cargo.toml
+++ /dev/null
@@ -1,36 +0,0 @@
-[package]
-
-name = "log"
-version = "0.3.6"
-authors = ["The Rust Project Developers"]
-license = "MIT/Apache-2.0"
-readme = "README.md"
-repository = "https://github.com/rust-lang/log"
-documentation = "https://doc.rust-lang.org/log"
-homepage = "https://github.com/rust-lang/log"
-description = """
-A lightweight logging facade for Rust
-"""
-
-[[test]]
-name = "filters"
-harness = false
-
-[features]
-max_level_off   = []
-max_level_error = []
-max_level_warn  = []
-max_level_info  = []
-max_level_debug = []
-max_level_trace = []
-
-release_max_level_off   = []
-release_max_level_error = []
-release_max_level_warn  = []
-release_max_level_info  = []
-release_max_level_debug = []
-release_max_level_trace = []
-
-nightly = []
-use_std = []
-default = ["use_std"]
deleted file mode 100644
--- a/third_party/rust/log-0.3.6/README.md
+++ /dev/null
@@ -1,160 +0,0 @@
-log
-===
-
-A Rust library providing a lightweight logging *facade*.
-
-[![Build Status](https://travis-ci.org/rust-lang-nursery/log.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/log)
-[![Build status](https://ci.appveyor.com/api/projects/status/nopdjmmjt45xcrki?svg=true)](https://ci.appveyor.com/project/alexcrichton/log)
-
-* [`log` documentation](https://doc.rust-lang.org/log)
-* [`env_logger` documentation](https://doc.rust-lang.org/log/env_logger)
-
-A logging facade provides a single logging API that abstracts over the actual
-logging implementation. Libraries can use the logging API provided by this
-crate, and the consumer of those libraries can choose the logging
-implementation that is most suitable for its use case.
-
-## Usage
-
-## In libraries
-
-Libraries should link only to the `log` crate, and use the provided macros to
-log whatever information will be useful to downstream consumers:
-
-```toml
-[dependencies]
-log = "0.3"
-```
-
-```rust
-#[macro_use]
-extern crate log;
-
-pub fn shave_the_yak(yak: &Yak) {
-    trace!("Commencing yak shaving");
-
-    loop {
-        match find_a_razor() {
-            Ok(razor) => {
-                info!("Razor located: {}", razor);
-                yak.shave(razor);
-                break;
-            }
-            Err(err) => {
-                warn!("Unable to locate a razor: {}, retrying", err);
-            }
-        }
-    }
-}
-```
-
-## In executables
-
-Executables should choose a logger implementation and initialize it early in the
-runtime of the program. Logger implementations will typically include a
-function to do this. Any log messages generated before the logger is
-initialized will be ignored.
-
-The executable itself may use the `log` crate to log as well.
-
-The `env_logger` crate provides a logger implementation that mirrors the
-functionality of the old revision of the `log` crate.
-
-```toml
-[dependencies]
-log = "0.3"
-env_logger = "0.3"
-```
-
-```rust
-#[macro_use]
-extern crate log;
-extern crate env_logger;
-
-fn main() {
-    env_logger::init().unwrap();
-
-    info!("starting up");
-
-    // ...
-}
-```
-
-## In tests
-
-Tests can use the `env_logger` crate to see log messages generated during that test:
-
-```toml
-[dependencies]
-log = "0.3"
-
-[dev-dependencies]
-env_logger = "0.3"
-```
-
-```rust
-#[macro_use]
-extern crate log;
-
-fn add_one(num: i32) -> i32 {
-    info!("add_one called with {}", num);
-    num + 1
-}
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-    extern crate env_logger;
-
-    #[test]
-    fn it_adds_one() {
-        let _ = env_logger::init();
-        info!("can log from the test too");
-        assert_eq!(3, add_one(2));
-    }
-
-    #[test]
-    fn it_handles_negative_numbers() {
-        let _ = env_logger::init();
-        info!("logging from another test");
-        assert_eq!(-7, add_one(-8));
-    }
-}
-```
-
-Assuming the module under test is called `my_lib`, running the tests with the
-`RUST_LOG` filtering to info messages from this module looks like:
-
-```bash
-$ RUST_LOG=my_lib=info cargo test
-     Running target/debug/my_lib-...
-
-running 2 tests
-INFO:my_lib::tests: logging from another test
-INFO:my_lib: add_one called with -8
-test tests::it_handles_negative_numbers ... ok
-INFO:my_lib::tests: can log from the test too
-INFO:my_lib: add_one called with 2
-test tests::it_adds_one ... ok
-
-test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured
-```
-
-Note that `env_logger::init()` needs to be called in each test in which you
-want to enable logging. Additionally, the default behavior of tests to
-run in parallel means that logging output may be interleaved with test output.
-Either run tests in a single thread by specifying `RUST_TEST_THREADS=1` or by
-running one test by specifying its name as an argument to the test binaries as
-directed by the `cargo test` help docs:
-
-```bash
-$ RUST_LOG=my_lib=info cargo test it_adds_one
-     Running target/debug/my_lib-...
-
-running 1 test
-INFO:my_lib::tests: can log from the test too
-INFO:my_lib: add_one called with 2
-test tests::it_adds_one ... ok
-
-test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
-```
deleted file mode 100644
--- a/third_party/rust/log-0.3.6/appveyor.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-environment:
-  matrix:
-  - TARGET: x86_64-pc-windows-msvc
-  - TARGET: i686-pc-windows-msvc
-  - TARGET: i686-pc-windows-gnu
-install:
-  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
-  - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
-  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
-  - SET PATH=%PATH%;C:\MinGW\bin
-  - rustc -V
-  - cargo -V
-
-build: false
-
-test_script:
-  - cargo test --verbose
-  - cargo test --manifest-path env/Cargo.toml
deleted file mode 100644
--- a/third_party/rust/log-0.3.6/src/lib.rs
+++ /dev/null
@@ -1,1013 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! A lightweight logging facade.
-//!
-//! A logging facade provides a single logging API that abstracts over the
-//! actual logging implementation. Libraries can use the logging API provided
-//! by this crate, and the consumer of those libraries can choose the logging
-//! framework that is most suitable for its use case.
-//!
-//! If no logging implementation is selected, the facade falls back to a "noop"
-//! implementation that ignores all log messages. The overhead in this case
-//! is very small - just an integer load, comparison and jump.
-//!
-//! A log request consists of a target, a level, and a body. A target is a
-//! string which defaults to the module path of the location of the log
-//! request, though that default may be overridden. Logger implementations
-//! typically use the target to filter requests based on some user
-//! configuration.
-//!
-//! # Use
-//!
-//! ## In libraries
-//!
-//! Libraries should link only to the `log` crate, and use the provided
-//! macros to log whatever information will be useful to downstream consumers.
-//!
-//! ### Examples
-//!
-//! ```rust
-//! # #![allow(unstable)]
-//! #[macro_use]
-//! extern crate log;
-//!
-//! # #[derive(Debug)] pub struct Yak(String);
-//! # impl Yak { fn shave(&self, _: u32) {} }
-//! # fn find_a_razor() -> Result<u32, u32> { Ok(1) }
-//! pub fn shave_the_yak(yak: &Yak) {
-//!     info!(target: "yak_events", "Commencing yak shaving for {:?}", yak);
-//!
-//!     loop {
-//!         match find_a_razor() {
-//!             Ok(razor) => {
-//!                 info!("Razor located: {}", razor);
-//!                 yak.shave(razor);
-//!                 break;
-//!             }
-//!             Err(err) => {
-//!                 warn!("Unable to locate a razor: {}, retrying", err);
-//!             }
-//!         }
-//!     }
-//! }
-//! # fn main() {}
-//! ```
-//!
-//! ## In executables
-//!
-//! Executables should choose a logging framework and initialize it early in the
-//! runtime of the program. Logging frameworks will typically include a
-//! function to do this. Any log messages generated before the framework is
-//! initialized will be ignored.
-//!
-//! The executable itself may use the `log` crate to log as well.
-//!
-//! ### Warning
-//!
-//! The logging system may only be initialized once.
-//!
-//! ### Examples
-//!
-//! ```rust,ignore
-//! #[macro_use]
-//! extern crate log;
-//! extern crate my_logger;
-//!
-//! fn main() {
-//!     my_logger::init();
-//!
-//!     info!("starting up");
-//!
-//!     // ...
-//! }
-//! ```
-//!
-//! # Logger implementations
-//!
-//! Loggers implement the `Log` trait. Here's a very basic example that simply
-//! logs all messages at the `Error`, `Warn` or `Info` levels to stdout:
-//!
-//! ```rust
-//! extern crate log;
-//!
-//! use log::{LogRecord, LogLevel, LogMetadata};
-//!
-//! struct SimpleLogger;
-//!
-//! impl log::Log for SimpleLogger {
-//!     fn enabled(&self, metadata: &LogMetadata) -> bool {
-//!         metadata.level() <= LogLevel::Info
-//!     }
-//!
-//!     fn log(&self, record: &LogRecord) {
-//!         if self.enabled(record.metadata()) {
-//!             println!("{} - {}", record.level(), record.args());
-//!         }
-//!     }
-//! }
-//!
-//! # fn main() {}
-//! ```
-//!
-//! Loggers are installed by calling the `set_logger` function. It takes a
-//! closure which is provided a `MaxLogLevel` token and returns a `Log` trait
-//! object. The `MaxLogLevel` token controls the global maximum log level. The
-//! logging facade uses this as an optimization to improve performance of log
-//! messages at levels that are disabled. In the case of our example logger,
-//! we'll want to set the maximum log level to `Info`, since we ignore any
-//! `Debug` or `Trace` level log messages. A logging framework should provide a
-//! function that wraps a call to `set_logger`, handling initialization of the
-//! logger:
-//!
-//! ```rust
-//! # extern crate log;
-//! # use log::{LogLevel, LogLevelFilter, SetLoggerError, LogMetadata};
-//! # struct SimpleLogger;
-//! # impl log::Log for SimpleLogger {
-//! #   fn enabled(&self, _: &LogMetadata) -> bool { false }
-//! #   fn log(&self, _: &log::LogRecord) {}
-//! # }
-//! # fn main() {}
-//! # #[cfg(feature = "use_std")]
-//! pub fn init() -> Result<(), SetLoggerError> {
-//!     log::set_logger(|max_log_level| {
-//!         max_log_level.set(LogLevelFilter::Info);
-//!         Box::new(SimpleLogger)
-//!     })
-//! }
-//! ```
-//!
-//! # Use with `no_std`
-//!
-//! To use the `log` crate without depending on `libstd`, you need to specify
-//! `default-features = false` when specifying the dependency in `Cargo.toml`.
-//! This makes no difference to libraries using `log` since the logging API
-//! remains the same. However executables will need to use the `set_logger_raw`
-//! function to initialize a logger and the `shutdown_logger_raw` function to
-//! shut down the global logger before exiting:
-//!
-//! ```rust
-//! # extern crate log;
-//! # use log::{LogLevel, LogLevelFilter, SetLoggerError, ShutdownLoggerError,
-//! #           LogMetadata};
-//! # struct SimpleLogger;
-//! # impl log::Log for SimpleLogger {
-//! #   fn enabled(&self, _: &LogMetadata) -> bool { false }
-//! #   fn log(&self, _: &log::LogRecord) {}
-//! # }
-//! # impl SimpleLogger {
-//! #   fn flush(&self) {}
-//! # }
-//! # fn main() {}
-//! pub fn init() -> Result<(), SetLoggerError> {
-//!     unsafe {
-//!         log::set_logger_raw(|max_log_level| {
-//!             static LOGGER: SimpleLogger = SimpleLogger;
-//!             max_log_level.set(LogLevelFilter::Info);
-//!             &SimpleLogger
-//!         })
-//!     }
-//! }
-//! pub fn shutdown() -> Result<(), ShutdownLoggerError> {
-//!     log::shutdown_logger_raw().map(|logger| {
-//!         let logger = unsafe { &*(logger as *const SimpleLogger) };
-//!         logger.flush();
-//!     })
-//! }
-//! ```
-
-#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
-       html_favicon_url = "https://www.rust-lang.org/favicon.ico",
-       html_root_url = "https://doc.rust-lang.org/log/")]
-#![warn(missing_docs)]
-#![cfg_attr(feature = "nightly", feature(panic_handler))]
-
-#![cfg_attr(not(feature = "use_std"), no_std)]
-
-#[cfg(not(feature = "use_std"))]
-extern crate core as std;
-
-use std::cmp;
-#[cfg(feature = "use_std")]
-use std::error;
-use std::fmt;
-use std::mem;
-use std::ops::Deref;
-use std::str::FromStr;
-use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
-#[macro_use]
-mod macros;
-
-// The setup here is a bit weird to make shutdown_logger_raw work.
-//
-// There are four different states that we care about: the logger's
-// uninitialized, the logger's initializing (set_logger's been called but
-// LOGGER hasn't actually been set yet), the logger's active, or the logger is
-// shut down after calling shutdown_logger_raw.
-//
-// The LOGGER static holds a pointer to the global logger. It is protected by
-// the STATE static which determines whether LOGGER has been initialized yet.
-//
-// The shutdown_logger_raw routine needs to make sure that no threads are
-// actively logging before it returns. The number of actively logging threads is
-// tracked in the REFCOUNT static. The routine first sets STATE back to
-// INITIALIZING. All logging calls past that point will immediately return
-// without accessing the logger. At that point, the at_exit routine just waits
-// for the refcount to reach 0 before deallocating the logger. Note that the
-// refcount does not necessarily monotonically decrease at this point, as new
-// log calls still increment and decrement it, but the interval in between is
-// small enough that the wait is really just for the active log calls to finish.
-
-static mut LOGGER: *const Log = &NopLogger;
-static STATE: AtomicUsize = ATOMIC_USIZE_INIT;
-static REFCOUNT: AtomicUsize = ATOMIC_USIZE_INIT;
-
-const UNINITIALIZED: usize = 0;
-const INITIALIZING: usize = 1;
-const INITIALIZED: usize = 2;
-
-static MAX_LOG_LEVEL_FILTER: AtomicUsize = ATOMIC_USIZE_INIT;
-
-static LOG_LEVEL_NAMES: [&'static str; 6] = ["OFF", "ERROR", "WARN", "INFO",
-                                             "DEBUG", "TRACE"];
-
-/// An enum representing the available verbosity levels of the logging framework
-///
-/// A `LogLevel` may be compared directly to a `LogLevelFilter`.
-#[repr(usize)]
-#[derive(Copy, Eq, Debug)]
-pub enum LogLevel {
-    /// The "error" level.
-    ///
-    /// Designates very serious errors.
-    Error = 1, // This way these line up with the discriminants for LogLevelFilter below
-    /// The "warn" level.
-    ///
-    /// Designates hazardous situations.
-    Warn,
-    /// The "info" level.
-    ///
-    /// Designates useful information.
-    Info,
-    /// The "debug" level.
-    ///
-    /// Designates lower priority information.
-    Debug,
-    /// The "trace" level.
-    ///
-    /// Designates very low priority, often extremely verbose, information.
-    Trace,
-}
-
-impl Clone for LogLevel {
-    #[inline]
-    fn clone(&self) -> LogLevel {
-        *self
-    }
-}
-
-impl PartialEq for LogLevel {
-    #[inline]
-    fn eq(&self, other: &LogLevel) -> bool {
-        *self as usize == *other as usize
-    }
-}
-
-impl PartialEq<LogLevelFilter> for LogLevel {
-    #[inline]
-    fn eq(&self, other: &LogLevelFilter) -> bool {
-        *self as usize == *other as usize
-    }
-}
-
-impl PartialOrd for LogLevel {
-    #[inline]
-    fn partial_cmp(&self, other: &LogLevel) -> Option<cmp::Ordering> {
-        Some(self.cmp(other))
-    }
-}
-
-impl PartialOrd<LogLevelFilter> for LogLevel {
-    #[inline]
-    fn partial_cmp(&self, other: &LogLevelFilter) -> Option<cmp::Ordering> {
-        Some((*self as usize).cmp(&(*other as usize)))
-    }
-}
-
-impl Ord for LogLevel {
-    #[inline]
-    fn cmp(&self, other: &LogLevel) -> cmp::Ordering {
-        (*self as usize).cmp(&(*other as usize))
-    }
-}
-
-fn ok_or<T, E>(t: Option<T>, e: E) -> Result<T, E> {
-    match t {
-        Some(t) => Ok(t),
-        None => Err(e),
-    }
-}
-
-// Reimplemented here because std::ascii is not available in libcore
-fn eq_ignore_ascii_case(a: &str, b: &str) -> bool {
-    fn to_ascii_uppercase(c: u8) -> u8 {
-        if c >= b'a' && c <= b'z' {
-            c - b'a' + b'A'
-        } else {
-            c
-        }
-    }
-
-    if a.len() == b.len() {
-        a.bytes()
-         .zip(b.bytes())
-         .all(|(a, b)| to_ascii_uppercase(a) == to_ascii_uppercase(b))
-    } else {
-        false
-    }
-}
-
-impl FromStr for LogLevel {
-    type Err = ();
-    fn from_str(level: &str) -> Result<LogLevel, ()> {
-        ok_or(LOG_LEVEL_NAMES.iter()
-                    .position(|&name| eq_ignore_ascii_case(name, level))
-                    .into_iter()
-                    .filter(|&idx| idx != 0)
-                    .map(|idx| LogLevel::from_usize(idx).unwrap())
-                    .next(), ())
-    }
-}
-
-impl fmt::Display for LogLevel {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt.pad(LOG_LEVEL_NAMES[*self as usize])
-    }
-}
-
-impl LogLevel {
-    fn from_usize(u: usize) -> Option<LogLevel> {
-        match u {
-            1 => Some(LogLevel::Error),
-            2 => Some(LogLevel::Warn),
-            3 => Some(LogLevel::Info),
-            4 => Some(LogLevel::Debug),
-            5 => Some(LogLevel::Trace),
-            _ => None
-        }
-    }
-
-    /// Returns the most verbose logging level.
-    #[inline]
-    pub fn max() -> LogLevel {
-        LogLevel::Trace
-    }
-
-    /// Converts the `LogLevel` to the equivalent `LogLevelFilter`.
-    #[inline]
-    pub fn to_log_level_filter(&self) -> LogLevelFilter {
-        LogLevelFilter::from_usize(*self as usize).unwrap()
-    }
-}
-
-/// An enum representing the available verbosity level filters of the logging
-/// framework.
-///
-/// A `LogLevelFilter` may be compared directly to a `LogLevel`.
-#[repr(usize)]
-#[derive(Copy, Eq, Debug)]
-pub enum LogLevelFilter {
-    /// A level lower than all log levels.
-    Off,
-    /// Corresponds to the `Error` log level.
-    Error,
-    /// Corresponds to the `Warn` log level.
-    Warn,
-    /// Corresponds to the `Info` log level.
-    Info,
-    /// Corresponds to the `Debug` log level.
-    Debug,
-    /// Corresponds to the `Trace` log level.
-    Trace,
-}
-
-// Deriving generates terrible impls of these traits
-
-impl Clone for LogLevelFilter {
-    #[inline]
-    fn clone(&self) -> LogLevelFilter {
-        *self
-    }
-}
-
-impl PartialEq for LogLevelFilter {
-    #[inline]
-    fn eq(&self, other: &LogLevelFilter) -> bool {
-        *self as usize == *other as usize
-    }
-}
-
-impl PartialEq<LogLevel> for LogLevelFilter {
-    #[inline]
-    fn eq(&self, other: &LogLevel) -> bool {
-        other.eq(self)
-    }
-}
-
-impl PartialOrd for LogLevelFilter {
-    #[inline]
-    fn partial_cmp(&self, other: &LogLevelFilter) -> Option<cmp::Ordering> {
-        Some(self.cmp(other))
-    }
-}
-
-impl PartialOrd<LogLevel> for LogLevelFilter {
-    #[inline]
-    fn partial_cmp(&self, other: &LogLevel) -> Option<cmp::Ordering> {
-        other.partial_cmp(self).map(|x| x.reverse())
-    }
-}
-
-impl Ord for LogLevelFilter {
-    #[inline]
-    fn cmp(&self, other: &LogLevelFilter) -> cmp::Ordering {
-        (*self as usize).cmp(&(*other as usize))
-    }
-}
-
-impl FromStr for LogLevelFilter {
-    type Err = ();
-    fn from_str(level: &str) -> Result<LogLevelFilter, ()> {
-        ok_or(LOG_LEVEL_NAMES.iter()
-                    .position(|&name| eq_ignore_ascii_case(name, level))
-                    .map(|p| LogLevelFilter::from_usize(p).unwrap()), ())
-    }
-}
-
-impl fmt::Display for LogLevelFilter {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        write!(fmt, "{}", LOG_LEVEL_NAMES[*self as usize])
-    }
-}
-
-impl LogLevelFilter {
-    fn from_usize(u: usize) -> Option<LogLevelFilter> {
-        match u {
-            0 => Some(LogLevelFilter::Off),
-            1 => Some(LogLevelFilter::Error),
-            2 => Some(LogLevelFilter::Warn),
-            3 => Some(LogLevelFilter::Info),
-            4 => Some(LogLevelFilter::Debug),
-            5 => Some(LogLevelFilter::Trace),
-            _ => None
-        }
-    }
-    /// Returns the most verbose logging level filter.
-    #[inline]
-    pub fn max() -> LogLevelFilter {
-        LogLevelFilter::Trace
-    }
-
-    /// Converts `self` to the equivalent `LogLevel`.
-    ///
-    /// Returns `None` if `self` is `LogLevelFilter::Off`.
-    #[inline]
-    pub fn to_log_level(&self) -> Option<LogLevel> {
-        LogLevel::from_usize(*self as usize)
-    }
-}
-
-/// The "payload" of a log message.
-pub struct LogRecord<'a> {
-    metadata: LogMetadata<'a>,
-    location: &'a LogLocation,
-    args: fmt::Arguments<'a>,
-}
-
-impl<'a> LogRecord<'a> {
-    /// The message body.
-    pub fn args(&self) -> &fmt::Arguments<'a> {
-        &self.args
-    }
-
-    /// Metadata about the log directive.
-    pub fn metadata(&self) -> &LogMetadata {
-        &self.metadata
-    }
-
-    /// The location of the log directive.
-    pub fn location(&self) -> &LogLocation {
-        self.location
-    }
-
-    /// The verbosity level of the message.
-    pub fn level(&self) -> LogLevel {
-        self.metadata.level()
-    }
-
-    /// The name of the target of the directive.
-    pub fn target(&self) -> &str {
-        self.metadata.target()
-    }
-}
-
-/// Metadata about a log message.
-pub struct LogMetadata<'a> {
-    level: LogLevel,
-    target: &'a str,
-}
-
-impl<'a> LogMetadata<'a> {
-    /// The verbosity level of the message.
-    pub fn level(&self) -> LogLevel {
-        self.level
-    }
-
-    /// The name of the target of the directive.
-    pub fn target(&self) -> &str {
-        self.target
-    }
-}
-
-/// A trait encapsulating the operations required of a logger
-pub trait Log: Sync+Send {
-    /// Determines if a log message with the specified metadata would be
-    /// logged.
-    ///
-    /// This is used by the `log_enabled!` macro to allow callers to avoid
-    /// expensive computation of log message arguments if the message would be
-    /// discarded anyway.
-    fn enabled(&self, metadata: &LogMetadata) -> bool;
-
-    /// Logs the `LogRecord`.
-    ///
-    /// Note that `enabled` is *not* necessarily called before this method.
-    /// Implementations of `log` should perform all necessary filtering
-    /// internally.
-    fn log(&self, record: &LogRecord);
-}
-
-// Just used as a dummy initial value for LOGGER
-struct NopLogger;
-
-impl Log for NopLogger {
-    fn enabled(&self, _: &LogMetadata) -> bool { false }
-
-    fn log(&self, _: &LogRecord) {}
-}
-
-/// The location of a log message.
-///
-/// # Warning
-///
-/// The fields of this struct are public so that they may be initialized by the
-/// `log!` macro. They are subject to change at any time and should never be
-/// accessed directly.
-#[derive(Copy, Clone, Debug)]
-pub struct LogLocation {
-    #[doc(hidden)]
-    pub __module_path: &'static str,
-    #[doc(hidden)]
-    pub __file: &'static str,
-    #[doc(hidden)]
-    pub __line: u32,
-}
-
-impl LogLocation {
-    /// The module path of the message.
-    pub fn module_path(&self) -> &str {
-        self.__module_path
-    }
-
-    /// The source file containing the message.
-    pub fn file(&self) -> &str {
-        self.__file
-    }
-
-    /// The line containing the message.
-    pub fn line(&self) -> u32 {
-        self.__line
-    }
-}
-
-/// A token providing read and write access to the global maximum log level
-/// filter.
-///
-/// The maximum log level is used as an optimization to avoid evaluating log
-/// messages that will be ignored by the logger. Any message with a level
-/// higher than the maximum log level filter will be ignored. A logger should
-/// make sure to keep the maximum log level filter in sync with its current
-/// configuration.
-#[allow(missing_copy_implementations)]
-pub struct MaxLogLevelFilter(());
-
-impl fmt::Debug for MaxLogLevelFilter {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        write!(fmt, "MaxLogLevelFilter")
-    }
-}
-
-impl MaxLogLevelFilter {
-    /// Gets the current maximum log level filter.
-    pub fn get(&self) -> LogLevelFilter {
-        max_log_level()
-    }
-
-    /// Sets the maximum log level.
-    pub fn set(&self, level: LogLevelFilter) {
-        MAX_LOG_LEVEL_FILTER.store(level as usize, Ordering::SeqCst)
-    }
-}
-
-/// Returns the current maximum log level.
-///
-/// The `log!`, `error!`, `warn!`, `info!`, `debug!`, and `trace!` macros check
-/// this value and discard any message logged at a higher level. The maximum
-/// log level is set by the `MaxLogLevel` token passed to loggers.
-#[inline(always)]
-pub fn max_log_level() -> LogLevelFilter {
-    unsafe { mem::transmute(MAX_LOG_LEVEL_FILTER.load(Ordering::Relaxed)) }
-}
-
-/// Sets the global logger.
-///
-/// The `make_logger` closure is passed a `MaxLogLevel` object, which the
-/// logger should use to keep the global maximum log level in sync with the
-/// highest log level that the logger will not ignore.
-///
-/// This function may only be called once in the lifetime of a program. Any log
-/// events that occur before the call to `set_logger` completes will be
-/// ignored.
-///
-/// This function does not typically need to be called manually. Logger
-/// implementations should provide an initialization method that calls
-/// `set_logger` internally.
-///
-/// Requires the `use_std` feature (enabled by default).
-#[cfg(feature = "use_std")]
-pub fn set_logger<M>(make_logger: M) -> Result<(), SetLoggerError>
-        where M: FnOnce(MaxLogLevelFilter) -> Box<Log> {
-    unsafe { set_logger_raw(|max_level| mem::transmute(make_logger(max_level))) }
-}
-
-/// Sets the global logger from a raw pointer.
-///
-/// This function is similar to `set_logger` except that it is usable in
-/// `no_std` code.
-///
-/// The `make_logger` closure is passed a `MaxLogLevel` object, which the
-/// logger should use to keep the global maximum log level in sync with the
-/// highest log level that the logger will not ignore.
-///
-/// This function may only be called once in the lifetime of a program. Any log
-/// events that occur before the call to `set_logger_raw` completes will be
-/// ignored.
-///
-/// This function does not typically need to be called manually. Logger
-/// implementations should provide an initialization method that calls
-/// `set_logger_raw` internally.
-///
-/// # Safety
-///
-/// The pointer returned by `make_logger` must remain valid for the entire
-/// duration of the program or until `shutdown_logger_raw` is called. In
-/// addition, `shutdown_logger` *must not* be called after this function.
-pub unsafe fn set_logger_raw<M>(make_logger: M) -> Result<(), SetLoggerError>
-        where M: FnOnce(MaxLogLevelFilter) -> *const Log {
-    if STATE.compare_and_swap(UNINITIALIZED, INITIALIZING,
-                              Ordering::SeqCst) != UNINITIALIZED {
-        return Err(SetLoggerError(()));
-    }
-
-    LOGGER = make_logger(MaxLogLevelFilter(()));
-    STATE.store(INITIALIZED, Ordering::SeqCst);
-    Ok(())
-}
-
-/// Shuts down the global logger.
-///
-/// This function may only be called once in the lifetime of a program, and may
-/// not be called before `set_logger`. Once the global logger has been shut
-/// down, it can no longer be re-initialized by `set_logger`. Any log events
-/// that occur after the call to `shutdown_logger` completes will be ignored.
-///
-/// The logger that was originally created by the call to to `set_logger` is
-/// returned on success. At that point it is guaranteed that no other threads
-/// are concurrently accessing the logger object.
-#[cfg(feature = "use_std")]
-pub fn shutdown_logger() -> Result<Box<Log>, ShutdownLoggerError> {
-    shutdown_logger_raw().map(|l| unsafe { mem::transmute(l) })
-}
-
-/// Shuts down the global logger.
-///
-/// This function is similar to `shutdown_logger` except that it is usable in
-/// `no_std` code.
-///
-/// This function may only be called once in the lifetime of a program, and may
-/// not be called before `set_logger_raw`. Once the global logger has been shut
-/// down, it can no longer be re-initialized by `set_logger_raw`. Any log
-/// events that occur after the call to `shutdown_logger_raw` completes will be
-/// ignored.
-///
-/// The pointer that was originally passed to `set_logger_raw` is returned on
-/// success. At that point it is guaranteed that no other threads are
-/// concurrently accessing the logger object.
-pub fn shutdown_logger_raw() -> Result<*const Log, ShutdownLoggerError> {
-    // Set the global log level to stop other thread from logging
-    MAX_LOG_LEVEL_FILTER.store(0, Ordering::SeqCst);
-
-    // Set to INITIALIZING to prevent re-initialization after
-    if STATE.compare_and_swap(INITIALIZED, INITIALIZING,
-                              Ordering::SeqCst) != INITIALIZED {
-        return Err(ShutdownLoggerError(()));
-    }
-
-    while REFCOUNT.load(Ordering::SeqCst) != 0 {
-        // FIXME add a sleep here when it doesn't involve timers
-    }
-
-    unsafe {
-        let logger = LOGGER;
-        LOGGER = &NopLogger;
-        Ok(logger)
-    }
-}
-
-/// The type returned by `set_logger` if `set_logger` has already been called.
-#[allow(missing_copy_implementations)]
-#[derive(Debug)]
-pub struct SetLoggerError(());
-
-impl fmt::Display for SetLoggerError {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        write!(fmt, "attempted to set a logger after the logging system \
-                     was already initialized")
-    }
-}
-
-// The Error trait is not available in libcore
-#[cfg(feature = "use_std")]
-impl error::Error for SetLoggerError {
-    fn description(&self) -> &str { "set_logger() called multiple times" }
-}
-
-/// The type returned by `shutdown_logger_raw` if `shutdown_logger_raw` has
-/// already been called or if `set_logger_raw` has not been called yet.
-#[allow(missing_copy_implementations)]
-#[derive(Debug)]
-pub struct ShutdownLoggerError(());
-
-impl fmt::Display for ShutdownLoggerError {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        write!(fmt, "attempted to shut down the logger without an active logger")
-    }
-}
-
-// The Error trait is not available in libcore
-#[cfg(feature = "use_std")]
-impl error::Error for ShutdownLoggerError {
-    fn description(&self) -> &str { "shutdown_logger() called without an active logger" }
-}
-
-/// Registers a panic hook which logs at the error level.
-///
-/// The format is the same as the default panic hook . The reporting module is
-/// `log::panic`.
-///
-/// Requires the `use_std` (enabled by default) and `nightly` features.
-#[cfg(all(feature = "nightly", feature = "use_std"))]
-pub fn log_panics() {
-    std::panic::set_hook(Box::new(panic::log));
-}
-
-// inner module so that the reporting module is log::panic instead of log
-#[cfg(all(feature = "nightly", feature = "use_std"))]
-mod panic {
-    use std::panic::PanicInfo;
-    use std::thread;
-
-    pub fn log(info: &PanicInfo) {
-        let thread = thread::current();
-        let thread = thread.name().unwrap_or("<unnamed>");
-
-        let msg = match info.payload().downcast_ref::<&'static str>() {
-            Some(s) => *s,
-            None => match info.payload().downcast_ref::<String>() {
-                Some(s) => &s[..],
-                None => "Box<Any>",
-            }
-        };
-
-        match info.location() {
-            Some(location) => {
-                error!("thread '{}' panicked at '{}': {}:{}",
-                       thread,
-                       msg,
-                       location.file(),
-                       location.line())
-            }
-            None => error!("thread '{}' panicked at '{}'", thread, msg),
-        }
-    }
-}
-
-struct LoggerGuard(&'static Log);
-
-impl Drop for LoggerGuard {
-    fn drop(&mut self) {
-        REFCOUNT.fetch_sub(1, Ordering::SeqCst);
-    }
-}
-
-impl Deref for LoggerGuard {
-    type Target = Log;
-
-    fn deref(&self) -> &(Log + 'static) {
-        self.0
-    }
-}
-
-fn logger() -> Option<LoggerGuard> {
-    REFCOUNT.fetch_add(1, Ordering::SeqCst);
-    if STATE.load(Ordering::SeqCst) != INITIALIZED {
-        REFCOUNT.fetch_sub(1, Ordering::SeqCst);
-        None
-    } else {
-        Some(LoggerGuard(unsafe { &*LOGGER }))
-    }
-}
-
-// WARNING
-// This is not considered part of the crate's public API. It is subject to
-// change at any time.
-#[doc(hidden)]
-pub fn __enabled(level: LogLevel, target: &str) -> bool {
-    if let Some(logger) = logger() {
-        logger.enabled(&LogMetadata { level: level, target: target })
-    } else {
-        false
-    }
-}
-
-// WARNING
-// This is not considered part of the crate's public API. It is subject to
-// change at any time.
-#[doc(hidden)]
-pub fn __log(level: LogLevel, target: &str, loc: &LogLocation,
-             args: fmt::Arguments) {
-    if let Some(logger) = logger() {
-        let record = LogRecord {
-            metadata: LogMetadata {
-                level: level,
-                target: target,
-            },
-            location: loc,
-            args: args
-        };
-        logger.log(&record)
-    }
-}
-
-// WARNING
-// This is not considered part of the crate's public API. It is subject to
-// change at any time.
-#[inline(always)]
-#[doc(hidden)]
-pub fn __static_max_level() -> LogLevelFilter {
-    if !cfg!(debug_assertions) {
-        // This is a release build. Check `release_max_level_*` first.
-        if cfg!(feature = "release_max_level_off") {
-            return LogLevelFilter::Off
-        } else if cfg!(feature = "release_max_level_error") {
-            return LogLevelFilter::Error
-        } else if cfg!(feature = "release_max_level_warn") {
-            return LogLevelFilter::Warn
-        } else if cfg!(feature = "release_max_level_info") {
-            return LogLevelFilter::Info
-        } else if cfg!(feature = "release_max_level_debug") {
-            return LogLevelFilter::Debug
-        } else if cfg!(feature = "release_max_level_trace") {
-            return LogLevelFilter::Trace
-        }
-    }
-    if cfg!(feature = "max_level_off") {
-        LogLevelFilter::Off
-    } else if cfg!(feature = "max_level_error") {
-        LogLevelFilter::Error
-    } else if cfg!(feature = "max_level_warn") {
-        LogLevelFilter::Warn
-    } else if cfg!(feature = "max_level_info") {
-        LogLevelFilter::Info
-    } else if cfg!(feature = "max_level_debug") {
-        LogLevelFilter::Debug
-    } else {
-        LogLevelFilter::Trace
-    }
-}
-
-#[cfg(test)]
-mod tests {
-     extern crate std;
-     use tests::std::string::ToString;
-     use super::{LogLevel, LogLevelFilter};
-
-     #[test]
-     fn test_loglevelfilter_from_str() {
-         let tests = [
-             ("off",   Ok(LogLevelFilter::Off)),
-             ("error", Ok(LogLevelFilter::Error)),
-             ("warn",  Ok(LogLevelFilter::Warn)),
-             ("info",  Ok(LogLevelFilter::Info)),
-             ("debug", Ok(LogLevelFilter::Debug)),
-             ("trace", Ok(LogLevelFilter::Trace)),
-             ("OFF",   Ok(LogLevelFilter::Off)),
-             ("ERROR", Ok(LogLevelFilter::Error)),
-             ("WARN",  Ok(LogLevelFilter::Warn)),
-             ("INFO",  Ok(LogLevelFilter::Info)),
-             ("DEBUG", Ok(LogLevelFilter::Debug)),
-             ("TRACE", Ok(LogLevelFilter::Trace)),
-             ("asdf",  Err(())),
-         ];
-         for &(s, ref expected) in &tests {
-             assert_eq!(expected, &s.parse());
-         }
-     }
-
-     #[test]
-     fn test_loglevel_from_str() {
-         let tests = [
-             ("OFF",   Err(())),
-             ("error", Ok(LogLevel::Error)),
-             ("warn",  Ok(LogLevel::Warn)),
-             ("info",  Ok(LogLevel::Info)),
-             ("debug", Ok(LogLevel::Debug)),
-             ("trace", Ok(LogLevel::Trace)),
-             ("ERROR", Ok(LogLevel::Error)),
-             ("WARN",  Ok(LogLevel::Warn)),
-             ("INFO",  Ok(LogLevel::Info)),
-             ("DEBUG", Ok(LogLevel::Debug)),
-             ("TRACE", Ok(LogLevel::Trace)),
-             ("asdf",  Err(())),
-         ];
-         for &(s, ref expected) in &tests {
-             assert_eq!(expected, &s.parse());
-         }
-     }
-
-     #[test]
-     fn test_loglevel_show() {
-         assert_eq!("INFO", LogLevel::Info.to_string());
-         assert_eq!("ERROR", LogLevel::Error.to_string());
-     }
-
-     #[test]
-     fn test_loglevelfilter_show() {
-         assert_eq!("OFF", LogLevelFilter::Off.to_string());
-         assert_eq!("ERROR", LogLevelFilter::Error.to_string());
-     }
-
-     #[test]
-     fn test_cross_cmp() {
-         assert!(LogLevel::Debug > LogLevelFilter::Error);
-         assert!(LogLevelFilter::Warn < LogLevel::Trace);
-         assert!(LogLevelFilter::Off < LogLevel::Error);
-     }
-
-     #[test]
-     fn test_cross_eq() {
-         assert!(LogLevel::Error == LogLevelFilter::Error);
-         assert!(LogLevelFilter::Off != LogLevel::Error);
-         assert!(LogLevel::Trace == LogLevelFilter::Trace);
-     }
-
-     #[test]
-     fn test_to_log_level() {
-         assert_eq!(Some(LogLevel::Error), LogLevelFilter::Error.to_log_level());
-         assert_eq!(None, LogLevelFilter::Off.to_log_level());
-         assert_eq!(Some(LogLevel::Debug), LogLevelFilter::Debug.to_log_level());
-     }
-
-     #[test]
-     fn test_to_log_level_filter() {
-         assert_eq!(LogLevelFilter::Error, LogLevel::Error.to_log_level_filter());
-         assert_eq!(LogLevelFilter::Trace, LogLevel::Trace.to_log_level_filter());
-     }
-
-     #[test]
-     #[cfg(feature = "use_std")]
-     fn test_error_trait() {
-         use std::error::Error;
-         use super::SetLoggerError;
-         let e = SetLoggerError(());
-         assert_eq!(e.description(), "set_logger() called multiple times");
-     }
-}
deleted file mode 100644
--- a/third_party/rust/log-0.3.6/src/macros.rs
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-/// The standard logging macro.
-///
-/// This macro will generically log with the specified `LogLevel` and `format!`
-/// based argument list.
-///
-/// The `max_level_*` features can be used to statically disable logging at
-/// various levels.
-#[macro_export]
-macro_rules! log {
-    (target: $target:expr, $lvl:expr, $($arg:tt)+) => ({
-        static _LOC: $crate::LogLocation = $crate::LogLocation {
-            __line: line!(),
-            __file: file!(),
-            __module_path: module_path!(),
-        };
-        let lvl = $lvl;
-        if lvl <= $crate::__static_max_level() && lvl <= $crate::max_log_level() {
-            $crate::__log(lvl, $target, &_LOC, format_args!($($arg)+))
-        }
-    });
-    ($lvl:expr, $($arg:tt)+) => (log!(target: module_path!(), $lvl, $($arg)+))
-}
-
-/// Logs a message at the error level.
-///
-/// Logging at this level is disabled if the `max_level_off` feature is present.
-#[macro_export]
-macro_rules! error {
-    (target: $target:expr, $($arg:tt)*) => (
-        log!(target: $target, $crate::LogLevel::Error, $($arg)*);
-    );
-    ($($arg:tt)*) => (
-        log!($crate::LogLevel::Error, $($arg)*);
-    )
-}
-
-/// Logs a message at the warn level.
-///
-/// Logging at this level is disabled if any of the following features are
-/// present: `max_level_off` or `max_level_error`.
-///
-/// When building in release mode (i.e., without the `debug_assertions` option),
-/// logging at this level is also disabled if any of the following features are
-/// present: `release_max_level_off` or `max_level_error`.
-#[macro_export]
-macro_rules! warn {
-    (target: $target:expr, $($arg:tt)*) => (
-        log!(target: $target, $crate::LogLevel::Warn, $($arg)*);
-    );
-    ($($arg:tt)*) => (
-        log!($crate::LogLevel::Warn, $($arg)*);
-    )
-}
-
-/// Logs a message at the info level.
-///
-/// Logging at this level is disabled if any of the following features are
-/// present: `max_level_off`, `max_level_error`, or `max_level_warn`.
-///
-/// When building in release mode (i.e., without the `debug_assertions` option),
-/// logging at this level is also disabled if any of the following features are
-/// present: `release_max_level_off`, `release_max_level_error`, or
-/// `release_max_level_warn`.
-#[macro_export]
-macro_rules! info {
-    (target: $target:expr, $($arg:tt)*) => (
-        log!(target: $target, $crate::LogLevel::Info, $($arg)*);
-    );
-    ($($arg:tt)*) => (
-        log!($crate::LogLevel::Info, $($arg)*);
-    )
-}
-
-/// Logs a message at the debug level.
-///
-/// Logging at this level is disabled if any of the following features are
-/// present: `max_level_off`, `max_level_error`, `max_level_warn`, or
-/// `max_level_info`.
-///
-/// When building in release mode (i.e., without the `debug_assertions` option),
-/// logging at this level is also disabled if any of the following features are
-/// present: `release_max_level_off`, `release_max_level_error`,
-/// `release_max_level_warn`, or `release_max_level_info`.
-#[macro_export]
-macro_rules! debug {
-    (target: $target:expr, $($arg:tt)*) => (
-        log!(target: $target, $crate::LogLevel::Debug, $($arg)*);
-    );
-    ($($arg:tt)*) => (
-        log!($crate::LogLevel::Debug, $($arg)*);
-    )
-}
-
-/// Logs a message at the trace level.
-///
-/// Logging at this level is disabled if any of the following features are
-/// present: `max_level_off`, `max_level_error`, `max_level_warn`,
-/// `max_level_info`, or `max_level_debug`.
-///
-/// When building in release mode (i.e., without the `debug_assertions` option),
-/// logging at this level is also disabled if any of the following features are
-/// present: `release_max_level_off`, `release_max_level_error`,
-/// `release_max_level_warn`, `release_max_level_info`, or
-/// `release_max_level_debug`.
-#[macro_export]
-macro_rules! trace {
-    (target: $target:expr, $($arg:tt)*) => (
-        log!(target: $target, $crate::LogLevel::Trace, $($arg)*);
-    );
-    ($($arg:tt)*) => (
-        log!($crate::LogLevel::Trace, $($arg)*);
-    )
-}
-
-/// Determines if a message logged at the specified level in that module will
-/// be logged.
-///
-/// This can be used to avoid expensive computation of log message arguments if
-/// the message would be ignored anyway.
-///
-/// # Examples
-///
-/// ```rust
-/// # #[macro_use]
-/// # extern crate log;
-/// use log::LogLevel::Debug;
-///
-/// # fn foo() {
-/// if log_enabled!(Debug) {
-///     let data = expensive_call();
-///     debug!("expensive debug data: {} {}", data.x, data.y);
-/// }
-/// # }
-/// # struct Data { x: u32, y: u32 }
-/// # fn expensive_call() -> Data { Data { x: 0, y: 0 } }
-/// # fn main() {}
-/// ```
-#[macro_export]
-macro_rules! log_enabled {
-    (target: $target:expr, $lvl:expr) => ({
-        let lvl = $lvl;
-        lvl <= $crate::__static_max_level() && lvl <= $crate::max_log_level() &&
-            $crate::__enabled(lvl, $target)
-    });
-    ($lvl:expr) => (log_enabled!(target: module_path!(), $lvl))
-}
deleted file mode 100644
--- a/third_party/rust/log-0.3.6/tests/filters.rs
+++ /dev/null
@@ -1,76 +0,0 @@
-#[macro_use] extern crate log;
-
-use std::sync::{Arc, Mutex};
-use log::{LogLevel, LogLevelFilter, Log, LogRecord, LogMetadata};
-use log::MaxLogLevelFilter;
-
-#[cfg(feature = "use_std")]
-use log::set_logger;
-#[cfg(not(feature = "use_std"))]
-fn set_logger<M>(make_logger: M) -> Result<(), log::SetLoggerError>
-    where M: FnOnce(MaxLogLevelFilter) -> Box<Log> {
-    unsafe {
-        log::set_logger_raw(|x| std::mem::transmute(make_logger(x)))
-    }
-}
-
-struct State {
-    last_log: Mutex<Option<LogLevel>>,
-    filter: MaxLogLevelFilter,
-}
-
-struct Logger(Arc<State>);
-
-impl Log for Logger {
-    fn enabled(&self, _: &LogMetadata) -> bool {
-        true
-    }
-
-    fn log(&self, record: &LogRecord) {
-        *self.0.last_log.lock().unwrap() = Some(record.level());
-    }
-}
-
-fn main() {
-    let mut a = None;
-    set_logger(|max| {
-        let me = Arc::new(State {
-            last_log: Mutex::new(None),
-            filter: max,
-        });
-        a = Some(me.clone());
-        Box::new(Logger(me))
-    }).unwrap();
-    let a = a.unwrap();
-
-    test(&a, LogLevelFilter::Off);
-    test(&a, LogLevelFilter::Error);
-    test(&a, LogLevelFilter::Warn);
-    test(&a, LogLevelFilter::Info);
-    test(&a, LogLevelFilter::Debug);
-    test(&a, LogLevelFilter::Trace);
-}
-
-fn test(a: &State, filter: LogLevelFilter) {
-    a.filter.set(filter);
-    error!("");
-    last(&a, t(LogLevel::Error, filter));
-    warn!("");
-    last(&a, t(LogLevel::Warn, filter));
-    info!("");
-    last(&a, t(LogLevel::Info, filter));
-    debug!("");
-    last(&a, t(LogLevel::Debug, filter));
-    trace!("");
-    last(&a, t(LogLevel::Trace, filter));
-
-    fn t(lvl: LogLevel, filter: LogLevelFilter) -> Option<LogLevel> {
-        if lvl <= filter {Some(lvl)} else {None}
-    }
-}
-
-fn last(state: &State, expected: Option<LogLevel>) {
-    let mut lvl = state.last_log.lock().unwrap();
-    assert_eq!(*lvl, expected);
-    *lvl = None;
-}
deleted file mode 100644
--- a/third_party/rust/mime-0.2.4/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"713aa1cac091a99e295194ca0dfd6d74028edbb02a0f5f627f3d3dfdf6437ee0","Cargo.toml":"cf9de6a21aa19f3f8c5e074625629f93f3f38cff8d57598e4287a554f10b1549","LICENSE":"df9cfd06d8a44d9a671eadd39ffd97f166481da015a30f45dfd27886209c5922","README.md":"706ee5777dbfea1255359f2dd3f905f7bb89282a528c9c14e38751e5e874fd5e","src/lib.rs":"9635770a9af281e355a538a5f629b9b338b9350c71cc2ec5f7c101794a3289f7"},"package":"9d69889cdc6336ed56b174514ce876c4c3dc564cc23dd872e7bca589bb2a36c8"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/mime-0.2.4/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: rust
-rust: beta
-
deleted file mode 100644
--- a/third_party/rust/mime-0.2.4/Cargo.toml
+++ /dev/null
@@ -1,25 +0,0 @@
-[package]
-
-name = "mime"
-version = "0.2.4"
-authors = ["Sean McArthur <sean.monstar@gmail.com>"]
-license = "MIT"
-description = "Strongly Typed Mimes"
-documentation = "http://hyperium.github.io/mime.rs"
-repository = "https://github.com/hyperium/mime.rs"
-keywords = ["mime", "media-extensions", "media-types"]
-
-[dependencies]
-log = "0.3"
-serde = { version = ">=0.7, <0.9", optional = true }
-
-[dev-dependencies]
-serde_json = ">=0.7, <0.9"
-
-[dependencies.heapsize]
-version = ">=0.2.0, <0.4"
-optional = true
-
-[features]
-heap_size = ["heapsize"]
-nightly = []
deleted file mode 100644
--- a/third_party/rust/mime-0.2.4/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Sean McArthur
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
deleted file mode 100644
--- a/third_party/rust/mime-0.2.4/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# mime.rs
-
-[![Build Status](https://travis-ci.org/hyperium/mime.rs.svg?branch=master)](https://travis-ci.org/hyperium/mime.rs)
-
-Support MIME (Media Types) as strong types in Rust.
-
-[Documentation](http://hyperium.github.io/mime.rs)
-
-## License
-
-[MIT](./LICENSE)
deleted file mode 100644
--- a/third_party/rust/mime-0.2.4/src/lib.rs
+++ /dev/null
@@ -1,632 +0,0 @@
-//! # Mime
-//!
-//! Mime is now Media Type, technically, but `Mime` is more immediately
-//! understandable, so the main type here is `Mime`.
-//!
-//! ## What is Mime?
-//!
-//! Example mime string: `text/plain;charset=utf-8`
-//!
-//! ```rust
-//! # #[macro_use] extern crate mime;
-//! # fn main() {
-//! let plain_text: mime::Mime = "text/plain;charset=utf-8".parse().unwrap();
-//! assert_eq!(plain_text, mime!(Text/Plain; Charset=Utf8));
-//! # }
-//! ```
-
-#![doc(html_root_url = "https://hyperium.github.io/mime.rs")]
-#![cfg_attr(test, deny(warnings))]
-#![cfg_attr(all(feature = "nightly", test), feature(test))]
-
-#[macro_use]
-extern crate log;
-
-#[cfg(feature = "nightly")]
-#[cfg(test)]
-extern crate test;
-
-#[cfg(feature = "serde")]
-extern crate serde;
-
-#[cfg(feature = "serde")]
-#[cfg(test)]
-extern crate serde_json;
-
-#[cfg(feature = "heapsize")]
-extern crate heapsize;
-
-use std::ascii::AsciiExt;
-use std::fmt;
-use std::iter::Enumerate;
-use std::str::{FromStr, Chars};
-
-macro_rules! inspect(
-    ($s:expr, $t:expr) => ({
-        let t = $t;
-        trace!("inspect {}: {:?}", $s, t);
-        t
-    })
-);
-
-/// Mime, or Media Type. Encapsulates common registers types.
-///
-/// Consider that a traditional mime type contains a "top level type",
-/// a "sub level type", and 0-N "parameters". And they're all strings.
-/// Strings everywhere. Strings mean typos. Rust has type safety. We should
-/// use types!
-///
-/// So, Mime bundles together this data into types so the compiler can catch
-/// your typos.
-///
-/// This improves things so you use match without Strings:
-///
-/// ```rust
-/// use mime::{Mime, TopLevel, SubLevel};
-///
-/// let mime: Mime = "application/json".parse().unwrap();
-///
-/// match mime {
-///     Mime(TopLevel::Application, SubLevel::Json, _) => println!("matched json!"),
-///     _ => ()
-/// }
-/// ```
-#[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd)]
-pub struct Mime<T: AsRef<[Param]> = Vec<Param>>(pub TopLevel, pub SubLevel, pub T);
-
-#[cfg(feature = "heapsize")]
-impl<T: AsRef<[Param]> + heapsize::HeapSizeOf> heapsize::HeapSizeOf for Mime<T> {
-    fn heap_size_of_children(&self) -> usize {
-        self.0.heap_size_of_children() +
-        self.1.heap_size_of_children() +
-        self.2.heap_size_of_children()
-    }
-}
-
-impl<LHS: AsRef<[Param]>, RHS: AsRef<[Param]>> PartialEq<Mime<RHS>> for Mime<LHS> {
-    fn eq(&self, other: &Mime<RHS>) -> bool {
-        self.0 == other.0 && self.1 == other.1 && self.2.as_ref() == other.2.as_ref()
-    }
-}
-
-/// Easily create a Mime without having to import so many enums.
-///
-/// # Example
-///
-/// ```
-/// # #[macro_use] extern crate mime;
-///
-/// # fn main() {
-/// let json = mime!(Application/Json);
-/// let plain = mime!(Text/Plain; Charset=Utf8);
-/// let text = mime!(Text/Html; Charset=("bar"), ("baz")=("quux"));
-/// let img = mime!(Image/_);
-/// # }
-/// ```
-#[macro_export]
-macro_rules! mime {
-    ($top:tt / $sub:tt) => (
-        mime!($top / $sub;)
-    );
-
-    ($top:tt / $sub:tt ; $($attr:tt = $val:tt),*) => (
-        $crate::Mime(
-            __mime__ident_or_ext!(TopLevel::$top),
-            __mime__ident_or_ext!(SubLevel::$sub),
-            vec![ $((__mime__ident_or_ext!(Attr::$attr), __mime__ident_or_ext!(Value::$val))),* ]
-        )
-    );
-}
-
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __mime__ident_or_ext {
-    ($enoom:ident::_) => (
-        $crate::$enoom::Star
-    );
-    ($enoom:ident::($inner:expr)) => (
-        $crate::$enoom::Ext($inner.to_string())
-    );
-    ($enoom:ident::$var:ident) => (
-        $crate::$enoom::$var
-    )
-}
-
-macro_rules! enoom {
-    (pub enum $en:ident; $ext:ident; $($ty:ident, $text:expr;)*) => (
-
-        #[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd)]
-        pub enum $en {
-            $($ty),*,
-            $ext(String)
-        }
-
-        impl $en {
-            pub fn as_str(&self) -> &str {
-                match *self {
-                    $($en::$ty => $text),*,
-                    $en::$ext(ref s) => &s
-                }
-            }
-        }
-
-        impl ::std::ops::Deref for $en {
-            type Target = str;
-            fn deref(&self) -> &str {
-                self.as_str()
-            }
-        }
-
-        impl PartialEq for $en {
-            fn eq(&self, other: &$en) -> bool {
-                match (self, other) {
-                    $( (&$en::$ty, &$en::$ty) => true ),*,
-                    (&$en::$ext(ref a), &$en::$ext(ref b)) => a == b,
-                    _ => self.as_str() == other.as_str()
-                }
-            }
-        }
-
-        impl PartialEq<String> for $en {
-            fn eq(&self, other: &String) -> bool {
-                self.as_str() == other
-            }
-        }
-
-        impl PartialEq<str> for $en {
-            fn eq(&self, other: &str) -> bool {
-                self.as_str() == other
-            }
-        }
-
-        impl<'a> PartialEq<&'a str> for $en {
-            fn eq(&self, other: &&'a str) -> bool {
-                self.as_str() == *other
-            }
-        }
-
-        impl PartialEq<$en> for String {
-            fn eq(&self, other: &$en) -> bool {
-                self == other.as_str()
-            }
-        }
-
-        impl PartialEq<$en> for str {
-            fn eq(&self, other: &$en) -> bool {
-                self == other.as_str()
-            }
-        }
-
-        impl<'a> PartialEq<$en> for &'a str {
-            fn eq(&self, other: &$en) -> bool {
-                *self == other.as_str()
-            }
-        }
-
-        impl fmt::Display for $en {
-            #[inline]
-            fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-                fmt.write_str(match *self {
-                    $($en::$ty => $text),*,
-                    $en::$ext(ref s) => s
-                })
-            }
-        }
-
-        impl FromStr for $en {
-            type Err = ();
-            fn from_str(s: &str) -> Result<$en, ()> {
-                Ok(match s {
-                    $(_s if _s == $text => $en::$ty),*,
-                    s => $en::$ext(inspect!(stringify!($ext), s).to_string())
-                })
-            }
-        }
-
-        #[cfg(feature = "heapsize")]
-        impl heapsize::HeapSizeOf for $en {
-            fn heap_size_of_children(&self) -> usize {
-                match *self {
-                    $en::$ext(ref ext) => ext.heap_size_of_children(),
-                    _ => 0,
-                }
-            }
-        }
-    )
-}
-
-enoom! {
-    pub enum TopLevel;
-    Ext;
-    Star, "*";
-    Text, "text";
-    Image, "image";
-    Audio, "audio";
-    Video, "video";
-    Application, "application";
-    Multipart, "multipart";
-    Message, "message";
-    Model, "model";
-}
-
-enoom! {
-    pub enum SubLevel;
-    Ext;
-    Star, "*";
-
-    // common text/*
-    Plain, "plain";
-    Html, "html";
-    Xml, "xml";
-    Javascript, "javascript";
-    Css, "css";
-    EventStream, "event-stream";
-
-    // common application/*
-    Json, "json";
-    WwwFormUrlEncoded, "x-www-form-urlencoded";
-    Msgpack, "msgpack";
-    OctetStream, "octet-stream";
-
-    // multipart/*
-    FormData, "form-data";
-
-    // common image/*
-    Png, "png";
-    Gif, "gif";
-    Bmp, "bmp";
-    Jpeg, "jpeg";
-
-    // audio/*
-    Mpeg, "mpeg";
-    Mp4, "mp4";
-    Ogg, "ogg";
-}
-
-enoom! {
-    pub enum Attr;
-    Ext;
-    Charset, "charset";
-    Boundary, "boundary";
-    Q, "q";
-}
-
-enoom! {
-    pub enum Value;
-    Ext;
-    Utf8, "utf-8";
-}
-
-pub type Param = (Attr, Value);
-
-impl<T: AsRef<[Param]>> fmt::Display for Mime<T> {
-    #[inline]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(fmt::Display::fmt(&self.0, f));
-        try!(f.write_str("/"));
-        try!(fmt::Display::fmt(&self.1, f));
-        for param in self.2.as_ref() {
-            try!(f.write_str("; "));
-            try!(fmt::Display::fmt(&param.0, f));
-            try!(f.write_str("="));
-            try!(fmt::Display::fmt(&param.1, f));
-        }
-        Ok(())
-    }
-}
-
-impl<P: AsRef<[Param]>> Mime<P> {
-    pub fn get_param<A: PartialEq<Attr>>(&self, attr: A) -> Option<&Value> {
-        self.2.as_ref().iter().find(|&&(ref name, _)| attr == *name).map(|&(_, ref value)| value)
-    }
-}
-
-impl FromStr for Mime {
-    type Err = ();
-    fn from_str(raw: &str) -> Result<Mime, ()> {
-        if raw == "*/*" {
-            return Ok(mime!(Star/Star));
-        }
-
-        let ascii = raw.to_ascii_lowercase(); // lifetimes :(
-        let len = ascii.len();
-        let mut iter = ascii.chars().enumerate();
-        let mut params = vec![];
-        // toplevel
-        let mut start;
-        let top;
-        loop {
-            match inspect!("top iter", iter.next()) {
-                Some((0, c)) if is_restricted_name_first_char(c) => (),
-                Some((i, c)) if i > 0 && is_restricted_name_char(c) => (),
-                Some((i, '/')) if i > 0 => match FromStr::from_str(&ascii[..i]) {
-                    Ok(t) => {
-                        top = t;
-                        start = i + 1;
-                        break;
-                    }
-                    Err(_) => return Err(())
-                },
-                _ => return Err(()) // EOF and no toplevel is no Mime
-            };
-
-        }
-
-        // sublevel
-        let sub;
-        let mut sub_star = false;
-        loop {
-            match inspect!("sub iter", iter.next()) {
-                Some((i, '*')) if i == start => {
-                    sub_star = true;
-                },
-                Some((i, c)) if i == start && is_restricted_name_first_char(c) => (),
-                Some((i, c)) if !sub_star && i > start && is_restricted_name_char(c) => (),
-                Some((i, ';')) if i > start => match FromStr::from_str(&ascii[start..i]) {
-                    Ok(s) => {
-                        sub = s;
-                        start = i + 1;
-                        break;
-                    }
-                    Err(_) => return Err(())
-                },
-                None => match FromStr::from_str(&ascii[start..]) {
-                    Ok(s) => return Ok(Mime(top, s, params)),
-                    Err(_) => return Err(())
-                },
-                _ => return Err(())
-            };
-        }
-
-        // params
-        debug!("starting params, len={}", len);
-        loop {
-            match inspect!("param", param_from_str(raw, &ascii, &mut iter, start)) {
-                Some((p, end)) => {
-                    params.push(p);
-                    start = end;
-                    if start >= len {
-                        break;
-                    }
-                }
-                None => break
-            }
-        }
-
-        Ok(Mime(top, sub, params))
-    }
-}
-
-#[cfg(feature = "serde")]
-impl serde::ser::Serialize for Mime {
-    fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>
-        where S: serde::ser::Serializer
-    {
-        serializer.serialize_str(&*format!("{}",self))
-    }
-}
-
-#[cfg(feature = "serde")]
-impl serde::de::Deserialize for Mime {
-    fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error>
-        where D: serde::de::Deserializer
-    {
-        let string: String = try!(serde::Deserialize::deserialize(deserializer));
-        let mime: Mime = match FromStr::from_str(&*string) {
-            Ok(mime) => mime,
-            Err(_) => return Err(serde::de::Error::custom("Invalid serialized mime")),
-        };
-        Ok(mime)
-    }
-}
-
-fn param_from_str(raw: &str, ascii: &str, iter: &mut Enumerate<Chars>, mut start: usize) -> Option<(Param, usize)> {
-    let attr;
-    debug!("param_from_str, start={}", start);
-    loop {
-        match inspect!("attr iter", iter.next()) {
-            Some((i, ' ')) if i == start => start = i + 1,
-            Some((i, c)) if i == start && is_restricted_name_first_char(c) => (),
-            Some((i, c)) if i > start && is_restricted_name_char(c) => (),
-            Some((i, '=')) if i > start => match FromStr::from_str(&ascii[start..i]) {
-                Ok(a) => {
-                    attr = inspect!("attr", a);
-                    start = i + 1;
-                    break;
-                },
-                Err(_) => return None
-            },
-            _ => return None
-        }
-    }
-
-    let value;
-    // values must be restrict-name-char or "anything goes"
-    let mut is_quoted = false;
-
-    {
-        let substr = |a,b| { if attr==Attr::Charset { &ascii[a..b] } else { &raw[a..b] } };
-        let endstr = |a| { if attr==Attr::Charset { &ascii[a..] } else { &raw[a..] } };
-        loop {
-            match inspect!("value iter", iter.next()) {
-                Some((i, '"')) if i == start => {
-                    debug!("quoted");
-                    is_quoted = true;
-                    start = i + 1;
-                },
-                Some((i, c)) if i == start && is_restricted_name_first_char(c) => (),
-                Some((i, '"')) if i > start && is_quoted => match FromStr::from_str(substr(start,i)) {
-                    Ok(v) => {
-                        value = v;
-                        start = i + 1;
-                        break;
-                    },
-                    Err(_) => return None
-                },
-                Some((i, c)) if i > start && is_quoted || is_restricted_name_char(c) => (),
-                Some((i, ';')) if i > start => match FromStr::from_str(substr(start,i)) {
-                    Ok(v) => {
-                        value = v;
-                        start = i + 1;
-                        break;
-                    },
-                    Err(_) => return None
-                },
-                None => match FromStr::from_str(endstr(start)) {
-                    Ok(v) => {
-                        value = v;
-                        start = raw.len();
-                        break;
-                    },
-                    Err(_) => return None
-                },
-
-                _ => return None
-            }
-        }
-    }
-
-    Some(((attr, value), start))
-}
-
-// From [RFC6838](http://tools.ietf.org/html/rfc6838#section-4.2):
-//
-// > All registered media types MUST be assigned top-level type and
-// > subtype names.  The combination of these names serves to uniquely
-// > identify the media type, and the subtype name facet (or the absence
-// > of one) identifies the registration tree.  Both top-level type and
-// > subtype names are case-insensitive.
-// >
-// > Type and subtype names MUST conform to the following ABNF:
-// >
-// >     type-name = restricted-name
-// >     subtype-name = restricted-name
-// >
-// >     restricted-name = restricted-name-first *126restricted-name-chars
-// >     restricted-name-first  = ALPHA / DIGIT
-// >     restricted-name-chars  = ALPHA / DIGIT / "!" / "#" /
-// >                              "$" / "&" / "-" / "^" / "_"
-// >     restricted-name-chars =/ "." ; Characters before first dot always
-// >                                  ; specify a facet name
-// >     restricted-name-chars =/ "+" ; Characters after last plus always
-// >                                  ; specify a structured syntax suffix
-//
-fn is_restricted_name_first_char(c: char) -> bool {
-    match c {
-        'a'...'z' |
-        '0'...'9' => true,
-        _ => false
-    }
-}
-
-fn is_restricted_name_char(c: char) -> bool {
-    if is_restricted_name_first_char(c) {
-        true
-    } else {
-        match c {
-            '!' |
-            '#' |
-            '$' |
-            '&' |
-            '-' |
-            '^' |
-            '.' |
-            '+' |
-            '_' => true,
-            _ => false
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use std::str::FromStr;
-    #[cfg(feature = "nightly")]
-    use test::Bencher;
-    use super::{Mime, Value, Attr};
-
-    #[test]
-    fn test_mime_show() {
-        let mime = mime!(Text/Plain);
-        assert_eq!(mime.to_string(), "text/plain".to_string());
-        let mime = mime!(Text/Plain; Charset=Utf8);
-        assert_eq!(mime.to_string(), "text/plain; charset=utf-8".to_string());
-    }
-
-    #[test]
-    fn test_mime_from_str() {
-        assert_eq!(Mime::from_str("text/plain").unwrap(), mime!(Text/Plain));
-        assert_eq!(Mime::from_str("TEXT/PLAIN").unwrap(), mime!(Text/Plain));
-        assert_eq!(Mime::from_str("text/plain; charset=utf-8").unwrap(), mime!(Text/Plain; Charset=Utf8));
-        assert_eq!(Mime::from_str("text/plain;charset=\"utf-8\"").unwrap(), mime!(Text/Plain; Charset=Utf8));
-        assert_eq!(Mime::from_str("text/plain; charset=utf-8; foo=bar").unwrap(),
-            mime!(Text/Plain; Charset=Utf8, ("foo")=("bar")));
-        assert_eq!("*/*".parse::<Mime>().unwrap(), mime!(Star/Star));
-        assert_eq!("image/*".parse::<Mime>().unwrap(), mime!(Image/Star));
-        assert_eq!("text/*; charset=utf-8".parse::<Mime>().unwrap(), mime!(Text/Star; Charset=Utf8));
-        assert!("*/png".parse::<Mime>().is_err());
-        assert!("*image/png".parse::<Mime>().is_err());
-        assert!("text/*plain".parse::<Mime>().is_err());
-    }
-
-    #[test]
-    fn test_case_sensitive_values() {
-        assert_eq!(Mime::from_str("multipart/form-data; boundary=ABCDEFG").unwrap(),
-                   mime!(Multipart/FormData; Boundary=("ABCDEFG")));
-        assert_eq!(Mime::from_str("multipart/form-data; charset=BASE64; boundary=ABCDEFG").unwrap(),
-                   mime!(Multipart/FormData; Charset=("base64"), Boundary=("ABCDEFG")));
-    }
-
-    #[test]
-    fn test_get_param() {
-        let mime = Mime::from_str("text/plain; charset=utf-8; foo=bar").unwrap();
-        assert_eq!(mime.get_param(Attr::Charset), Some(&Value::Utf8));
-        assert_eq!(mime.get_param("charset"), Some(&Value::Utf8));
-        assert_eq!(mime.get_param("foo").unwrap(), "bar");
-        assert_eq!(mime.get_param("baz"), None);
-    }
-
-    #[test]
-    fn test_value_as_str() {
-        assert_eq!(Value::Utf8.as_str(), "utf-8");
-    }
-
-    #[test]
-    fn test_value_eq_str() {
-        assert_eq!(Value::Utf8, "utf-8");
-        assert_eq!("utf-8", Value::Utf8);
-    }
-
-    #[cfg(feature = "serde")]
-    #[test]
-    fn test_serialize_deserialize() {
-        use serde_json;
-
-        let mime = Mime::from_str("text/plain; charset=utf-8; foo=bar").unwrap();
-        let serialized = serde_json::to_string(&mime).unwrap();
-        let deserialized: Mime = serde_json::from_str(&serialized).unwrap();
-        assert_eq!(mime, deserialized);
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_fmt(b: &mut Bencher) {
-        use std::fmt::Write;
-        let mime = mime!(Text/Plain; Charset=Utf8, ("foo")=("bar"));
-        b.bytes = mime.to_string().as_bytes().len() as u64;
-        let mut s = String::with_capacity(64);
-        b.iter(|| {
-            let _ = write!(s, "{}", mime);
-            ::test::black_box(&s);
-            unsafe { s.as_mut_vec().set_len(0); }
-        })
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_from_str(b: &mut Bencher) {
-        let s = "text/plain; charset=utf-8; foo=bar";
-        b.bytes = s.as_bytes().len() as u64;
-        b.iter(|| s.parse::<Mime>())
-    }
-}
--- a/third_party/rust/miniz-sys/.cargo-checksum.json
+++ b/third_party/rust/miniz-sys/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"ea9ad87421deb76d7d6ab5232ccf1f2265e813069c6ae8fbcef88aecab3657cc","build.rs":"03c1c5148146084a63e5104078ed29df8a201541e6c45522c5c79e600393f363","lib.rs":"6b4b534e78dee29b006f460245af34f54eefcc39c82740d27cbe9140072b9926","miniz.c":"b2e9875b20eff162e904a3fd8d692afd34fcc4fd83b6bfa57fec2e51329053ed"},"package":"28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726"}
\ No newline at end of file
+{"files":{"Cargo.toml":"363a6eba096cec4c982893660baddacbe896de66476e5c075b98288cb4e22fe9","build.rs":"25a6d4c86490968a922f7cd936bc710b7b49dcc095faef3769cafe728ddbcd4c","lib.rs":"6b4b534e78dee29b006f460245af34f54eefcc39c82740d27cbe9140072b9926","miniz.c":"eb44d3f0b48c9467a304879f071cc936d668625ff7f8068a084e7d855086b22d"},"package":"609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4"}
\ No newline at end of file
--- a/third_party/rust/miniz-sys/Cargo.toml
+++ b/third_party/rust/miniz-sys/Cargo.toml
@@ -1,24 +1,31 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
 [package]
-
 name = "miniz-sys"
-version = "0.1.9"
+version = "0.1.10"
 authors = ["Alex Crichton <alex@alexcrichton.com>"]
+build = "build.rs"
 links = "miniz"
-build = "build.rs"
+description = "Bindings to the miniz.c library.\n"
+documentation = "https://docs.rs/miniz-sys"
+categories = ["external-ffi-bindings"]
 license = "MIT/Apache-2.0"
 repository = "https://github.com/alexcrichton/flate2-rs"
-documentation = "https://docs.rs/miniz-sys"
-description = """
-Bindings to the miniz.c library.
-"""
-categories = ["external-ffi-bindings"]
 
 [lib]
 name = "miniz_sys"
 path = "lib.rs"
-
-[dependencies]
-libc = "0.2"
-
-[build-dependencies]
-gcc = "0.3"
+[dependencies.libc]
+version = "0.2"
+[build-dependencies.cc]
+version = "1.0"
--- a/third_party/rust/miniz-sys/build.rs
+++ b/third_party/rust/miniz-sys/build.rs
@@ -1,8 +1,8 @@
-extern crate gcc;
+extern crate cc;
 
 use std::env;
 
 fn main() {
-    gcc::compile_library("libminiz.a", &["miniz.c"]);
+    cc::Build::new().file("miniz.c").compile("miniz");
     println!("cargo:root={}", env::var("OUT_DIR").unwrap());
 }
--- a/third_party/rust/miniz-sys/miniz.c
+++ b/third_party/rust/miniz-sys/miniz.c
@@ -1,4986 +1,4986 @@
-/* miniz.c v1.16 beta r1 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing
-   See "unlicense" statement at the end of this file.
-   Rich Geldreich <richgel99@gmail.com>, last updated Oct. 13, 2013
-   Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt
-
-   Most API's defined in miniz.c are optional. For example, to disable the archive related functions just define
-   MINIZ_NO_ARCHIVE_APIS, or to get rid of all stdio usage define MINIZ_NO_STDIO (see the list below for more macros).
-
-   * Change History
-     10/19/13 v1.16 beta r1 - Two key inflator-only robustness and streaming related changes. Also merged in tdefl_compressor_alloc(), tdefl_compressor_free() helpers to make script bindings easier for rustyzip.
-       - The inflator coroutine func. is subtle and complex so I'm being cautious about this release. I would greatly appreciate any help with testing or any feedback.
-         I feel good about these changes, and they've been through several hours of automated testing, but they will probably not fix anything for the majority of prev. users so I'm
-         going to mark this release as beta for a few weeks and continue testing it at work/home on various things.
-       - The inflator in raw (non-zlib) mode is now usable on gzip or similiar data streams that have a bunch of bytes following the raw deflate data (problem discovered by rustyzip author williamw520).
-         This version should *never* read beyond the last byte of the raw deflate data independent of how many bytes you pass into the input buffer. This issue was caused by the various Huffman bitbuffer lookahead optimizations, and
-         would not be an issue if the caller knew and enforced the precise size of the raw compressed data *or* if the compressed data was in zlib format (i.e. always followed by the byte aligned zlib adler32).
-         So in other words, you can now call the inflator on deflate streams that are followed by arbitrary amounts of data and it's guaranteed that decompression will stop exactly on the last byte.
-       - The inflator now has a new failure status: TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS (-4). Previously, if the inflator was starved of bytes and could not make progress (because the input buffer was empty and the
-         caller did not set the TINFL_FLAG_HAS_MORE_INPUT flag - say on truncated or corrupted compressed data stream) it would append all 0's to the input and try to soldier on.
-         This is scary, because in the worst case, I believe it was possible for the prev. inflator to start outputting large amounts of literal data. If the caller didn't know when to stop accepting output
-         (because it didn't know how much uncompressed data was expected, or didn't enforce a sane maximum) it could continue forever. v1.16 cannot fall into this failure mode, instead it'll return
-         TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS immediately if it needs 1 or more bytes to make progress, the input buf is empty, and the caller has indicated that no more input is available. This is a "soft"
-         failure, so you can call the inflator again with more input and it will try to continue, or you can give up and fail. This could be very useful in network streaming scenarios.
-       - Added documentation to all the tinfl return status codes, fixed miniz_tester so it accepts double minus params for Linux, tweaked example1.c, added a simple "follower bytes" test to miniz_tester.cpp.
-     10/13/13 v1.15 r4 - Interim bugfix release while I work on the next major release with Zip64 support (almost there!):
-       - Critical fix for the MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY bug (thanks kahmyong.moon@hp.com) which could cause locate files to not find files. This bug
-        would only have occured in earlier versions if you explicitly used this flag, OR if you used mz_zip_extract_archive_file_to_heap() or mz_zip_add_mem_to_archive_file_in_place()
-        (which used this flag). If you can't switch to v1.15 but want to fix this bug, just remove the uses of this flag from both helper funcs (and of course don't use the flag).
-       - Bugfix in mz_zip_reader_extract_to_mem_no_alloc() from kymoon when pUser_read_buf is not NULL and compressed size is > uncompressed size
-       - Fixing mz_zip_reader_extract_*() funcs so they don't try to extract compressed data from directory entries, to account for weird zipfiles which contain zero-size compressed data on dir entries.
-         Hopefully this fix won't cause any issues on weird zip archives, because it assumes the low 16-bits of zip external attributes are DOS attributes (which I believe they always are in practice).
-       - Fixing mz_zip_reader_is_file_a_directory() so it doesn't check the internal attributes, just the filename and external attributes
-       - mz_zip_reader_init_file() - missing MZ_FCLOSE() call if the seek failed
-       - Added cmake support for Linux builds which builds all the examples, tested with clang v3.3 and gcc v4.6.
-       - Clang fix for tdefl_write_image_to_png_file_in_memory() from toffaletti
-       - Merged MZ_FORCEINLINE fix from hdeanclark
-       - Fix <time.h> include before config #ifdef, thanks emil.brink
-       - Added tdefl_write_image_to_png_file_in_memory_ex(): supports Y flipping (super useful for OpenGL apps), and explicit control over the compression level (so you can
-        set it to 1 for real-time compression).
-       - Merged in some compiler fixes from paulharris's github repro.
-       - Retested this build under Windows (VS 2010, including static analysis), tcc  0.9.26, gcc v4.6 and clang v3.3.
-       - Added example6.c, which dumps an image of the mandelbrot set to a PNG file.
-       - Modified example2 to help test the MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY flag more.
-       - In r3: Bugfix to mz_zip_writer_add_file() found during merge: Fix possible src file fclose() leak if alignment bytes+local header file write faiiled
-		 - In r4: Minor bugfix to mz_zip_writer_add_from_zip_reader(): Was pushing the wrong central dir header offset, appears harmless in this release, but it became a problem in the zip64 branch
-     5/20/12 v1.14 - MinGW32/64 GCC 4.6.1 compiler fixes: added MZ_FORCEINLINE, #include <time.h> (thanks fermtect).
-     5/19/12 v1.13 - From jason@cornsyrup.org and kelwert@mtu.edu - Fix mz_crc32() so it doesn't compute the wrong CRC-32's when mz_ulong is 64-bit.
-       - Temporarily/locally slammed in "typedef unsigned long mz_ulong" and re-ran a randomized regression test on ~500k files.
-       - Eliminated a bunch of warnings when compiling with GCC 32-bit/64.
-       - Ran all examples, miniz.c, and tinfl.c through MSVC 2008's /analyze (static analysis) option and fixed all warnings (except for the silly
-        "Use of the comma-operator in a tested expression.." analysis warning, which I purposely use to work around a MSVC compiler warning).
-       - Created 32-bit and 64-bit Codeblocks projects/workspace. Built and tested Linux executables. The codeblocks workspace is compatible with Linux+Win32/x64.
-       - Added miniz_tester solution/project, which is a useful little app derived from LZHAM's tester app that I use as part of the regression test.
-       - Ran miniz.c and tinfl.c through another series of regression testing on ~500,000 files and archives.
-       - Modified example5.c so it purposely disables a bunch of high-level functionality (MINIZ_NO_STDIO, etc.). (Thanks to corysama for the MINIZ_NO_STDIO bug report.)
-       - Fix ftell() usage in examples so they exit with an error on files which are too large (a limitation of the examples, not miniz itself).
-     4/12/12 v1.12 - More comments, added low-level example5.c, fixed a couple minor level_and_flags issues in the archive API's.
-      level_and_flags can now be set to MZ_DEFAULT_COMPRESSION. Thanks to Bruce Dawson <bruced@valvesoftware.com> for the feedback/bug report.
-     5/28/11 v1.11 - Added statement from unlicense.org
-     5/27/11 v1.10 - Substantial compressor optimizations:
-      - Level 1 is now ~4x faster than before. The L1 compressor's throughput now varies between 70-110MB/sec. on a
-      - Core i7 (actual throughput varies depending on the type of data, and x64 vs. x86).
-      - Improved baseline L2-L9 compression perf. Also, greatly improved compression perf. issues on some file types.
-      - Refactored the compression code for better readability and maintainability.
-      - Added level 10 compression level (L10 has slightly better ratio than level 9, but could have a potentially large
-       drop in throughput on some files).
-     5/15/11 v1.09 - Initial stable release.
-
-   * Low-level Deflate/Inflate implementation notes:
-
-     Compression: Use the "tdefl" API's. The compressor supports raw, static, and dynamic blocks, lazy or
-     greedy parsing, match length filtering, RLE-only, and Huffman-only streams. It performs and compresses
-     approximately as well as zlib.
-
-     Decompression: Use the "tinfl" API's. The entire decompressor is implemented as a single function
-     coroutine: see tinfl_decompress(). It supports decompression into a 32KB (or larger power of 2) wrapping buffer, or into a memory
-     block large enough to hold the entire file.
-
-     The low-level tdefl/tinfl API's do not make any use of dynamic memory allocation.
-
-   * zlib-style API notes:
-
-     miniz.c implements a fairly large subset of zlib. There's enough functionality present for it to be a drop-in
-     zlib replacement in many apps:
-        The z_stream struct, optional memory allocation callbacks
-        deflateInit/deflateInit2/deflate/deflateReset/deflateEnd/deflateBound
-        inflateInit/inflateInit2/inflate/inflateEnd
-        compress, compress2, compressBound, uncompress
-        CRC-32, Adler-32 - Using modern, minimal code size, CPU cache friendly routines.
-        Supports raw deflate streams or standard zlib streams with adler-32 checking.
-
-     Limitations:
-      The callback API's are not implemented yet. No support for gzip headers or zlib static dictionaries.
-      I've tried to closely emulate zlib's various flavors of stream flushing and return status codes, but
-      there are no guarantees that miniz.c pulls this off perfectly.
-
-   * PNG writing: See the tdefl_write_image_to_png_file_in_memory() function, originally written by
-     Alex Evans. Supports 1-4 bytes/pixel images.
-
-   * ZIP archive API notes:
-
-     The ZIP archive API's where designed with simplicity and efficiency in mind, with just enough abstraction to
-     get the job done with minimal fuss. There are simple API's to retrieve file information, read files from
-     existing archives, create new archives, append new files to existing archives, or clone archive data from
-     one archive to another. It supports archives located in memory or the heap, on disk (using stdio.h),
-     or you can specify custom file read/write callbacks.
-
-     - Archive reading: Just call this function to read a single file from a disk archive:
-
-      void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name,
-        size_t *pSize, mz_uint zip_flags);
-
-     For more complex cases, use the "mz_zip_reader" functions. Upon opening an archive, the entire central
-     directory is located and read as-is into memory, and subsequent file access only occurs when reading individual files.
-
-     - Archives file scanning: The simple way is to use this function to scan a loaded archive for a specific file:
-
-     int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags);
-
-     The locate operation can optionally check file comments too, which (as one example) can be used to identify
-     multiple versions of the same file in an archive. This function uses a simple linear search through the central
-     directory, so it's not very fast.
-
-     Alternately, you can iterate through all the files in an archive (using mz_zip_reader_get_num_files()) and
-     retrieve detailed info on each file by calling mz_zip_reader_file_stat().
-
-     - Archive creation: Use the "mz_zip_writer" functions. The ZIP writer immediately writes compressed file data
-     to disk and builds an exact image of the central directory in memory. The central directory image is written
-     all at once at the end of the archive file when the archive is finalized.
-
-     The archive writer can optionally align each file's local header and file data to any power of 2 alignment,
-     which can be useful when the archive will be read from optical media. Also, the writer supports placing
-     arbitrary data blobs at the very beginning of ZIP archives. Archives written using either feature are still
-     readable by any ZIP tool.
-
-     - Archive appending: The simple way to add a single file to an archive is to call this function:
-
-      mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, const char *pArchive_name,
-        const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags);
-
-     The archive will be created if it doesn't already exist, otherwise it'll be appended to.
-     Note the appending is done in-place and is not an atomic operation, so if something goes wrong
-     during the operation it's possible the archive could be left without a central directory (although the local
-     file headers and file data will be fine, so the archive will be recoverable).
-
-     For more complex archive modification scenarios:
-     1. The safest way is to use a mz_zip_reader to read the existing archive, cloning only those bits you want to
-     preserve into a new archive using using the mz_zip_writer_add_from_zip_reader() function (which compiles the
-     compressed file data as-is). When you're done, delete the old archive and rename the newly written archive, and
-     you're done. This is safe but requires a bunch of temporary disk space or heap memory.
-
-     2. Or, you can convert an mz_zip_reader in-place to an mz_zip_writer using mz_zip_writer_init_from_reader(),
-     append new files as needed, then finalize the archive which will write an updated central directory to the
-     original archive. (This is basically what mz_zip_add_mem_to_archive_file_in_place() does.) There's a
-     possibility that the archive's central directory could be lost with this method if anything goes wrong, though.
-
-     - ZIP archive support limitations:
-     No zip64 or spanning support. Extraction functions can only handle unencrypted, stored or deflated files.
-     Requires streams capable of seeking.
-
-   * This is a header file library, like stb_image.c. To get only a header file, either cut and paste the
-     below header, or create miniz.h, #define MINIZ_HEADER_FILE_ONLY, and then include miniz.c from it.
-
-   * Important: For best perf. be sure to customize the below macros for your target platform:
-     #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1
-     #define MINIZ_LITTLE_ENDIAN 1
-     #define MINIZ_HAS_64BIT_REGISTERS 1
-
-   * On platforms using glibc, Be sure to "#define _LARGEFILE64_SOURCE 1" before including miniz.c to ensure miniz
-     uses the 64-bit variants: fopen64(), stat64(), etc. Otherwise you won't be able to process large files
-     (i.e. 32-bit stat() fails for me on files > 0x7FFFFFFF bytes).
-*/
-
-#ifndef MINIZ_HEADER_INCLUDED
-#define MINIZ_HEADER_INCLUDED
-
-#include <stdlib.h>
-
-// Defines to completely disable specific portions of miniz.c:
-// If all macros here are defined the only functionality remaining will be CRC-32, adler-32, tinfl, and tdefl.
-
-// Define MINIZ_NO_STDIO to disable all usage and any functions which rely on stdio for file I/O.
-//#define MINIZ_NO_STDIO
-
-// If MINIZ_NO_TIME is specified then the ZIP archive functions will not be able to get the current time, or
-// get/set file times, and the C run-time funcs that get/set times won't be called.
-// The current downside is the times written to your archives will be from 1979.
-//#define MINIZ_NO_TIME
-
-// Define MINIZ_NO_ARCHIVE_APIS to disable all ZIP archive API's.
-//#define MINIZ_NO_ARCHIVE_APIS
-
-// Define MINIZ_NO_ARCHIVE_APIS to disable all writing related ZIP archive API's.
-//#define MINIZ_NO_ARCHIVE_WRITING_APIS
-
-// Define MINIZ_NO_ZLIB_APIS to remove all ZLIB-style compression/decompression API's.
-//#define MINIZ_NO_ZLIB_APIS
-
-// Define MINIZ_NO_ZLIB_COMPATIBLE_NAME to disable zlib names, to prevent conflicts against stock zlib.
-//#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES
-
-// Define MINIZ_NO_MALLOC to disable all calls to malloc, free, and realloc.
-// Note if MINIZ_NO_MALLOC is defined then the user must always provide custom user alloc/free/realloc
-// callbacks to the zlib and archive API's, and a few stand-alone helper API's which don't provide custom user
-// functions (such as tdefl_compress_mem_to_heap() and tinfl_decompress_mem_to_heap()) won't work.
-//#define MINIZ_NO_MALLOC
-
-#if defined(__TINYC__) && (defined(__linux) || defined(__linux__))
-  // TODO: Work around "error: include file 'sys\utime.h' when compiling with tcc on Linux
-  #define MINIZ_NO_TIME
-#endif
-
-#if !defined(MINIZ_NO_TIME) && !defined(MINIZ_NO_ARCHIVE_APIS)
-  #include <time.h>
-#endif
-
-#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__i386) || defined(__i486__) || defined(__i486) || defined(i386) || defined(__ia64__) || defined(__x86_64__)
-// MINIZ_X86_OR_X64_CPU is only used to help set the below macros.
-#define MINIZ_X86_OR_X64_CPU 1
-#endif
-
-#if (__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__) || MINIZ_X86_OR_X64_CPU
-// Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian.
-#define MINIZ_LITTLE_ENDIAN 1
-#endif
-
-#if MINIZ_X86_OR_X64_CPU
-// Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient integer loads and stores from unaligned addresses.
-#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1
-#endif
-
-#if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || defined(_LP64) || defined(__LP64__) || defined(__ia64__) || defined(__x86_64__)
-// Set MINIZ_HAS_64BIT_REGISTERS to 1 if operations on 64-bit integers are reasonably fast (and don't involve compiler generated calls to helper functions).
-#define MINIZ_HAS_64BIT_REGISTERS 1
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// ------------------- zlib-style API Definitions.
-
-// For more compatibility with zlib, miniz.c uses unsigned long for some parameters/struct members. Beware: mz_ulong can be either 32 or 64-bits!
-typedef unsigned long mz_ulong;
-
-// mz_free() internally uses the MZ_FREE() macro (which by default calls free() unless you've modified the MZ_MALLOC macro) to release a block allocated from the heap.
-void mz_free(void *p);
-
-#define MZ_ADLER32_INIT (1)
-// mz_adler32() returns the initial adler-32 value to use when called with ptr==NULL.
-mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len);
-
-#define MZ_CRC32_INIT (0)
-// mz_crc32() returns the initial CRC-32 value to use when called with ptr==NULL.
-mz_ulong mz_crc32(mz_ulong crc, const unsigned char *ptr, size_t buf_len);
-
-// Compression strategies.
-enum { MZ_DEFAULT_STRATEGY = 0, MZ_FILTERED = 1, MZ_HUFFMAN_ONLY = 2, MZ_RLE = 3, MZ_FIXED = 4 };
-
-// Method
-#define MZ_DEFLATED 8
-
-#ifndef MINIZ_NO_ZLIB_APIS
-
-// Heap allocation callbacks.
-// Note that mz_alloc_func parameter types purpsosely differ from zlib's: items/size is size_t, not unsigned long.
-typedef void *(*mz_alloc_func)(void *opaque, size_t items, size_t size);
-typedef void (*mz_free_func)(void *opaque, void *address);
-typedef void *(*mz_realloc_func)(void *opaque, void *address, size_t items, size_t size);
-
-// TODO: I can't encode "1.16" here, argh
-#define MZ_VERSION          "9.1.15"
-#define MZ_VERNUM           0x91F0
-#define MZ_VER_MAJOR        9
-#define MZ_VER_MINOR        1
-#define MZ_VER_REVISION     15
-#define MZ_VER_SUBREVISION  0
-
-// Flush values. For typical usage you only need MZ_NO_FLUSH and MZ_FINISH. The other values are for advanced use (refer to the zlib docs).
-enum { MZ_NO_FLUSH = 0, MZ_PARTIAL_FLUSH = 1, MZ_SYNC_FLUSH = 2, MZ_FULL_FLUSH = 3, MZ_FINISH = 4, MZ_BLOCK = 5 };
-
-// Return status codes. MZ_PARAM_ERROR is non-standard.
-enum { MZ_OK = 0, MZ_STREAM_END = 1, MZ_NEED_DICT = 2, MZ_ERRNO = -1, MZ_STREAM_ERROR = -2, MZ_DATA_ERROR = -3, MZ_MEM_ERROR = -4, MZ_BUF_ERROR = -5, MZ_VERSION_ERROR = -6, MZ_PARAM_ERROR = -10000 };
-
-// Compression levels: 0-9 are the standard zlib-style levels, 10 is best possible compression (not zlib compatible, and may be very slow), MZ_DEFAULT_COMPRESSION=MZ_DEFAULT_LEVEL.
-enum { MZ_NO_COMPRESSION = 0, MZ_BEST_SPEED = 1, MZ_BEST_COMPRESSION = 9, MZ_UBER_COMPRESSION = 10, MZ_DEFAULT_LEVEL = 6, MZ_DEFAULT_COMPRESSION = -1 };
-
-// Window bits
-#define MZ_DEFAULT_WINDOW_BITS 15
-
-struct mz_internal_state;
-
-// Compression/decompression stream struct.
-typedef struct mz_stream_s
-{
-  const unsigned char *next_in;     // pointer to next byte to read
-  unsigned int avail_in;            // number of bytes available at next_in
-  mz_ulong total_in;                // total number of bytes consumed so far
-
-  unsigned char *next_out;          // pointer to next byte to write
-  unsigned int avail_out;           // number of bytes that can be written to next_out
-  mz_ulong total_out;               // total number of bytes produced so far
-
-  char *msg;                        // error msg (unused)
-  struct mz_internal_state *state;  // internal state, allocated by zalloc/zfree
-
-  mz_alloc_func zalloc;             // optional heap allocation function (defaults to malloc)
-  mz_free_func zfree;               // optional heap free function (defaults to free)
-  void *opaque;                     // heap alloc function user pointer
-
-  int data_type;                    // data_type (unused)
-  mz_ulong adler;                   // adler32 of the source or uncompressed data
-  mz_ulong reserved;                // not used
-} mz_stream;
-
-typedef mz_stream *mz_streamp;
-
-// Returns the version string of miniz.c.
-const char *mz_version(void);
-
-// mz_deflateInit() initializes a compressor with default options:
-// Parameters:
-//  pStream must point to an initialized mz_stream struct.
-//  level must be between [MZ_NO_COMPRESSION, MZ_BEST_COMPRESSION].
-//  level 1 enables a specially optimized compression function that's been optimized purely for performance, not ratio.
-//  (This special func. is currently only enabled when MINIZ_USE_UNALIGNED_LOADS_AND_STORES and MINIZ_LITTLE_ENDIAN are defined.)
-// Return values:
-//  MZ_OK on success.
-//  MZ_STREAM_ERROR if the stream is bogus.
-//  MZ_PARAM_ERROR if the input parameters are bogus.
-//  MZ_MEM_ERROR on out of memory.
-int mz_deflateInit(mz_streamp pStream, int level);
-
-// mz_deflateInit2() is like mz_deflate(), except with more control:
-// Additional parameters:
-//   method must be MZ_DEFLATED
-//   window_bits must be MZ_DEFAULT_WINDOW_BITS (to wrap the deflate stream with zlib header/adler-32 footer) or -MZ_DEFAULT_WINDOW_BITS (raw deflate/no header or footer)
-//   mem_level must be between [1, 9] (it's checked but ignored by miniz.c)
-int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy);
-
-// Quickly resets a compressor without having to reallocate anything. Same as calling mz_deflateEnd() followed by mz_deflateInit()/mz_deflateInit2().
-int mz_deflateReset(mz_streamp pStream);
-
-// mz_deflate() compresses the input to output, consuming as much of the input and producing as much output as possible.
-// Parameters:
-//   pStream is the stream to read from and write to. You must initialize/update the next_in, avail_in, next_out, and avail_out members.
-//   flush may be MZ_NO_FLUSH, MZ_PARTIAL_FLUSH/MZ_SYNC_FLUSH, MZ_FULL_FLUSH, or MZ_FINISH.
-// Return values:
-//   MZ_OK on success (when flushing, or if more input is needed but not available, and/or there's more output to be written but the output buffer is full).
-//   MZ_STREAM_END if all input has been consumed and all output bytes have been written. Don't call mz_deflate() on the stream anymore.
-//   MZ_STREAM_ERROR if the stream is bogus.
-//   MZ_PARAM_ERROR if one of the parameters is invalid.
-//   MZ_BUF_ERROR if no forward progress is possible because the input and/or output buffers are empty. (Fill up the input buffer or free up some output space and try again.)
-int mz_deflate(mz_streamp pStream, int flush);
-
-// mz_deflateEnd() deinitializes a compressor:
-// Return values:
-//  MZ_OK on success.
-//  MZ_STREAM_ERROR if the stream is bogus.
-int mz_deflateEnd(mz_streamp pStream);
-
-// mz_deflateBound() returns a (very) conservative upper bound on the amount of data that could be generated by deflate(), assuming flush is set to only MZ_NO_FLUSH or MZ_FINISH.
-mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len);
-
-// Single-call compression functions mz_compress() and mz_compress2():
-// Returns MZ_OK on success, or one of the error codes from mz_deflate() on failure.
-int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len);
-int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level);
-
-// mz_compressBound() returns a (very) conservative upper bound on the amount of data that could be generated by calling mz_compress().
-mz_ulong mz_compressBound(mz_ulong source_len);
-
-// Initializes a decompressor.
-int mz_inflateInit(mz_streamp pStream);
-
-// mz_inflateInit2() is like mz_inflateInit() with an additional option that controls the window size and whether or not the stream has been wrapped with a zlib header/footer:
-// window_bits must be MZ_DEFAULT_WINDOW_BITS (to parse zlib header/footer) or -MZ_DEFAULT_WINDOW_BITS (raw deflate).
-int mz_inflateInit2(mz_streamp pStream, int window_bits);
-
-// Decompresses the input stream to the output, consuming only as much of the input as needed, and writing as much to the output as possible.
-// Parameters:
-//   pStream is the stream to read from and write to. You must initialize/update the next_in, avail_in, next_out, and avail_out members.
-//   flush may be MZ_NO_FLUSH, MZ_SYNC_FLUSH, or MZ_FINISH.
-//   On the first call, if flush is MZ_FINISH it's assumed the input and output buffers are both sized large enough to decompress the entire stream in a single call (this is slightly faster).
-//   MZ_FINISH implies that there are no more source bytes available beside what's already in the input buffer, and that the output buffer is large enough to hold the rest of the decompressed data.
-// Return values:
-//   MZ_OK on success. Either more input is needed but not available, and/or there's more output to be written but the output buffer is full.
-//   MZ_STREAM_END if all needed input has been consumed and all output bytes have been written. For zlib streams, the adler-32 of the decompressed data has also been verified.
-//   MZ_STREAM_ERROR if the stream is bogus.
-//   MZ_DATA_ERROR if the deflate stream is invalid.
-//   MZ_PARAM_ERROR if one of the parameters is invalid.
-//   MZ_BUF_ERROR if no forward progress is possible because the input buffer is empty but the inflater needs more input to continue, or if the output buffer is not large enough. Call mz_inflate() again
-//   with more input data, or with more room in the output buffer (except when using single call decompression, described above).
-int mz_inflate(mz_streamp pStream, int flush);
-
-// Deinitializes a decompressor.
-int mz_inflateEnd(mz_streamp pStream);
-
-// Single-call decompression.
-// Returns MZ_OK on success, or one of the error codes from mz_inflate() on failure.
-int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len);
-
-// Returns a string description of the specified error code, or NULL if the error code is invalid.
-const char *mz_error(int err);
-
-// Redefine zlib-compatible names to miniz equivalents, so miniz.c can be used as a drop-in replacement for the subset of zlib that miniz.c supports.
-// Define MINIZ_NO_ZLIB_COMPATIBLE_NAMES to disable zlib-compatibility if you use zlib in the same project.
-#ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES
-  typedef unsigned char Byte;
-  typedef unsigned int uInt;
-  typedef mz_ulong uLong;
-  typedef Byte Bytef;
-  typedef uInt uIntf;
-  typedef char charf;
-  typedef int intf;
-  typedef void *voidpf;
-  typedef uLong uLongf;
-  typedef void *voidp;
-  typedef void *const voidpc;
-  #define Z_NULL                0
-  #define Z_NO_FLUSH            MZ_NO_FLUSH
-  #define Z_PARTIAL_FLUSH       MZ_PARTIAL_FLUSH
-  #define Z_SYNC_FLUSH          MZ_SYNC_FLUSH
-  #define Z_FULL_FLUSH          MZ_FULL_FLUSH
-  #define Z_FINISH              MZ_FINISH
-  #define Z_BLOCK               MZ_BLOCK
-  #define Z_OK                  MZ_OK
-  #define Z_STREAM_END          MZ_STREAM_END
-  #define Z_NEED_DICT           MZ_NEED_DICT
-  #define Z_ERRNO               MZ_ERRNO
-  #define Z_STREAM_ERROR        MZ_STREAM_ERROR
-  #define Z_DATA_ERROR          MZ_DATA_ERROR
-  #define Z_MEM_ERROR           MZ_MEM_ERROR
-  #define Z_BUF_ERROR           MZ_BUF_ERROR
-  #define Z_VERSION_ERROR       MZ_VERSION_ERROR
-  #define Z_PARAM_ERROR         MZ_PARAM_ERROR
-  #define Z_NO_COMPRESSION      MZ_NO_COMPRESSION
-  #define Z_BEST_SPEED          MZ_BEST_SPEED
-  #define Z_BEST_COMPRESSION    MZ_BEST_COMPRESSION
-  #define Z_DEFAULT_COMPRESSION MZ_DEFAULT_COMPRESSION
-  #define Z_DEFAULT_STRATEGY    MZ_DEFAULT_STRATEGY
-  #define Z_FILTERED            MZ_FILTERED
-  #define Z_HUFFMAN_ONLY        MZ_HUFFMAN_ONLY
-  #define Z_RLE                 MZ_RLE
-  #define Z_FIXED               MZ_FIXED
-  #define Z_DEFLATED            MZ_DEFLATED
-  #define Z_DEFAULT_WINDOW_BITS MZ_DEFAULT_WINDOW_BITS
-  #define alloc_func            mz_alloc_func
-  #define free_func             mz_free_func
-  #define internal_state        mz_internal_state
-  #define z_stream              mz_stream
-  #define deflateInit           mz_deflateInit
-  #define deflateInit2          mz_deflateInit2
-  #define deflateReset          mz_deflateReset
-  #define deflate               mz_deflate
-  #define deflateEnd            mz_deflateEnd
-  #define deflateBound          mz_deflateBound
-  #define compress              mz_compress
-  #define compress2             mz_compress2
-  #define compressBound         mz_compressBound
-  #define inflateInit           mz_inflateInit
-  #define inflateInit2          mz_inflateInit2
-  #define inflate               mz_inflate
-  #define inflateEnd            mz_inflateEnd
-  #define uncompress            mz_uncompress
-  #define crc32                 mz_crc32
-  #define adler32               mz_adler32
-  #define MAX_WBITS             15
-  #define MAX_MEM_LEVEL         9
-  #define zError                mz_error
-  #define ZLIB_VERSION          MZ_VERSION
-  #define ZLIB_VERNUM           MZ_VERNUM
-  #define ZLIB_VER_MAJOR        MZ_VER_MAJOR
-  #define ZLIB_VER_MINOR        MZ_VER_MINOR
-  #define ZLIB_VER_REVISION     MZ_VER_REVISION
-  #define ZLIB_VER_SUBREVISION  MZ_VER_SUBREVISION
-  #define zlibVersion           mz_version
-  #define zlib_version          mz_version()
-#endif // #ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES
-
-#endif // MINIZ_NO_ZLIB_APIS
-
-// ------------------- Types and macros
-
-typedef unsigned char mz_uint8;
-typedef signed short mz_int16;
-typedef unsigned short mz_uint16;
-typedef unsigned int mz_uint32;
-typedef unsigned int mz_uint;
-typedef long long mz_int64;
-typedef unsigned long long mz_uint64;
-typedef int mz_bool;
-
-#define MZ_FALSE (0)
-#define MZ_TRUE (1)
-
-// An attempt to work around MSVC's spammy "warning C4127: conditional expression is constant" message.
-#ifdef _MSC_VER
-   #define MZ_MACRO_END while (0, 0)
-#else
-   #define MZ_MACRO_END while (0)
-#endif
-
-// ------------------- ZIP archive reading/writing
-
-#ifndef MINIZ_NO_ARCHIVE_APIS
-
-enum
-{
-  MZ_ZIP_MAX_IO_BUF_SIZE = 64*1024,
-  MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE = 260,
-  MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE = 256
-};
-
-typedef struct
-{
-  mz_uint32 m_file_index;
-  mz_uint32 m_central_dir_ofs;
-  mz_uint16 m_version_made_by;
-  mz_uint16 m_version_needed;
-  mz_uint16 m_bit_flag;
-  mz_uint16 m_method;
-#ifndef MINIZ_NO_TIME
-  time_t m_time;
-#endif
-  mz_uint32 m_crc32;
-  mz_uint64 m_comp_size;
-  mz_uint64 m_uncomp_size;
-  mz_uint16 m_internal_attr;
-  mz_uint32 m_external_attr;
-  mz_uint64 m_local_header_ofs;
-  mz_uint32 m_comment_size;
-  char m_filename[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE];
-  char m_comment[MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE];
-} mz_zip_archive_file_stat;
-
-typedef size_t (*mz_file_read_func)(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n);
-typedef size_t (*mz_file_write_func)(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n);
-
-struct mz_zip_internal_state_tag;
-typedef struct mz_zip_internal_state_tag mz_zip_internal_state;
-
-typedef enum
-{
-  MZ_ZIP_MODE_INVALID = 0,
-  MZ_ZIP_MODE_READING = 1,
-  MZ_ZIP_MODE_WRITING = 2,
-  MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED = 3
-} mz_zip_mode;
-
-typedef struct mz_zip_archive_tag
-{
-  mz_uint64 m_archive_size;
-  mz_uint64 m_central_directory_file_ofs;
-  mz_uint m_total_files;
-  mz_zip_mode m_zip_mode;
-
-  mz_uint m_file_offset_alignment;
-
-  mz_alloc_func m_pAlloc;
-  mz_free_func m_pFree;
-  mz_realloc_func m_pRealloc;
-  void *m_pAlloc_opaque;
-
-  mz_file_read_func m_pRead;
-  mz_file_write_func m_pWrite;
-  void *m_pIO_opaque;
-
-  mz_zip_internal_state *m_pState;
-
-} mz_zip_archive;
-
-typedef enum
-{
-  MZ_ZIP_FLAG_CASE_SENSITIVE                = 0x0100,
-  MZ_ZIP_FLAG_IGNORE_PATH                   = 0x0200,
-  MZ_ZIP_FLAG_COMPRESSED_DATA               = 0x0400,
-  MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY = 0x0800
-} mz_zip_flags;
-
-// ZIP archive reading
-
-// Inits a ZIP archive reader.
-// These functions read and validate the archive's central directory.
-mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint32 flags);
-mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint32 flags);
-
-#ifndef MINIZ_NO_STDIO
-mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint32 flags);
-#endif
-
-// Returns the total number of files in the archive.
-mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip);
-
-// Returns detailed information about an archive file entry.
-mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, mz_zip_archive_file_stat *pStat);
-
-// Determines if an archive file entry is a directory entry.
-mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, mz_uint file_index);
-mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index);
-
-// Retrieves the filename of an archive file entry.
-// Returns the number of bytes written to pFilename, or if filename_buf_size is 0 this function returns the number of bytes needed to fully store the filename.
-mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, char *pFilename, mz_uint filename_buf_size);
-
-// Attempts to locates a file in the archive's central directory.
-// Valid flags: MZ_ZIP_FLAG_CASE_SENSITIVE, MZ_ZIP_FLAG_IGNORE_PATH
-// Returns -1 if the file cannot be found.
-int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags);
-
-// Extracts a archive file to a memory buffer using no memory allocation.
-mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size);
-mz_bool mz_zip_reader_extract_file_to_mem_no_alloc(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size);
-
-// Extracts a archive file to a memory buffer.
-mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags);
-mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags);
-
-// Extracts a archive file to a dynamically allocated heap buffer.
-void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, size_t *pSize, mz_uint flags);
-void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, const char *pFilename, size_t *pSize, mz_uint flags);
-
-// Extracts a archive file using a callback function to output the file's data.
-mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, mz_uint file_index, mz_file_write_func pCallback, void *pOpaque, mz_uint flags);
-mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, const char *pFilename, mz_file_write_func pCallback, void *pOpaque, mz_uint flags);
-
-#ifndef MINIZ_NO_STDIO
-// Extracts a archive file to a disk file and sets its last accessed and modified times.
-// This function only extracts files, not archive directory records.
-mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, const char *pDst_filename, mz_uint flags);
-mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, const char *pArchive_filename, const char *pDst_filename, mz_uint flags);
-#endif
-
-// Ends archive reading, freeing all allocations, and closing the input archive file if mz_zip_reader_init_file() was used.
-mz_bool mz_zip_reader_end(mz_zip_archive *pZip);
-
-// ZIP archive writing
-
-#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
-
-// Inits a ZIP archive writer.
-mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size);
-mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, size_t initial_allocation_size);
-
-#ifndef MINIZ_NO_STDIO
-mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint64 size_to_reserve_at_beginning);
-#endif
-
-// Converts a ZIP archive reader object into a writer object, to allow efficient in-place file appends to occur on an existing archive.
-// For archives opened using mz_zip_reader_init_file, pFilename must be the archive's filename so it can be reopened for writing. If the file can't be reopened, mz_zip_reader_end() will be called.
-// For archives opened using mz_zip_reader_init_mem, the memory block must be growable using the realloc callback (which defaults to realloc unless you've overridden it).
-// Finally, for archives opened using mz_zip_reader_init, the mz_zip_archive's user provided m_pWrite function cannot be NULL.
-// Note: In-place archive modification is not recommended unless you know what you're doing, because if execution stops or something goes wrong before
-// the archive is finalized the file's central directory will be hosed.
-mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, const char *pFilename);
-
-// Adds the contents of a memory buffer to an archive. These functions record the current local time into the archive.
-// To add a directory entry, call this method with an archive name ending in a forwardslash with empty buffer.
-// level_and_flags - compression level (0-10, see MZ_BEST_SPEED, MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or just set to MZ_DEFAULT_COMPRESSION.
-mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, mz_uint level_and_flags);
-mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32);
-
-#ifndef MINIZ_NO_STDIO
-// Adds the contents of a disk file to an archive. This function also records the disk file's modified time into the archive.
-// level_and_flags - compression level (0-10, see MZ_BEST_SPEED, MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or just set to MZ_DEFAULT_COMPRESSION.
-mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags);
-#endif
-
-// Adds a file to an archive by fully cloning the data from another archive.
-// This function fully clones the source file's compressed data (no recompression), along with its full filename, extra data, and comment fields.
-mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, mz_zip_archive *pSource_zip, mz_uint file_index);
-
-// Finalizes the archive by writing the central directory records followed by the end of central directory record.
-// After an archive is finalized, the only valid call on the mz_zip_archive struct is mz_zip_writer_end().
-// An archive must be manually finalized by calling this function for it to be valid.
-mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip);
-mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void **pBuf, size_t *pSize);
-
-// Ends archive writing, freeing all allocations, and closing the output file if mz_zip_writer_init_file() was used.
-// Note for the archive to be valid, it must have been finalized before ending.
-mz_bool mz_zip_writer_end(mz_zip_archive *pZip);
-
-// Misc. high-level helper functions:
-
-// mz_zip_add_mem_to_archive_file_in_place() efficiently (but not atomically) appends a memory blob to a ZIP archive.
-// level_and_flags - compression level (0-10, see MZ_BEST_SPEED, MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or just set to MZ_DEFAULT_COMPRESSION.
-mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags);
-
-// Reads a single file from an archive into a heap block.
-// Returns NULL on failure.
-void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name, size_t *pSize, mz_uint zip_flags);
-
-#endif // #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
-
-#endif // #ifndef MINIZ_NO_ARCHIVE_APIS
-
-// ------------------- Low-level Decompression API Definitions
-
-// Decompression flags used by tinfl_decompress().
-// TINFL_FLAG_PARSE_ZLIB_HEADER: If set, the input has a valid zlib header and ends with an adler32 checksum (it's a valid zlib stream). Otherwise, the input is a raw deflate stream.
-// TINFL_FLAG_HAS_MORE_INPUT: If set, there are more input bytes available beyond the end of the supplied input buffer. If clear, the input buffer contains all remaining input.
-// TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF: If set, the output buffer is large enough to hold the entire decompressed stream. If clear, the output buffer is at least the size of the dictionary (typically 32KB).
-// TINFL_FLAG_COMPUTE_ADLER32: Force adler-32 checksum computation of the decompressed bytes.
-enum
-{
-  TINFL_FLAG_PARSE_ZLIB_HEADER = 1,
-  TINFL_FLAG_HAS_MORE_INPUT = 2,
-  TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF = 4,
-  TINFL_FLAG_COMPUTE_ADLER32 = 8
-};
-
-// High level decompression functions:
-// tinfl_decompress_mem_to_heap() decompresses a block in memory to a heap block allocated via malloc().
-// On entry:
-//  pSrc_buf, src_buf_len: Pointer and size of the Deflate or zlib source data to decompress.
-// On return:
-//  Function returns a pointer to the decompressed data, or NULL on failure.
-//  *pOut_len will be set to the decompressed data's size, which could be larger than src_buf_len on uncompressible data.
-//  The caller must call mz_free() on the returned block when it's no longer needed.
-void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags);
-
-// tinfl_decompress_mem_to_mem() decompresses a block in memory to another block in memory.
-// Returns TINFL_DECOMPRESS_MEM_TO_MEM_FAILED on failure, or the number of bytes written on success.
-#define TINFL_DECOMPRESS_MEM_TO_MEM_FAILED ((size_t)(-1))
-size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags);
-
-// tinfl_decompress_mem_to_callback() decompresses a block in memory to an internal 32KB buffer, and a user provided callback function will be called to flush the buffer.
-// Returns 1 on success or 0 on failure.
-typedef int (*tinfl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser);
-int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
-
-struct tinfl_decompressor_tag; typedef struct tinfl_decompressor_tag tinfl_decompressor;
-
-// Max size of LZ dictionary.
-#define TINFL_LZ_DICT_SIZE 32768
-
-// Return status.
-typedef enum
-{
-  // This flags indicates the inflator needs 1 or more input bytes to make forward progress, but the caller is indicating that no more are available. The compressed data
-  // is probably corrupted. If you call the inflator again with more bytes it'll try to continue processing the input but this is a BAD sign (either the data is corrupted or you called it incorrectly).
-  // If you call it again with no input you'll just get TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS again.
-  TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS = -4,
-
-  // This flag indicates that one or more of the input parameters was obviously bogus. (You can try calling it again, but if you get this error the calling code is wrong.)
-  TINFL_STATUS_BAD_PARAM = -3,
-
-  // This flags indicate the inflator is finished but the adler32 check of the uncompressed data didn't match. If you call it again it'll return TINFL_STATUS_DONE.
-  TINFL_STATUS_ADLER32_MISMATCH = -2,
-
-  // This flags indicate the inflator has somehow failed (bad code, corrupted input, etc.). If you call it again without resetting via tinfl_init() it it'll just keep on returning the same status failure code.
-  TINFL_STATUS_FAILED = -1,
-
-  // Any status code less than TINFL_STATUS_DONE must indicate a failure.
-
-  // This flag indicates the inflator has returned every byte of uncompressed data that it can, has consumed every byte that it needed, has successfully reached the end of the deflate stream, and
-  // if zlib headers and adler32 checking enabled that it has successfully checked the uncompressed data's adler32. If you call it again you'll just get TINFL_STATUS_DONE over and over again.
-  TINFL_STATUS_DONE = 0,
-
-  // This flag indicates the inflator MUST have more input data (even 1 byte) before it can make any more forward progress, or you need to clear the TINFL_FLAG_HAS_MORE_INPUT
-  // flag on the next call if you don't have any more source data. If the source data was somehow corrupted it's also possible (but unlikely) for the inflator to keep on demanding input to
-  // proceed, so be sure to properly set the TINFL_FLAG_HAS_MORE_INPUT flag.
-  TINFL_STATUS_NEEDS_MORE_INPUT = 1,
-
-  // This flag indicates the inflator definitely has 1 or more bytes of uncompressed data available, but it cannot write this data into the output buffer.
-  // Note if the source compressed data was corrupted it's possible for the inflator to return a lot of uncompressed data to the caller. I've been assuming you know how much uncompressed data to expect
-  // (either exact or worst case) and will stop calling the inflator and fail after receiving too much. In pure streaming scenarios where you have no idea how many bytes to expect this may not be possible
-  // so I may need to add some code to address this.
-  TINFL_STATUS_HAS_MORE_OUTPUT = 2
-
-} tinfl_status;
-
-// Initializes the decompressor to its initial state.
-#define tinfl_init(r) do { (r)->m_state = 0; } MZ_MACRO_END
-#define tinfl_get_adler32(r) (r)->m_check_adler32
-
-// Main low-level decompressor coroutine function. This is the only function actually needed for decompression. All the other functions are just high-level helpers for improved usability.
-// This is a universal API, i.e. it can be used as a building block to build any desired higher level decompression API. In the limit case, it can be called once per every byte input or output.
-tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags);
-
-// Internal/private bits follow.
-enum
-{
-  TINFL_MAX_HUFF_TABLES = 3, TINFL_MAX_HUFF_SYMBOLS_0 = 288, TINFL_MAX_HUFF_SYMBOLS_1 = 32, TINFL_MAX_HUFF_SYMBOLS_2 = 19,
-  TINFL_FAST_LOOKUP_BITS = 10, TINFL_FAST_LOOKUP_SIZE = 1 << TINFL_FAST_LOOKUP_BITS
-};
-
-typedef struct
-{
-  mz_uint8 m_code_size[TINFL_MAX_HUFF_SYMBOLS_0];
-  mz_int16 m_look_up[TINFL_FAST_LOOKUP_SIZE], m_tree[TINFL_MAX_HUFF_SYMBOLS_0 * 2];
-} tinfl_huff_table;
-
-#if MINIZ_HAS_64BIT_REGISTERS
-  #define TINFL_USE_64BIT_BITBUF 1
-#endif
-
-#if TINFL_USE_64BIT_BITBUF
-  typedef mz_uint64 tinfl_bit_buf_t;
-  #define TINFL_BITBUF_SIZE (64)
-#else
-  typedef mz_uint32 tinfl_bit_buf_t;
-  #define TINFL_BITBUF_SIZE (32)
-#endif
-
-struct tinfl_decompressor_tag
-{
-  mz_uint32 m_state, m_num_bits, m_zhdr0, m_zhdr1, m_z_adler32, m_final, m_type, m_check_adler32, m_dist, m_counter, m_num_extra, m_table_sizes[TINFL_MAX_HUFF_TABLES];
-  tinfl_bit_buf_t m_bit_buf;
-  size_t m_dist_from_out_buf_start;
-  tinfl_huff_table m_tables[TINFL_MAX_HUFF_TABLES];
-  mz_uint8 m_raw_header[4], m_len_codes[TINFL_MAX_HUFF_SYMBOLS_0 + TINFL_MAX_HUFF_SYMBOLS_1 + 137];
-};
-
-// ------------------- Low-level Compression API Definitions
-
-// Set TDEFL_LESS_MEMORY to 1 to use less memory (compression will be slightly slower, and raw/dynamic blocks will be output more frequently).
-#define TDEFL_LESS_MEMORY 0
-
-// tdefl_init() compression flags logically OR'd together (low 12 bits contain the max. number of probes per dictionary search):
-// TDEFL_DEFAULT_MAX_PROBES: The compressor defaults to 128 dictionary probes per dictionary search. 0=Huffman only, 1=Huffman+LZ (fastest/crap compression), 4095=Huffman+LZ (slowest/best compression).
-enum
-{
-  TDEFL_HUFFMAN_ONLY = 0, TDEFL_DEFAULT_MAX_PROBES = 128, TDEFL_MAX_PROBES_MASK = 0xFFF
-};
-
-// TDEFL_WRITE_ZLIB_HEADER: If set, the compressor outputs a zlib header before the deflate data, and the Adler-32 of the source data at the end. Otherwise, you'll get raw deflate data.
-// TDEFL_COMPUTE_ADLER32: Always compute the adler-32 of the input data (even when not writing zlib headers).
-// TDEFL_GREEDY_PARSING_FLAG: Set to use faster greedy parsing, instead of more efficient lazy parsing.
-// TDEFL_NONDETERMINISTIC_PARSING_FLAG: Enable to decrease the compressor's initialization time to the minimum, but the output may vary from run to run given the same input (depending on the contents of memory).
-// TDEFL_RLE_MATCHES: Only look for RLE matches (matches with a distance of 1)
-// TDEFL_FILTER_MATCHES: Discards matches <= 5 chars if enabled.
-// TDEFL_FORCE_ALL_STATIC_BLOCKS: Disable usage of optimized Huffman tables.
-// TDEFL_FORCE_ALL_RAW_BLOCKS: Only use raw (uncompressed) deflate blocks.
-// The low 12 bits are reserved to control the max # of hash probes per dictionary lookup (see TDEFL_MAX_PROBES_MASK).
-enum
-{
-  TDEFL_WRITE_ZLIB_HEADER             = 0x01000,
-  TDEFL_COMPUTE_ADLER32               = 0x02000,
-  TDEFL_GREEDY_PARSING_FLAG           = 0x04000,
-  TDEFL_NONDETERMINISTIC_PARSING_FLAG = 0x08000,
-  TDEFL_RLE_MATCHES                   = 0x10000,
-  TDEFL_FILTER_MATCHES                = 0x20000,
-  TDEFL_FORCE_ALL_STATIC_BLOCKS       = 0x40000,
-  TDEFL_FORCE_ALL_RAW_BLOCKS          = 0x80000
-};
-
-// High level compression functions:
-// tdefl_compress_mem_to_heap() compresses a block in memory to a heap block allocated via malloc().
-// On entry:
-//  pSrc_buf, src_buf_len: Pointer and size of source block to compress.
-//  flags: The max match finder probes (default is 128) logically OR'd against the above flags. Higher probes are slower but improve compression.
-// On return:
-//  Function returns a pointer to the compressed data, or NULL on failure.
-//  *pOut_len will be set to the compressed data's size, which could be larger than src_buf_len on uncompressible data.
-//  The caller must free() the returned block when it's no longer needed.
-void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags);
-
-// tdefl_compress_mem_to_mem() compresses a block in memory to another block in memory.
-// Returns 0 on failure.
-size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags);
-
-// Compresses an image to a compressed PNG file in memory.
-// On entry:
-//  pImage, w, h, and num_chans describe the image to compress. num_chans may be 1, 2, 3, or 4. 
-//  The image pitch in bytes per scanline will be w*num_chans. The leftmost pixel on the top scanline is stored first in memory.
-//  level may range from [0,10], use MZ_NO_COMPRESSION, MZ_BEST_SPEED, MZ_BEST_COMPRESSION, etc. or a decent default is MZ_DEFAULT_LEVEL
-//  If flip is true, the image will be flipped on the Y axis (useful for OpenGL apps).
-// On return:
-//  Function returns a pointer to the compressed data, or NULL on failure.
-//  *pLen_out will be set to the size of the PNG image file.
-//  The caller must mz_free() the returned heap block (which will typically be larger than *pLen_out) when it's no longer needed.
-void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip);
-void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out);
-
-// Output stream interface. The compressor uses this interface to write compressed data. It'll typically be called TDEFL_OUT_BUF_SIZE at a time.
-typedef mz_bool (*tdefl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser);
-
-// tdefl_compress_mem_to_output() compresses a block to an output stream. The above helpers use this function internally.
-mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
-
-enum { TDEFL_MAX_HUFF_TABLES = 3, TDEFL_MAX_HUFF_SYMBOLS_0 = 288, TDEFL_MAX_HUFF_SYMBOLS_1 = 32, TDEFL_MAX_HUFF_SYMBOLS_2 = 19, TDEFL_LZ_DICT_SIZE = 32768, TDEFL_LZ_DICT_SIZE_MASK = TDEFL_LZ_DICT_SIZE - 1, TDEFL_MIN_MATCH_LEN = 3, TDEFL_MAX_MATCH_LEN = 258 };
-
-// TDEFL_OUT_BUF_SIZE MUST be large enough to hold a single entire compressed output block (using static/fixed Huffman codes).
-#if TDEFL_LESS_MEMORY
-enum { TDEFL_LZ_CODE_BUF_SIZE = 24 * 1024, TDEFL_OUT_BUF_SIZE = (TDEFL_LZ_CODE_BUF_SIZE * 13 ) / 10, TDEFL_MAX_HUFF_SYMBOLS = 288, TDEFL_LZ_HASH_BITS = 12, TDEFL_LEVEL1_HASH_SIZE_MASK = 4095, TDEFL_LZ_HASH_SHIFT = (TDEFL_LZ_HASH_BITS + 2) / 3, TDEFL_LZ_HASH_SIZE = 1 << TDEFL_LZ_HASH_BITS };
-#else
-enum { TDEFL_LZ_CODE_BUF_SIZE = 64 * 1024, TDEFL_OUT_BUF_SIZE = (TDEFL_LZ_CODE_BUF_SIZE * 13 ) / 10, TDEFL_MAX_HUFF_SYMBOLS = 288, TDEFL_LZ_HASH_BITS = 15, TDEFL_LEVEL1_HASH_SIZE_MASK = 4095, TDEFL_LZ_HASH_SHIFT = (TDEFL_LZ_HASH_BITS + 2) / 3, TDEFL_LZ_HASH_SIZE = 1 << TDEFL_LZ_HASH_BITS };
-#endif
-
-// The low-level tdefl functions below may be used directly if the above helper functions aren't flexible enough. The low-level functions don't make any heap allocations, unlike the above helper functions.
-typedef enum
-{
-  TDEFL_STATUS_BAD_PARAM = -2,
-  TDEFL_STATUS_PUT_BUF_FAILED = -1,
-  TDEFL_STATUS_OKAY = 0,
-  TDEFL_STATUS_DONE = 1,
-} tdefl_status;
-
-// Must map to MZ_NO_FLUSH, MZ_SYNC_FLUSH, etc. enums
-typedef enum
-{
-  TDEFL_NO_FLUSH = 0,
-  TDEFL_SYNC_FLUSH = 2,
-  TDEFL_FULL_FLUSH = 3,
-  TDEFL_FINISH = 4
-} tdefl_flush;
-
-// tdefl's compression state structure.
-typedef struct
-{
-  tdefl_put_buf_func_ptr m_pPut_buf_func;
-  void *m_pPut_buf_user;
-  mz_uint m_flags, m_max_probes[2];
-  int m_greedy_parsing;
-  mz_uint m_adler32, m_lookahead_pos, m_lookahead_size, m_dict_size;
-  mz_uint8 *m_pLZ_code_buf, *m_pLZ_flags, *m_pOutput_buf, *m_pOutput_buf_end;
-  mz_uint m_num_flags_left, m_total_lz_bytes, m_lz_code_buf_dict_pos, m_bits_in, m_bit_buffer;
-  mz_uint m_saved_match_dist, m_saved_match_len, m_saved_lit, m_output_flush_ofs, m_output_flush_remaining, m_finished, m_block_index, m_wants_to_finish;
-  tdefl_status m_prev_return_status;
-  const void *m_pIn_buf;
-  void *m_pOut_buf;
-  size_t *m_pIn_buf_size, *m_pOut_buf_size;
-  tdefl_flush m_flush;
-  const mz_uint8 *m_pSrc;
-  size_t m_src_buf_left, m_out_buf_ofs;
-  mz_uint8 m_dict[TDEFL_LZ_DICT_SIZE + TDEFL_MAX_MATCH_LEN - 1];
-  mz_uint16 m_huff_count[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS];
-  mz_uint16 m_huff_codes[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS];
-  mz_uint8 m_huff_code_sizes[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS];
-  mz_uint8 m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE];
-  mz_uint16 m_next[TDEFL_LZ_DICT_SIZE];
-  mz_uint16 m_hash[TDEFL_LZ_HASH_SIZE];
-  mz_uint8 m_output_buf[TDEFL_OUT_BUF_SIZE];
-} tdefl_compressor;
-
-// Initializes the compressor.
-// There is no corresponding deinit() function because the tdefl API's do not dynamically allocate memory.
-// pBut_buf_func: If NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
-// If pBut_buf_func is NULL the user should always call the tdefl_compress() API.
-// flags: See the above enums (TDEFL_HUFFMAN_ONLY, TDEFL_WRITE_ZLIB_HEADER, etc.)
-tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
-
-// Compresses a block of data, consuming as much of the specified input buffer as possible, and writing as much compressed data to the specified output buffer as possible.
-tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, size_t *pIn_buf_size, void *pOut_buf, size_t *pOut_buf_size, tdefl_flush flush);
-
-// tdefl_compress_buffer() is only usable when the tdefl_init() is called with a non-NULL tdefl_put_buf_func_ptr.
-// tdefl_compress_buffer() always consumes the entire input buffer.
-tdefl_status tdefl_compress_buffer(tdefl_compressor *d, const void *pIn_buf, size_t in_buf_size, tdefl_flush flush);
-
-tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d);
-mz_uint32 tdefl_get_adler32(tdefl_compressor *d);
-
-// Can't use tdefl_create_comp_flags_from_zip_params if MINIZ_NO_ZLIB_APIS isn't defined, because it uses some of its macros.
-#ifndef MINIZ_NO_ZLIB_APIS
-// Create tdefl_compress() flags given zlib-style compression parameters.
-// level may range from [0,10] (where 10 is absolute max compression, but may be much slower on some files)
-// window_bits may be -15 (raw deflate) or 15 (zlib)
-// strategy may be either MZ_DEFAULT_STRATEGY, MZ_FILTERED, MZ_HUFFMAN_ONLY, MZ_RLE, or MZ_FIXED
-mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int strategy);
-#endif // #ifndef MINIZ_NO_ZLIB_APIS
-
-// Allocate the tdefl_compressor and tinfl_decompressor structures in C so that
-// non-C language bindings to tdefl_ and tinfl_ API don't need to worry about
-// structure size and allocation mechanism.
-tdefl_compressor *tdefl_compressor_alloc();
-void tdefl_compressor_free(tdefl_compressor *pComp);
-tinfl_decompressor *tinfl_decompressor_alloc();
-void tinfl_decompressor_free(tinfl_decompressor *pDecomp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // MINIZ_HEADER_INCLUDED
-
-// ------------------- End of Header: Implementation follows. (If you only want the header, define MINIZ_HEADER_FILE_ONLY.)
-
-#ifndef MINIZ_HEADER_FILE_ONLY
-
-typedef unsigned char mz_validate_uint16[sizeof(mz_uint16)==2 ? 1 : -1];
-typedef unsigned char mz_validate_uint32[sizeof(mz_uint32)==4 ? 1 : -1];
-typedef unsigned char mz_validate_uint64[sizeof(mz_uint64)==8 ? 1 : -1];
-
-#include <string.h>
-#include <assert.h>
-
-#define MZ_ASSERT(x) assert(x)
-
-#ifdef MINIZ_NO_MALLOC
-  #define MZ_MALLOC(x) NULL
-  #define MZ_FREE(x) (void)x, ((void)0)
-  #define MZ_REALLOC(p, x) NULL
-#else
-  #define MZ_MALLOC(x) malloc(x)
-  #define MZ_FREE(x) free(x)
-  #define MZ_REALLOC(p, x) realloc(p, x)
-#endif
-
-#define MZ_MAX(a,b) (((a)>(b))?(a):(b))
-#define MZ_MIN(a,b) (((a)<(b))?(a):(b))
-#define MZ_CLEAR_OBJ(obj) memset(&(obj), 0, sizeof(obj))
-
-#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
-  #define MZ_READ_LE16(p) *((const mz_uint16 *)(p))
-  #define MZ_READ_LE32(p) *((const mz_uint32 *)(p))
-#else
-  #define MZ_READ_LE16(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
-  #define MZ_READ_LE32(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) | ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) | ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
-#endif
-
-#ifdef _MSC_VER
-  #define MZ_FORCEINLINE __forceinline
-#elif defined(__GNUC__)
-  #define MZ_FORCEINLINE inline __attribute__((__always_inline__))
-#else
-  #define MZ_FORCEINLINE inline
-#endif
-
-#ifdef __cplusplus
-  extern "C" {
-#endif
-
-// ------------------- zlib-style API's
-
-mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len)
-{
-  mz_uint32 i, s1 = (mz_uint32)(adler & 0xffff), s2 = (mz_uint32)(adler >> 16); size_t block_len = buf_len % 5552;
-  if (!ptr) return MZ_ADLER32_INIT;
-  while (buf_len) {
-    for (i = 0; i + 7 < block_len; i += 8, ptr += 8) {
-      s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1;
-      s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1;
-    }
-    for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1;
-    s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552;
-  }
-  return (s2 << 16) + s1;
-}
-
-// Karl Malbrain's compact CRC-32. See "A compact CCITT crc16 and crc32 C implementation that balances processor cache usage against speed": http://www.geocities.com/malbrain/
-mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len)
-{
-  static const mz_uint32 s_crc32[16] = { 0, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c,
-    0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c };
-  mz_uint32 crcu32 = (mz_uint32)crc;
-  if (!ptr) return MZ_CRC32_INIT;
-  crcu32 = ~crcu32; while (buf_len--) { mz_uint8 b = *ptr++; crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b & 0xF)]; crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b >> 4)]; }
-  return ~crcu32;
-}
-
-void mz_free(void *p)
-{
-  MZ_FREE(p);
-}
-
-#ifndef MINIZ_NO_ZLIB_APIS
-
-static void *def_alloc_func(void *opaque, size_t items, size_t size) { (void)opaque, (void)items, (void)size; return MZ_MALLOC(items * size); }
-static void def_free_func(void *opaque, void *address) { (void)opaque, (void)address; MZ_FREE(address); }
-static void *def_realloc_func(void *opaque, void *address, size_t items, size_t size) { (void)opaque, (void)address, (void)items, (void)size; return MZ_REALLOC(address, items * size); }
-
-const char *mz_version(void)
-{
-  return MZ_VERSION;
-}
-
-int mz_deflateInit(mz_streamp pStream, int level)
-{
-  return mz_deflateInit2(pStream, level, MZ_DEFLATED, MZ_DEFAULT_WINDOW_BITS, 9, MZ_DEFAULT_STRATEGY);
-}
-
-int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy)
-{
-  tdefl_compressor *pComp;
-  mz_uint comp_flags = TDEFL_COMPUTE_ADLER32 | tdefl_create_comp_flags_from_zip_params(level, window_bits, strategy);
-
-  if (!pStream) return MZ_STREAM_ERROR;
-  if ((method != MZ_DEFLATED) || ((mem_level < 1) || (mem_level > 9)) || ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS))) return MZ_PARAM_ERROR;
-
-  pStream->data_type = 0;
-  pStream->adler = MZ_ADLER32_INIT;
-  pStream->msg = NULL;
-  pStream->reserved = 0;
-  pStream->total_in = 0;
-  pStream->total_out = 0;
-  if (!pStream->zalloc) pStream->zalloc = def_alloc_func;
-  if (!pStream->zfree) pStream->zfree = def_free_func;
-
-  pComp = (tdefl_compressor *)pStream->zalloc(pStream->opaque, 1, sizeof(tdefl_compressor));
-  if (!pComp)
-    return MZ_MEM_ERROR;
-
-  pStream->state = (struct mz_internal_state *)pComp;
-
-  if (tdefl_init(pComp, NULL, NULL, comp_flags) != TDEFL_STATUS_OKAY)
-  {
-    mz_deflateEnd(pStream);
-    return MZ_PARAM_ERROR;
-  }
-
-  return MZ_OK;
-}
-
-int mz_deflateReset(mz_streamp pStream)
-{
-  if ((!pStream) || (!pStream->state) || (!pStream->zalloc) || (!pStream->zfree)) return MZ_STREAM_ERROR;
-  pStream->total_in = pStream->total_out = 0;
-  tdefl_init((tdefl_compressor*)pStream->state, NULL, NULL, ((tdefl_compressor*)pStream->state)->m_flags);
-  return MZ_OK;
-}
-
-int mz_deflate(mz_streamp pStream, int flush)
-{
-  size_t in_bytes, out_bytes;
-  mz_ulong orig_total_in, orig_total_out;
-  int mz_status = MZ_OK;
-
-  if ((!pStream) || (!pStream->state) || (flush < 0) || (flush > MZ_FINISH) || (!pStream->next_out)) return MZ_STREAM_ERROR;
-  if (!pStream->avail_out) return MZ_BUF_ERROR;
-
-  if (flush == MZ_PARTIAL_FLUSH) flush = MZ_SYNC_FLUSH;
-
-  if (((tdefl_compressor*)pStream->state)->m_prev_return_status == TDEFL_STATUS_DONE)
-    return (flush == MZ_FINISH) ? MZ_STREAM_END : MZ_BUF_ERROR;
-
-  orig_total_in = pStream->total_in; orig_total_out = pStream->total_out;
-  for ( ; ; )
-  {
-    tdefl_status defl_status;
-    in_bytes = pStream->avail_in; out_bytes = pStream->avail_out;
-
-    defl_status = tdefl_compress((tdefl_compressor*)pStream->state, pStream->next_in, &in_bytes, pStream->next_out, &out_bytes, (tdefl_flush)flush);
-    pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes;
-    pStream->total_in += (mz_uint)in_bytes; pStream->adler = tdefl_get_adler32((tdefl_compressor*)pStream->state);
-
-    pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes;
-    pStream->total_out += (mz_uint)out_bytes;
-
-    if (defl_status < 0)
-    {
-      mz_status = MZ_STREAM_ERROR;
-      break;
-    }
-    else if (defl_status == TDEFL_STATUS_DONE)
-    {
-      mz_status = MZ_STREAM_END;
-      break;
-    }
-    else if (!pStream->avail_out)
-      break;
-    else if ((!pStream->avail_in) && (flush != MZ_FINISH))
-    {
-      if ((flush) || (pStream->total_in != orig_total_in) || (pStream->total_out != orig_total_out))
-        break;
-      return MZ_BUF_ERROR; // Can't make forward progress without some input.
-    }
-  }
-  return mz_status;
-}
-
-int mz_deflateEnd(mz_streamp pStream)
-{
-  if (!pStream) return MZ_STREAM_ERROR;
-  if (pStream->state)
-  {
-    pStream->zfree(pStream->opaque, pStream->state);
-    pStream->state = NULL;
-  }
-  return MZ_OK;
-}
-
-mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len)
-{
-  (void)pStream;
-  // This is really over conservative. (And lame, but it's actually pretty tricky to compute a true upper bound given the way tdefl's blocking works.)
-  return MZ_MAX(128 + (source_len * 110) / 100, 128 + source_len + ((source_len / (31 * 1024)) + 1) * 5);
-}
-
-int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level)
-{
-  int status;
-  mz_stream stream;
-  memset(&stream, 0, sizeof(stream));
-
-  // In case mz_ulong is 64-bits (argh I hate longs).
-  if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR;
-
-  stream.next_in = pSource;
-  stream.avail_in = (mz_uint32)source_len;
-  stream.next_out = pDest;
-  stream.avail_out = (mz_uint32)*pDest_len;
-
-  status = mz_deflateInit(&stream, level);
-  if (status != MZ_OK) return status;
-
-  status = mz_deflate(&stream, MZ_FINISH);
-  if (status != MZ_STREAM_END)
-  {
-    mz_deflateEnd(&stream);
-    return (status == MZ_OK) ? MZ_BUF_ERROR : status;
-  }
-
-  *pDest_len = stream.total_out;
-  return mz_deflateEnd(&stream);
-}
-
-int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len)
-{
-  return mz_compress2(pDest, pDest_len, pSource, source_len, MZ_DEFAULT_COMPRESSION);
-}
-
-mz_ulong mz_compressBound(mz_ulong source_len)
-{
-  return mz_deflateBound(NULL, source_len);
-}
-
-typedef struct
-{
-  tinfl_decompressor m_decomp;
-  mz_uint m_dict_ofs, m_dict_avail, m_first_call, m_has_flushed; int m_window_bits;
-  mz_uint8 m_dict[TINFL_LZ_DICT_SIZE];
-  tinfl_status m_last_status;
-} inflate_state;
-
-int mz_inflateInit2(mz_streamp pStream, int window_bits)
-{
-  inflate_state *pDecomp;
-  if (!pStream) return MZ_STREAM_ERROR;
-  if ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS)) return MZ_PARAM_ERROR;
-
-  pStream->data_type = 0;
-  pStream->adler = 0;
-  pStream->msg = NULL;
-  pStream->total_in = 0;
-  pStream->total_out = 0;
-  pStream->reserved = 0;
-  if (!pStream->zalloc) pStream->zalloc = def_alloc_func;
-  if (!pStream->zfree) pStream->zfree = def_free_func;
-
-  pDecomp = (inflate_state*)pStream->zalloc(pStream->opaque, 1, sizeof(inflate_state));
-  if (!pDecomp) return MZ_MEM_ERROR;
-
-  pStream->state = (struct mz_internal_state *)pDecomp;
-
-  tinfl_init(&pDecomp->m_decomp);
-  pDecomp->m_dict_ofs = 0;
-  pDecomp->m_dict_avail = 0;
-  pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT;
-  pDecomp->m_first_call = 1;
-  pDecomp->m_has_flushed = 0;
-  pDecomp->m_window_bits = window_bits;
-
-  return MZ_OK;
-}
-
-int mz_inflateInit(mz_streamp pStream)
-{
-   return mz_inflateInit2(pStream, MZ_DEFAULT_WINDOW_BITS);
-}
-
-int mz_inflate(mz_streamp pStream, int flush)
-{
-  inflate_state* pState;
-  mz_uint n, first_call, decomp_flags = TINFL_FLAG_COMPUTE_ADLER32;
-  size_t in_bytes, out_bytes, orig_avail_in;
-  tinfl_status status;
-
-  if ((!pStream) || (!pStream->state)) return MZ_STREAM_ERROR;
-  if (flush == MZ_PARTIAL_FLUSH) flush = MZ_SYNC_FLUSH;
-  if ((flush) && (flush != MZ_SYNC_FLUSH) && (flush != MZ_FINISH)) return MZ_STREAM_ERROR;
-
-  pState = (inflate_state*)pStream->state;
-  if (pState->m_window_bits > 0) decomp_flags |= TINFL_FLAG_PARSE_ZLIB_HEADER;
-  orig_avail_in = pStream->avail_in;
-
-  first_call = pState->m_first_call; pState->m_first_call = 0;
-  if (pState->m_last_status < 0) return MZ_DATA_ERROR;
-
-  if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR;
-  pState->m_has_flushed |= (flush == MZ_FINISH);
-
-  if ((flush == MZ_FINISH) && (first_call))
-  {
-    // MZ_FINISH on the first call implies that the input and output buffers are large enough to hold the entire compressed/decompressed file.
-    decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF;
-    in_bytes = pStream->avail_in; out_bytes = pStream->avail_out;
-    status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags);
-    pState->m_last_status = status;
-    pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes;
-    pStream->adler = tinfl_get_adler32(&pState->m_decomp);
-    pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes;
-
-    if (status < 0)
-      return MZ_DATA_ERROR;
-    else if (status != TINFL_STATUS_DONE)
-    {
-      pState->m_last_status = TINFL_STATUS_FAILED;
-      return MZ_BUF_ERROR;
-    }
-    return MZ_STREAM_END;
-  }
-  // flush != MZ_FINISH then we must assume there's more input.
-  if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT;
-
-  if (pState->m_dict_avail)
-  {
-    n = MZ_MIN(pState->m_dict_avail, pStream->avail_out);
-    memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
-    pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n;
-    pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1);
-    return ((pState->m_last_status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK;
-  }
-
-  for ( ; ; )
-  {
-    in_bytes = pStream->avail_in;
-    out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs;
-
-    status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags);
-    pState->m_last_status = status;
-
-    pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes;
-    pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp);
-
-    pState->m_dict_avail = (mz_uint)out_bytes;
-
-    n = MZ_MIN(pState->m_dict_avail, pStream->avail_out);
-    memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
-    pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n;
-    pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1);
-
-    if (status < 0)
-       return MZ_DATA_ERROR; // Stream is corrupted (there could be some uncompressed data left in the output dictionary - oh well).
-    else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in))
-      return MZ_BUF_ERROR; // Signal caller that we can't make forward progress without supplying more input or by setting flush to MZ_FINISH.
-    else if (flush == MZ_FINISH)
-    {
-       // The output buffer MUST be large to hold the remaining uncompressed data when flush==MZ_FINISH.
-       if (status == TINFL_STATUS_DONE)
-          return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END;
-       // status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's at least 1 more byte on the way. If there's no more room left in the output buffer then something is wrong.
-       else if (!pStream->avail_out)
-          return MZ_BUF_ERROR;
-    }
-    else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail))
-      break;
-  }
-
-  return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK;
-}
-
-int mz_inflateEnd(mz_streamp pStream)
-{
-  if (!pStream)
-    return MZ_STREAM_ERROR;
-  if (pStream->state)
-  {
-    pStream->zfree(pStream->opaque, pStream->state);
-    pStream->state = NULL;
-  }
-  return MZ_OK;
-}
-
-int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len)
-{
-  mz_stream stream;
-  int status;
-  memset(&stream, 0, sizeof(stream));
-
-  // In case mz_ulong is 64-bits (argh I hate longs).
-  if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR;
-
-  stream.next_in = pSource;
-  stream.avail_in = (mz_uint32)source_len;
-  stream.next_out = pDest;
-  stream.avail_out = (mz_uint32)*pDest_len;
-
-  status = mz_inflateInit(&stream);
-  if (status != MZ_OK)
-    return status;
-
-  status = mz_inflate(&stream, MZ_FINISH);
-  if (status != MZ_STREAM_END)
-  {
-    mz_inflateEnd(&stream);
-    return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status;
-  }
-  *pDest_len = stream.total_out;
-
-  return mz_inflateEnd(&stream);
-}
-
-const char *mz_error(int err)
-{
-  static struct { int m_err; const char *m_pDesc; } s_error_descs[] =
-  {
-    { MZ_OK, "" }, { MZ_STREAM_END, "stream end" }, { MZ_NEED_DICT, "need dictionary" }, { MZ_ERRNO, "file error" }, { MZ_STREAM_ERROR, "stream error" },
-    { MZ_DATA_ERROR, "data error" }, { MZ_MEM_ERROR, "out of memory" }, { MZ_BUF_ERROR, "buf error" }, { MZ_VERSION_ERROR, "version error" }, { MZ_PARAM_ERROR, "parameter error" }
-  };
-  mz_uint i; for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) if (s_error_descs[i].m_err == err) return s_error_descs[i].m_pDesc;
-  return NULL;
-}
-
-#endif //MINIZ_NO_ZLIB_APIS
-
-// ------------------- Low-level Decompression (completely independent from all compression API's)
-
-#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l)
-#define TINFL_MEMSET(p, c, l) memset(p, c, l)
-
-#define TINFL_CR_BEGIN switch(r->m_state) { case 0:
-#define TINFL_CR_RETURN(state_index, result) do { status = result; r->m_state = state_index; goto common_exit; case state_index:; } MZ_MACRO_END
-#define TINFL_CR_RETURN_FOREVER(state_index, result) do { for ( ; ; ) { TINFL_CR_RETURN(state_index, result); } } MZ_MACRO_END
-#define TINFL_CR_FINISH }
-
-#define TINFL_GET_BYTE(state_index, c) do { \
-  while (pIn_buf_cur >= pIn_buf_end) { \
-    TINFL_CR_RETURN(state_index, (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) ? TINFL_STATUS_NEEDS_MORE_INPUT : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS); \
-  } c = *pIn_buf_cur++; } MZ_MACRO_END
-
-#define TINFL_NEED_BITS(state_index, n) do { mz_uint c; TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; } while (num_bits < (mz_uint)(n))
-#define TINFL_SKIP_BITS(state_index, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END
-#define TINFL_GET_BITS(state_index, b, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } b = bit_buf & ((1 << (n)) - 1); bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END
-
-// TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes remaining in the input buffer falls below 2.
-// It reads just enough bytes from the input stream that are needed to decode the next Huffman code (and absolutely no more). It works by trying to fully decode a
-// Huffman code by using whatever bits are currently present in the bit buffer. If this fails, it reads another byte, and tries again until it succeeds or until the
-// bit buffer contains >=15 bits (deflate's max. Huffman code size).
-#define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \
-  do { \
-    temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \
-    if (temp >= 0) { \
-      code_len = temp >> 9; \
-      if ((code_len) && (num_bits >= code_len)) \
-      break; \
-    } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \
-       code_len = TINFL_FAST_LOOKUP_BITS; \
-       do { \
-          temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \
-       } while ((temp < 0) && (num_bits >= (code_len + 1))); if (temp >= 0) break; \
-    } TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; \
-  } while (num_bits < 15);
-
-// TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex than you would initially expect because the zlib API expects the decompressor to never read
-// beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully
-// decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32.
-// The slow path is only executed at the very end of the input buffer.
-// v1.16: The original macro handled the case at the very end of the passed-in input buffer, but we also need to handle the case where the user passes in 1+zillion bytes
-// following the deflate data and our non-conservative read-ahead path won't kick in here on this code. This is much trickier.
-#define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \
-  int temp; mz_uint code_len, c; \
-  if (num_bits < 15) { \
-    if ((pIn_buf_end - pIn_buf_cur) < 2) { \
-       TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \
-    } else { \
-       bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \
-    } \
-  } \
-  if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \
-    code_len = temp >> 9, temp &= 511; \
-  else { \
-    code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \
-  } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END
-
-tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags)
-{
-  static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 };
-  static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 };
-  static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0};
-  static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
-  static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 };
-  static const int s_min_table_sizes[3] = { 257, 1, 4 };
-
-  tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf;
-  const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size;
-  mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size;
-  size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start;
-
-  // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter).
-  if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; }
-
-  num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start;
-  TINFL_CR_BEGIN
-
-  bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1;
-  if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER)
-  {
-    TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1);
-    counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8));
-    if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4)))));
-    if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); }
-  }
-
-  do
-  {
-    TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1;
-    if (r->m_type == 0)
-    {
-      TINFL_SKIP_BITS(5, num_bits & 7);
-      for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); }
-      if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); }
-      while ((counter) && (num_bits))
-      {
-        TINFL_GET_BITS(51, dist, 8);
-        while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); }
-        *pOut_buf_cur++ = (mz_uint8)dist;
-        counter--;
-      }
-      while (counter)
-      {
-        size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); }
-        while (pIn_buf_cur >= pIn_buf_end)
-        {
-          TINFL_CR_RETURN(38, (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) ? TINFL_STATUS_NEEDS_MORE_INPUT : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);
-        }
-        n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter);
-        TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n;
-      }
-    }
-    else if (r->m_type == 3)
-    {
-      TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED);
-    }
-    else
-    {
-      if (r->m_type == 1)
-      {
-        mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i;
-        r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32);
-        for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8;
-      }
-      else
-      {
-        for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; }
-        MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; }
-        r->m_table_sizes[2] = 19;
-      }
-      for ( ; (int)r->m_type >= 0; r->m_type--)
-      {
-        int tree_next, tree_cur; tinfl_huff_table *pTable;
-        mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree);
-        for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++;
-        used_syms = 0, total = 0; next_code[0] = next_code[1] = 0;
-        for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); }
-        if ((65536 != total) && (used_syms > 1))
-        {
-          TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED);
-        }
-        for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index)
-        {
-          mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue;
-          cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1);
-          if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; }
-          if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; }
-          rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1);
-          for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--)
-          {
-            tree_cur -= ((rev_code >>= 1) & 1);
-            if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1];
-          }
-          tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index;
-        }
-        if (r->m_type == 2)
-        {
-          for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); )
-          {
-            mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; }
-            if ((dist == 16) && (!counter))
-            {
-              TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED);
-            }
-            num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16];
-            TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s;
-          }
-          if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter)
-          {
-            TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED);
-          }
-          TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]);
-        }
-      }
-      for ( ; ; )
-      {
-        mz_uint8 *pSrc;
-        for ( ; ; )
-        {
-          if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2))
-          {
-            TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]);
-            if (counter >= 256)
-              break;
-            while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); }
-            *pOut_buf_cur++ = (mz_uint8)counter;
-          }
-          else
-          {
-            int sym2; mz_uint code_len;
-#if TINFL_USE_64BIT_BITBUF
-            if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; }
-#else
-            if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; }
-#endif
-            if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0)
-              code_len = sym2 >> 9;
-            else
-            {
-              code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0);
-            }
-            counter = sym2; bit_buf >>= code_len; num_bits -= code_len;
-            if (counter & 256)
-              break;
-
-#if !TINFL_USE_64BIT_BITBUF
-            if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; }
-#endif
-            if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0)
-              code_len = sym2 >> 9;
-            else
-            {
-              code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0);
-            }
-            bit_buf >>= code_len; num_bits -= code_len;
-
-            pOut_buf_cur[0] = (mz_uint8)counter;
-            if (sym2 & 256)
-            {
-              pOut_buf_cur++;
-              counter = sym2;
-              break;
-            }
-            pOut_buf_cur[1] = (mz_uint8)sym2;
-            pOut_buf_cur += 2;
-          }
-        }
-        if ((counter &= 511) == 256) break;
-
-        num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257];
-        if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; }
-
-        TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]);
-        num_extra = s_dist_extra[dist]; dist = s_dist_base[dist];
-        if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; }
-
-        dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start;
-        if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))
-        {
-          TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED);
-        }
-
-        pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask);
-
-        if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end)
-        {
-          while (counter--)
-          {
-            while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); }
-            *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask];
-          }
-          continue;
-        }
-#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES
-        else if ((counter >= 9) && (counter <= dist))
-        {
-          const mz_uint8 *pSrc_end = pSrc + (counter & ~7);
-          do
-          {
-            ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0];
-            ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1];
-            pOut_buf_cur += 8;
-          } while ((pSrc += 8) < pSrc_end);
-          if ((counter &= 7) < 3)
-          {
-            if (counter)
-            {
-              pOut_buf_cur[0] = pSrc[0];
-              if (counter > 1)
-                pOut_buf_cur[1] = pSrc[1];
-              pOut_buf_cur += counter;
-            }
-            continue;
-          }
-        }
-#endif
-        do
-        {
-          pOut_buf_cur[0] = pSrc[0];
-          pOut_buf_cur[1] = pSrc[1];
-          pOut_buf_cur[2] = pSrc[2];
-          pOut_buf_cur += 3; pSrc += 3;
-        } while ((int)(counter -= 3) > 2);
-        if ((int)counter > 0)
-        {
-          pOut_buf_cur[0] = pSrc[0];
-          if ((int)counter > 1)
-            pOut_buf_cur[1] = pSrc[1];
-          pOut_buf_cur += counter;
-        }
-      }
-    }
-  } while (!(r->m_final & 1));
-
-  // Ensure byte alignment and put back any bytes from the bitbuf if we've looked ahead too far on gzip, or other Deflate streams followed by arbitrary data.
-  // I'm being super conservative here. A number of simplifications can be made to the byte alignment part, and the Adler32 check shouldn't ever need to worry about reading from the bitbuf now.
-  TINFL_SKIP_BITS(32, num_bits & 7);
-  while ((pIn_buf_cur > pIn_buf_next) && (num_bits >= 8)) { --pIn_buf_cur; num_bits -= 8; } bit_buf &= (tinfl_bit_buf_t)((1ULL << num_bits) - 1ULL);
-  MZ_ASSERT(!num_bits); // if this assert fires then we've read beyond the end of non-deflate/zlib streams with following data (such as gzip streams).
-
-  if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER)
-  {
-    for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; }
-  }
-  TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE);
-
-  TINFL_CR_FINISH
-
-common_exit:
-  // As long as we aren't telling the caller that we NEED more input to make forward progress:
-  // Put back any bytes from the bitbuf in case we've looked ahead too far on gzip, or other Deflate streams followed by arbitrary data.
-  // We need to be very careful here to NOT push back any bytes we definitely know we need to make forward progress, though, or we'll lock the caller up into an inf loop.
-  if ((status != TINFL_STATUS_NEEDS_MORE_INPUT) && (status != TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS)) { while ((pIn_buf_cur > pIn_buf_next) && (num_bits >= 8)) { --pIn_buf_cur; num_bits -= 8; } }
-  r->m_num_bits = num_bits; r->m_bit_buf = bit_buf & (tinfl_bit_buf_t)((1ULL << num_bits) - 1ULL); r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start;
-  *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next;
-  if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0))
-  {
-    const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size;
-    mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552;
-    while (buf_len)
-    {
-      for (i = 0; i + 7 < block_len; i += 8, ptr += 8)
-      {
-        s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1;
-        s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1;
-      }
-      for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1;
-      s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552;
-    }
-    r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH;
-  }
-  return status;
-}
-
-// Higher level helper functions.
-void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
-{
-  tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0;
-  *pOut_len = 0;
-  tinfl_init(&decomp);
-  for ( ; ; )
-  {
-    size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity;
-    tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size,
-      (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
-    if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT))
-    {
-      MZ_FREE(pBuf); *pOut_len = 0; return NULL;
-    }
-    src_buf_ofs += src_buf_size;
-    *pOut_len += dst_buf_size;
-    if (status == TINFL_STATUS_DONE) break;
-    new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128;
-    pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity);
-    if (!pNew_buf)
-    {
-      MZ_FREE(pBuf); *pOut_len = 0; return NULL;
-    }
-    pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity;
-  }
-  return pBuf;
-}
-
-size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
-{
-  tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp);
-  status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
-  return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len;
-}
-
-int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
-{
-  int result = 0;
-  tinfl_decompressor decomp;
-  mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0;
-  if (!pDict)
-    return TINFL_STATUS_FAILED;
-  tinfl_init(&decomp);
-  for ( ; ; )
-  {
-    size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs;
-    tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size,
-      (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)));
-    in_buf_ofs += in_buf_size;
-    if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user)))
-      break;
-    if (status != TINFL_STATUS_HAS_MORE_OUTPUT)
-    {
-      result = (status == TINFL_STATUS_DONE);
-      break;
-    }
-    dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1);
-  }
-  MZ_FREE(pDict);
-  *pIn_buf_size = in_buf_ofs;
-  return result;
-}
-
-// ------------------- Low-level Compression (independent from all decompression API's)
-
-// Purposely making these tables static for faster init and thread safety.
-static const mz_uint16 s_tdefl_len_sym[256] = {
-  257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272,
-  273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276,
-  277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
-  279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,
-  281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
-  282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,
-  283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
-  284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 };
-
-static const mz_uint8 s_tdefl_len_extra[256] = {
-  0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
-  4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
-  5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
-  5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 };
-
-static const mz_uint8 s_tdefl_small_dist_sym[512] = {
-  0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,
-  11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,
-  13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,
-  14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-  14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
-  15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16,
-  16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-  16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-  16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-  17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-  17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-  17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 };
-
-static const mz_uint8 s_tdefl_small_dist_extra[512] = {
-  0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,
-  5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-  6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
-  6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
-  7,7,7,7,7,7,7,7 };
-
-static const mz_uint8 s_tdefl_large_dist_sym[128] = {
-  0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,
-  26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
-  28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 };
-
-static const mz_uint8 s_tdefl_large_dist_extra[128] = {
-  0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
-  12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
-  13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 };
-
-// Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values.
-typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq;
-static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1)
-{
-  mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist);
-  for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; }
-  while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--;
-  for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8)
-  {
-    const mz_uint32* pHist = &hist[pass << 8];
-    mz_uint offsets[256], cur_ofs = 0;
-    for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; }
-    for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i];
-    { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; }
-  }
-  return pCur_syms;
-}
-
-// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, alistair@cs.mu.oz.au, Jyrki Katajainen, jyrki@diku.dk, November 1996.
-static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n)
-{
-  int root, leaf, next, avbl, used, dpth;
-  if (n==0) return; else if (n==1) { A[0].m_key = 1; return; }
-  A[0].m_key += A[1].m_key; root = 0; leaf = 2;
-  for (next=1; next < n-1; next++)
-  {
-    if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key;
-    if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key);
-  }
-  A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1;
-  avbl = 1; used = dpth = 0; root = n-2; next = n-1;
-  while (avbl>0)
-  {
-    while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; }
-    while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; }
-    avbl = 2*used; dpth++; used = 0;
-  }
-}
-
-// Limits canonical Huffman code table's max code size.
-enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 };
-static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size)
-{
-  int i; mz_uint32 total = 0; if (code_list_len <= 1) return;
-  for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i];
-  for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i));
-  while (total != (1UL << max_code_size))
-  {
-    pNum_codes[max_code_size]--;
-    for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; }
-    total--;
-  }
-}
-
-static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table)
-{
-  int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes);
-  if (static_table)
-  {
-    for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++;
-  }
-  else
-  {
-    tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms;
-    int num_used_syms = 0;
-    const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0];
-    for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; }
-
-    pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms);
-
-    for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++;
-
-    tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit);
-
-    MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]);
-    for (i = 1, j = num_used_syms; i <= code_size_limit; i++)
-      for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i);
-  }
-
-  next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1);
-
-  for (i = 0; i < table_len; i++)
-  {
-    mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue;
-    code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1);
-    d->m_huff_codes[table_num][i] = (mz_uint16)rev_code;
-  }
-}
-
-#define TDEFL_PUT_BITS(b, l) do { \
-  mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \
-  d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \
-  while (d->m_bits_in >= 8) { \
-    if (d->m_pOutput_buf < d->m_pOutput_buf_end) \
-      *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \
-      d->m_bit_buffer >>= 8; \
-      d->m_bits_in -= 8; \
-  } \
-} MZ_MACRO_END
-
-#define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \
-  if (rle_repeat_count < 3) { \
-    d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \
-    while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \
-  } else { \
-    d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \
-} rle_repeat_count = 0; } }
-
-#define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \
-  if (rle_z_count < 3) { \
-    d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \
-  } else if (rle_z_count <= 10) { \
-    d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \
-  } else { \
-    d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \
-} rle_z_count = 0; } }
-
-static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
-
-static void tdefl_start_dynamic_block(tdefl_compressor *d)
-{
-  int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_index;
-  mz_uint8 code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], packed_code_sizes[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], prev_code_size = 0xFF;
-
-  d->m_huff_count[0][256] = 1;
-
-  tdefl_optimize_huffman_table(d, 0, TDEFL_MAX_HUFF_SYMBOLS_0, 15, MZ_FALSE);
-  tdefl_optimize_huffman_table(d, 1, TDEFL_MAX_HUFF_SYMBOLS_1, 15, MZ_FALSE);
-
-  for (num_lit_codes = 286; num_lit_codes > 257; num_lit_codes--) if (d->m_huff_code_sizes[0][num_lit_codes - 1]) break;
-  for (num_dist_codes = 30; num_dist_codes > 1; num_dist_codes--) if (d->m_huff_code_sizes[1][num_dist_codes - 1]) break;
-
-  memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes);
-  memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes);
-  total_code_sizes_to_pack = num_lit_codes + num_dist_codes; num_packed_code_sizes = 0; rle_z_count = 0; rle_repeat_count = 0;
-
-  memset(&d->m_huff_count[2][0], 0, sizeof(d->m_huff_count[2][0]) * TDEFL_MAX_HUFF_SYMBOLS_2);
-  for (i = 0; i < total_code_sizes_to_pack; i++)
-  {
-    mz_uint8 code_size = code_sizes_to_pack[i];
-    if (!code_size)
-    {
-      TDEFL_RLE_PREV_CODE_SIZE();
-      if (++rle_z_count == 138) { TDEFL_RLE_ZERO_CODE_SIZE(); }
-    }
-    else
-    {
-      TDEFL_RLE_ZERO_CODE_SIZE();
-      if (code_size != prev_code_size)
-      {
-        TDEFL_RLE_PREV_CODE_SIZE();
-        d->m_huff_count[2][code_size] = (mz_uint16)(d->m_huff_count[2][code_size] + 1); packed_code_sizes[num_packed_code_sizes++] = code_size;
-      }
-      else if (++rle_repeat_count == 6)
-      {
-        TDEFL_RLE_PREV_CODE_SIZE();
-      }
-    }
-    prev_code_size = code_size;
-  }
-  if (rle_repeat_count) { TDEFL_RLE_PREV_CODE_SIZE(); } else { TDEFL_RLE_ZERO_CODE_SIZE(); }
-
-  tdefl_optimize_huffman_table(d, 2, TDEFL_MAX_HUFF_SYMBOLS_2, 7, MZ_FALSE);
-
-  TDEFL_PUT_BITS(2, 2);
-
-  TDEFL_PUT_BITS(num_lit_codes - 257, 5);
-  TDEFL_PUT_BITS(num_dist_codes - 1, 5);
-
-  for (num_bit_lengths = 18; num_bit_lengths >= 0; num_bit_lengths--) if (d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[num_bit_lengths]]) break;
-  num_bit_lengths = MZ_MAX(4, (num_bit_lengths + 1)); TDEFL_PUT_BITS(num_bit_lengths - 4, 4);
-  for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3);
-
-  for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; )
-  {
-    mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2);
-    TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]);
-    if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]);
-  }
-}
-
-static void tdefl_start_static_block(tdefl_compressor *d)
-{
-  mz_uint i;
-  mz_uint8 *p = &d->m_huff_code_sizes[0][0];
-
-  for (i = 0; i <= 143; ++i) *p++ = 8;
-  for ( ; i <= 255; ++i) *p++ = 9;
-  for ( ; i <= 279; ++i) *p++ = 7;
-  for ( ; i <= 287; ++i) *p++ = 8;
-
-  memset(d->m_huff_code_sizes[1], 5, 32);
-
-  tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE);
-  tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE);
-
-  TDEFL_PUT_BITS(1, 2);
-}
-
-static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF };
-
-#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS
-static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d)
-{
-  mz_uint flags;
-  mz_uint8 *pLZ_codes;
-  mz_uint8 *pOutput_buf = d->m_pOutput_buf;
-  mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf;
-  mz_uint64 bit_buffer = d->m_bit_buffer;
-  mz_uint bits_in = d->m_bits_in;
-
-#define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); }
-
-  flags = 1;
-  for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1)
-  {
-    if (flags == 1)
-      flags = *pLZ_codes++ | 0x100;
-
-    if (flags & 1)
-    {
-      mz_uint s0, s1, n0, n1, sym, num_extra_bits;
-      mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3;
-
-      MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]);
-      TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]);
-      TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]);
-
-      // This sequence coaxes MSVC into using cmov's vs. jmp's.
-      s0 = s_tdefl_small_dist_sym[match_dist & 511];
-      n0 = s_tdefl_small_dist_extra[match_dist & 511];
-      s1 = s_tdefl_large_dist_sym[match_dist >> 8];
-      n1 = s_tdefl_large_dist_extra[match_dist >> 8];
-      sym = (match_dist < 512) ? s0 : s1;
-      num_extra_bits = (match_dist < 512) ? n0 : n1;
-
-      MZ_ASSERT(d->m_huff_code_sizes[1][sym]);
-      TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]);
-      TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits);
-    }
-    else
-    {
-      mz_uint lit = *pLZ_codes++;
-      MZ_ASSERT(d->m_huff_code_sizes[0][lit]);
-      TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]);
-
-      if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end))
-      {
-        flags >>= 1;
-        lit = *pLZ_codes++;
-        MZ_ASSERT(d->m_huff_code_sizes[0][lit]);
-        TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]);
-
-        if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end))
-        {
-          flags >>= 1;
-          lit = *pLZ_codes++;
-          MZ_ASSERT(d->m_huff_code_sizes[0][lit]);
-          TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]);
-        }
-      }
-    }
-
-    if (pOutput_buf >= d->m_pOutput_buf_end)
-      return MZ_FALSE;
-
-    *(mz_uint64*)pOutput_buf = bit_buffer;
-    pOutput_buf += (bits_in >> 3);
-    bit_buffer >>= (bits_in & ~7);
-    bits_in &= 7;
-  }
-
-#undef TDEFL_PUT_BITS_FAST
-
-  d->m_pOutput_buf = pOutput_buf;
-  d->m_bits_in = 0;
-  d->m_bit_buffer = 0;
-
-  while (bits_in)
-  {
-    mz_uint32 n = MZ_MIN(bits_in, 16);
-    TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n);
-    bit_buffer >>= n;
-    bits_in -= n;
-  }
-
-  TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]);
-
-  return (d->m_pOutput_buf < d->m_pOutput_buf_end);
-}
-#else
-static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d)
-{
-  mz_uint flags;
-  mz_uint8 *pLZ_codes;
-
-  flags = 1;
-  for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1)
-  {
-    if (flags == 1)
-      flags = *pLZ_codes++ | 0x100;
-    if (flags & 1)
-    {
-      mz_uint sym, num_extra_bits;
-      mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3;
-
-      MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]);
-      TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]);
-      TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]);
-
-      if (match_dist < 512)
-      {
-        sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist];
-      }
-      else
-      {
-        sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8];
-      }
-      MZ_ASSERT(d->m_huff_code_sizes[1][sym]);
-      TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]);
-      TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits);
-    }
-    else
-    {
-      mz_uint lit = *pLZ_codes++;
-      MZ_ASSERT(d->m_huff_code_sizes[0][lit]);
-      TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]);
-    }
-  }
-
-  TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]);
-
-  return (d->m_pOutput_buf < d->m_pOutput_buf_end);
-}
-#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS
-
-static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block)
-{
-  if (static_block)
-    tdefl_start_static_block(d);
-  else
-    tdefl_start_dynamic_block(d);
-  return tdefl_compress_lz_codes(d);
-}
-
-static int tdefl_flush_block(tdefl_compressor *d, int flush)
-{
-  mz_uint saved_bit_buf, saved_bits_in;
-  mz_uint8 *pSaved_output_buf;
-  mz_bool comp_block_succeeded = MZ_FALSE;
-  int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size;
-  mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf;
-
-  d->m_pOutput_buf = pOutput_buf_start;
-  d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16;
-
-  MZ_ASSERT(!d->m_output_flush_remaining);
-  d->m_output_flush_ofs = 0;
-  d->m_output_flush_remaining = 0;
-
-  *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left);
-  d->m_pLZ_code_buf -= (d->m_num_flags_left == 8);
-
-  if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index))
-  {
-    TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8);
-  }
-
-  TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1);
-
-  pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in;
-
-  if (!use_raw_block)
-    comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48));
-
-  // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead.
-  if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) &&
-       ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) )
-  {
-    mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in;
-    TDEFL_PUT_BITS(0, 2);
-    if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); }
-    for (i = 2; i; --i, d->m_total_lz_bytes ^= 0xFFFF)
-    {
-      TDEFL_PUT_BITS(d->m_total_lz_bytes & 0xFFFF, 16);
-    }
-    for (i = 0; i < d->m_total_lz_bytes; ++i)
-    {
-      TDEFL_PUT_BITS(d->m_dict[(d->m_lz_code_buf_dict_pos + i) & TDEFL_LZ_DICT_SIZE_MASK], 8);
-    }
-  }
-  // Check for the extremely unlikely (if not impossible) case of the compressed block not fitting into the output buffer when using dynamic codes.
-  else if (!comp_block_succeeded)
-  {
-    d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in;
-    tdefl_compress_block(d, MZ_TRUE);
-  }
-
-  if (flush)
-  {
-    if (flush == TDEFL_FINISH)
-    {
-      if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); }
-      if (d->m_flags & TDEFL_WRITE_ZLIB_HEADER) { mz_uint i, a = d->m_adler32; for (i = 0; i < 4; i++) { TDEFL_PUT_BITS((a >> 24) & 0xFF, 8); a <<= 8; } }
-    }
-    else
-    {
-      mz_uint i, z = 0; TDEFL_PUT_BITS(0, 3); if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } for (i = 2; i; --i, z ^= 0xFFFF) { TDEFL_PUT_BITS(z & 0xFFFF, 16); }
-    }
-  }
-
-  MZ_ASSERT(d->m_pOutput_buf < d->m_pOutput_buf_end);
-
-  memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0);
-  memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1);
-
-  d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8; d->m_lz_code_buf_dict_pos += d->m_total_lz_bytes; d->m_total_lz_bytes = 0; d->m_block_index++;
-
-  if ((n = (int)(d->m_pOutput_buf - pOutput_buf_start)) != 0)
-  {
-    if (d->m_pPut_buf_func)
-    {
-      *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf;
-      if (!(*d->m_pPut_buf_func)(d->m_output_buf, n, d->m_pPut_buf_user))
-        return (d->m_prev_return_status = TDEFL_STATUS_PUT_BUF_FAILED);
-    }
-    else if (pOutput_buf_start == d->m_output_buf)
-    {
-      int bytes_to_copy = (int)MZ_MIN((size_t)n, (size_t)(*d->m_pOut_buf_size - d->m_out_buf_ofs));
-      memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy);
-      d->m_out_buf_ofs += bytes_to_copy;
-      if ((n -= bytes_to_copy) != 0)
-      {
-        d->m_output_flush_ofs = bytes_to_copy;
-        d->m_output_flush_remaining = n;
-      }
-    }
-    else
-    {
-      d->m_out_buf_ofs += n;
-    }
-  }
-
-  return d->m_output_flush_remaining;
-}
-
-#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES
-#define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16*)(p)
-static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len)
-{
-  mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len;
-  mz_uint num_probes_left = d->m_max_probes[match_len >= 32];
-  const mz_uint16 *s = (const mz_uint16*)(d->m_dict + pos), *p, *q;
-  mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), s01 = TDEFL_READ_UNALIGNED_WORD(s);
-  MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return;
-  for ( ; ; )
-  {
-    for ( ; ; )
-    {
-      if (--num_probes_left == 0) return;
-      #define TDEFL_PROBE \
-        next_probe_pos = d->m_next[probe_pos]; \
-        if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \
-        probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \
-        if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break;
-      TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE;
-    }
-    if (!dist) break; q = (const mz_uint16*)(d->m_dict + probe_pos); if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; p = s; probe_len = 32;
-    do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) &&
-                   (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) );
-    if (!probe_len)
-    {
-      *pMatch_dist = dist; *pMatch_len = MZ_MIN(max_match_len, TDEFL_MAX_MATCH_LEN); break;
-    }
-    else if ((probe_len = ((mz_uint)(p - s) * 2) + (mz_uint)(*(const mz_uint8*)p == *(const mz_uint8*)q)) > match_len)
-    {
-      *pMatch_dist = dist; if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == max_match_len) break;
-      c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]);
-    }
-  }
-}
-#else
-static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len)
-{
-  mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len;
-  mz_uint num_probes_left = d->m_max_probes[match_len >= 32];
-  const mz_uint8 *s = d->m_dict + pos, *p, *q;
-  mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1];
-  MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return;
-  for ( ; ; )
-  {
-    for ( ; ; )
-    {
-      if (--num_probes_left == 0) return;
-      #define TDEFL_PROBE \
-        next_probe_pos = d->m_next[probe_pos]; \
-        if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \
-        probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \
-        if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) break;
-      TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE;
-    }
-    if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break;
-    if (probe_len > match_len)
-    {
-      *pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return;
-      c0 = d->m_dict[pos + match_len]; c1 = d->m_dict[pos + match_len - 1];
-    }
-  }
-}
-#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES
-
-#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
-static mz_bool tdefl_compress_fast(tdefl_compressor *d)
-{
-  // Faster, minimally featured LZRW1-style match+parse loop with better register utilization. Intended for applications where raw throughput is valued more highly than ratio.
-  mz_uint lookahead_pos = d->m_lookahead_pos, lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, total_lz_bytes = d->m_total_lz_bytes, num_flags_left = d->m_num_flags_left;
-  mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags;
-  mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK;
-
-  while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size)))
-  {
-    const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096;
-    mz_uint dst_pos = (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK;
-    mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size);
-    d->m_src_buf_left -= num_bytes_to_process;
-    lookahead_size += num_bytes_to_process;
-
-    while (num_bytes_to_process)
-    {
-      mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process);
-      memcpy(d->m_dict + dst_pos, d->m_pSrc, n);
-      if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1))
-        memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos));
-      d->m_pSrc += n;
-      dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK;
-      num_bytes_to_process -= n;
-    }
-
-    dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size);
-    if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) break;
-
-    while (lookahead_size >= 4)
-    {
-      mz_uint cur_match_dist, cur_match_len = 1;
-      mz_uint8 *pCur_dict = d->m_dict + cur_pos;
-      mz_uint first_trigram = (*(const mz_uint32 *)pCur_dict) & 0xFFFFFF;
-      mz_uint hash = (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & TDEFL_LEVEL1_HASH_SIZE_MASK;
-      mz_uint probe_pos = d->m_hash[hash];
-      d->m_hash[hash] = (mz_uint16)lookahead_pos;
-
-      if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= dict_size) && ((*(const mz_uint32 *)(d->m_dict + (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & 0xFFFFFF) == first_trigram))
-      {
-        const mz_uint16 *p = (const mz_uint16 *)pCur_dict;
-        const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos);
-        mz_uint32 probe_len = 32;
-        do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) &&
-          (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) );
-        cur_match_len = ((mz_uint)(p - (const mz_uint16 *)pCur_dict) * 2) + (mz_uint)(*(const mz_uint8 *)p == *(const mz_uint8 *)q);
-        if (!probe_len)
-          cur_match_len = cur_match_dist ? TDEFL_MAX_MATCH_LEN : 0;
-
-        if ((cur_match_len < TDEFL_MIN_MATCH_LEN) || ((cur_match_len == TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 8U*1024U)))
-        {
-          cur_match_len = 1;
-          *pLZ_code_buf++ = (mz_uint8)first_trigram;
-          *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1);
-          d->m_huff_count[0][(mz_uint8)first_trigram]++;
-        }
-        else
-        {
-          mz_uint32 s0, s1;
-          cur_match_len = MZ_MIN(cur_match_len, lookahead_size);
-
-          MZ_ASSERT((cur_match_len >= TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 1) && (cur_match_dist <= TDEFL_LZ_DICT_SIZE));
-
-          cur_match_dist--;
-
-          pLZ_code_buf[0] = (mz_uint8)(cur_match_len - TDEFL_MIN_MATCH_LEN);
-          *(mz_uint16 *)(&pLZ_code_buf[1]) = (mz_uint16)cur_match_dist;
-          pLZ_code_buf += 3;
-          *pLZ_flags = (mz_uint8)((*pLZ_flags >> 1) | 0x80);
-
-          s0 = s_tdefl_small_dist_sym[cur_match_dist & 511];
-          s1 = s_tdefl_large_dist_sym[cur_match_dist >> 8];
-          d->m_huff_count[1][(cur_match_dist < 512) ? s0 : s1]++;
-
-          d->m_huff_count[0][s_tdefl_len_sym[cur_match_len - TDEFL_MIN_MATCH_LEN]]++;
-        }
-      }
-      else
-      {
-        *pLZ_code_buf++ = (mz_uint8)first_trigram;
-        *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1);
-        d->m_huff_count[0][(mz_uint8)first_trigram]++;
-      }
-
-      if (--num_flags_left == 0) { num_flags_left = 8; pLZ_flags = pLZ_code_buf++; }
-
-      total_lz_bytes += cur_match_len;
-      lookahead_pos += cur_match_len;
-      dict_size = MZ_MIN(dict_size + cur_match_len, TDEFL_LZ_DICT_SIZE);
-      cur_pos = (cur_pos + cur_match_len) & TDEFL_LZ_DICT_SIZE_MASK;
-      MZ_ASSERT(lookahead_size >= cur_match_len);
-      lookahead_size -= cur_match_len;
-
-      if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8])
-      {
-        int n;
-        d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size;
-        d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left;
-        if ((n = tdefl_flush_block(d, 0)) != 0)
-          return (n < 0) ? MZ_FALSE : MZ_TRUE;
-        total_lz_bytes = d->m_total_lz_bytes; pLZ_code_buf = d->m_pLZ_code_buf; pLZ_flags = d->m_pLZ_flags; num_flags_left = d->m_num_flags_left;
-      }
-    }
-
-    while (lookahead_size)
-    {
-      mz_uint8 lit = d->m_dict[cur_pos];
-
-      total_lz_bytes++;
-      *pLZ_code_buf++ = lit;
-      *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1);
-      if (--num_flags_left == 0) { num_flags_left = 8; pLZ_flags = pLZ_code_buf++; }
-
-      d->m_huff_count[0][lit]++;
-
-      lookahead_pos++;
-      dict_size = MZ_MIN(dict_size + 1, TDEFL_LZ_DICT_SIZE);
-      cur_pos = (cur_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK;
-      lookahead_size--;
-
-      if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8])
-      {
-        int n;
-        d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size;
-        d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left;
-        if ((n = tdefl_flush_block(d, 0)) != 0)
-          return (n < 0) ? MZ_FALSE : MZ_TRUE;
-        total_lz_bytes = d->m_total_lz_bytes; pLZ_code_buf = d->m_pLZ_code_buf; pLZ_flags = d->m_pLZ_flags; num_flags_left = d->m_num_flags_left;
-      }
-    }
-  }
-
-  d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size;
-  d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left;
-  return MZ_TRUE;
-}
-#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
-
-static MZ_FORCEINLINE void tdefl_record_literal(tdefl_compressor *d, mz_uint8 lit)
-{
-  d->m_total_lz_bytes++;
-  *d->m_pLZ_code_buf++ = lit;
-  *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> 1); if (--d->m_num_flags_left == 0) { d->m_num_flags_left = 8; d->m_pLZ_flags = d->m_pLZ_code_buf++; }
-  d->m_huff_count[0][lit]++;
-}
-
-static MZ_FORCEINLINE void tdefl_record_match(tdefl_compressor *d, mz_uint match_len, mz_uint match_dist)
-{
-  mz_uint32 s0, s1;
-
-  MZ_ASSERT((match_len >= TDEFL_MIN_MATCH_LEN) && (match_dist >= 1) && (match_dist <= TDEFL_LZ_DICT_SIZE));
-
-  d->m_total_lz_bytes += match_len;
-
-  d->m_pLZ_code_buf[0] = (mz_uint8)(match_len - TDEFL_MIN_MATCH_LEN);
-
-  match_dist -= 1;
-  d->m_pLZ_code_buf[1] = (mz_uint8)(match_dist & 0xFF);
-  d->m_pLZ_code_buf[2] = (mz_uint8)(match_dist >> 8); d->m_pLZ_code_buf += 3;
-
-  *d->m_pLZ_flags = (mz_uint8)((*d->m_pLZ_flags >> 1) | 0x80); if (--d->m_num_flags_left == 0) { d->m_num_flags_left = 8; d->m_pLZ_flags = d->m_pLZ_code_buf++; }
-
-  s0 = s_tdefl_small_dist_sym[match_dist & 511]; s1 = s_tdefl_large_dist_sym[(match_dist >> 8) & 127];
-  d->m_huff_count[1][(match_dist < 512) ? s0 : s1]++;
-
-  if (match_len >= TDEFL_MIN_MATCH_LEN) d->m_huff_count[0][s_tdefl_len_sym[match_len - TDEFL_MIN_MATCH_LEN]]++;
-}
-
-static mz_bool tdefl_compress_normal(tdefl_compressor *d)
-{
-  const mz_uint8 *pSrc = d->m_pSrc; size_t src_buf_left = d->m_src_buf_left;
-  tdefl_flush flush = d->m_flush;
-
-  while ((src_buf_left) || ((flush) && (d->m_lookahead_size)))
-  {
-    mz_uint len_to_move, cur_match_dist, cur_match_len, cur_pos;
-    // Update dictionary and hash chains. Keeps the lookahead size equal to TDEFL_MAX_MATCH_LEN.
-    if ((d->m_lookahead_size + d->m_dict_size) >= (TDEFL_MIN_MATCH_LEN - 1))
-    {
-      mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK, ins_pos = d->m_lookahead_pos + d->m_lookahead_size - 2;
-      mz_uint hash = (d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] << TDEFL_LZ_HASH_SHIFT) ^ d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK];
-      mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(src_buf_left, TDEFL_MAX_MATCH_LEN - d->m_lookahead_size);
-      const mz_uint8 *pSrc_end = pSrc + num_bytes_to_process;
-      src_buf_left -= num_bytes_to_process;
-      d->m_lookahead_size += num_bytes_to_process;
-      while (pSrc != pSrc_end)
-      {
-        mz_uint8 c = *pSrc++; d->m_dict[dst_pos] = c; if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c;
-        hash = ((hash << TDEFL_LZ_HASH_SHIFT) ^ c) & (TDEFL_LZ_HASH_SIZE - 1);
-        d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash]; d->m_hash[hash] = (mz_uint16)(ins_pos);
-        dst_pos = (dst_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK; ins_pos++;
-      }
-    }
-    else
-    {
-      while ((src_buf_left) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN))
-      {
-        mz_uint8 c = *pSrc++;
-        mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK;
-        src_buf_left--;
-        d->m_dict[dst_pos] = c;
-        if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1))
-          d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c;
-        if ((++d->m_lookahead_size + d->m_dict_size) >= TDEFL_MIN_MATCH_LEN)
-        {
-          mz_uint ins_pos = d->m_lookahead_pos + (d->m_lookahead_size - 1) - 2;
-          mz_uint hash = ((d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] << (TDEFL_LZ_HASH_SHIFT * 2)) ^ (d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK] << TDEFL_LZ_HASH_SHIFT) ^ c) & (TDEFL_LZ_HASH_SIZE - 1);
-          d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash]; d->m_hash[hash] = (mz_uint16)(ins_pos);
-        }
-      }
-    }
-    d->m_dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - d->m_lookahead_size, d->m_dict_size);
-    if ((!flush) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN))
-      break;
-
-    // Simple lazy/greedy parsing state machine.
-    len_to_move = 1; cur_match_dist = 0; cur_match_len = d->m_saved_match_len ? d->m_saved_match_len : (TDEFL_MIN_MATCH_LEN - 1); cur_pos = d->m_lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK;
-    if (d->m_flags & (TDEFL_RLE_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS))
-    {
-      if ((d->m_dict_size) && (!(d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS)))
-      {
-        mz_uint8 c = d->m_dict[(cur_pos - 1) & TDEFL_LZ_DICT_SIZE_MASK];
-        cur_match_len = 0; while (cur_match_len < d->m_lookahead_size) { if (d->m_dict[cur_pos + cur_match_len] != c) break; cur_match_len++; }
-        if (cur_match_len < TDEFL_MIN_MATCH_LEN) cur_match_len = 0; else cur_match_dist = 1;
-      }
-    }
-    else
-    {
-      tdefl_find_match(d, d->m_lookahead_pos, d->m_dict_size, d->m_lookahead_size, &cur_match_dist, &cur_match_len);
-    }
-    if (((cur_match_len == TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 8U*1024U)) || (cur_pos == cur_match_dist) || ((d->m_flags & TDEFL_FILTER_MATCHES) && (cur_match_len <= 5)))
-    {
-      cur_match_dist = cur_match_len = 0;
-    }
-    if (d->m_saved_match_len)
-    {
-      if (cur_match_len > d->m_saved_match_len)
-      {
-        tdefl_record_literal(d, (mz_uint8)d->m_saved_lit);
-        if (cur_match_len >= 128)
-        {
-          tdefl_record_match(d, cur_match_len, cur_match_dist);
-          d->m_saved_match_len = 0; len_to_move = cur_match_len;
-        }
-        else
-        {
-          d->m_saved_lit = d->m_dict[cur_pos]; d->m_saved_match_dist = cur_match_dist; d->m_saved_match_len = cur_match_len;
-        }
-      }
-      else
-      {
-        tdefl_record_match(d, d->m_saved_match_len, d->m_saved_match_dist);
-        len_to_move = d->m_saved_match_len - 1; d->m_saved_match_len = 0;
-      }
-    }
-    else if (!cur_match_dist)
-      tdefl_record_literal(d, d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]);
-    else if ((d->m_greedy_parsing) || (d->m_flags & TDEFL_RLE_MATCHES) || (cur_match_len >= 128))
-    {
-      tdefl_record_match(d, cur_match_len, cur_match_dist);
-      len_to_move = cur_match_len;
-    }
-    else
-    {
-      d->m_saved_lit = d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]; d->m_saved_match_dist = cur_match_dist; d->m_saved_match_len = cur_match_len;
-    }
-    // Move the lookahead forward by len_to_move bytes.
-    d->m_lookahead_pos += len_to_move;
-    MZ_ASSERT(d->m_lookahead_size >= len_to_move);
-    d->m_lookahead_size -= len_to_move;
-    d->m_dict_size = MZ_MIN(d->m_dict_size + len_to_move, TDEFL_LZ_DICT_SIZE);
-    // Check if it's time to flush the current LZ codes to the internal output buffer.
-    if ( (d->m_pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) ||
-         ( (d->m_total_lz_bytes > 31*1024) && (((((mz_uint)(d->m_pLZ_code_buf - d->m_lz_code_buf) * 115) >> 7) >= d->m_total_lz_bytes) || (d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS))) )
-    {
-      int n;
-      d->m_pSrc = pSrc; d->m_src_buf_left = src_buf_left;
-      if ((n = tdefl_flush_block(d, 0)) != 0)
-        return (n < 0) ? MZ_FALSE : MZ_TRUE;
-    }
-  }
-
-  d->m_pSrc = pSrc; d->m_src_buf_left = src_buf_left;
-  return MZ_TRUE;
-}
-
-static tdefl_status tdefl_flush_output_buffer(tdefl_compressor *d)
-{
-  if (d->m_pIn_buf_size)
-  {
-    *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf;
-  }
-
-  if (d->m_pOut_buf_size)
-  {
-    size_t n = MZ_MIN(*d->m_pOut_buf_size - d->m_out_buf_ofs, d->m_output_flush_remaining);
-    memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf + d->m_output_flush_ofs, n);
-    d->m_output_flush_ofs += (mz_uint)n;
-    d->m_output_flush_remaining -= (mz_uint)n;
-    d->m_out_buf_ofs += n;
-
-    *d->m_pOut_buf_size = d->m_out_buf_ofs;
-  }
-
-  return (d->m_finished && !d->m_output_flush_remaining) ? TDEFL_STATUS_DONE : TDEFL_STATUS_OKAY;
-}
-
-tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, size_t *pIn_buf_size, void *pOut_buf, size_t *pOut_buf_size, tdefl_flush flush)
-{
-  if (!d)
-  {
-    if (pIn_buf_size) *pIn_buf_size = 0;
-    if (pOut_buf_size) *pOut_buf_size = 0;
-    return TDEFL_STATUS_BAD_PARAM;
-  }
-
-  d->m_pIn_buf = pIn_buf; d->m_pIn_buf_size = pIn_buf_size;
-  d->m_pOut_buf = pOut_buf; d->m_pOut_buf_size = pOut_buf_size;
-  d->m_pSrc = (const mz_uint8 *)(pIn_buf); d->m_src_buf_left = pIn_buf_size ? *pIn_buf_size : 0;
-  d->m_out_buf_ofs = 0;
-  d->m_flush = flush;
-
-  if ( ((d->m_pPut_buf_func != NULL) == ((pOut_buf != NULL) || (pOut_buf_size != NULL))) || (d->m_prev_return_status != TDEFL_STATUS_OKAY) ||
-        (d->m_wants_to_finish && (flush != TDEFL_FINISH)) || (pIn_buf_size && *pIn_buf_size && !pIn_buf) || (pOut_buf_size && *pOut_buf_size && !pOut_buf) )
-  {
-    if (pIn_buf_size) *pIn_buf_size = 0;
-    if (pOut_buf_size) *pOut_buf_size = 0;
-    return (d->m_prev_return_status = TDEFL_STATUS_BAD_PARAM);
-  }
-  d->m_wants_to_finish |= (flush == TDEFL_FINISH);
-
-  if ((d->m_output_flush_remaining) || (d->m_finished))
-    return (d->m_prev_return_status = tdefl_flush_output_buffer(d));
-
-#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
-  if (((d->m_flags & TDEFL_MAX_PROBES_MASK) == 1) &&
-      ((d->m_flags & TDEFL_GREEDY_PARSING_FLAG) != 0) &&
-      ((d->m_flags & (TDEFL_FILTER_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS | TDEFL_RLE_MATCHES)) == 0))
-  {
-    if (!tdefl_compress_fast(d))
-      return d->m_prev_return_status;
-  }
-  else
-#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
-  {
-    if (!tdefl_compress_normal(d))
-      return d->m_prev_return_status;
-  }
-
-  if ((d->m_flags & (TDEFL_WRITE_ZLIB_HEADER | TDEFL_COMPUTE_ADLER32)) && (pIn_buf))
-    d->m_adler32 = (mz_uint32)mz_adler32(d->m_adler32, (const mz_uint8 *)pIn_buf, d->m_pSrc - (const mz_uint8 *)pIn_buf);
-
-  if ((flush) && (!d->m_lookahead_size) && (!d->m_src_buf_left) && (!d->m_output_flush_remaining))
-  {
-    if (tdefl_flush_block(d, flush) < 0)
-      return d->m_prev_return_status;
-    d->m_finished = (flush == TDEFL_FINISH);
-    if (flush == TDEFL_FULL_FLUSH) { MZ_CLEAR_OBJ(d->m_hash); MZ_CLEAR_OBJ(d->m_next); d->m_dict_size = 0; }
-  }
-
-  return (d->m_prev_return_status = tdefl_flush_output_buffer(d));
-}
-
-tdefl_status tdefl_compress_buffer(tdefl_compressor *d, const void *pIn_buf, size_t in_buf_size, tdefl_flush flush)
-{
-  MZ_ASSERT(d->m_pPut_buf_func); return tdefl_compress(d, pIn_buf, &in_buf_size, NULL, NULL, flush);
-}
-
-tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
-{
-  d->m_pPut_buf_func = pPut_buf_func; d->m_pPut_buf_user = pPut_buf_user;
-  d->m_flags = (mz_uint)(flags); d->m_max_probes[0] = 1 + ((flags & 0xFFF) + 2) / 3; d->m_greedy_parsing = (flags & TDEFL_GREEDY_PARSING_FLAG) != 0;
-  d->m_max_probes[1] = 1 + (((flags & 0xFFF) >> 2) + 2) / 3;
-  if (!(flags & TDEFL_NONDETERMINISTIC_PARSING_FLAG)) MZ_CLEAR_OBJ(d->m_hash);
-  d->m_lookahead_pos = d->m_lookahead_size = d->m_dict_size = d->m_total_lz_bytes = d->m_lz_code_buf_dict_pos = d->m_bits_in = 0;
-  d->m_output_flush_ofs = d->m_output_flush_remaining = d->m_finished = d->m_block_index = d->m_bit_buffer = d->m_wants_to_finish = 0;
-  d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8;
-  d->m_pOutput_buf = d->m_output_buf; d->m_pOutput_buf_end = d->m_output_buf; d->m_prev_return_status = TDEFL_STATUS_OKAY;
-  d->m_saved_match_dist = d->m_saved_match_len = d->m_saved_lit = 0; d->m_adler32 = 1;
-  d->m_pIn_buf = NULL; d->m_pOut_buf = NULL;
-  d->m_pIn_buf_size = NULL; d->m_pOut_buf_size = NULL;
-  d->m_flush = TDEFL_NO_FLUSH; d->m_pSrc = NULL; d->m_src_buf_left = 0; d->m_out_buf_ofs = 0;
-  memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0);
-  memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1);
-  return TDEFL_STATUS_OKAY;
-}
-
-tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d)
-{
-  return d->m_prev_return_status;
-}
-
-mz_uint32 tdefl_get_adler32(tdefl_compressor *d)
-{
-  return d->m_adler32;
-}
-
-mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
-{
-  tdefl_compressor *pComp; mz_bool succeeded; if (((buf_len) && (!pBuf)) || (!pPut_buf_func)) return MZ_FALSE;
-  pComp = (tdefl_compressor*)MZ_MALLOC(sizeof(tdefl_compressor)); if (!pComp) return MZ_FALSE;
-  succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) == TDEFL_STATUS_OKAY);
-  succeeded = succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) == TDEFL_STATUS_DONE);
-  MZ_FREE(pComp); return succeeded;
-}
-
-typedef struct
-{
-  size_t m_size, m_capacity;
-  mz_uint8 *m_pBuf;
-  mz_bool m_expandable;
-} tdefl_output_buffer;
-
-static mz_bool tdefl_output_buffer_putter(const void *pBuf, int len, void *pUser)
-{
-  tdefl_output_buffer *p = (tdefl_output_buffer *)pUser;
-  size_t new_size = p->m_size + len;
-  if (new_size > p->m_capacity)
-  {
-    size_t new_capacity = p->m_capacity; mz_uint8 *pNew_buf; if (!p->m_expandable) return MZ_FALSE;
-    do { new_capacity = MZ_MAX(128U, new_capacity << 1U); } while (new_size > new_capacity);
-    pNew_buf = (mz_uint8*)MZ_REALLOC(p->m_pBuf, new_capacity); if (!pNew_buf) return MZ_FALSE;
-    p->m_pBuf = pNew_buf; p->m_capacity = new_capacity;
-  }
-  memcpy((mz_uint8*)p->m_pBuf + p->m_size, pBuf, len); p->m_size = new_size;
-  return MZ_TRUE;
-}
-
-void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
-{
-  tdefl_output_buffer out_buf; MZ_CLEAR_OBJ(out_buf);
-  if (!pOut_len) return MZ_FALSE; else *pOut_len = 0;
-  out_buf.m_expandable = MZ_TRUE;
-  if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) return NULL;
-  *pOut_len = out_buf.m_size; return out_buf.m_pBuf;
-}
-
-size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
-{
-  tdefl_output_buffer out_buf; MZ_CLEAR_OBJ(out_buf);
-  if (!pOut_buf) return 0;
-  out_buf.m_pBuf = (mz_uint8*)pOut_buf; out_buf.m_capacity = out_buf_len;
-  if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) return 0;
-  return out_buf.m_size;
-}
-
-#ifndef MINIZ_NO_ZLIB_APIS
-static const mz_uint s_tdefl_num_probes[11] = { 0, 1, 6, 32,  16, 32, 128, 256,  512, 768, 1500 };
-
-// level may actually range from [0,10] (10 is a "hidden" max level, where we want a bit more compression and it's fine if throughput to fall off a cliff on some files).
-mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int strategy)
-{
-  mz_uint comp_flags = s_tdefl_num_probes[(level >= 0) ? MZ_MIN(10, level) : MZ_DEFAULT_LEVEL] | ((level <= 3) ? TDEFL_GREEDY_PARSING_FLAG : 0);
-  if (window_bits > 0) comp_flags |= TDEFL_WRITE_ZLIB_HEADER;
-
-  if (!level) comp_flags |= TDEFL_FORCE_ALL_RAW_BLOCKS;
-  else if (strategy == MZ_FILTERED) comp_flags |= TDEFL_FILTER_MATCHES;
-  else if (strategy == MZ_HUFFMAN_ONLY) comp_flags &= ~TDEFL_MAX_PROBES_MASK;
-  else if (strategy == MZ_FIXED) comp_flags |= TDEFL_FORCE_ALL_STATIC_BLOCKS;
-  else if (strategy == MZ_RLE) comp_flags |= TDEFL_RLE_MATCHES;
-
-  return comp_flags;
-}
-#endif //MINIZ_NO_ZLIB_APIS
-
-#ifdef _MSC_VER
-#pragma warning (push)
-#pragma warning (disable:4204) // nonstandard extension used : non-constant aggregate initializer (also supported by GNU C and C99, so no big deal)
-#endif
-
-// Simple PNG writer function by Alex Evans, 2011. Released into the public domain: https://gist.github.com/908299, more context at
-// http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/.
-// This is actually a modification of Alex's original code so PNG files generated by this function pass pngcheck.
-void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip)
-{
-  // Using a local copy of this array here in case MINIZ_NO_ZLIB_APIS was defined.
-  static const mz_uint s_tdefl_png_num_probes[11] = { 0, 1, 6, 32,  16, 32, 128, 256,  512, 768, 1500 };
-  tdefl_compressor *pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor)); tdefl_output_buffer out_buf; int i, bpl = w * num_chans, y, z; mz_uint32 c; *pLen_out = 0;
-  if (!pComp) return NULL;
-  MZ_CLEAR_OBJ(out_buf); out_buf.m_expandable = MZ_TRUE; out_buf.m_capacity = 57+MZ_MAX(64, (1+bpl)*h); if (NULL == (out_buf.m_pBuf = (mz_uint8*)MZ_MALLOC(out_buf.m_capacity))) { MZ_FREE(pComp); return NULL; }
-  // write dummy header
-  for (z = 41; z; --z) tdefl_output_buffer_putter(&z, 1, &out_buf);
-  // compress image data
-  tdefl_init(pComp, tdefl_output_buffer_putter, &out_buf, s_tdefl_png_num_probes[MZ_MIN(10, level)] | TDEFL_WRITE_ZLIB_HEADER);
-  for (y = 0; y < h; ++y) { tdefl_compress_buffer(pComp, &z, 1, TDEFL_NO_FLUSH); tdefl_compress_buffer(pComp, (mz_uint8*)pImage + (flip ? (h - 1 - y) : y) * bpl, bpl, TDEFL_NO_FLUSH); }
-  if (tdefl_compress_buffer(pComp, NULL, 0, TDEFL_FINISH) != TDEFL_STATUS_DONE) { MZ_FREE(pComp); MZ_FREE(out_buf.m_pBuf); return NULL; }
-  // write real header
-  *pLen_out = out_buf.m_size-41;
-  {
-    static const mz_uint8 chans[] = {0x00, 0x00, 0x04, 0x02, 0x06};
-    mz_uint8 pnghdr[41]={0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,
-      0,0,(mz_uint8)(w>>8),(mz_uint8)w,0,0,(mz_uint8)(h>>8),(mz_uint8)h,8,chans[num_chans],0,0,0,0,0,0,0,
-      (mz_uint8)(*pLen_out>>24),(mz_uint8)(*pLen_out>>16),(mz_uint8)(*pLen_out>>8),(mz_uint8)*pLen_out,0x49,0x44,0x41,0x54};
-    c=(mz_uint32)mz_crc32(MZ_CRC32_INIT,pnghdr+12,17); for (i=0; i<4; ++i, c<<=8) ((mz_uint8*)(pnghdr+29))[i]=(mz_uint8)(c>>24);
-    memcpy(out_buf.m_pBuf, pnghdr, 41);
-  }
-  // write footer (IDAT CRC-32, followed by IEND chunk)
-  if (!tdefl_output_buffer_putter("\0\0\0\0\0\0\0\0\x49\x45\x4e\x44\xae\x42\x60\x82", 16, &out_buf)) { *pLen_out = 0; MZ_FREE(pComp); MZ_FREE(out_buf.m_pBuf); return NULL; }
-  c = (mz_uint32)mz_crc32(MZ_CRC32_INIT,out_buf.m_pBuf+41-4, *pLen_out+4); for (i=0; i<4; ++i, c<<=8) (out_buf.m_pBuf+out_buf.m_size-16)[i] = (mz_uint8)(c >> 24);
-  // compute final size of file, grab compressed data buffer and return
-  *pLen_out += 57; MZ_FREE(pComp); return out_buf.m_pBuf;
-}
-
-void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out)
-{
-  // Level 6 corresponds to TDEFL_DEFAULT_MAX_PROBES or MZ_DEFAULT_LEVEL (but we can't depend on MZ_DEFAULT_LEVEL being available in case the zlib API's where #defined out)
-  return tdefl_write_image_to_png_file_in_memory_ex(pImage, w, h, num_chans, pLen_out, 6, MZ_FALSE);
-}
-
-// Allocate the tdefl_compressor and tinfl_decompressor structures in C so that
-// non-C language bindings to tdefL_ and tinfl_ API don't need to worry about
-// structure size and allocation mechanism.
-tdefl_compressor *tdefl_compressor_alloc()
-{
-  return (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor));
-}
-
-void tdefl_compressor_free(tdefl_compressor* pComp)
-{
-  MZ_FREE(pComp);
-}
-
-tinfl_decompressor *tinfl_decompressor_alloc()
-{
-  tinfl_decompressor *pDecomp = (tinfl_decompressor *)MZ_MALLOC(sizeof(tinfl_decompressor));
-  if (pDecomp)
-    tinfl_init(pDecomp);
-  return pDecomp;
-}
-
-void tinfl_decompressor_free(tinfl_decompressor *pDecomp)
-{
-  MZ_FREE(pDecomp);
-}
-
-#ifdef _MSC_VER
-#pragma warning (pop)
-#endif
-
-// ------------------- .ZIP archive reading
-
-#ifndef MINIZ_NO_ARCHIVE_APIS
-
-#ifdef MINIZ_NO_STDIO
-  #define MZ_FILE void *
-#else
-  #include <stdio.h>
-  #include <sys/stat.h>
-
-  #if defined(_MSC_VER) || defined(__MINGW64__)
-    static FILE *mz_fopen(const char *pFilename, const char *pMode)
-    {
-      FILE* pFile = NULL;
-      fopen_s(&pFile, pFilename, pMode);
-      return pFile;
-    }
-    static FILE *mz_freopen(const char *pPath, const char *pMode, FILE *pStream)
-    {
-      FILE* pFile = NULL;
-      if (freopen_s(&pFile, pPath, pMode, pStream))
-        return NULL;
-      return pFile;
-    }
-    #ifndef MINIZ_NO_TIME
-      #include <sys/utime.h>
-    #endif
-    #define MZ_FILE FILE
-    #define MZ_FOPEN mz_fopen
-    #define MZ_FCLOSE fclose
-    #define MZ_FREAD fread
-    #define MZ_FWRITE fwrite
-    #define MZ_FTELL64 _ftelli64
-    #define MZ_FSEEK64 _fseeki64
-    #define MZ_FILE_STAT_STRUCT _stat
-    #define MZ_FILE_STAT _stat
-    #define MZ_FFLUSH fflush
-    #define MZ_FREOPEN mz_freopen
-    #define MZ_DELETE_FILE remove
-  #elif defined(__MINGW32__)
-    #ifndef MINIZ_NO_TIME
-      #include <sys/utime.h>
-    #endif
-    #define MZ_FILE FILE
-    #define MZ_FOPEN(f, m) fopen(f, m)
-    #define MZ_FCLOSE fclose
-    #define MZ_FREAD fread
-    #define MZ_FWRITE fwrite
-    #define MZ_FTELL64 ftello64
-    #define MZ_FSEEK64 fseeko64
-    #define MZ_FILE_STAT_STRUCT _stat
-    #define MZ_FILE_STAT _stat
-    #define MZ_FFLUSH fflush
-    #define MZ_FREOPEN(f, m, s) freopen(f, m, s)
-    #define MZ_DELETE_FILE remove
-  #elif defined(__TINYC__)
-    #ifndef MINIZ_NO_TIME
-      #include <sys/utime.h>
-    #endif
-    #define MZ_FILE FILE
-    #define MZ_FOPEN(f, m) fopen(f, m)
-    #define MZ_FCLOSE fclose
-    #define MZ_FREAD fread
-    #define MZ_FWRITE fwrite
-    #define MZ_FTELL64 ftell
-    #define MZ_FSEEK64 fseek
-    #define MZ_FILE_STAT_STRUCT stat
-    #define MZ_FILE_STAT stat
-    #define MZ_FFLUSH fflush
-    #define MZ_FREOPEN(f, m, s) freopen(f, m, s)
-    #define MZ_DELETE_FILE remove
-  #elif defined(__GNUC__) && _LARGEFILE64_SOURCE
-    #ifndef MINIZ_NO_TIME
-      #include <utime.h>
-    #endif
-    #define MZ_FILE FILE
-    #define MZ_FOPEN(f, m) fopen64(f, m)
-    #define MZ_FCLOSE fclose
-    #define MZ_FREAD fread
-    #define MZ_FWRITE fwrite
-    #define MZ_FTELL64 ftello64
-    #define MZ_FSEEK64 fseeko64
-    #define MZ_FILE_STAT_STRUCT stat64
-    #define MZ_FILE_STAT stat64
-    #define MZ_FFLUSH fflush
-    #define MZ_FREOPEN(p, m, s) freopen64(p, m, s)
-    #define MZ_DELETE_FILE remove
-  #else
-    #ifndef MINIZ_NO_TIME
-      #include <utime.h>
-    #endif
-    #define MZ_FILE FILE
-    #define MZ_FOPEN(f, m) fopen(f, m)
-    #define MZ_FCLOSE fclose
-    #define MZ_FREAD fread
-    #define MZ_FWRITE fwrite
-    #define MZ_FTELL64 ftello
-    #define MZ_FSEEK64 fseeko
-    #define MZ_FILE_STAT_STRUCT stat
-    #define MZ_FILE_STAT stat
-    #define MZ_FFLUSH fflush
-    #define MZ_FREOPEN(f, m, s) freopen(f, m, s)
-    #define MZ_DELETE_FILE remove
-  #endif // #ifdef _MSC_VER
-#endif // #ifdef MINIZ_NO_STDIO
-
-#define MZ_TOLOWER(c) ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))
-
-// Various ZIP archive enums. To completely avoid cross platform compiler alignment and platform endian issues, miniz.c doesn't use structs for any of this stuff.
-enum
-{
-  // ZIP archive identifiers and record sizes
-  MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG = 0x06054b50, MZ_ZIP_CENTRAL_DIR_HEADER_SIG = 0x02014b50, MZ_ZIP_LOCAL_DIR_HEADER_SIG = 0x04034b50,
-  MZ_ZIP_LOCAL_DIR_HEADER_SIZE = 30, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE = 46, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE = 22,
-  // Central directory header record offsets
-  MZ_ZIP_CDH_SIG_OFS = 0, MZ_ZIP_CDH_VERSION_MADE_BY_OFS = 4, MZ_ZIP_CDH_VERSION_NEEDED_OFS = 6, MZ_ZIP_CDH_BIT_FLAG_OFS = 8,
-  MZ_ZIP_CDH_METHOD_OFS = 10, MZ_ZIP_CDH_FILE_TIME_OFS = 12, MZ_ZIP_CDH_FILE_DATE_OFS = 14, MZ_ZIP_CDH_CRC32_OFS = 16,
-  MZ_ZIP_CDH_COMPRESSED_SIZE_OFS = 20, MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS = 24, MZ_ZIP_CDH_FILENAME_LEN_OFS = 28, MZ_ZIP_CDH_EXTRA_LEN_OFS = 30,
-  MZ_ZIP_CDH_COMMENT_LEN_OFS = 32, MZ_ZIP_CDH_DISK_START_OFS = 34, MZ_ZIP_CDH_INTERNAL_ATTR_OFS = 36, MZ_ZIP_CDH_EXTERNAL_ATTR_OFS = 38, MZ_ZIP_CDH_LOCAL_HEADER_OFS = 42,
-  // Local directory header offsets
-  MZ_ZIP_LDH_SIG_OFS = 0, MZ_ZIP_LDH_VERSION_NEEDED_OFS = 4, MZ_ZIP_LDH_BIT_FLAG_OFS = 6, MZ_ZIP_LDH_METHOD_OFS = 8, MZ_ZIP_LDH_FILE_TIME_OFS = 10,
-  MZ_ZIP_LDH_FILE_DATE_OFS = 12, MZ_ZIP_LDH_CRC32_OFS = 14, MZ_ZIP_LDH_COMPRESSED_SIZE_OFS = 18, MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS = 22,
-  MZ_ZIP_LDH_FILENAME_LEN_OFS = 26, MZ_ZIP_LDH_EXTRA_LEN_OFS = 28,
-  // End of central directory offsets
-  MZ_ZIP_ECDH_SIG_OFS = 0, MZ_ZIP_ECDH_NUM_THIS_DISK_OFS = 4, MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS = 6, MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS = 8,
-  MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS = 10, MZ_ZIP_ECDH_CDIR_SIZE_OFS = 12, MZ_ZIP_ECDH_CDIR_OFS_OFS = 16, MZ_ZIP_ECDH_COMMENT_SIZE_OFS = 20,
-};
-
-typedef struct
-{
-  void *m_p;
-  size_t m_size, m_capacity;
-  mz_uint m_element_size;
-} mz_zip_array;
-
-struct mz_zip_internal_state_tag
-{
-  mz_zip_array m_central_dir;
-  mz_zip_array m_central_dir_offsets;
-  mz_zip_array m_sorted_central_dir_offsets;
-  MZ_FILE *m_pFile;
-  void *m_pMem;
-  size_t m_mem_size;
-  size_t m_mem_capacity;
-};
-
-#define MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(array_ptr, element_size) (array_ptr)->m_element_size = element_size
-#define MZ_ZIP_ARRAY_ELEMENT(array_ptr, element_type, index) ((element_type *)((array_ptr)->m_p))[index]
-
-static MZ_FORCEINLINE void mz_zip_array_clear(mz_zip_archive *pZip, mz_zip_array *pArray)
-{
-  pZip->m_pFree(pZip->m_pAlloc_opaque, pArray->m_p);
-  memset(pArray, 0, sizeof(mz_zip_array));
-}
-
-static mz_bool mz_zip_array_ensure_capacity(mz_zip_archive *pZip, mz_zip_array *pArray, size_t min_new_capacity, mz_uint growing)
-{
-  void *pNew_p; size_t new_capacity = min_new_capacity; MZ_ASSERT(pArray->m_element_size); if (pArray->m_capacity >= min_new_capacity) return MZ_TRUE;
-  if (growing) { new_capacity = MZ_MAX(1, pArray->m_capacity); while (new_capacity < min_new_capacity) new_capacity *= 2; }
-  if (NULL == (pNew_p = pZip->m_pRealloc(pZip->m_pAlloc_opaque, pArray->m_p, pArray->m_element_size, new_capacity))) return MZ_FALSE;
-  pArray->m_p = pNew_p; pArray->m_capacity = new_capacity;
-  return MZ_TRUE;
-}
-
-static MZ_FORCEINLINE mz_bool mz_zip_array_reserve(mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_capacity, mz_uint growing)
-{
-  if (new_capacity > pArray->m_capacity) { if (!mz_zip_array_ensure_capacity(pZip, pArray, new_capacity, growing)) return MZ_FALSE; }
-  return MZ_TRUE;
-}
-
-static MZ_FORCEINLINE mz_bool mz_zip_array_resize(mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_size, mz_uint growing)
-{
-  if (new_size > pArray->m_capacity) { if (!mz_zip_array_ensure_capacity(pZip, pArray, new_size, growing)) return MZ_FALSE; }
-  pArray->m_size = new_size;
-  return MZ_TRUE;
-}
-
-static MZ_FORCEINLINE mz_bool mz_zip_array_ensure_room(mz_zip_archive *pZip, mz_zip_array *pArray, size_t n)
-{
-  return mz_zip_array_reserve(pZip, pArray, pArray->m_size + n, MZ_TRUE);
-}
-
-static MZ_FORCEINLINE mz_bool mz_zip_array_push_back(mz_zip_archive *pZip, mz_zip_array *pArray, const void *pElements, size_t n)
-{
-  size_t orig_size = pArray->m_size; if (!mz_zip_array_resize(pZip, pArray, orig_size + n, MZ_TRUE)) return MZ_FALSE;
-  memcpy((mz_uint8*)pArray->m_p + orig_size * pArray->m_element_size, pElements, n * pArray->m_element_size);
-  return MZ_TRUE;
-}
-
-#ifndef MINIZ_NO_TIME
-static time_t mz_zip_dos_to_time_t(int dos_time, int dos_date)
-{
-  struct tm tm;
-  memset(&tm, 0, sizeof(tm)); tm.tm_isdst = -1;
-  tm.tm_year = ((dos_date >> 9) & 127) + 1980 - 1900; tm.tm_mon = ((dos_date >> 5) & 15) - 1; tm.tm_mday = dos_date & 31;
-  tm.tm_hour = (dos_time >> 11) & 31; tm.tm_min = (dos_time >> 5) & 63; tm.tm_sec = (dos_time << 1) & 62;
-  return mktime(&tm);
-}
-
-static void mz_zip_time_to_dos_time(time_t time, mz_uint16 *pDOS_time, mz_uint16 *pDOS_date)
-{
-#ifdef _MSC_VER
-  struct tm tm_struct;
-  struct tm *tm = &tm_struct;
-  errno_t err = localtime_s(tm, &time);
-  if (err)
-  {
-    *pDOS_date = 0; *pDOS_time = 0;
-    return;
-  }
-#else
-  struct tm *tm = localtime(&time);
-#endif
-  *pDOS_time = (mz_uint16)(((tm->tm_hour) << 11) + ((tm->tm_min) << 5) + ((tm->tm_sec) >> 1));
-  *pDOS_date = (mz_uint16)(((tm->tm_year + 1900 - 1980) << 9) + ((tm->tm_mon + 1) << 5) + tm->tm_mday);
-}
-#endif
-
-#ifndef MINIZ_NO_STDIO
-static mz_bool mz_zip_get_file_modified_time(const char *pFilename, mz_uint16 *pDOS_time, mz_uint16 *pDOS_date)
-{
-#ifdef MINIZ_NO_TIME
-  (void)pFilename; *pDOS_date = *pDOS_time = 0;
-#else
-  struct MZ_FILE_STAT_STRUCT file_stat;
-  // On Linux with x86 glibc, this call will fail on large files (>= 0x80000000 bytes) unless you compiled with _LARGEFILE64_SOURCE. Argh.
-  if (MZ_FILE_STAT(pFilename, &file_stat) != 0)
-    return MZ_FALSE;
-  mz_zip_time_to_dos_time(file_stat.st_mtime, pDOS_time, pDOS_date);
-#endif // #ifdef MINIZ_NO_TIME
-  return MZ_TRUE;
-}
-
-#ifndef MINIZ_NO_TIME
-static mz_bool mz_zip_set_file_times(const char *pFilename, time_t access_time, time_t modified_time)
-{
-  struct utimbuf t; t.actime = access_time; t.modtime = modified_time;
-  return !utime(pFilename, &t);
-}
-#endif // #ifndef MINIZ_NO_TIME
-#endif // #ifndef MINIZ_NO_STDIO
-
-static mz_bool mz_zip_reader_init_internal(mz_zip_archive *pZip, mz_uint32 flags)
-{
-  (void)flags;
-  if ((!pZip) || (pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID))
-    return MZ_FALSE;
-
-  if (!pZip->m_pAlloc) pZip->m_pAlloc = def_alloc_func;
-  if (!pZip->m_pFree) pZip->m_pFree = def_free_func;
-  if (!pZip->m_pRealloc) pZip->m_pRealloc = def_realloc_func;
-
-  pZip->m_zip_mode = MZ_ZIP_MODE_READING;
-  pZip->m_archive_size = 0;
-  pZip->m_central_directory_file_ofs = 0;
-  pZip->m_total_files = 0;
-
-  if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state))))
-    return MZ_FALSE;
-  memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state));
-  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8));
-  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, sizeof(mz_uint32));
-  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, sizeof(mz_uint32));
-  return MZ_TRUE;
-}
-
-static MZ_FORCEINLINE mz_bool mz_zip_reader_filename_less(const mz_zip_array *pCentral_dir_array, const mz_zip_array *pCentral_dir_offsets, mz_uint l_index, mz_uint r_index)
-{
-  const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, l_index)), *pE;
-  const mz_uint8 *pR = &MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, r_index));
-  mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS), r_len = MZ_READ_LE16(pR + MZ_ZIP_CDH_FILENAME_LEN_OFS);
-  mz_uint8 l = 0, r = 0;
-  pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; pR += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
-  pE = pL + MZ_MIN(l_len, r_len);
-  while (pL < pE)
-  {
-    if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR)))
-      break;
-    pL++; pR++;
-  }
-  return (pL == pE) ? (l_len < r_len) : (l < r);
-}
-
-#define MZ_SWAP_UINT32(a, b) do { mz_uint32 t = a; a = b; b = t; } MZ_MACRO_END
-
-// Heap sort of lowercased filenames, used to help accelerate plain central directory searches by mz_zip_reader_locate_file(). (Could also use qsort(), but it could allocate memory.)
-static void mz_zip_reader_sort_central_dir_offsets_by_filename(mz_zip_archive *pZip)
-{
-  mz_zip_internal_state *pState = pZip->m_pState;
-  const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets;
-  const mz_zip_array *pCentral_dir = &pState->m_central_dir;
-  mz_uint32 *pIndices = &MZ_ZIP_ARRAY_ELEMENT(&pState->m_sorted_central_dir_offsets, mz_uint32, 0);
-  const int size = pZip->m_total_files;
-  int start = (size - 2) >> 1, end;
-  while (start >= 0)
-  {
-    int child, root = start;
-    for ( ; ; )
-    {
-      if ((child = (root << 1) + 1) >= size)
-        break;
-      child += (((child + 1) < size) && (mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[child], pIndices[child + 1])));
-      if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[root], pIndices[child]))
-        break;
-      MZ_SWAP_UINT32(pIndices[root], pIndices[child]); root = child;
-    }
-    start--;
-  }
-
-  end = size - 1;
-  while (end > 0)
-  {
-    int child, root = 0;
-    MZ_SWAP_UINT32(pIndices[end], pIndices[0]);
-    for ( ; ; )
-    {
-      if ((child = (root << 1) + 1) >= end)
-        break;
-      child += (((child + 1) < end) && mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[child], pIndices[child + 1]));
-      if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[root], pIndices[child]))
-        break;
-      MZ_SWAP_UINT32(pIndices[root], pIndices[child]); root = child;
-    }
-    end--;
-  }
-}
-
-static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip, mz_uint32 flags)
-{
-  mz_uint cdir_size, num_this_disk, cdir_disk_index;
-  mz_uint64 cdir_ofs;
-  mz_int64 cur_file_ofs;
-  const mz_uint8 *p;
-  mz_uint32 buf_u32[4096 / sizeof(mz_uint32)]; mz_uint8 *pBuf = (mz_uint8 *)buf_u32;
-  mz_bool sort_central_dir = ((flags & MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0);
-  // Basic sanity checks - reject files which are too small, and check the first 4 bytes of the file to make sure a local header is there.
-  if (pZip->m_archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
-    return MZ_FALSE;
-  // Find the end of central directory record by scanning the file from the end towards the beginning.
-  cur_file_ofs = MZ_MAX((mz_int64)pZip->m_archive_size - (mz_int64)sizeof(buf_u32), 0);
-  for ( ; ; )
-  {
-    int i, n = (int)MZ_MIN(sizeof(buf_u32), pZip->m_archive_size - cur_file_ofs);
-    if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, n) != (mz_uint)n)
-      return MZ_FALSE;
-    for (i = n - 4; i >= 0; --i)
-      if (MZ_READ_LE32(pBuf + i) == MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG)
-        break;
-    if (i >= 0)
-    {
-      cur_file_ofs += i;
-      break;
-    }
-    if ((!cur_file_ofs) || ((pZip->m_archive_size - cur_file_ofs) >= (0xFFFF + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)))
-      return MZ_FALSE;
-    cur_file_ofs = MZ_MAX(cur_file_ofs - (sizeof(buf_u32) - 3), 0);
-  }
-  // Read and verify the end of central directory record.
-  if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) != MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
-    return MZ_FALSE;
-  if ((MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_SIG_OFS) != MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG) ||
-      ((pZip->m_total_files = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS)) != MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS)))
-    return MZ_FALSE;
-
-  num_this_disk = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_THIS_DISK_OFS);
-  cdir_disk_index = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS);
-  if (((num_this_disk | cdir_disk_index) != 0) && ((num_this_disk != 1) || (cdir_disk_index != 1)))
-    return MZ_FALSE;
-
-  if ((cdir_size = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_SIZE_OFS)) < pZip->m_total_files * MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)
-    return MZ_FALSE;
-
-  cdir_ofs = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_OFS_OFS);
-  if ((cdir_ofs + (mz_uint64)cdir_size) > pZip->m_archive_size)
-    return MZ_FALSE;
-
-  pZip->m_central_directory_file_ofs = cdir_ofs;
-
-  if (pZip->m_total_files)
-  {
-     mz_uint i, n;
-
-    // Read the entire central directory into a heap block, and allocate another heap block to hold the unsorted central dir file record offsets, and another to hold the sorted indices.
-    if ((!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir, cdir_size, MZ_FALSE)) ||
-        (!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir_offsets, pZip->m_total_files, MZ_FALSE)))
-      return MZ_FALSE;
-
-    if (sort_central_dir)
-    {
-      if (!mz_zip_array_resize(pZip, &pZip->m_pState->m_sorted_central_dir_offsets, pZip->m_total_files, MZ_FALSE))
-        return MZ_FALSE;
-    }
-
-    if (pZip->m_pRead(pZip->m_pIO_opaque, cdir_ofs, pZip->m_pState->m_central_dir.m_p, cdir_size) != cdir_size)
-      return MZ_FALSE;
-
-    // Now create an index into the central directory file records, do some basic sanity checking on each record, and check for zip64 entries (which are not yet supported).
-    p = (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p;
-    for (n = cdir_size, i = 0; i < pZip->m_total_files; ++i)
-    {
-      mz_uint total_header_size, comp_size, decomp_size, disk_index;
-      if ((n < MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) || (MZ_READ_LE32(p) != MZ_ZIP_CENTRAL_DIR_HEADER_SIG))
-        return MZ_FALSE;
-      MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, i) = (mz_uint32)(p - (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p);
-      if (sort_central_dir)
-        MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_sorted_central_dir_offsets, mz_uint32, i) = i;
-      comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
-      decomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
-      if (((!MZ_READ_LE32(p + MZ_ZIP_CDH_METHOD_OFS)) && (decomp_size != comp_size)) || (decomp_size && !comp_size) || (decomp_size == 0xFFFFFFFF) || (comp_size == 0xFFFFFFFF))
-        return MZ_FALSE;
-      disk_index = MZ_READ_LE16(p + MZ_ZIP_CDH_DISK_START_OFS);
-      if ((disk_index != num_this_disk) && (disk_index != 1))
-        return MZ_FALSE;
-      if (((mz_uint64)MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS) + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + comp_size) > pZip->m_archive_size)
-        return MZ_FALSE;
-      if ((total_header_size = MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS)) > n)
-        return MZ_FALSE;
-      n -= total_header_size; p += total_header_size;
-    }
-  }
-
-  if (sort_central_dir)
-    mz_zip_reader_sort_central_dir_offsets_by_filename(pZip);
-
-  return MZ_TRUE;
-}
-
-mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint32 flags)
-{
-  if ((!pZip) || (!pZip->m_pRead))
-    return MZ_FALSE;
-  if (!mz_zip_reader_init_internal(pZip, flags))
-    return MZ_FALSE;
-  pZip->m_archive_size = size;
-  if (!mz_zip_reader_read_central_dir(pZip, flags))
-  {
-    mz_zip_reader_end(pZip);
-    return MZ_FALSE;
-  }
-  return MZ_TRUE;
-}
-
-static size_t mz_zip_mem_read_func(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n)
-{
-  mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
-  size_t s = (file_ofs >= pZip->m_archive_size) ? 0 : (size_t)MZ_MIN(pZip->m_archive_size - file_ofs, n);
-  memcpy(pBuf, (const mz_uint8 *)pZip->m_pState->m_pMem + file_ofs, s);
-  return s;
-}
-
-mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint32 flags)
-{
-  if (!mz_zip_reader_init_internal(pZip, flags))
-    return MZ_FALSE;
-  pZip->m_archive_size = size;
-  pZip->m_pRead = mz_zip_mem_read_func;
-  pZip->m_pIO_opaque = pZip;
-#ifdef __cplusplus
-  pZip->m_pState->m_pMem = const_cast<void *>(pMem);
-#else
-  pZip->m_pState->m_pMem = (void *)pMem;
-#endif
-  pZip->m_pState->m_mem_size = size;
-  if (!mz_zip_reader_read_central_dir(pZip, flags))
-  {
-    mz_zip_reader_end(pZip);
-    return MZ_FALSE;
-  }
-  return MZ_TRUE;
-}
-
-#ifndef MINIZ_NO_STDIO
-static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n)
-{
-  mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
-  mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile);
-  if (((mz_int64)file_ofs < 0) || (((cur_ofs != (mz_int64)file_ofs)) && (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET))))
-    return 0;
-  return MZ_FREAD(pBuf, 1, n, pZip->m_pState->m_pFile);
-}
-
-mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint32 flags)
-{
-  mz_uint64 file_size;
-  MZ_FILE *pFile = MZ_FOPEN(pFilename, "rb");
-  if (!pFile)
-    return MZ_FALSE;
-  if (MZ_FSEEK64(pFile, 0, SEEK_END))
-  {
-    MZ_FCLOSE(pFile);
-    return MZ_FALSE;
-  }
-  file_size = MZ_FTELL64(pFile);
-  if (!mz_zip_reader_init_internal(pZip, flags))
-  {
-    MZ_FCLOSE(pFile);
-    return MZ_FALSE;
-  }
-  pZip->m_pRead = mz_zip_file_read_func;
-  pZip->m_pIO_opaque = pZip;
-  pZip->m_pState->m_pFile = pFile;
-  pZip->m_archive_size = file_size;
-  if (!mz_zip_reader_read_central_dir(pZip, flags))
-  {
-    mz_zip_reader_end(pZip);
-    return MZ_FALSE;
-  }
-  return MZ_TRUE;
-}
-#endif // #ifndef MINIZ_NO_STDIO
-
-mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip)
-{
-  return pZip ? pZip->m_total_files : 0;
-}
-
-static MZ_FORCEINLINE const mz_uint8 *mz_zip_reader_get_cdh(mz_zip_archive *pZip, mz_uint file_index)
-{
-  if ((!pZip) || (!pZip->m_pState) || (file_index >= pZip->m_total_files) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
-    return NULL;
-  return &MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index));
-}
-
-mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index)
-{
-  mz_uint m_bit_flag;
-  const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
-  if (!p)
-    return MZ_FALSE;
-  m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
-  return (m_bit_flag & 1);
-}
-
-mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, mz_uint file_index)
-{
-  mz_uint filename_len, external_attr;
-  const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
-  if (!p)
-    return MZ_FALSE;
-
-  // First see if the filename ends with a '/' character.
-  filename_len = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
-  if (filename_len)
-  {
-    if (*(p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_len - 1) == '/')
-      return MZ_TRUE;
-  }
-
-  // Bugfix: This code was also checking if the internal attribute was non-zero, which wasn't correct.
-  // Most/all zip writers (hopefully) set DOS file/directory attributes in the low 16-bits, so check for the DOS directory flag and ignore the source OS ID in the created by field.
-  // FIXME: Remove this check? Is it necessary - we already check the filename.
-  external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS);
-  if ((external_attr & 0x10) != 0)
-    return MZ_TRUE;
-
-  return MZ_FALSE;
-}
-
-mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, mz_zip_archive_file_stat *pStat)
-{
-  mz_uint n;
-  const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
-  if ((!p) || (!pStat))
-    return MZ_FALSE;
-
-  // Unpack the central directory record.
-  pStat->m_file_index = file_index;
-  pStat->m_central_dir_ofs = MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index);
-  pStat->m_version_made_by = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_MADE_BY_OFS);
-  pStat->m_version_needed = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_NEEDED_OFS);
-  pStat->m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
-  pStat->m_method = MZ_READ_LE16(p + MZ_ZIP_CDH_METHOD_OFS);
-#ifndef MINIZ_NO_TIME
-  pStat->m_time = mz_zip_dos_to_time_t(MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_TIME_OFS), MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_DATE_OFS));
-#endif
-  pStat->m_crc32 = MZ_READ_LE32(p + MZ_ZIP_CDH_CRC32_OFS);
-  pStat->m_comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
-  pStat->m_uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
-  pStat->m_internal_attr = MZ_READ_LE16(p + MZ_ZIP_CDH_INTERNAL_ATTR_OFS);
-  pStat->m_external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS);
-  pStat->m_local_header_ofs = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS);
-
-  // Copy as much of the filename and comment as possible.
-  n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE - 1);
-  memcpy(pStat->m_filename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n); pStat->m_filename[n] = '\0';
-
-  n = MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS); n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE - 1);
-  pStat->m_comment_size = n;
-  memcpy(pStat->m_comment, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS), n); pStat->m_comment[n] = '\0';
-
-  return MZ_TRUE;
-}
-
-mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, char *pFilename, mz_uint filename_buf_size)
-{
-  mz_uint n;
-  const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
-  if (!p) { if (filename_buf_size) pFilename[0] = '\0'; return 0; }
-  n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
-  if (filename_buf_size)
-  {
-    n = MZ_MIN(n, filename_buf_size - 1);
-    memcpy(pFilename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n);
-    pFilename[n] = '\0';
-  }
-  return n + 1;
-}
-
-static MZ_FORCEINLINE mz_bool mz_zip_reader_string_equal(const char *pA, const char *pB, mz_uint len, mz_uint flags)
-{
-  mz_uint i;
-  if (flags & MZ_ZIP_FLAG_CASE_SENSITIVE)
-    return 0 == memcmp(pA, pB, len);
-  for (i = 0; i < len; ++i)
-    if (MZ_TOLOWER(pA[i]) != MZ_TOLOWER(pB[i]))
-      return MZ_FALSE;
-  return MZ_TRUE;
-}
-
-static MZ_FORCEINLINE int mz_zip_reader_filename_compare(const mz_zip_array *pCentral_dir_array, const mz_zip_array *pCentral_dir_offsets, mz_uint l_index, const char *pR, mz_uint r_len)
-{
-  const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, l_index)), *pE;
-  mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS);
-  mz_uint8 l = 0, r = 0;
-  pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
-  pE = pL + MZ_MIN(l_len, r_len);
-  while (pL < pE)
-  {
-    if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR)))
-      break;
-    pL++; pR++;
-  }
-  return (pL == pE) ? (int)(l_len - r_len) : (l - r);
-}
-
-static int mz_zip_reader_locate_file_binary_search(mz_zip_archive *pZip, const char *pFilename)
-{
-  mz_zip_internal_state *pState = pZip->m_pState;
-  const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets;
-  const mz_zip_array *pCentral_dir = &pState->m_central_dir;
-  mz_uint32 *pIndices = &MZ_ZIP_ARRAY_ELEMENT(&pState->m_sorted_central_dir_offsets, mz_uint32, 0);
-  const int size = pZip->m_total_files;
-  const mz_uint filename_len = (mz_uint)strlen(pFilename);
-  int l = 0, h = size - 1;
-  while (l <= h)
-  {
-    int m = (l + h) >> 1, file_index = pIndices[m], comp = mz_zip_reader_filename_compare(pCentral_dir, pCentral_dir_offsets, file_index, pFilename, filename_len);
-    if (!comp)
-      return file_index;
-    else if (comp < 0)
-      l = m + 1;
-    else
-      h = m - 1;
-  }
-  return -1;
-}
-
-int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags)
-{
-  mz_uint file_index; size_t name_len, comment_len;
-  if ((!pZip) || (!pZip->m_pState) || (!pName) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
-    return -1;
-  if (((flags & (MZ_ZIP_FLAG_IGNORE_PATH | MZ_ZIP_FLAG_CASE_SENSITIVE)) == 0) && (!pComment) && (pZip->m_pState->m_sorted_central_dir_offsets.m_size))
-    return mz_zip_reader_locate_file_binary_search(pZip, pName);
-  name_len = strlen(pName); if (name_len > 0xFFFF) return -1;
-  comment_len = pComment ? strlen(pComment) : 0; if (comment_len > 0xFFFF) return -1;
-  for (file_index = 0; file_index < pZip->m_total_files; file_index++)
-  {
-    const mz_uint8 *pHeader = &MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index));
-    mz_uint filename_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_FILENAME_LEN_OFS);
-    const char *pFilename = (const char *)pHeader + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
-    if (filename_len < name_len)
-      continue;
-    if (comment_len)
-    {
-      mz_uint file_extra_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_EXTRA_LEN_OFS), file_comment_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_COMMENT_LEN_OFS);
-      const char *pFile_comment = pFilename + filename_len + file_extra_len;
-      if ((file_comment_len != comment_len) || (!mz_zip_reader_string_equal(pComment, pFile_comment, file_comment_len, flags)))
-        continue;
-    }
-    if ((flags & MZ_ZIP_FLAG_IGNORE_PATH) && (filename_len))
-    {
-      int ofs = filename_len - 1;
-      do
-      {
-        if ((pFilename[ofs] == '/') || (pFilename[ofs] == '\\') || (pFilename[ofs] == ':'))
-          break;
-      } while (--ofs >= 0);
-      ofs++;
-      pFilename += ofs; filename_len -= ofs;
-    }
-    if ((filename_len == name_len) && (mz_zip_reader_string_equal(pName, pFilename, filename_len, flags)))
-      return file_index;
-  }
-  return -1;
-}
-
-mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size)
-{
-  int status = TINFL_STATUS_DONE;
-  mz_uint64 needed_size, cur_file_ofs, comp_remaining, out_buf_ofs = 0, read_buf_size, read_buf_ofs = 0, read_buf_avail;
-  mz_zip_archive_file_stat file_stat;
-  void *pRead_buf;
-  mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32;
-  tinfl_decompressor inflator;
-
-  if ((buf_size) && (!pBuf))
-    return MZ_FALSE;
-
-  if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat))
-    return MZ_FALSE;
-
-  // Empty file, or a directory (but not always a directory - I've seen odd zips with directories that have compressed data which inflates to 0 bytes)
-  if (!file_stat.m_comp_size)
-    return MZ_TRUE;
-
-  // Entry is a subdirectory (I've seen old zips with dir entries which have compressed deflate data which inflates to 0 bytes, but these entries claim to uncompress to 512 bytes in the headers).
-  // I'm torn how to handle this case - should it fail instead?
-  if (mz_zip_reader_is_file_a_directory(pZip, file_index))
-    return MZ_TRUE;
-
-  // Encryption and patch files are not supported.
-  if (file_stat.m_bit_flag & (1 | 32))
-    return MZ_FALSE;
-
-  // This function only supports stored and deflate.
-  if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) && (file_stat.m_method != MZ_DEFLATED))
-    return MZ_FALSE;
-
-  // Ensure supplied output buffer is large enough.
-  needed_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? file_stat.m_comp_size : file_stat.m_uncomp_size;
-  if (buf_size < needed_size)
-    return MZ_FALSE;
-
-  // Read and parse the local directory entry.
-  cur_file_ofs = file_stat.m_local_header_ofs;
-  if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
-    return MZ_FALSE;
-  if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG)
-    return MZ_FALSE;
-
-  cur_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS);
-  if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size)
-    return MZ_FALSE;
-
-  if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method))
-  {
-    // The file is stored or the caller has requested the compressed data.
-    if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, (size_t)needed_size) != needed_size)
-      return MZ_FALSE;
-    return ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) != 0) || (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, (size_t)file_stat.m_uncomp_size) == file_stat.m_crc32);
-  }
-
-  // Decompress the file either directly from memory or from a file input buffer.
-  tinfl_init(&inflator);
-
-  if (pZip->m_pState->m_pMem)
-  {
-    // Read directly from the archive in memory.
-    pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs;
-    read_buf_size = read_buf_avail = file_stat.m_comp_size;
-    comp_remaining = 0;
-  }
-  else if (pUser_read_buf)
-  {
-    // Use a user provided read buffer.
-    if (!user_read_buf_size)
-      return MZ_FALSE;
-    pRead_buf = (mz_uint8 *)pUser_read_buf;
-    read_buf_size = user_read_buf_size;
-    read_buf_avail = 0;
-    comp_remaining = file_stat.m_comp_size;
-  }
-  else
-  {
-    // Temporarily allocate a read buffer.
-    read_buf_size = MZ_MIN(file_stat.m_comp_size, MZ_ZIP_MAX_IO_BUF_SIZE);
-#ifdef _MSC_VER
-    if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (read_buf_size > 0x7FFFFFFF))
-#else
-    if (((sizeof(size_t) == sizeof(mz_uint32))) && (read_buf_size > 0x7FFFFFFF))
-#endif
-      return MZ_FALSE;
-    if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)read_buf_size)))
-      return MZ_FALSE;
-    read_buf_avail = 0;
-    comp_remaining = file_stat.m_comp_size;
-  }
-
-  do
-  {
-    size_t in_buf_size, out_buf_size = (size_t)(file_stat.m_uncomp_size - out_buf_ofs);
-    if ((!read_buf_avail) && (!pZip->m_pState->m_pMem))
-    {
-      read_buf_avail = MZ_MIN(read_buf_size, comp_remaining);
-      if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail)
-      {
-        status = TINFL_STATUS_FAILED;
-        break;
-      }
-      cur_file_ofs += read_buf_avail;
-      comp_remaining -= read_buf_avail;
-      read_buf_ofs = 0;
-    }
-    in_buf_size = (size_t)read_buf_avail;
-    status = tinfl_decompress(&inflator, (mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, (mz_uint8 *)pBuf, (mz_uint8 *)pBuf + out_buf_ofs, &out_buf_size, TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF | (comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0));
-    read_buf_avail -= in_buf_size;
-    read_buf_ofs += in_buf_size;
-    out_buf_ofs += out_buf_size;
-  } while (status == TINFL_STATUS_NEEDS_MORE_INPUT);
-
-  if (status == TINFL_STATUS_DONE)
-  {
-    // Make sure the entire file was decompressed, and check its CRC.
-    if ((out_buf_ofs != file_stat.m_uncomp_size) || (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, (size_t)file_stat.m_uncomp_size) != file_stat.m_crc32))
-      status = TINFL_STATUS_FAILED;
-  }
-
-  if ((!pZip->m_pState->m_pMem) && (!pUser_read_buf))
-    pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
-
-  return status == TINFL_STATUS_DONE;
-}
-
-mz_bool mz_zip_reader_extract_file_to_mem_no_alloc(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size)
-{
-  int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags);
-  if (file_index < 0)
-    return MZ_FALSE;
-  return mz_zip_reader_extract_to_mem_no_alloc(pZip, file_index, pBuf, buf_size, flags, pUser_read_buf, user_read_buf_size);
-}
-
-mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags)
-{
-  return mz_zip_reader_extract_to_mem_no_alloc(pZip, file_index, pBuf, buf_size, flags, NULL, 0);
-}
-
-mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags)
-{
-  return mz_zip_reader_extract_file_to_mem_no_alloc(pZip, pFilename, pBuf, buf_size, flags, NULL, 0);
-}
-
-void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, size_t *pSize, mz_uint flags)
-{
-  mz_uint64 comp_size, uncomp_size, alloc_size;
-  const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
-  void *pBuf;
-
-  if (pSize)
-    *pSize = 0;
-  if (!p)
-    return NULL;
-
-  comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
-  uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
-
-  alloc_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? comp_size : uncomp_size;
-#ifdef _MSC_VER
-  if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF))
-#else
-  if (((sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF))
-#endif
-    return NULL;
-  if (NULL == (pBuf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)alloc_size)))
-    return NULL;
-
-  if (!mz_zip_reader_extract_to_mem(pZip, file_index, pBuf, (size_t)alloc_size, flags))
-  {
-    pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
-    return NULL;
-  }
-
-  if (pSize) *pSize = (size_t)alloc_size;
-  return pBuf;
-}
-
-void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, const char *pFilename, size_t *pSize, mz_uint flags)
-{
-  int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags);
-  if (file_index < 0)
-  {
-    if (pSize) *pSize = 0;
-    return MZ_FALSE;
-  }
-  return mz_zip_reader_extract_to_heap(pZip, file_index, pSize, flags);
-}
-
-mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, mz_uint file_index, mz_file_write_func pCallback, void *pOpaque, mz_uint flags)
-{
-  int status = TINFL_STATUS_DONE; mz_uint file_crc32 = MZ_CRC32_INIT;
-  mz_uint64 read_buf_size, read_buf_ofs = 0, read_buf_avail, comp_remaining, out_buf_ofs = 0, cur_file_ofs;
-  mz_zip_archive_file_stat file_stat;
-  void *pRead_buf = NULL; void *pWrite_buf = NULL;
-  mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32;
-
-  if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat))
-    return MZ_FALSE;
-
-  // Empty file, or a directory (but not always a directory - I've seen odd zips with directories that have compressed data which inflates to 0 bytes)
-  if (!file_stat.m_comp_size)
-    return MZ_TRUE;
-
-  // Entry is a subdirectory (I've seen old zips with dir entries which have compressed deflate data which inflates to 0 bytes, but these entries claim to uncompress to 512 bytes in the headers).
-  // I'm torn how to handle this case - should it fail instead?
-  if (mz_zip_reader_is_file_a_directory(pZip, file_index))
-    return MZ_TRUE;
-
-  // Encryption and patch files are not supported.
-  if (file_stat.m_bit_flag & (1 | 32))
-    return MZ_FALSE;
-
-  // This function only supports stored and deflate.
-  if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) && (file_stat.m_method != MZ_DEFLATED))
-    return MZ_FALSE;
-
-  // Read and parse the local directory entry.
-  cur_file_ofs = file_stat.m_local_header_ofs;
-  if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
-    return MZ_FALSE;
-  if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG)
-    return MZ_FALSE;
-
-  cur_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS);
-  if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size)
-    return MZ_FALSE;
-
-  // Decompress the file either directly from memory or from a file input buffer.
-  if (pZip->m_pState->m_pMem)
-  {
-    pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs;
-    read_buf_size = read_buf_avail = file_stat.m_comp_size;
-    comp_remaining = 0;
-  }
-  else
-  {
-    read_buf_size = MZ_MIN(file_stat.m_comp_size, MZ_ZIP_MAX_IO_BUF_SIZE);
-    if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)read_buf_size)))
-      return MZ_FALSE;
-    read_buf_avail = 0;
-    comp_remaining = file_stat.m_comp_size;
-  }
-
-  if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method))
-  {
-    // The file is stored or the caller has requested the compressed data.
-    if (pZip->m_pState->m_pMem)
-    {
-#ifdef _MSC_VER
-      if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (file_stat.m_comp_size > 0xFFFFFFFF))
-#else
-      if (((sizeof(size_t) == sizeof(mz_uint32))) && (file_stat.m_comp_size > 0xFFFFFFFF))
-#endif
-        return MZ_FALSE;
-      if (pCallback(pOpaque, out_buf_ofs, pRead_buf, (size_t)file_stat.m_comp_size) != file_stat.m_comp_size)
-        status = TINFL_STATUS_FAILED;
-      else if (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA))
-        file_crc32 = (mz_uint32)mz_crc32(file_crc32, (const mz_uint8 *)pRead_buf, (size_t)file_stat.m_comp_size);
-      cur_file_ofs += file_stat.m_comp_size;
-      out_buf_ofs += file_stat.m_comp_size;
-      comp_remaining = 0;
-    }
-    else
-    {
-      while (comp_remaining)
-      {
-        read_buf_avail = MZ_MIN(read_buf_size, comp_remaining);
-        if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail)
-        {
-          status = TINFL_STATUS_FAILED;
-          break;
-        }
-
-        if (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA))
-          file_crc32 = (mz_uint32)mz_crc32(file_crc32, (const mz_uint8 *)pRead_buf, (size_t)read_buf_avail);
-
-        if (pCallback(pOpaque, out_buf_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail)
-        {
-          status = TINFL_STATUS_FAILED;
-          break;
-        }
-        cur_file_ofs += read_buf_avail;
-        out_buf_ofs += read_buf_avail;
-        comp_remaining -= read_buf_avail;
-      }
-    }
-  }
-  else
-  {
-    tinfl_decompressor inflator;
-    tinfl_init(&inflator);
-
-    if (NULL == (pWrite_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, TINFL_LZ_DICT_SIZE)))
-      status = TINFL_STATUS_FAILED;
-    else
-    {
-      do
-      {
-        mz_uint8 *pWrite_buf_cur = (mz_uint8 *)pWrite_buf + (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1));
-        size_t in_buf_size, out_buf_size = TINFL_LZ_DICT_SIZE - (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1));
-        if ((!read_buf_avail) && (!pZip->m_pState->m_pMem))
-        {
-          read_buf_avail = MZ_MIN(read_buf_size, comp_remaining);
-          if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail)
-          {
-            status = TINFL_STATUS_FAILED;
-            break;
-          }
-          cur_file_ofs += read_buf_avail;
-          comp_remaining -= read_buf_avail;
-          read_buf_ofs = 0;
-        }
-
-        in_buf_size = (size_t)read_buf_avail;
-        status = tinfl_decompress(&inflator, (const mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, (mz_uint8 *)pWrite_buf, pWrite_buf_cur, &out_buf_size, comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0);
-        read_buf_avail -= in_buf_size;
-        read_buf_ofs += in_buf_size;
-
-        if (out_buf_size)
-        {
-          if (pCallback(pOpaque, out_buf_ofs, pWrite_buf_cur, out_buf_size) != out_buf_size)
-          {
-            status = TINFL_STATUS_FAILED;
-            break;
-          }
-          file_crc32 = (mz_uint32)mz_crc32(file_crc32, pWrite_buf_cur, out_buf_size);
-          if ((out_buf_ofs += out_buf_size) > file_stat.m_uncomp_size)
-          {
-            status = TINFL_STATUS_FAILED;
-            break;
-          }
-        }
-      } while ((status == TINFL_STATUS_NEEDS_MORE_INPUT) || (status == TINFL_STATUS_HAS_MORE_OUTPUT));
-    }
-  }
-
-  if ((status == TINFL_STATUS_DONE) && (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)))
-  {
-    // Make sure the entire file was decompressed, and check its CRC.
-    if ((out_buf_ofs != file_stat.m_uncomp_size) || (file_crc32 != file_stat.m_crc32))
-      status = TINFL_STATUS_FAILED;
-  }
-
-  if (!pZip->m_pState->m_pMem)
-    pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
-  if (pWrite_buf)
-    pZip->m_pFree(pZip->m_pAlloc_opaque, pWrite_buf);
-
-  return status == TINFL_STATUS_DONE;
-}
-
-mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, const char *pFilename, mz_file_write_func pCallback, void *pOpaque, mz_uint flags)
-{
-  int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags);
-  if (file_index < 0)
-    return MZ_FALSE;
-  return mz_zip_reader_extract_to_callback(pZip, file_index, pCallback, pOpaque, flags);
-}
-
-#ifndef MINIZ_NO_STDIO
-static size_t mz_zip_file_write_callback(void *pOpaque, mz_uint64 ofs, const void *pBuf, size_t n)
-{
-  (void)ofs; return MZ_FWRITE(pBuf, 1, n, (MZ_FILE*)pOpaque);
-}
-
-mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, const char *pDst_filename, mz_uint flags)
-{
-  mz_bool status;
-  mz_zip_archive_file_stat file_stat;
-  MZ_FILE *pFile;
-  if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat))
-    return MZ_FALSE;
-  pFile = MZ_FOPEN(pDst_filename, "wb");
-  if (!pFile)
-    return MZ_FALSE;
-  status = mz_zip_reader_extract_to_callback(pZip, file_index, mz_zip_file_write_callback, pFile, flags);
-  if (MZ_FCLOSE(pFile) == EOF)
-    return MZ_FALSE;
-#ifndef MINIZ_NO_TIME
-  if (status)
-    mz_zip_set_file_times(pDst_filename, file_stat.m_time, file_stat.m_time);
-#endif
-  return status;
-}
-#endif // #ifndef MINIZ_NO_STDIO
-
-mz_bool mz_zip_reader_end(mz_zip_archive *pZip)
-{
-  if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
-    return MZ_FALSE;
-
-  if (pZip->m_pState)
-  {
-    mz_zip_internal_state *pState = pZip->m_pState; pZip->m_pState = NULL;
-    mz_zip_array_clear(pZip, &pState->m_central_dir);
-    mz_zip_array_clear(pZip, &pState->m_central_dir_offsets);
-    mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets);
-
-#ifndef MINIZ_NO_STDIO
-    if (pState->m_pFile)
-    {
-      MZ_FCLOSE(pState->m_pFile);
-      pState->m_pFile = NULL;
-    }
-#endif // #ifndef MINIZ_NO_STDIO
-
-    pZip->m_pFree(pZip->m_pAlloc_opaque, pState);
-  }
-  pZip->m_zip_mode = MZ_ZIP_MODE_INVALID;
-
-  return MZ_TRUE;
-}
-
-#ifndef MINIZ_NO_STDIO
-mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, const char *pArchive_filename, const char *pDst_filename, mz_uint flags)
-{
-  int file_index = mz_zip_reader_locate_file(pZip, pArchive_filename, NULL, flags);
-  if (file_index < 0)
-    return MZ_FALSE;
-  return mz_zip_reader_extract_to_file(pZip, file_index, pDst_filename, flags);
-}
-#endif
-
-// ------------------- .ZIP archive writing
-
-#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
-
-static void mz_write_le16(mz_uint8 *p, mz_uint16 v) { p[0] = (mz_uint8)v; p[1] = (mz_uint8)(v >> 8); }
-static void mz_write_le32(mz_uint8 *p, mz_uint32 v) { p[0] = (mz_uint8)v; p[1] = (mz_uint8)(v >> 8); p[2] = (mz_uint8)(v >> 16); p[3] = (mz_uint8)(v >> 24); }
-#define MZ_WRITE_LE16(p, v) mz_write_le16((mz_uint8 *)(p), (mz_uint16)(v))
-#define MZ_WRITE_LE32(p, v) mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v))
-
-mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size)
-{
-  if ((!pZip) || (pZip->m_pState) || (!pZip->m_pWrite) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID))
-    return MZ_FALSE;
-
-  if (pZip->m_file_offset_alignment)
-  {
-    // Ensure user specified file offset alignment is a power of 2.
-    if (pZip->m_file_offset_alignment & (pZip->m_file_offset_alignment - 1))
-      return MZ_FALSE;
-  }
-
-  if (!pZip->m_pAlloc) pZip->m_pAlloc = def_alloc_func;
-  if (!pZip->m_pFree) pZip->m_pFree = def_free_func;
-  if (!pZip->m_pRealloc) pZip->m_pRealloc = def_realloc_func;
-
-  pZip->m_zip_mode = MZ_ZIP_MODE_WRITING;
-  pZip->m_archive_size = existing_size;
-  pZip->m_central_directory_file_ofs = 0;
-  pZip->m_total_files = 0;
-
-  if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state))))
-    return MZ_FALSE;
-  memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state));
-  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8));
-  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, sizeof(mz_uint32));
-  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, sizeof(mz_uint32));
-  return MZ_TRUE;
-}
-
-static size_t mz_zip_heap_write_func(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n)
-{
-  mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
-  mz_zip_internal_state *pState = pZip->m_pState;
-  mz_uint64 new_size = MZ_MAX(file_ofs + n, pState->m_mem_size);
-#ifdef _MSC_VER
-  if ((!n) || ((0, sizeof(size_t) == sizeof(mz_uint32)) && (new_size > 0x7FFFFFFF)))
-#else
-  if ((!n) || ((sizeof(size_t) == sizeof(mz_uint32)) && (new_size > 0x7FFFFFFF)))
-#endif
-    return 0;
-  if (new_size > pState->m_mem_capacity)
-  {
-    void *pNew_block;
-    size_t new_capacity = MZ_MAX(64, pState->m_mem_capacity); while (new_capacity < new_size) new_capacity *= 2;
-    if (NULL == (pNew_block = pZip->m_pRealloc(pZip->m_pAlloc_opaque, pState->m_pMem, 1, new_capacity)))
-      return 0;
-    pState->m_pMem = pNew_block; pState->m_mem_capacity = new_capacity;
-  }
-  memcpy((mz_uint8 *)pState->m_pMem + file_ofs, pBuf, n);
-  pState->m_mem_size = (size_t)new_size;
-  return n;
-}
-
-mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, size_t initial_allocation_size)
-{
-  pZip->m_pWrite = mz_zip_heap_write_func;
-  pZip->m_pIO_opaque = pZip;
-  if (!mz_zip_writer_init(pZip, size_to_reserve_at_beginning))
-    return MZ_FALSE;
-  if (0 != (initial_allocation_size = MZ_MAX(initial_allocation_size, size_to_reserve_at_beginning)))
-  {
-    if (NULL == (pZip->m_pState->m_pMem = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, initial_allocation_size)))
-    {
-      mz_zip_writer_end(pZip);
-      return MZ_FALSE;
-    }
-    pZip->m_pState->m_mem_capacity = initial_allocation_size;
-  }
-  return MZ_TRUE;
-}
-
-#ifndef MINIZ_NO_STDIO
-static size_t mz_zip_file_write_func(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n)
-{
-  mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
-  mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile);
-  if (((mz_int64)file_ofs < 0) || (((cur_ofs != (mz_int64)file_ofs)) && (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET))))
-    return 0;
-  return MZ_FWRITE(pBuf, 1, n, pZip->m_pState->m_pFile);
-}
-
-mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint64 size_to_reserve_at_beginning)
-{
-  MZ_FILE *pFile;
-  pZip->m_pWrite = mz_zip_file_write_func;
-  pZip->m_pIO_opaque = pZip;
-  if (!mz_zip_writer_init(pZip, size_to_reserve_at_beginning))
-    return MZ_FALSE;
-  if (NULL == (pFile = MZ_FOPEN(pFilename, "wb")))
-  {
-    mz_zip_writer_end(pZip);
-    return MZ_FALSE;
-  }
-  pZip->m_pState->m_pFile = pFile;
-  if (size_to_reserve_at_beginning)
-  {
-    mz_uint64 cur_ofs = 0; char buf[4096]; MZ_CLEAR_OBJ(buf);
-    do
-    {
-      size_t n = (size_t)MZ_MIN(sizeof(buf), size_to_reserve_at_beginning);
-      if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_ofs, buf, n) != n)
-      {
-        mz_zip_writer_end(pZip);
-        return MZ_FALSE;
-      }
-      cur_ofs += n; size_to_reserve_at_beginning -= n;
-    } while (size_to_reserve_at_beginning);
-  }
-  return MZ_TRUE;
-}
-#endif // #ifndef MINIZ_NO_STDIO
-
-mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, const char *pFilename)
-{
-  mz_zip_internal_state *pState;
-  if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
-    return MZ_FALSE;
-  // No sense in trying to write to an archive that's already at the support max size
-  if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) > 0xFFFFFFFF))
-    return MZ_FALSE;
-
-  pState = pZip->m_pState;
-
-  if (pState->m_pFile)
-  {
-#ifdef MINIZ_NO_STDIO
-    pFilename; return MZ_FALSE;
-#else
-    // Archive is being read from stdio - try to reopen as writable.
-    if (pZip->m_pIO_opaque != pZip)
-      return MZ_FALSE;
-    if (!pFilename)
-      return MZ_FALSE;
-    pZip->m_pWrite = mz_zip_file_write_func;
-    if (NULL == (pState->m_pFile = MZ_FREOPEN(pFilename, "r+b", pState->m_pFile)))
-    {
-      // The mz_zip_archive is now in a bogus state because pState->m_pFile is NULL, so just close it.
-      mz_zip_reader_end(pZip);
-      return MZ_FALSE;
-    }
-#endif // #ifdef MINIZ_NO_STDIO
-  }
-  else if (pState->m_pMem)
-  {
-    // Archive lives in a memory block. Assume it's from the heap that we can resize using the realloc callback.
-    if (pZip->m_pIO_opaque != pZip)
-      return MZ_FALSE;
-    pState->m_mem_capacity = pState->m_mem_size;
-    pZip->m_pWrite = mz_zip_heap_write_func;
-  }
-  // Archive is being read via a user provided read function - make sure the user has specified a write function too.
-  else if (!pZip->m_pWrite)
-    return MZ_FALSE;
-
-  // Start writing new files at the archive's current central directory location.
-  pZip->m_archive_size = pZip->m_central_directory_file_ofs;
-  pZip->m_zip_mode = MZ_ZIP_MODE_WRITING;
-  pZip->m_central_directory_file_ofs = 0;
-
-  return MZ_TRUE;
-}
-
-mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, mz_uint level_and_flags)
-{
-  return mz_zip_writer_add_mem_ex(pZip, pArchive_name, pBuf, buf_size, NULL, 0, level_and_flags, 0, 0);
-}
-
-typedef struct
-{
-  mz_zip_archive *m_pZip;
-  mz_uint64 m_cur_archive_file_ofs;
-  mz_uint64 m_comp_size;
-} mz_zip_writer_add_state;
-
-static mz_bool mz_zip_writer_add_put_buf_callback(const void* pBuf, int len, void *pUser)
-{
-  mz_zip_writer_add_state *pState = (mz_zip_writer_add_state *)pUser;
-  if ((int)pState->m_pZip->m_pWrite(pState->m_pZip->m_pIO_opaque, pState->m_cur_archive_file_ofs, pBuf, len) != len)
-    return MZ_FALSE;
-  pState->m_cur_archive_file_ofs += len;
-  pState->m_comp_size += len;
-  return MZ_TRUE;
-}
-
-static mz_bool mz_zip_writer_create_local_dir_header(mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, mz_uint16 extra_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date)
-{
-  (void)pZip;
-  memset(pDst, 0, MZ_ZIP_LOCAL_DIR_HEADER_SIZE);
-  MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_SIG_OFS, MZ_ZIP_LOCAL_DIR_HEADER_SIG);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_VERSION_NEEDED_OFS, method ? 20 : 0);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_BIT_FLAG_OFS, bit_flags);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_METHOD_OFS, method);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILE_TIME_OFS, dos_time);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILE_DATE_OFS, dos_date);
-  MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_CRC32_OFS, uncomp_crc32);
-  MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS, comp_size);
-  MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS, uncomp_size);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILENAME_LEN_OFS, filename_size);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_EXTRA_LEN_OFS, extra_size);
-  return MZ_TRUE;
-}
-
-static mz_bool mz_zip_writer_create_central_dir_header(mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, mz_uint16 extra_size, mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date, mz_uint64 local_header_ofs, mz_uint32 ext_attributes)
-{
-  (void)pZip;
-  memset(pDst, 0, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE);
-  MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_SIG_OFS, MZ_ZIP_CENTRAL_DIR_HEADER_SIG);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_VERSION_NEEDED_OFS, method ? 20 : 0);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_BIT_FLAG_OFS, bit_flags);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_METHOD_OFS, method);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILE_TIME_OFS, dos_time);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILE_DATE_OFS, dos_date);
-  MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_CRC32_OFS, uncomp_crc32);
-  MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS, comp_size);
-  MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS, uncomp_size);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILENAME_LEN_OFS, filename_size);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_EXTRA_LEN_OFS, extra_size);
-  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_COMMENT_LEN_OFS, comment_size);
-  MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS, ext_attributes);
-  MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_LOCAL_HEADER_OFS, local_header_ofs);
-  return MZ_TRUE;
-}
-
-static mz_bool mz_zip_writer_add_to_central_dir(mz_zip_archive *pZip, const char *pFilename, mz_uint16 filename_size, const void *pExtra, mz_uint16 extra_size, const void *pComment, mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date, mz_uint64 local_header_ofs, mz_uint32 ext_attributes)
-{
-  mz_zip_internal_state *pState = pZip->m_pState;
-  mz_uint32 central_dir_ofs = (mz_uint32)pState->m_central_dir.m_size;
-  size_t orig_central_dir_size = pState->m_central_dir.m_size;
-  mz_uint8 central_dir_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE];
-
-  // No zip64 support yet
-  if ((local_header_ofs > 0xFFFFFFFF) || (((mz_uint64)pState->m_central_dir.m_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size + extra_size + comment_size) > 0xFFFFFFFF))
-    return MZ_FALSE;
-
-  if (!mz_zip_writer_create_central_dir_header(pZip, central_dir_header, filename_size, extra_size, comment_size, uncomp_size, comp_size, uncomp_crc32, method, bit_flags, dos_time, dos_date, local_header_ofs, ext_attributes))
-    return MZ_FALSE;
-
-  if ((!mz_zip_array_push_back(pZip, &pState->m_central_dir, central_dir_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)) ||
-      (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pFilename, filename_size)) ||
-      (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pExtra, extra_size)) ||
-      (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pComment, comment_size)) ||
-      (!mz_zip_array_push_back(pZip, &pState->m_central_dir_offsets, &central_dir_ofs, 1)))
-  {
-    // Try to push the central directory array back into its original state.
-    mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, MZ_FALSE);
-    return MZ_FALSE;
-  }
-
-  return MZ_TRUE;
-}
-
-static mz_bool mz_zip_writer_validate_archive_name(const char *pArchive_name)
-{
-  // Basic ZIP archive filename validity checks: Valid filenames cannot start with a forward slash, cannot contain a drive letter, and cannot use DOS-style backward slashes.
-  if (*pArchive_name == '/')
-    return MZ_FALSE;
-  while (*pArchive_name)
-  {
-    if ((*pArchive_name == '\\') || (*pArchive_name == ':'))
-      return MZ_FALSE;
-    pArchive_name++;
-  }
-  return MZ_TRUE;
-}
-
-static mz_uint mz_zip_writer_compute_padding_needed_for_file_alignment(mz_zip_archive *pZip)
-{
-  mz_uint32 n;
-  if (!pZip->m_file_offset_alignment)
-    return 0;
-  n = (mz_uint32)(pZip->m_archive_size & (pZip->m_file_offset_alignment - 1));
-  return (pZip->m_file_offset_alignment - n) & (pZip->m_file_offset_alignment - 1);
-}
-
-static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip, mz_uint64 cur_file_ofs, mz_uint32 n)
-{
-  char buf[4096];
-  memset(buf, 0, MZ_MIN(sizeof(buf), n));
-  while (n)
-  {
-    mz_uint32 s = MZ_MIN(sizeof(buf), n);
-    if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_file_ofs, buf, s) != s)
-      return MZ_FALSE;
-    cur_file_ofs += s; n -= s;
-  }
-  return MZ_TRUE;
-}
-
-mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32)
-{
-  mz_uint16 method = 0, dos_time = 0, dos_date = 0;
-  mz_uint level, ext_attributes = 0, num_alignment_padding_bytes;
-  mz_uint64 local_dir_header_ofs = pZip->m_archive_size, cur_archive_file_ofs = pZip->m_archive_size, comp_size = 0;
-  size_t archive_name_size;
-  mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE];
-  tdefl_compressor *pComp = NULL;
-  mz_bool store_data_uncompressed;
-  mz_zip_internal_state *pState;
-
-  if ((int)level_and_flags < 0)
-    level_and_flags = MZ_DEFAULT_LEVEL;
-  level = level_and_flags & 0xF;
-  store_data_uncompressed = ((!level) || (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA));
-
-  if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || ((buf_size) && (!pBuf)) || (!pArchive_name) || ((comment_size) && (!pComment)) || (pZip->m_total_files == 0xFFFF) || (level > MZ_UBER_COMPRESSION))
-    return MZ_FALSE;
-
-  pState = pZip->m_pState;
-
-  if ((!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (uncomp_size))
-    return MZ_FALSE;
-  // No zip64 support yet
-  if ((buf_size > 0xFFFFFFFF) || (uncomp_size > 0xFFFFFFFF))
-    return MZ_FALSE;
-  if (!mz_zip_writer_validate_archive_name(pArchive_name))
-    return MZ_FALSE;
-
-#ifndef MINIZ_NO_TIME
-  {
-    time_t cur_time; time(&cur_time);
-    mz_zip_time_to_dos_time(cur_time, &dos_time, &dos_date);
-  }
-#endif // #ifndef MINIZ_NO_TIME
-
-  archive_name_size = strlen(pArchive_name);
-  if (archive_name_size > 0xFFFF)
-    return MZ_FALSE;
-
-  num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip);
-
-  // no zip64 support yet
-  if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + comment_size + archive_name_size) > 0xFFFFFFFF))
-    return MZ_FALSE;
-
-  if ((archive_name_size) && (pArchive_name[archive_name_size - 1] == '/'))
-  {
-    // Set DOS Subdirectory attribute bit.
-    ext_attributes |= 0x10;
-    // Subdirectories cannot contain data.
-    if ((buf_size) || (uncomp_size))
-      return MZ_FALSE;
-  }
-
-  // Try to do any allocations before writing to the archive, so if an allocation fails the file remains unmodified. (A good idea if we're doing an in-place modification.)
-  if ((!mz_zip_array_ensure_room(pZip, &pState->m_central_dir, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + comment_size)) || (!mz_zip_array_ensure_room(pZip, &pState->m_central_dir_offsets, 1)))
-    return MZ_FALSE;
-
-  if ((!store_data_uncompressed) && (buf_size))
-  {
-    if (NULL == (pComp = (tdefl_compressor *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor))))
-      return MZ_FALSE;
-  }
-
-  if (!mz_zip_writer_write_zeros(pZip, cur_archive_file_ofs, num_alignment_padding_bytes + sizeof(local_dir_header)))
-  {
-    pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
-    return MZ_FALSE;
-  }
-  local_dir_header_ofs += num_alignment_padding_bytes;
-  if (pZip->m_file_offset_alignment) { MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == 0); }
-  cur_archive_file_ofs += num_alignment_padding_bytes + sizeof(local_dir_header);
-
-  MZ_CLEAR_OBJ(local_dir_header);
-  if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, archive_name_size) != archive_name_size)
-  {
-    pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
-    return MZ_FALSE;
-  }
-  cur_archive_file_ofs += archive_name_size;
-
-  if (!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA))
-  {
-    uncomp_crc32 = (mz_uint32)mz_crc32(MZ_CRC32_INIT, (const mz_uint8*)pBuf, buf_size);
-    uncomp_size = buf_size;
-    if (uncomp_size <= 3)
-    {
-      level = 0;
-      store_data_uncompressed = MZ_TRUE;
-    }
-  }
-
-  if (store_data_uncompressed)
-  {
-    if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pBuf, buf_size) != buf_size)
-    {
-      pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
-      return MZ_FALSE;
-    }
-
-    cur_archive_file_ofs += buf_size;
-    comp_size = buf_size;
-
-    if (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)
-      method = MZ_DEFLATED;
-  }
-  else if (buf_size)
-  {
-    mz_zip_writer_add_state state;
-
-    state.m_pZip = pZip;
-    state.m_cur_archive_file_ofs = cur_archive_file_ofs;
-    state.m_comp_size = 0;
-
-    if ((tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, tdefl_create_comp_flags_from_zip_params(level, -15, MZ_DEFAULT_STRATEGY)) != TDEFL_STATUS_OKAY) ||
-        (tdefl_compress_buffer(pComp, pBuf, buf_size, TDEFL_FINISH) != TDEFL_STATUS_DONE))
-    {
-      pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
-      return MZ_FALSE;
-    }
-
-    comp_size = state.m_comp_size;
-    cur_archive_file_ofs = state.m_cur_archive_file_ofs;
-
-    method = MZ_DEFLATED;
-  }
-
-  pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
-  pComp = NULL;
-
-  // no zip64 support yet
-  if ((comp_size > 0xFFFFFFFF) || (cur_archive_file_ofs > 0xFFFFFFFF))
-    return MZ_FALSE;
-
-  if (!mz_zip_writer_create_local_dir_header(pZip, local_dir_header, (mz_uint16)archive_name_size, 0, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date))
-    return MZ_FALSE;
-
-  if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_ofs, local_dir_header, sizeof(local_dir_header)) != sizeof(local_dir_header))
-    return MZ_FALSE;
-
-  if (!mz_zip_writer_add_to_central_dir(pZip, pArchive_name, (mz_uint16)archive_name_size, NULL, 0, pComment, comment_size, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date, local_dir_header_ofs, ext_attributes))
-    return MZ_FALSE;
-
-  pZip->m_total_files++;
-  pZip->m_archive_size = cur_archive_file_ofs;
-
-  return MZ_TRUE;
-}
-
-#ifndef MINIZ_NO_STDIO
-mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags)
-{
-  mz_uint uncomp_crc32 = MZ_CRC32_INIT, level, num_alignment_padding_bytes;
-  mz_uint16 method = 0, dos_time = 0, dos_date = 0, ext_attributes = 0;
-  mz_uint64 local_dir_header_ofs = pZip->m_archive_size, cur_archive_file_ofs = pZip->m_archive_size, uncomp_size = 0, comp_size = 0;
-  size_t archive_name_size;
-  mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE];
-  MZ_FILE *pSrc_file = NULL;
-
-  if ((int)level_and_flags < 0)
-    level_and_flags = MZ_DEFAULT_LEVEL;
-  level = level_and_flags & 0xF;
-
-  if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || (!pArchive_name) || ((comment_size) && (!pComment)) || (level > MZ_UBER_COMPRESSION))
-    return MZ_FALSE;
-  if (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)
-    return MZ_FALSE;
-  if (!mz_zip_writer_validate_archive_name(pArchive_name))
-    return MZ_FALSE;
-
-  archive_name_size = strlen(pArchive_name);
-  if (archive_name_size > 0xFFFF)
-    return MZ_FALSE;
-
-  num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip);
-
-  // no zip64 support yet
-  if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + comment_size + archive_name_size) > 0xFFFFFFFF))
-    return MZ_FALSE;
-
-  if (!mz_zip_get_file_modified_time(pSrc_filename, &dos_time, &dos_date))
-    return MZ_FALSE;
-    
-  pSrc_file = MZ_FOPEN(pSrc_filename, "rb");
-  if (!pSrc_file)
-    return MZ_FALSE;
-  MZ_FSEEK64(pSrc_file, 0, SEEK_END);
-  uncomp_size = MZ_FTELL64(pSrc_file);
-  MZ_FSEEK64(pSrc_file, 0, SEEK_SET);
-
-  if (uncomp_size > 0xFFFFFFFF)
-  {
-    // No zip64 support yet
-    MZ_FCLOSE(pSrc_file);
-    return MZ_FALSE;
-  }
-  if (uncomp_size <= 3)
-    level = 0;
-
-  if (!mz_zip_writer_write_zeros(pZip, cur_archive_file_ofs, num_alignment_padding_bytes + sizeof(local_dir_header)))
-  {
-    MZ_FCLOSE(pSrc_file);
-    return MZ_FALSE;
-  }
-  local_dir_header_ofs += num_alignment_padding_bytes;
-  if (pZip->m_file_offset_alignment) { MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == 0); }
-  cur_archive_file_ofs += num_alignment_padding_bytes + sizeof(local_dir_header);
-
-  MZ_CLEAR_OBJ(local_dir_header);
-  if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, archive_name_size) != archive_name_size)
-  {
-    MZ_FCLOSE(pSrc_file);
-    return MZ_FALSE;
-  }
-  cur_archive_file_ofs += archive_name_size;
-
-  if (uncomp_size)
-  {
-    mz_uint64 uncomp_remaining = uncomp_size;
-    void *pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, MZ_ZIP_MAX_IO_BUF_SIZE);
-    if (!pRead_buf)
-    {
-      MZ_FCLOSE(pSrc_file);
-      return MZ_FALSE;
-    }
-
-    if (!level)
-    {
-      while (uncomp_remaining)
-      {
-        mz_uint n = (mz_uint)MZ_MIN(MZ_ZIP_MAX_IO_BUF_SIZE, uncomp_remaining);
-        if ((MZ_FREAD(pRead_buf, 1, n, pSrc_file) != n) || (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pRead_buf, n) != n))
-        {
-          pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
-          MZ_FCLOSE(pSrc_file);
-          return MZ_FALSE;
-        }
-        uncomp_crc32 = (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, n);
-        uncomp_remaining -= n;
-        cur_archive_file_ofs += n;
-      }
-      comp_size = uncomp_size;
-    }
-    else
-    {
-      mz_bool result = MZ_FALSE;
-      mz_zip_writer_add_state state;
-      tdefl_compressor *pComp = (tdefl_compressor *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor));
-      if (!pComp)
-      {
-        pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
-        MZ_FCLOSE(pSrc_file);
-        return MZ_FALSE;
-      }
-
-      state.m_pZip = pZip;
-      state.m_cur_archive_file_ofs = cur_archive_file_ofs;
-      state.m_comp_size = 0;
-
-      if (tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, tdefl_create_comp_flags_from_zip_params(level, -15, MZ_DEFAULT_STRATEGY)) != TDEFL_STATUS_OKAY)
-      {
-        pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
-        pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
-        MZ_FCLOSE(pSrc_file);
-        return MZ_FALSE;
-      }
-
-      for ( ; ; )
-      {
-        size_t in_buf_size = (mz_uint32)MZ_MIN(uncomp_remaining, MZ_ZIP_MAX_IO_BUF_SIZE);
-        tdefl_status status;
-
-        if (MZ_FREAD(pRead_buf, 1, in_buf_size, pSrc_file) != in_buf_size)
-          break;
-
-        uncomp_crc32 = (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, in_buf_size);
-        uncomp_remaining -= in_buf_size;
-
-        status = tdefl_compress_buffer(pComp, pRead_buf, in_buf_size, uncomp_remaining ? TDEFL_NO_FLUSH : TDEFL_FINISH);
-        if (status == TDEFL_STATUS_DONE)
-        {
-          result = MZ_TRUE;
-          break;
-        }
-        else if (status != TDEFL_STATUS_OKAY)
-          break;
-      }
-
-      pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
-
-      if (!result)
-      {
-        pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
-        MZ_FCLOSE(pSrc_file);
-        return MZ_FALSE;
-      }
-
-      comp_size = state.m_comp_size;
-      cur_archive_file_ofs = state.m_cur_archive_file_ofs;
-
-      method = MZ_DEFLATED;
-    }
-
-    pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
-  }
-
-  MZ_FCLOSE(pSrc_file); pSrc_file = NULL;
-
-  // no zip64 support yet
-  if ((comp_size > 0xFFFFFFFF) || (cur_archive_file_ofs > 0xFFFFFFFF))
-    return MZ_FALSE;
-
-  if (!mz_zip_writer_create_local_dir_header(pZip, local_dir_header, (mz_uint16)archive_name_size, 0, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date))
-    return MZ_FALSE;
-
-  if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_ofs, local_dir_header, sizeof(local_dir_header)) != sizeof(local_dir_header))
-    return MZ_FALSE;
-
-  if (!mz_zip_writer_add_to_central_dir(pZip, pArchive_name, (mz_uint16)archive_name_size, NULL, 0, pComment, comment_size, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date, local_dir_header_ofs, ext_attributes))
-    return MZ_FALSE;
-
-  pZip->m_total_files++;
-  pZip->m_archive_size = cur_archive_file_ofs;
-
-  return MZ_TRUE;
-}
-#endif // #ifndef MINIZ_NO_STDIO
-
-mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, mz_zip_archive *pSource_zip, mz_uint file_index)
-{
-  mz_uint n, bit_flags, num_alignment_padding_bytes;
-  mz_uint64 comp_bytes_remaining, local_dir_header_ofs;
-  mz_uint64 cur_src_file_ofs, cur_dst_file_ofs;
-  mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32;
-  mz_uint8 central_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE];
-  size_t orig_central_dir_size;
-  mz_zip_internal_state *pState;
-  void *pBuf; const mz_uint8 *pSrc_central_header;
-
-  if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING))
-    return MZ_FALSE;
-  if (NULL == (pSrc_central_header = mz_zip_reader_get_cdh(pSource_zip, file_index)))
-    return MZ_FALSE;
-  pState = pZip->m_pState;
-
-  num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip);
-
-  // no zip64 support yet
-  if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) > 0xFFFFFFFF))
-    return MZ_FALSE;
-
-  cur_src_file_ofs = MZ_READ_LE32(pSrc_central_header + MZ_ZIP_CDH_LOCAL_HEADER_OFS);
-  cur_dst_file_ofs = pZip->m_archive_size;
-
-  if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
-    return MZ_FALSE;
-  if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG)
-    return MZ_FALSE;
-  cur_src_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE;
-
-  if (!mz_zip_writer_write_zeros(pZip, cur_dst_file_ofs, num_alignment_padding_bytes))
-    return MZ_FALSE;
-  cur_dst_file_ofs += num_alignment_padding_bytes;
-  local_dir_header_ofs = cur_dst_file_ofs;
-  if (pZip->m_file_offset_alignment) { MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == 0); }
-
-  if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
-    return MZ_FALSE;
-  cur_dst_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE;
-
-  n = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS);
-  comp_bytes_remaining = n + MZ_READ_LE32(pSrc_central_header + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
-
-  if (NULL == (pBuf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)MZ_MAX(sizeof(mz_uint32) * 4, MZ_MIN(MZ_ZIP_MAX_IO_BUF_SIZE, comp_bytes_remaining)))))
-    return MZ_FALSE;
-
-  while (comp_bytes_remaining)
-  {
-    n = (mz_uint)MZ_MIN(MZ_ZIP_MAX_IO_BUF_SIZE, comp_bytes_remaining);
-    if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, n) != n)
-    {
-      pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
-      return MZ_FALSE;
-    }
-    cur_src_file_ofs += n;
-
-    if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pBuf, n) != n)
-    {
-      pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
-      return MZ_FALSE;
-    }
-    cur_dst_file_ofs += n;
-
-    comp_bytes_remaining -= n;
-  }
-
-  bit_flags = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_BIT_FLAG_OFS);
-  if (bit_flags & 8)
-  {
-    // Copy data descriptor
-    if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, sizeof(mz_uint32) * 4) != sizeof(mz_uint32) * 4)
-    {
-      pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
-      return MZ_FALSE;
-    }
-
-    n = sizeof(mz_uint32) * ((MZ_READ_LE32(pBuf) == 0x08074b50) ? 4 : 3);
-    if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pBuf, n) != n)
-    {
-      pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
-      return MZ_FALSE;
-    }
-
-    cur_src_file_ofs += n;
-    cur_dst_file_ofs += n;
-  }
-  pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
-
-  // no zip64 support yet
-  if (cur_dst_file_ofs > 0xFFFFFFFF)
-    return MZ_FALSE;
-
-  orig_central_dir_size = pState->m_central_dir.m_size;
-
-  memcpy(central_header, pSrc_central_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE);
-  MZ_WRITE_LE32(central_header + MZ_ZIP_CDH_LOCAL_HEADER_OFS, local_dir_header_ofs);
-  if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, central_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE))
-    return MZ_FALSE;
-
-  n = MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_EXTRA_LEN_OFS) + MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_COMMENT_LEN_OFS);
-  if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pSrc_central_header + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n))
-  {
-    mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, MZ_FALSE);
-    return MZ_FALSE;
-  }
-
-  if (pState->m_central_dir.m_size > 0xFFFFFFFF)
-    return MZ_FALSE;
-  n = (mz_uint32)orig_central_dir_size;
-  if (!mz_zip_array_push_back(pZip, &pState->m_central_dir_offsets, &n, 1))
-  {
-    mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, MZ_FALSE);
-    return MZ_FALSE;
-  }
-
-  pZip->m_total_files++;
-  pZip->m_archive_size = cur_dst_file_ofs;
-
-  return MZ_TRUE;
-}
-
-mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip)
-{
-  mz_zip_internal_state *pState;
-  mz_uint64 central_dir_ofs, central_dir_size;
-  mz_uint8 hdr[MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE];
-
-  if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING))
-    return MZ_FALSE;
-
-  pState = pZip->m_pState;
-
-  // no zip64 support yet
-  if ((pZip->m_total_files > 0xFFFF) || ((pZip->m_archive_size + pState->m_central_dir.m_size + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) > 0xFFFFFFFF))
-    return MZ_FALSE;
-
-  central_dir_ofs = 0;
-  central_dir_size = 0;
-  if (pZip->m_total_files)
-  {
-    // Write central directory
-    central_dir_ofs = pZip->m_archive_size;
-    central_dir_size = pState->m_central_dir.m_size;
-    pZip->m_central_directory_file_ofs = central_dir_ofs;
-    if (pZip->m_pWrite(pZip->m_pIO_opaque, central_dir_ofs, pState->m_central_dir.m_p, (size_t)central_dir_size) != central_dir_size)
-      return MZ_FALSE;
-    pZip->m_archive_size += central_dir_size;
-  }
-
-  // Write end of central directory record
-  MZ_CLEAR_OBJ(hdr);
-  MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_SIG_OFS, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG);
-  MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS, pZip->m_total_files);
-  MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS, pZip->m_total_files);
-  MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_SIZE_OFS, central_dir_size);
-  MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_OFS_OFS, central_dir_ofs);
-
-  if (pZip->m_pWrite(pZip->m_pIO_opaque, pZip->m_archive_size, hdr, sizeof(hdr)) != sizeof(hdr))
-    return MZ_FALSE;
-#ifndef MINIZ_NO_STDIO
-  if ((pState->m_pFile) && (MZ_FFLUSH(pState->m_pFile) == EOF))
-    return MZ_FALSE;
-#endif // #ifndef MINIZ_NO_STDIO
-
-  pZip->m_archive_size += sizeof(hdr);
-
-  pZip->m_zip_mode = MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED;
-  return MZ_TRUE;
-}
-
-mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void **pBuf, size_t *pSize)
-{
-  if ((!pZip) || (!pZip->m_pState) || (!pBuf) || (!pSize))
-    return MZ_FALSE;
-  if (pZip->m_pWrite != mz_zip_heap_write_func)
-    return MZ_FALSE;
-  if (!mz_zip_writer_finalize_archive(pZip))
-    return MZ_FALSE;
-
-  *pBuf = pZip->m_pState->m_pMem;
-  *pSize = pZip->m_pState->m_mem_size;
-  pZip->m_pState->m_pMem = NULL;
-  pZip->m_pState->m_mem_size = pZip->m_pState->m_mem_capacity = 0;
-  return MZ_TRUE;
-}
-
-mz_bool mz_zip_writer_end(mz_zip_archive *pZip)
-{
-  mz_zip_internal_state *pState;
-  mz_bool status = MZ_TRUE;
-  if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || ((pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) && (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED)))
-    return MZ_FALSE;
-
-  pState = pZip->m_pState;
-  pZip->m_pState = NULL;
-  mz_zip_array_clear(pZip, &pState->m_central_dir);
-  mz_zip_array_clear(pZip, &pState->m_central_dir_offsets);
-  mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets);
-
-#ifndef MINIZ_NO_STDIO
-  if (pState->m_pFile)
-  {
-    MZ_FCLOSE(pState->m_pFile);
-    pState->m_pFile = NULL;
-  }
-#endif // #ifndef MINIZ_NO_STDIO
-
-  if ((pZip->m_pWrite == mz_zip_heap_write_func) && (pState->m_pMem))
-  {
-    pZip->m_pFree(pZip->m_pAlloc_opaque, pState->m_pMem);
-    pState->m_pMem = NULL;
-  }
-
-  pZip->m_pFree(pZip->m_pAlloc_opaque, pState);
-  pZip->m_zip_mode = MZ_ZIP_MODE_INVALID;
-  return status;
-}
-
-#ifndef MINIZ_NO_STDIO
-mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags)
-{
-  mz_bool status, created_new_archive = MZ_FALSE;
-  mz_zip_archive zip_archive;
-  struct MZ_FILE_STAT_STRUCT file_stat;
-  MZ_CLEAR_OBJ(zip_archive);
-  if ((int)level_and_flags < 0)
-     level_and_flags = MZ_DEFAULT_LEVEL;
-  if ((!pZip_filename) || (!pArchive_name) || ((buf_size) && (!pBuf)) || ((comment_size) && (!pComment)) || ((level_and_flags & 0xF) > MZ_UBER_COMPRESSION))
-    return MZ_FALSE;
-  if (!mz_zip_writer_validate_archive_name(pArchive_name))
-    return MZ_FALSE;
-  if (MZ_FILE_STAT(pZip_filename, &file_stat) != 0)
-  {
-    // Create a new archive.
-    if (!mz_zip_writer_init_file(&zip_archive, pZip_filename, 0))
-      return MZ_FALSE;
-    created_new_archive = MZ_TRUE;
-  }
-  else
-  {
-    // Append to an existing archive.
-    if (!mz_zip_reader_init_file(&zip_archive, pZip_filename, level_and_flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY))
-      return MZ_FALSE;
-    if (!mz_zip_writer_init_from_reader(&zip_archive, pZip_filename))
-    {
-      mz_zip_reader_end(&zip_archive);
-      return MZ_FALSE;
-    }
-  }
-  status = mz_zip_writer_add_mem_ex(&zip_archive, pArchive_name, pBuf, buf_size, pComment, comment_size, level_and_flags, 0, 0);
-  // Always finalize, even if adding failed for some reason, so we have a valid central directory. (This may not always succeed, but we can try.)
-  if (!mz_zip_writer_finalize_archive(&zip_archive))
-    status = MZ_FALSE;
-  if (!mz_zip_writer_end(&zip_archive))
-    status = MZ_FALSE;
-  if ((!status) && (created_new_archive))
-  {
-    // It's a new archive and something went wrong, so just delete it.
-    int ignoredStatus = MZ_DELETE_FILE(pZip_filename);
-    (void)ignoredStatus;
-  }
-  return status;
-}
-
-void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name, size_t *pSize, mz_uint flags)
-{
-  int file_index;
-  mz_zip_archive zip_archive;
-  void *p = NULL;
-
-  if (pSize)
-    *pSize = 0;
-
-  if ((!pZip_filename) || (!pArchive_name))
-    return NULL;
-
-  MZ_CLEAR_OBJ(zip_archive);
-  if (!mz_zip_reader_init_file(&zip_archive, pZip_filename, flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY))
-    return NULL;
-
-  if ((file_index = mz_zip_reader_locate_file(&zip_archive, pArchive_name, NULL, flags)) >= 0)
-    p = mz_zip_reader_extract_to_heap(&zip_archive, file_index, pSize, flags);
-
-  mz_zip_reader_end(&zip_archive);
-  return p;
-}
-
-#endif // #ifndef MINIZ_NO_STDIO
-
-#endif // #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
-
-#endif // #ifndef MINIZ_NO_ARCHIVE_APIS
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // MINIZ_HEADER_FILE_ONLY
-
-/*
-  This is free and unencumbered software released into the public domain.
-
-  Anyone is free to copy, modify, publish, use, compile, sell, or
-  distribute this software, either in source code form or as a compiled
-  binary, for any purpose, commercial or non-commercial, and by any
-  means.
-
-  In jurisdictions that recognize copyright laws, the author or authors
-  of this software dedicate any and all copyright interest in the
-  software to the public domain. We make this dedication for the benefit
-  of the public at large and to the detriment of our heirs and
-  successors. We intend this dedication to be an overt act of
-  relinquishment in perpetuity of all present and future rights to this
-  software under copyright law.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-  OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-  OTHER DEALINGS IN THE SOFTWARE.
-
-  For more information, please refer to <http://unlicense.org/>
-*/
+/* miniz.c v1.16 beta r1 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing
+   See "unlicense" statement at the end of this file.
+   Rich Geldreich <richgel99@gmail.com>, last updated Oct. 13, 2013
+   Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt
+
+   Most API's defined in miniz.c are optional. For example, to disable the archive related functions just define
+   MINIZ_NO_ARCHIVE_APIS, or to get rid of all stdio usage define MINIZ_NO_STDIO (see the list below for more macros).
+
+   * Change History
+     10/19/13 v1.16 beta r1 - Two key inflator-only robustness and streaming related changes. Also merged in tdefl_compressor_alloc(), tdefl_compressor_free() helpers to make script bindings easier for rustyzip.
+       - The inflator coroutine func. is subtle and complex so I'm being cautious about this release. I would greatly appreciate any help with testing or any feedback.
+         I feel good about these changes, and they've been through several hours of automated testing, but they will probably not fix anything for the majority of prev. users so I'm
+         going to mark this release as beta for a few weeks and continue testing it at work/home on various things.
+       - The inflator in raw (non-zlib) mode is now usable on gzip or similiar data streams that have a bunch of bytes following the raw deflate data (problem discovered by rustyzip author williamw520).
+         This version should *never* read beyond the last byte of the raw deflate data independent of how many bytes you pass into the input buffer. This issue was caused by the various Huffman bitbuffer lookahead optimizations, and
+         would not be an issue if the caller knew and enforced the precise size of the raw compressed data *or* if the compressed data was in zlib format (i.e. always followed by the byte aligned zlib adler32).
+         So in other words, you can now call the inflator on deflate streams that are followed by arbitrary amounts of data and it's guaranteed that decompression will stop exactly on the last byte.
+       - The inflator now has a new failure status: TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS (-4). Previously, if the inflator was starved of bytes and could not make progress (because the input buffer was empty and the
+         caller did not set the TINFL_FLAG_HAS_MORE_INPUT flag - say on truncated or corrupted compressed data stream) it would append all 0's to the input and try to soldier on.
+         This is scary, because in the worst case, I believe it was possible for the prev. inflator to start outputting large amounts of literal data. If the caller didn't know when to stop accepting output
+         (because it didn't know how much uncompressed data was expected, or didn't enforce a sane maximum) it could continue forever. v1.16 cannot fall into this failure mode, instead it'll return
+         TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS immediately if it needs 1 or more bytes to make progress, the input buf is empty, and the caller has indicated that no more input is available. This is a "soft"
+         failure, so you can call the inflator again with more input and it will try to continue, or you can give up and fail. This could be very useful in network streaming scenarios.
+       - Added documentation to all the tinfl return status codes, fixed miniz_tester so it accepts double minus params for Linux, tweaked example1.c, added a simple "follower bytes" test to miniz_tester.cpp.
+     10/13/13 v1.15 r4 - Interim bugfix release while I work on the next major release with Zip64 support (almost there!):
+       - Critical fix for the MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY bug (thanks kahmyong.moon@hp.com) which could cause locate files to not find files. This bug
+        would only have occured in earlier versions if you explicitly used this flag, OR if you used mz_zip_extract_archive_file_to_heap() or mz_zip_add_mem_to_archive_file_in_place()
+        (which used this flag). If you can't switch to v1.15 but want to fix this bug, just remove the uses of this flag from both helper funcs (and of course don't use the flag).
+       - Bugfix in mz_zip_reader_extract_to_mem_no_alloc() from kymoon when pUser_read_buf is not NULL and compressed size is > uncompressed size
+       - Fixing mz_zip_reader_extract_*() funcs so they don't try to extract compressed data from directory entries, to account for weird zipfiles which contain zero-size compressed data on dir entries.
+         Hopefully this fix won't cause any issues on weird zip archives, because it assumes the low 16-bits of zip external attributes are DOS attributes (which I believe they always are in practice).
+       - Fixing mz_zip_reader_is_file_a_directory() so it doesn't check the internal attributes, just the filename and external attributes
+       - mz_zip_reader_init_file() - missing MZ_FCLOSE() call if the seek failed
+       - Added cmake support for Linux builds which builds all the examples, tested with clang v3.3 and gcc v4.6.
+       - Clang fix for tdefl_write_image_to_png_file_in_memory() from toffaletti
+       - Merged MZ_FORCEINLINE fix from hdeanclark
+       - Fix <time.h> include before config #ifdef, thanks emil.brink
+       - Added tdefl_write_image_to_png_file_in_memory_ex(): supports Y flipping (super useful for OpenGL apps), and explicit control over the compression level (so you can
+        set it to 1 for real-time compression).
+       - Merged in some compiler fixes from paulharris's github repro.
+       - Retested this build under Windows (VS 2010, including static analysis), tcc  0.9.26, gcc v4.6 and clang v3.3.
+       - Added example6.c, which dumps an image of the mandelbrot set to a PNG file.
+       - Modified example2 to help test the MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY flag more.
+       - In r3: Bugfix to mz_zip_writer_add_file() found during merge: Fix possible src file fclose() leak if alignment bytes+local header file write faiiled
+		 - In r4: Minor bugfix to mz_zip_writer_add_from_zip_reader(): Was pushing the wrong central dir header offset, appears harmless in this release, but it became a problem in the zip64 branch
+     5/20/12 v1.14 - MinGW32/64 GCC 4.6.1 compiler fixes: added MZ_FORCEINLINE, #include <time.h> (thanks fermtect).
+     5/19/12 v1.13 - From jason@cornsyrup.org and kelwert@mtu.edu - Fix mz_crc32() so it doesn't compute the wrong CRC-32's when mz_ulong is 64-bit.
+       - Temporarily/locally slammed in "typedef unsigned long mz_ulong" and re-ran a randomized regression test on ~500k files.
+       - Eliminated a bunch of warnings when compiling with GCC 32-bit/64.
+       - Ran all examples, miniz.c, and tinfl.c through MSVC 2008's /analyze (static analysis) option and fixed all warnings (except for the silly
+        "Use of the comma-operator in a tested expression.." analysis warning, which I purposely use to work around a MSVC compiler warning).
+       - Created 32-bit and 64-bit Codeblocks projects/workspace. Built and tested Linux executables. The codeblocks workspace is compatible with Linux+Win32/x64.
+       - Added miniz_tester solution/project, which is a useful little app derived from LZHAM's tester app that I use as part of the regression test.
+       - Ran miniz.c and tinfl.c through another series of regression testing on ~500,000 files and archives.
+       - Modified example5.c so it purposely disables a bunch of high-level functionality (MINIZ_NO_STDIO, etc.). (Thanks to corysama for the MINIZ_NO_STDIO bug report.)
+       - Fix ftell() usage in examples so they exit with an error on files which are too large (a limitation of the examples, not miniz itself).
+     4/12/12 v1.12 - More comments, added low-level example5.c, fixed a couple minor level_and_flags issues in the archive API's.
+      level_and_flags can now be set to MZ_DEFAULT_COMPRESSION. Thanks to Bruce Dawson <bruced@valvesoftware.com> for the feedback/bug report.
+     5/28/11 v1.11 - Added statement from unlicense.org
+     5/27/11 v1.10 - Substantial compressor optimizations:
+      - Level 1 is now ~4x faster than before. The L1 compressor's throughput now varies between 70-110MB/sec. on a
+      - Core i7 (actual throughput varies depending on the type of data, and x64 vs. x86).
+      - Improved baseline L2-L9 compression perf. Also, greatly improved compression perf. issues on some file types.
+      - Refactored the compression code for better readability and maintainability.
+      - Added level 10 compression level (L10 has slightly better ratio than level 9, but could have a potentially large
+       drop in throughput on some files).
+     5/15/11 v1.09 - Initial stable release.
+
+   * Low-level Deflate/Inflate implementation notes:
+
+     Compression: Use the "tdefl" API's. The compressor supports raw, static, and dynamic blocks, lazy or
+     greedy parsing, match length filtering, RLE-only, and Huffman-only streams. It performs and compresses
+     approximately as well as zlib.
+
+     Decompression: Use the "tinfl" API's. The entire decompressor is implemented as a single function
+     coroutine: see tinfl_decompress(). It supports decompression into a 32KB (or larger power of 2) wrapping buffer, or into a memory
+     block large enough to hold the entire file.
+
+     The low-level tdefl/tinfl API's do not make any use of dynamic memory allocation.
+
+   * zlib-style API notes:
+
+     miniz.c implements a fairly large subset of zlib. There's enough functionality present for it to be a drop-in
+     zlib replacement in many apps:
+        The z_stream struct, optional memory allocation callbacks
+        deflateInit/deflateInit2/deflate/deflateReset/deflateEnd/deflateBound
+        inflateInit/inflateInit2/inflate/inflateEnd
+        compress, compress2, compressBound, uncompress
+        CRC-32, Adler-32 - Using modern, minimal code size, CPU cache friendly routines.
+        Supports raw deflate streams or standard zlib streams with adler-32 checking.
+
+     Limitations:
+      The callback API's are not implemented yet. No support for gzip headers or zlib static dictionaries.
+      I've tried to closely emulate zlib's various flavors of stream flushing and return status codes, but
+      there are no guarantees that miniz.c pulls this off perfectly.
+
+   * PNG writing: See the tdefl_write_image_to_png_file_in_memory() function, originally written by
+     Alex Evans. Supports 1-4 bytes/pixel images.
+
+   * ZIP archive API notes:
+
+     The ZIP archive API's where designed with simplicity and efficiency in mind, with just enough abstraction to
+     get the job done with minimal fuss. There are simple API's to retrieve file information, read files from
+     existing archives, create new archives, append new files to existing archives, or clone archive data from
+     one archive to another. It supports archives located in memory or the heap, on disk (using stdio.h),
+     or you can specify custom file read/write callbacks.
+
+     - Archive reading: Just call this function to read a single file from a disk archive:
+
+      void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name,
+        size_t *pSize, mz_uint zip_flags);
+
+     For more complex cases, use the "mz_zip_reader" functions. Upon opening an archive, the entire central
+     directory is located and read as-is into memory, and subsequent file access only occurs when reading individual files.
+
+     - Archives file scanning: The simple way is to use this function to scan a loaded archive for a specific file:
+
+     int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags);
+
+     The locate operation can optionally check file comments too, which (as one example) can be used to identify
+     multiple versions of the same file in an archive. This function uses a simple linear search through the central
+     directory, so it's not very fast.
+
+     Alternately, you can iterate through all the files in an archive (using mz_zip_reader_get_num_files()) and
+     retrieve detailed info on each file by calling mz_zip_reader_file_stat().
+
+     - Archive creation: Use the "mz_zip_writer" functions. The ZIP writer immediately writes compressed file data
+     to disk and builds an exact image of the central directory in memory. The central directory image is written
+     all at once at the end of the archive file when the archive is finalized.
+
+     The archive writer can optionally align each file's local header and file data to any power of 2 alignment,
+     which can be useful when the archive will be read from optical media. Also, the writer supports placing
+     arbitrary data blobs at the very beginning of ZIP archives. Archives written using either feature are still
+     readable by any ZIP tool.
+
+     - Archive appending: The simple way to add a single file to an archive is to call this function:
+
+      mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, const char *pArchive_name,
+        const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags);
+
+     The archive will be created if it doesn't already exist, otherwise it'll be appended to.
+     Note the appending is done in-place and is not an atomic operation, so if something goes wrong
+     during the operation it's possible the archive could be left without a central directory (although the local
+     file headers and file data will be fine, so the archive will be recoverable).
+
+     For more complex archive modification scenarios:
+     1. The safest way is to use a mz_zip_reader to read the existing archive, cloning only those bits you want to
+     preserve into a new archive using using the mz_zip_writer_add_from_zip_reader() function (which compiles the
+     compressed file data as-is). When you're done, delete the old archive and rename the newly written archive, and
+     you're done. This is safe but requires a bunch of temporary disk space or heap memory.
+
+     2. Or, you can convert an mz_zip_reader in-place to an mz_zip_writer using mz_zip_writer_init_from_reader(),
+     append new files as needed, then finalize the archive which will write an updated central directory to the
+     original archive. (This is basically what mz_zip_add_mem_to_archive_file_in_place() does.) There's a
+     possibility that the archive's central directory could be lost with this method if anything goes wrong, though.
+
+     - ZIP archive support limitations:
+     No zip64 or spanning support. Extraction functions can only handle unencrypted, stored or deflated files.
+     Requires streams capable of seeking.
+
+   * This is a header file library, like stb_image.c. To get only a header file, either cut and paste the
+     below header, or create miniz.h, #define MINIZ_HEADER_FILE_ONLY, and then include miniz.c from it.
+
+   * Important: For best perf. be sure to customize the below macros for your target platform:
+     #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1
+     #define MINIZ_LITTLE_ENDIAN 1
+     #define MINIZ_HAS_64BIT_REGISTERS 1
+
+   * On platforms using glibc, Be sure to "#define _LARGEFILE64_SOURCE 1" before including miniz.c to ensure miniz
+     uses the 64-bit variants: fopen64(), stat64(), etc. Otherwise you won't be able to process large files
+     (i.e. 32-bit stat() fails for me on files > 0x7FFFFFFF bytes).
+*/
+
+#ifndef MINIZ_HEADER_INCLUDED
+#define MINIZ_HEADER_INCLUDED
+
+#include <stdlib.h>
+
+// Defines to completely disable specific portions of miniz.c:
+// If all macros here are defined the only functionality remaining will be CRC-32, adler-32, tinfl, and tdefl.
+
+// Define MINIZ_NO_STDIO to disable all usage and any functions which rely on stdio for file I/O.
+//#define MINIZ_NO_STDIO
+
+// If MINIZ_NO_TIME is specified then the ZIP archive functions will not be able to get the current time, or
+// get/set file times, and the C run-time funcs that get/set times won't be called.
+// The current downside is the times written to your archives will be from 1979.
+//#define MINIZ_NO_TIME
+
+// Define MINIZ_NO_ARCHIVE_APIS to disable all ZIP archive API's.
+//#define MINIZ_NO_ARCHIVE_APIS
+
+// Define MINIZ_NO_ARCHIVE_APIS to disable all writing related ZIP archive API's.
+//#define MINIZ_NO_ARCHIVE_WRITING_APIS
+
+// Define MINIZ_NO_ZLIB_APIS to remove all ZLIB-style compression/decompression API's.
+//#define MINIZ_NO_ZLIB_APIS
+
+// Define MINIZ_NO_ZLIB_COMPATIBLE_NAME to disable zlib names, to prevent conflicts against stock zlib.
+//#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES
+
+// Define MINIZ_NO_MALLOC to disable all calls to malloc, free, and realloc.
+// Note if MINIZ_NO_MALLOC is defined then the user must always provide custom user alloc/free/realloc
+// callbacks to the zlib and archive API's, and a few stand-alone helper API's which don't provide custom user
+// functions (such as tdefl_compress_mem_to_heap() and tinfl_decompress_mem_to_heap()) won't work.
+//#define MINIZ_NO_MALLOC
+
+#if defined(__TINYC__) && (defined(__linux) || defined(__linux__))
+  // TODO: Work around "error: include file 'sys\utime.h' when compiling with tcc on Linux
+  #define MINIZ_NO_TIME
+#endif
+
+#if !defined(MINIZ_NO_TIME) && !defined(MINIZ_NO_ARCHIVE_APIS)
+  #include <time.h>
+#endif
+
+#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__i386) || defined(__i486__) || defined(__i486) || defined(i386) || defined(__ia64__) || defined(__x86_64__)
+// MINIZ_X86_OR_X64_CPU is only used to help set the below macros.
+#define MINIZ_X86_OR_X64_CPU 1
+#endif
+
+#if (__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__) || MINIZ_X86_OR_X64_CPU
+// Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian.
+#define MINIZ_LITTLE_ENDIAN 1
+#endif
+
+#if MINIZ_X86_OR_X64_CPU
+// Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient integer loads and stores from unaligned addresses.
+#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1
+#endif
+
+#if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || defined(_LP64) || defined(__LP64__) || defined(__ia64__) || defined(__x86_64__)
+// Set MINIZ_HAS_64BIT_REGISTERS to 1 if operations on 64-bit integers are reasonably fast (and don't involve compiler generated calls to helper functions).
+#define MINIZ_HAS_64BIT_REGISTERS 1
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// ------------------- zlib-style API Definitions.
+
+// For more compatibility with zlib, miniz.c uses unsigned long for some parameters/struct members. Beware: mz_ulong can be either 32 or 64-bits!
+typedef unsigned long mz_ulong;
+
+// mz_free() internally uses the MZ_FREE() macro (which by default calls free() unless you've modified the MZ_MALLOC macro) to release a block allocated from the heap.
+void mz_free(void *p);
+
+#define MZ_ADLER32_INIT (1)
+// mz_adler32() returns the initial adler-32 value to use when called with ptr==NULL.
+mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len);
+
+#define MZ_CRC32_INIT (0)
+// mz_crc32() returns the initial CRC-32 value to use when called with ptr==NULL.
+mz_ulong mz_crc32(mz_ulong crc, const unsigned char *ptr, size_t buf_len);
+
+// Compression strategies.
+enum { MZ_DEFAULT_STRATEGY = 0, MZ_FILTERED = 1, MZ_HUFFMAN_ONLY = 2, MZ_RLE = 3, MZ_FIXED = 4 };
+
+// Method
+#define MZ_DEFLATED 8
+
+#ifndef MINIZ_NO_ZLIB_APIS
+
+// Heap allocation callbacks.
+// Note that mz_alloc_func parameter types purpsosely differ from zlib's: items/size is size_t, not unsigned long.
+typedef void *(*mz_alloc_func)(void *opaque, size_t items, size_t size);
+typedef void (*mz_free_func)(void *opaque, void *address);
+typedef void *(*mz_realloc_func)(void *opaque, void *address, size_t items, size_t size);
+
+// TODO: I can't encode "1.16" here, argh
+#define MZ_VERSION          "9.1.15"
+#define MZ_VERNUM           0x91F0
+#define MZ_VER_MAJOR        9
+#define MZ_VER_MINOR        1
+#define MZ_VER_REVISION     15
+#define MZ_VER_SUBREVISION  0
+
+// Flush values. For typical usage you only need MZ_NO_FLUSH and MZ_FINISH. The other values are for advanced use (refer to the zlib docs).
+enum { MZ_NO_FLUSH = 0, MZ_PARTIAL_FLUSH = 1, MZ_SYNC_FLUSH = 2, MZ_FULL_FLUSH = 3, MZ_FINISH = 4, MZ_BLOCK = 5 };
+
+// Return status codes. MZ_PARAM_ERROR is non-standard.
+enum { MZ_OK = 0, MZ_STREAM_END = 1, MZ_NEED_DICT = 2, MZ_ERRNO = -1, MZ_STREAM_ERROR = -2, MZ_DATA_ERROR = -3, MZ_MEM_ERROR = -4, MZ_BUF_ERROR = -5, MZ_VERSION_ERROR = -6, MZ_PARAM_ERROR = -10000 };
+
+// Compression levels: 0-9 are the standard zlib-style levels, 10 is best possible compression (not zlib compatible, and may be very slow), MZ_DEFAULT_COMPRESSION=MZ_DEFAULT_LEVEL.
+enum { MZ_NO_COMPRESSION = 0, MZ_BEST_SPEED = 1, MZ_BEST_COMPRESSION = 9, MZ_UBER_COMPRESSION = 10, MZ_DEFAULT_LEVEL = 6, MZ_DEFAULT_COMPRESSION = -1 };
+
+// Window bits
+#define MZ_DEFAULT_WINDOW_BITS 15
+
+struct mz_internal_state;
+
+// Compression/decompression stream struct.
+typedef struct mz_stream_s
+{
+  const unsigned char *next_in;     // pointer to next byte to read
+  unsigned int avail_in;            // number of bytes available at next_in
+  mz_ulong total_in;                // total number of bytes consumed so far
+
+  unsigned char *next_out;          // pointer to next byte to write
+  unsigned int avail_out;           // number of bytes that can be written to next_out
+  mz_ulong total_out;               // total number of bytes produced so far
+
+  char *msg;                        // error msg (unused)
+  struct mz_internal_state *state;  // internal state, allocated by zalloc/zfree
+
+  mz_alloc_func zalloc;             // optional heap allocation function (defaults to malloc)
+  mz_free_func zfree;               // optional heap free function (defaults to free)
+  void *opaque;                     // heap alloc function user pointer
+
+  int data_type;                    // data_type (unused)
+  mz_ulong adler;                   // adler32 of the source or uncompressed data
+  mz_ulong reserved;                // not used
+} mz_stream;
+
+typedef mz_stream *mz_streamp;
+
+// Returns the version string of miniz.c.
+const char *mz_version(void);
+
+// mz_deflateInit() initializes a compressor with default options:
+// Parameters:
+//  pStream must point to an initialized mz_stream struct.
+//  level must be between [MZ_NO_COMPRESSION, MZ_BEST_COMPRESSION].
+//  level 1 enables a specially optimized compression function that's been optimized purely for performance, not ratio.
+//  (This special func. is currently only enabled when MINIZ_USE_UNALIGNED_LOADS_AND_STORES and MINIZ_LITTLE_ENDIAN are defined.)
+// Return values:
+//  MZ_OK on success.
+//  MZ_STREAM_ERROR if the stream is bogus.
+//  MZ_PARAM_ERROR if the input parameters are bogus.
+//  MZ_MEM_ERROR on out of memory.
+int mz_deflateInit(mz_streamp pStream, int level);
+
+// mz_deflateInit2() is like mz_deflate(), except with more control:
+// Additional parameters:
+//   method must be MZ_DEFLATED
+//   window_bits must be MZ_DEFAULT_WINDOW_BITS (to wrap the deflate stream with zlib header/adler-32 footer) or -MZ_DEFAULT_WINDOW_BITS (raw deflate/no header or footer)
+//   mem_level must be between [1, 9] (it's checked but ignored by miniz.c)
+int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy);
+
+// Quickly resets a compressor without having to reallocate anything. Same as calling mz_deflateEnd() followed by mz_deflateInit()/mz_deflateInit2().
+int mz_deflateReset(mz_streamp pStream);
+
+// mz_deflate() compresses the input to output, consuming as much of the input and producing as much output as possible.
+// Parameters:
+//   pStream is the stream to read from and write to. You must initialize/update the next_in, avail_in, next_out, and avail_out members.
+//   flush may be MZ_NO_FLUSH, MZ_PARTIAL_FLUSH/MZ_SYNC_FLUSH, MZ_FULL_FLUSH, or MZ_FINISH.
+// Return values:
+//   MZ_OK on success (when flushing, or if more input is needed but not available, and/or there's more output to be written but the output buffer is full).
+//   MZ_STREAM_END if all input has been consumed and all output bytes have been written. Don't call mz_deflate() on the stream anymore.
+//   MZ_STREAM_ERROR if the stream is bogus.
+//   MZ_PARAM_ERROR if one of the parameters is invalid.
+//   MZ_BUF_ERROR if no forward progress is possible because the input and/or output buffers are empty. (Fill up the input buffer or free up some output space and try again.)
+int mz_deflate(mz_streamp pStream, int flush);
+
+// mz_deflateEnd() deinitializes a compressor:
+// Return values:
+//  MZ_OK on success.
+//  MZ_STREAM_ERROR if the stream is bogus.
+int mz_deflateEnd(mz_streamp pStream);
+
+// mz_deflateBound() returns a (very) conservative upper bound on the amount of data that could be generated by deflate(), assuming flush is set to only MZ_NO_FLUSH or MZ_FINISH.
+mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len);
+
+// Single-call compression functions mz_compress() and mz_compress2():
+// Returns MZ_OK on success, or one of the error codes from mz_deflate() on failure.
+int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len);
+int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level);
+
+// mz_compressBound() returns a (very) conservative upper bound on the amount of data that could be generated by calling mz_compress().
+mz_ulong mz_compressBound(mz_ulong source_len);
+
+// Initializes a decompressor.
+int mz_inflateInit(mz_streamp pStream);
+
+// mz_inflateInit2() is like mz_inflateInit() with an additional option that controls the window size and whether or not the stream has been wrapped with a zlib header/footer:
+// window_bits must be MZ_DEFAULT_WINDOW_BITS (to parse zlib header/footer) or -MZ_DEFAULT_WINDOW_BITS (raw deflate).
+int mz_inflateInit2(mz_streamp pStream, int window_bits);
+
+// Decompresses the input stream to the output, consuming only as much of the input as needed, and writing as much to the output as possible.
+// Parameters:
+//   pStream is the stream to read from and write to. You must initialize/update the next_in, avail_in, next_out, and avail_out members.
+//   flush may be MZ_NO_FLUSH, MZ_SYNC_FLUSH, or MZ_FINISH.
+//   On the first call, if flush is MZ_FINISH it's assumed the input and output buffers are both sized large enough to decompress the entire stream in a single call (this is slightly faster).
+//   MZ_FINISH implies that there are no more source bytes available beside what's already in the input buffer, and that the output buffer is large enough to hold the rest of the decompressed data.
+// Return values:
+//   MZ_OK on success. Either more input is needed but not available, and/or there's more output to be written but the output buffer is full.
+//   MZ_STREAM_END if all needed input has been consumed and all output bytes have been written. For zlib streams, the adler-32 of the decompressed data has also been verified.
+//   MZ_STREAM_ERROR if the stream is bogus.
+//   MZ_DATA_ERROR if the deflate stream is invalid.
+//   MZ_PARAM_ERROR if one of the parameters is invalid.
+//   MZ_BUF_ERROR if no forward progress is possible because the input buffer is empty but the inflater needs more input to continue, or if the output buffer is not large enough. Call mz_inflate() again
+//   with more input data, or with more room in the output buffer (except when using single call decompression, described above).
+int mz_inflate(mz_streamp pStream, int flush);
+
+// Deinitializes a decompressor.
+int mz_inflateEnd(mz_streamp pStream);
+
+// Single-call decompression.
+// Returns MZ_OK on success, or one of the error codes from mz_inflate() on failure.
+int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len);
+
+// Returns a string description of the specified error code, or NULL if the error code is invalid.
+const char *mz_error(int err);
+
+// Redefine zlib-compatible names to miniz equivalents, so miniz.c can be used as a drop-in replacement for the subset of zlib that miniz.c supports.
+// Define MINIZ_NO_ZLIB_COMPATIBLE_NAMES to disable zlib-compatibility if you use zlib in the same project.
+#ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES
+  typedef unsigned char Byte;
+  typedef unsigned int uInt;
+  typedef mz_ulong uLong;
+  typedef Byte Bytef;
+  typedef uInt uIntf;
+  typedef char charf;
+  typedef int intf;
+  typedef void *voidpf;
+  typedef uLong uLongf;
+  typedef void *voidp;
+  typedef void *const voidpc;
+  #define Z_NULL                0
+  #define Z_NO_FLUSH            MZ_NO_FLUSH
+  #define Z_PARTIAL_FLUSH       MZ_PARTIAL_FLUSH
+  #define Z_SYNC_FLUSH          MZ_SYNC_FLUSH
+  #define Z_FULL_FLUSH          MZ_FULL_FLUSH
+  #define Z_FINISH              MZ_FINISH
+  #define Z_BLOCK               MZ_BLOCK
+  #define Z_OK                  MZ_OK
+  #define Z_STREAM_END          MZ_STREAM_END
+  #define Z_NEED_DICT           MZ_NEED_DICT
+  #define Z_ERRNO               MZ_ERRNO
+  #define Z_STREAM_ERROR        MZ_STREAM_ERROR
+  #define Z_DATA_ERROR          MZ_DATA_ERROR
+  #define Z_MEM_ERROR           MZ_MEM_ERROR
+  #define Z_BUF_ERROR           MZ_BUF_ERROR
+  #define Z_VERSION_ERROR       MZ_VERSION_ERROR
+  #define Z_PARAM_ERROR         MZ_PARAM_ERROR
+  #define Z_NO_COMPRESSION      MZ_NO_COMPRESSION
+  #define Z_BEST_SPEED          MZ_BEST_SPEED
+  #define Z_BEST_COMPRESSION    MZ_BEST_COMPRESSION
+  #define Z_DEFAULT_COMPRESSION MZ_DEFAULT_COMPRESSION
+  #define Z_DEFAULT_STRATEGY    MZ_DEFAULT_STRATEGY
+  #define Z_FILTERED            MZ_FILTERED
+  #define Z_HUFFMAN_ONLY        MZ_HUFFMAN_ONLY
+  #define Z_RLE                 MZ_RLE
+  #define Z_FIXED               MZ_FIXED
+  #define Z_DEFLATED            MZ_DEFLATED
+  #define Z_DEFAULT_WINDOW_BITS MZ_DEFAULT_WINDOW_BITS
+  #define alloc_func            mz_alloc_func
+  #define free_func             mz_free_func
+  #define internal_state        mz_internal_state
+  #define z_stream              mz_stream
+  #define deflateInit           mz_deflateInit
+  #define deflateInit2          mz_deflateInit2
+  #define deflateReset          mz_deflateReset
+  #define deflate               mz_deflate
+  #define deflateEnd            mz_deflateEnd
+  #define deflateBound          mz_deflateBound
+  #define compress              mz_compress
+  #define compress2             mz_compress2
+  #define compressBound         mz_compressBound
+  #define inflateInit           mz_inflateInit
+  #define inflateInit2          mz_inflateInit2
+  #define inflate               mz_inflate
+  #define inflateEnd            mz_inflateEnd
+  #define uncompress            mz_uncompress
+  #define crc32                 mz_crc32
+  #define adler32               mz_adler32
+  #define MAX_WBITS             15
+  #define MAX_MEM_LEVEL         9
+  #define zError                mz_error
+  #define ZLIB_VERSION          MZ_VERSION
+  #define ZLIB_VERNUM           MZ_VERNUM
+  #define ZLIB_VER_MAJOR        MZ_VER_MAJOR
+  #define ZLIB_VER_MINOR        MZ_VER_MINOR
+  #define ZLIB_VER_REVISION     MZ_VER_REVISION
+  #define ZLIB_VER_SUBREVISION  MZ_VER_SUBREVISION
+  #define zlibVersion           mz_version
+  #define zlib_version          mz_version()
+#endif // #ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES
+
+#endif // MINIZ_NO_ZLIB_APIS
+
+// ------------------- Types and macros
+
+typedef unsigned char mz_uint8;
+typedef signed short mz_int16;
+typedef unsigned short mz_uint16;
+typedef unsigned int mz_uint32;
+typedef unsigned int mz_uint;
+typedef long long mz_int64;
+typedef unsigned long long mz_uint64;
+typedef int mz_bool;
+
+#define MZ_FALSE (0)
+#define MZ_TRUE (1)
+
+// An attempt to work around MSVC's spammy "warning C4127: conditional expression is constant" message.
+#ifdef _MSC_VER
+   #define MZ_MACRO_END while (0, 0)
+#else
+   #define MZ_MACRO_END while (0)
+#endif
+
+// ------------------- ZIP archive reading/writing
+
+#ifndef MINIZ_NO_ARCHIVE_APIS
+
+enum
+{
+  MZ_ZIP_MAX_IO_BUF_SIZE = 64*1024,
+  MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE = 260,
+  MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE = 256
+};
+
+typedef struct
+{
+  mz_uint32 m_file_index;
+  mz_uint32 m_central_dir_ofs;
+  mz_uint16 m_version_made_by;
+  mz_uint16 m_version_needed;
+  mz_uint16 m_bit_flag;
+  mz_uint16 m_method;
+#ifndef MINIZ_NO_TIME
+  time_t m_time;
+#endif
+  mz_uint32 m_crc32;
+  mz_uint64 m_comp_size;
+  mz_uint64 m_uncomp_size;
+  mz_uint16 m_internal_attr;
+  mz_uint32 m_external_attr;
+  mz_uint64 m_local_header_ofs;
+  mz_uint32 m_comment_size;
+  char m_filename[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE];
+  char m_comment[MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE];
+} mz_zip_archive_file_stat;
+
+typedef size_t (*mz_file_read_func)(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n);
+typedef size_t (*mz_file_write_func)(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n);
+
+struct mz_zip_internal_state_tag;
+typedef struct mz_zip_internal_state_tag mz_zip_internal_state;
+
+typedef enum
+{
+  MZ_ZIP_MODE_INVALID = 0,
+  MZ_ZIP_MODE_READING = 1,
+  MZ_ZIP_MODE_WRITING = 2,
+  MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED = 3
+} mz_zip_mode;
+
+typedef struct mz_zip_archive_tag
+{
+  mz_uint64 m_archive_size;
+  mz_uint64 m_central_directory_file_ofs;
+  mz_uint m_total_files;
+  mz_zip_mode m_zip_mode;
+
+  mz_uint m_file_offset_alignment;
+
+  mz_alloc_func m_pAlloc;
+  mz_free_func m_pFree;
+  mz_realloc_func m_pRealloc;
+  void *m_pAlloc_opaque;
+
+  mz_file_read_func m_pRead;
+  mz_file_write_func m_pWrite;
+  void *m_pIO_opaque;
+
+  mz_zip_internal_state *m_pState;
+
+} mz_zip_archive;
+
+typedef enum
+{
+  MZ_ZIP_FLAG_CASE_SENSITIVE                = 0x0100,
+  MZ_ZIP_FLAG_IGNORE_PATH                   = 0x0200,
+  MZ_ZIP_FLAG_COMPRESSED_DATA               = 0x0400,
+  MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY = 0x0800
+} mz_zip_flags;
+
+// ZIP archive reading
+
+// Inits a ZIP archive reader.
+// These functions read and validate the archive's central directory.
+mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint32 flags);
+mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint32 flags);
+
+#ifndef MINIZ_NO_STDIO
+mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint32 flags);
+#endif
+
+// Returns the total number of files in the archive.
+mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip);
+
+// Returns detailed information about an archive file entry.
+mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, mz_zip_archive_file_stat *pStat);
+
+// Determines if an archive file entry is a directory entry.
+mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, mz_uint file_index);
+mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index);
+
+// Retrieves the filename of an archive file entry.
+// Returns the number of bytes written to pFilename, or if filename_buf_size is 0 this function returns the number of bytes needed to fully store the filename.
+mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, char *pFilename, mz_uint filename_buf_size);
+
+// Attempts to locates a file in the archive's central directory.
+// Valid flags: MZ_ZIP_FLAG_CASE_SENSITIVE, MZ_ZIP_FLAG_IGNORE_PATH
+// Returns -1 if the file cannot be found.
+int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags);
+
+// Extracts a archive file to a memory buffer using no memory allocation.
+mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size);
+mz_bool mz_zip_reader_extract_file_to_mem_no_alloc(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size);
+
+// Extracts a archive file to a memory buffer.
+mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags);
+mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags);
+
+// Extracts a archive file to a dynamically allocated heap buffer.
+void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, size_t *pSize, mz_uint flags);
+void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, const char *pFilename, size_t *pSize, mz_uint flags);
+
+// Extracts a archive file using a callback function to output the file's data.
+mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, mz_uint file_index, mz_file_write_func pCallback, void *pOpaque, mz_uint flags);
+mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, const char *pFilename, mz_file_write_func pCallback, void *pOpaque, mz_uint flags);
+
+#ifndef MINIZ_NO_STDIO
+// Extracts a archive file to a disk file and sets its last accessed and modified times.
+// This function only extracts files, not archive directory records.
+mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, const char *pDst_filename, mz_uint flags);
+mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, const char *pArchive_filename, const char *pDst_filename, mz_uint flags);
+#endif
+
+// Ends archive reading, freeing all allocations, and closing the input archive file if mz_zip_reader_init_file() was used.
+mz_bool mz_zip_reader_end(mz_zip_archive *pZip);
+
+// ZIP archive writing
+
+#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
+
+// Inits a ZIP archive writer.
+mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size);
+mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, size_t initial_allocation_size);
+
+#ifndef MINIZ_NO_STDIO
+mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint64 size_to_reserve_at_beginning);
+#endif
+
+// Converts a ZIP archive reader object into a writer object, to allow efficient in-place file appends to occur on an existing archive.
+// For archives opened using mz_zip_reader_init_file, pFilename must be the archive's filename so it can be reopened for writing. If the file can't be reopened, mz_zip_reader_end() will be called.
+// For archives opened using mz_zip_reader_init_mem, the memory block must be growable using the realloc callback (which defaults to realloc unless you've overridden it).
+// Finally, for archives opened using mz_zip_reader_init, the mz_zip_archive's user provided m_pWrite function cannot be NULL.
+// Note: In-place archive modification is not recommended unless you know what you're doing, because if execution stops or something goes wrong before
+// the archive is finalized the file's central directory will be hosed.
+mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, const char *pFilename);
+
+// Adds the contents of a memory buffer to an archive. These functions record the current local time into the archive.
+// To add a directory entry, call this method with an archive name ending in a forwardslash with empty buffer.
+// level_and_flags - compression level (0-10, see MZ_BEST_SPEED, MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or just set to MZ_DEFAULT_COMPRESSION.
+mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, mz_uint level_and_flags);
+mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32);
+
+#ifndef MINIZ_NO_STDIO
+// Adds the contents of a disk file to an archive. This function also records the disk file's modified time into the archive.
+// level_and_flags - compression level (0-10, see MZ_BEST_SPEED, MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or just set to MZ_DEFAULT_COMPRESSION.
+mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags);
+#endif
+
+// Adds a file to an archive by fully cloning the data from another archive.
+// This function fully clones the source file's compressed data (no recompression), along with its full filename, extra data, and comment fields.
+mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, mz_zip_archive *pSource_zip, mz_uint file_index);
+
+// Finalizes the archive by writing the central directory records followed by the end of central directory record.
+// After an archive is finalized, the only valid call on the mz_zip_archive struct is mz_zip_writer_end().
+// An archive must be manually finalized by calling this function for it to be valid.
+mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip);
+mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void **pBuf, size_t *pSize);
+
+// Ends archive writing, freeing all allocations, and closing the output file if mz_zip_writer_init_file() was used.
+// Note for the archive to be valid, it must have been finalized before ending.
+mz_bool mz_zip_writer_end(mz_zip_archive *pZip);
+
+// Misc. high-level helper functions:
+
+// mz_zip_add_mem_to_archive_file_in_place() efficiently (but not atomically) appends a memory blob to a ZIP archive.
+// level_and_flags - compression level (0-10, see MZ_BEST_SPEED, MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or just set to MZ_DEFAULT_COMPRESSION.
+mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags);
+
+// Reads a single file from an archive into a heap block.
+// Returns NULL on failure.
+void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name, size_t *pSize, mz_uint zip_flags);
+
+#endif // #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
+
+#endif // #ifndef MINIZ_NO_ARCHIVE_APIS
+
+// ------------------- Low-level Decompression API Definitions
+
+// Decompression flags used by tinfl_decompress().
+// TINFL_FLAG_PARSE_ZLIB_HEADER: If set, the input has a valid zlib header and ends with an adler32 checksum (it's a valid zlib stream). Otherwise, the input is a raw deflate stream.
+// TINFL_FLAG_HAS_MORE_INPUT: If set, there are more input bytes available beyond the end of the supplied input buffer. If clear, the input buffer contains all remaining input.
+// TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF: If set, the output buffer is large enough to hold the entire decompressed stream. If clear, the output buffer is at least the size of the dictionary (typically 32KB).
+// TINFL_FLAG_COMPUTE_ADLER32: Force adler-32 checksum computation of the decompressed bytes.
+enum
+{
+  TINFL_FLAG_PARSE_ZLIB_HEADER = 1,
+  TINFL_FLAG_HAS_MORE_INPUT = 2,
+  TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF = 4,
+  TINFL_FLAG_COMPUTE_ADLER32 = 8
+};
+
+// High level decompression functions:
+// tinfl_decompress_mem_to_heap() decompresses a block in memory to a heap block allocated via malloc().
+// On entry:
+//  pSrc_buf, src_buf_len: Pointer and size of the Deflate or zlib source data to decompress.
+// On return:
+//  Function returns a pointer to the decompressed data, or NULL on failure.
+//  *pOut_len will be set to the decompressed data's size, which could be larger than src_buf_len on uncompressible data.
+//  The caller must call mz_free() on the returned block when it's no longer needed.
+void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags);
+
+// tinfl_decompress_mem_to_mem() decompresses a block in memory to another block in memory.
+// Returns TINFL_DECOMPRESS_MEM_TO_MEM_FAILED on failure, or the number of bytes written on success.
+#define TINFL_DECOMPRESS_MEM_TO_MEM_FAILED ((size_t)(-1))
+size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags);
+
+// tinfl_decompress_mem_to_callback() decompresses a block in memory to an internal 32KB buffer, and a user provided callback function will be called to flush the buffer.
+// Returns 1 on success or 0 on failure.
+typedef int (*tinfl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser);
+int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
+
+struct tinfl_decompressor_tag; typedef struct tinfl_decompressor_tag tinfl_decompressor;
+
+// Max size of LZ dictionary.
+#define TINFL_LZ_DICT_SIZE 32768
+
+// Return status.
+typedef enum
+{
+  // This flags indicates the inflator needs 1 or more input bytes to make forward progress, but the caller is indicating that no more are available. The compressed data
+  // is probably corrupted. If you call the inflator again with more bytes it'll try to continue processing the input but this is a BAD sign (either the data is corrupted or you called it incorrectly).
+  // If you call it again with no input you'll just get TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS again.
+  TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS = -4,
+
+  // This flag indicates that one or more of the input parameters was obviously bogus. (You can try calling it again, but if you get this error the calling code is wrong.)
+  TINFL_STATUS_BAD_PARAM = -3,
+
+  // This flags indicate the inflator is finished but the adler32 check of the uncompressed data didn't match. If you call it again it'll return TINFL_STATUS_DONE.
+  TINFL_STATUS_ADLER32_MISMATCH = -2,
+
+  // This flags indicate the inflator has somehow failed (bad code, corrupted input, etc.). If you call it again without resetting via tinfl_init() it it'll just keep on returning the same status failure code.
+  TINFL_STATUS_FAILED = -1,
+
+  // Any status code less than TINFL_STATUS_DONE must indicate a failure.
+
+  // This flag indicates the inflator has returned every byte of uncompressed data that it can, has consumed every byte that it needed, has successfully reached the end of the deflate stream, and
+  // if zlib headers and adler32 checking enabled that it has successfully checked the uncompressed data's adler32. If you call it again you'll just get TINFL_STATUS_DONE over and over again.
+  TINFL_STATUS_DONE = 0,
+
+  // This flag indicates the inflator MUST have more input data (even 1 byte) before it can make any more forward progress, or you need to clear the TINFL_FLAG_HAS_MORE_INPUT
+  // flag on the next call if you don't have any more source data. If the source data was somehow corrupted it's also possible (but unlikely) for the inflator to keep on demanding input to
+  // proceed, so be sure to properly set the TINFL_FLAG_HAS_MORE_INPUT flag.
+  TINFL_STATUS_NEEDS_MORE_INPUT = 1,
+
+  // This flag indicates the inflator definitely has 1 or more bytes of uncompressed data available, but it cannot write this data into the output buffer.
+  // Note if the source compressed data was corrupted it's possible for the inflator to return a lot of uncompressed data to the caller. I've been assuming you know how much uncompressed data to expect
+  // (either exact or worst case) and will stop calling the inflator and fail after receiving too much. In pure streaming scenarios where you have no idea how many bytes to expect this may not be possible
+  // so I may need to add some code to address this.
+  TINFL_STATUS_HAS_MORE_OUTPUT = 2
+
+} tinfl_status;
+
+// Initializes the decompressor to its initial state.
+#define tinfl_init(r) do { (r)->m_state = 0; } MZ_MACRO_END
+#define tinfl_get_adler32(r) (r)->m_check_adler32
+
+// Main low-level decompressor coroutine function. This is the only function actually needed for decompression. All the other functions are just high-level helpers for improved usability.
+// This is a universal API, i.e. it can be used as a building block to build any desired higher level decompression API. In the limit case, it can be called once per every byte input or output.
+tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags);
+
+// Internal/private bits follow.
+enum
+{
+  TINFL_MAX_HUFF_TABLES = 3, TINFL_MAX_HUFF_SYMBOLS_0 = 288, TINFL_MAX_HUFF_SYMBOLS_1 = 32, TINFL_MAX_HUFF_SYMBOLS_2 = 19,
+  TINFL_FAST_LOOKUP_BITS = 10, TINFL_FAST_LOOKUP_SIZE = 1 << TINFL_FAST_LOOKUP_BITS
+};
+
+typedef struct
+{
+  mz_uint8 m_code_size[TINFL_MAX_HUFF_SYMBOLS_0];
+  mz_int16 m_look_up[TINFL_FAST_LOOKUP_SIZE], m_tree[TINFL_MAX_HUFF_SYMBOLS_0 * 2];
+} tinfl_huff_table;
+
+#if MINIZ_HAS_64BIT_REGISTERS
+  #define TINFL_USE_64BIT_BITBUF 1
+#endif
+
+#if TINFL_USE_64BIT_BITBUF
+  typedef mz_uint64 tinfl_bit_buf_t;
+  #define TINFL_BITBUF_SIZE (64)
+#else
+  typedef mz_uint32 tinfl_bit_buf_t;
+  #define TINFL_BITBUF_SIZE (32)
+#endif
+
+struct tinfl_decompressor_tag
+{
+  mz_uint32 m_state, m_num_bits, m_zhdr0, m_zhdr1, m_z_adler32, m_final, m_type, m_check_adler32, m_dist, m_counter, m_num_extra, m_table_sizes[TINFL_MAX_HUFF_TABLES];
+  tinfl_bit_buf_t m_bit_buf;
+  size_t m_dist_from_out_buf_start;
+  tinfl_huff_table m_tables[TINFL_MAX_HUFF_TABLES];
+  mz_uint8 m_raw_header[4], m_len_codes[TINFL_MAX_HUFF_SYMBOLS_0 + TINFL_MAX_HUFF_SYMBOLS_1 + 137];
+};
+
+// ------------------- Low-level Compression API Definitions
+
+// Set TDEFL_LESS_MEMORY to 1 to use less memory (compression will be slightly slower, and raw/dynamic blocks will be output more frequently).
+#define TDEFL_LESS_MEMORY 0
+
+// tdefl_init() compression flags logically OR'd together (low 12 bits contain the max. number of probes per dictionary search):
+// TDEFL_DEFAULT_MAX_PROBES: The compressor defaults to 128 dictionary probes per dictionary search. 0=Huffman only, 1=Huffman+LZ (fastest/crap compression), 4095=Huffman+LZ (slowest/best compression).
+enum
+{
+  TDEFL_HUFFMAN_ONLY = 0, TDEFL_DEFAULT_MAX_PROBES = 128, TDEFL_MAX_PROBES_MASK = 0xFFF
+};
+
+// TDEFL_WRITE_ZLIB_HEADER: If set, the compressor outputs a zlib header before the deflate data, and the Adler-32 of the source data at the end. Otherwise, you'll get raw deflate data.
+// TDEFL_COMPUTE_ADLER32: Always compute the adler-32 of the input data (even when not writing zlib headers).
+// TDEFL_GREEDY_PARSING_FLAG: Set to use faster greedy parsing, instead of more efficient lazy parsing.
+// TDEFL_NONDETERMINISTIC_PARSING_FLAG: Enable to decrease the compressor's initialization time to the minimum, but the output may vary from run to run given the same input (depending on the contents of memory).
+// TDEFL_RLE_MATCHES: Only look for RLE matches (matches with a distance of 1)
+// TDEFL_FILTER_MATCHES: Discards matches <= 5 chars if enabled.
+// TDEFL_FORCE_ALL_STATIC_BLOCKS: Disable usage of optimized Huffman tables.
+// TDEFL_FORCE_ALL_RAW_BLOCKS: Only use raw (uncompressed) deflate blocks.
+// The low 12 bits are reserved to control the max # of hash probes per dictionary lookup (see TDEFL_MAX_PROBES_MASK).
+enum
+{
+  TDEFL_WRITE_ZLIB_HEADER             = 0x01000,
+  TDEFL_COMPUTE_ADLER32               = 0x02000,
+  TDEFL_GREEDY_PARSING_FLAG           = 0x04000,
+  TDEFL_NONDETERMINISTIC_PARSING_FLAG = 0x08000,
+  TDEFL_RLE_MATCHES                   = 0x10000,
+  TDEFL_FILTER_MATCHES                = 0x20000,
+  TDEFL_FORCE_ALL_STATIC_BLOCKS       = 0x40000,
+  TDEFL_FORCE_ALL_RAW_BLOCKS          = 0x80000
+};
+
+// High level compression functions:
+// tdefl_compress_mem_to_heap() compresses a block in memory to a heap block allocated via malloc().
+// On entry:
+//  pSrc_buf, src_buf_len: Pointer and size of source block to compress.
+//  flags: The max match finder probes (default is 128) logically OR'd against the above flags. Higher probes are slower but improve compression.
+// On return:
+//  Function returns a pointer to the compressed data, or NULL on failure.
+//  *pOut_len will be set to the compressed data's size, which could be larger than src_buf_len on uncompressible data.
+//  The caller must free() the returned block when it's no longer needed.
+void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags);
+
+// tdefl_compress_mem_to_mem() compresses a block in memory to another block in memory.
+// Returns 0 on failure.
+size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags);
+
+// Compresses an image to a compressed PNG file in memory.
+// On entry:
+//  pImage, w, h, and num_chans describe the image to compress. num_chans may be 1, 2, 3, or 4. 
+//  The image pitch in bytes per scanline will be w*num_chans. The leftmost pixel on the top scanline is stored first in memory.
+//  level may range from [0,10], use MZ_NO_COMPRESSION, MZ_BEST_SPEED, MZ_BEST_COMPRESSION, etc. or a decent default is MZ_DEFAULT_LEVEL
+//  If flip is true, the image will be flipped on the Y axis (useful for OpenGL apps).
+// On return:
+//  Function returns a pointer to the compressed data, or NULL on failure.
+//  *pLen_out will be set to the size of the PNG image file.
+//  The caller must mz_free() the returned heap block (which will typically be larger than *pLen_out) when it's no longer needed.
+void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip);
+void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out);
+
+// Output stream interface. The compressor uses this interface to write compressed data. It'll typically be called TDEFL_OUT_BUF_SIZE at a time.
+typedef mz_bool (*tdefl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser);
+
+// tdefl_compress_mem_to_output() compresses a block to an output stream. The above helpers use this function internally.
+mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
+
+enum { TDEFL_MAX_HUFF_TABLES = 3, TDEFL_MAX_HUFF_SYMBOLS_0 = 288, TDEFL_MAX_HUFF_SYMBOLS_1 = 32, TDEFL_MAX_HUFF_SYMBOLS_2 = 19, TDEFL_LZ_DICT_SIZE = 32768, TDEFL_LZ_DICT_SIZE_MASK = TDEFL_LZ_DICT_SIZE - 1, TDEFL_MIN_MATCH_LEN = 3, TDEFL_MAX_MATCH_LEN = 258 };
+
+// TDEFL_OUT_BUF_SIZE MUST be large enough to hold a single entire compressed output block (using static/fixed Huffman codes).
+#if TDEFL_LESS_MEMORY
+enum { TDEFL_LZ_CODE_BUF_SIZE = 24 * 1024, TDEFL_OUT_BUF_SIZE = (TDEFL_LZ_CODE_BUF_SIZE * 13 ) / 10, TDEFL_MAX_HUFF_SYMBOLS = 288, TDEFL_LZ_HASH_BITS = 12, TDEFL_LEVEL1_HASH_SIZE_MASK = 4095, TDEFL_LZ_HASH_SHIFT = (TDEFL_LZ_HASH_BITS + 2) / 3, TDEFL_LZ_HASH_SIZE = 1 << TDEFL_LZ_HASH_BITS };
+#else
+enum { TDEFL_LZ_CODE_BUF_SIZE = 64 * 1024, TDEFL_OUT_BUF_SIZE = (TDEFL_LZ_CODE_BUF_SIZE * 13 ) / 10, TDEFL_MAX_HUFF_SYMBOLS = 288, TDEFL_LZ_HASH_BITS = 15, TDEFL_LEVEL1_HASH_SIZE_MASK = 4095, TDEFL_LZ_HASH_SHIFT = (TDEFL_LZ_HASH_BITS + 2) / 3, TDEFL_LZ_HASH_SIZE = 1 << TDEFL_LZ_HASH_BITS };
+#endif
+
+// The low-level tdefl functions below may be used directly if the above helper functions aren't flexible enough. The low-level functions don't make any heap allocations, unlike the above helper functions.
+typedef enum
+{
+  TDEFL_STATUS_BAD_PARAM = -2,
+  TDEFL_STATUS_PUT_BUF_FAILED = -1,
+  TDEFL_STATUS_OKAY = 0,
+  TDEFL_STATUS_DONE = 1,
+} tdefl_status;
+
+// Must map to MZ_NO_FLUSH, MZ_SYNC_FLUSH, etc. enums
+typedef enum
+{
+  TDEFL_NO_FLUSH = 0,
+  TDEFL_SYNC_FLUSH = 2,
+  TDEFL_FULL_FLUSH = 3,
+  TDEFL_FINISH = 4
+} tdefl_flush;
+
+// tdefl's compression state structure.
+typedef struct
+{
+  tdefl_put_buf_func_ptr m_pPut_buf_func;
+  void *m_pPut_buf_user;
+  mz_uint m_flags, m_max_probes[2];
+  int m_greedy_parsing;
+  mz_uint m_adler32, m_lookahead_pos, m_lookahead_size, m_dict_size;
+  mz_uint8 *m_pLZ_code_buf, *m_pLZ_flags, *m_pOutput_buf, *m_pOutput_buf_end;
+  mz_uint m_num_flags_left, m_total_lz_bytes, m_lz_code_buf_dict_pos, m_bits_in, m_bit_buffer;
+  mz_uint m_saved_match_dist, m_saved_match_len, m_saved_lit, m_output_flush_ofs, m_output_flush_remaining, m_finished, m_block_index, m_wants_to_finish;
+  tdefl_status m_prev_return_status;
+  const void *m_pIn_buf;
+  void *m_pOut_buf;
+  size_t *m_pIn_buf_size, *m_pOut_buf_size;
+  tdefl_flush m_flush;
+  const mz_uint8 *m_pSrc;
+  size_t m_src_buf_left, m_out_buf_ofs;
+  mz_uint8 m_dict[TDEFL_LZ_DICT_SIZE + TDEFL_MAX_MATCH_LEN - 1];
+  mz_uint16 m_huff_count[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS];
+  mz_uint16 m_huff_codes[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS];
+  mz_uint8 m_huff_code_sizes[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS];
+  mz_uint8 m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE];
+  mz_uint16 m_next[TDEFL_LZ_DICT_SIZE];
+  mz_uint16 m_hash[TDEFL_LZ_HASH_SIZE];
+  mz_uint8 m_output_buf[TDEFL_OUT_BUF_SIZE];
+} tdefl_compressor;
+
+// Initializes the compressor.
+// There is no corresponding deinit() function because the tdefl API's do not dynamically allocate memory.
+// pBut_buf_func: If NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
+// If pBut_buf_func is NULL the user should always call the tdefl_compress() API.
+// flags: See the above enums (TDEFL_HUFFMAN_ONLY, TDEFL_WRITE_ZLIB_HEADER, etc.)
+tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
+
+// Compresses a block of data, consuming as much of the specified input buffer as possible, and writing as much compressed data to the specified output buffer as possible.
+tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, size_t *pIn_buf_size, void *pOut_buf, size_t *pOut_buf_size, tdefl_flush flush);
+
+// tdefl_compress_buffer() is only usable when the tdefl_init() is called with a non-NULL tdefl_put_buf_func_ptr.
+// tdefl_compress_buffer() always consumes the entire input buffer.
+tdefl_status tdefl_compress_buffer(tdefl_compressor *d, const void *pIn_buf, size_t in_buf_size, tdefl_flush flush);
+
+tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d);
+mz_uint32 tdefl_get_adler32(tdefl_compressor *d);
+
+// Can't use tdefl_create_comp_flags_from_zip_params if MINIZ_NO_ZLIB_APIS isn't defined, because it uses some of its macros.
+#ifndef MINIZ_NO_ZLIB_APIS
+// Create tdefl_compress() flags given zlib-style compression parameters.
+// level may range from [0,10] (where 10 is absolute max compression, but may be much slower on some files)
+// window_bits may be -15 (raw deflate) or 15 (zlib)
+// strategy may be either MZ_DEFAULT_STRATEGY, MZ_FILTERED, MZ_HUFFMAN_ONLY, MZ_RLE, or MZ_FIXED
+mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int strategy);
+#endif // #ifndef MINIZ_NO_ZLIB_APIS
+
+// Allocate the tdefl_compressor and tinfl_decompressor structures in C so that
+// non-C language bindings to tdefl_ and tinfl_ API don't need to worry about
+// structure size and allocation mechanism.
+tdefl_compressor *tdefl_compressor_alloc();
+void tdefl_compressor_free(tdefl_compressor *pComp);
+tinfl_decompressor *tinfl_decompressor_alloc();
+void tinfl_decompressor_free(tinfl_decompressor *pDecomp);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MINIZ_HEADER_INCLUDED
+
+// ------------------- End of Header: Implementation follows. (If you only want the header, define MINIZ_HEADER_FILE_ONLY.)
+
+#ifndef MINIZ_HEADER_FILE_ONLY
+
+typedef unsigned char mz_validate_uint16[sizeof(mz_uint16)==2 ? 1 : -1];
+typedef unsigned char mz_validate_uint32[sizeof(mz_uint32)==4 ? 1 : -1];
+typedef unsigned char mz_validate_uint64[sizeof(mz_uint64)==8 ? 1 : -1];
+
+#include <string.h>
+#include <assert.h>
+
+#define MZ_ASSERT(x) assert(x)
+
+#ifdef MINIZ_NO_MALLOC
+  #define MZ_MALLOC(x) NULL
+  #define MZ_FREE(x) (void)x, ((void)0)
+  #define MZ_REALLOC(p, x) NULL
+#else
+  #define MZ_MALLOC(x) malloc(x)
+  #define MZ_FREE(x) free(x)
+  #define MZ_REALLOC(p, x) realloc(p, x)
+#endif
+
+#define MZ_MAX(a,b) (((a)>(b))?(a):(b))
+#define MZ_MIN(a,b) (((a)<(b))?(a):(b))
+#define MZ_CLEAR_OBJ(obj) memset(&(obj), 0, sizeof(obj))
+
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+  #define MZ_READ_LE16(p) *((const mz_uint16 *)(p))
+  #define MZ_READ_LE32(p) *((const mz_uint32 *)(p))
+#else
+  #define MZ_READ_LE16(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U))
+  #define MZ_READ_LE32(p) ((mz_uint32)(((const mz_uint8 *)(p))[0]) | ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) | ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) | ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U))
+#endif
+
+#ifdef _MSC_VER
+  #define MZ_FORCEINLINE __forceinline
+#elif defined(__GNUC__)
+  #define MZ_FORCEINLINE inline __attribute__((__always_inline__))
+#else
+  #define MZ_FORCEINLINE inline
+#endif
+
+#ifdef __cplusplus
+  extern "C" {
+#endif
+
+// ------------------- zlib-style API's
+
+mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len)
+{
+  mz_uint32 i, s1 = (mz_uint32)(adler & 0xffff), s2 = (mz_uint32)(adler >> 16); size_t block_len = buf_len % 5552;
+  if (!ptr) return MZ_ADLER32_INIT;
+  while (buf_len) {
+    for (i = 0; i + 7 < block_len; i += 8, ptr += 8) {
+      s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1;
+      s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1;
+    }
+    for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1;
+    s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552;
+  }
+  return (s2 << 16) + s1;
+}
+
+// Karl Malbrain's compact CRC-32. See "A compact CCITT crc16 and crc32 C implementation that balances processor cache usage against speed": http://www.geocities.com/malbrain/
+mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len)
+{
+  static const mz_uint32 s_crc32[16] = { 0, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c,
+    0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c };
+  mz_uint32 crcu32 = (mz_uint32)crc;
+  if (!ptr) return MZ_CRC32_INIT;
+  crcu32 = ~crcu32; while (buf_len--) { mz_uint8 b = *ptr++; crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b & 0xF)]; crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b >> 4)]; }
+  return ~crcu32;
+}
+
+void mz_free(void *p)
+{
+  MZ_FREE(p);
+}
+
+#ifndef MINIZ_NO_ZLIB_APIS
+
+static void *def_alloc_func(void *opaque, size_t items, size_t size) { (void)opaque, (void)items, (void)size; return MZ_MALLOC(items * size); }
+static void def_free_func(void *opaque, void *address) { (void)opaque, (void)address; MZ_FREE(address); }
+static void *def_realloc_func(void *opaque, void *address, size_t items, size_t size) { (void)opaque, (void)address, (void)items, (void)size; return MZ_REALLOC(address, items * size); }
+
+const char *mz_version(void)
+{
+  return MZ_VERSION;
+}
+
+int mz_deflateInit(mz_streamp pStream, int level)
+{
+  return mz_deflateInit2(pStream, level, MZ_DEFLATED, MZ_DEFAULT_WINDOW_BITS, 9, MZ_DEFAULT_STRATEGY);
+}
+
+int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy)
+{
+  tdefl_compressor *pComp;
+  mz_uint comp_flags = TDEFL_COMPUTE_ADLER32 | tdefl_create_comp_flags_from_zip_params(level, window_bits, strategy);
+
+  if (!pStream) return MZ_STREAM_ERROR;
+  if ((method != MZ_DEFLATED) || ((mem_level < 1) || (mem_level > 9)) || ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS))) return MZ_PARAM_ERROR;
+
+  pStream->data_type = 0;
+  pStream->adler = MZ_ADLER32_INIT;
+  pStream->msg = NULL;
+  pStream->reserved = 0;
+  pStream->total_in = 0;
+  pStream->total_out = 0;
+  if (!pStream->zalloc) pStream->zalloc = def_alloc_func;
+  if (!pStream->zfree) pStream->zfree = def_free_func;
+
+  pComp = (tdefl_compressor *)pStream->zalloc(pStream->opaque, 1, sizeof(tdefl_compressor));
+  if (!pComp)
+    return MZ_MEM_ERROR;
+
+  pStream->state = (struct mz_internal_state *)pComp;
+
+  if (tdefl_init(pComp, NULL, NULL, comp_flags) != TDEFL_STATUS_OKAY)
+  {
+    mz_deflateEnd(pStream);
+    return MZ_PARAM_ERROR;
+  }
+
+  return MZ_OK;
+}
+
+int mz_deflateReset(mz_streamp pStream)
+{
+  if ((!pStream) || (!pStream->state) || (!pStream->zalloc) || (!pStream->zfree)) return MZ_STREAM_ERROR;
+  pStream->total_in = pStream->total_out = 0;
+  tdefl_init((tdefl_compressor*)pStream->state, NULL, NULL, ((tdefl_compressor*)pStream->state)->m_flags);
+  return MZ_OK;
+}
+
+int mz_deflate(mz_streamp pStream, int flush)
+{
+  size_t in_bytes, out_bytes;
+  mz_ulong orig_total_in, orig_total_out;
+  int mz_status = MZ_OK;
+
+  if ((!pStream) || (!pStream->state) || (flush < 0) || (flush > MZ_FINISH) || (!pStream->next_out)) return MZ_STREAM_ERROR;
+  if (!pStream->avail_out) return MZ_BUF_ERROR;
+
+  if (flush == MZ_PARTIAL_FLUSH) flush = MZ_SYNC_FLUSH;
+
+  if (((tdefl_compressor*)pStream->state)->m_prev_return_status == TDEFL_STATUS_DONE)
+    return (flush == MZ_FINISH) ? MZ_STREAM_END : MZ_BUF_ERROR;
+
+  orig_total_in = pStream->total_in; orig_total_out = pStream->total_out;
+  for ( ; ; )
+  {
+    tdefl_status defl_status;
+    in_bytes = pStream->avail_in; out_bytes = pStream->avail_out;
+
+    defl_status = tdefl_compress((tdefl_compressor*)pStream->state, pStream->next_in, &in_bytes, pStream->next_out, &out_bytes, (tdefl_flush)flush);
+    pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes;
+    pStream->total_in += (mz_uint)in_bytes; pStream->adler = tdefl_get_adler32((tdefl_compressor*)pStream->state);
+
+    pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes;
+    pStream->total_out += (mz_uint)out_bytes;
+
+    if (defl_status < 0)
+    {
+      mz_status = MZ_STREAM_ERROR;
+      break;
+    }
+    else if (defl_status == TDEFL_STATUS_DONE)
+    {
+      mz_status = MZ_STREAM_END;
+      break;
+    }
+    else if (!pStream->avail_out)
+      break;
+    else if ((!pStream->avail_in) && (flush != MZ_FINISH))
+    {
+      if ((flush) || (pStream->total_in != orig_total_in) || (pStream->total_out != orig_total_out))
+        break;
+      return MZ_BUF_ERROR; // Can't make forward progress without some input.
+    }
+  }
+  return mz_status;
+}
+
+int mz_deflateEnd(mz_streamp pStream)
+{
+  if (!pStream) return MZ_STREAM_ERROR;
+  if (pStream->state)
+  {
+    pStream->zfree(pStream->opaque, pStream->state);
+    pStream->state = NULL;
+  }
+  return MZ_OK;
+}
+
+mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len)
+{
+  (void)pStream;
+  // This is really over conservative. (And lame, but it's actually pretty tricky to compute a true upper bound given the way tdefl's blocking works.)
+  return MZ_MAX(128 + (source_len * 110) / 100, 128 + source_len + ((source_len / (31 * 1024)) + 1) * 5);
+}
+
+int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level)
+{
+  int status;
+  mz_stream stream;
+  memset(&stream, 0, sizeof(stream));
+
+  // In case mz_ulong is 64-bits (argh I hate longs).
+  if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR;
+
+  stream.next_in = pSource;
+  stream.avail_in = (mz_uint32)source_len;
+  stream.next_out = pDest;
+  stream.avail_out = (mz_uint32)*pDest_len;
+
+  status = mz_deflateInit(&stream, level);
+  if (status != MZ_OK) return status;
+
+  status = mz_deflate(&stream, MZ_FINISH);
+  if (status != MZ_STREAM_END)
+  {
+    mz_deflateEnd(&stream);
+    return (status == MZ_OK) ? MZ_BUF_ERROR : status;
+  }
+
+  *pDest_len = stream.total_out;
+  return mz_deflateEnd(&stream);
+}
+
+int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len)
+{
+  return mz_compress2(pDest, pDest_len, pSource, source_len, MZ_DEFAULT_COMPRESSION);
+}
+
+mz_ulong mz_compressBound(mz_ulong source_len)
+{
+  return mz_deflateBound(NULL, source_len);
+}
+
+typedef struct
+{
+  tinfl_decompressor m_decomp;
+  mz_uint m_dict_ofs, m_dict_avail, m_first_call, m_has_flushed; int m_window_bits;
+  mz_uint8 m_dict[TINFL_LZ_DICT_SIZE];
+  tinfl_status m_last_status;
+} inflate_state;
+
+int mz_inflateInit2(mz_streamp pStream, int window_bits)
+{
+  inflate_state *pDecomp;
+  if (!pStream) return MZ_STREAM_ERROR;
+  if ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS)) return MZ_PARAM_ERROR;
+
+  pStream->data_type = 0;
+  pStream->adler = 0;
+  pStream->msg = NULL;
+  pStream->total_in = 0;
+  pStream->total_out = 0;
+  pStream->reserved = 0;
+  if (!pStream->zalloc) pStream->zalloc = def_alloc_func;
+  if (!pStream->zfree) pStream->zfree = def_free_func;
+
+  pDecomp = (inflate_state*)pStream->zalloc(pStream->opaque, 1, sizeof(inflate_state));
+  if (!pDecomp) return MZ_MEM_ERROR;
+
+  pStream->state = (struct mz_internal_state *)pDecomp;
+
+  tinfl_init(&pDecomp->m_decomp);
+  pDecomp->m_dict_ofs = 0;
+  pDecomp->m_dict_avail = 0;
+  pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT;
+  pDecomp->m_first_call = 1;
+  pDecomp->m_has_flushed = 0;
+  pDecomp->m_window_bits = window_bits;
+
+  return MZ_OK;
+}
+
+int mz_inflateInit(mz_streamp pStream)
+{
+   return mz_inflateInit2(pStream, MZ_DEFAULT_WINDOW_BITS);
+}
+
+int mz_inflate(mz_streamp pStream, int flush)
+{
+  inflate_state* pState;
+  mz_uint n, first_call, decomp_flags = TINFL_FLAG_COMPUTE_ADLER32;
+  size_t in_bytes, out_bytes, orig_avail_in;
+  tinfl_status status;
+
+  if ((!pStream) || (!pStream->state)) return MZ_STREAM_ERROR;
+  if (flush == MZ_PARTIAL_FLUSH) flush = MZ_SYNC_FLUSH;
+  if ((flush) && (flush != MZ_SYNC_FLUSH) && (flush != MZ_FINISH)) return MZ_STREAM_ERROR;
+
+  pState = (inflate_state*)pStream->state;
+  if (pState->m_window_bits > 0) decomp_flags |= TINFL_FLAG_PARSE_ZLIB_HEADER;
+  orig_avail_in = pStream->avail_in;
+
+  first_call = pState->m_first_call; pState->m_first_call = 0;
+  if (pState->m_last_status < 0) return MZ_DATA_ERROR;
+
+  if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR;
+  pState->m_has_flushed |= (flush == MZ_FINISH);
+
+  if ((flush == MZ_FINISH) && (first_call))
+  {
+    // MZ_FINISH on the first call implies that the input and output buffers are large enough to hold the entire compressed/decompressed file.
+    decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF;
+    in_bytes = pStream->avail_in; out_bytes = pStream->avail_out;
+    status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pStream->next_out, pStream->next_out, &out_bytes, decomp_flags);
+    pState->m_last_status = status;
+    pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes; pStream->total_in += (mz_uint)in_bytes;
+    pStream->adler = tinfl_get_adler32(&pState->m_decomp);
+    pStream->next_out += (mz_uint)out_bytes; pStream->avail_out -= (mz_uint)out_bytes; pStream->total_out += (mz_uint)out_bytes;
+
+    if (status < 0)
+      return MZ_DATA_ERROR;
+    else if (status != TINFL_STATUS_DONE)
+    {
+      pState->m_last_status = TINFL_STATUS_FAILED;
+      return MZ_BUF_ERROR;
+    }
+    return MZ_STREAM_END;
+  }
+  // flush != MZ_FINISH then we must assume there's more input.
+  if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT;
+
+  if (pState->m_dict_avail)
+  {
+    n = MZ_MIN(pState->m_dict_avail, pStream->avail_out);
+    memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
+    pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n;
+    pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1);
+    return ((pState->m_last_status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK;
+  }
+
+  for ( ; ; )
+  {
+    in_bytes = pStream->avail_in;
+    out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs;
+
+    status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags);
+    pState->m_last_status = status;
+
+    pStream->next_in += (mz_uint)in_bytes; pStream->avail_in -= (mz_uint)in_bytes;
+    pStream->total_in += (mz_uint)in_bytes; pStream->adler = tinfl_get_adler32(&pState->m_decomp);
+
+    pState->m_dict_avail = (mz_uint)out_bytes;
+
+    n = MZ_MIN(pState->m_dict_avail, pStream->avail_out);
+    memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
+    pStream->next_out += n; pStream->avail_out -= n; pStream->total_out += n;
+    pState->m_dict_avail -= n; pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1);
+
+    if (status < 0)
+       return MZ_DATA_ERROR; // Stream is corrupted (there could be some uncompressed data left in the output dictionary - oh well).
+    else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in))
+      return MZ_BUF_ERROR; // Signal caller that we can't make forward progress without supplying more input or by setting flush to MZ_FINISH.
+    else if (flush == MZ_FINISH)
+    {
+       // The output buffer MUST be large to hold the remaining uncompressed data when flush==MZ_FINISH.
+       if (status == TINFL_STATUS_DONE)
+          return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END;
+       // status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's at least 1 more byte on the way. If there's no more room left in the output buffer then something is wrong.
+       else if (!pStream->avail_out)
+          return MZ_BUF_ERROR;
+    }
+    else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || (!pStream->avail_out) || (pState->m_dict_avail))
+      break;
+  }
+
+  return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) ? MZ_STREAM_END : MZ_OK;
+}
+
+int mz_inflateEnd(mz_streamp pStream)
+{
+  if (!pStream)
+    return MZ_STREAM_ERROR;
+  if (pStream->state)
+  {
+    pStream->zfree(pStream->opaque, pStream->state);
+    pStream->state = NULL;
+  }
+  return MZ_OK;
+}
+
+int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len)
+{
+  mz_stream stream;
+  int status;
+  memset(&stream, 0, sizeof(stream));
+
+  // In case mz_ulong is 64-bits (argh I hate longs).
+  if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR;
+
+  stream.next_in = pSource;
+  stream.avail_in = (mz_uint32)source_len;
+  stream.next_out = pDest;
+  stream.avail_out = (mz_uint32)*pDest_len;
+
+  status = mz_inflateInit(&stream);
+  if (status != MZ_OK)
+    return status;
+
+  status = mz_inflate(&stream, MZ_FINISH);
+  if (status != MZ_STREAM_END)
+  {
+    mz_inflateEnd(&stream);
+    return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status;
+  }
+  *pDest_len = stream.total_out;
+
+  return mz_inflateEnd(&stream);
+}
+
+const char *mz_error(int err)
+{
+  static struct { int m_err; const char *m_pDesc; } s_error_descs[] =
+  {
+    { MZ_OK, "" }, { MZ_STREAM_END, "stream end" }, { MZ_NEED_DICT, "need dictionary" }, { MZ_ERRNO, "file error" }, { MZ_STREAM_ERROR, "stream error" },
+    { MZ_DATA_ERROR, "data error" }, { MZ_MEM_ERROR, "out of memory" }, { MZ_BUF_ERROR, "buf error" }, { MZ_VERSION_ERROR, "version error" }, { MZ_PARAM_ERROR, "parameter error" }
+  };
+  mz_uint i; for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) if (s_error_descs[i].m_err == err) return s_error_descs[i].m_pDesc;
+  return NULL;
+}
+
+#endif //MINIZ_NO_ZLIB_APIS
+
+// ------------------- Low-level Decompression (completely independent from all compression API's)
+
+#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l)
+#define TINFL_MEMSET(p, c, l) memset(p, c, l)
+
+#define TINFL_CR_BEGIN switch(r->m_state) { case 0:
+#define TINFL_CR_RETURN(state_index, result) do { status = result; r->m_state = state_index; goto common_exit; case state_index:; } MZ_MACRO_END
+#define TINFL_CR_RETURN_FOREVER(state_index, result) do { for ( ; ; ) { TINFL_CR_RETURN(state_index, result); } } MZ_MACRO_END
+#define TINFL_CR_FINISH }
+
+#define TINFL_GET_BYTE(state_index, c) do { \
+  while (pIn_buf_cur >= pIn_buf_end) { \
+    TINFL_CR_RETURN(state_index, (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) ? TINFL_STATUS_NEEDS_MORE_INPUT : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS); \
+  } c = *pIn_buf_cur++; } MZ_MACRO_END
+
+#define TINFL_NEED_BITS(state_index, n) do { mz_uint c; TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; } while (num_bits < (mz_uint)(n))
+#define TINFL_SKIP_BITS(state_index, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END
+#define TINFL_GET_BITS(state_index, b, n) do { if (num_bits < (mz_uint)(n)) { TINFL_NEED_BITS(state_index, n); } b = bit_buf & ((1 << (n)) - 1); bit_buf >>= (n); num_bits -= (n); } MZ_MACRO_END
+
+// TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes remaining in the input buffer falls below 2.
+// It reads just enough bytes from the input stream that are needed to decode the next Huffman code (and absolutely no more). It works by trying to fully decode a
+// Huffman code by using whatever bits are currently present in the bit buffer. If this fails, it reads another byte, and tries again until it succeeds or until the
+// bit buffer contains >=15 bits (deflate's max. Huffman code size).
+#define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \
+  do { \
+    temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \
+    if (temp >= 0) { \
+      code_len = temp >> 9; \
+      if ((code_len) && (num_bits >= code_len)) \
+      break; \
+    } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \
+       code_len = TINFL_FAST_LOOKUP_BITS; \
+       do { \
+          temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \
+       } while ((temp < 0) && (num_bits >= (code_len + 1))); if (temp >= 0) break; \
+    } TINFL_GET_BYTE(state_index, c); bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); num_bits += 8; \
+  } while (num_bits < 15);
+
+// TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex than you would initially expect because the zlib API expects the decompressor to never read
+// beyond the final byte of the deflate stream. (In other words, when this macro wants to read another byte from the input, it REALLY needs another byte in order to fully
+// decode the next Huffman code.) Handling this properly is particularly important on raw deflate (non-zlib) streams, which aren't followed by a byte aligned adler-32.
+// The slow path is only executed at the very end of the input buffer.
+// v1.16: The original macro handled the case at the very end of the passed-in input buffer, but we also need to handle the case where the user passes in 1+zillion bytes
+// following the deflate data and our non-conservative read-ahead path won't kick in here on this code. This is much trickier.
+#define TINFL_HUFF_DECODE(state_index, sym, pHuff) do { \
+  int temp; mz_uint code_len, c; \
+  if (num_bits < 15) { \
+    if ((pIn_buf_end - pIn_buf_cur) < 2) { \
+       TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \
+    } else { \
+       bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); pIn_buf_cur += 2; num_bits += 16; \
+    } \
+  } \
+  if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0) \
+    code_len = temp >> 9, temp &= 511; \
+  else { \
+    code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \
+  } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END
+
+tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags)
+{
+  static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 };
+  static const int s_length_extra[31]= { 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 };
+  static const int s_dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, 257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0};
+  static const int s_dist_extra[32] = { 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
+  static const mz_uint8 s_length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 };
+  static const int s_min_table_sizes[3] = { 257, 1, 4 };
+
+  tinfl_status status = TINFL_STATUS_FAILED; mz_uint32 num_bits, dist, counter, num_extra; tinfl_bit_buf_t bit_buf;
+  const mz_uint8 *pIn_buf_cur = pIn_buf_next, *const pIn_buf_end = pIn_buf_next + *pIn_buf_size;
+  mz_uint8 *pOut_buf_cur = pOut_buf_next, *const pOut_buf_end = pOut_buf_next + *pOut_buf_size;
+  size_t out_buf_size_mask = (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) ? (size_t)-1 : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, dist_from_out_buf_start;
+
+  // Ensure the output buffer's size is a power of 2, unless the output buffer is large enough to hold the entire output file (in which case it doesn't matter).
+  if (((out_buf_size_mask + 1) & out_buf_size_mask) || (pOut_buf_next < pOut_buf_start)) { *pIn_buf_size = *pOut_buf_size = 0; return TINFL_STATUS_BAD_PARAM; }
+
+  num_bits = r->m_num_bits; bit_buf = r->m_bit_buf; dist = r->m_dist; counter = r->m_counter; num_extra = r->m_num_extra; dist_from_out_buf_start = r->m_dist_from_out_buf_start;
+  TINFL_CR_BEGIN
+
+  bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; r->m_z_adler32 = r->m_check_adler32 = 1;
+  if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER)
+  {
+    TINFL_GET_BYTE(1, r->m_zhdr0); TINFL_GET_BYTE(2, r->m_zhdr1);
+    counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8));
+    if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || ((out_buf_size_mask + 1) < (size_t)(1U << (8U + (r->m_zhdr0 >> 4)))));
+    if (counter) { TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); }
+  }
+
+  do
+  {
+    TINFL_GET_BITS(3, r->m_final, 3); r->m_type = r->m_final >> 1;
+    if (r->m_type == 0)
+    {
+      TINFL_SKIP_BITS(5, num_bits & 7);
+      for (counter = 0; counter < 4; ++counter) { if (num_bits) TINFL_GET_BITS(6, r->m_raw_header[counter], 8); else TINFL_GET_BYTE(7, r->m_raw_header[counter]); }
+      if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != (mz_uint)(0xFFFF ^ (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); }
+      while ((counter) && (num_bits))
+      {
+        TINFL_GET_BITS(51, dist, 8);
+        while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); }
+        *pOut_buf_cur++ = (mz_uint8)dist;
+        counter--;
+      }
+      while (counter)
+      {
+        size_t n; while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); }
+        while (pIn_buf_cur >= pIn_buf_end)
+        {
+          TINFL_CR_RETURN(38, (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) ? TINFL_STATUS_NEEDS_MORE_INPUT : TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS);
+        }
+        n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), (size_t)(pIn_buf_end - pIn_buf_cur)), counter);
+        TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); pIn_buf_cur += n; pOut_buf_cur += n; counter -= (mz_uint)n;
+      }
+    }
+    else if (r->m_type == 3)
+    {
+      TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED);
+    }
+    else
+    {
+      if (r->m_type == 1)
+      {
+        mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i;
+        r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32);
+        for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8;
+      }
+      else
+      {
+        for (counter = 0; counter < 3; counter++) { TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); r->m_table_sizes[counter] += s_min_table_sizes[counter]; }
+        MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); for (counter = 0; counter < r->m_table_sizes[2]; counter++) { mz_uint s; TINFL_GET_BITS(14, s, 3); r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; }
+        r->m_table_sizes[2] = 19;
+      }
+      for ( ; (int)r->m_type >= 0; r->m_type--)
+      {
+        int tree_next, tree_cur; tinfl_huff_table *pTable;
+        mz_uint i, j, used_syms, total, sym_index, next_code[17], total_syms[16]; pTable = &r->m_tables[r->m_type]; MZ_CLEAR_OBJ(total_syms); MZ_CLEAR_OBJ(pTable->m_look_up); MZ_CLEAR_OBJ(pTable->m_tree);
+        for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) total_syms[pTable->m_code_size[i]]++;
+        used_syms = 0, total = 0; next_code[0] = next_code[1] = 0;
+        for (i = 1; i <= 15; ++i) { used_syms += total_syms[i]; next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); }
+        if ((65536 != total) && (used_syms > 1))
+        {
+          TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED);
+        }
+        for (tree_next = -1, sym_index = 0; sym_index < r->m_table_sizes[r->m_type]; ++sym_index)
+        {
+          mz_uint rev_code = 0, l, cur_code, code_size = pTable->m_code_size[sym_index]; if (!code_size) continue;
+          cur_code = next_code[code_size]++; for (l = code_size; l > 0; l--, cur_code >>= 1) rev_code = (rev_code << 1) | (cur_code & 1);
+          if (code_size <= TINFL_FAST_LOOKUP_BITS) { mz_int16 k = (mz_int16)((code_size << 9) | sym_index); while (rev_code < TINFL_FAST_LOOKUP_SIZE) { pTable->m_look_up[rev_code] = k; rev_code += (1 << code_size); } continue; }
+          if (0 == (tree_cur = pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)])) { pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; }
+          rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1);
+          for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--)
+          {
+            tree_cur -= ((rev_code >>= 1) & 1);
+            if (!pTable->m_tree[-tree_cur - 1]) { pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; tree_cur = tree_next; tree_next -= 2; } else tree_cur = pTable->m_tree[-tree_cur - 1];
+          }
+          tree_cur -= ((rev_code >>= 1) & 1); pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index;
+        }
+        if (r->m_type == 2)
+        {
+          for (counter = 0; counter < (r->m_table_sizes[0] + r->m_table_sizes[1]); )
+          {
+            mz_uint s; TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); if (dist < 16) { r->m_len_codes[counter++] = (mz_uint8)dist; continue; }
+            if ((dist == 16) && (!counter))
+            {
+              TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED);
+            }
+            num_extra = "\02\03\07"[dist - 16]; TINFL_GET_BITS(18, s, num_extra); s += "\03\03\013"[dist - 16];
+            TINFL_MEMSET(r->m_len_codes + counter, (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); counter += s;
+          }
+          if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter)
+          {
+            TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED);
+          }
+          TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, r->m_table_sizes[0]); TINFL_MEMCPY(r->m_tables[1].m_code_size, r->m_len_codes + r->m_table_sizes[0], r->m_table_sizes[1]);
+        }
+      }
+      for ( ; ; )
+      {
+        mz_uint8 *pSrc;
+        for ( ; ; )
+        {
+          if (((pIn_buf_end - pIn_buf_cur) < 4) || ((pOut_buf_end - pOut_buf_cur) < 2))
+          {
+            TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]);
+            if (counter >= 256)
+              break;
+            while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); }
+            *pOut_buf_cur++ = (mz_uint8)counter;
+          }
+          else
+          {
+            int sym2; mz_uint code_len;
+#if TINFL_USE_64BIT_BITBUF
+            if (num_bits < 30) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); pIn_buf_cur += 4; num_bits += 32; }
+#else
+            if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; }
+#endif
+            if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0)
+              code_len = sym2 >> 9;
+            else
+            {
+              code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0);
+            }
+            counter = sym2; bit_buf >>= code_len; num_bits -= code_len;
+            if (counter & 256)
+              break;
+
+#if !TINFL_USE_64BIT_BITBUF
+            if (num_bits < 15) { bit_buf |= (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); pIn_buf_cur += 2; num_bits += 16; }
+#endif
+            if ((sym2 = r->m_tables[0].m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= 0)
+              code_len = sym2 >> 9;
+            else
+            {
+              code_len = TINFL_FAST_LOOKUP_BITS; do { sym2 = r->m_tables[0].m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; } while (sym2 < 0);
+            }
+            bit_buf >>= code_len; num_bits -= code_len;
+
+            pOut_buf_cur[0] = (mz_uint8)counter;
+            if (sym2 & 256)
+            {
+              pOut_buf_cur++;
+              counter = sym2;
+              break;
+            }
+            pOut_buf_cur[1] = (mz_uint8)sym2;
+            pOut_buf_cur += 2;
+          }
+        }
+        if ((counter &= 511) == 256) break;
+
+        num_extra = s_length_extra[counter - 257]; counter = s_length_base[counter - 257];
+        if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(25, extra_bits, num_extra); counter += extra_bits; }
+
+        TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]);
+        num_extra = s_dist_extra[dist]; dist = s_dist_base[dist];
+        if (num_extra) { mz_uint extra_bits; TINFL_GET_BITS(27, extra_bits, num_extra); dist += extra_bits; }
+
+        dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start;
+        if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))
+        {
+          TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED);
+        }
+
+        pSrc = pOut_buf_start + ((dist_from_out_buf_start - dist) & out_buf_size_mask);
+
+        if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end)
+        {
+          while (counter--)
+          {
+            while (pOut_buf_cur >= pOut_buf_end) { TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); }
+            *pOut_buf_cur++ = pOut_buf_start[(dist_from_out_buf_start++ - dist) & out_buf_size_mask];
+          }
+          continue;
+        }
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES
+        else if ((counter >= 9) && (counter <= dist))
+        {
+          const mz_uint8 *pSrc_end = pSrc + (counter & ~7);
+          do
+          {
+            ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0];
+            ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1];
+            pOut_buf_cur += 8;
+          } while ((pSrc += 8) < pSrc_end);
+          if ((counter &= 7) < 3)
+          {
+            if (counter)
+            {
+              pOut_buf_cur[0] = pSrc[0];
+              if (counter > 1)
+                pOut_buf_cur[1] = pSrc[1];
+              pOut_buf_cur += counter;
+            }
+            continue;
+          }
+        }
+#endif
+        do
+        {
+          pOut_buf_cur[0] = pSrc[0];
+          pOut_buf_cur[1] = pSrc[1];
+          pOut_buf_cur[2] = pSrc[2];
+          pOut_buf_cur += 3; pSrc += 3;
+        } while ((int)(counter -= 3) > 2);
+        if ((int)counter > 0)
+        {
+          pOut_buf_cur[0] = pSrc[0];
+          if ((int)counter > 1)
+            pOut_buf_cur[1] = pSrc[1];
+          pOut_buf_cur += counter;
+        }
+      }
+    }
+  } while (!(r->m_final & 1));
+
+  // Ensure byte alignment and put back any bytes from the bitbuf if we've looked ahead too far on gzip, or other Deflate streams followed by arbitrary data.
+  // I'm being super conservative here. A number of simplifications can be made to the byte alignment part, and the Adler32 check shouldn't ever need to worry about reading from the bitbuf now.
+  TINFL_SKIP_BITS(32, num_bits & 7);
+  while ((pIn_buf_cur > pIn_buf_next) && (num_bits >= 8)) { --pIn_buf_cur; num_bits -= 8; } bit_buf &= (tinfl_bit_buf_t)((1ULL << num_bits) - 1ULL);
+  MZ_ASSERT(!num_bits); // if this assert fires then we've read beyond the end of non-deflate/zlib streams with following data (such as gzip streams).
+
+  if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER)
+  {
+    for (counter = 0; counter < 4; ++counter) { mz_uint s; if (num_bits) TINFL_GET_BITS(41, s, 8); else TINFL_GET_BYTE(42, s); r->m_z_adler32 = (r->m_z_adler32 << 8) | s; }
+  }
+  TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE);
+
+  TINFL_CR_FINISH
+
+common_exit:
+  // As long as we aren't telling the caller that we NEED more input to make forward progress:
+  // Put back any bytes from the bitbuf in case we've looked ahead too far on gzip, or other Deflate streams followed by arbitrary data.
+  // We need to be very careful here to NOT push back any bytes we definitely know we need to make forward progress, though, or we'll lock the caller up into an inf loop.
+  if ((status != TINFL_STATUS_NEEDS_MORE_INPUT) && (status != TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS)) { while ((pIn_buf_cur > pIn_buf_next) && (num_bits >= 8)) { --pIn_buf_cur; num_bits -= 8; } }
+  r->m_num_bits = num_bits; r->m_bit_buf = bit_buf & (tinfl_bit_buf_t)((1ULL << num_bits) - 1ULL); r->m_dist = dist; r->m_counter = counter; r->m_num_extra = num_extra; r->m_dist_from_out_buf_start = dist_from_out_buf_start;
+  *pIn_buf_size = pIn_buf_cur - pIn_buf_next; *pOut_buf_size = pOut_buf_cur - pOut_buf_next;
+  if ((decomp_flags & (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && (status >= 0))
+  {
+    const mz_uint8 *ptr = pOut_buf_next; size_t buf_len = *pOut_buf_size;
+    mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, s2 = r->m_check_adler32 >> 16; size_t block_len = buf_len % 5552;
+    while (buf_len)
+    {
+      for (i = 0; i + 7 < block_len; i += 8, ptr += 8)
+      {
+        s1 += ptr[0], s2 += s1; s1 += ptr[1], s2 += s1; s1 += ptr[2], s2 += s1; s1 += ptr[3], s2 += s1;
+        s1 += ptr[4], s2 += s1; s1 += ptr[5], s2 += s1; s1 += ptr[6], s2 += s1; s1 += ptr[7], s2 += s1;
+      }
+      for ( ; i < block_len; ++i) s1 += *ptr++, s2 += s1;
+      s1 %= 65521U, s2 %= 65521U; buf_len -= block_len; block_len = 5552;
+    }
+    r->m_check_adler32 = (s2 << 16) + s1; if ((status == TINFL_STATUS_DONE) && (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && (r->m_check_adler32 != r->m_z_adler32)) status = TINFL_STATUS_ADLER32_MISMATCH;
+  }
+  return status;
+}
+
+// Higher level helper functions.
+void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
+{
+  tinfl_decompressor decomp; void *pBuf = NULL, *pNew_buf; size_t src_buf_ofs = 0, out_buf_capacity = 0;
+  *pOut_len = 0;
+  tinfl_init(&decomp);
+  for ( ; ; )
+  {
+    size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity;
+    tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8*)pBuf, pBuf ? (mz_uint8*)pBuf + *pOut_len : NULL, &dst_buf_size,
+      (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
+    if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT))
+    {
+      MZ_FREE(pBuf); *pOut_len = 0; return NULL;
+    }
+    src_buf_ofs += src_buf_size;
+    *pOut_len += dst_buf_size;
+    if (status == TINFL_STATUS_DONE) break;
+    new_out_buf_capacity = out_buf_capacity * 2; if (new_out_buf_capacity < 128) new_out_buf_capacity = 128;
+    pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity);
+    if (!pNew_buf)
+    {
+      MZ_FREE(pBuf); *pOut_len = 0; return NULL;
+    }
+    pBuf = pNew_buf; out_buf_capacity = new_out_buf_capacity;
+  }
+  return pBuf;
+}
+
+size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
+{
+  tinfl_decompressor decomp; tinfl_status status; tinfl_init(&decomp);
+  status = tinfl_decompress(&decomp, (const mz_uint8*)pSrc_buf, &src_buf_len, (mz_uint8*)pOut_buf, (mz_uint8*)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
+  return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len;
+}
+
+int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
+{
+  int result = 0;
+  tinfl_decompressor decomp;
+  mz_uint8 *pDict = (mz_uint8*)MZ_MALLOC(TINFL_LZ_DICT_SIZE); size_t in_buf_ofs = 0, dict_ofs = 0;
+  if (!pDict)
+    return TINFL_STATUS_FAILED;
+  tinfl_init(&decomp);
+  for ( ; ; )
+  {
+    size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs;
+    tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8*)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size,
+      (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)));
+    in_buf_ofs += in_buf_size;
+    if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user)))
+      break;
+    if (status != TINFL_STATUS_HAS_MORE_OUTPUT)
+    {
+      result = (status == TINFL_STATUS_DONE);
+      break;
+    }
+    dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1);
+  }
+  MZ_FREE(pDict);
+  *pIn_buf_size = in_buf_ofs;
+  return result;
+}
+
+// ------------------- Low-level Compression (independent from all decompression API's)
+
+// Purposely making these tables static for faster init and thread safety.
+static const mz_uint16 s_tdefl_len_sym[256] = {
+  257,258,259,260,261,262,263,264,265,265,266,266,267,267,268,268,269,269,269,269,270,270,270,270,271,271,271,271,272,272,272,272,
+  273,273,273,273,273,273,273,273,274,274,274,274,274,274,274,274,275,275,275,275,275,275,275,275,276,276,276,276,276,276,276,276,
+  277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,277,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,
+  279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,
+  281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,281,
+  282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,282,
+  283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,
+  284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,285 };
+
+static const mz_uint8 s_tdefl_len_extra[256] = {
+  0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
+  4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
+  5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+  5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0 };
+
+static const mz_uint8 s_tdefl_small_dist_sym[512] = {
+  0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,
+  11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,
+  13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,
+  14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
+  14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
+  15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16,
+  16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
+  16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
+  16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
+  17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
+  17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
+  17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 };
+
+static const mz_uint8 s_tdefl_small_dist_extra[512] = {
+  0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,
+  5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+  6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+  6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+  7,7,7,7,7,7,7,7 };
+
+static const mz_uint8 s_tdefl_large_dist_sym[128] = {
+  0,0,18,19,20,20,21,21,22,22,22,22,23,23,23,23,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,
+  26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+  28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 };
+
+static const mz_uint8 s_tdefl_large_dist_extra[128] = {
+  0,0,8,8,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+  12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
+  13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13 };
+
+// Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted values.
+typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq;
+static tdefl_sym_freq* tdefl_radix_sort_syms(mz_uint num_syms, tdefl_sym_freq* pSyms0, tdefl_sym_freq* pSyms1)
+{
+  mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; tdefl_sym_freq* pCur_syms = pSyms0, *pNew_syms = pSyms1; MZ_CLEAR_OBJ(hist);
+  for (i = 0; i < num_syms; i++) { mz_uint freq = pSyms0[i].m_key; hist[freq & 0xFF]++; hist[256 + ((freq >> 8) & 0xFF)]++; }
+  while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) total_passes--;
+  for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8)
+  {
+    const mz_uint32* pHist = &hist[pass << 8];
+    mz_uint offsets[256], cur_ofs = 0;
+    for (i = 0; i < 256; i++) { offsets[i] = cur_ofs; cur_ofs += pHist[i]; }
+    for (i = 0; i < num_syms; i++) pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = pCur_syms[i];
+    { tdefl_sym_freq* t = pCur_syms; pCur_syms = pNew_syms; pNew_syms = t; }
+  }
+  return pCur_syms;
+}
+
+// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, alistair@cs.mu.oz.au, Jyrki Katajainen, jyrki@diku.dk, November 1996.
+static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n)
+{
+  int root, leaf, next, avbl, used, dpth;
+  if (n==0) return; else if (n==1) { A[0].m_key = 1; return; }
+  A[0].m_key += A[1].m_key; root = 0; leaf = 2;
+  for (next=1; next < n-1; next++)
+  {
+    if (leaf>=n || A[root].m_key<A[leaf].m_key) { A[next].m_key = A[root].m_key; A[root++].m_key = (mz_uint16)next; } else A[next].m_key = A[leaf++].m_key;
+    if (leaf>=n || (root<next && A[root].m_key<A[leaf].m_key)) { A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); A[root++].m_key = (mz_uint16)next; } else A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key);
+  }
+  A[n-2].m_key = 0; for (next=n-3; next>=0; next--) A[next].m_key = A[A[next].m_key].m_key+1;
+  avbl = 1; used = dpth = 0; root = n-2; next = n-1;
+  while (avbl>0)
+  {
+    while (root>=0 && (int)A[root].m_key==dpth) { used++; root--; }
+    while (avbl>used) { A[next--].m_key = (mz_uint16)(dpth); avbl--; }
+    avbl = 2*used; dpth++; used = 0;
+  }
+}
+
+// Limits canonical Huffman code table's max code size.
+enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 };
+static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, int code_list_len, int max_code_size)
+{
+  int i; mz_uint32 total = 0; if (code_list_len <= 1) return;
+  for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) pNum_codes[max_code_size] += pNum_codes[i];
+  for (i = max_code_size; i > 0; i--) total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i));
+  while (total != (1UL << max_code_size))
+  {
+    pNum_codes[max_code_size]--;
+    for (i = max_code_size - 1; i > 0; i--) if (pNum_codes[i]) { pNum_codes[i]--; pNum_codes[i + 1] += 2; break; }
+    total--;
+  }
+}
+
+static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, int table_len, int code_size_limit, int static_table)
+{
+  int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; MZ_CLEAR_OBJ(num_codes);
+  if (static_table)
+  {
+    for (i = 0; i < table_len; i++) num_codes[d->m_huff_code_sizes[table_num][i]]++;
+  }
+  else
+  {
+    tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], *pSyms;
+    int num_used_syms = 0;
+    const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0];
+    for (i = 0; i < table_len; i++) if (pSym_count[i]) { syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; syms0[num_used_syms++].m_sym_index = (mz_uint16)i; }
+
+    pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); tdefl_calculate_minimum_redundancy(pSyms, num_used_syms);
+
+    for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++;
+
+    tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, code_size_limit);
+
+    MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); MZ_CLEAR_OBJ(d->m_huff_codes[table_num]);
+    for (i = 1, j = num_used_syms; i <= code_size_limit; i++)
+      for (l = num_codes[i]; l > 0; l--) d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i);
+  }
+
+  next_code[1] = 0; for (j = 0, i = 2; i <= code_size_limit; i++) next_code[i] = j = ((j + num_codes[i - 1]) << 1);
+
+  for (i = 0; i < table_len; i++)
+  {
+    mz_uint rev_code = 0, code, code_size; if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue;
+    code = next_code[code_size]++; for (l = code_size; l > 0; l--, code >>= 1) rev_code = (rev_code << 1) | (code & 1);
+    d->m_huff_codes[table_num][i] = (mz_uint16)rev_code;
+  }
+}
+
+#define TDEFL_PUT_BITS(b, l) do { \
+  mz_uint bits = b; mz_uint len = l; MZ_ASSERT(bits <= ((1U << len) - 1U)); \
+  d->m_bit_buffer |= (bits << d->m_bits_in); d->m_bits_in += len; \
+  while (d->m_bits_in >= 8) { \
+    if (d->m_pOutput_buf < d->m_pOutput_buf_end) \
+      *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \
+      d->m_bit_buffer >>= 8; \
+      d->m_bits_in -= 8; \
+  } \
+} MZ_MACRO_END
+
+#define TDEFL_RLE_PREV_CODE_SIZE() { if (rle_repeat_count) { \
+  if (rle_repeat_count < 3) { \
+    d->m_huff_count[2][prev_code_size] = (mz_uint16)(d->m_huff_count[2][prev_code_size] + rle_repeat_count); \
+    while (rle_repeat_count--) packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \
+  } else { \
+    d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); packed_code_sizes[num_packed_code_sizes++] = 16; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_repeat_count - 3); \
+} rle_repeat_count = 0; } }
+
+#define TDEFL_RLE_ZERO_CODE_SIZE() { if (rle_z_count) { \
+  if (rle_z_count < 3) { \
+    d->m_huff_count[2][0] = (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \
+  } else if (rle_z_count <= 10) { \
+    d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); packed_code_sizes[num_packed_code_sizes++] = 17; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 3); \
+  } else { \
+    d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); packed_code_sizes[num_packed_code_sizes++] = 18; packed_code_sizes[num_packed_code_sizes++] = (mz_uint8)(rle_z_count - 11); \
+} rle_z_count = 0; } }
+
+static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 };
+
+static void tdefl_start_dynamic_block(tdefl_compressor *d)
+{
+  int num_lit_codes, num_dist_codes, num_bit_lengths; mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, rle_repeat_count, packed_code_sizes_index;
+  mz_uint8 code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], packed_code_sizes[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], prev_code_size = 0xFF;
+
+  d->m_huff_count[0][256] = 1;
+
+  tdefl_optimize_huffman_table(d, 0, TDEFL_MAX_HUFF_SYMBOLS_0, 15, MZ_FALSE);
+  tdefl_optimize_huffman_table(d, 1, TDEFL_MAX_HUFF_SYMBOLS_1, 15, MZ_FALSE);
+
+  for (num_lit_codes = 286; num_lit_codes > 257; num_lit_codes--) if (d->m_huff_code_sizes[0][num_lit_codes - 1]) break;
+  for (num_dist_codes = 30; num_dist_codes > 1; num_dist_codes--) if (d->m_huff_code_sizes[1][num_dist_codes - 1]) break;
+
+  memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes);
+  memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes);
+  total_code_sizes_to_pack = num_lit_codes + num_dist_codes; num_packed_code_sizes = 0; rle_z_count = 0; rle_repeat_count = 0;
+
+  memset(&d->m_huff_count[2][0], 0, sizeof(d->m_huff_count[2][0]) * TDEFL_MAX_HUFF_SYMBOLS_2);
+  for (i = 0; i < total_code_sizes_to_pack; i++)
+  {
+    mz_uint8 code_size = code_sizes_to_pack[i];
+    if (!code_size)
+    {
+      TDEFL_RLE_PREV_CODE_SIZE();
+      if (++rle_z_count == 138) { TDEFL_RLE_ZERO_CODE_SIZE(); }
+    }
+    else
+    {
+      TDEFL_RLE_ZERO_CODE_SIZE();
+      if (code_size != prev_code_size)
+      {
+        TDEFL_RLE_PREV_CODE_SIZE();
+        d->m_huff_count[2][code_size] = (mz_uint16)(d->m_huff_count[2][code_size] + 1); packed_code_sizes[num_packed_code_sizes++] = code_size;
+      }
+      else if (++rle_repeat_count == 6)
+      {
+        TDEFL_RLE_PREV_CODE_SIZE();
+      }
+    }
+    prev_code_size = code_size;
+  }
+  if (rle_repeat_count) { TDEFL_RLE_PREV_CODE_SIZE(); } else { TDEFL_RLE_ZERO_CODE_SIZE(); }
+
+  tdefl_optimize_huffman_table(d, 2, TDEFL_MAX_HUFF_SYMBOLS_2, 7, MZ_FALSE);
+
+  TDEFL_PUT_BITS(2, 2);
+
+  TDEFL_PUT_BITS(num_lit_codes - 257, 5);
+  TDEFL_PUT_BITS(num_dist_codes - 1, 5);
+
+  for (num_bit_lengths = 18; num_bit_lengths >= 0; num_bit_lengths--) if (d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[num_bit_lengths]]) break;
+  num_bit_lengths = MZ_MAX(4, (num_bit_lengths + 1)); TDEFL_PUT_BITS(num_bit_lengths - 4, 4);
+  for (i = 0; (int)i < num_bit_lengths; i++) TDEFL_PUT_BITS(d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3);
+
+  for (packed_code_sizes_index = 0; packed_code_sizes_index < num_packed_code_sizes; )
+  {
+    mz_uint code = packed_code_sizes[packed_code_sizes_index++]; MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2);
+    TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]);
+    if (code >= 16) TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], "\02\03\07"[code - 16]);
+  }
+}
+
+static void tdefl_start_static_block(tdefl_compressor *d)
+{
+  mz_uint i;
+  mz_uint8 *p = &d->m_huff_code_sizes[0][0];
+
+  for (i = 0; i <= 143; ++i) *p++ = 8;
+  for ( ; i <= 255; ++i) *p++ = 9;
+  for ( ; i <= 279; ++i) *p++ = 7;
+  for ( ; i <= 287; ++i) *p++ = 8;
+
+  memset(d->m_huff_code_sizes[1], 5, 32);
+
+  tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE);
+  tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE);
+
+  TDEFL_PUT_BITS(1, 2);
+}
+
+static const mz_uint mz_bitmasks[17] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF };
+
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS
+static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d)
+{
+  mz_uint flags;
+  mz_uint8 *pLZ_codes;
+  mz_uint8 *pOutput_buf = d->m_pOutput_buf;
+  mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf;
+  mz_uint64 bit_buffer = d->m_bit_buffer;
+  mz_uint bits_in = d->m_bits_in;
+
+#define TDEFL_PUT_BITS_FAST(b, l) { bit_buffer |= (((mz_uint64)(b)) << bits_in); bits_in += (l); }
+
+  flags = 1;
+  for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; flags >>= 1)
+  {
+    if (flags == 1)
+      flags = *pLZ_codes++ | 0x100;
+
+    if (flags & 1)
+    {
+      mz_uint s0, s1, n0, n1, sym, num_extra_bits;
+      mz_uint match_len = pLZ_codes[0], match_dist = *(const mz_uint16 *)(pLZ_codes + 1); pLZ_codes += 3;
+
+      MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]);
+      TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]);
+      TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]);
+
+      // This sequence coaxes MSVC into using cmov's vs. jmp's.
+      s0 = s_tdefl_small_dist_sym[match_dist & 511];
+      n0 = s_tdefl_small_dist_extra[match_dist & 511];
+      s1 = s_tdefl_large_dist_sym[match_dist >> 8];
+      n1 = s_tdefl_large_dist_extra[match_dist >> 8];
+      sym = (match_dist < 512) ? s0 : s1;
+      num_extra_bits = (match_dist < 512) ? n0 : n1;
+
+      MZ_ASSERT(d->m_huff_code_sizes[1][sym]);
+      TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]);
+      TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits);
+    }
+    else
+    {
+      mz_uint lit = *pLZ_codes++;
+      MZ_ASSERT(d->m_huff_code_sizes[0][lit]);
+      TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]);
+
+      if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end))
+      {
+        flags >>= 1;
+        lit = *pLZ_codes++;
+        MZ_ASSERT(d->m_huff_code_sizes[0][lit]);
+        TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]);
+
+        if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end))
+        {
+          flags >>= 1;
+          lit = *pLZ_codes++;
+          MZ_ASSERT(d->m_huff_code_sizes[0][lit]);
+          TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]);
+        }
+      }
+    }
+
+    if (pOutput_buf >= d->m_pOutput_buf_end)
+      return MZ_FALSE;
+
+    *(mz_uint64*)pOutput_buf = bit_buffer;
+    pOutput_buf += (bits_in >> 3);
+    bit_buffer >>= (bits_in & ~7);
+    bits_in &= 7;
+  }
+
+#undef TDEFL_PUT_BITS_FAST
+
+  d->m_pOutput_buf = pOutput_buf;
+  d->m_bits_in = 0;
+  d->m_bit_buffer = 0;
+
+  while (bits_in)
+  {
+    mz_uint32 n = MZ_MIN(bits_in, 16);
+    TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n);
+    bit_buffer >>= n;
+    bits_in -= n;
+  }
+
+  TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]);
+
+  return (d->m_pOutput_buf < d->m_pOutput_buf_end);
+}
+#else
+static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d)
+{
+  mz_uint flags;
+  mz_uint8 *pLZ_codes;
+
+  flags = 1;
+  for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1)
+  {
+    if (flags == 1)
+      flags = *pLZ_codes++ | 0x100;
+    if (flags & 1)
+    {
+      mz_uint sym, num_extra_bits;
+      mz_uint match_len = pLZ_codes[0], match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); pLZ_codes += 3;
+
+      MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]);
+      TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]);
+      TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], s_tdefl_len_extra[match_len]);
+
+      if (match_dist < 512)
+      {
+        sym = s_tdefl_small_dist_sym[match_dist]; num_extra_bits = s_tdefl_small_dist_extra[match_dist];
+      }
+      else
+      {
+        sym = s_tdefl_large_dist_sym[match_dist >> 8]; num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8];
+      }
+      MZ_ASSERT(d->m_huff_code_sizes[1][sym]);
+      TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]);
+      TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits);
+    }
+    else
+    {
+      mz_uint lit = *pLZ_codes++;
+      MZ_ASSERT(d->m_huff_code_sizes[0][lit]);
+      TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]);
+    }
+  }
+
+  TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]);
+
+  return (d->m_pOutput_buf < d->m_pOutput_buf_end);
+}
+#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && MINIZ_HAS_64BIT_REGISTERS
+
+static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block)
+{
+  if (static_block)
+    tdefl_start_static_block(d);
+  else
+    tdefl_start_dynamic_block(d);
+  return tdefl_compress_lz_codes(d);
+}
+
+static int tdefl_flush_block(tdefl_compressor *d, int flush)
+{
+  mz_uint saved_bit_buf, saved_bits_in;
+  mz_uint8 *pSaved_output_buf;
+  mz_bool comp_block_succeeded = MZ_FALSE;
+  int n, use_raw_block = ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size;
+  mz_uint8 *pOutput_buf_start = ((d->m_pPut_buf_func == NULL) && ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) : d->m_output_buf;
+
+  d->m_pOutput_buf = pOutput_buf_start;
+  d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16;
+
+  MZ_ASSERT(!d->m_output_flush_remaining);
+  d->m_output_flush_ofs = 0;
+  d->m_output_flush_remaining = 0;
+
+  *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left);
+  d->m_pLZ_code_buf -= (d->m_num_flags_left == 8);
+
+  if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index))
+  {
+    TDEFL_PUT_BITS(0x78, 8); TDEFL_PUT_BITS(0x01, 8);
+  }
+
+  TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1);
+
+  pSaved_output_buf = d->m_pOutput_buf; saved_bit_buf = d->m_bit_buffer; saved_bits_in = d->m_bits_in;
+
+  if (!use_raw_block)
+    comp_block_succeeded = tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || (d->m_total_lz_bytes < 48));
+
+  // If the block gets expanded, forget the current contents of the output buffer and send a raw block instead.
+  if ( ((use_raw_block) || ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= d->m_total_lz_bytes))) &&
+       ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size) )
+  {
+    mz_uint i; d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in;
+    TDEFL_PUT_BITS(0, 2);
+    if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); }
+    for (i = 2; i; --i, d->m_total_lz_bytes ^= 0xFFFF)
+    {
+      TDEFL_PUT_BITS(d->m_total_lz_bytes & 0xFFFF, 16);
+    }
+    for (i = 0; i < d->m_total_lz_bytes; ++i)
+    {
+      TDEFL_PUT_BITS(d->m_dict[(d->m_lz_code_buf_dict_pos + i) & TDEFL_LZ_DICT_SIZE_MASK], 8);
+    }
+  }
+  // Check for the extremely unlikely (if not impossible) case of the compressed block not fitting into the output buffer when using dynamic codes.
+  else if (!comp_block_succeeded)
+  {
+    d->m_pOutput_buf = pSaved_output_buf; d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in;
+    tdefl_compress_block(d, MZ_TRUE);
+  }
+
+  if (flush)
+  {
+    if (flush == TDEFL_FINISH)
+    {
+      if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); }
+      if (d->m_flags & TDEFL_WRITE_ZLIB_HEADER) { mz_uint i, a = d->m_adler32; for (i = 0; i < 4; i++) { TDEFL_PUT_BITS((a >> 24) & 0xFF, 8); a <<= 8; } }
+    }
+    else
+    {
+      mz_uint i, z = 0; TDEFL_PUT_BITS(0, 3); if (d->m_bits_in) { TDEFL_PUT_BITS(0, 8 - d->m_bits_in); } for (i = 2; i; --i, z ^= 0xFFFF) { TDEFL_PUT_BITS(z & 0xFFFF, 16); }
+    }
+  }
+
+  MZ_ASSERT(d->m_pOutput_buf < d->m_pOutput_buf_end);
+
+  memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0);
+  memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1);
+
+  d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8; d->m_lz_code_buf_dict_pos += d->m_total_lz_bytes; d->m_total_lz_bytes = 0; d->m_block_index++;
+
+  if ((n = (int)(d->m_pOutput_buf - pOutput_buf_start)) != 0)
+  {
+    if (d->m_pPut_buf_func)
+    {
+      *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf;
+      if (!(*d->m_pPut_buf_func)(d->m_output_buf, n, d->m_pPut_buf_user))
+        return (d->m_prev_return_status = TDEFL_STATUS_PUT_BUF_FAILED);
+    }
+    else if (pOutput_buf_start == d->m_output_buf)
+    {
+      int bytes_to_copy = (int)MZ_MIN((size_t)n, (size_t)(*d->m_pOut_buf_size - d->m_out_buf_ofs));
+      memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy);
+      d->m_out_buf_ofs += bytes_to_copy;
+      if ((n -= bytes_to_copy) != 0)
+      {
+        d->m_output_flush_ofs = bytes_to_copy;
+        d->m_output_flush_remaining = n;
+      }
+    }
+    else
+    {
+      d->m_out_buf_ofs += n;
+    }
+  }
+
+  return d->m_output_flush_remaining;
+}
+
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES
+#define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16*)(p)
+static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len)
+{
+  mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len;
+  mz_uint num_probes_left = d->m_max_probes[match_len >= 32];
+  const mz_uint16 *s = (const mz_uint16*)(d->m_dict + pos), *p, *q;
+  mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), s01 = TDEFL_READ_UNALIGNED_WORD(s);
+  MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return;
+  for ( ; ; )
+  {
+    for ( ; ; )
+    {
+      if (--num_probes_left == 0) return;
+      #define TDEFL_PROBE \
+        next_probe_pos = d->m_next[probe_pos]; \
+        if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \
+        probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \
+        if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break;
+      TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE;
+    }
+    if (!dist) break; q = (const mz_uint16*)(d->m_dict + probe_pos); if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; p = s; probe_len = 32;
+    do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) &&
+                   (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) );
+    if (!probe_len)
+    {
+      *pMatch_dist = dist; *pMatch_len = MZ_MIN(max_match_len, TDEFL_MAX_MATCH_LEN); break;
+    }
+    else if ((probe_len = ((mz_uint)(p - s) * 2) + (mz_uint)(*(const mz_uint8*)p == *(const mz_uint8*)q)) > match_len)
+    {
+      *pMatch_dist = dist; if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == max_match_len) break;
+      c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]);
+    }
+  }
+}
+#else
+static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len)
+{
+  mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len;
+  mz_uint num_probes_left = d->m_max_probes[match_len >= 32];
+  const mz_uint8 *s = d->m_dict + pos, *p, *q;
+  mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1];
+  MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return;
+  for ( ; ; )
+  {
+    for ( ; ; )
+    {
+      if (--num_probes_left == 0) return;
+      #define TDEFL_PROBE \
+        next_probe_pos = d->m_next[probe_pos]; \
+        if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \
+        probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \
+        if ((d->m_dict[probe_pos + match_len] == c0) && (d->m_dict[probe_pos + match_len - 1] == c1)) break;
+      TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE;
+    }
+    if (!dist) break; p = s; q = d->m_dict + probe_pos; for (probe_len = 0; probe_len < max_match_len; probe_len++) if (*p++ != *q++) break;
+    if (probe_len > match_len)
+    {
+      *pMatch_dist = dist; if ((*pMatch_len = match_len = probe_len) == max_match_len) return;
+      c0 = d->m_dict[pos + match_len]; c1 = d->m_dict[pos + match_len - 1];
+    }
+  }
+}
+#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES
+
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+static mz_bool tdefl_compress_fast(tdefl_compressor *d)
+{
+  // Faster, minimally featured LZRW1-style match+parse loop with better register utilization. Intended for applications where raw throughput is valued more highly than ratio.
+  mz_uint lookahead_pos = d->m_lookahead_pos, lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, total_lz_bytes = d->m_total_lz_bytes, num_flags_left = d->m_num_flags_left;
+  mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags;
+  mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK;
+
+  while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size)))
+  {
+    const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096;
+    mz_uint dst_pos = (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK;
+    mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size);
+    d->m_src_buf_left -= num_bytes_to_process;
+    lookahead_size += num_bytes_to_process;
+
+    while (num_bytes_to_process)
+    {
+      mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process);
+      memcpy(d->m_dict + dst_pos, d->m_pSrc, n);
+      if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1))
+        memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos));
+      d->m_pSrc += n;
+      dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK;
+      num_bytes_to_process -= n;
+    }
+
+    dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size);
+    if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) break;
+
+    while (lookahead_size >= 4)
+    {
+      mz_uint cur_match_dist, cur_match_len = 1;
+      mz_uint8 *pCur_dict = d->m_dict + cur_pos;
+      mz_uint first_trigram = (*(const mz_uint32 *)pCur_dict) & 0xFFFFFF;
+      mz_uint hash = (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & TDEFL_LEVEL1_HASH_SIZE_MASK;
+      mz_uint probe_pos = d->m_hash[hash];
+      d->m_hash[hash] = (mz_uint16)lookahead_pos;
+
+      if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= dict_size) && ((*(const mz_uint32 *)(d->m_dict + (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & 0xFFFFFF) == first_trigram))
+      {
+        const mz_uint16 *p = (const mz_uint16 *)pCur_dict;
+        const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos);
+        mz_uint32 probe_len = 32;
+        do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) &&
+          (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) );
+        cur_match_len = ((mz_uint)(p - (const mz_uint16 *)pCur_dict) * 2) + (mz_uint)(*(const mz_uint8 *)p == *(const mz_uint8 *)q);
+        if (!probe_len)
+          cur_match_len = cur_match_dist ? TDEFL_MAX_MATCH_LEN : 0;
+
+        if ((cur_match_len < TDEFL_MIN_MATCH_LEN) || ((cur_match_len == TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 8U*1024U)))
+        {
+          cur_match_len = 1;
+          *pLZ_code_buf++ = (mz_uint8)first_trigram;
+          *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1);
+          d->m_huff_count[0][(mz_uint8)first_trigram]++;
+        }
+        else
+        {
+          mz_uint32 s0, s1;
+          cur_match_len = MZ_MIN(cur_match_len, lookahead_size);
+
+          MZ_ASSERT((cur_match_len >= TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 1) && (cur_match_dist <= TDEFL_LZ_DICT_SIZE));
+
+          cur_match_dist--;
+
+          pLZ_code_buf[0] = (mz_uint8)(cur_match_len - TDEFL_MIN_MATCH_LEN);
+          *(mz_uint16 *)(&pLZ_code_buf[1]) = (mz_uint16)cur_match_dist;
+          pLZ_code_buf += 3;
+          *pLZ_flags = (mz_uint8)((*pLZ_flags >> 1) | 0x80);
+
+          s0 = s_tdefl_small_dist_sym[cur_match_dist & 511];
+          s1 = s_tdefl_large_dist_sym[cur_match_dist >> 8];
+          d->m_huff_count[1][(cur_match_dist < 512) ? s0 : s1]++;
+
+          d->m_huff_count[0][s_tdefl_len_sym[cur_match_len - TDEFL_MIN_MATCH_LEN]]++;
+        }
+      }
+      else
+      {
+        *pLZ_code_buf++ = (mz_uint8)first_trigram;
+        *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1);
+        d->m_huff_count[0][(mz_uint8)first_trigram]++;
+      }
+
+      if (--num_flags_left == 0) { num_flags_left = 8; pLZ_flags = pLZ_code_buf++; }
+
+      total_lz_bytes += cur_match_len;
+      lookahead_pos += cur_match_len;
+      dict_size = MZ_MIN(dict_size + cur_match_len, TDEFL_LZ_DICT_SIZE);
+      cur_pos = (cur_pos + cur_match_len) & TDEFL_LZ_DICT_SIZE_MASK;
+      MZ_ASSERT(lookahead_size >= cur_match_len);
+      lookahead_size -= cur_match_len;
+
+      if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8])
+      {
+        int n;
+        d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size;
+        d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left;
+        if ((n = tdefl_flush_block(d, 0)) != 0)
+          return (n < 0) ? MZ_FALSE : MZ_TRUE;
+        total_lz_bytes = d->m_total_lz_bytes; pLZ_code_buf = d->m_pLZ_code_buf; pLZ_flags = d->m_pLZ_flags; num_flags_left = d->m_num_flags_left;
+      }
+    }
+
+    while (lookahead_size)
+    {
+      mz_uint8 lit = d->m_dict[cur_pos];
+
+      total_lz_bytes++;
+      *pLZ_code_buf++ = lit;
+      *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1);
+      if (--num_flags_left == 0) { num_flags_left = 8; pLZ_flags = pLZ_code_buf++; }
+
+      d->m_huff_count[0][lit]++;
+
+      lookahead_pos++;
+      dict_size = MZ_MIN(dict_size + 1, TDEFL_LZ_DICT_SIZE);
+      cur_pos = (cur_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK;
+      lookahead_size--;
+
+      if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8])
+      {
+        int n;
+        d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size;
+        d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left;
+        if ((n = tdefl_flush_block(d, 0)) != 0)
+          return (n < 0) ? MZ_FALSE : MZ_TRUE;
+        total_lz_bytes = d->m_total_lz_bytes; pLZ_code_buf = d->m_pLZ_code_buf; pLZ_flags = d->m_pLZ_flags; num_flags_left = d->m_num_flags_left;
+      }
+    }
+  }
+
+  d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size;
+  d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left;
+  return MZ_TRUE;
+}
+#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+
+static MZ_FORCEINLINE void tdefl_record_literal(tdefl_compressor *d, mz_uint8 lit)
+{
+  d->m_total_lz_bytes++;
+  *d->m_pLZ_code_buf++ = lit;
+  *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> 1); if (--d->m_num_flags_left == 0) { d->m_num_flags_left = 8; d->m_pLZ_flags = d->m_pLZ_code_buf++; }
+  d->m_huff_count[0][lit]++;
+}
+
+static MZ_FORCEINLINE void tdefl_record_match(tdefl_compressor *d, mz_uint match_len, mz_uint match_dist)
+{
+  mz_uint32 s0, s1;
+
+  MZ_ASSERT((match_len >= TDEFL_MIN_MATCH_LEN) && (match_dist >= 1) && (match_dist <= TDEFL_LZ_DICT_SIZE));
+
+  d->m_total_lz_bytes += match_len;
+
+  d->m_pLZ_code_buf[0] = (mz_uint8)(match_len - TDEFL_MIN_MATCH_LEN);
+
+  match_dist -= 1;
+  d->m_pLZ_code_buf[1] = (mz_uint8)(match_dist & 0xFF);
+  d->m_pLZ_code_buf[2] = (mz_uint8)(match_dist >> 8); d->m_pLZ_code_buf += 3;
+
+  *d->m_pLZ_flags = (mz_uint8)((*d->m_pLZ_flags >> 1) | 0x80); if (--d->m_num_flags_left == 0) { d->m_num_flags_left = 8; d->m_pLZ_flags = d->m_pLZ_code_buf++; }
+
+  s0 = s_tdefl_small_dist_sym[match_dist & 511]; s1 = s_tdefl_large_dist_sym[(match_dist >> 8) & 127];
+  d->m_huff_count[1][(match_dist < 512) ? s0 : s1]++;
+
+  if (match_len >= TDEFL_MIN_MATCH_LEN) d->m_huff_count[0][s_tdefl_len_sym[match_len - TDEFL_MIN_MATCH_LEN]]++;
+}
+
+static mz_bool tdefl_compress_normal(tdefl_compressor *d)
+{
+  const mz_uint8 *pSrc = d->m_pSrc; size_t src_buf_left = d->m_src_buf_left;
+  tdefl_flush flush = d->m_flush;
+
+  while ((src_buf_left) || ((flush) && (d->m_lookahead_size)))
+  {
+    mz_uint len_to_move, cur_match_dist, cur_match_len, cur_pos;
+    // Update dictionary and hash chains. Keeps the lookahead size equal to TDEFL_MAX_MATCH_LEN.
+    if ((d->m_lookahead_size + d->m_dict_size) >= (TDEFL_MIN_MATCH_LEN - 1))
+    {
+      mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK, ins_pos = d->m_lookahead_pos + d->m_lookahead_size - 2;
+      mz_uint hash = (d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] << TDEFL_LZ_HASH_SHIFT) ^ d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK];
+      mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(src_buf_left, TDEFL_MAX_MATCH_LEN - d->m_lookahead_size);
+      const mz_uint8 *pSrc_end = pSrc + num_bytes_to_process;
+      src_buf_left -= num_bytes_to_process;
+      d->m_lookahead_size += num_bytes_to_process;
+      while (pSrc != pSrc_end)
+      {
+        mz_uint8 c = *pSrc++; d->m_dict[dst_pos] = c; if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c;
+        hash = ((hash << TDEFL_LZ_HASH_SHIFT) ^ c) & (TDEFL_LZ_HASH_SIZE - 1);
+        d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash]; d->m_hash[hash] = (mz_uint16)(ins_pos);
+        dst_pos = (dst_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK; ins_pos++;
+      }
+    }
+    else
+    {
+      while ((src_buf_left) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN))
+      {
+        mz_uint8 c = *pSrc++;
+        mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK;
+        src_buf_left--;
+        d->m_dict[dst_pos] = c;
+        if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1))
+          d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c;
+        if ((++d->m_lookahead_size + d->m_dict_size) >= TDEFL_MIN_MATCH_LEN)
+        {
+          mz_uint ins_pos = d->m_lookahead_pos + (d->m_lookahead_size - 1) - 2;
+          mz_uint hash = ((d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] << (TDEFL_LZ_HASH_SHIFT * 2)) ^ (d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK] << TDEFL_LZ_HASH_SHIFT) ^ c) & (TDEFL_LZ_HASH_SIZE - 1);
+          d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash]; d->m_hash[hash] = (mz_uint16)(ins_pos);
+        }
+      }
+    }
+    d->m_dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - d->m_lookahead_size, d->m_dict_size);
+    if ((!flush) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN))
+      break;
+
+    // Simple lazy/greedy parsing state machine.
+    len_to_move = 1; cur_match_dist = 0; cur_match_len = d->m_saved_match_len ? d->m_saved_match_len : (TDEFL_MIN_MATCH_LEN - 1); cur_pos = d->m_lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK;
+    if (d->m_flags & (TDEFL_RLE_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS))
+    {
+      if ((d->m_dict_size) && (!(d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS)))
+      {
+        mz_uint8 c = d->m_dict[(cur_pos - 1) & TDEFL_LZ_DICT_SIZE_MASK];
+        cur_match_len = 0; while (cur_match_len < d->m_lookahead_size) { if (d->m_dict[cur_pos + cur_match_len] != c) break; cur_match_len++; }
+        if (cur_match_len < TDEFL_MIN_MATCH_LEN) cur_match_len = 0; else cur_match_dist = 1;
+      }
+    }
+    else
+    {
+      tdefl_find_match(d, d->m_lookahead_pos, d->m_dict_size, d->m_lookahead_size, &cur_match_dist, &cur_match_len);
+    }
+    if (((cur_match_len == TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 8U*1024U)) || (cur_pos == cur_match_dist) || ((d->m_flags & TDEFL_FILTER_MATCHES) && (cur_match_len <= 5)))
+    {
+      cur_match_dist = cur_match_len = 0;
+    }
+    if (d->m_saved_match_len)
+    {
+      if (cur_match_len > d->m_saved_match_len)
+      {
+        tdefl_record_literal(d, (mz_uint8)d->m_saved_lit);
+        if (cur_match_len >= 128)
+        {
+          tdefl_record_match(d, cur_match_len, cur_match_dist);
+          d->m_saved_match_len = 0; len_to_move = cur_match_len;
+        }
+        else
+        {
+          d->m_saved_lit = d->m_dict[cur_pos]; d->m_saved_match_dist = cur_match_dist; d->m_saved_match_len = cur_match_len;
+        }
+      }
+      else
+      {
+        tdefl_record_match(d, d->m_saved_match_len, d->m_saved_match_dist);
+        len_to_move = d->m_saved_match_len - 1; d->m_saved_match_len = 0;
+      }
+    }
+    else if (!cur_match_dist)
+      tdefl_record_literal(d, d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]);
+    else if ((d->m_greedy_parsing) || (d->m_flags & TDEFL_RLE_MATCHES) || (cur_match_len >= 128))
+    {
+      tdefl_record_match(d, cur_match_len, cur_match_dist);
+      len_to_move = cur_match_len;
+    }
+    else
+    {
+      d->m_saved_lit = d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]; d->m_saved_match_dist = cur_match_dist; d->m_saved_match_len = cur_match_len;
+    }
+    // Move the lookahead forward by len_to_move bytes.
+    d->m_lookahead_pos += len_to_move;
+    MZ_ASSERT(d->m_lookahead_size >= len_to_move);
+    d->m_lookahead_size -= len_to_move;
+    d->m_dict_size = MZ_MIN(d->m_dict_size + len_to_move, TDEFL_LZ_DICT_SIZE);
+    // Check if it's time to flush the current LZ codes to the internal output buffer.
+    if ( (d->m_pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) ||
+         ( (d->m_total_lz_bytes > 31*1024) && (((((mz_uint)(d->m_pLZ_code_buf - d->m_lz_code_buf) * 115) >> 7) >= d->m_total_lz_bytes) || (d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS))) )
+    {
+      int n;
+      d->m_pSrc = pSrc; d->m_src_buf_left = src_buf_left;
+      if ((n = tdefl_flush_block(d, 0)) != 0)
+        return (n < 0) ? MZ_FALSE : MZ_TRUE;
+    }
+  }
+
+  d->m_pSrc = pSrc; d->m_src_buf_left = src_buf_left;
+  return MZ_TRUE;
+}
+
+static tdefl_status tdefl_flush_output_buffer(tdefl_compressor *d)
+{
+  if (d->m_pIn_buf_size)
+  {
+    *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf;
+  }
+
+  if (d->m_pOut_buf_size)
+  {
+    size_t n = MZ_MIN(*d->m_pOut_buf_size - d->m_out_buf_ofs, d->m_output_flush_remaining);
+    memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf + d->m_output_flush_ofs, n);
+    d->m_output_flush_ofs += (mz_uint)n;
+    d->m_output_flush_remaining -= (mz_uint)n;
+    d->m_out_buf_ofs += n;
+
+    *d->m_pOut_buf_size = d->m_out_buf_ofs;
+  }
+
+  return (d->m_finished && !d->m_output_flush_remaining) ? TDEFL_STATUS_DONE : TDEFL_STATUS_OKAY;
+}
+
+tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, size_t *pIn_buf_size, void *pOut_buf, size_t *pOut_buf_size, tdefl_flush flush)
+{
+  if (!d)
+  {
+    if (pIn_buf_size) *pIn_buf_size = 0;
+    if (pOut_buf_size) *pOut_buf_size = 0;
+    return TDEFL_STATUS_BAD_PARAM;
+  }
+
+  d->m_pIn_buf = pIn_buf; d->m_pIn_buf_size = pIn_buf_size;
+  d->m_pOut_buf = pOut_buf; d->m_pOut_buf_size = pOut_buf_size;
+  d->m_pSrc = (const mz_uint8 *)(pIn_buf); d->m_src_buf_left = pIn_buf_size ? *pIn_buf_size : 0;
+  d->m_out_buf_ofs = 0;
+  d->m_flush = flush;
+
+  if ( ((d->m_pPut_buf_func != NULL) == ((pOut_buf != NULL) || (pOut_buf_size != NULL))) || (d->m_prev_return_status != TDEFL_STATUS_OKAY) ||
+        (d->m_wants_to_finish && (flush != TDEFL_FINISH)) || (pIn_buf_size && *pIn_buf_size && !pIn_buf) || (pOut_buf_size && *pOut_buf_size && !pOut_buf) )
+  {
+    if (pIn_buf_size) *pIn_buf_size = 0;
+    if (pOut_buf_size) *pOut_buf_size = 0;
+    return (d->m_prev_return_status = TDEFL_STATUS_BAD_PARAM);
+  }
+  d->m_wants_to_finish |= (flush == TDEFL_FINISH);
+
+  if ((d->m_output_flush_remaining) || (d->m_finished))
+    return (d->m_prev_return_status = tdefl_flush_output_buffer(d));
+
+#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+  if (((d->m_flags & TDEFL_MAX_PROBES_MASK) == 1) &&
+      ((d->m_flags & TDEFL_GREEDY_PARSING_FLAG) != 0) &&
+      ((d->m_flags & (TDEFL_FILTER_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS | TDEFL_RLE_MATCHES)) == 0))
+  {
+    if (!tdefl_compress_fast(d))
+      return d->m_prev_return_status;
+  }
+  else
+#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
+  {
+    if (!tdefl_compress_normal(d))
+      return d->m_prev_return_status;
+  }
+
+  if ((d->m_flags & (TDEFL_WRITE_ZLIB_HEADER | TDEFL_COMPUTE_ADLER32)) && (pIn_buf))
+    d->m_adler32 = (mz_uint32)mz_adler32(d->m_adler32, (const mz_uint8 *)pIn_buf, d->m_pSrc - (const mz_uint8 *)pIn_buf);
+
+  if ((flush) && (!d->m_lookahead_size) && (!d->m_src_buf_left) && (!d->m_output_flush_remaining))
+  {
+    if (tdefl_flush_block(d, flush) < 0)
+      return d->m_prev_return_status;
+    d->m_finished = (flush == TDEFL_FINISH);
+    if (flush == TDEFL_FULL_FLUSH) { MZ_CLEAR_OBJ(d->m_hash); MZ_CLEAR_OBJ(d->m_next); d->m_dict_size = 0; }
+  }
+
+  return (d->m_prev_return_status = tdefl_flush_output_buffer(d));
+}
+
+tdefl_status tdefl_compress_buffer(tdefl_compressor *d, const void *pIn_buf, size_t in_buf_size, tdefl_flush flush)
+{
+  MZ_ASSERT(d->m_pPut_buf_func); return tdefl_compress(d, pIn_buf, &in_buf_size, NULL, NULL, flush);
+}
+
+tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
+{
+  d->m_pPut_buf_func = pPut_buf_func; d->m_pPut_buf_user = pPut_buf_user;
+  d->m_flags = (mz_uint)(flags); d->m_max_probes[0] = 1 + ((flags & 0xFFF) + 2) / 3; d->m_greedy_parsing = (flags & TDEFL_GREEDY_PARSING_FLAG) != 0;
+  d->m_max_probes[1] = 1 + (((flags & 0xFFF) >> 2) + 2) / 3;
+  if (!(flags & TDEFL_NONDETERMINISTIC_PARSING_FLAG)) MZ_CLEAR_OBJ(d->m_hash);
+  d->m_lookahead_pos = d->m_lookahead_size = d->m_dict_size = d->m_total_lz_bytes = d->m_lz_code_buf_dict_pos = d->m_bits_in = 0;
+  d->m_output_flush_ofs = d->m_output_flush_remaining = d->m_finished = d->m_block_index = d->m_bit_buffer = d->m_wants_to_finish = 0;
+  d->m_pLZ_code_buf = d->m_lz_code_buf + 1; d->m_pLZ_flags = d->m_lz_code_buf; d->m_num_flags_left = 8;
+  d->m_pOutput_buf = d->m_output_buf; d->m_pOutput_buf_end = d->m_output_buf; d->m_prev_return_status = TDEFL_STATUS_OKAY;
+  d->m_saved_match_dist = d->m_saved_match_len = d->m_saved_lit = 0; d->m_adler32 = 1;
+  d->m_pIn_buf = NULL; d->m_pOut_buf = NULL;
+  d->m_pIn_buf_size = NULL; d->m_pOut_buf_size = NULL;
+  d->m_flush = TDEFL_NO_FLUSH; d->m_pSrc = NULL; d->m_src_buf_left = 0; d->m_out_buf_ofs = 0;
+  memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0);
+  memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1);
+  return TDEFL_STATUS_OKAY;
+}
+
+tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d)
+{
+  return d->m_prev_return_status;
+}
+
+mz_uint32 tdefl_get_adler32(tdefl_compressor *d)
+{
+  return d->m_adler32;
+}
+
+mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
+{
+  tdefl_compressor *pComp; mz_bool succeeded; if (((buf_len) && (!pBuf)) || (!pPut_buf_func)) return MZ_FALSE;
+  pComp = (tdefl_compressor*)MZ_MALLOC(sizeof(tdefl_compressor)); if (!pComp) return MZ_FALSE;
+  succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) == TDEFL_STATUS_OKAY);
+  succeeded = succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) == TDEFL_STATUS_DONE);
+  MZ_FREE(pComp); return succeeded;
+}
+
+typedef struct
+{
+  size_t m_size, m_capacity;
+  mz_uint8 *m_pBuf;
+  mz_bool m_expandable;
+} tdefl_output_buffer;
+
+static mz_bool tdefl_output_buffer_putter(const void *pBuf, int len, void *pUser)
+{
+  tdefl_output_buffer *p = (tdefl_output_buffer *)pUser;
+  size_t new_size = p->m_size + len;
+  if (new_size > p->m_capacity)
+  {
+    size_t new_capacity = p->m_capacity; mz_uint8 *pNew_buf; if (!p->m_expandable) return MZ_FALSE;
+    do { new_capacity = MZ_MAX(128U, new_capacity << 1U); } while (new_size > new_capacity);
+    pNew_buf = (mz_uint8*)MZ_REALLOC(p->m_pBuf, new_capacity); if (!pNew_buf) return MZ_FALSE;
+    p->m_pBuf = pNew_buf; p->m_capacity = new_capacity;
+  }
+  memcpy((mz_uint8*)p->m_pBuf + p->m_size, pBuf, len); p->m_size = new_size;
+  return MZ_TRUE;
+}
+
+void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
+{
+  tdefl_output_buffer out_buf; MZ_CLEAR_OBJ(out_buf);
+  if (!pOut_len) return MZ_FALSE; else *pOut_len = 0;
+  out_buf.m_expandable = MZ_TRUE;
+  if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) return NULL;
+  *pOut_len = out_buf.m_size; return out_buf.m_pBuf;
+}
+
+size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
+{
+  tdefl_output_buffer out_buf; MZ_CLEAR_OBJ(out_buf);
+  if (!pOut_buf) return 0;
+  out_buf.m_pBuf = (mz_uint8*)pOut_buf; out_buf.m_capacity = out_buf_len;
+  if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) return 0;
+  return out_buf.m_size;
+}
+
+#ifndef MINIZ_NO_ZLIB_APIS
+static const mz_uint s_tdefl_num_probes[11] = { 0, 1, 6, 32,  16, 32, 128, 256,  512, 768, 1500 };
+
+// level may actually range from [0,10] (10 is a "hidden" max level, where we want a bit more compression and it's fine if throughput to fall off a cliff on some files).
+mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int strategy)
+{
+  mz_uint comp_flags = s_tdefl_num_probes[(level >= 0) ? MZ_MIN(10, level) : MZ_DEFAULT_LEVEL] | ((level <= 3) ? TDEFL_GREEDY_PARSING_FLAG : 0);
+  if (window_bits > 0) comp_flags |= TDEFL_WRITE_ZLIB_HEADER;
+
+  if (!level) comp_flags |= TDEFL_FORCE_ALL_RAW_BLOCKS;
+  else if (strategy == MZ_FILTERED) comp_flags |= TDEFL_FILTER_MATCHES;
+  else if (strategy == MZ_HUFFMAN_ONLY) comp_flags &= ~TDEFL_MAX_PROBES_MASK;
+  else if (strategy == MZ_FIXED) comp_flags |= TDEFL_FORCE_ALL_STATIC_BLOCKS;
+  else if (strategy == MZ_RLE) comp_flags |= TDEFL_RLE_MATCHES;
+
+  return comp_flags;
+}
+#endif //MINIZ_NO_ZLIB_APIS
+
+#ifdef _MSC_VER
+#pragma warning (push)
+#pragma warning (disable:4204) // nonstandard extension used : non-constant aggregate initializer (also supported by GNU C and C99, so no big deal)
+#endif
+
+// Simple PNG writer function by Alex Evans, 2011. Released into the public domain: https://gist.github.com/908299, more context at
+// http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/.
+// This is actually a modification of Alex's original code so PNG files generated by this function pass pngcheck.
+void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int h, int num_chans, size_t *pLen_out, mz_uint level, mz_bool flip)
+{
+  // Using a local copy of this array here in case MINIZ_NO_ZLIB_APIS was defined.
+  static const mz_uint s_tdefl_png_num_probes[11] = { 0, 1, 6, 32,  16, 32, 128, 256,  512, 768, 1500 };
+  tdefl_compressor *pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor)); tdefl_output_buffer out_buf; int i, bpl = w * num_chans, y, z; mz_uint32 c; *pLen_out = 0;
+  if (!pComp) return NULL;
+  MZ_CLEAR_OBJ(out_buf); out_buf.m_expandable = MZ_TRUE; out_buf.m_capacity = 57+MZ_MAX(64, (1+bpl)*h); if (NULL == (out_buf.m_pBuf = (mz_uint8*)MZ_MALLOC(out_buf.m_capacity))) { MZ_FREE(pComp); return NULL; }
+  // write dummy header
+  for (z = 41; z; --z) tdefl_output_buffer_putter(&z, 1, &out_buf);
+  // compress image data
+  tdefl_init(pComp, tdefl_output_buffer_putter, &out_buf, s_tdefl_png_num_probes[MZ_MIN(10, level)] | TDEFL_WRITE_ZLIB_HEADER);
+  for (y = 0; y < h; ++y) { tdefl_compress_buffer(pComp, &z, 1, TDEFL_NO_FLUSH); tdefl_compress_buffer(pComp, (mz_uint8*)pImage + (flip ? (h - 1 - y) : y) * bpl, bpl, TDEFL_NO_FLUSH); }
+  if (tdefl_compress_buffer(pComp, NULL, 0, TDEFL_FINISH) != TDEFL_STATUS_DONE) { MZ_FREE(pComp); MZ_FREE(out_buf.m_pBuf); return NULL; }
+  // write real header
+  *pLen_out = out_buf.m_size-41;
+  {
+    static const mz_uint8 chans[] = {0x00, 0x00, 0x04, 0x02, 0x06};
+    mz_uint8 pnghdr[41]={0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,
+      0,0,(mz_uint8)(w>>8),(mz_uint8)w,0,0,(mz_uint8)(h>>8),(mz_uint8)h,8,chans[num_chans],0,0,0,0,0,0,0,
+      (mz_uint8)(*pLen_out>>24),(mz_uint8)(*pLen_out>>16),(mz_uint8)(*pLen_out>>8),(mz_uint8)*pLen_out,0x49,0x44,0x41,0x54};
+    c=(mz_uint32)mz_crc32(MZ_CRC32_INIT,pnghdr+12,17); for (i=0; i<4; ++i, c<<=8) ((mz_uint8*)(pnghdr+29))[i]=(mz_uint8)(c>>24);
+    memcpy(out_buf.m_pBuf, pnghdr, 41);
+  }
+  // write footer (IDAT CRC-32, followed by IEND chunk)
+  if (!tdefl_output_buffer_putter("\0\0\0\0\0\0\0\0\x49\x45\x4e\x44\xae\x42\x60\x82", 16, &out_buf)) { *pLen_out = 0; MZ_FREE(pComp); MZ_FREE(out_buf.m_pBuf); return NULL; }
+  c = (mz_uint32)mz_crc32(MZ_CRC32_INIT,out_buf.m_pBuf+41-4, *pLen_out+4); for (i=0; i<4; ++i, c<<=8) (out_buf.m_pBuf+out_buf.m_size-16)[i] = (mz_uint8)(c >> 24);
+  // compute final size of file, grab compressed data buffer and return
+  *pLen_out += 57; MZ_FREE(pComp); return out_buf.m_pBuf;
+}
+
+void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out)
+{
+  // Level 6 corresponds to TDEFL_DEFAULT_MAX_PROBES or MZ_DEFAULT_LEVEL (but we can't depend on MZ_DEFAULT_LEVEL being available in case the zlib API's where #defined out)
+  return tdefl_write_image_to_png_file_in_memory_ex(pImage, w, h, num_chans, pLen_out, 6, MZ_FALSE);
+}
+
+// Allocate the tdefl_compressor and tinfl_decompressor structures in C so that
+// non-C language bindings to tdefL_ and tinfl_ API don't need to worry about
+// structure size and allocation mechanism.
+tdefl_compressor *tdefl_compressor_alloc()
+{
+  return (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor));
+}
+
+void tdefl_compressor_free(tdefl_compressor* pComp)
+{
+  MZ_FREE(pComp);
+}
+
+tinfl_decompressor *tinfl_decompressor_alloc()
+{
+  tinfl_decompressor *pDecomp = (tinfl_decompressor *)MZ_MALLOC(sizeof(tinfl_decompressor));
+  if (pDecomp)
+    tinfl_init(pDecomp);
+  return pDecomp;
+}
+
+void tinfl_decompressor_free(tinfl_decompressor *pDecomp)
+{
+  MZ_FREE(pDecomp);
+}
+
+#ifdef _MSC_VER
+#pragma warning (pop)
+#endif
+
+// ------------------- .ZIP archive reading
+
+#ifndef MINIZ_NO_ARCHIVE_APIS
+
+#ifdef MINIZ_NO_STDIO
+  #define MZ_FILE void *
+#else
+  #include <stdio.h>
+  #include <sys/stat.h>
+
+  #if defined(_MSC_VER) || defined(__MINGW64__)
+    static FILE *mz_fopen(const char *pFilename, const char *pMode)
+    {
+      FILE* pFile = NULL;
+      fopen_s(&pFile, pFilename, pMode);
+      return pFile;
+    }
+    static FILE *mz_freopen(const char *pPath, const char *pMode, FILE *pStream)
+    {
+      FILE* pFile = NULL;
+      if (freopen_s(&pFile, pPath, pMode, pStream))
+        return NULL;
+      return pFile;
+    }
+    #ifndef MINIZ_NO_TIME
+      #include <sys/utime.h>
+    #endif
+    #define MZ_FILE FILE
+    #define MZ_FOPEN mz_fopen
+    #define MZ_FCLOSE fclose
+    #define MZ_FREAD fread
+    #define MZ_FWRITE fwrite
+    #define MZ_FTELL64 _ftelli64
+    #define MZ_FSEEK64 _fseeki64
+    #define MZ_FILE_STAT_STRUCT _stat
+    #define MZ_FILE_STAT _stat
+    #define MZ_FFLUSH fflush
+    #define MZ_FREOPEN mz_freopen
+    #define MZ_DELETE_FILE remove
+  #elif defined(__MINGW32__)
+    #ifndef MINIZ_NO_TIME
+      #include <sys/utime.h>
+    #endif
+    #define MZ_FILE FILE
+    #define MZ_FOPEN(f, m) fopen(f, m)
+    #define MZ_FCLOSE fclose
+    #define MZ_FREAD fread
+    #define MZ_FWRITE fwrite
+    #define MZ_FTELL64 ftello64
+    #define MZ_FSEEK64 fseeko64
+    #define MZ_FILE_STAT_STRUCT _stat
+    #define MZ_FILE_STAT _stat
+    #define MZ_FFLUSH fflush
+    #define MZ_FREOPEN(f, m, s) freopen(f, m, s)
+    #define MZ_DELETE_FILE remove
+  #elif defined(__TINYC__)
+    #ifndef MINIZ_NO_TIME
+      #include <sys/utime.h>
+    #endif
+    #define MZ_FILE FILE
+    #define MZ_FOPEN(f, m) fopen(f, m)
+    #define MZ_FCLOSE fclose
+    #define MZ_FREAD fread
+    #define MZ_FWRITE fwrite
+    #define MZ_FTELL64 ftell
+    #define MZ_FSEEK64 fseek
+    #define MZ_FILE_STAT_STRUCT stat
+    #define MZ_FILE_STAT stat
+    #define MZ_FFLUSH fflush
+    #define MZ_FREOPEN(f, m, s) freopen(f, m, s)
+    #define MZ_DELETE_FILE remove
+  #elif defined(__GNUC__) && _LARGEFILE64_SOURCE
+    #ifndef MINIZ_NO_TIME
+      #include <utime.h>
+    #endif
+    #define MZ_FILE FILE
+    #define MZ_FOPEN(f, m) fopen64(f, m)
+    #define MZ_FCLOSE fclose
+    #define MZ_FREAD fread
+    #define MZ_FWRITE fwrite
+    #define MZ_FTELL64 ftello64
+    #define MZ_FSEEK64 fseeko64
+    #define MZ_FILE_STAT_STRUCT stat64
+    #define MZ_FILE_STAT stat64
+    #define MZ_FFLUSH fflush
+    #define MZ_FREOPEN(p, m, s) freopen64(p, m, s)
+    #define MZ_DELETE_FILE remove
+  #else
+    #ifndef MINIZ_NO_TIME
+      #include <utime.h>
+    #endif
+    #define MZ_FILE FILE
+    #define MZ_FOPEN(f, m) fopen(f, m)
+    #define MZ_FCLOSE fclose
+    #define MZ_FREAD fread
+    #define MZ_FWRITE fwrite
+    #define MZ_FTELL64 ftello
+    #define MZ_FSEEK64 fseeko
+    #define MZ_FILE_STAT_STRUCT stat
+    #define MZ_FILE_STAT stat
+    #define MZ_FFLUSH fflush
+    #define MZ_FREOPEN(f, m, s) freopen(f, m, s)
+    #define MZ_DELETE_FILE remove
+  #endif // #ifdef _MSC_VER
+#endif // #ifdef MINIZ_NO_STDIO
+
+#define MZ_TOLOWER(c) ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))
+
+// Various ZIP archive enums. To completely avoid cross platform compiler alignment and platform endian issues, miniz.c doesn't use structs for any of this stuff.
+enum
+{
+  // ZIP archive identifiers and record sizes
+  MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG = 0x06054b50, MZ_ZIP_CENTRAL_DIR_HEADER_SIG = 0x02014b50, MZ_ZIP_LOCAL_DIR_HEADER_SIG = 0x04034b50,
+  MZ_ZIP_LOCAL_DIR_HEADER_SIZE = 30, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE = 46, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE = 22,
+  // Central directory header record offsets
+  MZ_ZIP_CDH_SIG_OFS = 0, MZ_ZIP_CDH_VERSION_MADE_BY_OFS = 4, MZ_ZIP_CDH_VERSION_NEEDED_OFS = 6, MZ_ZIP_CDH_BIT_FLAG_OFS = 8,
+  MZ_ZIP_CDH_METHOD_OFS = 10, MZ_ZIP_CDH_FILE_TIME_OFS = 12, MZ_ZIP_CDH_FILE_DATE_OFS = 14, MZ_ZIP_CDH_CRC32_OFS = 16,
+  MZ_ZIP_CDH_COMPRESSED_SIZE_OFS = 20, MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS = 24, MZ_ZIP_CDH_FILENAME_LEN_OFS = 28, MZ_ZIP_CDH_EXTRA_LEN_OFS = 30,
+  MZ_ZIP_CDH_COMMENT_LEN_OFS = 32, MZ_ZIP_CDH_DISK_START_OFS = 34, MZ_ZIP_CDH_INTERNAL_ATTR_OFS = 36, MZ_ZIP_CDH_EXTERNAL_ATTR_OFS = 38, MZ_ZIP_CDH_LOCAL_HEADER_OFS = 42,
+  // Local directory header offsets
+  MZ_ZIP_LDH_SIG_OFS = 0, MZ_ZIP_LDH_VERSION_NEEDED_OFS = 4, MZ_ZIP_LDH_BIT_FLAG_OFS = 6, MZ_ZIP_LDH_METHOD_OFS = 8, MZ_ZIP_LDH_FILE_TIME_OFS = 10,
+  MZ_ZIP_LDH_FILE_DATE_OFS = 12, MZ_ZIP_LDH_CRC32_OFS = 14, MZ_ZIP_LDH_COMPRESSED_SIZE_OFS = 18, MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS = 22,
+  MZ_ZIP_LDH_FILENAME_LEN_OFS = 26, MZ_ZIP_LDH_EXTRA_LEN_OFS = 28,
+  // End of central directory offsets
+  MZ_ZIP_ECDH_SIG_OFS = 0, MZ_ZIP_ECDH_NUM_THIS_DISK_OFS = 4, MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS = 6, MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS = 8,
+  MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS = 10, MZ_ZIP_ECDH_CDIR_SIZE_OFS = 12, MZ_ZIP_ECDH_CDIR_OFS_OFS = 16, MZ_ZIP_ECDH_COMMENT_SIZE_OFS = 20,
+};
+
+typedef struct
+{
+  void *m_p;
+  size_t m_size, m_capacity;
+  mz_uint m_element_size;
+} mz_zip_array;
+
+struct mz_zip_internal_state_tag
+{
+  mz_zip_array m_central_dir;
+  mz_zip_array m_central_dir_offsets;
+  mz_zip_array m_sorted_central_dir_offsets;
+  MZ_FILE *m_pFile;
+  void *m_pMem;
+  size_t m_mem_size;
+  size_t m_mem_capacity;
+};
+
+#define MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(array_ptr, element_size) (array_ptr)->m_element_size = element_size
+#define MZ_ZIP_ARRAY_ELEMENT(array_ptr, element_type, index) ((element_type *)((array_ptr)->m_p))[index]
+
+static MZ_FORCEINLINE void mz_zip_array_clear(mz_zip_archive *pZip, mz_zip_array *pArray)
+{
+  pZip->m_pFree(pZip->m_pAlloc_opaque, pArray->m_p);
+  memset(pArray, 0, sizeof(mz_zip_array));
+}
+
+static mz_bool mz_zip_array_ensure_capacity(mz_zip_archive *pZip, mz_zip_array *pArray, size_t min_new_capacity, mz_uint growing)
+{
+  void *pNew_p; size_t new_capacity = min_new_capacity; MZ_ASSERT(pArray->m_element_size); if (pArray->m_capacity >= min_new_capacity) return MZ_TRUE;
+  if (growing) { new_capacity = MZ_MAX(1, pArray->m_capacity); while (new_capacity < min_new_capacity) new_capacity *= 2; }
+  if (NULL == (pNew_p = pZip->m_pRealloc(pZip->m_pAlloc_opaque, pArray->m_p, pArray->m_element_size, new_capacity))) return MZ_FALSE;
+  pArray->m_p = pNew_p; pArray->m_capacity = new_capacity;
+  return MZ_TRUE;
+}
+
+static MZ_FORCEINLINE mz_bool mz_zip_array_reserve(mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_capacity, mz_uint growing)
+{
+  if (new_capacity > pArray->m_capacity) { if (!mz_zip_array_ensure_capacity(pZip, pArray, new_capacity, growing)) return MZ_FALSE; }
+  return MZ_TRUE;
+}
+
+static MZ_FORCEINLINE mz_bool mz_zip_array_resize(mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_size, mz_uint growing)
+{
+  if (new_size > pArray->m_capacity) { if (!mz_zip_array_ensure_capacity(pZip, pArray, new_size, growing)) return MZ_FALSE; }
+  pArray->m_size = new_size;
+  return MZ_TRUE;
+}
+
+static MZ_FORCEINLINE mz_bool mz_zip_array_ensure_room(mz_zip_archive *pZip, mz_zip_array *pArray, size_t n)
+{
+  return mz_zip_array_reserve(pZip, pArray, pArray->m_size + n, MZ_TRUE);
+}
+
+static MZ_FORCEINLINE mz_bool mz_zip_array_push_back(mz_zip_archive *pZip, mz_zip_array *pArray, const void *pElements, size_t n)
+{
+  size_t orig_size = pArray->m_size; if (!mz_zip_array_resize(pZip, pArray, orig_size + n, MZ_TRUE)) return MZ_FALSE;
+  memcpy((mz_uint8*)pArray->m_p + orig_size * pArray->m_element_size, pElements, n * pArray->m_element_size);
+  return MZ_TRUE;
+}
+
+#ifndef MINIZ_NO_TIME
+static time_t mz_zip_dos_to_time_t(int dos_time, int dos_date)
+{
+  struct tm tm;
+  memset(&tm, 0, sizeof(tm)); tm.tm_isdst = -1;
+  tm.tm_year = ((dos_date >> 9) & 127) + 1980 - 1900; tm.tm_mon = ((dos_date >> 5) & 15) - 1; tm.tm_mday = dos_date & 31;
+  tm.tm_hour = (dos_time >> 11) & 31; tm.tm_min = (dos_time >> 5) & 63; tm.tm_sec = (dos_time << 1) & 62;
+  return mktime(&tm);
+}
+
+static void mz_zip_time_to_dos_time(time_t time, mz_uint16 *pDOS_time, mz_uint16 *pDOS_date)
+{
+#ifdef _MSC_VER
+  struct tm tm_struct;
+  struct tm *tm = &tm_struct;
+  errno_t err = localtime_s(tm, &time);
+  if (err)
+  {
+    *pDOS_date = 0; *pDOS_time = 0;
+    return;
+  }
+#else
+  struct tm *tm = localtime(&time);
+#endif
+  *pDOS_time = (mz_uint16)(((tm->tm_hour) << 11) + ((tm->tm_min) << 5) + ((tm->tm_sec) >> 1));
+  *pDOS_date = (mz_uint16)(((tm->tm_year + 1900 - 1980) << 9) + ((tm->tm_mon + 1) << 5) + tm->tm_mday);
+}
+#endif
+
+#ifndef MINIZ_NO_STDIO
+static mz_bool mz_zip_get_file_modified_time(const char *pFilename, mz_uint16 *pDOS_time, mz_uint16 *pDOS_date)
+{
+#ifdef MINIZ_NO_TIME
+  (void)pFilename; *pDOS_date = *pDOS_time = 0;
+#else
+  struct MZ_FILE_STAT_STRUCT file_stat;
+  // On Linux with x86 glibc, this call will fail on large files (>= 0x80000000 bytes) unless you compiled with _LARGEFILE64_SOURCE. Argh.
+  if (MZ_FILE_STAT(pFilename, &file_stat) != 0)
+    return MZ_FALSE;
+  mz_zip_time_to_dos_time(file_stat.st_mtime, pDOS_time, pDOS_date);
+#endif // #ifdef MINIZ_NO_TIME
+  return MZ_TRUE;
+}
+
+#ifndef MINIZ_NO_TIME
+static mz_bool mz_zip_set_file_times(const char *pFilename, time_t access_time, time_t modified_time)
+{
+  struct utimbuf t; t.actime = access_time; t.modtime = modified_time;
+  return !utime(pFilename, &t);
+}
+#endif // #ifndef MINIZ_NO_TIME
+#endif // #ifndef MINIZ_NO_STDIO
+
+static mz_bool mz_zip_reader_init_internal(mz_zip_archive *pZip, mz_uint32 flags)
+{
+  (void)flags;
+  if ((!pZip) || (pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID))
+    return MZ_FALSE;
+
+  if (!pZip->m_pAlloc) pZip->m_pAlloc = def_alloc_func;
+  if (!pZip->m_pFree) pZip->m_pFree = def_free_func;
+  if (!pZip->m_pRealloc) pZip->m_pRealloc = def_realloc_func;
+
+  pZip->m_zip_mode = MZ_ZIP_MODE_READING;
+  pZip->m_archive_size = 0;
+  pZip->m_central_directory_file_ofs = 0;
+  pZip->m_total_files = 0;
+
+  if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state))))
+    return MZ_FALSE;
+  memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state));
+  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8));
+  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, sizeof(mz_uint32));
+  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, sizeof(mz_uint32));
+  return MZ_TRUE;
+}
+
+static MZ_FORCEINLINE mz_bool mz_zip_reader_filename_less(const mz_zip_array *pCentral_dir_array, const mz_zip_array *pCentral_dir_offsets, mz_uint l_index, mz_uint r_index)
+{
+  const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, l_index)), *pE;
+  const mz_uint8 *pR = &MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, r_index));
+  mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS), r_len = MZ_READ_LE16(pR + MZ_ZIP_CDH_FILENAME_LEN_OFS);
+  mz_uint8 l = 0, r = 0;
+  pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; pR += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
+  pE = pL + MZ_MIN(l_len, r_len);
+  while (pL < pE)
+  {
+    if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR)))
+      break;
+    pL++; pR++;
+  }
+  return (pL == pE) ? (l_len < r_len) : (l < r);
+}
+
+#define MZ_SWAP_UINT32(a, b) do { mz_uint32 t = a; a = b; b = t; } MZ_MACRO_END
+
+// Heap sort of lowercased filenames, used to help accelerate plain central directory searches by mz_zip_reader_locate_file(). (Could also use qsort(), but it could allocate memory.)
+static void mz_zip_reader_sort_central_dir_offsets_by_filename(mz_zip_archive *pZip)
+{
+  mz_zip_internal_state *pState = pZip->m_pState;
+  const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets;
+  const mz_zip_array *pCentral_dir = &pState->m_central_dir;
+  mz_uint32 *pIndices = &MZ_ZIP_ARRAY_ELEMENT(&pState->m_sorted_central_dir_offsets, mz_uint32, 0);
+  const int size = pZip->m_total_files;
+  int start = (size - 2) >> 1, end;
+  while (start >= 0)
+  {
+    int child, root = start;
+    for ( ; ; )
+    {
+      if ((child = (root << 1) + 1) >= size)
+        break;
+      child += (((child + 1) < size) && (mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[child], pIndices[child + 1])));
+      if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[root], pIndices[child]))
+        break;
+      MZ_SWAP_UINT32(pIndices[root], pIndices[child]); root = child;
+    }
+    start--;
+  }
+
+  end = size - 1;
+  while (end > 0)
+  {
+    int child, root = 0;
+    MZ_SWAP_UINT32(pIndices[end], pIndices[0]);
+    for ( ; ; )
+    {
+      if ((child = (root << 1) + 1) >= end)
+        break;
+      child += (((child + 1) < end) && mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[child], pIndices[child + 1]));
+      if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, pIndices[root], pIndices[child]))
+        break;
+      MZ_SWAP_UINT32(pIndices[root], pIndices[child]); root = child;
+    }
+    end--;
+  }
+}
+
+static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip, mz_uint32 flags)
+{
+  mz_uint cdir_size, num_this_disk, cdir_disk_index;
+  mz_uint64 cdir_ofs;
+  mz_int64 cur_file_ofs;
+  const mz_uint8 *p;
+  mz_uint32 buf_u32[4096 / sizeof(mz_uint32)]; mz_uint8 *pBuf = (mz_uint8 *)buf_u32;
+  mz_bool sort_central_dir = ((flags & MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0);
+  // Basic sanity checks - reject files which are too small, and check the first 4 bytes of the file to make sure a local header is there.
+  if (pZip->m_archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
+    return MZ_FALSE;
+  // Find the end of central directory record by scanning the file from the end towards the beginning.
+  cur_file_ofs = MZ_MAX((mz_int64)pZip->m_archive_size - (mz_int64)sizeof(buf_u32), 0);
+  for ( ; ; )
+  {
+    int i, n = (int)MZ_MIN(sizeof(buf_u32), pZip->m_archive_size - cur_file_ofs);
+    if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, n) != (mz_uint)n)
+      return MZ_FALSE;
+    for (i = n - 4; i >= 0; --i)
+      if (MZ_READ_LE32(pBuf + i) == MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG)
+        break;
+    if (i >= 0)
+    {
+      cur_file_ofs += i;
+      break;
+    }
+    if ((!cur_file_ofs) || ((pZip->m_archive_size - cur_file_ofs) >= (0xFFFF + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)))
+      return MZ_FALSE;
+    cur_file_ofs = MZ_MAX(cur_file_ofs - (sizeof(buf_u32) - 3), 0);
+  }
+  // Read and verify the end of central directory record.
+  if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) != MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
+    return MZ_FALSE;
+  if ((MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_SIG_OFS) != MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG) ||
+      ((pZip->m_total_files = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS)) != MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS)))
+    return MZ_FALSE;
+
+  num_this_disk = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_THIS_DISK_OFS);
+  cdir_disk_index = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS);
+  if (((num_this_disk | cdir_disk_index) != 0) && ((num_this_disk != 1) || (cdir_disk_index != 1)))
+    return MZ_FALSE;
+
+  if ((cdir_size = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_SIZE_OFS)) < pZip->m_total_files * MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)
+    return MZ_FALSE;
+
+  cdir_ofs = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_OFS_OFS);
+  if ((cdir_ofs + (mz_uint64)cdir_size) > pZip->m_archive_size)
+    return MZ_FALSE;
+
+  pZip->m_central_directory_file_ofs = cdir_ofs;
+
+  if (pZip->m_total_files)
+  {
+     mz_uint i, n;
+
+    // Read the entire central directory into a heap block, and allocate another heap block to hold the unsorted central dir file record offsets, and another to hold the sorted indices.
+    if ((!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir, cdir_size, MZ_FALSE)) ||
+        (!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir_offsets, pZip->m_total_files, MZ_FALSE)))
+      return MZ_FALSE;
+
+    if (sort_central_dir)
+    {
+      if (!mz_zip_array_resize(pZip, &pZip->m_pState->m_sorted_central_dir_offsets, pZip->m_total_files, MZ_FALSE))
+        return MZ_FALSE;
+    }
+
+    if (pZip->m_pRead(pZip->m_pIO_opaque, cdir_ofs, pZip->m_pState->m_central_dir.m_p, cdir_size) != cdir_size)
+      return MZ_FALSE;
+
+    // Now create an index into the central directory file records, do some basic sanity checking on each record, and check for zip64 entries (which are not yet supported).
+    p = (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p;
+    for (n = cdir_size, i = 0; i < pZip->m_total_files; ++i)
+    {
+      mz_uint total_header_size, comp_size, decomp_size, disk_index;
+      if ((n < MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) || (MZ_READ_LE32(p) != MZ_ZIP_CENTRAL_DIR_HEADER_SIG))
+        return MZ_FALSE;
+      MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, i) = (mz_uint32)(p - (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p);
+      if (sort_central_dir)
+        MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_sorted_central_dir_offsets, mz_uint32, i) = i;
+      comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
+      decomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
+      if (((!MZ_READ_LE32(p + MZ_ZIP_CDH_METHOD_OFS)) && (decomp_size != comp_size)) || (decomp_size && !comp_size) || (decomp_size == 0xFFFFFFFF) || (comp_size == 0xFFFFFFFF))
+        return MZ_FALSE;
+      disk_index = MZ_READ_LE16(p + MZ_ZIP_CDH_DISK_START_OFS);
+      if ((disk_index != num_this_disk) && (disk_index != 1))
+        return MZ_FALSE;
+      if (((mz_uint64)MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS) + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + comp_size) > pZip->m_archive_size)
+        return MZ_FALSE;
+      if ((total_header_size = MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS)) > n)
+        return MZ_FALSE;
+      n -= total_header_size; p += total_header_size;
+    }
+  }
+
+  if (sort_central_dir)
+    mz_zip_reader_sort_central_dir_offsets_by_filename(pZip);
+
+  return MZ_TRUE;
+}
+
+mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint32 flags)
+{
+  if ((!pZip) || (!pZip->m_pRead))
+    return MZ_FALSE;
+  if (!mz_zip_reader_init_internal(pZip, flags))
+    return MZ_FALSE;
+  pZip->m_archive_size = size;
+  if (!mz_zip_reader_read_central_dir(pZip, flags))
+  {
+    mz_zip_reader_end(pZip);
+    return MZ_FALSE;
+  }
+  return MZ_TRUE;
+}
+
+static size_t mz_zip_mem_read_func(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n)
+{
+  mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
+  size_t s = (file_ofs >= pZip->m_archive_size) ? 0 : (size_t)MZ_MIN(pZip->m_archive_size - file_ofs, n);
+  memcpy(pBuf, (const mz_uint8 *)pZip->m_pState->m_pMem + file_ofs, s);
+  return s;
+}
+
+mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint32 flags)
+{
+  if (!mz_zip_reader_init_internal(pZip, flags))
+    return MZ_FALSE;
+  pZip->m_archive_size = size;
+  pZip->m_pRead = mz_zip_mem_read_func;
+  pZip->m_pIO_opaque = pZip;
+#ifdef __cplusplus
+  pZip->m_pState->m_pMem = const_cast<void *>(pMem);
+#else
+  pZip->m_pState->m_pMem = (void *)pMem;
+#endif
+  pZip->m_pState->m_mem_size = size;
+  if (!mz_zip_reader_read_central_dir(pZip, flags))
+  {
+    mz_zip_reader_end(pZip);
+    return MZ_FALSE;
+  }
+  return MZ_TRUE;
+}
+
+#ifndef MINIZ_NO_STDIO
+static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n)
+{
+  mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
+  mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile);
+  if (((mz_int64)file_ofs < 0) || (((cur_ofs != (mz_int64)file_ofs)) && (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET))))
+    return 0;
+  return MZ_FREAD(pBuf, 1, n, pZip->m_pState->m_pFile);
+}
+
+mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint32 flags)
+{
+  mz_uint64 file_size;
+  MZ_FILE *pFile = MZ_FOPEN(pFilename, "rb");
+  if (!pFile)
+    return MZ_FALSE;
+  if (MZ_FSEEK64(pFile, 0, SEEK_END))
+  {
+    MZ_FCLOSE(pFile);
+    return MZ_FALSE;
+  }
+  file_size = MZ_FTELL64(pFile);
+  if (!mz_zip_reader_init_internal(pZip, flags))
+  {
+    MZ_FCLOSE(pFile);
+    return MZ_FALSE;
+  }
+  pZip->m_pRead = mz_zip_file_read_func;
+  pZip->m_pIO_opaque = pZip;
+  pZip->m_pState->m_pFile = pFile;
+  pZip->m_archive_size = file_size;
+  if (!mz_zip_reader_read_central_dir(pZip, flags))
+  {
+    mz_zip_reader_end(pZip);
+    return MZ_FALSE;
+  }
+  return MZ_TRUE;
+}
+#endif // #ifndef MINIZ_NO_STDIO
+
+mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip)
+{
+  return pZip ? pZip->m_total_files : 0;
+}
+
+static MZ_FORCEINLINE const mz_uint8 *mz_zip_reader_get_cdh(mz_zip_archive *pZip, mz_uint file_index)
+{
+  if ((!pZip) || (!pZip->m_pState) || (file_index >= pZip->m_total_files) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
+    return NULL;
+  return &MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index));
+}
+
+mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index)
+{
+  mz_uint m_bit_flag;
+  const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
+  if (!p)
+    return MZ_FALSE;
+  m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
+  return (m_bit_flag & 1);
+}
+
+mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, mz_uint file_index)
+{
+  mz_uint filename_len, external_attr;
+  const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
+  if (!p)
+    return MZ_FALSE;
+
+  // First see if the filename ends with a '/' character.
+  filename_len = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
+  if (filename_len)
+  {
+    if (*(p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_len - 1) == '/')
+      return MZ_TRUE;
+  }
+
+  // Bugfix: This code was also checking if the internal attribute was non-zero, which wasn't correct.
+  // Most/all zip writers (hopefully) set DOS file/directory attributes in the low 16-bits, so check for the DOS directory flag and ignore the source OS ID in the created by field.
+  // FIXME: Remove this check? Is it necessary - we already check the filename.
+  external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS);
+  if ((external_attr & 0x10) != 0)
+    return MZ_TRUE;
+
+  return MZ_FALSE;
+}
+
+mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, mz_zip_archive_file_stat *pStat)
+{
+  mz_uint n;
+  const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
+  if ((!p) || (!pStat))
+    return MZ_FALSE;
+
+  // Unpack the central directory record.
+  pStat->m_file_index = file_index;
+  pStat->m_central_dir_ofs = MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index);
+  pStat->m_version_made_by = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_MADE_BY_OFS);
+  pStat->m_version_needed = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_NEEDED_OFS);
+  pStat->m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
+  pStat->m_method = MZ_READ_LE16(p + MZ_ZIP_CDH_METHOD_OFS);
+#ifndef MINIZ_NO_TIME
+  pStat->m_time = mz_zip_dos_to_time_t(MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_TIME_OFS), MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_DATE_OFS));
+#endif
+  pStat->m_crc32 = MZ_READ_LE32(p + MZ_ZIP_CDH_CRC32_OFS);
+  pStat->m_comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
+  pStat->m_uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
+  pStat->m_internal_attr = MZ_READ_LE16(p + MZ_ZIP_CDH_INTERNAL_ATTR_OFS);
+  pStat->m_external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS);
+  pStat->m_local_header_ofs = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS);
+
+  // Copy as much of the filename and comment as possible.
+  n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE - 1);
+  memcpy(pStat->m_filename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n); pStat->m_filename[n] = '\0';
+
+  n = MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS); n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE - 1);
+  pStat->m_comment_size = n;
+  memcpy(pStat->m_comment, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS), n); pStat->m_comment[n] = '\0';
+
+  return MZ_TRUE;
+}
+
+mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, char *pFilename, mz_uint filename_buf_size)
+{
+  mz_uint n;
+  const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
+  if (!p) { if (filename_buf_size) pFilename[0] = '\0'; return 0; }
+  n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
+  if (filename_buf_size)
+  {
+    n = MZ_MIN(n, filename_buf_size - 1);
+    memcpy(pFilename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n);
+    pFilename[n] = '\0';
+  }
+  return n + 1;
+}
+
+static MZ_FORCEINLINE mz_bool mz_zip_reader_string_equal(const char *pA, const char *pB, mz_uint len, mz_uint flags)
+{
+  mz_uint i;
+  if (flags & MZ_ZIP_FLAG_CASE_SENSITIVE)
+    return 0 == memcmp(pA, pB, len);
+  for (i = 0; i < len; ++i)
+    if (MZ_TOLOWER(pA[i]) != MZ_TOLOWER(pB[i]))
+      return MZ_FALSE;
+  return MZ_TRUE;
+}
+
+static MZ_FORCEINLINE int mz_zip_reader_filename_compare(const mz_zip_array *pCentral_dir_array, const mz_zip_array *pCentral_dir_offsets, mz_uint l_index, const char *pR, mz_uint r_len)
+{
+  const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_array, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, l_index)), *pE;
+  mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS);
+  mz_uint8 l = 0, r = 0;
+  pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
+  pE = pL + MZ_MIN(l_len, r_len);
+  while (pL < pE)
+  {
+    if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR)))
+      break;
+    pL++; pR++;
+  }
+  return (pL == pE) ? (int)(l_len - r_len) : (l - r);
+}
+
+static int mz_zip_reader_locate_file_binary_search(mz_zip_archive *pZip, const char *pFilename)
+{
+  mz_zip_internal_state *pState = pZip->m_pState;
+  const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets;
+  const mz_zip_array *pCentral_dir = &pState->m_central_dir;
+  mz_uint32 *pIndices = &MZ_ZIP_ARRAY_ELEMENT(&pState->m_sorted_central_dir_offsets, mz_uint32, 0);
+  const int size = pZip->m_total_files;
+  const mz_uint filename_len = (mz_uint)strlen(pFilename);
+  int l = 0, h = size - 1;
+  while (l <= h)
+  {
+    int m = (l + h) >> 1, file_index = pIndices[m], comp = mz_zip_reader_filename_compare(pCentral_dir, pCentral_dir_offsets, file_index, pFilename, filename_len);
+    if (!comp)
+      return file_index;
+    else if (comp < 0)
+      l = m + 1;
+    else
+      h = m - 1;
+  }
+  return -1;
+}
+
+int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags)
+{
+  mz_uint file_index; size_t name_len, comment_len;
+  if ((!pZip) || (!pZip->m_pState) || (!pName) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
+    return -1;
+  if (((flags & (MZ_ZIP_FLAG_IGNORE_PATH | MZ_ZIP_FLAG_CASE_SENSITIVE)) == 0) && (!pComment) && (pZip->m_pState->m_sorted_central_dir_offsets.m_size))
+    return mz_zip_reader_locate_file_binary_search(pZip, pName);
+  name_len = strlen(pName); if (name_len > 0xFFFF) return -1;
+  comment_len = pComment ? strlen(pComment) : 0; if (comment_len > 0xFFFF) return -1;
+  for (file_index = 0; file_index < pZip->m_total_files; file_index++)
+  {
+    const mz_uint8 *pHeader = &MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir, mz_uint8, MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index));
+    mz_uint filename_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_FILENAME_LEN_OFS);
+    const char *pFilename = (const char *)pHeader + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE;
+    if (filename_len < name_len)
+      continue;
+    if (comment_len)
+    {
+      mz_uint file_extra_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_EXTRA_LEN_OFS), file_comment_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_COMMENT_LEN_OFS);
+      const char *pFile_comment = pFilename + filename_len + file_extra_len;
+      if ((file_comment_len != comment_len) || (!mz_zip_reader_string_equal(pComment, pFile_comment, file_comment_len, flags)))
+        continue;
+    }
+    if ((flags & MZ_ZIP_FLAG_IGNORE_PATH) && (filename_len))
+    {
+      int ofs = filename_len - 1;
+      do
+      {
+        if ((pFilename[ofs] == '/') || (pFilename[ofs] == '\\') || (pFilename[ofs] == ':'))
+          break;
+      } while (--ofs >= 0);
+      ofs++;
+      pFilename += ofs; filename_len -= ofs;
+    }
+    if ((filename_len == name_len) && (mz_zip_reader_string_equal(pName, pFilename, filename_len, flags)))
+      return file_index;
+  }
+  return -1;
+}
+
+mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size)
+{
+  int status = TINFL_STATUS_DONE;
+  mz_uint64 needed_size, cur_file_ofs, comp_remaining, out_buf_ofs = 0, read_buf_size, read_buf_ofs = 0, read_buf_avail;
+  mz_zip_archive_file_stat file_stat;
+  void *pRead_buf;
+  mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32;
+  tinfl_decompressor inflator;
+
+  if ((buf_size) && (!pBuf))
+    return MZ_FALSE;
+
+  if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat))
+    return MZ_FALSE;
+
+  // Empty file, or a directory (but not always a directory - I've seen odd zips with directories that have compressed data which inflates to 0 bytes)
+  if (!file_stat.m_comp_size)
+    return MZ_TRUE;
+
+  // Entry is a subdirectory (I've seen old zips with dir entries which have compressed deflate data which inflates to 0 bytes, but these entries claim to uncompress to 512 bytes in the headers).
+  // I'm torn how to handle this case - should it fail instead?
+  if (mz_zip_reader_is_file_a_directory(pZip, file_index))
+    return MZ_TRUE;
+
+  // Encryption and patch files are not supported.
+  if (file_stat.m_bit_flag & (1 | 32))
+    return MZ_FALSE;
+
+  // This function only supports stored and deflate.
+  if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) && (file_stat.m_method != MZ_DEFLATED))
+    return MZ_FALSE;
+
+  // Ensure supplied output buffer is large enough.
+  needed_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? file_stat.m_comp_size : file_stat.m_uncomp_size;
+  if (buf_size < needed_size)
+    return MZ_FALSE;
+
+  // Read and parse the local directory entry.
+  cur_file_ofs = file_stat.m_local_header_ofs;
+  if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
+    return MZ_FALSE;
+  if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG)
+    return MZ_FALSE;
+
+  cur_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS);
+  if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size)
+    return MZ_FALSE;
+
+  if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method))
+  {
+    // The file is stored or the caller has requested the compressed data.
+    if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, (size_t)needed_size) != needed_size)
+      return MZ_FALSE;
+    return ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) != 0) || (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, (size_t)file_stat.m_uncomp_size) == file_stat.m_crc32);
+  }
+
+  // Decompress the file either directly from memory or from a file input buffer.
+  tinfl_init(&inflator);
+
+  if (pZip->m_pState->m_pMem)
+  {
+    // Read directly from the archive in memory.
+    pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs;
+    read_buf_size = read_buf_avail = file_stat.m_comp_size;
+    comp_remaining = 0;
+  }
+  else if (pUser_read_buf)
+  {
+    // Use a user provided read buffer.
+    if (!user_read_buf_size)
+      return MZ_FALSE;
+    pRead_buf = (mz_uint8 *)pUser_read_buf;
+    read_buf_size = user_read_buf_size;
+    read_buf_avail = 0;
+    comp_remaining = file_stat.m_comp_size;
+  }
+  else
+  {
+    // Temporarily allocate a read buffer.
+    read_buf_size = MZ_MIN(file_stat.m_comp_size, MZ_ZIP_MAX_IO_BUF_SIZE);
+#ifdef _MSC_VER
+    if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (read_buf_size > 0x7FFFFFFF))
+#else
+    if (((sizeof(size_t) == sizeof(mz_uint32))) && (read_buf_size > 0x7FFFFFFF))
+#endif
+      return MZ_FALSE;
+    if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)read_buf_size)))
+      return MZ_FALSE;
+    read_buf_avail = 0;
+    comp_remaining = file_stat.m_comp_size;
+  }
+
+  do
+  {
+    size_t in_buf_size, out_buf_size = (size_t)(file_stat.m_uncomp_size - out_buf_ofs);
+    if ((!read_buf_avail) && (!pZip->m_pState->m_pMem))
+    {
+      read_buf_avail = MZ_MIN(read_buf_size, comp_remaining);
+      if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail)
+      {
+        status = TINFL_STATUS_FAILED;
+        break;
+      }
+      cur_file_ofs += read_buf_avail;
+      comp_remaining -= read_buf_avail;
+      read_buf_ofs = 0;
+    }
+    in_buf_size = (size_t)read_buf_avail;
+    status = tinfl_decompress(&inflator, (mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, (mz_uint8 *)pBuf, (mz_uint8 *)pBuf + out_buf_ofs, &out_buf_size, TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF | (comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0));
+    read_buf_avail -= in_buf_size;
+    read_buf_ofs += in_buf_size;
+    out_buf_ofs += out_buf_size;
+  } while (status == TINFL_STATUS_NEEDS_MORE_INPUT);
+
+  if (status == TINFL_STATUS_DONE)
+  {
+    // Make sure the entire file was decompressed, and check its CRC.
+    if ((out_buf_ofs != file_stat.m_uncomp_size) || (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, (size_t)file_stat.m_uncomp_size) != file_stat.m_crc32))
+      status = TINFL_STATUS_FAILED;
+  }
+
+  if ((!pZip->m_pState->m_pMem) && (!pUser_read_buf))
+    pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+
+  return status == TINFL_STATUS_DONE;
+}
+
+mz_bool mz_zip_reader_extract_file_to_mem_no_alloc(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size)
+{
+  int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags);
+  if (file_index < 0)
+    return MZ_FALSE;
+  return mz_zip_reader_extract_to_mem_no_alloc(pZip, file_index, pBuf, buf_size, flags, pUser_read_buf, user_read_buf_size);
+}
+
+mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags)
+{
+  return mz_zip_reader_extract_to_mem_no_alloc(pZip, file_index, pBuf, buf_size, flags, NULL, 0);
+}
+
+mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags)
+{
+  return mz_zip_reader_extract_file_to_mem_no_alloc(pZip, pFilename, pBuf, buf_size, flags, NULL, 0);
+}
+
+void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, size_t *pSize, mz_uint flags)
+{
+  mz_uint64 comp_size, uncomp_size, alloc_size;
+  const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
+  void *pBuf;
+
+  if (pSize)
+    *pSize = 0;
+  if (!p)
+    return NULL;
+
+  comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
+  uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
+
+  alloc_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? comp_size : uncomp_size;
+#ifdef _MSC_VER
+  if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF))
+#else
+  if (((sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF))
+#endif
+    return NULL;
+  if (NULL == (pBuf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)alloc_size)))
+    return NULL;
+
+  if (!mz_zip_reader_extract_to_mem(pZip, file_index, pBuf, (size_t)alloc_size, flags))
+  {
+    pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
+    return NULL;
+  }
+
+  if (pSize) *pSize = (size_t)alloc_size;
+  return pBuf;
+}
+
+void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, const char *pFilename, size_t *pSize, mz_uint flags)
+{
+  int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags);
+  if (file_index < 0)
+  {
+    if (pSize) *pSize = 0;
+    return MZ_FALSE;
+  }
+  return mz_zip_reader_extract_to_heap(pZip, file_index, pSize, flags);
+}
+
+mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, mz_uint file_index, mz_file_write_func pCallback, void *pOpaque, mz_uint flags)
+{
+  int status = TINFL_STATUS_DONE; mz_uint file_crc32 = MZ_CRC32_INIT;
+  mz_uint64 read_buf_size, read_buf_ofs = 0, read_buf_avail, comp_remaining, out_buf_ofs = 0, cur_file_ofs;
+  mz_zip_archive_file_stat file_stat;
+  void *pRead_buf = NULL; void *pWrite_buf = NULL;
+  mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32;
+
+  if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat))
+    return MZ_FALSE;
+
+  // Empty file, or a directory (but not always a directory - I've seen odd zips with directories that have compressed data which inflates to 0 bytes)
+  if (!file_stat.m_comp_size)
+    return MZ_TRUE;
+
+  // Entry is a subdirectory (I've seen old zips with dir entries which have compressed deflate data which inflates to 0 bytes, but these entries claim to uncompress to 512 bytes in the headers).
+  // I'm torn how to handle this case - should it fail instead?
+  if (mz_zip_reader_is_file_a_directory(pZip, file_index))
+    return MZ_TRUE;
+
+  // Encryption and patch files are not supported.
+  if (file_stat.m_bit_flag & (1 | 32))
+    return MZ_FALSE;
+
+  // This function only supports stored and deflate.
+  if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) && (file_stat.m_method != MZ_DEFLATED))
+    return MZ_FALSE;
+
+  // Read and parse the local directory entry.
+  cur_file_ofs = file_stat.m_local_header_ofs;
+  if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
+    return MZ_FALSE;
+  if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG)
+    return MZ_FALSE;
+
+  cur_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS);
+  if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size)
+    return MZ_FALSE;
+
+  // Decompress the file either directly from memory or from a file input buffer.
+  if (pZip->m_pState->m_pMem)
+  {
+    pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs;
+    read_buf_size = read_buf_avail = file_stat.m_comp_size;
+    comp_remaining = 0;
+  }
+  else
+  {
+    read_buf_size = MZ_MIN(file_stat.m_comp_size, MZ_ZIP_MAX_IO_BUF_SIZE);
+    if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)read_buf_size)))
+      return MZ_FALSE;
+    read_buf_avail = 0;
+    comp_remaining = file_stat.m_comp_size;
+  }
+
+  if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method))
+  {
+    // The file is stored or the caller has requested the compressed data.
+    if (pZip->m_pState->m_pMem)
+    {
+#ifdef _MSC_VER
+      if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (file_stat.m_comp_size > 0xFFFFFFFF))
+#else
+      if (((sizeof(size_t) == sizeof(mz_uint32))) && (file_stat.m_comp_size > 0xFFFFFFFF))
+#endif
+        return MZ_FALSE;
+      if (pCallback(pOpaque, out_buf_ofs, pRead_buf, (size_t)file_stat.m_comp_size) != file_stat.m_comp_size)
+        status = TINFL_STATUS_FAILED;
+      else if (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA))
+        file_crc32 = (mz_uint32)mz_crc32(file_crc32, (const mz_uint8 *)pRead_buf, (size_t)file_stat.m_comp_size);
+      cur_file_ofs += file_stat.m_comp_size;
+      out_buf_ofs += file_stat.m_comp_size;
+      comp_remaining = 0;
+    }
+    else
+    {
+      while (comp_remaining)
+      {
+        read_buf_avail = MZ_MIN(read_buf_size, comp_remaining);
+        if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail)
+        {
+          status = TINFL_STATUS_FAILED;
+          break;
+        }
+
+        if (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA))
+          file_crc32 = (mz_uint32)mz_crc32(file_crc32, (const mz_uint8 *)pRead_buf, (size_t)read_buf_avail);
+
+        if (pCallback(pOpaque, out_buf_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail)
+        {
+          status = TINFL_STATUS_FAILED;
+          break;
+        }
+        cur_file_ofs += read_buf_avail;
+        out_buf_ofs += read_buf_avail;
+        comp_remaining -= read_buf_avail;
+      }
+    }
+  }
+  else
+  {
+    tinfl_decompressor inflator;
+    tinfl_init(&inflator);
+
+    if (NULL == (pWrite_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, TINFL_LZ_DICT_SIZE)))
+      status = TINFL_STATUS_FAILED;
+    else
+    {
+      do
+      {
+        mz_uint8 *pWrite_buf_cur = (mz_uint8 *)pWrite_buf + (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1));
+        size_t in_buf_size, out_buf_size = TINFL_LZ_DICT_SIZE - (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1));
+        if ((!read_buf_avail) && (!pZip->m_pState->m_pMem))
+        {
+          read_buf_avail = MZ_MIN(read_buf_size, comp_remaining);
+          if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, (size_t)read_buf_avail) != read_buf_avail)
+          {
+            status = TINFL_STATUS_FAILED;
+            break;
+          }
+          cur_file_ofs += read_buf_avail;
+          comp_remaining -= read_buf_avail;
+          read_buf_ofs = 0;
+        }
+
+        in_buf_size = (size_t)read_buf_avail;
+        status = tinfl_decompress(&inflator, (const mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, (mz_uint8 *)pWrite_buf, pWrite_buf_cur, &out_buf_size, comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0);
+        read_buf_avail -= in_buf_size;
+        read_buf_ofs += in_buf_size;
+
+        if (out_buf_size)
+        {
+          if (pCallback(pOpaque, out_buf_ofs, pWrite_buf_cur, out_buf_size) != out_buf_size)
+          {
+            status = TINFL_STATUS_FAILED;
+            break;
+          }
+          file_crc32 = (mz_uint32)mz_crc32(file_crc32, pWrite_buf_cur, out_buf_size);
+          if ((out_buf_ofs += out_buf_size) > file_stat.m_uncomp_size)
+          {
+            status = TINFL_STATUS_FAILED;
+            break;
+          }
+        }
+      } while ((status == TINFL_STATUS_NEEDS_MORE_INPUT) || (status == TINFL_STATUS_HAS_MORE_OUTPUT));
+    }
+  }
+
+  if ((status == TINFL_STATUS_DONE) && (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)))
+  {
+    // Make sure the entire file was decompressed, and check its CRC.
+    if ((out_buf_ofs != file_stat.m_uncomp_size) || (file_crc32 != file_stat.m_crc32))
+      status = TINFL_STATUS_FAILED;
+  }
+
+  if (!pZip->m_pState->m_pMem)
+    pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+  if (pWrite_buf)
+    pZip->m_pFree(pZip->m_pAlloc_opaque, pWrite_buf);
+
+  return status == TINFL_STATUS_DONE;
+}
+
+mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, const char *pFilename, mz_file_write_func pCallback, void *pOpaque, mz_uint flags)
+{
+  int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags);
+  if (file_index < 0)
+    return MZ_FALSE;
+  return mz_zip_reader_extract_to_callback(pZip, file_index, pCallback, pOpaque, flags);
+}
+
+#ifndef MINIZ_NO_STDIO
+static size_t mz_zip_file_write_callback(void *pOpaque, mz_uint64 ofs, const void *pBuf, size_t n)
+{
+  (void)ofs; return MZ_FWRITE(pBuf, 1, n, (MZ_FILE*)pOpaque);
+}
+
+mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, const char *pDst_filename, mz_uint flags)
+{
+  mz_bool status;
+  mz_zip_archive_file_stat file_stat;
+  MZ_FILE *pFile;
+  if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat))
+    return MZ_FALSE;
+  pFile = MZ_FOPEN(pDst_filename, "wb");
+  if (!pFile)
+    return MZ_FALSE;
+  status = mz_zip_reader_extract_to_callback(pZip, file_index, mz_zip_file_write_callback, pFile, flags);
+  if (MZ_FCLOSE(pFile) == EOF)
+    return MZ_FALSE;
+#ifndef MINIZ_NO_TIME
+  if (status)
+    mz_zip_set_file_times(pDst_filename, file_stat.m_time, file_stat.m_time);
+#endif
+  return status;
+}
+#endif // #ifndef MINIZ_NO_STDIO
+
+mz_bool mz_zip_reader_end(mz_zip_archive *pZip)
+{
+  if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
+    return MZ_FALSE;
+
+  if (pZip->m_pState)
+  {
+    mz_zip_internal_state *pState = pZip->m_pState; pZip->m_pState = NULL;
+    mz_zip_array_clear(pZip, &pState->m_central_dir);
+    mz_zip_array_clear(pZip, &pState->m_central_dir_offsets);
+    mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets);
+
+#ifndef MINIZ_NO_STDIO
+    if (pState->m_pFile)
+    {
+      MZ_FCLOSE(pState->m_pFile);
+      pState->m_pFile = NULL;
+    }
+#endif // #ifndef MINIZ_NO_STDIO
+
+    pZip->m_pFree(pZip->m_pAlloc_opaque, pState);
+  }
+  pZip->m_zip_mode = MZ_ZIP_MODE_INVALID;
+
+  return MZ_TRUE;
+}
+
+#ifndef MINIZ_NO_STDIO
+mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, const char *pArchive_filename, const char *pDst_filename, mz_uint flags)
+{
+  int file_index = mz_zip_reader_locate_file(pZip, pArchive_filename, NULL, flags);
+  if (file_index < 0)
+    return MZ_FALSE;
+  return mz_zip_reader_extract_to_file(pZip, file_index, pDst_filename, flags);
+}
+#endif
+
+// ------------------- .ZIP archive writing
+
+#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
+
+static void mz_write_le16(mz_uint8 *p, mz_uint16 v) { p[0] = (mz_uint8)v; p[1] = (mz_uint8)(v >> 8); }
+static void mz_write_le32(mz_uint8 *p, mz_uint32 v) { p[0] = (mz_uint8)v; p[1] = (mz_uint8)(v >> 8); p[2] = (mz_uint8)(v >> 16); p[3] = (mz_uint8)(v >> 24); }
+#define MZ_WRITE_LE16(p, v) mz_write_le16((mz_uint8 *)(p), (mz_uint16)(v))
+#define MZ_WRITE_LE32(p, v) mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v))
+
+mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size)
+{
+  if ((!pZip) || (pZip->m_pState) || (!pZip->m_pWrite) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID))
+    return MZ_FALSE;
+
+  if (pZip->m_file_offset_alignment)
+  {
+    // Ensure user specified file offset alignment is a power of 2.
+    if (pZip->m_file_offset_alignment & (pZip->m_file_offset_alignment - 1))
+      return MZ_FALSE;
+  }
+
+  if (!pZip->m_pAlloc) pZip->m_pAlloc = def_alloc_func;
+  if (!pZip->m_pFree) pZip->m_pFree = def_free_func;
+  if (!pZip->m_pRealloc) pZip->m_pRealloc = def_realloc_func;
+
+  pZip->m_zip_mode = MZ_ZIP_MODE_WRITING;
+  pZip->m_archive_size = existing_size;
+  pZip->m_central_directory_file_ofs = 0;
+  pZip->m_total_files = 0;
+
+  if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state))))
+    return MZ_FALSE;
+  memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state));
+  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8));
+  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, sizeof(mz_uint32));
+  MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, sizeof(mz_uint32));
+  return MZ_TRUE;
+}
+
+static size_t mz_zip_heap_write_func(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n)
+{
+  mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
+  mz_zip_internal_state *pState = pZip->m_pState;
+  mz_uint64 new_size = MZ_MAX(file_ofs + n, pState->m_mem_size);
+#ifdef _MSC_VER
+  if ((!n) || ((0, sizeof(size_t) == sizeof(mz_uint32)) && (new_size > 0x7FFFFFFF)))
+#else
+  if ((!n) || ((sizeof(size_t) == sizeof(mz_uint32)) && (new_size > 0x7FFFFFFF)))
+#endif
+    return 0;
+  if (new_size > pState->m_mem_capacity)
+  {
+    void *pNew_block;
+    size_t new_capacity = MZ_MAX(64, pState->m_mem_capacity); while (new_capacity < new_size) new_capacity *= 2;
+    if (NULL == (pNew_block = pZip->m_pRealloc(pZip->m_pAlloc_opaque, pState->m_pMem, 1, new_capacity)))
+      return 0;
+    pState->m_pMem = pNew_block; pState->m_mem_capacity = new_capacity;
+  }
+  memcpy((mz_uint8 *)pState->m_pMem + file_ofs, pBuf, n);
+  pState->m_mem_size = (size_t)new_size;
+  return n;
+}
+
+mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, size_t size_to_reserve_at_beginning, size_t initial_allocation_size)
+{
+  pZip->m_pWrite = mz_zip_heap_write_func;
+  pZip->m_pIO_opaque = pZip;
+  if (!mz_zip_writer_init(pZip, size_to_reserve_at_beginning))
+    return MZ_FALSE;
+  if (0 != (initial_allocation_size = MZ_MAX(initial_allocation_size, size_to_reserve_at_beginning)))
+  {
+    if (NULL == (pZip->m_pState->m_pMem = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, initial_allocation_size)))
+    {
+      mz_zip_writer_end(pZip);
+      return MZ_FALSE;
+    }
+    pZip->m_pState->m_mem_capacity = initial_allocation_size;
+  }
+  return MZ_TRUE;
+}
+
+#ifndef MINIZ_NO_STDIO
+static size_t mz_zip_file_write_func(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n)
+{
+  mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
+  mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile);
+  if (((mz_int64)file_ofs < 0) || (((cur_ofs != (mz_int64)file_ofs)) && (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET))))
+    return 0;
+  return MZ_FWRITE(pBuf, 1, n, pZip->m_pState->m_pFile);
+}
+
+mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint64 size_to_reserve_at_beginning)
+{
+  MZ_FILE *pFile;
+  pZip->m_pWrite = mz_zip_file_write_func;
+  pZip->m_pIO_opaque = pZip;
+  if (!mz_zip_writer_init(pZip, size_to_reserve_at_beginning))
+    return MZ_FALSE;
+  if (NULL == (pFile = MZ_FOPEN(pFilename, "wb")))
+  {
+    mz_zip_writer_end(pZip);
+    return MZ_FALSE;
+  }
+  pZip->m_pState->m_pFile = pFile;
+  if (size_to_reserve_at_beginning)
+  {
+    mz_uint64 cur_ofs = 0; char buf[4096]; MZ_CLEAR_OBJ(buf);
+    do
+    {
+      size_t n = (size_t)MZ_MIN(sizeof(buf), size_to_reserve_at_beginning);
+      if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_ofs, buf, n) != n)
+      {
+        mz_zip_writer_end(pZip);
+        return MZ_FALSE;
+      }
+      cur_ofs += n; size_to_reserve_at_beginning -= n;
+    } while (size_to_reserve_at_beginning);
+  }
+  return MZ_TRUE;
+}
+#endif // #ifndef MINIZ_NO_STDIO
+
+mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, const char *pFilename)
+{
+  mz_zip_internal_state *pState;
+  if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
+    return MZ_FALSE;
+  // No sense in trying to write to an archive that's already at the support max size
+  if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_ZIP_LOCAL_DIR_HEADER_SIZE) > 0xFFFFFFFF))
+    return MZ_FALSE;
+
+  pState = pZip->m_pState;
+
+  if (pState->m_pFile)
+  {
+#ifdef MINIZ_NO_STDIO
+    pFilename; return MZ_FALSE;
+#else
+    // Archive is being read from stdio - try to reopen as writable.
+    if (pZip->m_pIO_opaque != pZip)
+      return MZ_FALSE;
+    if (!pFilename)
+      return MZ_FALSE;
+    pZip->m_pWrite = mz_zip_file_write_func;
+    if (NULL == (pState->m_pFile = MZ_FREOPEN(pFilename, "r+b", pState->m_pFile)))
+    {
+      // The mz_zip_archive is now in a bogus state because pState->m_pFile is NULL, so just close it.
+      mz_zip_reader_end(pZip);
+      return MZ_FALSE;
+    }
+#endif // #ifdef MINIZ_NO_STDIO
+  }
+  else if (pState->m_pMem)
+  {
+    // Archive lives in a memory block. Assume it's from the heap that we can resize using the realloc callback.
+    if (pZip->m_pIO_opaque != pZip)
+      return MZ_FALSE;
+    pState->m_mem_capacity = pState->m_mem_size;
+    pZip->m_pWrite = mz_zip_heap_write_func;
+  }
+  // Archive is being read via a user provided read function - make sure the user has specified a write function too.
+  else if (!pZip->m_pWrite)
+    return MZ_FALSE;
+
+  // Start writing new files at the archive's current central directory location.
+  pZip->m_archive_size = pZip->m_central_directory_file_ofs;
+  pZip->m_zip_mode = MZ_ZIP_MODE_WRITING;
+  pZip->m_central_directory_file_ofs = 0;
+
+  return MZ_TRUE;
+}
+
+mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, mz_uint level_and_flags)
+{
+  return mz_zip_writer_add_mem_ex(pZip, pArchive_name, pBuf, buf_size, NULL, 0, level_and_flags, 0, 0);
+}
+
+typedef struct
+{
+  mz_zip_archive *m_pZip;
+  mz_uint64 m_cur_archive_file_ofs;
+  mz_uint64 m_comp_size;
+} mz_zip_writer_add_state;
+
+static mz_bool mz_zip_writer_add_put_buf_callback(const void* pBuf, int len, void *pUser)
+{
+  mz_zip_writer_add_state *pState = (mz_zip_writer_add_state *)pUser;
+  if ((int)pState->m_pZip->m_pWrite(pState->m_pZip->m_pIO_opaque, pState->m_cur_archive_file_ofs, pBuf, len) != len)
+    return MZ_FALSE;
+  pState->m_cur_archive_file_ofs += len;
+  pState->m_comp_size += len;
+  return MZ_TRUE;
+}
+
+static mz_bool mz_zip_writer_create_local_dir_header(mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, mz_uint16 extra_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date)
+{
+  (void)pZip;
+  memset(pDst, 0, MZ_ZIP_LOCAL_DIR_HEADER_SIZE);
+  MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_SIG_OFS, MZ_ZIP_LOCAL_DIR_HEADER_SIG);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_VERSION_NEEDED_OFS, method ? 20 : 0);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_BIT_FLAG_OFS, bit_flags);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_METHOD_OFS, method);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILE_TIME_OFS, dos_time);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILE_DATE_OFS, dos_date);
+  MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_CRC32_OFS, uncomp_crc32);
+  MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS, comp_size);
+  MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS, uncomp_size);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILENAME_LEN_OFS, filename_size);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_EXTRA_LEN_OFS, extra_size);
+  return MZ_TRUE;
+}
+
+static mz_bool mz_zip_writer_create_central_dir_header(mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, mz_uint16 extra_size, mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date, mz_uint64 local_header_ofs, mz_uint32 ext_attributes)
+{
+  (void)pZip;
+  memset(pDst, 0, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE);
+  MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_SIG_OFS, MZ_ZIP_CENTRAL_DIR_HEADER_SIG);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_VERSION_NEEDED_OFS, method ? 20 : 0);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_BIT_FLAG_OFS, bit_flags);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_METHOD_OFS, method);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILE_TIME_OFS, dos_time);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILE_DATE_OFS, dos_date);
+  MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_CRC32_OFS, uncomp_crc32);
+  MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS, comp_size);
+  MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS, uncomp_size);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILENAME_LEN_OFS, filename_size);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_EXTRA_LEN_OFS, extra_size);
+  MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_COMMENT_LEN_OFS, comment_size);
+  MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS, ext_attributes);
+  MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_LOCAL_HEADER_OFS, local_header_ofs);
+  return MZ_TRUE;
+}
+
+static mz_bool mz_zip_writer_add_to_central_dir(mz_zip_archive *pZip, const char *pFilename, mz_uint16 filename_size, const void *pExtra, mz_uint16 extra_size, const void *pComment, mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date, mz_uint64 local_header_ofs, mz_uint32 ext_attributes)
+{
+  mz_zip_internal_state *pState = pZip->m_pState;
+  mz_uint32 central_dir_ofs = (mz_uint32)pState->m_central_dir.m_size;
+  size_t orig_central_dir_size = pState->m_central_dir.m_size;
+  mz_uint8 central_dir_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE];
+
+  // No zip64 support yet
+  if ((local_header_ofs > 0xFFFFFFFF) || (((mz_uint64)pState->m_central_dir.m_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size + extra_size + comment_size) > 0xFFFFFFFF))
+    return MZ_FALSE;
+
+  if (!mz_zip_writer_create_central_dir_header(pZip, central_dir_header, filename_size, extra_size, comment_size, uncomp_size, comp_size, uncomp_crc32, method, bit_flags, dos_time, dos_date, local_header_ofs, ext_attributes))
+    return MZ_FALSE;
+
+  if ((!mz_zip_array_push_back(pZip, &pState->m_central_dir, central_dir_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)) ||
+      (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pFilename, filename_size)) ||
+      (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pExtra, extra_size)) ||
+      (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pComment, comment_size)) ||
+      (!mz_zip_array_push_back(pZip, &pState->m_central_dir_offsets, &central_dir_ofs, 1)))
+  {
+    // Try to push the central directory array back into its original state.
+    mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, MZ_FALSE);
+    return MZ_FALSE;
+  }
+
+  return MZ_TRUE;
+}
+
+static mz_bool mz_zip_writer_validate_archive_name(const char *pArchive_name)
+{
+  // Basic ZIP archive filename validity checks: Valid filenames cannot start with a forward slash, cannot contain a drive letter, and cannot use DOS-style backward slashes.
+  if (*pArchive_name == '/')
+    return MZ_FALSE;
+  while (*pArchive_name)
+  {
+    if ((*pArchive_name == '\\') || (*pArchive_name == ':'))
+      return MZ_FALSE;
+    pArchive_name++;
+  }
+  return MZ_TRUE;
+}
+
+static mz_uint mz_zip_writer_compute_padding_needed_for_file_alignment(mz_zip_archive *pZip)
+{
+  mz_uint32 n;
+  if (!pZip->m_file_offset_alignment)
+    return 0;
+  n = (mz_uint32)(pZip->m_archive_size & (pZip->m_file_offset_alignment - 1));
+  return (pZip->m_file_offset_alignment - n) & (pZip->m_file_offset_alignment - 1);
+}
+
+static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip, mz_uint64 cur_file_ofs, mz_uint32 n)
+{
+  char buf[4096];
+  memset(buf, 0, MZ_MIN(sizeof(buf), n));
+  while (n)
+  {
+    mz_uint32 s = MZ_MIN(sizeof(buf), n);
+    if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_file_ofs, buf, s) != s)
+      return MZ_FALSE;
+    cur_file_ofs += s; n -= s;
+  }
+  return MZ_TRUE;
+}
+
+mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32)
+{
+  mz_uint16 method = 0, dos_time = 0, dos_date = 0;
+  mz_uint level, ext_attributes = 0, num_alignment_padding_bytes;
+  mz_uint64 local_dir_header_ofs = pZip->m_archive_size, cur_archive_file_ofs = pZip->m_archive_size, comp_size = 0;
+  size_t archive_name_size;
+  mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE];
+  tdefl_compressor *pComp = NULL;
+  mz_bool store_data_uncompressed;
+  mz_zip_internal_state *pState;
+
+  if ((int)level_and_flags < 0)
+    level_and_flags = MZ_DEFAULT_LEVEL;
+  level = level_and_flags & 0xF;
+  store_data_uncompressed = ((!level) || (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA));
+
+  if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || ((buf_size) && (!pBuf)) || (!pArchive_name) || ((comment_size) && (!pComment)) || (pZip->m_total_files == 0xFFFF) || (level > MZ_UBER_COMPRESSION))
+    return MZ_FALSE;
+
+  pState = pZip->m_pState;
+
+  if ((!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (uncomp_size))
+    return MZ_FALSE;
+  // No zip64 support yet
+  if ((buf_size > 0xFFFFFFFF) || (uncomp_size > 0xFFFFFFFF))
+    return MZ_FALSE;
+  if (!mz_zip_writer_validate_archive_name(pArchive_name))
+    return MZ_FALSE;
+
+#ifndef MINIZ_NO_TIME
+  {
+    time_t cur_time; time(&cur_time);
+    mz_zip_time_to_dos_time(cur_time, &dos_time, &dos_date);
+  }
+#endif // #ifndef MINIZ_NO_TIME
+
+  archive_name_size = strlen(pArchive_name);
+  if (archive_name_size > 0xFFFF)
+    return MZ_FALSE;
+
+  num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip);
+
+  // no zip64 support yet
+  if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + comment_size + archive_name_size) > 0xFFFFFFFF))
+    return MZ_FALSE;
+
+  if ((archive_name_size) && (pArchive_name[archive_name_size - 1] == '/'))
+  {
+    // Set DOS Subdirectory attribute bit.
+    ext_attributes |= 0x10;
+    // Subdirectories cannot contain data.
+    if ((buf_size) || (uncomp_size))
+      return MZ_FALSE;
+  }
+
+  // Try to do any allocations before writing to the archive, so if an allocation fails the file remains unmodified. (A good idea if we're doing an in-place modification.)
+  if ((!mz_zip_array_ensure_room(pZip, &pState->m_central_dir, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + comment_size)) || (!mz_zip_array_ensure_room(pZip, &pState->m_central_dir_offsets, 1)))
+    return MZ_FALSE;
+
+  if ((!store_data_uncompressed) && (buf_size))
+  {
+    if (NULL == (pComp = (tdefl_compressor *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor))))
+      return MZ_FALSE;
+  }
+
+  if (!mz_zip_writer_write_zeros(pZip, cur_archive_file_ofs, num_alignment_padding_bytes + sizeof(local_dir_header)))
+  {
+    pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+    return MZ_FALSE;
+  }
+  local_dir_header_ofs += num_alignment_padding_bytes;
+  if (pZip->m_file_offset_alignment) { MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == 0); }
+  cur_archive_file_ofs += num_alignment_padding_bytes + sizeof(local_dir_header);
+
+  MZ_CLEAR_OBJ(local_dir_header);
+  if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, archive_name_size) != archive_name_size)
+  {
+    pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+    return MZ_FALSE;
+  }
+  cur_archive_file_ofs += archive_name_size;
+
+  if (!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA))
+  {
+    uncomp_crc32 = (mz_uint32)mz_crc32(MZ_CRC32_INIT, (const mz_uint8*)pBuf, buf_size);
+    uncomp_size = buf_size;
+    if (uncomp_size <= 3)
+    {
+      level = 0;
+      store_data_uncompressed = MZ_TRUE;
+    }
+  }
+
+  if (store_data_uncompressed)
+  {
+    if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pBuf, buf_size) != buf_size)
+    {
+      pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+      return MZ_FALSE;
+    }
+
+    cur_archive_file_ofs += buf_size;
+    comp_size = buf_size;
+
+    if (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)
+      method = MZ_DEFLATED;
+  }
+  else if (buf_size)
+  {
+    mz_zip_writer_add_state state;
+
+    state.m_pZip = pZip;
+    state.m_cur_archive_file_ofs = cur_archive_file_ofs;
+    state.m_comp_size = 0;
+
+    if ((tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, tdefl_create_comp_flags_from_zip_params(level, -15, MZ_DEFAULT_STRATEGY)) != TDEFL_STATUS_OKAY) ||
+        (tdefl_compress_buffer(pComp, pBuf, buf_size, TDEFL_FINISH) != TDEFL_STATUS_DONE))
+    {
+      pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+      return MZ_FALSE;
+    }
+
+    comp_size = state.m_comp_size;
+    cur_archive_file_ofs = state.m_cur_archive_file_ofs;
+
+    method = MZ_DEFLATED;
+  }
+
+  pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+  pComp = NULL;
+
+  // no zip64 support yet
+  if ((comp_size > 0xFFFFFFFF) || (cur_archive_file_ofs > 0xFFFFFFFF))
+    return MZ_FALSE;
+
+  if (!mz_zip_writer_create_local_dir_header(pZip, local_dir_header, (mz_uint16)archive_name_size, 0, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date))
+    return MZ_FALSE;
+
+  if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_ofs, local_dir_header, sizeof(local_dir_header)) != sizeof(local_dir_header))
+    return MZ_FALSE;
+
+  if (!mz_zip_writer_add_to_central_dir(pZip, pArchive_name, (mz_uint16)archive_name_size, NULL, 0, pComment, comment_size, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date, local_dir_header_ofs, ext_attributes))
+    return MZ_FALSE;
+
+  pZip->m_total_files++;
+  pZip->m_archive_size = cur_archive_file_ofs;
+
+  return MZ_TRUE;
+}
+
+#ifndef MINIZ_NO_STDIO
+mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags)
+{
+  mz_uint uncomp_crc32 = MZ_CRC32_INIT, level, num_alignment_padding_bytes;
+  mz_uint16 method = 0, dos_time = 0, dos_date = 0, ext_attributes = 0;
+  mz_uint64 local_dir_header_ofs = pZip->m_archive_size, cur_archive_file_ofs = pZip->m_archive_size, uncomp_size = 0, comp_size = 0;
+  size_t archive_name_size;
+  mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE];
+  MZ_FILE *pSrc_file = NULL;
+
+  if ((int)level_and_flags < 0)
+    level_and_flags = MZ_DEFAULT_LEVEL;
+  level = level_and_flags & 0xF;
+
+  if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || (!pArchive_name) || ((comment_size) && (!pComment)) || (level > MZ_UBER_COMPRESSION))
+    return MZ_FALSE;
+  if (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)
+    return MZ_FALSE;
+  if (!mz_zip_writer_validate_archive_name(pArchive_name))
+    return MZ_FALSE;
+
+  archive_name_size = strlen(pArchive_name);
+  if (archive_name_size > 0xFFFF)
+    return MZ_FALSE;
+
+  num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip);
+
+  // no zip64 support yet
+  if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + comment_size + archive_name_size) > 0xFFFFFFFF))
+    return MZ_FALSE;
+
+  if (!mz_zip_get_file_modified_time(pSrc_filename, &dos_time, &dos_date))
+    return MZ_FALSE;
+    
+  pSrc_file = MZ_FOPEN(pSrc_filename, "rb");
+  if (!pSrc_file)
+    return MZ_FALSE;
+  MZ_FSEEK64(pSrc_file, 0, SEEK_END);
+  uncomp_size = MZ_FTELL64(pSrc_file);
+  MZ_FSEEK64(pSrc_file, 0, SEEK_SET);
+
+  if (uncomp_size > 0xFFFFFFFF)
+  {
+    // No zip64 support yet
+    MZ_FCLOSE(pSrc_file);
+    return MZ_FALSE;
+  }
+  if (uncomp_size <= 3)
+    level = 0;
+
+  if (!mz_zip_writer_write_zeros(pZip, cur_archive_file_ofs, num_alignment_padding_bytes + sizeof(local_dir_header)))
+  {
+    MZ_FCLOSE(pSrc_file);
+    return MZ_FALSE;
+  }
+  local_dir_header_ofs += num_alignment_padding_bytes;
+  if (pZip->m_file_offset_alignment) { MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == 0); }
+  cur_archive_file_ofs += num_alignment_padding_bytes + sizeof(local_dir_header);
+
+  MZ_CLEAR_OBJ(local_dir_header);
+  if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, archive_name_size) != archive_name_size)
+  {
+    MZ_FCLOSE(pSrc_file);
+    return MZ_FALSE;
+  }
+  cur_archive_file_ofs += archive_name_size;
+
+  if (uncomp_size)
+  {
+    mz_uint64 uncomp_remaining = uncomp_size;
+    void *pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, MZ_ZIP_MAX_IO_BUF_SIZE);
+    if (!pRead_buf)
+    {
+      MZ_FCLOSE(pSrc_file);
+      return MZ_FALSE;
+    }
+
+    if (!level)
+    {
+      while (uncomp_remaining)
+      {
+        mz_uint n = (mz_uint)MZ_MIN(MZ_ZIP_MAX_IO_BUF_SIZE, uncomp_remaining);
+        if ((MZ_FREAD(pRead_buf, 1, n, pSrc_file) != n) || (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pRead_buf, n) != n))
+        {
+          pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+          MZ_FCLOSE(pSrc_file);
+          return MZ_FALSE;
+        }
+        uncomp_crc32 = (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, n);
+        uncomp_remaining -= n;
+        cur_archive_file_ofs += n;
+      }
+      comp_size = uncomp_size;
+    }
+    else
+    {
+      mz_bool result = MZ_FALSE;
+      mz_zip_writer_add_state state;
+      tdefl_compressor *pComp = (tdefl_compressor *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor));
+      if (!pComp)
+      {
+        pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+        MZ_FCLOSE(pSrc_file);
+        return MZ_FALSE;
+      }
+
+      state.m_pZip = pZip;
+      state.m_cur_archive_file_ofs = cur_archive_file_ofs;
+      state.m_comp_size = 0;
+
+      if (tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, tdefl_create_comp_flags_from_zip_params(level, -15, MZ_DEFAULT_STRATEGY)) != TDEFL_STATUS_OKAY)
+      {
+        pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+        pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+        MZ_FCLOSE(pSrc_file);
+        return MZ_FALSE;
+      }
+
+      for ( ; ; )
+      {
+        size_t in_buf_size = (mz_uint32)MZ_MIN(uncomp_remaining, MZ_ZIP_MAX_IO_BUF_SIZE);
+        tdefl_status status;
+
+        if (MZ_FREAD(pRead_buf, 1, in_buf_size, pSrc_file) != in_buf_size)
+          break;
+
+        uncomp_crc32 = (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, in_buf_size);
+        uncomp_remaining -= in_buf_size;
+
+        status = tdefl_compress_buffer(pComp, pRead_buf, in_buf_size, uncomp_remaining ? TDEFL_NO_FLUSH : TDEFL_FINISH);
+        if (status == TDEFL_STATUS_DONE)
+        {
+          result = MZ_TRUE;
+          break;
+        }
+        else if (status != TDEFL_STATUS_OKAY)
+          break;
+      }
+
+      pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
+
+      if (!result)
+      {
+        pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+        MZ_FCLOSE(pSrc_file);
+        return MZ_FALSE;
+      }
+
+      comp_size = state.m_comp_size;
+      cur_archive_file_ofs = state.m_cur_archive_file_ofs;
+
+      method = MZ_DEFLATED;
+    }
+
+    pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
+  }
+
+  MZ_FCLOSE(pSrc_file); pSrc_file = NULL;
+
+  // no zip64 support yet
+  if ((comp_size > 0xFFFFFFFF) || (cur_archive_file_ofs > 0xFFFFFFFF))
+    return MZ_FALSE;
+
+  if (!mz_zip_writer_create_local_dir_header(pZip, local_dir_header, (mz_uint16)archive_name_size, 0, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date))
+    return MZ_FALSE;
+
+  if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_ofs, local_dir_header, sizeof(local_dir_header)) != sizeof(local_dir_header))
+    return MZ_FALSE;
+
+  if (!mz_zip_writer_add_to_central_dir(pZip, pArchive_name, (mz_uint16)archive_name_size, NULL, 0, pComment, comment_size, uncomp_size, comp_size, uncomp_crc32, method, 0, dos_time, dos_date, local_dir_header_ofs, ext_attributes))
+    return MZ_FALSE;
+
+  pZip->m_total_files++;
+  pZip->m_archive_size = cur_archive_file_ofs;
+
+  return MZ_TRUE;
+}
+#endif // #ifndef MINIZ_NO_STDIO
+
+mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, mz_zip_archive *pSource_zip, mz_uint file_index)
+{
+  mz_uint n, bit_flags, num_alignment_padding_bytes;
+  mz_uint64 comp_bytes_remaining, local_dir_header_ofs;
+  mz_uint64 cur_src_file_ofs, cur_dst_file_ofs;
+  mz_uint32 local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)]; mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32;
+  mz_uint8 central_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE];
+  size_t orig_central_dir_size;
+  mz_zip_internal_state *pState;
+  void *pBuf; const mz_uint8 *pSrc_central_header;
+
+  if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING))
+    return MZ_FALSE;
+  if (NULL == (pSrc_central_header = mz_zip_reader_get_cdh(pSource_zip, file_index)))
+    return MZ_FALSE;
+  pState = pZip->m_pState;
+
+  num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip);
+
+  // no zip64 support yet
+  if ((pZip->m_total_files == 0xFFFF) || ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) > 0xFFFFFFFF))
+    return MZ_FALSE;
+
+  cur_src_file_ofs = MZ_READ_LE32(pSrc_central_header + MZ_ZIP_CDH_LOCAL_HEADER_OFS);
+  cur_dst_file_ofs = pZip->m_archive_size;
+
+  if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
+    return MZ_FALSE;
+  if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG)
+    return MZ_FALSE;
+  cur_src_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE;
+
+  if (!mz_zip_writer_write_zeros(pZip, cur_dst_file_ofs, num_alignment_padding_bytes))
+    return MZ_FALSE;
+  cur_dst_file_ofs += num_alignment_padding_bytes;
+  local_dir_header_ofs = cur_dst_file_ofs;
+  if (pZip->m_file_offset_alignment) { MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == 0); }
+
+  if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != MZ_ZIP_LOCAL_DIR_HEADER_SIZE)
+    return MZ_FALSE;
+  cur_dst_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE;
+
+  n = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS);
+  comp_bytes_remaining = n + MZ_READ_LE32(pSrc_central_header + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
+
+  if (NULL == (pBuf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)MZ_MAX(sizeof(mz_uint32) * 4, MZ_MIN(MZ_ZIP_MAX_IO_BUF_SIZE, comp_bytes_remaining)))))
+    return MZ_FALSE;
+
+  while (comp_bytes_remaining)
+  {
+    n = (mz_uint)MZ_MIN(MZ_ZIP_MAX_IO_BUF_SIZE, comp_bytes_remaining);
+    if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, n) != n)
+    {
+      pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
+      return MZ_FALSE;
+    }
+    cur_src_file_ofs += n;
+
+    if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pBuf, n) != n)
+    {
+      pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
+      return MZ_FALSE;
+    }
+    cur_dst_file_ofs += n;
+
+    comp_bytes_remaining -= n;
+  }
+
+  bit_flags = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_BIT_FLAG_OFS);
+  if (bit_flags & 8)
+  {
+    // Copy data descriptor
+    if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, sizeof(mz_uint32) * 4) != sizeof(mz_uint32) * 4)
+    {
+      pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
+      return MZ_FALSE;
+    }
+
+    n = sizeof(mz_uint32) * ((MZ_READ_LE32(pBuf) == 0x08074b50) ? 4 : 3);
+    if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pBuf, n) != n)
+    {
+      pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
+      return MZ_FALSE;
+    }
+
+    cur_src_file_ofs += n;
+    cur_dst_file_ofs += n;
+  }
+  pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
+
+  // no zip64 support yet
+  if (cur_dst_file_ofs > 0xFFFFFFFF)
+    return MZ_FALSE;
+
+  orig_central_dir_size = pState->m_central_dir.m_size;
+
+  memcpy(central_header, pSrc_central_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE);
+  MZ_WRITE_LE32(central_header + MZ_ZIP_CDH_LOCAL_HEADER_OFS, local_dir_header_ofs);
+  if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, central_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE))
+    return MZ_FALSE;
+
+  n = MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_EXTRA_LEN_OFS) + MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_COMMENT_LEN_OFS);
+  if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pSrc_central_header + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n))
+  {
+    mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, MZ_FALSE);
+    return MZ_FALSE;
+  }
+
+  if (pState->m_central_dir.m_size > 0xFFFFFFFF)
+    return MZ_FALSE;
+  n = (mz_uint32)orig_central_dir_size;
+  if (!mz_zip_array_push_back(pZip, &pState->m_central_dir_offsets, &n, 1))
+  {
+    mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, MZ_FALSE);
+    return MZ_FALSE;
+  }
+
+  pZip->m_total_files++;
+  pZip->m_archive_size = cur_dst_file_ofs;
+
+  return MZ_TRUE;
+}
+
+mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip)
+{
+  mz_zip_internal_state *pState;
+  mz_uint64 central_dir_ofs, central_dir_size;
+  mz_uint8 hdr[MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE];
+
+  if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING))
+    return MZ_FALSE;
+
+  pState = pZip->m_pState;
+
+  // no zip64 support yet
+  if ((pZip->m_total_files > 0xFFFF) || ((pZip->m_archive_size + pState->m_central_dir.m_size + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) > 0xFFFFFFFF))
+    return MZ_FALSE;
+
+  central_dir_ofs = 0;
+  central_dir_size = 0;
+  if (pZip->m_total_files)
+  {
+    // Write central directory
+    central_dir_ofs = pZip->m_archive_size;
+    central_dir_size = pState->m_central_dir.m_size;
+    pZip->m_central_directory_file_ofs = central_dir_ofs;
+    if (pZip->m_pWrite(pZip->m_pIO_opaque, central_dir_ofs, pState->m_central_dir.m_p, (size_t)central_dir_size) != central_dir_size)
+      return MZ_FALSE;
+    pZip->m_archive_size += central_dir_size;
+  }
+
+  // Write end of central directory record
+  MZ_CLEAR_OBJ(hdr);
+  MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_SIG_OFS, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG);
+  MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS, pZip->m_total_files);
+  MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS, pZip->m_total_files);
+  MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_SIZE_OFS, central_dir_size);
+  MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_OFS_OFS, central_dir_ofs);
+
+  if (pZip->m_pWrite(pZip->m_pIO_opaque, pZip->m_archive_size, hdr, sizeof(hdr)) != sizeof(hdr))
+    return MZ_FALSE;
+#ifndef MINIZ_NO_STDIO
+  if ((pState->m_pFile) && (MZ_FFLUSH(pState->m_pFile) == EOF))
+    return MZ_FALSE;
+#endif // #ifndef MINIZ_NO_STDIO
+
+  pZip->m_archive_size += sizeof(hdr);
+
+  pZip->m_zip_mode = MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED;
+  return MZ_TRUE;
+}
+
+mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void **pBuf, size_t *pSize)
+{
+  if ((!pZip) || (!pZip->m_pState) || (!pBuf) || (!pSize))
+    return MZ_FALSE;
+  if (pZip->m_pWrite != mz_zip_heap_write_func)
+    return MZ_FALSE;
+  if (!mz_zip_writer_finalize_archive(pZip))
+    return MZ_FALSE;
+
+  *pBuf = pZip->m_pState->m_pMem;
+  *pSize = pZip->m_pState->m_mem_size;
+  pZip->m_pState->m_pMem = NULL;
+  pZip->m_pState->m_mem_size = pZip->m_pState->m_mem_capacity = 0;
+  return MZ_TRUE;
+}
+
+mz_bool mz_zip_writer_end(mz_zip_archive *pZip)
+{
+  mz_zip_internal_state *pState;
+  mz_bool status = MZ_TRUE;
+  if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || ((pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) && (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED)))
+    return MZ_FALSE;
+
+  pState = pZip->m_pState;
+  pZip->m_pState = NULL;
+  mz_zip_array_clear(pZip, &pState->m_central_dir);
+  mz_zip_array_clear(pZip, &pState->m_central_dir_offsets);
+  mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets);
+
+#ifndef MINIZ_NO_STDIO
+  if (pState->m_pFile)
+  {
+    MZ_FCLOSE(pState->m_pFile);
+    pState->m_pFile = NULL;
+  }
+#endif // #ifndef MINIZ_NO_STDIO
+
+  if ((pZip->m_pWrite == mz_zip_heap_write_func) && (pState->m_pMem))
+  {
+    pZip->m_pFree(pZip->m_pAlloc_opaque, pState->m_pMem);
+    pState->m_pMem = NULL;
+  }
+
+  pZip->m_pFree(pZip->m_pAlloc_opaque, pState);
+  pZip->m_zip_mode = MZ_ZIP_MODE_INVALID;
+  return status;
+}
+
+#ifndef MINIZ_NO_STDIO
+mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags)
+{
+  mz_bool status, created_new_archive = MZ_FALSE;
+  mz_zip_archive zip_archive;
+  struct MZ_FILE_STAT_STRUCT file_stat;
+  MZ_CLEAR_OBJ(zip_archive);
+  if ((int)level_and_flags < 0)
+     level_and_flags = MZ_DEFAULT_LEVEL;
+  if ((!pZip_filename) || (!pArchive_name) || ((buf_size) && (!pBuf)) || ((comment_size) && (!pComment)) || ((level_and_flags & 0xF) > MZ_UBER_COMPRESSION))
+    return MZ_FALSE;
+  if (!mz_zip_writer_validate_archive_name(pArchive_name))
+    return MZ_FALSE;
+  if (MZ_FILE_STAT(pZip_filename, &file_stat) != 0)
+  {
+    // Create a new archive.
+    if (!mz_zip_writer_init_file(&zip_archive, pZip_filename, 0))
+      return MZ_FALSE;
+    created_new_archive = MZ_TRUE;
+  }
+  else
+  {
+    // Append to an existing archive.
+    if (!mz_zip_reader_init_file(&zip_archive, pZip_filename, level_and_flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY))
+      return MZ_FALSE;
+    if (!mz_zip_writer_init_from_reader(&zip_archive, pZip_filename))
+    {
+      mz_zip_reader_end(&zip_archive);
+      return MZ_FALSE;
+    }
+  }
+  status = mz_zip_writer_add_mem_ex(&zip_archive, pArchive_name, pBuf, buf_size, pComment, comment_size, level_and_flags, 0, 0);
+  // Always finalize, even if adding failed for some reason, so we have a valid central directory. (This may not always succeed, but we can try.)
+  if (!mz_zip_writer_finalize_archive(&zip_archive))
+    status = MZ_FALSE;
+  if (!mz_zip_writer_end(&zip_archive))
+    status = MZ_FALSE;
+  if ((!status) && (created_new_archive))
+  {
+    // It's a new archive and something went wrong, so just delete it.
+    int ignoredStatus = MZ_DELETE_FILE(pZip_filename);
+    (void)ignoredStatus;
+  }
+  return status;
+}
+
+void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name, size_t *pSize, mz_uint flags)
+{
+  int file_index;
+  mz_zip_archive zip_archive;
+  void *p = NULL;
+
+  if (pSize)
+    *pSize = 0;
+
+  if ((!pZip_filename) || (!pArchive_name))
+    return NULL;
+
+  MZ_CLEAR_OBJ(zip_archive);
+  if (!mz_zip_reader_init_file(&zip_archive, pZip_filename, flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY))
+    return NULL;
+
+  if ((file_index = mz_zip_reader_locate_file(&zip_archive, pArchive_name, NULL, flags)) >= 0)
+    p = mz_zip_reader_extract_to_heap(&zip_archive, file_index, pSize, flags);
+
+  mz_zip_reader_end(&zip_archive);
+  return p;
+}
+
+#endif // #ifndef MINIZ_NO_STDIO
+
+#endif // #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
+
+#endif // #ifndef MINIZ_NO_ARCHIVE_APIS
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MINIZ_HEADER_FILE_ONLY
+
+/*
+  This is free and unencumbered software released into the public domain.
+
+  Anyone is free to copy, modify, publish, use, compile, sell, or
+  distribute this software, either in source code form or as a compiled
+  binary, for any purpose, commercial or non-commercial, and by any
+  means.
+
+  In jurisdictions that recognize copyright laws, the author or authors
+  of this software dedicate any and all copyright interest in the
+  software to the public domain. We make this dedication for the benefit
+  of the public at large and to the detriment of our heirs and
+  successors. We intend this dedication to be an overt act of
+  relinquishment in perpetuity of all present and future rights to this
+  software under copyright law.
+
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+  OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+  OTHER DEALINGS IN THE SOFTWARE.
+
+  For more information, please refer to <http://unlicense.org/>
+*/
copy from third_party/rust/num-integer/.cargo-checksum.json
copy to third_party/rust/num-integer-0.1.33/.cargo-checksum.json
copy from third_party/rust/num-integer/Cargo.toml
copy to third_party/rust/num-integer-0.1.33/Cargo.toml
rename from third_party/rust/log-0.3.6/LICENSE-APACHE
rename to third_party/rust/num-integer-0.1.33/LICENSE-APACHE
rename from third_party/rust/num-traits-0.1.37/LICENSE-MIT
rename to third_party/rust/num-integer-0.1.33/LICENSE-MIT
copy from third_party/rust/num-integer/src/lib.rs
copy to third_party/rust/num-integer-0.1.33/src/lib.rs
--- a/third_party/rust/num-integer/.cargo-checksum.json
+++ b/third_party/rust/num-integer/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"69c84ad73d7c646a1ef4672b6d8f958c5f18d43e43c17b902f1198f9fed4ae5e","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","src/lib.rs":"c49cb1f2c2c5b414d28556ba7076d0243fe73378dd3a3ae97d29b3b4dc060a58"},"package":"21e4df1098d1d797d27ef0c69c178c3fab64941559b290fcae198e0825c9c8b5"}
\ No newline at end of file
+{"files":{"Cargo.toml":"0d6e35c432fe662ef7dc142493f41cf4cc4ba31d00b199b4574310b3fcdd123f","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","src/lib.rs":"8526b07deb77957ee84ac0ccbb7b30d7570a44dbf3bc06c5db36debce7516163"},"package":"d1452e8b06e448a07f0e6ebb0bb1d92b8890eea63288c0b627331d53514d0fba"}
\ No newline at end of file
--- a/third_party/rust/num-integer/Cargo.toml
+++ b/third_party/rust/num-integer/Cargo.toml
@@ -1,14 +1,15 @@
 [package]
 authors = ["The Rust Project Developers"]
 description = "Integer traits and functions"
 documentation = "http://rust-num.github.io/num"
 homepage = "https://github.com/rust-num/num"
 keywords = ["mathematics", "numerics"]
+categories = [ "algorithms", "science" ]
 license = "MIT/Apache-2.0"
 repository = "https://github.com/rust-num/num"
 name = "num-integer"
-version = "0.1.33"
+version = "0.1.35"
 
 [dependencies.num-traits]
 path = "../traits"
 version = "0.1.32"
--- a/third_party/rust/num-integer/src/lib.rs
+++ b/third_party/rust/num-integer/src/lib.rs
@@ -11,16 +11,18 @@
 //! Integer trait and functions.
 #![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://rust-num.github.io/num/favicon.ico",
        html_root_url = "https://rust-num.github.io/num/",
        html_playground_url = "http://play.integer32.com/")]
 
 extern crate num_traits as traits;
 
+use std::ops::Add;
+
 use traits::{Num, Signed};
 
 pub trait Integer: Sized + Num + PartialOrd + Ord + Eq {
     /// Floored integer division.
     ///
     /// # Examples
     ///
     /// ~~~
@@ -660,16 +662,135 @@ macro_rules! impl_integer_for_usize {
 }
 
 impl_integer_for_usize!(u8, test_integer_u8);
 impl_integer_for_usize!(u16, test_integer_u16);
 impl_integer_for_usize!(u32, test_integer_u32);
 impl_integer_for_usize!(u64, test_integer_u64);
 impl_integer_for_usize!(usize, test_integer_usize);
 
+/// An iterator over binomial coefficients.
+pub struct IterBinomial<T> {
+    a: T,
+    n: T,
+    k: T,
+}
+
+impl<T> IterBinomial<T>
+    where T: Integer,
+{
+    /// For a given n, iterate over all binomial coefficients binomial(n, k), for k=0...n.
+    ///
+    /// Note that this might overflow, depending on `T`. For the primitive
+    /// integer types, the following n are the largest ones for which there will
+    /// be no overflow:
+    ///
+    /// type | n
+    /// -----|---
+    /// u8   | 10
+    /// i8   |  9
+    /// u16  | 18
+    /// i16  | 17
+    /// u32  | 34
+    /// i32  | 33
+    /// u64  | 67
+    /// i64  | 66
+    ///
+    /// For larger n, `T` should be a bigint type.
+    pub fn new(n: T) -> IterBinomial<T> {
+        IterBinomial {
+            k: T::zero(), a: T::one(), n: n
+        }
+    }
+}
+
+impl<T> Iterator for IterBinomial<T>
+    where T: Integer + Clone
+{
+    type Item = T;
+
+    fn next(&mut self) -> Option<T> {
+        if self.k > self.n {
+            return None;
+        }
+        self.a = if !self.k.is_zero() {
+            multiply_and_divide(
+                self.a.clone(),
+                self.n.clone() - self.k.clone() + T::one(),
+                self.k.clone()
+            )
+        } else {
+            T::one()
+        };
+        self.k = self.k.clone() + T::one();
+        Some(self.a.clone())
+    }
+}
+
+/// Calculate r * a / b, avoiding overflows and fractions.
+///
+/// Assumes that b divides r * a evenly.
+fn multiply_and_divide<T: Integer + Clone>(r: T, a: T, b: T) -> T {
+    // See http://blog.plover.com/math/choose-2.html for the idea.
+    let g = gcd(r.clone(), b.clone());
+    r/g.clone() * (a / (b/g))
+}
+
+/// Calculate the binomial coefficient.
+///
+/// Note that this might overflow, depending on `T`. For the primitive integer
+/// types, the following n are the largest ones possible such that there will
+/// be no overflow for any k:
+///
+/// type | n
+/// -----|---
+/// u8   | 10
+/// i8   |  9
+/// u16  | 18
+/// i16  | 17
+/// u32  | 34
+/// i32  | 33
+/// u64  | 67
+/// i64  | 66
+///
+/// For larger n, consider using a bigint type for `T`.
+pub fn binomial<T: Integer + Clone>(mut n: T, k: T) -> T {
+    // See http://blog.plover.com/math/choose.html for the idea.
+    if k > n {
+        return T::zero();
+    }
+    if k > n.clone() - k.clone() {
+        return binomial(n.clone(), n - k);
+    }
+    let mut r = T::one();
+    let mut d = T::one();
+    loop {
+        if d > k {
+            break;
+        }
+        r = multiply_and_divide(r, n.clone(), d.clone());
+        n = n - T::one();
+        d = d + T::one();
+    }
+    r
+}
+
+/// Calculate the multinomial coefficient.
+pub fn multinomial<T: Integer + Clone>(k: &[T]) -> T
+    where for<'a> T: Add<&'a T, Output = T>
+{
+    let mut r = T::one();
+    let mut p = T::zero();
+    for i in k {
+        p = p + i;
+        r = r * binomial(p.clone(), i.clone());
+    }
+    r
+}
+
 #[test]
 fn test_lcm_overflow() {
     macro_rules! check {
         ($t:ty, $x:expr, $y:expr, $r:expr) => { {
             let x: $t = $x;
             let y: $t = $y;
             let o = x.checked_mul(y);
             assert!(o.is_none(),
@@ -687,8 +808,181 @@ fn test_lcm_overflow() {
     check!(u8, 0x80, 0x02, 0x80);
     check!(i16, 0x40_00, 0x04, 0x40_00);
     check!(u16, 0x80_00, 0x02, 0x80_00);
     check!(i32, 0x4000_0000, 0x04, 0x4000_0000);
     check!(u32, 0x8000_0000, 0x02, 0x8000_0000);
     check!(i64, 0x4000_0000_0000_0000, 0x04, 0x4000_0000_0000_0000);
     check!(u64, 0x8000_0000_0000_0000, 0x02, 0x8000_0000_0000_0000);
 }
+
+#[test]
+fn test_iter_binomial() {
+    macro_rules! check_simple {
+        ($t:ty) => { {
+            let n: $t = 3;
+            let c: Vec<_> = IterBinomial::new(n).collect();
+            let expected = vec![1, 3, 3, 1];
+            assert_eq!(c, expected);
+        } }
+    }
+
+    check_simple!(u8);
+    check_simple!(i8);
+    check_simple!(u16);
+    check_simple!(i16);
+    check_simple!(u32);
+    check_simple!(i32);
+    check_simple!(u64);
+    check_simple!(i64);
+
+    macro_rules! check_binomial {
+        ($t:ty, $n:expr) => { {
+            let n: $t = $n;
+            let c: Vec<_> = IterBinomial::new(n).collect();
+            let mut k: $t = 0;
+            for b in c {
+                assert_eq!(b, binomial(n, k));
+                k += 1;
+            }
+        } }
+    }
+
+    // Check the largest n for which there is no overflow.
+    check_binomial!(u8, 10);
+    check_binomial!(i8, 9);
+    check_binomial!(u16, 18);
+    check_binomial!(i16, 17);
+    check_binomial!(u32, 34);
+    check_binomial!(i32, 33);
+    check_binomial!(u64, 67);
+    check_binomial!(i64, 66);
+}
+
+#[test]
+fn test_binomial() {
+    macro_rules! check {
+        ($t:ty, $x:expr, $y:expr, $r:expr) => { {
+            let x: $t = $x;
+            let y: $t = $y;
+            let expected: $t = $r;
+            assert_eq!(binomial(x, y), expected);
+            if y <= x {
+                assert_eq!(binomial(x, x - y), expected);
+            }
+        } }
+    }
+    check!(u8, 9, 4, 126);
+    check!(u8, 0, 0, 1);
+    check!(u8, 2, 3, 0);
+
+    check!(i8, 9, 4, 126);
+    check!(i8, 0, 0, 1);
+    check!(i8, 2, 3, 0);
+
+    check!(u16, 100, 2, 4950);
+    check!(u16, 14, 4, 1001);
+    check!(u16, 0, 0, 1);
+    check!(u16, 2, 3, 0);
+
+    check!(i16, 100, 2, 4950);
+    check!(i16, 14, 4, 1001);
+    check!(i16, 0, 0, 1);
+    check!(i16, 2, 3, 0);
+
+    check!(u32, 100, 2, 4950);
+    check!(u32, 35, 11, 417225900);
+    check!(u32, 14, 4, 1001);
+    check!(u32, 0, 0, 1);
+    check!(u32, 2, 3, 0);
+
+    check!(i32, 100, 2, 4950);
+    check!(i32, 35, 11, 417225900);
+    check!(i32, 14, 4, 1001);
+    check!(i32, 0, 0, 1);
+    check!(i32, 2, 3, 0);
+
+    check!(u64, 100, 2, 4950);
+    check!(u64, 35, 11, 417225900);
+    check!(u64, 14, 4, 1001);
+    check!(u64, 0, 0, 1);
+    check!(u64, 2, 3, 0);
+
+    check!(i64, 100, 2, 4950);
+    check!(i64, 35, 11, 417225900);
+    check!(i64, 14, 4, 1001);
+    check!(i64, 0, 0, 1);
+    check!(i64, 2, 3, 0);
+}
+
+#[test]
+fn test_multinomial() {
+    macro_rules! check_binomial {
+        ($t:ty, $k:expr) => { {
+            let n: $t = $k.iter().fold(0, |acc, &x| acc + x);
+            let k: &[$t] = $k;
+            assert_eq!(k.len(), 2);
+            assert_eq!(multinomial(k), binomial(n, k[0]));
+        } }
+    }
+
+    check_binomial!(u8, &[4, 5]);
+
+    check_binomial!(i8, &[4, 5]);
+
+    check_binomial!(u16, &[2, 98]);
+    check_binomial!(u16, &[4, 10]);
+
+    check_binomial!(i16, &[2, 98]);
+    check_binomial!(i16, &[4, 10]);
+
+    check_binomial!(u32, &[2, 98]);
+    check_binomial!(u32, &[11, 24]);
+    check_binomial!(u32, &[4, 10]);
+
+    check_binomial!(i32, &[2, 98]);
+    check_binomial!(i32, &[11, 24]);
+    check_binomial!(i32, &[4, 10]);
+
+    check_binomial!(u64, &[2, 98]);
+    check_binomial!(u64, &[11, 24]);
+    check_binomial!(u64, &[4, 10]);
+
+    check_binomial!(i64, &[2, 98]);
+    check_binomial!(i64, &[11, 24]);
+    check_binomial!(i64, &[4, 10]);
+
+    macro_rules! check_multinomial {
+        ($t:ty, $k:expr, $r:expr) => { {
+            let k: &[$t] = $k;
+            let expected: $t = $r;
+            assert_eq!(multinomial(k), expected);
+        } }
+    }
+
+    check_multinomial!(u8, &[2, 1, 2], 30);
+    check_multinomial!(u8, &[2, 3, 0], 10);
+
+    check_multinomial!(i8, &[2, 1, 2], 30);
+    check_multinomial!(i8, &[2, 3, 0], 10);
+
+    check_multinomial!(u16, &[2, 1, 2], 30);
+    check_multinomial!(u16, &[2, 3, 0], 10);
+
+    check_multinomial!(i16, &[2, 1, 2], 30);
+    check_multinomial!(i16, &[2, 3, 0], 10);
+
+    check_multinomial!(u32, &[2, 1, 2], 30);
+    check_multinomial!(u32, &[2, 3, 0], 10);
+
+    check_multinomial!(i32, &[2, 1, 2], 30);
+    check_multinomial!(i32, &[2, 3, 0], 10);
+
+    check_multinomial!(u64, &[2, 1, 2], 30);
+    check_multinomial!(u64, &[2, 3, 0], 10);
+
+    check_multinomial!(i64, &[2, 1, 2], 30);
+    check_multinomial!(i64, &[2, 3, 0], 10);
+
+    check_multinomial!(u64, &[], 1);
+    check_multinomial!(u64, &[0], 1);
+    check_multinomial!(u64, &[12345], 1);
+}
--- a/third_party/rust/num-iter/.cargo-checksum.json
+++ b/third_party/rust/num-iter/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"4da183ea870d8853d14a5c95bed8f9ceaa26b50118dd398344821cbd25452dd0","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","src/lib.rs":"7cc73113897d1399dafc7f64ecc53f809295a4df3b401b42c2c8b1a7743a3748"},"package":"f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e"}
\ No newline at end of file
+{"files":{"Cargo.toml":"69eae59293fd84125e4e17e4c8b24f25257d9e13dd37563b9c482a384d20589c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","src/lib.rs":"7cc73113897d1399dafc7f64ecc53f809295a4df3b401b42c2c8b1a7743a3748"},"package":"7485fcc84f85b4ecd0ea527b14189281cf27d60e583ae65ebc9c088b13dffe01"}
\ No newline at end of file
--- a/third_party/rust/num-iter/Cargo.toml
+++ b/third_party/rust/num-iter/Cargo.toml
@@ -1,18 +1,19 @@
 [package]
 authors = ["The Rust Project Developers"]
 description = "External iterators for generic mathematics"
 documentation = "http://rust-num.github.io/num"
 homepage = "https://github.com/rust-num/num"
 keywords = ["mathematics", "numerics"]
+categories = [ "algorithms", "science" ]
 license = "MIT/Apache-2.0"
 repository = "https://github.com/rust-num/num"
 name = "num-iter"
-version = "0.1.33"
+version = "0.1.34"
 
 [dependencies]
 
 [dependencies.num-integer]
 optional = false
 path = "../integer"
 version = "0.1.32"
 
deleted file mode 100644
--- a/third_party/rust/num-traits-0.1.37/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{"Cargo.toml":"c1f571e6884f2643c11053465800afe4056253687fd332e7a9c2d32fb30704ed","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","src/bounds.rs":"32f69f86640520478eff7978951a6d2dc0d51fe263782970185fb31ffcc4a9e1","src/cast.rs":"d76053ff336eadb80a18725c174226b4be147b876c6aa70d7aa81a16d85e9f25","src/float.rs":"1f9d571bd3946d1d93dc7f4f4ae344bfabf5fd871243145aad120e242599c2e4","src/identities.rs":"188c63de57997fb8468732251a3a8d7f665b8f61d512222c2553baefe1c827bb","src/int.rs":"b7b42dfa10423308f858216ac63fa52e26c49a7bc8900cd98de210992efc3f5f","src/lib.rs":"f99d825e652698d9b39b1e26132139542e12e968d87cf804d46e95ec0c21f14f","src/ops/checked.rs":"f02fd815b99edf079043d3621c1566e0ab3e755fe284d0b8fdf5d7ca56d546e7","src/ops/mod.rs":"668ea4d117bc1fdf7eaf0fe16692fa40dfbdfcbc7a2010237fe395ce0086e02e","src/ops/saturating.rs":"46821d815c90c16b2f6bec0b94b4d7ebdbddf3ea42edc0467de738c56abf6436","src/ops/wrapping.rs":"aa750486640063fad24175fd3b622eba2d4453d4de5a3d8bc93e1c3f50ced485","src/pow.rs":"73b611ad8d595ef917871ba859ff0c25efc2382220d30568e5fbb930bf6b4daa","src/sign.rs":"c08ad1647d393571cc73344b174b1764d7d7d5fb57170cc8f1d26e7ab9527e7c"},"package":"e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/num-traits-0.1.37/Cargo.toml
+++ /dev/null
@@ -1,12 +0,0 @@
-[package]
-authors = ["The Rust Project Developers"]
-description = "Numeric traits for generic mathematics"
-documentation = "http://rust-num.github.io/num"
-homepage = "https://github.com/rust-num/num"
-keywords = ["mathematics", "numerics"]
-license = "MIT/Apache-2.0"
-repository = "https://github.com/rust-num/num"
-name = "num-traits"
-version = "0.1.37"
-
-[dependencies]
deleted file mode 100644
--- a/third_party/rust/num-traits-0.1.37/src/bounds.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-use std::{usize, u8, u16, u32, u64};
-use std::{isize, i8, i16, i32, i64};
-use std::{f32, f64};
-
-/// Numbers which have upper and lower bounds
-pub trait Bounded {
-    // FIXME (#5527): These should be associated constants
-    /// returns the smallest finite number this type can represent
-    fn min_value() -> Self;
-    /// returns the largest finite number this type can represent
-    fn max_value() -> Self;
-}
-
-macro_rules! bounded_impl {
-    ($t:ty, $min:expr, $max:expr) => {
-        impl Bounded for $t {
-            #[inline]
-            fn min_value() -> $t { $min }
-
-            #[inline]
-            fn max_value() -> $t { $max }
-        }
-    }
-}
-
-bounded_impl!(usize, usize::MIN, usize::MAX);
-bounded_impl!(u8,    u8::MIN,    u8::MAX);
-bounded_impl!(u16,   u16::MIN,   u16::MAX);
-bounded_impl!(u32,   u32::MIN,   u32::MAX);
-bounded_impl!(u64,   u64::MIN,   u64::MAX);
-
-bounded_impl!(isize, isize::MIN, isize::MAX);
-bounded_impl!(i8,    i8::MIN,    i8::MAX);
-bounded_impl!(i16,   i16::MIN,   i16::MAX);
-bounded_impl!(i32,   i32::MIN,   i32::MAX);
-bounded_impl!(i64,   i64::MIN,   i64::MAX);
-
-bounded_impl!(f32, f32::MIN, f32::MAX);
-
-macro_rules! for_each_tuple_ {
-    ( $m:ident !! ) => (
-        $m! { }
-    );
-    ( $m:ident !! $h:ident, $($t:ident,)* ) => (
-        $m! { $h $($t)* }
-        for_each_tuple_! { $m !! $($t,)* }
-    );
-}
-macro_rules! for_each_tuple {
-    ( $m:ident ) => (
-        for_each_tuple_! { $m !! A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, }
-    );
-}
-
-macro_rules! bounded_tuple {
-    ( $($name:ident)* ) => (
-        impl<$($name: Bounded,)*> Bounded for ($($name,)*) {
-            #[inline]
-            fn min_value() -> Self {
-                ($($name::min_value(),)*)
-            }
-            #[inline]
-            fn max_value() -> Self {
-                ($($name::max_value(),)*)
-            }
-        }
-    );
-}
-
-for_each_tuple!(bounded_tuple);
-bounded_impl!(f64, f64::MIN, f64::MAX);
deleted file mode 100644
--- a/third_party/rust/num-traits-0.1.37/src/cast.rs
+++ /dev/null
@@ -1,450 +0,0 @@
-use std::mem::size_of;
-
-use identities::Zero;
-use bounds::Bounded;
-
-/// A generic trait for converting a value to a number.
-pub trait ToPrimitive {
-    /// Converts the value of `self` to an `isize`.
-    #[inline]
-    fn to_isize(&self) -> Option<isize> {
-        self.to_i64().and_then(|x| x.to_isize())
-    }
-
-    /// Converts the value of `self` to an `i8`.
-    #[inline]
-    fn to_i8(&self) -> Option<i8> {
-        self.to_i64().and_then(|x| x.to_i8())
-    }
-
-    /// Converts the value of `self` to an `i16`.
-    #[inline]
-    fn to_i16(&self) -> Option<i16> {
-        self.to_i64().and_then(|x| x.to_i16())
-    }
-
-    /// Converts the value of `self` to an `i32`.
-    #[inline]
-    fn to_i32(&self) -> Option<i32> {
-        self.to_i64().and_then(|x| x.to_i32())
-    }
-
-    /// Converts the value of `self` to an `i64`.
-    fn to_i64(&self) -> Option<i64>;
-
-    /// Converts the value of `self` to a `usize`.
-    #[inline]
-    fn to_usize(&self) -> Option<usize> {
-        self.to_u64().and_then(|x| x.to_usize())
-    }
-
-    /// Converts the value of `self` to an `u8`.
-    #[inline]
-    fn to_u8(&self) -> Option<u8> {
-        self.to_u64().and_then(|x| x.to_u8())
-    }
-
-    /// Converts the value of `self` to an `u16`.
-    #[inline]
-    fn to_u16(&self) -> Option<u16> {
-        self.to_u64().and_then(|x| x.to_u16())
-    }
-
-    /// Converts the value of `self` to an `u32`.
-    #[inline]
-    fn to_u32(&self) -> Option<u32> {
-        self.to_u64().and_then(|x| x.to_u32())
-    }
-
-    /// Converts the value of `self` to an `u64`.
-    #[inline]
-    fn to_u64(&self) -> Option<u64>;
-
-    /// Converts the value of `self` to an `f32`.
-    #[inline]
-    fn to_f32(&self) -> Option<f32> {
-        self.to_f64().and_then(|x| x.to_f32())
-    }
-
-    /// Converts the value of `self` to an `f64`.
-    #[inline]
-    fn to_f64(&self) -> Option<f64> {
-        self.to_i64().and_then(|x| x.to_f64())
-    }
-}
-
-macro_rules! impl_to_primitive_int_to_int {
-    ($SrcT:ty, $DstT:ty, $slf:expr) => (
-        {
-            if size_of::<$SrcT>() <= size_of::<$DstT>() {
-                Some($slf as $DstT)
-            } else {
-                let n = $slf as i64;
-                let min_value: $DstT = Bounded::min_value();
-                let max_value: $DstT = Bounded::max_value();
-                if min_value as i64 <= n && n <= max_value as i64 {
-                    Some($slf as $DstT)
-                } else {
-                    None
-                }
-            }
-        }
-    )
-}
-
-macro_rules! impl_to_primitive_int_to_uint {
-    ($SrcT:ty, $DstT:ty, $slf:expr) => (
-        {
-            let zero: $SrcT = Zero::zero();
-            let max_value: $DstT = Bounded::max_value();
-            if zero <= $slf && $slf as u64 <= max_value as u64 {
-                Some($slf as $DstT)
-            } else {
-                None
-            }
-        }
-    )
-}
-
-macro_rules! impl_to_primitive_int {
-    ($T:ty) => (
-        impl ToPrimitive for $T {
-            #[inline]
-            fn to_isize(&self) -> Option<isize> { impl_to_primitive_int_to_int!($T, isize, *self) }
-            #[inline]
-            fn to_i8(&self) -> Option<i8> { impl_to_primitive_int_to_int!($T, i8, *self) }
-            #[inline]
-            fn to_i16(&self) -> Option<i16> { impl_to_primitive_int_to_int!($T, i16, *self) }
-            #[inline]
-            fn to_i32(&self) -> Option<i32> { impl_to_primitive_int_to_int!($T, i32, *self) }
-            #[inline]
-            fn to_i64(&self) -> Option<i64> { impl_to_primitive_int_to_int!($T, i64, *self) }
-
-            #[inline]
-            fn to_usize(&self) -> Option<usize> { impl_to_primitive_int_to_uint!($T, usize, *self) }
-            #[inline]
-            fn to_u8(&self) -> Option<u8> { impl_to_primitive_int_to_uint!($T, u8, *self) }
-            #[inline]
-            fn to_u16(&self) -> Option<u16> { impl_to_primitive_int_to_uint!($T, u16, *self) }
-            #[inline]
-            fn to_u32(&self) -> Option<u32> { impl_to_primitive_int_to_uint!($T, u32, *self) }
-            #[inline]
-            fn to_u64(&self) -> Option<u64> { impl_to_primitive_int_to_uint!($T, u64, *self) }
-
-            #[inline]
-            fn to_f32(&self) -> Option<f32> { Some(*self as f32) }
-            #[inline]
-            fn to_f64(&self) -> Option<f64> { Some(*self as f64) }
-        }
-    )
-}
-
-impl_to_primitive_int!(isize);
-impl_to_primitive_int!(i8);
-impl_to_primitive_int!(i16);
-impl_to_primitive_int!(i32);
-impl_to_primitive_int!(i64);
-
-macro_rules! impl_to_primitive_uint_to_int {
-    ($DstT:ty, $slf:expr) => (
-        {
-            let max_value: $DstT = Bounded::max_value();
-            if $slf as u64 <= max_value as u64 {
-                Some($slf as $DstT)
-            } else {
-                None
-            }
-        }
-    )
-}
-
-macro_rules! impl_to_primitive_uint_to_uint {
-    ($SrcT:ty, $DstT:ty, $slf:expr) => (
-        {
-            if size_of::<$SrcT>() <= size_of::<$DstT>() {
-                Some($slf as $DstT)
-            } else {
-                let zero: $SrcT = Zero::zero();
-                let max_value: $DstT = Bounded::max_value();
-                if zero <= $slf && $slf as u64 <= max_value as u64 {
-                    Some($slf as $DstT)
-                } else {
-                    None
-                }
-            }
-        }
-    )
-}
-
-macro_rules! impl_to_primitive_uint {
-    ($T:ty) => (
-        impl ToPrimitive for $T {
-            #[inline]
-            fn to_isize(&self) -> Option<isize> { impl_to_primitive_uint_to_int!(isize, *self) }
-            #[inline]
-            fn to_i8(&self) -> Option<i8> { impl_to_primitive_uint_to_int!(i8, *self) }
-            #[inline]
-            fn to_i16(&self) -> Option<i16> { impl_to_primitive_uint_to_int!(i16, *self) }
-            #[inline]
-            fn to_i32(&self) -> Option<i32> { impl_to_primitive_uint_to_int!(i32, *self) }
-            #[inline]
-            fn to_i64(&self) -> Option<i64> { impl_to_primitive_uint_to_int!(i64, *self) }
-
-            #[inline]
-            fn to_usize(&self) -> Option<usize> {
-                impl_to_primitive_uint_to_uint!($T, usize, *self)
-            }
-            #[inline]
-            fn to_u8(&self) -> Option<u8> { impl_to_primitive_uint_to_uint!($T, u8, *self) }
-            #[inline]
-            fn to_u16(&self) -> Option<u16> { impl_to_primitive_uint_to_uint!($T, u16, *self) }
-            #[inline]
-            fn to_u32(&self) -> Option<u32> { impl_to_primitive_uint_to_uint!($T, u32, *self) }
-            #[inline]
-            fn to_u64(&self) -> Option<u64> { impl_to_primitive_uint_to_uint!($T, u64, *self) }
-
-            #[inline]
-            fn to_f32(&self) -> Option<f32> { Some(*self as f32) }
-            #[inline]
-            fn to_f64(&self) -> Option<f64> { Some(*self as f64) }
-        }
-    )
-}
-
-impl_to_primitive_uint!(usize);
-impl_to_primitive_uint!(u8);
-impl_to_primitive_uint!(u16);
-impl_to_primitive_uint!(u32);
-impl_to_primitive_uint!(u64);
-
-macro_rules! impl_to_primitive_float_to_float {
-    ($SrcT:ident, $DstT:ident, $slf:expr) => (
-        if size_of::<$SrcT>() <= size_of::<$DstT>() {
-            Some($slf as $DstT)
-        } else {
-            // Make sure the value is in range for the cast.
-            // NaN and +-inf are cast as they are.
-            let n = $slf as f64;
-            let max_value: $DstT = ::std::$DstT::MAX;
-            if !n.is_finite() || (-max_value as f64 <= n && n <= max_value as f64) {
-                Some($slf as $DstT)
-            } else {
-                None
-            }
-        }
-    )
-}
-
-macro_rules! impl_to_primitive_float {
-    ($T:ident) => (
-        impl ToPrimitive for $T {
-            #[inline]
-            fn to_isize(&self) -> Option<isize> { Some(*self as isize) }
-            #[inline]
-            fn to_i8(&self) -> Option<i8> { Some(*self as i8) }
-            #[inline]
-            fn to_i16(&self) -> Option<i16> { Some(*self as i16) }
-            #[inline]
-            fn to_i32(&self) -> Option<i32> { Some(*self as i32) }
-            #[inline]
-            fn to_i64(&self) -> Option<i64> { Some(*self as i64) }
-
-            #[inline]
-            fn to_usize(&self) -> Option<usize> { Some(*self as usize) }
-            #[inline]
-            fn to_u8(&self) -> Option<u8> { Some(*self as u8) }
-            #[inline]
-            fn to_u16(&self) -> Option<u16> { Some(*self as u16) }
-            #[inline]
-            fn to_u32(&self) -> Option<u32> { Some(*self as u32) }
-            #[inline]
-            fn to_u64(&self) -> Option<u64> { Some(*self as u64) }
-
-            #[inline]
-            fn to_f32(&self) -> Option<f32> { impl_to_primitive_float_to_float!($T, f32, *self) }
-            #[inline]
-            fn to_f64(&self) -> Option<f64> { impl_to_primitive_float_to_float!($T, f64, *self) }
-        }
-    )
-}
-
-impl_to_primitive_float!(f32);
-impl_to_primitive_float!(f64);
-
-/// A generic trait for converting a number to a value.
-pub trait FromPrimitive: Sized {
-    /// Convert an `isize` to return an optional value of this type. If the
-    /// value cannot be represented by this value, the `None` is returned.
-    #[inline]
-    fn from_isize(n: isize) -> Option<Self> {
-        FromPrimitive::from_i64(n as i64)
-    }
-
-    /// Convert an `i8` to return an optional value of this type. If the
-    /// type cannot be represented by this value, the `None` is returned.
-    #[inline]
-    fn from_i8(n: i8) -> Option<Self> {
-        FromPrimitive::from_i64(n as i64)
-    }
-
-    /// Convert an `i16` to return an optional value of this type. If the
-    /// type cannot be represented by this value, the `None` is returned.
-    #[inline]
-    fn from_i16(n: i16) -> Option<Self> {
-        FromPrimitive::from_i64(n as i64)
-    }
-
-    /// Convert an `i32` to return an optional value of this type. If the
-    /// type cannot be represented by this value, the `None` is returned.
-    #[inline]
-    fn from_i32(n: i32) -> Option<Self> {
-        FromPrimitive::from_i64(n as i64)
-    }
-
-    /// Convert an `i64` to return an optional value of this type. If the
-    /// type cannot be represented by this value, the `None` is returned.
-    fn from_i64(n: i64) -> Option<Self>;
-
-    /// Convert a `usize` to return an optional value of this type. If the
-    /// type cannot be represented by this value, the `None` is returned.
-    #[inline]
-    fn from_usize(n: usize) -> Option<Self> {
-        FromPrimitive::from_u64(n as u64)
-    }
-
-    /// Convert an `u8` to return an optional value of this type. If the
-    /// type cannot be represented by this value, the `None` is returned.
-    #[inline]
-    fn from_u8(n: u8) -> Option<Self> {
-        FromPrimitive::from_u64(n as u64)
-    }
-
-    /// Convert an `u16` to return an optional value of this type. If the
-    /// type cannot be represented by this value, the `None` is returned.
-    #[inline]
-    fn from_u16(n: u16) -> Option<Self> {
-        FromPrimitive::from_u64(n as u64)
-    }
-
-    /// Convert an `u32` to return an optional value of this type. If the
-    /// type cannot be represented by this value, the `None` is returned.
-    #[inline]
-    fn from_u32(n: u32) -> Option<Self> {
-        FromPrimitive::from_u64(n as u64)
-    }
-
-    /// Convert an `u64` to return an optional value of this type. If the
-    /// type cannot be represented by this value, the `None` is returned.
-    fn from_u64(n: u64) -> Option<Self>;
-
-    /// Convert a `f32` to return an optional value of this type. If the
-    /// type cannot be represented by this value, the `None` is returned.
-    #[inline]
-    fn from_f32(n: f32) -> Option<Self> {
-        FromPrimitive::from_f64(n as f64)
-    }
-
-    /// Convert a `f64` to return an optional value of this type. If the
-    /// type cannot be represented by this value, the `None` is returned.
-    #[inline]
-    fn from_f64(n: f64) -> Option<Self> {
-        FromPrimitive::from_i64(n as i64)
-    }
-}
-
-macro_rules! impl_from_primitive {
-    ($T:ty, $to_ty:ident) => (
-        #[allow(deprecated)]
-        impl FromPrimitive for $T {
-            #[inline] fn from_i8(n: i8) -> Option<$T> { n.$to_ty() }
-            #[inline] fn from_i16(n: i16) -> Option<$T> { n.$to_ty() }
-            #[inline] fn from_i32(n: i32) -> Option<$T> { n.$to_ty() }
-            #[inline] fn from_i64(n: i64) -> Option<$T> { n.$to_ty() }
-
-            #[inline] fn from_u8(n: u8) -> Option<$T> { n.$to_ty() }
-            #[inline] fn from_u16(n: u16) -> Option<$T> { n.$to_ty() }
-            #[inline] fn from_u32(n: u32) -> Option<$T> { n.$to_ty() }
-            #[inline] fn from_u64(n: u64) -> Option<$T> { n.$to_ty() }
-
-            #[inline] fn from_f32(n: f32) -> Option<$T> { n.$to_ty() }
-            #[inline] fn from_f64(n: f64) -> Option<$T> { n.$to_ty() }
-        }
-    )
-}
-
-impl_from_primitive!(isize, to_isize);
-impl_from_primitive!(i8,    to_i8);
-impl_from_primitive!(i16,   to_i16);
-impl_from_primitive!(i32,   to_i32);
-impl_from_primitive!(i64,   to_i64);
-impl_from_primitive!(usize, to_usize);
-impl_from_primitive!(u8,    to_u8);
-impl_from_primitive!(u16,   to_u16);
-impl_from_primitive!(u32,   to_u32);
-impl_from_primitive!(u64,   to_u64);
-impl_from_primitive!(f32,   to_f32);
-impl_from_primitive!(f64,   to_f64);
-
-/// Cast from one machine scalar to another.
-///
-/// # Examples
-///
-/// ```
-/// # use num_traits as num;
-/// let twenty: f32 = num::cast(0x14).unwrap();
-/// assert_eq!(twenty, 20f32);
-/// ```
-///
-#[inline]
-pub fn cast<T: NumCast, U: NumCast>(n: T) -> Option<U> {
-    NumCast::from(n)
-}
-
-/// An interface for casting between machine scalars.
-pub trait NumCast: Sized + ToPrimitive {
-    /// Creates a number from another value that can be converted into
-    /// a primitive via the `ToPrimitive` trait.
-    fn from<T: ToPrimitive>(n: T) -> Option<Self>;
-}
-
-macro_rules! impl_num_cast {
-    ($T:ty, $conv:ident) => (
-        impl NumCast for $T {
-            #[inline]
-            #[allow(deprecated)]
-            fn from<N: ToPrimitive>(n: N) -> Option<$T> {
-                // `$conv` could be generated using `concat_idents!`, but that
-                // macro seems to be broken at the moment
-                n.$conv()
-            }
-        }
-    )
-}
-
-impl_num_cast!(u8,    to_u8);
-impl_num_cast!(u16,   to_u16);
-impl_num_cast!(u32,   to_u32);
-impl_num_cast!(u64,   to_u64);
-impl_num_cast!(usize, to_usize);
-impl_num_cast!(i8,    to_i8);
-impl_num_cast!(i16,   to_i16);
-impl_num_cast!(i32,   to_i32);
-impl_num_cast!(i64,   to_i64);
-impl_num_cast!(isize, to_isize);
-impl_num_cast!(f32,   to_f32);
-impl_num_cast!(f64,   to_f64);
-
-
-#[test]
-fn to_primitive_float() {
-    use std::f32;
-    use std::f64;
-
-    let f32_toolarge = 1e39f64;
-    assert_eq!(f32_toolarge.to_f32(), None);
-    assert_eq!((f32::MAX as f64).to_f32(), Some(f32::MAX));
-    assert_eq!((-f32::MAX as f64).to_f32(), Some(-f32::MAX));
-    assert_eq!(f64::INFINITY.to_f32(), Some(f32::INFINITY));
-    assert_eq!((f64::NEG_INFINITY).to_f32(), Some(f32::NEG_INFINITY));
-    assert!((f64::NAN).to_f32().map_or(false, |f| f.is_nan()));
-}
deleted file mode 100644
--- a/third_party/rust/num-traits-0.1.37/src/identities.rs
+++ /dev/null
@@ -1,104 +0,0 @@
-use std::ops::{Add, Mul};
-
-/// Defines an additive identity element for `Self`.
-pub trait Zero: Sized + Add<Self, Output = Self> {
-    /// Returns the additive identity element of `Self`, `0`.
-    ///
-    /// # Laws
-    ///
-    /// ```{.text}
-    /// a + 0 = a       ∀ a ∈ Self
-    /// 0 + a = a       ∀ a ∈ Self
-    /// ```
-    ///
-    /// # Purity
-    ///
-    /// This function should return the same result at all times regardless of
-    /// external mutable state, for example values stored in TLS or in
-    /// `static mut`s.
-    // FIXME (#5527): This should be an associated constant
-    fn zero() -> Self;
-
-    /// Returns `true` if `self` is equal to the additive identity.
-    #[inline]
-    fn is_zero(&self) -> bool;
-}
-
-macro_rules! zero_impl {
-    ($t:ty, $v:expr) => {
-        impl Zero for $t {
-            #[inline]
-            fn zero() -> $t { $v }
-            #[inline]
-            fn is_zero(&self) -> bool { *self == $v }
-        }
-    }
-}
-
-zero_impl!(usize, 0usize);
-zero_impl!(u8,    0u8);
-zero_impl!(u16,   0u16);
-zero_impl!(u32,   0u32);
-zero_impl!(u64,   0u64);
-
-zero_impl!(isize, 0isize);
-zero_impl!(i8,    0i8);
-zero_impl!(i16,   0i16);
-zero_impl!(i32,   0i32);
-zero_impl!(i64,   0i64);
-
-zero_impl!(f32, 0.0f32);
-zero_impl!(f64, 0.0f64);
-
-/// Defines a multiplicative identity element for `Self`.
-pub trait One: Sized + Mul<Self, Output = Self> {
-    /// Returns the multiplicative identity element of `Self`, `1`.
-    ///
-    /// # Laws
-    ///
-    /// ```{.text}
-    /// a * 1 = a       ∀ a ∈ Self
-    /// 1 * a = a       ∀ a ∈ Self
-    /// ```
-    ///
-    /// # Purity
-    ///
-    /// This function should return the same result at all times regardless of
-    /// external mutable state, for example values stored in TLS or in
-    /// `static mut`s.
-    // FIXME (#5527): This should be an associated constant
-    fn one() -> Self;
-}
-
-macro_rules! one_impl {
-    ($t:ty, $v:expr) => {
-        impl One for $t {
-            #[inline]
-            fn one() -> $t { $v }
-        }
-    }
-}
-
-one_impl!(usize, 1usize);
-one_impl!(u8,    1u8);
-one_impl!(u16,   1u16);
-one_impl!(u32,   1u32);
-one_impl!(u64,   1u64);
-
-one_impl!(isize, 1isize);
-one_impl!(i8,    1i8);
-one_impl!(i16,   1i16);
-one_impl!(i32,   1i32);
-one_impl!(i64,   1i64);
-
-one_impl!(f32, 1.0f32);
-one_impl!(f64, 1.0f64);
-
-
-// Some helper functions provided for backwards compatibility.
-
-/// Returns the additive identity, `0`.
-#[inline(always)] pub fn zero<T: Zero>() -> T { Zero::zero() }
-
-/// Returns the multiplicative identity, `1`.
-#[inline(always)] pub fn one<T: One>() -> T { One::one() }
deleted file mode 100644
--- a/third_party/rust/num-traits-0.1.37/src/lib.rs
+++ /dev/null
@@ -1,283 +0,0 @@
-// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Numeric traits for generic mathematics
-#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png",
-       html_favicon_url = "https://rust-num.github.io/num/favicon.ico",
-       html_root_url = "https://rust-num.github.io/num/",
-       html_playground_url = "http://play.integer32.com/")]
-
-use std::ops::{Add, Sub, Mul, Div, Rem};
-
-pub use bounds::Bounded;
-pub use float::{Float, FloatConst};
-pub use identities::{Zero, One, zero, one};
-pub use ops::checked::*;
-pub use ops::wrapping::*;
-pub use ops::saturating::Saturating;
-pub use sign::{Signed, Unsigned, abs, abs_sub, signum};
-pub use cast::*;
-pub use int::PrimInt;
-pub use pow::{pow, checked_pow};
-
-pub mod identities;
-pub mod sign;
-pub mod ops;
-pub mod bounds;
-pub mod float;
-pub mod cast;
-pub mod int;
-pub mod pow;
-
-/// The base trait for numeric types
-pub trait Num: PartialEq + Zero + One
-    + Add<Output = Self> + Sub<Output = Self>
-    + Mul<Output = Self> + Div<Output = Self> + Rem<Output = Self>
-{
-    type FromStrRadixErr;
-
-    /// Convert from a string and radix <= 36.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use num_traits::Num;
-    ///
-    /// let result = <i32 as Num>::from_str_radix("27", 10);
-    /// assert_eq!(result, Ok(27));
-    ///
-    /// let result = <i32 as Num>::from_str_radix("foo", 10);
-    /// assert!(result.is_err());
-    /// ```
-    fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>;
-}
-
-macro_rules! int_trait_impl {
-    ($name:ident for $($t:ty)*) => ($(
-        impl $name for $t {
-            type FromStrRadixErr = ::std::num::ParseIntError;
-            #[inline]
-            fn from_str_radix(s: &str, radix: u32)
-                              -> Result<Self, ::std::num::ParseIntError>
-            {
-                <$t>::from_str_radix(s, radix)
-            }
-        }
-    )*)
-}
-int_trait_impl!(Num for usize u8 u16 u32 u64 isize i8 i16 i32 i64);
-
-#[derive(Debug)]
-pub enum FloatErrorKind {
-    Empty,
-    Invalid,
-}
-// FIXME: std::num::ParseFloatError is stable in 1.0, but opaque to us,
-// so there's not really any way for us to reuse it.
-#[derive(Debug)]
-pub struct ParseFloatError {
-    pub kind: FloatErrorKind,
-}
-
-// FIXME: The standard library from_str_radix on floats was deprecated, so we're stuck
-// with this implementation ourselves until we want to make a breaking change.
-// (would have to drop it from `Num` though)
-macro_rules! float_trait_impl {
-    ($name:ident for $($t:ty)*) => ($(
-        impl $name for $t {
-            type FromStrRadixErr = ParseFloatError;
-
-            fn from_str_radix(src: &str, radix: u32)
-                              -> Result<Self, Self::FromStrRadixErr>
-            {
-                use self::FloatErrorKind::*;
-                use self::ParseFloatError as PFE;
-
-                // Special values
-                match src {
-                    "inf"   => return Ok(Float::infinity()),
-                    "-inf"  => return Ok(Float::neg_infinity()),
-                    "NaN"   => return Ok(Float::nan()),
-                    _       => {},
-                }
-
-                fn slice_shift_char(src: &str) -> Option<(char, &str)> {
-                    src.chars().nth(0).map(|ch| (ch, &src[1..]))
-                }
-
-                let (is_positive, src) =  match slice_shift_char(src) {
-                    None             => return Err(PFE { kind: Empty }),
-                    Some(('-', ""))  => return Err(PFE { kind: Empty }),
-                    Some(('-', src)) => (false, src),
-                    Some((_, _))     => (true,  src),
-                };
-
-                // The significand to accumulate
-                let mut sig = if is_positive { 0.0 } else { -0.0 };
-                // Necessary to detect overflow
-                let mut prev_sig = sig;
-                let mut cs = src.chars().enumerate();
-                // Exponent prefix and exponent index offset
-                let mut exp_info = None::<(char, usize)>;
-
-                // Parse the integer part of the significand
-                for (i, c) in cs.by_ref() {
-                    match c.to_digit(radix) {
-                        Some(digit) => {
-                            // shift significand one digit left
-                            sig = sig * (radix as $t);
-
-                            // add/subtract current digit depending on sign
-                            if is_positive {
-                                sig = sig + ((digit as isize) as $t);
-                            } else {
-                                sig = sig - ((digit as isize) as $t);
-                            }
-
-                            // Detect overflow by comparing to last value, except
-                            // if we've not seen any non-zero digits.
-                            if prev_sig != 0.0 {
-                                if is_positive && sig <= prev_sig
-                                    { return Ok(Float::infinity()); }
-                                if !is_positive && sig >= prev_sig
-                                    { return Ok(Float::neg_infinity()); }
-
-                                // Detect overflow by reversing the shift-and-add process
-                                if is_positive && (prev_sig != (sig - digit as $t) / radix as $t)
-                                    { return Ok(Float::infinity()); }
-                                if !is_positive && (prev_sig != (sig + digit as $t) / radix as $t)
-                                    { return Ok(Float::neg_infinity()); }
-                            }
-                            prev_sig = sig;
-                        },
-                        None => match c {
-                            'e' | 'E' | 'p' | 'P' => {
-                                exp_info = Some((c, i + 1));
-                                break;  // start of exponent
-                            },
-                            '.' => {
-                                break;  // start of fractional part
-                            },
-                            _ => {
-                                return Err(PFE { kind: Invalid });
-                            },
-                        },
-                    }
-                }
-
-                // If we are not yet at the exponent parse the fractional
-                // part of the significand
-                if exp_info.is_none() {
-                    let mut power = 1.0;
-                    for (i, c) in cs.by_ref() {
-                        match c.to_digit(radix) {
-                            Some(digit) => {
-                                // Decrease power one order of magnitude
-                                power = power / (radix as $t);
-                                // add/subtract current digit depending on sign
-                                sig = if is_positive {
-                                    sig + (digit as $t) * power
-                                } else {
-                                    sig - (digit as $t) * power
-                                };
-                                // Detect overflow by comparing to last value
-                                if is_positive && sig < prev_sig
-                                    { return Ok(Float::infinity()); }
-                                if !is_positive && sig > prev_sig
-                                    { return Ok(Float::neg_infinity()); }
-                                prev_sig = sig;
-                            },
-                            None => match c {
-                                'e' | 'E' | 'p' | 'P' => {
-                                    exp_info = Some((c, i + 1));
-                                    break; // start of exponent
-                                },
-                                _ => {
-                                    return Err(PFE { kind: Invalid });
-                                },
-                            },
-                        }
-                    }
-                }
-
-                // Parse and calculate the exponent
-                let exp = match exp_info {
-                    Some((c, offset)) => {
-                        let base = match c {
-                            'E' | 'e' if radix == 10 => 10.0,
-                            'P' | 'p' if radix == 16 => 2.0,
-                            _ => return Err(PFE { kind: Invalid }),
-                        };
-
-                        // Parse the exponent as decimal integer
-                        let src = &src[offset..];
-                        let (is_positive, exp) = match slice_shift_char(src) {
-                            Some(('-', src)) => (false, src.parse::<usize>()),
-                            Some(('+', src)) => (true,  src.parse::<usize>()),
-                            Some((_, _))     => (true,  src.parse::<usize>()),
-                            None             => return Err(PFE { kind: Invalid }),
-                        };
-
-                        match (is_positive, exp) {
-                            (true,  Ok(exp)) => base.powi(exp as i32),
-                            (false, Ok(exp)) => 1.0 / base.powi(exp as i32),
-                            (_, Err(_))      => return Err(PFE { kind: Invalid }),
-                        }
-                    },
-                    None => 1.0, // no exponent
-                };
-
-                Ok(sig * exp)
-            }
-        }
-    )*)
-}
-float_trait_impl!(Num for f32 f64);
-
-/// A value bounded by a minimum and a maximum
-///
-///  If input is less than min then this returns min. 
-///  If input is greater than max then this returns max.  
-///  Otherwise this returns input. 
-#[inline]
-pub fn clamp<T: PartialOrd>(input: T, min: T, max: T) -> T {
-    debug_assert!(min <= max, "min must be less than or equal to max");
-    if input < min {
-        min
-    } else if input > max {
-        max
-    } else {
-        input
-    }
-}
-
-#[test]
-fn clamp_test() {
-    // Int test
-    assert_eq!(1, clamp(1, -1, 2));
-    assert_eq!(-1, clamp(-2, -1, 2));
-    assert_eq!(2, clamp(3, -1, 2));
-
-    // Float test
-    assert_eq!(1.0, clamp(1.0, -1.0, 2.0));
-    assert_eq!(-1.0, clamp(-2.0, -1.0, 2.0));
-    assert_eq!(2.0, clamp(3.0, -1.0, 2.0));
-}
-
-#[test]
-fn from_str_radix_unwrap() {
-    // The Result error must impl Debug to allow unwrap()
-
-    let i: i32 = Num::from_str_radix("0", 10).unwrap();
-    assert_eq!(i, 0);
-
-    let f: f32 = Num::from_str_radix("0.0", 10).unwrap();
-    assert_eq!(f, 0.0);
-}
deleted file mode 100644
--- a/third_party/rust/num-traits-0.1.37/src/ops/checked.rs
+++ /dev/null
@@ -1,91 +0,0 @@
-use std::ops::{Add, Sub, Mul, Div};
-
-/// Performs addition that returns `None` instead of wrapping around on
-/// overflow.
-pub trait CheckedAdd: Sized + Add<Self, Output=Self> {
-    /// Adds two numbers, checking for overflow. If overflow happens, `None` is
-    /// returned.
-    fn checked_add(&self, v: &Self) -> Option<Self>;
-}
-
-macro_rules! checked_impl {
-    ($trait_name:ident, $method:ident, $t:ty) => {
-        impl $trait_name for $t {
-            #[inline]
-            fn $method(&self, v: &$t) -> Option<$t> {
-                <$t>::$method(*self, *v)
-            }
-        }
-    }
-}
-
-checked_impl!(CheckedAdd, checked_add, u8);
-checked_impl!(CheckedAdd, checked_add, u16);
-checked_impl!(CheckedAdd, checked_add, u32);
-checked_impl!(CheckedAdd, checked_add, u64);
-checked_impl!(CheckedAdd, checked_add, usize);
-
-checked_impl!(CheckedAdd, checked_add, i8);
-checked_impl!(CheckedAdd, checked_add, i16);
-checked_impl!(CheckedAdd, checked_add, i32);
-checked_impl!(CheckedAdd, checked_add, i64);
-checked_impl!(CheckedAdd, checked_add, isize);
-
-/// Performs subtraction that returns `None` instead of wrapping around on underflow.
-pub trait CheckedSub: Sized + Sub<Self, Output=Self> {
-    /// Subtracts two numbers, checking for underflow. If underflow happens,
-    /// `None` is returned.
-    fn checked_sub(&self, v: &Self) -> Option<Self>;
-}
-
-checked_impl!(CheckedSub, checked_sub, u8);
-checked_impl!(CheckedSub, checked_sub, u16);
-checked_impl!(CheckedSub, checked_sub, u32);
-checked_impl!(CheckedSub, checked_sub, u64);
-checked_impl!(CheckedSub, checked_sub, usize);
-
-checked_impl!(CheckedSub, checked_sub, i8);
-checked_impl!(CheckedSub, checked_sub, i16);
-checked_impl!(CheckedSub, checked_sub, i32);
-checked_impl!(CheckedSub, checked_sub, i64);
-checked_impl!(CheckedSub, checked_sub, isize);
-
-/// Performs multiplication that returns `None` instead of wrapping around on underflow or
-/// overflow.
-pub trait CheckedMul: Sized + Mul<Self, Output=Self> {
-    /// Multiplies two numbers, checking for underflow or overflow. If underflow
-    /// or overflow happens, `None` is returned.
-    fn checked_mul(&self, v: &Self) -> Option<Self>;
-}
-
-checked_impl!(CheckedMul, checked_mul, u8);
-checked_impl!(CheckedMul, checked_mul, u16);
-checked_impl!(CheckedMul, checked_mul, u32);
-checked_impl!(CheckedMul, checked_mul, u64);
-checked_impl!(CheckedMul, checked_mul, usize);
-
-checked_impl!(CheckedMul, checked_mul, i8);
-checked_impl!(CheckedMul, checked_mul, i16);
-checked_impl!(CheckedMul, checked_mul, i32);
-checked_impl!(CheckedMul, checked_mul, i64);
-checked_impl!(CheckedMul, checked_mul, isize);
-
-/// Performs division that returns `None` instead of panicking on division by zero and instead of
-/// wrapping around on underflow and overflow.
-pub trait CheckedDiv: Sized + Div<Self, Output=Self> {
-    /// Divides two numbers, checking for underflow, overflow and division by
-    /// zero. If any of that happens, `None` is returned.
-    fn checked_div(&self, v: &Self) -> Option<Self>;
-}
-
-checked_impl!(CheckedDiv, checked_div, u8);
-checked_impl!(CheckedDiv, checked_div, u16);
-checked_impl!(CheckedDiv, checked_div, u32);
-checked_impl!(CheckedDiv, checked_div, u64);
-checked_impl!(CheckedDiv, checked_div, usize);
-
-checked_impl!(CheckedDiv, checked_div, i8);
-checked_impl!(CheckedDiv, checked_div, i16);
-checked_impl!(CheckedDiv, checked_div, i32);
-checked_impl!(CheckedDiv, checked_div, i64);
-checked_impl!(CheckedDiv, checked_div, isize);
deleted file mode 100644
--- a/third_party/rust/num-traits-0.1.37/src/ops/wrapping.rs
+++ /dev/null
@@ -1,88 +0,0 @@
-use std::ops::{Add, Sub, Mul};
-
-macro_rules! wrapping_impl {
-    ($trait_name:ident, $method:ident, $t:ty) => {
-        impl $trait_name for $t {
-            #[inline]
-            fn $method(&self, v: &Self) -> Self {
-                <$t>::$method(*self, *v)
-            }
-        }
-    };
-    ($trait_name:ident, $method:ident, $t:ty, $rhs:ty) => {
-        impl $trait_name<$rhs> for $t {
-            #[inline]
-            fn $method(&self, v: &$rhs) -> Self {
-                <$t>::$method(*self, *v)
-            }
-        }
-    }
-}
-
-/// Performs addition that wraps around on overflow.
-pub trait WrappingAdd: Sized + Add<Self, Output=Self> {
-    /// Wrapping (modular) addition. Computes `self + other`, wrapping around at the boundary of
-    /// the type.
-    fn wrapping_add(&self, v: &Self) -> Self;
-}
-
-wrapping_impl!(WrappingAdd, wrapping_add, u8);
-wrapping_impl!(WrappingAdd, wrapping_add, u16);
-wrapping_impl!(WrappingAdd, wrapping_add, u32);
-wrapping_impl!(WrappingAdd, wrapping_add, u64);
-wrapping_impl!(WrappingAdd, wrapping_add, usize);
-
-wrapping_impl!(WrappingAdd, wrapping_add, i8);
-wrapping_impl!(WrappingAdd, wrapping_add, i16);
-wrapping_impl!(WrappingAdd, wrapping_add, i32);
-wrapping_impl!(WrappingAdd, wrapping_add, i64);
-wrapping_impl!(WrappingAdd, wrapping_add, isize);
-
-/// Performs subtraction that wraps around on overflow.
-pub trait WrappingSub: Sized + Sub<Self, Output=Self> {
-    /// Wrapping (modular) subtraction. Computes `self - other`, wrapping around at the boundary
-    /// of the type.
-    fn wrapping_sub(&self, v: &Self) -> Self;
-}
-
-wrapping_impl!(WrappingSub, wrapping_sub, u8);
-wrapping_impl!(WrappingSub, wrapping_sub, u16);
-wrapping_impl!(WrappingSub, wrapping_sub, u32);
-wrapping_impl!(WrappingSub, wrapping_sub, u64);
-wrapping_impl!(WrappingSub, wrapping_sub, usize);
-
-wrapping_impl!(WrappingSub, wrapping_sub, i8);
-wrapping_impl!(WrappingSub, wrapping_sub, i16);
-wrapping_impl!(WrappingSub, wrapping_sub, i32);
-wrapping_impl!(WrappingSub, wrapping_sub, i64);
-wrapping_impl!(WrappingSub, wrapping_sub, isize);
-
-/// Performs multiplication that wraps around on overflow.
-pub trait WrappingMul: Sized + Mul<Self, Output=Self> {
-    /// Wrapping (modular) multiplication. Computes `self * other`, wrapping around at the boundary
-    /// of the type.
-    fn wrapping_mul(&self, v: &Self) -> Self;
-}
-
-wrapping_impl!(WrappingMul, wrapping_mul, u8);
-wrapping_impl!(WrappingMul, wrapping_mul, u16);
-wrapping_impl!(WrappingMul, wrapping_mul, u32);
-wrapping_impl!(WrappingMul, wrapping_mul, u64);
-wrapping_impl!(WrappingMul, wrapping_mul, usize);
-
-wrapping_impl!(WrappingMul, wrapping_mul, i8);
-wrapping_impl!(WrappingMul, wrapping_mul, i16);
-wrapping_impl!(WrappingMul, wrapping_mul, i32);
-wrapping_impl!(WrappingMul, wrapping_mul, i64);
-wrapping_impl!(WrappingMul, wrapping_mul, isize);
-
-
-#[test]
-fn test_wrapping_traits() {
-    fn wrapping_add<T: WrappingAdd>(a: T, b: T) -> T { a.wrapping_add(&b) }
-    fn wrapping_sub<T: WrappingSub>(a: T, b: T) -> T { a.wrapping_sub(&b) }
-    fn wrapping_mul<T: WrappingMul>(a: T, b: T) -> T { a.wrapping_mul(&b) }
-    assert_eq!(wrapping_add(255, 1), 0u8);
-    assert_eq!(wrapping_sub(0, 1), 255u8);
-    assert_eq!(wrapping_mul(255, 2), 254u8);
-}
deleted file mode 100644
--- a/third_party/rust/num-traits-0.1.37/src/sign.rs
+++ /dev/null
@@ -1,161 +0,0 @@
-use std::ops::Neg;
-use std::{f32, f64};
-
-use Num;
-
-/// Useful functions for signed numbers (i.e. numbers that can be negative).
-pub trait Signed: Sized + Num + Neg<Output = Self> {
-    /// Computes the absolute value.
-    ///
-    /// For `f32` and `f64`, `NaN` will be returned if the number is `NaN`.
-    ///
-    /// For signed integers, `::MIN` will be returned if the number is `::MIN`.
-    fn abs(&self) -> Self;
-
-    /// The positive difference of two numbers.
-    ///
-    /// Returns `zero` if the number is less than or equal to `other`, otherwise the difference
-    /// between `self` and `other` is returned.
-    fn abs_sub(&self, other: &Self) -> Self;
-
-    /// Returns the sign of the number.
-    ///
-    /// For `f32` and `f64`:
-    ///
-    /// * `1.0` if the number is positive, `+0.0` or `INFINITY`
-    /// * `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`
-    /// * `NaN` if the number is `NaN`
-    ///
-    /// For signed integers:
-    ///
-    /// * `0` if the number is zero
-    /// * `1` if the number is positive
-    /// * `-1` if the number is negative
-    fn signum(&self) -> Self;
-
-    /// Returns true if the number is positive and false if the number is zero or negative.
-    fn is_positive(&self) -> bool;
-
-    /// Returns true if the number is negative and false if the number is zero or positive.
-    fn is_negative(&self) -> bool;
-}
-
-macro_rules! signed_impl {
-    ($($t:ty)*) => ($(
-        impl Signed for $t {
-            #[inline]
-            fn abs(&self) -> $t {
-                if self.is_negative() { -*self } else { *self }
-            }
-
-            #[inline]
-            fn abs_sub(&self, other: &$t) -> $t {
-                if *self <= *other { 0 } else { *self - *other }
-            }
-
-            #[inline]
-            fn signum(&self) -> $t {
-                match *self {
-                    n if n > 0 => 1,
-                    0 => 0,
-                    _ => -1,
-                }
-            }
-
-            #[inline]
-            fn is_positive(&self) -> bool { *self > 0 }
-
-            #[inline]
-            fn is_negative(&self) -> bool { *self < 0 }
-        }
-    )*)
-}
-
-signed_impl!(isize i8 i16 i32 i64);
-
-macro_rules! signed_float_impl {
-    ($t:ty, $nan:expr, $inf:expr, $neg_inf:expr) => {
-        impl Signed for $t {
-            /// Computes the absolute value. Returns `NAN` if the number is `NAN`.
-            #[inline]
-            fn abs(&self) -> $t {
-                <$t>::abs(*self)
-            }
-
-            /// The positive difference of two numbers. Returns `0.0` if the number is
-            /// less than or equal to `other`, otherwise the difference between`self`
-            /// and `other` is returned.
-            #[inline]
-            #[allow(deprecated)]
-            fn abs_sub(&self, other: &$t) -> $t {
-                <$t>::abs_sub(*self, *other)
-            }
-
-            /// # Returns
-            ///
-            /// - `1.0` if the number is positive, `+0.0` or `INFINITY`
-            /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`
-            /// - `NAN` if the number is NaN
-            #[inline]
-            fn signum(&self) -> $t {
-                <$t>::signum(*self)
-            }
-
-            /// Returns `true` if the number is positive, including `+0.0` and `INFINITY`
-            #[inline]
-            fn is_positive(&self) -> bool { *self > 0.0 || (1.0 / *self) == $inf }
-
-            /// Returns `true` if the number is negative, including `-0.0` and `NEG_INFINITY`
-            #[inline]
-            fn is_negative(&self) -> bool { *self < 0.0 || (1.0 / *self) == $neg_inf }
-        }
-    }
-}
-
-signed_float_impl!(f32, f32::NAN, f32::INFINITY, f32::NEG_INFINITY);
-signed_float_impl!(f64, f64::NAN, f64::INFINITY, f64::NEG_INFINITY);
-
-/// Computes the absolute value.
-///
-/// For `f32` and `f64`, `NaN` will be returned if the number is `NaN`
-///
-/// For signed integers, `::MIN` will be returned if the number is `::MIN`.
-#[inline(always)]
-pub fn abs<T: Signed>(value: T) -> T {
-    value.abs()
-}
-
-/// The positive difference of two numbers.
-///
-/// Returns zero if `x` is less than or equal to `y`, otherwise the difference
-/// between `x` and `y` is returned.
-#[inline(always)]
-pub fn abs_sub<T: Signed>(x: T, y: T) -> T {
-    x.abs_sub(&y)
-}
-
-/// Returns the sign of the number.
-///
-/// For `f32` and `f64`:
-///
-/// * `1.0` if the number is positive, `+0.0` or `INFINITY`
-/// * `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`
-/// * `NaN` if the number is `NaN`
-///
-/// For signed integers:
-///
-/// * `0` if the number is zero
-/// * `1` if the number is positive
-/// * `-1` if the number is negative
-#[inline(always)] pub fn signum<T: Signed>(value: T) -> T { value.signum() }
-
-/// A trait for values which cannot be negative
-pub trait Unsigned: Num {}
-
-macro_rules! empty_trait_impl {
-    ($name:ident for $($t:ty)*) => ($(
-        impl $name for $t {}
-    )*)
-}
-
-empty_trait_impl!(Unsigned for usize u8 u16 u32 u64);
copy from third_party/rust/num-traits/.cargo-checksum.json
copy to third_party/rust/num-traits-0.1.39/.cargo-checksum.json
copy from third_party/rust/num-traits/Cargo.toml
copy to third_party/rust/num-traits-0.1.39/Cargo.toml
rename from third_party/rust/num-traits-0.1.37/LICENSE-APACHE
rename to third_party/rust/num-traits-0.1.39/LICENSE-APACHE
rename from third_party/rust/regex-0.2.1/LICENSE-MIT
rename to third_party/rust/num-traits-0.1.39/LICENSE-MIT
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num-traits-0.1.39/src/bounds.rs
@@ -0,0 +1,99 @@
+use std::{usize, u8, u16, u32, u64};
+use std::{isize, i8, i16, i32, i64};
+use std::{f32, f64};
+use std::num::Wrapping;
+
+/// Numbers which have upper and lower bounds
+pub trait Bounded {
+    // FIXME (#5527): These should be associated constants
+    /// returns the smallest finite number this type can represent
+    fn min_value() -> Self;
+    /// returns the largest finite number this type can represent
+    fn max_value() -> Self;
+}
+
+macro_rules! bounded_impl {
+    ($t:ty, $min:expr, $max:expr) => {
+        impl Bounded for $t {
+            #[inline]
+            fn min_value() -> $t { $min }
+
+            #[inline]
+            fn max_value() -> $t { $max }
+        }
+    }
+}
+
+bounded_impl!(usize, usize::MIN, usize::MAX);
+bounded_impl!(u8,    u8::MIN,    u8::MAX);
+bounded_impl!(u16,   u16::MIN,   u16::MAX);
+bounded_impl!(u32,   u32::MIN,   u32::MAX);
+bounded_impl!(u64,   u64::MIN,   u64::MAX);
+
+bounded_impl!(isize, isize::MIN, isize::MAX);
+bounded_impl!(i8,    i8::MIN,    i8::MAX);
+bounded_impl!(i16,   i16::MIN,   i16::MAX);
+bounded_impl!(i32,   i32::MIN,   i32::MAX);
+bounded_impl!(i64,   i64::MIN,   i64::MAX);
+
+impl<T: Bounded> Bounded for Wrapping<T> {
+    fn min_value() -> Self { Wrapping(T::min_value()) }
+    fn max_value() -> Self { Wrapping(T::max_value()) }
+}
+
+bounded_impl!(f32, f32::MIN, f32::MAX);
+
+macro_rules! for_each_tuple_ {
+    ( $m:ident !! ) => (
+        $m! { }
+    );
+    ( $m:ident !! $h:ident, $($t:ident,)* ) => (
+        $m! { $h $($t)* }
+        for_each_tuple_! { $m !! $($t,)* }
+    );
+}
+macro_rules! for_each_tuple {
+    ( $m:ident ) => (
+        for_each_tuple_! { $m !! A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, }
+    );
+}
+
+macro_rules! bounded_tuple {
+    ( $($name:ident)* ) => (
+        impl<$($name: Bounded,)*> Bounded for ($($name,)*) {
+            #[inline]
+            fn min_value() -> Self {
+                ($($name::min_value(),)*)
+            }
+            #[inline]
+            fn max_value() -> Self {
+                ($($name::max_value(),)*)
+            }
+        }
+    );
+}
+
+for_each_tuple!(bounded_tuple);
+bounded_impl!(f64, f64::MIN, f64::MAX);
+
+
+macro_rules! test_wrapping_bounded {
+    ($($t:ty)+) => {
+        $(
+            assert_eq!(Wrapping::<$t>::min_value().0, <$t>::min_value());
+            assert_eq!(Wrapping::<$t>::max_value().0, <$t>::max_value());
+        )+   
+    };
+}
+
+#[test]
+fn wrapping_bounded() {
+    test_wrapping_bounded!(usize u8 u16 u32 u64 isize i8 i16 i32 i64);
+}
+
+#[test]
+fn wrapping_is_bounded() {
+    fn require_bounded<T: Bounded>(_: &T) {}
+    require_bounded(&Wrapping(42_u32));
+    require_bounded(&Wrapping(-42));
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num-traits-0.1.39/src/cast.rs
@@ -0,0 +1,511 @@
+use std::mem::size_of;
+use std::num::Wrapping;
+
+use identities::Zero;
+use bounds::Bounded;
+
+/// A generic trait for converting a value to a number.
+pub trait ToPrimitive {
+    /// Converts the value of `self` to an `isize`.
+    #[inline]
+    fn to_isize(&self) -> Option<isize> {
+        self.to_i64().and_then(|x| x.to_isize())
+    }
+
+    /// Converts the value of `self` to an `i8`.
+    #[inline]
+    fn to_i8(&self) -> Option<i8> {
+        self.to_i64().and_then(|x| x.to_i8())
+    }
+
+    /// Converts the value of `self` to an `i16`.
+    #[inline]
+    fn to_i16(&self) -> Option<i16> {
+        self.to_i64().and_then(|x| x.to_i16())
+    }
+
+    /// Converts the value of `self` to an `i32`.
+    #[inline]
+    fn to_i32(&self) -> Option<i32> {
+        self.to_i64().and_then(|x| x.to_i32())
+    }
+
+    /// Converts the value of `self` to an `i64`.
+    fn to_i64(&self) -> Option<i64>;
+
+    /// Converts the value of `self` to a `usize`.
+    #[inline]
+    fn to_usize(&self) -> Option<usize> {
+        self.to_u64().and_then(|x| x.to_usize())
+    }
+
+    /// Converts the value of `self` to an `u8`.
+    #[inline]
+    fn to_u8(&self) -> Option<u8> {
+        self.to_u64().and_then(|x| x.to_u8())
+    }
+
+    /// Converts the value of `self` to an `u16`.
+    #[inline]
+    fn to_u16(&self) -> Option<u16> {
+        self.to_u64().and_then(|x| x.to_u16())
+    }
+
+    /// Converts the value of `self` to an `u32`.
+    #[inline]
+    fn to_u32(&self) -> Option<u32> {
+        self.to_u64().and_then(|x| x.to_u32())
+    }
+
+    /// Converts the value of `self` to an `u64`.
+    #[inline]
+    fn to_u64(&self) -> Option<u64>;
+
+    /// Converts the value of `self` to an `f32`.
+    #[inline]
+    fn to_f32(&self) -> Option<f32> {
+        self.to_f64().and_then(|x| x.to_f32())
+    }
+
+    /// Converts the value of `self` to an `f64`.
+    #[inline]
+    fn to_f64(&self) -> Option<f64> {
+        self.to_i64().and_then(|x| x.to_f64())
+    }
+}
+
+macro_rules! impl_to_primitive_int_to_int {
+    ($SrcT:ty, $DstT:ty, $slf:expr) => (
+        {
+            if size_of::<$SrcT>() <= size_of::<$DstT>() {
+                Some($slf as $DstT)
+            } else {
+                let n = $slf as i64;
+                let min_value: $DstT = Bounded::min_value();
+                let max_value: $DstT = Bounded::max_value();
+                if min_value as i64 <= n && n <= max_value as i64 {
+                    Some($slf as $DstT)
+                } else {
+                    None
+                }
+            }
+        }
+    )
+}
+
+macro_rules! impl_to_primitive_int_to_uint {
+    ($SrcT:ty, $DstT:ty, $slf:expr) => (
+        {
+            let zero: $SrcT = Zero::zero();
+            let max_value: $DstT = Bounded::max_value();
+            if zero <= $slf && $slf as u64 <= max_value as u64 {
+                Some($slf as $DstT)
+            } else {
+                None
+            }
+        }
+    )
+}
+
+macro_rules! impl_to_primitive_int {
+    ($T:ty) => (
+        impl ToPrimitive for $T {
+            #[inline]
+            fn to_isize(&self) -> Option<isize> { impl_to_primitive_int_to_int!($T, isize, *self) }
+            #[inline]
+            fn to_i8(&self) -> Option<i8> { impl_to_primitive_int_to_int!($T, i8, *self) }
+            #[inline]
+            fn to_i16(&self) -> Option<i16> { impl_to_primitive_int_to_int!($T, i16, *self) }
+            #[inline]
+            fn to_i32(&self) -> Option<i32> { impl_to_primitive_int_to_int!($T, i32, *self) }
+            #[inline]
+            fn to_i64(&self) -> Option<i64> { impl_to_primitive_int_to_int!($T, i64, *self) }
+
+            #[inline]
+            fn to_usize(&self) -> Option<usize> { impl_to_primitive_int_to_uint!($T, usize, *self) }
+            #[inline]
+            fn to_u8(&self) -> Option<u8> { impl_to_primitive_int_to_uint!($T, u8, *self) }
+            #[inline]
+            fn to_u16(&self) -> Option<u16> { impl_to_primitive_int_to_uint!($T, u16, *self) }
+            #[inline]
+            fn to_u32(&self) -> Option<u32> { impl_to_primitive_int_to_uint!($T, u32, *self) }
+            #[inline]
+            fn to_u64(&self) -> Option<u64> { impl_to_primitive_int_to_uint!($T, u64, *self) }
+
+            #[inline]
+            fn to_f32(&self) -> Option<f32> { Some(*self as f32) }
+            #[inline]
+            fn to_f64(&self) -> Option<f64> { Some(*self as f64) }
+        }
+    )
+}
+
+impl_to_primitive_int!(isize);
+impl_to_primitive_int!(i8);
+impl_to_primitive_int!(i16);
+impl_to_primitive_int!(i32);
+impl_to_primitive_int!(i64);
+
+macro_rules! impl_to_primitive_uint_to_int {
+    ($DstT:ty, $slf:expr) => (
+        {
+            let max_value: $DstT = Bounded::max_value();
+            if $slf as u64 <= max_value as u64 {
+                Some($slf as $DstT)
+            } else {
+                None
+            }
+        }
+    )
+}
+
+macro_rules! impl_to_primitive_uint_to_uint {
+    ($SrcT:ty, $DstT:ty, $slf:expr) => (
+        {
+            if size_of::<$SrcT>() <= size_of::<$DstT>() {
+                Some($slf as $DstT)
+            } else {
+                let zero: $SrcT = Zero::zero();
+                let max_value: $DstT = Bounded::max_value();
+                if zero <= $slf && $slf as u64 <= max_value as u64 {
+                    Some($slf as $DstT)
+                } else {
+                    None
+                }
+            }
+        }
+    )
+}
+
+macro_rules! impl_to_primitive_uint {
+    ($T:ty) => (
+        impl ToPrimitive for $T {
+            #[inline]
+            fn to_isize(&self) -> Option<isize> { impl_to_primitive_uint_to_int!(isize, *self) }
+            #[inline]
+            fn to_i8(&self) -> Option<i8> { impl_to_primitive_uint_to_int!(i8, *self) }
+            #[inline]
+            fn to_i16(&self) -> Option<i16> { impl_to_primitive_uint_to_int!(i16, *self) }
+            #[inline]
+            fn to_i32(&self) -> Option<i32> { impl_to_primitive_uint_to_int!(i32, *self) }
+            #[inline]
+            fn to_i64(&self) -> Option<i64> { impl_to_primitive_uint_to_int!(i64, *self) }
+
+            #[inline]
+            fn to_usize(&self) -> Option<usize> {
+                impl_to_primitive_uint_to_uint!($T, usize, *self)
+            }
+            #[inline]
+            fn to_u8(&self) -> Option<u8> { impl_to_primitive_uint_to_uint!($T, u8, *self) }
+            #[inline]
+            fn to_u16(&self) -> Option<u16> { impl_to_primitive_uint_to_uint!($T, u16, *self) }
+            #[inline]
+            fn to_u32(&self) -> Option<u32> { impl_to_primitive_uint_to_uint!($T, u32, *self) }
+            #[inline]
+            fn to_u64(&self) -> Option<u64> { impl_to_primitive_uint_to_uint!($T, u64, *self) }
+
+            #[inline]
+            fn to_f32(&self) -> Option<f32> { Some(*self as f32) }
+            #[inline]
+            fn to_f64(&self) -> Option<f64> { Some(*self as f64) }
+        }
+    )
+}
+
+impl_to_primitive_uint!(usize);
+impl_to_primitive_uint!(u8);
+impl_to_primitive_uint!(u16);
+impl_to_primitive_uint!(u32);
+impl_to_primitive_uint!(u64);
+
+macro_rules! impl_to_primitive_float_to_float {
+    ($SrcT:ident, $DstT:ident, $slf:expr) => (
+        if size_of::<$SrcT>() <= size_of::<$DstT>() {
+            Some($slf as $DstT)
+        } else {
+            // Make sure the value is in range for the cast.
+            // NaN and +-inf are cast as they are.
+            let n = $slf as f64;
+            let max_value: $DstT = ::std::$DstT::MAX;
+            if !n.is_finite() || (-max_value as f64 <= n && n <= max_value as f64) {
+                Some($slf as $DstT)
+            } else {
+                None
+            }
+        }
+    )
+}
+
+macro_rules! impl_to_primitive_float {
+    ($T:ident) => (
+        impl ToPrimitive for $T {
+            #[inline]
+            fn to_isize(&self) -> Option<isize> { Some(*self as isize) }
+            #[inline]
+            fn to_i8(&self) -> Option<i8> { Some(*self as i8) }
+            #[inline]
+            fn to_i16(&self) -> Option<i16> { Some(*self as i16) }
+            #[inline]
+            fn to_i32(&self) -> Option<i32> { Some(*self as i32) }
+            #[inline]
+            fn to_i64(&self) -> Option<i64> { Some(*self as i64) }
+
+            #[inline]
+            fn to_usize(&self) -> Option<usize> { Some(*self as usize) }
+            #[inline]
+            fn to_u8(&self) -> Option<u8> { Some(*self as u8) }
+            #[inline]
+            fn to_u16(&self) -> Option<u16> { Some(*self as u16) }
+            #[inline]
+            fn to_u32(&self) -> Option<u32> { Some(*self as u32) }
+            #[inline]
+            fn to_u64(&self) -> Option<u64> { Some(*self as u64) }
+
+            #[inline]
+            fn to_f32(&self) -> Option<f32> { impl_to_primitive_float_to_float!($T, f32, *self) }
+            #[inline]
+            fn to_f64(&self) -> Option<f64> { impl_to_primitive_float_to_float!($T, f64, *self) }
+        }
+    )
+}
+
+impl_to_primitive_float!(f32);
+impl_to_primitive_float!(f64);
+
+/// A generic trait for converting a number to a value.
+pub trait FromPrimitive: Sized {
+    /// Convert an `isize` to return an optional value of this type. If the
+    /// value cannot be represented by this value, the `None` is returned.
+    #[inline]
+    fn from_isize(n: isize) -> Option<Self> {
+        FromPrimitive::from_i64(n as i64)
+    }
+
+    /// Convert an `i8` to return an optional value of this type. If the
+    /// type cannot be represented by this value, the `None` is returned.
+    #[inline]
+    fn from_i8(n: i8) -> Option<Self> {
+        FromPrimitive::from_i64(n as i64)
+    }
+
+    /// Convert an `i16` to return an optional value of this type. If the
+    /// type cannot be represented by this value, the `None` is returned.
+    #[inline]
+    fn from_i16(n: i16) -> Option<Self> {
+        FromPrimitive::from_i64(n as i64)
+    }
+
+    /// Convert an `i32` to return an optional value of this type. If the
+    /// type cannot be represented by this value, the `None` is returned.
+    #[inline]
+    fn from_i32(n: i32) -> Option<Self> {
+        FromPrimitive::from_i64(n as i64)
+    }
+
+    /// Convert an `i64` to return an optional value of this type. If the
+    /// type cannot be represented by this value, the `None` is returned.
+    fn from_i64(n: i64) -> Option<Self>;
+
+    /// Convert a `usize` to return an optional value of this type. If the
+    /// type cannot be represented by this value, the `None` is returned.
+    #[inline]
+    fn from_usize(n: usize) -> Option<Self> {
+        FromPrimitive::from_u64(n as u64)
+    }
+
+    /// Convert an `u8` to return an optional value of this type. If the
+    /// type cannot be represented by this value, the `None` is returned.
+    #[inline]
+    fn from_u8(n: u8) -> Option<Self> {
+        FromPrimitive::from_u64(n as u64)
+    }
+
+    /// Convert an `u16` to return an optional value of this type. If the
+    /// type cannot be represented by this value, the `None` is returned.
+    #[inline]
+    fn from_u16(n: u16) -> Option<Self> {
+        FromPrimitive::from_u64(n as u64)
+    }
+
+    /// Convert an `u32` to return an optional value of this type. If the
+    /// type cannot be represented by this value, the `None` is returned.
+    #[inline]
+    fn from_u32(n: u32) -> Option<Self> {
+        FromPrimitive::from_u64(n as u64)
+    }
+
+    /// Convert an `u64` to return an optional value of this type. If the
+    /// type cannot be represented by this value, the `None` is returned.
+    fn from_u64(n: u64) -> Option<Self>;
+
+    /// Convert a `f32` to return an optional value of this type. If the
+    /// type cannot be represented by this value, the `None` is returned.
+    #[inline]
+    fn from_f32(n: f32) -> Option<Self> {
+        FromPrimitive::from_f64(n as f64)
+    }
+
+    /// Convert a `f64` to return an optional value of this type. If the
+    /// type cannot be represented by this value, the `None` is returned.
+    #[inline]
+    fn from_f64(n: f64) -> Option<Self> {
+        FromPrimitive::from_i64(n as i64)
+    }
+}
+
+macro_rules! impl_from_primitive {
+    ($T:ty, $to_ty:ident) => (
+        #[allow(deprecated)]
+        impl FromPrimitive for $T {
+            #[inline] fn from_i8(n: i8) -> Option<$T> { n.$to_ty() }
+            #[inline] fn from_i16(n: i16) -> Option<$T> { n.$to_ty() }
+            #[inline] fn from_i32(n: i32) -> Option<$T> { n.$to_ty() }
+            #[inline] fn from_i64(n: i64) -> Option<$T> { n.$to_ty() }
+
+            #[inline] fn from_u8(n: u8) -> Option<$T> { n.$to_ty() }
+            #[inline] fn from_u16(n: u16) -> Option<$T> { n.$to_ty() }
+            #[inline] fn from_u32(n: u32) -> Option<$T> { n.$to_ty() }
+            #[inline] fn from_u64(n: u64) -> Option<$T> { n.$to_ty() }
+
+            #[inline] fn from_f32(n: f32) -> Option<$T> { n.$to_ty() }
+            #[inline] fn from_f64(n: f64) -> Option<$T> { n.$to_ty() }
+        }
+    )
+}
+
+impl_from_primitive!(isize, to_isize);
+impl_from_primitive!(i8,    to_i8);
+impl_from_primitive!(i16,   to_i16);
+impl_from_primitive!(i32,   to_i32);
+impl_from_primitive!(i64,   to_i64);
+impl_from_primitive!(usize, to_usize);
+impl_from_primitive!(u8,    to_u8);
+impl_from_primitive!(u16,   to_u16);
+impl_from_primitive!(u32,   to_u32);
+impl_from_primitive!(u64,   to_u64);
+impl_from_primitive!(f32,   to_f32);
+impl_from_primitive!(f64,   to_f64);
+
+
+impl<T: ToPrimitive> ToPrimitive for Wrapping<T> {
+    fn to_i64(&self) -> Option<i64> { self.0.to_i64() }
+    fn to_u64(&self) -> Option<u64> { self.0.to_u64() }
+}
+impl<T: FromPrimitive> FromPrimitive for Wrapping<T> {
+    fn from_u64(n: u64) -> Option<Self> { T::from_u64(n).map(Wrapping) }
+    fn from_i64(n: i64) -> Option<Self> { T::from_i64(n).map(Wrapping) }
+}
+
+
+/// Cast from one machine scalar to another.
+///
+/// # Examples
+///
+/// ```
+/// # use num_traits as num;
+/// let twenty: f32 = num::cast(0x14).unwrap();
+/// assert_eq!(twenty, 20f32);
+/// ```
+///
+#[inline]
+pub fn cast<T: NumCast, U: NumCast>(n: T) -> Option<U> {
+    NumCast::from(n)
+}
+
+/// An interface for casting between machine scalars.
+pub trait NumCast: Sized + ToPrimitive {
+    /// Creates a number from another value that can be converted into
+    /// a primitive via the `ToPrimitive` trait.
+    fn from<T: ToPrimitive>(n: T) -> Option<Self>;
+}
+
+macro_rules! impl_num_cast {
+    ($T:ty, $conv:ident) => (
+        impl NumCast for $T {
+            #[inline]
+            #[allow(deprecated)]
+            fn from<N: ToPrimitive>(n: N) -> Option<$T> {
+                // `$conv` could be generated using `concat_idents!`, but that
+                // macro seems to be broken at the moment
+                n.$conv()
+            }
+        }
+    )
+}
+
+impl_num_cast!(u8,    to_u8);
+impl_num_cast!(u16,   to_u16);
+impl_num_cast!(u32,   to_u32);
+impl_num_cast!(u64,   to_u64);
+impl_num_cast!(usize, to_usize);
+impl_num_cast!(i8,    to_i8);
+impl_num_cast!(i16,   to_i16);
+impl_num_cast!(i32,   to_i32);
+impl_num_cast!(i64,   to_i64);
+impl_num_cast!(isize, to_isize);
+impl_num_cast!(f32,   to_f32);
+impl_num_cast!(f64,   to_f64);
+
+impl<T: NumCast> NumCast for Wrapping<T> {
+    fn from<U: ToPrimitive>(n: U) -> Option<Self> {
+        T::from(n).map(Wrapping)
+    }
+}
+
+#[test]
+fn to_primitive_float() {
+    use std::f32;
+    use std::f64;
+
+    let f32_toolarge = 1e39f64;
+    assert_eq!(f32_toolarge.to_f32(), None);
+    assert_eq!((f32::MAX as f64).to_f32(), Some(f32::MAX));
+    assert_eq!((-f32::MAX as f64).to_f32(), Some(-f32::MAX));
+    assert_eq!(f64::INFINITY.to_f32(), Some(f32::INFINITY));
+    assert_eq!((f64::NEG_INFINITY).to_f32(), Some(f32::NEG_INFINITY));
+    assert!((f64::NAN).to_f32().map_or(false, |f| f.is_nan()));
+}
+
+macro_rules! test_wrapping_to_primitive {
+    ($($t:ty)+) => {
+        $({
+            let i: $t = 0;
+            let w = Wrapping(i);
+            assert_eq!(i.to_u8(),    w.to_u8());
+            assert_eq!(i.to_u16(),   w.to_u16());
+            assert_eq!(i.to_u32(),   w.to_u32());
+            assert_eq!(i.to_u64(),   w.to_u64());
+            assert_eq!(i.to_usize(), w.to_usize());
+            assert_eq!(i.to_i8(),    w.to_i8());
+            assert_eq!(i.to_i16(),   w.to_i16());
+            assert_eq!(i.to_i32(),   w.to_i32());
+            assert_eq!(i.to_i64(),   w.to_i64());
+            assert_eq!(i.to_isize(), w.to_isize());
+            assert_eq!(i.to_f32(),   w.to_f32());
+            assert_eq!(i.to_f64(),   w.to_f64());
+        })+   
+    };
+}
+
+#[test]
+fn wrapping_to_primitive() {
+    test_wrapping_to_primitive!(usize u8 u16 u32 u64 isize i8 i16 i32 i64);
+}
+
+#[test]
+fn wrapping_is_toprimitive() {
+    fn require_toprimitive<T: ToPrimitive>(_: &T) {}
+    require_toprimitive(&Wrapping(42));
+}
+
+#[test]
+fn wrapping_is_fromprimitive() {
+    fn require_fromprimitive<T: FromPrimitive>(_: &T) {}
+    require_fromprimitive(&Wrapping(42));
+}
+
+#[test]
+fn wrapping_is_numcast() {
+    fn require_numcast<T: NumCast>(_: &T) {}
+    require_numcast(&Wrapping(42));
+}
rename from third_party/rust/num-traits-0.1.37/src/float.rs
rename to third_party/rust/num-traits-0.1.39/src/float.rs
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num-traits-0.1.39/src/identities.rs
@@ -0,0 +1,148 @@
+use std::ops::{Add, Mul};
+use std::num::Wrapping;
+
+/// Defines an additive identity element for `Self`.
+pub trait Zero: Sized + Add<Self, Output = Self> {
+    /// Returns the additive identity element of `Self`, `0`.
+    ///
+    /// # Laws
+    ///
+    /// ```{.text}
+    /// a + 0 = a       ∀ a ∈ Self
+    /// 0 + a = a       ∀ a ∈ Self
+    /// ```
+    ///
+    /// # Purity
+    ///
+    /// This function should return the same result at all times regardless of
+    /// external mutable state, for example values stored in TLS or in
+    /// `static mut`s.
+    // FIXME (#5527): This should be an associated constant
+    fn zero() -> Self;
+
+    /// Returns `true` if `self` is equal to the additive identity.
+    #[inline]
+    fn is_zero(&self) -> bool;
+}
+
+macro_rules! zero_impl {
+    ($t:ty, $v:expr) => {
+        impl Zero for $t {
+            #[inline]
+            fn zero() -> $t { $v }
+            #[inline]
+            fn is_zero(&self) -> bool { *self == $v }
+        }
+    }
+}
+
+zero_impl!(usize, 0usize);
+zero_impl!(u8,    0u8);
+zero_impl!(u16,   0u16);
+zero_impl!(u32,   0u32);
+zero_impl!(u64,   0u64);
+
+zero_impl!(isize, 0isize);
+zero_impl!(i8,    0i8);
+zero_impl!(i16,   0i16);
+zero_impl!(i32,   0i32);
+zero_impl!(i64,   0i64);
+
+zero_impl!(f32, 0.0f32);
+zero_impl!(f64, 0.0f64);
+
+impl<T: Zero> Zero for Wrapping<T> where Wrapping<T>: Add<Output=Wrapping<T>> {
+    fn is_zero(&self) -> bool {
+        self.0.is_zero()
+    }
+    fn zero() -> Self {
+        Wrapping(T::zero())
+    }
+}
+
+
+/// Defines a multiplicative identity element for `Self`.
+pub trait One: Sized + Mul<Self, Output = Self> {
+    /// Returns the multiplicative identity element of `Self`, `1`.
+    ///
+    /// # Laws
+    ///
+    /// ```{.text}
+    /// a * 1 = a       ∀ a ∈ Self
+    /// 1 * a = a       ∀ a ∈ Self
+    /// ```
+    ///
+    /// # Purity
+    ///
+    /// This function should return the same result at all times regardless of
+    /// external mutable state, for example values stored in TLS or in
+    /// `static mut`s.
+    // FIXME (#5527): This should be an associated constant
+    fn one() -> Self;
+}
+
+macro_rules! one_impl {
+    ($t:ty, $v:expr) => {
+        impl One for $t {
+            #[inline]
+            fn one() -> $t { $v }
+        }
+    }
+}
+
+one_impl!(usize, 1usize);
+one_impl!(u8,    1u8);
+one_impl!(u16,   1u16);
+one_impl!(u32,   1u32);
+one_impl!(u64,   1u64);
+
+one_impl!(isize, 1isize);
+one_impl!(i8,    1i8);
+one_impl!(i16,   1i16);
+one_impl!(i32,   1i32);
+one_impl!(i64,   1i64);
+
+one_impl!(f32, 1.0f32);
+one_impl!(f64, 1.0f64);
+
+impl<T: One> One for Wrapping<T> where Wrapping<T>: Mul<Output=Wrapping<T>> {
+    fn one() -> Self {
+        Wrapping(T::one())
+    }
+}
+
+// Some helper functions provided for backwards compatibility.
+
+/// Returns the additive identity, `0`.
+#[inline(always)] pub fn zero<T: Zero>() -> T { Zero::zero() }
+
+/// Returns the multiplicative identity, `1`.
+#[inline(always)] pub fn one<T: One>() -> T { One::one() }
+
+
+macro_rules! test_wrapping_identities {
+    ($($t:ty)+) => {
+        $(
+            assert_eq!(zero::<$t>(), zero::<Wrapping<$t>>().0);
+            assert_eq!(one::<$t>(), one::<Wrapping<$t>>().0);
+            assert_eq!((0 as $t).is_zero(), Wrapping(0 as $t).is_zero());
+            assert_eq!((1 as $t).is_zero(), Wrapping(1 as $t).is_zero());
+        )+   
+    };
+}
+
+#[test]
+fn wrapping_identities() {
+    test_wrapping_identities!(isize i8 i16 i32 i64 usize u8 u16 u32 u64);
+}
+
+#[test]
+fn wrapping_is_zero() {
+    fn require_zero<T: Zero>(_: &T) {}
+    require_zero(&Wrapping(42));
+}
+#[test]
+fn wrapping_is_one() {
+    fn require_one<T: One>(_: &T) {}
+    require_one(&Wrapping(42));
+}
rename from third_party/rust/num-traits-0.1.37/src/int.rs
rename to third_party/rust/num-traits-0.1.39/src/int.rs
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num-traits-0.1.39/src/lib.rs
@@ -0,0 +1,435 @@
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+//! Numeric traits for generic mathematics
+#![doc(html_logo_url = "https://rust-num.github.io/num/rust-logo-128x128-blk-v2.png",
+       html_favicon_url = "https://rust-num.github.io/num/favicon.ico",
+       html_root_url = "https://rust-num.github.io/num/",
+       html_playground_url = "http://play.integer32.com/")]
+
+use std::ops::{Add, Sub, Mul, Div, Rem};
+use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign, RemAssign};
+use std::num::Wrapping;
+
+pub use bounds::Bounded;
+pub use float::{Float, FloatConst};
+pub use identities::{Zero, One, zero, one};
+pub use ops::checked::*;
+pub use ops::wrapping::*;
+pub use ops::saturating::Saturating;
+pub use sign::{Signed, Unsigned, abs, abs_sub, signum};
+pub use cast::*;
+pub use int::PrimInt;
+pub use pow::{pow, checked_pow};
+
+pub mod identities;
+pub mod sign;
+pub mod ops;
+pub mod bounds;
+pub mod float;
+pub mod cast;
+pub mod int;
+pub mod pow;
+
+/// The base trait for numeric types, covering `0` and `1` values,
+/// comparisons, basic numeric operations, and string conversion.
+pub trait Num: PartialEq + Zero + One + NumOps
+{
+    type FromStrRadixErr;
+
+    /// Convert from a string and radix <= 36.
+    ///
+    /// # Examples
+    ///
+    /// ```rust
+    /// use num_traits::Num;
+    ///
+    /// let result = <i32 as Num>::from_str_radix("27", 10);
+    /// assert_eq!(result, Ok(27));
+    ///
+    /// let result = <i32 as Num>::from_str_radix("foo", 10);
+    /// assert!(result.is_err());
+    /// ```
+    fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>;
+}
+
+/// The trait for types implementing basic numeric operations
+///
+/// This is automatically implemented for types which implement the operators.
+pub trait NumOps<Rhs = Self, Output = Self>
+    : Add<Rhs, Output = Output>
+    + Sub<Rhs, Output = Output>
+    + Mul<Rhs, Output = Output>
+    + Div<Rhs, Output = Output>
+    + Rem<Rhs, Output = Output>
+{}
+
+impl<T, Rhs, Output> NumOps<Rhs, Output> for T
+where T: Add<Rhs, Output = Output>
+       + Sub<Rhs, Output = Output>
+       + Mul<Rhs, Output = Output>
+       + Div<Rhs, Output = Output>
+       + Rem<Rhs, Output = Output>
+{}
+
+/// The trait for `Num` types which also implement numeric operations taking
+/// the second operand by reference.
+///
+/// This is automatically implemented for types which implement the operators.
+pub trait NumRef: Num + for<'r> NumOps<&'r Self> {}
+impl<T> NumRef for T where T: Num + for<'r> NumOps<&'r T> {}
+
+/// The trait for references which implement numeric operations, taking the
+/// second operand either by value or by reference.
+///
+/// This is automatically implemented for types which implement the operators.
+pub trait RefNum<Base>: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base> {}
+impl<T, Base> RefNum<Base> for T where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base> {}
+
+/// The trait for types implementing numeric assignment operators (like `+=`).
+///
+/// This is automatically implemented for types which implement the operators.
+pub trait NumAssignOps<Rhs = Self>
+    : AddAssign<Rhs>
+    + SubAssign<Rhs>
+    + MulAssign<Rhs>
+    + DivAssign<Rhs>
+    + RemAssign<Rhs>
+{}
+
+impl<T, Rhs> NumAssignOps<Rhs> for T
+where T: AddAssign<Rhs>
+       + SubAssign<Rhs>
+       + MulAssign<Rhs>
+       + DivAssign<Rhs>
+       + RemAssign<Rhs>
+{}
+
+/// The trait for `Num` types which also implement assignment operators.
+///
+/// This is automatically implemented for types which implement the operators.
+pub trait NumAssign: Num + NumAssignOps {}
+impl<T> NumAssign for T where T: Num + NumAssignOps {}
+
+/// The trait for `NumAssign` types which also implement assignment operations
+/// taking the second operand by reference.
+///
+/// This is automatically implemented for types which implement the operators.
+pub trait NumAssignRef: NumAssign + for<'r> NumAssignOps<&'r Self> {}
+impl<T> NumAssignRef for T where T: NumAssign + for<'r> NumAssignOps<&'r T> {}
+
+
+macro_rules! int_trait_impl {
+    ($name:ident for $($t:ty)*) => ($(
+        impl $name for $t {
+            type FromStrRadixErr = ::std::num::ParseIntError;
+            #[inline]
+            fn from_str_radix(s: &str, radix: u32)
+                              -> Result<Self, ::std::num::ParseIntError>
+            {
+                <$t>::from_str_radix(s, radix)
+            }
+        }
+    )*)
+}
+int_trait_impl!(Num for usize u8 u16 u32 u64 isize i8 i16 i32 i64);
+
+impl<T: Num> Num for Wrapping<T>
+    where Wrapping<T>:
+          Add<Output = Wrapping<T>> + Sub<Output = Wrapping<T>>
+        + Mul<Output = Wrapping<T>> + Div<Output = Wrapping<T>> + Rem<Output = Wrapping<T>>
+{
+    type FromStrRadixErr = T::FromStrRadixErr;
+    fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr> {
+        T::from_str_radix(str, radix).map(Wrapping)
+    }
+}
+
+
+#[derive(Debug)]
+pub enum FloatErrorKind {
+    Empty,
+    Invalid,
+}
+// FIXME: std::num::ParseFloatError is stable in 1.0, but opaque to us,
+// so there's not really any way for us to reuse it.
+#[derive(Debug)]
+pub struct ParseFloatError {
+    pub kind: FloatErrorKind,
+}
+
+// FIXME: The standard library from_str_radix on floats was deprecated, so we're stuck
+// with this implementation ourselves until we want to make a breaking change.
+// (would have to drop it from `Num` though)
+macro_rules! float_trait_impl {
+    ($name:ident for $($t:ty)*) => ($(
+        impl $name for $t {
+            type FromStrRadixErr = ParseFloatError;
+
+            fn from_str_radix(src: &str, radix: u32)
+                              -> Result<Self, Self::FromStrRadixErr>
+            {
+                use self::FloatErrorKind::*;
+                use self::ParseFloatError as PFE;
+
+                // Special values
+                match src {
+                    "inf"   => return Ok(Float::infinity()),
+                    "-inf"  => return Ok(Float::neg_infinity()),
+                    "NaN"   => return Ok(Float::nan()),
+                    _       => {},
+                }
+
+                fn slice_shift_char(src: &str) -> Option<(char, &str)> {
+                    src.chars().nth(0).map(|ch| (ch, &src[1..]))
+                }
+
+                let (is_positive, src) =  match slice_shift_char(src) {
+                    None             => return Err(PFE { kind: Empty }),
+                    Some(('-', ""))  => return Err(PFE { kind: Empty }),
+                    Some(('-', src)) => (false, src),
+                    Some((_, _))     => (true,  src),
+                };
+
+                // The significand to accumulate
+                let mut sig = if is_positive { 0.0 } else { -0.0 };
+                // Necessary to detect overflow
+                let mut prev_sig = sig;
+                let mut cs = src.chars().enumerate();
+                // Exponent prefix and exponent index offset
+                let mut exp_info = None::<(char, usize)>;
+
+                // Parse the integer part of the significand
+                for (i, c) in cs.by_ref() {
+                    match c.to_digit(radix) {
+                        Some(digit) => {
+                            // shift significand one digit left
+                            sig = sig * (radix as $t);
+
+                            // add/subtract current digit depending on sign
+                            if is_positive {
+                                sig = sig + ((digit as isize) as $t);
+                            } else {
+                                sig = sig - ((digit as isize) as $t);
+                            }
+
+                            // Detect overflow by comparing to last value, except
+                            // if we've not seen any non-zero digits.
+                            if prev_sig != 0.0 {
+                                if is_positive && sig <= prev_sig
+                                    { return Ok(Float::infinity()); }
+                                if !is_positive && sig >= prev_sig
+                                    { return Ok(Float::neg_infinity()); }
+
+                                // Detect overflow by reversing the shift-and-add process
+                                if is_positive && (prev_sig != (sig - digit as $t) / radix as $t)
+                                    { return Ok(Float::infinity()); }
+                                if !is_positive && (prev_sig != (sig + digit as $t) / radix as $t)
+                                    { return Ok(Float::neg_infinity()); }
+                            }
+                            prev_sig = sig;
+                        },
+                        None => match c {
+                            'e' | 'E' | 'p' | 'P' => {
+                                exp_info = Some((c, i + 1));
+                                break;  // start of exponent
+                            },
+                            '.' => {
+                                break;  // start of fractional part
+                            },
+                            _ => {
+                                return Err(PFE { kind: Invalid });
+                            },
+                        },
+                    }
+                }
+
+                // If we are not yet at the exponent parse the fractional
+                // part of the significand
+                if exp_info.is_none() {
+                    let mut power = 1.0;
+                    for (i, c) in cs.by_ref() {
+                        match c.to_digit(radix) {
+                            Some(digit) => {
+                                // Decrease power one order of magnitude
+                                power = power / (radix as $t);
+                                // add/subtract current digit depending on sign
+                                sig = if is_positive {
+                                    sig + (digit as $t) * power
+                                } else {
+                                    sig - (digit as $t) * power
+                                };
+                                // Detect overflow by comparing to last value
+                                if is_positive && sig < prev_sig
+                                    { return Ok(Float::infinity()); }
+                                if !is_positive && sig > prev_sig
+                                    { return Ok(Float::neg_infinity()); }
+                                prev_sig = sig;
+                            },
+                            None => match c {
+                                'e' | 'E' | 'p' | 'P' => {
+                                    exp_info = Some((c, i + 1));
+                                    break; // start of exponent
+                                },
+                                _ => {
+                                    return Err(PFE { kind: Invalid });
+                                },
+                            },
+                        }
+                    }
+                }
+
+                // Parse and calculate the exponent
+                let exp = match exp_info {
+                    Some((c, offset)) => {
+                        let base = match c {
+                            'E' | 'e' if radix == 10 => 10.0,
+                            'P' | 'p' if radix == 16 => 2.0,
+                            _ => return Err(PFE { kind: Invalid }),
+                        };
+
+                        // Parse the exponent as decimal integer
+                        let src = &src[offset..];
+                        let (is_positive, exp) = match slice_shift_char(src) {
+                            Some(('-', src)) => (false, src.parse::<usize>()),
+                            Some(('+', src)) => (true,  src.parse::<usize>()),
+                            Some((_, _))     => (true,  src.parse::<usize>()),
+                            None             => return Err(PFE { kind: Invalid }),
+                        };
+
+                        match (is_positive, exp) {
+                            (true,  Ok(exp)) => base.powi(exp as i32),
+                            (false, Ok(exp)) => 1.0 / base.powi(exp as i32),
+                            (_, Err(_))      => return Err(PFE { kind: Invalid }),
+                        }
+                    },
+                    None => 1.0, // no exponent
+                };
+
+                Ok(sig * exp)
+            }
+        }
+    )*)
+}
+float_trait_impl!(Num for f32 f64);
+
+/// A value bounded by a minimum and a maximum
+///
+///  If input is less than min then this returns min.
+///  If input is greater than max then this returns max.
+///  Otherwise this returns input.
+#[inline]
+pub fn clamp<T: PartialOrd>(input: T, min: T, max: T) -> T {
+    debug_assert!(min <= max, "min must be less than or equal to max");
+    if input < min {
+        min
+    } else if input > max {
+        max
+    } else {
+        input
+    }
+}
+
+#[test]
+fn clamp_test() {
+    // Int test
+    assert_eq!(1, clamp(1, -1, 2));
+    assert_eq!(-1, clamp(-2, -1, 2));
+    assert_eq!(2, clamp(3, -1, 2));
+
+    // Float test
+    assert_eq!(1.0, clamp(1.0, -1.0, 2.0));
+    assert_eq!(-1.0, clamp(-2.0, -1.0, 2.0));
+    assert_eq!(2.0, clamp(3.0, -1.0, 2.0));
+}
+
+#[test]
+fn from_str_radix_unwrap() {
+    // The Result error must impl Debug to allow unwrap()
+
+    let i: i32 = Num::from_str_radix("0", 10).unwrap();
+    assert_eq!(i, 0);
+
+    let f: f32 = Num::from_str_radix("0.0", 10).unwrap();
+    assert_eq!(f, 0.0);
+}
+
+macro_rules! test_wrapping_from_str_radix {
+    ($($t:ty)+) => {
+        $(
+            for &(s, r) in &[("42", 10), ("42", 2), ("-13.0", 10), ("foo", 10)] {
+                let w = Wrapping::<$t>::from_str_radix(s, r).map(|w| w.0);
+                assert_eq!(w, <$t as Num>::from_str_radix(s, r));
+            } 
+        )+   
+    };
+}
+#[test]
+fn wrapping_is_num() {
+    fn require_num<T: Num>(_: &T) {}
+    require_num(&Wrapping(42_u32));
+    require_num(&Wrapping(-42));
+}
+#[test]
+fn wrapping_from_str_radix() {
+    test_wrapping_from_str_radix!(usize u8 u16 u32 u64 isize i8 i16 i32 i64);
+}
+
+#[test]
+fn check_num_ops() {
+    fn compute<T: Num + Copy>(x: T, y: T) -> T {
+        x * y / y % y + y - y
+    }
+    assert_eq!(compute(1, 2), 1)
+}
+
+#[test]
+fn check_numref_ops() {
+    fn compute<T: NumRef>(x: T, y: &T) -> T {
+        x * y / y % y + y - y
+    }
+    assert_eq!(compute(1, &2), 1)
+}
+
+#[test]
+fn check_refnum_ops() {
+    fn compute<T: Copy>(x: &T, y: T) -> T
+        where for<'a> &'a T: RefNum<T>
+    {
+        &(&(&(&(x * y) / y) % y) + y) - y
+    }
+    assert_eq!(compute(&1, 2), 1)
+}
+
+#[test]
+fn check_refref_ops() {
+    fn compute<T>(x: &T, y: &T) -> T
+        where for<'a> &'a T: RefNum<T>
+    {
+        &(&(&(&(x * y) / y) % y) + y) - y
+    }
+    assert_eq!(compute(&1, &2), 1)
+}
+
+#[test]
+fn check_numassign_ops() {
+    fn compute<T: NumAssign + Copy>(mut x: T, y: T) -> T {
+        x *= y;
+        x /= y;
+        x %= y;
+        x += y;
+        x -= y;
+        x
+    }
+    assert_eq!(compute(1, 2), 1)
+}
+
+// TODO test `NumAssignRef`, but even the standard numeric types don't
+// implement this yet. (see rust pr41336)
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num-traits-0.1.39/src/ops/checked.rs
@@ -0,0 +1,92 @@
+use std::ops::{Add, Sub, Mul, Div};
+
+/// Performs addition that returns `None` instead of wrapping around on
+/// overflow.
+pub trait CheckedAdd: Sized + Add<Self, Output=Self> {
+    /// Adds two numbers, checking for overflow. If overflow happens, `None` is
+    /// returned.
+    fn checked_add(&self, v: &Self) -> Option<Self>;
+}
+
+macro_rules! checked_impl {
+    ($trait_name:ident, $method:ident, $t:ty) => {
+        impl $trait_name for $t {
+            #[inline]
+            fn $method(&self, v: &$t) -> Option<$t> {
+                <$t>::$method(*self, *v)
+            }
+        }
+    }
+}
+
+checked_impl!(CheckedAdd, checked_add, u8);
+checked_impl!(CheckedAdd, checked_add, u16);
+checked_impl!(CheckedAdd, checked_add, u32);
+checked_impl!(CheckedAdd, checked_add, u64);
+checked_impl!(CheckedAdd, checked_add, usize);
+
+checked_impl!(CheckedAdd, checked_add, i8);
+checked_impl!(CheckedAdd, checked_add, i16);
+checked_impl!(CheckedAdd, checked_add, i32);
+checked_impl!(CheckedAdd, checked_add, i64);
+checked_impl!(CheckedAdd, checked_add, isize);
+
+/// Performs subtraction that returns `None` instead of wrapping around on underflow.
+pub trait CheckedSub: Sized + Sub<Self, Output=Self> {
+    /// Subtracts two numbers, checking for underflow. If underflow happens,
+    /// `None` is returned.
+    fn checked_sub(&self, v: &Self) -> Option<Self>;
+}
+
+checked_impl!(CheckedSub, checked_sub, u8);
+checked_impl!(CheckedSub, checked_sub, u16);
+checked_impl!(CheckedSub, checked_sub, u32);
+checked_impl!(CheckedSub, checked_sub, u64);
+checked_impl!(CheckedSub, checked_sub, usize);
+
+checked_impl!(CheckedSub, checked_sub, i8);
+checked_impl!(CheckedSub, checked_sub, i16);
+checked_impl!(CheckedSub, checked_sub, i32);
+checked_impl!(CheckedSub, checked_sub, i64);
+checked_impl!(CheckedSub, checked_sub, isize);
+
+/// Performs multiplication that returns `None` instead of wrapping around on underflow or
+/// overflow.
+pub trait CheckedMul: Sized + Mul<Self, Output=Self> {
+    /// Multiplies two numbers, checking for underflow or overflow. If underflow
+    /// or overflow happens, `None` is returned.
+    fn checked_mul(&self, v: &Self) -> Option<Self>;
+}
+
+checked_impl!(CheckedMul, checked_mul, u8);
+checked_impl!(CheckedMul, checked_mul, u16);
+checked_impl!(CheckedMul, checked_mul, u32);
+checked_impl!(CheckedMul, checked_mul, u64);
+checked_impl!(CheckedMul, checked_mul, usize);
+
+checked_impl!(CheckedMul, checked_mul, i8);
+checked_impl!(CheckedMul, checked_mul, i16);
+checked_impl!(CheckedMul, checked_mul, i32);
+checked_impl!(CheckedMul, checked_mul, i64);
+checked_impl!(CheckedMul, checked_mul, isize);
+
+/// Performs division that returns `None` instead of panicking on division by zero and instead of
+/// wrapping around on underflow and overflow.
+pub trait CheckedDiv: Sized + Div<Self, Output=Self> {
+    /// Divides two numbers, checking for underflow, overflow and division by
+    /// zero. If any of that happens, `None` is returned.
+    fn checked_div(&self, v: &Self) -> Option<Self>;
+}
+
+checked_impl!(CheckedDiv, checked_div, u8);
+checked_impl!(CheckedDiv, checked_div, u16);
+checked_impl!(CheckedDiv, checked_div, u32);
+checked_impl!(CheckedDiv, checked_div, u64);
+checked_impl!(CheckedDiv, checked_div, usize);
+
+checked_impl!(CheckedDiv, checked_div, i8);
+checked_impl!(CheckedDiv, checked_div, i16);
+checked_impl!(CheckedDiv, checked_div, i32);
+checked_impl!(CheckedDiv, checked_div, i64);
+checked_impl!(CheckedDiv, checked_div, isize);
+
rename from third_party/rust/num-traits-0.1.37/src/ops/mod.rs
rename to third_party/rust/num-traits-0.1.39/src/ops/mod.rs
rename from third_party/rust/num-traits-0.1.37/src/ops/saturating.rs
rename to third_party/rust/num-traits-0.1.39/src/ops/saturating.rs
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num-traits-0.1.39/src/ops/wrapping.rs
@@ -0,0 +1,127 @@
+use std::ops::{Add, Sub, Mul};
+use std::num::Wrapping;
+
+macro_rules! wrapping_impl {
+    ($trait_name:ident, $method:ident, $t:ty) => {
+        impl $trait_name for $t {
+            #[inline]
+            fn $method(&self, v: &Self) -> Self {
+                <$t>::$method(*self, *v)
+            }
+        }
+    };
+    ($trait_name:ident, $method:ident, $t:ty, $rhs:ty) => {
+        impl $trait_name<$rhs> for $t {
+            #[inline]
+            fn $method(&self, v: &$rhs) -> Self {
+                <$t>::$method(*self, *v)
+            }
+        }
+    }
+}
+
+/// Performs addition that wraps around on overflow.
+pub trait WrappingAdd: Sized + Add<Self, Output=Self> {
+    /// Wrapping (modular) addition. Computes `self + other`, wrapping around at the boundary of
+    /// the type.
+    fn wrapping_add(&self, v: &Self) -> Self;
+}
+
+wrapping_impl!(WrappingAdd, wrapping_add, u8);
+wrapping_impl!(WrappingAdd, wrapping_add, u16);
+wrapping_impl!(WrappingAdd, wrapping_add, u32);
+wrapping_impl!(WrappingAdd, wrapping_add, u64);
+wrapping_impl!(WrappingAdd, wrapping_add, usize);
+
+wrapping_impl!(WrappingAdd, wrapping_add, i8);
+wrapping_impl!(WrappingAdd, wrapping_add, i16);
+wrapping_impl!(WrappingAdd, wrapping_add, i32);
+wrapping_impl!(WrappingAdd, wrapping_add, i64);
+wrapping_impl!(WrappingAdd, wrapping_add, isize);
+
+/// Performs subtraction that wraps around on overflow.
+pub trait WrappingSub: Sized + Sub<Self, Output=Self> {
+    /// Wrapping (modular) subtraction. Computes `self - other`, wrapping around at the boundary
+    /// of the type.
+    fn wrapping_sub(&self, v: &Self) -> Self;
+}
+
+wrapping_impl!(WrappingSub, wrapping_sub, u8);
+wrapping_impl!(WrappingSub, wrapping_sub, u16);
+wrapping_impl!(WrappingSub, wrapping_sub, u32);
+wrapping_impl!(WrappingSub, wrapping_sub, u64);
+wrapping_impl!(WrappingSub, wrapping_sub, usize);
+
+wrapping_impl!(WrappingSub, wrapping_sub, i8);
+wrapping_impl!(WrappingSub, wrapping_sub, i16);
+wrapping_impl!(WrappingSub, wrapping_sub, i32);
+wrapping_impl!(WrappingSub, wrapping_sub, i64);
+wrapping_impl!(WrappingSub, wrapping_sub, isize);
+
+/// Performs multiplication that wraps around on overflow.
+pub trait WrappingMul: Sized + Mul<Self, Output=Self> {
+    /// Wrapping (modular) multiplication. Computes `self * other`, wrapping around at the boundary
+    /// of the type.
+    fn wrapping_mul(&self, v: &Self) -> Self;
+}
+
+wrapping_impl!(WrappingMul, wrapping_mul, u8);
+wrapping_impl!(WrappingMul, wrapping_mul, u16);
+wrapping_impl!(WrappingMul, wrapping_mul, u32);
+wrapping_impl!(WrappingMul, wrapping_mul, u64);
+wrapping_impl!(WrappingMul, wrapping_mul, usize);
+
+wrapping_impl!(WrappingMul, wrapping_mul, i8);
+wrapping_impl!(WrappingMul, wrapping_mul, i16);
+wrapping_impl!(WrappingMul, wrapping_mul, i32);
+wrapping_impl!(WrappingMul, wrapping_mul, i64);
+wrapping_impl!(WrappingMul, wrapping_mul, isize);
+
+// Well this is a bit funny, but all the more appropriate.
+impl<T: WrappingAdd> WrappingAdd for Wrapping<T> where Wrapping<T>: Add<Output = Wrapping<T>> {
+    fn wrapping_add(&self, v: &Self) -> Self {
+        Wrapping(self.0.wrapping_add(&v.0))
+    }
+}
+impl<T: WrappingSub> WrappingSub for Wrapping<T> where Wrapping<T>: Sub<Output = Wrapping<T>> {
+    fn wrapping_sub(&self, v: &Self) -> Self {
+        Wrapping(self.0.wrapping_sub(&v.0))
+    }
+}
+impl<T: WrappingMul> WrappingMul for Wrapping<T> where Wrapping<T>: Mul<Output = Wrapping<T>> {
+    fn wrapping_mul(&self, v: &Self) -> Self {
+        Wrapping(self.0.wrapping_mul(&v.0))
+    }
+}
+
+
+#[test]
+fn test_wrapping_traits() {
+    fn wrapping_add<T: WrappingAdd>(a: T, b: T) -> T { a.wrapping_add(&b) }
+    fn wrapping_sub<T: WrappingSub>(a: T, b: T) -> T { a.wrapping_sub(&b) }
+    fn wrapping_mul<T: WrappingMul>(a: T, b: T) -> T { a.wrapping_mul(&b) }
+    assert_eq!(wrapping_add(255, 1), 0u8);
+    assert_eq!(wrapping_sub(0, 1), 255u8);
+    assert_eq!(wrapping_mul(255, 2), 254u8);
+    assert_eq!(wrapping_add(255, 1), (Wrapping(255u8) + Wrapping(1u8)).0);
+    assert_eq!(wrapping_sub(0, 1), (Wrapping(0u8) - Wrapping(1u8)).0);
+    assert_eq!(wrapping_mul(255, 2), (Wrapping(255u8) * Wrapping(2u8)).0);
+}
+
+#[test]
+fn wrapping_is_wrappingadd() {
+    fn require_wrappingadd<T: WrappingAdd>(_: &T) {}
+    require_wrappingadd(&Wrapping(42));
+}
+
+#[test]
+fn wrapping_is_wrappingsub() {
+    fn require_wrappingsub<T: WrappingSub>(_: &T) {}
+    require_wrappingsub(&Wrapping(42));
+}
+
+#[test]
+fn wrapping_is_wrappingmul() {
+    fn require_wrappingmul<T: WrappingMul>(_: &T) {}
+    require_wrappingmul(&Wrapping(42));
+}
rename from third_party/rust/num-traits-0.1.37/src/pow.rs
rename to third_party/rust/num-traits-0.1.39/src/pow.rs
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num-traits-0.1.39/src/sign.rs
@@ -0,0 +1,204 @@
+use std::ops::Neg;
+use std::{f32, f64};
+use std::num::Wrapping;
+
+use Num;
+
+/// Useful functions for signed numbers (i.e. numbers that can be negative).
+pub trait Signed: Sized + Num + Neg<Output = Self> {
+    /// Computes the absolute value.
+    ///
+    /// For `f32` and `f64`, `NaN` will be returned if the number is `NaN`.
+    ///
+    /// For signed integers, `::MIN` will be returned if the number is `::MIN`.
+    fn abs(&self) -> Self;
+
+    /// The positive difference of two numbers.
+    ///
+    /// Returns `zero` if the number is less than or equal to `other`, otherwise the difference
+    /// between `self` and `other` is returned.
+    fn abs_sub(&self, other: &Self) -> Self;
+
+    /// Returns the sign of the number.
+    ///
+    /// For `f32` and `f64`:
+    ///
+    /// * `1.0` if the number is positive, `+0.0` or `INFINITY`
+    /// * `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`
+    /// * `NaN` if the number is `NaN`
+    ///
+    /// For signed integers:
+    ///
+    /// * `0` if the number is zero
+    /// * `1` if the number is positive
+    /// * `-1` if the number is negative
+    fn signum(&self) -> Self;
+
+    /// Returns true if the number is positive and false if the number is zero or negative.
+    fn is_positive(&self) -> bool;
+
+    /// Returns true if the number is negative and false if the number is zero or positive.
+    fn is_negative(&self) -> bool;
+}
+
+macro_rules! signed_impl {
+    ($($t:ty)*) => ($(
+        impl Signed for $t {
+            #[inline]
+            fn abs(&self) -> $t {
+                if self.is_negative() { -*self } else { *self }
+            }
+
+            #[inline]
+            fn abs_sub(&self, other: &$t) -> $t {
+                if *self <= *other { 0 } else { *self - *other }
+            }
+
+            #[inline]
+            fn signum(&self) -> $t {
+                match *self {
+                    n if n > 0 => 1,
+                    0 => 0,
+                    _ => -1,
+                }
+            }
+
+            #[inline]
+            fn is_positive(&self) -> bool { *self > 0 }
+
+            #[inline]
+            fn is_negative(&self) -> bool { *self < 0 }
+        }
+    )*)
+}
+
+signed_impl!(isize i8 i16 i32 i64);
+
+impl<T: Signed> Signed for Wrapping<T> where Wrapping<T>: Num + Neg<Output=Wrapping<T>>
+{
+    #[inline]
+    fn abs(&self) -> Self {
+        Wrapping(self.0.abs())
+    }
+
+    #[inline]
+    fn abs_sub(&self, other: &Self) -> Self {
+        Wrapping(self.0.abs_sub(&other.0))
+    }
+
+    #[inline]
+    fn signum(&self) -> Self {
+        Wrapping(self.0.signum())
+    }
+
+    #[inline]
+    fn is_positive(&self) -> bool { self.0.is_positive() }
+
+    #[inline]
+    fn is_negative(&self) -> bool { self.0.is_negative() }
+}
+
+macro_rules! signed_float_impl {
+    ($t:ty, $nan:expr, $inf:expr, $neg_inf:expr) => {
+        impl Signed for $t {
+            /// Computes the absolute value. Returns `NAN` if the number is `NAN`.
+            #[inline]
+            fn abs(&self) -> $t {
+                <$t>::abs(*self)
+            }
+
+            /// The positive difference of two numbers. Returns `0.0` if the number is
+            /// less than or equal to `other`, otherwise the difference between`self`
+            /// and `other` is returned.
+            #[inline]
+            #[allow(deprecated)]
+            fn abs_sub(&self, other: &$t) -> $t {
+                <$t>::abs_sub(*self, *other)
+            }
+
+            /// # Returns
+            ///
+            /// - `1.0` if the number is positive, `+0.0` or `INFINITY`
+            /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`
+            /// - `NAN` if the number is NaN
+            #[inline]
+            fn signum(&self) -> $t {
+                <$t>::signum(*self)
+            }
+
+            /// Returns `true` if the number is positive, including `+0.0` and `INFINITY`
+            #[inline]
+            fn is_positive(&self) -> bool { *self > 0.0 || (1.0 / *self) == $inf }
+
+            /// Returns `true` if the number is negative, including `-0.0` and `NEG_INFINITY`
+            #[inline]
+            fn is_negative(&self) -> bool { *self < 0.0 || (1.0 / *self) == $neg_inf }
+        }
+    }
+}
+
+signed_float_impl!(f32, f32::NAN, f32::INFINITY, f32::NEG_INFINITY);
+signed_float_impl!(f64, f64::NAN, f64::INFINITY, f64::NEG_INFINITY);
+
+/// Computes the absolute value.
+///
+/// For `f32` and `f64`, `NaN` will be returned if the number is `NaN`
+///
+/// For signed integers, `::MIN` will be returned if the number is `::MIN`.
+#[inline(always)]
+pub fn abs<T: Signed>(value: T) -> T {
+    value.abs()
+}
+
+/// The positive difference of two numbers.
+///
+/// Returns zero if `x` is less than or equal to `y`, otherwise the difference
+/// between `x` and `y` is returned.
+#[inline(always)]
+pub fn abs_sub<T: Signed>(x: T, y: T) -> T {
+    x.abs_sub(&y)
+}
+
+/// Returns the sign of the number.
+///
+/// For `f32` and `f64`:
+///
+/// * `1.0` if the number is positive, `+0.0` or `INFINITY`
+/// * `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`
+/// * `NaN` if the number is `NaN`
+///
+/// For signed integers:
+///
+/// * `0` if the number is zero
+/// * `1` if the number is positive
+/// * `-1` if the number is negative
+#[inline(always)] pub fn signum<T: Signed>(value: T) -> T { value.signum() }
+
+/// A trait for values which cannot be negative
+pub trait Unsigned: Num {}
+
+macro_rules! empty_trait_impl {
+    ($name:ident for $($t:ty)*) => ($(
+        impl $name for $t {}
+    )*)
+}
+
+empty_trait_impl!(Unsigned for usize u8 u16 u32 u64);
+
+impl<T: Unsigned> Unsigned for Wrapping<T> where Wrapping<T>: Num {}
+
+#[test]
+fn unsigned_wrapping_is_unsigned() {
+    fn require_unsigned<T: Unsigned>(_: &T) {}
+    require_unsigned(&Wrapping(42_u32));
+}
+/*
+// Commenting this out since it doesn't compile on Rust 1.8,
+// because on this version Wrapping doesn't implement Neg and therefore can't
+// implement Signed.
+#[test]
+fn signed_wrapping_is_signed() {
+    fn require_signed<T: Signed>(_: &T) {}
+    require_signed(&Wrapping(-42));
+}
+*/
--- a/third_party/rust/num-traits/.cargo-checksum.json
+++ b/third_party/rust/num-traits/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"66a7dc4de5cbd1880cb7e5498317fd58c5bdca69fb3073c37f0a6604e0722387","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","src/bounds.rs":"3666fbdf8b347fa1daad3ee92e3ac4a10df99d26bc340b877d5bbba914b61782","src/cast.rs":"c44c11863751810ef40763ac3470facdf0c3f0d16db9474d3e566a8c78eafdaa","src/float.rs":"1f9d571bd3946d1d93dc7f4f4ae344bfabf5fd871243145aad120e242599c2e4","src/identities.rs":"c78281aa689c5f376a2cfbe1e81aefd54d634f410671ce1660a2c117b3ae6b04","src/int.rs":"b7b42dfa10423308f858216ac63fa52e26c49a7bc8900cd98de210992efc3f5f","src/lib.rs":"84c84706da4df88b87a0f5ed2e412dcfc644f9f849db2dc4302faa5d8b79379a","src/ops/checked.rs":"bc667779636f81c7eca138c6d57252a6bb6ca4cd1f0ff706a993067044d86f94","src/ops/mod.rs":"668ea4d117bc1fdf7eaf0fe16692fa40dfbdfcbc7a2010237fe395ce0086e02e","src/ops/saturating.rs":"46821d815c90c16b2f6bec0b94b4d7ebdbddf3ea42edc0467de738c56abf6436","src/ops/wrapping.rs":"a444c7eb3366f2ad4c3a9938f1158b1994b9da4bbf9097884b5e8e27a9b581dd","src/pow.rs":"73b611ad8d595ef917871ba859ff0c25efc2382220d30568e5fbb930bf6b4daa","src/sign.rs":"732736f44c3c410f43da98eb3c8887319d94ad2c4883d614a9c353659402b315"},"package":"1708c0628602a98b52fad936cf3edb9a107af06e52e49fdf0707e884456a6af6"}
\ No newline at end of file
+{"files":{"Cargo.toml":"92adda23269f6c20f8a7ba6ff6afab4c0a3756dfade9ff9513ef0546864a2848","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","src/bounds.rs":"3666fbdf8b347fa1daad3ee92e3ac4a10df99d26bc340b877d5bbba914b61782","src/cast.rs":"c44c11863751810ef40763ac3470facdf0c3f0d16db9474d3e566a8c78eafdaa","src/float.rs":"fd768b5bb403cd5056d3b588074ed5571c40279d6a7da8c4f3c46ac4713f89fd","src/identities.rs":"c78281aa689c5f376a2cfbe1e81aefd54d634f410671ce1660a2c117b3ae6b04","src/int.rs":"b7b42dfa10423308f858216ac63fa52e26c49a7bc8900cd98de210992efc3f5f","src/lib.rs":"84c84706da4df88b87a0f5ed2e412dcfc644f9f849db2dc4302faa5d8b79379a","src/ops/checked.rs":"bc667779636f81c7eca138c6d57252a6bb6ca4cd1f0ff706a993067044d86f94","src/ops/mod.rs":"668ea4d117bc1fdf7eaf0fe16692fa40dfbdfcbc7a2010237fe395ce0086e02e","src/ops/saturating.rs":"46821d815c90c16b2f6bec0b94b4d7ebdbddf3ea42edc0467de738c56abf6436","src/ops/wrapping.rs":"a444c7eb3366f2ad4c3a9938f1158b1994b9da4bbf9097884b5e8e27a9b581dd","src/pow.rs":"73b611ad8d595ef917871ba859ff0c25efc2382220d30568e5fbb930bf6b4daa","src/sign.rs":"732736f44c3c410f43da98eb3c8887319d94ad2c4883d614a9c353659402b315"},"package":"99843c856d68d8b4313b03a17e33c4bb42ae8f6610ea81b28abe076ac721b9b0"}
\ No newline at end of file
--- a/third_party/rust/num-traits/Cargo.toml
+++ b/third_party/rust/num-traits/Cargo.toml
@@ -1,12 +1,13 @@
 [package]
 authors = ["The Rust Project Developers"]
 description = "Numeric traits for generic mathematics"
 documentation = "http://rust-num.github.io/num"
 homepage = "https://github.com/rust-num/num"
 keywords = ["mathematics", "numerics"]
+categories = [ "algorithms", "science" ]
 license = "MIT/Apache-2.0"
 repository = "https://github.com/rust-num/num"
 name = "num-traits"
-version = "0.1.39"
+version = "0.1.40"
 
 [dependencies]
--- a/third_party/rust/num-traits/src/float.rs
+++ b/third_party/rust/num-traits/src/float.rs
@@ -318,51 +318,49 @@ pub trait Float
     ///
     /// assert_eq!(f.signum(), 1.0);
     /// assert_eq!(f64::NEG_INFINITY.signum(), -1.0);
     ///
     /// assert!(f64::NAN.signum().is_nan());
     /// ```
     fn signum(self) -> Self;
 
-    /// Returns `true` if `self` is positive, including `+0.0` and
-    /// `Float::infinity()`.
+    /// Returns `true` if `self` is positive, including `+0.0`,
+    /// `Float::infinity()`, and with newer versions of Rust `f64::NAN`.
+    ///
+    /// ```
+    /// use num_traits::Float;
+    /// use std::f64;
+    ///
+    /// let neg_nan: f64 = -f64::NAN;
+    ///
+    /// let f = 7.0;
+    /// let g = -7.0;
+    ///
+    /// assert!(f.is_sign_positive());
+    /// assert!(!g.is_sign_positive());
+    /// assert!(!neg_nan.is_sign_positive());
+    /// ```
+    fn is_sign_positive(self) -> bool;
+
+    /// Returns `true` if `self` is negative, including `-0.0`,
+    /// `Float::neg_infinity()`, and with newer versions of Rust `-f64::NAN`.
     ///
     /// ```
     /// use num_traits::Float;
     /// use std::f64;
     ///
     /// let nan: f64 = f64::NAN;
     ///
     /// let f = 7.0;
     /// let g = -7.0;
     ///
-    /// assert!(f.is_sign_positive());
-    /// assert!(!g.is_sign_positive());
-    /// // Requires both tests to determine if is `NaN`
-    /// assert!(!nan.is_sign_positive() && !nan.is_sign_negative());
-    /// ```
-    fn is_sign_positive(self) -> bool;
-
-    /// Returns `true` if `self` is negative, including `-0.0` and
-    /// `Float::neg_infinity()`.
-    ///
-    /// ```
-    /// use num_traits::Float;
-    /// use std::f64;
-    ///
-    /// let nan = f64::NAN;
-    ///
-    /// let f = 7.0;
-    /// let g = -7.0;
-    ///
     /// assert!(!f.is_sign_negative());
     /// assert!(g.is_sign_negative());
-    /// // Requires both tests to determine if is `NaN`.
-    /// assert!(!nan.is_sign_positive() && !nan.is_sign_negative());
+    /// assert!(!nan.is_sign_negative());
     /// ```
     fn is_sign_negative(self) -> bool;
 
     /// Fused multiply-add. Computes `(self * a) + b` with only one rounding
     /// error. This produces a more accurate result with better performance than
     /// a separate multiplication operation followed by an add.
     ///
     /// ```
--- a/third_party/rust/num/.cargo-checksum.json
+++ b/third_party/rust/num/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"9764d2f312c0ffd5e766f590fa3cbbe09059d10bf04b869e937c9ebf5d674eb9","Cargo.toml":"f533d81572ed9dc06e953829c4a837dce6f8ae096dc1f3a6bbd33095ad85aa8a","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"8c15b94f3309d43f316d58f351c143d4c8ef779382631fc65ea32d2dcdcddc4a","benches/bigint.rs":"20d98b7f41d721c62d46711ef9aa61d29d49b3a901faa715ff61bd43c61156f9","benches/shootout-pidigits.rs":"4e2392cdeba33986f8b294c0808b30c85bcf4bbc2a39537af849648cd0d749e1","ci/deploy.enc":"96fd3f8e1dc04d22c877a49b68788794f6cb515d0b7606df51d8b6be53131cd8","ci/deploy.sh":"8b7eeb9822e49bbfe36a22d846d5c06b4b7962330b3e4a5a64d59aeee1e45d66","ci/rustup.sh":"57e22a9e2a1dcfe4dcea577db7703e5700adf81792b5f0e2c04800f653094eda","ci/test_full.sh":"edc8bd2a61f3ec9886f4076c84b5c5ac667ca879f570b24608dd70bf4fdedd14","doc/favicon.ico":"7bc6bd910e0a3b5ccf9c8480a35cbec866563224d12b23052f1a7ffe9eb17c75","doc/index.html":"6977977443a0dd8c930a798c16e39bd99cdcbf78e5829e9502456117aa3a28dd","doc/rust-logo-128x128-blk-v2.png":"a3b727c6ff3ff9014b01a9ac0e721b027344a080ca7dc1107533b4c63a369af1","src/lib.rs":"8d45ef22ffe42258a8636ff482bb7fe1077eb7326fb4c4a6852e77e92a881742"},"package":"98b15ba84e910ea7a1973bccd3df7b31ae282bf9d8bd2897779950c9b8303d40"}
\ No newline at end of file
+{"files":{".travis.yml":"b692f971728cdb37ce24ba3a64dabbd5d1a9df5f2e865e4affbdc1af7ed2ae50","Cargo.toml":"b79d083fe859fb905da576c0b9e603d25f73724411f635e2a123b01900385265","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"d7c9353e9eaac0bece0bba326f318f8bc56135e0b20b2a542dd1cb9ff79dde33","benches/bigint.rs":"20d98b7f41d721c62d46711ef9aa61d29d49b3a901faa715ff61bd43c61156f9","benches/shootout-pidigits.rs":"4e2392cdeba33986f8b294c0808b30c85bcf4bbc2a39537af849648cd0d749e1","bors.toml":"1c81ede536a37edd30fe4e622ff0531b25372403ac9475a5d6c50f14156565a2","ci/deploy.enc":"96fd3f8e1dc04d22c877a49b68788794f6cb515d0b7606df51d8b6be53131cd8","ci/deploy.sh":"8b7eeb9822e49bbfe36a22d846d5c06b4b7962330b3e4a5a64d59aeee1e45d66","ci/rustup.sh":"57e22a9e2a1dcfe4dcea577db7703e5700adf81792b5f0e2c04800f653094eda","ci/test_full.sh":"2fdd8f5d39d2c67c3fd340870031c3ddcc2536f3908f8b5f07504a2f899da061","doc/favicon.ico":"7bc6bd910e0a3b5ccf9c8480a35cbec866563224d12b23052f1a7ffe9eb17c75","doc/index.html":"6977977443a0dd8c930a798c16e39bd99cdcbf78e5829e9502456117aa3a28dd","doc/rust-logo-128x128-blk-v2.png":"a3b727c6ff3ff9014b01a9ac0e721b027344a080ca7dc1107533b4c63a369af1","src/lib.rs":"8d45ef22ffe42258a8636ff482bb7fe1077eb7326fb4c4a6852e77e92a881742"},"package":"a311b77ebdc5dd4cf6449d81e4135d9f0e3b153839ac90e648a8ef538f923525"}
\ No newline at end of file
--- a/third_party/rust/num/.travis.yml
+++ b/third_party/rust/num/.travis.yml
@@ -12,8 +12,14 @@ script:
 after_success: |
   [ $TRAVIS_BRANCH = master ] &&
   [ $TRAVIS_PULL_REQUEST = false ] &&
   [ $TRAVIS_RUST_VERSION = nightly ] &&
   ssh-agent ./ci/deploy.sh
 notifications:
   email:
     on_success: never
+branches:
+  only:
+    - master
+    - next
+    - staging
+    - trying
--- a/third_party/rust/num/Cargo.toml
+++ b/third_party/rust/num/Cargo.toml
@@ -1,55 +1,56 @@
 [package]
 authors = ["The Rust Project Developers"]
 description = "A collection of numeric types and traits for Rust, including bigint,\ncomplex, rational, range iterators, generic integers, and more!\n"
 documentation = "http://rust-num.github.io/num"
 homepage = "https://github.com/rust-num/num"
-keywords = ["mathematics", "numerics"]
+keywords = ["mathematics", "numerics", "bignum"]
+categories = [ "algorithms", "data-structures", "science" ]
 license = "MIT/Apache-2.0"
 repository = "https://github.com/rust-num/num"
 name = "num"
-version = "0.1.37"
+version = "0.1.40"
 
 [[bench]]
 name = "bigint"
 
 [[bench]]
 harness = false
 name = "shootout-pidigits"
 
 [dependencies]
 
 [dependencies.num-bigint]
 optional = true
 path = "bigint"
-version = "0.1.36"
+version = "0.1.40"
 
 [dependencies.num-complex]
 optional = true
 path = "complex"
-version = "0.1.36"
+version = "0.1.39"
 
 [dependencies.num-integer]
 path = "./integer"
-version = "0.1.33"
+version = "0.1.35"
 
 [dependencies.num-iter]
 optional = false
 path = "iter"
-version = "0.1.33"
+version = "0.1.34"
 
 [dependencies.num-rational]
 optional = true
 path = "rational"
-version = "0.1.36"
+version = "0.1.39"
 
 [dependencies.num-traits]
 path = "./traits"
-version = "0.1.37"
+version = "0.1.40"
 
 [dev-dependencies]
 
 [dev-dependencies.rand]
 version = "0.3.8"
 
 [features]
 bigint = ["num-bigint"]
--- a/third_party/rust/num/README.md
+++ b/third_party/rust/num/README.md
@@ -1,14 +1,14 @@
 # num
 
 A collection of numeric types and traits for Rust.
 
 This includes new types for big integers, rationals, and complex numbers,
-new traits for generic programming on numeric properties like `Integer,
+new traits for generic programming on numeric properties like `Integer`,
 and generic range iterators.
 
 [Documentation](http://rust-num.github.io/num)
 
 ## Usage
 
 Add this to your `Cargo.toml`:
 
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num/bors.toml
@@ -0,0 +1,3 @@
+status = [
+  "continuous-integration/travis-ci/push",
+]
--- a/third_party/rust/num/ci/test_full.sh
+++ b/third_party/rust/num/ci/test_full.sh
@@ -5,16 +5,22 @@ set -ex
 echo Testing num on rustc ${TRAVIS_RUST_VERSION:=$1}
 
 # All of these packages should build and test everywhere.
 for package in bigint complex integer iter rational traits; do
   cargo build --manifest-path $package/Cargo.toml
   cargo test --manifest-path $package/Cargo.toml
 done
 
+# They all should build with minimal features too
+for package in bigint complex integer iter rational traits; do
+  cargo build --manifest-path $package/Cargo.toml --no-default-features
+  cargo test --manifest-path $package/Cargo.toml --no-default-features
+done
+
 # Each isolated feature should also work everywhere.
 for feature in '' bigint rational complex; do
   cargo build --verbose --no-default-features --features="$feature"
   cargo test --verbose --no-default-features --features="$feature"
 done
 
 # Build test for the serde feature
 cargo build --verbose --features "serde"
deleted file mode 100644
--- a/third_party/rust/num_cpus-1.2.1/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"979eec484d5ceb95a6553860cafa053694613fbafda322e6d159cfab261d99a0","Cargo.toml":"ab7ed1b2dc19a902636357868b4e838a4810335749a7e6c06c28614b7cb3290f","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0593d22d122d4bfec6407115e3907546312976f75473417aaa4c57ecd2095ae6","README.md":"72b85754dd79d887e84a91ec9eaf43abcb0dfa21c4f435aed97b1e2bf8b5bdc3","src/lib.rs":"f23c38bb8a3ee25bf073e2f597fdfa43bce74754d10d4e33b3185bf551ead42c"},"package":"a225d1e2717567599c24f88e49f00856c6e825a12125181ee42c4257e3688d39"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/num_cpus-1.2.1/Cargo.toml
+++ /dev/null
@@ -1,14 +0,0 @@
-[package]
-
-name = "num_cpus"
-version = "1.2.1"
-description = "Get the number of CPUs on a machine."
-authors = ["Sean McArthur <sean.monstar@gmail.com>"]
-license = "MIT/Apache-2.0"
-repository = "https://github.com/seanmonstar/num_cpus"
-documentation = "https://docs.rs/num_cpus"
-keywords = ["cpu", "cpus", "cores"]
-
-
-[dependencies]
-libc = "0.2"
deleted file mode 100644
--- a/third_party/rust/num_cpus-1.2.1/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# num_cpus
-
-[![crates.io](http://meritbadge.herokuapp.com/num_cpus)](https://crates.io/crates/num_cpus)
-
-A replacement for the deprecated `std::os::num_cpus`.
-
-## Usage
-
-Add to Cargo.toml:
-
-```
-[dependencies]
-num_cpus = "1.0"
-```
-
-In your `main.rs` or `lib.rs`:
-
-```rust
-extern crate num_cpus;
-
-// elsewhere
-let num = num_cpus::get();
-```
-
-## License
-
-Licensed under either of
-
- * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
-
-at your option.
-
-### Contribution
-
-Unless you explicitly state otherwise, any contribution intentionally submitted
-for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
-additional terms or conditions.
deleted file mode 100644
--- a/third_party/rust/num_cpus-1.2.1/src/lib.rs
+++ /dev/null
@@ -1,181 +0,0 @@
-//! Replaces the deprecated functionality of std::os::num_cpus.
-#![cfg_attr(test, deny(warnings))]
-#![deny(missing_docs)]
-#![allow(non_snake_case)]
-
-#[cfg(not(windows))]
-extern crate libc;
-
-/// Returns the number of CPUs of the current machine.
-#[inline]
-pub fn get() -> usize {
-    get_num_cpus()
-}
-
-/// Returns the number of physical cores of the current machine.
-/// If not possible on the particular architecture returns same as get() which
-/// is the logical CPUs.
-#[inline]
-pub fn get_physical() -> usize {
-    get_num_physical_cpus()
-}
-
-
-#[cfg(not(target_os = "linux"))]
-#[inline]
-fn get_num_physical_cpus() -> usize {
-    // Not implemented, fallback
-    get_num_cpus()
-}
-
-#[cfg(target_os = "linux")]
-fn get_num_physical_cpus() -> usize {
-    use std::io::BufReader;
-    use std::io::BufRead;
-    use std::fs::File;
-    use std::collections::HashSet;
-
-    let file = match File::open("/proc/cpuinfo") {
-        Ok(val) => val,
-        Err(_) => {return get_num_cpus()},
-    };
-    let reader = BufReader::new(file);
-    let mut set = HashSet::new();
-    let mut coreid: u32 = 0;
-    let mut physid: u32 = 0;
-    let mut chgcount = 0;
-    for line in reader.lines().filter_map(|result| result.ok()) {
-        let parts: Vec<&str> = line.split(':').map(|s| s.trim()).collect();
-        if parts.len() != 2 {
-            continue
-        }
-        if parts[0] == "core id" || parts[0] == "physical id" {
-            let value = match parts[1].trim().parse() {
-              Ok(val) => val,
-              Err(_) => break,
-            };
-            match parts[0] {
-                "core id"     => coreid = value,
-                "physical id" => physid = value,
-                _ => {},
-            }
-            chgcount += 1;
-        }
-        if chgcount == 2 {
-            set.insert((physid, coreid));
-            chgcount = 0;
-        }
-    }
-    let count = set.len();
-    if count == 0 { get_num_cpus() } else { count }
-}
-
-#[cfg(windows)]
-fn get_num_cpus() -> usize {
-    #[repr(C)]
-    struct SYSTEM_INFO {
-        wProcessorArchitecture: u16,
-        wReserved: u16,
-        dwPageSize: u32,
-        lpMinimumApplicationAddress: *mut u8,
-        lpMaximumApplicationAddress: *mut u8,
-        dwActiveProcessorMask: *mut u8,
-        dwNumberOfProcessors: u32,
-        dwProcessorType: u32,
-        dwAllocationGranularity: u32,
-        wProcessorLevel: u16,
-        wProcessorRevision: u16,
-    }
-
-    extern "system" {
-        fn GetSystemInfo(lpSystemInfo: *mut SYSTEM_INFO);
-    }
-
-    unsafe {
-        let mut sysinfo: SYSTEM_INFO = std::mem::uninitialized();
-        GetSystemInfo(&mut sysinfo);
-        sysinfo.dwNumberOfProcessors as usize
-    }
-}
-
-#[cfg(any(target_os = "freebsd",
-          target_os = "dragonfly",
-          target_os = "bitrig",
-          target_os = "netbsd"))]
-fn get_num_cpus() -> usize {
-    let mut cpus: libc::c_uint = 0;
-    let mut cpus_size = std::mem::size_of_val(&cpus);
-
-    unsafe {
-        cpus = libc::sysconf(libc::_SC_NPROCESSORS_ONLN) as libc::c_uint;
-    }
-    if cpus < 1 {
-        let mut mib = [libc::CTL_HW, libc::HW_NCPU, 0, 0];
-        unsafe {
-            libc::sysctl(mib.as_mut_ptr(),
-                         2,
-                         &mut cpus as *mut _ as *mut _,
-                         &mut cpus_size as *mut _ as *mut _,
-                         0 as *mut _,
-                         0);
-        }
-        if cpus < 1 {
-            cpus = 1;
-        }
-    }
-    cpus as usize
-}
-
-#[cfg(target_os = "openbsd")]
-fn get_num_cpus() -> usize {
-    let mut cpus: libc::c_uint = 0;
-    let mut cpus_size = std::mem::size_of_val(&cpus);
-    let mut mib = [libc::CTL_HW, libc::HW_NCPU, 0, 0];
-
-    unsafe {
-        libc::sysctl(mib.as_mut_ptr(),
-                     2,
-                     &mut cpus as *mut _ as *mut _,
-                     &mut cpus_size as *mut _ as *mut _,
-                     0 as *mut _,
-                     0);
-    }
-    if cpus < 1 {
-        cpus = 1;
-    }
-    cpus as usize
-}
-
-#[cfg(
-    any(
-        target_os = "linux",
-        target_os = "nacl",
-        target_os = "macos",
-        target_os = "ios",
-        target_os = "android",
-        target_os = "solaris",
-        target_os = "fuchsia",
-    )
-)]
-fn get_num_cpus() -> usize {
-    unsafe {
-        libc::sysconf(libc::_SC_NPROCESSORS_ONLN) as usize
-    }
-}
-#[cfg(target_os = "emscripten")]
-fn get_num_cpus() -> usize {
-    1
-}
-
-#[test]
-fn lower_bound() {
-    assert!(get() > 0);
-    assert!(get_physical() > 0);
-}
-
-
-#[test]
-fn upper_bound() {
-    assert!(get() < 236_451);
-    assert!(get_physical() < 236_451);
-}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num_cpus-1.6.2/.appveyor.yml
@@ -0,0 +1,16 @@
+environment:
+  matrix:
+  - TARGET: x86_64-pc-windows-msvc
+  - TARGET: i686-pc-windows-msvc
+  - TARGET: x86_64-pc-windows-gnu
+  - TARGET: i686-pc-windows-gnu
+install:
+  - curl -sSf -o rustup-init.exe https://win.rustup.rs/
+  - rustup-init.exe -y --default-host %TARGET%
+  - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
+  - rustc -vV
+  - cargo -vV
+build: false
+test_script:
+  - cargo build --verbose
+  - cargo test --verbose
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num_cpus-1.6.2/.cargo-checksum.json
@@ -0,0 +1,1 @@
+{"files":{".appveyor.yml":"2f3f82a91e82a6c0b601048a5c9cd9b39fa78dfb7172ecfe7ff3d4d010af66d8",".travis.yml":"979eec484d5ceb95a6553860cafa053694613fbafda322e6d159cfab261d99a0","Cargo.toml":"64af5f893e89e09be28f21857fb4238ddc63cf12f012a6f59c1a404db3f96284","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0593d22d122d4bfec6407115e3907546312976f75473417aaa4c57ecd2095ae6","README.md":"4d586d8185ea43e6472db25ad748da265024869eabdcd62805c2bf3de06c4eb4","src/lib.rs":"295224974716d3ac2cd3d9f65764bae2ec92d94c01f939f62cf3b00974bb3e63"},"package":"aec53c34f2d0247c5ca5d32cca1478762f301740468ee9ee6dcb7a0dd7a0c584"}
\ No newline at end of file
rename from third_party/rust/num_cpus-1.2.1/.travis.yml
rename to third_party/rust/num_cpus-1.6.2/.travis.yml
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num_cpus-1.6.2/Cargo.toml
@@ -0,0 +1,24 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
+[package]
+name = "num_cpus"
+version = "1.6.2"
+authors = ["Sean McArthur <sean.monstar@gmail.com>"]
+description = "Get the number of CPUs on a machine."
+documentation = "https://docs.rs/num_cpus"
+keywords = ["cpu", "cpus", "cores"]
+categories = ["hardware-support"]
+license = "MIT/Apache-2.0"
+repository = "https://github.com/seanmonstar/num_cpus"
+[dependencies.libc]
+version = "0.2.6"
rename from third_party/rust/num_cpus-1.2.1/LICENSE-APACHE
rename to third_party/rust/num_cpus-1.6.2/LICENSE-APACHE
rename from third_party/rust/num_cpus-1.2.1/LICENSE-MIT
rename to third_party/rust/num_cpus-1.6.2/LICENSE-MIT
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num_cpus-1.6.2/README.md
@@ -0,0 +1,42 @@
+# num_cpus
+
+[![crates.io](http://meritbadge.herokuapp.com/num_cpus)](https://crates.io/crates/num_cpus)
+[![Travis CI Status](https://travis-ci.org/seanmonstar/num_cpus.svg?branch=master)](https://travis-ci.org/seanmonstar/num_cpus)
+[![AppVeyor status](https://ci.appveyor.com/api/projects/status/qn8t6grhko5jwno6?svg=true)](https://ci.appveyor.com/project/seanmonstar/num-cpus)
+
+[Documentation](https://docs.rs/num_cpus)
+
+Count the number of CPUs on the current machine.
+
+## Usage
+
+Add to Cargo.toml:
+
+```toml
+[dependencies]
+num_cpus = "1.0"
+```
+
+In your `main.rs` or `lib.rs`:
+
+```rust
+extern crate num_cpus;
+
+// elsewhere
+let num = num_cpus::get();
+```
+
+## License
+
+Licensed under either of
+
+ * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
+ * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
+
+at your option.
+
+### Contribution
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
+additional terms or conditions.
new file mode 100644
--- /dev/null
+++ b/third_party/rust/num_cpus-1.6.2/src/lib.rs
@@ -0,0 +1,316 @@
+//! # num_cpus
+//!
+//! A crate with utilities to determine the number of CPUs available on the
+//! current system.
+//!
+//! ## Example
+//!
+//! ```
+//! let cpus = num_cpus::get();
+//! ```
+#![cfg_attr(test, deny(warnings))]
+#![deny(missing_docs)]
+#![allow(non_snake_case)]
+
+#[cfg(not(windows))]
+extern crate libc;
+
+/// Returns the number of available CPUs of the current system.
+///
+/// # Note
+///
+/// This will check sched affinity on Linux.
+#[inline]
+pub fn get() -> usize {
+    get_num_cpus()
+}
+
+/// Returns the number of physical cores of the current system.
+///
+/// If not possible on the particular architecture, returns same as `get()`
+/// which is the logical CPUs.
+#[inline]
+pub fn get_physical() -> usize {
+    get_num_physical_cpus()
+}
+
+
+#[cfg(not(any(target_os = "linux", target_os = "windows")))]
+#[inline]
+fn get_num_physical_cpus() -> usize {
+    // Not implemented, fallback
+    get_num_cpus()
+}
+
+#[cfg(target_os = "windows")]
+fn get_num_physical_cpus() -> usize {
+    match get_num_physical_cpus_windows() {
+        Some(num) => num,
+        None => get_num_cpus()
+    }
+}
+
+#[cfg(target_os = "windows")]
+fn get_num_physical_cpus_windows() -> Option<usize> {
+    // Inspired by https://msdn.microsoft.com/en-us/library/ms683194
+
+    use std::ptr;
+    use std::mem;
+
+    #[allow(non_upper_case_globals)]
+    const RelationProcessorCore: u32 = 0;
+
+    #[repr(C)]
+    #[allow(non_camel_case_types)]
+    struct SYSTEM_LOGICAL_PROCESSOR_INFORMATION {
+        mask: usize,
+        relationship: u32,
+        _unused: [u64; 2]
+    }
+
+    extern "system" {
+        fn GetLogicalProcessorInformation(
+            info: *mut SYSTEM_LOGICAL_PROCESSOR_INFORMATION,
+            length: &mut u32
+        ) -> u32;
+    }
+
+    // First we need to determine how much space to reserve.
+
+    // The required size of the buffer, in bytes.
+    let mut needed_size = 0;
+
+    unsafe {
+        GetLogicalProcessorInformation(ptr::null_mut(), &mut needed_size);
+    }
+
+    let struct_size = mem::size_of::<SYSTEM_LOGICAL_PROCESSOR_INFORMATION>() as u32;
+
+    // Could be 0, or some other bogus size.
+    if needed_size == 0 || needed_size < struct_size || needed_size % struct_size != 0 {
+        return None;
+    }
+
+    let count = needed_size / struct_size;
+
+    // Allocate some memory where we will store the processor info.
+    let mut buf = Vec::with_capacity(count as usize);
+
+    let result;
+
+    unsafe {
+        result = GetLogicalProcessorInformation(buf.as_mut_ptr(), &mut needed_size);
+    }
+
+    // Failed for any reason.
+    if result == 0 {
+        return None;
+    }
+
+    let count = needed_size / struct_size;
+
+    unsafe {
+        buf.set_len(count as usize);
+    }
+
+    let phys_proc_count = buf.iter()
+        // Only interested in processor packages (physical processors.)
+        .filter(|proc_info| proc_info.relationship == RelationProcessorCore)
+        .count();
+
+    if phys_proc_count == 0 {
+        None
+    } else {
+        Some(phys_proc_count)
+    }
+}
+
+#[cfg(target_os = "linux")]
+fn get_num_physical_cpus() -> usize {
+    use std::io::BufReader;
+    use std::io::BufRead;
+    use std::fs::File;
+    use std::collections::HashSet;
+
+    let file = match File::open("/proc/cpuinfo") {
+        Ok(val) => val,
+        Err(_) => {return get_num_cpus()},
+    };
+    let reader = BufReader::new(file);
+    let mut set = HashSet::new();
+    let mut coreid: u32 = 0;
+    let mut physid: u32 = 0;
+    let mut chgcount = 0;
+    for line in reader.lines().filter_map(|result| result.ok()) {
+        let parts: Vec<&str> = line.split(':').map(|s| s.trim()).collect();
+        if parts.len() != 2 {
+            continue
+        }
+        if parts[0] == "core id" || parts[0] == "physical id" {
+            let value = match parts[1].trim().parse() {
+              Ok(val) => val,
+              Err(_) => break,
+            };
+            match parts[0] {
+                "core id"     => coreid = value,
+                "physical id" => physid = value,
+                _ => {},
+            }
+            chgcount += 1;
+        }
+        if chgcount == 2 {
+            set.insert((physid, coreid));
+            chgcount = 0;
+        }
+    }
+    let count = set.len();
+    if count == 0 { get_num_cpus() } else { count }
+}
+
+#[cfg(windows)]
+fn get_num_cpus() -> usize {
+    #[repr(C)]
+    struct SYSTEM_INFO {
+        wProcessorArchitecture: u16,
+        wReserved: u16,
+        dwPageSize: u32,
+        lpMinimumApplicationAddress: *mut u8,
+        lpMaximumApplicationAddress: *mut u8,
+        dwActiveProcessorMask: *mut u8,
+        dwNumberOfProcessors: u32,
+        dwProcessorType: u32,
+        dwAllocationGranularity: u32,
+        wProcessorLevel: u16,
+        wProcessorRevision: u16,
+    }
+
+    extern "system" {
+        fn GetSystemInfo(lpSystemInfo: *mut SYSTEM_INFO);
+    }
+
+    unsafe {
+        let mut sysinfo: SYSTEM_INFO = std::mem::uninitialized();
+        GetSystemInfo(&mut sysinfo);
+        sysinfo.dwNumberOfProcessors as usize
+    }
+}
+
+#[cfg(any(target_os = "freebsd",
+          target_os = "dragonfly",
+          target_os = "bitrig",
+          target_os = "netbsd"))]
+fn get_num_cpus() -> usize {
+    let mut cpus: libc::c_uint = 0;
+    let mut cpus_size = std::mem::size_of_val(&cpus);
+
+    unsafe {
+        cpus = libc::sysconf(libc::_SC_NPROCESSORS_ONLN) as libc::c_uint;
+    }
+    if cpus < 1 {
+        let mut mib = [libc::CTL_HW, libc::HW_NCPU, 0, 0];
+        unsafe {
+            libc::sysctl(mib.as_mut_ptr(),
+                         2,
+                         &mut cpus as *mut _ as *mut _,
+                         &mut cpus_size as *mut _ as *mut _,
+                         0 as *mut _,
+                         0);
+        }
+        if cpus < 1 {
+            cpus = 1;
+        }
+    }
+    cpus as usize
+}
+
+#[cfg(target_os = "openbsd")]
+fn get_num_cpus() -> usize {
+    let mut cpus: libc::c_uint = 0;
+    let mut cpus_size = std::mem::size_of_val(&cpus);
+    let mut mib = [libc::CTL_HW, libc::HW_NCPU, 0, 0];
+
+    unsafe {
+        libc::sysctl(mib.as_mut_ptr(),
+                     2,
+                     &mut cpus as *mut _ as *mut _,
+                     &mut cpus_size as *mut _ as *mut _,
+                     0 as *mut _,
+                     0);
+    }
+    if cpus < 1 {
+        cpus = 1;
+    }
+    cpus as usize
+}
+
+#[cfg(target_os = "linux")]
+fn get_num_cpus() -> usize {
+    let mut set:  libc::cpu_set_t = unsafe { std::mem::zeroed() };
+    if unsafe { libc::sched_getaffinity(0, std::mem::size_of::<libc::cpu_set_t>(), &mut set) } == 0 {
+        let mut count: u32 = 0;
+        for i in 0..libc::CPU_SETSIZE as usize {
+            if unsafe { libc::CPU_ISSET(i, &set) } {
+                count += 1
+            }
+        }
+        count as usize
+    } else {
+        let cpus = unsafe { libc::sysconf(libc::_SC_NPROCESSORS_ONLN) };
+        if cpus < 1 {
+            1
+        } else {
+            cpus as usize
+        }
+    }
+}
+
+#[cfg(any(
+    target_os = "nacl",
+    target_os = "macos",
+    target_os = "ios",
+    target_os = "android",
+    target_os = "solaris",
+    target_os = "fuchsia")
+)]
+fn get_num_cpus() -> usize {
+    let cpus = unsafe { libc::sysconf(libc::_SC_NPROCESSORS_ONLN) };
+    if cpus < 1 {
+        1
+    } else {
+        cpus as usize
+    }
+}
+
+#[cfg(any(target_os = "emscripten", target_os = "redox", target_os = "haiku"))]
+fn get_num_cpus() -> usize {
+    1
+}
+
+#[cfg(test)]
+mod tests {
+    fn env_var(name: &'static str) -> Option<usize> {
+        ::std::env::var(name).ok().map(|val| val.parse().unwrap())
+    }
+
+    #[test]
+    fn test_get() {
+        let num = super::get();
+        if let Some(n) = env_var("NUM_CPUS_TEST_GET") {
+            assert_eq!(num, n);
+        } else {
+            assert!(num > 0);
+            assert!(num < 236_451);
+        }
+    }
+
+    #[test]
+    fn test_get_physical() {
+        let num = super::get_physical();
+        if let Some(n) = env_var("NUM_CPUS_TEST_GET_PHYSICAL") {
+            assert_eq!(num, n);
+        } else {
+            assert!(num > 0);
+            assert!(num < 236_451);
+        }
+    }
+}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"28fc87d41a27bc03d9a8c6b5f7bc1bca55444dbd0001100b85060acada1449d7","CHANGELOG.md":"e99bc3f63fe1e32dbe418187f21383fb4894563710b4ce250662fa2cb02b0837","Cargo.toml":"fc14b67adee51ac295c92eff8c8aafe1bc99ace22b1a8d1d8df84c2933016c47","HACKING.md":"37ea34650ce307a1d561aa915ada82cc8b44153085f327aa2b342fcf8e7afc62","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","PERFORMANCE.md":"d23d6dbe3791bc0689c5a876922b8264d6d3069b577772440b8caa01867f0cb4","README.md":"07f527e576e15a2986a5c6f7b98eb3a25adab4876bf2e210c2cc6f3a8e6a527f","appveyor.yml":"6855c14a64fec423d67c1ddcc47644593ae3ad1f26e8d157cd5c395efee1efc0","ci/after_success.sh":"6c9562098234f7484e2496918386505185c43018c3f3d17f8df95a59457d8f1f","ci/run-kcov":"696b60a4896901284b5dc9fd02cd499e9dce85229728ff96b627a7a4380c7216","ci/run-shootout-test":"be7edb66a4a65eaef6a2b7e6036b4b732effa8dcd931bf4cbd591d0ca32b8264","ci/script.sh":"7f640b7a469c2764f6c12dc84a75fa956c24bc1f611cd72f1ae3a53bacd3ee06","examples/regexdna-input.txt":"156a49710bb3e1ed4bc2bbb0af0f383b747b3d0281453cfff39c296124c598f8","examples/regexdna-output.txt":"35e85b19b70a893d752fd43e54e1e9da08bac43559191cea85b33387c24c4cc1","examples/shootout-regex-dna-bytes.rs":"3d36b08dd34c51d022e9b3a3dcfbc780bc9dc3d46a601256db5d4d5e2213119c","examples/shootout-regex-dna-cheat.rs":"4b5a590ec88a9ba67cc4a34621cb038a400d45e64a15a354f3e07fdaf41a935b","examples/shootout-regex-dna-replace.rs":"15677e7de356427fe2b983e918de073a7a730337b090d4ab0e815e1e66f74f73","examples/shootout-regex-dna-single-cheat.rs":"5e743b3a6ec968713ce064a289b1fbd11c302add824d1c749a2ffb546c73128e","examples/shootout-regex-dna-single.rs":"021292ec6999be33a9b8e833759bf3509dc0e6b6365fad8e3a882cf3835b0405","examples/shootout-regex-dna.rs":"b892242cea6b6b16f0511ea672c24a49909585224fb69085f0f2fca77ce30aea","scripts/frequencies.py":"df2cac150bc4ed42d2d97762535a5f260f3fe06d9d516721f68a52671a3b7a3b","scripts/regex-match-tests.py":"f1b3ad870c893510172bd84f8328b66ee99cd7aee7715a95a858468ff3e33635","scripts/unicode.py":"4b1330e733bbc22e677e22855bf8a88ab134aae56a10fda97081320aa12a6228","src/backtrack.rs":"4a60088f3e2bf26ff4b0ba54f6cdfb733411882b6a0febc1044f69f695ee1a91","src/compile.rs":"2734232d826d183da6d27b83cee3127645b4bf00cabd9b2e93cf731641f0c6c6","src/dfa.rs":"985b5f880814452edae862347584f2e53c08eaccae0e01ee5c5d8564dd8381ad","src/error.rs":"b4052872f9a7bc48c478fe73e145ac1acf7533140f827999808fadcba09754d3","src/exec.rs":"424962aeee60a456449142304b947d0a88580f50e26246acfe9f45023a1617f5","src/expand.rs":"94d7fb06544639d94338fc426bd15d1883efd4e0204552c9def667b9b415ef63","src/freqs.rs":"e25871eec51d1c02c15abbc04d61dbea71fb2dbc15f370c98279687416c969de","src/input.rs":"c2710458e38398a0eba357c76c38fde42b50c22b6e39764ea68984fab3acfab7","src/lib.rs":"143119dbb6a380f58d9bdf18d6668f5b237b0682adf60d51300dfb4d34998a3d","src/literals.rs":"7a2efe252c21660794bd27054e997151763c8f0ea68c2be7994e1a36f4811675","src/pattern.rs":"4e820c17a2b983050f47d3fd13282094ce9f27b75fd852fcec438d61f07f0b0b","src/pikevm.rs":"bc9d00bd5aed5463121fc98ce9390381137f842c821da48242b2f6fae1137f22","src/prog.rs":"3b3d472ced5958e140e96d367067ab53edba72804c80009a46131ec904a75f2a","src/re_builder.rs":"9b69abb739b259a588d222a5e801cdcbb98d5e1b41ca6eb9dd7f8755e0c946a7","src/re_bytes.rs":"f2e5ed90c3e457ca00f826a38b0b7fce72f053c4de15b1809ed2a73d92ba9a33","src/re_plugin.rs":"74999c35abc02cb7c18adb74c1d8ebd08b56141f66f174c67b7157c5c27e2a49","src/re_set.rs":"43f40dba1273b8b359d4010616be62b41f71b1d803f0c6e4b04169dc57cb6318","src/re_trait.rs":"37d791af9cc737e0a144be64ddb7104114222e5034cfc9c948078b0b2c799295","src/re_unicode.rs":"15b9bbbc7ec45dbd7d6639eed54616fa6a0ae9d6b5f163fdb0a367acba2bbe86","src/simd_accel/mod.rs":"a3eb2c7fcc296137cfc135da47cdfe745606e8159c3263591bebced2c09fdd54","src/simd_accel/teddy128.rs":"4b913c67f5b7105f75b02fff092c3d76895612425c3f8b3e5ded2c41aae4279c","src/simd_fallback/mod.rs":"4cb8a77e2d3e167e9bfc47cb7e4734179f743c2f727e26838864d9959275239b","src/simd_fallback/teddy128.rs":"502d3bff4c78963f343875aa00b15e3625f3ee2ba1de01f029211292a5721912","src/sparse.rs":"04e70bb0bd006f806e8c9cf19825625e907036304823bc03b6c8f2e5046a38ef","src/testdata/LICENSE":"58cf078acc03da3e280a938c2bd9943f554fc9b6ced89ad93ba35ca436872899","src/testdata/README":"45f869e37f798905c773bfbe0ef19a5fb7e585cbf0b7c21b5b5a784e8cec3c14","src/testdata/basic.dat":"3756a5bdd6f387ed34731197fbdaab8521b0ae1726250100ba235756cb42b4b1","src/testdata/nullsubexpr.dat":"496ac0278eec3b6d9170faace14554569032dd3d909618364d9326156de39ecf","src/testdata/repetition.dat":"1f7959063015b284b18a4a2c1c8b416d438a2d6c4b1a362da43406b865f50e69","src/utf8.rs":"422c7b84507cf3ec3900ff4f3787364e1213fac0c731994e34a813e44aaf47ff","tests/api.rs":"803faacd9ac5efc149959ff63a2132f5ca155f75a246b79807c549b464b5c497","tests/api_str.rs":"aef1388c9de8fe9044539745d1975c734e9d268ff02a2dbb1edc5b754cc56d77","tests/bytes.rs":"ae7601bf69307c541b56d85b6f77369051f55096dddfa9d81d470adb54f42a5d","tests/crazy.rs":"bf3a1c3b8620d7d4c9aa72ab5e027fec02ef4bcec45a884e89ad70e82c445a8d","tests/flags.rs":"cd3788760defc667b32adb2732b6657b289372e1051fc240dfd0e435e2835353","tests/fowler.rs":"e0b7420fa5b636301d4c11cd4dfb803ec09fa7b27be47c594d231167de1241e3","tests/macros.rs":"477302a0a8e13845d80cb11bd394df3ce75bfb1a22d2ebd0719940d1b1ab9340","tests/macros_bytes.rs":"647c42525b8df5151f4f4cab40f515dd2fa5a05246562f5575902e162b0af2c0","tests/macros_str.rs":"124767f6ff33766502e89050ad498d3aba21e975aefeaf64ae76b0abe13b4fdb","tests/misc.rs":"c8cc85ac916980ebd053df2444fe9b795a00f2ac42c5cd828fc3df487f689265","tests/multiline.rs":"4e872a9473bc229d955716c18c77aa3530625a8f3a28ecaefdb70b9aff0f0a8b","tests/noparse.rs":"9c5acf252655f8daba67d5aa15a98f556a8bb5de87de9ecc8e8e3b50614a65c2","tests/plugin.rs":"9a51dfcbdad4e2a19f43598d74e0dd745a862a01b4165fce387a94083e5b588f","tests/regression.rs":"049099e67b05e6cafefcbe6cc47ecca0ae068f0ee96b8df001d8501c0ecbd49e","tests/replace.rs":"4a65b863ad012366328062784e323f13c4bbccce89ff709196e4d84d94ef1636","tests/searcher.rs":"124c9909a1e8fcfddee8ecfae3a1fb9d76f9ddac62fda23d9b895744728a0aa8","tests/set.rs":"6b504dcfa0be6493d5ec0bed21c269c5c93e309ef77d8babe2449882428b5503","tests/shortest_match.rs":"7ca223e0a61b1a26a1f36465ab49de021475295e18f4d6421497461af1e107be","tests/suffix_reverse.rs":"cd497c1a51246a8fc727062133470e0c6300620ad80333d20d63c0ee4224ef1c","tests/test_backtrack.rs":"b07a114b2eb7f1f17357629be9c8458e31f7952fb2c327d66d9415f08855c624","tests/test_backtrack_bytes.rs":"dd3cec3c630d6f41892c9111bee87227bf47126651b2402672c30b084fa9c28c","tests/test_backtrack_utf8bytes.rs":"b576b933d6be21f8cedb281e456441d4278350b0145a139dbccb1861639a54f9","tests/test_default.rs":"768a1fabafc7eb815bfaf55c22606dc884e1dbb88d7fc40fd561e8faaa61e6d9","tests/test_default_bytes.rs":"d57f8ed0b66469aeeba1f8526db3576be40fa9ca396021b82b381870ab2b375d","tests/test_nfa.rs":"aad36ca01f3f7eb23633a1207056e9056d686be2ef6e3661fad83805fa482927","tests/test_nfa_bytes.rs":"198f7b58c5c7dd0a05f16ddb3b9b63dab29ef2a56448378ac602c5d087c01e4e","tests/test_nfa_utf8bytes.rs":"854d80114ca1bed14d4ad3f2b3bf292ff0fa44e12d7d3f2ec6dd17cbbaa82175","tests/test_plugin.rs":"84be9cabe1cf8fb208638475436b020a75e9ec3e7f885af39e5404adb6fcae03","tests/unicode.rs":"7bd3095678fa227dc722f2b5f60a072c2b1752a5ac8df234cd023ece34c80d8a","tests/word_boundary.rs":"7081317ddcec1e82dd4a2090a571c6abf2ff4bbfa8cd10395e1eb3f386157fae","tests/word_boundary_ascii.rs":"cd0be5b5b485de0ba7994b42e2864585556c3d2d8bf5eab05b58931d9aaf4b87","tests/word_boundary_unicode.rs":"ae4ac0689c6b42ff7628a681d6d99a124d254f35eb1b809137859d3a8afe84fc"},"package":"4278c17d0f6d62dfef0ab00028feb45bd7d2102843f80763474eeb1be8a10c01"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/.travis.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-dist: trusty
-sudo: false
-language: rust
-rust:
-  - 1.12.0
-  - stable
-  - beta
-  - nightly
-script: ci/script.sh
-addons:
-  apt:
-    packages:
-      - libcurl4-openssl-dev
-      - libelf-dev
-      - libdw-dev
-      - binutils-dev
-      - wget
-      - clang-3.6
-      - cmake
-      - python
-      - python-virtualenv
-after_success: ci/after_success.sh
-env:
-  global:
-    secure: "GdGE0kFYiJGccVZligur7JlWRCy49eH6uWPl71mrnaaW8jLHmkva0jVb0LB9e5ol3YMaMCgrwM2pcj3Uk2C08YcGIoEKOLlDVho351KaD6XfclZ29CQTAPMz4Xut2IcB4YeuZlDrOnM26guTIOtn2NAjeQgOhpM/ErzVBgkB+wQ="
-notifications:
-  email:
-    on_success: never
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/CHANGELOG.md
+++ /dev/null
@@ -1,239 +0,0 @@
-0.2.1
-=====
-One major bug with `replace_all` has been fixed along with a couple of other
-touchups.
-
-* [BUG #312](https://github.com/rust-lang/regex/issues/312):
-  Fix documentation for `NoExpand` to reference correct lifetime parameter.
-* [BUG #314](https://github.com/rust-lang/regex/issues/314):
-  Fix a bug with `replace_all` when replacing a match with the empty string.
-* [BUG #316](https://github.com/rust-lang/regex/issues/316):
-  Note a missing breaking change from the `0.2.0` CHANGELOG entry.
-  (`RegexBuilder::compile` was renamed to `RegexBuilder::build`.)
-* [BUG #324](https://github.com/rust-lang/regex/issues/324):
-  Compiling `regex` should only require one version of `memchr` crate.
-
-0.2.0
-=====
-This is a new major release of the regex crate, and is an implementation of the
-[regex 1.0 RFC](https://github.com/rust-lang/rfcs/blob/master/text/1620-regex-1.0.md).
-We are releasing a `0.2` first, and if there are no major problems, we will
-release a `1.0` shortly. For `0.2`, the minimum *supported* Rust version is
-1.12.
-
-There are a number of **breaking changes** in `0.2`. They are split into two
-types. The first type correspond to breaking changes in regular expression
-syntax. The second type correspond to breaking changes in the API.
-
-Breaking changes for regex syntax:
-
-* POSIX character classes now require double bracketing. Previously, the regex
-  `[:upper:]` would parse as the `upper` POSIX character class. Now it parses
-  as the character class containing the characters `:upper:`. The fix to this
-  change is to use `[[:upper:]]` instead. Note that variants like
-  `[[:upper:][:blank:]]` continue to work.
-* The character `[` must always be escaped inside a character class.
-* The characters `&`, `-` and `~` must be escaped if any one of them are
-  repeated consecutively. For example, `[&]`, `[\&]`, `[\&\&]`, `[&-&]` are all
-  equivalent while `[&&]` is illegal. (The motivation for this and the prior
-  change is to provide a backwards compatible path for adding character class
-  set notation.)
-* A `bytes::Regex` now has Unicode mode enabled by default (like the main
-  `Regex` type). This means regexes compiled with `bytes::Regex::new` that
-  don't have the Unicode flag set should add `(?-u)` to recover the original
-  behavior.
-
-Breaking changes for the regex API:
-
-* `find` and `find_iter` now **return `Match` values instead of
-  `(usize, usize)`.** `Match` values have `start` and `end` methods, which
-  return the match offsets. `Match` values also have an `as_str` method,
-  which returns the text of the match itself.
-* The `Captures` type now only provides a single iterator over all capturing
-  matches, which should replace uses of `iter` and `iter_pos`. Uses of
-  `iter_named` should use the `capture_names` method on `Regex`.
-* The `at` method on the `Captures` type has been renamed to `get`, and it
-  now returns a `Match`. Similarly, the `name` method on `Captures` now returns
-  a `Match`.
-* The `replace` methods now return `Cow` values. The `Cow::Borrowed` variant
-  is returned when no replacements are made.
-* The `Replacer` trait has been completely overhauled. This should only
-  impact clients that implement this trait explicitly. Standard uses of
-  the `replace` methods should continue to work unchanged. If you implement
-  the `Replacer` trait, please consult the new documentation.
-* The `quote` free function has been renamed to `escape`.
-* The `Regex::with_size_limit` method has been removed. It is replaced by
-  `RegexBuilder::size_limit`.
-* The `RegexBuilder` type has switched from owned `self` method receivers to
-  `&mut self` method receivers. Most uses will continue to work unchanged, but
-  some code may require naming an intermediate variable to hold the builder.
-* The `compile` method on `RegexBuilder` has been renamed to `build`.
-* The free `is_match` function has been removed. It is replaced by compiling
-  a `Regex` and calling its `is_match` method.
-* The `PartialEq` and `Eq` impls on `Regex` have been dropped. If you relied
-  on these impls, the fix is to define a wrapper type around `Regex`, impl
-  `Deref` on it and provide the necessary impls.
-* The `is_empty` method on `Captures` has been removed. This always returns
-  `false`, so its use is superfluous.
-* The `Syntax` variant of the `Error` type now contains a string instead of
-  a `regex_syntax::Error`. If you were examining syntax errors more closely,
-  you'll need to explicitly use the `regex_syntax` crate to re-parse the regex.
-* The `InvalidSet` variant of the `Error` type has been removed since it is
-  no longer used.
-* Most of the iterator types have been renamed to match conventions. If you
-  were using these iterator types explicitly, please consult the documentation
-  for its new name. For example, `RegexSplits` has been renamed to `Split`.
-
-A number of bugs have been fixed:
-
-* [BUG #151](https://github.com/rust-lang/regex/issues/151):
-  The `Replacer` trait has been changed to permit the caller to control
-  allocation.
-* [BUG #165](https://github.com/rust-lang/regex/issues/165):
-  Remove the free `is_match` function.
-* [BUG #166](https://github.com/rust-lang/regex/issues/166):
-  Expose more knobs (available in `0.1`) and remove `with_size_limit`.
-* [BUG #168](https://github.com/rust-lang/regex/issues/168):
-  Iterators produced by `Captures` now have the correct lifetime parameters.
-* [BUG #175](https://github.com/rust-lang/regex/issues/175):
-  Fix a corner case in the parsing of POSIX character classes.
-* [BUG #178](https://github.com/rust-lang/regex/issues/178):
-  Drop the `PartialEq` and `Eq` impls on `Regex`.
-* [BUG #179](https://github.com/rust-lang/regex/issues/179):
-  Remove `is_empty` from `Captures` since it always returns false.
-* [BUG #276](https://github.com/rust-lang/regex/issues/276):
-  Position of named capture can now be retrieved from a `Captures`.
-* [BUG #296](https://github.com/rust-lang/regex/issues/296):
-  Remove winapi/kernel32-sys dependency on UNIX.
-* [BUG #307](https://github.com/rust-lang/regex/issues/307):
-  Fix error on emscripten.
-
-
-0.1.80
-======
-* [PR #292](https://github.com/rust-lang/regex/pull/292):
-  Fixes bug #291, which was introduced by PR #290.
-
-0.1.79
-======
-* Require regex-syntax 0.3.8.
-
-0.1.78
-======
-* [PR #290](https://github.com/rust-lang/regex/pull/290):
-  Fixes bug #289, which caused some regexes with a certain combination
-  of literals to match incorrectly.
-
-0.1.77
-======
-* [PR #281](https://github.com/rust-lang/regex/pull/281):
-  Fixes bug #280 by disabling all literal optimizations when a pattern
-  is partially anchored.
-
-0.1.76
-======
-* Tweak criteria for using the Teddy literal matcher.
-
-0.1.75
-======
-* [PR #275](https://github.com/rust-lang/regex/pull/275):
-  Improves match verification performance in the Teddy SIMD searcher.
-* [PR #278](https://github.com/rust-lang/regex/pull/278):
-  Replaces slow substring loop in the Teddy SIMD searcher with Aho-Corasick.
-* Implemented DoubleEndedIterator on regex set match iterators.
-
-0.1.74
-======
-* Release regex-syntax 0.3.5 with a minor bug fix.
-* Fix bug #272.
-* Fix bug #277.
-* [PR #270](https://github.com/rust-lang/regex/pull/270):
-  Fixes bugs #264, #268 and an unreported where the DFA cache size could be
-  drastically under estimated in some cases (leading to high unexpected memory
-  usage).
-
-0.1.73
-======
-* Release `regex-syntax 0.3.4`.
-* Bump `regex-syntax` dependency version for `regex` to `0.3.4`.
-
-0.1.72
-======
-* [PR #262](https://github.com/rust-lang/regex/pull/262):
-  Fixes a number of small bugs caught by fuzz testing (AFL).
-
-0.1.71
-======
-* [PR #236](https://github.com/rust-lang/regex/pull/236):
-  Fix a bug in how suffix literals were extracted, which could lead
-  to invalid match behavior in some cases.
-
-0.1.70
-======
-* [PR #231](https://github.com/rust-lang/regex/pull/231):
-  Add SIMD accelerated multiple pattern search.
-* [PR #228](https://github.com/rust-lang/regex/pull/228):
-  Reintroduce the reverse suffix literal optimization.
-* [PR #226](https://github.com/rust-lang/regex/pull/226):
-  Implements NFA state compression in the lazy DFA.
-* [PR #223](https://github.com/rust-lang/regex/pull/223):
-  A fully anchored RegexSet can now short-circuit.
-
-0.1.69
-======
-* [PR #216](https://github.com/rust-lang/regex/pull/216):
-  Tweak the threshold for running backtracking.
-* [PR #217](https://github.com/rust-lang/regex/pull/217):
-  Add upper limit (from the DFA) to capture search (for the NFA).
-* [PR #218](https://github.com/rust-lang/regex/pull/218):
-  Add rure, a C API.
-
-0.1.68
-======
-* [PR #210](https://github.com/rust-lang/regex/pull/210):
-  Fixed a performance bug in `bytes::Regex::replace` where `extend` was used
-  instead of `extend_from_slice`.
-* [PR #211](https://github.com/rust-lang/regex/pull/211):
-  Fixed a bug in the handling of word boundaries in the DFA.
-* [PR #213](https://github.com/rust-lang/pull/213):
-  Added RE2 and Tcl to the benchmark harness. Also added a CLI utility from
-  running regexes using any of the following regex engines: PCRE1, PCRE2,
-  Oniguruma, RE2, Tcl and of course Rust's own regexes.
-
-0.1.67
-======
-* [PR #201](https://github.com/rust-lang/regex/pull/201):
-  Fix undefined behavior in the `regex!` compiler plugin macro.
-* [PR #205](https://github.com/rust-lang/regex/pull/205):
-  More improvements to DFA performance. Competitive with RE2. See PR for
-  benchmarks.
-* [PR #209](https://github.com/rust-lang/regex/pull/209):
-  Release 0.1.66 was semver incompatible since it required a newer version
-  of Rust than previous releases. This PR fixes that. (And `0.1.66` was
-  yanked.)
-
-0.1.66
-======
-* Speculative support for Unicode word boundaries was added to the DFA. This
-  should remove the last common case that disqualified use of the DFA.
-* An optimization that scanned for suffix literals and then matched the regular
-  expression in reverse was removed because it had worst case quadratic time
-  complexity. It was replaced with a more limited optimization where, given any
-  regex of the form `re$`, it will be matched in reverse from the end of the
-  haystack.
-* [PR #202](https://github.com/rust-lang/regex/pull/202):
-  The inner loop of the DFA was heavily optimized to improve cache locality
-  and reduce the overall number of instructions run on each iteration. This
-  represents the first use of `unsafe` in `regex` (to elide bounds checks).
-* [PR #200](https://github.com/rust-lang/regex/pull/200):
-  Use of the `mempool` crate (which used thread local storage) was replaced
-  with a faster version of a similar API in @Amanieu's `thread_local` crate.
-  It should reduce contention when using a regex from multiple threads
-  simultaneously.
-* PCRE2 JIT benchmarks were added. A benchmark comparison can be found
-  [here](https://gist.github.com/anonymous/14683c01993e91689f7206a18675901b).
-  (Includes a comparison with PCRE1's JIT and Oniguruma.)
-* A bug where word boundaries weren't being matched correctly in the DFA was
-  fixed. This only affected use of `bytes::Regex`.
-* [#160](https://github.com/rust-lang/regex/issues/160):
-  `Captures` now has a `Debug` impl.
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/Cargo.toml
+++ /dev/null
@@ -1,93 +0,0 @@
-[package]
-name = "regex"
-version = "0.2.1"  #:version
-authors = ["The Rust Project Developers"]
-license = "MIT/Apache-2.0"
-readme = "README.md"
-repository = "https://github.com/rust-lang/regex"
-documentation = "https://doc.rust-lang.org/regex"
-homepage = "https://github.com/rust-lang/regex"
-description = """
-An implementation of regular expressions for Rust. This implementation uses
-finite automata and guarantees linear time matching on all inputs.
-"""
-
-[dependencies]
-# For very fast prefix literal matching.
-aho-corasick = "0.6.0"
-# For skipping along search text quickly when a leading byte is known.
-memchr = "1.0.0"
-# For managing regex caches quickly across multiple threads.
-thread_local = "0.3.2"
-# For parsing regular expressions.
-regex-syntax = { path = "regex-syntax", version = "0.4.0" }
-# For accelerating text search.
-simd = { version = "0.1.1", optional = true }
-# For compiling UTF-8 decoding into automata.
-utf8-ranges = "1.0.0"
-
-[dev-dependencies]
-# For examples.
-lazy_static = "0.2.2"
-# For property based tests.
-quickcheck = { version = "0.4.1", default-features = false }
-# For generating random test data.
-rand = "0.3.15"
-
-[features]
-# Enable to use the unstable pattern traits defined in std.
-pattern = []
-# Enable to use simd acceleration.
-simd-accel = ["simd"]
-
-[lib]
-# There are no benchmarks in the library code itself
-bench = false
-
-# Run the test suite on the default behavior of Regex::new.
-# This includes a mish mash of NFAs and DFAs, which are chosen automatically
-# based on the regex. We test both of the NFA implementations by forcing their
-# usage with the test definitions below. (We can't test the DFA implementations
-# in the same way since they can't be used for every regex tested.)
-[[test]]
-path = "tests/test_default.rs"
-name = "default"
-
-# The same as the default tests, but run on bytes::Regex.
-[[test]]
-path = "tests/test_default_bytes.rs"
-name = "default-bytes"
-
-# Run the test suite on the NFA algorithm over Unicode codepoints.
-[[test]]
-path = "tests/test_nfa.rs"
-name = "nfa"
-
-# Run the test suite on the NFA algorithm over bytes that match UTF-8 only.
-[[test]]
-path = "tests/test_nfa_utf8bytes.rs"
-name = "nfa-utf8bytes"
-
-# Run the test suite on the NFA algorithm over arbitrary bytes.
-[[test]]
-path = "tests/test_nfa_bytes.rs"
-name = "nfa-bytes"
-
-# Run the test suite on the backtracking engine over Unicode codepoints.
-[[test]]
-path = "tests/test_backtrack.rs"
-name = "backtrack"
-
-# Run the test suite on the backtracking engine over bytes that match UTF-8
-# only.
-[[test]]
-path = "tests/test_backtrack_utf8bytes.rs"
-name = "backtrack-utf8bytes"
-
-# Run the test suite on the backtracking engine over arbitrary bytes.
-[[test]]
-path = "tests/test_backtrack_bytes.rs"
-name = "backtrack-bytes"
-
-[profile.test]
-debug = true
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/HACKING.md
+++ /dev/null
@@ -1,315 +0,0 @@
-Your friendly guide to hacking and navigating the regex library.
-
-This guide assumes familiarity with Rust and Cargo, and at least a perusal of
-the user facing documentation for this crate.
-
-If you're looking for background on the implementation in this library, then
-you can do no better than Russ Cox's article series on implementing regular
-expressions using finite automata: https://swtch.com/~rsc/regexp/
-
-
-## Architecture overview
-
-As you probably already know, this library executes regular expressions using
-finite automata. In particular, a design goal is to make searching linear
-with respect to both the regular expression and the text being searched.
-Meeting that design goal on its own is not so hard and can be done with an
-implementation of the Pike VM (similar to Thompson's construction, but supports
-capturing groups), as described in: https://swtch.com/~rsc/regexp/regexp2.html
---- This library contains such an implementation in src/pikevm.rs.
-
-Making it fast is harder. One of the key problems with the Pike VM is that it
-can be in more than one state at any point in time, and must shuffle capture
-positions between them. The Pike VM also spends a lot of time following the
-same epsilon transitions over and over again. We can employ one trick to
-speed up the Pike VM: extract one or more literal prefixes from the regular
-expression and execute specialized code to quickly find matches of those
-prefixes in the search text. The Pike VM can then be avoided for most the
-search, and instead only executed when a prefix is found. The code to find
-prefixes is in the regex-syntax crate (in this repository). The code to search
-for literals is in src/literals.rs. When more than one literal prefix is found,
-we fall back to an Aho-Corasick DFA using the aho-corasick crate. For one
-literal, we use a variant of the Boyer-Moore algorithm. Both Aho-Corasick and
-Boyer-Moore use `memchr` when appropriate. The Boyer-Moore variant in this
-library also uses elementary frequency analysis to choose the right byte to run
-`memchr` with.
-
-Of course, detecting prefix literals can only take us so far. Not all regular
-expressions have literal prefixes. To remedy this, we try another approach
-to executing the Pike VM: backtracking, whose implementation can be found in
-src/backtrack.rs. One reason why backtracking can be faster is that it avoids
-excessive shuffling of capture groups. Of course, backtracking is susceptible
-to exponential runtimes, so we keep track of every state we've visited to make
-sure we never visit it again. This guarantees linear time execution, but we
-pay for it with the memory required to track visited states. Because of the
-memory requirement, we only use this engine on small search strings *and* small
-regular expressions.
-
-Lastly, the real workhorse of this library is the "lazy" DFA in src/dfa.rs.
-It is distinct from the Pike VM in that the DFA is explicitly represented in
-memory and is only ever in one state at a time. It is said to be "lazy" because
-the DFA is computed as text is searched, where each byte in the search text
-results in at most one new DFA state. It is made fast by caching states. DFAs
-are susceptible to exponential state blow up (where the worst case is computing
-a new state for every input byte, regardless of what's in the state cache). To
-avoid using a lot of memory, the lazy DFA uses a bounded cache. Once the cache
-is full, it is wiped and state computation starts over again. If the cache is
-wiped too frequently, then the DFA gives up and searching falls back to one of
-the aforementioned algorithms.
-
-All of the above matching engines expose precisely the same matching semantics.
-This is indeed tested. (See the section below about testing.)
-
-The following sub-sections describe the rest of the library and how each of the
-matching engines are actually used.
-
-### Parsing
-
-Regular expressions are parsed using the regex-syntax crate, which is
-maintained in this repository. The regex-syntax crate defines an abstract
-syntax and provides very detailed error messages when a parse error is
-encountered. Parsing is done in a separate crate so that others may benefit
-from its existence, and because it is relatively divorced from the rest of the
-regex library.
-
-The regex-syntax crate also provides sophisticated support for extracting
-prefix and suffix literals from regular expressions.
-
-### Compilation
-
-The compiler is in src/compile.rs. The input to the compiler is some abstract
-syntax for a regular expression and the output is a sequence of opcodes that
-matching engines use to execute a search. (One can think of matching engines as
-mini virtual machines.) The sequence of opcodes is a particular encoding of a
-non-deterministic finite automaton. In particular, the opcodes explicitly rely
-on epsilon transitions.
-
-Consider a simple regular expression like `a|b`. Its compiled form looks like
-this:
-
-    000 Save(0)
-    001 Split(2, 3)
-    002 'a' (goto: 4)
-    003 'b'
-    004 Save(1)
-    005 Match
-
-The first column is the instruction pointer and the second column is the
-instruction. Save instructions indicate that the current position in the input
-should be stored in a captured location. Split instructions represent a binary
-branch in the program (i.e., epsilon transitions). The instructions `'a'` and
-`'b'` indicate that the literal bytes `'a'` or `'b'` should match.
-
-In older versions of this library, the compilation looked like this:
-
-    000 Save(0)
-    001 Split(2, 3)
-    002 'a'
-    003 Jump(5)
-    004 'b'
-    005 Save(1)
-    006 Match
-
-In particular, empty instructions that merely served to move execution from one
-point in the program to another were removed. Instead, every instruction has a
-`goto` pointer embedded into it. This resulted in a small performance boost for
-the Pike VM, because it was one fewer epsilon transition that it had to follow.
-
-There exist more instructions and they are defined and documented in
-src/prog.rs.
-
-Compilation has several knobs and a few unfortunately complicated invariants.
-Namely, the output of compilation can be one of two types of programs: a
-program that executes on Unicode scalar values or a program that executes
-on raw bytes. In the former case, the matching engine is responsible for
-performing UTF-8 decoding and executing instructions using Unicode codepoints.
-In the latter case, the program handles UTF-8 decoding implicitly, so that the
-matching engine can execute on raw bytes. All matching engines can execute
-either Unicode or byte based programs except for the lazy DFA, which requires
-byte based programs. In general, both representations were kept because (1) the
-lazy DFA requires byte based programs so that states can be encoded in a memory
-efficient manner and (2) the Pike VM benefits greatly from inlining Unicode
-character classes into fewer instructions as it results in fewer epsilon
-transitions.
-
-N.B. UTF-8 decoding is built into the compiled program by making use of the
-utf8-ranges crate. The compiler in this library factors out common suffixes to
-reduce the size of huge character classes (e.g., `\pL`).
-
-A regrettable consequence of this split in instruction sets is we generally
-need to compile two programs; one for NFA execution and one for the lazy DFA.
-
-In fact, it is worse than that: the lazy DFA is not capable of finding the
-starting location of a match in a single scan, and must instead execute a
-backwards search after finding the end location. To execute a backwards search,
-we must have compiled the regular expression *in reverse*.
-
-This means that every compilation of a regular expression generally results in
-three distinct programs. It would be possible to lazily compile the Unicode
-program, since it is never needed if (1) the regular expression uses no word
-boundary assertions and (2) the caller never asks for sub-capture locations.
-
-### Execution
-
-At the time of writing, there are four matching engines in this library:
-
-1. The Pike VM (supports captures).
-2. Bounded backtracking (supports captures).
-3. Literal substring or multi-substring search.
-4. Lazy DFA (no support for Unicode word boundary assertions).
-
-Only the first two matching engines are capable of executing every regular
-expression program. They also happen to be the slowest, which means we need
-some logic that (1) knows various facts about the regular expression and (2)
-knows what the caller wants. Using this information, we can determine which
-engine (or engines) to use.
-
-The logic for choosing which engine to execute is in src/exec.rs and is
-documented on the Exec type. Exec values contain regular expression Programs
-(defined in src/prog.rs), which contain all the necessary tidbits for actually
-executing a regular expression on search text.
-
-For the most part, the execution logic is straight-forward and follows the
-limitations of each engine described above pretty faithfully. The hairiest
-part of src/exec.rs by far is the execution of the lazy DFA, since it requires
-a forwards and backwards search, and then falls back to either the Pike VM or
-backtracking if the caller requested capture locations.
-
-The Exec type also contains mutable scratch space for each type of matching
-engine. This scratch space is used during search (for example, for the lazy
-DFA, it contains compiled states that are reused on subsequent searches).
-
-### Programs
-
-A regular expression program is essentially a sequence of opcodes produced by
-the compiler plus various facts about the regular expression (such as whether
-it is anchored, its capture names, etc.).
-
-### The regex! macro (or why `regex::internal` exists)
-
-The `regex!` macro is defined in the `regex_macros` crate as a compiler plugin,
-which is maintained in this repository. The `regex!` macro compiles a regular
-expression at compile time into specialized Rust code.
-
-The `regex!` macro was written when this library was first conceived and
-unfortunately hasn't changed much since then. In particular, it encodes the
-entire Pike VM into stack allocated space (no heap allocation is done). When
-`regex!` was first written, this provided a substantial speed boost over
-so-called "dynamic" regexes compiled at runtime, and in particular had much
-lower overhead per match. This was because the only matching engine at the
-time was the Pike VM. The addition of other matching engines has inverted
-the relationship; the `regex!` macro is almost never faster than the dynamic
-variant. (In fact, it is typically substantially slower.)
-
-In order to build the `regex!` macro this way, it must have access to some
-internals of the regex library, which is in a distinct crate. (Compiler plugins
-must be part of a distinct crate.) Namely, it must be able to compile a regular
-expression and access its opcodes. The necessary internals are exported as part
-of the top-level `internal` module in the regex library, but is hidden from
-public documentation. In order to present a uniform API between programs build
-by the `regex!` macro and their dynamic analoges, the `Regex` type is an enum
-whose variants are hidden from public documentation.
-
-In the future, the `regex!` macro should probably work more like Ragel, but
-it's not clear how hard this is. In particular, the `regex!` macro should be
-able to support all the features of dynamic regexes, which may be hard to do
-with a Ragel-style implementation approach. (Which somewhat suggests that the
-`regex!` macro may also need to grow conditional execution logic like the
-dynamic variants, which seems rather grotesque.)
-
-
-## Testing
-
-A key aspect of any mature regex library is its test suite. A subset of the
-tests in this library come from Glenn Fowler's AT&T test suite (its online
-presence seems gone at the time of writing). The source of the test suite is
-located in src/testdata. The scripts/regex-match-tests.py takes the test suite
-in src/testdata and generates tests/matches.rs.
-
-There are also many other manually crafted tests and regression tests in
-tests/tests.rs. Some of these tests were taken from RE2.
-
-The biggest source of complexity in the tests is related to answering this
-question: how can we reuse the tests to check all of our matching engines? One
-approach would have been to encode every test into some kind of format (like
-the AT&T test suite) and code generate tests for each matching engine. The
-approach we use in this library is to create a Cargo.toml entry point for each
-matching engine we want to test. The entry points are:
-
-* `tests/test_plugin.rs` - tests the `regex!` macro
-* `tests/test_default.rs` - tests `Regex::new`
-* `tests/test_default_bytes.rs` - tests `bytes::Regex::new`
-* `tests/test_nfa.rs` - tests `Regex::new`, forced to use the NFA
-  algorithm on every regex.
-* `tests/test_nfa_bytes.rs` - tests `Regex::new`, forced to use the NFA
-  algorithm on every regex and use *arbitrary* byte based programs.
-* `tests/test_nfa_utf8bytes.rs` - tests `Regex::new`, forced to use the NFA
-  algorithm on every regex and use *UTF-8* byte based programs.
-* `tests/test_backtrack.rs` - tests `Regex::new`, forced to use
-  backtracking on every regex.
-* `tests/test_backtrack_bytes.rs` - tests `Regex::new`, forced to use
-  backtracking on every regex and use *arbitrary* byte based programs.
-* `tests/test_backtrack_utf8bytes.rs` - tests `Regex::new`, forced to use
-  backtracking on every regex and use *UTF-8* byte based programs.
-
-The lazy DFA and pure literal engines are absent from this list because
-they cannot be used on every regular expression. Instead, we rely on
-`tests/test_dynamic.rs` to test the lazy DFA and literal engines when possible.
-
-Since the tests are repeated several times, and because `cargo test` runs all
-entry points, it can take a while to compile everything. To reduce compile
-times slightly, try using `cargo test --test default`, which will only use the
-`tests/test_default.rs` entry point.
-
-N.B. To run tests for the `regex!` macro, use:
-
-    cargo test --manifest-path regex_macros/Cargo.toml
-
-
-## Benchmarking
-
-The benchmarking in this crate is made up of many micro-benchmarks. Currently,
-there are two primary sets of benchmarks: the benchmarks that were adopted
-at this library's inception (in `benches/src/misc.rs`) and a newer set of
-benchmarks meant to test various optimizations. Specifically, the latter set
-contain some analysis and are in `benches/src/sherlock.rs`. Also, the latter
-set are all executed on the same lengthy input whereas the former benchmarks
-are executed on strings of varying length.
-
-There is also a smattering of benchmarks for parsing and compilation.
-
-Benchmarks are in a separate crate so that its dependencies can be managed
-separately from the main regex crate.
-
-Benchmarking follows a similarly wonky setup as tests. There are multiple entry
-points:
-
-* `bench_rust_plugin.rs` - benchmarks the `regex!` macro
-* `bench_rust.rs` - benchmarks `Regex::new`
-* `bench_rust_bytes.rs` benchmarks `bytes::Regex::new`
-* `bench_pcre.rs` - benchmarks PCRE
-* `bench_onig.rs` - benchmarks Oniguruma
-
-The PCRE and Oniguruma benchmarks exist as a comparison point to a mature
-regular expression library. In general, this regex library compares favorably
-(there are even a few benchmarks that PCRE simply runs too slowly on or
-outright can't execute at all). I would love to add other regular expression
-library benchmarks (especially RE2).
-
-If you're hacking on one of the matching engines and just want to see
-benchmarks, then all you need to run is:
-
-    $ ./run-bench rust
-
-If you want to compare your results with older benchmarks, then try:
-
-    $ ./run-bench rust | tee old
-    $ ... make it faster
-    $ ./run-bench rust | tee new
-    $ cargo-benchcmp old new --improvements
-
-The `cargo-benchcmp` utility is available here:
-https://github.com/BurntSushi/cargo-benchcmp
-
-The `run-bench` utility can run benchmarks for PCRE and Oniguruma too. See
-`./run-bench --help`.
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/PERFORMANCE.md
+++ /dev/null
@@ -1,279 +0,0 @@
-Your friendly guide to understanding the performance characteristics of this
-crate.
-
-This guide assumes some familiarity with the public API of this crate, which
-can be found here: http://doc.rust-lang.org/regex/regex/index.html
-
-## Theory vs. Practice
-
-One of the design goals of this crate is to provide worst case linear time
-behavior with respect to the text searched using finite state automata. This
-means that, *in theory*, the performance of this crate is much better than most
-regex implementations, which typically use backtracking which has worst case
-exponential time.
-
-For example, try opening a Python interpreter and typing this:
-
-    >>> import re
-    >>> re.search('(a*)*c', 'a' * 30).span()
-
-I'll wait.
-
-At some point, you'll figure out that it won't terminate any time soon. ^C it.
-
-The promise of this crate is that *this pathological behavior can't happen*.
-
-With that said, just because we have protected ourselves against worst case
-exponential behavior doesn't mean we are immune from large constant factors
-or places where the current regex engine isn't quite optimal. This guide will
-detail those cases and provide guidance on how to avoid them, among other
-bits of general advice.
-
-## Thou Shalt Not Compile Regular Expressions In A Loop
-
-**Advice**: Use `lazy_static` to amortize the cost of `Regex` compilation.
-
-Don't do it unless you really don't mind paying for it. Compiling a regular
-expression in this crate is quite expensive. It is conceivable that it may get
-faster some day, but I wouldn't hold out hope for, say, an order of magnitude
-improvement. In particular, compilation can take any where from a few dozen
-microseconds to a few dozen milliseconds. Yes, milliseconds. Unicode character
-classes, in particular, have the largest impact on compilation performance. At
-the time of writing, for example, `\pL{100}` takes around 44ms to compile. This
-is because `\pL` corresponds to every letter in Unicode and compilation must
-turn it into a proper automaton that decodes a subset of UTF-8 which
-corresponds to those letters. Compilation also spends some cycles shrinking the
-size of the automaton.
-
-This means that in order to realize efficient regex matching, one must
-*amortize the cost of compilation*. Trivially, if a call to `is_match` is
-inside a loop, then make sure your call to `Regex::new` is *outside* that loop.
-
-In many programming languages, regular expressions can be conveniently defined
-and compiled in a global scope, and code can reach out and use them as if
-they were global static variables. In Rust, there is really no concept of
-life-before-main, and therefore, one cannot utter this:
-
-    static MY_REGEX: Regex = Regex::new("...").unwrap();
-
-Unfortunately, this would seem to imply that one must pass `Regex` objects
-around to everywhere they are used, which can be especially painful depending
-on how your program is structured. Thankfully, the
-[`lazy_static`](https://crates.io/crates/lazy_static)
-crate provides an answer that works well:
-
-    #[macro_use] extern crate lazy_static;
-    extern crate regex;
-
-    use regex::Regex;
-
-    fn some_helper_function(text: &str) -> bool {
-        lazy_static! {
-            static ref MY_REGEX: Regex = Regex::new("...").unwrap();
-        }
-        MY_REGEX.is_match(text)
-    }
-
-In other words, the `lazy_static!` macro enables us to define a `Regex` *as if*
-it were a global static value. What is actually happening under the covers is
-that the code inside the macro (i.e., `Regex::new(...)`) is run on *first use*
-of `MY_REGEX` via a `Deref` impl. The implementation is admittedly magical, but
-it's self contained and everything works exactly as you expect. In particular,
-`MY_REGEX` can be used from multiple threads without wrapping it in an `Arc` or
-a `Mutex`. On that note...
-
-## Using a regex from multiple threads
-
-**Advice**: The performance impact from using a `Regex` from multiple threads
-is likely negligible. If necessary, clone the `Regex` so that each thread gets
-its own copy. Cloning a regex does not incur any additional memory overhead
-than what would be used by using a `Regex` from multiple threads
-simultaneously. *Its only cost is ergonomics.*
-
-It is supported and encouraged to define your regexes using `lazy_static!` as
-if they were global static values, and then use them to search text from
-multiple threads simultaneously.
-
-One might imagine that this is possible because a `Regex` represents a
-*compiled* program, so that any allocation or mutation is already done, and is
-therefore read-only. Unfortunately, this is not true. Each type of search
-strategy in this crate requires some kind of mutable scratch space to use
-*during search*. For example, when executing a DFA, its states are computed
-lazily and reused on subsequent searches. Those states go into that mutable
-scratch space.
-
-The mutable scratch space is an implementation detail, and in general, its
-mutation should not be observable from users of this crate. Therefore, it uses
-interior mutability. This implies that `Regex` can either only be used from one
-thread, or it must do some sort of synchronization. Either choice is
-reasonable, but this crate chooses the latter, in particular because it is
-ergonomic and makes use with `lazy_static!` straight forward.
-
-Synchronization implies *some* amount of overhead. When a `Regex` is used from
-a single thread, this overhead is negligible. When a `Regex` is used from
-multiple threads simultaneously, it is possible for the overhead of
-synchronization from contention to impact performance. The specific cases where
-contention may happen is if you are calling any of these methods repeatedly
-from multiple threads simultaneously:
-
-* shortest_match
-* is_match
-* find
-* captures
-
-In particular, every invocation of one of these methods must synchronize with
-other threads to retrieve its mutable scratch space before searching can start.
-If, however, you are using one of these methods:
-
-* find_iter
-* captures_iter
-
-Then you may not suffer from contention since the cost of synchronization is
-amortized on *construction of the iterator*. That is, the mutable scratch space
-is obtained when the iterator is created and retained throughout its lifetime.
-
-## Only ask for what you need
-
-**Advice**: Prefer in this order: `is_match`, `find`, `captures`.
-
-There are three primary search methods on a `Regex`:
-
-* is_match
-* find
-* captures
-
-In general, these are ordered from fastest to slowest.
-
-`is_match` is fastest because it doesn't actually need to find the start or the
-end of the leftmost-first match. It can quit immediately after it knows there
-is a match. For example, given the regex `a+` and the haystack, `aaaaa`, the
-search will quit after examing the first byte.
-
-In constrast, `find` must return both the start and end location of the
-leftmost-first match. It can use the DFA matcher for this, but must run it
-forwards once to find the end of the match *and then run it backwards* to find
-the start of the match. The two scans and the cost of finding the real end of
-the leftmost-first match make this more expensive than `is_match`.
-
-`captures` is the most expensive of them all because it must do what `find`
-does, and then run either the bounded backtracker or the Pike VM to fill in the
-capture group locations. Both of these are simulations of an NFA, which must
-spend a lot of time shuffling states around. The DFA limits the performance hit
-somewhat by restricting the amount of text that must be searched via an NFA
-simulation.
-
-One other method not mentioned is `shortest_match`. This method has precisely
-the same performance characteristics as `is_match`, except it will return the
-end location of when it discovered a match. For example, given the regex `a+`
-and the haystack `aaaaa`, `shortest_match` may return `1` as opposed to `5`,
-the latter of which being the correct end location of the leftmost-first match.
-
-## Literals in your regex may make it faster
-
-**Advice**: Literals can reduce the work that the regex engine needs to do. Use
-them if you can, especially as prefixes.
-
-In particular, if your regex starts with a prefix literal, the prefix is
-quickly searched before entering the (much slower) regex engine. For example,
-given the regex `foo\w+`, the literal `foo` will be searched for using
-Boyer-Moore. If there's no match, then no regex engine is ever used. Only when
-there's a match is the regex engine invoked at the location of the match, which
-effectively permits the regex engine to skip large portions of a haystack.
-If a regex is comprised entirely of literals (possibly more than one), then
-it's possible that the regex engine can be avoided entirely even when there's a
-match.
-
-When one literal is found, Boyer-Moore is used. When multiple literals are
-found, then an optimized version of Aho-Corasick is used.
-
-This optimization is in particular extended quite a bit in this crate. Here are
-a few examples of regexes that get literal prefixes detected:
-
-* `(foo|bar)` detects `foo` and `bar`
-* `(a|b)c` detects `ac` and `bc`
-* `[ab]foo[yz]` detects `afooy`, `afooz`, `bfooy` and `bfooz`
-* `a?b` detects `a` and `b`
-* `a*b` detects `a` and `b`
-* `(ab){3,6}` detects `ababab`
-
-Literals in anchored regexes can also be used for detecting non-matches very
-quickly. For example, `^foo\w+` and `\w+foo$` may be able to detect a non-match
-just by examing the first (or last) three bytes of the haystack.
-
-## Unicode word boundaries may prevent the DFA from being used
-
-**Advice**: In most cases, `\b` should work well. If not, use `(?-u:\b)`
-instead of `\b` if you care about consistent performance more than correctness.
-
-It's a sad state of the current implementation. At the moment, the DFA will try
-to interpret Unicode word boundaries as if they were ASCII word boundaries.
-If the DFA comes across any non-ASCII byte, it will quit and fall back to an
-alternative matching engine that can handle Unicode word boundaries correctly.
-The alternate matching engine is generally quite a bit slower (perhaps by an
-order of magnitude). If necessary, this can be ameliorated in two ways.
-
-The first way is to add some number of literal prefixes to your regular
-expression. Even though the DFA may not be used, specialized routines will
-still kick in to find prefix literals quickly, which limits how much work the
-NFA simulation will need to do.
-
-The second way is to give up on Unicode and use an ASCII word boundary instead.
-One can use an ASCII word boundary by disabling Unicode support. That is,
-instead of using `\b`, use `(?-u:\b)`.  Namely, given the regex `\b.+\b`, it
-can be transformed into a regex that uses the DFA with `(?-u:\b).+(?-u:\b)`. It
-is important to limit the scope of disabling the `u` flag, since it might lead
-to a syntax error if the regex could match arbitrary bytes. For example, if one
-wrote `(?-u)\b.+\b`, then a syntax error would be returned because `.` matches
-any *byte* when the Unicode flag is disabled.
-
-The second way isn't appreciably different than just using a Unicode word
-boundary in the first place, since the DFA will speculatively interpret it as
-an ASCII word boundary anyway. The key difference is that if an ASCII word
-boundary is used explicitly, then the DFA won't quit in the presence of
-non-ASCII UTF-8 bytes. This results in giving up correctness in exchange for
-more consistent performance.
-
-N.B. When using `bytes::Regex`, Unicode support is disabled by default, so one
-can simply write `\b` to get an ASCII word boundary.
-
-## Excessive counting can lead to exponential state blow up in the DFA
-
-**Advice**: Don't write regexes that cause DFA state blow up if you care about
-match performance.
-
-Wait, didn't I say that this crate guards against exponential worst cases?
-Well, it turns out that the process of converting an NFA to a DFA can lead to
-an exponential blow up in the number of states. This crate specifically guards
-against exponential blow up by doing two things:
-
-1. The DFA is computed lazily. That is, a state in the DFA only exists in
-   memory if it is visited. In particular, the lazy DFA guarantees that *at
-   most* one state is created for every byte of input. This, on its own,
-   guarantees linear time complexity.
-2. Of course, creating a new state for *every* byte of input means that search
-   will go incredibly slow because of very large constant factors. On top of
-   that, creating a state for every byte in a large haystack could result in
-   exorbitant memory usage. To ameliorate this, the DFA bounds the number of
-   states it can store. Once it reaches its limit, it flushes its cache. This
-   prevents reuse of states that it already computed. If the cache is flushed
-   too frequently, then the DFA will give up and execution will fall back to
-   one of the NFA simulations.
-
-In effect, this crate will detect exponential state blow up and fall back to
-a search routine with fixed memory requirements. This does, however, mean that
-searching will be much slower than one might expect. Regexes that rely on
-counting in particular are strong aggravators of this behavior. For example,
-matching `[01]*1[01]{20}$` against a random sequence of `0`s and `1`s.
-
-In the future, it may be possible to increase the bound that the DFA uses,
-which would allow the caller to choose how much memory they're willing to
-spend.
-
-## Resist the temptation to "optimize" regexes
-
-**Advice**: This ain't a backtracking engine.
-
-An entire book was written on how to optimize Perl-style regular expressions.
-Most of those techniques are not applicable for this library. For example,
-there is no problem with using non-greedy matching or having lots of
-alternations in your regex.
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/README.md
+++ /dev/null
@@ -1,240 +0,0 @@
-regex
-=====
-A Rust library for parsing, compiling, and executing regular expressions. Its
-syntax is similar to Perl-style regular expressions, but lacks a few features
-like look around and backreferences. In exchange, all searches execute in
-linear time with respect to the size of the regular expression and search text.
-Much of the syntax and implementation is inspired
-by [RE2](https://github.com/google/re2).
-
-[![Build Status](https://travis-ci.org/rust-lang/regex.svg?branch=master)](https://travis-ci.org/rust-lang/regex)
-[![Build status](https://ci.appveyor.com/api/projects/status/github/rust-lang/regex?svg=true)](https://ci.appveyor.com/project/rust-lang-libs/regex)
-[![Coverage Status](https://coveralls.io/repos/github/rust-lang/regex/badge.svg?branch=master)](https://coveralls.io/github/rust-lang/regex?branch=master)
-[![](http://meritbadge.herokuapp.com/regex)](https://crates.io/crates/regex)
-
-### Documentation
-
-[Module documentation with examples](https://doc.rust-lang.org/regex).
-The module documentation also include a comprehensive description of the syntax
-supported.
-
-Documentation with examples for the various matching functions and iterators
-can be found on the
-[`Regex` type](https://doc.rust-lang.org/regex/regex/enum.Regex.html).
-
-### Usage
-
-Add this to your `Cargo.toml`:
-
-```toml
-[dependencies]
-regex = "0.2"
-```
-
-and this to your crate root:
-
-```rust
-extern crate regex;
-```
-
-Here's a simple example that matches a date in YYYY-MM-DD format and prints the
-year, month and day:
-
-```rust
-extern crate regex;
-
-use regex::Regex;
-
-fn main() {
-    let re = Regex::new(r"(?x)
-(?P<year>\d{4})  # the year
--
-(?P<month>\d{2}) # the month
--
-(?P<day>\d{2})   # the day
-").unwrap();
-    let caps = re.captures("2010-03-14").unwrap();
-
-    assert_eq!("2010", caps["year"]);
-    assert_eq!("03", caps["month"]);
-    assert_eq!("14", caps["day"]);
-}
-```
-
-If you have lots of dates in text that you'd like to iterate over, then it's
-easy to adapt the above example with an iterator:
-
-```rust
-extern crate regex;
-
-use regex::Regex;
-
-const TO_SEARCH: &'static str = "
-On 2010-03-14, foo happened. On 2014-10-14, bar happened.
-";
-
-fn main() {
-    let re = Regex::new(r"(\d{4})-(\d{2})-(\d{2})").unwrap();
-
-    for caps in re.captures_iter(TO_SEARCH) {
-        // Note that all of the unwraps are actually OK for this regex
-        // because the only way for the regex to match is if all of the
-        // capture groups match. This is not true in general though!
-        println!("year: {}, month: {}, day: {}",
-                 caps.get(1).unwrap().as_str(),
-                 caps.get(2).unwrap().as_str(),
-                 caps.get(3).unwrap().as_str());
-    }
-}
-```
-
-This example outputs:
-
-```
-year: 2010, month: 03, day: 14
-year: 2014, month: 10, day: 14
-```
-
-### Usage: Avoid compiling the same regex in a loop
-
-It is an anti-pattern to compile the same regular expression in a loop since
-compilation is typically expensive. (It takes anywhere from a few microseconds
-to a few **milliseconds** depending on the size of the regex.) Not only is
-compilation itself expensive, but this also prevents optimizations that reuse
-allocations internally to the matching engines.
-
-In Rust, it can sometimes be a pain to pass regular expressions around if
-they're used from inside a helper function. Instead, we recommend using the
-[`lazy_static`](https://crates.io/crates/lazy_static) crate to ensure that
-regular expressions are compiled exactly once.
-
-For example:
-
-```rust
-#[macro_use] extern crate lazy_static;
-extern crate regex;
-
-use regex::Regex;
-
-fn some_helper_function(text: &str) -> bool {
-    lazy_static! {
-        static ref RE: Regex = Regex::new("...").unwrap();
-    }
-    RE.is_match(text)
-}
-```
-
-Specifically, in this example, the regex will be compiled when it is used for
-the first time. On subsequent uses, it will reuse the previous compilation.
-
-### Usage: match regular expressions on `&[u8]`
-
-The main API of this crate (`regex::Regex`) requires the caller to pass a
-`&str` for searching. In Rust, an `&str` is required to be valid UTF-8, which
-means the main API can't be used for searching arbitrary bytes.
-
-To match on arbitrary bytes, use the `regex::bytes::Regex` API. The API
-is identical to the main API, except that it takes an `&[u8]` to search
-on instead of an `&str`. By default, `.` will match any *byte* using
-`regex::bytes::Regex`, while `.` will match any *UTF-8 encoded Unicode scalar
-value* using the main API.
-
-This example shows how to find all null-terminated strings in a slice of bytes:
-
-```rust
-use regex::bytes::Regex;
-
-let re = Regex::new(r"(?P<cstr>[^\x00]+)\x00").unwrap();
-let text = b"foo\x00bar\x00baz\x00";
-
-// Extract all of the strings without the null terminator from each match.
-// The unwrap is OK here since a match requires the `cstr` capture to match.
-let cstrs: Vec<&[u8]> =
-    re.captures_iter(text)
-      .map(|c| c.name("cstr").unwrap().as_bytes())
-      .collect();
-assert_eq!(vec![&b"foo"[..], &b"bar"[..], &b"baz"[..]], cstrs);
-```
-
-Notice here that the `[^\x00]+` will match any *byte* except for `NUL`. When
-using the main API, `[^\x00]+` would instead match any valid UTF-8 sequence
-except for `NUL`.
-
-### Usage: match multiple regular expressions simultaneously
-
-This demonstrates how to use a `RegexSet` to match multiple (possibly
-overlapping) regular expressions in a single scan of the search text:
-
-```rust
-use regex::RegexSet;
-
-let set = RegexSet::new(&[
-    r"\w+",
-    r"\d+",
-    r"\pL+",
-    r"foo",
-    r"bar",
-    r"barfoo",
-    r"foobar",
-]).unwrap();
-
-// Iterate over and collect all of the matches.
-let matches: Vec<_> = set.matches("foobar").into_iter().collect();
-assert_eq!(matches, vec![0, 2, 3, 4, 6]);
-
-// You can also test whether a particular regex matched:
-let matches = set.matches("foobar");
-assert!(!matches.matched(5));
-assert!(matches.matched(6));
-```
-
-### Usage: `regex!` compiler plugin
-
-**WARNING**: The `regex!` compiler plugin is orders of magnitude slower than
-the normal `Regex::new(...)` usage. You should not use the compiler plugin
-unless you have a very special reason for doing so. The performance difference
-may be the temporary, but the path forward at this point isn't clear.
-
-The `regex!` compiler plugin will compile your regexes at compile time. **This
-only works with a nightly compiler.**
-
-Here is a small example:
-
-```rust
-#![feature(plugin)]
-
-#![plugin(regex_macros)]
-extern crate regex;
-
-fn main() {
-    let re = regex!(r"(\d{4})-(\d{2})-(\d{2})");
-    let caps = re.captures("2010-03-14").unwrap();
-
-    assert_eq!("2010", caps[1]);
-    assert_eq!("03", caps[2]);
-    assert_eq!("14", caps[3]);
-}
-```
-
-Notice that we never `unwrap` the result of `regex!`. This is because your
-*program* won't compile if the regex doesn't compile. (Try `regex!("(")`.)
-
-
-### Usage: a regular expression parser
-
-This repository contains a crate that provides a well tested regular expression
-parser and abstract syntax. It provides no facilities for compilation or
-execution. This may be useful if you're implementing your own regex engine or
-otherwise need to do analysis on the syntax of a regular expression. It is
-otherwise not recommended for general use.
-
-[Documentation for `regex-syntax` with
-examples](https://doc.rust-lang.org/regex/regex_syntax/index.html).
-
-# License
-
-`regex` is primarily distributed under the terms of both the MIT license and
-the Apache License (Version 2.0), with portions covered by various BSD-like
-licenses.
-
-See LICENSE-APACHE, and LICENSE-MIT for details.
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/appveyor.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-environment:
-  matrix:
-  - TARGET: x86_64-pc-windows-msvc
-  - TARGET: i686-pc-windows-msvc
-  - TARGET: i686-pc-windows-gnu
-install:
-  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
-  - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
-  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
-  - SET PATH=%PATH%;C:\MinGW\bin
-  - rustc -V
-  - cargo -V
-
-build: false
-
-test_script:
-  - cargo test --verbose --jobs 4
deleted file mode 100755
--- a/third_party/rust/regex-0.2.1/ci/after_success.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-# This runs only when a commit is pushed to master. It is responsible for
-# updating docs and computing coverage statistics.
-
-set -e
-
-if [ "$TRAVIS_RUST_VERSION" != "nightly" ] || [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "$TRAVIS_BRANCH" != "master" ]; then
-  exit 0
-fi
-
-env
-
-# Build and upload docs.
-echo '<meta http-equiv=refresh content=0;url=regex/index.html>' > target/doc/index.html
-ve=$(mktemp -d)
-virtualenv "$ve"
-"$ve"/bin/pip install --upgrade pip
-"$ve"/bin/pip install ghp-import
-"$ve"/bin/ghp-import -n target/doc
-git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
-
-# Install kcov.
-tmp=$(mktemp -d)
-pushd "$tmp"
-wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
-tar zxf master.tar.gz
-mkdir kcov-master/build
-cd kcov-master/build
-cmake ..
-make
-make install DESTDIR="$tmp"
-popd
-PATH="$tmp/usr/local/bin:$PATH" ./ci/run-kcov --coveralls-id $TRAVIS_JOB_ID
deleted file mode 100755
--- a/third_party/rust/regex-0.2.1/ci/run-kcov
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-
-set -e
-
-tests=(
-  default
-  default_bytes
-  backtrack
-  backtrack_utf8bytes
-  backtrack_bytes
-  nfa
-  nfa_utf8bytes
-  nfa_bytes
-  regex
-)
-tmpdir=$(mktemp -d)
-with_plugin=
-coveralls_id=
-
-while true; do
-  case "$1" in
-    --with-plugin)
-      with_plugin=yes
-      shift
-      ;;
-    --coveralls-id)
-      coveralls_id="$2"
-      shift 2
-      ;;
-    *)
-      break
-      ;;
-  esac
-done
-
-if [ -n "$with_plugin" ]; then
-  cargo test --manifest-path regex_macros/Cargo.toml --no-run --verbose
-  kcov \
-    --verify \
-    --include-pattern '/regex/src/' \
-    "$tmpdir/plugin" \
-    $(ls -t ./regex_macros/target/debug/plugin-* | head -n1)
-fi
-
-cargo test --no-run --verbose --jobs 4
-for t in ${tests[@]}; do
-  kcov \
-    --verify \
-    --include-pattern '/regex/src/' \
-    "$tmpdir/$t" \
-    $(ls -t ./target/debug/"$t"-* | head -n1)
-done
-
-if [ -n "$coveralls_id" ]; then
-  kcov --verify --coveralls-id=$coveralls_id --merge target/cov "$tmpdir"/*
-else
-  kcov --verify --merge target/cov "$tmpdir"/*
-fi
deleted file mode 100755
--- a/third_party/rust/regex-0.2.1/ci/run-shootout-test
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-set -e
-
-cargo build --example shootout-regex-dna
-diff \
-  ./examples/regexdna-output.txt \
-  <(./target/debug/examples/shootout-regex-dna < ./examples/regexdna-input.txt)
-
-cargo build --example shootout-regex-dna-single
-diff \
-  ./examples/regexdna-output.txt \
-  <(./target/debug/examples/shootout-regex-dna-single < ./examples/regexdna-input.txt)
-
-cargo build --example shootout-regex-dna-cheat
-diff \
-  ./examples/regexdna-output.txt \
-  <(./target/debug/examples/shootout-regex-dna-cheat < ./examples/regexdna-input.txt)
deleted file mode 100755
--- a/third_party/rust/regex-0.2.1/ci/script.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-# This is the main CI script for testing the regex crate and its sub-crates.
-
-set -e
-
-# Builds the regex crate and runs tests.
-cargo build --verbose
-cargo doc --verbose
-if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
-  cargo build --verbose --manifest-path regex-debug/Cargo.toml
-  RUSTFLAGS="-C target-feature=+ssse3" cargo test --verbose --features 'simd-accel pattern' --jobs 4
-else
-  cargo test --verbose --jobs 4
-fi
-
-# Run a test that confirms the shootout benchmarks are correct.
-ci/run-shootout-test
-
-# Run tests on regex-syntax crate.
-cargo test --verbose --manifest-path regex-syntax/Cargo.toml
-cargo doc --verbose --manifest-path regex-syntax/Cargo.toml
-
-# Run tests on regex-capi crate.
-cargo build --verbose --manifest-path regex-capi/Cargo.toml
-(cd regex-capi/ctest && ./compile && LD_LIBRARY_PATH=../target/debug ./test)
-(cd regex-capi/examples && ./compile && LD_LIBRARY_PATH=../target/debug ./iter)
-
-# Make sure benchmarks compile. Don't run them though because they take a
-# very long time.
-if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
-  for x in rust rust-bytes pcre1 onig; do
-    (cd bench && ./run $x --no-run)
-  done
-fi
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/examples/regexdna-input.txt
+++ /dev/null
@@ -1,1671 +0,0 @@
->ONE Homo sapiens alu
-GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGA
-TCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACT
-AAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAG
-GCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCG
-CCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGT
-GGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCA
-GGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAA
-TTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAG
-AATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCA
-GCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGT
-AATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACC
-AGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTG
-GTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACC
-CGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAG
-AGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTT
-TGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACA
-TGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCT
-GTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGG
-TTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGT
-CTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGG
-CGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCG
-TCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTA
-CTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCG
-AGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCG
-GGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACC
-TGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAA
-TACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGA
-GGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACT
-GCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTC
-ACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGT
-TCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGC
-CGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCG
-CTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTG
-GGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCC
-CAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCT
-GGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGC
-GCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGA
-GGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGA
-GACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGA
-GGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTG
-AAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAAT
-CCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCA
-GTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAA
-AAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGC
-GGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCT
-ACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGG
-GAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATC
-GCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGC
-GGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGG
-TCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAA
-AAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAG
-GAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACT
-CCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCC
-TGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAG
-ACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGC
-GTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGA
-ACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGA
-CAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCA
-CTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCA
-ACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCG
-CCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGG
-AGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTC
-CGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCG
-AGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACC
-CCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAG
-CTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAG
-CCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGG
-CCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATC
-ACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAA
-AAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGC
-TGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCC
-ACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGG
-CTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGG
-AGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATT
-AGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAA
-TCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGC
-CTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAA
-TCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAG
-CCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGT
-GGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCG
-GGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAG
-CGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTG
-GGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATG
-GTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGT
-AATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTT
-GCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCT
-CAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCG
-GGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTC
-TCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACT
-CGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAG
-ATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGG
-CGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTG
-AGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATA
-CAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGG
-CAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGC
-ACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCAC
-GCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTC
-GAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCG
-GGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCT
-TGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGG
-CGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCA
-GCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGG
-CCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGC
-GCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGG
-CGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGA
-CTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGG
-CCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAA
-ACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCC
-CAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGT
-GAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAA
-AGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGG
-ATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTAC
-TAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGA
-GGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGC
-GCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGG
-TGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTC
-AGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAA
-ATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGA
-GAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC
-AGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTG
-TAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGAC
-CAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGT
-GGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAAC
-CCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACA
-GAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACT
-TTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAAC
-ATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCC
-TGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAG
-GTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCG
-TCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAG
-GCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCC
-GTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCT
-ACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCC
-GAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCC
-GGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCAC
-CTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAA
-ATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTG
-AGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCAC
-TGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCT
-CACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAG
-TTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAG
-CCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATC
-GCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCT
-GGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATC
-CCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCC
-TGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGG
-CGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG
-AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCG
-AGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGG
-AGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGT
-GAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAA
-TCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGC
-AGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCA
-AAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGG
-CGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTC
-TACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCG
-GGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGAT
-CGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCG
-CGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAG
-GTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACA
-AAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCA
-GGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCAC
-TCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGC
-CTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGA
-GACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGG
-CGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTG
-AACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCG
-ACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGC
-ACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCC
-AACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGC
-GCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCG
-GAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACT
-CCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCC
-GAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAAC
-CCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA
-GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGA
-GCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAG
-GCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGAT
-CACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTA
-AAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGG
-CTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGC
-CACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTG
-GCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAG
-GAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAAT
-TAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGA
-ATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAG
-CCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTA
-ATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCA
-GCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGG
-TGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCC
-GGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGA
-GCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTT
-GGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACAT
-GGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTG
-TAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGT
-TGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTC
-TCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGC
-GGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGT
-CTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTAC
-TCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGA
-GATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGG
-GCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCT
-GAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT
-ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAG
-GCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTG
-CACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCA
-CGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTT
-CGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCC
-GGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGC
-TTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGG
-GCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCC
-AGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTG
-GCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCG
-CGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAG
-GCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAG
-ACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAG
-GCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGA
-AACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATC
-CCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAG
-TGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAA
-AAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCG
-GATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTA
-CTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGG
-AGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCG
-CGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCG
-GTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGT
-CAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAA
-AATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGG
-AGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTC
-CAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCT
-GTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA
-CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCG
-TGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAA
-CCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGAC
-AGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCAC
-TTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAA
-CATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGC
-CTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGA
-GGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCC
-GTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGA
-GGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCC
-CGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGC
-TACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGC
-CGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGC
-CGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCA
-CCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAA
-AATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCT
-GAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCA
-CTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGC
-TCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGA
-GTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTA
-GCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAAT
-CGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCC
-TGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAAT
-CCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGC
-CTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTG
-GCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGG
-GAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGC
-GAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG
-GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGG
-TGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTA
-ATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTG
-CAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTC
-AAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGG
-GCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCT
-CTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTC
-GGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGA
-TCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGC
-GCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGA
-GGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATAC
-AAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGC
-AGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCA
-CTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACG
-CCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCG
-AGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGG
-GCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTT
-GAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGC
-GACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAG
-CACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGC
-CAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCG
-CGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGC
-GGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGAC
-TCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGC
-CGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAA
-CCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCC
-AGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTG
-AGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA
-GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGA
-TCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACT
-AAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAG
-GCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCG
-CCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGT
-GGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCA
-GGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAA
-TTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAG
-AATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCA
-GCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGT
-AATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACC
-AGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTG
-GTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACC
-CGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAG
-AGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTT
-TGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACA
-TGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCT
-GTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGG
-TTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGT
-CTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGG
-CGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCG
-TCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTA
-CTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCG
-AGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCG
-GGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACC
-TGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAA
-TACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGA
-GGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACT
-GCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTC
-ACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGT
-TCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGC
-CGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCG
-CTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTG
-GGCGACAGAGCGAGACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCC
-CAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCT
-GGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGC
-GCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGA
-GGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGA
-GACTCCGTCTCAAAAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGA
-GGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTG
-AAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAAT
-CCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCA
-GTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAA
-AAAGGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGC
-GGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCT
-ACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGG
-GAGGCTGAGGCAGGAGAATC
->TWO IUB ambiguity codes
-cttBtatcatatgctaKggNcataaaSatgtaaaDcDRtBggDtctttataattcBgtcg
-tactDtDagcctatttSVHtHttKtgtHMaSattgWaHKHttttagacatWatgtRgaaa
-NtactMcSMtYtcMgRtacttctWBacgaaatatagScDtttgaagacacatagtVgYgt
-cattHWtMMWcStgttaggKtSgaYaaccWStcgBttgcgaMttBYatcWtgacaYcaga
-gtaBDtRacttttcWatMttDBcatWtatcttactaBgaYtcttgttttttttYaaScYa
-HgtgttNtSatcMtcVaaaStccRcctDaataataStcYtRDSaMtDttgttSagtRRca
-tttHatSttMtWgtcgtatSSagactYaaattcaMtWatttaSgYttaRgKaRtccactt
-tattRggaMcDaWaWagttttgacatgttctacaaaRaatataataaMttcgDacgaSSt
-acaStYRctVaNMtMgtaggcKatcttttattaaaaagVWaHKYagtttttatttaacct
-tacgtVtcVaattVMBcttaMtttaStgacttagattWWacVtgWYagWVRctDattBYt
-gtttaagaagattattgacVatMaacattVctgtBSgaVtgWWggaKHaatKWcBScSWa
-accRVacacaaactaccScattRatatKVtactatatttHttaagtttSKtRtacaaagt
-RDttcaaaaWgcacatWaDgtDKacgaacaattacaRNWaatHtttStgttattaaMtgt
-tgDcgtMgcatBtgcttcgcgaDWgagctgcgaggggVtaaScNatttacttaatgacag
-cccccacatYScaMgtaggtYaNgttctgaMaacNaMRaacaaacaKctacatagYWctg
-ttWaaataaaataRattagHacacaagcgKatacBttRttaagtatttccgatctHSaat
-actcNttMaagtattMtgRtgaMgcataatHcMtaBSaRattagttgatHtMttaaKagg
-YtaaBataSaVatactWtataVWgKgttaaaacagtgcgRatatacatVtHRtVYataSa
-KtWaStVcNKHKttactatccctcatgWHatWaRcttactaggatctataDtDHBttata
-aaaHgtacVtagaYttYaKcctattcttcttaataNDaaggaaaDYgcggctaaWSctBa
-aNtgctggMBaKctaMVKagBaactaWaDaMaccYVtNtaHtVWtKgRtcaaNtYaNacg
-gtttNattgVtttctgtBaWgtaattcaagtcaVWtactNggattctttaYtaaagccgc
-tcttagHVggaYtgtNcDaVagctctctKgacgtatagYcctRYHDtgBattDaaDgccK
-tcHaaStttMcctagtattgcRgWBaVatHaaaataYtgtttagMDMRtaataaggatMt
-ttctWgtNtgtgaaaaMaatatRtttMtDgHHtgtcattttcWattRSHcVagaagtacg
-ggtaKVattKYagactNaatgtttgKMMgYNtcccgSKttctaStatatNVataYHgtNa
-BKRgNacaactgatttcctttaNcgatttctctataScaHtataRagtcRVttacDSDtt
-aRtSatacHgtSKacYagttMHtWataggatgactNtatSaNctataVtttRNKtgRacc
-tttYtatgttactttttcctttaaacatacaHactMacacggtWataMtBVacRaSaatc
-cgtaBVttccagccBcttaRKtgtgcctttttRtgtcagcRttKtaaacKtaaatctcac
-aattgcaNtSBaaccgggttattaaBcKatDagttactcttcattVtttHaaggctKKga
-tacatcBggScagtVcacattttgaHaDSgHatRMaHWggtatatRgccDttcgtatcga
-aacaHtaagttaRatgaVacttagattVKtaaYttaaatcaNatccRttRRaMScNaaaD
-gttVHWgtcHaaHgacVaWtgttScactaagSgttatcttagggDtaccagWattWtRtg
-ttHWHacgattBtgVcaYatcggttgagKcWtKKcaVtgaYgWctgYggVctgtHgaNcV
-taBtWaaYatcDRaaRtSctgaHaYRttagatMatgcatttNattaDttaattgttctaa
-ccctcccctagaWBtttHtBccttagaVaatMcBHagaVcWcagBVttcBtaYMccagat
-gaaaaHctctaacgttagNWRtcggattNatcRaNHttcagtKttttgWatWttcSaNgg
-gaWtactKKMaacatKatacNattgctWtatctaVgagctatgtRaHtYcWcttagccaa
-tYttWttaWSSttaHcaaaaagVacVgtaVaRMgattaVcDactttcHHggHRtgNcctt
-tYatcatKgctcctctatVcaaaaKaaaagtatatctgMtWtaaaacaStttMtcgactt
-taSatcgDataaactaaacaagtaaVctaggaSccaatMVtaaSKNVattttgHccatca
-cBVctgcaVatVttRtactgtVcaattHgtaaattaaattttYtatattaaRSgYtgBag
-aHSBDgtagcacRHtYcBgtcacttacactaYcgctWtattgSHtSatcataaatataHt
-cgtYaaMNgBaatttaRgaMaatatttBtttaaaHHKaatctgatWatYaacttMctctt
-ttVctagctDaaagtaVaKaKRtaacBgtatccaaccactHHaagaagaaggaNaaatBW
-attccgStaMSaMatBttgcatgRSacgttVVtaaDMtcSgVatWcaSatcttttVatag
-ttactttacgatcaccNtaDVgSRcgVcgtgaacgaNtaNatatagtHtMgtHcMtagaa
-attBgtataRaaaacaYKgtRccYtatgaagtaataKgtaaMttgaaRVatgcagaKStc
-tHNaaatctBBtcttaYaBWHgtVtgacagcaRcataWctcaBcYacYgatDgtDHccta
-aagacYRcaggattHaYgtKtaatgcVcaataMYacccatatcacgWDBtgaatcBaata
-cKcttRaRtgatgaBDacggtaattaaYtataStgVHDtDctgactcaaatKtacaatgc
-gYatBtRaDatHaactgtttatatDttttaaaKVccYcaaccNcBcgHaaVcattHctcg
-attaaatBtatgcaaaaatYMctSactHatacgaWacattacMBgHttcgaatVaaaaca
-BatatVtctgaaaaWtctRacgBMaatSgRgtgtcgactatcRtattaScctaStagKga
-DcWgtYtDDWKRgRtHatRtggtcgaHgggcgtattaMgtcagccaBggWVcWctVaaat
-tcgNaatcKWagcNaHtgaaaSaaagctcYctttRVtaaaatNtataaccKtaRgtttaM
-tgtKaBtRtNaggaSattHatatWactcagtgtactaKctatttgRYYatKatgtccgtR
-tttttatttaatatVgKtttgtatgtNtataRatWYNgtRtHggtaaKaYtKSDcatcKg
-taaYatcSRctaVtSMWtVtRWHatttagataDtVggacagVcgKWagBgatBtaaagNc
-aRtagcataBggactaacacRctKgttaatcctHgDgttKHHagttgttaatgHBtatHc
-DaagtVaBaRccctVgtgDtacRHSctaagagcggWYaBtSaKtHBtaaactYacgNKBa
-VYgtaacttagtVttcttaatgtBtatMtMtttaattaatBWccatRtttcatagVgMMt
-agctStKctaMactacDNYgKYHgaWcgaHgagattacVgtttgtRaSttaWaVgataat
-gtgtYtaStattattMtNgWtgttKaccaatagNYttattcgtatHcWtctaaaNVYKKt
-tWtggcDtcgaagtNcagatacgcattaagaccWctgcagcttggNSgaNcHggatgtVt
-catNtRaaBNcHVagagaaBtaaSggDaatWaatRccaVgggStctDaacataKttKatt
-tggacYtattcSatcttagcaatgaVBMcttDattctYaaRgatgcattttNgVHtKcYR
-aatRKctgtaaacRatVSagctgtWacBtKVatctgttttKcgtctaaDcaagtatcSat
-aWVgcKKataWaYttcccSaatgaaaacccWgcRctWatNcWtBRttYaattataaNgac
-acaatagtttVNtataNaYtaatRaVWKtBatKagtaatataDaNaaaaataMtaagaaS
-tccBcaatNgaataWtHaNactgtcDtRcYaaVaaaaaDgtttRatctatgHtgttKtga
-aNSgatactttcgagWaaatctKaaDaRttgtggKKagcDgataaattgSaacWaVtaNM
-acKtcaDaaatttctRaaVcagNacaScRBatatctRatcctaNatWgRtcDcSaWSgtt
-RtKaRtMtKaatgttBHcYaaBtgatSgaSWaScMgatNtctcctatttctYtatMatMt
-RRtSaattaMtagaaaaStcgVgRttSVaScagtgDtttatcatcatacRcatatDctta
-tcatVRtttataaHtattcYtcaaaatactttgVctagtaaYttagatagtSYacKaaac
-gaaKtaaatagataatSatatgaaatSgKtaatVtttatcctgKHaatHattagaaccgt
-YaaHactRcggSBNgtgctaaBagBttgtRttaaattYtVRaaaattgtaatVatttctc
-ttcatgBcVgtgKgaHaaatattYatagWacNctgaaMcgaattStagWaSgtaaKagtt
-ttaagaDgatKcctgtaHtcatggKttVDatcaaggtYcgccagNgtgcVttttagagat
-gctaccacggggtNttttaSHaNtatNcctcatSaaVgtactgBHtagcaYggYVKNgta
-KBcRttgaWatgaatVtagtcgattYgatgtaatttacDacSctgctaaaStttaWMagD
-aaatcaVYctccgggcgaVtaaWtStaKMgDtttcaaMtVgBaatccagNaaatcYRMBg
-gttWtaaScKttMWtYataRaDBMaDataatHBcacDaaKDactaMgagttDattaHatH
-taYatDtattDcRNStgaatattSDttggtattaaNSYacttcDMgYgBatWtaMagact
-VWttctttgYMaYaacRgHWaattgRtaagcattctMKVStatactacHVtatgatcBtV
-NataaBttYtSttacKgggWgYDtgaVtYgatDaacattYgatggtRDaVDttNactaSa
-MtgNttaacaaSaBStcDctaccacagacgcaHatMataWKYtaYattMcaMtgSttDag
-cHacgatcaHttYaKHggagttccgatYcaatgatRaVRcaagatcagtatggScctata
-ttaNtagcgacgtgKaaWaactSgagtMYtcttccaKtStaacggMtaagNttattatcg
-tctaRcactctctDtaacWYtgaYaSaagaWtNtatttRacatgNaatgttattgWDDcN
-aHcctgaaHacSgaataaRaataMHttatMtgaSDSKatatHHaNtacagtccaYatWtc
-actaactatKDacSaStcggataHgYatagKtaatKagStaNgtatactatggRHacttg
-tattatgtDVagDVaRctacMYattDgtttYgtctatggtKaRSttRccRtaaccttaga
-gRatagSaaMaacgcaNtatgaaatcaRaagataatagatactcHaaYKBctccaagaRa
-BaStNagataggcgaatgaMtagaatgtcaKttaaatgtaWcaBttaatRcggtgNcaca
-aKtttScRtWtgcatagtttWYaagBttDKgcctttatMggNttattBtctagVtacata
-aaYttacacaaRttcYtWttgHcaYYtaMgBaBatctNgcDtNttacgacDcgataaSat
-YaSttWtcctatKaatgcagHaVaacgctgcatDtgttaSataaaaYSNttatagtaNYt
-aDaaaNtggggacttaBggcHgcgtNtaaMcctggtVtaKcgNacNtatVaSWctWtgaW
-cggNaBagctctgaYataMgaagatBSttctatacttgtgtKtaattttRagtDtacata
-tatatgatNHVgBMtKtaKaNttDHaagatactHaccHtcatttaaagttVaMcNgHata
-tKtaNtgYMccttatcaaNagctggacStttcNtggcaVtattactHaSttatgNMVatt
-MMDtMactattattgWMSgtHBttStStgatatRaDaagattttctatMtaaaaaggtac
-taaVttaSacNaatactgMttgacHaHRttgMacaaaatagttaatatWKRgacDgaRta
-tatttattatcYttaWtgtBRtWatgHaaattHataagtVaDtWaVaWtgStcgtMSgaS
-RgMKtaaataVacataatgtaSaatttagtcgaaHtaKaatgcacatcggRaggSKctDc
-agtcSttcccStYtccRtctctYtcaaKcgagtaMttttcRaYDttgttatctaatcata
-NctctgctatcaMatactataggDaHaaSttMtaDtcNatataattctMcStaaBYtaNa
-gatgtaatHagagSttgWHVcttatKaYgDctcttggtgttMcRaVgSgggtagacaata
-aDtaattSaDaNaHaBctattgNtaccaaRgaVtKNtaaYggHtaKKgHcatctWtctDt
-ttctttggSDtNtaStagttataaacaattgcaBaBWggHgcaaaBtYgctaatgaaatW
-cDcttHtcMtWWattBHatcatcaaatctKMagtDNatttWaBtHaaaNgMttaaStagt
-tctctaatDtcRVaYttgttMtRtgtcaSaaYVgSWDRtaatagctcagDgcWWaaaBaa
-RaBctgVgggNgDWStNaNBKcBctaaKtttDcttBaaggBttgaccatgaaaNgttttt
-tttatctatgttataccaaDRaaSagtaVtDtcaWatBtacattaWacttaSgtattggD
-gKaaatScaattacgWcagKHaaccaYcRcaRttaDttRtttHgaHVggcttBaRgtccc
-tDatKaVtKtcRgYtaKttacgtatBtStaagcaattaagaRgBagSaattccSWYttta
-ttVaataNctgHgttaaNBgcVYgtRtcccagWNaaaacaDNaBcaaaaRVtcWMgBagM
-tttattacgDacttBtactatcattggaaatVccggttRttcatagttVYcatYaSHaHc
-ttaaagcNWaHataaaRWtctVtRYtagHtaaaYMataHYtNBctNtKaatattStgaMc
-BtRgctaKtgcScSttDgYatcVtggaaKtaagatWccHccgKYctaNNctacaWctttt
-gcRtgtVcgaKttcMRHgctaHtVaataaDtatgKDcttatBtDttggNtacttttMtga
-acRattaaNagaactcaaaBBVtcDtcgaStaDctgaaaSgttMaDtcgttcaccaaaag
-gWtcKcgSMtcDtatgtttStaaBtatagDcatYatWtaaaBacaKgcaDatgRggaaYc
-taRtccagattDaWtttggacBaVcHtHtaacDacYgtaatataMagaatgHMatcttat
-acgtatttttatattacHactgttataMgStYaattYaccaattgagtcaaattaYtgta
-tcatgMcaDcgggtcttDtKgcatgWRtataatatRacacNRBttcHtBgcRttgtgcgt
-catacMtttBctatctBaatcattMttMYgattaaVYatgDaatVagtattDacaacDMa
-tcMtHcccataagatgBggaccattVWtRtSacatgctcaaggggYtttDtaaNgNtaaB
-atggaatgtctRtaBgBtcNYatatNRtagaacMgagSaSDDSaDcctRagtVWSHtVSR
-ggaacaBVaccgtttaStagaacaMtactccagtttVctaaRaaHttNcttagcaattta
-ttaatRtaaaatctaacDaBttggSagagctacHtaaRWgattcaaBtctRtSHaNtgta
-cattVcaHaNaagtataccacaWtaRtaaVKgMYaWgttaKggKMtKcgWatcaDatYtK
-SttgtacgaccNctSaattcDcatcttcaaaDKttacHtggttHggRRaRcaWacaMtBW
-VHSHgaaMcKattgtaRWttScNattBBatYtaNRgcggaagacHSaattRtttcYgacc
-BRccMacccKgatgaacttcgDgHcaaaaaRtatatDtatYVtttttHgSHaSaatagct
-NYtaHYaVYttattNtttgaaaYtaKttWtctaNtgagaaaNctNDctaaHgttagDcRt
-tatagccBaacgcaRBtRctRtggtaMYYttWtgataatcgaataattattataVaaaaa
-ttacNRVYcaaMacNatRttcKatMctgaagactaattataaYgcKcaSYaatMNctcaa
-cgtgatttttBacNtgatDccaattattKWWcattttatatatgatBcDtaaaagttgaa
-VtaHtaHHtBtataRBgtgDtaataMttRtDgDcttattNtggtctatctaaBcatctaR
-atgNacWtaatgaagtcMNaacNgHttatactaWgcNtaStaRgttaaHacccgaYStac
-aaaatWggaYaWgaattattcMaactcBKaaaRVNcaNRDcYcgaBctKaacaaaaaSgc
-tccYBBHYaVagaatagaaaacagYtctVccaMtcgtttVatcaatttDRtgWctagtac
-RttMctgtDctttcKtWttttataaatgVttgBKtgtKWDaWagMtaaagaaattDVtag
-gttacatcatttatgtcgMHaVcttaBtVRtcgtaYgBRHatttHgaBcKaYWaatcNSc
-tagtaaaaatttacaatcactSWacgtaatgKttWattagttttNaggtctcaagtcact
-attcttctaagKggaataMgtttcataagataaaaatagattatDgcBVHWgaBKttDgc
-atRHaagcaYcRaattattatgtMatatattgHDtcaDtcaaaHctStattaatHaccga
-cNattgatatattttgtgtDtRatagSacaMtcRtcattcccgacacSattgttKaWatt
-NHcaacttccgtttSRtgtctgDcgctcaaMagVtBctBMcMcWtgtaacgactctcttR
-ggRKSttgYtYatDccagttDgaKccacgVatWcataVaaagaataMgtgataaKYaaat
-cHDaacgataYctRtcYatcgcaMgtNttaBttttgatttaRtStgcaacaaaataccVg
-aaDgtVgDcStctatatttattaaaaRKDatagaaagaKaaYYcaYSgKStctccSttac
-agtcNactttDVttagaaagMHttRaNcSaRaMgBttattggtttaRMggatggcKDgWR
-tNaataataWKKacttcKWaaagNaBttaBatMHtccattaacttccccYtcBcYRtaga
-ttaagctaaYBDttaNtgaaaccHcaRMtKtaaHMcNBttaNaNcVcgVttWNtDaBatg
-ataaVtcWKcttRggWatcattgaRagHgaattNtatttctctattaattaatgaDaaMa
-tacgttgggcHaYVaaNaDDttHtcaaHtcVVDgBVagcMacgtgttaaBRNtatRtcag
-taagaggtttaagacaVaaggttaWatctccgtVtaDtcDatttccVatgtacNtttccg
-tHttatKgScBatgtVgHtYcWagcaKtaMYaaHgtaattaSaHcgcagtWNaatNccNN
-YcacgVaagaRacttctcattcccRtgtgtaattagcSttaaStWaMtctNNcSMacatt
-ataaactaDgtatWgtagtttaagaaaattgtagtNagtcaataaatttgatMMYactaa
-tatcggBWDtVcYttcDHtVttatacYaRgaMaacaStaatcRttttVtagaDtcacWat
-ttWtgaaaagaaagNRacDtttStVatBaDNtaactatatcBSMcccaSttccggaMatg
-attaaWatKMaBaBatttgataNctgttKtVaagtcagScgaaaDggaWgtgttttKtWt
-atttHaatgtagttcactaaKMagttSYBtKtaYgaactcagagRtatagtVtatcaaaW
-YagcgNtaDagtacNSaaYDgatBgtcgataacYDtaaactacagWDcYKaagtttatta
-gcatcgagttKcatDaattgattatDtcagRtWSKtcgNtMaaaaacaMttKcaWcaaSV
-MaaaccagMVtaMaDtMaHaBgaacataBBVtaatVYaNSWcSgNtDNaaKacacBttta
-tKtgtttcaaHaMctcagtaacgtcgYtactDcgcctaNgagagcYgatattttaaattt
-ccattttacatttDaaRctattttWctttacgtDatYtttcagacgcaaVttagtaaKaa
-aRtgVtccataBggacttatttgtttaWNtgttVWtaWNVDaattgtatttBaagcBtaa
-BttaaVatcHcaVgacattccNggtcgacKttaaaRtagRtctWagaYggtgMtataatM
-tgaaRttattttgWcttNtDRRgMDKacagaaaaggaaaRStcccagtYccVattaNaaK
-StNWtgacaVtagaagcttSaaDtcacaacgDYacWDYtgtttKatcVtgcMaDaSKStV
-cgtagaaWaKaagtttcHaHgMgMtctataagBtKaaaKKcactggagRRttaagaBaaN
-atVVcgRcKSttDaactagtSttSattgttgaaRYatggttVttaataaHttccaagDtg
-atNWtaagHtgcYtaactRgcaatgMgtgtRaatRaNaacHKtagactactggaatttcg
-ccataacgMctRgatgttaccctaHgtgWaYcactcacYaattcttaBtgacttaaacct
-gYgaWatgBttcttVttcgttWttMcNYgtaaaatctYgMgaaattacNgaHgaacDVVM
-tttggtHtctaaRgtacagacgHtVtaBMNBgattagcttaRcttacaHcRctgttcaaD
-BggttKaacatgKtttYataVaNattccgMcgcgtagtRaVVaattaKaatggttRgaMc
-agtatcWBttNtHagctaatctagaaNaaacaYBctatcgcVctBtgcaaagDgttVtga
-HtactSNYtaaNccatgtgDacgaVtDcgKaRtacDcttgctaagggcagMDagggtBWR
-tttSgccttttttaacgtcHctaVtVDtagatcaNMaVtcVacatHctDWNaataRgcgt
-aVHaggtaaaaSgtttMtattDgBtctgatSgtRagagYtctSaKWaataMgattRKtaa
-catttYcgtaacacattRWtBtcggtaaatMtaaacBatttctKagtcDtttgcBtKYYB
-aKttctVttgttaDtgattttcttccacttgSaaacggaaaNDaattcYNNaWcgaaYat
-tttMgcBtcatRtgtaaagatgaWtgaccaYBHgaatagataVVtHtttVgYBtMctaMt
-cctgaDcYttgtccaaaRNtacagcMctKaaaggatttacatgtttaaWSaYaKttBtag
-DacactagctMtttNaKtctttcNcSattNacttggaacaatDagtattRtgSHaataat
-gccVgacccgatactatccctgtRctttgagaSgatcatatcgDcagWaaHSgctYYWta
-tHttggttctttatVattatcgactaagtgtagcatVgtgHMtttgtttcgttaKattcM
-atttgtttWcaaStNatgtHcaaaDtaagBaKBtRgaBgDtSagtatMtaacYaatYtVc
-KatgtgcaacVaaaatactKcRgtaYtgtNgBBNcKtcttaccttKgaRaYcaNKtactt
-tgagSBtgtRagaNgcaaaNcacagtVtttHWatgttaNatBgtttaatNgVtctgaata
-tcaRtattcttttttttRaaKcRStctcggDgKagattaMaaaKtcaHacttaataataK
-taRgDtKVBttttcgtKaggHHcatgttagHggttNctcgtatKKagVagRaaaggaaBt
-NatttVKcRttaHctaHtcaaatgtaggHccaBataNaNaggttgcWaatctgatYcaaa
-HaatWtaVgaaBttagtaagaKKtaaaKtRHatMaDBtBctagcatWtatttgWttVaaa
-ScMNattRactttgtYtttaaaagtaagtMtaMaSttMBtatgaBtttaKtgaatgagYg
-tNNacMtcNRacMMHcttWtgtRtctttaacaacattattcYaMagBaacYttMatcttK
-cRMtgMNccattaRttNatHaHNaSaaHMacacaVaatacaKaSttHatattMtVatWga
-ttttttaYctttKttHgScWaacgHtttcaVaaMgaacagNatcgttaacaaaaagtaca
-HBNaattgttKtcttVttaaBtctgctacgBgcWtttcaggacacatMgacatcccagcg
-gMgaVKaBattgacttaatgacacacaaaaaatRKaaBctacgtRaDcgtagcVBaacDS
-BHaaaaSacatatacagacRNatcttNaaVtaaaataHattagtaaaaSWccgtatWatg
-gDttaactattgcccatcttHaSgYataBttBaactattBtcHtgatcaataSttaBtat
-KSHYttWggtcYtttBttaataccRgVatStaHaKagaatNtagRMNgtcttYaaSaact
-cagDSgagaaYtMttDtMRVgWKWtgMaKtKaDttttgactatacataatcNtatNaHat
-tVagacgYgatatatttttgtStWaaatctWaMgagaRttRatacgStgattcttaagaD
-taWccaaatRcagcagaaNKagtaaDggcgccBtYtagSBMtactaaataMataBSacRM
-gDgattMMgtcHtcaYDtRaDaacggttDaggcMtttatgttaNctaattaVacgaaMMt
-aatDccSgtattgaRtWWaccaccgagtactMcgVNgctDctaMScatagcgtcaactat
-acRacgHRttgctatttaatgaattataYKttgtaagWgtYttgcHgMtaMattWaWVta
-RgcttgYgttBHtYataSccStBtgtagMgtDtggcVaaSBaatagDttgBgtctttctc
-attttaNagtHKtaMWcYactVcgcgtatMVtttRacVagDaatcttgctBBcRDgcaac
-KttgatSKtYtagBMagaRtcgBattHcBWcaactgatttaatttWDccatttatcgagS
-KaWttataHactaHMttaatHtggaHtHagaatgtKtaaRactgtttMatacgatcaagD
-gatKaDctataMggtHDtggHacctttRtatcttYattttgacttgaaSaataaatYcgB
-aaaaccgNatVBttMacHaKaataagtatKgtcaagactcttaHttcggaattgttDtct
-aaccHttttWaaatgaaatataaaWattccYDtKtaaaacggtgaggWVtctattagtga
-ctattaagtMgtttaagcatttgSgaaatatccHaaggMaaaattttcWtatKctagDtY
-tMcctagagHcactttactatacaaacattaacttaHatcVMYattYgVgtMttaaRtga
-aataaDatcaHgtHHatKcDYaatcttMtNcgatYatgSaMaNtcttKcWataScKggta
-tcttacgcttWaaagNatgMgHtctttNtaacVtgttcMaaRatccggggactcMtttaY
-MtcWRgNctgNccKatcttgYDcMgattNYaRagatHaaHgKctcataRDttacatBatc
-cattgDWttatttaWgtcggagaaaaatacaatacSNtgggtttccttacSMaagBatta
-caMaNcactMttatgaRBacYcYtcaaaWtagctSaacttWgDMHgaggatgBVgcHaDt
-ggaactttggtcNatNgtaKaBcccaNtaagttBaacagtatacDYttcctNgWgcgSMc
-acatStctHatgRcNcgtacacaatRttMggaNKKggataaaSaYcMVcMgtaMaHtgat
-tYMatYcggtcttcctHtcDccgtgRatcattgcgccgatatMaaYaataaYSggatagc
-gcBtNtaaaScaKgttBgagVagttaKagagtatVaactaSacWactSaKatWccaKaaa
-atBKgaaKtDMattttgtaaatcRctMatcaaMagMttDgVatggMaaWgttcgaWatga
-aatttgRtYtattaWHKcRgctacatKttctaccaaHttRatctaYattaaWatVNccat
-NgagtcKttKataStRaatatattcctRWatDctVagttYDgSBaatYgttttgtVaatt
-taatagcagMatRaacttBctattgtMagagattaaactaMatVtHtaaatctRgaaaaa
-aaatttWacaacaYccYDSaattMatgaccKtaBKWBattgtcaagcHKaagttMMtaat
-ttcKcMagNaaKagattggMagaggtaatttYacatcWaaDgatMgKHacMacgcVaaca
-DtaDatatYggttBcgtatgWgaSatttgtagaHYRVacaRtctHaaRtatgaactaata
-tctSSBgggaaHMWtcaagatKgagtDaSatagttgattVRatNtctMtcSaagaSHaat
-aNataataRaaRgattctttaataaagWaRHcYgcatgtWRcttgaaggaMcaataBRaa
-ccagStaaacNtttcaatataYtaatatgHaDgcStcWttaacctaRgtYaRtataKtgM
-ttttatgactaaaatttacYatcccRWtttHRtattaaatgtttatatttgttYaatMca
-RcSVaaDatcgtaYMcatgtagacatgaaattgRtcaaYaaYtRBatKacttataccaNa
-aattVaBtctggacaagKaaYaaatatWtMtatcYaaVNtcgHaactBaagKcHgtctac
-aatWtaDtSgtaHcataHtactgataNctRgttMtDcDttatHtcgtacatcccaggStt
-aBgtcacacWtccNMcNatMVaVgtccDYStatMaccDatggYaRKaaagataRatttHK
-tSaaatDgataaacttaHgttgVBtcttVttHgDacgaKatgtatatNYataactctSat
-atatattgcHRRYttStggaactHgttttYtttaWtatMcttttctatctDtagVHYgMR
-BgtHttcctaatYRttKtaagatggaVRataKDctaMtKBNtMtHNtWtttYcVtattMc
-gRaacMcctNSctcatttaaagDcaHtYccSgatgcaatYaaaaDcttcgtaWtaattct
-cgttttScttggtaatctttYgtctaactKataHacctMctcttacHtKataacacagcN
-RatgKatttttSaaatRYcgDttaMRcgaaattactMtgcgtaagcgttatBtttttaat
-taagtNacatHgttcRgacKcBBtVgatKttcgaBaatactDRgtRtgaNacWtcacYtt
-aaKcgttctHaKttaNaMgWgWaggtctRgaKgWttSttBtDcNtgtttacaaatYcDRt
-gVtgcctattcNtctaaaDMNttttNtggctgagaVctDaacVtWccaagtaacacaNct
-gaScattccDHcVBatcgatgtMtaatBgHaatDctMYgagaatgYWKcctaatNaStHa
-aaKccgHgcgtYaaYtattgtStgtgcaaRtattaKatattagaWVtcaMtBagttatta
-gNaWHcVgcaattttDcMtgtaRHVYtHtctgtaaaaHVtMKacatcgNaatttMatatg
-ttgttactagWYtaRacgataKagYNKcattataNaRtgaacKaYgcaaYYacaNccHat
-MatDcNgtHttRaWttagaaDcaaaaaatagggtKDtStaDaRtaVtHWKNtgtattVct
-SVgRgataDaRaWataBgaagaaKtaataaYgDcaStaNgtaDaaggtattHaRaWMYaY
-aWtggttHYgagVtgtgcttttcaaDKcagVcgttagacNaaWtagtaataDttctggtt
-VcatcataaagtgKaaaNaMtaBBaattaatWaattgctHaVKaSgDaaVKaHtatatat
-HatcatSBagNgHtatcHYMHgttDgtaHtBttWatcgtttaRaattgStKgSKNWKatc
-agDtctcagatttctRtYtBatBgHHtKaWtgYBgacVVWaKtacKcDttKMaKaVcggt
-gttataagaataaHaatattagtataatMHgttYgaRttagtaRtcaaVatacggtcMcg
-agtaaRttacWgactKRYataaaagSattYaWgagatYagKagatgSaagKgttaatMgg
-tataatgttWYttatgagaaacctNVataatHcccKtDctcctaatactggctHggaSag
-gRtKHaWaattcgSatMatttagaggcYtctaMcgctcataSatatgRagacNaaDagga
-VBagaYttKtacNaKgtSYtagttggaWcatcWttaatctatgaVtcgtgtMtatcaYcg
-tRccaaYgDctgcMgtgtWgacWtgataacacgcgctBtgttaKtYDtatDcatcagKaV
-MctaatcttgVcaaRgcRMtDcgattaHttcaNatgaatMtactacVgtRgatggaWttt
-actaaKatgagSaaKggtaNtactVaYtaaKRagaacccacaMtaaMtKtatBcttgtaa
-WBtMctaataaVcDaaYtcRHBtcgttNtaaHatttBNgRStVDattBatVtaagttaYa
-tVattaagaBcacggtSgtVtatttaRattgatgtaHDKgcaatattKtggcctatgaWD
-KRYcggattgRctatNgatacaatMNttctgtcRBYRaaaHctNYattcHtaWcaattct
-BtMKtVgYataatMgYtcagcttMDataVtggRtKtgaatgccNcRttcaMtRgattaac
-attRcagcctHtWMtgtDRagaKaBtgDttYaaaaKatKgatctVaaYaacWcgcatagB
-VtaNtRtYRaggBaaBtgKgttacataagagcatgtRattccacttaccatRaaatgWgD
-aMHaYVgVtaSctatcgKaatatattaDgacccYagtgtaYNaaatKcagtBRgagtcca
-tgKgaaaccBgaagBtgSttWtacgatWHaYatcgatttRaaNRgcaNaKVacaNtDgat
-tgHVaatcDaagcgtatgcNttaDataatcSataaKcaataaHWataBtttatBtcaKtK
-tatagttaDgSaYctacaRatNtaWctSaatatttYaKaKtaccWtatcRagacttaYtt
-VcKgSDcgagaagatccHtaattctSttatggtKYgtMaHagVaBRatttctgtRgtcta
-tgggtaHKgtHacHtSYacgtacacHatacKaaBaVaccaDtatcSaataaHaagagaat
-ScagactataaRttagcaaVcaHataKgDacatWccccaagcaBgagWatctaYttgaaa
-tctVNcYtttWagHcgcgcDcVaaatgttKcHtNtcaatagtgtNRaactttttcaatgg
-WgBcgDtgVgtttctacMtaaataaaRggaaacWaHttaRtNtgctaaRRtVBctYtVta
-tDcattDtgaccYatagatYRKatNYKttNgcctagtaWtgaactaMVaacctgaStttc
-tgaKVtaaVaRKDttVtVctaDNtataaaDtccccaagtWtcgatcactDgYaBcatcct
-MtVtacDaaBtYtMaKNatNtcaNacgDatYcatcgcaRatWBgaacWttKttagYtaat
-tcggttgSWttttDWctttacYtatatWtcatDtMgtBttgRtVDggttaacYtacgtac
-atgaattgaaWcttMStaDgtatattgaDtcRBcattSgaaVBRgagccaaKtttcDgcg
-aSMtatgWattaKttWtgDBMaggBBttBaatWttRtgcNtHcgttttHtKtcWtagHSt
-aacagttgatatBtaWSaWggtaataaMttaKacDaatactcBttcaatatHttcBaaSa
-aatYggtaRtatNtHcaatcaHtagVtgtattataNggaMtcttHtNagctaaaggtaga
-YctMattNaMVNtcKtactBKcaHHcBttaSagaKacataYgctaKaYgttYcgacWVtt
-WtSagcaacatcccHaccKtcttaacgaKttcacKtNtacHtatatRtaaatacactaBt
-ttgaHaRttggttWtatYagcatYDatcggagagcWBataagRtacctataRKgtBgatg
-aDatataSttagBaHtaatNtaDWcWtgtaattacagKttcNtMagtattaNgtctcgtc
-ctcttBaHaKcKccgtRcaaYagSattaagtKataDatatatagtcDtaacaWHcaKttD
-gaaRcgtgYttgtcatatNtatttttatggccHtgDtYHtWgttatYaacaattcaWtat
-NgctcaaaSttRgctaatcaaatNatcgtttaBtNNVtgttataagcaaagattBacgtD
-atttNatttaaaDcBgtaSKgacgtagataatttcHMVNttgttBtDtgtaWKaaRMcKM
-tHtaVtagataWctccNNaSWtVaHatctcMgggDgtNHtDaDttatatVWttgttattt
-aacctttcacaaggaSaDcggttttttatatVtctgVtaacaStDVaKactaMtttaSNa
-gtgaaattaNacttSKctattcctctaSagKcaVttaagNaVcttaVaaRNaHaaHttat
-gtHttgtgatMccaggtaDcgaccgtWgtWMtttaHcRtattgScctatttKtaaccaag
-tYagaHgtWcHaatgccKNRtttagtMYSgaDatctgtgaWDtccMNcgHgcaaacNDaa
-aRaStDWtcaaaaHKtaNBctagBtgtattaactaattttVctagaatggcWSatMaccc
-ttHttaSgSgtgMRcatRVKtatctgaaaccDNatYgaaVHNgatMgHRtacttaaaRta
-tStRtDtatDttYatattHggaBcttHgcgattgaKcKtttcRataMtcgaVttWacatN
-catacctRataDDatVaWNcggttgaHtgtMacVtttaBHtgagVttMaataattatgtt
-cttagtttgtgcDtSatttgBtcaacHattaaBagVWcgcaSYttMgcttacYKtVtatc
-aYaKctgBatgcgggcYcaaaaacgNtctagKBtattatctttKtaVttatagtaYtRag
-NtaYataaVtgaatatcHgcaaRataHtacacatgtaNtgtcgYatWMatttgaactacR
-ctaWtWtatacaatctBatatgYtaagtatgtgtatSttactVatcttYtaBcKgRaSgg
-RaaaaatgcagtaaaWgtaRgcgataatcBaataccgtatttttccatcNHtatWYgatH
-SaaaDHttgctgtccHtggggcctaataatttttctatattYWtcattBtgBRcVttaVM
-RSgctaatMagtYtttaaaaatBRtcBttcaaVtaacagctccSaaSttKNtHtKYcagc
-agaaaccccRtttttaaDcDtaStatccaagcgctHtatcttaDRYgatDHtWcaaaBcW
-gKWHttHataagHacgMNKttMKHccaYcatMVaacgttaKgYcaVaaBtacgcaacttt
-MctaaHaatgtBatgagaSatgtatgSRgHgWaVWgataaatatttccKagVgataattW
-aHNcYggaaatgctHtKtaDtctaaagtMaatVDVactWtSaaWaaMtaHtaSKtcBRaN
-cttStggtBttacNagcatagRgtKtgcgaacaacBcgKaatgataagatgaaaattgta
-ctgcgggtccHHWHaaNacaBttNKtKtcaaBatatgctaHNgtKcDWgtttatNgVDHg
-accaacWctKaaggHttgaRgYaatHcaBacaatgagcaaattactgtaVaaYaDtagat
-tgagNKggtggtgKtWKaatacagDRtatRaMRtgattDggtcaaYRtatttNtagaDtc
-acaaSDctDtataatcgtactaHttatacaatYaacaaHttHatHtgcgatRRttNgcat
-SVtacWWgaaggagtatVMaVaaattScDDKNcaYBYaDatHgtctatBagcaacaagaa
-tgagaaRcataaKNaRtBDatcaaacgcattttttaaBtcSgtacaRggatgtMNaattg
-gatatWtgagtattaaaVctgcaYMtatgatttttYgaHtgtcttaagWBttHttgtctt
-attDtcgtatWtataataSgctaHagcDVcNtaatcaagtaBDaWaDgtttagYctaNcc
-DtaKtaHcttaataacccaRKtacaVaatNgcWRaMgaattatgaBaaagattVYaHMDc
-aDHtcRcgYtcttaaaWaaaVKgatacRtttRRKYgaatacaWVacVcRtatMacaBtac
-tggMataaattttHggNagSctacHgtBagcgtcgtgattNtttgatSaaggMttctttc
-ttNtYNagBtaaacaaatttMgaccttacataattgYtcgacBtVMctgStgMDtagtaR
-ctHtatgttcatatVRNWataDKatWcgaaaaagttaaaagcacgHNacgtaatctttMR
-tgacttttDacctataaacgaaatatgattagaactccSYtaBctttaataacWgaaaYa
-tagatgWttcatKtNgatttttcaagHtaYgaaRaDaagtaggagcttatVtagtctttc
-attaaaatcgKtattaRttacagVaDatgcatVgattgggtctttHVtagKaaRBtaHta
-aggccccaaaaKatggtttaMWgtBtaaacttcactttKHtcgatctccctaYaBacMgt
-cttBaBaNgcgaaacaatctagtHccHtKttcRtRVttccVctttcatacYagMVtMcag
-aMaaacaataBctgYtaatRaaagattaaccatVRatHtaRagcgcaBcgDttStttttc
-VtttaDtKgcaaWaaaaatSccMcVatgtKgtaKgcgatatgtagtSaaaDttatacaaa
-catYaRRcVRHctKtcgacKttaaVctaDaatgttMggRcWaacttttHaDaKaDaBctg
-taggcgtttaHBccatccattcNHtDaYtaataMttacggctNVaacDattgatatttta
-cVttSaattacaaRtataNDgacVtgaacataVRttttaDtcaaacataYDBtttaatBa
-DtttYDaDaMccMttNBttatatgagaaMgaNtattHccNataattcaHagtgaaggDga
-tgtatatatgYatgaStcataaBStWacgtcccataRMaaDattggttaaattcMKtctM
-acaBSactcggaatDDgatDgcWctaacaccgggaVcacWKVacggtaNatatacctMta
-tgatagtgcaKagggVaDtgtaacttggagtcKatatcgMcttRaMagcattaBRaStct
-YSggaHYtacaactMBaagDcaBDRaaacMYacaHaattagcattaaaHgcgctaaggSc
-cKtgaaKtNaBtatDDcKBSaVtgatVYaagVtctSgMctacgttaacWaaattctSgtD
-actaaStaaattgcagBBRVctaatatacctNttMcRggctttMttagacRaHcaBaacV
-KgaataHttttMgYgattcYaNRgttMgcVaaacaVVcDHaatttgKtMYgtatBtVVct
-WgVtatHtacaaHttcacgatagcagtaaNattBatatatttcVgaDagcggttMaagtc
-ScHagaaatgcYNggcgtttttMtStggtRatctacttaaatVVtBacttHNttttaRca
-aatcacagHgagagtMgatcSWaNRacagDtatactaaDKaSRtgattctccatSaaRtt
-aaYctacacNtaRtaactggatgaccYtacactttaattaattgattYgttcagDtNKtt
-agDttaaaaaaaBtttaaNaYWKMBaaaacVcBMtatWtgBatatgaacVtattMtYatM
-NYDKNcKgDttDaVtaaaatgggatttctgtaaatWtctcWgtVVagtcgRgacttcccc
-taDcacagcRcagagtgtWSatgtacatgttaaSttgtaaHcgatgggMagtgaacttat
-RtttaVcaccaWaMgtactaatSSaHtcMgaaYtatcgaaggYgggcgtgaNDtgttMNg
-aNDMtaattcgVttttaacatgVatgtWVMatatcaKgaaattcaBcctccWcttgaaWH
-tWgHtcgNWgaRgctcBgSgaattgcaaHtgattgtgNagtDttHHgBttaaWcaaWagc
-aSaHHtaaaVctRaaMagtaDaatHtDMtcVaWMtagSagcttHSattaacaaagtRacM
-tRtctgttagcMtcaBatVKtKtKacgagaSNatSactgtatatcBctgagVtYactgta
-aattaaaggcYgDHgtaacatSRDatMMccHatKgttaacgactKtgKagtcttcaaHRV
-tccttKgtSataatttacaactggatDNgaacttcaRtVaagDcaWatcBctctHYatHa
-DaaatttagYatSatccaWtttagaaatVaacBatHcatcgtacaatatcgcNYRcaata
-YaRaYtgattVttgaatgaVaactcRcaNStgtgtattMtgaggtNttBaDRcgaaaagc
-tNgBcWaWgtSaDcVtgVaatMKBtttcgtttctaaHctaaagYactgMtatBDtcStga
-ccgtSDattYaataHctgggaYYttcggttaWaatctggtRagWMaDagtaacBccacta
-cgHWMKaatgatWatcctgHcaBaSctVtcMtgtDttacctaVgatYcWaDRaaaaRtag
-atcgaMagtggaRaWctctgMgcWttaagKBRtaaDaaWtctgtaagYMttactaHtaat
-cttcataacggcacBtSgcgttNHtgtHccatgttttaaagtatcgaKtMttVcataYBB
-aKtaMVaVgtattNDSataHcagtWMtaggtaSaaKgttgBtVtttgttatcatKcgHac
-acRtctHatNVagSBgatgHtgaRaSgttRcctaacaaattDNttgacctaaYtBgaaaa
-tagttattactcttttgatgtNNtVtgtatMgtcttRttcatttgatgacacttcHSaaa
-ccaWWDtWagtaRDDVNacVaRatgttBccttaatHtgtaaacStcVNtcacaSRttcYa
-gacagaMMttttgMcNttBcgWBtactgVtaRttctccaaYHBtaaagaBattaYacgat
-ttacatctgtaaMKaRYtttttactaaVatWgctBtttDVttctggcDaHaggDaagtcg
-aWcaagtagtWttHtgKtVataStccaMcWcaagataagatcactctHatgtcYgaKcat
-cagatactaagNSStHcctRRNtattgtccttagttagMVgtatagactaactctVcaat
-MctgtttgtgttgccttatWgtaBVtttctggMcaaKgDWtcgtaaYStgSactatttHg
-atctgKagtagBtVacRaagRtMctatgggcaaaKaaaatacttcHctaRtgtDcttDat
-taggaaatttcYHaRaaBttaatggcacKtgctHVcaDcaaaVDaaaVcgMttgtNagcg
-taDWgtcgttaatDgKgagcSatatcSHtagtagttggtgtHaWtaHKtatagctgtVga
-ttaBVaatgaataagtaatVatSttaHctttKtttgtagttaccttaatcgtagtcctgB
-cgactatttVcMacHaaaggaatgDatggKtaHtgStatattaaSagctWcctccRtata
-BaDYcgttgcNaagaggatRaaaYtaWgNtSMcaatttactaacatttaaWttHtatBat
-tgtcgacaatNgattgcNgtMaaaKaBDattHacttggtRtttaYaacgVactBtaBaKt
-gBttatgVttgtVttcaatcWcNctDBaaBgaDHacBttattNtgtDtatttVSaaacag
-gatgcRatSgtaSaNtgBatagttcHBgcBBaaattaHgtDattatDaKaatBaaYaaMa
-ataaataKtttYtagtBgMatNcatgtttgaNagtgttgtgKaNaSagtttgaSMaYBca
-aaacDStagttVacaaaaactaaWttBaagtctgtgcgtMgtaattctcctacctcaNtt
-taaccaaaaVtBcacataacaccccBcWMtatVtggaatgaWtcaaWaaaaaaaaWtDta
-atatRcctDWtcctaccMtVVatKttaWaaKaaatataaagScHBagaggBaSMtaWaVt
-atattactSaaaKNaactatNatccttgaYctattcaaaVgatttYHcRagattttaSat
-aggttattcVtaaagaKgtattattKtRttNcggcRgtgtgtWYtaacHgKatKgatYta
-cYagDtWcHBDctctgRaYKaYagcactKcacSaRtBttttBHKcMtNtcBatttatttt
-tgSatVgaaagaWtcDtagDatatgMacaacRgatatatgtttgtKtNRaatatNatgYc
-aHtgHataacKtgagtagtaacYttaNccaaatHcacaacaVDtagtaYtccagcattNt
-acKtBtactaaagaBatVtKaaHBctgStgtBgtatgaSNtgDataaccctgtagcaBgt
-gatcttaDataStgaMaccaSBBgWagtacKcgattgaDgNNaaaacacagtSatBacKD
-gcgtataBKcatacactaSaatYtYcDaactHttcatRtttaatcaattataRtttgtaa
-gMcgNttcatcBtYBagtNWNMtSHcattcRctttttRWgaKacKttgggagBcgttcgc
-MaWHtaatactgtctctatttataVgtttaBScttttaBMaNaatMacactYtBMggtHa
-cMagtaRtctgcatttaHtcaaaatttgagKtgNtactBacaHtcgtatttctMaSRagc
-agttaatgtNtaaattgagagWcKtaNttagVtacgatttgaatttcgRtgtWcVatcgt
-taaDVctgtttBWgaccagaaagtcSgtVtatagaBccttttcctaaattgHtatcggRa
-ttttcaaggcYSKaagWaWtRactaaaacccBatMtttBaatYtaagaactSttcgaaSc
-aatagtattgaccaagtgttttctaacatgtttNVaatcaaagagaaaNattaaRtttta
-VaaaccgcaggNMtatattVctcaagaggaacgBgtttaacaagttcKcYaatatactaa
-ccBaaaSggttcNtattctagttRtBacgScVctcaatttaatYtaaaaaaatgSaatga
-tagaMBRatgRcMcgttgaWHtcaVYgaatYtaatctttYttatRaWtctgBtDcgatNa
-tcKaBaDgatgtaNatWKctccgatattaacattNaaacDatgBgttctgtDtaaaMggt
-gaBaSHataacgccSctaBtttaRBtcNHcDatcDcctagagtcRtaBgWttDRVHagat
-tYatgtatcWtaHtttYcattWtaaagtctNgtStggRNcgcggagSSaaagaaaatYcH
-DtcgctttaatgYcKBVSgtattRaYBaDaaatBgtatgaHtaaRaRgcaSWNtagatHa
-acttNctBtcaccatctMcatattccaSatttgcgaDagDgtatYtaaaVDtaagtttWV
-aagtagYatRttaagDcNgacKBcScagHtattatcDaDactaaaaaYgHttBcgaDttg
-gataaaKSRcBMaBcgaBSttcWtgNBatRaccgattcatttataacggHVtaattcaca
-agagVttaaRaatVVRKcgWtVgacctgDgYaaHaWtctttcacMagggatVgactagMa
-aataKaaNWagKatagNaaWtaaaatttgaattttatttgctaaVgaHatBatcaaBWcB
-gttcMatcgBaaNgttcgSNaggSaRtttgHtRtattaNttcDcatSaVttttcgaaaaa
-ttgHatctaRaggSaNatMDaaatDcacgattttagaHgHaWtYgattaatHNSttatMS
-gggNtcKtYatRggtttgtMWVtttaYtagcagBagHaYagttatatggtBacYcattaR
-SataBatMtttaaatctHcaaaSaaaagttNSaaWcWRccRtKaagtBWtcaaattSttM
-tattggaaaccttaacgttBtWatttatatWcDaatagattcctScacctaagggRaaYt
-aNaatgVtBcttaaBaacaMVaaattatStYgRcctgtactatcMcVKatttcgSgatRH
-MaaaHtagtaaHtVgcaaataatatcgKKtgccaatBNgaaWcVttgagttaKatagttc
-aggKDatDtattgaKaVcaKtaataDataataHSaHcattagttaatRVYcNaHtaRcaa
-ggtNHcgtcaaccaBaaagYtHWaaaRcKgaYaaDttgcWYtataRgaatatgtYtgcKt
-aNttWacatYHctRaDtYtattcBttttatcSataYaYgttWaRagcacHMgtttHtYtt
-YaatcggtatStttcgtRSattaaDaKMaatatactaNBaWgctacacYtgaYVgtgHta
-aaRaaRgHtagtWattataaaSDaaWtgMattatcgaaaagtaYRSaWtSgNtBgagcRY
-aMDtactaacttaWgtatctagacaagNtattHggataatYttYatcataDcgHgttBtt
-ctttVttgccgaaWtaaaacgKgtatctaaaaaNtccDtaDatBMaMggaatNKtatBaa
-atVtccRaHtaSacataHattgtttKVYattcataVaattWtcgtgMttcttKtgtctaa
-cVtatctatatBRataactcgKatStatattcatHHRttKtccaacgtgggtgRgtgaMt
-attattggctatcgtgacMtRcBDtcttgtactaatRHttttaagatcgVMDStattatY
-BtttDttgtBtNttgRcMtYtgBacHaWaBaatDKctaagtgaaactaatgRaaKgatcc
-aagNaaaatattaggWNtaagtatacttttKcgtcggSYtcttgRctataYcttatataa
-agtatattaatttataVaacacaDHatctatttttKYVatHRactttaBHccaWagtact
-BtcacgaVgcgttRtttttttSVgtSagtBaaattctgaHgactcttgMcattttagVta
-agaattHctHtcaDaaNtaacRggWatagttcgtSttgaDatcNgNagctagDgatcNtt
-KgttgtaDtctttRaaYStRatDtgMggactSttaDtagSaVtBDttgtDgccatcacaM
-attaaaMtNacaVcgSWcVaaDatcaHaatgaattaMtatccVtctBtaattgtWattat
-BRcWcaatgNNtactWYtDaKttaaatcactcagtRaaRgatggtKgcgccaaHgaggat
-StattYcaNMtcaBttacttatgagDaNtaMgaaWtgtttcttctaHtMNgttatctaWW
-atMtBtaaatagDVatgtBYtatcggcttaagacMRtaHScgatatYgRDtcattatSDa
-HggaaataNgaWSRRaaaBaatagBattaDctttgHWNttacaataaaaaaatacggttt
-gHgVtaHtWMttNtBtctagtMcgKMgHgYtataHaNagWtcaacYattaataYRgtaWK
-gaBctataaccgatttaHaNBRaRaMtccggtNgacMtctcatttgcaattcWgMactta
-caaDaaNtactWatVtttagccttMaatcagVaagtctVaaDaBtattaattaYtNaYtg
-gattaKtaKctYaMtattYgatattataatKtVgDcttatatNBtcgttgtStttttMag
-aggttaHYSttcKgtcKtDNtataagttataagSgttatDtRttattgttttSNggRtca
-aKMNatgaatattgtBWtaMacctgggYgaSgaagYataagattacgagaatBtggtRcV
-HtgYggaDgaYaKagWagctatagacgaaHgtWaNgacttHRatVaWacKYtgRVNgVcS
-gRWctacatcKSactctgWYtBggtataagcttNRttVtgRcaWaaatDMatYattaact
-ttcgaagRatSctgccttgcRKaccHtttSNVagtagHagBagttagaccaRtataBcca
-taatSHatRtcHagacBWatagcaMtacaRtgtgaaBatctKRtScttccaNaatcNgta
-atatWtcaMgactctBtWtaaNactHaaaaRctcgcatggctMcaaNtcagaaaaacaca
-gtggggWttRttagtaagaVctVMtcgaatcttcMaaaHcaHBttcgattatgtcaDagc
-YRtBtYcgacMgtDcagcgaNgttaataatagcagKYYtcgtaBtYctMaRtaRtDagaa
-aacacatgYaBttgattattcgaaNttBctSataaMataWRgaHtttccgtDgaYtatgg
-tDgHKgMtatttVtMtVagttaRatMattRagataaccctKctMtSttgaHagtcStcta
-tttccSagatgttccacgaggYNttHRacgattcDatatDcataaaatBBttatcgaHtN
-HaaatatDNaggctgaNcaaggagttBttMgRagVatBcRtaWgatgBtSgaKtcgHttt
-gaatcaaDaHttcSBgHcagtVaaSttDcagccgttNBtgttHagYtattctttRWaaVt
-SttcatatKaaRaaaNacaVtVctMtSDtDtRHRcgtaatgctcttaaatSacacaatcg
-HattcaWcttaaaatHaaatcNctWttaNMcMtaKctVtcctaagYgatgatcYaaaRac
-tctaRDaYagtaacgtDgaggaaatctcaaacatcaScttcKttNtaccatNtaNataca
-tttHaaDHgcaDatMWaaBttcRggctMaagctVYcacgatcaDttatYtaatcKatWat
-caatVYtNagatttgattgaYttttYgacttVtcKaRagaaaHVgDtaMatKYagagttN
-atWttaccNtYtcDWgSatgaRgtMatgKtcgacaagWtacttaagtcgKtgatccttNc
-ttatagMatHVggtagcgHctatagccctYttggtaattKNaacgaaYatatVctaataM
-aaaYtgVtcKaYtaataacagaatHcacVagatYWHttagaaSMaatWtYtgtaaagNaa
-acaVgaWtcacNWgataNttcaSagctMDaRttgNactaccgataMaaatgtttattDtc
-aagacgctDHYYatggttcaagccNctccttcMctttagacBtaaWtaWVHggaaaaNat
-ttaDtDtgctaaHHtMtatNtMtagtcatttgcaaaRatacagRHtatDNtgtDgaatVg
-tVNtcaaatYBMaaaagcaKgtgatgatMgWWMaHttttMgMagatDtataaattaacca
-actMtacataaattgRataatacgBtKtaataattRgtatDagDtcRDacctatRcagag
-cSHatNtcaScNtttggacNtaaggaccgtgKNttgttNcttgaaRgYgRtNtcagttBc
-ttttcHtKtgcttYaaNgYagtaaatgaatggWaMattBHtatctatSgtcYtgcHtaat
-tHgaaMtHcagaaSatggtatgccaHBtYtcNattWtgtNgctttaggtttgtWatNtgH
-tgcDttactttttttgcNtactKtWRaVcttcatagtgSNKaNccgaataaBttataata
-YtSagctttaaatSttggctaaKSaatRccgWHgagDttaaatcatgagMtcgagtVtaD
-ggaBtatttgDacataaacgtagYRagBWtgDStKDgatgaagttcattatttaKWcata
-aatWRgatataRgttRacaaNKttNtKagaaYaStaactScattattaacgatttaaatg
-DtaattagatHgaYataaactatggggatVHtgccgtNgatNYcaStRtagaccacWcaM
-tatRagHgVactYtWHtcttcatgatWgagaKggagtatgaWtDtVtNaNtcgYYgtaaa
-ctttaDtBactagtaDctatagtaatatttatatataacgHaaaRagKattSagttYtSt
->THREE Homo sapiens frequency
-agagagacgatgaaaattaatcgtcaatacgctggcgaacactgagggggacccaatgct
-cttctcggtctaaaaaggaatgtgtcagaaattggtcagttcaaaagtagaccggatctt
-tgcggagaacaattcacggaacgtagcgttgggaaatatcctttctaccacacatcggat
-tttcgccctctcccattatttattgtgttctcacatagaattattgtttagacatccctc
-gttgtatggagagttgcccgagcgtaaaggcataatccatataccgccgggtgagtgacc
-tgaaattgtttttagttgggatttcgctatggattagcttacacgaagagattctaatgg
-tactataggataattataatgctgcgtggcgcagtacaccgttacaaacgtcgttcgcat
-atgtggctaacacggtgaaaatacctacatcgtatttgcaatttcggtcgtttcatagag
-cgcattgaattactcaaaaattatatatgttgattatttgattagactgcgtggaaagaa
-ggggtactcaagccatttgtaaaagctgcatctcgcttaagtttgagagcttacattagt
-ctatttcagtcttctaggaaatgtctgtgtgagtggttgtcgtccataggtcactggcat
-atgcgattcatgacatgctaaactaagaaagtagattactattaccggcatgcctaatgc
-gattgcactgctatgaaggtgcggacgtcgcgcccatgtagccctgataataccaatact
-tacatttggtcagcaattctgacattatacctagcacccataaatttactcagacttgag
-gacaggctcttggagtcgatcttctgtttgtatgcatgtgatcatatagatgaataagcg
-atgcgactagttagggcatagtatagatctgtgtatacagttcagctgaacgtccgcgag
-tggaagtacagctgagatctatcctaaaatgcaaccatatcgttcacacatgatatgaac
-ccagggggaaacattgagttcagttaaattggcagcgaatcccccaagaagaaggcggag
-tgacgttgaacgggcttatggtttttcagtacttcctccgtataagttgagcgaaatgta
-aacagaataatcgttgtgttaacaacattaaaatcgcggaatatgatgagaatacacagt
-gtgagcatttcacttgtaaaatatctttggtagaacttactttgctttaaatatgttaaa
-ccgatctaataatctacaaaacggtagattttgcctagcacattgcgtccttctctattc
-agatagaggcaatactcagaaggttttatccaaagcactgtgttgactaacctaagtttt
-agtctaataatcatgattgattataggtgccgtggactacatgactcgtccacaaataat
-acttagcagatcagcaattggccaagcacccgacttttatttaatggttgtgcaatagtc
-cagattcgtattcgggactctttcaaataatagtttcctggcatctaagtaagaaaagct
-cataaggaagcgatattatgacacgctcttccgccgctgttttgaaacttgagtattgct
-cgtccgaaattgagggtcacttcaaaatttactgagaagacgaagatcgactaaagttaa
-aatgctagtccacagttggtcaagttgaattcatccacgagttatatagctattttaatt
-tatagtcgagtgtacaaaaaacatccacaataagatttatcttagaataacaacccccgt
-atcatcgaaatcctccgttatggcctgactcctcgagcttatagcatttgtgctggcgct
-cttgccaggaacttgctcgcgaggtggtgacgagtgagatgatcagtttcattatgatga
-tacgattttatcgcgactagttaatcatcatagcaagtaaaatttgaattatgtcattat
-catgctccattaacaggttatttaattgatactgacgaaattttttcacaatgggttttc
-tagaatttaatatcagtaattgaagccttcataggggtcctactagtatcctacacgacg
-caggtccgcagtatcctggagggacgtgttactgattaaaagggtcaaaggaatgaaggc
-tcacaatgttacctgcttcaccatagtgagccgatgagttttacattagtactaaatccc
-aaatcatactttacgatgaggcttgctagcgctaaagagaatacatacaccaccacatag
-aattgttagcgatgatatcaaatagactcctggaagtgtcagggggaaactgttcaatat
-ttcgtccacaggactgaccaggcatggaaaagactgacgttggaaactataccatctcac
-gcccgacgcttcactaattgatgatccaaaaaatatagcccggattcctgattagcaaag
-ggttcacagagaaagatattatcgacgtatatcccaaaaaacagacgtaatgtgcatctt
-cgaatcgggatgaatacttgtatcataaaaatgtgacctctagtatacaggttaatgtta
-gtgatacacaatactcgtgggccatgggttctcaaataaaatgtaatattgcgtcgatca
-ctcacccacgtatttggtctaattatgttttatttagtgacaatccaatagataaccggt
-cctattaagggctatatttttagcgaccacgcgtttaaacaaaggattgtatgtagatgg
-taccagtttaattgccagtgggcaatcctaagcaaaatgagattctatcctaaagtttgg
-gcttgatataagatttcggatgtatgggttttataatcgttggagagctcaatcatgagc
-taatacatggatttcgctacctcaccgagagaccttgcatgaagaattctaaccaaaagt
-ttaataggccggattggattgagttaattaagaccttgttcagtcatagtaaaaaccctt
-aaattttaccgattgacaaagtgagcagtcgcaataccctatgcgaaacgcctcgatagt
-gactaggtatacaaggtttttgagttcctttgaaatagttaactaatttaaaattaatta
-acgacatggaaatcacagaacctaatgctttgtaggagttatttatgctgtttactgcct
-ctacaaccctaataaagcagtcctaagaatgaaacgcatcttttagttcagaaagtggta
-tccagggtggtcaatttaataaattcaacatcgggtctcaggatattcggtcatataatt
-tattaagggctcttcgagtcttactctgagtgaaattggaaacagtcatccttttcgttg
-tgaggcatcttacaccgctatcgatatacaatgcattccaccgcggtgtcccgtacacaa
-ggaaacttgttaccttggggatataagaaaactcacacgtctcattattaaactgagtac
-aatttttgcacgagaaagtaatgcaatacaatatgatgaaagccagctaatgaaaaggga
-tggaacgcacctcggatctgttgcactggattaaaatccgattatttttaaaaatattca
-gtgctagagcatatcaggtctacttttttatctggtatgtaaagcccacggagcgatagt
-gagatccttacgactcaacgaaaagttataacataactcccgttagccaaagcccaatcc
-cgattactgccctaccctaacgtctgccatctaaatatcgaacttgttatgatcaatgtg
-actacctcccaccctttccccttcatttgttccactggggataagctagcgttttcagaa
-tcaatgcaataagaatagccaattgtctcacttcatcagagctcttggcaattccaggcg
-ctacgtggttctggaatatattcatttttcaaatagtaatacgtttagtgttgctattgt
-ctacacgtttggatattacgttatgtgagcggacatcaatagttgtctaactctttagta
-agccagagatagcactcttagcgaatggataccatcttccataagtttagttaatagtcc
-gaaacaactgcttcgagcatatttgaacctccttgtaggcaaatagcctcttcaaagcaa
-tcttactaatagatagagtttgttttaagggactactagaaatgggacaatcttaatagt
-atgacctaaactgacatttaaagatatatccaggtggcaagcataaagatcattgcgcca
-cctccaccgtgggattacttatcagtcgatatcctatatgctaagtttgcgacggcagaa
-tacaaactaagctgagttgatgctaaccttacctatgataccccattggaccggttaaca
-gccctacttattccaaataaaagaacttttatgctgtagaagctattatagtgatgcctg
-gtaacttcagtatattaaaatgacacacatacgccatatagagctcctggaactttgaat
-aatgagcgaacttcgaagttgaagagcaagaaaccatatgtcacggttgcctaaagcccg
-gtaaccagacatgtgctatcattgatcattatcgaggttttcataaccttgacccattat
-cggctgtgcgcggacaagtacttaaatcactagtttcttcacctgcttatcggtaagaaa
-taaggttggcaaagaatcgcataagacggacgtagagccgcagcgttgtgcgagtccagg
-tgcatgcgcagcaataggattttaaattttgttccatttttaatttagccgtaaggatgt
-ccgtaaatgattgaaaattggattcaatctttgggcctatgctactggaacctgatcgac
-aaaatttcaaacatacgttaactccgaaagaccgtatttttgcggctagaatagtcagtc
-gcttggagccatataccttaccacttaaacgacgtgctcctgtagttgaaatataaacag
-aacacaaagactaccgatcatatcaactgaagatctttgtaactttgaggcgaagcaccc
-tcttcgagacaactaagagtaaagtaccgggcgccgcaaggagtcgattgggaccctaaa
-tcttgacgaattgctaagaggctcagagctaccactgtaatttctctagagcccataata
-aatgaacgatacatccgtaggtagcacctaagggattataatggaagccaaatgcagtta
-ataatattatatactggcgtacacgattcgacggatctctcacatagtgattcacgaccc
-ccccctttgattgacacagcgtcagcattttgcaagaacgatcttctgcatagggtgcgc
-caccgtaaggatgacgtcgaagctacaactgggtataatttaccatgcttccctgatgct
-gagtgcaatacactaagaatgagtttttaccccatatcaccagtatttgttctgttattg
-cgaagaaatggctatgctgagttggcgactaaagtcacccatcctttttattaggtaacc
-ccctcccttaaactaactgatttgctggagctgccctgcatacatatactttatcattta
-tggacgtccgtgacgcttattatccaccatagtcgatatgctacacggattcattaatgg
-atcgtaggagtttaagttatatttactaagatcggtctcggctactatcccgccttaccc
-ggcgctatttacggccatttttaatatattgacggtaattattcctatggtttcgaccgc
-acgtccttggacaagaaagaatggcaaaaaaaatgtaaaagaaaaaaaatattgagtccc
-taccatcatataaaaaatatgtgatgagtaacttgacgaaatgttagtggttattaaaga
-ctatctattacaccttttgttttctgtcgtagtatattaaagtctagaagccttacagga
-aaatcagggttatacagccgatactccgcagcatgaatcatcgaggaggtgtcctaccat
-cgcgccttgtaatcttgtctgtgtatactgtatttagaccttttatacaaagtaaatatc
-tcggctttatgtgattgggaggggcctactcaaacatgatgacttgacctaataatcact
-gtgcgggcgtcttatgactagctattccttgaaatccaccaccaaatggttaatatgtaa
-aaactttgacgatgaaacaaggtgaatgtgtagttactttgtgtaattagctgcgtcgag
-cattgcttgtaaaaccgtcaatcgcacacgttacttccataaaatttctacgaatacacc
-cttcttaaaaaaaacgtaggaattcacgagtttaacaaacgataactgtataaagtggaa
-gtccgaagaaagcagatgcccgaactactcgaagatgtttcgttttcttaaccatagggg
-cttcttaatggcccactacgcacattttgttcaagcccgagagggacatccccattacgg
-gagtattactaaaactgttccgtaatacgttcagcaagggatgaaaaaggccactgctca
-agttattgacgtgggagtattacatcggaagcctgaatcccacactatgatggtctgtac
-aggcctagggactgcgtctagacggtattaccggcttctaatcatacgatcgtgagtctt
-aacgggaagtaaggctcacacctaccccaaaccatttatctatgtaagtataaaattgtg
-cgtaagtgttcaaagtggacaataaagacgtggcaaaaacccccgcacataagccgcttt
-agatttcacaaataccaatgcggttaaaaacatccttgagtcgtacatacaccatactcg
-cgttaaacggatataacagaagataataaatccggatgtggagtcggtgtaactatagaa
-agccaagtgaaataatgcttaccagtcatttagctatacggctttcatttcatgtcaaga
-gggtggagtttgacctgtacagttgatatatcaccgatacttagaactcacctaaagcta
-aaattgctcgcagcgtgtaatccgcatattacaaacaatagatgggattcattatacata
-agacacgatgatctgctttttcaggttgcgagatgttgcctatcgtcaatcgagtcctgc
-cttacaccacttaaacaaaagtattgacagggaacctattttcgaggtattatatagtcc
-agcttgaatatcaatttgacagttaacctagtgaaaatcagtaagaggaaatacgccaca
-ttctccagtgaaattctacgggttatcgtctagtccaactatcaattataactcacgaga
-tataagtaaattctcgtacttggcctgatttttattatactttggatccttagtaaacag
-gaagggagaaaccttcaacgaaaaacactggattttgttttactctcaaagctcttatat
-gacggaaataccctgtcaagtcttaactttattactagactaatgaaatgggcttggggt
-ggccagaatcatagtacaatttagcggatacactattcggactttcctatcggctgtctg
-gttggataagtatggggactaataggctagacatacctatacttaaactatacaggcgtc
-atctatctctgcaactttggagttccctgatgttctcccgccctttgggttcacatcttc
-tataccgacacccctaataacgattagtttgtgggttagagtaaattaatacggttaata
-ttaatgtatcgttgaaaagctggtgtcgccaataaggtaaccggctaggcagagtatatg
-tcacgaagtataactaccctaatgataagctgtaggaataaaattaatgctgtctctaag
-cgaagagatatttccgactctgttttaatgacgaatctcattacttctgacttgcaaatg
-ttcaatatggcacggtttcacggcacctttgtgacgcatataatgaacttagaagattat
-aacgacggaactttatatgataatccgttacgattaaagaatctgttaaatatcataatg
-gcattcagttctagaccgtgcatcatggtaaacttactttctctgcatggcgacatacat
-ttcgctattcaaattcgcgtgtggttacacccactcgcacctttggaatattaagagaag
-atgatcagaaaatccattcgctcaatttttctgacgtacgtctaatttatcctaggagac
-aaatcgttttatgtctctcacatttttgaagaaaggttcgagagacaatactcaggtcct
-gaactgctagaagatactcggtggagcgtggcaacaatgaaaaactcgtgacataaatga
-atgatacttttccaagttcagttaagtgaatatgtttaacatacccggcttttcgatctt
-aagctgacgctggacgtgcgagtaatgtcagtctcttacatacactagtgactccaagtt
-tcgtcaaaaacgccccctcccttctcgagcccactcacgctatgtattgacgcgaacttg
-ttcgggatcagacttttcaggagttcggtcgcgtgtccctatgtgctaatatataagtta
-gatcgcattagatgctaatctgaatacttatagacgaccttcaacgagaacgggtaccac
-cttgaggctagagttaggtgtgaaacgacaggtagggacatataaaatttgagtgcggct
-ttagttaagggtttaattacctactcaaacatcacgctcgcgcccttcgtacgtaatcga
-ccatctagaggctaaggggactgtactaggtagtgattaatgatatcctagacgcacgtg
-ccttagatcttcagactctgatggtccgcgatcaccgtaattgtagtcctccaactcgat
-cactttgttggcgtcaaagaaattacgatatctaaatacttataatacaataaccaagga
-tgagaatgactcatcgcgttggagttatattgcttgaagttctatggaatgaaagcacgt
-tatctgccgtcccaatatctccagtgagctaattcattggacggtccactttgatcaatc
-cccgaggagatgttcggacactttagtctgtaacacttagcgttgagaccacgaacaatt
-gattactcagtcttgaaggtgttttccaaagttcattttaaataagactacgataggcct
-ttcctattgatataaactacccggctctgttgttcgtgtgagtcgtacttctctgtgttt
-ttctgattatagcaagattcgattcttagtgtaaacagcgatttttatttgacccgtcaa
-tgagaagcgcataggatctaagcaaaattatcaagttgtgccacaaggtaagatctttcc
-agttattgcaggtaggatgtatcccacgttgatagtatgaggtctgacgtcaactgtcta
-ggagagttgaccgcgtgcgggtacaccggatttgcatcgatgttgagaacgcagaactcc
-cactgtcgtggcggcgttcctgatatttagcaagaggcgttgataaagccctcatcatct
-agatctcgacctcatctgccctcttgctccatcattttctacacagactactttcctatc
-tacgttagtataattgctttctatcttagtatcatttagagcttctccgtcaacaggttc
-gtgctattaaagttagtacgaaagggacaacttgtagcaacgcatttaatcggttttcga
-ctacttcgcacaaaatcagataaagaagtttgtcattctattagacattgaattgcgcaa
-ttgacttgtaccacttatgatcgaacactgaatcaagactgtgattaactaaaatagaca
-agccactatatcaactaataaaaacgcccctggtggtcgaacatagttgactacaggata
-attaattggactggagccattacattctctacaatcgtatcacttcccaagtagacaact
-ttgaccttgtagtttcatgtacaaaaaaatgctttcgcaggagcacattggtagttcaat
-agtttcatgggaacctcttgagccgtcttctgtgggtgtgttcggatagtaggtactgat
-aaagtcgtgtcgctttcgatgagagggaattcaccggaaaacaccttggttaacaggata
-gtctatgtaaacttcgagacatgtttaagagttaccagcttaatccacggtgctctacta
-gtatcatcagctgtcttgcctcgcctagaaatatgcattctatcgttatcctatcaacgg
-ttgccgtactgagcagccttattgtggaagagtaatatataaatgtagtcttgtctttac
-gaagcagacgtaagtaataatgacttggaataccaaaactaaacatagtggattatcata
-ctcaagaactctccagataaataacagtttttacgatacgtcaccaatgagcttaaagat
-taggatcctcaaaactgatacaaacgctaattcatttgttattggatccagtatcagtta
-aactgaatggagtgaagattgtagaatgttgttctggcctcgcatggggtctaggtgata
-tacaatttctcatacttacacggtagtggaaatctgattctagcttcgtagctgactata
-ctcaaggaaccactgctcaaggtaggagactagttccgaccctacagtcaaagtggccga
-agcttaaactatagactagttgttaaatgctgatttcaagatatcatctatatacagttt
-ggacaattatgtgtgcgaaactaaaattcatgctattcagatggatttcacttatgcctt
-agaaacagatattgcccgagctcaatcaacagttttagccggaaacaatcgaagcatagg
-gacaatgtatcttttcctaaattgccatgtgcagatttctgagtgtcacgaagcgcataa
-tagaatcttgtgttgcctcaactcgttgaaaagtttaaaacaatcgcagcagtctttttg
-gggtctactgtgtgtttgcaaaataactgaaagaaacgcttgaacaactctgaagtagct
-cgagtactcattaaagtgtaacacattagtgaatatcggccaatgaaccaaacgcttccc
-ggtacgctatctctctcatcgggaggcgatgtgcaggttatctacgaaagcatcccttta
-cgttgagagtgtcgatgcatgaacctcattgtaacaatagcccagcaaattctcatacgt
-gcctcagggtccgggcgtactcctccatggaagggcgcgcatctagtgttataccaactc
-gctttttaactactatgctgtagttctacaggcatagtggccagtattttctaacttctc
-tggatagatgctctcactcctcatccatcacggcttcagtttacgtcttacttgcttgtt
-cagcaacggatggaggcattaagtatcttcactgttccctaaaattgctgttcaatatca
-aagtaaggacgatacagggaaagctcaagcacactcattgaatactgccccagttgcaac
-ctcacttaatctgacaaaaataatgactactctaagtgttgcggaagcagtctcttccac
-gagcttgtctgtatcacttcgtataggcatgtaactcgatagacacgaacaccgagtgag
-aaactatattcttgcttccgtgtgtgtgacaccaggtaattgatgcggatataagctgga
-gatcactcacgcccacacaaggcgctgctacctctttattccaatgtgtaagaatttgct
-aacttcatttctagaccgcagctttgcggtcataatttcacggtacggacccttgggtta
-gagacttgataacacacttcgcagtttccaccgcgcacatgttttagtggcttctaacat
-agaatttttgttgtgacataaagagtgcgtgggagacttgcccgaccgttaagccataat
-caattgaaagccccgtgagtcacatctaattggttgtactgcgcatttagctatccttta
-gctgactcgaagagattcgattcctaatataggttaattagatggctgccgcgcgaagta
-aaacgtgaaaaacgtagtgcgcagatctgcataactcgcgcttaattacttatgagtagt
-tccaagttcgctacgttatgagagagattggaattaagcaaatatgttttatggtgattt
-tgggatgagaaggactgctaagtacggctactaaacaaatttctaaaaccgccatctacc
-ttatcttggagacatttaagttgtatatgtcactagtctagcttttgtctgtgggacgcg
-ttctcggaatgagggaaatgcaagagccgattcatcaaatgcttatctaagaaagtagtg
-gactattacaccaagcacgaatgccagggaactgctttcttgctcaggacctcgcgacaa
-ggtaccccgcataagtcctagaattacatttggtcagcaatgctgacatttgaccgtgaa
-aacataattttaatcagaaggcagctcacccgcttgctctagatcttatctttgtatgaa
-tgtcagaatttactgcaatatccgttccgaatagtgagggcttagtatagttctctgtat
-acaggtcacatcaaactccccctgtcctagtacagctctgagctttaattaattgcatac
-atttccttcaatcatcagatgaaaacaccgcgaatcatgctcttctcgtatagggcaaga
-gaagcaacaaacaactagcccgactcacgttcatccgccgtatccttgttcagttcttac
-tccgtattaggtcagcgaaatctaatcagaataatcggtcgcgtatcaaaattaaaatcc
-cgcttgaggttgacaattaaaacgctgagcagttatcggctattagatagtggggtgaaa
-gtaattggctggaattatgttaaaacgtgatattaagctaaaatacgctacttgttgccg
-acctaattcagtcattcgatattcagttagagccaagaataacaagcttgtataaattga
-acggggtgcactaaacgatgtgttactctaatattcagcttggagtatacctgaaggcga
-attcatgtatcggccaataataagacgttgaagatcacaatttggactagcaaaagaagg
-tgatttatgcgtggggattgagtccactgtacgagtacggtctctggaaaattataggtt
-cagggaatataaggaagtaaagataattaccaagagatttttggtatcgctatgacccag
-aggtgttctaacgtctgttttgatccgcagaatttctgcctcaatgcatatttgacggac
-ttgaactagagcctctaaagttaaatggcgacgcaactgttcctaaacttcaattattac
-tactctttttttcctagggtattgtagaggccagtggacaaaataaatcaaatttaagat
-gtttcggacattaacatcccccgtagcatagaaatcatcagttatccaatctctcatcga
-gcttttacaatttctgctggcgctatggacagcatatgccgcgagacctccgcaagactc
-acttgatcactgtaagtatcttcattagaggttagagcctatagttaagctgctgaccta
-gtaaaattggtattttctaattttattgctcaagttaaaggttagtgaagggataatgac
-gttatttttgaacaatgggttgtattcaattttatatcacgaatggaacccttcattccc
-ggcataatactagacgacacgaacaagctccgatctatcagccaggcacgtgttaaggtt
-taattccggcaaaccaatgaagcatcaaaaggtgacctgatgcaacttagggtcacgatg
-agtttttcaggactacttattacctattaataagttaacatgagccttcataccccgtaa
-gacaatacatactccaccaattagaattctgagccatcttatctttttgtatcatcgaag
-ggtatggccgaataggttaattagttactcctaacgtctctacaggcatgcatttgacgc
-accttcgaaaatagtcaatctctcgccacacgcgtctagtatgcagcatcaaaaatatag
-tccacggtttccggattaccaaacgcggcaaagagaaacattgtatcgacggagataact
-taatacagaaggaaggggcatcttcgaatacggatgaataattctatctgtttattctga
-catcttgttttcaggttaatcttacgcattcaaatgacgcctgccccatgcgtgcgcaat
-tattttctaatattgacgagagcaatctcactccttttgggtctatttatgttttattga
-ggcacaagcctatacagaacaggtactattaaggccgtgagtgtgagactcaaaccgtgg
-aaacaaaggatgggttgttcttggtacaagttttagtgcatgtgggcaatccttaccaaa
-atcagatgctatccttaactttgggctgcatttaagatggcggttggaggcctgtgagaa
-tcctgcgtgtcatctttaatgaccgaattcatccatgtagattcagatcacacactcatt
-ccttgatgttgtctaaacaaaagttgttgtggacgcattggagggagttaagtaacaact
-tgggatcgcatacttataaaaattatatgttaaactttcacaaacgctgaagtccaaagt
-aactagcccaaacgcctcgagagtcactaggtattaatggtgtttgagttcctgtgaaat
-agtgttcgaaggtaaaatttatgtaccaaatcgaaagaacacttaataaggcttgcttgc
-acggaggtatgatgtttactgactctacaaccctaattttccagtacgtacattcattcc
-aataggttagttctcaaagtgctatacaggctcctcaattgatgatatgcttcagccgct
-ctatggatattagctcattttatttaggaagcccgcttagaggcttactatgagggaaat
-gccaaaatgtcatacttttcggtgtgtcccatatgacaccgctttacatagaatttgaat
-taaaacgcgctctcccgttcactaccatacttggtaccgtgcgcatattacatatagata
-taggatcattttttaaagctgtactaggtttgatcgacaatcttatgctatactatatga
-tgtaaccctcataatcaataccgatcgtacgatcctagcataggtggcaagcgattttat
-gccgattattgtgttaaatagtctgtgagtgtgattatcagggctacgttggtagagggg
-ttgtatagacctcgcacacattgtgacatacttaacaatatacgaaaactgatataataa
-atccccttacccaaacaccaatcccgttgaatcaactaccataacgtctcccatataaat
-tgcctacttgtttgcataaatctgaatacataacaccattgcaccttcttgtgttccaat
-cccgttaagattgccttgtcagatgatatgcaagaacaatagcatttgctagcaattatt
-aacagctcttcgaattgcctccacataacgcgggagggtatattttaatttggcaaatac
-taagtactgttggcgtcatatgctattaacggttggatattaagttatgtcagccgtaag
-caagagtgggcgaaatattttgttacccagtgagagcactcttagagtttggatacaata
-ggccatatgttgacttaagaggacgtaactacgccgtacaccattgttcaaccgacttct
-tggcaaatagaatcgtattagcaatcttaagaatagagacacgttcgtgttagggtatac
-tacaaatccgaaaatcttaagaggatcacctaaactgaaatttatacatatttcaacgtg
-gatagatttaacataattcagccacctccaacctgggagtaattttcagtagatttacta
-gatgattagtggcccaacgcacttgactatataagatctggggatcctaacctgacctat
-gagacaaaattggaaacgttaacagcccttatgtgtacaaagaaaagtaagttgttgctg
-ttcaacagatgatagtcatgacgcgtaacttcactatagtaaattgaaacaaatacgcaa
-tttagacagaatggtacggtcatgaatgacagtaattcgaagtgctagaccaacttaaaa
-taggtaaacgtgcccgaaaccccccttaacagaaagctgctatcatggtgcagtatcgac
-gtgttcagaaacttgtaacttttgagcaggtccgagcacatggaagtatatcacgtgttt
-ctgaaccggcttatccctaagatatatccgtcgcaaactttcgatttagtcccacgtaga
-gcccaagcgttgtgcgactccacgtgcatgcccagaaatacgagtttaaatttggttaca
-tggttaattttgaccgaagcatcgcactttatgattgataattggattcaatatgtcgcc
-ctatgcgaatgcaacatgatccacaatttggctataagacgtttaatccgtatcacactt
-tgtttgcggctagtatagtaacgcccgtgcaccaagagtcagtaacaattataagtactc
-cgcaggtacttcaaatataaaaactaatcaaacacgacccatatgatcatctgaagatat
-ttggaactttctcgacaaccaccctcgtactcaatacttacactaatcgacaggcacacg
-caacgtgtacagtcgcaccatattgagtcaagatttgcttagtggcgatgagcgtacacg
-cttatttctctagtcacaattagttatctacgagacatcacgagggagcaaataagcgat
-gttatggctacacataggcacgtatgaatatgatataagccagttaaacagtcgaaccat
-cgagcaaattctcatgcaccaacccacacgttgaggcacaaagagtaagctgtttgaatg
-taacttcttctgctgagcgggccccaacgtaaggatcaactagaagagaaaactcggtat
-tagtttaaatgcgtcacggagcatgagtgcatttcactaagaatgtctgtgtaaccaata
-taacatctatttgttatctgattgcctacttatggctttgcggtcgtggcgactaatgtc
-tccaatccttttgaggtcggtaccaactccctttaaattacgctgtgcaggctcatgcac
-tgcatacatatacggtagcaggtagggacctcacgcacccttattataatcaatagtagt
-tatcagtcaacgaggcaggaatgctgaggtcgaggtgttggtatattttctatgtgccgt
-ctaggcgactatcacgcattaccaggcgagatttaagccaattttgaatatagtcaacgt
-aatttttactatgggttccaccgaaacgccttgcacaactaagaatcccataaaatatcg
-atatcaaataaaagattgtgtcaataccttcatatatattttttcggttgactaacgtga
-actaaggttaggggttttgtatgtctatataggaaacagtttcttttctgtcctacttta
-gtaaagtcttcaagccttactccaaaatcacggtgattaagccgttactcagcagcatga
-ttctgcctgctcgggtcctaaaatccagccttgtaagagtcgctgtgtattagctaggga
-gacctttgttaaaaaggatatatcgcggcgggatgtgagtgcgtggcgcatactcaatct
-tcagctcgtgtcattataatatctctcccccacgcttttcactagatatgccgtgtaagc
-aaacaccttatgcttaatttcgaaaatattggtacttgaaaaaagctgtaggggtactta
-atgtctggtaggagatcaggagagaattgagtgtaaaaccgtaaagccctcacctgactt
-catgtaaatggcttagaagactccatgatttaataaatactacgaaggaaagactggatc
-taaagataactctagtaaggccaactcccttcaatgctgttgccagttataatccaagag
-ctgtccttttctgaaccatagcggcttctgaagcgaactagaagcaaagttggttctagc
-cagacagccacataccctgtacgggtgtattactaaaactggtccggtattagttcacca
-agggaggaattaggcaaaggatctaggtatgcaagtcggagtattacatccctaccctga
-atccatcaataggttcctctgtactggccttcgcaatgagtattcaaggttgtacagccg
-tataataataagatagtgactatgaacgggaagtaacccgctcaccttccccaaaacatt
-gttatatctaagtattaaagtctgccgtagtgttaatactcgaaaataaacaactggcaa
-attacaccgcacttaagccgcttttgatttatatttttccaatgcgcttttaaaaataat
-tcagtcctacatactaattaagacccttaaacggagatatcacaagttaagttttaacca
-tctcgactaggtggaactatagatacccaactcaatttatcattacctgtaatgttccta
-gaaggattgcatttcatgtcaagacggtggagtttcacagcgaaacttcagtgtgaacag
-attctgagaaatcacctaaacctattagtcagagcacccggttagaaccagttgtcaaaa
-aatagagcggttgcatgagacagaagtaacgatgagatccgttgtaacgttgagacatct
-ggcctatcgtcaatacagtcctcccttaaaaatatttttaaatactaggcaaacccaaca
-taggttagtcctatgtgatacgccacatggtatatcattttgtaacgttacctagggata
-atcaggaagtggaattacgcaaaagtagacagtgaaatgcttagggttatagtctagtcc
-aaagataaaggataaagcacgtcagagaactatattagccgaatgggaatcattgttagg
-agactgtggatcatgtctaaaaagcaacgcagaaacagtcatcgaaaaaatctcgttttt
-gtttgaatctaaaagagctttgatgaccgatagtacctgtatactagttactgtattacg
-tgtctaatgatttcggattggggtccccagaatcagacgtcattgtagacgattcaagtt
-taccaatttaatttcccagctctccttggagaactatcgccaataattgcagtcactttc
-cttttctgaaacgataaagccgtcagagttctctgcaacgttggacttacctgaggttct
-aacccactttcggttctaatagtagttaacgacacaacgaataacctttactgtggggct
-ttcacgatattttttcgcttattattaatggttacgtcataagctggtgtccaaattaag
-gttaccggcttcgcagagtagttgtatccaagtataacttccctaatcataagatcgagg
-tagaaaattaatgctgtctctaaccgaacagatatgtcccactatgtggtatggacgttg
-ctaattacttctgaagggaaattggtcattatggatacgtgtctaccatcaggtcggacg
-cagatatggttctgtcttcagttgatccaccgttctttataggataataactgacgatta
-aagattatggtaaatagattaagccaattctcttcttgtcagtgaagcatccttaactga
-cttgctctgcagcccctcatacatttagctattcaaagtaccggctcgtttcaaactctc
-ccacctttggaagaggttgtcaacttgataagtatatcatttacagcattttttcggacg
-tacctctaatgtttcattgcagaaaattagttttttctatcgcacattttgcaagtaacg
-ttagagacacaattatctgcgaatgaactgctagatctgacgaccgggagcctcgcaaat
-atcaaaaaagactgacatatatcaaggagtcgttgacaagtgctggtaagtcaattggtt
-tatctgtcccggcgtttcgatcttaagctgaccatgcacggcagagtaatgtcactctcg
-ttcttacaagtctgtctccaagggtcggcaaaaaagacccctccattctcgagcccactc
-acgatatgtagggacgacaacttgtgcggcttatgaattgtctggactgcgggcgagggt
-ccatatctccgaagttagaagggacatacctttagatgataagatcaattcttattgacg
-aaattcatccacaacggggaacaacttcaccctagacttacgtctgaaaagacacctagc
-gtcttataaaaggtcagtgccccgtttcgtaaggctggaattacctacgcaaacttaaac
-ctcgcgcccttccttacgtatcgacaagatagaggctatcgcgaatgtactacggaggca
-tgaatcatatactagaaccaagtgcctgtgatattaacaagatgatccgacgcgagcacc
-gtaattctaggcataaaactccagcaatttgggggccgaaaacaaatgacgttagctaat
-taattatatgacatgatcaaaggaggtcaatcacgcatcgagttcgacgtatattcattg
-aacttcgtgcgtttgaaagaaacttttatgaaggcaaaattgatcctgtctcctatttca
-tgcgtacctcctagttgataattccccgagcagtggttaggacacttttgtcggtatcaa
-gttccggtctcaaaacgtaaaattctgtaatctgtatggatggtctgtgaattagttaat
-ttttatgaagtcgtcgagacgcagttcctattgatttattctaaacggagatgtgcttcg
-tgggactcggaagtagatctgtgtttatgattattgctactttagatgctgactgttaac
-tccgtgttgtttttcaaccgtatatcacaaccgaattggatagaacctatagtttcaagt
-tctgccacaaggtatcatatttacagttagtgctggttgcttctttcaaacgtggtgagt
-ttgtgctatcacgtcaacggtagagctcagtggaccgagtgcgcgttcaaccctgttcca
-gagagggtgtgatagcacatataccacgctcgtcgaggcgttcatgatagtttgcaagag
-ccggtgttaaacacatattattattgttatccaactaatcggacctatgcataaagcatt
-gtctaaacagaataattgcctatatacggtagttttagtgatttatatcttagtatcagt
-tagagcttcgaactcttcaggttcctcatatttaacgttcttcgaaagcgaaaacttcta
-caaacgaatgtaagcggttttccaagtagtacctataaatcacagaaagatctgtctcag
-tatagttgaaatggtattcagctagtgacgtgtaccaattatcatagttcactcaagcaa
-gacgctcattaacgaatatagacaagacactatatcatataataaaaaagaacatggtgc
-tcgaacatagttgaattcaccatattgaaggggaatgctgacatgtaattcgctactaga
-cgatcaattccctacttgtcaaagttgaactggtacgttcttggaattaaatatgattgc
-gctggaccaaattgcgacttcttgagtttcagggcaaacgattgagccggaggatgtccg
-tctcttacctttcttgcttatgataaacgacggtccctgtacatcactgggaattctcag
-caaaaataattgggtaaatcgagactcgatgtattcggccacaaaggtgttagacgttaa
-agattattcaacggggcgataataggatcataaccggtatgcaagcgcattgaaagagcc
-atgagatccttatccgataaacgctgcacggtatgtgcagccttattgtcgatcacgaat
-ttataaatgtagtctgggctgtaagttgaagacctaagttataatgaagtgcaataccaa
-atcgattcatagtggattatcagactcaagatatctcctgataaattacagttgttaaga
-tacggataaaatgagatttaagattagcagcctctaatctgtttcaatcccgttggaatg
-tggtatgcgatcaaggttaagttaaaatcaagcctgtcttcagtcttgattcttgttctg
-ccatcgcatgcggtctacgtgagttaatatgtagcttacgttctagcttgtgctaatctg
-agtatagattcgtagaggaatattatcaagcttccacgcctcaacgtacgtgtattggtc
-acacaagacactaaaagtggaagtagcgtaaactatagtctagttgttaaatgctcagtt
-cttgttatattcgatatactcttggctaatttatgtctgagtatataaaattaatgatat
-taacttgcatttcacggatcccttagaaaaagattttgaccgagcgcattataaacggtt
-acaccgaatcaatagaagcatacccaatagctttctttgaatttattgcctgcgcaactt
-ggctgactctctagatccgaataattctatatggtcgtgacgaaactagttcattactgt
-ttaaaatgccaacatgtcttttgggccgataatggctctttgcaaaattactcaatgata
-cgattgatcaaagcggtagttgctagtggtagcatgtaagtctatcaaatgtctgattat
-ccgaaaatcttccaaaagagtccacgtaccatatctatctcatagcgacgcgaggggaac
-cttatctaactatcattccatttaccgggtgactctcgatgcaggatccgattgggataa
-attgcccagaaatggctcattcctgactaagggtaaggccgttctcagcaagggaacccc
-gcgaatctaggcttataccatctagattgttaactacttgcctgtagttctacagccata
-ctggacagttgtttctaaatgatcgggattcatgctagcactcctctgaatgcaccgcgt
-aagtttaactattacgtccgtgggcagataaggatggaggctgtatgtatcttaactgtt
-acctaatatggctggtaattatcaaagtaaggaccttaatgccatagcgctagcaatcgc
-tttgtatactgaccatgtgccaacctctcttaatctgtaaaatataatgtcttagctaac
-tgtggacgatcatgtctctgcctagagcttcgctgtatcaattcctatagccagcgtact
-agtgacacaacaacaccgtgtgagaaaagatattagtccttacgtctgtctctctacagc
-ttattgatgaggattgaacatggacatatagctccccctcaaaagcagatgctacctctt
-tattccattctcgaacatttgccgaacttaatttcgacaaacctgaggtcacgtcttaat
-ttatcggtaacgtcacgtccctttgagactggataaatatattaccaggggccaacgagc
-aattgttggaggcgcttctataatacaaggtgtcttgtcaaagaaagacggcgtgcgtct
-cgtgcaactcacttaaccaatattaatgtgaaacccccctctctcacatcttatgcggtg
-tactgccctggtacatttcctgtacaggactccaacagtgtagattcctaagatagctgt
-tggagttgcctcacgccagatcgaaaaactgaataaactagtgagctgagctgcagaaat
-accgcttaattacttatgactagttcaaagggacctacgtgatgtcagacattgcaagga
-agaaattaggtttgtgcgtcattttggctggactagcactccttacttcccctactattc
-aaatgtcgtaaacagcatgagacaggatcgtgctgacatttaaggtctattgggaacgag
-gctacctttggtcgcgcgctcgcgttctccgaatgaccgaaatgcatgagcacagtatgc
-aattgcttatagatctaaggtctggtcgttgaaaccaagcacgtaggcctgggaaatcag
-ttcttcctcagcaactacacaaaagcgtccaagcattagtacttgtagtaaatgtccgaa
-cctatgcgctcatttgaaagtcaaaaaatatttttaagcagtaggcacctaacccgattc
-ctctacttagtagctttctttgattctcagaattgactgcaatatcactgcacaattctg
-tgccattactagacttctctgtattaacgtctcatcttactaacactcgcctaggacaca
-tctgagagtgaagtatttcaatacatttactgaaatcttcagttctaaaatccccgaata
-aggctcttatcggtttggccaacacaagaaaaaaacttcttgcaccactcaccttcatac
-gcaggagcctggggaacttagtaataactatttcggcagacaaagcttataacaagttgc
-cggcgcgtataatatttaaaagaccccttgagctgctcaattaaaacgctcacctggtat
-aggctattagatagtgccgtcttagtaaggggcgggaattatcggataaactgatatttt
-gataaaataaccgacttgttcacgacataagtcactaaggagattttatctttctccaaa
-gtatatcttccttggataatttcaaagcgctgcaatttaagttctgttactagtttatgc
-tgctgggaggtgaccggaaggcgtagtaatctagaggcaaattataagaagttcatcata
-tcattttcgactacaaaaacaaggtgttgtatgccggcgcattgtgtaaactggacgagt
-accctagatggaaaattatacgttaagccaagatttcgatgtaatgataattacctacac
-atttttgctatccataggaacaagagctgttctataggctcgtggcatacgaacatttgc
-tgccgctatgaatattggaagctcttcaactacagactctattcttaattgccgtcgaaa
-atgggccgaatcggctattattaatactcggtttttccgaggggattgttgtcgacagtc
-gtaattattattaatattgatgttggtgaggtcatttaaatacaaccttgcagacaatga
-ataagggatccaatctctcatactccttttacaattgctcatgcccctatgcaaacctta
-tgccgccacacctccgcaactctctcttctgaactgtaagtagcttcattactggtttga
-gactatactgaagctgatgacattctaaaatggctattttcgaatgtgattcataatgtt
-tatcgtttgggatggcagaatcacgttatttttgatatagcccgggtattctattgtata
-gaacgtatgctacaagtcattccccgaagaagactagaagtaaacaacatgcgaccatcg
-ttaagccacgcaaggctgtagctttatttcccgataacctatcttccataaatagcggac
-agcaggatactgacgctcaacatcagtggttatggtctaatttttaacttttaataaggt
-aacttcagcaggcatacacagtaactctttaatttataatcaaattagaagtctgacact
-tcttatatttttctatcatccaacgcgatcgcccattagcttattgtgttactaataacg
-tatctaaaccaatccttttcaagctactgcctatattgtcaatatatacaaacaacagga
-tagtaggctgcttaaaaaatattgtcaaccgtgtacgctttacaatacccggaaatcaca
-aactttgtagacaacgagtgaaatttatacactacgaagggccagcgtacaagacccatg
-aattaggcgatatgtttattctgacatattggtttatccttaatctgtcgctgtaaaatg
-aagccgcccccatccctgcgaattttttttcgaagattcacgactgaaatataaatacgt
-ttggctatatttatgttggagggaggcaatagcctttactgttaaccgaagatttagcca
-gtgagtgtgacactaaaacactggaataaatgcaggcgttcttctgggtaaaaggtttag
-tcaatctcgcctataagttcatatagctctggatataattatctggcccatgcatttatc
-atggcgcttggtgccctgtgtgaagccggcctctcatattgaaggtccgaagtattccat
-gtacattaagatcactctctcattcatgcatcttggcttaacaaatctggttgtccaagc
-tttccaggcacgtatggtacaaattcggatcgaatacttataaaaatgatatgttaaact
-gtctaaaacgctcatctacaaagtaaagtgcactaaccaatagagtctcaagaccgtgta
-atgctggtgcactgaatgtgtaatacggttagaagggattagttatgttacaaatccatt
-gaaaacttaagaagcattgcgtgctcggagggtgcatcttttatcaagagactaacatta
-ttttcaacgacgtacatgctttacaatagggtacttatcaaacgccgagaaacgcgccta
-tagtgatgttatgattatgacccgatatccattggaccgaattttatgtaggttcccagc
-gtactcgcgtaatatctcggtattgccataatgtaatacttgtcggtctctcccagatga
-aaaagcgttacagagtatttcaatgaaaaacagcgcgcaacgtcaatacctttaggggta
-acggccgctgatttcatatagatatacgataagttggtatagctctactaggtggcatcc
-acaatcgttgcatttactatagctggttacaatcataatctataccgttccttacatact
-accatagcgggatagcgtttttttgccgttgattgggtttaagaggatgtcagtctcatt
-atatccgattcggtgggagagccgttgttttcaaatcgcacactttgtgacataatgtac
-aagataacaaaactgatataagatataaactgtcaatatcaccttgacacttgaatcaaa
-gtaaattaactcgcaaatataatttgactaattgggtgcagatttctcaattaataaaaa
-aatggcaccggatgggcttacaagccccttatcattcacttgtatcatgatttccaagaa
-caatagaatttgctagcaagtatgaacagagattcgaattgcatccacagtacgccggag
-cgtttattttaatgtggatatgacgatgtactgttggcggcatttgctagtaaccggtcc
-ttatttacgtagcgcacacgtaagcatgtctgggagaaatatggtggtacaatctcagag
-aaagattacagtttggtttaaataggacttatcgggtcggaagtggaacttaataagcag
-tacacaattgggcaacagacgtcttgcctattacaataggattacaatgcgttagatttc
-agacacgttcgtgtttggctattcgtcaattccctaaatagttagacgatcaactattat
-caaagtgattctttgttcatcctccattcatgtaacagatggcacactacgcataacgcc
-gaggaattttaacgagatttaagagagcagttcgggcacaacccacttgactttataaca
-gctcggcagcataaacggtaatatgtgacaaatttccaaacgttataagaacgtatgtgt
-acttagaaaactaagtggttcatgttcaacagatgtgacgcagcaagcctaacttatcta
-ttggttttgctataaaagaacaaagttacacagaatcctaagggcttgtttcacacttat
-gcctagtgcttcaccatcttaaaatagcgaaaccggcacgaatcaaaccttaaaacaatg
-cgcagatattggtgatggtgactccgggtatgataatggtaactgttgaccagcgcccac
-ctcatcgaagtatagaaagtggttaggataaggatgagaccgaacttatttccggccata
-actttagattttctacctagtacacaacatcagggcggacacgaaaccgccatcacatca
-tataccaggtttaatttgcttaatgggggaagtgtcaacgaaccttcgaactttagcagg
-catatggccattatatatggccccagagcagaatgctacagcagacaaaatttggattta
-tgtagtttaatacctatcaaacttggtgtgaccatacttgtctaacgacagtgcacaaag
-tgtaagttacaattattactactcagcagcttctgcaatgataaaatcttatcatacacg
-tcacatatgataatatctacttagggggaacgggctccacaacctacatagtactcaata
-cttacactattcgacaggcacaccaaacctgtacagtcccaaaagattgagtcaactttg
-cagtactgcagatcacagtaatagcttagttagcgagtcaaaattagttttctacgagac
-tgcacgaccgtgcaaatttccgatgtgttggctacaaatagcaacgtatgaatttgtttg
-aagccacgtaaactgtacaaccttagagataagtctcaggctactaaaaacacgttgtgg
-cactaacaggatcatggttgattcttacttattcggctgaccggcccaataagtaacctt
-caactagaacagaataatcgggagtagtttaattcagtcaaggtgcaggtctcattgtaa
-ctaacaagctctgtgtaaccaagttaaaatcgttttcttagcggattccctacttatgga
-tttgagctcgtccacaatattcgatacaagaagtttgtggtccgtaacaacgaaatttta
-attacgctgtgcagcctcatccaaggaattaatagaaggttgatggtaggctccgaacgc
-tccatgattataatcaagtggactgtgcagtaaacgaggaaggtatcctgacgtcgtggt
-gttcgtttttgttatttgtgccctatacgagtagataaaccatgaacagcacagtgtgaa
-cccatggttgattttaggctaccttatttttaatttccgttacacagaaacgaattccac
-aactaacatgccattaatttttcgatatcttataaaagatggtcgaaattcattcattta
-ttttttttcggttctcgaaagtcaactaagctgtcgcgttttgtttctctttagaggtaa
-aagtggctttgatctcctacgtttggatactagtcaaccattactccatttgatccgtga
-gtatcacctgtctaacatccagcattatgactcctcggcgaagaaaagacacacttctta
-gagtcgatgtgtattagctagggacacagttgtttaatacgatagtgagcccagggaggg
-cagtgcgtcccccagtagatttattcagctagtgtaagtataagatatctcacccacgag
-gttcaagtgatatgcagtcttagaataatacttatcctgaatttcgatattatgggtact
-tcaataatccgctagcgctactttatgtctcgttggacagcaggacacatggcagtctta
-aacactaaagacatcacctgaatgaatgtaatgggattacaagaatcaatgaggtattat
-atacgacgtaggaaactctggatatatacagtaatctagttacgccatcgcacttcattc
-ctctggaaacttagaagacatcagctgtacgtggaggaaccagacccccgtatgtagcca
-aatagaaccaaagttgcttatacaaacacacccaatgacaatggaccgctggagttcgta
-aactcggaacgtagtactgcacaaacccagcatttagcaataggagctacgtatgcaact
-cccacgtggtaataccttcaagctatcaatatataggtgcctagctaatcgcattcgcaa
-gcagtattcaagcttgtaaaccagtataataattacagaggctctatgaaacccaacttt
-ccagctaaaagtcccaattaaatggttatttcgtacttttaaagtcgcccgttctgttat
-tacgcgaattgattctactccaaaattaaacacaaattatcaaccgtttcatttatattt
-gtcaatgcagctgtttaaaataaggctctactaaattataattaagacacttattaccag
-atttctctagttaagtttgaaccagctcgactaccgcgaaagatacattcccttctctat
-ttttcagttcatctatgggtcagagaagcattgaatttattctattcaccctcgtcgttc
-acagcgaatcgtcagtgtgatcagtgtatgagaaatatcctaaaccgtttagtcagacca
-cacgcttagaacaagtggtctaaaaagactgccctggaaggagtaagaagtatacagctg
-atccggtgtatccttcagtcatctgccctatactaattacacgacgcaaggaaaaatagg
-tttattttctaggcaaacccttcataggtgactccgatgtgttacgaatcatgcttgaga
-atgtgctatcgttaccgacggataataacgatctccaatgaaccaaatgtagaatgtcta
-ttgattacccttttactattcgacttagagataggagatagaacctcagtgtactttttt
-agccgaatgggaatctttgggaggtgaatggccataaggtcgtaaatccaaccctcttaa
-agtcttccatattatatcgttgttcgtggaatcgataacagatttgttgacccatagtaa
-atgtatactagtttatgttgtaagtgtagattgttttccgattgccgtccaaactttatg
-tcgtaattgtagaccagtaaagttgaccaaggtaagtgcccagcgatcctgcgagatcga
-tcgccaatttttccagtcactgtaagtgtaggtttagataaagccgtatgagttatatca
-taagggcctcggaaagcagcttcgaaccaaagttcccttataatagtagtttaactataa
-aagtatatactggtctgtcgccctttcacgatttgttttaccggtttatgaagcgttacg
-tcattagagcggctccaatttaaggttaacggcttccatgtgtagttgtatacaaggata
-acttaaagtatctgttcagcgagctagttaagttatcctcgatagaacacaactcagagg
-tcccaagatcgggtttgcaacttgctaatttattctcaaggcaaattgggaattatcgat
-acctgtataccataaggtcgctcgatgtgatgcttatgtcttctggtgatcctaccttag
-ttagtgctgattaacggaacattaatgtttatcgttttgagatttagccaattctctgat
-tctaactcaagatgccttatctgacgtgctatgcagcccctaagtattttacattgtaat
-aggacacgctcctttaaaactcgccaaaaggtcgttgtggttctctactggttaactata
-taatttacagctttgttgagctagttcctctttggtttaagtcctcaatattagttggtt
-cgagcgataagttggctagttaccttagtcactatattagatccgaatgttatgcttcat
-ctgaagaccgccaccctccaaaatttcttttaagactcacttattgcaaggtgtaggtga
-attcggctcgtttctcaagtggtgtatctgtacacgagtttccatattttcatcaacagc
-caccgcacacttatgtcactctaggtattaaaagtcgctctacaaggggacgcaattaag
-aaacagacatgctagtcaaaaataaacatagcgaggcaccactaattcggccgcttatca
-atgggatgctctgcgcgagacgcgccagagctcagtagttagttcggacatacatttact
-tcagatgatcaattagttttctacaaatgcttactctaccccgaaaaaagtcaccagact
-cttacgtctctttagtatccttccgtcttatataaggtcagtcccccgtttcggtaccct
-ggaatttactaagaataatgaaacagcccccaaggacgtacgtttacaaatgatagacca
-gatcgcctagcttattccgacgcatgttgcatagaattgaaccaacggaatgtgagagta
-actagatgagccgaccacagcacccgtttgcgtcgcagaatacgcctgatagttcggcca
-cgaaatcatatgtcctttgagtattaagtatttgtaatgatcaatcgagctcaagcaagc
-ttacacttcctcggatattcagggaacttagtgcctttgaaagatacgttgatcaacgaa
-aaattgataatggctcatatggaatgcctacctcatagtgctgaattaacacagcactgc
-ggacctaacttttcgaggtttcaagttcacgtctcaaaacctaataggctggaatatgta
-gggatcctcggtgaatttgtgattgggtttgttgtagtactgaccaagtgaatattcttt
-ttttctaaaagcagatctgctgccgggcactacgaaggagatctctgtgtatcattattg
-cttcttgacatgatgactcttaaatcactgtgggtgtgcaaaacgatagcacaacccaat
-tcgatagtacatattgttgatacttcgcactaaaccgttcatatttaaaggttgtgctcc
-ttccttcgttaaatactggtgacttggtcctatctactattagctagacctctggggaac
-cacgcccccgtaaaacctgtgcaagagagggggtcatacatcttagacatcgcgcctcca
-ccagggaagcattgggtgattgaccaggtgtgtaacaaatatgattattcttatactaat
-attagcaaagatgcataatgatttgtattaaatgtataattgaattgataagggtctttt
-agtcagtgatagagtagtataaggtagacattagaactcttaaccggacgcagatttttc
-ggtcttagtaagccaattagtcgacaaaacaaggtaagagcggttactagtagtacctat
-aatgcactgaatcttcggtcgaagtatagttctaatgctatgcagattgtgacggcgaca
-aatgttcagacttatatcatgaaacaagctcttgtaagtattgacaaatgaaaagattga
-atatttttaaatacaaaatgcgcctacttattaggggaattaaccagattgaaggccaat
-cctcacatgtaatgagataatagacgataaatgaaattcttgtaatagttgaactgctac
-gtgatgggtattatatatgattgagatcctccaattgccgacgtcttgtcttgatgccca
-aaagattgtcaacgaggagctccctcgcgtacctgtcgtccgtatcataaacgacgcgac
-atgtacagcactccgaagtataagcaataataatgcgggtaatccagactagatcttttc
-ggactcaatgcggtttcacggtaaacatgattaataccggagagtagtcgagcttatcag
-cgatgcaagcgaattcattgtgccaggagatacgttgcagataaaaccggcaacgtatgt
-caacaagttttggcgatctcgttgtttgtattcgacgaggcgcgggaacttcaagaacta
-tcgtatattcaagtccattaccttttagtttcagactggtggagctgactaaagttatat
-catcattttgtacactggtttagttaacgataatttcagatttaacatgaccagacgata
-atcgctgtatatccagttggaatgtggtttgccagaaaggttaacttataatcaagcctc
-tcttcagtcttgattcgtcgtatcccatccattgcgctatacctcagtgtatttggagct
-gtagttataccgtgtgctaagatcagtagacatgacgagagcaatattatctaccttaca
-agcatcaacggacgtctagtcggaacaaaagactctaaaactcgaacttcaggttaatat
-actatagttctgtattcagcagttattcttatattcgatattatcttgcctattggatgt
-ctgactttagtatattaatcatagtatctgccatgtaaaggtgccagtactaaatctgtt
-tcacagtgcgaattataaacggttacaaccattaaagacaacaagaccctatagctttat
-ttgaattttgtcaatgcgcaacttggagctcgcgatacatcccaattagtctatagggtc
-gggacgattctacggcatttctggttataatgacaacatggattgtggcccgagaatcgc
-tctttcattaattaagcaatcattacagtcttataagcgctacttccgagtggtagcagg
-taactcgatataaggtcgcatgagccgaatagcttaaaaaacaggccaccgaacattgat
-agagaataccgaccacagcgcaacctttgattactttcattaaattgtacggctcactcg
-acatcaagcttaagattgcgataatgtgaactcaaatggatcagtactgaagaaccgtaa
-cccacttcgcagaaagcgtacccagagaagatacgctgttacaatatacagggtgaaatt
-attgcctgttcttcgtaaccatttcgccaaacttggttagaaatgatagccattcatgat
-agaaataagctgaatgataccagtatctttaactatgtagtcagggggaagataacgatg
-gtccatgtatgtttctgatatgtgacagtattggccgcgtaatttgctaacgaagctact
-taatgcctttgagcttcatatagatttctttaatcaaaatcggcaaaaagatagtatgag
-ctataatatatgctagtagagaactctggaccatcatctatatgaatactgattcgagcg
-tgcaattactttagcctgcgtactactgactctacaaaacactctgagataagtttgtag
-tcagtaagtcgctctctataaaccttttggatgaccattgtacagccacttatagatccc
-aataaatagcacaggagacagagtttttcaatgctcgatcatttgccgatagtattttcg
-tctaacctcagggcacctattatttgatacctaacctaacggccctttcacaatggagaa
-atatatgacatcgggacaaacacaaatggtgggtggccaggagatatgacatggtggcgt
-ctctaagaaacacggactccctctaggcaaactcacgtaaccaattttaatgtcaaacaa
-aacgctcgaaaagattttgccgtgtaatgacctggtacattgactggtcaggaatacatc
-actgtagttgccgtagtgtcctgttggtgttccatcaagacacatcgtataacgcaattt
-acgacggacatcagatcaagttatacagattatttaagtatcacgtgtgcattgggacat
-aagggatctcacacatgccttggaacatttttgctttgtgccgctttttcgctgcactac
-caatccttacttaccagtatattcaaaggtcgttaacagaatgagaaaggttagggctct
-aagttatcgtcgattgggatagacgagacatttgcgagcgccctccacggatacgaatct
-cccatatcaatgtgaactggatgctatgcagtttagttcttacgtctcctagtggtaaaa
-atcaaagtagcactcgcatagcagttattcagaacctaatacacaaaaccgtcaaacatt
-ttctaattctaggtatgggccgatcataggagctaaggtgaaactcataaatgttttgtt
-agatctagcatcctaaaaagatgcatatactgagtagctggcgtgcattctctcaattgt
-atcctttttaactgaactagtcggtcccatttcgtgactgagatctattaaccgataaga
-ttaataacactcgcattcgtatcagctcagagtgaagtttttcaataatttgactgatat
-attaacttctaaaataaccctttaagcctcggatccgtttcccaatcacatcaaaaattc
-ttattccaactatctacggattaacaacgtgcatggggatcgtagtaagaacttgttccg
-atcactttgagtatatcaagttgacggcccggttattattgaatagaaacattcacctgc
-taaattaaataccgcacatcggatacccgatttcagagggccgtcttactaagggcaggc
-tttgttcggtttaactgagatgttcattattttacagtatgcttcaactaatatgtaacg
-aaggacagtggatctgtctccatagtagatcttcagtcgtgaatttcataccgctcctat
-ttaagttcgcgttcgagttgttgatcatggcacgtgaaagcaacccctagtattctagac
-gaaaattttttctagttcatctgataatttgccaattcaaaaacaaccgctggtttcccg
-gcgcattctctaaaatggaagtcgaacctagagccattatttgtcggtaacccatgagtt
-ccttcttttcagaagttaatacactgtggtcctatacagaggaaaaacagcggttatata
-cgatcgtggcataacaacattggatcaagatagcaatttggctacctattctaattctca
-ctagattcggtattccactacaatatcggcagattaggattggatgaataatcggtgttt
-aagtccggttgcgtctccaatctcctaatttttattaatattgatcttggtgacctattg
-taaataaaaacttcaagactttgaataacggtgaaaagatagaagactcatttgaaaatg
-gatcatccacagatccaaacattagcaagacactaatccccaactagctattctgatcgc
-gatcgtgctgcagtactcctgtcacaatagtctgttcatgatctaattctttttgggctt
-tgttcgatggtgattcagaatctttatccggtcgcttccctgtagctactttgtggggat
-attgcccggggattatagggttgagatcgtttcctaaaagtatttaaaccaagtagactt
-caactaaactacatcagaacatcgtgaagacaccatacgcggtacctttatttaccgata
-acatttcttcaagaaataccggtaagcagcataatgaccctaaacagctcggggtatcgt
-cgtagttttaaattttatttaggttactgctcaaggaataaaaactaactatttaattta
-taataatattacaaggctcacactgattagatttgtctataagacttcgcgatcccccat
-taccggattgtcttaagaataaactagataaaccatgcattttctagataaggcctttag
-tctaattagatacaaaaaacacgatagttgcatccttaatttattgtgtcaaacctggaa
-ccttttaattacccgcaaatcactttatgtcgagactacctctgaaatttattatctacc
-taccgcatgaggacttgaaccatcttgtaggagttatgtttattagctaagattcgttta
-tcctgtagcggtccatgtatattcaacaagcaaaaagcactcagaattgtttttagttga
-gtcaagactgatatataaataagtttccctagttttttcgtggtgggacgatattgaatt
-gaatcttaaccgaagagtttcccactctgtcgcacaataatacacgccaatatttccagc
-cctgcttatgccttaatcggttactcaatctcccattgaagttcattttgatctgcatag
-aagtttcgggcccagccttttttctgccaccttcctccaagctctgtagacgcactctaa
-gattgatgctcacatgtattaattctacattaacataaatatataagtcatgcatcttcg
-agtaaaatatctggttctccaacatgtcctggcacgtatcgttataatgcccatacatgt
-agtattaaaatgattgggttaactggatattaagatcatcgaaattgtaaagtcaaatta
-acaatactgtctcaagaccgtgtattcctcgtgctcggaagggctattacgcttacttcc
-gttttggtatcttaatatgactttcaaaaattaagttgcagtgagtcctacctgcgtgca
-tcggttagcaagagtataaaagttgtttaaacgaactacttgctttacaataccggtcgt
-atatatcgccgtgaatccagaagattgtcttctttggattatcaaccgagatcctgtgga
-ccgatgttttgggaccttcacagaggactccaggtagagctcgcttttgcattaatctaa
-gaattgtacctctctaaaagatctaaaacagtgaatgtgtatttcatggaaaaacacaga
-gaaacgtaaattactttaggccgaaaggcacatgagttattatacatatacgagatggtg
-gtatacatcgaattcggggcatacactatagttgcattgtatttagctgctttaaataat
-atgatattaccttccttacataagacattaccggcataccctggttttcaacttgtgggg
-ctttttgacgatcgcactctcatttgatccgagtagggcggtgacccctgcttttcaaat
-acaaaaatttcgctatgaaggtaatagattacttttcgctgttatgatagaaacggtaaa
-tttaaaattgaaacttctagaaaagtaaagtaacgagaaatgattttgtgaataatgcgg
-tcatgattgcgcaagtaagaaaaaaaggcaaaaggatgcgcggaatagaaacttatcagt
-cacgggtatcttgatttcattcttcttgtcaattgccgacataggatgaaatcagattcc
-aatgcaatacacagtaacccccacccttgattgtaatgtcgatttgaagttgtacgcgtc
-gacgaagtggatagtatacgggccttttgtacggtgcgatcaactatgaatctcggcgag
-ttagatggtcgtacaatctcacacatagaggtcacttgcctgtaatgacgaattttcggc
-taggtactcgaactttattagaagtaaaaatgtgggcaaaagaaggattccattttacaa
-gacgattacaatgagttacatgtctctcaacgtagtctttccctagtagtctttgaacta
-tttaggtactccagaaaattttagcaaagggtttctgtgtgaatccgccattcatgttta
-tgatggaacaataagaataacgccctcgtatgttatcgacagtgaagtcagcagttcggc
-caaaaacatattcaatttagtacagatccccagaagttaagctaagtgctctaaaatggc
-ctaaacggttatcaaagtaggtctaattactatactaacgggtgcatcgtaataactgct
-gtcgatgcaacactatatgatagtgtcgttttgctatatatgtacaatgtgacaaagaag
-ccttagcgattcttgcaaacttaggacttcggattctcaatcttaaatgtccgaaaacgc
-aaagattcaaaaatttaatctatgagcagatatgcctgatggtgactacgcgtatgttaa
-ggctaaatgttgacaaccgcacacataatcgaactattgatagtcgggagcataaccagg
-tgaacgtactttgttcacgacatttattgacatgttctaaatacgtctcaaaatcacggc
-gcactagaaaacgcaatcaaatcattgtcctggtttaagggccgtaatgccggtagtgtc
-aaacttcatgagaactttagctggcttttggccagtatttagggaccaagagcactagcc
-ttaagctgaatattttgccatttatctactgttataactttaaaacttggtggcaccaga
-cttgtcgatacacacgcatcaatctgtaacgtaaaaggtttactaagaacaagcgtagga
-attgagtttatattatatttaaactaaaagatgatattagcttctgagggcgatagggct
-ccaaatcataaagaggaatatattattacacgattagaaacccacaacatacctcgaatc
-gcccaaaagtttgacgaaacttggcagtactccacatctcagtaatacagttgggagagt
-ctcaaatgttgttttattactcaatgaaccaccctcataatttcactgctgttccattaa
-atttgcaaacgatcatttgctttgaagaaacgtaaaatcgacaaaattacagataagtag
-atgcataataaaaaaaactgctcgctataacacgatcatcgtgcattcttacttaggagc
-atcacccgcacaataacgtaccttaaactacaacactattagaccgagtactgtaattca
-cgaaagctcaagctcgcattgtaaagaacttgctctctcgtaaaatgtgataatagtttg
-cggagaggattcaattattttccattgcacctactccactagattcgataaaagaaggtg
-gtcctcccttaaaaagaaatgttaagtaacatcggaaccataagcaaagcatgtaagtga
-accgtcatccttccctaagaaacataaaggtttttaataatgtcgactgtgaactataac
-tgcatcctttcctgacctactccggttccttgttgttatttctgaacgagaccagtagat
-aaacaatgtaaaccacagtgggtaccaatggtgcatgtgacgctaccgttgttttaagtg
-cccgtacaaacataagaagtcataatcttacttgaaattaattttgccttttattttttt
-tcaggctcgaaattaatgatttgttttttttgaccttctagttacgctaatatgcggtcg
-cctgtggtttctattgagtcctataacgggatgggatctaatacgtttggttactagtaa
-acaaggtataaatttgataccggagtatcaactgtataacatcaagctttatgactcata
-cgcgaagtaatgacacaaggctttcaggagatcgcgagtacagagccactaaggggtgta
-ttacgatagtgacaccaccgagcgcactcactccccaagtagatttatgatcctacgcta
-agtattagatatataaccaaagaggttctagtcagtgcaactcttagaataataattagc
-cggttttgcctttttaggcctaatgcaatattcagctagcccttatgtatctcgcgttcc
-acagcaccactcatggcacgcgtttaaactaatcaaatataatctatgaatgttatgcca
-gtacttgaataaatcaggttttttataagtccttgcatactctcgttatatactgttaga
-gtcttaccccatagaaattctttcatctgcaaacttagaagaattctcagctacggggag
-cataaagtccccaggatgttgacaaatacaacaaatgtggcttatacaaacactccatat
-gaaaatcgaaccctcgtggtagttttagccgaaccttgtacggataaatccctccatttt
-ccaatagcagatacctatcctactacctcgtggtattaaattaaagcttgaaatatagag
-ctgcatagcttatccaattcccaagcacgagtctaccgtcgtaaccacgatttgatttac
-agacgctagagcaaacccatctttaaacatataagtaaaaattaaagggtgagtgcgtac
-gtgtttactagcaacttcgcttattaagacaattgtttataagccataattaaaaacata
-tgttcaacaggttcattgatatttgtaattgcacaggtttttaataaggatctacgtaag
-tataatgaacaaactttttaccagagttatattctgtactttgaaaatgctcctctaccg
-ccttagagactttcaattagattttttgcagttaatctatgcgtaagtgaaccatgcaag
-ggatgcgattcaaccgcctcgtgctaaccctatcgtctgtctcataactgtaggtctaat
-ataattttcagttttcgaacacataaccctttgaaaatctgctatttaatgtctcacctg
-catgcactatcttctatactgctcagaacggctatacgtcactatgctccaagtgacgat
-ttaaacgaagcaaggaataataggtttattttagtgcaaaacaattaagtgcggactacg
-tgctctttacaataagccttgtgattgggctataggttaagtcccatattaacgatctcc
-aatgtacaaaatcgacaatcgctttgcattacccggttactagtcgaattacagatagct
-gttagatactcactctaattttggacaacaatcccaatcttggggtcgtctatcgcctga
-agctcgtaaatccttccatcttaaacgattacatattatagacttgttcggggtagagat
-atcacagttgtgcaaacattgtaaatcgatactagtttatgttggtagtctagttgcttt
-taccattccccgaaaaacttgatctactatttcgacaacagtaaacttgaactaggtaag
-tgaaaacagagaatgcctcatagtgccactatttgtccactatatgtaagtgtagcttta
-cataatccactatgactgagatcattacggcctaggaaagcagcgtagaaaaaaagggcc
-cggatattacgactgtaactataaaactagttactggtagcgcgccatgtatagatttgt
-tttaccggttgtggttgcgttaacgaatttcagccgcgaaaattgatccgttaaccagtc
-catctcgacttctataaaacgataaagtaaagttgatgttcagcctccttcttatggttg
-catcgagagtacactactcagtgggaaatagatcggggttcctacttcagattgtattat
-ctaggcaattgccgattgtgccatacctggataaaataagctacctacatgtgatgctta
-tctattatcgtcatactaccttagggtgtcctgttgaacgctacattaatctttagccgt
-ttgagatgttccaatggataggagtctaacgcatgatgaagtttaggaaggcagagcatc
-ccactaagtatgtgacagtgtatttcgaaacgagacgttataaatagaaaaaaggtcctt
-ctggttctattctgctgaactattgaatggaaagattggttgacctacgtactatttgct
-tgaagtcatcaatttgacggggtgagagacatatggtgcatactttacggactctatatt
-ttagatcagaagcttagcagtcttctctacaccccctcacgacataattgcttttaagaa
-tctatgtttgattcctctacgggaattcggatccgttcgcatgtgcggtttatctaaacc
-aggggacatatgttcagctaaagcatacgaacactttgctaactagacgtatgtatagta
-gctataaatcccgacgatatttacaaaaagaaatgagactcaaatatatacatagcgacc
-ctacacttattcgcaccctgatctaggcgatcctagcacccacacccgaaagtgagcact
-agtgtcttccgtattaaatttactgcagttgagattttagttgtctactaaggattactc
-taacccgtaataaggatcaagactcggtactagctttactatcattccctatgtgttttc
-ctaactcacaagggtacgtaccagcctatgtaattacaataatgataaagacacaaagga
-agtaactttacaaatgagtctccagttacactagcttagtccctcccatcttgctttgaa
-gtctaaatacgcaatctctgaggatatacagcagaagaacactcataacgttggagtcca
-agaattagactcatagggcccccaacatttaatatgtactgtgagtttgaaggtgttcta
-ttgttaattcctgctcttgatacatgacacgtactccgtgtttaaggcttcggactgact
-ttctttcataagttgagcaacgaaaatttcagaatcgataagttggattcactaactaat
-acggctgattgaaaactccactccggacctatatggtcgacctttatacgtaaccgatat
-aaaacttataggctggtatatcgagccttcctagcgcaatttcggatggggtttcttcta
-ctactcaacaacggaatagtctttgtttagtaaaccagagctcaggacgcccaatacgta
-ggagagcgctgtggagcatgtgtcattatggactggagcactcttaaatcactctgcgtg
-tgctaaacgatagatcataacatgtcctgagtaaattttcttgatacgtcgcaatatacc
-gttattagttaaacgttctcatccgtcatgcgtgaaatacggctgtcgtgctcagatata
-ctattagcgactcatctcgcctaacacgcacacgtataaactcggaatgactgccgctct
-tacatattagaaatacagactacaccacggaagcattgggtcattctcaaccgctgtata
-aaagatgattagtcttataataagattaccaaagaggcagaatcatgggtagtaaatcta
-ttattcaagtgattaccgtcgtgtaggcagggagtgaggacgagatggtactcaggacaa
-atattaaccggacgaagtggtttacgtcgtactttcactattagtagtaaatacaaggta
-acaccggggaatagtactaaatataatgatatctatcttcgggagaacgagtcgtctatt
-gctttgaacattctcaaggcgtaaaatgtgctgacttatagcatgatacaaccgattgtt
-acttttgtctattcaaaagattgaatagttttttatacaaaagccgcatacttatgacgg
-ctagtatacagtttcatcccctagcatcaatgctatggacagtattgaacttataggaaa
-ttcttctaatagggcaaatccgtcgtgatgcctattttttttcagtcacatcctcaaatg
-gcactagtattgtcgggatcccattaacaggctcaaccacgagctcacgcgaggacatgt
-agtccgtatctttaacgaagcgacagcgacagaactcccatggataaccaattataaggc
-ccgtaatcctctagacatcgtttaccaataaatccgctttctccgtaatcatgttgaata
-ccccagagtagtccagatgataaccgatgaaacacaagtctttctcaatgcacttacggt
-gaacttattaccgccaacgtagctcatcaaggttgcgacatctagttgtgtgtttgcgac
-gagcccagcgaacttcatcaactttcgtatattcaacgccttgtaattttactttaagac
-gcctggtgatgtagattcttagataatcagtttgttatcggctgtactttaccataattt
-cacaggtttcaggtcaagaagattatagctgtatatacagttccatgctcggtgcacaga
-aacgtgatcggataataatcaatcgcttatgtcgtctttaggcgtatccaatacatgccc
-cgataccgcagtgtatttcgacatgtaggtataccgtcgcatttgagctcgagtcaggac
-gtcagctagattagattccttaatagaatataccgacctctagtccgaactaaactatag
-ataacgccaacttcaggttaattgtctagtcgtctgtttgcagatgggattcttagatga
-gtgagtatcggccatattggttcgagcactttagtttttgatgcataggatatgcaatgt
-atagctgaaagtactttatctgtttcaaactcacattgattaaaccggtaaacctttaaa
-gactacaagaaaatattcagtgagggcaattttgtcaatcacaatcttccagctagagat
-acttcacaatttgtcttgaggctacgcaacattagacggattttcgcgttttattgaaat
-aatcgaggggcccaagagtatccatagttcattttgtaagatttctttacaggcttatta
-cagcttcttcagactcctacatgcttacgagttatatgctagcatgtgaacaatagatta
-atatacaggaaaacgtacattgagagagatgaccctacacagcgcaaccgttgagtactt
-tcattaaagggtaacgctctcgagacagcatccttaagatggccttattgtcaaatcatt
-tgcagaagtacgcaagatccctaaccaacgtagaagaatccctacaaacacatgagacgc
-ggtgaaaatagacagggtgttagtattcaatcttcggagtatcaatttcgccaatcttgg
-tgagaaagcataccctttcttcagagaaagaagatcaatcataacactatctttaacgag
-gtacgcacgcgcatcattacctgcctccatggatctttaggatagcggaaagtattggca
-gcgtattgtgatttcgttcctactttatcaatttcacattcatatacatgtcttttatca
-aaatcgccaataagataggatgagctatattagatgctagtagagttcgcgccaacatca
-tcgataggaatactcaggacagcgtgataggacttttcaatccctaatactctctataat
-tataactctctcttaagtttggaggcagtaacgcgctctatataatcagtttgctgcacc
-attcttcagcctctgatacatacaaataaattccacagcagtaagagggtttaattgaga
-catcttgggaacttaggattttactctaacatcaccgaaacgattattggataccgtacc
-taaacgaactttctcaaggcagtaatataggacatccgcaataacacaaatgctgcctcc
-ccaggagttatgtcttcctggaggctatatcttacacccactcactataggcaaactaaa
-gtttaaatgttgattgtctaaaaaaaagatagataagagttggccggcgtagcacatgcg
-aaagtgaatcgtaagctataattctctggacttgaagttctgtcctgttcctctgcaaga
-aacaaacttcctttaaagctatttacgacgcacatctcagcaagttataaacatgttgga
-agtttctagtcggaattcccaaagaacggatctatctaatgcattcctacatttttcctg
-tctgccgatggtgccatcctattcaaagaatttcttaaaagtagattaaatgggactttt
-aacaatgagtaaccttacgcctctaagggttcctcgagtgccatacaccagtcaggtccg
-agccacatacacggagaacattctaacatagcattctcaactcgatcatttgcaggttac
-ttctttcctatcctagtgctaaaaatcatacttgcaatcccatagcacggattaagaacc
-taagaaacaattcagtaaaacatgttcgaattcttggtatgggaacatcattgcagctat
-ggtctaacgcattaatgtttgggtacatcttccatcatataaacaggaagagtctgacga
-cagggagtgcttgcgatcatgtctatcattgtgaaatcaaattgtagctcacatgtcgtc
-tatgagagcgtgtatccgataagatttagaaaaatagaagtcgtataagatctcactgaa
-cttttgaatgaatgtgaagcatatatgatctgctttaataaaactttatccataggatac
-gtttccaaatcaattcaataattattagtcaaaatagataaggatgaacaacctgaaggc
-cgatcggacgtagaaagtggtcccatcactttgagttgatattgttgaaccacacgttat
-tatggttttcaaacagtctcaggatattgtatatacagataatccgataccagttgtctg
-acgcccctcttacgtaccccaccctttgtgacgtttaaagcagttgttcagtattttaaa
-ctaggcggcaactaatttggaaagaagcacagtggatatgtctaaattcttgttattcag
-gcctgaatttaatacaccgcatagttaacttcgcggtagagttgttcatcatgcctcctc
-taagctaccacttctatgatacaccaatagttgttctacggaatctgataattggccaag
-tcataaacttccgctgcgttcaacccccttgctcgaatatccaactcgaaaagacagcct
-tttggtgtccggaacaaatcagttacttcttttctgatgttaattctctgtggtcagata
-cagaccaaaaactccgcggatttaccatcctccaagaacaaatttgcatcaacatagcat
-tttggctacatattctaagtctcaatagtttaggttttcaactacattatcccaacatta
-ggattggaggaataatagctgggtaagtccccttgcgtctacaatcgactattttttatg
-aatatgcttctgccgcacctatggttattaaaaaagtcatgactttgaagaaccctgaaa
-agatagatgaatcaggtgtaatggcagcagccaaagagcatataattagcaacactctaa
-gaacattatagatatgatgatagcgatcgtcatgatgttatccggtcacaatagtagctt
-catcagctaattcgttttgccagtggtgacttgcgctggaagaatcgttatacggtccct
-tccctcttgatacggtgggggcttattcaaccgcgtggattgggttgtcatacttgcatt
-aaacgatgtaaaccatctagtagtcaactatactaaatcacaaaatagtgatcaatacat
-acccgcttcatggttttaaccatttaattgattaaagatattccgctaagaaccattatc
-tacctaaactgatcgccgtatcctagtagtttgaaatttgatgtaccgtaatgatcaacg
-aagtaaaacgttatattgtatgtagaataataggtcttggagctaaatgatgtgattggt
-agtgaagacttacccttacaactttaccggtttctcggaagaatatactagagaatcaat
-gcatgggctacataagcactttagtctaatgagataaaaaatacacgagtcttccatcat
-gaattttttgtcgaaaaactcgaacctggtaatttaaaccatatatctttatgtcgtcaa
-taactctcatatgttttatataacttcccaatcacgacttgtaactgcttgttcgactga
-gctgtttgagctatgaggccgggatccggttgagctacatctatttgctacaagaaaaat
-gaaagcacatttgttgggagttctggctacactcatagagaaataagtggcccgagtggg
-tgcggcctgcctccatattcaagtgtatcttaaaccaagtggttccaacgctcgcgctaa
-agaattaaagcctttatttcctccacggagtagcccgtaatccggttcgaaagagaccat
-tgaagttaattttcatatccagtgaagtttaggcacaagcatgtgttctgccacatgcct
-caaagcgctcttcaaccaagatatgattcatcctaacttcgatgaatgcgtctgtaacat
-aaatatagaaggaatgattcggcgagttaattttcgccttctccaacatggcatccctac
-gttcgttataaggaccatacatgtaggttttaaaggtttgcggttaatcgatatttacat
-catagaaattctatagtcaaatttacaagactctagatactcactcgttgcagccggcta
-ggaagcgctttgtaccttacttcccttttcgttgcgtaatatgaatttcatatagtaagt
-tcaaggcactcatacctccgtgaagagggtagatagactattaaagttgtttaatagtac
-gtattgatggaaatgacccgtaggagatttaccactcaatccacaagattcgctgctgtg
-cattatcaaaacagtgcatgtcgaaacatgggttgggtccttcaaacacgaatccaggta
-gagatacctttgcaattttt
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/examples/regexdna-output.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-agggtaaa|tttaccct 0
-[cgt]gggtaaa|tttaccc[acg] 3
-a[act]ggtaaa|tttacc[agt]t 9
-ag[act]gtaaa|tttac[agt]ct 8
-agg[act]taaa|ttta[agt]cct 10
-aggg[acg]aaa|ttt[cgt]ccct 3
-agggt[cgt]aa|tt[acg]accct 4
-agggta[cgt]a|t[acg]taccct 3
-agggtaa[cgt]|[acg]ttaccct 5
-
-101745
-100000
-133640
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/examples/shootout-regex-dna-bytes.rs
+++ /dev/null
@@ -1,66 +0,0 @@
-// The Computer Language Benchmarks Game
-// http://benchmarksgame.alioth.debian.org/
-//
-// contributed by the Rust Project Developers
-// contributed by TeXitoi
-// contributed by BurntSushi
-
-extern crate regex;
-
-use std::io::{self, Read};
-use std::sync::Arc;
-use std::thread;
-
-macro_rules! regex { ($re:expr) => { ::regex::bytes::Regex::new($re).unwrap() } }
-
-fn main() {
-    let mut seq = Vec::with_capacity(51 * (1 << 20));
-    io::stdin().read_to_end(&mut seq).unwrap();
-    let ilen = seq.len();
-
-    seq = regex!(">[^\n]*\n|\n").replace_all(&seq, &b""[..]).into_owned();
-    let clen = seq.len();
-    let seq_arc = Arc::new(seq.clone());
-
-    let variants = vec![
-        regex!("agggtaaa|tttaccct"),
-        regex!("[cgt]gggtaaa|tttaccc[acg]"),
-        regex!("a[act]ggtaaa|tttacc[agt]t"),
-        regex!("ag[act]gtaaa|tttac[agt]ct"),
-        regex!("agg[act]taaa|ttta[agt]cct"),
-        regex!("aggg[acg]aaa|ttt[cgt]ccct"),
-        regex!("agggt[cgt]aa|tt[acg]accct"),
-        regex!("agggta[cgt]a|t[acg]taccct"),
-        regex!("agggtaa[cgt]|[acg]ttaccct"),
-    ];
-    let mut counts = vec![];
-    for variant in variants {
-        let seq = seq_arc.clone();
-        let restr = variant.to_string();
-        let future = thread::spawn(move || variant.find_iter(&seq).count());
-        counts.push((restr, future));
-    }
-
-    let substs = vec![
-        (regex!("B"), &b"(c|g|t)"[..]),
-        (regex!("D"), &b"(a|g|t)"[..]),
-        (regex!("H"), &b"(a|c|t)"[..]),
-        (regex!("K"), &b"(g|t)"[..]),
-        (regex!("M"), &b"(a|c)"[..]),
-        (regex!("N"), &b"(a|c|g|t)"[..]),
-        (regex!("R"), &b"(a|g)"[..]),
-        (regex!("S"), &b"(c|g)"[..]),
-        (regex!("V"), &b"(a|c|g)"[..]),
-        (regex!("W"), &b"(a|t)"[..]),
-        (regex!("Y"), &b"(c|t)"[..]),
-    ];
-    let mut seq = seq;
-    for (re, replacement) in substs.into_iter() {
-        seq = re.replace_all(&seq, replacement).into_owned();
-    }
-
-    for (variant, count) in counts {
-        println!("{} {}", variant, count.join().unwrap());
-    }
-    println!("\n{}\n{}\n{}", ilen, clen, seq.len());
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/examples/shootout-regex-dna-cheat.rs
+++ /dev/null
@@ -1,88 +0,0 @@
-// The Computer Language Benchmarks Game
-// http://benchmarksgame.alioth.debian.org/
-//
-// contributed by the Rust Project Developers
-// contributed by TeXitoi
-// contributed by BurntSushi
-
-// This technically solves the problem posed in the `regex-dna` benchmark, but
-// it cheats by combining all of the replacements into a single regex and
-// replacing them with a single linear scan. i.e., it re-implements
-// `replace_all`. As a result, this is around 25% faster. ---AG
-
-extern crate regex;
-
-use std::io::{self, Read};
-use std::sync::Arc;
-use std::thread;
-
-macro_rules! regex { ($re:expr) => { ::regex::Regex::new($re).unwrap() } }
-
-fn main() {
-    let mut seq = String::with_capacity(50 * (1 << 20));
-    io::stdin().read_to_string(&mut seq).unwrap();
-    let ilen = seq.len();
-
-    seq = regex!(">[^\n]*\n|\n").replace_all(&seq, "").into_owned();
-    let clen = seq.len();
-    let seq_arc = Arc::new(seq.clone());
-
-    let variants = vec![
-        regex!("agggtaaa|tttaccct"),
-        regex!("[cgt]gggtaaa|tttaccc[acg]"),
-        regex!("a[act]ggtaaa|tttacc[agt]t"),
-        regex!("ag[act]gtaaa|tttac[agt]ct"),
-        regex!("agg[act]taaa|ttta[agt]cct"),
-        regex!("aggg[acg]aaa|ttt[cgt]ccct"),
-        regex!("agggt[cgt]aa|tt[acg]accct"),
-        regex!("agggta[cgt]a|t[acg]taccct"),
-        regex!("agggtaa[cgt]|[acg]ttaccct"),
-    ];
-    let mut counts = vec![];
-    for variant in variants {
-        let seq = seq_arc.clone();
-        let restr = variant.to_string();
-        let future = thread::spawn(move || variant.find_iter(&seq).count());
-        counts.push((restr, future));
-    }
-
-    let substs = vec![
-        (b'B', "(c|g|t)"),
-        (b'D', "(a|g|t)"),
-        (b'H', "(a|c|t)"),
-        (b'K', "(g|t)"),
-        (b'M', "(a|c)"),
-        (b'N', "(a|c|g|t)"),
-        (b'R', "(a|g)"),
-        (b'S', "(c|g)"),
-        (b'V', "(a|c|g)"),
-        (b'W', "(a|t)"),
-        (b'Y', "(c|t)"),
-    ]; // combined into one regex in `replace_all`
-    let seq = replace_all(&seq, substs);
-
-    for (variant, count) in counts {
-        println!("{} {}", variant, count.join().unwrap());
-    }
-    println!("\n{}\n{}\n{}", ilen, clen, seq.len());
-}
-
-fn replace_all(text: &str, substs: Vec<(u8, &str)>) -> String {
-    let mut replacements = vec![""; 256];
-    let mut alternates = vec![];
-    for (re, replacement) in substs {
-        replacements[re as usize] = replacement;
-        alternates.push((re as char).to_string());
-    }
-
-    let re = regex!(&alternates.join("|"));
-    let mut new = String::with_capacity(text.len());
-    let mut last_match = 0;
-    for m in re.find_iter(text) {
-        new.push_str(&text[last_match..m.start()]);
-        new.push_str(replacements[text.as_bytes()[m.start()] as usize]);
-        last_match = m.end();
-    }
-    new.push_str(&text[last_match..]);
-    new
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/examples/shootout-regex-dna-replace.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-extern crate regex;
-
-use std::io::{self, Read};
-
-macro_rules! regex {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new($re).build().unwrap().into_regex()
-    }}
-}
-
-fn main() {
-    let mut seq = String::with_capacity(50 * (1 << 20));
-    io::stdin().read_to_string(&mut seq).unwrap();
-    let ilen = seq.len();
-
-    seq = regex!(">[^\n]*\n|\n").replace_all(&seq, "").into_owned();
-    println!("original: {}, replaced: {}", ilen, seq.len());
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/examples/shootout-regex-dna-single-cheat.rs
+++ /dev/null
@@ -1,73 +0,0 @@
-// The Computer Language Benchmarks Game
-// http://benchmarksgame.alioth.debian.org/
-//
-// contributed by the Rust Project Developers
-// contributed by TeXitoi
-// contributed by BurntSushi
-
-extern crate regex;
-
-use std::io::{self, Read};
-
-macro_rules! regex { ($re:expr) => { ::regex::Regex::new($re).unwrap() } }
-
-fn main() {
-    let mut seq = String::with_capacity(50 * (1 << 20));
-    io::stdin().read_to_string(&mut seq).unwrap();
-    let ilen = seq.len();
-
-    seq = regex!(">[^\n]*\n|\n").replace_all(&seq, "").into_owned();
-    let clen = seq.len();
-
-    let variants = vec![
-        regex!("agggtaaa|tttaccct"),
-        regex!("[cgt]gggtaaa|tttaccc[acg]"),
-        regex!("a[act]ggtaaa|tttacc[agt]t"),
-        regex!("ag[act]gtaaa|tttac[agt]ct"),
-        regex!("agg[act]taaa|ttta[agt]cct"),
-        regex!("aggg[acg]aaa|ttt[cgt]ccct"),
-        regex!("agggt[cgt]aa|tt[acg]accct"),
-        regex!("agggta[cgt]a|t[acg]taccct"),
-        regex!("agggtaa[cgt]|[acg]ttaccct"),
-    ];
-    for re in variants {
-        println!("{} {}", re.to_string(), re.find_iter(&seq).count());
-    }
-
-    let substs = vec![
-        (b'B', "(c|g|t)"),
-        (b'D', "(a|g|t)"),
-        (b'H', "(a|c|t)"),
-        (b'K', "(g|t)"),
-        (b'M', "(a|c)"),
-        (b'N', "(a|c|g|t)"),
-        (b'R', "(a|g)"),
-        (b'S', "(c|g)"),
-        (b'V', "(a|c|g)"),
-        (b'W', "(a|t)"),
-        (b'Y', "(c|t)"),
-    ]; // combined into one regex in `replace_all`
-    let seq = replace_all(&seq, substs);
-
-    println!("\n{}\n{}\n{}", ilen, clen, seq.len());
-}
-
-fn replace_all(text: &str, substs: Vec<(u8, &str)>) -> String {
-    let mut replacements = vec![""; 256];
-    let mut alternates = vec![];
-    for (re, replacement) in substs {
-        replacements[re as usize] = replacement;
-        alternates.push((re as char).to_string());
-    }
-
-    let re = regex!(&alternates.join("|"));
-    let mut new = String::with_capacity(text.len());
-    let mut last_match = 0;
-    for m in re.find_iter(text) {
-        new.push_str(&text[last_match..m.start()]);
-        new.push_str(replacements[text.as_bytes()[m.start()] as usize]);
-        last_match = m.end();
-    }
-    new.push_str(&text[last_match..]);
-    new
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/examples/shootout-regex-dna-single.rs
+++ /dev/null
@@ -1,55 +0,0 @@
-// The Computer Language Benchmarks Game
-// http://benchmarksgame.alioth.debian.org/
-//
-// contributed by the Rust Project Developers
-// contributed by TeXitoi
-// contributed by BurntSushi
-
-extern crate regex;
-
-use std::io::{self, Read};
-
-macro_rules! regex { ($re:expr) => { ::regex::Regex::new($re).unwrap() } }
-
-fn main() {
-    let mut seq = String::with_capacity(50 * (1 << 20));
-    io::stdin().read_to_string(&mut seq).unwrap();
-    let ilen = seq.len();
-
-    seq = regex!(">[^\n]*\n|\n").replace_all(&seq, "").into_owned();
-    let clen = seq.len();
-
-    let variants = vec![
-        regex!("agggtaaa|tttaccct"),
-        regex!("[cgt]gggtaaa|tttaccc[acg]"),
-        regex!("a[act]ggtaaa|tttacc[agt]t"),
-        regex!("ag[act]gtaaa|tttac[agt]ct"),
-        regex!("agg[act]taaa|ttta[agt]cct"),
-        regex!("aggg[acg]aaa|ttt[cgt]ccct"),
-        regex!("agggt[cgt]aa|tt[acg]accct"),
-        regex!("agggta[cgt]a|t[acg]taccct"),
-        regex!("agggtaa[cgt]|[acg]ttaccct"),
-    ];
-    for re in variants {
-        println!("{} {}", re.to_string(), re.find_iter(&seq).count());
-    }
-
-    let substs = vec![
-        (regex!("B"), "(c|g|t)"),
-        (regex!("D"), "(a|g|t)"),
-        (regex!("H"), "(a|c|t)"),
-        (regex!("K"), "(g|t)"),
-        (regex!("M"), "(a|c)"),
-        (regex!("N"), "(a|c|g|t)"),
-        (regex!("R"), "(a|g)"),
-        (regex!("S"), "(c|g)"),
-        (regex!("V"), "(a|c|g)"),
-        (regex!("W"), "(a|t)"),
-        (regex!("Y"), "(c|t)"),
-    ];
-    let mut seq = seq;
-    for (re, replacement) in substs.into_iter() {
-        seq = re.replace_all(&seq, replacement).into_owned();
-    }
-    println!("\n{}\n{}\n{}", ilen, clen, seq.len());
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/examples/shootout-regex-dna.rs
+++ /dev/null
@@ -1,66 +0,0 @@
-// The Computer Language Benchmarks Game
-// http://benchmarksgame.alioth.debian.org/
-//
-// contributed by the Rust Project Developers
-// contributed by TeXitoi
-// contributed by BurntSushi
-
-extern crate regex;
-
-use std::io::{self, Read};
-use std::sync::Arc;
-use std::thread;
-
-macro_rules! regex { ($re:expr) => { ::regex::Regex::new($re).unwrap() } }
-
-fn main() {
-    let mut seq = String::with_capacity(51 * (1 << 20));
-    io::stdin().read_to_string(&mut seq).unwrap();
-    let ilen = seq.len();
-
-    seq = regex!(">[^\n]*\n|\n").replace_all(&seq, "").into_owned();
-    let clen = seq.len();
-    let seq_arc = Arc::new(seq.clone());
-
-    let variants = vec![
-        regex!("agggtaaa|tttaccct"),
-        regex!("[cgt]gggtaaa|tttaccc[acg]"),
-        regex!("a[act]ggtaaa|tttacc[agt]t"),
-        regex!("ag[act]gtaaa|tttac[agt]ct"),
-        regex!("agg[act]taaa|ttta[agt]cct"),
-        regex!("aggg[acg]aaa|ttt[cgt]ccct"),
-        regex!("agggt[cgt]aa|tt[acg]accct"),
-        regex!("agggta[cgt]a|t[acg]taccct"),
-        regex!("agggtaa[cgt]|[acg]ttaccct"),
-    ];
-    let mut counts = vec![];
-    for variant in variants {
-        let seq = seq_arc.clone();
-        let restr = variant.to_string();
-        let future = thread::spawn(move || variant.find_iter(&seq).count());
-        counts.push((restr, future));
-    }
-
-    let substs = vec![
-        (regex!("B"), "(c|g|t)"),
-        (regex!("D"), "(a|g|t)"),
-        (regex!("H"), "(a|c|t)"),
-        (regex!("K"), "(g|t)"),
-        (regex!("M"), "(a|c)"),
-        (regex!("N"), "(a|c|g|t)"),
-        (regex!("R"), "(a|g)"),
-        (regex!("S"), "(c|g)"),
-        (regex!("V"), "(a|c|g)"),
-        (regex!("W"), "(a|t)"),
-        (regex!("Y"), "(c|t)"),
-    ];
-    let mut seq = seq;
-    for (re, replacement) in substs.into_iter() {
-        seq = re.replace_all(&seq, replacement).into_owned();
-    }
-
-    for (variant, count) in counts {
-        println!("{} {}", variant, count.join().unwrap());
-    }
-    println!("\n{}\n{}\n{}", ilen, clen, seq.len());
-}
deleted file mode 100755
--- a/third_party/rust/regex-0.2.1/scripts/frequencies.py
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env python
-
-# This does simple normalized frequency analysis on UTF-8 encoded text. The
-# result of the analysis is translated to a ranked list, where every byte is
-# assigned a rank. This list is written to src/freqs.rs.
-#
-# Currently, the frequencies are generated from the following corpuses:
-#
-#   * The CIA world fact book
-#   * The source code of rustc
-#   * Septuaginta
-
-from __future__ import absolute_import, division, print_function
-
-import argparse
-from collections import Counter
-import sys
-
-preamble = '''// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// NOTE: The following code was generated by "scripts/frequencies.py", do not
-// edit directly
-'''
-
-
-def eprint(*args, **kwargs):
-    kwargs['file'] = sys.stderr
-    print(*args, **kwargs)
-
-
-def main():
-    p = argparse.ArgumentParser()
-    p.add_argument('corpus', metavar='FILE', nargs='+')
-    args = p.parse_args()
-
-    # Get frequency counts of each byte.
-    freqs = Counter()
-    for i in range(0, 256):
-        freqs[i] = 0
-
-    eprint('reading entire corpus into memory')
-    corpus = []
-    for fpath in args.corpus:
-        corpus.append(open(fpath, 'rb').read())
-
-    eprint('computing byte frequencies')
-    for c in corpus:
-        for byte in c:
-            freqs[byte] += 1.0 / float(len(c))
-
-    eprint('writing Rust code')
-    # Get the rank of each byte. A lower rank => lower relative frequency.
-    rank = [0] * 256
-    for i, (byte, _) in enumerate(freqs.most_common()):
-        # print(byte)
-        rank[byte] = 255 - i
-
-    # Forcefully set the highest rank possible for bytes that start multi-byte
-    # UTF-8 sequences. The idea here is that a continuation byte will be more
-    # discerning in a homogenous haystack.
-    for byte in range(0xC0, 0xFF + 1):
-        rank[byte] = 255
-
-    # Now write Rust.
-    olines = ['pub const BYTE_FREQUENCIES: [u8; 256] = [']
-    for byte in range(256):
-        olines.append('    %3d, // %r' % (rank[byte], chr(byte)))
-    olines.append('];')
-
-    print(preamble)
-    print('\n'.join(olines))
-
-if __name__ == '__main__':
-    main()
deleted file mode 100755
--- a/third_party/rust/regex-0.2.1/scripts/regex-match-tests.py
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/usr/bin/env python2
-
-# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-from __future__ import absolute_import, division, print_function
-import argparse
-import datetime
-import os.path as path
-
-
-def print_tests(tests):
-    print('\n'.join([test_tostr(t) for t in tests]))
-
-
-def read_tests(f):
-    basename, _ = path.splitext(path.basename(f))
-    tests = []
-    for lineno, line in enumerate(open(f), 1):
-        fields = filter(None, map(str.strip, line.split('\t')))
-        if not (4 <= len(fields) <= 5) \
-           or 'E' not in fields[0] or fields[0][0] == '#':
-            continue
-
-        opts, pat, text, sgroups = fields[0:4]
-        groups = []  # groups as integer ranges
-        if sgroups == 'NOMATCH':
-            groups = [None]
-        elif ',' in sgroups:
-            noparen = map(lambda s: s.strip('()'), sgroups.split(')('))
-            for g in noparen:
-                s, e = map(str.strip, g.split(','))
-                if s == '?' and e == '?':
-                    groups.append(None)
-                else:
-                    groups.append((int(s), int(e)))
-        else:
-            # This skips tests that should result in an error.
-            # There aren't many, so I think we can just capture those
-            # manually. Possibly fix this in future.
-            continue
-
-        if pat == 'SAME':
-            pat = tests[-1][1]
-        if '$' in opts:
-            pat = pat.decode('string_escape')
-            text = text.decode('string_escape')
-        if 'i' in opts:
-            pat = '(?i)%s' % pat
-
-        name = '%s_%d' % (basename, lineno)
-        tests.append((name, pat, text, groups))
-    return tests
-
-
-def test_tostr(t):
-    lineno, pat, text, groups = t
-    options = map(group_tostr, groups)
-    return 'mat!(match_%s, r"%s", r"%s", %s);' \
-           % (lineno, pat, '' if text == "NULL" else text, ', '.join(options))
-
-
-def group_tostr(g):
-    if g is None:
-        return 'None'
-    else:
-        return 'Some((%d, %d))' % (g[0], g[1])
-
-
-if __name__ == '__main__':
-    parser = argparse.ArgumentParser(
-        description='Generate match tests from an AT&T POSIX test file.')
-    aa = parser.add_argument
-    aa('files', nargs='+',
-       help='A list of dat AT&T POSIX test files. See src/testdata')
-    args = parser.parse_args()
-
-    tests = []
-    for f in args.files:
-        tests += read_tests(f)
-
-    tpl = '''// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// DO NOT EDIT. Automatically generated by 'scripts/regex-match-tests.py'
-// on {date}.
-'''
-    print(tpl.format(date=str(datetime.datetime.now())))
-
-    for f in args.files:
-        print('// Tests from %s' % path.basename(f))
-        print_tests(read_tests(f))
-        print('')
deleted file mode 100755
--- a/third_party/rust/regex-0.2.1/scripts/unicode.py
+++ /dev/null
@@ -1,305 +0,0 @@
-#!/usr/bin/env python2
-#
-# Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-# This script uses the following Unicode tables:
-# - DerivedCoreProperties.txt
-# - EastAsianWidth.txt
-# - PropList.txt
-# - Scripts.txt
-# - UnicodeData.txt
-#
-# Since this should not require frequent updates, we just store this
-# out-of-line and check the unicode.rs file into git.
-
-from collections import defaultdict
-import fileinput, re, os, sys
-
-preamble = '''// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// NOTE: The following code was generated by "scripts/unicode.py", do not edit
-// directly
-
-#![allow(warnings)]
-'''
-
-# Mapping taken from Table 12 from:
-# http://www.unicode.org/reports/tr44/#General_Category_Values
-expanded_categories = {
-    'Lu': ['LC', 'L'], 'Ll': ['LC', 'L'], 'Lt': ['LC', 'L'],
-    'Lm': ['L'], 'Lo': ['L'],
-    'Mn': ['M'], 'Mc': ['M'], 'Me': ['M'],
-    'Nd': ['N'], 'Nl': ['N'], 'No': ['No'],
-    'Pc': ['P'], 'Pd': ['P'], 'Ps': ['P'], 'Pe': ['P'],
-    'Pi': ['P'], 'Pf': ['P'], 'Po': ['P'],
-    'Sm': ['S'], 'Sc': ['S'], 'Sk': ['S'], 'So': ['S'],
-    'Zs': ['Z'], 'Zl': ['Z'], 'Zp': ['Z'],
-    'Cc': ['C'], 'Cf': ['C'], 'Cs': ['C'], 'Co': ['C'], 'Cn': ['C'],
-}
-
-def fetch(f):
-    if not os.path.exists(f):
-        os.system("curl -O http://www.unicode.org/Public/UNIDATA/%s"
-                  % f)
-
-    if not os.path.exists(f):
-        sys.stderr.write("cannot load %s" % f)
-        exit(1)
-
-def is_surrogate(n):
-    return 0xD800 <= n <= 0xDFFF
-
-def load_unicode_data(f):
-    fetch(f)
-    gencats = {}
-
-    udict = {};
-    range_start = -1;
-    for line in fileinput.input(f):
-        data = line.split(';');
-        if len(data) != 15:
-            continue
-        cp = int(data[0], 16);
-        if is_surrogate(cp):
-            continue
-        if range_start >= 0:
-            for i in xrange(range_start, cp):
-                udict[i] = data;
-            range_start = -1;
-        if data[1].endswith(", First>"):
-            range_start = cp;
-            continue;
-        udict[cp] = data;
-
-    for code in udict:
-        [code_org, name, gencat, combine, bidi,
-         decomp, deci, digit, num, mirror,
-         old, iso, upcase, lowcase, titlecase ] = udict[code];
-
-        # place letter in categories as appropriate
-        for cat in [gencat, "Assigned"] + expanded_categories.get(gencat, []):
-            if cat not in gencats:
-                gencats[cat] = []
-            gencats[cat].append(code)
-
-    # generate Not_Assigned from Assigned
-    gencats["Cn"] = gen_unassigned(gencats["Assigned"])
-    # Assigned is not a real category
-    del(gencats["Assigned"])
-    # Other contains Not_Assigned
-    gencats["C"].extend(gencats["Cn"])
-    gencats = group_cats(gencats)
-
-    return gencats
-
-def group_cats(cats):
-    cats_out = {}
-    for cat in cats:
-        cats_out[cat] = group_cat(cats[cat])
-    return cats_out
-
-def group_cat(cat):
-    cat_out = []
-    letters = sorted(set(cat))
-    cur_start = letters.pop(0)
-    cur_end = cur_start
-    for letter in letters:
-        assert letter > cur_end, \
-            "cur_end: %s, letter: %s" % (hex(cur_end), hex(letter))
-        if letter == cur_end + 1:
-            cur_end = letter
-        else:
-            cat_out.append((cur_start, cur_end))
-            cur_start = cur_end = letter
-    cat_out.append((cur_start, cur_end))
-    return cat_out
-
-def ungroup_cat(cat):
-    cat_out = []
-    for (lo, hi) in cat:
-        while lo <= hi:
-            cat_out.append(lo)
-            lo += 1
-    return cat_out
-
-def gen_unassigned(assigned):
-    assigned = set(assigned)
-    return ([i for i in range(0, 0xd800) if i not in assigned] +
-            [i for i in range(0xe000, 0x110000) if i not in assigned])
-
-def format_table_content(f, content, indent):
-    line = " "*indent
-    first = True
-    for chunk in content.split(","):
-        if len(line) + len(chunk) < 78:
-            if first:
-                line += chunk
-            else:
-                line += ", " + chunk
-            first = False
-        else:
-            f.write(line + ",\n")
-            line = " "*indent + chunk
-    f.write(line)
-
-def load_properties(f, interestingprops):
-    fetch(f)
-    props = {}
-    re1 = re.compile("^ *([0-9A-F]+) *; *(\w+)")
-    re2 = re.compile("^ *([0-9A-F]+)\.\.([0-9A-F]+) *; *(\w+)")
-
-    for line in fileinput.input(f):
-        prop = None
-        d_lo = 0
-        d_hi = 0
-        m = re1.match(line)
-        if m:
-            d_lo = m.group(1)
-            d_hi = m.group(1)
-            prop = m.group(2)
-        else:
-            m = re2.match(line)
-            if m:
-                d_lo = m.group(1)
-                d_hi = m.group(2)
-                prop = m.group(3)
-            else:
-                continue
-        if interestingprops and prop not in interestingprops:
-            continue
-        d_lo = int(d_lo, 16)
-        d_hi = int(d_hi, 16)
-        if prop not in props:
-            props[prop] = []
-        props[prop].append((d_lo, d_hi))
-
-    # optimize props if possible
-    for prop in props:
-        props[prop] = group_cat(ungroup_cat(props[prop]))
-
-    return props
-
-def load_case_folding(f):
-    fetch(f)
-    re1 = re.compile("^ *([0-9A-F]+) *; *[CS] *; *([0-9A-F]+) *;")
-    all_pairs = defaultdict(list)
-    for line in fileinput.input(f):
-        m = re1.match(line)
-        if m:
-            a = int(m.group(1), 16)
-            b = int(m.group(2), 16)
-            all_pairs[a].append(b)
-            all_pairs[b].append(a)
-    both = set()
-    for k, vs in all_pairs.iteritems():
-        for v in vs:
-            both.add((k, v))
-            for v2 in all_pairs[v]:
-                both.add((k, v2))
-    c_plus_s_both = sorted((k1, k2) for k1, k2 in both if k1 != k2)
-    return {"C_plus_S_both": c_plus_s_both}
-
-def escape_char(c):
-    return "'\\u{%x}'" % c
-
-def emit_table(f, name, t_data, t_type = "&'static [(char, char)]", is_pub=True,
-        pfun=lambda x: "(%s,%s)" % (escape_char(x[0]), escape_char(x[1]))):
-    pub_string = ""
-    if is_pub:
-        pub_string = "pub "
-    f.write("    %sconst %s: %s = &[\n" % (pub_string, name, t_type))
-    data = ""
-    first = True
-    for dat in t_data:
-        if not first:
-            data += ","
-        first = False
-        data += pfun(dat)
-    format_table_content(f, data, 8)
-    f.write("\n    ];\n\n")
-
-def emit_property_module(f, mod, tbl):
-    f.write("pub mod %s {\n" % mod)
-    keys = tbl.keys()
-    keys.sort()
-    for cat in keys:
-        emit_table(f, "%s_table" % cat, tbl[cat])
-    f.write("}\n\n")
-
-def emit_regex_module(f, cats, w_data):
-    f.write("pub mod regex {\n")
-    regex_class = "&'static [(char, char)]"
-    class_table = "&'static [(&'static str, %s)]" % regex_class
-
-    emit_table(f, "UNICODE_CLASSES", cats, class_table,
-        pfun=lambda x: "(\"%s\",super::%s::%s_table)" % (x[0], x[1], x[0]))
-
-    f.write("    pub const PERLD: %s = super::general_category::Nd_table;\n\n"
-            % regex_class)
-    f.write("    pub const PERLS: %s = super::property::White_Space_table;\n\n"
-            % regex_class)
-
-    emit_table(f, "PERLW", w_data, regex_class)
-
-    f.write("}\n\n")
-
-if __name__ == "__main__":
-    r = "unicode.rs"
-    if os.path.exists(r):
-        os.remove(r)
-    with open(r, "w") as rf:
-        # write the file's preamble
-        rf.write(preamble)
-
-        # download and parse all the data
-        fetch("ReadMe.txt")
-        with open("ReadMe.txt") as readme:
-            pattern = "for Version (\d+)\.(\d+)\.(\d+) of the Unicode"
-            unicode_version = re.search(pattern, readme.read()).groups()
-        gencats = load_unicode_data("UnicodeData.txt")
-        want_derived = ["XID_Start", "XID_Continue", "Alphabetic", "Lowercase", "Uppercase"]
-        other_derived = ["Default_Ignorable_Code_Point", "Grapheme_Extend"]
-        derived = load_properties("DerivedCoreProperties.txt", want_derived + other_derived)
-        scripts = load_properties("Scripts.txt", [])
-        props = load_properties("PropList.txt",
-                ["White_Space", "Join_Control", "Noncharacter_Code_Point"])
-        case_folding = load_case_folding("CaseFolding.txt")
-
-        # all of these categories will also be available as \p{} in libregex
-        allcats = []
-        for (name, cat) in ("general_category", gencats), \
-                           ("derived_property", derived), \
-                           ("script", scripts), \
-                           ("property", props):
-            emit_property_module(rf, name, cat)
-            allcats.extend(map(lambda x: (x, name), cat))
-        allcats.sort(key=lambda c: c[0])
-
-        # the \w regex corresponds to Alphabetic + Mark + Decimal_Number +
-        # Connector_Punctuation + Join-Control according to UTS#18
-        # http://www.unicode.org/reports/tr18/#Compatibility_Properties
-        perl_words = []
-        for cat in derived["Alphabetic"], gencats["M"], gencats["Nd"], \
-                   gencats["Pc"], props["Join_Control"]:
-            perl_words.extend(ungroup_cat(cat))
-        perl_words = group_cat(perl_words)
-
-        # emit lookup tables for \p{}, along with \d, \w, and \s for libregex
-        emit_regex_module(rf, allcats, perl_words)
-        emit_property_module(rf, "case_folding", case_folding)
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/backtrack.rs
+++ /dev/null
@@ -1,302 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// This is the backtracking matching engine. It has the same exact capability
-// as the full NFA simulation, except it is artificially restricted to small
-// regexes on small inputs because of its memory requirements.
-//
-// In particular, this is a *bounded* backtracking engine. It retains worst
-// case linear time by keeping track of the states that is has visited (using a
-// bitmap). Namely, once a state is visited, it is never visited again. Since a
-// state is keyed by `(instruction index, input index)`, we have that its time
-// complexity is `O(mn)` (i.e., linear in the size of the search text).
-//
-// The backtracking engine can beat out the NFA simulation on small
-// regexes/inputs because it doesn't have to keep track of multiple copies of
-// the capture groups. In benchmarks, the backtracking engine is roughly twice
-// as fast as the full NFA simulation. Note though that its performance doesn't
-// scale, even if you're willing to live with the memory requirements. Namely,
-// the bitset has to be zeroed on each execution, which becomes quite expensive
-// on large bitsets.
-
-use exec::ProgramCache;
-use input::{Input, InputAt};
-use prog::{Program, InstPtr};
-use re_trait::Slot;
-
-type Bits = u32;
-
-const BIT_SIZE: usize = 32;
-const MAX_SIZE_BYTES: usize = 256 * (1 << 10); // 256 KB
-
-/// Returns true iff the given regex and input should be executed by this
-/// engine with reasonable memory usage.
-pub fn should_exec(num_insts: usize, text_len: usize) -> bool {
-    // Total memory usage in bytes is determined by:
-    //
-    //   ((len(insts) * (len(input) + 1) + bits - 1) / bits) * (size_of(u32))
-    //
-    // The actual limit picked is pretty much a heuristic.
-    // See: https://github.com/rust-lang/regex/issues/215
-    let size = ((num_insts * (text_len + 1) + BIT_SIZE - 1) / BIT_SIZE) * 4;
-    size <= MAX_SIZE_BYTES
-}
-
-/// A backtracking matching engine.
-#[derive(Debug)]
-pub struct Bounded<'a, 'm, 'r, 's, I> {
-    prog: &'r Program,
-    input: I,
-    matches: &'m mut [bool],
-    slots: &'s mut [Slot],
-    m: &'a mut Cache,
-}
-
-/// Shared cached state between multiple invocations of a backtracking engine
-/// in the same thread.
-#[derive(Clone, Debug)]
-pub struct Cache {
-    jobs: Vec<Job>,
-    visited: Vec<Bits>,
-}
-
-impl Cache {
-    /// Create new empty cache for the backtracking engine.
-    pub fn new(_prog: &Program) -> Self {
-        Cache { jobs: vec![], visited: vec![] }
-    }
-}
-
-/// A job is an explicit unit of stack space in the backtracking engine.
-///
-/// The "normal" representation is a single state transition, which corresponds
-/// to an NFA state and a character in the input. However, the backtracking
-/// engine must keep track of old capture group values. We use the explicit
-/// stack to do it.
-#[derive(Clone, Copy, Debug)]
-enum Job {
-    Inst { ip: InstPtr, at: InputAt },
-    SaveRestore { slot: usize, old_pos: Option<usize> },
-}
-
-impl<'a, 'm, 'r, 's, I: Input> Bounded<'a, 'm, 'r, 's, I> {
-    /// Execute the backtracking matching engine.
-    ///
-    /// If there's a match, `exec` returns `true` and populates the given
-    /// captures accordingly.
-    pub fn exec(
-        prog: &'r Program,
-        cache: &ProgramCache,
-        matches: &'m mut [bool],
-        slots: &'s mut [Slot],
-        input: I,
-        start: usize,
-    ) -> bool {
-        let mut cache = cache.borrow_mut();
-        let mut cache = &mut cache.backtrack;
-        let start = input.at(start);
-        let mut b = Bounded {
-            prog: prog,
-            input: input,
-            matches: matches,
-            slots: slots,
-            m: cache,
-        };
-        b.exec_(start)
-    }
-
-    /// Clears the cache such that the backtracking engine can be executed
-    /// on some input of fixed length.
-    fn clear(&mut self) {
-        // Reset the job memory so that we start fresh.
-        self.m.jobs.clear();
-
-        // Now we need to clear the bit state set.
-        // We do this by figuring out how much space we need to keep track
-        // of the states we've visited.
-        // Then we reset all existing allocated space to 0.
-        // Finally, we request more space if we need it.
-        //
-        // This is all a little circuitous, but doing this unsafely
-        // doesn't seem to have a measurable impact on performance.
-        // (Probably because backtracking is limited to such small
-        // inputs/regexes in the first place.)
-        let visited_len =
-            (self.prog.len() * (self.input.len() + 1) + BIT_SIZE - 1)
-            /
-            BIT_SIZE;
-        self.m.visited.truncate(visited_len);
-        for v in &mut self.m.visited {
-            *v = 0;
-        }
-        if visited_len > self.m.visited.len() {
-            let len = self.m.visited.len();
-            self.m.visited.reserve_exact(visited_len - len);
-            for _ in 0..(visited_len - len) {
-                self.m.visited.push(0);
-            }
-        }
-    }
-
-    /// Start backtracking at the given position in the input, but also look
-    /// for literal prefixes.
-    fn exec_(&mut self, mut at: InputAt) -> bool {
-        self.clear();
-        // If this is an anchored regex at the beginning of the input, then
-        // we're either already done or we only need to try backtracking once.
-        if self.prog.is_anchored_start {
-            return if !at.is_start() {
-                false
-            } else {
-                self.backtrack(at)
-            };
-        }
-        let mut matched = false;
-        loop {
-            if !self.prog.prefixes.is_empty() {
-                at = match self.input.prefix_at(&self.prog.prefixes, at) {
-                    None => break,
-                    Some(at) => at,
-                };
-            }
-            matched = self.backtrack(at) || matched;
-            if matched && self.prog.matches.len() == 1 {
-                return true;
-            }
-            if at.is_end() {
-                break;
-            }
-            at = self.input.at(at.next_pos());
-        }
-        matched
-    }
-
-    /// The main backtracking loop starting at the given input position.
-    fn backtrack(&mut self, start: InputAt) -> bool {
-        // N.B. We use an explicit stack to avoid recursion.
-        // To avoid excessive pushing and popping, most transitions are handled
-        // in the `step` helper function, which only pushes to the stack when
-        // there's a capture or a branch.
-        let mut matched = false;
-        self.m.jobs.push(Job::Inst { ip: 0, at: start });
-        while let Some(job) = self.m.jobs.pop() {
-            match job {
-                Job::Inst { ip, at } => {
-                    if self.step(ip, at) {
-                        // Only quit if we're matching one regex.
-                        // If we're matching a regex set, then mush on and
-                        // try to find other matches (if we want them).
-                        if self.prog.matches.len() == 1 {
-                            return true;
-                        }
-                        matched = true;
-                    }
-                }
-                Job::SaveRestore { slot, old_pos } => {
-                    if slot < self.slots.len() {
-                        self.slots[slot] = old_pos;
-                    }
-                }
-            }
-        }
-        matched
-    }
-
-    fn step(&mut self, mut ip: InstPtr, mut at: InputAt) -> bool {
-        use prog::Inst::*;
-        loop {
-            // This loop is an optimization to avoid constantly pushing/popping
-            // from the stack. Namely, if we're pushing a job only to run it
-            // next, avoid the push and just mutate `ip` (and possibly `at`)
-            // in place.
-            match self.prog[ip] {
-                Match(slot) => {
-                    if slot < self.matches.len() {
-                        self.matches[slot] = true;
-                    }
-                    return true;
-                }
-                Save(ref inst) => {
-                    if let Some(&old_pos) = self.slots.get(inst.slot) {
-                        // If this path doesn't work out, then we save the old
-                        // capture index (if one exists) in an alternate
-                        // job. If the next path fails, then the alternate
-                        // job is popped and the old capture index is restored.
-                        self.m.jobs.push(Job::SaveRestore {
-                            slot: inst.slot,
-                            old_pos: old_pos,
-                        });
-                        self.slots[inst.slot] = Some(at.pos());
-                    }
-                    ip = inst.goto;
-                }
-                Split(ref inst) => {
-                    self.m.jobs.push(Job::Inst { ip: inst.goto2, at: at });
-                    ip = inst.goto1;
-                }
-                EmptyLook(ref inst) => {
-                    if self.input.is_empty_match(at, inst) {
-                        ip = inst.goto;
-                    } else {
-                        return false;
-                    }
-                }
-                Char(ref inst) => {
-                    if inst.c == at.char() {
-                        ip = inst.goto;
-                        at = self.input.at(at.next_pos());
-                    } else {
-                        return false;
-                    }
-                }
-                Ranges(ref inst) => {
-                    if inst.matches(at.char()) {
-                        ip = inst.goto;
-                        at = self.input.at(at.next_pos());
-                    } else {
-                        return false;
-                    }
-                }
-                Bytes(ref inst) => {
-                    if let Some(b) = at.byte() {
-                        if inst.matches(b) {
-                            ip = inst.goto;
-                            at = self.input.at(at.next_pos());
-                            continue;
-                        }
-                    }
-                    return false;
-                }
-            }
-            if self.has_visited(ip, at) {
-                return false;
-            }
-        }
-    }
-
-    fn has_visited(&mut self, ip: InstPtr, at: InputAt) -> bool {
-        let k = ip * (self.input.len() + 1) + at.pos();
-        let k1 = k / BIT_SIZE;
-        let k2 = usize_to_u32(1 << (k & (BIT_SIZE - 1)));
-        if self.m.visited[k1] & k2 == 0 {
-            self.m.visited[k1] |= k2;
-            false
-        } else {
-            true
-        }
-    }
-}
-
-fn usize_to_u32(n: usize) -> u32 {
-    if (n as u64) > (::std::u32::MAX as u64) {
-        panic!("BUG: {} is too big to fit into u32", n)
-    }
-    n as u32
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/compile.rs
+++ /dev/null
@@ -1,1087 +0,0 @@
-// Copyright 2014-2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::collections::HashMap;
-use std::iter;
-use std::result;
-use std::sync::Arc;
-
-use syntax::{
-    Expr, Repeater, CharClass, ClassRange, ByteClass, ByteRange,
-    is_word_byte,
-};
-use utf8_ranges::{Utf8Range, Utf8Sequence, Utf8Sequences};
-
-use prog::{
-    Program, Inst, InstPtr, EmptyLook,
-    InstSave, InstSplit, InstEmptyLook, InstChar, InstRanges, InstBytes,
-};
-
-use Error;
-
-type Result = result::Result<Patch, Error>;
-
-#[derive(Debug)]
-struct Patch {
-    hole: Hole,
-    entry: InstPtr,
-}
-
-/// A compiler translates a regular expression AST to a sequence of
-/// instructions. The sequence of instructions represents an NFA.
-pub struct Compiler {
-    insts: Vec<MaybeInst>,
-    compiled: Program,
-    capture_name_idx: HashMap<String, usize>,
-    num_exprs: usize,
-    size_limit: usize,
-    suffix_cache: SuffixCache,
-    utf8_seqs: Option<Utf8Sequences>,
-    byte_classes: ByteClassSet,
-}
-
-impl Compiler {
-    /// Create a new regular expression compiler.
-    ///
-    /// Various options can be set before calling `compile` on an expression.
-    pub fn new() -> Self {
-        Compiler {
-            insts: vec![],
-            compiled: Program::new(),
-            capture_name_idx: HashMap::new(),
-            num_exprs: 0,
-            size_limit: 10 * (1 << 20),
-            suffix_cache: SuffixCache::new(1000),
-            utf8_seqs: Some(Utf8Sequences::new('\x00', '\x00')),
-            byte_classes: ByteClassSet::new(),
-        }
-    }
-
-    /// The size of the resulting program is limited by size_limit. If
-    /// the program approximately exceeds the given size (in bytes), then
-    /// compilation will stop and return an error.
-    pub fn size_limit(mut self, size_limit: usize) -> Self {
-        self.size_limit = size_limit;
-        self
-    }
-
-    /// If bytes is true, then the program is compiled as a byte based
-    /// automaton, which incorporates UTF-8 decoding into the machine. If it's
-    /// false, then the automaton is Unicode scalar value based, e.g., an
-    /// engine utilizing such an automaton is resposible for UTF-8 decoding.
-    ///
-    /// The specific invariant is that when returning a byte based machine,
-    /// the neither the `Char` nor `Ranges` instructions are produced.
-    /// Conversely, when producing a Unicode scalar value machine, the `Bytes`
-    /// instruction is never produced.
-    ///
-    /// Note that `dfa(true)` implies `bytes(true)`.
-    pub fn bytes(mut self, yes: bool) -> Self {
-        self.compiled.is_bytes = yes;
-        self
-    }
-
-    /// When disabled, the program compiled may match arbitrary bytes.
-    ///
-    /// When enabled (the default), all compiled programs exclusively match
-    /// valid UTF-8 bytes.
-    pub fn only_utf8(mut self, yes: bool) -> Self {
-        self.compiled.only_utf8 = yes;
-        self
-    }
-
-    /// When set, the machine returned is suitable for use in the DFA matching
-    /// engine.
-    ///
-    /// In particular, this ensures that if the regex is not anchored in the
-    /// beginning, then a preceding `.*?` is included in the program. (The NFA
-    /// based engines handle the preceding `.*?` explicitly, which is difficult
-    /// or impossible in the DFA engine.)
-    pub fn dfa(mut self, yes: bool) -> Self {
-        self.compiled.is_dfa = yes;
-        self
-    }
-
-    /// When set, the machine returned is suitable for matching text in
-    /// reverse. In particular, all concatenations are flipped.
-    pub fn reverse(mut self, yes: bool) -> Self {
-        self.compiled.is_reverse = yes;
-        self
-    }
-
-    /// Compile a regular expression given its AST.
-    ///
-    /// The compiler is guaranteed to succeed unless the program exceeds the
-    /// specified size limit. If the size limit is exceeded, then compilation
-    /// stops and returns an error.
-    pub fn compile(
-        mut self,
-        exprs: &[Expr],
-    ) -> result::Result<Program, Error> {
-        debug_assert!(exprs.len() >= 1);
-        self.num_exprs = exprs.len();
-        if exprs.len() == 1 {
-            self.compile_one(&exprs[0])
-        } else {
-            self.compile_many(exprs)
-        }
-    }
-
-    fn compile_one(mut self, expr: &Expr) -> result::Result<Program, Error> {
-        // If we're compiling a forward DFA and we aren't anchored, then
-        // add a `.*?` before the first capture group.
-        // Other matching engines handle this by baking the logic into the
-        // matching engine itself.
-        let mut dotstar_patch = Patch { hole: Hole::None, entry: 0 };
-        self.compiled.is_anchored_start = expr.is_anchored_start();
-        self.compiled.is_anchored_end = expr.is_anchored_end();
-        if self.compiled.needs_dotstar() {
-            dotstar_patch = try!(self.c_dotstar());
-            self.compiled.start = dotstar_patch.entry;
-        }
-        self.compiled.captures = vec![None];
-        let patch = try!(self.c_capture(0, expr));
-        if self.compiled.needs_dotstar() {
-            self.fill(dotstar_patch.hole, patch.entry);
-        } else {
-            self.compiled.start = patch.entry;
-        }
-        self.fill_to_next(patch.hole);
-        self.compiled.matches = vec![self.insts.len()];
-        self.push_compiled(Inst::Match(0));
-        self.compile_finish()
-    }
-
-    fn compile_many(
-        mut self,
-        exprs: &[Expr],
-    ) -> result::Result<Program, Error> {
-        debug_assert!(exprs.len() > 1);
-
-        self.compiled.is_anchored_start =
-            exprs.iter().all(|e| e.is_anchored_start());
-        self.compiled.is_anchored_end =
-            exprs.iter().all(|e| e.is_anchored_end());
-        let mut dotstar_patch = Patch { hole: Hole::None, entry: 0 };
-        if self.compiled.needs_dotstar() {
-            dotstar_patch = try!(self.c_dotstar());
-            self.compiled.start = dotstar_patch.entry;
-        } else {
-            self.compiled.start = 0; // first instruction is always split
-        }
-        self.fill_to_next(dotstar_patch.hole);
-
-        for (i, expr) in exprs[0..exprs.len() - 1].iter().enumerate() {
-            let split = self.push_split_hole();
-            let Patch { hole, entry } = try!(self.c_capture(0, expr));
-            self.fill_to_next(hole);
-            self.compiled.matches.push(self.insts.len());
-            self.push_compiled(Inst::Match(i));
-
-            let next = self.insts.len();
-            self.fill_split(split, Some(entry), Some(next));
-        }
-        let i = exprs.len() - 1;
-        let Patch { hole, .. } = try!(self.c_capture(0, &exprs[i]));
-        self.fill_to_next(hole);
-        self.compiled.matches.push(self.insts.len());
-        self.push_compiled(Inst::Match(i));
-        self.compile_finish()
-    }
-
-    fn compile_finish(mut self) -> result::Result<Program, Error> {
-        self.compiled.insts =
-            self.insts.into_iter().map(|inst| inst.unwrap()).collect();
-        self.compiled.byte_classes = self.byte_classes.byte_classes();
-        self.compiled.capture_name_idx = Arc::new(self.capture_name_idx);
-        Ok(self.compiled)
-    }
-
-    fn c(&mut self, expr: &Expr) -> Result {
-        use prog;
-        use syntax::Expr::*;
-
-        try!(self.check_size());
-        match *expr {
-            Empty => Ok(Patch { hole: Hole::None, entry: self.insts.len() }),
-            Literal { ref chars, casei } => self.c_literal(chars, casei),
-            LiteralBytes { ref bytes, casei } => self.c_bytes(bytes, casei),
-            AnyChar => self.c_class(&[ClassRange {
-                start: '\x00',
-                end: '\u{10ffff}',
-            }]),
-            AnyCharNoNL => {
-                self.c_class(&[
-                    ClassRange { start: '\x00', end: '\x09' },
-                    ClassRange { start: '\x0b', end: '\u{10ffff}' },
-                ])
-            }
-            AnyByte => {
-                self.c_class_bytes(&[ByteRange { start: 0, end: 0xFF }])
-            }
-            AnyByteNoNL => {
-                self.c_class_bytes(&[
-                    ByteRange { start: 0, end: 0x9 },
-                    ByteRange { start: 0xB, end: 0xFF },
-                ])
-            }
-            Class(ref cls) => {
-                self.c_class(cls)
-            }
-            ClassBytes(ref cls) => {
-                self.c_class_bytes(cls)
-            }
-            StartLine if self.compiled.is_reverse => {
-                self.byte_classes.set_range(b'\n', b'\n');
-                self.c_empty_look(prog::EmptyLook::EndLine)
-            }
-            StartLine => {
-                self.byte_classes.set_range(b'\n', b'\n');
-                self.c_empty_look(prog::EmptyLook::StartLine)
-            }
-            EndLine if self.compiled.is_reverse => {
-                self.byte_classes.set_range(b'\n', b'\n');
-                self.c_empty_look(prog::EmptyLook::StartLine)
-            }
-            EndLine => {
-                self.byte_classes.set_range(b'\n', b'\n');
-                self.c_empty_look(prog::EmptyLook::EndLine)
-            }
-            StartText if self.compiled.is_reverse => {
-                self.c_empty_look(prog::EmptyLook::EndText)
-            }
-            StartText => {
-                self.c_empty_look(prog::EmptyLook::StartText)
-            }
-            EndText if self.compiled.is_reverse => {
-                self.c_empty_look(prog::EmptyLook::StartText)
-            }
-            EndText => {
-                self.c_empty_look(prog::EmptyLook::EndText)
-            }
-            WordBoundary => {
-                self.compiled.has_unicode_word_boundary = true;
-                self.byte_classes.set_word_boundary();
-                self.c_empty_look(prog::EmptyLook::WordBoundary)
-            }
-            NotWordBoundary => {
-                self.compiled.has_unicode_word_boundary = true;
-                self.byte_classes.set_word_boundary();
-                self.c_empty_look(prog::EmptyLook::NotWordBoundary)
-            }
-            WordBoundaryAscii => {
-                self.byte_classes.set_word_boundary();
-                self.c_empty_look(prog::EmptyLook::WordBoundaryAscii)
-            }
-            NotWordBoundaryAscii => {
-                self.byte_classes.set_word_boundary();
-                self.c_empty_look(prog::EmptyLook::NotWordBoundaryAscii)
-            }
-            Group { ref e, i: None, name: None } => self.c(e),
-            Group { ref e, i, ref name } => {
-                // it's impossible to have a named capture without an index
-                let i = i.expect("capture index");
-                if i >= self.compiled.captures.len() {
-                    self.compiled.captures.push(name.clone());
-                    if let Some(ref name) = *name {
-                        self.capture_name_idx.insert(name.to_owned(), i);
-                    }
-                }
-                self.c_capture(2 * i, e)
-            }
-            Concat(ref es) => {
-                if self.compiled.is_reverse {
-                    self.c_concat(es.iter().rev())
-                } else {
-                    self.c_concat(es)
-                }
-            }
-            Alternate(ref es) => self.c_alternate(&**es),
-            Repeat { ref e, r, greedy } => self.c_repeat(e, r, greedy),
-        }
-    }
-
-    fn c_capture(&mut self, first_slot: usize, expr: &Expr) -> Result {
-        if self.num_exprs > 1 || self.compiled.is_dfa {
-            // Don't ever compile Save instructions for regex sets because
-            // they are never used. They are also never used in DFA programs
-            // because DFAs can't handle captures.
-            self.c(expr)
-        } else {
-            let entry = self.insts.len();
-            let hole = self.push_hole(InstHole::Save { slot: first_slot });
-            let patch = try!(self.c(expr));
-            self.fill(hole, patch.entry);
-            self.fill_to_next(patch.hole);
-            let hole = self.push_hole(InstHole::Save { slot: first_slot + 1 });
-            Ok(Patch { hole: hole, entry: entry })
-        }
-    }
-
-    fn c_dotstar(&mut self) -> Result {
-        Ok(if !self.compiled.only_utf8() {
-            try!(self.c(&Expr::Repeat {
-                e: Box::new(Expr::AnyByte),
-                r: Repeater::ZeroOrMore,
-                greedy: false,
-            }))
-        } else {
-            try!(self.c(&Expr::Repeat {
-                e: Box::new(Expr::AnyChar),
-                r: Repeater::ZeroOrMore,
-                greedy: false,
-            }))
-        })
-    }
-
-    fn c_literal(&mut self, chars: &[char], casei: bool) -> Result {
-        debug_assert!(!chars.is_empty());
-        let mut chars: Box<Iterator<Item=&char>> =
-            if self.compiled.is_reverse {
-                Box::new(chars.iter().rev())
-            } else {
-                Box::new(chars.iter())
-            };
-        let first = *chars.next().expect("non-empty literal");
-        let Patch { mut hole, entry } = try!(self.c_char(first, casei));
-        for &c in chars {
-            let p = try!(self.c_char(c, casei));
-            self.fill(hole, p.entry);
-            hole = p.hole;
-        }
-        Ok(Patch { hole: hole, entry: entry })
-    }
-
-    fn c_char(&mut self, c: char, casei: bool) -> Result {
-        if casei {
-            self.c_class(&CharClass::new(vec![
-                ClassRange { start: c, end: c },
-            ]).case_fold())
-        } else {
-            self.c_class(&[ClassRange { start: c, end: c }])
-        }
-    }
-
-    fn c_class(&mut self, ranges: &[ClassRange]) -> Result {
-        assert!(!ranges.is_empty());
-        if self.compiled.uses_bytes() {
-            CompileClass {
-                c: self,
-                ranges: ranges,
-            }.compile()
-        } else {
-            let ranges: Vec<(char, char)> =
-                ranges.iter().map(|r| (r.start, r.end)).collect();
-            let hole = if ranges.len() == 1 && ranges[0].0 == ranges[0].1 {
-                self.push_hole(InstHole::Char { c: ranges[0].0 })
-            } else {
-                self.push_hole(InstHole::Ranges { ranges: ranges })
-            };
-            Ok(Patch { hole: hole, entry: self.insts.len() - 1 })
-        }
-    }
-
-    fn c_bytes(&mut self, bytes: &[u8], casei: bool) -> Result {
-        debug_assert!(!bytes.is_empty());
-        let mut bytes: Box<Iterator<Item=&u8>> =
-            if self.compiled.is_reverse {
-                Box::new(bytes.iter().rev())
-            } else {
-                Box::new(bytes.iter())
-            };
-        let first = *bytes.next().expect("non-empty literal");
-        let Patch { mut hole, entry } = try!(self.c_byte(first, casei));
-        for &b in bytes {
-            let p = try!(self.c_byte(b, casei));
-            self.fill(hole, p.entry);
-            hole = p.hole;
-        }
-        Ok(Patch { hole: hole, entry: entry })
-    }
-
-    fn c_byte(&mut self, b: u8, casei: bool) -> Result {
-        if casei {
-            self.c_class_bytes(&ByteClass::new(vec![
-                ByteRange { start: b, end: b },
-            ]).case_fold())
-        } else {
-            self.c_class_bytes(&[ByteRange { start: b, end: b }])
-        }
-    }
-
-    fn c_class_bytes(&mut self, ranges: &[ByteRange]) -> Result {
-        debug_assert!(!ranges.is_empty());
-
-        let first_split_entry = self.insts.len();
-        let mut holes = vec![];
-        let mut prev_hole = Hole::None;
-        for r in &ranges[0..ranges.len() - 1] {
-            self.fill_to_next(prev_hole);
-            let split = self.push_split_hole();
-            let next = self.insts.len();
-            self.byte_classes.set_range(r.start, r.end);
-            holes.push(self.push_hole(InstHole::Bytes {
-                start: r.start, end: r.end,
-            }));
-            prev_hole = self.fill_split(split, Some(next), None);
-        }
-        let next = self.insts.len();
-        let r = &ranges[ranges.len() - 1];
-        self.byte_classes.set_range(r.start, r.end);
-        holes.push(self.push_hole(InstHole::Bytes {
-            start: r.start, end: r.end,
-        }));
-        self.fill(prev_hole, next);
-        Ok(Patch { hole: Hole::Many(holes), entry: first_split_entry })
-    }
-
-    fn c_empty_look(&mut self, look: EmptyLook) -> Result {
-        let hole = self.push_hole(InstHole::EmptyLook { look: look });
-        Ok(Patch { hole: hole, entry: self.insts.len() - 1 })
-    }
-
-    fn c_concat<'a, I>(&mut self, exprs: I) -> Result
-            where I: IntoIterator<Item=&'a Expr> {
-        let mut exprs = exprs.into_iter();
-        let first = match exprs.next() {
-            Some(expr) => expr,
-            None => {
-                return Ok(Patch { hole: Hole::None, entry: self.insts.len() })
-            }
-        };
-        let Patch { mut hole, entry } = try!(self.c(first));
-        for e in exprs {
-            let p = try!(self.c(e));
-            self.fill(hole, p.entry);
-            hole = p.hole;
-        }
-        Ok(Patch { hole: hole, entry: entry })
-    }
-
-    fn c_alternate(&mut self, exprs: &[Expr]) -> Result {
-        debug_assert!(
-            exprs.len() >= 2, "alternates must have at least 2 exprs");
-
-        // Initial entry point is always the first split.
-        let first_split_entry = self.insts.len();
-
-        // Save up all of the holes from each alternate. They will all get
-        // patched to point to the same location.
-        let mut holes = vec![];
-
-        let mut prev_hole = Hole::None;
-        for e in &exprs[0..exprs.len() - 1] {
-            self.fill_to_next(prev_hole);
-            let split = self.push_split_hole();
-            let Patch { hole, entry } = try!(self.c(e));
-            holes.push(hole);
-            prev_hole = self.fill_split(split, Some(entry), None);
-        }
-        let Patch { hole, entry } = try!(self.c(&exprs[exprs.len() - 1]));
-        holes.push(hole);
-        self.fill(prev_hole, entry);
-        Ok(Patch { hole: Hole::Many(holes), entry: first_split_entry })
-    }
-
-    fn c_repeat(
-        &mut self,
-        expr: &Expr,
-        kind: Repeater,
-        greedy: bool,
-    ) -> Result {
-        match kind {
-            Repeater::ZeroOrOne => self.c_repeat_zero_or_one(expr, greedy),
-            Repeater::ZeroOrMore => self.c_repeat_zero_or_more(expr, greedy),
-            Repeater::OneOrMore => self.c_repeat_one_or_more(expr, greedy),
-            Repeater::Range { min, max: None } => {
-                self.c_repeat_range_min_or_more(expr, greedy, min)
-            }
-            Repeater::Range { min, max: Some(max) } => {
-                self.c_repeat_range(expr, greedy, min, max)
-            }
-        }
-    }
-
-    fn c_repeat_zero_or_one(
-        &mut self,
-        expr: &Expr,
-        greedy: bool,
-    ) -> Result {
-        let split_entry = self.insts.len();
-        let split = self.push_split_hole();
-        let Patch { hole: hole_rep, entry: entry_rep } = try!(self.c(expr));
-
-        let split_hole = if greedy {
-            self.fill_split(split, Some(entry_rep), None)
-        } else {
-            self.fill_split(split, None, Some(entry_rep))
-        };
-        let holes = vec![hole_rep, split_hole];
-        Ok(Patch { hole: Hole::Many(holes), entry: split_entry })
-    }
-
-    fn c_repeat_zero_or_more(
-        &mut self,
-        expr: &Expr,
-        greedy: bool,
-    ) -> Result {
-        let split_entry = self.insts.len();
-        let split = self.push_split_hole();
-        let Patch { hole: hole_rep, entry: entry_rep } = try!(self.c(expr));
-
-        self.fill(hole_rep, split_entry);
-        let split_hole = if greedy {
-            self.fill_split(split, Some(entry_rep), None)
-        } else {
-            self.fill_split(split, None, Some(entry_rep))
-        };
-        Ok(Patch { hole: split_hole, entry: split_entry })
-    }
-
-    fn c_repeat_one_or_more(
-        &mut self,
-        expr: &Expr,
-        greedy: bool,
-    ) -> Result {
-        let Patch { hole: hole_rep, entry: entry_rep } = try!(self.c(expr));
-        self.fill_to_next(hole_rep);
-        let split = self.push_split_hole();
-
-        let split_hole = if greedy {
-            self.fill_split(split, Some(entry_rep), None)
-        } else {
-            self.fill_split(split, None, Some(entry_rep))
-        };
-        Ok(Patch { hole: split_hole, entry: entry_rep })
-    }
-
-    fn c_repeat_range_min_or_more(
-        &mut self,
-        expr: &Expr,
-        greedy: bool,
-        min: u32,
-    ) -> Result {
-        let min = u32_to_usize(min);
-        let patch_concat = try!(self.c_concat(iter::repeat(expr).take(min)));
-        let patch_rep = try!(self.c_repeat_zero_or_more(expr, greedy));
-        self.fill(patch_concat.hole, patch_rep.entry);
-        Ok(Patch { hole: patch_rep.hole, entry: patch_concat.entry })
-    }
-
-    fn c_repeat_range(
-        &mut self,
-        expr: &Expr,
-        greedy: bool,
-        min: u32,
-        max: u32,
-    ) -> Result {
-        let (min, max) = (u32_to_usize(min), u32_to_usize(max));
-        let patch_concat = try!(self.c_concat(iter::repeat(expr).take(min)));
-        let initial_entry = patch_concat.entry;
-        if min == max {
-            return Ok(patch_concat);
-        }
-        // It is much simpler to compile, e.g., `a{2,5}` as:
-        //
-        //     aaa?a?a?
-        //
-        // But you end up with a sequence of instructions like this:
-        //
-        //     0: 'a'
-        //     1: 'a',
-        //     2: split(3, 4)
-        //     3: 'a'
-        //     4: split(5, 6)
-        //     5: 'a'
-        //     6: split(7, 8)
-        //     7: 'a'
-        //     8: MATCH
-        //
-        // This is *incredibly* inefficient because the splits end
-        // up forming a chain, which has to be resolved everything a
-        // transition is followed.
-        let mut holes = vec![];
-        let mut prev_hole = patch_concat.hole;
-        for _ in min..max {
-            self.fill_to_next(prev_hole);
-            let split = self.push_split_hole();
-            let Patch { hole, entry } = try!(self.c(expr));
-            prev_hole = hole;
-            if greedy {
-                holes.push(self.fill_split(split, Some(entry), None));
-            } else {
-                holes.push(self.fill_split(split, None, Some(entry)));
-            }
-        }
-        holes.push(prev_hole);
-        Ok(Patch { hole: Hole::Many(holes), entry: initial_entry })
-    }
-
-    fn fill(&mut self, hole: Hole, goto: InstPtr) {
-        match hole {
-            Hole::None => {}
-            Hole::One(pc) => {
-                self.insts[pc].fill(goto);
-            }
-            Hole::Many(holes) => {
-                for hole in holes {
-                    self.fill(hole, goto);
-                }
-            }
-        }
-    }
-
-    fn fill_to_next(&mut self, hole: Hole) {
-        let next = self.insts.len();
-        self.fill(hole, next);
-    }
-
-    fn fill_split(
-        &mut self,
-        hole: Hole,
-        goto1: Option<InstPtr>,
-        goto2: Option<InstPtr>,
-    ) -> Hole {
-        match hole {
-            Hole::None => Hole::None,
-            Hole::One(pc) => {
-                match (goto1, goto2) {
-                    (Some(goto1), Some(goto2)) => {
-                        self.insts[pc].fill_split(goto1, goto2);
-                        Hole::None
-                    }
-                    (Some(goto1), None) => {
-                        self.insts[pc].half_fill_split_goto1(goto1);
-                        Hole::One(pc)
-                    }
-                    (None, Some(goto2)) => {
-                        self.insts[pc].half_fill_split_goto2(goto2);
-                        Hole::One(pc)
-                    }
-                    (None, None) => unreachable!("at least one of the split \
-                                                  holes must be filled"),
-                }
-            }
-            Hole::Many(holes) => {
-                let mut new_holes = vec![];
-                for hole in holes {
-                    new_holes.push(self.fill_split(hole, goto1, goto2));
-                }
-                if new_holes.is_empty() {
-                    Hole::None
-                } else if new_holes.len() == 1 {
-                    new_holes.pop().unwrap()
-                } else {
-                    Hole::Many(new_holes)
-                }
-            }
-        }
-    }
-
-    fn push_compiled(&mut self, inst: Inst) {
-        self.insts.push(MaybeInst::Compiled(inst));
-    }
-
-    fn push_hole(&mut self, inst: InstHole) -> Hole {
-        let hole = self.insts.len();
-        self.insts.push(MaybeInst::Uncompiled(inst));
-        Hole::One(hole)
-    }
-
-    fn push_split_hole(&mut self) -> Hole {
-        let hole = self.insts.len();
-        self.insts.push(MaybeInst::Split);
-        Hole::One(hole)
-    }
-
-    fn check_size(&self) -> result::Result<(), Error> {
-        use std::mem::size_of;
-
-        if self.insts.len() * size_of::<Inst>() > self.size_limit {
-            Err(Error::CompiledTooBig(self.size_limit))
-        } else {
-            Ok(())
-        }
-    }
-}
-
-#[derive(Debug)]
-enum Hole {
-    None,
-    One(InstPtr),
-    Many(Vec<Hole>),
-}
-
-#[derive(Clone, Debug)]
-enum MaybeInst {
-    Compiled(Inst),
-    Uncompiled(InstHole),
-    Split,
-    Split1(InstPtr),
-    Split2(InstPtr),
-}
-
-impl MaybeInst {
-    fn fill(&mut self, goto: InstPtr) {
-        let filled = match *self {
-            MaybeInst::Uncompiled(ref inst) => inst.fill(goto),
-            MaybeInst::Split1(goto1) => {
-                Inst::Split(InstSplit { goto1: goto1, goto2: goto })
-            }
-            MaybeInst::Split2(goto2) => {
-                Inst::Split(InstSplit { goto1: goto, goto2: goto2 })
-            }
-            _ => unreachable!("not all instructions were compiled! \
-                               found uncompiled instruction: {:?}", self),
-        };
-        *self = MaybeInst::Compiled(filled);
-    }
-
-    fn fill_split(&mut self, goto1: InstPtr, goto2: InstPtr) {
-        let filled = match *self {
-            MaybeInst::Split => {
-                Inst::Split(InstSplit { goto1: goto1, goto2: goto2 })
-            }
-            _ => unreachable!("must be called on Split instruction, \
-                               instead it was called on: {:?}", self),
-        };
-        *self = MaybeInst::Compiled(filled);
-    }
-
-    fn half_fill_split_goto1(&mut self, goto1: InstPtr) {
-        let half_filled = match *self {
-            MaybeInst::Split => goto1,
-            _ => unreachable!("must be called on Split instruction, \
-                               instead it was called on: {:?}", self),
-        };
-        *self = MaybeInst::Split1(half_filled);
-    }
-
-    fn half_fill_split_goto2(&mut self, goto2: InstPtr) {
-        let half_filled = match *self {
-            MaybeInst::Split => goto2,
-            _ => unreachable!("must be called on Split instruction, \
-                               instead it was called on: {:?}", self),
-        };
-        *self = MaybeInst::Split2(half_filled);
-    }
-
-    fn unwrap(self) -> Inst {
-        match self {
-            MaybeInst::Compiled(inst) => inst,
-            _ => unreachable!("must be called on a compiled instruction, \
-                               instead it was called on: {:?}", self),
-        }
-    }
-}
-
-#[derive(Clone, Debug)]
-enum InstHole {
-    Save { slot: usize },
-    EmptyLook { look: EmptyLook },
-    Char { c: char },
-    Ranges { ranges: Vec<(char, char)> },
-    Bytes { start: u8, end: u8 },
-}
-
-impl InstHole {
-    fn fill(&self, goto: InstPtr) -> Inst {
-        match *self {
-            InstHole::Save { slot } => Inst::Save(InstSave {
-                goto: goto,
-                slot: slot,
-            }),
-            InstHole::EmptyLook { look } => Inst::EmptyLook(InstEmptyLook {
-                goto: goto,
-                look: look,
-            }),
-            InstHole::Char { c } => Inst::Char(InstChar {
-                goto: goto,
-                c: c,
-            }),
-            InstHole::Ranges { ref ranges } => Inst::Ranges(InstRanges {
-                goto: goto,
-                ranges: ranges.clone(),
-            }),
-            InstHole::Bytes { start, end } => Inst::Bytes(InstBytes {
-                goto: goto,
-                start: start,
-                end: end,
-            }),
-        }
-    }
-}
-
-struct CompileClass<'a, 'b> {
-    c: &'a mut Compiler,
-    ranges: &'b [ClassRange],
-}
-
-impl<'a, 'b> CompileClass<'a, 'b> {
-    fn compile(mut self) -> Result {
-        let mut holes = vec![];
-        let mut initial_entry = None;
-        let mut last_split = Hole::None;
-        let mut utf8_seqs = self.c.utf8_seqs.take().unwrap();
-        self.c.suffix_cache.clear();
-
-        for (i, ref range) in self.ranges.iter().enumerate() {
-            let is_last_range = i + 1 == self.ranges.len();
-            utf8_seqs.reset(range.start, range.end);
-            let mut it = (&mut utf8_seqs).peekable();
-            loop {
-                let utf8_seq = match it.next() {
-                    None => break,
-                    Some(utf8_seq) => utf8_seq,
-                };
-                if is_last_range && it.peek().is_none() {
-                    let Patch { hole, entry } = try!(self.c_utf8_seq(&utf8_seq));
-                    holes.push(hole);
-                    self.c.fill(last_split, entry);
-                    last_split = Hole::None;
-                    if initial_entry.is_none() {
-                        initial_entry = Some(entry);
-                    }
-                } else {
-                    if initial_entry.is_none() {
-                        initial_entry = Some(self.c.insts.len());
-                    }
-                    self.c.fill_to_next(last_split);
-                    last_split = self.c.push_split_hole();
-                    let Patch { hole, entry } = try!(self.c_utf8_seq(&utf8_seq));
-                    holes.push(hole);
-                    last_split = self.c.fill_split(last_split, Some(entry), None);
-                }
-            }
-        }
-        self.c.utf8_seqs = Some(utf8_seqs);
-        Ok(Patch {
-            hole: Hole::Many(holes),
-            entry: initial_entry.unwrap(),
-        })
-    }
-
-    fn c_utf8_seq(&mut self, seq: &Utf8Sequence) -> Result {
-        if self.c.compiled.is_reverse {
-            self.c_utf8_seq_(seq)
-        } else {
-            self.c_utf8_seq_(seq.into_iter().rev())
-        }
-    }
-
-    fn c_utf8_seq_<'r, I>(&mut self, seq: I) -> Result
-            where I: IntoIterator<Item=&'r Utf8Range> {
-        // The initial instruction for each UTF-8 sequence should be the same.
-        let mut from_inst = ::std::usize::MAX;
-        let mut last_hole = Hole::None;
-        for byte_range in seq {
-            let key = SuffixCacheKey {
-                from_inst: from_inst,
-                start: byte_range.start,
-                end: byte_range.end,
-            };
-            {
-                let pc = self.c.insts.len();
-                if let Some(cached_pc) = self.c.suffix_cache.get(key, pc) {
-                    from_inst = cached_pc;
-                    continue;
-                }
-            }
-            self.c.byte_classes.set_range(byte_range.start, byte_range.end);
-            if from_inst == ::std::usize::MAX {
-                last_hole = self.c.push_hole(InstHole::Bytes {
-                    start: byte_range.start,
-                    end: byte_range.end,
-                });
-            } else {
-                self.c.push_compiled(Inst::Bytes(InstBytes {
-                    goto: from_inst,
-                    start: byte_range.start,
-                    end: byte_range.end,
-                }));
-            }
-            from_inst = self.c.insts.len().checked_sub(1).unwrap();
-            debug_assert!(from_inst < ::std::usize::MAX);
-        }
-        debug_assert!(from_inst < ::std::usize::MAX);
-        Ok(Patch { hole: last_hole, entry: from_inst })
-    }
-}
-
-/// SuffixCache is a simple bounded hash map for caching suffix entries in
-/// UTF-8 automata. For example, consider the Unicode range \u{0}-\u{FFFF}.
-/// The set of byte ranges looks like this:
-///
-/// [0-7F]
-/// [C2-DF][80-BF]
-/// [E0][A0-BF][80-BF]
-/// [E1-EC][80-BF][80-BF]
-/// [ED][80-9F][80-BF]
-/// [EE-EF][80-BF][80-BF]
-///
-/// Each line above translates to one alternate in the compiled regex program.
-/// However, all but one of the alternates end in the same suffix, which is
-/// a waste of an instruction. The suffix cache facilitates reusing them across
-/// alternates.
-///
-/// Note that a HashMap could be trivially used for this, but we don't need its
-/// overhead. Some small bounded space (LRU style) is more than enough.
-struct SuffixCache {
-    table: Vec<SuffixCacheEntry>,
-    // Every time the cache is cleared, we increment the version number instead
-    // of actually zeroing memory. Since we store a copy of the current version
-    // in every element, all we need to do is make sure to invalidate any stale
-    // entries upon access. This saves quite a bit of time!
-    version: usize,
-}
-
-#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
-struct SuffixCacheEntry {
-    key: SuffixCacheKey,
-    pc: InstPtr,
-    version: usize,
-}
-
-#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
-struct SuffixCacheKey {
-    from_inst: InstPtr,
-    start: u8,
-    end: u8,
-}
-
-impl SuffixCache {
-    fn new(size: usize) -> Self {
-        SuffixCache {
-            table: vec![SuffixCacheEntry::default(); size],
-            version: 0,
-        }
-    }
-
-    fn get(&mut self, key: SuffixCacheKey, pc: InstPtr) -> Option<InstPtr> {
-        let h = self.hash(&key);
-        let e = self.table[h];
-        if e.key == key && e.version == self.version {
-            Some(e.pc)
-        } else {
-            self.table[h] = SuffixCacheEntry {
-                key: key,
-                pc: pc,
-                version: self.version,
-            };
-            None
-        }
-    }
-
-    fn clear(&mut self) {
-        self.version += 1;
-    }
-
-    fn hash(&self, suffix: &SuffixCacheKey) -> usize {
-        // Basic FNV-1a hash as described:
-        // https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
-        const FNV_PRIME: u64 = 1099511628211;
-        let mut h = 14695981039346656037;
-        h = (h ^ (suffix.from_inst as u64)).wrapping_mul(FNV_PRIME);
-        h = (h ^ (suffix.start as u64)).wrapping_mul(FNV_PRIME);
-        h = (h ^ (suffix.end as u64)).wrapping_mul(FNV_PRIME);
-        (h as usize) % self.table.len()
-    }
-}
-
-struct ByteClassSet([bool; 256]);
-
-impl ByteClassSet {
-    fn new() -> Self {
-        ByteClassSet([false; 256])
-    }
-
-    fn set_range(&mut self, start: u8, end: u8) {
-        debug_assert!(start <= end);
-        if start > 0 {
-            self.0[start as usize - 1] = true;
-        }
-        self.0[end as usize] = true;
-    }
-
-    fn set_word_boundary(&mut self) {
-        // We need to mark all ranges of bytes whose pairs result in
-        // evaluating \b differently.
-        let iswb = is_word_byte;
-        let mut b1: u16 = 0;
-        let mut b2: u16;
-        while b1 <= 255 {
-            b2 = b1 + 1;
-            while b2 <= 255 && iswb(b1 as u8) == iswb(b2 as u8) {
-                b2 += 1;
-            }
-            self.set_range(b1 as u8, (b2 - 1) as u8);
-            b1 = b2;
-        }
-    }
-
-    fn byte_classes(&self) -> Vec<u8> {
-        // N.B. If you're debugging the DFA, it's useful to simply return
-        // `(0..256).collect()`, which effectively removes the byte classes
-        // and makes the transitions easier to read.
-        // (0usize..256).map(|x| x as u8).collect()
-        let mut byte_classes = vec![0; 256];
-        let mut class = 0u8;
-        for i in 0..256 {
-            byte_classes[i] = class;
-            if self.0[i] {
-                class = class.checked_add(1).unwrap();
-            }
-        }
-        byte_classes
-    }
-}
-
-fn u32_to_usize(n: u32) -> usize {
-    if (n as u64) > (::std::usize::MAX as u64) {
-        panic!("BUG: {} is too big to be pointer sized", n)
-    }
-    n as usize
-}
-
-#[cfg(test)]
-mod tests {
-    use super::ByteClassSet;
-
-    #[test]
-    fn byte_classes() {
-        let mut set = ByteClassSet::new();
-        set.set_range(b'a', b'z');
-        let classes = set.byte_classes();
-        assert_eq!(classes[0], 0);
-        assert_eq!(classes[1], 0);
-        assert_eq!(classes[2], 0);
-        assert_eq!(classes[b'a' as usize - 1], 0);
-        assert_eq!(classes[b'a' as usize], 1);
-        assert_eq!(classes[b'm' as usize], 1);
-        assert_eq!(classes[b'z' as usize], 1);
-        assert_eq!(classes[b'z' as usize + 1], 2);
-        assert_eq!(classes[254], 2);
-        assert_eq!(classes[255], 2);
-
-        let mut set = ByteClassSet::new();
-        set.set_range(0, 2);
-        set.set_range(4, 6);
-        let classes = set.byte_classes();
-        assert_eq!(classes[0], 0);
-        assert_eq!(classes[1], 0);
-        assert_eq!(classes[2], 0);
-        assert_eq!(classes[3], 1);
-        assert_eq!(classes[4], 2);
-        assert_eq!(classes[5], 2);
-        assert_eq!(classes[6], 2);
-        assert_eq!(classes[7], 3);
-        assert_eq!(classes[255], 3);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/dfa.rs
+++ /dev/null
@@ -1,1879 +0,0 @@
-// Copyright 2014-2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-/*!
-The DFA matching engine.
-
-A DFA provides faster matching because the engine is in exactly one state at
-any point in time. In the NFA, there may be multiple active states, and
-considerable CPU cycles are spent shuffling them around. In finite automata
-speak, the DFA follows epsilon transitions in the regex far less than the NFA.
-
-A DFA is a classic trade off between time and space. The NFA is slower, but
-its memory requirements are typically small and predictable. The DFA is faster,
-but given the right regex and the right input, the number of states in the
-DFA can grow exponentially. To mitigate this space problem, we do two things:
-
-1. We implement an *online* DFA. That is, the DFA is constructed from the NFA
-   during a search. When a new state is computed, it is stored in a cache so
-   that it may be reused. An important consequence of this implementation
-   is that states that are never reached for a particular input are never
-   computed. (This is impossible in an "offline" DFA which needs to compute
-   all possible states up front.)
-2. If the cache gets too big, we wipe it and continue matching.
-
-In pathological cases, a new state can be created for every byte of input.
-(e.g., The regex `(a|b)*a(a|b){20}` on a long sequence of a's and b's.)
-In this case, performance regresses to slightly slower than the full NFA
-simulation, in large part because the cache becomes useless. If the cache
-is wiped too frequently, the DFA quits and control falls back to one of the
-NFA simulations.
-
-Because of the "lazy" nature of this DFA, the inner matching loop is
-considerably more complex than one might expect out of a DFA. A number of
-tricks are employed to make it fast. Tread carefully.
-
-N.B. While this implementation is heavily commented, Russ Cox's series of
-articles on regexes is strongly recommended: https://swtch.com/~rsc/regexp/
-(As is the DFA implementation in RE2, which heavily influenced this
-implementation.)
-*/
-
-use std::collections::HashMap;
-use std::fmt;
-use std::iter::repeat;
-use std::mem;
-
-use exec::ProgramCache;
-use prog::{Inst, Program};
-use sparse::SparseSet;
-
-/// Return true if and only if the given program can be executed by a DFA.
-///
-/// Generally, a DFA is always possible. A pathological case where it is not
-/// possible is if the number of NFA states exceeds u32::MAX, in which case,
-/// this function will return false.
-///
-/// This function will also return false if the given program has any Unicode
-/// instructions (Char or Ranges) since the DFA operates on bytes only.
-pub fn can_exec(insts: &Program) -> bool {
-    use prog::Inst::*;
-    // If for some reason we manage to allocate a regex program with more
-    // than i32::MAX instructions, then we can't execute the DFA because we
-    // use 32 bit instruction pointer deltas for memory savings.
-    // If i32::MAX is the largest positive delta,
-    // then -i32::MAX == i32::MIN + 1 is the largest negative delta,
-    // and we are OK to use 32 bits.
-    if insts.len() > ::std::i32::MAX as usize {
-        return false;
-    }
-    for inst in insts {
-        match *inst {
-            Char(_) | Ranges(_) => return false,
-            EmptyLook(_) | Match(_) | Save(_) | Split(_) | Bytes(_) => {}
-        }
-    }
-    true
-}
-
-/// A reusable cache of DFA states.
-///
-/// This cache is reused between multiple invocations of the same regex
-/// program. (It is not shared simultaneously between threads. If there is
-/// contention, then new caches are created.)
-#[derive(Clone, Debug)]
-pub struct Cache {
-    /// Group persistent DFA related cache state together. The sparse sets
-    /// listed below are used as scratch space while computing uncached states.
-    inner: CacheInner,
-    /// qcur and qnext are ordered sets with constant time
-    /// addition/membership/clearing-whole-set and linear time iteration. They
-    /// are used to manage the sets of NFA states in DFA states when computing
-    /// cached DFA states. In particular, the order of the NFA states matters
-    /// for leftmost-first style matching. Namely, when computing a cached
-    /// state, the set of NFA states stops growing as soon as the first Match
-    /// instruction is observed.
-    qcur: SparseSet,
-    qnext: SparseSet,
-}
-
-/// CacheInner is logically just a part of Cache, but groups together fields
-/// that aren't passed as function parameters throughout search. (This split
-/// is mostly an artifact of the borrow checker. It is happily paid.)
-#[derive(Clone, Debug)]
-struct CacheInner {
-    /// A cache of pre-compiled DFA states, keyed by the set of NFA states
-    /// and the set of empty-width flags set at the byte in the input when the
-    /// state was observed.
-    ///
-    /// A StatePtr is effectively a `*State`, but to avoid various inconvenient
-    /// things, we just pass indexes around manually. The performance impact of
-    /// this is probably an instruction or two in the inner loop. However, on
-    /// 64 bit, each StatePtr is half the size of a *State.
-    compiled: HashMap<State, StatePtr>,
-    /// The transition table.
-    ///
-    /// The transition table is laid out in row-major order, where states are
-    /// rows and the transitions for each state are columns. At a high level,
-    /// given state `s` and byte `b`, the next state can be found at index
-    /// `s * 256 + b`.
-    ///
-    /// This is, of course, a lie. A StatePtr is actually a pointer to the
-    /// *start* of a row in this table. When indexing in the DFA's inner loop,
-    /// this removes the need to multiply the StatePtr by the stride. Yes, it
-    /// matters. This reduces the number of states we can store, but: the
-    /// stride is rarely 256 since we define transitions in terms of
-    /// *equivalence classes* of bytes. Each class corresponds to a set of
-    /// bytes that never discriminate a distinct path through the DFA from each
-    /// other.
-    trans: Transitions,
-    /// Our set of states. Note that `StatePtr / num_byte_classes` indexes
-    /// this Vec rather than just a `StatePtr`.
-    states: Vec<State>,
-    /// A set of cached start states, which are limited to the number of
-    /// permutations of flags set just before the initial byte of input. (The
-    /// index into this vec is a `EmptyFlags`.)
-    ///
-    /// N.B. A start state can be "dead" (i.e., no possible match), so we
-    /// represent it with a StatePtr.
-    start_states: Vec<StatePtr>,
-    /// Stack scratch space used to follow epsilon transitions in the NFA.
-    /// (This permits us to avoid recursion.)
-    ///
-    /// The maximum stack size is the number of NFA states.
-    stack: Vec<InstPtr>,
-    /// The total number of times this cache has been flushed by the DFA
-    /// because of space constraints.
-    flush_count: u64,
-    /// The total heap size of the DFA's cache. We use this to determine when
-    /// we should flush the cache.
-    size: usize,
-}
-
-/// The transition table.
-///
-/// It is laid out in row-major order, with states as rows and byte class
-/// transitions as columns.
-///
-/// The transition table is responsible for producing valid StatePtrs. A
-/// StatePtr points to the start of a particular row in this table. When
-/// indexing to find the next state this allows us to avoid a multiplication
-/// when computing an index into the table.
-#[derive(Clone)]
-struct Transitions {
-    /// The table.
-    table: Vec<StatePtr>,
-    /// The stride.
-    num_byte_classes: usize,
-}
-
-/// Fsm encapsulates the actual execution of the DFA.
-#[derive(Debug)]
-pub struct Fsm<'a> {
-    /// prog contains the NFA instruction opcodes. DFA execution uses either
-    /// the `dfa` instructions or the `dfa_reverse` instructions from
-    /// `exec::ExecReadOnly`. (It never uses `ExecReadOnly.nfa`, which may have
-    /// Unicode opcodes that cannot be executed by the DFA.)
-    prog: &'a Program,
-    /// The start state. We record it here because the pointer may change
-    /// when the cache is wiped.
-    start: StatePtr,
-    /// The current position in the input.
-    at: usize,
-    /// Should we quit after seeing the first match? e.g., When the caller
-    /// uses `is_match` or `shortest_match`.
-    quit_after_match: bool,
-    /// The last state that matched.
-    ///
-    /// When no match has occurred, this is set to STATE_UNKNOWN.
-    ///
-    /// This is only useful when matching regex sets. The last match state
-    /// is useful because it contains all of the match instructions seen,
-    /// thereby allowing us to enumerate which regexes in the set matched.
-    last_match_si: StatePtr,
-    /// The input position of the last cache flush. We use this to determine
-    /// if we're thrashing in the cache too often. If so, the DFA quits so
-    /// that we can fall back to the NFA algorithm.
-    last_cache_flush: usize,
-    /// All cached DFA information that is persisted between searches.
-    cache: &'a mut CacheInner,
-}
-
-/// The result of running the DFA.
-///
-/// Generally, the result is either a match or not a match, but sometimes the
-/// DFA runs too slowly because the cache size is too small. In that case, it
-/// gives up with the intent of falling back to the NFA algorithm.
-///
-/// The DFA can also give up if it runs out of room to create new states, or if
-/// it sees non-ASCII bytes in the presence of a Unicode word boundary.
-#[derive(Clone, Debug)]
-pub enum Result<T> {
-    Match(T),
-    NoMatch(usize),
-    Quit,
-}
-
-impl<T> Result<T> {
-    /// Returns true if this result corresponds to a match.
-    pub fn is_match(&self) -> bool {
-        match *self {
-            Result::Match(_) => true,
-            Result::NoMatch(_) | Result::Quit => false,
-        }
-    }
-
-    /// Maps the given function onto T and returns the result.
-    ///
-    /// If this isn't a match, then this is a no-op.
-    pub fn map<U, F: FnMut(T) -> U>(self, mut f: F) -> Result<U> {
-        match self {
-            Result::Match(t) => Result::Match(f(t)),
-            Result::NoMatch(x) => Result::NoMatch(x),
-            Result::Quit => Result::Quit,
-        }
-    }
-
-    /// Sets the non-match position.
-    ///
-    /// If this isn't a non-match, then this is a no-op.
-    fn set_non_match(self, at: usize) -> Result<T> {
-        match self {
-            Result::NoMatch(_) => Result::NoMatch(at),
-            r => r,
-        }
-    }
-}
-
-/// State is a DFA state. It contains an ordered set of NFA states (not
-/// necessarily complete) and a smattering of flags.
-///
-/// The flags are packed into the first byte of data.
-///
-/// States don't carry their transitions. Instead, transitions are stored in
-/// a single row-major table.
-///
-/// Delta encoding is used to store the instruction pointers.
-/// The first instruction pointer is stored directly starting
-/// at data[1], and each following pointer is stored as an offset
-/// to the previous one. If a delta is in the range -127..127,
-/// it is packed into a single byte; Otherwise the byte 128 (-128 as an i8)
-/// is coded as a flag, followed by 4 bytes encoding the delta.
-#[derive(Clone, Eq, Hash, PartialEq)]
-struct State{
-    data: Box<[u8]>,
-}
-
-/// InstPtr is a 32 bit pointer into a sequence of opcodes (i.e., it indexes
-/// an NFA state).
-///
-/// Throughout this library, this is usually set to `usize`, but we force a
-/// `u32` here for the DFA to save on space.
-type InstPtr = u32;
-
-/// Adds ip to data using delta encoding with respect to prev.
-///
-/// After completion, `data` will contain `ip` and `prev` will be set to `ip`.
-fn push_inst_ptr(data: &mut Vec<u8>, prev: &mut InstPtr, ip: InstPtr) {
-    let delta = (ip as i32) - (*prev as i32);
-    write_vari32(data, delta);
-    *prev = ip;
-}
-
-struct InstPtrs<'a> {
-    base: usize,
-    data: &'a [u8],
-}
-
-impl <'a>Iterator for InstPtrs<'a> {
-    type Item = usize;
-
-    fn next(&mut self) -> Option<usize> {
-        if self.data.is_empty() {
-            return None;
-        }
-        let (delta, nread) = read_vari32(self.data);
-        let base = self.base as i32 + delta;
-        debug_assert!(base >= 0);
-        debug_assert!(nread > 0);
-        self.data = &self.data[nread..];
-        self.base = base as usize;
-        Some(self.base)
-    }
-}
-
-impl State {
-    fn flags(&self) -> StateFlags {
-        StateFlags(self.data[0])
-    }
-
-    fn inst_ptrs(&self) -> InstPtrs {
-        InstPtrs {
-            base: 0,
-            data: &self.data[1..],
-        }
-    }
-}
-
-/// StatePtr is a 32 bit pointer to the start of a row in the transition table.
-///
-/// It has many special values. There are two types of special values:
-/// sentinels and flags.
-///
-/// Sentinels corresponds to special states that carry some kind of
-/// significance. There are three such states: unknown, dead and quit states.
-///
-/// Unknown states are states that haven't been computed yet. They indicate
-/// that a transition should be filled in that points to either an existing
-/// cached state or a new state altogether. In general, an unknown state means
-/// "follow the NFA's epsilon transitions."
-///
-/// Dead states are states that can never lead to a match, no matter what
-/// subsequent input is observed. This means that the DFA should quit
-/// immediately and return the longest match it has found thus far.
-///
-/// Quit states are states that imply the DFA is not capable of matching the
-/// regex correctly. Currently, this is only used when a Unicode word boundary
-/// exists in the regex *and* a non-ASCII byte is observed.
-///
-/// The other type of state pointer is a state pointer with special flag bits.
-/// There are two flags: a start flag and a match flag. The lower bits of both
-/// kinds always contain a "valid" StatePtr (indicated by the STATE_MAX mask).
-///
-/// The start flag means that the state is a start state, and therefore may be
-/// subject to special prefix scanning optimizations.
-///
-/// The match flag means that the state is a match state, and therefore the
-/// current position in the input (while searching) should be recorded.
-///
-/// The above exists mostly in the service of making the inner loop fast.
-/// In particular, the inner *inner* loop looks something like this:
-///
-/// ```ignore
-/// while state <= STATE_MAX and i < len(text):
-///     state = state.next[i]
-/// ```
-///
-/// This is nice because it lets us execute a lazy DFA as if it were an
-/// entirely offline DFA (i.e., with very few instructions). The loop will
-/// quit only when we need to examine a case that needs special attention.
-type StatePtr = u32;
-
-/// An unknown state means that the state has not been computed yet, and that
-/// the only way to progress is to compute it.
-const STATE_UNKNOWN: StatePtr = 1<<31;
-
-/// A dead state means that the state has been computed and it is known that
-/// once it is entered, no future match can ever occur.
-const STATE_DEAD: StatePtr = STATE_UNKNOWN + 1;
-
-/// A quit state means that the DFA came across some input that it doesn't
-/// know how to process correctly. The DFA should quit and another matching
-/// engine should be run in its place.
-const STATE_QUIT: StatePtr = STATE_DEAD + 1;
-
-/// A start state is a state that the DFA can start in.
-///
-/// Note that start states have their lower bits set to a state pointer.
-const STATE_START: StatePtr = 1<<30;
-
-/// A match state means that the regex has successfully matched.
-///
-/// Note that match states have their lower bits set to a state pointer.
-const STATE_MATCH: StatePtr = 1<<29;
-
-/// The maximum state pointer. This is useful to mask out the "valid" state
-/// pointer from a state with the "start" or "match" bits set.
-///
-/// It doesn't make sense to use this with unknown, dead or quit state
-/// pointers, since those pointers are sentinels and never have their lower
-/// bits set to anything meaningful.
-const STATE_MAX: StatePtr = STATE_MATCH - 1;
-
-/// Byte is a u8 in spirit, but a u16 in practice so that we can represent the
-/// special EOF sentinel value.
-#[derive(Copy, Clone, Debug)]
-struct Byte(u16);
-
-/// A set of flags for zero-width assertions.
-#[derive(Clone, Copy, Eq, Debug, Default, Hash, PartialEq)]
-struct EmptyFlags {
-    start: bool,
-    end: bool,
-    start_line: bool,
-    end_line: bool,
-    word_boundary: bool,
-    not_word_boundary: bool,
-}
-
-/// A set of flags describing various configurations of a DFA state. This is
-/// represented by a `u8` so that it is compact.
-#[derive(Clone, Copy, Eq, Default, Hash, PartialEq)]
-struct StateFlags(u8);
-
-impl Cache {
-    /// Create new empty cache for the DFA engine.
-    pub fn new(prog: &Program) -> Self {
-        // We add 1 to account for the special EOF byte.
-        let num_byte_classes = (prog.byte_classes[255] as usize + 1) + 1;
-        let starts = vec![STATE_UNKNOWN; 256];
-        let mut cache = Cache {
-            inner: CacheInner {
-                compiled: HashMap::new(),
-                trans: Transitions::new(num_byte_classes),
-                states: vec![],
-                start_states: starts,
-                stack: vec![],
-                flush_count: 0,
-                size: 0,
-            },
-            qcur: SparseSet::new(prog.insts.len()),
-            qnext: SparseSet::new(prog.insts.len()),
-        };
-        cache.inner.reset_size();
-        cache
-    }
-}
-
-impl CacheInner {
-    /// Resets the cache size to account for fixed costs, such as the program
-    /// and stack sizes.
-    fn reset_size(&mut self) {
-        self.size =
-            (self.start_states.len() * mem::size_of::<StatePtr>())
-            + (self.stack.len() * mem::size_of::<InstPtr>());
-    }
-}
-
-impl<'a> Fsm<'a> {
-    #[inline(always)] // reduces constant overhead
-    pub fn forward(
-        prog: &'a Program,
-        cache: &ProgramCache,
-        quit_after_match: bool,
-        text: &[u8],
-        at: usize,
-    ) -> Result<usize> {
-        let mut cache = cache.borrow_mut();
-        let mut cache = &mut cache.dfa;
-        let mut dfa = Fsm {
-            prog: prog,
-            start: 0, // filled in below
-            at: at,
-            quit_after_match: quit_after_match,
-            last_match_si: STATE_UNKNOWN,
-            last_cache_flush: at,
-            cache: &mut cache.inner,
-        };
-        let (empty_flags, state_flags) = dfa.start_flags(text, at);
-        dfa.start = match dfa.start_state(
-            &mut cache.qcur,
-            empty_flags,
-            state_flags,
-        ) {
-            None => return Result::Quit,
-            Some(STATE_DEAD) => return Result::NoMatch(at),
-            Some(si) => si,
-        };
-        debug_assert!(dfa.start != STATE_UNKNOWN);
-        dfa.exec_at(&mut cache.qcur, &mut cache.qnext, text)
-    }
-
-    #[inline(always)] // reduces constant overhead
-    pub fn reverse(
-        prog: &'a Program,
-        cache: &ProgramCache,
-        quit_after_match: bool,
-        text: &[u8],
-        at: usize,
-    ) -> Result<usize> {
-        let mut cache = cache.borrow_mut();
-        let mut cache = &mut cache.dfa_reverse;
-        let mut dfa = Fsm {
-            prog: prog,
-            start: 0, // filled in below
-            at: at,
-            quit_after_match: quit_after_match,
-            last_match_si: STATE_UNKNOWN,
-            last_cache_flush: at,
-            cache: &mut cache.inner,
-        };
-        let (empty_flags, state_flags) = dfa.start_flags_reverse(text, at);
-        dfa.start = match dfa.start_state(
-            &mut cache.qcur,
-            empty_flags,
-            state_flags,
-        ) {
-            None => return Result::Quit,
-            Some(STATE_DEAD) => return Result::NoMatch(at),
-            Some(si) => si,
-        };
-        debug_assert!(dfa.start != STATE_UNKNOWN);
-        dfa.exec_at_reverse(&mut cache.qcur, &mut cache.qnext, text)
-    }
-
-    #[inline(always)] // reduces constant overhead
-    pub fn forward_many(
-        prog: &'a Program,
-        cache: &ProgramCache,
-        matches: &mut [bool],
-        text: &[u8],
-        at: usize,
-    ) -> Result<usize> {
-        debug_assert!(matches.len() == prog.matches.len());
-        let mut cache = cache.borrow_mut();
-        let mut cache = &mut cache.dfa;
-        let mut dfa = Fsm {
-            prog: prog,
-            start: 0, // filled in below
-            at: at,
-            quit_after_match: false,
-            last_match_si: STATE_UNKNOWN,
-            last_cache_flush: at,
-            cache: &mut cache.inner,
-        };
-        let (empty_flags, state_flags) = dfa.start_flags(text, at);
-        dfa.start = match dfa.start_state(
-            &mut cache.qcur,
-            empty_flags,
-            state_flags,
-        ) {
-            None => return Result::Quit,
-            Some(STATE_DEAD) => return Result::NoMatch(at),
-            Some(si) => si,
-        };
-        debug_assert!(dfa.start != STATE_UNKNOWN);
-        let result = dfa.exec_at(&mut cache.qcur, &mut cache.qnext, text);
-        if result.is_match() {
-            if matches.len() == 1 {
-                matches[0] = true;
-            } else {
-                debug_assert!(dfa.last_match_si != STATE_UNKNOWN);
-                debug_assert!(dfa.last_match_si != STATE_DEAD);
-                for ip in dfa.state(dfa.last_match_si).inst_ptrs() {
-                    if let Inst::Match(slot) = dfa.prog[ip] {
-                        matches[slot] = true;
-                    }
-                }
-            }
-        }
-        result
-    }
-
-    /// Executes the DFA on a forward NFA.
-    ///
-    /// {qcur,qnext} are scratch ordered sets which may be non-empty.
-    #[inline(always)] // reduces constant overhead
-    fn exec_at(
-        &mut self,
-        qcur: &mut SparseSet,
-        qnext: &mut SparseSet,
-        text: &[u8],
-    ) -> Result<usize> {
-        // For the most part, the DFA is basically:
-        //
-        //   last_match = null
-        //   while current_byte != EOF:
-        //     si = current_state.next[current_byte]
-        //     if si is match
-        //       last_match = si
-        //   return last_match
-        //
-        // However, we need to deal with a few things:
-        //
-        //   1. This is an *online* DFA, so the current state's next list
-        //      may not point to anywhere yet, so we must go out and compute
-        //      them. (They are then cached into the current state's next list
-        //      to avoid re-computation.)
-        //   2. If we come across a state that is known to be dead (i.e., never
-        //      leads to a match), then we can quit early.
-        //   3. If the caller just wants to know if a match occurs, then we
-        //      can quit as soon as we know we have a match. (Full leftmost
-        //      first semantics require continuing on.)
-        //   4. If we're in the start state, then we can use a pre-computed set
-        //      of prefix literals to skip quickly along the input.
-        //   5. After the input is exhausted, we run the DFA on one symbol
-        //      that stands for EOF. This is useful for handling empty width
-        //      assertions.
-        //   6. We can't actually do state.next[byte]. Instead, we have to do
-        //      state.next[byte_classes[byte]], which permits us to keep the
-        //      'next' list very small.
-        //
-        // Since there's a bunch of extra stuff we need to consider, we do some
-        // pretty hairy tricks to get the inner loop to run as fast as
-        // possible.
-        debug_assert!(!self.prog.is_reverse);
-
-        // The last match is the currently known ending match position. It is
-        // reported as an index to the most recent byte that resulted in a
-        // transition to a match state and is always stored in capture slot `1`
-        // when searching forwards. Its maximum value is `text.len()`.
-        let mut result = Result::NoMatch(self.at);
-        let (mut prev_si, mut next_si) = (self.start, self.start);
-        let mut at = self.at;
-        while at < text.len() {
-            // This is the real inner loop. We take advantage of special bits
-            // set in the state pointer to determine whether a state is in the
-            // "common" case or not. Specifically, the common case is a
-            // non-match non-start non-dead state that has already been
-            // computed. So long as we remain in the common case, this inner
-            // loop will chew through the input.
-            //
-            // We also unroll the loop 4 times to amortize the cost of checking
-            // whether we've consumed the entire input. We are also careful
-            // to make sure that `prev_si` always represents the previous state
-            // and `next_si` always represents the next state after the loop
-            // exits, even if it isn't always true inside the loop.
-            while next_si <= STATE_MAX && at < text.len() {
-                // Argument for safety is in the definition of next_si.
-                prev_si = unsafe { self.next_si(next_si, text, at) };
-                at += 1;
-                if prev_si > STATE_MAX || at + 2 >= text.len() {
-                    mem::swap(&mut prev_si, &mut next_si);
-                    break;
-                }
-                next_si = unsafe { self.next_si(prev_si, text, at) };
-                at += 1;
-                if next_si > STATE_MAX {
-                    break;
-                }
-                prev_si = unsafe { self.next_si(next_si, text, at) };
-                at += 1;
-                if prev_si > STATE_MAX {
-                    mem::swap(&mut prev_si, &mut next_si);
-                    break;
-                }
-                next_si = unsafe { self.next_si(prev_si, text, at) };
-                at += 1;
-            }
-            if next_si & STATE_MATCH > 0 {
-                // A match state is outside of the common case because it needs
-                // special case analysis. In particular, we need to record the
-                // last position as having matched and possibly quit the DFA if
-                // we don't need to keep matching.
-                next_si &= !STATE_MATCH;
-                result = Result::Match(at - 1);
-                if self.quit_after_match {
-                    return result;
-                }
-                self.last_match_si = next_si;
-                prev_si = next_si;
-
-                // This permits short-circuiting when matching a regex set.
-                // In particular, if this DFA state contains only match states,
-                // then it's impossible to extend the set of matches since
-                // match states are final. Therefore, we can quit.
-                if self.prog.matches.len() > 1 {
-                    let state = self.state(next_si);
-                    let just_matches = state.inst_ptrs()
-                         .all(|ip| self.prog[ip].is_match());
-                    if just_matches {
-                        return result;
-                    }
-                }
-
-                // Another inner loop! If the DFA stays in this particular
-                // match state, then we can rip through all of the input
-                // very quickly, and only recording the match location once
-                // we've left this particular state.
-                let cur = at;
-                while (next_si & !STATE_MATCH) == prev_si
-                    && at + 2 < text.len() {
-                    // Argument for safety is in the definition of next_si.
-                    next_si = unsafe {
-                        self.next_si(next_si & !STATE_MATCH, text, at)
-                    };
-                    at += 1;
-                }
-                if at > cur {
-                    result = Result::Match(at - 2);
-                }
-            } else if next_si & STATE_START > 0 {
-                // A start state isn't in the common case because we may
-                // what to do quick prefix scanning. If the program doesn't
-                // have a detected prefix, then start states are actually
-                // considered common and this case is never reached.
-                debug_assert!(self.has_prefix());
-                next_si &= !STATE_START;
-                prev_si = next_si;
-                at = match self.prefix_at(text, at) {
-                    None => return Result::NoMatch(text.len()),
-                    Some(i) => i,
-                };
-            } else if next_si >= STATE_UNKNOWN {
-                if next_si == STATE_QUIT {
-                    return Result::Quit;
-                }
-                // Finally, this corresponds to the case where the transition
-                // entered a state that can never lead to a match or a state
-                // that hasn't been computed yet. The latter being the "slow"
-                // path.
-                let byte = Byte::byte(text[at - 1]);
-                // We no longer care about the special bits in the state
-                // pointer.
-                prev_si &= STATE_MAX;
-                // Record where we are. This is used to track progress for
-                // determining whether we should quit if we've flushed the
-                // cache too much.
-                self.at = at;
-                next_si = match self.next_state(qcur, qnext, prev_si, byte) {
-                    None => return Result::Quit,
-                    Some(STATE_DEAD) => return result.set_non_match(at),
-                    Some(si) => si,
-                };
-                debug_assert!(next_si != STATE_UNKNOWN);
-                if next_si & STATE_MATCH > 0 {
-                    next_si &= !STATE_MATCH;
-                    result = Result::Match(at - 1);
-                    if self.quit_after_match {
-                        return result;
-                    }
-                    self.last_match_si = next_si;
-                }
-                prev_si = next_si;
-            } else {
-                prev_si = next_si;
-            }
-        }
-
-        // Run the DFA once more on the special EOF senitnel value.
-        // We don't care about the special bits in the state pointer any more,
-        // so get rid of them.
-        prev_si &= STATE_MAX;
-        prev_si = match self.next_state(qcur, qnext, prev_si, Byte::eof()) {
-            None => return Result::Quit,
-            Some(STATE_DEAD) => return result.set_non_match(text.len()),
-            Some(si) => si & !STATE_START,
-        };
-        debug_assert!(prev_si != STATE_UNKNOWN);
-        if prev_si & STATE_MATCH > 0 {
-            prev_si &= !STATE_MATCH;
-            self.last_match_si = prev_si;
-            result = Result::Match(text.len());
-        }
-        result
-    }
-
-    /// Executes the DFA on a reverse NFA.
-    #[inline(always)] // reduces constant overhead
-    fn exec_at_reverse(
-        &mut self,
-        qcur: &mut SparseSet,
-        qnext: &mut SparseSet,
-        text: &[u8],
-    ) -> Result<usize> {
-        // The comments in `exec_at` above mostly apply here too. The main
-        // difference is that we move backwards over the input and we look for
-        // the longest possible match instead of the leftmost-first match.
-        //
-        // N.B. The code duplication here is regrettable. Efforts to improve
-        // it without sacrificing performance are welcome. ---AG
-        debug_assert!(self.prog.is_reverse);
-        let mut result = Result::NoMatch(self.at);
-        let (mut prev_si, mut next_si) = (self.start, self.start);
-        let mut at = self.at;
-        while at > 0 {
-            while next_si <= STATE_MAX && at > 0 {
-                // Argument for safety is in the definition of next_si.
-                at -= 1;
-                prev_si = unsafe { self.next_si(next_si, text, at) };
-                if prev_si > STATE_MAX || at <= 4 {
-                    mem::swap(&mut prev_si, &mut next_si);
-                    break;
-                }
-                at -= 1;
-                next_si = unsafe { self.next_si(prev_si, text, at) };
-                if next_si > STATE_MAX {
-                    break;
-                }
-                at -= 1;
-                prev_si = unsafe { self.next_si(next_si, text, at) };
-                if prev_si > STATE_MAX {
-                    mem::swap(&mut prev_si, &mut next_si);
-                    break;
-                }
-                at -= 1;
-                next_si = unsafe { self.next_si(prev_si, text, at) };
-            }
-            if next_si & STATE_MATCH > 0 {
-                next_si &= !STATE_MATCH;
-                result = Result::Match(at + 1);
-                if self.quit_after_match {
-                    return result
-                }
-                self.last_match_si = next_si;
-                prev_si = next_si;
-                let cur = at;
-                while (next_si & !STATE_MATCH) == prev_si && at >= 2 {
-                    // Argument for safety is in the definition of next_si.
-                    at -= 1;
-                    next_si = unsafe {
-                        self.next_si(next_si & !STATE_MATCH, text, at)
-                    };
-                }
-                if at < cur {
-                    result = Result::Match(at + 2);
-                }
-            } else if next_si >= STATE_UNKNOWN {
-                if next_si == STATE_QUIT {
-                    return Result::Quit;
-                }
-                let byte = Byte::byte(text[at]);
-                prev_si &= STATE_MAX;
-                self.at = at;
-                next_si = match self.next_state(qcur, qnext, prev_si, byte) {
-                    None => return Result::Quit,
-                    Some(STATE_DEAD) => return result.set_non_match(at),
-                    Some(si) => si,
-                };
-                debug_assert!(next_si != STATE_UNKNOWN);
-                if next_si & STATE_MATCH > 0 {
-                    next_si &= !STATE_MATCH;
-                    result = Result::Match(at + 1);
-                    if self.quit_after_match {
-                        return result;
-                    }
-                    self.last_match_si = next_si;
-                }
-                prev_si = next_si;
-            } else {
-                prev_si = next_si;
-            }
-        }
-
-        // Run the DFA once more on the special EOF senitnel value.
-        prev_si = match self.next_state(qcur, qnext, prev_si, Byte::eof()) {
-            None => return Result::Quit,
-            Some(STATE_DEAD) => return result.set_non_match(0),
-            Some(si) => si,
-        };
-        debug_assert!(prev_si != STATE_UNKNOWN);
-        if prev_si & STATE_MATCH > 0 {
-            prev_si &= !STATE_MATCH;
-            self.last_match_si = prev_si;
-            result = Result::Match(0);
-        }
-        result
-    }
-
-    /// next_si transitions to the next state, where the transition input
-    /// corresponds to text[i].
-    ///
-    /// This elides bounds checks, and is therefore unsafe.
-    #[inline(always)]
-    unsafe fn next_si(&self, si: StatePtr, text: &[u8], i: usize) -> StatePtr {
-        // What is the argument for safety here?
-        // We have three unchecked accesses that could possibly violate safety:
-        //
-        //   1. The given byte of input (`text[i]`).
-        //   2. The class of the byte of input (`classes[text[i]]`).
-        //   3. The transition for the class (`trans[si + cls]`).
-        //
-        // (1) is only safe when calling next_si is guarded by
-        // `i < text.len()`.
-        //
-        // (2) is the easiest case to guarantee since `text[i]` is always a
-        // `u8` and `self.prog.byte_classes` always has length `u8::MAX`.
-        // (See `ByteClassSet.byte_classes` in `compile.rs`.)
-        //
-        // (3) is only safe if (1)+(2) are safe. Namely, the transitions
-        // of every state are defined to have length equal to the number of
-        // byte classes in the program. Therefore, a valid class leads to a
-        // valid transition. (All possible transitions are valid lookups, even
-        // if it points to a state that hasn't been computed yet.) (3) also
-        // relies on `si` being correct, but StatePtrs should only ever be
-        // retrieved from the transition table, which ensures they are correct.
-        debug_assert!(i < text.len());
-        let b = *text.get_unchecked(i);
-        debug_assert!((b as usize) < self.prog.byte_classes.len());
-        let cls = *self.prog.byte_classes.get_unchecked(b as usize);
-        self.cache.trans.next_unchecked(si, cls as usize)
-    }
-
-    /// Computes the next state given the current state and the current input
-    /// byte (which may be EOF).
-    ///
-    /// If STATE_DEAD is returned, then there is no valid state transition.
-    /// This implies that no permutation of future input can lead to a match
-    /// state.
-    ///
-    /// STATE_UNKNOWN can never be returned.
-    fn exec_byte(
-        &mut self,
-        qcur: &mut SparseSet,
-        qnext: &mut SparseSet,
-        mut si: StatePtr,
-        b: Byte,
-    ) -> Option<StatePtr> {
-        use prog::Inst::*;
-
-        // Initialize a queue with the current DFA state's NFA states.
-        qcur.clear();
-        for ip in self.state(si).inst_ptrs() {
-            qcur.insert(ip);
-        }
-
-        // Before inspecting the current byte, we may need to also inspect
-        // whether the position immediately preceding the current byte
-        // satisfies the empty assertions found in the current state.
-        //
-        // We only need to do this step if there are any empty assertions in
-        // the current state.
-        let is_word_last = self.state(si).flags().is_word();
-        let is_word = b.is_ascii_word();
-        if self.state(si).flags().has_empty() {
-            // Compute the flags immediately preceding the current byte.
-            // This means we only care about the "end" or "end line" flags.
-            // (The "start" flags are computed immediately proceding the
-            // current byte and is handled below.)
-            let mut flags = EmptyFlags::default();
-            if b.is_eof() {
-                flags.end = true;
-                flags.end_line = true;
-            } else if b.as_byte().map_or(false, |b| b == b'\n') {
-                flags.end_line = true;
-            }
-            if is_word_last == is_word {
-                flags.not_word_boundary = true;
-            } else {
-                flags.word_boundary = true;
-            }
-            // Now follow epsilon transitions from every NFA state, but make
-            // sure we only follow transitions that satisfy our flags.
-            qnext.clear();
-            for &ip in &*qcur {
-                self.follow_epsilons(usize_to_u32(ip), qnext, flags);
-            }
-            mem::swap(qcur, qnext);
-        }
-
-        // Now we set flags for immediately after the current byte. Since start
-        // states are processed separately, and are the only states that can
-        // have the StartText flag set, we therefore only need to worry about
-        // the StartLine flag here.
-        //
-        // We do also keep track of whether this DFA state contains a NFA state
-        // that is a matching state. This is precisely how we delay the DFA
-        // matching by one byte in order to process the special EOF sentinel
-        // byte. Namely, if this DFA state containing a matching NFA state,
-        // then it is the *next* DFA state that is marked as a match.
-        let mut empty_flags = EmptyFlags::default();
-        let mut state_flags = StateFlags::default();
-        empty_flags.start_line = b.as_byte().map_or(false, |b| b == b'\n');
-        if b.is_ascii_word() {
-            state_flags.set_word();
-        }
-        // Now follow all epsilon transitions again, but only after consuming
-        // the current byte.
-        qnext.clear();
-        for &ip in &*qcur {
-            match self.prog[ip as usize] {
-                // These states never happen in a byte-based program.
-                Char(_) | Ranges(_) => unreachable!(),
-                // These states are handled when following epsilon transitions.
-                Save(_) | Split(_) | EmptyLook(_) => {}
-                Match(_) => {
-                    state_flags.set_match();
-                    if !self.continue_past_first_match() {
-                        break;
-                    } else if self.prog.matches.len() > 1
-                            && !qnext.contains(ip as usize) {
-                        // If we are continuing on to find other matches,
-                        // then keep a record of the match states we've seen.
-                        qnext.insert(ip);
-                    }
-                }
-                Bytes(ref inst) => {
-                    if b.as_byte().map_or(false, |b| inst.matches(b)) {
-                        self.follow_epsilons(
-                            inst.goto as InstPtr, qnext, empty_flags);
-                    }
-                }
-            }
-        }
-        let mut cache = true;
-        if b.is_eof() && self.prog.matches.len() > 1 {
-            // If we're processing the last byte of the input and we're
-            // matching a regex set, then make the next state contain the
-            // previous states transitions. We do this so that the main
-            // matching loop can extract all of the match instructions.
-            mem::swap(qcur, qnext);
-            // And don't cache this state because it's totally bunk.
-            cache = false;
-        }
-        // We've now built up the set of NFA states that ought to comprise the
-        // next DFA state, so try to find it in the cache, and if it doesn't
-        // exist, cache it.
-        //
-        // N.B. We pass `&mut si` here because the cache may clear itself if
-        // it has gotten too full. When that happens, the location of the
-        // current state may change.
-        let mut next = match self.cached_state(
-            qnext,
-            state_flags,
-            Some(&mut si),
-        ) {
-            None => return None,
-            Some(next) => next,
-        };
-        if (self.start & !STATE_START) == next {
-            // Start states can never be match states since all matches are
-            // delayed by one byte.
-            debug_assert!(!self.state(next).flags().is_match());
-            next = self.start_ptr(next);
-        }
-        if next <= STATE_MAX && self.state(next).flags().is_match() {
-            next = STATE_MATCH | next;
-        }
-        debug_assert!(next != STATE_UNKNOWN);
-        // And now store our state in the current state's next list.
-        if cache {
-            let cls = self.byte_class(b);
-            self.cache.trans.set_next(si, cls, next);
-        }
-        Some(next)
-    }
-
-    /// Follows the epsilon transitions starting at (and including) `ip`. The
-    /// resulting states are inserted into the ordered set `q`.
-    ///
-    /// Conditional epsilon transitions (i.e., empty width assertions) are only
-    /// followed if they are satisfied by the given flags, which should
-    /// represent the flags set at the current location in the input.
-    ///
-    /// If the current location corresponds to the empty string, then only the
-    /// end line and/or end text flags may be set. If the current location
-    /// corresponds to a real byte in the input, then only the start line
-    /// and/or start text flags may be set.
-    ///
-    /// As an exception to the above, when finding the initial state, any of
-    /// the above flags may be set:
-    ///
-    /// If matching starts at the beginning of the input, then start text and
-    /// start line should be set. If the input is empty, then end text and end
-    /// line should also be set.
-    ///
-    /// If matching starts after the beginning of the input, then only start
-    /// line should be set if the preceding byte is `\n`. End line should never
-    /// be set in this case. (Even if the proceding byte is a `\n`, it will
-    /// be handled in a subsequent DFA state.)
-    fn follow_epsilons(
-        &mut self,
-        ip: InstPtr,
-        q: &mut SparseSet,
-        flags: EmptyFlags,
-    ) {
-        use prog::Inst::*;
-        use prog::EmptyLook::*;
-
-        // We need to traverse the NFA to follow epsilon transitions, so avoid
-        // recursion with an explicit stack.
-        self.cache.stack.push(ip);
-        while let Some(ip) = self.cache.stack.pop() {
-            // Don't visit states we've already added.
-            if q.contains(ip as usize) {
-                continue;
-            }
-            q.insert(ip as usize);
-            match self.prog[ip as usize] {
-                Char(_) | Ranges(_) => unreachable!(),
-                Match(_) | Bytes(_) => {}
-                EmptyLook(ref inst) => {
-                    // Only follow empty assertion states if our flags satisfy
-                    // the assertion.
-                    match inst.look {
-                        StartLine if flags.start_line => {
-                            self.cache.stack.push(inst.goto as InstPtr);
-                        }
-                        EndLine if flags.end_line => {
-                            self.cache.stack.push(inst.goto as InstPtr);
-                        }
-                        StartText if flags.start => {
-                            self.cache.stack.push(inst.goto as InstPtr);
-                        }
-                        EndText if flags.end => {
-                            self.cache.stack.push(inst.goto as InstPtr);
-                        }
-                        WordBoundaryAscii if flags.word_boundary => {
-                            self.cache.stack.push(inst.goto as InstPtr);
-                        }
-                        NotWordBoundaryAscii if flags.not_word_boundary => {
-                            self.cache.stack.push(inst.goto as InstPtr);
-                        }
-                        WordBoundary if flags.word_boundary => {
-                            self.cache.stack.push(inst.goto as InstPtr);
-                        }
-                        NotWordBoundary if flags.not_word_boundary => {
-                            self.cache.stack.push(inst.goto as InstPtr);
-                        }
-                        StartLine | EndLine | StartText | EndText => {}
-                        WordBoundaryAscii | NotWordBoundaryAscii => {}
-                        WordBoundary | NotWordBoundary => {}
-                    }
-                }
-                Save(ref inst) => self.cache.stack.push(inst.goto as InstPtr),
-                Split(ref inst) => {
-                    self.cache.stack.push(inst.goto2 as InstPtr);
-                    self.cache.stack.push(inst.goto1 as InstPtr);
-                }
-            }
-        }
-    }
-
-    /// Find a previously computed state matching the given set of instructions
-    /// and is_match bool.
-    ///
-    /// The given set of instructions should represent a single state in the
-    /// NFA along with all states reachable without consuming any input.
-    ///
-    /// The is_match bool should be true if and only if the preceding DFA state
-    /// contains an NFA matching state. The cached state produced here will
-    /// then signify a match. (This enables us to delay a match by one byte,
-    /// in order to account for the EOF sentinel byte.)
-    ///
-    /// If the cache is full, then it is wiped before caching a new state.
-    ///
-    /// The current state should be specified if it exists, since it will need
-    /// to be preserved if the cache clears itself. (Start states are
-    /// always saved, so they should not be passed here.) It takes a mutable
-    /// pointer to the index because if the cache is cleared, the state's
-    /// location may change.
-    fn cached_state(
-        &mut self,
-        q: &SparseSet,
-        mut state_flags: StateFlags,
-        current_state: Option<&mut StatePtr>,
-    ) -> Option<StatePtr> {
-        // If we couldn't come up with a non-empty key to represent this state,
-        // then it is dead and can never lead to a match.
-        //
-        // Note that inst_flags represent the set of empty width assertions
-        // in q. We use this as an optimization in exec_byte to determine when
-        // we should follow epsilon transitions at the empty string preceding
-        // the current byte.
-        let key = match self.cached_state_key(q, &mut state_flags) {
-            None => return Some(STATE_DEAD),
-            Some(v) => v,
-        };
-        // In the cache? Cool. Done.
-        if let Some(&si) = self.cache.compiled.get(&key) {
-            return Some(si);
-        }
-        // If the cache has gotten too big, wipe it.
-        if self.approximate_size() > self.prog.dfa_size_limit {
-            if !self.clear_cache_and_save(current_state) {
-                // Ooops. DFA is giving up.
-                return None;
-            }
-        }
-        // Allocate room for our state and add it.
-        self.add_state(key)
-    }
-
-    /// Produces a key suitable for describing a state in the DFA cache.
-    ///
-    /// The key invariant here is that equivalent keys are produced for any two
-    /// sets of ordered NFA states (and toggling of whether the previous NFA
-    /// states contain a match state) that do not discriminate a match for any
-    /// input.
-    ///
-    /// Specifically, q should be an ordered set of NFA states and is_match
-    /// should be true if and only if the previous NFA states contained a match
-    /// state.
-    fn cached_state_key(
-        &mut self,
-        q: &SparseSet,
-        state_flags: &mut StateFlags,
-    ) -> Option<State> {
-        use prog::Inst::*;
-
-        // We need to build up enough information to recognize pre-built states
-        // in the DFA. Generally speaking, this includes every instruction
-        // except for those which are purely epsilon transitions, e.g., the
-        // Save and Split instructions.
-        //
-        // Empty width assertions are also epsilon transitions, but since they
-        // are conditional, we need to make them part of a state's key in the
-        // cache.
-
-        // Reserve 1 byte for flags.
-        let mut insts = vec![0];
-        let mut prev = 0;
-        for &ip in q {
-            let ip = usize_to_u32(ip);
-            match self.prog[ip as usize] {
-                Char(_) | Ranges(_) => unreachable!(),
-                Save(_) => {}
-                Split(_) => {}
-                Bytes(_) => push_inst_ptr(&mut insts, &mut prev, ip),
-                EmptyLook(_) => {
-                    state_flags.set_empty();
-                    push_inst_ptr(&mut insts, &mut prev, ip)
-                }
-                Match(_) => {
-                    push_inst_ptr(&mut insts, &mut prev, ip);
-                    if !self.continue_past_first_match() {
-                        break;
-                    }
-                }
-            }
-        }
-        // If we couldn't transition to any other instructions and we didn't
-        // see a match when expanding NFA states previously, then this is a
-        // dead state and no amount of additional input can transition out
-        // of this state.
-        if insts.len() == 1 && !state_flags.is_match() {
-            None
-        } else {
-            let StateFlags(f) = *state_flags;
-            insts[0] = f;
-            Some(State { data: insts.into_boxed_slice() })
-        }
-    }
-
-    /// Clears the cache, but saves and restores current_state if it is not
-    /// none.
-    ///
-    /// The current state must be provided here in case its location in the
-    /// cache changes.
-    ///
-    /// This returns false if the cache is not cleared and the DFA should
-    /// give up.
-    fn clear_cache_and_save(
-        &mut self,
-        current_state: Option<&mut StatePtr>,
-    ) -> bool {
-        if self.cache.states.is_empty() {
-            // Nothing to clear...
-            return true;
-        }
-        match current_state {
-            None => self.clear_cache(),
-            Some(si) => {
-                let cur = self.state(*si).clone();
-                if !self.clear_cache() {
-                    return false;
-                }
-                // The unwrap is OK because we just cleared the cache and
-                // therefore know that the next state pointer won't exceed
-                // STATE_MAX.
-                *si = self.restore_state(cur).unwrap();
-                true
-            }
-        }
-    }
-
-    /// Wipes the state cache, but saves and restores the current start state.
-    ///
-    /// This returns false if the cache is not cleared and the DFA should
-    /// give up.
-    fn clear_cache(&mut self) -> bool {
-        // Bail out of the DFA if we're moving too "slowly."
-        // A heuristic from RE2: assume the DFA is too slow if it is processing
-        // 10 or fewer bytes per state.
-        // Additionally, we permit the cache to be flushed a few times before
-        // caling it quits.
-        let nstates = self.cache.states.len();
-        if self.cache.flush_count >= 3
-            && self.at >= self.last_cache_flush
-            && (self.at - self.last_cache_flush) <= 10 * nstates {
-            return false;
-        }
-        // Update statistics tracking cache flushes.
-        self.last_cache_flush = self.at;
-        self.cache.flush_count += 1;
-
-        // OK, actually flush the cache.
-        let start = self.state(self.start & !STATE_START).clone();
-        let last_match = if self.last_match_si <= STATE_MAX {
-            Some(self.state(self.last_match_si).clone())
-        } else {
-            None
-        };
-        self.cache.reset_size();
-        self.cache.trans.clear();
-        self.cache.states.clear();
-        self.cache.compiled.clear();
-        for s in self.cache.start_states.iter_mut() {
-            *s = STATE_UNKNOWN;
-        }
-        // The unwraps are OK because we just cleared the cache and therefore
-        // know that the next state pointer won't exceed STATE_MAX.
-        let start_ptr = self.restore_state(start).unwrap();
-        self.start = self.start_ptr(start_ptr);
-        if let Some(last_match) = last_match {
-            self.last_match_si = self.restore_state(last_match).unwrap();
-        }
-        true
-    }
-
-    /// Restores the given state back into the cache, and returns a pointer
-    /// to it.
-    fn restore_state(&mut self, state: State) -> Option<StatePtr> {
-        // If we've already stored this state, just return a pointer to it.
-        // None will be the wiser.
-        if let Some(&si) = self.cache.compiled.get(&state) {
-            return Some(si);
-        }
-        self.add_state(state)
-    }
-
-    /// Returns the next state given the current state si and current byte
-    /// b. {qcur,qnext} are used as scratch space for storing ordered NFA
-    /// states.
-    ///
-    /// This tries to fetch the next state from the cache, but if that fails,
-    /// it computes the next state, caches it and returns a pointer to it.
-    ///
-    /// The pointer can be to a real state, or it can be STATE_DEAD.
-    /// STATE_UNKNOWN cannot be returned.
-    ///
-    /// None is returned if a new state could not be allocated (i.e., the DFA
-    /// ran out of space and thinks it's running too slowly).
-    fn next_state(
-        &mut self,
-        qcur: &mut SparseSet,
-        qnext: &mut SparseSet,
-        si: StatePtr,
-        b: Byte,
-    ) -> Option<StatePtr> {
-        if si == STATE_DEAD {
-            return Some(STATE_DEAD);
-        }
-        match self.cache.trans.next(si, self.byte_class(b)) {
-            STATE_UNKNOWN => self.exec_byte(qcur, qnext, si, b),
-            STATE_QUIT => None,
-            STATE_DEAD => Some(STATE_DEAD),
-            nsi => Some(nsi),
-        }
-    }
-
-    /// Computes and returns the start state, where searching begins at
-    /// position `at` in `text`. If the state has already been computed,
-    /// then it is pulled from the cache. If the state hasn't been cached,
-    /// then it is computed, cached and a pointer to it is returned.
-    ///
-    /// This may return STATE_DEAD but never STATE_UNKNOWN.
-    #[inline(always)] // reduces constant overhead
-    fn start_state(
-        &mut self,
-        q: &mut SparseSet,
-        empty_flags: EmptyFlags,
-        state_flags: StateFlags,
-    ) -> Option<StatePtr> {
-        // Compute an index into our cache of start states based on the set
-        // of empty/state flags set at the current position in the input. We
-        // don't use every flag since not all flags matter. For example, since
-        // matches are delayed by one byte, start states can never be match
-        // states.
-        let flagi = {
-            (((empty_flags.start as u8) << 0) |
-             ((empty_flags.end as u8) << 1) |
-             ((empty_flags.start_line as u8) << 2) |
-             ((empty_flags.end_line as u8) << 3) |
-             ((empty_flags.word_boundary as u8) << 4) |
-             ((empty_flags.not_word_boundary as u8) << 5) |
-             ((state_flags.is_word() as u8) << 6))
-            as usize
-        };
-        match self.cache.start_states[flagi] {
-            STATE_UNKNOWN => {}
-            STATE_DEAD => return Some(STATE_DEAD),
-            si => return Some(si),
-        }
-        q.clear();
-        let start = usize_to_u32(self.prog.start);
-        self.follow_epsilons(start, q, empty_flags);
-        // Start states can never be match states because we delay every match
-        // by one byte. Given an empty string and an empty match, the match
-        // won't actually occur until the DFA processes the special EOF
-        // sentinel byte.
-        let sp = match self.cached_state(q, state_flags, None) {
-            None => return None,
-            Some(sp) => self.start_ptr(sp),
-        };
-        self.cache.start_states[flagi] = sp;
-        Some(sp)
-    }
-
-    /// Computes the set of starting flags for the given position in text.
-    ///
-    /// This should only be used when executing the DFA forwards over the
-    /// input.
-    fn start_flags(&self, text: &[u8], at: usize) -> (EmptyFlags, StateFlags) {
-        let mut empty_flags = EmptyFlags::default();
-        let mut state_flags = StateFlags::default();
-        empty_flags.start = at == 0;
-        empty_flags.end = text.len() == 0;
-        empty_flags.start_line = at == 0 || text[at - 1] == b'\n';
-        empty_flags.end_line = text.len() == 0;
-
-        let is_word_last = at > 0 && Byte::byte(text[at - 1]).is_ascii_word();
-        let is_word = at < text.len() && Byte::byte(text[at]).is_ascii_word();
-        if is_word_last {
-            state_flags.set_word();
-        }
-        if is_word == is_word_last {
-            empty_flags.not_word_boundary = true;
-        } else {
-            empty_flags.word_boundary = true;
-        }
-        (empty_flags, state_flags)
-    }
-
-    /// Computes the set of starting flags for the given position in text.
-    ///
-    /// This should only be used when executing the DFA in reverse over the
-    /// input.
-    fn start_flags_reverse(
-        &self,
-        text: &[u8],
-        at: usize,
-    ) -> (EmptyFlags, StateFlags) {
-        let mut empty_flags = EmptyFlags::default();
-        let mut state_flags = StateFlags::default();
-        empty_flags.start = at == text.len();
-        empty_flags.end = text.len() == 0;
-        empty_flags.start_line = at == text.len() || text[at] == b'\n';
-        empty_flags.end_line = text.len() == 0;
-
-        let is_word_last =
-            at < text.len() && Byte::byte(text[at]).is_ascii_word();
-        let is_word = at > 0 && Byte::byte(text[at - 1]).is_ascii_word();
-        if is_word_last {
-            state_flags.set_word();
-        }
-        if is_word == is_word_last {
-            empty_flags.not_word_boundary = true;
-        } else {
-            empty_flags.word_boundary = true;
-        }
-        (empty_flags, state_flags)
-    }
-
-    /// Returns a reference to a State given a pointer to it.
-    fn state(&self, si: StatePtr) -> &State {
-        &self.cache.states[si as usize / self.num_byte_classes()]
-    }
-
-    /// Adds the given state to the DFA.
-    ///
-    /// This allocates room for transitions out of this state in
-    /// self.cache.trans. The transitions can be set with the returned
-    /// StatePtr.
-    ///
-    /// If None is returned, then the state limit was reached and the DFA
-    /// should quit.
-    fn add_state(&mut self, state: State) -> Option<StatePtr> {
-        // This will fail if the next state pointer exceeds STATE_PTR. In
-        // practice, the cache limit will prevent us from ever getting here,
-        // but maybe callers will set the cache size to something ridiculous...
-        let si = match self.cache.trans.add() {
-            None => return None,
-            Some(si) => si,
-        };
-        // If the program has a Unicode word boundary, then set any transitions
-        // for non-ASCII bytes to STATE_QUIT. If the DFA stumbles over such a
-        // transition, then it will quit and an alternative matching engine
-        // will take over.
-        if self.prog.has_unicode_word_boundary {
-            for b in 128..256 {
-                let cls = self.byte_class(Byte::byte(b as u8));
-                self.cache.trans.set_next(si, cls, STATE_QUIT);
-            }
-        }
-        // Finally, put our actual state on to our heap of states and index it
-        // so we can find it later.
-        self.cache.size +=
-            self.cache.trans.state_heap_size()
-            + (2 * state.data.len())
-            + (2 * mem::size_of::<State>())
-            + mem::size_of::<StatePtr>();
-        self.cache.states.push(state.clone());
-        self.cache.compiled.insert(state, si);
-        // Transition table and set of states and map should all be in sync.
-        debug_assert!(self.cache.states.len()
-                      == self.cache.trans.num_states());
-        debug_assert!(self.cache.states.len()
-                      == self.cache.compiled.len());
-        Some(si)
-    }
-
-    /// Quickly finds the next occurrence of any literal prefixes in the regex.
-    /// If there are no literal prefixes, then the current position is
-    /// returned. If there are literal prefixes and one could not be found,
-    /// then None is returned.
-    ///
-    /// This should only be called when the DFA is in a start state.
-    fn prefix_at(&self, text: &[u8], at: usize) -> Option<usize> {
-        self.prog.prefixes.find(&text[at..]).map(|(s, _)| at + s)
-    }
-
-    /// Returns the number of byte classes required to discriminate transitions
-    /// in each state.
-    ///
-    /// invariant: num_byte_classes() == len(State.next)
-    fn num_byte_classes(&self) -> usize {
-        // We add 1 to account for the special EOF byte.
-        (self.prog.byte_classes[255] as usize + 1) + 1
-    }
-
-    /// Given an input byte or the special EOF sentinel, return its
-    /// corresponding byte class.
-    #[inline(always)]
-    fn byte_class(&self, b: Byte) -> usize {
-        match b.as_byte() {
-            None => self.num_byte_classes() - 1,
-            Some(b) => self.u8_class(b),
-        }
-    }
-
-    /// Like byte_class, but explicitly for u8s.
-    #[inline(always)]
-    fn u8_class(&self, b: u8) -> usize {
-        self.prog.byte_classes[b as usize] as usize
-    }
-
-    /// Returns true if the DFA should continue searching past the first match.
-    ///
-    /// Leftmost first semantics in the DFA are preserved by not following NFA
-    /// transitions after the first match is seen.
-    ///
-    /// On occasion, we want to avoid leftmost first semantics to find either
-    /// the longest match (for reverse search) or all possible matches (for
-    /// regex sets).
-    fn continue_past_first_match(&self) -> bool {
-        self.prog.is_reverse || self.prog.matches.len() > 1
-    }
-
-    /// Returns true if there is a prefix we can quickly search for.
-    fn has_prefix(&self) -> bool {
-        !self.prog.is_reverse
-        && !self.prog.prefixes.is_empty()
-        && !self.prog.is_anchored_start
-    }
-
-    /// Sets the STATE_START bit in the given state pointer if and only if
-    /// we have a prefix to scan for.
-    ///
-    /// If there's no prefix, then it's a waste to treat the start state
-    /// specially.
-    fn start_ptr(&self, si: StatePtr) -> StatePtr {
-        if self.has_prefix() {
-            si | STATE_START
-        } else {
-            si
-        }
-    }
-
-    /// Approximate size returns the approximate heap space currently used by
-    /// the DFA. It is used to determine whether the DFA's state cache needs to
-    /// be wiped. Namely, it is possible that for certain regexes on certain
-    /// inputs, a new state could be created for every byte of input. (This is
-    /// bad for memory use, so we bound it with a cache.)
-    fn approximate_size(&self) -> usize {
-        self.cache.size + self.prog.approximate_size()
-    }
-}
-
-impl Transitions {
-    /// Create a new transition table.
-    ///
-    /// The number of byte classes corresponds to the stride. Every state will
-    /// have `num_byte_classes` slots for transitions.
-    fn new(num_byte_classes: usize) -> Transitions {
-        Transitions {
-            table: vec![],
-            num_byte_classes: num_byte_classes,
-        }
-    }
-
-    /// Returns the total number of states currently in this table.
-    fn num_states(&self) -> usize {
-        self.table.len() / self.num_byte_classes
-    }
-
-    /// Allocates room for one additional state and returns a pointer to it.
-    ///
-    /// If there's no more room, None is returned.
-    fn add(&mut self) -> Option<StatePtr> {
-        let si = self.table.len();
-        if si > STATE_MAX as usize {
-            return None;
-        }
-        self.table.extend(repeat(STATE_UNKNOWN).take(self.num_byte_classes));
-        Some(usize_to_u32(si))
-    }
-
-    /// Clears the table of all states.
-    fn clear(&mut self) {
-        self.table.clear();
-    }
-
-    /// Sets the transition from (si, cls) to next.
-    fn set_next(&mut self, si: StatePtr, cls: usize, next: StatePtr) {
-        self.table[si as usize + cls] = next;
-    }
-
-    /// Returns the transition corresponding to (si, cls).
-    fn next(&self, si: StatePtr, cls: usize) -> StatePtr {
-        self.table[si as usize + cls]
-    }
-
-    /// The heap size, in bytes, of a single state in the transition table.
-    fn state_heap_size(&self) -> usize {
-        self.num_byte_classes * mem::size_of::<StatePtr>()
-    }
-
-    /// Like `next`, but uses unchecked access and is therefore unsafe.
-    unsafe fn next_unchecked(&self, si: StatePtr, cls: usize) -> StatePtr {
-        debug_assert!((si as usize) < self.table.len());
-        debug_assert!(cls < self.num_byte_classes);
-        *self.table.get_unchecked(si as usize + cls)
-    }
-}
-
-impl StateFlags {
-    fn is_match(&self) -> bool {
-        self.0 & 0b0000000_1 > 0
-    }
-
-    fn set_match(&mut self) {
-        self.0 |= 0b0000000_1;
-    }
-
-    fn is_word(&self) -> bool {
-        self.0 & 0b000000_1_0 > 0
-    }
-
-    fn set_word(&mut self) {
-        self.0 |= 0b000000_1_0;
-    }
-
-    fn has_empty(&self) -> bool {
-        self.0 & 0b00000_1_00 > 0
-    }
-
-    fn set_empty(&mut self) {
-        self.0 |= 0b00000_1_00;
-    }
-}
-
-impl Byte {
-    fn byte(b: u8) -> Self { Byte(b as u16) }
-    fn eof() -> Self { Byte(256) }
-    fn is_eof(&self) -> bool { self.0 == 256 }
-
-    fn is_ascii_word(&self) -> bool {
-        let b = match self.as_byte() {
-            None => return false,
-            Some(b) => b,
-        };
-        match b {
-            b'A'...b'Z' | b'a'...b'z' | b'0'...b'9' | b'_' => true,
-            _ => false,
-        }
-    }
-
-    fn as_byte(&self) -> Option<u8> {
-        if self.is_eof() {
-            None
-        } else {
-            Some(self.0 as u8)
-        }
-    }
-}
-
-impl fmt::Debug for State {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let ips: Vec<usize> = self.inst_ptrs().collect();
-        f.debug_struct("State")
-         .field("flags", &self.flags())
-         .field("insts", &ips)
-         .finish()
-    }
-}
-
-impl fmt::Debug for Transitions {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let mut fmtd = f.debug_map();
-        for si in 0..self.num_states() {
-            let s = si * self.num_byte_classes;
-            let e = s + self.num_byte_classes;
-            fmtd.entry(&si.to_string(), &TransitionsRow(&self.table[s..e]));
-        }
-        fmtd.finish()
-    }
-}
-
-struct TransitionsRow<'a>(&'a [StatePtr]);
-
-impl<'a> fmt::Debug for TransitionsRow<'a> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let mut fmtd = f.debug_map();
-        for (b, si) in self.0.iter().enumerate() {
-            match *si {
-                STATE_UNKNOWN => {}
-                STATE_DEAD => {
-                    fmtd.entry(&vb(b as usize), &"DEAD");
-                }
-                si => {
-                    fmtd.entry(&vb(b as usize), &si.to_string());
-                }
-            }
-        }
-        fmtd.finish()
-    }
-}
-
-impl fmt::Debug for StateFlags {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.debug_struct("StateFlags")
-         .field("is_match", &self.is_match())
-         .field("is_word", &self.is_word())
-         .field("has_empty", &self.has_empty())
-         .finish()
-    }
-}
-
-/// Helper function for formatting a byte as a nice-to-read escaped string.
-fn vb(b: usize) -> String {
-    use std::ascii::escape_default;
-
-    if b > ::std::u8::MAX as usize {
-        "EOF".to_owned()
-    } else {
-        let escaped = escape_default(b as u8).collect::<Vec<u8>>();
-        String::from_utf8_lossy(&escaped).into_owned()
-    }
-}
-
-fn usize_to_u32(n: usize) -> u32 {
-    if (n as u64) > (::std::u32::MAX as u64) {
-        panic!("BUG: {} is too big to fit into u32", n)
-    }
-    n as u32
-}
-
-#[allow(dead_code)] // useful for debugging
-fn show_state_ptr(si: StatePtr) -> String {
-    let mut s = format!("{:?}", si & STATE_MAX);
-    if si == STATE_UNKNOWN {
-        s = format!("{} (unknown)", s);
-    }
-    if si == STATE_DEAD {
-        s = format!("{} (dead)", s);
-    }
-    if si == STATE_QUIT {
-        s = format!("{} (quit)", s);
-    }
-    if si & STATE_START > 0 {
-        s = format!("{} (start)", s);
-    }
-    if si & STATE_MATCH > 0 {
-        s = format!("{} (match)", s);
-    }
-    s
-}
-
-/// https://developers.google.com/protocol-buffers/docs/encoding#varints
-fn write_vari32(data: &mut Vec<u8>, n: i32) {
-    let mut un = (n as u32) << 1;
-    if n < 0 {
-        un = !un;
-    }
-    write_varu32(data, un)
-}
-
-/// https://developers.google.com/protocol-buffers/docs/encoding#varints
-fn read_vari32(data: &[u8]) -> (i32, usize) {
-    let (un, i) = read_varu32(data);
-    let mut n = (un >> 1) as i32;
-    if un & 1 != 0 {
-        n = !n;
-    }
-    (n, i)
-}
-
-/// https://developers.google.com/protocol-buffers/docs/encoding#varints
-fn write_varu32(data: &mut Vec<u8>, mut n: u32) {
-    while n >= 0b1000_0000 {
-        data.push((n as u8) | 0b1000_0000);
-        n >>= 7;
-    }
-    data.push(n as u8);
-}
-
-/// https://developers.google.com/protocol-buffers/docs/encoding#varints
-fn read_varu32(data: &[u8]) -> (u32, usize) {
-    let mut n: u32 = 0;
-    let mut shift: u32 = 0;
-    for (i, &b) in data.iter().enumerate() {
-        if b < 0b1000_0000 {
-            return (n | ((b as u32) << shift), i + 1);
-        }
-        n |= ((b as u32) & 0b0111_1111) << shift;
-        shift += 7;
-    }
-    (0, 0)
-}
-
-#[cfg(test)]
-mod tests {
-    extern crate rand;
-
-    use quickcheck::{QuickCheck, StdGen, quickcheck};
-    use super::{
-        StateFlags, State, push_inst_ptr,
-        write_varu32, read_varu32, write_vari32, read_vari32,
-    };
-
-    #[test]
-    fn prop_state_encode_decode() {
-        fn p(ips: Vec<u32>, flags: u8) -> bool {
-            let mut data = vec![flags];
-            let mut prev = 0;
-            for &ip in ips.iter() {
-                push_inst_ptr(&mut data, &mut prev, ip);
-            }
-            let state = State { data: data.into_boxed_slice() };
-
-            let expected: Vec<usize> =
-                ips.into_iter().map(|ip| ip as usize).collect();
-            let got: Vec<usize> = state.inst_ptrs().collect();
-            expected == got && state.flags() == StateFlags(flags)
-        }
-        QuickCheck::new()
-            .gen(StdGen::new(self::rand::thread_rng(), 10_000))
-            .quickcheck(p as fn(Vec<u32>, u8) -> bool);
-    }
-
-    #[test]
-    fn prop_read_write_u32() {
-        fn p(n: u32) -> bool {
-            let mut buf = vec![];
-            write_varu32(&mut buf, n);
-            let (got, nread) = read_varu32(&buf);
-            nread == buf.len() && got == n
-        }
-        quickcheck(p as fn(u32) -> bool);
-    }
-
-    #[test]
-    fn prop_read_write_i32() {
-        fn p(n: i32) -> bool {
-            let mut buf = vec![];
-            write_vari32(&mut buf, n);
-            let (got, nread) = read_vari32(&buf);
-            nread == buf.len() && got == n
-        }
-        quickcheck(p as fn(i32) -> bool);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/error.rs
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::fmt;
-
-use syntax;
-
-/// An error that occurred during parsing or compiling a regular expression.
-#[derive(Debug)]
-pub enum Error {
-    /// A syntax error.
-    Syntax(String),
-    /// The compiled program exceeded the set size limit.
-    /// The argument is the size limit imposed.
-    CompiledTooBig(usize),
-    /// Hints that destructuring should not be exhaustive.
-    ///
-    /// This enum may grow additional variants, so this makes sure clients
-    /// don't count on exhaustive matching. (Otherwise, adding a new variant
-    /// could break existing code.)
-    #[doc(hidden)]
-    __Nonexhaustive,
-}
-
-impl ::std::error::Error for Error {
-    fn description(&self) -> &str {
-        match *self {
-            Error::Syntax(ref err) => err,
-            Error::CompiledTooBig(_) => "compiled program too big",
-            Error::__Nonexhaustive => unreachable!(),
-        }
-    }
-
-    fn cause(&self) -> Option<&::std::error::Error> {
-        None
-    }
-}
-
-impl fmt::Display for Error {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            Error::Syntax(ref err) => err.fmt(f),
-            Error::CompiledTooBig(limit) => {
-                write!(f, "Compiled regex exceeds size limit of {} bytes.",
-                       limit)
-            }
-            Error::__Nonexhaustive => unreachable!(),
-        }
-    }
-}
-
-impl From<syntax::Error> for Error {
-    fn from(err: syntax::Error) -> Error {
-        Error::Syntax(err.to_string())
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/exec.rs
+++ /dev/null
@@ -1,1261 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::cell::RefCell;
-use std::collections::HashMap;
-use std::cmp;
-use std::sync::Arc;
-
-use thread_local::CachedThreadLocal;
-use syntax::{Expr, ExprBuilder, Literals};
-
-use backtrack;
-use compile::Compiler;
-use dfa;
-use error::Error;
-use input::{ByteInput, CharInput};
-use literals::LiteralSearcher;
-use pikevm;
-use prog::Program;
-use re_builder::RegexOptions;
-use re_bytes;
-use re_set;
-use re_trait::{RegularExpression, Slot, Locations, as_slots};
-use re_unicode;
-use utf8::next_utf8;
-
-/// Exec manages the execution of a regular expression.
-///
-/// In particular, this manages the various compiled forms of a single regular
-/// expression and the choice of which matching engine to use to execute a
-/// regular expression.
-pub struct Exec {
-    /// All read only state.
-    ro: Arc<ExecReadOnly>,
-    /// Caches for the various matching engines.
-    cache: CachedThreadLocal<ProgramCache>,
-}
-
-/// ExecNoSync is like Exec, except it embeds a reference to a cache. This
-/// means it is no longer Sync, but we can now avoid the overhead of
-/// synchronization to fetch the cache.
-#[derive(Debug)]
-pub struct ExecNoSync<'c> {
-    /// All read only state.
-    ro: &'c Arc<ExecReadOnly>,
-    /// Caches for the various matching engines.
-    cache: &'c ProgramCache,
-}
-
-/// ExecNoSyncStr is like ExecNoSync, but matches on &str instead of &[u8].
-pub struct ExecNoSyncStr<'c>(ExecNoSync<'c>);
-
-/// ExecReadOnly comprises all read only state for a regex. Namely, all such
-/// state is determined at compile time and never changes during search.
-#[derive(Debug)]
-struct ExecReadOnly {
-    /// The original regular expressions given by the caller to compile.
-    res: Vec<String>,
-    /// A compiled program that is used in the NFA simulation and backtracking.
-    /// It can be byte-based or Unicode codepoint based.
-    ///
-    /// N.B. It is not possibly to make this byte-based from the public API.
-    /// It is only used for testing byte based programs in the NFA simulations.
-    nfa: Program,
-    /// A compiled byte based program for DFA execution. This is only used
-    /// if a DFA can be executed. (Currently, only word boundary assertions are
-    /// not supported.) Note that this program contains an embedded `.*?`
-    /// preceding the first capture group, unless the regex is anchored at the
-    /// beginning.
-    dfa: Program,
-    /// The same as above, except the program is reversed (and there is no
-    /// preceding `.*?`). This is used by the DFA to find the starting location
-    /// of matches.
-    dfa_reverse: Program,
-    /// A set of suffix literals extracted from the regex.
-    ///
-    /// Prefix literals are stored on the `Program`, since they are used inside
-    /// the matching engines.
-    suffixes: LiteralSearcher,
-    /// match_type encodes as much upfront knowledge about how we're going to
-    /// execute a search as possible.
-    match_type: MatchType,
-}
-
-/// Facilitates the construction of an executor by exposing various knobs
-/// to control how a regex is executed and what kinds of resources it's
-/// permitted to use.
-pub struct ExecBuilder {
-    options: RegexOptions,
-    match_type: Option<MatchType>,
-    bytes: bool,
-    only_utf8: bool,
-}
-
-/// Parsed represents a set of parsed regular expressions and their detected
-/// literals.
-struct Parsed {
-    exprs: Vec<Expr>,
-    prefixes: Literals,
-    suffixes: Literals,
-    bytes: bool,
-}
-
-impl ExecBuilder {
-    /// Create a regex execution builder.
-    ///
-    /// This uses default settings for everything except the regex itself,
-    /// which must be provided. Further knobs can be set by calling methods,
-    /// and then finally, `build` to actually create the executor.
-    pub fn new(re: &str) -> Self {
-        Self::new_many(&[re])
-    }
-
-    /// Like new, but compiles the union of the given regular expressions.
-    ///
-    /// Note that when compiling 2 or more regular expressions, capture groups
-    /// are completely unsupported. (This means both `find` and `captures`
-    /// wont work.)
-    pub fn new_many<I, S>(res: I) -> Self
-            where S: AsRef<str>, I: IntoIterator<Item=S> {
-        let mut opts = RegexOptions::default();
-        opts.pats = res.into_iter().map(|s| s.as_ref().to_owned()).collect();
-        Self::new_options(opts)
-    }
-
-    /// Create a regex execution builder.
-    pub fn new_options(opts: RegexOptions) -> Self {
-        ExecBuilder {
-            options: opts,
-            match_type: None,
-            bytes: false,
-            only_utf8: true,
-        }
-    }
-
-    /// Set the matching engine to be automatically determined.
-    ///
-    /// This is the default state and will apply whatever optimizations are
-    /// possible, such as running a DFA.
-    ///
-    /// This overrides whatever was previously set via the `nfa` or
-    /// `bounded_backtracking` methods.
-    pub fn automatic(mut self) -> Self {
-        self.match_type = None;
-        self
-    }
-
-    /// Sets the matching engine to use the NFA algorithm no matter what
-    /// optimizations are possible.
-    ///
-    /// This overrides whatever was previously set via the `automatic` or
-    /// `bounded_backtracking` methods.
-    pub fn nfa(mut self) -> Self {
-        self.match_type = Some(MatchType::Nfa(MatchNfaType::PikeVM));
-        self
-    }
-
-    /// Sets the matching engine to use a bounded backtracking engine no
-    /// matter what optimizations are possible.
-    ///
-    /// One must use this with care, since the bounded backtracking engine
-    /// uses memory proportion to `len(regex) * len(text)`.
-    ///
-    /// This overrides whatever was previously set via the `automatic` or
-    /// `nfa` methods.
-    pub fn bounded_backtracking(mut self) -> Self {
-        self.match_type = Some(MatchType::Nfa(MatchNfaType::Backtrack));
-        self
-    }
-
-    /// Compiles byte based programs for use with the NFA matching engines.
-    ///
-    /// By default, the NFA engines match on Unicode scalar values. They can
-    /// be made to use byte based programs instead. In general, the byte based
-    /// programs are slower because of a less efficient encoding of character
-    /// classes.
-    ///
-    /// Note that this does not impact DFA matching engines, which always
-    /// execute on bytes.
-    pub fn bytes(mut self, yes: bool) -> Self {
-        self.bytes = yes;
-        self
-    }
-
-    /// When disabled, the program compiled may match arbitrary bytes.
-    ///
-    /// When enabled (the default), all compiled programs exclusively match
-    /// valid UTF-8 bytes.
-    pub fn only_utf8(mut self, yes: bool) -> Self {
-        self.only_utf8 = yes;
-        self
-    }
-
-    /// Set the Unicode flag.
-    pub fn unicode(mut self, yes: bool) -> Self {
-        self.options.unicode = yes;
-        self
-    }
-
-    /// Parse the current set of patterns into their AST and extract literals.
-    fn parse(&self) -> Result<Parsed, Error> {
-        let mut exprs = Vec::with_capacity(self.options.pats.len());
-        let mut prefixes = Some(Literals::empty());
-        let mut suffixes = Some(Literals::empty());
-        let mut bytes = false;
-        for pat in &self.options.pats {
-            let parser =
-                ExprBuilder::new()
-                    .case_insensitive(self.options.case_insensitive)
-                    .multi_line(self.options.multi_line)
-                    .dot_matches_new_line(self.options.dot_matches_new_line)
-                    .swap_greed(self.options.swap_greed)
-                    .ignore_whitespace(self.options.ignore_whitespace)
-                    .unicode(self.options.unicode)
-                    .allow_bytes(!self.only_utf8);
-            let expr = try!(parser.parse(pat));
-            bytes = bytes || expr.has_bytes();
-
-            if !expr.is_anchored_start() && expr.has_anchored_start() {
-                // Partial anchors unfortunately make it hard to use prefixes,
-                // so disable them.
-                prefixes = None;
-            }
-            prefixes = prefixes.and_then(|mut prefixes| {
-                if !prefixes.union_prefixes(&expr) {
-                    None
-                } else {
-                    Some(prefixes)
-                }
-            });
-
-            if !expr.is_anchored_end() && expr.has_anchored_end() {
-                // Partial anchors unfortunately make it hard to use suffixes,
-                // so disable them.
-                suffixes = None;
-            }
-            suffixes = suffixes.and_then(|mut suffixes| {
-                if !suffixes.union_suffixes(&expr) {
-                    None
-                } else {
-                    Some(suffixes)
-                }
-            });
-            exprs.push(expr);
-        }
-        Ok(Parsed {
-            exprs: exprs,
-            prefixes: prefixes.unwrap_or(Literals::empty()),
-            suffixes: suffixes.unwrap_or(Literals::empty()),
-            bytes: bytes,
-        })
-    }
-
-    /// Build an executor that can run a regular expression.
-    pub fn build(self) -> Result<Exec, Error> {
-        // Special case when we have no patterns to compile.
-        // This can happen when compiling a regex set.
-        if self.options.pats.is_empty() {
-            let ro = Arc::new(ExecReadOnly {
-                res: vec![],
-                nfa: Program::new(),
-                dfa: Program::new(),
-                dfa_reverse: Program::new(),
-                suffixes: LiteralSearcher::empty(),
-                match_type: MatchType::Nothing,
-            });
-            return Ok(Exec { ro: ro, cache: CachedThreadLocal::new() });
-        }
-        let parsed = try!(self.parse());
-        let mut nfa = try!(
-            Compiler::new()
-                     .size_limit(self.options.size_limit)
-                     .bytes(self.bytes || parsed.bytes)
-                     .only_utf8(self.only_utf8)
-                     .compile(&parsed.exprs));
-        let mut dfa = try!(
-            Compiler::new()
-                     .size_limit(self.options.size_limit)
-                     .dfa(true)
-                     .only_utf8(self.only_utf8)
-                     .compile(&parsed.exprs));
-        let mut dfa_reverse = try!(
-            Compiler::new()
-                     .size_limit(self.options.size_limit)
-                     .dfa(true)
-                     .only_utf8(self.only_utf8)
-                     .reverse(true)
-                     .compile(&parsed.exprs));
-
-        let prefixes = parsed.prefixes.unambiguous_prefixes();
-        let suffixes = parsed.suffixes.unambiguous_suffixes();
-        nfa.prefixes = LiteralSearcher::prefixes(prefixes);
-        dfa.prefixes = nfa.prefixes.clone();
-        dfa.dfa_size_limit = self.options.dfa_size_limit;
-        dfa_reverse.dfa_size_limit = self.options.dfa_size_limit;
-
-        let mut ro = ExecReadOnly {
-            res: self.options.pats,
-            nfa: nfa,
-            dfa: dfa,
-            dfa_reverse: dfa_reverse,
-            suffixes: LiteralSearcher::suffixes(suffixes),
-            match_type: MatchType::Nothing,
-        };
-        ro.match_type = ro.choose_match_type(self.match_type);
-
-        let ro = Arc::new(ro);
-        Ok(Exec { ro: ro, cache: CachedThreadLocal::new() })
-    }
-}
-
-impl<'c> RegularExpression for ExecNoSyncStr<'c> {
-    type Text = str;
-
-    fn slots_len(&self) -> usize { self.0.slots_len() }
-
-    fn next_after_empty(&self, text: &str, i: usize) -> usize {
-        next_utf8(text.as_bytes(), i)
-    }
-
-    #[inline(always)] // reduces constant overhead
-    fn shortest_match_at(&self, text: &str, start: usize) -> Option<usize> {
-        self.0.shortest_match_at(text.as_bytes(), start)
-    }
-
-    #[inline(always)] // reduces constant overhead
-    fn is_match_at(&self, text: &str, start: usize) -> bool {
-        self.0.is_match_at(text.as_bytes(), start)
-    }
-
-    #[inline(always)] // reduces constant overhead
-    fn find_at(&self, text: &str, start: usize) -> Option<(usize, usize)> {
-        self.0.find_at(text.as_bytes(), start)
-    }
-
-    #[inline(always)] // reduces constant overhead
-    fn read_captures_at(
-        &self,
-        locs: &mut Locations,
-        text: &str,
-        start: usize,
-    ) -> Option<(usize, usize)> {
-        self.0.read_captures_at(locs, text.as_bytes(), start)
-    }
-}
-
-impl<'c> RegularExpression for ExecNoSync<'c> {
-    type Text = [u8];
-
-    /// Returns the number of capture slots in the regular expression. (There
-    /// are two slots for every capture group, corresponding to possibly empty
-    /// start and end locations of the capture.)
-    fn slots_len(&self) -> usize {
-        self.ro.nfa.captures.len() * 2
-    }
-
-    fn next_after_empty(&self, _text: &[u8], i: usize) -> usize {
-        i + 1
-    }
-
-    /// Returns the end of a match location, possibly occurring before the
-    /// end location of the correct leftmost-first match.
-    #[inline(always)] // reduces constant overhead
-    fn shortest_match_at(&self, text: &[u8], start: usize) -> Option<usize> {
-        if !self.is_anchor_end_match(text) {
-            return None;
-        }
-        match self.ro.match_type {
-            MatchType::Literal(ty) => {
-                self.find_literals(ty, text, start).map(|(_, e)| e)
-            }
-            MatchType::Dfa | MatchType::DfaMany => {
-                match self.shortest_dfa(text, start) {
-                    dfa::Result::Match(end) => Some(end),
-                    dfa::Result::NoMatch(_) => None,
-                    dfa::Result::Quit => self.shortest_nfa(text, start),
-                }
-            }
-            MatchType::DfaAnchoredReverse => {
-                match dfa::Fsm::reverse(
-                    &self.ro.dfa_reverse,
-                    &self.cache,
-                    true,
-                    &text[start..],
-                    text.len(),
-                ) {
-                    dfa::Result::Match(_) => Some(text.len()),
-                    dfa::Result::NoMatch(_) => None,
-                    dfa::Result::Quit => self.shortest_nfa(text, start),
-                }
-            }
-            MatchType::DfaSuffix => {
-                match self.shortest_dfa_reverse_suffix(text, start) {
-                    dfa::Result::Match(e) => Some(e),
-                    dfa::Result::NoMatch(_) => None,
-                    dfa::Result::Quit => self.shortest_nfa(text, start),
-                }
-            }
-            MatchType::Nfa(ty) => self.shortest_nfa_type(ty, text, start),
-            MatchType::Nothing => None,
-        }
-    }
-
-    /// Returns true if and only if the regex matches text.
-    ///
-    /// For single regular expressions, this is equivalent to calling
-    /// shortest_match(...).is_some().
-    #[inline(always)] // reduces constant overhead
-    fn is_match_at(&self, text: &[u8], start: usize) -> bool {
-        if !self.is_anchor_end_match(text) {
-            return false;
-        }
-        // We need to do this dance because shortest_match relies on the NFA
-        // filling in captures[1], but a RegexSet has no captures. In other
-        // words, a RegexSet can't (currently) use shortest_match. ---AG
-        match self.ro.match_type {
-            MatchType::Literal(ty) => {
-                self.find_literals(ty, text, start).is_some()
-            }
-            MatchType::Dfa | MatchType::DfaMany => {
-                match self.shortest_dfa(text, start) {
-                    dfa::Result::Match(_) => true,
-                    dfa::Result::NoMatch(_) => false,
-                    dfa::Result::Quit => self.match_nfa(text, start),
-                }
-            }
-            MatchType::DfaAnchoredReverse => {
-                match dfa::Fsm::reverse(
-                    &self.ro.dfa_reverse,
-                    &self.cache,
-                    true,
-                    &text[start..],
-                    text.len(),
-                ) {
-                    dfa::Result::Match(_) => true,
-                    dfa::Result::NoMatch(_) => false,
-                    dfa::Result::Quit => self.match_nfa(text, start),
-                }
-            }
-            MatchType::DfaSuffix => {
-                match self.shortest_dfa_reverse_suffix(text, start) {
-                    dfa::Result::Match(_) => true,
-                    dfa::Result::NoMatch(_) => false,
-                    dfa::Result::Quit => self.match_nfa(text, start),
-                }
-            }
-            MatchType::Nfa(ty) => self.match_nfa_type(ty, text, start),
-            MatchType::Nothing => false,
-        }
-    }
-
-    /// Finds the start and end location of the leftmost-first match, starting
-    /// at the given location.
-    #[inline(always)] // reduces constant overhead
-    fn find_at(&self, text: &[u8], start: usize) -> Option<(usize, usize)> {
-        if !self.is_anchor_end_match(text) {
-            return None;
-        }
-        match self.ro.match_type {
-            MatchType::Literal(ty) => {
-                self.find_literals(ty, text, start)
-            }
-            MatchType::Dfa => {
-                match self.find_dfa_forward(text, start) {
-                    dfa::Result::Match((s, e)) => Some((s, e)),
-                    dfa::Result::NoMatch(_) => None,
-                    dfa::Result::Quit => {
-                        self.find_nfa(MatchNfaType::Auto, text, start)
-                    }
-                }
-            }
-            MatchType::DfaAnchoredReverse => {
-                match self.find_dfa_anchored_reverse(text, start) {
-                    dfa::Result::Match((s, e)) => Some((s, e)),
-                    dfa::Result::NoMatch(_) => None,
-                    dfa::Result::Quit => {
-                        self.find_nfa(MatchNfaType::Auto, text, start)
-                    }
-                }
-            }
-            MatchType::DfaSuffix => {
-                match self.find_dfa_reverse_suffix(text, start) {
-                    dfa::Result::Match((s, e)) => Some((s, e)),
-                    dfa::Result::NoMatch(_) => None,
-                    dfa::Result::Quit => {
-                        self.find_nfa(MatchNfaType::Auto, text, start)
-                    }
-                }
-            }
-            MatchType::Nfa(ty) => self.find_nfa(ty, text, start),
-            MatchType::Nothing => None,
-            MatchType::DfaMany => {
-                unreachable!("BUG: RegexSet cannot be used with find")
-            }
-        }
-    }
-
-    /// Finds the start and end location of the leftmost-first match and also
-    /// fills in all matching capture groups.
-    ///
-    /// The number of capture slots given should be equal to the total number
-    /// of capture slots in the compiled program.
-    ///
-    /// Note that the first two slots always correspond to the start and end
-    /// locations of the overall match.
-    fn read_captures_at(
-        &self,
-        locs: &mut Locations,
-        text: &[u8],
-        start: usize,
-    ) -> Option<(usize, usize)> {
-        let slots = as_slots(locs);
-        for slot in slots.iter_mut() {
-            *slot = None;
-        }
-        // If the caller unnecessarily uses this, then we try to save them
-        // from themselves.
-        match slots.len() {
-            0 => return self.find_at(text, start),
-            2 => {
-                return self.find_at(text, start).map(|(s, e)| {
-                    slots[0] = Some(s);
-                    slots[1] = Some(e);
-                    (s, e)
-                });
-            }
-            _ => {} // fallthrough
-        }
-        if !self.is_anchor_end_match(text) {
-            return None;
-        }
-        match self.ro.match_type {
-            MatchType::Literal(ty) => {
-                self.find_literals(ty, text, start).and_then(|(s, e)| {
-                    self.captures_nfa_with_match(slots, text, s, e)
-                })
-            }
-            MatchType::Dfa => {
-                match self.find_dfa_forward(text, start) {
-                    dfa::Result::Match((s, e)) => {
-                        self.captures_nfa_with_match(slots, text, s, e)
-                    }
-                    dfa::Result::NoMatch(_) => None,
-                    dfa::Result::Quit => self.captures_nfa(slots, text, start),
-                }
-            }
-            MatchType::DfaAnchoredReverse => {
-                match self.find_dfa_anchored_reverse(text, start) {
-                    dfa::Result::Match((s, e)) => {
-                        self.captures_nfa_with_match(slots, text, s, e)
-                    }
-                    dfa::Result::NoMatch(_) => None,
-                    dfa::Result::Quit => self.captures_nfa(slots, text, start),
-                }
-            }
-            MatchType::DfaSuffix => {
-                match self.find_dfa_reverse_suffix(text, start) {
-                    dfa::Result::Match((s, e)) => {
-                        self.captures_nfa_with_match(slots, text, s, e)
-                    }
-                    dfa::Result::NoMatch(_) => None,
-                    dfa::Result::Quit => self.captures_nfa(slots, text, start),
-                }
-            }
-            MatchType::Nfa(ty) => {
-                self.captures_nfa_type(ty, slots, text, start)
-            }
-            MatchType::Nothing => None,
-            MatchType::DfaMany => {
-                unreachable!("BUG: RegexSet cannot be used with captures")
-            }
-        }
-    }
-}
-
-impl<'c> ExecNoSync<'c> {
-    /// Finds the leftmost-first match using only literal search.
-    #[inline(always)] // reduces constant overhead
-    fn find_literals(
-        &self,
-        ty: MatchLiteralType,
-        text: &[u8],
-        start: usize,
-    ) -> Option<(usize, usize)> {
-        use self::MatchLiteralType::*;
-        match ty {
-            Unanchored => {
-                let lits = &self.ro.nfa.prefixes;
-                lits.find(&text[start..])
-                    .map(|(s, e)| (start + s, start + e))
-            }
-            AnchoredStart => {
-                let lits = &self.ro.nfa.prefixes;
-                lits.find_start(&text[start..])
-                    .map(|(s, e)| (start + s, start + e))
-            }
-            AnchoredEnd => {
-                let lits = &self.ro.suffixes;
-                lits.find_end(&text[start..])
-                    .map(|(s, e)| (start + s, start + e))
-            }
-        }
-    }
-
-    /// Finds the leftmost-first match (start and end) using only the DFA.
-    ///
-    /// If the result returned indicates that the DFA quit, then another
-    /// matching engine should be used.
-    #[inline(always)] // reduces constant overhead
-    fn find_dfa_forward(
-        &self,
-        text: &[u8],
-        start: usize,
-    ) -> dfa::Result<(usize, usize)> {
-        use dfa::Result::*;
-        let end = match dfa::Fsm::forward(
-            &self.ro.dfa,
-            &self.cache,
-            false,
-            text,
-            start,
-        ) {
-            NoMatch(i) => return NoMatch(i),
-            Quit => return Quit,
-            Match(end) if start == end => return Match((start, start)),
-            Match(end) => end,
-        };
-        // Now run the DFA in reverse to find the start of the match.
-        match dfa::Fsm::reverse(
-            &self.ro.dfa_reverse,
-            &self.cache,
-            false,
-            &text[start..],
-            end - start,
-        ) {
-            Match(s) => Match((start + s, end)),
-            NoMatch(i) => NoMatch(i),
-            Quit => Quit,
-        }
-    }
-
-    /// Finds the leftmost-first match (start and end) using only the DFA,
-    /// but assumes the regex is anchored at the end and therefore starts at
-    /// the end of the regex and matches in reverse.
-    ///
-    /// If the result returned indicates that the DFA quit, then another
-    /// matching engine should be used.
-    #[inline(always)] // reduces constant overhead
-    fn find_dfa_anchored_reverse(
-        &self,
-        text: &[u8],
-        start: usize,
-    ) -> dfa::Result<(usize, usize)> {
-        use dfa::Result::*;
-        match dfa::Fsm::reverse(
-            &self.ro.dfa_reverse,
-            &self.cache,
-            false,
-            &text[start..],
-            text.len() - start,
-        ) {
-            Match(s) => Match((start + s, text.len())),
-            NoMatch(i) => NoMatch(i),
-            Quit => Quit,
-        }
-    }
-
-    /// Finds the end of the shortest match using only the DFA.
-    #[inline(always)] // reduces constant overhead
-    fn shortest_dfa(&self, text: &[u8], start: usize) -> dfa::Result<usize> {
-        dfa::Fsm::forward(&self.ro.dfa, &self.cache, true, text, start)
-    }
-
-    /// Finds the end of the shortest match using only the DFA by scanning for
-    /// suffix literals.
-    ///
-    #[inline(always)] // reduces constant overhead
-    fn shortest_dfa_reverse_suffix(
-        &self,
-        text: &[u8],
-        start: usize,
-    ) -> dfa::Result<usize> {
-        match self.exec_dfa_reverse_suffix(text, start) {
-            None => self.shortest_dfa(text, start),
-            Some(r) => r.map(|(_, end)| end),
-        }
-    }
-
-    /// Finds the end of the shortest match using only the DFA by scanning for
-    /// suffix literals. It also reports the start of the match.
-    ///
-    /// Note that if None is returned, then the optimization gave up to avoid
-    /// worst case quadratic behavior. A forward scanning DFA should be tried
-    /// next.
-    ///
-    /// If a match is returned and the full leftmost-first match is desired,
-    /// then a forward scan starting from the beginning of the match must be
-    /// done.
-    ///
-    /// If the result returned indicates that the DFA quit, then another
-    /// matching engine should be used.
-    #[inline(always)] // reduces constant overhead
-    fn exec_dfa_reverse_suffix(
-        &self,
-        text: &[u8],
-        original_start: usize,
-    ) -> Option<dfa::Result<(usize, usize)>> {
-        use dfa::Result::*;
-
-        let lcs = self.ro.suffixes.lcs();
-        debug_assert!(lcs.len() >= 1);
-        let mut start = original_start;
-        let mut end = start;
-        while end <= text.len() {
-            start = end;
-            end = end + match lcs.find(&text[end..]) {
-                None => return Some(NoMatch(text.len())),
-                Some(start) => start + lcs.len(),
-            };
-            match dfa::Fsm::reverse(
-                &self.ro.dfa_reverse,
-                &self.cache,
-                false,
-                &text[start..end],
-                end - start,
-            ) {
-                Match(0) | NoMatch(0) => return None,
-                Match(s) => return Some(Match((s + start, end))),
-                NoMatch(_) => continue,
-                Quit => return Some(Quit),
-            };
-        }
-        Some(NoMatch(text.len()))
-    }
-
-    /// Finds the leftmost-first match (start and end) using only the DFA
-    /// by scanning for suffix literals.
-    ///
-    /// If the result returned indicates that the DFA quit, then another
-    /// matching engine should be used.
-    #[inline(always)] // reduces constant overhead
-    fn find_dfa_reverse_suffix(
-        &self,
-        text: &[u8],
-        start: usize,
-    ) -> dfa::Result<(usize, usize)> {
-        use dfa::Result::*;
-
-        let match_start = match self.exec_dfa_reverse_suffix(text, start) {
-            None => return self.find_dfa_forward(text, start),
-            Some(Match((start, _))) => start,
-            Some(r) => return r,
-        };
-        // At this point, we've found a match. The only way to quit now
-        // without a match is if the DFA gives up (seems unlikely).
-        //
-        // Now run the DFA forwards to find the proper end of the match.
-        // (The suffix literal match can only indicate the earliest
-        // possible end location, which may appear before the end of the
-        // leftmost-first match.)
-        match dfa::Fsm::forward(
-            &self.ro.dfa,
-            &self.cache,
-            false,
-            text,
-            match_start,
-        ) {
-            NoMatch(_) => panic!("BUG: reverse match implies forward match"),
-            Quit => Quit,
-            Match(e) => Match((match_start, e)),
-        }
-    }
-
-    /// Executes the NFA engine to return whether there is a match or not.
-    ///
-    /// Ideally, we could use shortest_nfa(...).is_some() and get the same
-    /// performance characteristics, but regex sets don't have captures, which
-    /// shortest_nfa depends on.
-    fn match_nfa(
-        &self,
-        text: &[u8],
-        start: usize,
-    ) -> bool {
-        self.match_nfa_type(MatchNfaType::Auto, text, start)
-    }
-
-    /// Like match_nfa, but allows specification of the type of NFA engine.
-    fn match_nfa_type(
-        &self,
-        ty: MatchNfaType,
-        text: &[u8],
-        start: usize,
-    ) -> bool {
-        self.exec_nfa(ty, &mut [false], &mut [], true, text, start)
-    }
-
-    /// Finds the shortest match using an NFA.
-    fn shortest_nfa(&self, text: &[u8], start: usize) -> Option<usize> {
-        self.shortest_nfa_type(MatchNfaType::Auto, text, start)
-    }
-
-    /// Like shortest_nfa, but allows specification of the type of NFA engine.
-    fn shortest_nfa_type(
-        &self,
-        ty: MatchNfaType,
-        text: &[u8],
-        start: usize,
-    ) -> Option<usize> {
-        let mut slots = [None, None];
-        if self.exec_nfa(ty, &mut [false], &mut slots, true, text, start) {
-            slots[1]
-        } else {
-            None
-        }
-    }
-
-    /// Like find, but executes an NFA engine.
-    fn find_nfa(
-        &self,
-        ty: MatchNfaType,
-        text: &[u8],
-        start: usize,
-    ) -> Option<(usize, usize)> {
-        let mut slots = [None, None];
-        if self.exec_nfa(ty, &mut [false], &mut slots, false, text, start) {
-            match (slots[0], slots[1]) {
-                (Some(s), Some(e)) => Some((s, e)),
-                _ => None,
-            }
-        } else {
-            None
-        }
-    }
-
-    /// Like find_nfa, but fills in captures and restricts the search space
-    /// using previously found match information.
-    ///
-    /// `slots` should have length equal to `2 * nfa.captures.len()`.
-    fn captures_nfa_with_match(
-        &self,
-        slots: &mut [Slot],
-        text: &[u8],
-        match_start: usize,
-        match_end: usize,
-    ) -> Option<(usize, usize)> {
-        // We can't use match_end directly, because we may need to examine
-        // one "character" after the end of a match for lookahead operators.
-        let e = cmp::min(next_utf8(text, match_end), text.len());
-        self.captures_nfa(slots, &text[..e], match_start)
-    }
-
-    /// Like find_nfa, but fills in captures.
-    ///
-    /// `slots` should have length equal to `2 * nfa.captures.len()`.
-    fn captures_nfa(
-        &self,
-        slots: &mut [Slot],
-        text: &[u8],
-        start: usize,
-    ) -> Option<(usize, usize)> {
-        self.captures_nfa_type(MatchNfaType::Auto, slots, text, start)
-    }
-
-    /// Like captures_nfa, but allows specification of type of NFA engine.
-    fn captures_nfa_type(
-        &self,
-        ty: MatchNfaType,
-        slots: &mut [Slot],
-        text: &[u8],
-        start: usize,
-    ) -> Option<(usize, usize)> {
-        if self.exec_nfa(ty, &mut [false], slots, false, text, start) {
-            match (slots[0], slots[1]) {
-                (Some(s), Some(e)) => Some((s, e)),
-                _ => None,
-            }
-        } else {
-            None
-        }
-    }
-
-    fn exec_nfa(
-        &self,
-        mut ty: MatchNfaType,
-        matches: &mut [bool],
-        slots: &mut [Slot],
-        quit_after_match: bool,
-        text: &[u8],
-        start: usize,
-    ) -> bool {
-        use self::MatchNfaType::*;
-        if let Auto = ty {
-            if backtrack::should_exec(self.ro.nfa.len(), text.len()) {
-                ty = Backtrack;
-            } else {
-                ty = PikeVM;
-            }
-        }
-        match ty {
-            Auto => unreachable!(),
-            Backtrack => self.exec_backtrack(matches, slots, text, start),
-            PikeVM => {
-                self.exec_pikevm(
-                    matches, slots, quit_after_match, text, start)
-            }
-        }
-    }
-
-    /// Always run the NFA algorithm.
-    fn exec_pikevm(
-        &self,
-        matches: &mut [bool],
-        slots: &mut [Slot],
-        quit_after_match: bool,
-        text: &[u8],
-        start: usize,
-    ) -> bool {
-        if self.ro.nfa.uses_bytes() {
-            pikevm::Fsm::exec(
-                &self.ro.nfa,
-                &self.cache,
-                matches,
-                slots,
-                quit_after_match,
-                ByteInput::new(text, self.ro.nfa.only_utf8),
-                start)
-        } else {
-            pikevm::Fsm::exec(
-                &self.ro.nfa,
-                &self.cache,
-                matches,
-                slots,
-                quit_after_match,
-                CharInput::new(text),
-                start)
-        }
-    }
-
-    /// Always runs the NFA using bounded backtracking.
-    fn exec_backtrack(
-        &self,
-        matches: &mut [bool],
-        slots: &mut [Slot],
-        text: &[u8],
-        start: usize,
-    ) -> bool {
-        if self.ro.nfa.uses_bytes() {
-            backtrack::Bounded::exec(
-                &self.ro.nfa,
-                &self.cache,
-                matches,
-                slots,
-                ByteInput::new(text, self.ro.nfa.only_utf8),
-                start)
-        } else {
-            backtrack::Bounded::exec(
-                &self.ro.nfa,
-                &self.cache,
-                matches,
-                slots,
-                CharInput::new(text),
-                start)
-        }
-    }
-
-    /// Finds which regular expressions match the given text.
-    ///
-    /// `matches` should have length equal to the number of regexes being
-    /// searched.
-    ///
-    /// This is only useful when one wants to know which regexes in a set
-    /// match some text.
-    pub fn many_matches_at(
-        &self,
-        matches: &mut [bool],
-        text: &[u8],
-        start: usize,
-    ) -> bool {
-        use self::MatchType::*;
-        if !self.is_anchor_end_match(text) {
-            return false;
-        }
-        match self.ro.match_type {
-            Literal(ty) => {
-                debug_assert!(matches.len() == 1);
-                matches[0] = self.find_literals(ty, text, start).is_some();
-                matches[0]
-            }
-            Dfa | DfaAnchoredReverse | DfaSuffix | DfaMany => {
-                match dfa::Fsm::forward_many(
-                    &self.ro.dfa,
-                    &self.cache,
-                    matches,
-                    text,
-                    start,
-                ) {
-                    dfa::Result::Match(_) => true,
-                    dfa::Result::NoMatch(_) => false,
-                    dfa::Result::Quit => {
-                        self.exec_nfa(
-                            MatchNfaType::Auto,
-                            matches,
-                            &mut [],
-                            false,
-                            text,
-                            start)
-                    }
-                }
-            }
-            Nfa(ty) => self.exec_nfa(ty, matches, &mut [], false, text, start),
-            Nothing => false,
-        }
-    }
-
-    #[inline(always)] // reduces constant overhead
-    fn is_anchor_end_match(&self, text: &[u8]) -> bool {
-        // Only do this check if the haystack is big (>1MB).
-        if text.len() > (1<<20) && self.ro.nfa.is_anchored_end {
-            let lcs = self.ro.suffixes.lcs();
-            if lcs.len() >= 1 && !lcs.is_suffix(text) {
-                return false;
-            }
-        }
-        true
-    }
-
-    pub fn capture_name_idx(&self) -> &Arc<HashMap<String, usize>> {
-        &self.ro.nfa.capture_name_idx
-    }
-}
-
-impl<'c> ExecNoSyncStr<'c> {
-    pub fn capture_name_idx(&self) -> &Arc<HashMap<String, usize>> {
-        self.0.capture_name_idx()
-    }
-}
-
-impl Exec {
-    /// Get a searcher that isn't Sync.
-    #[inline(always)] // reduces constant overhead
-    pub fn searcher(&self) -> ExecNoSync {
-        let create = || Box::new(RefCell::new(ProgramCacheInner::new(&self.ro)));
-        ExecNoSync {
-            ro: &self.ro, // a clone is too expensive here! (and not needed)
-            cache: self.cache.get_or(create),
-        }
-    }
-
-    /// Get a searcher that isn't Sync and can match on &str.
-    #[inline(always)] // reduces constant overhead
-    pub fn searcher_str(&self) -> ExecNoSyncStr {
-        ExecNoSyncStr(self.searcher())
-    }
-
-    /// Build a Regex from this executor.
-    pub fn into_regex(self) -> re_unicode::Regex {
-        re_unicode::Regex::from(self)
-    }
-
-    /// Build a RegexSet from this executor.
-    pub fn into_regex_set(self) -> re_set::unicode::RegexSet {
-        re_set::unicode::RegexSet::from(self)
-    }
-
-    /// Build a Regex from this executor that can match arbitrary bytes.
-    pub fn into_byte_regex(self) -> re_bytes::Regex {
-        re_bytes::Regex::from(self)
-    }
-
-    /// Build a RegexSet from this executor that can match arbitrary bytes.
-    pub fn into_byte_regex_set(self) -> re_set::bytes::RegexSet {
-        re_set::bytes::RegexSet::from(self)
-    }
-
-    /// The original regular expressions given by the caller that were
-    /// compiled.
-    pub fn regex_strings(&self) -> &[String] {
-        &self.ro.res
-    }
-
-    /// Return a slice of capture names.
-    ///
-    /// Any capture that isn't named is None.
-    pub fn capture_names(&self) -> &[Option<String>] {
-        &self.ro.nfa.captures
-    }
-
-    /// Return a reference to named groups mapping (from group name to
-    /// group position).
-    pub fn capture_name_idx(&self) -> &Arc<HashMap<String, usize>> {
-        &self.ro.nfa.capture_name_idx
-    }
-}
-
-impl Clone for Exec {
-    fn clone(&self) -> Exec {
-        Exec {
-            ro: self.ro.clone(),
-            cache: CachedThreadLocal::new(),
-        }
-    }
-}
-
-impl ExecReadOnly {
-    fn choose_match_type(&self, hint: Option<MatchType>) -> MatchType {
-        use self::MatchType::*;
-        if let Some(Nfa(_)) = hint {
-            return hint.unwrap();
-        }
-        // If the NFA is empty, then we'll never match anything.
-        if self.nfa.insts.is_empty() {
-            return Nothing;
-        }
-        // If our set of prefixes is complete, then we can use it to find
-        // a match in lieu of a regex engine. This doesn't quite work well in
-        // the presence of multiple regexes, so only do it when there's one.
-        //
-        // TODO(burntsushi): Also, don't try to match literals if the regex is
-        // partially anchored. We could technically do it, but we'd need to
-        // create two sets of literals: all of them and then the subset that
-        // aren't anchored. We would then only search for all of them when at
-        // the beginning of the input and use the subset in all other cases.
-        if self.res.len() == 1 {
-            if self.nfa.prefixes.complete() {
-                return if self.nfa.is_anchored_start {
-                    Literal(MatchLiteralType::AnchoredStart)
-                } else {
-                    Literal(MatchLiteralType::Unanchored)
-                };
-            }
-            if self.suffixes.complete() {
-                return if self.nfa.is_anchored_end {
-                    Literal(MatchLiteralType::AnchoredEnd)
-                } else {
-                    // This case shouldn't happen. When the regex isn't
-                    // anchored, then complete prefixes should imply complete
-                    // suffixes.
-                    Literal(MatchLiteralType::Unanchored)
-                };
-            }
-        }
-        // If we can execute the DFA, then we totally should.
-        if dfa::can_exec(&self.dfa) {
-            // Regex sets require a slightly specialized path.
-            if self.res.len() >= 2 {
-                return DfaMany;
-            }
-            // If the regex is anchored at the end but not the start, then
-            // just match in reverse from the end of the haystack.
-            if !self.nfa.is_anchored_start && self.nfa.is_anchored_end {
-                return DfaAnchoredReverse;
-            }
-            // If there's a longish suffix literal, then it might be faster
-            // to look for that first.
-            if self.should_suffix_scan() {
-                return DfaSuffix;
-            }
-            // Fall back to your garden variety forward searching lazy DFA.
-            return Dfa;
-        }
-        // We're so totally hosed.
-        Nfa(MatchNfaType::Auto)
-    }
-
-    /// Returns true if the program is amenable to suffix scanning.
-    ///
-    /// When this is true, as a heuristic, we assume it is OK to quickly scan
-    /// for suffix literals and then do a *reverse* DFA match from any matches
-    /// produced by the literal scan. (And then followed by a forward DFA
-    /// search, since the previously found suffix literal maybe not actually be
-    /// the end of a match.)
-    ///
-    /// This is a bit of a specialized optimization, but can result in pretty
-    /// big performance wins if 1) there are no prefix literals and 2) the
-    /// suffix literals are pretty rare in the text. (1) is obviously easy to
-    /// account for but (2) is harder. As a proxy, we assume that longer
-    /// strings are generally rarer, so we only enable this optimization when
-    /// we have a meaty suffix.
-    fn should_suffix_scan(&self) -> bool {
-        if self.suffixes.is_empty() {
-            return false;
-        }
-        let lcs_len = self.suffixes.lcs().char_len();
-        lcs_len >= 3 && lcs_len > self.dfa.prefixes.lcp().char_len()
-    }
-}
-
-#[derive(Clone, Copy, Debug)]
-enum MatchType {
-    /// A single or multiple literal search. This is only used when the regex
-    /// can be decomposed into unambiguous literal search.
-    Literal(MatchLiteralType),
-    /// A normal DFA search.
-    Dfa,
-    /// A reverse DFA search starting from the end of a haystack.
-    DfaAnchoredReverse,
-    /// A reverse DFA search with suffix literal scanning.
-    DfaSuffix,
-    /// Use the DFA on two or more regular expressions.
-    DfaMany,
-    /// An NFA variant.
-    Nfa(MatchNfaType),
-    /// No match is ever possible, so don't ever try to search.
-    Nothing,
-}
-
-#[derive(Clone, Copy, Debug)]
-enum MatchLiteralType {
-    /// Match literals anywhere in text.
-    Unanchored,
-    /// Match literals only at the start of text.
-    AnchoredStart,
-    /// Match literals only at the end of text.
-    AnchoredEnd,
-}
-
-#[derive(Clone, Copy, Debug)]
-enum MatchNfaType {
-    /// Choose between Backtrack and PikeVM.
-    Auto,
-    /// NFA bounded backtracking.
-    ///
-    /// (This is only set by tests, since it never makes sense to always want
-    /// backtracking.)
-    Backtrack,
-    /// The Pike VM.
-    ///
-    /// (This is only set by tests, since it never makes sense to always want
-    /// the Pike VM.)
-    PikeVM,
-}
-
-/// ProgramCache maintains reusable allocations for each matching engine
-/// available to a particular program.
-pub type ProgramCache = RefCell<ProgramCacheInner>;
-
-#[derive(Clone, Debug)]
-pub struct ProgramCacheInner {
-    pub pikevm: pikevm::Cache,
-    pub backtrack: backtrack::Cache,
-    pub dfa: dfa::Cache,
-    pub dfa_reverse: dfa::Cache,
-}
-
-impl ProgramCacheInner {
-    fn new(ro: &ExecReadOnly) -> Self {
-        ProgramCacheInner {
-            pikevm: pikevm::Cache::new(&ro.nfa),
-            backtrack: backtrack::Cache::new(&ro.nfa),
-            dfa: dfa::Cache::new(&ro.dfa),
-            dfa_reverse: dfa::Cache::new(&ro.dfa_reverse),
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/expand.rs
+++ /dev/null
@@ -1,215 +0,0 @@
-use std::str;
-
-use memchr::memchr;
-
-use re_bytes;
-use re_unicode;
-
-pub fn expand_str(
-    caps: &re_unicode::Captures,
-    mut replacement: &str,
-    dst: &mut String,
-) {
-    while !replacement.is_empty() {
-        match memchr(b'$', replacement.as_bytes()) {
-            None => break,
-            Some(i) => {
-                dst.push_str(&replacement[..i]);
-                replacement = &replacement[i..];
-            }
-        }
-        if replacement.as_bytes().get(1).map_or(false, |&b| b == b'$') {
-            dst.push_str("$");
-            replacement = &replacement[2..];
-            continue;
-        }
-        debug_assert!(!replacement.is_empty());
-        let cap_ref = match find_cap_ref(replacement) {
-            Some(cap_ref) => cap_ref,
-            None => {
-                dst.push_str("$");
-                replacement = &replacement[1..];
-                continue;
-            }
-        };
-        replacement = &replacement[cap_ref.end..];
-        match cap_ref.cap {
-            Ref::Number(i) => {
-                dst.push_str(
-                    caps.get(i).map(|m| m.as_str()).unwrap_or(""));
-            }
-            Ref::Named(name) => {
-                dst.push_str(
-                    caps.name(name).map(|m| m.as_str()).unwrap_or(""));
-            }
-        }
-    }
-    dst.push_str(replacement);
-}
-
-pub fn expand_bytes(
-    caps: &re_bytes::Captures,
-    mut replacement: &[u8],
-    dst: &mut Vec<u8>,
-) {
-    while !replacement.is_empty() {
-        match memchr(b'$', replacement) {
-            None => break,
-            Some(i) => {
-                dst.extend(&replacement[..i]);
-                replacement = &replacement[i..];
-            }
-        }
-        if replacement.get(1).map_or(false, |&b| b == b'$') {
-            dst.push(b'$');
-            replacement = &replacement[2..];
-            continue;
-        }
-        debug_assert!(!replacement.is_empty());
-        let cap_ref = match find_cap_ref(replacement) {
-            Some(cap_ref) => cap_ref,
-            None => {
-                dst.push(b'$');
-                replacement = &replacement[1..];
-                continue;
-            }
-        };
-        replacement = &replacement[cap_ref.end..];
-        match cap_ref.cap {
-            Ref::Number(i) => {
-                dst.extend(
-                    caps.get(i).map(|m| m.as_bytes()).unwrap_or(b""));
-            }
-            Ref::Named(name) => {
-                dst.extend(
-                    caps.name(name).map(|m| m.as_bytes()).unwrap_or(b""));
-            }
-        }
-    }
-    dst.extend(replacement);
-}
-
-/// CaptureRef represents a reference to a capture group inside some text. The
-/// reference is either a capture group name or a number.
-///
-/// It is also tagged with the position in the text immediately proceding the
-/// capture reference.
-#[derive(Clone, Copy, Debug, Eq, PartialEq)]
-struct CaptureRef<'a> {
-    cap: Ref<'a>,
-    end: usize,
-}
-
-/// A reference to a capture group in some text.
-///
-/// e.g., `$2`, `$foo`, `${foo}`.
-#[derive(Clone, Copy, Debug, Eq, PartialEq)]
-enum Ref<'a> {
-    Named(&'a str),
-    Number(usize),
-}
-
-impl<'a> From<&'a str> for Ref<'a> {
-    fn from(x: &'a str) -> Ref<'a> {
-        Ref::Named(x)
-    }
-}
-
-impl From<usize> for Ref<'static> {
-    fn from(x: usize) -> Ref<'static> {
-        Ref::Number(x)
-    }
-}
-
-/// Parses a possible reference to a capture group name in the given text,
-/// starting at the beginning of `replacement`.
-///
-/// If no such valid reference could be found, None is returned.
-fn find_cap_ref<T: ?Sized + AsRef<[u8]>>(
-    replacement: &T,
-) -> Option<CaptureRef> {
-    let mut i = 0;
-    let rep: &[u8] = replacement.as_ref();
-    if rep.len() <= 1 || rep[0] != b'$' {
-        return None;
-    }
-    let mut brace = false;
-    i += 1;
-    if rep[i] == b'{' {
-        brace = true;
-        i += 1;
-    }
-    let mut cap_end = i;
-    while rep.get(cap_end).map_or(false, is_valid_cap_letter) {
-        cap_end += 1;
-    }
-    if cap_end == i {
-        return None;
-    }
-    // We just verified that the range 0..cap_end is valid ASCII, so it must
-    // therefore be valid UTF-8. If we really cared, we could avoid this UTF-8
-    // check with either unsafe or by parsing the number straight from &[u8].
-    let cap = str::from_utf8(&rep[i..cap_end])
-                  .ok().expect("valid UTF-8 capture name");
-    if brace {
-        if !rep.get(cap_end).map_or(false, |&b| b == b'}') {
-            return None;
-        }
-        cap_end += 1;
-    }
-    Some(CaptureRef {
-        cap: match cap.parse::<u32>() {
-            Ok(i) => Ref::Number(i as usize),
-            Err(_) => Ref::Named(cap),
-        },
-        end: cap_end,
-    })
-}
-
-/// Returns true if and only if the given byte is allowed in a capture name.
-fn is_valid_cap_letter(b: &u8) -> bool {
-    match *b {
-        b'0' ... b'9' | b'a' ... b'z' | b'A' ... b'Z' | b'_' => true,
-        _ => false,
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{CaptureRef, find_cap_ref};
-
-    macro_rules! find {
-        ($name:ident, $text:expr) => {
-            #[test]
-            fn $name() {
-                assert_eq!(None, find_cap_ref($text));
-            }
-        };
-        ($name:ident, $text:expr, $capref:expr) => {
-            #[test]
-            fn $name() {
-                assert_eq!(Some($capref), find_cap_ref($text));
-            }
-        };
-    }
-
-    macro_rules! c {
-        ($name_or_number:expr, $pos:expr) => {
-            CaptureRef { cap: $name_or_number.into(), end: $pos }
-        };
-    }
-
-    find!(find_cap_ref1, "$foo", c!("foo", 4));
-    find!(find_cap_ref2, "${foo}", c!("foo", 6));
-    find!(find_cap_ref3, "$0", c!(0, 2));
-    find!(find_cap_ref4, "$5", c!(5, 2));
-    find!(find_cap_ref5, "$10", c!(10, 3));
-    find!(find_cap_ref6, "$42a", c!("42a", 4));
-    find!(find_cap_ref7, "${42}a", c!(42, 5));
-    find!(find_cap_ref8, "${42");
-    find!(find_cap_ref9, "${42 ");
-    find!(find_cap_ref10, " $0 ");
-    find!(find_cap_ref11, "$");
-    find!(find_cap_ref12, " ");
-    find!(find_cap_ref13, "");
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/freqs.rs
+++ /dev/null
@@ -1,271 +0,0 @@
-// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// NOTE: The following code was generated by "scripts/frequencies.py", do not
-// edit directly
-
-pub const BYTE_FREQUENCIES: [u8; 256] = [
-     55, // '\x00'
-     52, // '\x01'
-     51, // '\x02'
-     50, // '\x03'
-     49, // '\x04'
-     48, // '\x05'
-     47, // '\x06'
-     46, // '\x07'
-     45, // '\x08'
-    103, // '\t'
-    242, // '\n'
-     66, // '\x0b'
-     67, // '\x0c'
-    229, // '\r'
-     44, // '\x0e'
-     43, // '\x0f'
-     42, // '\x10'
-     41, // '\x11'
-     40, // '\x12'
-     39, // '\x13'
-     38, // '\x14'
-     37, // '\x15'
-     36, // '\x16'
-     35, // '\x17'
-     34, // '\x18'
-     33, // '\x19'
-     56, // '\x1a'
-     32, // '\x1b'
-     31, // '\x1c'
-     30, // '\x1d'
-     29, // '\x1e'
-     28, // '\x1f'
-    255, // ' '
-    148, // '!'
-    164, // '"'
-    149, // '#'
-    136, // '$'
-    160, // '%'
-    155, // '&'
-    173, // "'"
-    221, // '('
-    222, // ')'
-    134, // '*'
-    122, // '+'
-    232, // ','
-    202, // '-'
-    215, // '.'
-    224, // '/'
-    208, // '0'
-    220, // '1'
-    204, // '2'
-    187, // '3'
-    183, // '4'
-    179, // '5'
-    177, // '6'
-    168, // '7'
-    178, // '8'
-    200, // '9'
-    226, // ':'
-    195, // ';'
-    154, // '<'
-    184, // '='
-    174, // '>'
-    126, // '?'
-    120, // '@'
-    191, // 'A'
-    157, // 'B'
-    194, // 'C'
-    170, // 'D'
-    189, // 'E'
-    162, // 'F'
-    161, // 'G'
-    150, // 'H'
-    193, // 'I'
-    142, // 'J'
-    137, // 'K'
-    171, // 'L'
-    176, // 'M'
-    185, // 'N'
-    167, // 'O'
-    186, // 'P'
-    112, // 'Q'
-    175, // 'R'
-    192, // 'S'
-    188, // 'T'
-    156, // 'U'
-    140, // 'V'
-    143, // 'W'
-    123, // 'X'
-    133, // 'Y'
-    128, // 'Z'
-    147, // '['
-    138, // '\\'
-    146, // ']'
-    114, // '^'
-    223, // '_'
-    151, // '`'
-    249, // 'a'
-    216, // 'b'
-    238, // 'c'
-    236, // 'd'
-    253, // 'e'
-    227, // 'f'
-    218, // 'g'
-    230, // 'h'
-    247, // 'i'
-    135, // 'j'
-    180, // 'k'
-    241, // 'l'
-    233, // 'm'
-    246, // 'n'
-    244, // 'o'
-    231, // 'p'
-    139, // 'q'
-    245, // 'r'
-    243, // 's'
-    251, // 't'
-    235, // 'u'
-    201, // 'v'
-    196, // 'w'
-    240, // 'x'
-    214, // 'y'
-    152, // 'z'
-    182, // '{'
-    205, // '|'
-    181, // '}'
-    127, // '~'
-     27, // '\x7f'
-    212, // '\x80'
-    211, // '\x81'
-    210, // '\x82'
-    213, // '\x83'
-    228, // '\x84'
-    197, // '\x85'
-    169, // '\x86'
-    159, // '\x87'
-    131, // '\x88'
-    172, // '\x89'
-    105, // '\x8a'
-     80, // '\x8b'
-     98, // '\x8c'
-     96, // '\x8d'
-     97, // '\x8e'
-     81, // '\x8f'
-    207, // '\x90'
-    145, // '\x91'
-    116, // '\x92'
-    115, // '\x93'
-    144, // '\x94'
-    130, // '\x95'
-    153, // '\x96'
-    121, // '\x97'
-    107, // '\x98'
-    132, // '\x99'
-    109, // '\x9a'
-    110, // '\x9b'
-    124, // '\x9c'
-    111, // '\x9d'
-     82, // '\x9e'
-    108, // '\x9f'
-    118, // '\xa0'
-    141, // '¡'
-    113, // '¢'
-    129, // '£'
-    119, // '¤'
-    125, // '¥'
-    165, // '¦'
-    117, // '§'
-     92, // '¨'
-    106, // '©'
-     83, // 'ª'
-     72, // '«'
-     99, // '¬'
-     93, // '\xad'
-     65, // '®'
-     79, // '¯'
-    166, // '°'
-    237, // '±'
-    163, // '²'
-    199, // '³'
-    190, // '´'
-    225, // 'µ'
-    209, // '¶'
-    203, // '·'
-    198, // '¸'
-    217, // '¹'
-    219, // 'º'
-    206, // '»'
-    234, // '¼'
-    248, // '½'
-    158, // '¾'
-    239, // '¿'
-    255, // 'À'
-    255, // 'Á'
-    255, // 'Â'
-    255, // 'Ã'
-    255, // 'Ä'
-    255, // 'Å'
-    255, // 'Æ'
-    255, // 'Ç'
-    255, // 'È'
-    255, // 'É'
-    255, // 'Ê'
-    255, // 'Ë'
-    255, // 'Ì'
-    255, // 'Í'
-    255, // 'Î'
-    255, // 'Ï'
-    255, // 'Ð'
-    255, // 'Ñ'
-    255, // 'Ò'
-    255, // 'Ó'
-    255, // 'Ô'
-    255, // 'Õ'
-    255, // 'Ö'
-    255, // '×'
-    255, // 'Ø'
-    255, // 'Ù'
-    255, // 'Ú'
-    255, // 'Û'
-    255, // 'Ü'
-    255, // 'Ý'
-    255, // 'Þ'
-    255, // 'ß'
-    255, // 'à'
-    255, // 'á'
-    255, // 'â'
-    255, // 'ã'
-    255, // 'ä'
-    255, // 'å'
-    255, // 'æ'
-    255, // 'ç'
-    255, // 'è'
-    255, // 'é'
-    255, // 'ê'
-    255, // 'ë'
-    255, // 'ì'
-    255, // 'í'
-    255, // 'î'
-    255, // 'ï'
-    255, // 'ð'
-    255, // 'ñ'
-    255, // 'ò'
-    255, // 'ó'
-    255, // 'ô'
-    255, // 'õ'
-    255, // 'ö'
-    255, // '÷'
-    255, // 'ø'
-    255, // 'ù'
-    255, // 'ú'
-    255, // 'û'
-    255, // 'ü'
-    255, // 'ý'
-    255, // 'þ'
-    255, // 'ÿ'
-];
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/input.rs
+++ /dev/null
@@ -1,425 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::char;
-use std::cmp::Ordering;
-use std::fmt;
-use std::ops;
-use std::u32;
-
-use syntax;
-
-use literals::LiteralSearcher;
-use prog::InstEmptyLook;
-use utf8::{decode_utf8, decode_last_utf8};
-
-/// Represents a location in the input.
-#[derive(Clone, Copy, Debug)]
-pub struct InputAt {
-    pos: usize,
-    c: Char,
-    byte: Option<u8>,
-    len: usize,
-}
-
-impl InputAt {
-    /// Returns true iff this position is at the beginning of the input.
-    pub fn is_start(&self) -> bool {
-        self.pos == 0
-    }
-
-    /// Returns true iff this position is past the end of the input.
-    pub fn is_end(&self) -> bool {
-        self.c.is_none() && self.byte.is_none()
-    }
-
-    /// Returns the character at this position.
-    ///
-    /// If this position is just before or after the input, then an absent
-    /// character is returned.
-    pub fn char(&self) -> Char {
-        self.c
-    }
-
-    /// Returns the byte at this position.
-    pub fn byte(&self) -> Option<u8> {
-        self.byte
-    }
-
-    /// Returns the UTF-8 width of the character at this position.
-    pub fn len(&self) -> usize {
-        self.len
-    }
-
-    /// Returns the byte offset of this position.
-    pub fn pos(&self) -> usize {
-        self.pos
-    }
-
-    /// Returns the byte offset of the next position in the input.
-    pub fn next_pos(&self) -> usize {
-        self.pos + self.len
-    }
-}
-
-/// An abstraction over input used in the matching engines.
-pub trait Input {
-    /// Return an encoding of the position at byte offset `i`.
-    fn at(&self, i: usize) -> InputAt;
-
-    /// Return the Unicode character occurring next to `at`.
-    ///
-    /// If no such character could be decoded, then `Char` is absent.
-    fn next_char(&self, at: InputAt) -> Char;
-
-    /// Return the Unicode character occurring previous to `at`.
-    ///
-    /// If no such character could be decoded, then `Char` is absent.
-    fn previous_char(&self, at: InputAt) -> Char;
-
-    /// Return true if the given empty width instruction matches at the
-    /// input position given.
-    fn is_empty_match(&self, at: InputAt, empty: &InstEmptyLook) -> bool;
-
-    /// Scan the input for a matching prefix.
-    fn prefix_at(
-        &self,
-        prefixes: &LiteralSearcher,
-        at: InputAt,
-    ) -> Option<InputAt>;
-
-    /// The number of bytes in the input.
-    fn len(&self) -> usize;
-
-    /// Return the given input as a sequence of bytes.
-    fn as_bytes(&self) -> &[u8];
-}
-
-impl<'a, T: Input> Input for &'a T {
-    fn at(&self, i: usize) -> InputAt { (**self).at(i) }
-
-    fn next_char(&self, at: InputAt) -> Char { (**self).next_char(at) }
-
-    fn previous_char(&self, at: InputAt) -> Char { (**self).previous_char(at) }
-
-    fn is_empty_match(&self, at: InputAt, empty: &InstEmptyLook) -> bool {
-        (**self).is_empty_match(at, empty)
-    }
-
-    fn prefix_at(
-        &self,
-        prefixes: &LiteralSearcher,
-        at: InputAt,
-    ) -> Option<InputAt> {
-        (**self).prefix_at(prefixes, at)
-    }
-
-    fn len(&self) -> usize { (**self).len() }
-
-    fn as_bytes(&self) -> &[u8] { (**self).as_bytes() }
-}
-
-/// An input reader over characters.
-#[derive(Clone, Copy, Debug)]
-pub struct CharInput<'t>(&'t [u8]);
-
-impl<'t> CharInput<'t> {
-    /// Return a new character input reader for the given string.
-    pub fn new(s: &'t [u8]) -> CharInput<'t> {
-        CharInput(s)
-    }
-}
-
-impl<'t> ops::Deref for CharInput<'t> {
-    type Target = [u8];
-
-    fn deref(&self) -> &[u8] {
-        self.0
-    }
-}
-
-impl<'t> Input for CharInput<'t> {
-    fn at(&self, i: usize) -> InputAt {
-        let c = decode_utf8(&self[i..]).map(|(c, _)| c).into();
-        InputAt {
-            pos: i,
-            c: c,
-            byte: None,
-            len: c.len_utf8(),
-        }
-    }
-
-    fn next_char(&self, at: InputAt) -> Char {
-        at.char()
-    }
-
-    fn previous_char(&self, at: InputAt) -> Char {
-        decode_last_utf8(&self[..at.pos()]).map(|(c, _)| c).into()
-    }
-
-    fn is_empty_match(&self, at: InputAt, empty: &InstEmptyLook) -> bool {
-        use prog::EmptyLook::*;
-        match empty.look {
-            StartLine => {
-                let c = self.previous_char(at);
-                at.pos() == 0 || c == '\n'
-            }
-            EndLine => {
-                let c = self.next_char(at);
-                at.pos() == self.len() || c == '\n'
-            }
-            StartText => at.pos() == 0,
-            EndText => at.pos() == self.len(),
-            WordBoundary => {
-                let (c1, c2) = (self.previous_char(at), self.next_char(at));
-                c1.is_word_char() != c2.is_word_char()
-            }
-            NotWordBoundary => {
-                let (c1, c2) = (self.previous_char(at), self.next_char(at));
-                c1.is_word_char() == c2.is_word_char()
-            }
-            WordBoundaryAscii => {
-                let (c1, c2) = (self.previous_char(at), self.next_char(at));
-                c1.is_word_byte() != c2.is_word_byte()
-            }
-            NotWordBoundaryAscii => {
-                let (c1, c2) = (self.previous_char(at), self.next_char(at));
-                c1.is_word_byte() == c2.is_word_byte()
-            }
-        }
-    }
-
-    fn prefix_at(
-        &self,
-        prefixes: &LiteralSearcher,
-        at: InputAt,
-    ) -> Option<InputAt> {
-        prefixes.find(&self[at.pos()..]).map(|(s, _)| self.at(at.pos() + s))
-    }
-
-    fn len(&self) -> usize {
-        self.0.len()
-    }
-
-    fn as_bytes(&self) -> &[u8] {
-        self.0
-    }
-}
-
-/// An input reader over bytes.
-///
-/// N.B. We represent the reader with a string for now, since that gives us
-/// easy access to necessary Unicode decoding (used for word boundary look
-/// ahead/look behind).
-#[derive(Clone, Copy, Debug)]
-pub struct ByteInput<'t> {
-    text: &'t [u8],
-    only_utf8: bool,
-}
-
-impl<'t> ByteInput<'t> {
-    /// Return a new byte-based input reader for the given string.
-    pub fn new(text: &'t [u8], only_utf8: bool) -> ByteInput<'t> {
-        ByteInput {
-            text: text,
-            only_utf8: only_utf8,
-        }
-    }
-}
-
-impl<'t> ops::Deref for ByteInput<'t> {
-    type Target = [u8];
-
-    fn deref(&self) -> &[u8] {
-        self.text
-    }
-}
-
-impl<'t> Input for ByteInput<'t> {
-    fn at(&self, i: usize) -> InputAt {
-        InputAt {
-            pos: i,
-            c: None.into(),
-            byte: self.get(i).map(|&b| b),
-            len: 1,
-        }
-    }
-
-    fn next_char(&self, at: InputAt) -> Char {
-        decode_utf8(&self[at.pos()..]).map(|(c, _)| c).into()
-    }
-
-    fn previous_char(&self, at: InputAt) -> Char {
-        decode_last_utf8(&self[..at.pos()]).map(|(c, _)| c).into()
-    }
-
-    fn is_empty_match(&self, at: InputAt, empty: &InstEmptyLook) -> bool {
-        use prog::EmptyLook::*;
-        match empty.look {
-            StartLine => {
-                let c = self.previous_char(at);
-                at.pos() == 0 || c == '\n'
-            }
-            EndLine => {
-                let c = self.next_char(at);
-                at.pos() == self.len() || c == '\n'
-            }
-            StartText => at.pos() == 0,
-            EndText => at.pos() == self.len(),
-            WordBoundary => {
-                let (c1, c2) = (self.previous_char(at), self.next_char(at));
-                c1.is_word_char() != c2.is_word_char()
-            }
-            NotWordBoundary => {
-                let (c1, c2) = (self.previous_char(at), self.next_char(at));
-                c1.is_word_char() == c2.is_word_char()
-            }
-            WordBoundaryAscii => {
-                let (c1, c2) = (self.previous_char(at), self.next_char(at));
-                if self.only_utf8 {
-                    // If we must match UTF-8, then we can't match word
-                    // boundaries at invalid UTF-8.
-                    if c1.is_none() && !at.is_start() {
-                        return false;
-                    }
-                    if c2.is_none() && !at.is_end() {
-                        return false;
-                    }
-                }
-                c1.is_word_byte() != c2.is_word_byte()
-            }
-            NotWordBoundaryAscii => {
-                let (c1, c2) = (self.previous_char(at), self.next_char(at));
-                if self.only_utf8 {
-                    // If we must match UTF-8, then we can't match word
-                    // boundaries at invalid UTF-8.
-                    if c1.is_none() && !at.is_start() {
-                        return false;
-                    }
-                    if c2.is_none() && !at.is_end() {
-                        return false;
-                    }
-                }
-                c1.is_word_byte() == c2.is_word_byte()
-            }
-        }
-    }
-
-    fn prefix_at(
-        &self,
-        prefixes: &LiteralSearcher,
-        at: InputAt,
-    ) -> Option<InputAt> {
-        prefixes.find(&self[at.pos()..]).map(|(s, _)| self.at(at.pos() + s))
-    }
-
-    fn len(&self) -> usize {
-        self.text.len()
-    }
-
-    fn as_bytes(&self) -> &[u8] {
-        &self.text
-    }
-}
-
-/// An inline representation of `Option<char>`.
-///
-/// This eliminates the need to do case analysis on `Option<char>` to determine
-/// ordinality with other characters.
-///
-/// (The `Option<char>` is not related to encoding. Instead, it is used in the
-/// matching engines to represent the beginning and ending boundaries of the
-/// search text.)
-#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
-pub struct Char(u32);
-
-impl fmt::Debug for Char {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match char::from_u32(self.0) {
-            None => write!(f, "Empty"),
-            Some(c) => write!(f, "{:?}", c),
-        }
-    }
-}
-
-impl Char {
-    /// Returns true iff the character is absent.
-    #[inline]
-    pub fn is_none(self) -> bool { self.0 == u32::MAX }
-
-    /// Returns the length of the character's UTF-8 encoding.
-    ///
-    /// If the character is absent, then `0` is returned.
-    #[inline]
-    pub fn len_utf8(self) -> usize {
-        char::from_u32(self.0).map_or(0, |c| c.len_utf8())
-    }
-
-    /// Returns true iff the character is a word character.
-    ///
-    /// If the character is absent, then false is returned.
-    pub fn is_word_char(self) -> bool {
-        char::from_u32(self.0).map_or(false, syntax::is_word_char)
-    }
-
-    /// Returns true iff the byte is a word byte.
-    ///
-    /// If the byte is absent, then false is returned.
-    pub fn is_word_byte(self) -> bool {
-        match char::from_u32(self.0) {
-            None => false,
-            Some(c) if c <= '\u{7F}' => syntax::is_word_byte(c as u8),
-            Some(_) => false,
-        }
-    }
-
-    /// Converts the character to a real primitive `char`.
-    ///
-    /// If the character is absent, then `None` is returned.
-    pub fn as_char(self) -> Option<char> {
-        // This is only used in the `regex!` macro because it expands char
-        // classes into `match` expressions (instead of binary search).
-        char::from_u32(self.0)
-    }
-}
-
-impl From<char> for Char {
-    fn from(c: char) -> Char { Char(c as u32) }
-}
-
-impl From<Option<char>> for Char {
-    fn from(c: Option<char>) -> Char {
-        c.map_or(Char(u32::MAX), |c| c.into())
-    }
-}
-
-impl PartialEq<char> for Char {
-    #[inline]
-    fn eq(&self, other: &char) -> bool { self.0 == *other as u32 }
-}
-
-impl PartialEq<Char> for char {
-    #[inline]
-    fn eq(&self, other: &Char) -> bool { *self as u32 == other.0 }
-}
-
-impl PartialOrd<char> for Char {
-    #[inline]
-    fn partial_cmp(&self, other: &char) -> Option<Ordering> {
-        self.0.partial_cmp(&(*other as u32))
-    }
-}
-
-impl PartialOrd<Char> for char {
-    #[inline]
-    fn partial_cmp(&self, other: &Char) -> Option<Ordering> {
-        (*self as u32).partial_cmp(&other.0)
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/lib.rs
+++ /dev/null
@@ -1,628 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-/*!
-This crate provides a library for parsing, compiling, and executing regular
-expressions. Its syntax is similar to Perl-style regular expressions, but lacks
-a few features like look around and backreferences. In exchange, all searches
-execute in linear time with respect to the size of the regular expression and
-search text.
-
-This crate's documentation provides some simple examples, describes
-[Unicode support](#unicode) and exhaustively lists the
-[supported syntax](#syntax).
-
-For more specific details on the API for regular expressions, please see the
-documentation for the [`Regex`](struct.Regex.html) type.
-
-# Usage
-
-This crate is [on crates.io](https://crates.io/crates/regex) and can be
-used by adding `regex` to your dependencies in your project's `Cargo.toml`.
-
-```toml
-[dependencies]
-regex = "0.2"
-```
-
-and this to your crate root:
-
-```rust
-extern crate regex;
-```
-
-# Example: find a date
-
-General use of regular expressions in this package involves compiling an
-expression and then using it to search, split or replace text. For example,
-to confirm that some text resembles a date:
-
-```rust
-use regex::Regex;
-let re = Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap();
-assert!(re.is_match("2014-01-01"));
-```
-
-Notice the use of the `^` and `$` anchors. In this crate, every expression
-is executed with an implicit `.*?` at the beginning and end, which allows
-it to match anywhere in the text. Anchors can be used to ensure that the
-full text matches an expression.
-
-This example also demonstrates the utility of
-[raw strings](https://doc.rust-lang.org/stable/reference.html#raw-string-literals)
-in Rust, which
-are just like regular strings except they are prefixed with an `r` and do
-not process any escape sequences. For example, `"\\d"` is the same
-expression as `r"\d"`.
-
-# Example: Avoid compiling the same regex in a loop
-
-It is an anti-pattern to compile the same regular expression in a loop
-since compilation is typically expensive. (It takes anywhere from a few
-microseconds to a few **milliseconds** depending on the size of the
-regex.) Not only is compilation itself expensive, but this also prevents
-optimizations that reuse allocations internally to the matching engines.
-
-In Rust, it can sometimes be a pain to pass regular expressions around if
-they're used from inside a helper function. Instead, we recommend using the
-[`lazy_static`](https://crates.io/crates/lazy_static) crate to ensure that
-regular expressions are compiled exactly once.
-
-For example:
-
-```rust
-#[macro_use] extern crate lazy_static;
-extern crate regex;
-
-use regex::Regex;
-
-fn some_helper_function(text: &str) -> bool {
-    lazy_static! {
-        static ref RE: Regex = Regex::new("...").unwrap();
-    }
-    RE.is_match(text)
-}
-
-fn main() {}
-```
-
-Specifically, in this example, the regex will be compiled when it is used for
-the first time. On subsequent uses, it will reuse the previous compilation.
-
-# Example: iterating over capture groups
-
-This crate provides convenient iterators for matching an expression
-repeatedly against a search string to find successive non-overlapping
-matches. For example, to find all dates in a string and be able to access
-them by their component pieces:
-
-```rust
-# extern crate regex; use regex::Regex;
-# fn main() {
-let re = Regex::new(r"(\d{4})-(\d{2})-(\d{2})").unwrap();
-let text = "2012-03-14, 2013-01-01 and 2014-07-05";
-for cap in re.captures_iter(text) {
-    println!("Month: {} Day: {} Year: {}", &cap[2], &cap[3], &cap[1]);
-}
-// Output:
-// Month: 03 Day: 14 Year: 2012
-// Month: 01 Day: 01 Year: 2013
-// Month: 07 Day: 05 Year: 2014
-# }
-```
-
-Notice that the year is in the capture group indexed at `1`. This is
-because the *entire match* is stored in the capture group at index `0`.
-
-# Example: replacement with named capture groups
-
-Building on the previous example, perhaps we'd like to rearrange the date
-formats. This can be done with text replacement. But to make the code
-clearer, we can *name*  our capture groups and use those names as variables
-in our replacement text:
-
-```rust
-# extern crate regex; use regex::Regex;
-# fn main() {
-let re = Regex::new(r"(?P<y>\d{4})-(?P<m>\d{2})-(?P<d>\d{2})").unwrap();
-let before = "2012-03-14, 2013-01-01 and 2014-07-05";
-let after = re.replace_all(before, "$m/$d/$y");
-assert_eq!(after, "03/14/2012, 01/01/2013 and 07/05/2014");
-# }
-```
-
-The `replace` methods are actually polymorphic in the replacement, which
-provides more flexibility than is seen here. (See the documentation for
-`Regex::replace` for more details.)
-
-Note that if your regex gets complicated, you can use the `x` flag to
-enable insigificant whitespace mode, which also lets you write comments:
-
-```rust
-# extern crate regex; use regex::Regex;
-# fn main() {
-let re = Regex::new(r"(?x)
-  (?P<y>\d{4}) # the year
-  -
-  (?P<m>\d{2}) # the month
-  -
-  (?P<d>\d{2}) # the day
-").unwrap();
-let before = "2012-03-14, 2013-01-01 and 2014-07-05";
-let after = re.replace_all(before, "$m/$d/$y");
-assert_eq!(after, "03/14/2012, 01/01/2013 and 07/05/2014");
-# }
-```
-
-# Example: match multiple regular expressions simultaneously
-
-This demonstrates how to use a `RegexSet` to match multiple (possibly
-overlapping) regular expressions in a single scan of the search text:
-
-```rust
-use regex::RegexSet;
-
-let set = RegexSet::new(&[
-    r"\w+",
-    r"\d+",
-    r"\pL+",
-    r"foo",
-    r"bar",
-    r"barfoo",
-    r"foobar",
-]).unwrap();
-
-// Iterate over and collect all of the matches.
-let matches: Vec<_> = set.matches("foobar").into_iter().collect();
-assert_eq!(matches, vec![0, 2, 3, 4, 6]);
-
-// You can also test whether a particular regex matched:
-let matches = set.matches("foobar");
-assert!(!matches.matched(5));
-assert!(matches.matched(6));
-```
-
-# Pay for what you use
-
-With respect to searching text with a regular expression, there are three
-questions that can be asked:
-
-1. Does the text match this expression?
-2. If so, where does it match?
-3. Where did the capturing groups match?
-
-Generally speaking, this crate could provide a function to answer only #3,
-which would subsume #1 and #2 automatically. However, it can be significantly
-more expensive to compute the location of capturing group matches, so it's best
-not to do it if you don't need to.
-
-Therefore, only use what you need. For example, don't use `find` if you
-only need to test if an expression matches a string. (Use `is_match`
-instead.)
-
-# Unicode
-
-This implementation executes regular expressions **only** on valid UTF-8
-while exposing match locations as byte indices into the search string.
-
-Only simple case folding is supported. Namely, when matching
-case-insensitively, the characters are first mapped using the [simple case
-folding](ftp://ftp.unicode.org/Public/UNIDATA/CaseFolding.txt) mapping
-before matching.
-
-Regular expressions themselves are **only** interpreted as a sequence of
-Unicode scalar values. This means you can use Unicode characters directly
-in your expression:
-
-```rust
-# extern crate regex; use regex::Regex;
-# fn main() {
-let re = Regex::new(r"(?i)Δ+").unwrap();
-let mat = re.find("ΔδΔ").unwrap();
-assert_eq!((mat.start(), mat.end()), (0, 6));
-# }
-```
-
-Most features of the regular expressions in this crate are Unicode aware. Here
-are some examples:
-
-* `.` will match any valid UTF-8 encoded Unicode scalar value except for `\n`.
-  (To also match `\n`, enable the `s` flag, e.g., `(?s:.)`.)
-* `\w`, `\d` and `\s` are Unicode aware. For example, `\s` will match all forms
-  of whitespace categorized by Unicode.
-* `\b` matches a Unicode word boundary.
-* Negated character classes like `[^a]` match all Unicode scalar values except
-  for `a`.
-* `^` and `$` are **not** Unicode aware in multi-line mode. Namely, they only
-  recognize `\n` and not any of the other forms of line terminators defined
-  by Unicode.
-
-Finally, Unicode general categories and scripts are available as character
-classes. For example, you can match a sequence of numerals, Greek or
-Cherokee letters:
-
-```rust
-# extern crate regex; use regex::Regex;
-# fn main() {
-let re = Regex::new(r"[\pN\p{Greek}\p{Cherokee}]+").unwrap();
-let mat = re.find("abcΔᎠβⅠᏴγδⅡxyz").unwrap();
-assert_eq!((mat.start(), mat.end()), (3, 23));
-# }
-```
-
-# Opt out of Unicode support
-
-The `bytes` sub-module provides a `Regex` type that can be used to match
-on `&[u8]`. By default, text is interpreted as UTF-8 just like it is with
-the main `Regex` type. However, this behavior can be disabled by turning
-off the `u` flag, even if doing so could result in matching invalid UTF-8.
-For example, when the `u` flag is disabled, `.` will match any byte instead
-of any Unicode scalar value.
-
-Disabling the `u` flag is also possible with the standard `&str`-based `Regex`
-type, but it is only allowed where the UTF-8 invariant is maintained. For
-example, `(?-u:\w)` is an ASCII-only `\w` character class and is legal in an
-`&str`-based `Regex`, but `(?-u:\xFF)` will attempt to match the raw byte
-`\xFF`, which is invalid UTF-8 and therefore is illegal in `&str`-based
-regexes.
-
-# Syntax
-
-The syntax supported in this crate is documented below.
-
-Note that the regular expression parser and abstract syntax are exposed in
-a separate crate, [`regex-syntax`](../regex_syntax/index.html).
-
-## Matching one character
-
-<pre class="rust">
-.             any character except new line (includes new line with s flag)
-[xyz]         A character class matching either x, y or z.
-[^xyz]        A character class matching any character except x, y and z.
-[a-z]         A character class matching any character in range a-z.
-\d            digit (\p{Nd})
-\D            not digit
-[[:alpha:]]   ASCII character class ([A-Za-z])
-[[:^alpha:]]  Negated ASCII character class ([^A-Za-z])
-\pN           One-letter name Unicode character class
-\p{Greek}     Unicode character class (general category or script)
-\PN           Negated one-letter name Unicode character class
-\P{Greek}     negated Unicode character class (general category or script)
-</pre>
-
-Any named character class may appear inside a bracketed `[...]` character
-class. For example, `[\p{Greek}[:digit:]]` matches any Greek or ASCII
-digit.
-
-## Composites
-
-<pre class="rust">
-xy    concatenation (x followed by y)
-x|y   alternation (x or y, prefer x)
-</pre>
-
-## Repetitions
-
-<pre class="rust">
-x*        zero or more of x (greedy)
-x+        one or more of x (greedy)
-x?        zero or one of x (greedy)
-x*?       zero or more of x (ungreedy/lazy)
-x+?       one or more of x (ungreedy/lazy)
-x??       zero or one of x (ungreedy/lazy)
-x{n,m}    at least n x and at most m x (greedy)
-x{n,}     at least n x (greedy)
-x{n}      exactly n x
-x{n,m}?   at least n x and at most m x (ungreedy/lazy)
-x{n,}?    at least n x (ungreedy/lazy)
-x{n}?     exactly n x
-</pre>
-
-## Empty matches
-
-<pre class="rust">
-^     the beginning of text (or start-of-line with multi-line mode)
-$     the end of text (or end-of-line with multi-line mode)
-\A    only the beginning of text (even with multi-line mode enabled)
-\z    only the end of text (even with multi-line mode enabled)
-\b    a Unicode word boundary (\w on one side and \W, \A, or \z on other)
-\B    not a Unicode word boundary
-</pre>
-
-## Grouping and flags
-
-<pre class="rust">
-(exp)          numbered capture group (indexed by opening parenthesis)
-(?P&lt;name&gt;exp)  named (also numbered) capture group (allowed chars: [_0-9a-zA-Z])
-(?:exp)        non-capturing group
-(?flags)       set flags within current group
-(?flags:exp)   set flags for exp (non-capturing)
-</pre>
-
-Flags are each a single character. For example, `(?x)` sets the flag `x`
-and `(?-x)` clears the flag `x`. Multiple flags can be set or cleared at
-the same time: `(?xy)` sets both the `x` and `y` flags and `(?x-y)` sets
-the `x` flag and clears the `y` flag.
-
-All flags are by default disabled unless stated otherwise. They are:
-
-<pre class="rust">
-i     case-insensitive
-m     multi-line mode: ^ and $ match begin/end of line
-s     allow . to match \n
-U     swap the meaning of x* and x*?
-u     Unicode support (enabled by default)
-x     ignore whitespace and allow line comments (starting with `#`)
-</pre>
-
-Here's an example that matches case-insensitively for only part of the
-expression:
-
-```rust
-# extern crate regex; use regex::Regex;
-# fn main() {
-let re = Regex::new(r"(?i)a+(?-i)b+").unwrap();
-let cap = re.captures("AaAaAbbBBBb").unwrap();
-assert_eq!(&cap[0], "AaAaAbb");
-# }
-```
-
-Notice that the `a+` matches either `a` or `A`, but the `b+` only matches
-`b`.
-
-Here is an example that uses an ASCII word boundary instead of a Unicode
-word boundary:
-
-```rust
-# extern crate regex; use regex::Regex;
-# fn main() {
-let re = Regex::new(r"(?-u:\b).+(?-u:\b)").unwrap();
-let cap = re.captures("$$abc$$").unwrap();
-assert_eq!(&cap[0], "abc");
-# }
-```
-
-## Escape sequences
-
-<pre class="rust">
-\*         literal *, works for any punctuation character: \.+*?()|[]{}^$
-\a         bell (\x07)
-\f         form feed (\x0C)
-\t         horizontal tab
-\n         new line
-\r         carriage return
-\v         vertical tab (\x0B)
-\123       octal character code (up to three digits)
-\x7F       hex character code (exactly two digits)
-\x{10FFFF} any hex character code corresponding to a Unicode code point
-</pre>
-
-## Perl character classes (Unicode friendly)
-
-These classes are based on the definitions provided in
-[UTS#18](http://www.unicode.org/reports/tr18/#Compatibility_Properties):
-
-<pre class="rust">
-\d     digit (\p{Nd})
-\D     not digit
-\s     whitespace (\p{White_Space})
-\S     not whitespace
-\w     word character (\p{Alphabetic} + \p{M} + \d + \p{Pc} + \p{Join_Control})
-\W     not word character
-</pre>
-
-## ASCII character classes
-
-<pre class="rust">
-[[:alnum:]]    alphanumeric ([0-9A-Za-z])
-[[:alpha:]]    alphabetic ([A-Za-z])
-[[:ascii:]]    ASCII ([\x00-\x7F])
-[[:blank:]]    blank ([\t ])
-[[:cntrl:]]    control ([\x00-\x1F\x7F])
-[[:digit:]]    digits ([0-9])
-[[:graph:]]    graphical ([!-~])
-[[:lower:]]    lower case ([a-z])
-[[:print:]]    printable ([ -~])
-[[:punct:]]    punctuation ([!-/:-@[-`{-~])
-[[:space:]]    whitespace ([\t\n\v\f\r ])
-[[:upper:]]    upper case ([A-Z])
-[[:word:]]     word characters ([0-9A-Za-z_])
-[[:xdigit:]]   hex digit ([0-9A-Fa-f])
-</pre>
-
-# Untrusted input
-
-This crate can handle both untrusted regular expressions and untrusted
-search text.
-
-Untrusted regular expressions are handled by capping the size of a compiled
-regular expression.
-(See [`RegexBuilder::size_limit`](struct.RegexBuilder.html#method.size_limit).)
-Without this, it would be trivial for an attacker to exhaust your system's
-memory with expressions like `a{100}{100}{100}`.
-
-Untrusted search text is allowed because the matching engine(s) in this
-crate have time complexity `O(mn)` (with `m ~ regex` and `n ~ search
-text`), which means there's no way to cause exponential blow-up like with
-some other regular expression engines. (We pay for this by disallowing
-features like arbitrary look-ahead and backreferences.)
-
-When a DFA is used, pathological cases with exponential state blow up are
-avoided by constructing the DFA lazily or in an "online" manner. Therefore,
-at most one new state can be created for each byte of input. This satisfies
-our time complexity guarantees, but can lead to unbounded memory growth
-proportional to the size of the input. As a stopgap, the DFA is only
-allowed to store a fixed number of states. When the limit is reached, its
-states are wiped and continues on, possibly duplicating previous work. If
-the limit is reached too frequently, it gives up and hands control off to
-another matching engine with fixed memory requirements.
-(The DFA size limit can also be tweaked. See
-[`RegexBuilder::dfa_size_limit`](struct.RegexBuilder.html#method.dfa_size_limit).)
-*/
-
-#![deny(missing_docs)]
-#![cfg_attr(test, deny(warnings))]
-#![cfg_attr(feature = "pattern", feature(pattern))]
-#![cfg_attr(feature = "simd-accel", feature(cfg_target_feature))]
-
-extern crate aho_corasick;
-extern crate memchr;
-extern crate thread_local;
-#[cfg(test)] extern crate quickcheck;
-extern crate regex_syntax as syntax;
-#[cfg(feature = "simd-accel")] extern crate simd;
-extern crate utf8_ranges;
-
-pub use error::Error;
-pub use re_builder::unicode::*;
-pub use re_builder::set_unicode::*;
-pub use re_set::unicode::*;
-pub use re_trait::Locations;
-pub use re_unicode::{
-    Regex, Match, Captures,
-    CaptureNames, Matches, CaptureMatches, SubCaptureMatches,
-    Replacer, NoExpand, Split, SplitN,
-    escape,
-};
-
-/**
-Match regular expressions on arbitrary bytes.
-
-This module provides a nearly identical API to the one found in the
-top-level of this crate. There are two important differences:
-
-1. Matching is done on `&[u8]` instead of `&str`. Additionally, `Vec<u8>`
-is used where `String` would have been used.
-2. Unicode support can be disabled even when disabling it would result in
-matching invalid UTF-8 bytes.
-
-# Example: match null terminated string
-
-This shows how to find all null-terminated strings in a slice of bytes:
-
-```rust
-# use regex::bytes::Regex;
-let re = Regex::new(r"(?-u)(?P<cstr>[^\x00]+)\x00").unwrap();
-let text = b"foo\x00bar\x00baz\x00";
-
-// Extract all of the strings without the null terminator from each match.
-// The unwrap is OK here since a match requires the `cstr` capture to match.
-let cstrs: Vec<&[u8]> =
-    re.captures_iter(text)
-      .map(|c| c.name("cstr").unwrap().as_bytes())
-      .collect();
-assert_eq!(vec![&b"foo"[..], &b"bar"[..], &b"baz"[..]], cstrs);
-```
-
-# Example: selectively enable Unicode support
-
-This shows how to match an arbitrary byte pattern followed by a UTF-8 encoded
-string (e.g., to extract a title from a Matroska file):
-
-```rust
-# use std::str;
-# use regex::bytes::Regex;
-let re = Regex::new(
-    r"(?-u)\x7b\xa9(?:[\x80-\xfe]|[\x40-\xff].)(?u:(.*))"
-).unwrap();
-let text = b"\x12\xd0\x3b\x5f\x7b\xa9\x85\xe2\x98\x83\x80\x98\x54\x76\x68\x65";
-let caps = re.captures(text).unwrap();
-
-// Notice that despite the `.*` at the end, it will only match valid UTF-8
-// because Unicode mode was enabled with the `u` flag. Without the `u` flag,
-// the `.*` would match the rest of the bytes.
-let mat = caps.get(1).unwrap();
-assert_eq!((7, 10), (mat.start(), mat.end()));
-
-// If there was a match, Unicode mode guarantees that `title` is valid UTF-8.
-let title = str::from_utf8(&caps[1]).unwrap();
-assert_eq!("☃", title);
-```
-
-In general, if the Unicode flag is enabled in a capture group and that capture
-is part of the overall match, then the capture is *guaranteed* to be valid
-UTF-8.
-
-# Syntax
-
-The supported syntax is pretty much the same as the syntax for Unicode
-regular expressions with a few changes that make sense for matching arbitrary
-bytes:
-
-1. The `u` flag can be disabled even when disabling it might cause the regex to
-match invalid UTF-8. When the `u` flag is disabled, the regex is said to be in
-"ASCII compatible" mode.
-2. In ASCII compatible mode, neither Unicode scalar values nor Unicode
-character classes are allowed.
-3. In ASCII compatible mode, Perl character classes (`\w`, `\d` and `\s`)
-revert to their typical ASCII definition. `\w` maps to `[[:word:]]`, `\d` maps
-to `[[:digit:]]` and `\s` maps to `[[:space:]]`.
-4. In ASCII compatible mode, word boundaries use the ASCII compatible `\w` to
-determine whether a byte is a word byte or not.
-5. Hexadecimal notation can be used to specify arbitrary bytes instead of
-Unicode codepoints. For example, in ASCII compatible mode, `\xFF` matches the
-literal byte `\xFF`, while in Unicode mode, `\xFF` is a Unicode codepoint that
-matches its UTF-8 encoding of `\xC3\xBF`. Similarly for octal notation.
-6. `.` matches any *byte* except for `\n` instead of any Unicode scalar value.
-When the `s` flag is enabled, `.` matches any byte.
-
-# Performance
-
-In general, one should expect performance on `&[u8]` to be roughly similar to
-performance on `&str`.
-*/
-pub mod bytes {
-    pub use re_builder::bytes::*;
-    pub use re_builder::set_bytes::*;
-    pub use re_bytes::*;
-    pub use re_set::bytes::*;
-    pub use re_trait::Locations;
-}
-
-mod backtrack;
-mod utf8;
-mod compile;
-mod dfa;
-mod error;
-mod exec;
-mod expand;
-mod freqs;
-mod input;
-mod literals;
-#[cfg(feature = "pattern")]
-mod pattern;
-mod pikevm;
-mod prog;
-mod re_builder;
-mod re_bytes;
-mod re_plugin;
-mod re_set;
-mod re_trait;
-mod re_unicode;
-#[cfg(feature = "simd-accel")]
-mod simd_accel;
-#[cfg(not(feature = "simd-accel"))]
-#[path = "simd_fallback/mod.rs"]
-mod simd_accel;
-mod sparse;
-
-/// The `internal` module exists to support the `regex!` macro and other
-/// suspicious activity, such as testing different matching engines and
-/// supporting the `regex-debug` CLI utility.
-#[doc(hidden)]
-pub mod internal {
-    pub use compile::Compiler;
-    pub use exec::{Exec, ExecBuilder};
-    pub use input::{Char, Input, CharInput, InputAt};
-    pub use literals::LiteralSearcher;
-    pub use prog::{Program, Inst, EmptyLook, InstRanges};
-    pub use re_plugin::Plugin;
-    pub use re_unicode::_Regex;
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/literals.rs
+++ /dev/null
@@ -1,521 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::mem;
-
-use aho_corasick::{Automaton, AcAutomaton, FullAcAutomaton};
-use memchr::{memchr, memchr2, memchr3};
-use syntax;
-
-use freqs::BYTE_FREQUENCIES;
-
-use simd_accel::teddy128::{Teddy, is_teddy_128_available};
-
-/// A prefix extracted from a compiled regular expression.
-///
-/// A regex prefix is a set of literal strings that *must* be matched at the
-/// beginning of a regex in order for the entire regex to match.
-///
-/// There are a variety of ways to efficiently scan the search text for a
-/// prefix. Currently, there are three implemented:
-///
-/// 1. The prefix is a single byte. Just use memchr.
-/// 2. If the prefix is a set of two or more single byte prefixes, then
-///    a single sparse map is created. Checking if there is a match is a lookup
-///    in this map for each byte in the search text.
-/// 3. In all other cases, build an Aho-Corasick automaton.
-///
-/// It's possible that there's room here for other substring algorithms,
-/// such as Boyer-Moore for single-set prefixes greater than 1, or Rabin-Karp
-/// for small sets of same-length prefixes.
-#[derive(Clone, Debug)]
-pub struct LiteralSearcher {
-    complete: bool,
-    lcp: SingleSearch,
-    lcs: SingleSearch,
-    matcher: Matcher,
-}
-
-#[derive(Clone, Debug)]
-enum Matcher {
-    /// No literals. (Never advances through the input.)
-    Empty,
-    /// A set of four or more single byte literals.
-    Bytes(SingleByteSet),
-    /// A single substring. (Likely using Boyer-Moore with memchr.)
-    Single(SingleSearch),
-    /// An Aho-Corasick automaton.
-    AC(FullAcAutomaton<syntax::Lit>),
-    /// A simd accelerated multiple string matcher.
-    Teddy128(Teddy),
-}
-
-impl LiteralSearcher {
-    /// Returns a matcher that never matches and never advances the input.
-    pub fn empty() -> Self {
-        Self::new(syntax::Literals::empty(), Matcher::Empty)
-    }
-
-    /// Returns a matcher for literal prefixes from the given set.
-    pub fn prefixes(lits: syntax::Literals) -> Self {
-        let matcher = Matcher::prefixes(&lits);
-        Self::new(lits, matcher)
-    }
-
-    /// Returns a matcher for literal suffixes from the given set.
-    pub fn suffixes(lits: syntax::Literals) -> Self {
-        let matcher = Matcher::suffixes(&lits);
-        Self::new(lits, matcher)
-    }
-
-    fn new(lits: syntax::Literals, matcher: Matcher) -> Self {
-        let complete = lits.all_complete();
-        LiteralSearcher {
-            complete: complete,
-            lcp: SingleSearch::new(lits.longest_common_prefix().to_vec()),
-            lcs: SingleSearch::new(lits.longest_common_suffix().to_vec()),
-            matcher: matcher,
-        }
-    }
-
-    /// Returns true if all matches comprise the entire regular expression.
-    ///
-    /// This does not necessarily mean that a literal match implies a match
-    /// of the regular expression. For example, the regular expresison `^a`
-    /// is comprised of a single complete literal `a`, but the regular
-    /// expression demands that it only match at the beginning of a string.
-    pub fn complete(&self) -> bool {
-        self.complete && self.len() > 0
-    }
-
-    /// Find the position of a literal in `haystack` if it exists.
-    #[inline(always)] // reduces constant overhead
-    pub fn find(&self, haystack: &[u8]) -> Option<(usize, usize)> {
-        use self::Matcher::*;
-        match self.matcher {
-            Empty => Some((0, 0)),
-            Bytes(ref sset) => sset.find(haystack).map(|i| (i, i + 1)),
-            Single(ref s) => s.find(haystack).map(|i| (i, i + s.len())),
-            AC(ref aut) => aut.find(haystack).next().map(|m| (m.start, m.end)),
-            Teddy128(ref ted) => ted.find(haystack).map(|m| (m.start, m.end)),
-        }
-    }
-
-    /// Like find, except matches must start at index `0`.
-    pub fn find_start(&self, haystack: &[u8]) -> Option<(usize, usize)> {
-        for lit in self.iter() {
-            if lit.len() > haystack.len() {
-                continue;
-            }
-            if lit == &haystack[0..lit.len()] {
-                return Some((0, lit.len()));
-            }
-        }
-        None
-    }
-
-    /// Like find, except matches must end at index `haystack.len()`.
-    pub fn find_end(&self, haystack: &[u8]) -> Option<(usize, usize)> {
-        for lit in self.iter() {
-            if lit.len() > haystack.len() {
-                continue;
-            }
-            if lit == &haystack[haystack.len() - lit.len()..] {
-                return Some((haystack.len() - lit.len(), haystack.len()));
-            }
-        }
-        None
-    }
-
-    /// Returns an iterator over all literals to be matched.
-    pub fn iter(&self) -> LiteralIter {
-        match self.matcher {
-            Matcher::Empty => LiteralIter::Empty,
-            Matcher::Bytes(ref sset) => LiteralIter::Bytes(&sset.dense),
-            Matcher::Single(ref s) => LiteralIter::Single(&s.pat),
-            Matcher::AC(ref ac) => LiteralIter::AC(ac.patterns()),
-            Matcher::Teddy128(ref ted) => {
-                LiteralIter::Teddy128(ted.patterns())
-            }
-        }
-    }
-
-    /// Returns a matcher for the longest common prefix of this matcher.
-    pub fn lcp(&self) -> &SingleSearch {
-        &self.lcp
-    }
-
-    /// Returns a matcher for the longest common suffix of this matcher.
-    pub fn lcs(&self) -> &SingleSearch {
-        &self.lcs
-    }
-
-    /// Returns true iff this prefix is empty.
-    pub fn is_empty(&self) -> bool {
-        self.len() == 0
-    }
-
-    /// Returns the number of prefixes in this machine.
-    pub fn len(&self) -> usize {
-        use self::Matcher::*;
-        match self.matcher {
-            Empty => 0,
-            Bytes(ref sset) => sset.dense.len(),
-            Single(_) => 1,
-            AC(ref aut) => aut.len(),
-            Teddy128(ref ted) => ted.len(),
-        }
-    }
-
-    /// Return the approximate heap usage of literals in bytes.
-    pub fn approximate_size(&self) -> usize {
-        use self::Matcher::*;
-        match self.matcher {
-            Empty => 0,
-            Bytes(ref sset) => sset.approximate_size(),
-            Single(ref single) => single.approximate_size(),
-            AC(ref aut) => aut.heap_bytes(),
-            Teddy128(ref ted) => ted.approximate_size(),
-        }
-    }
-}
-
-impl Matcher {
-    fn prefixes(lits: &syntax::Literals) -> Self {
-        let sset = SingleByteSet::prefixes(&lits);
-        Matcher::new(lits, sset)
-    }
-
-    fn suffixes(lits: &syntax::Literals) -> Self {
-        let sset = SingleByteSet::suffixes(&lits);
-        Matcher::new(lits, sset)
-    }
-
-    fn new(lits: &syntax::Literals, sset: SingleByteSet) -> Self {
-        if lits.literals().is_empty() {
-            return Matcher::Empty;
-        }
-        if sset.dense.len() >= 26 {
-            // Avoid trying to match a large number of single bytes.
-            // This is *very* sensitive to a frequency analysis comparison
-            // between the bytes in sset and the composition of the haystack.
-            // No matter the size of sset, if its members all are rare in the
-            // haystack, then it'd be worth using it. How to tune this... IDK.
-            // ---AG
-            return Matcher::Empty;
-        }
-        if sset.complete {
-            return Matcher::Bytes(sset);
-        }
-        if lits.literals().len() == 1 {
-            let lit = lits.literals()[0].to_vec();
-            return Matcher::Single(SingleSearch::new(lit));
-        }
-        let is_aho_corasick_fast = sset.dense.len() == 1 && sset.all_ascii;
-        if is_teddy_128_available() && !is_aho_corasick_fast {
-            // Only try Teddy if Aho-Corasick can't use memchr on an ASCII
-            // byte. Also, in its current form, Teddy doesn't scale well to
-            // lots of literals.
-            //
-            // We impose the ASCII restriction since an alternation of
-            // non-ASCII string literals in the same language is likely to all
-            // start with the same byte. Even worse, the corpus being searched
-            // probably has a similar composition, which ends up completely
-            // negating the benefit of memchr.
-            const MAX_TEDDY_LITERALS: usize = 32;
-            if lits.literals().len() <= MAX_TEDDY_LITERALS {
-                if let Some(ted) = Teddy::new(lits) {
-                    return Matcher::Teddy128(ted);
-                }
-            }
-            // Fallthrough to ol' reliable Aho-Corasick...
-        }
-        let pats = lits.literals().to_owned();
-        Matcher::AC(AcAutomaton::new(pats).into_full())
-    }
-}
-
-pub enum LiteralIter<'a> {
-    Empty,
-    Bytes(&'a [u8]),
-    Single(&'a [u8]),
-    AC(&'a [syntax::Lit]),
-    Teddy128(&'a [Vec<u8>]),
-}
-
-impl<'a> Iterator for LiteralIter<'a> {
-    type Item = &'a [u8];
-
-    fn next(&mut self) -> Option<Self::Item> {
-        match *self {
-            LiteralIter::Empty => None,
-            LiteralIter::Bytes(ref mut many) => {
-                if many.is_empty() {
-                    None
-                } else {
-                    let next = &many[0..1];
-                    *many = &many[1..];
-                    Some(next)
-                }
-            }
-            LiteralIter::Single(ref mut one) => {
-                if one.is_empty() {
-                    None
-                } else {
-                    let next = &one[..];
-                    *one = &[];
-                    Some(next)
-                }
-            }
-            LiteralIter::AC(ref mut lits) => {
-                if lits.is_empty() {
-                    None
-                } else {
-                    let next = &lits[0];
-                    *lits = &lits[1..];
-                    Some(&**next)
-                }
-            }
-            LiteralIter::Teddy128(ref mut lits) => {
-                if lits.is_empty() {
-                    None
-                } else {
-                    let next = &lits[0];
-                    *lits = &lits[1..];
-                    Some(&**next)
-                }
-            }
-        }
-    }
-}
-
-#[derive(Clone, Debug)]
-struct SingleByteSet {
-    sparse: Vec<bool>,
-    dense: Vec<u8>,
-    complete: bool,
-    all_ascii: bool,
-}
-
-impl SingleByteSet {
-    fn new() -> SingleByteSet {
-        SingleByteSet {
-            sparse: vec![false; 256],
-            dense: vec![],
-            complete: true,
-            all_ascii: true,
-        }
-    }
-
-    fn prefixes(lits: &syntax::Literals) -> SingleByteSet {
-        let mut sset = SingleByteSet::new();
-        for lit in lits.literals() {
-            sset.complete = sset.complete && lit.len() == 1;
-            if let Some(&b) = lit.get(0) {
-                if !sset.sparse[b as usize] {
-                    if b > 0x7F {
-                        sset.all_ascii = false;
-                    }
-                    sset.dense.push(b);
-                    sset.sparse[b as usize] = true;
-                }
-            }
-        }
-        sset
-    }
-
-    fn suffixes(lits: &syntax::Literals) -> SingleByteSet {
-        let mut sset = SingleByteSet::new();
-        for lit in lits.literals() {
-            sset.complete = sset.complete && lit.len() == 1;
-            if let Some(&b) = lit.get(lit.len().checked_sub(1).unwrap()) {
-                if !sset.sparse[b as usize] {
-                    if b > 0x7F {
-                        sset.all_ascii = false;
-                    }
-                    sset.dense.push(b);
-                    sset.sparse[b as usize] = true;
-                }
-            }
-        }
-        sset
-    }
-
-    /// Faster find that special cases certain sizes to use memchr.
-    #[inline(always)] // reduces constant overhead
-    fn find(&self, text: &[u8]) -> Option<usize> {
-        match self.dense.len() {
-            0 => None,
-            1 => memchr(self.dense[0], text),
-            2 => memchr2(self.dense[0], self.dense[1], text),
-            3 => memchr3(self.dense[0], self.dense[1], self.dense[2], text),
-            _ => self._find(text),
-        }
-    }
-
-    /// Generic find that works on any sized set.
-    fn _find(&self, haystack: &[u8]) -> Option<usize> {
-        for (i, &b) in haystack.iter().enumerate() {
-            if self.sparse[b as usize] {
-                return Some(i);
-            }
-        }
-        None
-    }
-
-    fn approximate_size(&self) -> usize {
-        (self.dense.len() * mem::size_of::<u8>())
-        + (self.sparse.len() * mem::size_of::<bool>())
-    }
-}
-
-/// Provides an implementation of fast subtring search.
-///
-/// This particular implementation is a Boyer-Moore variant, based on the
-/// "tuned boyer moore" search from (Hume & Sunday, 1991). It has been tweaked
-/// slightly to better use memchr.
-///
-/// memchr is so fast that we do everything we can to keep the loop in memchr
-/// for as long as possible. The easiest way to do this is to intelligently
-/// pick the byte to send to memchr. The best byte is the byte that occurs
-/// least frequently in the haystack. Since doing frequency analysis on the
-/// haystack is far too expensive, we compute a set of fixed frequencies up
-/// front and hard code them in src/freqs.rs. Frequency analysis is done via
-/// scripts/frequencies.py.
-///
-/// TODO(burntsushi): Add some amount of shifting to this.
-#[derive(Clone, Debug)]
-pub struct SingleSearch {
-    /// The pattern.
-    pat: Vec<u8>,
-    /// The number of Unicode characters in the pattern. This is useful for
-    /// determining the effective length of a pattern when deciding which
-    /// optimizations to perform. A trailing incomplete UTF-8 sequence counts
-    /// as one character.
-    char_len: usize,
-    /// The rarest byte in the pattern, according to pre-computed frequency
-    /// analysis.
-    rare1: u8,
-    /// The offset of the rarest byte in `pat`.
-    rare1i: usize,
-    /// The second rarest byte in the pattern, according to pre-computed
-    /// frequency analysis. (This may be equivalent to the rarest byte.)
-    ///
-    /// The second rarest byte is used as a type of guard for quickly detecting
-    /// a mismatch after memchr locates an instance of the rarest byte. This
-    /// is a hedge against pathological cases where the pre-computed frequency
-    /// analysis may be off. (But of course, does not prevent *all*
-    /// pathological cases.)
-    rare2: u8,
-    /// The offset of the second rarest byte in `pat`.
-    rare2i: usize,
-}
-
-impl SingleSearch {
-    fn new(pat: Vec<u8>) -> SingleSearch {
-        fn freq_rank(b: u8) -> usize { BYTE_FREQUENCIES[b as usize] as usize }
-
-        if pat.is_empty() {
-            return SingleSearch::empty();
-        }
-
-        // Find the rarest two bytes. Try to make them distinct (but it's not
-        // required).
-        let mut rare1 = pat[0];
-        let mut rare2 = pat[0];
-        for b in pat[1..].iter().cloned() {
-            if freq_rank(b) < freq_rank(rare1) {
-                rare1 = b;
-            }
-        }
-        for &b in &pat {
-            if rare1 == rare2 {
-                rare2 = b
-            } else if b != rare1 && freq_rank(b) < freq_rank(rare2) {
-                rare2 = b;
-            }
-        }
-
-        // And find the offsets of their last occurrences.
-        let rare1i = pat.iter().rposition(|&b| b == rare1).unwrap();
-        let rare2i = pat.iter().rposition(|&b| b == rare2).unwrap();
-
-        let char_len = char_len_lossy(&pat);
-        SingleSearch {
-            pat: pat,
-            char_len: char_len,
-            rare1: rare1,
-            rare1i: rare1i,
-            rare2: rare2,
-            rare2i: rare2i,
-        }
-    }
-
-    fn empty() -> SingleSearch {
-        SingleSearch {
-            pat: vec![],
-            char_len: 0,
-            rare1: 0,
-            rare1i: 0,
-            rare2: 0,
-            rare2i: 0,
-        }
-    }
-
-    #[inline(always)] // reduces constant overhead
-    pub fn find(&self, haystack: &[u8]) -> Option<usize> {
-        let pat = &*self.pat;
-        if haystack.len() < pat.len() || pat.is_empty() {
-            return None;
-        }
-        let mut i = self.rare1i;
-        while i < haystack.len() {
-            i += match memchr(self.rare1, &haystack[i..]) {
-                None => return None,
-                Some(i) => i,
-            };
-            let start = i - self.rare1i;
-            let end = start + pat.len();
-            if end > haystack.len() {
-                return None;
-            }
-            let aligned = &haystack[start..end];
-            if aligned[self.rare2i] == self.rare2 && aligned == &*self.pat {
-                return Some(start);
-            }
-            i += 1;
-        }
-        None
-    }
-
-    #[inline(always)] // reduces constant overhead
-    pub fn is_suffix(&self, text: &[u8]) -> bool {
-        if text.len() < self.len() {
-            return false;
-        }
-        &text[text.len() - self.len()..] == &*self.pat
-    }
-
-    pub fn len(&self) -> usize {
-        self.pat.len()
-    }
-
-    pub fn char_len(&self) -> usize {
-        self.char_len
-    }
-
-    fn approximate_size(&self) -> usize {
-        self.pat.len() * mem::size_of::<u8>()
-    }
-}
-
-fn char_len_lossy(bytes: &[u8]) -> usize {
-    String::from_utf8_lossy(bytes).chars().count()
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/pattern.rs
+++ /dev/null
@@ -1,62 +0,0 @@
-use std::str::pattern::{Pattern, Searcher, SearchStep};
-
-use re_unicode::{Regex, Matches};
-
-pub struct RegexSearcher<'r, 't> {
-    haystack: &'t str,
-    it: Matches<'r, 't>,
-    last_step_end: usize,
-    next_match: Option<(usize, usize)>,
-}
-
-impl<'r, 't> Pattern<'t> for &'r Regex {
-    type Searcher = RegexSearcher<'r, 't>;
-
-    fn into_searcher(self, haystack: &'t str) -> RegexSearcher<'r, 't> {
-        RegexSearcher {
-            haystack: haystack,
-            it: self.find_iter(haystack),
-            last_step_end: 0,
-            next_match: None,
-        }
-    }
-}
-
-unsafe impl<'r, 't> Searcher<'t> for RegexSearcher<'r, 't> {
-    #[inline]
-    fn haystack(&self) -> &'t str {
-        self.haystack
-    }
-
-    #[inline]
-    fn next(&mut self) -> SearchStep {
-        if let Some((s, e)) = self.next_match {
-            self.next_match = None;
-            self.last_step_end = e;
-            return SearchStep::Match(s, e);
-        }
-        match self.it.next() {
-            None => {
-                if self.last_step_end < self.haystack().len() {
-                    let last = self.last_step_end;
-                    self.last_step_end = self.haystack().len();
-                    SearchStep::Reject(last, self.haystack().len())
-                } else {
-                    SearchStep::Done
-                }
-            }
-            Some(m) => {
-                let (s, e) = (m.start(), m.end());
-                if s == self.last_step_end {
-                    self.last_step_end = e;
-                    SearchStep::Match(s, e)
-                } else {
-                    self.next_match = Some((s, e));
-                    let last = self.last_step_end;
-                    self.last_step_end = s;
-                    SearchStep::Reject(last, s)
-                }
-            }
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/pikevm.rs
+++ /dev/null
@@ -1,377 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// This module implements the Pike VM. That is, it guarantees linear time
-// search of a regex on any text with memory use proportional to the size of
-// the regex.
-//
-// It is equal in power to the backtracking engine in this crate, except the
-// backtracking engine is typically faster on small regexes/texts at the
-// expense of a bigger memory footprint.
-//
-// It can do more than the DFA can (specifically, record capture locations
-// and execute Unicode word boundary assertions), but at a slower speed.
-// Specifically, the Pike VM exectues a DFA implicitly by repeatedly expanding
-// epsilon transitions. That is, the Pike VM engine can be in multiple states
-// at once where as the DFA is only ever in one state at a time.
-//
-// Therefore, the Pike VM is generally treated as the fallback when the other
-// matching engines either aren't feasible to run or are insufficient.
-
-use std::mem;
-
-use exec::ProgramCache;
-use input::{Input, InputAt};
-use prog::{Program, InstPtr};
-use re_trait::Slot;
-use sparse::SparseSet;
-
-/// An NFA simulation matching engine.
-#[derive(Debug)]
-pub struct Fsm<'r, I> {
-    /// The sequence of opcodes (among other things) that is actually executed.
-    ///
-    /// The program may be byte oriented or Unicode codepoint oriented.
-    prog: &'r Program,
-    /// An explicit stack used for following epsilon transitions. (This is
-    /// borrowed from the cache.)
-    stack: &'r mut Vec<FollowEpsilon>,
-    /// The input to search.
-    input: I,
-}
-
-/// A cached allocation that can be reused on each execution.
-#[derive(Clone, Debug)]
-pub struct Cache {
-    /// A pair of ordered sets for tracking NFA states.
-    clist: Threads,
-    nlist: Threads,
-    /// An explicit stack used for following epsilon transitions.
-    stack: Vec<FollowEpsilon>,
-}
-
-/// An ordered set of NFA states and their captures.
-#[derive(Clone, Debug)]
-struct Threads {
-    /// An ordered set of opcodes (each opcode is an NFA state).
-    set: SparseSet,
-    /// Captures for every NFA state.
-    ///
-    /// It is stored in row-major order, where the columns are the capture
-    /// slots and the rows are the states.
-    caps: Vec<Slot>,
-    /// The number of capture slots stored per thread. (Every capture has
-    /// two slots.)
-    slots_per_thread: usize,
-}
-
-/// A representation of an explicit stack frame when following epsilon
-/// transitions. This is used to avoid recursion.
-#[derive(Clone, Debug)]
-enum FollowEpsilon {
-    /// Follow transitions at the given instruction pointer.
-    IP(InstPtr),
-    /// Restore the capture slot with the given position in the input.
-    Capture { slot: usize, pos: Slot },
-}
-
-impl Cache {
-    /// Create a new allocation used by the NFA machine to record execution
-    /// and captures.
-    pub fn new(_prog: &Program) -> Self {
-        Cache {
-            clist: Threads::new(),
-            nlist: Threads::new(),
-            stack: vec![],
-        }
-    }
-}
-
-impl<'r, I: Input> Fsm<'r, I> {
-    /// Execute the NFA matching engine.
-    ///
-    /// If there's a match, `exec` returns `true` and populates the given
-    /// captures accordingly.
-    pub fn exec(
-        prog: &'r Program,
-        cache: &ProgramCache,
-        matches: &mut [bool],
-        slots: &mut [Slot],
-        quit_after_match: bool,
-        input: I,
-        start: usize,
-    ) -> bool {
-        let mut cache = cache.borrow_mut();
-        let mut cache = &mut cache.pikevm;
-        cache.clist.resize(prog.len(), prog.captures.len());
-        cache.nlist.resize(prog.len(), prog.captures.len());
-        let at = input.at(start);
-        Fsm {
-            prog: prog,
-            stack: &mut cache.stack,
-            input: input,
-        }.exec_(
-            &mut cache.clist,
-            &mut cache.nlist,
-            matches,
-            slots,
-            quit_after_match,
-            at,
-        )
-    }
-
-    fn exec_(
-        &mut self,
-        mut clist: &mut Threads,
-        mut nlist: &mut Threads,
-        matches: &mut [bool],
-        slots: &mut [Slot],
-        quit_after_match: bool,
-        mut at: InputAt,
-    ) -> bool {
-        let mut matched = false;
-        let mut all_matched = false;
-        clist.set.clear();
-        nlist.set.clear();
-'LOOP:  loop {
-            if clist.set.is_empty() {
-                // Three ways to bail out when our current set of threads is
-                // empty.
-                //
-                // 1. We have a match---so we're done exploring any possible
-                //    alternatives. Time to quit. (We can't do this if we're
-                //    looking for matches for multiple regexes, unless we know
-                //    they all matched.)
-                //
-                // 2. If the expression starts with a '^' we can terminate as
-                //    soon as the last thread dies.
-                if (matched && matches.len() <= 1)
-                    || all_matched
-                    || (!at.is_start() && self.prog.is_anchored_start) {
-                    break;
-                }
-
-                // 3. If there's a literal prefix for the program, try to
-                //    jump ahead quickly. If it can't be found, then we can
-                //    bail out early.
-                if !self.prog.prefixes.is_empty() {
-                    at = match self.input.prefix_at(&self.prog.prefixes, at) {
-                        None => break,
-                        Some(at) => at,
-                    };
-                }
-            }
-
-            // This simulates a preceding '.*?' for every regex by adding
-            // a state starting at the current position in the input for the
-            // beginning of the program only if we don't already have a match.
-            if clist.set.is_empty()
-                || (!self.prog.is_anchored_start && !all_matched) {
-                self.add(&mut clist, slots, 0, at);
-            }
-            // The previous call to "add" actually inspects the position just
-            // before the current character. For stepping through the machine,
-            // we can to look at the current character, so we advance the
-            // input.
-            let at_next = self.input.at(at.next_pos());
-            for i in 0..clist.set.len() {
-                let ip = clist.set[i];
-                if self.step(
-                    &mut nlist,
-                    matches,
-                    slots,
-                    clist.caps(ip),
-                    ip,
-                    at,
-                    at_next,
-                ) {
-                    matched = true;
-                    all_matched = all_matched || matches.iter().all(|&b| b);
-                    if quit_after_match {
-                        // If we only care if a match occurs (not its
-                        // position), then we can quit right now.
-                        break 'LOOP;
-                    }
-                    if self.prog.matches.len() == 1 {
-                        // We don't need to check the rest of the threads
-                        // in this set because we've matched something
-                        // ("leftmost-first"). However, we still need to check
-                        // threads in the next set to support things like
-                        // greedy matching.
-                        //
-                        // This is only true on normal regexes. For regex sets,
-                        // we need to mush on to observe other matches.
-                        break;
-                    }
-                }
-            }
-            if at.is_end() {
-                break;
-            }
-            at = at_next;
-            mem::swap(clist, nlist);
-            nlist.set.clear();
-        }
-        matched
-    }
-
-    /// Step through the input, one token (byte or codepoint) at a time.
-    ///
-    /// nlist is the set of states that will be processed on the next token
-    /// in the input.
-    ///
-    /// caps is the set of captures passed by the caller of the NFA. They are
-    /// written to only when a match state is visited.
-    ///
-    /// thread_caps is the set of captures set for the current NFA state, ip.
-    ///
-    /// at and at_next are the current and next positions in the input. at or
-    /// at_next may be EOF.
-    fn step(
-        &mut self,
-        nlist: &mut Threads,
-        matches: &mut [bool],
-        slots: &mut [Slot],
-        thread_caps: &mut [Option<usize>],
-        ip: usize,
-        at: InputAt,
-        at_next: InputAt,
-    ) -> bool {
-        use prog::Inst::*;
-        match self.prog[ip] {
-            Match(match_slot) => {
-                if match_slot < matches.len() {
-                    matches[match_slot] = true;
-                }
-                for (slot, val) in slots.iter_mut().zip(thread_caps.iter()) {
-                    *slot = *val;
-                }
-                true
-            }
-            Char(ref inst) => {
-                if inst.c == at.char() {
-                    self.add(nlist, thread_caps, inst.goto, at_next);
-                }
-                false
-            }
-            Ranges(ref inst) => {
-                if inst.matches(at.char()) {
-                    self.add(nlist, thread_caps, inst.goto, at_next);
-                }
-                false
-            }
-            Bytes(ref inst) => {
-                if let Some(b) = at.byte() {
-                    if inst.matches(b) {
-                        self.add(nlist, thread_caps, inst.goto, at_next);
-                    }
-                }
-                false
-            }
-            EmptyLook(_) | Save(_) | Split(_) => false,
-        }
-    }
-
-    /// Follows epsilon transitions and adds them for processing to nlist,
-    /// starting at and including ip.
-    fn add(
-        &mut self,
-        nlist: &mut Threads,
-        thread_caps: &mut [Option<usize>],
-        ip: usize,
-        at: InputAt,
-    ) {
-        self.stack.push(FollowEpsilon::IP(ip));
-        while let Some(frame) = self.stack.pop() {
-            match frame {
-                FollowEpsilon::IP(ip) => {
-                    self.add_step(nlist, thread_caps, ip, at);
-                }
-                FollowEpsilon::Capture { slot, pos } => {
-                    thread_caps[slot] = pos;
-                }
-            }
-        }
-    }
-
-    /// A helper function for add that avoids excessive pushing to the stack.
-    fn add_step(
-        &mut self,
-        nlist: &mut Threads,
-        thread_caps: &mut [Option<usize>],
-        mut ip: usize,
-        at: InputAt,
-    ) {
-        // Instead of pushing and popping to the stack, we mutate ip as we
-        // traverse the set of states. We only push to the stack when we
-        // absolutely need recursion (restoring captures or following a
-        // branch).
-        use prog::Inst::*;
-        loop {
-            // Don't visit states we've already added.
-            if nlist.set.contains(ip) {
-                return;
-            }
-            nlist.set.insert(ip);
-            match self.prog[ip] {
-                EmptyLook(ref inst) => {
-                    if self.input.is_empty_match(at, inst) {
-                        ip = inst.goto;
-                    }
-                }
-                Save(ref inst) => {
-                    if inst.slot < thread_caps.len() {
-                        self.stack.push(FollowEpsilon::Capture {
-                            slot: inst.slot,
-                            pos: thread_caps[inst.slot],
-                        });
-                        thread_caps[inst.slot] = Some(at.pos());
-                    }
-                    ip = inst.goto;
-                }
-                Split(ref inst) => {
-                    self.stack.push(FollowEpsilon::IP(inst.goto2));
-                    ip = inst.goto1;
-                }
-                Match(_) | Char(_) | Ranges(_) | Bytes(_) => {
-                    let mut t = &mut nlist.caps(ip);
-                    for (slot, val) in t.iter_mut().zip(thread_caps.iter()) {
-                        *slot = *val;
-                    }
-                    return;
-                }
-            }
-        }
-    }
-}
-
-impl Threads {
-    fn new() -> Self {
-        Threads {
-            set: SparseSet::new(0),
-            caps: vec![],
-            slots_per_thread: 0,
-        }
-    }
-
-    fn resize(&mut self, num_insts: usize, ncaps: usize) {
-        if num_insts == self.set.capacity() {
-            return;
-        }
-        self.slots_per_thread = ncaps * 2;
-        self.set = SparseSet::new(num_insts);
-        self.caps = vec![None; self.slots_per_thread * num_insts];
-    }
-
-    fn caps(&mut self, pc: usize) -> &mut [Option<usize>] {
-        let i = pc * self.slots_per_thread;
-        &mut self.caps[i..i + self.slots_per_thread]
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/prog.rs
+++ /dev/null
@@ -1,426 +0,0 @@
-use std::collections::HashMap;
-use std::cmp::Ordering;
-use std::fmt;
-use std::ops::Deref;
-use std::mem;
-use std::slice;
-use std::sync::Arc;
-
-use input::Char;
-use literals::LiteralSearcher;
-
-/// InstPtr represents the index of an instruction in a regex program.
-pub type InstPtr = usize;
-
-/// Program is a sequence of instructions and various facts about thos
-/// instructions.
-#[derive(Clone)]
-pub struct Program {
-    /// A sequence of instructions that represents an NFA.
-    pub insts: Vec<Inst>,
-    /// Pointers to each Match instruction in the sequence.
-    ///
-    /// This is always length 1 unless this program represents a regex set.
-    pub matches: Vec<InstPtr>,
-    /// The ordered sequence of all capture groups extracted from the AST.
-    /// Unnamed groups are `None`.
-    pub captures: Vec<Option<String>>,
-    /// Pointers to all named capture groups into `captures`.
-    pub capture_name_idx: Arc<HashMap<String, usize>>,
-    /// A pointer to the start instruction. This can vary depending on how
-    /// the program was compiled. For example, programs for use with the DFA
-    /// engine have a `.*?` inserted at the beginning of unanchored regular
-    /// expressions. The actual starting point of the program is after the
-    /// `.*?`.
-    pub start: InstPtr,
-    /// A set of equivalence classes for discriminating bytes in the compiled
-    /// program.
-    pub byte_classes: Vec<u8>,
-    /// When true, this program can only match valid UTF-8.
-    pub only_utf8: bool,
-    /// When true, this program uses byte range instructions instead of Unicode
-    /// range instructions.
-    pub is_bytes: bool,
-    /// When true, the program is compiled for DFA matching. For example, this
-    /// implies `is_bytes` and also inserts a preceding `.*?` for unanchored
-    /// regexes.
-    pub is_dfa: bool,
-    /// When true, the program matches text in reverse (for use only in the
-    /// DFA).
-    pub is_reverse: bool,
-    /// Whether the regex must match from the start of the input.
-    pub is_anchored_start: bool,
-    /// Whether the regex must match at the end of the input.
-    pub is_anchored_end: bool,
-    /// Whether this program contains a Unicode word boundary instruction.
-    pub has_unicode_word_boundary: bool,
-    /// A possibly empty machine for very quickly matching prefix literals.
-    pub prefixes: LiteralSearcher,
-    /// A limit on the size of the cache that the DFA is allowed to use while
-    /// matching.
-    ///
-    /// The cache limit specifies approximately how much space we're willing to
-    /// give to the state cache. Once the state cache exceeds the size, it is
-    /// wiped and all states must be re-computed.
-    ///
-    /// Note that this value does not impact correctness. It can be set to 0
-    /// and the DFA will run just fine. (It will only ever store exactly one
-    /// state in the cache, and will likely run very slowly, but it will work.)
-    ///
-    /// Also note that this limit is *per thread of execution*. That is,
-    /// if the same regex is used to search text across multiple threads
-    /// simultaneously, then the DFA cache is not shared. Instead, copies are
-    /// made.
-    pub dfa_size_limit: usize,
-}
-
-impl Program {
-    /// Creates an empty instruction sequence. Fields are given default
-    /// values.
-    pub fn new() -> Self {
-        Program {
-            insts: vec![],
-            matches: vec![],
-            captures: vec![],
-            capture_name_idx: Arc::new(HashMap::new()),
-            start: 0,
-            byte_classes: vec![0; 256],
-            only_utf8: true,
-            is_bytes: false,
-            is_dfa: false,
-            is_reverse: false,
-            is_anchored_start: false,
-            is_anchored_end: false,
-            has_unicode_word_boundary: false,
-            prefixes: LiteralSearcher::empty(),
-            dfa_size_limit: 2 * (1<<20),
-        }
-    }
-
-    /// If pc is an index to a no-op instruction (like Save), then return the
-    /// next pc that is not a no-op instruction.
-    pub fn skip(&self, mut pc: usize) -> usize {
-        loop {
-            match self[pc] {
-                Inst::Save(ref i) => pc = i.goto,
-                _ => return pc,
-            }
-        }
-    }
-
-    /// Return true if and only if an execution engine at instruction `pc` will
-    /// always lead to a match.
-    pub fn leads_to_match(&self, pc: usize) -> bool {
-        if self.matches.len() > 1 {
-            // If we have a regex set, then we have more than one ending
-            // state, so leading to one of those states is generally
-            // meaningless.
-            return false;
-        }
-        match self[self.skip(pc)] {
-            Inst::Match(_) => true,
-            _ => false,
-        }
-    }
-
-    /// Returns true if the current configuration demands that an implicit
-    /// `.*?` be prepended to the instruction sequence.
-    pub fn needs_dotstar(&self) -> bool {
-        self.is_dfa && !self.is_reverse && !self.is_anchored_start
-    }
-
-    /// Returns true if this program uses Byte instructions instead of
-    /// Char/Range instructions.
-    pub fn uses_bytes(&self) -> bool {
-        self.is_bytes || self.is_dfa
-    }
-
-    /// Returns true if this program exclusively matches valid UTF-8 bytes.
-    ///
-    /// That is, if an invalid UTF-8 byte is seen, then no match is possible.
-    pub fn only_utf8(&self) -> bool {
-        self.only_utf8
-    }
-
-    /// Return the approximate heap usage of this instruction sequence in
-    /// bytes.
-    pub fn approximate_size(&self) -> usize {
-        // The only instruction that uses heap space is Ranges (for
-        // Unicode codepoint programs) to store non-overlapping codepoint
-        // ranges. To keep this operation constant time, we ignore them.
-        (self.len() * mem::size_of::<Inst>())
-        + (self.matches.len() * mem::size_of::<InstPtr>())
-        + (self.captures.len() * mem::size_of::<Option<String>>())
-        + (self.capture_name_idx.len() *
-           (mem::size_of::<String>() + mem::size_of::<usize>()))
-        + (self.byte_classes.len() * mem::size_of::<u8>())
-        + self.prefixes.approximate_size()
-    }
-}
-
-impl Deref for Program {
-    type Target = [Inst];
-
-    fn deref(&self) -> &Self::Target {
-        &*self.insts
-    }
-}
-
-impl fmt::Debug for Program {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        use self::Inst::*;
-
-        fn with_goto(cur: usize, goto: usize, fmtd: String) -> String {
-            if goto == cur + 1 {
-                fmtd
-            } else {
-                format!("{} (goto: {})", fmtd, goto)
-            }
-        }
-
-        fn visible_byte(b: u8) -> String {
-            use std::ascii::escape_default;
-            let escaped = escape_default(b).collect::<Vec<u8>>();
-            String::from_utf8_lossy(&escaped).into_owned()
-        }
-
-        for (pc, inst) in self.iter().enumerate() {
-            match *inst {
-                Match(slot) => {
-                    try!(write!(f, "{:04} Match({:?})", pc, slot))
-                }
-                Save(ref inst) => {
-                    let s = format!("{:04} Save({})", pc, inst.slot);
-                    try!(write!(f, "{}", with_goto(pc, inst.goto, s)));
-                }
-                Split(ref inst) => {
-                    try!(write!(f, "{:04} Split({}, {})",
-                                pc, inst.goto1, inst.goto2));
-                }
-                EmptyLook(ref inst) => {
-                    let s = format!("{:?}", inst.look);
-                    try!(write!(f, "{:04} {}",
-                                pc, with_goto(pc, inst.goto, s)));
-                }
-                Char(ref inst) => {
-                    let s = format!("{:?}", inst.c);
-                    try!(write!(f, "{:04} {}",
-                                pc, with_goto(pc, inst.goto, s)));
-                }
-                Ranges(ref inst) => {
-                    let ranges = inst.ranges
-                        .iter()
-                        .map(|r| format!("{:?}-{:?}", r.0, r.1))
-                        .collect::<Vec<String>>()
-                        .join(", ");
-                    let s = format!("{}", ranges);
-                    try!(write!(f, "{:04} {}",
-                                pc, with_goto(pc, inst.goto, s)));
-                }
-                Bytes(ref inst) => {
-                    let s = format!(
-                        "Bytes({}, {})",
-                        visible_byte(inst.start),
-                        visible_byte(inst.end));
-                    try!(write!(f, "{:04} {}",
-                                pc, with_goto(pc, inst.goto, s)));
-                }
-            }
-            if pc == self.start {
-                try!(write!(f, " (start)"));
-            }
-            try!(write!(f, "\n"));
-        }
-        Ok(())
-    }
-}
-
-impl<'a> IntoIterator for &'a Program {
-    type Item = &'a Inst;
-    type IntoIter = slice::Iter<'a, Inst>;
-    fn into_iter(self) -> Self::IntoIter { self.iter() }
-}
-
-/// Inst is an instruction code in a Regex program.
-///
-/// Regrettably, a regex program either contains Unicode codepoint
-/// instructions (Char and Ranges) or it contains byte instructions (Bytes).
-/// A regex program can never contain both.
-///
-/// It would be worth investigating splitting this into two distinct types and
-/// then figuring out how to make the matching engines polymorphic over those
-/// types without sacrificing performance.
-///
-/// Other than the benefit of moving invariants into the type system, another
-/// benefit is the decreased size. If we remove the `Char` and `Ranges`
-/// instructions from the `Inst` enum, then its size shrinks from 40 bytes to
-/// 24 bytes. (This is because of the removal of a `Vec` in the `Ranges`
-/// variant.) Given that byte based machines are typically much bigger than
-/// their Unicode analogues (because they can decode UTF-8 directly), this ends
-/// up being a pretty significant savings.
-#[derive(Clone, Debug)]
-pub enum Inst {
-    /// Match indicates that the program has reached a match state.
-    ///
-    /// The number in the match corresponds to the Nth logical regular
-    /// expression in this program. This index is always 0 for normal regex
-    /// programs. Values greater than 0 appear when compiling regex sets, and
-    /// each match instruction gets its own unique value. The value corresponds
-    /// to the Nth regex in the set.
-    Match(usize),
-    /// Save causes the program to save the current location of the input in
-    /// the slot indicated by InstSave.
-    Save(InstSave),
-    /// Split causes the program to diverge to one of two paths in the
-    /// program, preferring goto1 in InstSplit.
-    Split(InstSplit),
-    /// EmptyLook represents a zero-width assertion in a regex program. A
-    /// zero-width assertion does not consume any of the input text.
-    EmptyLook(InstEmptyLook),
-    /// Char requires the regex program to match the character in InstChar at
-    /// the current position in the input.
-    Char(InstChar),
-    /// Ranges requires the regex program to match the character at the current
-    /// position in the input with one of the ranges specified in InstRanges.
-    Ranges(InstRanges),
-    /// Bytes is like Ranges, except it expresses a single byte range. It is
-    /// used in conjunction with Split instructions to implement multi-byte
-    /// character classes.
-    Bytes(InstBytes),
-}
-
-impl Inst {
-    /// Returns true if and only if this is a match instruction.
-    pub fn is_match(&self) -> bool {
-        match *self {
-            Inst::Match(_) => true,
-            _ => false,
-        }
-    }
-}
-
-/// Representation of the Save instruction.
-#[derive(Clone, Debug)]
-pub struct InstSave {
-    /// The next location to execute in the program.
-    pub goto: InstPtr,
-    /// The capture slot (there are two slots for every capture in a regex,
-    /// including the zeroth capture for the entire match).
-    pub slot: usize,
-}
-
-/// Representation of the Split instruction.
-#[derive(Clone, Debug)]
-pub struct InstSplit {
-    /// The first instruction to try. A match resulting from following goto1
-    /// has precedence over a match resulting from following goto2.
-    pub goto1: InstPtr,
-    /// The second instruction to try. A match resulting from following goto1
-    /// has precedence over a match resulting from following goto2.
-    pub goto2: InstPtr,
-}
-
-/// Representation of the EmptyLook instruction.
-#[derive(Clone, Debug)]
-pub struct InstEmptyLook {
-    /// The next location to execute in the program if this instruction
-    /// succeeds.
-    pub goto: InstPtr,
-    /// The type of zero-width assertion to check.
-    pub look: EmptyLook,
-}
-
-/// The set of zero-width match instructions.
-#[derive(Clone, Copy, Debug, PartialEq, Eq)]
-pub enum EmptyLook {
-    /// Start of line or input.
-    StartLine,
-    /// End of line or input.
-    EndLine,
-    /// Start of input.
-    StartText,
-    /// End of input.
-    EndText,
-    /// Word character on one side and non-word character on other.
-    WordBoundary,
-    /// Word character on both sides or non-word character on both sides.
-    NotWordBoundary,
-    /// ASCII word boundary.
-    WordBoundaryAscii,
-    /// Not ASCII word boundary.
-    NotWordBoundaryAscii,
-}
-
-/// Representation of the Char instruction.
-#[derive(Clone, Debug)]
-pub struct InstChar {
-    /// The next location to execute in the program if this instruction
-    /// succeeds.
-    pub goto: InstPtr,
-    /// The character to test.
-    pub c: char,
-}
-
-/// Representation of the Ranges instruction.
-#[derive(Clone, Debug)]
-pub struct InstRanges {
-    /// The next location to execute in the program if this instruction
-    /// succeeds.
-    pub goto: InstPtr,
-    /// The set of Unicode scalar value ranges to test.
-    pub ranges: Vec<(char, char)>,
-}
-
-impl InstRanges {
-    /// Tests whether the given input character matches this instruction.
-    pub fn matches(&self, c: Char) -> bool {
-        // This speeds up the `match_class_unicode` benchmark by checking
-        // some common cases quickly without binary search. e.g., Matching
-        // a Unicode class on predominantly ASCII text.
-        for r in self.ranges.iter().take(4) {
-            if c < r.0 {
-                return false;
-            }
-            if c <= r.1 {
-                return true;
-            }
-        }
-        self.ranges.binary_search_by(|r| {
-            if r.1 < c {
-                Ordering::Less
-            } else if r.0 > c {
-                Ordering::Greater
-            } else {
-                Ordering::Equal
-            }
-        }).is_ok()
-    }
-
-    /// Return the number of distinct characters represented by all of the
-    /// ranges.
-    pub fn num_chars(&self) -> usize {
-        self.ranges.iter()
-            .map(|&(s, e)| 1 + (e as u32) - (s as u32))
-            .fold(0, |acc, len| acc + len)
-            as usize
-    }
-}
-
-/// Representation of the Bytes instruction.
-#[derive(Clone, Debug)]
-pub struct InstBytes {
-    /// The next location to execute in the program if this instruction
-    /// succeeds.
-    pub goto: InstPtr,
-    /// The start (inclusive) of this byte range.
-    pub start: u8,
-    /// The end (inclusive) of this byte range.
-    pub end: u8,
-}
-
-impl InstBytes {
-    /// Returns true if and only if the given byte is in this range.
-    pub fn matches(&self, byte: u8) -> bool {
-        self.start <= byte && byte <= self.end
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/re_builder.rs
+++ /dev/null
@@ -1,267 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-/// The set of user configurable options for compiling zero or more regexes.
-#[derive(Clone, Debug)]
-#[allow(missing_docs)]
-pub struct RegexOptions {
-    pub pats: Vec<String>,
-    pub size_limit: usize,
-    pub dfa_size_limit: usize,
-    pub case_insensitive: bool,
-    pub multi_line: bool,
-    pub dot_matches_new_line: bool,
-    pub swap_greed: bool,
-    pub ignore_whitespace: bool,
-    pub unicode: bool,
-}
-
-impl Default for RegexOptions {
-    fn default() -> Self {
-        RegexOptions {
-            pats: vec![],
-            size_limit: 10 * (1<<20),
-            dfa_size_limit: 2 * (1<<20),
-            case_insensitive: false,
-            multi_line: false,
-            dot_matches_new_line: false,
-            swap_greed: false,
-            ignore_whitespace: false,
-            unicode: true,
-        }
-    }
-}
-
-macro_rules! define_builder {
-    ($name:ident, $regex_mod:ident, $only_utf8:expr) => {
-        pub mod $name {
-            use error::Error;
-            use exec::ExecBuilder;
-            use super::RegexOptions;
-
-            use $regex_mod::Regex;
-
-/// A configurable builder for a regular expression.
-///
-/// A builder can be used to configure how the regex is built, for example, by
-/// setting the default flags (which can be overridden in the expression
-/// itself) or setting various limits.
-pub struct RegexBuilder(RegexOptions);
-
-impl RegexBuilder {
-    /// Create a new regular expression builder with the given pattern.
-    ///
-    /// If the pattern is invalid, then an error will be returned when
-    /// `compile` is called.
-    pub fn new(pattern: &str) -> RegexBuilder {
-        let mut builder = RegexBuilder(RegexOptions::default());
-        builder.0.pats.push(pattern.to_owned());
-        builder
-    }
-
-    /// Consume the builder and compile the regular expression.
-    ///
-    /// Note that calling `as_str` on the resulting `Regex` will produce the
-    /// pattern given to `new` verbatim. Notably, it will not incorporate any
-    /// of the flags set on this builder.
-    pub fn build(&self) -> Result<Regex, Error> {
-        ExecBuilder::new_options(self.0.clone())
-            .only_utf8($only_utf8)
-            .build()
-            .map(Regex::from)
-    }
-
-    /// Set the value for the case insensitive (`i`) flag.
-    pub fn case_insensitive(&mut self, yes: bool) -> &mut RegexBuilder {
-        self.0.case_insensitive = yes;
-        self
-    }
-
-    /// Set the value for the multi-line matching (`m`) flag.
-    pub fn multi_line(&mut self, yes: bool) -> &mut RegexBuilder {
-        self.0.multi_line = yes;
-        self
-    }
-
-    /// Set the value for the any character (`s`) flag, where in `.` matches
-    /// anything when `s` is set and matches anything except for new line when
-    /// it is not set (the default).
-    ///
-    /// N.B. "matches anything" means "any byte" for `regex::bytes::Regex`
-    /// expressions and means "any Unicode scalar value" for `regex::Regex`
-    /// expressions.
-    pub fn dot_matches_new_line(&mut self, yes: bool) -> &mut RegexBuilder {
-        self.0.dot_matches_new_line = yes;
-        self
-    }
-
-    /// Set the value for the greedy swap (`U`) flag.
-    pub fn swap_greed(&mut self, yes: bool) -> &mut RegexBuilder {
-        self.0.swap_greed = yes;
-        self
-    }
-
-    /// Set the value for the ignore whitespace (`x`) flag.
-    pub fn ignore_whitespace(&mut self, yes: bool) -> &mut RegexBuilder {
-        self.0.ignore_whitespace = yes;
-        self
-    }
-
-    /// Set the value for the Unicode (`u`) flag.
-    ///
-    /// For byte based regular expressions, this is disabled by default.
-    pub fn unicode(&mut self, yes: bool) -> &mut RegexBuilder {
-        self.0.unicode = yes;
-        self
-    }
-
-    /// Set the approximate size limit of the compiled regular expression.
-    ///
-    /// This roughly corresponds to the number of bytes occupied by a single
-    /// compiled program. If the program exceeds this number, then a
-    /// compilation error is returned.
-    pub fn size_limit(&mut self, limit: usize) -> &mut RegexBuilder {
-        self.0.size_limit = limit;
-        self
-    }
-
-    /// Set the approximate size of the cache used by the DFA.
-    ///
-    /// This roughly corresponds to the number of bytes that the DFA will
-    /// use while searching.
-    ///
-    /// Note that this is a *per thread* limit. There is no way to set a global
-    /// limit. In particular, if a regex is used from multiple threads
-    /// simulanteously, then each thread may use up to the number of bytes
-    /// specified here.
-    pub fn dfa_size_limit(&mut self, limit: usize) -> &mut RegexBuilder {
-        self.0.dfa_size_limit = limit;
-        self
-    }
-}
-        }
-    }
-}
-
-define_builder!(bytes, re_bytes, false);
-define_builder!(unicode, re_unicode, true);
-
-macro_rules! define_set_builder {
-    ($name:ident, $regex_mod:ident, $only_utf8:expr) => {
-        pub mod $name {
-            use error::Error;
-            use exec::ExecBuilder;
-            use super::RegexOptions;
-
-            use re_set::$regex_mod::RegexSet;
-
-/// A configurable builder for a set of regular expressions.
-///
-/// A builder can be used to configure how the regexes are built, for example,
-/// by setting the default flags (which can be overridden in the expression
-/// itself) or setting various limits.
-pub struct RegexSetBuilder(RegexOptions);
-
-impl RegexSetBuilder {
-    /// Create a new regular expression builder with the given pattern.
-    ///
-    /// If the pattern is invalid, then an error will be returned when
-    /// `compile` is called.
-    pub fn new<I, S>(patterns: I) -> RegexSetBuilder
-            where S: AsRef<str>, I: IntoIterator<Item=S> {
-        let mut builder = RegexSetBuilder(RegexOptions::default());
-        for pat in patterns {
-            builder.0.pats.push(pat.as_ref().to_owned());
-        }
-        builder
-    }
-
-    /// Consume the builder and compile the regular expressions into a set.
-    pub fn build(&self) -> Result<RegexSet, Error> {
-        ExecBuilder::new_options(self.0.clone())
-            .only_utf8($only_utf8)
-            .build()
-            .map(RegexSet::from)
-    }
-
-    /// Set the value for the case insensitive (`i`) flag.
-    pub fn case_insensitive(&mut self, yes: bool) -> &mut RegexSetBuilder {
-        self.0.case_insensitive = yes;
-        self
-    }
-
-    /// Set the value for the multi-line matching (`m`) flag.
-    pub fn multi_line(&mut self, yes: bool) -> &mut RegexSetBuilder {
-        self.0.multi_line = yes;
-        self
-    }
-
-    /// Set the value for the any character (`s`) flag, where in `.` matches
-    /// anything when `s` is set and matches anything except for new line when
-    /// it is not set (the default).
-    ///
-    /// N.B. "matches anything" means "any byte" for `regex::bytes::RegexSet`
-    /// expressions and means "any Unicode scalar value" for `regex::RegexSet`
-    /// expressions.
-    pub fn dot_matches_new_line(&mut self, yes: bool) -> &mut RegexSetBuilder {
-        self.0.dot_matches_new_line = yes;
-        self
-    }
-
-    /// Set the value for the greedy swap (`U`) flag.
-    pub fn swap_greed(&mut self, yes: bool) -> &mut RegexSetBuilder {
-        self.0.swap_greed = yes;
-        self
-    }
-
-    /// Set the value for the ignore whitespace (`x`) flag.
-    pub fn ignore_whitespace(&mut self, yes: bool) -> &mut RegexSetBuilder {
-        self.0.ignore_whitespace = yes;
-        self
-    }
-
-    /// Set the value for the Unicode (`u`) flag.
-    ///
-    /// For byte based regular expressions, this is disabled by default.
-    pub fn unicode(&mut self, yes: bool) -> &mut RegexSetBuilder {
-        self.0.unicode = yes;
-        self
-    }
-
-    /// Set the approximate size limit of the compiled regular expression.
-    ///
-    /// This roughly corresponds to the number of bytes occupied by a single
-    /// compiled program. If the program exceeds this number, then a
-    /// compilation error is returned.
-    pub fn size_limit(&mut self, limit: usize) -> &mut RegexSetBuilder {
-        self.0.size_limit = limit;
-        self
-    }
-
-    /// Set the approximate size of the cache used by the DFA.
-    ///
-    /// This roughly corresponds to the number of bytes that the DFA will
-    /// use while searching.
-    ///
-    /// Note that this is a *per thread* limit. There is no way to set a global
-    /// limit. In particular, if a regex is used from multiple threads
-    /// simulanteously, then each thread may use up to the number of bytes
-    /// specified here.
-    pub fn dfa_size_limit(&mut self, limit: usize) -> &mut RegexSetBuilder {
-        self.0.dfa_size_limit = limit;
-        self
-    }
-}
-        }
-    }
-}
-
-define_set_builder!(set_bytes, bytes, false);
-define_set_builder!(set_unicode, unicode, true);
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/re_bytes.rs
+++ /dev/null
@@ -1,1004 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::borrow::Cow;
-use std::collections::HashMap;
-use std::fmt;
-use std::ops::Index;
-use std::str::FromStr;
-use std::sync::Arc;
-
-use memchr::memchr;
-
-use exec::{Exec, ExecNoSync};
-use expand::expand_bytes;
-use error::Error;
-use re_builder::bytes::RegexBuilder;
-use re_trait::{self, RegularExpression, Locations, SubCapturesPosIter};
-
-/// Match represents a single match of a regex in a haystack.
-///
-/// The lifetime parameter `'t` refers to the lifetime of the matched text.
-#[derive(Copy, Clone, Debug, Eq, PartialEq)]
-pub struct Match<'t> {
-    text: &'t [u8],
-    start: usize,
-    end: usize,
-}
-
-impl<'t> Match<'t> {
-    /// Returns the starting byte offset of the match in the haystack.
-    #[inline]
-    pub fn start(&self) -> usize {
-        self.start
-    }
-
-    /// Returns the ending byte offset of the match in the haystack.
-    #[inline]
-    pub fn end(&self) -> usize {
-        self.end
-    }
-
-    /// Returns the matched text.
-    #[inline]
-    pub fn as_bytes(&self) -> &'t [u8] {
-        &self.text[self.start..self.end]
-    }
-
-    /// Creates a new match from the given haystack and byte offsets.
-    #[inline]
-    fn new(haystack: &'t [u8], start: usize, end: usize) -> Match<'t> {
-        Match {
-            text: haystack,
-            start: start,
-            end: end,
-        }
-    }
-}
-
-/// A compiled regular expression for matching arbitrary bytes.
-///
-/// It can be used to search, split or replace text. All searching is done with
-/// an implicit `.*?` at the beginning and end of an expression. To force an
-/// expression to match the whole string (or a prefix or a suffix), you must
-/// use an anchor like `^` or `$` (or `\A` and `\z`).
-///
-/// Like the `Regex` type in the parent module, matches with this regex return
-/// byte offsets into the search text. **Unlike** the parent `Regex` type,
-/// these byte offsets may not correspond to UTF-8 sequence boundaries since
-/// the regexes in this module can match arbitrary bytes.
-#[derive(Clone)]
-pub struct Regex(Exec);
-
-impl fmt::Display for Regex {
-    /// Shows the original regular expression.
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}", self.as_str())
-    }
-}
-
-impl fmt::Debug for Regex {
-    /// Shows the original regular expression.
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-/// A constructor for Regex from an Exec.
-///
-/// This is hidden because Exec isn't actually part of the public API.
-#[doc(hidden)]
-impl From<Exec> for Regex {
-    fn from(exec: Exec) -> Regex {
-        Regex(exec)
-    }
-}
-
-impl FromStr for Regex {
-    type Err = Error;
-
-    /// Attempts to parse a string into a regular expression
-    fn from_str(s: &str) -> Result<Regex, Error> {
-        Regex::new(s)
-    }
-}
-
-/// Core regular expression methods.
-impl Regex {
-    /// Compiles a regular expression. Once compiled, it can be used repeatedly
-    /// to search, split or replace text in a string.
-    ///
-    /// If an invalid expression is given, then an error is returned.
-    pub fn new(re: &str) -> Result<Regex, Error> {
-        RegexBuilder::new(re).build()
-    }
-
-    /// Returns true if and only if the regex matches the string given.
-    ///
-    /// It is recommended to use this method if all you need to do is test
-    /// a match, since the underlying matching engine may be able to do less
-    /// work.
-    ///
-    /// # Example
-    ///
-    /// Test if some text contains at least one word with exactly 13 ASCII word
-    /// bytes:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::bytes::Regex;
-    /// # fn main() {
-    /// let text = b"I categorically deny having triskaidekaphobia.";
-    /// assert!(Regex::new(r"\b\w{13}\b").unwrap().is_match(text));
-    /// # }
-    /// ```
-    pub fn is_match(&self, text: &[u8]) -> bool {
-        self.is_match_at(text, 0)
-    }
-
-    /// Returns the start and end byte range of the leftmost-first match in
-    /// `text`. If no match exists, then `None` is returned.
-    ///
-    /// Note that this should only be used if you want to discover the position
-    /// of the match. Testing the existence of a match is faster if you use
-    /// `is_match`.
-    ///
-    /// # Example
-    ///
-    /// Find the start and end location of the first word with exactly 13
-    /// ASCII word bytes:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::bytes::Regex;
-    /// # fn main() {
-    /// let text = b"I categorically deny having triskaidekaphobia.";
-    /// let mat = Regex::new(r"\b\w{13}\b").unwrap().find(text).unwrap();
-    /// assert_eq!((mat.start(), mat.end()), (2, 15));
-    /// # }
-    /// ```
-    pub fn find<'t>(&self, text: &'t [u8]) -> Option<Match<'t>> {
-        self.find_at(text, 0)
-    }
-
-    /// Returns an iterator for each successive non-overlapping match in
-    /// `text`, returning the start and end byte indices with respect to
-    /// `text`.
-    ///
-    /// # Example
-    ///
-    /// Find the start and end location of every word with exactly 13 ASCII
-    /// word bytes:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::bytes::Regex;
-    /// # fn main() {
-    /// let text = b"Retroactively relinquishing remunerations is reprehensible.";
-    /// for mat in Regex::new(r"\b\w{13}\b").unwrap().find_iter(text) {
-    ///     println!("{:?}", mat);
-    /// }
-    /// # }
-    /// ```
-    pub fn find_iter<'r, 't>(&'r self, text: &'t [u8]) -> Matches<'r, 't> {
-        Matches(self.0.searcher().find_iter(text))
-    }
-
-    /// Returns the capture groups corresponding to the leftmost-first
-    /// match in `text`. Capture group `0` always corresponds to the entire
-    /// match. If no match is found, then `None` is returned.
-    ///
-    /// You should only use `captures` if you need access to the location of
-    /// capturing group matches. Otherwise, `find` is faster for discovering
-    /// the location of the overall match.
-    ///
-    /// # Examples
-    ///
-    /// Say you have some text with movie names and their release years,
-    /// like "'Citizen Kane' (1941)". It'd be nice if we could search for text
-    /// looking like that, while also extracting the movie name and its release
-    /// year separately.
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::bytes::Regex;
-    /// # fn main() {
-    /// let re = Regex::new(r"'([^']+)'\s+\((\d{4})\)").unwrap();
-    /// let text = b"Not my favorite movie: 'Citizen Kane' (1941).";
-    /// let caps = re.captures(text).unwrap();
-    /// assert_eq!(&caps[1], &b"Citizen Kane"[..]);
-    /// assert_eq!(&caps[2], &b"1941"[..]);
-    /// assert_eq!(&caps[0], &b"'Citizen Kane' (1941)"[..]);
-    /// // You can also access the groups by index using the Index notation.
-    /// // Note that this will panic on an invalid index.
-    /// assert_eq!(&caps[1], b"Citizen Kane");
-    /// assert_eq!(&caps[2], b"1941");
-    /// assert_eq!(&caps[0], b"'Citizen Kane' (1941)");
-    /// # }
-    /// ```
-    ///
-    /// Note that the full match is at capture group `0`. Each subsequent
-    /// capture group is indexed by the order of its opening `(`.
-    ///
-    /// We can make this example a bit clearer by using *named* capture groups:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::bytes::Regex;
-    /// # fn main() {
-    /// let re = Regex::new(r"'(?P<title>[^']+)'\s+\((?P<year>\d{4})\)")
-    ///                .unwrap();
-    /// let text = b"Not my favorite movie: 'Citizen Kane' (1941).";
-    /// let caps = re.captures(text).unwrap();
-    /// assert_eq!(&caps["title"], &b"Citizen Kane"[..]);
-    /// assert_eq!(&caps["year"], &b"1941"[..]);
-    /// assert_eq!(&caps[0], &b"'Citizen Kane' (1941)"[..]);
-    /// // You can also access the groups by name using the Index notation.
-    /// // Note that this will panic on an invalid group name.
-    /// assert_eq!(&caps["title"], b"Citizen Kane");
-    /// assert_eq!(&caps["year"], b"1941");
-    /// assert_eq!(&caps[0], b"'Citizen Kane' (1941)");
-    ///
-    /// # }
-    /// ```
-    ///
-    /// Here we name the capture groups, which we can access with the `name`
-    /// method or the `Index` notation with a `&str`. Note that the named
-    /// capture groups are still accessible with `at` or the `Index` notation
-    /// with a `usize`.
-    ///
-    /// The `0`th capture group is always unnamed, so it must always be
-    /// accessed with `at(0)` or `[0]`.
-    pub fn captures<'t>(&self, text: &'t [u8]) -> Option<Captures<'t>> {
-        let mut locs = self.locations();
-        self.read_captures_at(&mut locs, text, 0).map(|_| Captures {
-            text: text,
-            locs: locs,
-            named_groups: self.0.capture_name_idx().clone(),
-        })
-    }
-
-    /// Returns an iterator over all the non-overlapping capture groups matched
-    /// in `text`. This is operationally the same as `find_iter`, except it
-    /// yields information about capturing group matches.
-    ///
-    /// # Example
-    ///
-    /// We can use this to find all movie titles and their release years in
-    /// some text, where the movie is formatted like "'Title' (xxxx)":
-    ///
-    /// ```rust
-    /// # extern crate regex; use std::str; use regex::bytes::Regex;
-    /// # fn main() {
-    /// let re = Regex::new(r"'(?P<title>[^']+)'\s+\((?P<year>\d{4})\)")
-    ///                .unwrap();
-    /// let text = b"'Citizen Kane' (1941), 'The Wizard of Oz' (1939), 'M' (1931).";
-    /// for caps in re.captures_iter(text) {
-    ///     let title = str::from_utf8(&caps["title"]).unwrap();
-    ///     let year = str::from_utf8(&caps["year"]).unwrap();
-    ///     println!("Movie: {:?}, Released: {:?}", title, year);
-    /// }
-    /// // Output:
-    /// // Movie: Citizen Kane, Released: 1941
-    /// // Movie: The Wizard of Oz, Released: 1939
-    /// // Movie: M, Released: 1931
-    /// # }
-    /// ```
-    pub fn captures_iter<'r, 't>(
-        &'r self,
-        text: &'t [u8],
-    ) -> CaptureMatches<'r, 't> {
-        CaptureMatches(self.0.searcher().captures_iter(text))
-    }
-
-    /// Returns an iterator of substrings of `text` delimited by a match of the
-    /// regular expression. Namely, each element of the iterator corresponds to
-    /// text that *isn't* matched by the regular expression.
-    ///
-    /// This method will *not* copy the text given.
-    ///
-    /// # Example
-    ///
-    /// To split a string delimited by arbitrary amounts of spaces or tabs:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::bytes::Regex;
-    /// # fn main() {
-    /// let re = Regex::new(r"[ \t]+").unwrap();
-    /// let fields: Vec<&[u8]> = re.split(b"a b \t  c\td    e").collect();
-    /// assert_eq!(fields, vec![
-    ///     &b"a"[..], &b"b"[..], &b"c"[..], &b"d"[..], &b"e"[..],
-    /// ]);
-    /// # }
-    /// ```
-    pub fn split<'r, 't>(&'r self, text: &'t [u8]) -> Split<'r, 't> {
-        Split {
-            finder: self.find_iter(text),
-            last: 0,
-        }
-    }
-
-    /// Returns an iterator of at most `limit` substrings of `text` delimited
-    /// by a match of the regular expression. (A `limit` of `0` will return no
-    /// substrings.) Namely, each element of the iterator corresponds to text
-    /// that *isn't* matched by the regular expression. The remainder of the
-    /// string that is not split will be the last element in the iterator.
-    ///
-    /// This method will *not* copy the text given.
-    ///
-    /// # Example
-    ///
-    /// Get the first two words in some text:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::bytes::Regex;
-    /// # fn main() {
-    /// let re = Regex::new(r"\W+").unwrap();
-    /// let fields: Vec<&[u8]> = re.splitn(b"Hey! How are you?", 3).collect();
-    /// assert_eq!(fields, vec![&b"Hey"[..], &b"How"[..], &b"are you?"[..]]);
-    /// # }
-    /// ```
-    pub fn splitn<'r, 't>(
-        &'r self,
-        text: &'t [u8],
-        limit: usize,
-    ) -> SplitN<'r, 't> {
-        SplitN {
-            splits: self.split(text),
-            n: limit,
-        }
-    }
-
-    /// Replaces the leftmost-first match with the replacement provided. The
-    /// replacement can be a regular byte string (where `$N` and `$name` are
-    /// expanded to match capture groups) or a function that takes the matches'
-    /// `Captures` and returns the replaced byte string.
-    ///
-    /// If no match is found, then a copy of the byte string is returned
-    /// unchanged.
-    ///
-    /// # Replacement string syntax
-    ///
-    /// All instances of `$name` in the replacement text is replaced with the
-    /// corresponding capture group `name`.
-    ///
-    /// `name` may be an integer corresponding to the index of the
-    /// capture group (counted by order of opening parenthesis where `0` is the
-    /// entire match) or it can be a name (consisting of letters, digits or
-    /// underscores) corresponding to a named capture group.
-    ///
-    /// If `name` isn't a valid capture group (whether the name doesn't exist
-    /// or isn't a valid index), then it is replaced with the empty string.
-    ///
-    /// The longest possible name is used. e.g., `$1a` looks up the capture
-    /// group named `1a` and not the capture group at index `1`. To exert more
-    /// precise control over the name, use braces, e.g., `${1}a`.
-    ///
-    /// To write a literal `$` use `$$`.
-    ///
-    /// # Examples
-    ///
-    /// Note that this function is polymorphic with respect to the replacement.
-    /// In typical usage, this can just be a normal byte string:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::bytes::Regex;
-    /// # fn main() {
-    /// let re = Regex::new("[^01]+").unwrap();
-    /// assert_eq!(re.replace(b"1078910", &b""[..]), &b"1010"[..]);
-    /// # }
-    /// ```
-    ///
-    /// But anything satisfying the `Replacer` trait will work. For example, a
-    /// closure of type `|&Captures| -> Vec<u8>` provides direct access to the
-    /// captures corresponding to a match. This allows one to access capturing
-    /// group matches easily:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::bytes::Regex;
-    /// # use regex::bytes::Captures; fn main() {
-    /// let re = Regex::new(r"([^,\s]+),\s+(\S+)").unwrap();
-    /// let result = re.replace(b"Springsteen, Bruce", |caps: &Captures| {
-    ///     let mut replacement = caps[2].to_owned();
-    ///     replacement.push(b' ');
-    ///     replacement.extend(&caps[1]);
-    ///     replacement
-    /// });
-    /// assert_eq!(result, &b"Bruce Springsteen"[..]);
-    /// # }
-    /// ```
-    ///
-    /// But this is a bit cumbersome to use all the time. Instead, a simple
-    /// syntax is supported that expands `$name` into the corresponding capture
-    /// group. Here's the last example, but using this expansion technique
-    /// with named capture groups:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::bytes::Regex;
-    /// # fn main() {
-    /// let re = Regex::new(r"(?P<last>[^,\s]+),\s+(?P<first>\S+)").unwrap();
-    /// let result = re.replace(b"Springsteen, Bruce", &b"$first $last"[..]);
-    /// assert_eq!(result, &b"Bruce Springsteen"[..]);
-    /// # }
-    /// ```
-    ///
-    /// Note that using `$2` instead of `$first` or `$1` instead of `$last`
-    /// would produce the same result. To write a literal `$` use `$$`.
-    ///
-    /// If `$name` isn't a valid capture group (whether the name doesn't exist
-    /// or isn't a valid index), then it is replaced with the empty string.
-    ///
-    /// The longest possible name is used. e.g., `$1a` looks up the capture
-    /// group named `1a` and not the capture group at index `1`. To exert more
-    /// precise control over the name, use braces, e.g., `${1}a`.
-    ///
-    /// Finally, sometimes you just want to replace a literal string with no
-    /// regard for capturing group expansion. This can be done by wrapping a
-    /// byte string with `NoExpand`:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::bytes::Regex;
-    /// # fn main() {
-    /// use regex::bytes::NoExpand;
-    ///
-    /// let re = Regex::new(r"(?P<last>[^,\s]+),\s+(\S+)").unwrap();
-    /// let result = re.replace(b"Springsteen, Bruce", NoExpand(b"$2 $last"));
-    /// assert_eq!(result, &b"$2 $last"[..]);
-    /// # }
-    /// ```
-    pub fn replace<'t, R: Replacer>(
-        &self,
-        text: &'t [u8],
-        rep: R,
-    ) -> Cow<'t, [u8]> {
-        self.replacen(text, 1, rep)
-    }
-
-    /// Replaces all non-overlapping matches in `text` with the replacement
-    /// provided. This is the same as calling `replacen` with `limit` set to
-    /// `0`.
-    ///
-    /// See the documentation for `replace` for details on how to access
-    /// capturing group matches in the replacement text.
-    pub fn replace_all<'t, R: Replacer>(
-        &self,
-        text: &'t [u8],
-        rep: R,
-    ) -> Cow<'t, [u8]> {
-        self.replacen(text, 0, rep)
-    }
-
-    /// Replaces at most `limit` non-overlapping matches in `text` with the
-    /// replacement provided. If `limit` is 0, then all non-overlapping matches
-    /// are replaced.
-    ///
-    /// See the documentation for `replace` for details on how to access
-    /// capturing group matches in the replacement text.
-    pub fn replacen<'t, R: Replacer>(
-        &self,
-        text: &'t [u8],
-        limit: usize,
-        mut rep: R,
-    ) -> Cow<'t, [u8]> {
-        if let Some(rep) = rep.no_expansion() {
-            let mut new = Vec::with_capacity(text.len());
-            let mut last_match = 0;
-            for (i, m) in self.find_iter(text).enumerate() {
-                if limit > 0 && i >= limit {
-                    break
-                }
-                new.extend_from_slice(&text[last_match..m.start()]);
-                new.extend_from_slice(&rep);
-                last_match = m.end();
-            }
-            if last_match == 0 {
-                return Cow::Borrowed(text);
-            }
-            new.extend_from_slice(&text[last_match..]);
-            return Cow::Owned(new);
-        }
-
-        // The slower path, which we use if the replacement needs access to
-        // capture groups.
-        let mut it = self.captures_iter(text).enumerate().peekable();
-        if it.peek().is_none() {
-            return Cow::Borrowed(text);
-        }
-        let mut new = Vec::with_capacity(text.len());
-        let mut last_match = 0;
-        for (i, cap) in it {
-            if limit > 0 && i >= limit {
-                break
-            }
-            // unwrap on 0 is OK because captures only reports matches
-            let m = cap.get(0).unwrap();
-            new.extend_from_slice(&text[last_match..m.start()]);
-            rep.replace_append(&cap, &mut new);
-            last_match = m.end();
-        }
-        new.extend_from_slice(&text[last_match..]);
-        Cow::Owned(new)
-    }
-}
-
-/// Advanced or "lower level" search methods.
-impl Regex {
-    /// Returns the end location of a match in the text given.
-    ///
-    /// This method may have the same performance characteristics as
-    /// `is_match`, except it provides an end location for a match. In
-    /// particular, the location returned *may be shorter* than the proper end
-    /// of the leftmost-first match.
-    ///
-    /// # Example
-    ///
-    /// Typically, `a+` would match the entire first sequence of `a` in some
-    /// text, but `shortest_match` can give up as soon as it sees the first
-    /// `a`.
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::bytes::Regex;
-    /// # fn main() {
-    /// let text = b"aaaaa";
-    /// let pos = Regex::new(r"a+").unwrap().shortest_match(text);
-    /// assert_eq!(pos, Some(1));
-    /// # }
-    /// ```
-    pub fn shortest_match(&self, text: &[u8]) -> Option<usize> {
-        self.shortest_match_at(text, 0)
-    }
-
-    /// Returns the same as shortest_match, but starts the search at the given
-    /// offset.
-    ///
-    /// The significance of the starting point is that it takes the surrounding
-    /// context into consideration. For example, the `\A` anchor can only
-    /// match when `start == 0`.
-    #[doc(hidden)]
-    pub fn shortest_match_at(
-        &self,
-        text: &[u8],
-        start: usize,
-    ) -> Option<usize> {
-        self.0.searcher().shortest_match_at(text, start)
-    }
-
-    /// Returns the same as is_match, but starts the search at the given
-    /// offset.
-    ///
-    /// The significance of the starting point is that it takes the surrounding
-    /// context into consideration. For example, the `\A` anchor can only
-    /// match when `start == 0`.
-    #[doc(hidden)]
-    pub fn is_match_at(&self, text: &[u8], start: usize) -> bool {
-        self.shortest_match_at(text, start).is_some()
-    }
-
-    /// Returns the same as find, but starts the search at the given
-    /// offset.
-    ///
-    /// The significance of the starting point is that it takes the surrounding
-    /// context into consideration. For example, the `\A` anchor can only
-    /// match when `start == 0`.
-    #[doc(hidden)]
-    pub fn find_at<'t>(
-        &self,
-        text: &'t [u8],
-        start: usize,
-    ) -> Option<Match<'t>> {
-        self.0.searcher().find_at(text, start)
-            .map(|(s, e)| Match::new(text, s, e))
-    }
-
-    /// Returns the same as captures, but starts the search at the given
-    /// offset and populates the capture locations given.
-    ///
-    /// The significance of the starting point is that it takes the surrounding
-    /// context into consideration. For example, the `\A` anchor can only
-    /// match when `start == 0`.
-    #[doc(hidden)]
-    pub fn read_captures_at<'t>(
-        &self,
-        locs: &mut Locations,
-        text: &'t [u8],
-        start: usize,
-    ) -> Option<Match<'t>> {
-        self.0.searcher().read_captures_at(locs, text, start)
-            .map(|(s, e)| Match::new(text, s, e))
-    }
-}
-
-/// Auxiliary methods.
-impl Regex {
-    /// Returns the original string of this regex.
-    pub fn as_str(&self) -> &str {
-        &self.0.regex_strings()[0]
-    }
-
-    /// Returns an iterator over the capture names.
-    pub fn capture_names(&self) -> CaptureNames {
-        CaptureNames(self.0.capture_names().iter())
-    }
-
-    /// Returns the number of captures.
-    pub fn captures_len(&self) -> usize {
-        self.0.capture_names().len()
-    }
-
-    /// Returns an empty set of locations that can be reused in multiple calls
-    /// to `read_captures`.
-    #[doc(hidden)]
-    pub fn locations(&self) -> Locations {
-        self.0.searcher().locations()
-    }
-}
-
-/// An iterator over all non-overlapping matches for a particular string.
-///
-/// The iterator yields a tuple of integers corresponding to the start and end
-/// of the match. The indices are byte offsets. The iterator stops when no more
-/// matches can be found.
-///
-/// `'r` is the lifetime of the compiled regular expression and `'t` is the
-/// lifetime of the matched byte string.
-pub struct Matches<'r, 't>(re_trait::Matches<'t, ExecNoSync<'r>>);
-
-impl<'r, 't> Iterator for Matches<'r, 't> {
-    type Item = Match<'t>;
-
-    fn next(&mut self) -> Option<Match<'t>> {
-        let text = self.0.text();
-        self.0.next().map(|(s, e)| Match::new(text, s, e))
-    }
-}
-
-/// An iterator that yields all non-overlapping capture groups matching a
-/// particular regular expression.
-///
-/// The iterator stops when no more matches can be found.
-///
-/// `'r` is the lifetime of the compiled regular expression and `'t` is the
-/// lifetime of the matched byte string.
-pub struct CaptureMatches<'r, 't>(re_trait::CaptureMatches<'t, ExecNoSync<'r>>);
-
-impl<'r, 't> Iterator for CaptureMatches<'r, 't> {
-    type Item = Captures<'t>;
-
-    fn next(&mut self) -> Option<Captures<'t>> {
-        self.0.next().map(|locs| Captures {
-            text: self.0.text(),
-            locs: locs,
-            named_groups: self.0.regex().capture_name_idx().clone(),
-        })
-    }
-}
-
-/// Yields all substrings delimited by a regular expression match.
-///
-/// `'r` is the lifetime of the compiled regular expression and `'t` is the
-/// lifetime of the byte string being split.
-pub struct Split<'r, 't> {
-    finder: Matches<'r, 't>,
-    last: usize,
-}
-
-impl<'r, 't> Iterator for Split<'r, 't> {
-    type Item = &'t [u8];
-
-    fn next(&mut self) -> Option<&'t [u8]> {
-        let text = self.finder.0.text();
-        match self.finder.next() {
-            None => {
-                if self.last >= text.len() {
-                    None
-                } else {
-                    let s = &text[self.last..];
-                    self.last = text.len();
-                    Some(s)
-                }
-            }
-            Some(m) => {
-                let matched = &text[self.last..m.start()];
-                self.last = m.end();
-                Some(matched)
-            }
-        }
-    }
-}
-
-/// Yields at most `N` substrings delimited by a regular expression match.
-///
-/// The last substring will be whatever remains after splitting.
-///
-/// `'r` is the lifetime of the compiled regular expression and `'t` is the
-/// lifetime of the byte string being split.
-pub struct SplitN<'r, 't> {
-    splits: Split<'r, 't>,
-    n: usize,
-}
-
-impl<'r, 't> Iterator for SplitN<'r, 't> {
-    type Item = &'t [u8];
-
-    fn next(&mut self) -> Option<&'t [u8]> {
-        if self.n == 0 {
-            return None
-        }
-        self.n -= 1;
-        if self.n == 0 {
-            let text = self.splits.finder.0.text();
-            Some(&text[self.splits.last..])
-        } else {
-            self.splits.next()
-        }
-    }
-}
-
-/// An iterator over the names of all possible captures.
-///
-/// `None` indicates an unnamed capture; the first element (capture 0, the
-/// whole matched region) is always unnamed.
-///
-/// `'r` is the lifetime of the compiled regular expression.
-pub struct CaptureNames<'r>(::std::slice::Iter<'r, Option<String>>);
-
-impl<'r> Iterator for CaptureNames<'r> {
-    type Item = Option<&'r str>;
-
-    fn next(&mut self) -> Option<Option<&'r str>> {
-        self.0.next().as_ref()
-            .map(|slot| slot.as_ref().map(|name| name.as_ref()))
-    }
-
-    fn size_hint(&self) -> (usize, Option<usize>) {
-        self.0.size_hint()
-    }
-}
-
-/// Captures represents a group of captured byte strings for a single match.
-///
-/// The 0th capture always corresponds to the entire match. Each subsequent
-/// index corresponds to the next capture group in the regex. If a capture
-/// group is named, then the matched byte string is *also* available via the
-/// `name` method. (Note that the 0th capture is always unnamed and so must be
-/// accessed with the `at` method.)
-///
-/// Positions returned from a capture group are always byte indices.
-///
-/// `'t` is the lifetime of the matched text.
-pub struct Captures<'t> {
-    text: &'t [u8],
-    locs: Locations,
-    named_groups: Arc<HashMap<String, usize>>,
-}
-
-impl<'t> Captures<'t> {
-    /// Returns the match associated with the capture group at index `i`. If
-    /// `i` does not correspond to a capture group, or if the capture group
-    /// did not participate in the match, then `None` is returned.
-    pub fn get(&self, i: usize) -> Option<Match<'t>> {
-        self.locs.pos(i).map(|(s, e)| Match::new(self.text, s, e))
-    }
-
-    /// Returns the match for the capture group named `name`. If `name` isn't a
-    /// valid capture group or didn't match anything, then `None` is returned.
-    pub fn name(&self, name: &str) -> Option<Match<'t>> {
-        self.named_groups.get(name).and_then(|&i| self.get(i))
-    }
-
-    /// An iterator that yields all capturing matches in the order in which
-    /// they appear in the regex. If a particular capture group didn't
-    /// participate in the match, then `None` is yielded for that capture.
-    ///
-    /// The first match always corresponds to the overall match of the regex.
-    pub fn iter<'c>(&'c self) -> SubCaptureMatches<'c, 't> {
-        SubCaptureMatches {
-            caps: self,
-            it: self.locs.iter(),
-        }
-    }
-
-    /// Expands all instances of `$name` in `text` to the corresponding capture
-    /// group `name`, and writes them to the `dst` buffer given.
-    ///
-    /// `name` may be an integer corresponding to the index of the
-    /// capture group (counted by order of opening parenthesis where `0` is the
-    /// entire match) or it can be a name (consisting of letters, digits or
-    /// underscores) corresponding to a named capture group.
-    ///
-    /// If `name` isn't a valid capture group (whether the name doesn't exist
-    /// or isn't a valid index), then it is replaced with the empty string.
-    ///
-    /// The longest possible name is used. e.g., `$1a` looks up the capture
-    /// group named `1a` and not the capture group at index `1`. To exert more
-    /// precise control over the name, use braces, e.g., `${1}a`.
-    ///
-    /// To write a literal `$` use `$$`.
-    pub fn expand(&self, replacement: &[u8], dst: &mut Vec<u8>) {
-        expand_bytes(self, replacement, dst)
-    }
-
-    /// Returns the number of captured groups.
-    ///
-    /// This is always at least `1`, since every regex has at least one capture
-    /// group that corresponds to the full match.
-    #[inline]
-    pub fn len(&self) -> usize {
-        self.locs.len()
-    }
-}
-
-impl<'t> fmt::Debug for Captures<'t> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.debug_tuple("Captures").field(&CapturesDebug(self)).finish()
-    }
-}
-
-struct CapturesDebug<'c, 't: 'c>(&'c Captures<'t>);
-
-impl<'c, 't> fmt::Debug for CapturesDebug<'c, 't> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fn escape_bytes(bytes: &[u8]) -> String {
-            let mut s = String::new();
-            for &b in bytes {
-                s.push_str(&escape_byte(b));
-            }
-            s
-        }
-
-        fn escape_byte(byte: u8) -> String {
-            use std::ascii::escape_default;
-
-            let escaped: Vec<u8> = escape_default(byte).collect();
-            String::from_utf8_lossy(&escaped).into_owned()
-        }
-
-        // We'd like to show something nice here, even if it means an
-        // allocation to build a reverse index.
-        let slot_to_name: HashMap<&usize, &String> =
-            self.0.named_groups.iter().map(|(a, b)| (b, a)).collect();
-        let mut map = f.debug_map();
-        for (slot, m) in self.0.locs.iter().enumerate() {
-            let m = m.map(|(s, e)| escape_bytes(&self.0.text[s..e]));
-            if let Some(ref name) = slot_to_name.get(&slot) {
-                map.entry(&name, &m);
-            } else {
-                map.entry(&slot, &m);
-            }
-        }
-        map.finish()
-    }
-}
-
-/// Get a group by index.
-///
-/// `'t` is the lifetime of the matched text.
-///
-/// The text can't outlive the `Captures` object if this method is
-/// used, because of how `Index` is defined (normally `a[i]` is part
-/// of `a` and can't outlive it); to do that, use `at()` instead.
-///
-/// # Panics
-///
-/// If there is no group at the given index.
-impl<'t> Index<usize> for Captures<'t> {
-    type Output = [u8];
-
-    fn index(&self, i: usize) -> &[u8] {
-        self.get(i).map(|m| m.as_bytes())
-            .unwrap_or_else(|| panic!("no group at index '{}'", i))
-    }
-}
-
-/// Get a group by name.
-///
-/// `'t` is the lifetime of the matched text and `'i` is the lifetime
-/// of the group name (the index).
-///
-/// The text can't outlive the `Captures` object if this method is
-/// used, because of how `Index` is defined (normally `a[i]` is part
-/// of `a` and can't outlive it); to do that, use `name` instead.
-///
-/// # Panics
-///
-/// If there is no group named by the given value.
-impl<'t, 'i> Index<&'i str> for Captures<'t> {
-    type Output = [u8];
-
-    fn index<'a>(&'a self, name: &'i str) -> &'a [u8] {
-        self.name(name).map(|m| m.as_bytes())
-            .unwrap_or_else(|| panic!("no group named '{}'", name))
-    }
-}
-
-/// An iterator that yields all capturing matches in the order in which they
-/// appear in the regex.
-///
-/// If a particular capture group didn't participate in the match, then `None`
-/// is yielded for that capture. The first match always corresponds to the
-/// overall match of the regex.
-///
-/// The lifetime `'c` corresponds to the lifetime of the `Captures` value, and
-/// the lifetime `'t` corresponds to the originally matched text.
-pub struct SubCaptureMatches<'c, 't: 'c> {
-    caps: &'c Captures<'t>,
-    it: SubCapturesPosIter<'c>,
-}
-
-impl<'c, 't> Iterator for SubCaptureMatches<'c, 't> {
-    type Item = Option<Match<'t>>;
-
-    fn next(&mut self) -> Option<Option<Match<'t>>> {
-        self.it.next()
-            .map(|cap| cap.map(|(s, e)| Match::new(self.caps.text, s, e)))
-    }
-}
-
-/// Replacer describes types that can be used to replace matches in a byte
-/// string.
-///
-/// In general, users of this crate shouldn't need to implement this trait,
-/// since implementations are already provided for `&[u8]` and
-/// `FnMut(&Captures) -> Vec<u8>`, which covers most use cases.
-pub trait Replacer {
-    /// Appends text to `dst` to replace the current match.
-    ///
-    /// The current match is represented by `caps`, which is guaranteed to
-    /// have a match at capture group `0`.
-    ///
-    /// For example, a no-op replacement would be
-    /// `dst.extend(&caps[0])`.
-    fn replace_append(&mut self, caps: &Captures, dst: &mut Vec<u8>);
-
-    /// Return a fixed unchanging replacement byte string.
-    ///
-    /// When doing replacements, if access to `Captures` is not needed (e.g.,
-    /// the replacement byte string does not need `$` expansion), then it can
-    /// be beneficial to avoid finding sub-captures.
-    ///
-    /// In general, this is called once for every call to `replacen`.
-    fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, [u8]>> {
-        None
-    }
-}
-
-impl<'a> Replacer for &'a [u8] {
-    fn replace_append(&mut self, caps: &Captures, dst: &mut Vec<u8>) {
-        caps.expand(*self, dst);
-    }
-
-    fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, [u8]>> {
-        match memchr(b'$', *self) {
-            Some(_) => None,
-            None => Some(Cow::Borrowed(*self)),
-        }
-    }
-}
-
-impl<F> Replacer for F where F: FnMut(&Captures) -> Vec<u8> {
-    fn replace_append(&mut self, caps: &Captures, dst: &mut Vec<u8>) {
-        dst.extend_from_slice(&(*self)(caps));
-    }
-}
-
-/// NoExpand indicates literal byte string replacement.
-///
-/// It can be used with `replace` and `replace_all` to do a literal byte string
-/// replacement without expanding `$name` to their corresponding capture
-/// groups. This can be both convenient (to avoid escaping `$`, for example)
-/// and performant (since capture groups don't need to be found).
-///
-/// `'t` is the lifetime of the literal text.
-pub struct NoExpand<'t>(pub &'t [u8]);
-
-impl<'t> Replacer for NoExpand<'t> {
-    fn replace_append(&mut self, _: &Captures, dst: &mut Vec<u8>) {
-        dst.extend_from_slice(self.0);
-    }
-
-    fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, [u8]>> {
-        Some(Cow::Borrowed(self.0))
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/re_plugin.rs
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use re_trait::{RegularExpression, Slot, Locations, as_slots};
-
-/// Plugin is the compiler plugin's data structure. It declare some static
-/// data (like capture groups and the original regex string), but defines its
-/// matching engine as a simple function.
-#[doc(hidden)]
-pub struct Plugin {
-    #[doc(hidden)]
-    pub original: &'static str,
-    #[doc(hidden)]
-    pub names: &'static &'static [Option<&'static str>],
-    #[doc(hidden)]
-    pub groups: &'static &'static [(&'static str, usize)],
-    #[doc(hidden)]
-    pub prog: fn(&mut [Slot], &str, usize) -> bool,
-}
-
-impl Copy for Plugin {}
-
-impl Clone for Plugin {
-    fn clone(&self) -> Plugin {
-        *self
-    }
-}
-
-impl RegularExpression for Plugin {
-    type Text = str;
-
-    fn slots_len(&self) -> usize {
-        self.names.len() * 2
-    }
-
-    fn next_after_empty(&self, text: &str, i: usize) -> usize {
-        let b = match text.as_bytes().get(i) {
-            None => return text.len() + 1,
-            Some(&b) => b,
-        };
-        let inc = if b <= 0x7F {
-            1
-        } else if b <= 0b110_11111 {
-            2
-        } else if b <= 0b1110_1111 {
-            3
-        } else {
-            4
-        };
-        i + inc
-    }
-
-    fn shortest_match_at(&self, text: &str, start: usize) -> Option<usize> {
-        self.find_at(text, start).map(|(_, e)| e)
-    }
-
-    fn is_match_at(&self, text: &str, start: usize) -> bool {
-        (self.prog)(&mut [], text, start)
-    }
-
-    fn find_at(&self, text: &str, start: usize) -> Option<(usize, usize)> {
-        let mut slots = [None, None];
-        (self.prog)(&mut slots, text, start);
-        match (slots[0], slots[1]) {
-            (Some(s), Some(e)) => Some((s, e)),
-            _ => None,
-        }
-    }
-
-    fn read_captures_at<'t>(
-        &self,
-        locs: &mut Locations,
-        text: &'t str,
-        start: usize,
-    ) -> Option<(usize, usize)> {
-        let slots = as_slots(locs);
-        for slot in slots.iter_mut() {
-            *slot = None;
-        }
-        (self.prog)(slots, text, start);
-        match (slots[0], slots[1]) {
-            (Some(s), Some(e)) => Some((s, e)),
-            _ => None,
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/re_set.rs
+++ /dev/null
@@ -1,411 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-macro_rules! define_set {
-    ($name:ident, $builder_mod:ident, $text_ty:ty, $as_bytes:expr,
-     $(#[$doc_regexset_example:meta])* ) => {
-        pub mod $name {
-            use std::fmt;
-            use std::iter;
-            use std::slice;
-            use std::vec;
-
-            use error::Error;
-            use exec::Exec;
-            use re_builder::$builder_mod::RegexSetBuilder;
-            use re_trait::RegularExpression;
-
-/// Match multiple (possibly overlapping) regular expressions in a single scan.
-///
-/// A regex set corresponds to the union of two or more regular expressions.
-/// That is, a regex set will match text where at least one of its
-/// constituent regular expressions matches. A regex set as its formulated here
-/// provides a touch more power: it will also report *which* regular
-/// expressions in the set match. Indeed, this is the key difference between
-/// regex sets and a single `Regex` with many alternates, since only one
-/// alternate can match at a time.
-///
-/// For example, consider regular expressions to match email addresses and
-/// domains: `[a-z]+@[a-z]+\.(com|org|net)` and `[a-z]+\.(com|org|net)`. If a
-/// regex set is constructed from those regexes, then searching the text
-/// `foo@example.com` will report both regexes as matching. Of course, one
-/// could accomplish this by compiling each regex on its own and doing two
-/// searches over the text. The key advantage of using a regex set is that it
-/// will report the matching regexes using a *single pass through the text*.
-/// If one has hundreds or thousands of regexes to match repeatedly (like a URL
-/// router for a complex web application or a user agent matcher), then a regex
-/// set can realize huge performance gains.
-///
-/// # Example
-///
-/// This shows how the above two regexes (for matching email addresses and
-/// domains) might work:
-///
-$(#[$doc_regexset_example])*
-///
-/// Note that it would be possible to adapt the above example to using `Regex`
-/// with an expression like:
-///
-/// ```ignore
-/// (?P<email>[a-z]+@(?P<email_domain>[a-z]+[.](com|org|net)))|(?P<domain>[a-z]+[.](com|org|net))
-/// ```
-///
-/// After a match, one could then inspect the capture groups to figure out
-/// which alternates matched. The problem is that it is hard to make this
-/// approach scale when there are many regexes since the overlap between each
-/// alternate isn't always obvious to reason about.
-///
-/// # Limitations
-///
-/// Regex sets are limited to answering the following two questions:
-///
-/// 1. Does any regex in the set match?
-/// 2. If so, which regexes in the set match?
-///
-/// As with the main `Regex` type, it is cheaper to ask (1) instead of (2)
-/// since the matching engines can stop after the first match is found.
-///
-/// Other features like finding the location of successive matches or their
-/// sub-captures aren't supported. If you need this functionality, the
-/// recommended approach is to compile each regex in the set independently and
-/// selectively match them based on which regexes in the set matched.
-///
-/// # Performance
-///
-/// A `RegexSet` has the same performance characteristics as `Regex`. Namely,
-/// search takes `O(mn)` time, where `m` is proportional to the size of the
-/// regex set and `n` is proportional to the length of the search text.
-#[derive(Clone)]
-pub struct RegexSet(Exec);
-
-impl RegexSet {
-    /// Create a new regex set with the given regular expressions.
-    ///
-    /// This takes an iterator of `S`, where `S` is something that can produce
-    /// a `&str`. If any of the strings in the iterator are not valid regular
-    /// expressions, then an error is returned.
-    ///
-    /// # Example
-    ///
-    /// Create a new regex set from an iterator of strings:
-    ///
-    /// ```rust
-    /// # use regex::RegexSet;
-    /// let set = RegexSet::new(&[r"\w+", r"\d+"]).unwrap();
-    /// assert!(set.is_match("foo"));
-    /// ```
-    pub fn new<I, S>(exprs: I) -> Result<RegexSet, Error>
-            where S: AsRef<str>, I: IntoIterator<Item=S> {
-        RegexSetBuilder::new(exprs).build()
-    }
-
-    /// Returns true if and only if one of the regexes in this set matches
-    /// the text given.
-    ///
-    /// This method should be preferred if you only need to test whether any
-    /// of the regexes in the set should match, but don't care about *which*
-    /// regexes matched. This is because the underlying matching engine will
-    /// quit immediately after seeing the first match instead of continuing to
-    /// find all matches.
-    ///
-    /// Note that as with searches using `Regex`, the expression is unanchored
-    /// by default. That is, if the regex does not start with `^` or `\A`, or
-    /// end with `$` or `\z`, then it is permitted to match anywhere in the
-    /// text.
-    ///
-    /// # Example
-    ///
-    /// Tests whether a set matches some text:
-    ///
-    /// ```rust
-    /// # use regex::RegexSet;
-    /// let set = RegexSet::new(&[r"\w+", r"\d+"]).unwrap();
-    /// assert!(set.is_match("foo"));
-    /// assert!(!set.is_match("☃"));
-    /// ```
-    pub fn is_match(&self, text: $text_ty) -> bool {
-        self.is_match_at(text, 0)
-    }
-
-    /// Returns the same as is_match, but starts the search at the given
-    /// offset.
-    ///
-    /// The significance of the starting point is that it takes the surrounding
-    /// context into consideration. For example, the `\A` anchor can only
-    /// match when `start == 0`.
-    #[doc(hidden)]
-    pub fn is_match_at(&self, text: $text_ty, start: usize) -> bool {
-        self.0.searcher().is_match_at($as_bytes(text), start)
-    }
-
-    /// Returns the set of regular expressions that match in the given text.
-    ///
-    /// The set returned contains the index of each regular expression that
-    /// matches in the given text. The index is in correspondence with the
-    /// order of regular expressions given to `RegexSet`'s constructor.
-    ///
-    /// The set can also be used to iterate over the matched indices.
-    ///
-    /// Note that as with searches using `Regex`, the expression is unanchored
-    /// by default. That is, if the regex does not start with `^` or `\A`, or
-    /// end with `$` or `\z`, then it is permitted to match anywhere in the
-    /// text.
-    ///
-    /// # Example
-    ///
-    /// Tests which regular expressions match the given text:
-    ///
-    /// ```rust
-    /// # use regex::RegexSet;
-    /// let set = RegexSet::new(&[
-    ///     r"\w+",
-    ///     r"\d+",
-    ///     r"\pL+",
-    ///     r"foo",
-    ///     r"bar",
-    ///     r"barfoo",
-    ///     r"foobar",
-    /// ]).unwrap();
-    /// let matches: Vec<_> = set.matches("foobar").into_iter().collect();
-    /// assert_eq!(matches, vec![0, 2, 3, 4, 6]);
-    ///
-    /// // You can also test whether a particular regex matched:
-    /// let matches = set.matches("foobar");
-    /// assert!(!matches.matched(5));
-    /// assert!(matches.matched(6));
-    /// ```
-    pub fn matches(&self, text: $text_ty) -> SetMatches {
-        let mut matches = vec![false; self.0.regex_strings().len()];
-        let any = self.read_matches_at(&mut matches, text, 0);
-        SetMatches {
-            matched_any: any,
-            matches: matches,
-        }
-    }
-
-    /// Returns the same as matches, but starts the search at the given
-    /// offset and stores the matches into the slice given.
-    ///
-    /// The significance of the starting point is that it takes the surrounding
-    /// context into consideration. For example, the `\A` anchor can only
-    /// match when `start == 0`.
-    ///
-    /// `matches` must have a length that is at least the number of regexes
-    /// in this set.
-    ///
-    /// This method returns true if and only if at least one member of
-    /// `matches` is true after executing the set against `text`.
-    #[doc(hidden)]
-    pub fn read_matches_at(
-        &self,
-        matches: &mut [bool],
-        text: $text_ty,
-        start: usize,
-    ) -> bool {
-        self.0.searcher().many_matches_at(matches, $as_bytes(text), start)
-    }
-
-    /// Returns the total number of regular expressions in this set.
-    pub fn len(&self) -> usize {
-        self.0.regex_strings().len()
-    }
-}
-
-/// A set of matches returned by a regex set.
-#[derive(Clone, Debug)]
-pub struct SetMatches {
-    matched_any: bool,
-    matches: Vec<bool>,
-}
-
-impl SetMatches {
-    /// Whether this set contains any matches.
-    pub fn matched_any(&self) -> bool {
-        self.matched_any
-    }
-
-    /// Whether the regex at the given index matched.
-    ///
-    /// The index for a regex is determined by its insertion order upon the
-    /// initial construction of a `RegexSet`, starting at `0`.
-    ///
-    /// # Panics
-    ///
-    /// If `regex_index` is greater than or equal to `self.len()`.
-    pub fn matched(&self, regex_index: usize) -> bool {
-        self.matches[regex_index]
-    }
-
-    /// The total number of regexes in the set that created these matches.
-    pub fn len(&self) -> usize {
-        self.matches.len()
-    }
-
-    /// Returns an iterator over indexes in the regex that matched.
-    pub fn iter(&self) -> SetMatchesIter {
-        SetMatchesIter((&*self.matches).into_iter().enumerate())
-    }
-}
-
-impl IntoIterator for SetMatches {
-    type IntoIter = SetMatchesIntoIter;
-    type Item = usize;
-
-    fn into_iter(self) -> Self::IntoIter {
-        SetMatchesIntoIter(self.matches.into_iter().enumerate())
-    }
-}
-
-impl<'a> IntoIterator for &'a SetMatches {
-    type IntoIter = SetMatchesIter<'a>;
-    type Item = usize;
-
-    fn into_iter(self) -> Self::IntoIter {
-        self.iter()
-    }
-}
-
-/// An owned iterator over the set of matches from a regex set.
-pub struct SetMatchesIntoIter(iter::Enumerate<vec::IntoIter<bool>>);
-
-impl Iterator for SetMatchesIntoIter {
-    type Item = usize;
-
-    fn next(&mut self) -> Option<usize> {
-        loop {
-            match self.0.next() {
-                None => return None,
-                Some((_, false)) => {}
-                Some((i, true)) => return Some(i),
-            }
-        }
-    }
-}
-
-impl DoubleEndedIterator for SetMatchesIntoIter {
-    fn next_back(&mut self) -> Option<usize> {
-        loop {
-            match self.0.next_back() {
-                None => return None,
-                Some((_, false)) => {}
-                Some((i, true)) => return Some(i),
-            }
-        }
-    }
-}
-
-/// A borrowed iterator over the set of matches from a regex set.
-///
-/// The lifetime `'a` refers to the lifetime of a `SetMatches` value.
-#[derive(Clone)]
-pub struct SetMatchesIter<'a>(iter::Enumerate<slice::Iter<'a, bool>>);
-
-impl<'a> Iterator for SetMatchesIter<'a> {
-    type Item = usize;
-
-    fn next(&mut self) -> Option<usize> {
-        loop {
-            match self.0.next() {
-                None => return None,
-                Some((_, &false)) => {}
-                Some((i, &true)) => return Some(i),
-            }
-        }
-    }
-}
-
-impl<'a> DoubleEndedIterator for SetMatchesIter<'a> {
-    fn next_back(&mut self) -> Option<usize> {
-        loop {
-            match self.0.next_back() {
-                None => return None,
-                Some((_, &false)) => {}
-                Some((i, &true)) => return Some(i),
-            }
-        }
-    }
-}
-
-#[doc(hidden)]
-impl From<Exec> for RegexSet {
-    fn from(exec: Exec) -> Self {
-        RegexSet(exec)
-    }
-}
-
-impl fmt::Debug for RegexSet {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "RegexSet({:?})", self.0.regex_strings())
-    }
-}
-
-#[allow(dead_code)] fn as_bytes_str(text: &str) -> &[u8] { text.as_bytes() }
-#[allow(dead_code)] fn as_bytes_bytes(text: &[u8]) -> &[u8] { text }
-        }
-    }
-}
-
-define_set! {
-    unicode,
-    set_unicode,
-    &str,
-    as_bytes_str,
-/// ```rust
-/// # use regex::RegexSet;
-/// let set = RegexSet::new(&[
-///     r"[a-z]+@[a-z]+\.(com|org|net)",
-///     r"[a-z]+\.(com|org|net)",
-/// ]).unwrap();
-///
-/// // Ask whether any regexes in the set match.
-/// assert!(set.is_match("foo@example.com"));
-///
-/// // Identify which regexes in the set match.
-/// let matches: Vec<_> = set.matches("foo@example.com").into_iter().collect();
-/// assert_eq!(vec![0, 1], matches);
-///
-/// // Try again, but with text that only matches one of the regexes.
-/// let matches: Vec<_> = set.matches("example.com").into_iter().collect();
-/// assert_eq!(vec![1], matches);
-///
-/// // Try again, but with text that doesn't match any regex in the set.
-/// let matches: Vec<_> = set.matches("example").into_iter().collect();
-/// assert!(matches.is_empty());
-/// ```
-}
-
-define_set! {
-    bytes,
-    set_bytes,
-    &[u8],
-    as_bytes_bytes,
-/// ```rust
-/// # use regex::bytes::RegexSet;
-/// let set = RegexSet::new(&[
-///     r"[a-z]+@[a-z]+\.(com|org|net)",
-///     r"[a-z]+\.(com|org|net)",
-/// ]).unwrap();
-///
-/// // Ask whether any regexes in the set match.
-/// assert!(set.is_match(b"foo@example.com"));
-///
-/// // Identify which regexes in the set match.
-/// let matches: Vec<_> = set.matches(b"foo@example.com").into_iter().collect();
-/// assert_eq!(vec![0, 1], matches);
-///
-/// // Try again, but with text that only matches one of the regexes.
-/// let matches: Vec<_> = set.matches(b"example.com").into_iter().collect();
-/// assert_eq!(vec![1], matches);
-///
-/// // Try again, but with text that doesn't match any regex in the set.
-/// let matches: Vec<_> = set.matches(b"example").into_iter().collect();
-/// assert!(matches.is_empty());
-/// ```
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/re_trait.rs
+++ /dev/null
@@ -1,268 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-/// Slot is a single saved capture location. Note that there are two slots for
-/// every capture in a regular expression (one slot each for the start and end
-/// of the capture).
-pub type Slot = Option<usize>;
-
-/// Locations represents the offsets of each capturing group in a regex for
-/// a single match.
-///
-/// Unlike `Captures`, a `Locations` value only stores offsets.
-#[doc(hidden)]
-pub struct Locations(Vec<Slot>);
-
-impl Locations {
-    /// Returns the start and end positions of the Nth capture group. Returns
-    /// `None` if `i` is not a valid capture group or if the capture group did
-    /// not match anything. The positions returned are *always* byte indices
-    /// with respect to the original string matched.
-    pub fn pos(&self, i: usize) -> Option<(usize, usize)> {
-        let (s, e) = (i * 2, i * 2 + 1);
-        match (self.0.get(s), self.0.get(e)) {
-            (Some(&Some(s)), Some(&Some(e))) => Some((s, e)),
-            _ => None,
-        }
-    }
-
-    /// Creates an iterator of all the capture group positions in order of
-    /// appearance in the regular expression. Positions are byte indices
-    /// in terms of the original string matched.
-    pub fn iter(&self) -> SubCapturesPosIter {
-        SubCapturesPosIter { idx: 0, locs: &self }
-    }
-
-    /// Returns the total number of capturing groups.
-    ///
-    /// This is always at least `1` since every regex has at least `1`
-    /// capturing group that corresponds to the entire match.
-    pub fn len(&self) -> usize {
-        self.0.len() / 2
-    }
-}
-
-/// This is a hack to make Locations -> &mut [Slot] be available internally
-/// without exposing it in the public API.
-pub fn as_slots(locs: &mut Locations) -> &mut [Slot] {
-    &mut locs.0
-}
-
-/// An iterator over capture group positions for a particular match of a
-/// regular expression.
-///
-/// Positions are byte indices in terms of the original string matched.
-///
-/// `'c` is the lifetime of the captures.
-pub struct SubCapturesPosIter<'c> {
-    idx: usize,
-    locs: &'c Locations,
-}
-
-impl<'c> Iterator for SubCapturesPosIter<'c> {
-    type Item = Option<(usize, usize)>;
-
-    fn next(&mut self) -> Option<Option<(usize, usize)>> {
-        if self.idx >= self.locs.len() {
-            return None;
-        }
-        let x = match self.locs.pos(self.idx) {
-            None => Some(None),
-            Some((s, e)) => {
-                Some(Some((s, e)))
-            }
-        };
-        self.idx += 1;
-        x
-    }
-}
-
-/// RegularExpression describes types that can implement regex searching.
-///
-/// This trait is my attempt at reducing code duplication and to standardize
-/// the internal API. Specific duplication that is avoided are the `find`
-/// and `capture` iterators, which are slightly tricky.
-///
-/// It's not clear whether this trait is worth it, and it also isn't
-/// clear whether it's useful as a public trait or not. Methods like
-/// `next_after_empty` reak of bad design, but the rest of the methods seem
-/// somewhat reasonable. One particular thing this trait would expose would be
-/// the ability to start the search of a regex anywhere in a haystack, which
-/// isn't possible in the current public API.
-pub trait RegularExpression: Sized {
-    /// The type of the haystack.
-    type Text: ?Sized;
-
-    /// The number of capture slots in the compiled regular expression. This is
-    /// always two times the number of capture groups (two slots per group).
-    fn slots_len(&self) -> usize;
-
-    /// Allocates fresh space for all capturing groups in this regex.
-    fn locations(&self) -> Locations {
-        Locations(vec![None; self.slots_len()])
-    }
-
-    /// Returns the position of the next character after `i`.
-    ///
-    /// For example, a haystack with type `&[u8]` probably returns `i+1`,
-    /// whereas a haystack with type `&str` probably returns `i` plus the
-    /// length of the next UTF-8 sequence.
-    fn next_after_empty(&self, text: &Self::Text, i: usize) -> usize;
-
-    /// Returns the location of the shortest match.
-    fn shortest_match_at(
-        &self,
-        text: &Self::Text,
-        start: usize,
-    ) -> Option<usize>;
-
-    /// Returns whether the regex matches the text given.
-    fn is_match_at(
-        &self,
-        text: &Self::Text,
-        start: usize,
-    ) -> bool;
-
-    /// Returns the leftmost-first match location if one exists.
-    fn find_at(
-        &self,
-        text: &Self::Text,
-        start: usize,
-    ) -> Option<(usize, usize)>;
-
-    /// Returns the leftmost-first match location if one exists, and also
-    /// fills in any matching capture slot locations.
-    fn read_captures_at(
-        &self,
-        locs: &mut Locations,
-        text: &Self::Text,
-        start: usize,
-    ) -> Option<(usize, usize)>;
-
-    /// Returns an iterator over all non-overlapping successive leftmost-first
-    /// matches.
-    fn find_iter<'t>(
-        self,
-        text: &'t Self::Text,
-    ) -> Matches<'t, Self> {
-        Matches {
-            re: self,
-            text: text,
-            last_end: 0,
-            last_match: None,
-        }
-    }
-
-    /// Returns an iterator over all non-overlapping successive leftmost-first
-    /// matches with captures.
-    fn captures_iter<'t>(
-        self,
-        text: &'t Self::Text,
-    ) -> CaptureMatches<'t, Self> {
-        CaptureMatches(self.find_iter(text))
-    }
-}
-
-/// An iterator over all non-overlapping successive leftmost-first matches.
-pub struct Matches<'t, R> where R: RegularExpression, R::Text: 't {
-    re: R,
-    text: &'t R::Text,
-    last_end: usize,
-    last_match: Option<usize>,
-}
-
-impl<'t, R> Matches<'t, R> where R: RegularExpression, R::Text: 't {
-    /// Return the text being searched.
-    pub fn text(&self) -> &'t R::Text {
-        self.text
-    }
-
-    /// Return the underlying regex.
-    pub fn regex(&self) -> &R {
-        &self.re
-    }
-}
-
-impl<'t, R> Iterator for Matches<'t, R>
-        where R: RegularExpression, R::Text: 't + AsRef<[u8]> {
-    type Item = (usize, usize);
-
-    fn next(&mut self) -> Option<(usize, usize)> {
-        if self.last_end > self.text.as_ref().len() {
-            return None;
-        }
-        let (s, e) = match self.re.find_at(self.text, self.last_end) {
-            None => return None,
-            Some((s, e)) => (s, e),
-        };
-        if s == e {
-            // This is an empty match. To ensure we make progress, start
-            // the next search at the smallest possible starting position
-            // of the next match following this one.
-            self.last_end = self.re.next_after_empty(&self.text, e);
-            // Don't accept empty matches immediately following a match.
-            // Just move on to the next match.
-            if Some(e) == self.last_match {
-                return self.next();
-            }
-        } else {
-            self.last_end = e;
-        }
-        self.last_match = Some(e);
-        Some((s, e))
-    }
-}
-
-/// An iterator over all non-overlapping successive leftmost-first matches with
-/// captures.
-pub struct CaptureMatches<'t, R>(Matches<'t, R>)
-    where R: RegularExpression, R::Text: 't;
-
-impl<'t, R> CaptureMatches<'t, R> where R: RegularExpression, R::Text: 't {
-    /// Return the text being searched.
-    pub fn text(&self) -> &'t R::Text {
-        self.0.text()
-    }
-
-    /// Return the underlying regex.
-    pub fn regex(&self) -> &R {
-        self.0.regex()
-    }
-}
-
-impl<'t, R> Iterator for CaptureMatches<'t, R>
-        where R: RegularExpression, R::Text: 't + AsRef<[u8]> {
-    type Item = Locations;
-
-    fn next(&mut self) -> Option<Locations> {
-        if self.0.last_end > self.0.text.as_ref().len() {
-            return None
-        }
-        let mut locs = self.0.re.locations();
-        let (s, e) = match self.0.re.read_captures_at(
-            &mut locs,
-            self.0.text,
-            self.0.last_end,
-        ) {
-            None => return None,
-            Some((s, e)) => (s, e),
-        };
-        if s == e {
-            self.0.last_end = self.0.re.next_after_empty(&self.0.text, e);
-            if Some(e) == self.0.last_match {
-                return self.next();
-            }
-        } else {
-            self.0.last_end = e;
-        }
-        self.0.last_match = Some(e);
-        Some(locs)
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/re_unicode.rs
+++ /dev/null
@@ -1,1203 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::borrow::Cow;
-use std::collections::HashMap;
-use std::fmt;
-use std::ops::Index;
-use std::str::FromStr;
-use std::sync::Arc;
-
-use memchr::memchr;
-use syntax;
-
-use error::Error;
-use exec::{Exec, ExecNoSyncStr};
-use expand::expand_str;
-use re_builder::unicode::RegexBuilder;
-use re_plugin::Plugin;
-use re_trait::{self, RegularExpression, Locations, SubCapturesPosIter};
-
-/// Escapes all regular expression meta characters in `text`.
-///
-/// The string returned may be safely used as a literal in a regular
-/// expression.
-pub fn escape(text: &str) -> String {
-    syntax::escape(text)
-}
-
-/// Match represents a single match of a regex in a haystack.
-///
-/// The lifetime parameter `'t` refers to the lifetime of the matched text.
-#[derive(Copy, Clone, Debug, Eq, PartialEq)]
-pub struct Match<'t> {
-    text: &'t str,
-    start: usize,
-    end: usize,
-}
-
-impl<'t> Match<'t> {
-    /// Returns the starting byte offset of the match in the haystack.
-    #[inline]
-    pub fn start(&self) -> usize {
-        self.start
-    }
-
-    /// Returns the ending byte offset of the match in the haystack.
-    #[inline]
-    pub fn end(&self) -> usize {
-        self.end
-    }
-
-    /// Returns the matched text.
-    #[inline]
-    pub fn as_str(&self) -> &'t str {
-        &self.text[self.start..self.end]
-    }
-
-    /// Creates a new match from the given haystack and byte offsets.
-    #[inline]
-    fn new(haystack: &'t str, start: usize, end: usize) -> Match<'t> {
-        Match {
-            text: haystack,
-            start: start,
-            end: end,
-        }
-    }
-}
-
-/// A compiled regular expression for matching Unicode strings.
-///
-/// It is represented as either a sequence of bytecode instructions (dynamic)
-/// or as a specialized Rust function (native). It can be used to search, split
-/// or replace text. All searching is done with an implicit `.*?` at the
-/// beginning and end of an expression. To force an expression to match the
-/// whole string (or a prefix or a suffix), you must use an anchor like `^` or
-/// `$` (or `\A` and `\z`).
-///
-/// While this crate will handle Unicode strings (whether in the regular
-/// expression or in the search text), all positions returned are **byte
-/// indices**. Every byte index is guaranteed to be at a Unicode code point
-/// boundary.
-///
-/// The lifetimes `'r` and `'t` in this crate correspond to the lifetime of a
-/// compiled regular expression and text to search, respectively.
-///
-/// The only methods that allocate new strings are the string replacement
-/// methods. All other methods (searching and splitting) return borrowed
-/// pointers into the string given.
-///
-/// # Examples
-///
-/// Find the location of a US phone number:
-///
-/// ```rust
-/// # use regex::Regex;
-/// let re = Regex::new("[0-9]{3}-[0-9]{3}-[0-9]{4}").unwrap();
-/// let mat = re.find("phone: 111-222-3333").unwrap();
-/// assert_eq!((mat.start(), mat.end()), (7, 19));
-/// ```
-///
-/// # Using the `std::str::pattern` methods with `Regex`
-///
-/// > **Note**: This section requires that this crate is compiled with the
-/// > `pattern` Cargo feature enabled, which **requires nightly Rust**.
-///
-/// Since `Regex` implements `Pattern`, you can use regexes with methods
-/// defined on `&str`. For example, `is_match`, `find`, `find_iter`
-/// and `split` can be replaced with `str::contains`, `str::find`,
-/// `str::match_indices` and `str::split`.
-///
-/// Here are some examples:
-///
-/// ```rust,ignore
-/// # use regex::Regex;
-/// let re = Regex::new(r"\d+").unwrap();
-/// let haystack = "a111b222c";
-///
-/// assert!(haystack.contains(&re));
-/// assert_eq!(haystack.find(&re), Some(1));
-/// assert_eq!(haystack.match_indices(&re).collect::<Vec<_>>(),
-///            vec![(1, 4), (5, 8)]);
-/// assert_eq!(haystack.split(&re).collect::<Vec<_>>(), vec!["a", "b", "c"]);
-/// ```
-#[derive(Clone)]
-pub struct Regex(#[doc(hidden)] pub _Regex);
-
-#[derive(Clone)]
-#[doc(hidden)]
-pub enum _Regex {
-    // The representation of `Regex` is exported to support the `regex!`
-    // syntax extension. Do not rely on it.
-    //
-    // See the comments for the `internal` module in `lib.rs` for a more
-    // detailed explanation for what `regex!` requires.
-    #[doc(hidden)]
-    Dynamic(Exec),
-    #[doc(hidden)]
-    Plugin(Plugin),
-}
-
-impl fmt::Display for Regex {
-    /// Shows the original regular expression.
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}", self.as_str())
-    }
-}
-
-impl fmt::Debug for Regex {
-    /// Shows the original regular expression.
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-#[doc(hidden)]
-impl From<Exec> for Regex {
-    fn from(exec: Exec) -> Regex {
-        Regex(_Regex::Dynamic(exec))
-    }
-}
-
-impl FromStr for Regex {
-    type Err = Error;
-
-    /// Attempts to parse a string into a regular expression
-    fn from_str(s: &str) -> Result<Regex, Error> {
-        Regex::new(s)
-    }
-}
-
-/// Core regular expression methods.
-impl Regex {
-    /// Compiles a regular expression. Once compiled, it can be used repeatedly
-    /// to search, split or replace text in a string.
-    ///
-    /// If an invalid expression is given, then an error is returned.
-    pub fn new(re: &str) -> Result<Regex, Error> {
-        RegexBuilder::new(re).build()
-    }
-
-    /// Returns true if and only if the regex matches the string given.
-    ///
-    /// It is recommended to use this method if all you need to do is test
-    /// a match, since the underlying matching engine may be able to do less
-    /// work.
-    ///
-    /// # Example
-    ///
-    /// Test if some text contains at least one word with exactly 13
-    /// Unicode word characters:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # fn main() {
-    /// let text = "I categorically deny having triskaidekaphobia.";
-    /// assert!(Regex::new(r"\b\w{13}\b").unwrap().is_match(text));
-    /// # }
-    /// ```
-    pub fn is_match(&self, text: &str) -> bool {
-        self.is_match_at(text, 0)
-    }
-
-    /// Returns the start and end byte range of the leftmost-first match in
-    /// `text`. If no match exists, then `None` is returned.
-    ///
-    /// Note that this should only be used if you want to discover the position
-    /// of the match. Testing the existence of a match is faster if you use
-    /// `is_match`.
-    ///
-    /// # Example
-    ///
-    /// Find the start and end location of the first word with exactly 13
-    /// Unicode word characters:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # fn main() {
-    /// let text = "I categorically deny having triskaidekaphobia.";
-    /// let mat = Regex::new(r"\b\w{13}\b").unwrap().find(text).unwrap();
-    /// assert_eq!(mat.start(), 2);
-    /// assert_eq!(mat.end(), 15);
-    /// # }
-    /// ```
-    pub fn find<'t>(&self, text: &'t str) -> Option<Match<'t>> {
-        self.find_at(text, 0)
-    }
-
-    /// Returns an iterator for each successive non-overlapping match in
-    /// `text`, returning the start and end byte indices with respect to
-    /// `text`.
-    ///
-    /// # Example
-    ///
-    /// Find the start and end location of every word with exactly 13 Unicode
-    /// word characters:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # fn main() {
-    /// let text = "Retroactively relinquishing remunerations is reprehensible.";
-    /// for mat in Regex::new(r"\b\w{13}\b").unwrap().find_iter(text) {
-    ///     println!("{:?}", mat);
-    /// }
-    /// # }
-    /// ```
-    pub fn find_iter<'r, 't>(&'r self, text: &'t str) -> Matches<'r, 't> {
-        match self.0 {
-            _Regex::Dynamic(ref exec) => {
-                let it = exec.searcher_str().find_iter(text);
-                Matches(MatchesInner::Dynamic(it))
-            }
-            _Regex::Plugin(ref plug) => {
-                let it = plug.find_iter(text);
-                Matches(MatchesInner::Plugin(it))
-            }
-        }
-    }
-
-    /// Returns the capture groups corresponding to the leftmost-first
-    /// match in `text`. Capture group `0` always corresponds to the entire
-    /// match. If no match is found, then `None` is returned.
-    ///
-    /// You should only use `captures` if you need access to the location of
-    /// capturing group matches. Otherwise, `find` is faster for discovering
-    /// the location of the overall match.
-    ///
-    /// # Examples
-    ///
-    /// Say you have some text with movie names and their release years,
-    /// like "'Citizen Kane' (1941)". It'd be nice if we could search for text
-    /// looking like that, while also extracting the movie name and its release
-    /// year separately.
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # fn main() {
-    /// let re = Regex::new(r"'([^']+)'\s+\((\d{4})\)").unwrap();
-    /// let text = "Not my favorite movie: 'Citizen Kane' (1941).";
-    /// let caps = re.captures(text).unwrap();
-    /// assert_eq!(caps.get(1).unwrap().as_str(), "Citizen Kane");
-    /// assert_eq!(caps.get(2).unwrap().as_str(), "1941");
-    /// assert_eq!(caps.get(0).unwrap().as_str(), "'Citizen Kane' (1941)");
-    /// // You can also access the groups by index using the Index notation.
-    /// // Note that this will panic on an invalid index.
-    /// assert_eq!(&caps[1], "Citizen Kane");
-    /// assert_eq!(&caps[2], "1941");
-    /// assert_eq!(&caps[0], "'Citizen Kane' (1941)");
-    /// # }
-    /// ```
-    ///
-    /// Note that the full match is at capture group `0`. Each subsequent
-    /// capture group is indexed by the order of its opening `(`.
-    ///
-    /// We can make this example a bit clearer by using *named* capture groups:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # fn main() {
-    /// let re = Regex::new(r"'(?P<title>[^']+)'\s+\((?P<year>\d{4})\)")
-    ///                .unwrap();
-    /// let text = "Not my favorite movie: 'Citizen Kane' (1941).";
-    /// let caps = re.captures(text).unwrap();
-    /// assert_eq!(&caps["title"], "Citizen Kane");
-    /// assert_eq!(&caps["year"], "1941");
-    /// assert_eq!(caps.get(0).unwrap().as_str(), "'Citizen Kane' (1941)");
-    /// // You can also access the groups by name using the Index notation.
-    /// // Note that this will panic on an invalid group name.
-    /// assert_eq!(&caps["title"], "Citizen Kane");
-    /// assert_eq!(&caps["year"], "1941");
-    /// assert_eq!(&caps[0], "'Citizen Kane' (1941)");
-    ///
-    /// # }
-    /// ```
-    ///
-    /// Here we name the capture groups, which we can access with the `name`
-    /// method or the `Index` notation with a `&str`. Note that the named
-    /// capture groups are still accessible with `at` or the `Index` notation
-    /// with a `usize`.
-    ///
-    /// The `0`th capture group is always unnamed, so it must always be
-    /// accessed with `at(0)` or `[0]`.
-    pub fn captures<'t>(&self, text: &'t str) -> Option<Captures<'t>> {
-        let mut locs = self.locations();
-        self.read_captures_at(&mut locs, text, 0).map(|_| Captures {
-            text: text,
-            locs: locs,
-            named_groups: NamedGroups::from_regex(self)
-        })
-    }
-
-    /// Returns an iterator over all the non-overlapping capture groups matched
-    /// in `text`. This is operationally the same as `find_iter`, except it
-    /// yields information about capturing group matches.
-    ///
-    /// # Example
-    ///
-    /// We can use this to find all movie titles and their release years in
-    /// some text, where the movie is formatted like "'Title' (xxxx)":
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # fn main() {
-    /// let re = Regex::new(r"'(?P<title>[^']+)'\s+\((?P<year>\d{4})\)")
-    ///                .unwrap();
-    /// let text = "'Citizen Kane' (1941), 'The Wizard of Oz' (1939), 'M' (1931).";
-    /// for caps in re.captures_iter(text) {
-    ///     println!("Movie: {:?}, Released: {:?}",
-    ///              &caps["title"], &caps["year"]);
-    /// }
-    /// // Output:
-    /// // Movie: Citizen Kane, Released: 1941
-    /// // Movie: The Wizard of Oz, Released: 1939
-    /// // Movie: M, Released: 1931
-    /// # }
-    /// ```
-    pub fn captures_iter<'r, 't>(
-        &'r self,
-        text: &'t str,
-    ) -> CaptureMatches<'r, 't> {
-        match self.0 {
-            _Regex::Dynamic(ref exec) => {
-                let it = exec.searcher_str().captures_iter(text);
-                CaptureMatches(CaptureMatchesInner::Dynamic(it))
-            }
-            _Regex::Plugin(ref plug) => {
-                let it = plug.captures_iter(text);
-                CaptureMatches(CaptureMatchesInner::Plugin(it))
-            }
-        }
-    }
-
-    /// Returns an iterator of substrings of `text` delimited by a match of the
-    /// regular expression. Namely, each element of the iterator corresponds to
-    /// text that *isn't* matched by the regular expression.
-    ///
-    /// This method will *not* copy the text given.
-    ///
-    /// # Example
-    ///
-    /// To split a string delimited by arbitrary amounts of spaces or tabs:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # fn main() {
-    /// let re = Regex::new(r"[ \t]+").unwrap();
-    /// let fields: Vec<&str> = re.split("a b \t  c\td    e").collect();
-    /// assert_eq!(fields, vec!["a", "b", "c", "d", "e"]);
-    /// # }
-    /// ```
-    pub fn split<'r, 't>(&'r self, text: &'t str) -> Split<'r, 't> {
-        Split {
-            finder: self.find_iter(text),
-            last: 0,
-        }
-    }
-
-    /// Returns an iterator of at most `limit` substrings of `text` delimited
-    /// by a match of the regular expression. (A `limit` of `0` will return no
-    /// substrings.) Namely, each element of the iterator corresponds to text
-    /// that *isn't* matched by the regular expression. The remainder of the
-    /// string that is not split will be the last element in the iterator.
-    ///
-    /// This method will *not* copy the text given.
-    ///
-    /// # Example
-    ///
-    /// Get the first two words in some text:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # fn main() {
-    /// let re = Regex::new(r"\W+").unwrap();
-    /// let fields: Vec<&str> = re.splitn("Hey! How are you?", 3).collect();
-    /// assert_eq!(fields, vec!("Hey", "How", "are you?"));
-    /// # }
-    /// ```
-    pub fn splitn<'r, 't>(&'r self, text: &'t str, limit: usize)
-                         -> SplitN<'r, 't> {
-        SplitN {
-            splits: self.split(text),
-            n: limit,
-        }
-    }
-
-    /// Replaces the leftmost-first match with the replacement provided.
-    /// The replacement can be a regular string (where `$N` and `$name` are
-    /// expanded to match capture groups) or a function that takes the matches'
-    /// `Captures` and returns the replaced string.
-    ///
-    /// If no match is found, then a copy of the string is returned unchanged.
-    ///
-    /// # Replacement string syntax
-    ///
-    /// All instances of `$name` in the replacement text is replaced with the
-    /// corresponding capture group `name`.
-    ///
-    /// `name` may be an integer corresponding to the index of the
-    /// capture group (counted by order of opening parenthesis where `0` is the
-    /// entire match) or it can be a name (consisting of letters, digits or
-    /// underscores) corresponding to a named capture group.
-    ///
-    /// If `name` isn't a valid capture group (whether the name doesn't exist
-    /// or isn't a valid index), then it is replaced with the empty string.
-    ///
-    /// The longest possible name is used. e.g., `$1a` looks up the capture
-    /// group named `1a` and not the capture group at index `1`. To exert more
-    /// precise control over the name, use braces, e.g., `${1}a`.
-    ///
-    /// To write a literal `$` use `$$`.
-    ///
-    /// # Examples
-    ///
-    /// Note that this function is polymorphic with respect to the replacement.
-    /// In typical usage, this can just be a normal string:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # fn main() {
-    /// let re = Regex::new("[^01]+").unwrap();
-    /// assert_eq!(re.replace("1078910", ""), "1010");
-    /// # }
-    /// ```
-    ///
-    /// But anything satisfying the `Replacer` trait will work. For example,
-    /// a closure of type `|&Captures| -> String` provides direct access to the
-    /// captures corresponding to a match. This allows one to access
-    /// capturing group matches easily:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # use regex::Captures; fn main() {
-    /// let re = Regex::new(r"([^,\s]+),\s+(\S+)").unwrap();
-    /// let result = re.replace("Springsteen, Bruce", |caps: &Captures| {
-    ///     format!("{} {}", &caps[2], &caps[1])
-    /// });
-    /// assert_eq!(result, "Bruce Springsteen");
-    /// # }
-    /// ```
-    ///
-    /// But this is a bit cumbersome to use all the time. Instead, a simple
-    /// syntax is supported that expands `$name` into the corresponding capture
-    /// group. Here's the last example, but using this expansion technique
-    /// with named capture groups:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # fn main() {
-    /// let re = Regex::new(r"(?P<last>[^,\s]+),\s+(?P<first>\S+)").unwrap();
-    /// let result = re.replace("Springsteen, Bruce", "$first $last");
-    /// assert_eq!(result, "Bruce Springsteen");
-    /// # }
-    /// ```
-    ///
-    /// Note that using `$2` instead of `$first` or `$1` instead of `$last`
-    /// would produce the same result. To write a literal `$` use `$$`.
-    ///
-    /// Finally, sometimes you just want to replace a literal string with no
-    /// regard for capturing group expansion. This can be done by wrapping a
-    /// byte string with `NoExpand`:
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # fn main() {
-    /// use regex::NoExpand;
-    ///
-    /// let re = Regex::new(r"(?P<last>[^,\s]+),\s+(\S+)").unwrap();
-    /// let result = re.replace("Springsteen, Bruce", NoExpand("$2 $last"));
-    /// assert_eq!(result, "$2 $last");
-    /// # }
-    /// ```
-    pub fn replace<'t, R: Replacer>(
-        &self,
-        text: &'t str,
-        rep: R,
-    ) -> Cow<'t, str> {
-        self.replacen(text, 1, rep)
-    }
-
-    /// Replaces all non-overlapping matches in `text` with the replacement
-    /// provided. This is the same as calling `replacen` with `limit` set to
-    /// `0`.
-    ///
-    /// See the documentation for `replace` for details on how to access
-    /// capturing group matches in the replacement string.
-    pub fn replace_all<'t, R: Replacer>(
-        &self,
-        text: &'t str,
-        rep: R,
-    ) -> Cow<'t, str> {
-        self.replacen(text, 0, rep)
-    }
-
-    /// Replaces at most `limit` non-overlapping matches in `text` with the
-    /// replacement provided. If `limit` is 0, then all non-overlapping matches
-    /// are replaced.
-    ///
-    /// See the documentation for `replace` for details on how to access
-    /// capturing group matches in the replacement string.
-    pub fn replacen<'t, R: Replacer>(
-        &self,
-        text: &'t str,
-        limit: usize,
-        mut rep: R,
-    ) -> Cow<'t, str> {
-        // If we know that the replacement doesn't have any capture expansions,
-        // then we can fast path. The fast path can make a tremendous
-        // difference:
-        //
-        //   1) We use `find_iter` instead of `captures_iter`. Not asking for
-        //      captures generally makes the regex engines faster.
-        //   2) We don't need to look up all of the capture groups and do
-        //      replacements inside the replacement string. We just push it
-        //      at each match and be done with it.
-        if let Some(rep) = rep.no_expansion() {
-            let mut new = String::with_capacity(text.len());
-            let mut last_match = 0;
-            for (i, m) in self.find_iter(text).enumerate() {
-                if limit > 0 && i >= limit {
-                    break
-                }
-                new.push_str(&text[last_match..m.start()]);
-                new.push_str(&rep);
-                last_match = m.end();
-            }
-            if last_match == 0 {
-                return Cow::Borrowed(text);
-            }
-            new.push_str(&text[last_match..]);
-            return Cow::Owned(new);
-        }
-
-        // The slower path, which we use if the replacement needs access to
-        // capture groups.
-        let mut it = self.captures_iter(text).enumerate().peekable();
-        if it.peek().is_none() {
-            return Cow::Borrowed(text);
-        }
-        let mut new = String::with_capacity(text.len());
-        let mut last_match = 0;
-        for (i, cap) in it {
-            if limit > 0 && i >= limit {
-                break
-            }
-            // unwrap on 0 is OK because captures only reports matches
-            let m = cap.get(0).unwrap();
-            new.push_str(&text[last_match..m.start()]);
-            rep.replace_append(&cap, &mut new);
-            last_match = m.end();
-        }
-        new.push_str(&text[last_match..]);
-        Cow::Owned(new)
-    }
-}
-
-/// Advanced or "lower level" search methods.
-impl Regex {
-    /// Returns the end location of a match in the text given.
-    ///
-    /// This method may have the same performance characteristics as
-    /// `is_match`, except it provides an end location for a match. In
-    /// particular, the location returned *may be shorter* than the proper end
-    /// of the leftmost-first match.
-    ///
-    /// # Example
-    ///
-    /// Typically, `a+` would match the entire first sequence of `a` in some
-    /// text, but `shortest_match` can give up as soon as it sees the first
-    /// `a`.
-    ///
-    /// ```rust
-    /// # extern crate regex; use regex::Regex;
-    /// # fn main() {
-    /// let text = "aaaaa";
-    /// let pos = Regex::new(r"a+").unwrap().shortest_match(text);
-    /// assert_eq!(pos, Some(1));
-    /// # }
-    /// ```
-    pub fn shortest_match(&self, text: &str) -> Option<usize> {
-        self.shortest_match_at(text, 0)
-    }
-
-    /// Returns the same as shortest_match, but starts the search at the given
-    /// offset.
-    ///
-    /// The significance of the starting point is that it takes the surrounding
-    /// context into consideration. For example, the `\A` anchor can only
-    /// match when `start == 0`.
-    #[doc(hidden)]
-    pub fn shortest_match_at(
-        &self,
-        text: &str,
-        start: usize,
-    ) -> Option<usize> {
-        match self.0 {
-            _Regex::Dynamic(ref exec) => {
-                exec.searcher_str().shortest_match_at(text, start)
-            }
-            _Regex::Plugin(ref plug) => plug.shortest_match_at(text, start),
-        }
-    }
-
-    /// Returns the same as is_match, but starts the search at the given
-    /// offset.
-    ///
-    /// The significance of the starting point is that it takes the surrounding
-    /// context into consideration. For example, the `\A` anchor can only
-    /// match when `start == 0`.
-    #[doc(hidden)]
-    pub fn is_match_at(&self, text: &str, start: usize) -> bool {
-        self.shortest_match_at(text, start).is_some()
-    }
-
-    /// Returns the same as find, but starts the search at the given
-    /// offset.
-    ///
-    /// The significance of the starting point is that it takes the surrounding
-    /// context into consideration. For example, the `\A` anchor can only
-    /// match when `start == 0`.
-    #[doc(hidden)]
-    pub fn find_at<'t>(
-        &self,
-        text: &'t str,
-        start: usize,
-    ) -> Option<Match<'t>> {
-        match self.0 {
-            _Regex::Dynamic(ref exec) => {
-                exec.searcher_str().find_at(text, start).map(|(s, e)| {
-                    Match::new(text, s, e)
-                })
-            }
-            _Regex::Plugin(ref plug) => {
-                plug.find_at(text, start).map(|(s, e)| Match::new(text, s, e))
-            }
-        }
-    }
-
-    /// Returns the same as captures, but starts the search at the given
-    /// offset and populates the capture locations given.
-    ///
-    /// The significance of the starting point is that it takes the surrounding
-    /// context into consideration. For example, the `\A` anchor can only
-    /// match when `start == 0`.
-    #[doc(hidden)]
-    pub fn read_captures_at<'t>(
-        &self,
-        locs: &mut Locations,
-        text: &'t str,
-        start: usize,
-    ) -> Option<Match<'t>> {
-        match self.0 {
-            _Regex::Dynamic(ref exec) => {
-                exec.searcher_str().read_captures_at(locs, text, start)
-                    .map(|(s, e)| Match::new(text, s, e))
-            }
-            _Regex::Plugin(ref plug) => {
-                plug.read_captures_at(locs, text, start)
-                    .map(|(s, e)| Match::new(text, s, e))
-            }
-        }
-    }
-}
-
-/// Auxiliary methods.
-impl Regex {
-    /// Returns the original string of this regex.
-    pub fn as_str(&self) -> &str {
-        match self.0 {
-            _Regex::Dynamic(ref exec) => &exec.regex_strings()[0],
-            _Regex::Plugin(ref plug) => &plug.original,
-        }
-    }
-
-    /// Returns an iterator over the capture names.
-    pub fn capture_names(&self) -> CaptureNames {
-        CaptureNames(match self.0 {
-            _Regex::Plugin(ref n) => _CaptureNames::Plugin(n.names.iter()),
-            _Regex::Dynamic(ref d) => {
-                _CaptureNames::Dynamic(d.capture_names().iter())
-            }
-        })
-    }
-
-    /// Returns the number of captures.
-    pub fn captures_len(&self) -> usize {
-        match self.0 {
-            _Regex::Plugin(ref n) => n.names.len(),
-            _Regex::Dynamic(ref d) => d.capture_names().len()
-        }
-    }
-
-    /// Returns an empty set of locations that can be reused in multiple calls
-    /// to `read_captures`.
-    #[doc(hidden)]
-    pub fn locations(&self) -> Locations {
-        match self.0 {
-            _Regex::Dynamic(ref exec) => {
-                exec.searcher_str().locations()
-            }
-            _Regex::Plugin(ref plug) => plug.locations(),
-        }
-    }
-}
-
-/// An iterator over the names of all possible captures.
-///
-/// `None` indicates an unnamed capture; the first element (capture 0, the
-/// whole matched region) is always unnamed.
-///
-/// `'r` is the lifetime of the compiled regular expression.
-pub struct CaptureNames<'r>(_CaptureNames<'r>);
-
-enum _CaptureNames<'r> {
-    Plugin(::std::slice::Iter<'r, Option<&'static str>>),
-    Dynamic(::std::slice::Iter<'r, Option<String>>)
-}
-
-impl<'r> Iterator for CaptureNames<'r> {
-    type Item = Option<&'r str>;
-
-    fn next(&mut self) -> Option<Option<&'r str>> {
-        match self.0 {
-            _CaptureNames::Plugin(ref mut i) => i.next().cloned(),
-            _CaptureNames::Dynamic(ref mut i) => {
-                i.next().as_ref().map(|o| o.as_ref().map(|s| s.as_ref()))
-            }
-        }
-    }
-
-    fn size_hint(&self) -> (usize, Option<usize>) {
-        match self.0 {
-            _CaptureNames::Plugin(ref i)  => i.size_hint(),
-            _CaptureNames::Dynamic(ref i) => i.size_hint(),
-        }
-    }
-}
-
-/// Yields all substrings delimited by a regular expression match.
-///
-/// `'r` is the lifetime of the compiled regular expression and `'t` is the
-/// lifetime of the string being split.
-pub struct Split<'r, 't> {
-    finder: Matches<'r, 't>,
-    last: usize,
-}
-
-impl<'r, 't> Iterator for Split<'r, 't> {
-    type Item = &'t str;
-
-    fn next(&mut self) -> Option<&'t str> {
-        let text = self.finder.text();
-        match self.finder.next() {
-            None => {
-                if self.last >= text.len() {
-                    None
-                } else {
-                    let s = &text[self.last..];
-                    self.last = text.len();
-                    Some(s)
-                }
-            }
-            Some(m) => {
-                let matched = &text[self.last..m.start()];
-                self.last = m.end();
-                Some(matched)
-            }
-        }
-    }
-}
-
-/// Yields at most `N` substrings delimited by a regular expression match.
-///
-/// The last substring will be whatever remains after splitting.
-///
-/// `'r` is the lifetime of the compiled regular expression and `'t` is the
-/// lifetime of the string being split.
-pub struct SplitN<'r, 't> {
-    splits: Split<'r, 't>,
-    n: usize,
-}
-
-impl<'r, 't> Iterator for SplitN<'r, 't> {
-    type Item = &'t str;
-
-    fn next(&mut self) -> Option<&'t str> {
-        if self.n == 0 {
-            return None
-        }
-        self.n -= 1;
-        if self.n == 0 {
-            let text = self.splits.finder.text();
-            Some(&text[self.splits.last..])
-        } else {
-            self.splits.next()
-        }
-    }
-}
-
-enum NamedGroups {
-    Plugin(&'static [(&'static str, usize)]),
-    Dynamic(Arc<HashMap<String, usize>>),
-}
-
-impl NamedGroups {
-    fn from_regex(regex: &Regex) -> NamedGroups {
-        match regex.0 {
-            _Regex::Plugin(ref plug) => NamedGroups::Plugin(&plug.groups),
-            _Regex::Dynamic(ref exec) => {
-                NamedGroups::Dynamic(exec.capture_name_idx().clone())
-            }
-        }
-    }
-
-    fn pos(&self, name: &str) -> Option<usize> {
-        match *self {
-            NamedGroups::Plugin(groups) => {
-                groups.binary_search_by(|&(n, _)| n.cmp(name))
-                      .ok().map(|i| groups[i].1)
-            },
-            NamedGroups::Dynamic(ref groups) => {
-                groups.get(name).map(|i| *i)
-            },
-        }
-    }
-
-    fn iter<'n>(&'n self) -> NamedGroupsIter<'n> {
-        match *self {
-            NamedGroups::Plugin(g) => NamedGroupsIter::Plugin(g.iter()),
-            NamedGroups::Dynamic(ref g) => NamedGroupsIter::Dynamic(g.iter()),
-        }
-    }
-}
-
-enum NamedGroupsIter<'n> {
-    Plugin(::std::slice::Iter<'static, (&'static str, usize)>),
-    Dynamic(::std::collections::hash_map::Iter<'n, String, usize>),
-}
-
-impl<'n> Iterator for NamedGroupsIter<'n> {
-    type Item = (&'n str, usize);
-
-    fn next(&mut self) -> Option<Self::Item> {
-        match *self {
-            NamedGroupsIter::Plugin(ref mut it) => it.next().map(|&v| v),
-            NamedGroupsIter::Dynamic(ref mut it) => {
-                it.next().map(|(s, i)| (s.as_ref(), *i))
-            }
-        }
-    }
-}
-
-/// Captures represents a group of captured strings for a single match.
-///
-/// The 0th capture always corresponds to the entire match. Each subsequent
-/// index corresponds to the next capture group in the regex. If a capture
-/// group is named, then the matched string is *also* available via the `name`
-/// method. (Note that the 0th capture is always unnamed and so must be
-/// accessed with the `at` method.)
-///
-/// Positions returned from a capture group are always byte indices.
-///
-/// `'t` is the lifetime of the matched text.
-pub struct Captures<'t> {
-    text: &'t str,
-    locs: Locations,
-    named_groups: NamedGroups,
-}
-
-impl<'t> Captures<'t> {
-    /// Returns the match associated with the capture group at index `i`. If
-    /// `i` does not correspond to a capture group, or if the capture group
-    /// did not participate in the match, then `None` is returned.
-    pub fn get(&self, i: usize) -> Option<Match<'t>> {
-        self.locs.pos(i).map(|(s, e)| Match::new(self.text, s, e))
-    }
-
-    /// Returns the match for the capture group named `name`. If `name` isn't a
-    /// valid capture group or didn't match anything, then `None` is returned.
-    pub fn name(&self, name: &str) -> Option<Match<'t>> {
-        self.named_groups.pos(name).and_then(|i| self.get(i))
-    }
-
-    /// An iterator that yields all capturing matches in the order in which
-    /// they appear in the regex. If a particular capture group didn't
-    /// participate in the match, then `None` is yielded for that capture.
-    ///
-    /// The first match always corresponds to the overall match of the regex.
-    pub fn iter<'c>(&'c self) -> SubCaptureMatches<'c, 't> {
-        SubCaptureMatches {
-            caps: self,
-            it: self.locs.iter(),
-        }
-    }
-
-    /// Expands all instances of `$name` in `text` to the corresponding capture
-    /// group `name`, and writes them to the `dst` buffer given.
-    ///
-    /// `name` may be an integer corresponding to the index of the
-    /// capture group (counted by order of opening parenthesis where `0` is the
-    /// entire match) or it can be a name (consisting of letters, digits or
-    /// underscores) corresponding to a named capture group.
-    ///
-    /// If `name` isn't a valid capture group (whether the name doesn't exist
-    /// or isn't a valid index), then it is replaced with the empty string.
-    ///
-    /// The longest possible name is used. e.g., `$1a` looks up the capture
-    /// group named `1a` and not the capture group at index `1`. To exert more
-    /// precise control over the name, use braces, e.g., `${1}a`.
-    ///
-    /// To write a literal `$` use `$$`.
-    pub fn expand(&self, replacement: &str, dst: &mut String) {
-        expand_str(self, replacement, dst)
-    }
-
-    /// Returns the number of captured groups.
-    ///
-    /// This is always at least `1`, since every regex has at least one capture
-    /// group that corresponds to the full match.
-    #[inline]
-    pub fn len(&self) -> usize {
-        self.locs.len()
-    }
-}
-
-impl<'t> fmt::Debug for Captures<'t> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.debug_tuple("Captures").field(&CapturesDebug(self)).finish()
-    }
-}
-
-struct CapturesDebug<'c, 't: 'c>(&'c Captures<'t>);
-
-impl<'c, 't> fmt::Debug for CapturesDebug<'c, 't> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        // We'd like to show something nice here, even if it means an
-        // allocation to build a reverse index.
-        let slot_to_name: HashMap<usize, &str> =
-            self.0.named_groups.iter().map(|(a, b)| (b, a)).collect();
-        let mut map = f.debug_map();
-        for (slot, m) in self.0.locs.iter().enumerate() {
-            let m = m.map(|(s, e)| &self.0.text[s..e]);
-            if let Some(ref name) = slot_to_name.get(&slot) {
-                map.entry(&name, &m);
-            } else {
-                map.entry(&slot, &m);
-            }
-        }
-        map.finish()
-    }
-}
-
-/// Get a group by index.
-///
-/// `'t` is the lifetime of the matched text.
-///
-/// The text can't outlive the `Captures` object if this method is
-/// used, because of how `Index` is defined (normally `a[i]` is part
-/// of `a` and can't outlive it); to do that, use `at()` instead.
-///
-/// # Panics
-///
-/// If there is no group at the given index.
-impl<'t> Index<usize> for Captures<'t> {
-    type Output = str;
-
-    fn index(&self, i: usize) -> &str {
-        self.get(i).map(|m| m.as_str())
-            .unwrap_or_else(|| panic!("no group at index '{}'", i))
-    }
-}
-
-/// Get a group by name.
-///
-/// `'t` is the lifetime of the matched text and `'i` is the lifetime
-/// of the group name (the index).
-///
-/// The text can't outlive the `Captures` object if this method is
-/// used, because of how `Index` is defined (normally `a[i]` is part
-/// of `a` and can't outlive it); to do that, use `name` instead.
-///
-/// # Panics
-///
-/// If there is no group named by the given value.
-impl<'t, 'i> Index<&'i str> for Captures<'t> {
-    type Output = str;
-
-    fn index<'a>(&'a self, name: &'i str) -> &'a str {
-        self.name(name).map(|m| m.as_str())
-            .unwrap_or_else(|| panic!("no group named '{}'", name))
-    }
-}
-
-/// An iterator that yields all capturing matches in the order in which they
-/// appear in the regex.
-///
-/// If a particular capture group didn't participate in the match, then `None`
-/// is yielded for that capture. The first match always corresponds to the
-/// overall match of the regex.
-///
-/// The lifetime `'c` corresponds to the lifetime of the `Captures` value, and
-/// the lifetime `'t` corresponds to the originally matched text.
-pub struct SubCaptureMatches<'c, 't: 'c> {
-    caps: &'c Captures<'t>,
-    it: SubCapturesPosIter<'c>,
-}
-
-impl<'c, 't> Iterator for SubCaptureMatches<'c, 't> {
-    type Item = Option<Match<'t>>;
-
-    fn next(&mut self) -> Option<Option<Match<'t>>> {
-        self.it.next()
-            .map(|cap| cap.map(|(s, e)| Match::new(self.caps.text, s, e)))
-    }
-}
-
-/// An iterator that yields all non-overlapping capture groups matching a
-/// particular regular expression.
-///
-/// The iterator stops when no more matches can be found.
-///
-/// `'r` is the lifetime of the compiled regular expression and `'t` is the
-/// lifetime of the matched string.
-pub struct CaptureMatches<'r, 't>(CaptureMatchesInner<'r, 't>);
-
-enum CaptureMatchesInner<'r, 't> {
-    Dynamic(re_trait::CaptureMatches<'t, ExecNoSyncStr<'r>>),
-    Plugin(re_trait::CaptureMatches<'t, Plugin>),
-}
-
-impl<'r, 't> Iterator for CaptureMatches<'r, 't> {
-    type Item = Captures<'t>;
-
-    fn next(&mut self) -> Option<Captures<'t>> {
-        match self.0 {
-            CaptureMatchesInner::Dynamic(ref mut it) => {
-                let named = it.regex().capture_name_idx().clone();
-                it.next().map(|locs| Captures {
-                    text: it.text(),
-                    locs: locs,
-                    named_groups: NamedGroups::Dynamic(named),
-                })
-            }
-            CaptureMatchesInner::Plugin(ref mut it) => {
-                it.next().map(|locs| Captures {
-                    text: it.text(),
-                    locs: locs,
-                    named_groups: NamedGroups::Plugin(it.regex().groups),
-                })
-            }
-        }
-    }
-}
-
-/// An iterator over all non-overlapping matches for a particular string.
-///
-/// The iterator yields a `Match` value. The iterator stops when no more
-/// matches can be found.
-///
-/// `'r` is the lifetime of the compiled regular expression and `'t` is the
-/// lifetime of the matched string.
-pub struct Matches<'r, 't>(MatchesInner<'r, 't>);
-
-enum MatchesInner<'r, 't> {
-    Dynamic(re_trait::Matches<'t, ExecNoSyncStr<'r>>),
-    Plugin(re_trait::Matches<'t, Plugin>),
-}
-
-impl<'r, 't> Matches<'r, 't> {
-    fn text(&self) -> &'t str {
-        match self.0 {
-            MatchesInner::Dynamic(ref it) => it.text(),
-            MatchesInner::Plugin(ref it) => it.text(),
-        }
-    }
-}
-
-impl<'r, 't> Iterator for Matches<'r, 't> {
-    type Item = Match<'t>;
-
-    fn next(&mut self) -> Option<Match<'t>> {
-        let text = self.text();
-        match self.0 {
-            MatchesInner::Dynamic(ref mut it) => {
-                it.next().map(|(s, e)| Match::new(text, s, e))
-            }
-            MatchesInner::Plugin(ref mut it) => {
-                it.next().map(|(s, e)| Match::new(text, s, e))
-            }
-        }
-    }
-}
-
-/// Replacer describes types that can be used to replace matches in a string.
-///
-/// In general, users of this crate shouldn't need to implement this trait,
-/// since implementations are already provided for `&str` and
-/// `FnMut(&Captures) -> String`, which covers most use cases.
-pub trait Replacer {
-    /// Appends text to `dst` to replace the current match.
-    ///
-    /// The current match is represented by `caps`, which is guaranteed to
-    /// have a match at capture group `0`.
-    ///
-    /// For example, a no-op replacement would be
-    /// `dst.extend(caps.get(0).unwrap().as_str())`.
-    fn replace_append(&mut self, caps: &Captures, dst: &mut String);
-
-    /// Return a fixed unchanging replacement string.
-    ///
-    /// When doing replacements, if access to `Captures` is not needed (e.g.,
-    /// the replacement byte string does not need `$` expansion), then it can
-    /// be beneficial to avoid finding sub-captures.
-    ///
-    /// In general, this is called once for every call to `replacen`.
-    fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, str>> {
-        None
-    }
-}
-
-impl<'a> Replacer for &'a str {
-    fn replace_append(&mut self, caps: &Captures, dst: &mut String) {
-        caps.expand(*self, dst);
-    }
-
-    fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, str>> {
-        match memchr(b'$', self.as_bytes()) {
-            Some(_) => None,
-            None => Some(Cow::Borrowed(*self)),
-        }
-    }
-}
-
-impl<F> Replacer for F where F: FnMut(&Captures) -> String {
-    fn replace_append(&mut self, caps: &Captures, dst: &mut String) {
-        dst.push_str(&(*self)(caps));
-    }
-}
-
-/// NoExpand indicates literal string replacement.
-///
-/// It can be used with `replace` and `replace_all` to do a literal string
-/// replacement without expanding `$name` to their corresponding capture
-/// groups. This can be both convenient (to avoid escaping `$`, for example)
-/// and performant (since capture groups don't need to be found).
-///
-/// `'t` is the lifetime of the literal text.
-pub struct NoExpand<'t>(pub &'t str);
-
-impl<'t> Replacer for NoExpand<'t> {
-    fn replace_append(&mut self, _: &Captures, dst: &mut String) {
-        dst.push_str(self.0);
-    }
-
-    fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, str>> {
-        Some(Cow::Borrowed(self.0))
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/simd_accel/mod.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#[cfg(target_feature = "ssse3")]
-pub mod teddy128;
-#[cfg(not(target_feature = "ssse3"))]
-#[path = "../simd_fallback/teddy128.rs"]
-pub mod teddy128;
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/simd_accel/teddy128.rs
+++ /dev/null
@@ -1,794 +0,0 @@
-/*!
-Teddy is a simd accelerated multiple substring matching algorithm. The name
-and the core ideas in the algorithm were learned from the [Hyperscan][1_u]
-project.
-
-
-Background
-----------
-
-The key idea of Teddy is to do *packed* substring matching. In the literature,
-packed substring matching is the idea of examing multiple bytes in a haystack
-at a time to detect matches. Implementations of, for example, memchr (which
-detects matches of a single byte) have been doing this for years. Only
-recently, with the introduction of various SIMD instructions, has this been
-extended to substring matching. The PCMPESTRI instruction (and its relatives),
-for example, implements substring matching in hardware. It is, however, limited
-to substrings of length 16 bytes or fewer, but this restriction is fine in a
-regex engine, since we rarely care about the performance difference between
-searching for a 16 byte literal and a 16 + N literal—16 is already long
-enough. The key downside of the PCMPESTRI instruction, on current (2016) CPUs
-at least, is its latency and throughput. As a result, it is often faster to do
-substring search with a Boyer-Moore variant and a well placed memchr to quickly
-skip through the haystack.
-
-There are fewer results from the literature on packed substring matching,
-and even fewer for packed multiple substring matching. Ben-Kiki et al. [2]
-describes use of PCMPESTRI for substring matching, but is mostly theoretical
-and hand-waves performance. There is other theoretical work done by Bille [3]
-as well.
-
-The rest of the work in the field, as far as I'm aware, is by Faro and Kulekci
-and is generally focused on multiple pattern search. Their first paper [4a]
-introduces the concept of a fingerprint, which is computed for every block of
-N bytes in every pattern. The haystack is then scanned N bytes at a time and
-a fingerprint is computed in the same way it was computed for blocks in the
-patterns. If the fingerprint corresponds to one that was found in a pattern,
-then a verification step follows to confirm that one of the substrings with the
-corresponding fingerprint actually matches at the current location. Various
-implementation tricks are employed to make sure the fingerprint lookup is fast;
-typically by truncating the fingerprint. (This may, of course, provoke more
-steps in the verification process, so a balance must be struck.)
-
-The main downside of [4a] is that the minimum substring length is 32 bytes,
-presumably because of how the algorithm uses certain SIMD instructions. This
-essentially makes it useless for general purpose regex matching, where a small
-number of short patterns is far more likely.
-
-Faro and Kulekci published another paper [4b] that is conceptually very similar
-to [4a]. The key difference is that it uses the CRC32 instruction (introduced
-as part of SSE 4.2) to compute fingerprint values. This also enables the
-algorithm to work effectively on substrings as short as 7 bytes with 4 byte
-windows. 7 bytes is unfortunately still too long. The window could be
-technically shrunk to 2 bytes, thereby reducing minimum length to 3, but the
-small window size ends up negating most performance benefits—and it's likely
-the common case in a general purpose regex engine.
-
-Faro and Kulekci also published [4c] that appears to be intended as a
-replacement to using PCMPESTRI. In particular, it is specifically motivated by
-the high throughput/latency time of PCMPESTRI and therefore chooses other SIMD
-instructions that are faster. While this approach works for short substrings,
-I personally couldn't see a way to generalize it to multiple substring search.
-
-Faro and Kulekci have another paper [4d] that I haven't been able to read
-because it is behind a paywall.
-
-
-Teddy
------
-
-Finally, we get to Teddy. If the above literature review is complete, then it
-appears that Teddy is a novel algorithm. More than that, in my experience, it
-completely blows away the competition for short substrings, which is exactly
-what we want in a general purpose regex engine. Again, the algorithm appears
-to be developed by the authors of [Hyperscan][1_u]. Hyperscan was open sourced
-late 2015, and no earlier history could be found. Therefore, tracking the exact
-provenance of the algorithm with respect to the published literature seems
-difficult.
-
-DISCLAIMER: My understanding of Teddy is limited to reading auto-generated C
-code, its disassembly and observing its runtime behavior.
-
-At a high level, Teddy works somewhat similarly to the fingerprint algorithms
-published by Faro and Kulekci, but Teddy does it in a way that scales a bit
-better. Namely:
-
-1. Teddy's core algorithm scans the haystack in 16 byte chunks. 16 is
-   significant because it corresponds to the number of bytes in a SIMD vector.
-   If one used AVX2 instructions, then we could scan the haystack in 32 byte
-   chunks. Similarly, if one used AVX512 instructions, we could scan the
-   haystack in 64 byte chunks. Hyperscan implements SIMD + AVX2, we only
-   implement SIMD for the moment. (The author doesn't have a CPU with AVX2
-   support... yet.)
-2. Bitwise operations are performed on each chunk to discover if any region of
-   it matches a set of precomputed fingerprints from the patterns. If there are
-   matches, then a verification step is performed. In this implementation, our
-   verification step is naive. This can be improved upon.
-
-The details to make this work are quite clever. First, we must choose how to
-pick our fingerprints. In Hyperscan's implementation, I *believe* they use the
-last N bytes of each substring, where N must be at least the minimum length of
-any substring in the set being searched. In this implementation, we use the
-first N bytes of each substring. (The tradeoffs between these choices aren't
-yet clear to me.) We then must figure out how to quickly test whether an
-occurrence of any fingerprint from the set of patterns appears in a 16 byte
-block from the haystack. To keep things simple, let's assume N = 1 and examine
-some examples to motivate the approach. Here are our patterns:
-
-```ignore
-foo
-bar
-baz
-```
-
-The corresponding fingerprints, for N = 1, are `f`, `b` and `b`. Now let's set
-our 16 byte block to:
-
-```ignore
-bat cat foo bump
-xxxxxxxxxxxxxxxx
-```
-
-To cut to the chase, Teddy works by using bitsets. In particular, Teddy creates
-a mask that allows us to quickly compute membership of a fingerprint in a 16
-byte block that also tells which pattern the fingerprint corresponds to. In
-this case, our fingerprint is a single byte, so an appropriate abstraction is
-a map from a single byte to a list of patterns that contain that fingerprint:
-
-```ignore
-f |--> foo
-b |--> bar, baz
-```
-
-Now, all we need to do is figure out how to represent this map in vector space
-and use normal SIMD operations to perform a lookup. The first simplification
-we can make is to represent our patterns as bit fields occupying a single
-byte. This is important, because a single SIMD vector can store 16 bytes.
-
-```ignore
-f |--> 00000001
-b |--> 00000010, 00000100
-```
-
-How do we perform lookup though? It turns out that SSSE3 introduced a very cool
-instruction called PSHUFB. The instruction takes two SIMD vectors, `A` and `B`,
-and returns a third vector `C`. All vectors are treated as 16 8-bit integers.
-`C` is formed by `C[i] = A[B[i]]`. (This is a bit of a simplification, but true
-for the purposes of this algorithm. For full details, see [Intel's Intrinsics
-Guide][5_u].) This essentially lets us use the values in `B` to lookup values in
-`A`.
-
-If we could somehow cause `B` to contain our 16 byte block from the haystack,
-and if `A` could contain our bitmasks, then we'd end up with something like
-this for `A`:
-
-```ignore
-    0x00 0x01 ... 0x62      ... 0x66      ... 0xFF
-A = 0    0        00000110      00000001      0
-```
-
-And if `B` contains our window from our haystack, we could use shuffle to take
-the values from `B` and use them to look up our bitsets in `A`. But of course,
-we can't do this because `A` in the above example contains 256 bytes, which
-is much larger than the size of a SIMD vector.
-
-Nybbles to the rescue! A nybble is 4 bits. Instead of one mask to hold all of
-our bitsets, we can use two masks, where one mask corresponds to the lower four
-bits of our fingerprint and the other mask corresponds to the upper four bits.
-So our map now looks like:
-
-```ignore
-'f' & 0xF = 0x6 |--> 00000001
-'f' >> 4  = 0x6 |--> 00000111
-'b' & 0xF = 0x2 |--> 00000110
-'b' >> 4  = 0x6 |--> 00000111
-```
-
-Notice that the bitsets for each nybble correspond to the union of all
-fingerprints that contain that nibble. For example, both `f` and `b` have the
-same upper 4 bits but differ on the lower 4 bits. Putting this together, we
-have `A0`, `A1` and `B`, where `A0` is our mask for the lower nybble, `A1` is
-our mask for the upper nybble and `B` is our 16 byte block from the haystack:
-
-```ignore
-      0x00 0x01 0x02      0x03 ... 0x06      ... 0xF
-A0 =  0    0    00000110  0        00000001      0
-A1 =  0    0    0         0        00000111      0
-B  =  b    a    t         _        t             p
-B  =  0x62 0x61 0x74      0x20     0x74          0x70
-```
-
-But of course, we can't use `B` with `PSHUFB` yet, since its values are 8 bits,
-and we need indexes that are at most 4 bits (corresponding to one of 16
-values). We can apply the same transformation to split `B` into lower and upper
-nybbles as we did `A`. As before, `B0` corresponds to the lower nybbles and
-`B1` corresponds to the upper nybbles:
-
-```ignore
-     b   a   t   _   c   a   t   _   f   o   o   _   b   u   m   p
-B0 = 0x2 0x1 0x4 0x0 0x3 0x1 0x4 0x0 0x6 0xF 0xF 0x0 0x2 0x5 0xD 0x0
-B1 = 0x6 0x6 0x7 0x2 0x6 0x6 0x7 0x2 0x6 0x6 0x6 0x2 0x6 0x7 0x6 0x7
-```
-
-And now we have a nice correspondence. `B0` can index `A0` and `B1` can index
-`A1`. Here's what we get when we apply `C0 = PSHUFB(A0, B0)`:
-
-```ignore
-     b         a        ... f         o         ... p
-     A0[0x2]   A0[0x1]      A0[0x6]   A0[0xF]       A0[0x0]
-C0 = 00000110  0            00000001  0             0
-```
-
-And `C1 = PSHUFB(A1, B1)`:
-
-```ignore
-     b         a        ... f         o        ... p
-     A1[0x6]   A1[0x6]      A1[0x6]   A1[0x6]      A1[0x7]
-C1 = 00000111  00000111     00000111  00000111     0
-```
-
-Notice how neither one of `C0` or `C1` is guaranteed to report fully correct
-results all on its own. For example, `C1` claims that `b` is a fingerprint for
-the pattern `foo` (since `A1[0x6] = 00000111`), and that `o` is a fingerprint
-for all of our patterns. But if we combined `C0` and `C1` with an `AND`
-operation:
-
-```
-     b         a        ... f         o        ... p
-C  = 00000110  0            00000001  0            0
-```
-
-Then we now have that `C[i]` contains a bitset corresponding to the matching
-fingerprints in a haystack's 16 byte block, where `i` is the `ith` byte in that
-block.
-
-Once we have that, we can look for the position of the least significant bit
-in `C`. That position, modulo `8`, gives us the pattern that the fingerprint
-matches. That position, integer divided by `8`, also gives us the byte offset
-that the fingerprint occurs in inside the 16 byte haystack block. Using those
-two pieces of information, we can run a verification procedure that tries
-to match all substrings containing that fingerprint at that position in the
-haystack.
-
-
-Implementation notes
---------------------
-
-The problem with the algorithm as described above is that it uses a single byte
-for a fingerprint. This will work well if the fingerprints are rare in the
-haystack (e.g., capital letters or special characters in normal English text),
-but if the fingerprints are common, you'll wind up spending too much time in
-the verification step, which effectively negate the performance benefits of
-scanning 16 bytes at a time. Remember, the key to the performance of this
-algorithm is to do as little work as possible per 16 bytes.
-
-This algorithm can be extrapolated in a relatively straight-forward way to use
-larger fingerprints. That is, instead of a single byte prefix, we might use a
-three byte prefix. The implementation below implements N = {1, 2, 3} and always
-picks the largest N possible. The rationale is that the bigger the fingerprint,
-the fewer verification steps we'll do. Of course, if N is too large, then we'll
-end up doing too much on each step.
-
-The way to extend it is:
-
-1. Add a mask for each byte in the fingerprint. (Remember that each mask is
-   composed of two SIMD vectors.) This results in a value of `C` for each byte
-   in the fingerprint while searching.
-2. When testing each 16 byte block, each value of `C` must be shifted so that
-   they are aligned. Once aligned, they should all be `AND`'d together. This
-   will give you only the bitsets corresponding to the full match of the
-   fingerprint.
-
-The implementation below is commented to fill in the nitty gritty details.
-
-References
-----------
-
-- **[1]** [Hyperscan on GitHub](https://github.com/01org/hyperscan),
-    [webpage](https://01.org/hyperscan)
-- **[2a]** Ben-Kiki, O., Bille, P., Breslauer, D., Gasieniec, L., Grossi, R.,
-    & Weimann, O. (2011).
-    _Optimal packed string matching_.
-    In LIPIcs-Leibniz International Proceedings in Informatics (Vol. 13).
-    Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik.
-    DOI: 10.4230/LIPIcs.FSTTCS.2011.423.
-    [PDF](http://drops.dagstuhl.de/opus/volltexte/2011/3355/pdf/37.pdf).
-- **[2b]** Ben-Kiki, O., Bille, P., Breslauer, D., Ga̧sieniec, L., Grossi, R.,
-    & Weimann, O. (2014).
-    _Towards optimal packed string matching_.
-    Theoretical Computer Science, 525, 111-129.
-    DOI: 10.1016/j.tcs.2013.06.013.
-    [PDF](http://www.cs.haifa.ac.il/~oren/Publications/bpsm.pdf).
-- **[3]** Bille, P. (2011).
-    _Fast searching in packed strings_.
-    Journal of Discrete Algorithms, 9(1), 49-56.
-    DOI: 10.1016/j.jda.2010.09.003.
-    [PDF](http://www.sciencedirect.com/science/article/pii/S1570866710000353).
-- **[4a]** Faro, S., & Külekci, M. O. (2012, October).
-    _Fast multiple string matching using streaming SIMD extensions technology_.
-    In String Processing and Information Retrieval (pp. 217-228).
-    Springer Berlin Heidelberg.
-    DOI: 10.1007/978-3-642-34109-0_23.
-    [PDF](http://www.dmi.unict.it/~faro/papers/conference/faro32.pdf).
-- **[4b]** Faro, S., & Külekci, M. O. (2013, September).
-    _Towards a Very Fast Multiple String Matching Algorithm for Short Patterns_.
-    In Stringology (pp. 78-91).
-    [PDF](http://www.dmi.unict.it/~faro/papers/conference/faro36.pdf).
-- **[4c]** Faro, S., & Külekci, M. O. (2013, January).
-    _Fast packed string matching for short patterns_.
-    In Proceedings of the Meeting on Algorithm Engineering & Expermiments
-    (pp. 113-121).
-    Society for Industrial and Applied Mathematics.
-    [PDF](http://arxiv.org/pdf/1209.6449.pdf).
-- **[4d]** Faro, S., & Külekci, M. O. (2014).
-    _Fast and flexible packed string matching_.
-    Journal of Discrete Algorithms, 28, 61-72.
-    DOI: 10.1016/j.jda.2014.07.003.
-
-[1_u]: https://github.com/01org/hyperscan
-[5_u]: https://software.intel.com/sites/landingpage/IntrinsicsGuide
-*/
-
-// TODO: Extend this to use AVX2 instructions.
-// TODO: Extend this to use AVX512 instructions.
-// TODO: Make the inner loop do aligned loads.
-
-use std::cmp;
-use std::ptr;
-
-use aho_corasick::{Automaton, AcAutomaton, FullAcAutomaton};
-use simd::u8x16;
-use simd::x86::sse2::Sse2Bool8ix16;
-use simd::x86::ssse3::Ssse3U8x16;
-
-use syntax;
-
-/// Corresponds to the number of bytes read at a time in the haystack.
-const BLOCK_SIZE: usize = 16;
-
-pub fn is_teddy_128_available() -> bool {
-    true
-}
-
-/// Match reports match information.
-#[derive(Debug, Clone)]
-pub struct Match {
-    /// The index of the pattern that matched. The index is in correspondence
-    /// with the order of the patterns given at construction.
-    pub pat: usize,
-    /// The start byte offset of the match.
-    pub start: usize,
-    /// The end byte offset of the match. This is always `start + pat.len()`.
-    pub end: usize,
-}
-
-/// A SIMD accelerated multi substring searcher.
-#[derive(Debug, Clone)]
-pub struct Teddy {
-    /// A list of substrings to match.
-    pats: Vec<Vec<u8>>,
-    /// An Aho-Corasick automaton of the patterns. We use this when we need to
-    /// search pieces smaller than the Teddy block size.
-    ac: FullAcAutomaton<Vec<u8>>,
-    /// A set of 8 buckets. Each bucket corresponds to a single member of a
-    /// bitset. A bucket contains zero or more substrings. This is useful
-    /// when the number of substrings exceeds 8, since our bitsets cannot have
-    /// more than 8 members.
-    buckets: Vec<Vec<usize>>,
-    /// Our set of masks. There's one mask for each byte in the fingerprint.
-    masks: Masks,
-}
-
-/// A list of masks. This has length equal to the length of the fingerprint.
-/// The length of the fingerprint is always `min(3, len(smallest_substring))`.
-#[derive(Debug, Clone)]
-struct Masks(Vec<Mask>);
-
-/// A single mask.
-#[derive(Debug, Clone, Copy)]
-struct Mask {
-    /// Bitsets for the low nybbles in a fingerprint.
-    lo: u8x16,
-    /// Bitsets for the high nybbles in a fingerprint.
-    hi: u8x16,
-}
-
-impl Teddy {
-    /// Create a new `Teddy` multi substring matcher.
-    ///
-    /// If a `Teddy` matcher could not be created (e.g., `pats` is empty or has
-    /// an empty substring), then `None` is returned.
-    pub fn new(pats: &syntax::Literals) -> Option<Teddy> {
-        let pats: Vec<_> = pats.literals().iter().map(|p|p.to_vec()).collect();
-        let min_len = pats.iter().map(|p| p.len()).min().unwrap_or(0);
-        // Don't allow any empty patterns and require that we have at
-        // least one pattern.
-        if min_len < 1 {
-            return None;
-        }
-        // Pick the largest mask possible, but no larger than 3.
-        let nmasks = cmp::min(3, min_len);
-        let mut masks = Masks::new(nmasks);
-        let mut buckets = vec![vec![]; 8];
-        // Assign a substring to each bucket, and add the bucket's bitfield to
-        // the appropriate position in the mask.
-        for (pati, pat) in pats.iter().enumerate() {
-            let bucket = pati % 8;
-            buckets[bucket].push(pati);
-            masks.add(bucket as u8, pat);
-        }
-        Some(Teddy {
-            pats: pats.to_vec(),
-            ac: AcAutomaton::new(pats.to_vec()).into_full(),
-            buckets: buckets,
-            masks: masks,
-        })
-    }
-
-    /// Returns all of the substrings matched by this `Teddy`.
-    pub fn patterns(&self) -> &[Vec<u8>] {
-        &self.pats
-    }
-
-    /// Returns the number of substrings in this matcher.
-    pub fn len(&self) -> usize {
-        self.pats.len()
-    }
-
-    /// Returns the approximate size on the heap used by this matcher.
-    pub fn approximate_size(&self) -> usize {
-        self.pats.iter().fold(0, |a, b| a + b.len())
-    }
-
-    /// Searches `haystack` for the substrings in this `Teddy`. If a match was
-    /// found, then it is returned. Otherwise, `None` is returned.
-    pub fn find(&self, haystack: &[u8]) -> Option<Match> {
-        // If our haystack is smaller than the block size, then fall back to
-        // a naive brute force search.
-        if haystack.is_empty() || haystack.len() < (BLOCK_SIZE + 2) {
-            return self.slow(haystack, 0);
-        }
-        match self.masks.len() {
-            0 => None,
-            1 => self.find1(haystack),
-            2 => self.find2(haystack),
-            3 => self.find3(haystack),
-            _ => unreachable!(),
-        }
-    }
-
-    /// `find1` is used when there is only 1 mask. This is the easy case and is
-    /// pretty much as described in the module documentation.
-    #[inline(always)]
-    fn find1(&self, haystack: &[u8]) -> Option<Match> {
-        let mut pos = 0;
-        let zero = u8x16::splat(0);
-        let len = haystack.len();
-        debug_assert!(len >= BLOCK_SIZE);
-        while pos <= len - BLOCK_SIZE {
-            let h = unsafe { u8x16::load_unchecked(haystack, pos) };
-            // N.B. `res0` is our `C` in the module documentation.
-            let res0 = self.masks.members1(h);
-            // Only do expensive verification if there are any non-zero bits.
-            let bitfield = res0.ne(zero).move_mask();
-            if bitfield != 0 {
-                if let Some(m) = self.verify(haystack, pos, res0, bitfield) {
-                    return Some(m);
-                }
-            }
-            pos += BLOCK_SIZE;
-        }
-        self.slow(haystack, pos)
-    }
-
-    /// `find2` is used when there are 2 masks, e.g., the fingerprint is 2 bytes
-    /// long.
-    #[inline(always)]
-    fn find2(&self, haystack: &[u8]) -> Option<Match> {
-        // This is an exotic way to right shift a SIMD vector across lanes.
-        // See below at use for more details.
-        let res0shuffle = u8x16::new(
-            0, 0, 1, 2,
-            3, 4, 5, 6,
-            7, 8, 9, 10,
-            11, 12, 13, 14,
-        );
-        let zero = u8x16::splat(0);
-        let len = haystack.len();
-        // The previous value of `C` (from the module documentation) for the
-        // *first* byte in the fingerprint. On subsequent iterations, we take
-        // the last bitset from the previous `C` and insert it into the first
-        // position of the current `C`, shifting all other bitsets to the right
-        // one lane. This causes `C` for the first byte to line up with `C` for
-        // the second byte, so that they can be `AND`'d together.
-        let mut prev0 = u8x16::splat(0xFF);
-        let mut pos = 1;
-        debug_assert!(len >= BLOCK_SIZE);
-        while pos <= len - BLOCK_SIZE {
-            let h = unsafe { u8x16::load_unchecked(haystack, pos) };
-            let (res0, res1) = self.masks.members2(h);
-
-            // The next three lines are essentially equivalent to
-            //
-            // ```rust,ignore
-            // (prev0 << 15) | (res0 >> 1)
-            // ```
-            //
-            // ... if SIMD vectors could shift across lanes. There is the
-            // `PALIGNR` instruction, but apparently LLVM doesn't expose it as
-            // a proper intrinsic. Thankfully, it appears the following
-            // sequence does indeed compile down to a `PALIGNR`.
-            let prev0byte0 = prev0.extract(15);
-            let res0shiftr8 = res0.shuffle_bytes(res0shuffle);
-            let res0prev0 = res0shiftr8.replace(0, prev0byte0);
-
-            // `AND`'s our `C` values together.
-            let res = res0prev0 & res1;
-            prev0 = res0;
-
-            let bitfield = res.ne(zero).move_mask();
-            if bitfield != 0 {
-                let pos = pos.checked_sub(1).unwrap();
-                if let Some(m) = self.verify(haystack, pos, res, bitfield) {
-                    return Some(m);
-                }
-            }
-            pos += BLOCK_SIZE;
-        }
-        // The windowing above doesn't check the last byte in the last
-        // window, so start the slow search at the last byte of the last
-        // window.
-        self.slow(haystack, pos.checked_sub(1).unwrap())
-    }
-
-    /// `find3` is used when there are 3 masks, e.g., the fingerprint is 3 bytes
-    /// long.
-    ///
-    /// N.B. This is a straight-forward extrapolation of `find2`. The only
-    /// difference is that we need to keep track of two previous values of `C`,
-    /// since we now need to align for three bytes.
-    #[inline(always)]
-    fn find3(&self, haystack: &[u8]) -> Option<Match> {
-        let zero = u8x16::splat(0);
-        let len = haystack.len();
-
-        let res0shuffle = u8x16::new(
-            0, 0, 0, 1,
-            2, 3, 4, 5,
-            6, 7, 8, 9,
-            10, 11, 12, 13,
-        );
-        let res1shuffle = u8x16::new(
-            0, 0, 1, 2,
-            3, 4, 5, 6,
-            7, 8, 9, 10,
-            11, 12, 13, 14,
-        );
-        let mut prev0 = u8x16::splat(0xFF);
-        let mut prev1 = u8x16::splat(0xFF);
-        let mut pos = 2;
-        while pos <= len - BLOCK_SIZE {
-            let h = unsafe { u8x16::load_unchecked(haystack, pos) };
-            let (res0, res1, res2) = self.masks.members3(h);
-
-            let prev0byte0 = prev0.extract(14);
-            let prev0byte1 = prev0.extract(15);
-            let res0shiftr16 = res0.shuffle_bytes(res0shuffle);
-            let res0prev0 = res0shiftr16.replace(0, prev0byte0)
-                                        .replace(1, prev0byte1);
-
-            let prev1byte0 = prev1.extract(15);
-            let res1shiftr8 = res1.shuffle_bytes(res1shuffle);
-            let res1prev1 = res1shiftr8.replace(0, prev1byte0);
-
-            let res = res0prev0 & res1prev1 & res2;
-
-            prev0 = res0;
-            prev1 = res1;
-
-            let bitfield = res.ne(zero).move_mask();
-            if bitfield != 0 {
-                let pos = pos.checked_sub(2).unwrap();
-                if let Some(m) = self.verify(haystack, pos, res, bitfield) {
-                    return Some(m);
-                }
-            }
-            pos += BLOCK_SIZE;
-        }
-        // The windowing above doesn't check the last two bytes in the last
-        // window, so start the slow search at the penultimate byte of the
-        // last window.
-        // self.slow(haystack, pos.saturating_sub(2))
-        self.slow(haystack, pos.checked_sub(2).unwrap())
-    }
-
-    /// Runs the verification procedure on `res` (i.e., `C` from the module
-    /// documentation), where the haystack block starts at `pos` in
-    /// `haystack`. `bitfield` has ones in the bit positions that `res` has
-    /// non-zero bytes.
-    ///
-    /// If a match exists, it returns the first one.
-    #[inline(always)]
-    fn verify(
-        &self,
-        haystack: &[u8],
-        pos: usize,
-        res: u8x16,
-        mut bitfield: u32,
-    ) -> Option<Match> {
-        while bitfield != 0 {
-            // The next offset, relative to pos, where some fingerprint
-            // matched.
-            let byte_pos = bitfield.trailing_zeros();
-            bitfield &= !(1 << byte_pos);
-
-            // Offset relative to the beginning of the haystack.
-            let start = pos + byte_pos as usize;
-
-            // The bitfield telling us which patterns had fingerprints that
-            // match at this starting position.
-            let mut patterns = res.extract(byte_pos);
-            while patterns != 0 {
-                let bucket = patterns.trailing_zeros() as usize;
-                patterns &= !(1 << bucket);
-
-                // Actual substring search verification.
-                if let Some(m) = self.verify_bucket(haystack, bucket, start) {
-                    return Some(m);
-                }
-            }
-        }
-
-        None
-    }
-
-    /// Verifies whether any substring in the given bucket matches in haystack
-    /// at the given starting position.
-    #[inline(always)]
-    fn verify_bucket(
-        &self,
-        haystack: &[u8],
-        bucket: usize,
-        start: usize,
-    ) -> Option<Match> {
-        // This cycles through the patterns in the bucket in the order that
-        // the patterns were given. Therefore, we guarantee leftmost-first
-        // semantics.
-        for &pati in &self.buckets[bucket] {
-            let pat = &*self.pats[pati];
-            if start + pat.len() > haystack.len() {
-                continue;
-            }
-            if pat == &haystack[start..start + pat.len()] {
-                return Some(Match {
-                    pat: pati,
-                    start: start,
-                    end: start + pat.len(),
-                });
-            }
-        }
-        None
-    }
-
-    /// Slow substring search through all patterns in this matcher.
-    ///
-    /// This is used when we don't have enough bytes in the haystack for our
-    /// block based approach.
-    fn slow(&self, haystack: &[u8], pos: usize) -> Option<Match> {
-        self.ac.find(&haystack[pos..]).next().map(|m| {
-            Match {
-                pat: m.pati,
-                start: pos + m.start,
-                end: pos + m.end,
-            }
-        })
-    }
-}
-
-impl Masks {
-    /// Create a new set of masks of size `n`, where `n` corresponds to the
-    /// number of bytes in a fingerprint.
-    fn new(n: usize) -> Masks {
-        Masks(vec![Mask::new(); n])
-    }
-
-    /// Returns the number of masks.
-    fn len(&self) -> usize {
-        self.0.len()
-    }
-
-    /// Adds the given pattern to the given bucket. The bucket should be a
-    /// power of `2 <= 2^7`.
-    fn add(&mut self, bucket: u8, pat: &[u8]) {
-        for (i, mask) in self.0.iter_mut().enumerate() {
-            mask.add(bucket, pat[i]);
-        }
-    }
-
-    /// Finds the fingerprints that are in the given haystack block. i.e., this
-    /// returns `C` as described in the module documentation.
-    ///
-    /// More specifically, `for i in 0..16` and `j in 0..8, C[i][j] == 1` if and
-    /// only if `haystack_block[i]` corresponds to a fingerprint that is part
-    /// of a pattern in bucket `j`.
-    #[inline(always)]
-    fn members1(&self, haystack_block: u8x16) -> u8x16 {
-        let masklo = u8x16::splat(0xF);
-        let hlo = haystack_block & masklo;
-        let hhi = (haystack_block >> 4) & masklo;
-
-        self.0[0].lo.shuffle_bytes(hlo) & self.0[0].hi.shuffle_bytes(hhi)
-    }
-
-    /// Like members1, but computes C for the first and second bytes in the
-    /// fingerprint.
-    #[inline(always)]
-    fn members2(&self, haystack_block: u8x16) -> (u8x16, u8x16) {
-        let masklo = u8x16::splat(0xF);
-        let hlo = haystack_block & masklo;
-        let hhi = (haystack_block >> 4) & masklo;
-
-        let res0 = self.0[0].lo.shuffle_bytes(hlo)
-                   & self.0[0].hi.shuffle_bytes(hhi);
-        let res1 = self.0[1].lo.shuffle_bytes(hlo)
-                   & self.0[1].hi.shuffle_bytes(hhi);
-        (res0, res1)
-    }
-
-    /// Like `members1`, but computes `C` for the first, second and third bytes
-    /// in the fingerprint.
-    #[inline(always)]
-    fn members3(&self, haystack_block: u8x16) -> (u8x16, u8x16, u8x16) {
-        let masklo = u8x16::splat(0xF);
-        let hlo = haystack_block & masklo;
-        let hhi = (haystack_block >> 4) & masklo;
-
-        let res0 = self.0[0].lo.shuffle_bytes(hlo)
-                   & self.0[0].hi.shuffle_bytes(hhi);
-        let res1 = self.0[1].lo.shuffle_bytes(hlo)
-                   & self.0[1].hi.shuffle_bytes(hhi);
-        let res2 = self.0[2].lo.shuffle_bytes(hlo)
-                   & self.0[2].hi.shuffle_bytes(hhi);
-        (res0, res1, res2)
-    }
-}
-
-impl Mask {
-    /// Create a new mask with no members.
-    fn new() -> Mask {
-        Mask {
-            lo: u8x16::splat(0),
-            hi: u8x16::splat(0),
-        }
-    }
-
-    /// Adds the given byte to the given bucket.
-    fn add(&mut self, bucket: u8, byte: u8) {
-        // Split our byte into two nybbles, and add each nybble to our
-        // mask.
-        let byte_lo = (byte & 0xF) as u32;
-        let byte_hi = (byte >> 4) as u32;
-
-        let lo = self.lo.extract(byte_lo);
-        self.lo = self.lo.replace(byte_lo, ((1 << bucket) as u8) | lo);
-
-        let hi = self.hi.extract(byte_hi);
-        self.hi = self.hi.replace(byte_hi, ((1 << bucket) as u8) | hi);
-    }
-}
-
-/// UnsafeLoad permits loading data into a SIMD vector without bounds checks.
-///
-/// Ideally, this would be part of the `simd` crate, or even better, we could
-/// figure out how to do it without `unsafe` at all.
-trait UnsafeLoad {
-    type Elem;
-
-    /// load_unchecked creates a new SIMD vector from the elements in `slice`
-    /// starting at `offset`. `slice` must have at least the number of elements
-    /// required to fill a SIMD vector.
-    unsafe fn load_unchecked(slice: &[Self::Elem], offset: usize) -> Self;
-}
-
-impl UnsafeLoad for u8x16 {
-    type Elem = u8;
-
-    unsafe fn load_unchecked(slice: &[u8], offset: usize) -> u8x16 {
-        let mut x = u8x16::splat(0);
-        ptr::copy_nonoverlapping(
-            slice.get_unchecked(offset),
-            &mut x as *mut u8x16 as *mut u8,
-            16);
-        x
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/simd_fallback/mod.rs
+++ /dev/null
@@ -1,1 +0,0 @@
-pub mod teddy128;
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/simd_fallback/teddy128.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-use syntax;
-
-pub fn is_teddy_128_available() -> bool {
-    false
-}
-
-#[derive(Debug, Clone)]
-pub struct Teddy(());
-
-#[derive(Debug, Clone)]
-pub struct Match {
-    pub pat: usize,
-    pub start: usize,
-    pub end: usize,
-}
-
-impl Teddy {
-    pub fn new(_pats: &syntax::Literals) -> Option<Teddy> { None }
-    pub fn patterns(&self) -> &[Vec<u8>] { &[] }
-    pub fn len(&self) -> usize { 0 }
-    pub fn approximate_size(&self) -> usize { 0 }
-    pub fn find(&self, _haystack: &[u8]) -> Option<Match> { None }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/sparse.rs
+++ /dev/null
@@ -1,78 +0,0 @@
-use std::ops::Deref;
-use std::slice;
-
-/// A sparse set used for representing ordered NFA states.
-///
-/// This supports constant time addition and membership testing. Clearing an
-/// entire set can also be done in constant time. Iteration yields elements
-/// in the order in which they were inserted.
-///
-/// The data structure is based on: http://research.swtch.com/sparse
-/// Note though that we don't actually use unitialized memory. We generally
-/// reuse allocations, so the initial allocation cost is bareable. However,
-/// its other properties listed above are extremely useful.
-#[derive(Clone, Debug)]
-pub struct SparseSet {
-    /// Dense contains the instruction pointers in the order in which they
-    /// were inserted. Accessing elements >= self.size is illegal.
-    dense: Vec<usize>,
-    /// Sparse maps instruction pointers to their location in dense.
-    ///
-    /// An instruction pointer is in the set if and only if
-    /// sparse[ip] < size && ip == dense[sparse[ip]].
-    sparse: Vec<usize>,
-    /// The number of elements in the set.
-    size: usize,
-}
-
-impl SparseSet {
-    pub fn new(size: usize) -> SparseSet {
-        SparseSet {
-            dense: vec![0; size],
-            sparse: vec![0; size],
-            size: 0,
-        }
-    }
-
-    pub fn len(&self) -> usize {
-        self.size
-    }
-
-    pub fn is_empty(&self) -> bool {
-        self.size == 0
-    }
-
-    pub fn capacity(&self) -> usize {
-        self.dense.len()
-    }
-
-    pub fn insert(&mut self, value: usize) {
-        let i = self.size;
-        self.dense[i] = value;
-        self.sparse[value] = i;
-        self.size += 1;
-    }
-
-    pub fn contains(&self, value: usize) -> bool {
-        let i = self.sparse[value];
-        i < self.size && self.dense[i] == value
-    }
-
-    pub fn clear(&mut self) {
-        self.size = 0;
-    }
-}
-
-impl Deref for SparseSet {
-    type Target = [usize];
-
-    fn deref(&self) -> &Self::Target {
-        &self.dense[0..self.size]
-    }
-}
-
-impl<'a> IntoIterator for &'a SparseSet {
-    type Item = &'a usize;
-    type IntoIter = slice::Iter<'a, usize>;
-    fn into_iter(self) -> Self::IntoIter { self.iter() }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/testdata/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-The following license covers testregex.c and all associated test data.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of THIS SOFTWARE FILE (the "Software"), to deal in the Software
-without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following disclaimer:
-
-THIS SOFTWARE IS PROVIDED BY AT&T ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL AT&T BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/testdata/README
+++ /dev/null
@@ -1,17 +0,0 @@
-Test data was taken from the Go distribution, which was in turn taken from the
-testregex test suite:
-
-  http://www2.research.att.com/~astopen/testregex/testregex.html
-
-The LICENSE in this directory corresponds to the LICENSE that the data was
-released under.
-
-The tests themselves were modified for RE2/Go. A couple were modified further
-by me (Andrew Gallant) (only in repetition.dat) so that RE2/Go would pass them.
-(Yes, it seems like RE2/Go includes failing test cases.) This may or may not
-have been a bad idea, but I think being consistent with an established Regex
-library is worth something.
-
-Note that these files are read by 'scripts/regex-match-tests.py' and turned
-into Rust tests found in 'regex_macros/tests/matches.rs'.
-
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/testdata/basic.dat
+++ /dev/null
@@ -1,221 +0,0 @@
-NOTE	all standard compliant implementations should pass these : 2002-05-31
-
-BE	abracadabra$	abracadabracadabra	(7,18)
-BE	a...b		abababbb		(2,7)
-BE	XXXXXX		..XXXXXX		(2,8)
-E	\)		()	(1,2)
-BE	a]		a]a	(0,2)
-B	}		}	(0,1)
-E	\}		}	(0,1)
-BE	\]		]	(0,1)
-B	]		]	(0,1)
-E	]		]	(0,1)
-B	{		{	(0,1)
-B	}		}	(0,1)
-BE	^a		ax	(0,1)
-BE	\^a		a^a	(1,3)
-BE	a\^		a^	(0,2)
-BE	a$		aa	(1,2)
-BE	a\$		a$	(0,2)
-BE	^$		NULL	(0,0)
-E	$^		NULL	(0,0)
-E	a($)		aa	(1,2)(2,2)
-E	a*(^a)		aa	(0,1)(0,1)
-E	(..)*(...)*		a	(0,0)
-E	(..)*(...)*		abcd	(0,4)(2,4)
-E	(ab|a)(bc|c)		abc	(0,3)(0,2)(2,3)
-E	(ab)c|abc		abc	(0,3)(0,2)
-E	a{0}b		ab			(1,2)
-E	(a*)(b?)(b+)b{3}	aaabbbbbbb	(0,10)(0,3)(3,4)(4,7)
-E	(a*)(b{0,1})(b{1,})b{3}	aaabbbbbbb	(0,10)(0,3)(3,4)(4,7)
-E	a{9876543210}	NULL	BADBR
-E	((a|a)|a)			a	(0,1)(0,1)(0,1)
-E	(a*)(a|aa)			aaaa	(0,4)(0,3)(3,4)
-E	a*(a.|aa)			aaaa	(0,4)(2,4)
-E	a(b)|c(d)|a(e)f			aef	(0,3)(?,?)(?,?)(1,2)
-E	(a|b)?.*			b	(0,1)(0,1)
-E	(a|b)c|a(b|c)			ac	(0,2)(0,1)
-E	(a|b)c|a(b|c)			ab	(0,2)(?,?)(1,2)
-E	(a|b)*c|(a|ab)*c		abc	(0,3)(1,2)
-E	(a|b)*c|(a|ab)*c		xc	(1,2)
-E	(.a|.b).*|.*(.a|.b)		xa	(0,2)(0,2)
-E	a?(ab|ba)ab			abab	(0,4)(0,2)
-E	a?(ac{0}b|ba)ab			abab	(0,4)(0,2)
-E	ab|abab				abbabab	(0,2)
-E	aba|bab|bba			baaabbbaba	(5,8)
-E	aba|bab				baaabbbaba	(6,9)
-E	(aa|aaa)*|(a|aaaaa)		aa	(0,2)(0,2)
-E	(a.|.a.)*|(a|.a...)		aa	(0,2)(0,2)
-E	ab|a				xabc	(1,3)
-E	ab|a				xxabc	(2,4)
-Ei	(Ab|cD)*			aBcD	(0,4)(2,4)
-BE	[^-]			--a		(2,3)
-BE	[a-]*			--a		(0,3)
-BE	[a-m-]*			--amoma--	(0,4)
-E	:::1:::0:|:::1:1:0:	:::0:::1:::1:::0:	(8,17)
-E	:::1:::0:|:::1:1:1:	:::0:::1:::1:::0:	(8,17)
-{E	[[:upper:]]		A		(0,1)	[[<element>]] not supported
-E	[[:lower:]]+		`az{		(1,3)
-E	[[:upper:]]+		@AZ[		(1,3)
-# No collation in Go
-#BE	[[-]]			[[-]]		(2,4)
-#BE	[[.NIL.]]	NULL	ECOLLATE
-#BE	[[=aleph=]]	NULL	ECOLLATE
-}
-BE$	\n		\n	(0,1)
-BEn$	\n		\n	(0,1)
-BE$	[^a]		\n	(0,1)
-BE$	\na		\na	(0,2)
-E	(a)(b)(c)	abc	(0,3)(0,1)(1,2)(2,3)
-BE	xxx		xxx	(0,3)
-E1	(^|[ (,;])((([Ff]eb[^ ]* *|0*2/|\* */?)0*[6-7]))([^0-9]|$)	feb 6,	(0,6)
-E1	(^|[ (,;])((([Ff]eb[^ ]* *|0*2/|\* */?)0*[6-7]))([^0-9]|$)	2/7	(0,3)
-E1	(^|[ (,;])((([Ff]eb[^ ]* *|0*2/|\* */?)0*[6-7]))([^0-9]|$)	feb 1,Feb 6	(5,11)
-E3	((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))	x	(0,1)(0,1)(0,1)
-E3	((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*	xx	(0,2)(1,2)(1,2)
-E	a?(ab|ba)*	ababababababababababababababababababababababababababababababababababababababababa	(0,81)(79,81)
-E	abaa|abbaa|abbbaa|abbbbaa	ababbabbbabbbabbbbabbbbaa	(18,25)
-E	abaa|abbaa|abbbaa|abbbbaa	ababbabbbabbbabbbbabaa	(18,22)
-E	aaac|aabc|abac|abbc|baac|babc|bbac|bbbc	baaabbbabac	(7,11)
-BE$	.*			\x01\x7f	(0,2)
-E	aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll		XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa	(53,57)
-L	aaaa\nbbbb\ncccc\nddddd\neeeeee\nfffffff\ngggg\nhhhh\niiiii\njjjjj\nkkkkk\nllll		XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa	NOMATCH
-E	a*a*a*a*a*b		aaaaaaaaab	(0,10)
-BE	^			NULL		(0,0)
-BE	$			NULL		(0,0)
-BE	^$			NULL		(0,0)
-BE	^a$			a		(0,1)
-BE	abc			abc		(0,3)
-BE	abc			xabcy		(1,4)
-BE	abc			ababc		(2,5)
-BE	ab*c			abc		(0,3)
-BE	ab*bc			abc		(0,3)
-BE	ab*bc			abbc		(0,4)
-BE	ab*bc			abbbbc		(0,6)
-E	ab+bc			abbc		(0,4)
-E	ab+bc			abbbbc		(0,6)
-E	ab?bc			abbc		(0,4)
-E	ab?bc			abc		(0,3)
-E	ab?c			abc		(0,3)
-BE	^abc$			abc		(0,3)
-BE	^abc			abcc		(0,3)
-BE	abc$			aabc		(1,4)
-BE	^			abc		(0,0)
-BE	$			abc		(3,3)
-BE	a.c			abc		(0,3)
-BE	a.c			axc		(0,3)
-BE	a.*c			axyzc		(0,5)
-BE	a[bc]d			abd		(0,3)
-BE	a[b-d]e			ace		(0,3)
-BE	a[b-d]			aac		(1,3)
-BE	a[-b]			a-		(0,2)
-BE	a[b-]			a-		(0,2)
-BE	a]			a]		(0,2)
-BE	a[]]b			a]b		(0,3)
-BE	a[^bc]d			aed		(0,3)
-BE	a[^-b]c			adc		(0,3)
-BE	a[^]b]c			adc		(0,3)
-E	ab|cd			abc		(0,2)
-E	ab|cd			abcd		(0,2)
-E	a\(b			a(b		(0,3)
-E	a\(*b			ab		(0,2)
-E	a\(*b			a((b		(0,4)
-E	((a))			abc		(0,1)(0,1)(0,1)
-E	(a)b(c)			abc		(0,3)(0,1)(2,3)
-E	a+b+c			aabbabc		(4,7)
-E	a*			aaa		(0,3)
-#E	(a*)*			-		(0,0)(0,0)
-E	(a*)*			-		(0,0)(?,?)	RE2/Go
-E	(a*)+			-		(0,0)(0,0)
-#E	(a*|b)*			-		(0,0)(0,0)
-E	(a*|b)*			-		(0,0)(?,?)	RE2/Go
-E	(a+|b)*			ab		(0,2)(1,2)
-E	(a+|b)+			ab		(0,2)(1,2)
-E	(a+|b)?			ab		(0,1)(0,1)
-BE	[^ab]*			cde		(0,3)
-#E	(^)*			-		(0,0)(0,0)
-E	(^)*			-		(0,0)(?,?)	RE2/Go
-BE	a*			NULL		(0,0)
-E	([abc])*d		abbbcd		(0,6)(4,5)
-E	([abc])*bcd		abcd		(0,4)(0,1)
-E	a|b|c|d|e		e		(0,1)
-E	(a|b|c|d|e)f		ef		(0,2)(0,1)
-#E	((a*|b))*		-		(0,0)(0,0)(0,0)
-E	((a*|b))*		-		(0,0)(?,?)(?,?)	RE2/Go
-BE	abcd*efg		abcdefg		(0,7)
-BE	ab*			xabyabbbz	(1,3)
-BE	ab*			xayabbbz	(1,2)
-E	(ab|cd)e		abcde		(2,5)(2,4)
-BE	[abhgefdc]ij		hij		(0,3)
-E	(a|b)c*d		abcd		(1,4)(1,2)
-E	(ab|ab*)bc		abc		(0,3)(0,1)
-E	a([bc]*)c*		abc		(0,3)(1,3)
-E	a([bc]*)(c*d)		abcd		(0,4)(1,3)(3,4)
-E	a([bc]+)(c*d)		abcd		(0,4)(1,3)(3,4)
-E	a([bc]*)(c+d)		abcd		(0,4)(1,2)(2,4)
-E	a[bcd]*dcdcde		adcdcde		(0,7)
-E	(ab|a)b*c		abc		(0,3)(0,2)
-E	((a)(b)c)(d)		abcd		(0,4)(0,3)(0,1)(1,2)(3,4)
-BE	[A-Za-z_][A-Za-z0-9_]*	alpha		(0,5)
-E	^a(bc+|b[eh])g|.h$	abh		(1,3)
-E	(bc+d$|ef*g.|h?i(j|k))	effgz		(0,5)(0,5)
-E	(bc+d$|ef*g.|h?i(j|k))	ij		(0,2)(0,2)(1,2)
-E	(bc+d$|ef*g.|h?i(j|k))	reffgz		(1,6)(1,6)
-E	(((((((((a)))))))))	a		(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)
-BE	multiple words		multiple words yeah	(0,14)
-E	(.*)c(.*)		abcde		(0,5)(0,2)(3,5)
-BE	abcd			abcd		(0,4)
-E	a(bc)d			abcd		(0,4)(1,3)
-E	a[-]?c		ac		(0,3)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Muammar Qaddafi	(0,15)(?,?)(10,12)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Mo'ammar Gadhafi	(0,16)(?,?)(11,13)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Muammar Kaddafi	(0,15)(?,?)(10,12)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Muammar Qadhafi	(0,15)(?,?)(10,12)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Muammar Gadafi	(0,14)(?,?)(10,11)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Mu'ammar Qadafi	(0,15)(?,?)(11,12)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Moamar Gaddafi	(0,14)(?,?)(9,11)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Mu'ammar Qadhdhafi	(0,18)(?,?)(13,15)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Muammar Khaddafi	(0,16)(?,?)(11,13)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Muammar Ghaddafy	(0,16)(?,?)(11,13)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Muammar Ghadafi	(0,15)(?,?)(11,12)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Muammar Ghaddafi	(0,16)(?,?)(11,13)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Muamar Kaddafi	(0,14)(?,?)(9,11)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Muammar Quathafi	(0,16)(?,?)(11,13)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Muammar Gheddafi	(0,16)(?,?)(11,13)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Moammar Khadafy	(0,15)(?,?)(11,12)
-E	M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]	Moammar Qudhafi	(0,15)(?,?)(10,12)
-E	a+(b|c)*d+		aabcdd			(0,6)(3,4)
-E	^.+$			vivi			(0,4)
-E	^(.+)$			vivi			(0,4)(0,4)
-E	^([^!.]+).att.com!(.+)$	gryphon.att.com!eby	(0,19)(0,7)(16,19)
-E	^([^!]+!)?([^!]+)$	bas			(0,3)(?,?)(0,3)
-E	^([^!]+!)?([^!]+)$	bar!bas			(0,7)(0,4)(4,7)
-E	^([^!]+!)?([^!]+)$	foo!bas			(0,7)(0,4)(4,7)
-E	^.+!([^!]+!)([^!]+)$	foo!bar!bas		(0,11)(4,8)(8,11)
-E	((foo)|(bar))!bas	bar!bas			(0,7)(0,3)(?,?)(0,3)
-E	((foo)|(bar))!bas	foo!bar!bas		(4,11)(4,7)(?,?)(4,7)
-E	((foo)|(bar))!bas	foo!bas			(0,7)(0,3)(0,3)
-E	((foo)|bar)!bas		bar!bas			(0,7)(0,3)
-E	((foo)|bar)!bas		foo!bar!bas		(4,11)(4,7)
-E	((foo)|bar)!bas		foo!bas			(0,7)(0,3)(0,3)
-E	(foo|(bar))!bas		bar!bas			(0,7)(0,3)(0,3)
-E	(foo|(bar))!bas		foo!bar!bas		(4,11)(4,7)(4,7)
-E	(foo|(bar))!bas		foo!bas			(0,7)(0,3)
-E	(foo|bar)!bas		bar!bas			(0,7)(0,3)
-E	(foo|bar)!bas		foo!bar!bas		(4,11)(4,7)
-E	(foo|bar)!bas		foo!bas			(0,7)(0,3)
-E	^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$	foo!bar!bas	(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)
-E	^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$	bas		(0,3)(?,?)(0,3)
-E	^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$	bar!bas		(0,7)(0,4)(4,7)
-E	^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$	foo!bar!bas	(0,11)(?,?)(?,?)(4,8)(8,11)
-E	^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$	foo!bas		(0,7)(0,4)(4,7)
-E	^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$	bas		(0,3)(0,3)(?,?)(0,3)
-E	^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$	bar!bas		(0,7)(0,7)(0,4)(4,7)
-E	^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$	foo!bar!bas	(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)
-E	^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$	foo!bas		(0,7)(0,7)(0,4)(4,7)
-E	.*(/XXX).*			/XXX			(0,4)(0,4)
-E	.*(\\XXX).*			\XXX			(0,4)(0,4)
-E	\\XXX				\XXX			(0,4)
-E	.*(/000).*			/000			(0,4)(0,4)
-E	.*(\\000).*			\000			(0,4)(0,4)
-E	\\000				\000			(0,4)
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/testdata/nullsubexpr.dat
+++ /dev/null
@@ -1,79 +0,0 @@
-NOTE	null subexpression matches : 2002-06-06
-
-E	(a*)*		a		(0,1)(0,1)
-#E	SAME		x		(0,0)(0,0)
-E	SAME		x		(0,0)(?,?)	RE2/Go
-E	SAME		aaaaaa		(0,6)(0,6)
-E	SAME		aaaaaax		(0,6)(0,6)
-E	(a*)+		a		(0,1)(0,1)
-E	SAME		x		(0,0)(0,0)
-E	SAME		aaaaaa		(0,6)(0,6)
-E	SAME		aaaaaax		(0,6)(0,6)
-E	(a+)*		a		(0,1)(0,1)
-E	SAME		x		(0,0)
-E	SAME		aaaaaa		(0,6)(0,6)
-E	SAME		aaaaaax		(0,6)(0,6)
-E	(a+)+		a		(0,1)(0,1)
-E	SAME		x		NOMATCH
-E	SAME		aaaaaa		(0,6)(0,6)
-E	SAME		aaaaaax		(0,6)(0,6)
-
-E	([a]*)*		a		(0,1)(0,1)
-#E	SAME		x		(0,0)(0,0)
-E	SAME		x		(0,0)(?,?)	RE2/Go
-E	SAME		aaaaaa		(0,6)(0,6)
-E	SAME		aaaaaax		(0,6)(0,6)
-E	([a]*)+		a		(0,1)(0,1)
-E	SAME		x		(0,0)(0,0)
-E	SAME		aaaaaa		(0,6)(0,6)
-E	SAME		aaaaaax		(0,6)(0,6)
-E	([^b]*)*	a		(0,1)(0,1)
-#E	SAME		b		(0,0)(0,0)
-E	SAME		b		(0,0)(?,?)	RE2/Go
-E	SAME		aaaaaa		(0,6)(0,6)
-E	SAME		aaaaaab		(0,6)(0,6)
-E	([ab]*)*	a		(0,1)(0,1)
-E	SAME		aaaaaa		(0,6)(0,6)
-E	SAME		ababab		(0,6)(0,6)
-E	SAME		bababa		(0,6)(0,6)
-E	SAME		b		(0,1)(0,1)
-E	SAME		bbbbbb		(0,6)(0,6)
-E	SAME		aaaabcde	(0,5)(0,5)
-E	([^a]*)*	b		(0,1)(0,1)
-E	SAME		bbbbbb		(0,6)(0,6)
-#E	SAME		aaaaaa		(0,0)(0,0)
-E	SAME		aaaaaa		(0,0)(?,?)	RE2/Go
-E	([^ab]*)*	ccccxx		(0,6)(0,6)
-#E	SAME		ababab		(0,0)(0,0)
-E	SAME		ababab		(0,0)(?,?)	RE2/Go
-
-E	((z)+|a)*	zabcde		(0,2)(1,2)
-
-#{E	a+?		aaaaaa		(0,1)	no *? +? mimimal match ops
-#E	(a)		aaa		(0,1)(0,1)
-#E	(a*?)		aaa		(0,0)(0,0)
-#E	(a)*?		aaa		(0,0)
-#E	(a*?)*?		aaa		(0,0)
-#}
-
-B	\(a*\)*\(x\)		x	(0,1)(0,0)(0,1)
-B	\(a*\)*\(x\)		ax	(0,2)(0,1)(1,2)
-B	\(a*\)*\(x\)		axa	(0,2)(0,1)(1,2)
-B	\(a*\)*\(x\)\(\1\)	x	(0,1)(0,0)(0,1)(1,1)
-B	\(a*\)*\(x\)\(\1\)	ax	(0,2)(1,1)(1,2)(2,2)
-B	\(a*\)*\(x\)\(\1\)	axa	(0,3)(0,1)(1,2)(2,3)
-B	\(a*\)*\(x\)\(\1\)\(x\)	axax	(0,4)(0,1)(1,2)(2,3)(3,4)
-B	\(a*\)*\(x\)\(\1\)\(x\)	axxa	(0,3)(1,1)(1,2)(2,2)(2,3)
-
-#E	(a*)*(x)		x	(0,1)(0,0)(0,1)
-E	(a*)*(x)		x	(0,1)(?,?)(0,1)	RE2/Go
-E	(a*)*(x)		ax	(0,2)(0,1)(1,2)
-E	(a*)*(x)		axa	(0,2)(0,1)(1,2)
-
-E	(a*)+(x)		x	(0,1)(0,0)(0,1)
-E	(a*)+(x)		ax	(0,2)(0,1)(1,2)
-E	(a*)+(x)		axa	(0,2)(0,1)(1,2)
-
-E	(a*){2}(x)		x	(0,1)(0,0)(0,1)
-E	(a*){2}(x)		ax	(0,2)(1,1)(1,2)
-E	(a*){2}(x)		axa	(0,2)(1,1)(1,2)
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/testdata/repetition.dat
+++ /dev/null
@@ -1,163 +0,0 @@
-NOTE	implicit vs. explicit repetitions : 2009-02-02
-
-# Glenn Fowler <gsf@research.att.com>
-# conforming matches (column 4) must match one of the following BREs
-#	NOMATCH
-#	(0,.)\((\(.\),\(.\))(?,?)(\2,\3)\)*
-#	(0,.)\((\(.\),\(.\))(\2,\3)(?,?)\)*
-# i.e., each 3-tuple has two identical elements and one (?,?)
-
-E	((..)|(.))				NULL		NOMATCH
-E	((..)|(.))((..)|(.))			NULL		NOMATCH
-E	((..)|(.))((..)|(.))((..)|(.))		NULL		NOMATCH
-
-E	((..)|(.)){1}				NULL		NOMATCH
-E	((..)|(.)){2}				NULL		NOMATCH
-E	((..)|(.)){3}				NULL		NOMATCH
-
-E	((..)|(.))*				NULL		(0,0)
-
-E	((..)|(.))				a		(0,1)(0,1)(?,?)(0,1)
-E	((..)|(.))((..)|(.))			a		NOMATCH
-E	((..)|(.))((..)|(.))((..)|(.))		a		NOMATCH
-
-E	((..)|(.)){1}				a		(0,1)(0,1)(?,?)(0,1)
-E	((..)|(.)){2}				a		NOMATCH
-E	((..)|(.)){3}				a		NOMATCH
-
-E	((..)|(.))*				a		(0,1)(0,1)(?,?)(0,1)
-
-E	((..)|(.))				aa		(0,2)(0,2)(0,2)(?,?)
-E	((..)|(.))((..)|(.))			aa		(0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)
-E	((..)|(.))((..)|(.))((..)|(.))		aa		NOMATCH
-
-E	((..)|(.)){1}				aa		(0,2)(0,2)(0,2)(?,?)
-E	((..)|(.)){2}				aa		(0,2)(1,2)(?,?)(1,2)
-E	((..)|(.)){3}				aa		NOMATCH
-
-E	((..)|(.))*				aa		(0,2)(0,2)(0,2)(?,?)
-
-E	((..)|(.))				aaa		(0,2)(0,2)(0,2)(?,?)
-E	((..)|(.))((..)|(.))			aaa		(0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)
-E	((..)|(.))((..)|(.))((..)|(.))		aaa		(0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3)
-
-E	((..)|(.)){1}				aaa		(0,2)(0,2)(0,2)(?,?)
-#E	((..)|(.)){2}				aaa		(0,3)(2,3)(?,?)(2,3)
-E	((..)|(.)){2}				aaa		(0,3)(2,3)(0,2)(2,3)	RE2/Go
-E	((..)|(.)){3}				aaa		(0,3)(2,3)(?,?)(2,3)
-
-#E	((..)|(.))*				aaa		(0,3)(2,3)(?,?)(2,3)
-E	((..)|(.))*				aaa		(0,3)(2,3)(0,2)(2,3)	RE2/Go
-
-E	((..)|(.))				aaaa		(0,2)(0,2)(0,2)(?,?)
-E	((..)|(.))((..)|(.))			aaaa		(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)
-E	((..)|(.))((..)|(.))((..)|(.))		aaaa		(0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4)
-
-E	((..)|(.)){1}				aaaa		(0,2)(0,2)(0,2)(?,?)
-E	((..)|(.)){2}				aaaa		(0,4)(2,4)(2,4)(?,?)
-#E	((..)|(.)){3}				aaaa		(0,4)(3,4)(?,?)(3,4)
-E	((..)|(.)){3}				aaaa		(0,4)(3,4)(0,2)(3,4)	RE2/Go
-
-E	((..)|(.))*				aaaa		(0,4)(2,4)(2,4)(?,?)
-
-E	((..)|(.))				aaaaa		(0,2)(0,2)(0,2)(?,?)
-E	((..)|(.))((..)|(.))			aaaaa		(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)
-E	((..)|(.))((..)|(.))((..)|(.))		aaaaa		(0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5)
-
-E	((..)|(.)){1}				aaaaa		(0,2)(0,2)(0,2)(?,?)
-E	((..)|(.)){2}				aaaaa		(0,4)(2,4)(2,4)(?,?)
-#E	((..)|(.)){3}				aaaaa		(0,5)(4,5)(?,?)(4,5)
-E	((..)|(.)){3}				aaaaa		(0,5)(4,5)(2,4)(4,5)	RE2/Go
-
-#E	((..)|(.))*				aaaaa		(0,5)(4,5)(?,?)(4,5)
-E	((..)|(.))*				aaaaa		(0,5)(4,5)(2,4)(4,5)	RE2/Go
-
-E	((..)|(.))				aaaaaa		(0,2)(0,2)(0,2)(?,?)
-E	((..)|(.))((..)|(.))			aaaaaa		(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)
-E	((..)|(.))((..)|(.))((..)|(.))		aaaaaa		(0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?)
-
-E	((..)|(.)){1}				aaaaaa		(0,2)(0,2)(0,2)(?,?)
-E	((..)|(.)){2}				aaaaaa		(0,4)(2,4)(2,4)(?,?)
-E	((..)|(.)){3}				aaaaaa		(0,6)(4,6)(4,6)(?,?)
-
-E	((..)|(.))*				aaaaaa		(0,6)(4,6)(4,6)(?,?)
-
-NOTE	additional repetition tests graciously provided by Chris Kuklewicz www.haskell.org 2009-02-02
-
-# These test a bug in OS X / FreeBSD / NetBSD, and libtree. 
-# Linux/GLIBC gets the {8,} and {8,8} wrong.
-
-:HA#100:E	X(.?){0,}Y	X1234567Y	(0,9)(7,8)
-:HA#101:E	X(.?){1,}Y	X1234567Y	(0,9)(7,8)
-:HA#102:E	X(.?){2,}Y	X1234567Y	(0,9)(7,8)
-:HA#103:E	X(.?){3,}Y	X1234567Y	(0,9)(7,8)
-:HA#104:E	X(.?){4,}Y	X1234567Y	(0,9)(7,8)
-:HA#105:E	X(.?){5,}Y	X1234567Y	(0,9)(7,8)
-:HA#106:E	X(.?){6,}Y	X1234567Y	(0,9)(7,8)
-:HA#107:E	X(.?){7,}Y	X1234567Y	(0,9)(7,8)
-:HA#108:E	X(.?){8,}Y	X1234567Y	(0,9)(8,8)
-#:HA#110:E	X(.?){0,8}Y	X1234567Y	(0,9)(7,8)
-:HA#110:E	X(.?){0,8}Y	X1234567Y	(0,9)(8,8)	RE2/Go
-#:HA#111:E	X(.?){1,8}Y	X1234567Y	(0,9)(7,8)
-:HA#111:E	X(.?){1,8}Y	X1234567Y	(0,9)(8,8)	RE2/Go
-#:HA#112:E	X(.?){2,8}Y	X1234567Y	(0,9)(7,8)
-:HA#112:E	X(.?){2,8}Y	X1234567Y	(0,9)(8,8)	RE2/Go
-#:HA#113:E	X(.?){3,8}Y	X1234567Y	(0,9)(7,8)
-:HA#113:E	X(.?){3,8}Y	X1234567Y	(0,9)(8,8)	RE2/Go
-#:HA#114:E	X(.?){4,8}Y	X1234567Y	(0,9)(7,8)
-:HA#114:E	X(.?){4,8}Y	X1234567Y	(0,9)(8,8)	RE2/Go
-#:HA#115:E	X(.?){5,8}Y	X1234567Y	(0,9)(7,8)
-:HA#115:E	X(.?){5,8}Y	X1234567Y	(0,9)(8,8)	RE2/Go
-#:HA#116:E	X(.?){6,8}Y	X1234567Y	(0,9)(7,8)
-:HA#116:E	X(.?){6,8}Y	X1234567Y	(0,9)(8,8)	RE2/Go
-#:HA#117:E	X(.?){7,8}Y	X1234567Y	(0,9)(7,8)
-:HA#117:E	X(.?){7,8}Y	X1234567Y	(0,9)(8,8)	RE2/Go
-:HA#118:E	X(.?){8,8}Y	X1234567Y	(0,9)(8,8)
-
-# These test a fixed bug in my regex-tdfa that did not keep the expanded
-# form properly grouped, so right association did the wrong thing with
-# these ambiguous patterns (crafted just to test my code when I became
-# suspicious of my implementation).  The first subexpression should use
-# "ab" then "a" then "bcd".
-
-# OS X / FreeBSD / NetBSD badly fail many of these, with impossible
-# results like (0,6)(4,5)(6,6).
-
-:HA#260:E	(a|ab|c|bcd){0,}(d*)	ababcd	(0,1)(0,1)(1,1)
-:HA#261:E	(a|ab|c|bcd){1,}(d*)	ababcd	(0,1)(0,1)(1,1)
-:HA#262:E	(a|ab|c|bcd){2,}(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#263:E	(a|ab|c|bcd){3,}(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#264:E	(a|ab|c|bcd){4,}(d*)	ababcd	NOMATCH
-:HA#265:E	(a|ab|c|bcd){0,10}(d*)	ababcd	(0,1)(0,1)(1,1)
-:HA#266:E	(a|ab|c|bcd){1,10}(d*)	ababcd	(0,1)(0,1)(1,1)
-:HA#267:E	(a|ab|c|bcd){2,10}(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#268:E	(a|ab|c|bcd){3,10}(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#269:E	(a|ab|c|bcd){4,10}(d*)	ababcd	NOMATCH
-:HA#270:E	(a|ab|c|bcd)*(d*)	ababcd	(0,1)(0,1)(1,1)
-:HA#271:E	(a|ab|c|bcd)+(d*)	ababcd	(0,1)(0,1)(1,1)
-
-# The above worked on Linux/GLIBC but the following often fail.
-# They also trip up OS X / FreeBSD / NetBSD:
-
-#:HA#280:E	(ab|a|c|bcd){0,}(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#280:E	(ab|a|c|bcd){0,}(d*)	ababcd	(0,6)(4,5)(5,6)	RE2/Go
-#:HA#281:E	(ab|a|c|bcd){1,}(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#281:E	(ab|a|c|bcd){1,}(d*)	ababcd	(0,6)(4,5)(5,6)	RE2/Go
-#:HA#282:E	(ab|a|c|bcd){2,}(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#282:E	(ab|a|c|bcd){2,}(d*)	ababcd	(0,6)(4,5)(5,6)	RE2/Go
-#:HA#283:E	(ab|a|c|bcd){3,}(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#283:E	(ab|a|c|bcd){3,}(d*)	ababcd	(0,6)(4,5)(5,6)	RE2/Go
-:HA#284:E	(ab|a|c|bcd){4,}(d*)	ababcd	NOMATCH
-#:HA#285:E	(ab|a|c|bcd){0,10}(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#285:E	(ab|a|c|bcd){0,10}(d*)	ababcd	(0,6)(4,5)(5,6)	RE2/Go
-#:HA#286:E	(ab|a|c|bcd){1,10}(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#286:E	(ab|a|c|bcd){1,10}(d*)	ababcd	(0,6)(4,5)(5,6)	RE2/Go
-#:HA#287:E	(ab|a|c|bcd){2,10}(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#287:E	(ab|a|c|bcd){2,10}(d*)	ababcd	(0,6)(4,5)(5,6)	RE2/Go
-#:HA#288:E	(ab|a|c|bcd){3,10}(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#288:E	(ab|a|c|bcd){3,10}(d*)	ababcd	(0,6)(4,5)(5,6)	RE2/Go
-:HA#289:E	(ab|a|c|bcd){4,10}(d*)	ababcd	NOMATCH
-#:HA#290:E	(ab|a|c|bcd)*(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#290:E	(ab|a|c|bcd)*(d*)	ababcd	(0,6)(4,5)(5,6)	RE2/Go
-#:HA#291:E	(ab|a|c|bcd)+(d*)	ababcd	(0,6)(3,6)(6,6)
-:HA#291:E	(ab|a|c|bcd)+(d*)	ababcd	(0,6)(4,5)(5,6)	RE2/Go
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/src/utf8.rs
+++ /dev/null
@@ -1,270 +0,0 @@
-/// A few elementary UTF-8 encoding and decoding functions used by the matching
-/// engines.
-///
-/// In an ideal world, the matching engines operate on `&str` and we can just
-/// lean on the standard library for all our UTF-8 needs. However, to support
-/// byte based regexes (that can match on arbitrary bytes which may contain
-/// UTF-8), we need to be capable of searching and decoding UTF-8 on a `&[u8]`.
-/// The standard library doesn't really recognize this use case, so we have
-/// to build it out ourselves.
-///
-/// Should this be factored out into a separate crate? It seems independently
-/// useful. There are other crates that already exist (e.g., `utf-8`) that have
-/// overlapping use cases. Not sure what to do.
-
-use std::char;
-
-const TAG_CONT: u8 = 0b1000_0000;
-const TAG_TWO: u8 = 0b1100_0000;
-const TAG_THREE: u8 = 0b1110_0000;
-const TAG_FOUR: u8 = 0b1111_0000;
-
-/// Returns the smallest possible index of the next valid UTF-8 sequence
-/// starting after `i`.
-pub fn next_utf8(text: &[u8], i: usize) -> usize {
-    let b = match text.get(i) {
-        None => return i + 1,
-        Some(&b) => b,
-    };
-    let inc = if b <= 0x7F {
-        1
-    } else if b <= 0b110_11111 {
-        2
-    } else if b <= 0b1110_1111 {
-        3
-    } else {
-        4
-    };
-    i + inc
-}
-
-/// Encode the given Unicode character to `dst` as a single UTF-8 sequence.
-///
-/// If `dst` is not long enough, then `None` is returned. Otherwise, the number
-/// of bytes written is returned.
-#[allow(dead_code)]
-#[inline]
-pub fn encode_utf8(character: char, dst: &mut [u8]) -> Option<usize> {
-    let code = character as u32;
-    if code <= 0x7F && !dst.is_empty() {
-        dst[0] = code as u8;
-        Some(1)
-    } else if code <= 0x7FF && dst.len() >= 2 {
-        dst[0] = (code >> 6 & 0x1F) as u8 | TAG_TWO;
-        dst[1] = (code & 0x3F) as u8 | TAG_CONT;
-        Some(2)
-    } else if code <= 0xFFFF && dst.len() >= 3  {
-        dst[0] = (code >> 12 & 0x0F) as u8 | TAG_THREE;
-        dst[1] = (code >>  6 & 0x3F) as u8 | TAG_CONT;
-        dst[2] = (code & 0x3F) as u8 | TAG_CONT;
-        Some(3)
-    } else if dst.len() >= 4 {
-        dst[0] = (code >> 18 & 0x07) as u8 | TAG_FOUR;
-        dst[1] = (code >> 12 & 0x3F) as u8 | TAG_CONT;
-        dst[2] = (code >>  6 & 0x3F) as u8 | TAG_CONT;
-        dst[3] = (code & 0x3F) as u8 | TAG_CONT;
-        Some(4)
-    } else {
-        None
-    }
-}
-
-/// Decode a single UTF-8 sequence into a single Unicode codepoint from `src`.
-///
-/// If no valid UTF-8 sequence could be found, then `None` is returned.
-/// Otherwise, the decoded codepoint and the number of bytes read is returned.
-/// The number of bytes read (for a valid UTF-8 sequence) is guaranteed to be
-/// 1, 2, 3 or 4.
-///
-/// Note that a UTF-8 sequence is invalid if it is incorrect UTF-8, encodes a
-/// codepoint that is out of range (surrogate codepoints are out of range) or
-/// is not the shortest possible UTF-8 sequence for that codepoint.
-#[inline]
-pub fn decode_utf8(src: &[u8]) -> Option<(char, usize)> {
-    let b0 = match src.get(0) {
-        None => return None,
-        Some(&b) if b <= 0x7F => return Some((b as char, 1)),
-        Some(&b) => b,
-    };
-    match b0 {
-        0b110_00000 ... 0b110_11111 => {
-            if src.len() < 2 {
-                return None;
-            }
-            let b1 = src[1];
-            let cp = ((b0 & !TAG_TWO) as u32) << 6
-                     | ((b1 & !TAG_CONT) as u32);
-            match cp {
-                0x80 ... 0x7FF => char::from_u32(cp).map(|cp| (cp, 2)),
-                _ => None,
-            }
-        }
-        0b1110_0000 ... 0b1110_1111 => {
-            if src.len() < 3 {
-                return None;
-            }
-            let (b1, b2) = (src[1], src[2]);
-            let cp = ((b0 & !TAG_THREE) as u32) << 12
-                     | ((b1 & !TAG_CONT) as u32) << 6
-                     | ((b2 & !TAG_CONT) as u32);
-            match cp {
-                // char::from_u32 will disallow surrogate codepoints.
-                0x800 ... 0xFFFF => char::from_u32(cp).map(|cp| (cp, 3)),
-                _ => None,
-            }
-        }
-        0b11110_000 ... 0b11110_111 => {
-            if src.len() < 4 {
-                return None;
-            }
-            let (b1, b2, b3) = (src[1], src[2], src[3]);
-            let cp = ((b0 & !TAG_FOUR) as u32) << 18
-                     | ((b1 & !TAG_CONT) as u32) << 12
-                     | ((b2 & !TAG_CONT) as u32) << 6
-                     | ((b3 & !TAG_CONT) as u32);
-            match cp {
-                0x10000 ... 0x10FFFF => char::from_u32(cp).map(|cp| (cp, 4)),
-                _ => None,
-            }
-        }
-        _ => None,
-    }
-}
-
-/// Like decode_utf8, but decodes the last UTF-8 sequence in `src` instead of
-/// the first.
-pub fn decode_last_utf8(src: &[u8]) -> Option<(char, usize)> {
-    if src.is_empty() {
-        return None;
-    }
-    let mut start = src.len() - 1;
-    if src[start] <= 0x7F {
-        return Some((src[start] as char, 1));
-    }
-    while start > src.len().saturating_sub(4) {
-        start -= 1;
-        if is_start_byte(src[start]) {
-            break;
-        }
-    }
-    match decode_utf8(&src[start..]) {
-        None => None,
-        Some((_, n)) if n < src.len() - start => None,
-        Some((cp, n)) => Some((cp, n)),
-    }
-}
-
-fn is_start_byte(b: u8) -> bool {
-    b & 0b11_000000 != 0b1_0000000
-}
-
-#[cfg(test)]
-mod tests {
-    use std::str;
-
-    use quickcheck::quickcheck;
-
-    use super::{
-        TAG_CONT, TAG_TWO, TAG_THREE, TAG_FOUR,
-        decode_utf8, decode_last_utf8, encode_utf8,
-    };
-
-    #[test]
-    fn prop_roundtrip() {
-        fn p(given_cp: char) -> bool {
-            let mut tmp = [0; 4];
-            let encoded_len = encode_utf8(given_cp, &mut tmp).unwrap();
-            let (got_cp, got_len) = decode_utf8(&tmp[..encoded_len]).unwrap();
-            encoded_len == got_len && given_cp == got_cp
-        }
-        quickcheck(p as fn(char) -> bool)
-    }
-
-    #[test]
-    fn prop_roundtrip_last() {
-        fn p(given_cp: char) -> bool {
-            let mut tmp = [0; 4];
-            let encoded_len = encode_utf8(given_cp, &mut tmp).unwrap();
-            let (got_cp, got_len) =
-                decode_last_utf8(&tmp[..encoded_len]).unwrap();
-            encoded_len == got_len && given_cp == got_cp
-        }
-        quickcheck(p as fn(char) -> bool)
-    }
-
-    #[test]
-    fn prop_encode_matches_std() {
-        fn p(cp: char) -> bool {
-            let mut got = [0; 4];
-            let n = encode_utf8(cp, &mut got).unwrap();
-            let expected = cp.to_string();
-            &got[..n] == expected.as_bytes()
-        }
-        quickcheck(p as fn(char) -> bool)
-    }
-
-    #[test]
-    fn prop_decode_matches_std() {
-        fn p(given_cp: char) -> bool {
-            let mut tmp = [0; 4];
-            let n = encode_utf8(given_cp, &mut tmp).unwrap();
-            let (got_cp, _) = decode_utf8(&tmp[..n]).unwrap();
-            let expected_cp =
-                str::from_utf8(&tmp[..n]).unwrap().chars().next().unwrap();
-            got_cp == expected_cp
-        }
-        quickcheck(p as fn(char) -> bool)
-    }
-
-    #[test]
-    fn prop_decode_last_matches_std() {
-        fn p(given_cp: char) -> bool {
-            let mut tmp = [0; 4];
-            let n = encode_utf8(given_cp, &mut tmp).unwrap();
-            let (got_cp, _) = decode_last_utf8(&tmp[..n]).unwrap();
-            let expected_cp =
-                str::from_utf8(&tmp[..n]).unwrap()
-                    .chars().rev().next().unwrap();
-            got_cp == expected_cp
-        }
-        quickcheck(p as fn(char) -> bool)
-    }
-
-    #[test]
-    fn reject_invalid() {
-        // Invalid start byte
-        assert_eq!(decode_utf8(&[0xFF]), None);
-        // Surrogate pair
-        assert_eq!(decode_utf8(&[0xED, 0xA0, 0x81]), None);
-        // Bad lengths
-        assert_eq!(decode_utf8(&[0xC3]), None); // 2 bytes
-        assert_eq!(decode_utf8(&[0xEF, 0xBF]), None); // 3 bytes
-        assert_eq!(decode_utf8(&[0xF4, 0x8F, 0xBF]), None); // 4 bytes
-        // Not a minimal UTF-8 sequence
-        assert_eq!(decode_utf8(&[TAG_TWO, TAG_CONT | b'a']), None);
-        assert_eq!(decode_utf8(&[TAG_THREE, TAG_CONT, TAG_CONT | b'a']), None);
-        assert_eq!(decode_utf8(&[
-            TAG_FOUR, TAG_CONT, TAG_CONT, TAG_CONT | b'a',
-        ]), None);
-    }
-
-    #[test]
-    fn reject_invalid_last() {
-        // Invalid start byte
-        assert_eq!(decode_last_utf8(&[0xFF]), None);
-        // Surrogate pair
-        assert_eq!(decode_last_utf8(&[0xED, 0xA0, 0x81]), None);
-        // Bad lengths
-        assert_eq!(decode_last_utf8(&[0xC3]), None); // 2 bytes
-        assert_eq!(decode_last_utf8(&[0xEF, 0xBF]), None); // 3 bytes
-        assert_eq!(decode_last_utf8(&[0xF4, 0x8F, 0xBF]), None); // 4 bytes
-        // Not a minimal UTF-8 sequence
-        assert_eq!(decode_last_utf8(&[TAG_TWO, TAG_CONT | b'a']), None);
-        assert_eq!(decode_last_utf8(&[
-            TAG_THREE, TAG_CONT, TAG_CONT | b'a',
-        ]), None);
-        assert_eq!(decode_last_utf8(&[
-            TAG_FOUR, TAG_CONT, TAG_CONT, TAG_CONT | b'a',
-        ]), None);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/api.rs
+++ /dev/null
@@ -1,182 +0,0 @@
-#[test]
-fn empty_regex_empty_match() {
-    let re = regex!("");
-    assert_eq!(vec![(0, 0)], findall!(re, ""));
-}
-
-#[test]
-fn empty_regex_nonempty_match() {
-    let re = regex!("");
-    assert_eq!(vec![(0, 0), (1, 1), (2, 2), (3, 3)], findall!(re, "abc"));
-}
-
-#[test]
-fn one_zero_length_match() {
-    let re = regex!(r"\d*");
-    assert_eq!(vec![(0, 0), (1, 2), (3, 4)], findall!(re, "a1b2"));
-}
-
-#[test]
-fn many_zero_length_match() {
-    let re = regex!(r"\d*");
-    assert_eq!(vec![(0, 0), (1, 2), (3, 3), (4, 4), (5, 6)],
-               findall!(re, "a1bbb2"));
-}
-
-#[test]
-fn many_sequential_zero_length_match() {
-    let re = regex!(r"\d?");
-    assert_eq!(vec![(0, 0), (1, 2), (2, 3), (4, 5), (6, 6)],
-               findall!(re, "a12b3c"));
-}
-
-#[test]
-fn quoted_bracket_set() {
-    let re = regex!(r"([\x{5b}\x{5d}])");
-    assert_eq!(vec![(0, 1), (1, 2)], findall!(re, "[]"));
-    let re = regex!(r"([\[\]])");
-    assert_eq!(vec![(0, 1), (1, 2)], findall!(re, "[]"));
-}
-
-#[test]
-fn first_range_starts_with_left_bracket() {
-    let re = regex!(r"([\[-z])");
-    assert_eq!(vec![(0, 1), (1, 2)], findall!(re, "[]"));
-}
-
-#[test]
-fn range_ends_with_escape() {
-    let re = regex!(r"([\[-\x{5d}])");
-    assert_eq!(vec![(0, 1), (1, 2)], findall!(re, "[]"));
-}
-
-#[test]
-fn empty_match_find_iter() {
-    let re = regex!(r".*?");
-    assert_eq!(vec![(0, 0), (1, 1), (2, 2), (3, 3)], findall!(re, "abc"));
-}
-
-#[test]
-fn empty_match_captures_iter() {
-    let re = regex!(r".*?");
-    let ms: Vec<_> = re.captures_iter(text!("abc"))
-                       .map(|c| c.get(0).unwrap())
-                       .map(|m| (m.start(), m.end()))
-                       .collect();
-    assert_eq!(ms, vec![(0, 0), (1, 1), (2, 2), (3, 3)]);
-}
-
-#[test]
-fn capture_names() {
-    let re = regex!(r"(.)(?P<a>.)");
-    assert_eq!(3, re.captures_len());
-    assert_eq!((3, Some(3)), re.capture_names().size_hint());
-    assert_eq!(vec![None, None, Some("a")],
-               re.capture_names().collect::<Vec<_>>());
-}
-
-#[test]
-fn regex_string() {
-    assert_eq!(r"[a-zA-Z0-9]+", regex!(r"[a-zA-Z0-9]+").as_str());
-    assert_eq!(r"[a-zA-Z0-9]+", &format!("{}", regex!(r"[a-zA-Z0-9]+")));
-    assert_eq!(r"[a-zA-Z0-9]+", &format!("{:?}", regex!(r"[a-zA-Z0-9]+")));
-}
-
-#[test]
-fn capture_index() {
-    let re = regex!(r"^(?P<name>.+)$");
-    let cap = re.captures(t!("abc")).unwrap();
-    assert_eq!(&cap[0], t!("abc"));
-    assert_eq!(&cap[1], t!("abc"));
-    assert_eq!(&cap["name"], t!("abc"));
-}
-
-#[test]
-#[should_panic]
-#[cfg_attr(all(target_env = "msvc", target_pointer_width = "32"), ignore)]
-fn capture_index_panic_usize() {
-    let re = regex!(r"^(?P<name>.+)$");
-    let cap = re.captures(t!("abc")).unwrap();
-    let _ = cap[2];
-}
-
-#[test]
-#[should_panic]
-#[cfg_attr(all(target_env = "msvc", target_pointer_width = "32"), ignore)]
-fn capture_index_panic_name() {
-    let re = regex!(r"^(?P<name>.+)$");
-    let cap = re.captures(t!("abc")).unwrap();
-    let _ = cap["bad name"];
-}
-
-#[test]
-fn capture_index_lifetime() {
-    // This is a test of whether the types on `caps["..."]` are general
-    // enough. If not, this will fail to typecheck.
-    fn inner(s: &str) -> usize {
-        let re = regex!(r"(?P<number>\d+)");
-        let caps = re.captures(t!(s)).unwrap();
-        caps["number"].len()
-    }
-    assert_eq!(3, inner("123"));
-}
-
-#[test]
-fn capture_misc() {
-    let re = regex!(r"(.)(?P<a>a)?(.)(?P<b>.)");
-    let cap = re.captures(t!("abc")).unwrap();
-
-    assert_eq!(5, cap.len());
-
-    assert_eq!((0, 3), { let m = cap.get(0).unwrap(); (m.start(), m.end()) });
-    assert_eq!(None, cap.get(2));
-    assert_eq!((2, 3), { let m = cap.get(4).unwrap(); (m.start(), m.end()) });
-
-    assert_eq!(t!("abc"), match_text!(cap.get(0).unwrap()));
-    assert_eq!(None, cap.get(2));
-    assert_eq!(t!("c"), match_text!(cap.get(4).unwrap()));
-
-    assert_eq!(None, cap.name("a"));
-    assert_eq!(t!("c"), match_text!(cap.name("b").unwrap()));
-}
-
-#[test]
-fn sub_capture_matches() {
-    let re = regex!(r"([a-z])(([a-z])|([0-9]))");
-    let cap = re.captures(t!("a5")).unwrap();
-    let subs: Vec<_> = cap.iter().collect();
-
-    assert_eq!(5, subs.len());
-    assert!(subs[0].is_some());
-    assert!(subs[1].is_some());
-    assert!(subs[2].is_some());
-    assert!(subs[3].is_none());
-    assert!(subs[4].is_some());
-
-    assert_eq!(t!("a5"), match_text!(subs[0].unwrap()));
-    assert_eq!(t!("a"), match_text!(subs[1].unwrap()));
-    assert_eq!(t!("5"), match_text!(subs[2].unwrap()));
-    assert_eq!(t!("5"), match_text!(subs[4].unwrap()));
-}
-
-expand!(expand1, r"(?P<foo>\w+)", "abc", "$foo", "abc");
-expand!(expand2, r"(?P<foo>\w+)", "abc", "$0", "abc");
-expand!(expand3, r"(?P<foo>\w+)", "abc", "$1", "abc");
-expand!(expand4, r"(?P<foo>\w+)", "abc", "$$1", "$1");
-expand!(expand5, r"(?P<foo>\w+)", "abc", "$$foo", "$foo");
-expand!(expand6, r"(?P<a>\w+)\s+(?P<b>\d+)",
-        "abc 123", "$b$a", "123abc");
-expand!(expand7, r"(?P<a>\w+)\s+(?P<b>\d+)",
-        "abc 123", "z$bz$az", "z");
-expand!(expand8, r"(?P<a>\w+)\s+(?P<b>\d+)",
-        "abc 123", ".$b.$a.", ".123.abc.");
-expand!(expand9, r"(?P<a>\w+)\s+(?P<b>\d+)",
-        "abc 123", " $b $a ", " 123 abc ");
-expand!(expand10, r"(?P<a>\w+)\s+(?P<b>\d+)",
-        "abc 123", "$bz$az", "");
-
-split!(split1, r"\s+", "a b\nc\td\n\t e",
-       &[t!("a"), t!("b"), t!("c"), t!("d"), t!("e")]);
-split!(split2, r"\b", "a b c",
-       &[t!(""), t!("a"), t!(" "), t!("b"), t!(" "), t!("c")]);
-split!(split3, r"a$", "a", &[t!("")]);
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/api_str.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// These tests don't really make sense with the bytes API, so we only test them
-// on the Unicode API.
-
-#[test]
-fn empty_match_unicode_find_iter() {
-    // Tests that we still yield byte ranges at valid UTF-8 sequence boundaries
-    // even when we're susceptible to empty width matches.
-    let re = regex!(r".*?");
-    assert_eq!(vec![(0, 0), (3, 3), (4, 4), (7, 7), (8, 8)],
-               findall!(re, "Ⅰ1Ⅱ2"));
-}
-
-#[test]
-fn empty_match_unicode_captures_iter() {
-    // Same as empty_match_unicode_find_iter, but tests capture iteration.
-    let re = regex!(r".*?");
-    let ms: Vec<_> = re.captures_iter(text!("Ⅰ1Ⅱ2"))
-                       .map(|c| c.get(0).unwrap())
-                       .map(|m| (m.start(), m.end()))
-                       .collect();
-    assert_eq!(vec![(0, 0), (3, 3), (4, 4), (7, 7), (8, 8)], ms);
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/bytes.rs
+++ /dev/null
@@ -1,62 +0,0 @@
-// These are tests specifically crafted for regexes that can match arbitrary
-// bytes.
-
-// A silly wrapper to make it possible to write and match raw bytes.
-struct R<'a>(&'a [u8]);
-impl<'a> R<'a> { fn as_bytes(&self) -> &'a [u8] { &self.0 } }
-
-mat!(word_boundary, r"(?-u) \b", " δ", None);
-mat!(word_boundary_unicode, r" \b", " δ", Some((0, 1)));
-mat!(word_not_boundary, r"(?-u) \B", " δ", Some((0, 1)));
-mat!(word_not_boundary_unicode, r" \B", " δ", None);
-
-mat!(perl_w_ascii, r"(?-u)\w+", "aδ", Some((0, 1)));
-mat!(perl_w_unicode, r"\w+", "aδ", Some((0, 3)));
-mat!(perl_d_ascii, r"(?-u)\d+", "1२३9", Some((0, 1)));
-mat!(perl_d_unicode, r"\d+", "1२३9", Some((0, 8)));
-mat!(perl_s_ascii, r"(?-u)\s+", " \u{1680}", Some((0, 1)));
-mat!(perl_s_unicode, r"\s+", " \u{1680}", Some((0, 4)));
-
-// The first `(.+)` matches two Unicode codepoints, but can't match the 5th
-// byte, which isn't valid UTF-8. The second (byte based) `(.+)` takes over and
-// matches.
-mat!(mixed1, r"(.+)(?-u)(.+)", R(b"\xCE\x93\xCE\x94\xFF"),
-     Some((0, 5)), Some((0, 4)), Some((4, 5)));
-
-mat!(case_ascii_one, r"(?i-u)a", "A", Some((0, 1)));
-mat!(case_ascii_class, r"(?i-u)[a-z]+", "AaAaA", Some((0, 5)));
-mat!(case_unicode, r"(?i)[a-z]+", "aA\u{212A}aA", Some((0, 7)));
-mat!(case_not_unicode, r"(?i-u)[a-z]+", "aA\u{212A}aA", Some((0, 2)));
-
-mat!(negate_unicode, r"[^a]", "δ", Some((0, 2)));
-mat!(negate_not_unicode, r"(?-u)[^a]", "δ", Some((0, 1)));
-
-// This doesn't match in a normal Unicode regex because the implicit preceding
-// `.*?` is Unicode aware.
-mat!(dotstar_prefix_not_unicode1, r"(?-u)a", R(b"\xFFa"), Some((1, 2)));
-mat!(dotstar_prefix_not_unicode2, r"a", R(b"\xFFa"), Some((1, 2)));
-
-// Have fun with null bytes.
-mat!(null_bytes, r"(?-u)(?P<cstr>[^\x00]+)\x00",
-     R(b"foo\x00"), Some((0, 4)), Some((0, 3)));
-
-// Test that lookahead operators work properly in the face of invalid UTF-8.
-// See: https://github.com/rust-lang/regex/issues/277
-matiter!(invalidutf8_anchor1,
-         r"(?-u)\xcc?^",
-         R(b"\x8d#;\x1a\xa4s3\x05foobarX\\\x0f0t\xe4\x9b\xa4"),
-         (0, 0));
-matiter!(invalidutf8_anchor2,
-         r"(?-u)^\xf7|4\xff\d\x8a\x8a\x8a\x8a\x8a\x8a\x8a\x8a\x8a\x8a\x8a\x8a\x8a##########[] d\x8a\x8a\x8a\x8a\x8a\x8a\x8a\x8a\x8a\x8a\x8a\x8a\x8a##########\[] #####\x80\S7|$",
-         R(b"\x8d#;\x1a\xa4s3\x05foobarX\\\x0f0t\xe4\x9b\xa4"),
-         (22, 22));
-matiter!(invalidutf8_anchor3,
-         r"(?-u)^|ddp\xff\xffdddddlQd@\x80",
-         R(b"\x8d#;\x1a\xa4s3\x05foobarX\\\x0f0t\xe4\x9b\xa4"),
-         (0, 0));
-
-// See https://github.com/rust-lang/regex/issues/303
-#[test]
-fn negated_full_byte_range() {
-     assert!(::regex::bytes::Regex::new(r#"(?-u)[^\x00-\xff]"#).is_err());
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/crazy.rs
+++ /dev/null
@@ -1,78 +0,0 @@
-mat!(ascii_literal, r"a", "a", Some((0, 1)));
-
-// Some crazy expressions from regular-expressions.info.
-mat!(match_ranges,
-     r"\b(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b",
-     "num: 255", Some((5, 8)));
-mat!(match_ranges_not,
-     r"\b(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b",
-     "num: 256", None);
-mat!(match_float1, r"[-+]?[0-9]*\.?[0-9]+", "0.1", Some((0, 3)));
-mat!(match_float2, r"[-+]?[0-9]*\.?[0-9]+", "0.1.2", Some((0, 3)));
-mat!(match_float3, r"[-+]?[0-9]*\.?[0-9]+", "a1.2", Some((1, 4)));
-mat!(match_float4, r"^[-+]?[0-9]*\.?[0-9]+$", "1.a", None);
-mat!(match_email, r"(?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b",
-     "mine is jam.slam@gmail.com ", Some((8, 26)));
-mat!(match_email_not, r"(?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b",
-     "mine is jam.slam@gmail ", None);
-mat!(match_email_big, r"[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",
-     "mine is jam.slam@gmail.com ", Some((8, 26)));
-mat!(match_date1,
-     r"^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$",
-     "1900-01-01", Some((0, 10)));
-mat!(match_date2,
-     r"^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$",
-     "1900-00-01", None);
-mat!(match_date3,
-     r"^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$",
-     "1900-13-01", None);
-
-// Do some crazy dancing with the start/end assertions.
-matiter!(match_start_end_empty, r"^$", "", (0, 0));
-matiter!(match_start_end_empty_many_1, r"^$^$^$", "", (0, 0));
-matiter!(match_start_end_empty_many_2, r"^^^$$$", "", (0, 0));
-matiter!(match_start_end_empty_rev, r"$^", "", (0, 0));
-matiter!(match_start_end_empty_rep, r"(?:^$)*", "a\nb\nc",
-         (0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5));
-matiter!(match_start_end_empty_rep_rev, r"(?:$^)*", "a\nb\nc",
-         (0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5));
-
-// Test negated character classes.
-mat!(negclass_letters, r"[^ac]", "acx", Some((2, 3)));
-mat!(negclass_letter_comma, r"[^a,]", "a,x", Some((2, 3)));
-mat!(negclass_letter_space, r"[^a\s]", "a x", Some((2, 3)));
-mat!(negclass_comma, r"[^,]", ",,x", Some((2, 3)));
-mat!(negclass_space, r"[^\s]", " a", Some((1, 2)));
-mat!(negclass_space_comma, r"[^,\s]", ", a", Some((2, 3)));
-mat!(negclass_comma_space, r"[^\s,]", " ,a", Some((2, 3)));
-mat!(negclass_ascii, r"[^[:alpha:]Z]", "A1", Some((1, 2)));
-
-// Test that the DFA can handle pathological cases.
-// (This should result in the DFA's cache being flushed too frequently, which
-// should cause it to quit and fall back to the NFA algorithm.)
-#[test]
-fn dfa_handles_pathological_case() {
-    fn ones_and_zeroes(count: usize) -> String {
-        use rand::{Rng, thread_rng};
-
-        let mut rng = thread_rng();
-        let mut s = String::new();
-        for _ in 0..count {
-            if rng.gen() {
-                s.push('1');
-            } else {
-                s.push('0');
-            }
-        }
-        s
-    }
-
-    let re = regex!(r"[01]*1[01]{20}$");
-    let text = {
-        let mut pieces = ones_and_zeroes(100_000);
-        pieces.push('1');
-        pieces.push_str(&ones_and_zeroes(20));
-        pieces
-    };
-    assert!(re.is_match(text!(&*text)));
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/flags.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-mat!(match_flag_case, "(?i)abc", "ABC", Some((0, 3)));
-mat!(match_flag_weird_case, "(?i)a(?-i)bc", "Abc", Some((0, 3)));
-mat!(match_flag_weird_case_not, "(?i)a(?-i)bc", "ABC", None);
-mat!(match_flag_case_dotnl, "(?is)a.", "A\n", Some((0, 2)));
-mat!(match_flag_case_dotnl_toggle, "(?is)a.(?-is)a.", "A\nab", Some((0, 4)));
-mat!(match_flag_case_dotnl_toggle_not, "(?is)a.(?-is)a.", "A\na\n", None);
-mat!(match_flag_case_dotnl_toggle_ok, "(?is)a.(?-is:a.)?", "A\na\n", Some((0, 2)));
-mat!(match_flag_multi, "(?m)(?:^\\d+$\n?)+", "123\n456\n789", Some((0, 11)));
-mat!(match_flag_ungreedy, "(?U)a+", "aa", Some((0, 1)));
-mat!(match_flag_ungreedy_greedy, "(?U)a+?", "aa", Some((0, 2)));
-mat!(match_flag_ungreedy_noop, "(?U)(?-U)a+", "aa", Some((0, 2)));
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/fowler.rs
+++ /dev/null
@@ -1,371 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// DO NOT EDIT. Automatically generated by 'scripts/regex-match-tests.py'
-// on 2015-02-28 11:00:00.161706.
-
-// Tests from basic.dat
-mat!(match_basic_3, r"abracadabra$", r"abracadabracadabra", Some((7, 18)));
-mat!(match_basic_4, r"a...b", r"abababbb", Some((2, 7)));
-mat!(match_basic_5, r"XXXXXX", r"..XXXXXX", Some((2, 8)));
-mat!(match_basic_6, r"\)", r"()", Some((1, 2)));
-mat!(match_basic_7, r"a]", r"a]a", Some((0, 2)));
-mat!(match_basic_9, r"\}", r"}", Some((0, 1)));
-mat!(match_basic_10, r"\]", r"]", Some((0, 1)));
-mat!(match_basic_12, r"]", r"]", Some((0, 1)));
-mat!(match_basic_15, r"^a", r"ax", Some((0, 1)));
-mat!(match_basic_16, r"\^a", r"a^a", Some((1, 3)));
-mat!(match_basic_17, r"a\^", r"a^", Some((0, 2)));
-mat!(match_basic_18, r"a$", r"aa", Some((1, 2)));
-mat!(match_basic_19, r"a\$", r"a$", Some((0, 2)));
-mat!(match_basic_20, r"^$", r"", Some((0, 0)));
-mat!(match_basic_21, r"$^", r"", Some((0, 0)));
-mat!(match_basic_22, r"a($)", r"aa", Some((1, 2)), Some((2, 2)));
-mat!(match_basic_23, r"a*(^a)", r"aa", Some((0, 1)), Some((0, 1)));
-mat!(match_basic_24, r"(..)*(...)*", r"a", Some((0, 0)));
-mat!(match_basic_25, r"(..)*(...)*", r"abcd", Some((0, 4)), Some((2, 4)));
-mat!(match_basic_26, r"(ab|a)(bc|c)", r"abc", Some((0, 3)), Some((0, 2)), Some((2, 3)));
-mat!(match_basic_27, r"(ab)c|abc", r"abc", Some((0, 3)), Some((0, 2)));
-mat!(match_basic_28, r"a{0}b", r"ab", Some((1, 2)));
-mat!(match_basic_29, r"(a*)(b?)(b+)b{3}", r"aaabbbbbbb", Some((0, 10)), Some((0, 3)), Some((3, 4)), Some((4, 7)));
-mat!(match_basic_30, r"(a*)(b{0,1})(b{1,})b{3}", r"aaabbbbbbb", Some((0, 10)), Some((0, 3)), Some((3, 4)), Some((4, 7)));
-mat!(match_basic_32, r"((a|a)|a)", r"a", Some((0, 1)), Some((0, 1)), Some((0, 1)));
-mat!(match_basic_33, r"(a*)(a|aa)", r"aaaa", Some((0, 4)), Some((0, 3)), Some((3, 4)));
-mat!(match_basic_34, r"a*(a.|aa)", r"aaaa", Some((0, 4)), Some((2, 4)));
-mat!(match_basic_35, r"a(b)|c(d)|a(e)f", r"aef", Some((0, 3)), None, None, Some((1, 2)));
-mat!(match_basic_36, r"(a|b)?.*", r"b", Some((0, 1)), Some((0, 1)));
-mat!(match_basic_37, r"(a|b)c|a(b|c)", r"ac", Some((0, 2)), Some((0, 1)));
-mat!(match_basic_38, r"(a|b)c|a(b|c)", r"ab", Some((0, 2)), None, Some((1, 2)));
-mat!(match_basic_39, r"(a|b)*c|(a|ab)*c", r"abc", Some((0, 3)), Some((1, 2)));
-mat!(match_basic_40, r"(a|b)*c|(a|ab)*c", r"xc", Some((1, 2)));
-mat!(match_basic_41, r"(.a|.b).*|.*(.a|.b)", r"xa", Some((0, 2)), Some((0, 2)));
-mat!(match_basic_42, r"a?(ab|ba)ab", r"abab", Some((0, 4)), Some((0, 2)));
-mat!(match_basic_43, r"a?(ac{0}b|ba)ab", r"abab", Some((0, 4)), Some((0, 2)));
-mat!(match_basic_44, r"ab|abab", r"abbabab", Some((0, 2)));
-mat!(match_basic_45, r"aba|bab|bba", r"baaabbbaba", Some((5, 8)));
-mat!(match_basic_46, r"aba|bab", r"baaabbbaba", Some((6, 9)));
-mat!(match_basic_47, r"(aa|aaa)*|(a|aaaaa)", r"aa", Some((0, 2)), Some((0, 2)));
-mat!(match_basic_48, r"(a.|.a.)*|(a|.a...)", r"aa", Some((0, 2)), Some((0, 2)));
-mat!(match_basic_49, r"ab|a", r"xabc", Some((1, 3)));
-mat!(match_basic_50, r"ab|a", r"xxabc", Some((2, 4)));
-mat!(match_basic_51, r"(?i)(Ab|cD)*", r"aBcD", Some((0, 4)), Some((2, 4)));
-mat!(match_basic_52, r"[^-]", r"--a", Some((2, 3)));
-mat!(match_basic_53, r"[a-]*", r"--a", Some((0, 3)));
-mat!(match_basic_54, r"[a-m-]*", r"--amoma--", Some((0, 4)));
-mat!(match_basic_55, r":::1:::0:|:::1:1:0:", r":::0:::1:::1:::0:", Some((8, 17)));
-mat!(match_basic_56, r":::1:::0:|:::1:1:1:", r":::0:::1:::1:::0:", Some((8, 17)));
-mat!(match_basic_57, r"[[:upper:]]", r"A", Some((0, 1)));
-mat!(match_basic_58, r"[[:lower:]]+", r"`az{", Some((1, 3)));
-mat!(match_basic_59, r"[[:upper:]]+", r"@AZ[", Some((1, 3)));
-mat!(match_basic_65, r"
-", r"
-", Some((0, 1)));
-mat!(match_basic_66, r"
-", r"
-", Some((0, 1)));
-mat!(match_basic_67, r"[^a]", r"
-", Some((0, 1)));
-mat!(match_basic_68, r"
-a", r"
-a", Some((0, 2)));
-mat!(match_basic_69, r"(a)(b)(c)", r"abc", Some((0, 3)), Some((0, 1)), Some((1, 2)), Some((2, 3)));
-mat!(match_basic_70, r"xxx", r"xxx", Some((0, 3)));
-mat!(match_basic_71, r"(^|[ (,;])((([Ff]eb[^ ]* *|0*2/|\* */?)0*[6-7]))([^0-9]|$)", r"feb 6,", Some((0, 6)));
-mat!(match_basic_72, r"(^|[ (,;])((([Ff]eb[^ ]* *|0*2/|\* */?)0*[6-7]))([^0-9]|$)", r"2/7", Some((0, 3)));
-mat!(match_basic_73, r"(^|[ (,;])((([Ff]eb[^ ]* *|0*2/|\* */?)0*[6-7]))([^0-9]|$)", r"feb 1,Feb 6", Some((5, 11)));
-mat!(match_basic_74, r"((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))", r"x", Some((0, 1)), Some((0, 1)), Some((0, 1)));
-mat!(match_basic_75, r"((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*", r"xx", Some((0, 2)), Some((1, 2)), Some((1, 2)));
-mat!(match_basic_76, r"a?(ab|ba)*", r"ababababababababababababababababababababababababababababababababababababababababa", Some((0, 81)), Some((79, 81)));
-mat!(match_basic_77, r"abaa|abbaa|abbbaa|abbbbaa", r"ababbabbbabbbabbbbabbbbaa", Some((18, 25)));
-mat!(match_basic_78, r"abaa|abbaa|abbbaa|abbbbaa", r"ababbabbbabbbabbbbabaa", Some((18, 22)));
-mat!(match_basic_79, r"aaac|aabc|abac|abbc|baac|babc|bbac|bbbc", r"baaabbbabac", Some((7, 11)));
-mat!(match_basic_80, r".*", r"", Some((0, 2)));
-mat!(match_basic_81, r"aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll", r"XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa", Some((53, 57)));
-mat!(match_basic_83, r"a*a*a*a*a*b", r"aaaaaaaaab", Some((0, 10)));
-mat!(match_basic_84, r"^", r"", Some((0, 0)));
-mat!(match_basic_85, r"$", r"", Some((0, 0)));
-mat!(match_basic_86, r"^$", r"", Some((0, 0)));
-mat!(match_basic_87, r"^a$", r"a", Some((0, 1)));
-mat!(match_basic_88, r"abc", r"abc", Some((0, 3)));
-mat!(match_basic_89, r"abc", r"xabcy", Some((1, 4)));
-mat!(match_basic_90, r"abc", r"ababc", Some((2, 5)));
-mat!(match_basic_91, r"ab*c", r"abc", Some((0, 3)));
-mat!(match_basic_92, r"ab*bc", r"abc", Some((0, 3)));
-mat!(match_basic_93, r"ab*bc", r"abbc", Some((0, 4)));
-mat!(match_basic_94, r"ab*bc", r"abbbbc", Some((0, 6)));
-mat!(match_basic_95, r"ab+bc", r"abbc", Some((0, 4)));
-mat!(match_basic_96, r"ab+bc", r"abbbbc", Some((0, 6)));
-mat!(match_basic_97, r"ab?bc", r"abbc", Some((0, 4)));
-mat!(match_basic_98, r"ab?bc", r"abc", Some((0, 3)));
-mat!(match_basic_99, r"ab?c", r"abc", Some((0, 3)));
-mat!(match_basic_100, r"^abc$", r"abc", Some((0, 3)));
-mat!(match_basic_101, r"^abc", r"abcc", Some((0, 3)));
-mat!(match_basic_102, r"abc$", r"aabc", Some((1, 4)));
-mat!(match_basic_103, r"^", r"abc", Some((0, 0)));
-mat!(match_basic_104, r"$", r"abc", Some((3, 3)));
-mat!(match_basic_105, r"a.c", r"abc", Some((0, 3)));
-mat!(match_basic_106, r"a.c", r"axc", Some((0, 3)));
-mat!(match_basic_107, r"a.*c", r"axyzc", Some((0, 5)));
-mat!(match_basic_108, r"a[bc]d", r"abd", Some((0, 3)));
-mat!(match_basic_109, r"a[b-d]e", r"ace", Some((0, 3)));
-mat!(match_basic_110, r"a[b-d]", r"aac", Some((1, 3)));
-mat!(match_basic_111, r"a[-b]", r"a-", Some((0, 2)));
-mat!(match_basic_112, r"a[b-]", r"a-", Some((0, 2)));
-mat!(match_basic_113, r"a]", r"a]", Some((0, 2)));
-mat!(match_basic_114, r"a[]]b", r"a]b", Some((0, 3)));
-mat!(match_basic_115, r"a[^bc]d", r"aed", Some((0, 3)));
-mat!(match_basic_116, r"a[^-b]c", r"adc", Some((0, 3)));
-mat!(match_basic_117, r"a[^]b]c", r"adc", Some((0, 3)));
-mat!(match_basic_118, r"ab|cd", r"abc", Some((0, 2)));
-mat!(match_basic_119, r"ab|cd", r"abcd", Some((0, 2)));
-mat!(match_basic_120, r"a\(b", r"a(b", Some((0, 3)));
-mat!(match_basic_121, r"a\(*b", r"ab", Some((0, 2)));
-mat!(match_basic_122, r"a\(*b", r"a((b", Some((0, 4)));
-mat!(match_basic_123, r"((a))", r"abc", Some((0, 1)), Some((0, 1)), Some((0, 1)));
-mat!(match_basic_124, r"(a)b(c)", r"abc", Some((0, 3)), Some((0, 1)), Some((2, 3)));
-mat!(match_basic_125, r"a+b+c", r"aabbabc", Some((4, 7)));
-mat!(match_basic_126, r"a*", r"aaa", Some((0, 3)));
-mat!(match_basic_128, r"(a*)*", r"-", Some((0, 0)), None);
-mat!(match_basic_129, r"(a*)+", r"-", Some((0, 0)), Some((0, 0)));
-mat!(match_basic_131, r"(a*|b)*", r"-", Some((0, 0)), None);
-mat!(match_basic_132, r"(a+|b)*", r"ab", Some((0, 2)), Some((1, 2)));
-mat!(match_basic_133, r"(a+|b)+", r"ab", Some((0, 2)), Some((1, 2)));
-mat!(match_basic_134, r"(a+|b)?", r"ab", Some((0, 1)), Some((0, 1)));
-mat!(match_basic_135, r"[^ab]*", r"cde", Some((0, 3)));
-mat!(match_basic_137, r"(^)*", r"-", Some((0, 0)), None);
-mat!(match_basic_138, r"a*", r"", Some((0, 0)));
-mat!(match_basic_139, r"([abc])*d", r"abbbcd", Some((0, 6)), Some((4, 5)));
-mat!(match_basic_140, r"([abc])*bcd", r"abcd", Some((0, 4)), Some((0, 1)));
-mat!(match_basic_141, r"a|b|c|d|e", r"e", Some((0, 1)));
-mat!(match_basic_142, r"(a|b|c|d|e)f", r"ef", Some((0, 2)), Some((0, 1)));
-mat!(match_basic_144, r"((a*|b))*", r"-", Some((0, 0)), None, None);
-mat!(match_basic_145, r"abcd*efg", r"abcdefg", Some((0, 7)));
-mat!(match_basic_146, r"ab*", r"xabyabbbz", Some((1, 3)));
-mat!(match_basic_147, r"ab*", r"xayabbbz", Some((1, 2)));
-mat!(match_basic_148, r"(ab|cd)e", r"abcde", Some((2, 5)), Some((2, 4)));
-mat!(match_basic_149, r"[abhgefdc]ij", r"hij", Some((0, 3)));
-mat!(match_basic_150, r"(a|b)c*d", r"abcd", Some((1, 4)), Some((1, 2)));
-mat!(match_basic_151, r"(ab|ab*)bc", r"abc", Some((0, 3)), Some((0, 1)));
-mat!(match_basic_152, r"a([bc]*)c*", r"abc", Some((0, 3)), Some((1, 3)));
-mat!(match_basic_153, r"a([bc]*)(c*d)", r"abcd", Some((0, 4)), Some((1, 3)), Some((3, 4)));
-mat!(match_basic_154, r"a([bc]+)(c*d)", r"abcd", Some((0, 4)), Some((1, 3)), Some((3, 4)));
-mat!(match_basic_155, r"a([bc]*)(c+d)", r"abcd", Some((0, 4)), Some((1, 2)), Some((2, 4)));
-mat!(match_basic_156, r"a[bcd]*dcdcde", r"adcdcde", Some((0, 7)));
-mat!(match_basic_157, r"(ab|a)b*c", r"abc", Some((0, 3)), Some((0, 2)));
-mat!(match_basic_158, r"((a)(b)c)(d)", r"abcd", Some((0, 4)), Some((0, 3)), Some((0, 1)), Some((1, 2)), Some((3, 4)));
-mat!(match_basic_159, r"[A-Za-z_][A-Za-z0-9_]*", r"alpha", Some((0, 5)));
-mat!(match_basic_160, r"^a(bc+|b[eh])g|.h$", r"abh", Some((1, 3)));
-mat!(match_basic_161, r"(bc+d$|ef*g.|h?i(j|k))", r"effgz", Some((0, 5)), Some((0, 5)));
-mat!(match_basic_162, r"(bc+d$|ef*g.|h?i(j|k))", r"ij", Some((0, 2)), Some((0, 2)), Some((1, 2)));
-mat!(match_basic_163, r"(bc+d$|ef*g.|h?i(j|k))", r"reffgz", Some((1, 6)), Some((1, 6)));
-mat!(match_basic_164, r"(((((((((a)))))))))", r"a", Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)), Some((0, 1)));
-mat!(match_basic_165, r"multiple words", r"multiple words yeah", Some((0, 14)));
-mat!(match_basic_166, r"(.*)c(.*)", r"abcde", Some((0, 5)), Some((0, 2)), Some((3, 5)));
-mat!(match_basic_167, r"abcd", r"abcd", Some((0, 4)));
-mat!(match_basic_168, r"a(bc)d", r"abcd", Some((0, 4)), Some((1, 3)));
-mat!(match_basic_169, r"a[-]?c", r"ac", Some((0, 3)));
-mat!(match_basic_170, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Qaddafi", Some((0, 15)), None, Some((10, 12)));
-mat!(match_basic_171, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Mo'ammar Gadhafi", Some((0, 16)), None, Some((11, 13)));
-mat!(match_basic_172, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Kaddafi", Some((0, 15)), None, Some((10, 12)));
-mat!(match_basic_173, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Qadhafi", Some((0, 15)), None, Some((10, 12)));
-mat!(match_basic_174, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Gadafi", Some((0, 14)), None, Some((10, 11)));
-mat!(match_basic_175, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Mu'ammar Qadafi", Some((0, 15)), None, Some((11, 12)));
-mat!(match_basic_176, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Moamar Gaddafi", Some((0, 14)), None, Some((9, 11)));
-mat!(match_basic_177, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Mu'ammar Qadhdhafi", Some((0, 18)), None, Some((13, 15)));
-mat!(match_basic_178, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Khaddafi", Some((0, 16)), None, Some((11, 13)));
-mat!(match_basic_179, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Ghaddafy", Some((0, 16)), None, Some((11, 13)));
-mat!(match_basic_180, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Ghadafi", Some((0, 15)), None, Some((11, 12)));
-mat!(match_basic_181, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Ghaddafi", Some((0, 16)), None, Some((11, 13)));
-mat!(match_basic_182, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muamar Kaddafi", Some((0, 14)), None, Some((9, 11)));
-mat!(match_basic_183, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Quathafi", Some((0, 16)), None, Some((11, 13)));
-mat!(match_basic_184, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Muammar Gheddafi", Some((0, 16)), None, Some((11, 13)));
-mat!(match_basic_185, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Moammar Khadafy", Some((0, 15)), None, Some((11, 12)));
-mat!(match_basic_186, r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", r"Moammar Qudhafi", Some((0, 15)), None, Some((10, 12)));
-mat!(match_basic_187, r"a+(b|c)*d+", r"aabcdd", Some((0, 6)), Some((3, 4)));
-mat!(match_basic_188, r"^.+$", r"vivi", Some((0, 4)));
-mat!(match_basic_189, r"^(.+)$", r"vivi", Some((0, 4)), Some((0, 4)));
-mat!(match_basic_190, r"^([^!.]+).att.com!(.+)$", r"gryphon.att.com!eby", Some((0, 19)), Some((0, 7)), Some((16, 19)));
-mat!(match_basic_191, r"^([^!]+!)?([^!]+)$", r"bas", Some((0, 3)), None, Some((0, 3)));
-mat!(match_basic_192, r"^([^!]+!)?([^!]+)$", r"bar!bas", Some((0, 7)), Some((0, 4)), Some((4, 7)));
-mat!(match_basic_193, r"^([^!]+!)?([^!]+)$", r"foo!bas", Some((0, 7)), Some((0, 4)), Some((4, 7)));
-mat!(match_basic_194, r"^.+!([^!]+!)([^!]+)$", r"foo!bar!bas", Some((0, 11)), Some((4, 8)), Some((8, 11)));
-mat!(match_basic_195, r"((foo)|(bar))!bas", r"bar!bas", Some((0, 7)), Some((0, 3)), None, Some((0, 3)));
-mat!(match_basic_196, r"((foo)|(bar))!bas", r"foo!bar!bas", Some((4, 11)), Some((4, 7)), None, Some((4, 7)));
-mat!(match_basic_197, r"((foo)|(bar))!bas", r"foo!bas", Some((0, 7)), Some((0, 3)), Some((0, 3)));
-mat!(match_basic_198, r"((foo)|bar)!bas", r"bar!bas", Some((0, 7)), Some((0, 3)));
-mat!(match_basic_199, r"((foo)|bar)!bas", r"foo!bar!bas", Some((4, 11)), Some((4, 7)));
-mat!(match_basic_200, r"((foo)|bar)!bas", r"foo!bas", Some((0, 7)), Some((0, 3)), Some((0, 3)));
-mat!(match_basic_201, r"(foo|(bar))!bas", r"bar!bas", Some((0, 7)), Some((0, 3)), Some((0, 3)));
-mat!(match_basic_202, r"(foo|(bar))!bas", r"foo!bar!bas", Some((4, 11)), Some((4, 7)), Some((4, 7)));
-mat!(match_basic_203, r"(foo|(bar))!bas", r"foo!bas", Some((0, 7)), Some((0, 3)));
-mat!(match_basic_204, r"(foo|bar)!bas", r"bar!bas", Some((0, 7)), Some((0, 3)));
-mat!(match_basic_205, r"(foo|bar)!bas", r"foo!bar!bas", Some((4, 11)), Some((4, 7)));
-mat!(match_basic_206, r"(foo|bar)!bas", r"foo!bas", Some((0, 7)), Some((0, 3)));
-mat!(match_basic_207, r"^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$", r"foo!bar!bas", Some((0, 11)), Some((0, 11)), None, None, Some((4, 8)), Some((8, 11)));
-mat!(match_basic_208, r"^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$", r"bas", Some((0, 3)), None, Some((0, 3)));
-mat!(match_basic_209, r"^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$", r"bar!bas", Some((0, 7)), Some((0, 4)), Some((4, 7)));
-mat!(match_basic_210, r"^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$", r"foo!bar!bas", Some((0, 11)), None, None, Some((4, 8)), Some((8, 11)));
-mat!(match_basic_211, r"^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$", r"foo!bas", Some((0, 7)), Some((0, 4)), Some((4, 7)));
-mat!(match_basic_212, r"^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$", r"bas", Some((0, 3)), Some((0, 3)), None, Some((0, 3)));
-mat!(match_basic_213, r"^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$", r"bar!bas", Some((0, 7)), Some((0, 7)), Some((0, 4)), Some((4, 7)));
-mat!(match_basic_214, r"^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$", r"foo!bar!bas", Some((0, 11)), Some((0, 11)), None, None, Some((4, 8)), Some((8, 11)));
-mat!(match_basic_215, r"^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$", r"foo!bas", Some((0, 7)), Some((0, 7)), Some((0, 4)), Some((4, 7)));
-mat!(match_basic_216, r".*(/XXX).*", r"/XXX", Some((0, 4)), Some((0, 4)));
-mat!(match_basic_217, r".*(\\XXX).*", r"\XXX", Some((0, 4)), Some((0, 4)));
-mat!(match_basic_218, r"\\XXX", r"\XXX", Some((0, 4)));
-mat!(match_basic_219, r".*(/000).*", r"/000", Some((0, 4)), Some((0, 4)));
-mat!(match_basic_220, r".*(\\000).*", r"\000", Some((0, 4)), Some((0, 4)));
-mat!(match_basic_221, r"\\000", r"\000", Some((0, 4)));
-
-// Tests from nullsubexpr.dat
-mat!(match_nullsubexpr_3, r"(a*)*", r"a", Some((0, 1)), Some((0, 1)));
-mat!(match_nullsubexpr_5, r"(a*)*", r"x", Some((0, 0)), None);
-mat!(match_nullsubexpr_6, r"(a*)*", r"aaaaaa", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_7, r"(a*)*", r"aaaaaax", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_8, r"(a*)+", r"a", Some((0, 1)), Some((0, 1)));
-mat!(match_nullsubexpr_9, r"(a*)+", r"x", Some((0, 0)), Some((0, 0)));
-mat!(match_nullsubexpr_10, r"(a*)+", r"aaaaaa", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_11, r"(a*)+", r"aaaaaax", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_12, r"(a+)*", r"a", Some((0, 1)), Some((0, 1)));
-mat!(match_nullsubexpr_13, r"(a+)*", r"x", Some((0, 0)));
-mat!(match_nullsubexpr_14, r"(a+)*", r"aaaaaa", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_15, r"(a+)*", r"aaaaaax", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_16, r"(a+)+", r"a", Some((0, 1)), Some((0, 1)));
-mat!(match_nullsubexpr_17, r"(a+)+", r"x", None);
-mat!(match_nullsubexpr_18, r"(a+)+", r"aaaaaa", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_19, r"(a+)+", r"aaaaaax", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_21, r"([a]*)*", r"a", Some((0, 1)), Some((0, 1)));
-mat!(match_nullsubexpr_23, r"([a]*)*", r"x", Some((0, 0)), None);
-mat!(match_nullsubexpr_24, r"([a]*)*", r"aaaaaa", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_25, r"([a]*)*", r"aaaaaax", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_26, r"([a]*)+", r"a", Some((0, 1)), Some((0, 1)));
-mat!(match_nullsubexpr_27, r"([a]*)+", r"x", Some((0, 0)), Some((0, 0)));
-mat!(match_nullsubexpr_28, r"([a]*)+", r"aaaaaa", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_29, r"([a]*)+", r"aaaaaax", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_30, r"([^b]*)*", r"a", Some((0, 1)), Some((0, 1)));
-mat!(match_nullsubexpr_32, r"([^b]*)*", r"b", Some((0, 0)), None);
-mat!(match_nullsubexpr_33, r"([^b]*)*", r"aaaaaa", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_34, r"([^b]*)*", r"aaaaaab", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_35, r"([ab]*)*", r"a", Some((0, 1)), Some((0, 1)));
-mat!(match_nullsubexpr_36, r"([ab]*)*", r"aaaaaa", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_37, r"([ab]*)*", r"ababab", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_38, r"([ab]*)*", r"bababa", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_39, r"([ab]*)*", r"b", Some((0, 1)), Some((0, 1)));
-mat!(match_nullsubexpr_40, r"([ab]*)*", r"bbbbbb", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_41, r"([ab]*)*", r"aaaabcde", Some((0, 5)), Some((0, 5)));
-mat!(match_nullsubexpr_42, r"([^a]*)*", r"b", Some((0, 1)), Some((0, 1)));
-mat!(match_nullsubexpr_43, r"([^a]*)*", r"bbbbbb", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_45, r"([^a]*)*", r"aaaaaa", Some((0, 0)), None);
-mat!(match_nullsubexpr_46, r"([^ab]*)*", r"ccccxx", Some((0, 6)), Some((0, 6)));
-mat!(match_nullsubexpr_48, r"([^ab]*)*", r"ababab", Some((0, 0)), None);
-mat!(match_nullsubexpr_50, r"((z)+|a)*", r"zabcde", Some((0, 2)), Some((1, 2)));
-mat!(match_nullsubexpr_69, r"(a*)*(x)", r"x", Some((0, 1)), None, Some((0, 1)));
-mat!(match_nullsubexpr_70, r"(a*)*(x)", r"ax", Some((0, 2)), Some((0, 1)), Some((1, 2)));
-mat!(match_nullsubexpr_71, r"(a*)*(x)", r"axa", Some((0, 2)), Some((0, 1)), Some((1, 2)));
-mat!(match_nullsubexpr_73, r"(a*)+(x)", r"x", Some((0, 1)), Some((0, 0)), Some((0, 1)));
-mat!(match_nullsubexpr_74, r"(a*)+(x)", r"ax", Some((0, 2)), Some((0, 1)), Some((1, 2)));
-mat!(match_nullsubexpr_75, r"(a*)+(x)", r"axa", Some((0, 2)), Some((0, 1)), Some((1, 2)));
-mat!(match_nullsubexpr_77, r"(a*){2}(x)", r"x", Some((0, 1)), Some((0, 0)), Some((0, 1)));
-mat!(match_nullsubexpr_78, r"(a*){2}(x)", r"ax", Some((0, 2)), Some((1, 1)), Some((1, 2)));
-mat!(match_nullsubexpr_79, r"(a*){2}(x)", r"axa", Some((0, 2)), Some((1, 1)), Some((1, 2)));
-
-// Tests from repetition.dat
-mat!(match_repetition_10, r"((..)|(.))", r"", None);
-mat!(match_repetition_11, r"((..)|(.))((..)|(.))", r"", None);
-mat!(match_repetition_12, r"((..)|(.))((..)|(.))((..)|(.))", r"", None);
-mat!(match_repetition_14, r"((..)|(.)){1}", r"", None);
-mat!(match_repetition_15, r"((..)|(.)){2}", r"", None);
-mat!(match_repetition_16, r"((..)|(.)){3}", r"", None);
-mat!(match_repetition_18, r"((..)|(.))*", r"", Some((0, 0)));
-mat!(match_repetition_20, r"((..)|(.))", r"a", Some((0, 1)), Some((0, 1)), None, Some((0, 1)));
-mat!(match_repetition_21, r"((..)|(.))((..)|(.))", r"a", None);
-mat!(match_repetition_22, r"((..)|(.))((..)|(.))((..)|(.))", r"a", None);
-mat!(match_repetition_24, r"((..)|(.)){1}", r"a", Some((0, 1)), Some((0, 1)), None, Some((0, 1)));
-mat!(match_repetition_25, r"((..)|(.)){2}", r"a", None);
-mat!(match_repetition_26, r"((..)|(.)){3}", r"a", None);
-mat!(match_repetition_28, r"((..)|(.))*", r"a", Some((0, 1)), Some((0, 1)), None, Some((0, 1)));
-mat!(match_repetition_30, r"((..)|(.))", r"aa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None);
-mat!(match_repetition_31, r"((..)|(.))((..)|(.))", r"aa", Some((0, 2)), Some((0, 1)), None, Some((0, 1)), Some((1, 2)), None, Some((1, 2)));
-mat!(match_repetition_32, r"((..)|(.))((..)|(.))((..)|(.))", r"aa", None);
-mat!(match_repetition_34, r"((..)|(.)){1}", r"aa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None);
-mat!(match_repetition_35, r"((..)|(.)){2}", r"aa", Some((0, 2)), Some((1, 2)), None, Some((1, 2)));
-mat!(match_repetition_36, r"((..)|(.)){3}", r"aa", None);
-mat!(match_repetition_38, r"((..)|(.))*", r"aa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None);
-mat!(match_repetition_40, r"((..)|(.))", r"aaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None);
-mat!(match_repetition_41, r"((..)|(.))((..)|(.))", r"aaa", Some((0, 3)), Some((0, 2)), Some((0, 2)), None, Some((2, 3)), None, Some((2, 3)));
-mat!(match_repetition_42, r"((..)|(.))((..)|(.))((..)|(.))", r"aaa", Some((0, 3)), Some((0, 1)), None, Some((0, 1)), Some((1, 2)), None, Some((1, 2)), Some((2, 3)), None, Some((2, 3)));
-mat!(match_repetition_44, r"((..)|(.)){1}", r"aaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None);
-mat!(match_repetition_46, r"((..)|(.)){2}", r"aaa", Some((0, 3)), Some((2, 3)), Some((0, 2)), Some((2, 3)));
-mat!(match_repetition_47, r"((..)|(.)){3}", r"aaa", Some((0, 3)), Some((2, 3)), None, Some((2, 3)));
-mat!(match_repetition_50, r"((..)|(.))*", r"aaa", Some((0, 3)), Some((2, 3)), Some((0, 2)), Some((2, 3)));
-mat!(match_repetition_52, r"((..)|(.))", r"aaaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None);
-mat!(match_repetition_53, r"((..)|(.))((..)|(.))", r"aaaa", Some((0, 4)), Some((0, 2)), Some((0, 2)), None, Some((2, 4)), Some((2, 4)), None);
-mat!(match_repetition_54, r"((..)|(.))((..)|(.))((..)|(.))", r"aaaa", Some((0, 4)), Some((0, 2)), Some((0, 2)), None, Some((2, 3)), None, Some((2, 3)), Some((3, 4)), None, Some((3, 4)));
-mat!(match_repetition_56, r"((..)|(.)){1}", r"aaaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None);
-mat!(match_repetition_57, r"((..)|(.)){2}", r"aaaa", Some((0, 4)), Some((2, 4)), Some((2, 4)), None);
-mat!(match_repetition_59, r"((..)|(.)){3}", r"aaaa", Some((0, 4)), Some((3, 4)), Some((0, 2)), Some((3, 4)));
-mat!(match_repetition_61, r"((..)|(.))*", r"aaaa", Some((0, 4)), Some((2, 4)), Some((2, 4)), None);
-mat!(match_repetition_63, r"((..)|(.))", r"aaaaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None);
-mat!(match_repetition_64, r"((..)|(.))((..)|(.))", r"aaaaa", Some((0, 4)), Some((0, 2)), Some((0, 2)), None, Some((2, 4)), Some((2, 4)), None);
-mat!(match_repetition_65, r"((..)|(.))((..)|(.))((..)|(.))", r"aaaaa", Some((0, 5)), Some((0, 2)), Some((0, 2)), None, Some((2, 4)), Some((2, 4)), None, Some((4, 5)), None, Some((4, 5)));
-mat!(match_repetition_67, r"((..)|(.)){1}", r"aaaaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None);
-mat!(match_repetition_68, r"((..)|(.)){2}", r"aaaaa", Some((0, 4)), Some((2, 4)), Some((2, 4)), None);
-mat!(match_repetition_70, r"((..)|(.)){3}", r"aaaaa", Some((0, 5)), Some((4, 5)), Some((2, 4)), Some((4, 5)));
-mat!(match_repetition_73, r"((..)|(.))*", r"aaaaa", Some((0, 5)), Some((4, 5)), Some((2, 4)), Some((4, 5)));
-mat!(match_repetition_75, r"((..)|(.))", r"aaaaaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None);
-mat!(match_repetition_76, r"((..)|(.))((..)|(.))", r"aaaaaa", Some((0, 4)), Some((0, 2)), Some((0, 2)), None, Some((2, 4)), Some((2, 4)), None);
-mat!(match_repetition_77, r"((..)|(.))((..)|(.))((..)|(.))", r"aaaaaa", Some((0, 6)), Some((0, 2)), Some((0, 2)), None, Some((2, 4)), Some((2, 4)), None, Some((4, 6)), Some((4, 6)), None);
-mat!(match_repetition_79, r"((..)|(.)){1}", r"aaaaaa", Some((0, 2)), Some((0, 2)), Some((0, 2)), None);
-mat!(match_repetition_80, r"((..)|(.)){2}", r"aaaaaa", Some((0, 4)), Some((2, 4)), Some((2, 4)), None);
-mat!(match_repetition_81, r"((..)|(.)){3}", r"aaaaaa", Some((0, 6)), Some((4, 6)), Some((4, 6)), None);
-mat!(match_repetition_83, r"((..)|(.))*", r"aaaaaa", Some((0, 6)), Some((4, 6)), Some((4, 6)), None);
-mat!(match_repetition_90, r"X(.?){0,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8)));
-mat!(match_repetition_91, r"X(.?){1,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8)));
-mat!(match_repetition_92, r"X(.?){2,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8)));
-mat!(match_repetition_93, r"X(.?){3,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8)));
-mat!(match_repetition_94, r"X(.?){4,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8)));
-mat!(match_repetition_95, r"X(.?){5,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8)));
-mat!(match_repetition_96, r"X(.?){6,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8)));
-mat!(match_repetition_97, r"X(.?){7,}Y", r"X1234567Y", Some((0, 9)), Some((7, 8)));
-mat!(match_repetition_98, r"X(.?){8,}Y", r"X1234567Y", Some((0, 9)), Some((8, 8)));
-mat!(match_repetition_100, r"X(.?){0,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8)));
-mat!(match_repetition_102, r"X(.?){1,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8)));
-mat!(match_repetition_104, r"X(.?){2,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8)));
-mat!(match_repetition_106, r"X(.?){3,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8)));
-mat!(match_repetition_108, r"X(.?){4,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8)));
-mat!(match_repetition_110, r"X(.?){5,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8)));
-mat!(match_repetition_112, r"X(.?){6,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8)));
-mat!(match_repetition_114, r"X(.?){7,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8)));
-mat!(match_repetition_115, r"X(.?){8,8}Y", r"X1234567Y", Some((0, 9)), Some((8, 8)));
-mat!(match_repetition_126, r"(a|ab|c|bcd){0,}(d*)", r"ababcd", Some((0, 1)), Some((0, 1)), Some((1, 1)));
-mat!(match_repetition_127, r"(a|ab|c|bcd){1,}(d*)", r"ababcd", Some((0, 1)), Some((0, 1)), Some((1, 1)));
-mat!(match_repetition_128, r"(a|ab|c|bcd){2,}(d*)", r"ababcd", Some((0, 6)), Some((3, 6)), Some((6, 6)));
-mat!(match_repetition_129, r"(a|ab|c|bcd){3,}(d*)", r"ababcd", Some((0, 6)), Some((3, 6)), Some((6, 6)));
-mat!(match_repetition_130, r"(a|ab|c|bcd){4,}(d*)", r"ababcd", None);
-mat!(match_repetition_131, r"(a|ab|c|bcd){0,10}(d*)", r"ababcd", Some((0, 1)), Some((0, 1)), Some((1, 1)));
-mat!(match_repetition_132, r"(a|ab|c|bcd){1,10}(d*)", r"ababcd", Some((0, 1)), Some((0, 1)), Some((1, 1)));
-mat!(match_repetition_133, r"(a|ab|c|bcd){2,10}(d*)", r"ababcd", Some((0, 6)), Some((3, 6)), Some((6, 6)));
-mat!(match_repetition_134, r"(a|ab|c|bcd){3,10}(d*)", r"ababcd", Some((0, 6)), Some((3, 6)), Some((6, 6)));
-mat!(match_repetition_135, r"(a|ab|c|bcd){4,10}(d*)", r"ababcd", None);
-mat!(match_repetition_136, r"(a|ab|c|bcd)*(d*)", r"ababcd", Some((0, 1)), Some((0, 1)), Some((1, 1)));
-mat!(match_repetition_137, r"(a|ab|c|bcd)+(d*)", r"ababcd", Some((0, 1)), Some((0, 1)), Some((1, 1)));
-mat!(match_repetition_143, r"(ab|a|c|bcd){0,}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6)));
-mat!(match_repetition_145, r"(ab|a|c|bcd){1,}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6)));
-mat!(match_repetition_147, r"(ab|a|c|bcd){2,}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6)));
-mat!(match_repetition_149, r"(ab|a|c|bcd){3,}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6)));
-mat!(match_repetition_150, r"(ab|a|c|bcd){4,}(d*)", r"ababcd", None);
-mat!(match_repetition_152, r"(ab|a|c|bcd){0,10}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6)));
-mat!(match_repetition_154, r"(ab|a|c|bcd){1,10}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6)));
-mat!(match_repetition_156, r"(ab|a|c|bcd){2,10}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6)));
-mat!(match_repetition_158, r"(ab|a|c|bcd){3,10}(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6)));
-mat!(match_repetition_159, r"(ab|a|c|bcd){4,10}(d*)", r"ababcd", None);
-mat!(match_repetition_161, r"(ab|a|c|bcd)*(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6)));
-mat!(match_repetition_163, r"(ab|a|c|bcd)+(d*)", r"ababcd", Some((0, 6)), Some((4, 5)), Some((5, 6)));
-
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/macros.rs
+++ /dev/null
@@ -1,150 +0,0 @@
-// Convenience macros.
-
-macro_rules! findall {
-    ($re:expr, $text:expr) => {{
-        $re.find_iter(text!($text))
-           .map(|m| (m.start(), m.end())).collect::<Vec<_>>()
-    }}
-}
-
-// Macros for automatically producing tests.
-
-macro_rules! ismatch {
-    ($name:ident, $re:expr, $text:expr, $ismatch:expr) => {
-        #[test]
-        fn $name() {
-            let text = text!($text);
-            let re = regex!($re);
-            assert!($ismatch == re.is_match(text));
-        }
-    };
-}
-
-macro_rules! mat(
-    ($name:ident, $re:expr, $text:expr, $($loc:tt)+) => (
-        #[test]
-        fn $name() {
-            let text = text!($text);
-            let expected: Vec<Option<_>> = vec![$($loc)+];
-            let r = regex!($re);
-            let got: Vec<Option<_>> = match r.captures(text) {
-                Some(c) => {
-                    assert!(r.is_match(text));
-                    assert!(r.shortest_match(text).is_some());
-                    r.capture_names()
-                     .enumerate()
-                     .map(|(i, _)| c.get(i).map(|m| (m.start(), m.end())))
-                     .collect()
-                }
-                None => vec![None],
-            };
-            // The test set sometimes leave out capture groups, so truncate
-            // actual capture groups to match test set.
-            let mut sgot = &got[..];
-            if sgot.len() > expected.len() {
-                sgot = &sgot[0..expected.len()]
-            }
-            if expected != sgot {
-                panic!("For RE '{}' against '{:?}', \
-                        expected '{:?}' but got '{:?}'",
-                       $re, text, expected, sgot);
-            }
-        }
-    );
-);
-
-macro_rules! matiter(
-    ($name:ident, $re:expr, $text:expr) => (
-        #[test]
-        fn $name() {
-            let text = text!($text);
-            let expected: Vec<(usize, usize)> = vec![];
-            let r = regex!($re);
-            let got: Vec<_> =
-                r.find_iter(text).map(|m| (m.start(), m.end())).collect();
-            if expected != got {
-                panic!("For RE '{}' against '{:?}', \
-                        expected '{:?}' but got '{:?}'",
-                       $re, text, expected, got);
-            }
-            let captures_got: Vec<_> =
-                r.captures_iter(text)
-                 .map(|c| c.get(0).unwrap())
-                 .map(|m| (m.start(), m.end()))
-                 .collect();
-            if captures_got != got {
-                panic!("For RE '{}' against '{:?}', \
-                        got '{:?}' using find_iter but got '{:?}' \
-                        using captures_iter",
-                       $re, text, got, captures_got);
-            }
-        }
-    );
-    ($name:ident, $re:expr, $text:expr, $($loc:tt)+) => (
-        #[test]
-        fn $name() {
-            let text = text!($text);
-            let expected: Vec<_> = vec![$($loc)+];
-            let r = regex!($re);
-            let got: Vec<_> =
-                r.find_iter(text).map(|m| (m.start(), m.end())).collect();
-            if expected != got {
-                panic!("For RE '{}' against '{:?}', \
-                        expected '{:?}' but got '{:?}'",
-                       $re, text, expected, got);
-            }
-            let captures_got: Vec<_> =
-                r.captures_iter(text)
-                 .map(|c| c.get(0).unwrap())
-                 .map(|m| (m.start(), m.end()))
-                 .collect();
-            if captures_got != got {
-                panic!("For RE '{}' against '{:?}', \
-                        got '{:?}' using find_iter but got '{:?}' \
-                        using captures_iter",
-                       $re, text, got, captures_got);
-            }
-        }
-    );
-);
-
-macro_rules! matset {
-    ($name:ident, $res:expr, $text:expr, $($match_index:expr),*) => {
-        #[test]
-        fn $name() {
-            let text = text!($text);
-            let set = regex_set!($res);
-            assert!(set.is_match(text));
-            let expected = vec![$($match_index),*];
-            let matches = set.matches(text);
-            assert!(matches.matched_any());
-            let got: Vec<_> = matches.into_iter().collect();
-            assert_eq!(expected, got);
-        }
-    }
-}
-
-macro_rules! nomatset {
-    ($name:ident, $res:expr, $text:expr) => {
-        #[test]
-        fn $name() {
-            let text = text!($text);
-            let set = regex_set!($res);
-            assert!(!set.is_match(text));
-            let matches = set.matches(text);
-            assert!(!matches.matched_any());
-            assert_eq!(0, matches.into_iter().count());
-        }
-    }
-}
-
-macro_rules! split {
-    ($name:ident, $re:expr, $text:expr, $expected:expr) => {
-        #[test]
-        fn $name() {
-            let re = regex!($re);
-            let splitted: Vec<_> = re.split(t!($text)).collect();
-            assert_eq!($expected, &*splitted);
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/macros_bytes.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-// Macros for use in writing tests generic over &str/&[u8].
-macro_rules! text { ($text:expr) => { $text.as_bytes() } }
-macro_rules! t { ($re:expr) => { text!($re) } }
-macro_rules! match_text { ($text:expr) => { $text.as_bytes() } }
-
-macro_rules! bytes { ($text:expr) => { $text } }
-macro_rules! b { ($text:expr) => { bytes!($text) } }
-
-// macro_rules! u { ($re:expr) => { concat!("(?u)", $re) } }
-
-macro_rules! no_expand {
-    ($text:expr) => {{
-        use regex::bytes::NoExpand;
-        NoExpand(text!($text))
-    }}
-}
-
-macro_rules! show {
-    ($text:expr) => {{
-        use std::ascii::escape_default;
-        let mut s = vec![];
-        for &b in bytes!($text) {
-            s.extend(escape_default(b));
-        }
-        String::from_utf8(s).unwrap()
-    }}
-}
-
-macro_rules! expand {
-    ($name:ident, $re:expr, $text:expr, $expand:expr, $expected:expr) => {
-        #[test]
-        fn $name() {
-            let re = regex!($re);
-            let cap = re.captures(t!($text)).unwrap();
-
-            let mut got = vec![];
-            cap.expand(t!($expand), &mut got);
-            assert_eq!(show!(t!($expected)), show!(&*got));
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/macros_str.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Macros for use in writing tests generic over &str/&[u8].
-macro_rules! text { ($text:expr) => { $text } }
-macro_rules! t { ($text:expr) => { text!($text) } }
-macro_rules! match_text { ($text:expr) => { $text.as_str() } }
-
-macro_rules! bytes { ($text:expr) => { $text.as_bytes() } }
-macro_rules! b { ($text:expr) => { bytes!($text) } }
-
-// macro_rules! u { ($re:expr) => { $re } }
-
-macro_rules! no_expand {
-    ($text:expr) => {{
-        use regex::NoExpand;
-        NoExpand(text!($text))
-    }}
-}
-
-macro_rules! show { ($text:expr) => { $text } }
-
-// N.B. The expansion API for &str and &[u8] APIs differs slightly for now,
-// but they should be unified in 1.0. Then we can move this macro back into
-// tests/api.rs where it is used. ---AG
-macro_rules! expand {
-    ($name:ident, $re:expr, $text:expr, $expand:expr, $expected:expr) => {
-        #[test]
-        fn $name() {
-            let re = regex!($re);
-            let cap = re.captures(t!($text)).unwrap();
-
-            let mut got = String::new();
-            cap.expand(t!($expand), &mut got);
-            assert_eq!(show!(t!($expected)), show!(&*got));
-        }
-    }
-}
-
-#[cfg(feature = "pattern")]
-macro_rules! searcher_expr { ($e:expr) => ($e) }
-#[cfg(not(feature = "pattern"))]
-macro_rules! searcher_expr { ($e:expr) => ({}) }
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/misc.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mat!(prefix_literal_match, r"^abc", r"abc", Some((0, 3)));
-mat!(prefix_literal_nomatch, r"^abc", r"zabc", None);
-mat!(one_literal_edge, r"abc", r"xxxxxab", None);
-matiter!(terminates, r"a$", r"a", (0, 1));
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/multiline.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-matiter!(match_multi_1, r"(?m)^[a-z]+$", "abc\ndef\nxyz",
-         (0, 3), (4, 7), (8, 11));
-matiter!(match_multi_2, r"(?m)^$", "abc\ndef\nxyz");
-matiter!(match_multi_3, r"(?m)^", "abc\ndef\nxyz",
-         (0, 0), (4, 4), (8, 8));
-matiter!(match_multi_4, r"(?m)$", "abc\ndef\nxyz",
-         (3, 3), (7, 7), (11, 11));
-matiter!(match_multi_5, r"(?m)^[a-z]", "abc\ndef\nxyz",
-         (0, 1), (4, 5), (8, 9));
-matiter!(match_multi_6, r"(?m)[a-z]^", "abc\ndef\nxyz");
-matiter!(match_multi_7, r"(?m)[a-z]$", "abc\ndef\nxyz",
-         (2, 3), (6, 7), (10, 11));
-matiter!(match_multi_8, r"(?m)$[a-z]", "abc\ndef\nxyz");
-matiter!(match_multi_9, r"(?m)^$", "", (0, 0));
-
-matiter!(match_multi_rep_1, r"(?m)(?:^$)*", "a\nb\nc",
-         (0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5));
-matiter!(match_multi_rep_2, r"(?m)(?:^|a)+", "a\naaa\n",
-         (0, 0), (2, 2), (3, 5), (6, 6));
-matiter!(match_multi_rep_3, r"(?m)(?:^|a)*", "a\naaa\n",
-         (0, 1), (2, 5), (6, 6));
-matiter!(match_multi_rep_4, r"(?m)(?:^[a-z])+", "abc\ndef\nxyz",
-         (0, 1), (4, 5), (8, 9));
-matiter!(match_multi_rep_5, r"(?m)(?:^[a-z]{3}\n?)+", "abc\ndef\nxyz",
-         (0, 11));
-matiter!(match_multi_rep_6, r"(?m)(?:^[a-z]{3}\n?)*", "abc\ndef\nxyz",
-         (0, 11));
-matiter!(match_multi_rep_7, r"(?m)(?:\n?[a-z]{3}$)+", "abc\ndef\nxyz",
-         (0, 11));
-matiter!(match_multi_rep_8, r"(?m)(?:\n?[a-z]{3}$)*", "abc\ndef\nxyz",
-         (0, 11));
-matiter!(match_multi_rep_9, r"(?m)^*", "\naa\n",
-         (0, 0), (1, 1), (2, 2), (3, 3), (4, 4));
-matiter!(match_multi_rep_10, r"(?m)^+", "\naa\n",
-         (0, 0), (1, 1), (4, 4));
-matiter!(match_multi_rep_11, r"(?m)$*", "\naa\n",
-         (0, 0), (1, 1), (2, 2), (3, 3), (4, 4));
-matiter!(match_multi_rep_12, r"(?m)$+", "\naa\n",
-         (0, 0), (3, 3), (4, 4));
-matiter!(match_multi_rep_13, r"(?m)(?:$\n)+", "\n\naaa\n\n",
-         (0, 2), (5, 7));
-matiter!(match_multi_rep_14, r"(?m)(?:$\n)*", "\n\naaa\n\n",
-         (0, 2), (3, 3), (4, 4), (5, 7));
-matiter!(match_multi_rep_15, r"(?m)(?:$\n^)+", "\n\naaa\n\n",
-         (0, 2), (5, 7));
-matiter!(match_multi_rep_16, r"(?m)(?:^|$)+", "\n\naaa\n\n",
-         (0, 0), (1, 1), (2, 2), (5, 5), (6, 6), (7, 7));
-matiter!(match_multi_rep_17, r"(?m)(?:$\n)*", "\n\naaa\n\n",
-         (0, 2), (3, 3), (4, 4), (5, 7));
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/noparse.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-macro_rules! noparse(
-    ($name:ident, $re:expr) => (
-        #[test]
-        fn $name() {
-            let re = $re;
-            match regex_new!(re) {
-                Err(_) => {},
-                Ok(_) => panic!("Regex '{}' should cause a parse error.", re),
-            }
-        }
-    );
-);
-
-noparse!(fail_double_repeat, "a**");
-noparse!(fail_no_repeat_arg, "*");
-noparse!(fail_incomplete_escape, "\\");
-noparse!(fail_class_incomplete, "[A-");
-noparse!(fail_class_not_closed, "[A");
-noparse!(fail_class_no_begin, r"[\A]");
-noparse!(fail_class_no_end, r"[\z]");
-noparse!(fail_class_no_boundary, r"[\b]");
-noparse!(fail_open_paren, "(");
-noparse!(fail_close_paren, ")");
-noparse!(fail_invalid_range, "[a-Z]");
-noparse!(fail_empty_capture_name, "(?P<>a)");
-noparse!(fail_empty_capture_exp, "(?P<name>)");
-noparse!(fail_bad_capture_name, "(?P<na-me>)");
-noparse!(fail_bad_flag, "(?a)a");
-noparse!(fail_empty_alt_before, "|a");
-noparse!(fail_empty_alt_after, "a|");
-noparse!(fail_too_big, "a{10000000}");
-noparse!(fail_counted_no_close, "a{1001");
-noparse!(fail_unfinished_cap, "(?");
-noparse!(fail_unfinished_escape, "\\");
-noparse!(fail_octal_digit, r"\8");
-noparse!(fail_hex_digit, r"\xG0");
-noparse!(fail_hex_short, r"\xF");
-noparse!(fail_hex_long_digits, r"\x{fffg}");
-noparse!(fail_flag_bad, "(?a)");
-noparse!(fail_flag_empty, "(?)");
-noparse!(fail_double_neg, "(?-i-i)");
-noparse!(fail_neg_empty, "(?i-)");
-noparse!(fail_empty_group, "()");
-noparse!(fail_dupe_named, "(?P<a>.)(?P<a>.)");
-noparse!(fail_range_end_no_class, "[a-[:lower:]]");
-noparse!(fail_range_end_no_begin, r"[a-\A]");
-noparse!(fail_range_end_no_end, r"[a-\z]");
-noparse!(fail_range_end_no_boundary, r"[a-\b]");
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/plugin.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use regex::Regex;
-static RE: Regex = regex!(r"\d+");
-
-#[test]
-fn splitn() {
-    let text = "cauchy123plato456tyler789binx";
-    let subs: Vec<&str> = RE.splitn(text, 2).collect();
-    assert_eq!(subs, vec!("cauchy", "plato456tyler789binx"));
-}
-
-#[test]
-fn split() {
-    let text = "cauchy123plato456tyler789binx";
-    let subs: Vec<&str> = RE.split(text).collect();
-    assert_eq!(subs, vec!("cauchy", "plato", "tyler", "binx"));
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/regression.rs
+++ /dev/null
@@ -1,84 +0,0 @@
-// See: https://github.com/rust-lang/regex/issues/48
-#[test]
-fn invalid_regexes_no_crash() {
-    assert!(regex_new!("(*)").is_err());
-    assert!(regex_new!("(?:?)").is_err());
-    assert!(regex_new!("(?)").is_err());
-    assert!(regex_new!("*").is_err());
-}
-
-// See: https://github.com/rust-lang/regex/issues/98
-#[test]
-fn regression_many_repeat_stack_overflow() {
-    let re = regex!("^.{1,2500}");
-    assert_eq!(vec![(0, 1)], findall!(re, "a"));
-}
-
-// See: https://github.com/rust-lang/regex/issues/75
-mat!(regression_unsorted_binary_search_1, r"(?i)[a_]+", "A_", Some((0, 2)));
-mat!(regression_unsorted_binary_search_2, r"(?i)[A_]+", "a_", Some((0, 2)));
-
-// See: https://github.com/rust-lang/regex/issues/99
-mat!(regression_negated_char_class_1, r"(?i)[^x]", "x", None);
-mat!(regression_negated_char_class_2, r"(?i)[^x]", "X", None);
-
-// See: https://github.com/rust-lang/regex/issues/101
-mat!(regression_ascii_word_underscore, r"[[:word:]]", "_", Some((0, 1)));
-
-// See: https://github.com/rust-lang/regex/issues/129
-#[test]
-fn regression_captures_rep() {
-    let re = regex!(r"([a-f]){2}(?P<foo>[x-z])");
-    let caps = re.captures(text!("abx")).unwrap();
-    assert_eq!(match_text!(caps.name("foo").unwrap()), text!("x"));
-}
-
-// See: https://github.com/rust-lang/regex/issues/153
-mat!(regression_alt_in_alt1, r"ab?|$", "az", Some((0, 1)));
-mat!(regression_alt_in_alt2, r"^(.*?)(\n|\r\n?|$)", "ab\rcd", Some((0, 3)));
-
-// See: https://github.com/rust-lang/regex/issues/169
-mat!(regression_leftmost_first_prefix, r"z*azb", "azb", Some((0, 3)));
-
-// See: https://github.com/rust-lang/regex/issues/76
-mat!(uni_case_lower_nocase_flag, r"(?i)\p{Ll}+", "ΛΘΓΔα", Some((0, 10)));
-
-// See: https://github.com/rust-lang/regex/issues/191
-mat!(many_alternates, r"1|2|3|4|5|6|7|8|9|10|int", "int", Some((0, 3)));
-
-// burntsushi was bad and didn't create an issue for this bug.
-mat!(anchored_prefix1, r"^a\S", "a ", None);
-mat!(anchored_prefix2, r"^a\S", "foo boo a ", None);
-mat!(anchored_prefix3, r"^-[a-z]", "r-f", None);
-
-// See: https://github.com/rust-lang/regex/issues/204
-split!(split_on_word_boundary, r"\b", r"Should this (work?)",
-       &[t!(""), t!("Should"), t!(" "), t!("this"),
-         t!(" ("), t!("work"), t!("?)")]);
-matiter!(word_boundary_dfa, r"\b", "a b c",
-         (0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5));
-
-// See: https://github.com/rust-lang/regex/issues/268
-matiter!(partial_anchor, r"^a|b", "ba", (0, 1));
-
-// See: https://github.com/rust-lang/regex/issues/264
-mat!(ascii_boundary_no_capture, r"(?-u)\B", "\u{28f3e}", Some((0, 0)));
-mat!(ascii_boundary_capture, r"(?-u)(\B)", "\u{28f3e}", Some((0, 0)));
-
-// See: https://github.com/rust-lang/regex/issues/280
-ismatch!(partial_anchor_alternate_begin, r"^a|z", "yyyyya", false);
-ismatch!(partial_anchor_alternate_end, r"a$|z", "ayyyyy", false);
-
-// See: https://github.com/rust-lang/regex/issues/289
-mat!(lits_unambiguous1, r"(ABC|CDA|BC)X", "CDAX", Some((0, 4)));
-
-// See: https://github.com/rust-lang/regex/issues/291
-mat!(lits_unambiguous2, r"((IMG|CAM|MG|MB2)_|(DSCN|CIMG))(?P<n>[0-9]+)$",
-     "CIMG2341", Some((0, 8)), Some((0, 4)), None, Some((0, 4)), Some((4, 8)));
-
-// See: https://github.com/rust-lang/regex/issues/271
-mat!(end_not_wb, r"$(?-u:\B)", "\u{5c124}\u{b576c}", Some((8, 8)));
-mat!(endl_or_wb, r"(?m:$)|(?-u:\b)", "\u{6084e}", Some((4, 4)));
-mat!(zero_or_end, r"(?i-u:\x00)|$", "\u{e682f}", Some((4, 4)));
-mat!(y_or_endl, r"(?i-u:y)|(?m:$)", "\u{b4331}", Some((4, 4)));
-mat!(wb_start_x, r"(?u:\b)^(?-u:X)", "X", Some((0, 1)));
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/replace.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-macro_rules! replace(
-    ($name:ident, $which:ident, $re:expr,
-     $search:expr, $replace:expr, $result:expr) => (
-        #[test]
-        fn $name() {
-            let re = regex!($re);
-            assert_eq!(re.$which(text!($search), $replace), text!($result));
-        }
-    );
-);
-
-replace!(first, replace, r"\d", "age: 26", t!("Z"), "age: Z6");
-replace!(plus, replace, r"\d+", "age: 26", t!("Z"), "age: Z");
-replace!(all, replace_all, r"\d", "age: 26", t!("Z"), "age: ZZ");
-replace!(groups, replace, r"(\S+)\s+(\S+)", "w1 w2", t!("$2 $1"), "w2 w1");
-replace!(double_dollar, replace,
-         r"(\S+)\s+(\S+)", "w1 w2", t!("$2 $$1"), "w2 $1");
-// replace!(adjacent_index, replace,
-         // r"([^aeiouy])ies$", "skies", t!("$1y"), "sky");
-replace!(named, replace_all,
-         r"(?P<first>\S+)\s+(?P<last>\S+)(?P<space>\s*)",
-         "w1 w2 w3 w4", t!("$last $first$space"), "w2 w1 w4 w3");
-replace!(trim, replace_all, "^[ \t]+|[ \t]+$", " \t  trim me\t   \t",
-         t!(""), "trim me");
-replace!(number_hypen, replace, r"(.)(.)", "ab", t!("$1-$2"), "a-b");
-// replace!(number_underscore, replace, r"(.)(.)", "ab", t!("$1_$2"), "a_b");
-replace!(simple_expand, replace_all, r"(\w) (\w)", "a b", t!("$2 $1"), "b a");
-replace!(literal_dollar1, replace_all,
-         r"(\w+) (\w+)", "a b", t!("$$1"), "$1");
-replace!(literal_dollar2, replace_all,
-         r"(\w+) (\w+)", "a b", t!("$2 $$c $1"), "b $c a");
-replace!(no_expand1, replace,
-         r"(\S+)\s+(\S+)", "w1 w2", no_expand!("$2 $1"), "$2 $1");
-replace!(no_expand2, replace,
-         r"(\S+)\s+(\S+)", "w1 w2", no_expand!("$$1"), "$$1");
-
-// See https://github.com/rust-lang/regex/issues/314
-replace!(match_at_start_replace_with_empty, replace_all, r"foo", "foobar", t!(""), "bar");
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/searcher.rs
+++ /dev/null
@@ -1,66 +0,0 @@
-macro_rules! searcher {
-    ($name:ident, $re:expr, $haystack:expr) => (
-        searcher!($name, $re, $haystack, vec vec![]);
-    );
-    ($name:ident, $re:expr, $haystack:expr, $($steps:expr,)*) => (
-        searcher!($name, $re, $haystack, vec vec![$($steps),*]);
-    );
-    ($name:ident, $re:expr, $haystack:expr, $($steps:expr),*) => (
-        searcher!($name, $re, $haystack, vec vec![$($steps),*]);
-    );
-    ($name:ident, $re:expr, $haystack:expr, vec $expect_steps:expr) => (
-        #[test]
-        #[allow(unused_imports)]
-        fn $name() {
-            searcher_expr! {{
-                use std::str::pattern::{Pattern, Searcher};
-                use std::str::pattern::SearchStep::{Match, Reject, Done};
-                let re = regex!($re);
-                let mut se = re.into_searcher($haystack);
-                let mut got_steps = vec![];
-                loop {
-                    match se.next() {
-                        Done => break,
-                        step => { got_steps.push(step); }
-                    }
-                }
-                assert_eq!(got_steps, $expect_steps);
-            }}
-        }
-    );
-}
-
-searcher!(searcher_empty_regex_empty_haystack, r"", "", Match(0, 0));
-searcher!(searcher_empty_regex, r"", "ab",
-          Match(0, 0), Reject(0, 1), Match(1, 1), Reject(1, 2), Match(2, 2));
-searcher!(searcher_empty_haystack, r"\d", "");
-searcher!(searcher_one_match, r"\d", "5",
-          Match(0, 1));
-searcher!(searcher_no_match, r"\d", "a",
-          Reject(0, 1));
-searcher!(searcher_two_adjacent_matches, r"\d", "56",
-          Match(0, 1), Match(1, 2));
-searcher!(searcher_two_non_adjacent_matches, r"\d", "5a6",
-          Match(0, 1), Reject(1, 2), Match(2, 3));
-searcher!(searcher_reject_first, r"\d", "a6",
-          Reject(0, 1), Match(1, 2));
-searcher!(searcher_one_zero_length_matches, r"\d*", "a1b2",
-          Match(0, 0),  // ^
-          Reject(0, 1), // a
-          Match(1, 2),  // a1
-          Reject(2, 3), // a1b
-          Match(3, 4),  // a1b2
-);
-searcher!(searcher_many_zero_length_matches, r"\d*", "a1bbb2",
-          Match(0, 0),  // ^
-          Reject(0, 1), // a
-          Match(1, 2),  // a1
-          Reject(2, 3), // a1b
-          Match(3, 3),  // a1bb
-          Reject(3, 4), // a1bb
-          Match(4, 4),  // a1bbb
-          Reject(4, 5), // a1bbb
-          Match(5, 6),  // a1bbba
-);
-searcher!(searcher_unicode, r".+?", "Ⅰ1Ⅱ2",
-          Match(0, 3), Match(3, 4), Match(4, 7), Match(7, 8));
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/set.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-matset!(set1, &["a", "a"], "a", 0, 1);
-matset!(set2, &["a", "a"], "ba", 0, 1);
-matset!(set3, &["a", "b"], "a", 0);
-matset!(set4, &["a", "b"], "b", 1);
-matset!(set5, &["a|b", "b|a"], "b", 0, 1);
-matset!(set6, &["foo", "oo"], "foo", 0, 1);
-matset!(set7, &["^foo", "bar$"], "foo", 0);
-matset!(set8, &["^foo", "bar$"], "foo bar", 0, 1);
-matset!(set9, &["^foo", "bar$"], "bar", 1);
-matset!(set10, &[r"[a-z]+$", "foo"], "01234 foo", 0, 1);
-matset!(set11, &[r"[a-z]+$", "foo"], "foo 01234", 1);
-matset!(set12, &[r".*?", "a"], "zzzzzza", 0, 1);
-matset!(set13, &[r".*", "a"], "zzzzzza", 0, 1);
-matset!(set14, &[r".*", "a"], "zzzzzz", 0);
-matset!(set15, &[r"\ba\b"], "hello a bye", 0);
-matset!(set16, &["a"], "a", 0);
-matset!(set17, &[".*a"], "a", 0);
-
-nomatset!(nset1, &["a", "a"], "b");
-nomatset!(nset2, &["^foo", "bar$"], "bar foo");
-nomatset!(nset3, { let xs: &[&str] = &[]; xs }, "a");
-
-// See: https://github.com/rust-lang/regex/issues/187
-#[test]
-fn regression_subsequent_matches() {
-    let set = regex_set!(&["ab", "b"]);
-    let text = text!("ba");
-    assert!(set.matches(text).matched(1));
-    assert!(set.matches(text).matched(1));
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/shortest_match.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-macro_rules! shortmat {
-    ($name:ident, $re:expr, $text:expr, $shortest_match:expr) => {
-        #[test]
-        fn $name() {
-            let text = text!($text);
-            let re = regex!($re);
-            assert_eq!($shortest_match, re.shortest_match(text));
-        }
-    }
-}
-
-shortmat!(t01, r"a+", r"aa", Some(1));
-// Test that the reverse suffix optimization gets it right.
-shortmat!(t02, r".*(?:abcd)+", r"abcdabcd", Some(4));
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/suffix_reverse.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-mat!(t01, r".*abcd", r"abcd", Some((0, 4)));
-mat!(t02, r".*(?:abcd)+", r"abcd", Some((0, 4)));
-mat!(t03, r".*(?:abcd)+", r"abcdabcd", Some((0, 8)));
-mat!(t04, r".*(?:abcd)+", r"abcdxabcd", Some((0, 9)));
-mat!(t05, r".*x(?:abcd)+", r"abcdxabcd", Some((0, 9)));
-mat!(t06, r"[^abcd]*x(?:abcd)+", r"abcdxabcd", Some((4, 9)));
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/test_backtrack.rs
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![cfg_attr(feature = "pattern", feature(pattern))]
-
-extern crate rand;
-extern crate regex;
-
-macro_rules! regex_new {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new($re)
-            .bounded_backtracking().build().map(|e| e.into_regex())
-    }}
-}
-
-macro_rules! regex {
-    ($re:expr) => {
-        regex_new!($re).unwrap()
-    }
-}
-
-macro_rules! regex_set_new {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new_many($re)
-            .bounded_backtracking()
-            .build()
-            .map(|e| e.into_regex_set())
-    }}
-}
-
-macro_rules! regex_set {
-    ($res:expr) => {
-        regex_set_new!($res).unwrap()
-    }
-}
-
-// Must come before other module definitions.
-include!("macros_str.rs");
-include!("macros.rs");
-
-mod api;
-mod api_str;
-mod crazy;
-mod flags;
-mod fowler;
-mod multiline;
-mod noparse;
-mod regression;
-mod replace;
-mod searcher;
-mod set;
-mod suffix_reverse;
-mod unicode;
-mod word_boundary;
-mod word_boundary_unicode;
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/test_backtrack_bytes.rs
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern crate rand;
-extern crate regex;
-
-macro_rules! regex_new {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new($re)
-            .bounded_backtracking()
-            .only_utf8(false)
-            .build()
-            .map(|e| e.into_byte_regex())
-    }}
-}
-
-macro_rules! regex {
-    ($re:expr) => {
-        regex_new!($re).unwrap()
-    }
-}
-
-macro_rules! regex_set_new {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new_many($re)
-            .bounded_backtracking()
-            .only_utf8(false)
-            .build()
-            .map(|e| e.into_byte_regex_set())
-    }}
-}
-
-macro_rules! regex_set {
-    ($res:expr) => {
-        regex_set_new!($res).unwrap()
-    }
-}
-
-// Must come before other module definitions.
-include!("macros_bytes.rs");
-include!("macros.rs");
-
-mod api;
-mod bytes;
-mod crazy;
-mod flags;
-mod fowler;
-mod multiline;
-mod noparse;
-mod regression;
-mod replace;
-mod set;
-mod suffix_reverse;
-mod unicode;
-mod word_boundary;
-mod word_boundary_ascii;
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/test_backtrack_utf8bytes.rs
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![cfg_attr(feature = "pattern", feature(pattern))]
-
-extern crate rand;
-extern crate regex;
-
-macro_rules! regex_new {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new($re)
-            .bounded_backtracking().bytes(true).build().map(|e| e.into_regex())
-    }}
-}
-
-macro_rules! regex {
-    ($re:expr) => {
-        regex_new!($re).unwrap()
-    }
-}
-
-macro_rules! regex_set_new {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new_many($re)
-            .bounded_backtracking()
-            .bytes(true)
-            .build()
-            .map(|e| e.into_regex_set())
-    }}
-}
-
-macro_rules! regex_set {
-    ($res:expr) => {
-        regex_set_new!($res).unwrap()
-    }
-}
-
-// Must come before other module definitions.
-include!("macros_str.rs");
-include!("macros.rs");
-
-mod api;
-mod api_str;
-mod crazy;
-mod flags;
-mod fowler;
-mod multiline;
-mod noparse;
-mod regression;
-mod replace;
-mod searcher;
-mod set;
-mod suffix_reverse;
-mod unicode;
-mod word_boundary;
-mod word_boundary_unicode;
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/test_default.rs
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![cfg_attr(feature = "pattern", feature(pattern))]
-
-extern crate rand;
-extern crate regex;
-
-// Due to macro scoping rules, this definition only applies for the modules
-// defined below. Effectively, it allows us to use the same tests for both
-// native and dynamic regexes.
-//
-// This is also used to test the various matching engines. This one exercises
-// the normal code path which automatically chooses the engine based on the
-// regex and the input. Other dynamic tests explicitly set the engine to use.
-macro_rules! regex_new {
-    ($re:expr) => {{
-        use regex::Regex;
-        Regex::new($re)
-    }}
-}
-
-macro_rules! regex {
-    ($re:expr) => {
-        regex_new!($re).unwrap()
-    }
-}
-
-macro_rules! regex_set_new {
-    ($re:expr) => {{
-        use regex::RegexSet;
-        RegexSet::new($re)
-    }}
-}
-
-macro_rules! regex_set {
-    ($res:expr) => {
-        regex_set_new!($res).unwrap()
-    }
-}
-
-// Must come before other module definitions.
-include!("macros_str.rs");
-include!("macros.rs");
-
-mod api;
-mod api_str;
-mod crazy;
-mod flags;
-mod fowler;
-mod misc;
-mod multiline;
-mod noparse;
-mod regression;
-mod replace;
-mod searcher;
-mod set;
-mod shortest_match;
-mod suffix_reverse;
-mod unicode;
-mod word_boundary;
-mod word_boundary_unicode;
-
-#[test]
-fn disallow_non_utf8() {
-    assert!(regex::Regex::new(r"(?-u)\xFF").is_err());
-    assert!(regex::Regex::new(r"(?-u).").is_err());
-    assert!(regex::Regex::new(r"(?-u)[\xFF]").is_err());
-    assert!(regex::Regex::new(r"(?-u)☃").is_err());
-}
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/test_default_bytes.rs
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern crate rand;
-extern crate regex;
-
-macro_rules! regex_new {
-    ($re:expr) => {{
-        use regex::bytes::Regex;
-        Regex::new($re)
-    }}
-}
-
-macro_rules! regex_set_new {
-    ($res:expr) => {{
-        use regex::bytes::RegexSet;
-        RegexSet::new($res)
-    }}
-}
-
-macro_rules! regex {
-    ($re:expr) => {
-        regex_new!($re).unwrap()
-    }
-}
-
-macro_rules! regex_set {
-    ($res:expr) => {
-        regex_set_new!($res).unwrap()
-    }
-}
-
-// Must come before other module definitions.
-include!("macros_bytes.rs");
-include!("macros.rs");
-
-mod api;
-mod bytes;
-mod crazy;
-mod flags;
-mod fowler;
-mod multiline;
-mod noparse;
-mod regression;
-mod replace;
-mod set;
-mod shortest_match;
-mod suffix_reverse;
-mod unicode;
-mod word_boundary;
-mod word_boundary_ascii;
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/test_nfa.rs
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![cfg_attr(feature = "pattern", feature(pattern))]
-
-extern crate rand;
-extern crate regex;
-
-macro_rules! regex_new {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new($re).nfa().build().map(|e| e.into_regex())
-    }}
-}
-
-macro_rules! regex {
-    ($re:expr) => {
-        regex_new!($re).unwrap()
-    }
-}
-
-macro_rules! regex_set_new {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new_many($re).nfa().build().map(|e| e.into_regex_set())
-    }}
-}
-
-macro_rules! regex_set {
-    ($res:expr) => {
-        regex_set_new!($res).unwrap()
-    }
-}
-
-// Must come before other module definitions.
-include!("macros_str.rs");
-include!("macros.rs");
-
-mod api;
-mod api_str;
-mod crazy;
-mod flags;
-mod fowler;
-mod multiline;
-mod noparse;
-mod regression;
-mod replace;
-mod searcher;
-mod set;
-mod suffix_reverse;
-mod unicode;
-mod word_boundary;
-mod word_boundary_unicode;
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/test_nfa_bytes.rs
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-extern crate rand;
-extern crate regex;
-
-macro_rules! regex_new {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new($re)
-            .nfa()
-            .only_utf8(false)
-            .build()
-            .map(|e| e.into_byte_regex())
-    }}
-}
-
-macro_rules! regex {
-    ($re:expr) => {
-        regex_new!($re).unwrap()
-    }
-}
-
-macro_rules! regex_set_new {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new_many($re)
-            .nfa()
-            .only_utf8(false)
-            .build()
-            .map(|e| e.into_byte_regex_set())
-    }}
-}
-
-macro_rules! regex_set {
-    ($res:expr) => {
-        regex_set_new!($res).unwrap()
-    }
-}
-
-// Must come before other module definitions.
-include!("macros_bytes.rs");
-include!("macros.rs");
-
-mod api;
-mod bytes;
-mod crazy;
-mod flags;
-mod fowler;
-mod multiline;
-mod noparse;
-mod regression;
-mod replace;
-mod set;
-mod suffix_reverse;
-mod unicode;
-mod word_boundary;
-mod word_boundary_ascii;
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/test_nfa_utf8bytes.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![cfg_attr(feature = "pattern", feature(pattern))]
-
-extern crate rand;
-extern crate regex;
-
-macro_rules! regex_new {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new($re).nfa().bytes(true).build().map(|e| e.into_regex())
-    }}
-}
-
-macro_rules! regex {
-    ($re:expr) => {
-        regex_new!($re).unwrap()
-    }
-}
-
-macro_rules! regex_set_new {
-    ($re:expr) => {{
-        use regex::internal::ExecBuilder;
-        ExecBuilder::new_many($re)
-            .nfa().bytes(true).build().map(|e| e.into_regex_set())
-    }}
-}
-
-macro_rules! regex_set {
-    ($res:expr) => {
-        regex_set_new!($res).unwrap()
-    }
-}
-
-// Must come before other module definitions.
-include!("macros_str.rs");
-include!("macros.rs");
-
-mod api;
-mod api_str;
-mod crazy;
-mod flags;
-mod fowler;
-mod multiline;
-mod noparse;
-mod regression;
-mod replace;
-mod searcher;
-mod set;
-mod suffix_reverse;
-mod unicode;
-mod word_boundary;
-mod word_boundary_unicode;
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/test_plugin.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(plugin, test)]
-#![plugin(regex_macros)]
-
-extern crate rand;
-extern crate regex;
-extern crate test;
-
-// Must come before other module definitions.
-include!("macros_str.rs");
-include!("macros.rs");
-
-mod api;
-mod api_str;
-mod crazy;
-mod flags;
-mod fowler;
-mod multiline;
-mod plugin;
-mod replace;
-mod suffix_reverse;
-mod unicode;
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/unicode.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-mat!(uni_literal, r"☃", "☃", Some((0, 3)));
-mat!(uni_literal_plus, r"☃+", "☃", Some((0, 3)));
-mat!(uni_literal_casei_plus, r"(?i)☃+", "☃", Some((0, 3)));
-mat!(uni_class_plus, r"[☃Ⅰ]+", "☃", Some((0, 3)));
-mat!(uni_one, r"\pN", "Ⅰ", Some((0, 3)));
-mat!(uni_mixed, r"\pN+", "Ⅰ1Ⅱ2", Some((0, 8)));
-mat!(uni_not, r"\PN+", "abⅠ", Some((0, 2)));
-mat!(uni_not_class, r"[\PN]+", "abⅠ", Some((0, 2)));
-mat!(uni_not_class_neg, r"[^\PN]+", "abⅠ", Some((2, 5)));
-mat!(uni_case, r"(?i)Δ", "δ", Some((0, 2)));
-mat!(uni_case_upper, r"\p{Lu}+", "ΛΘΓΔα", Some((0, 8)));
-mat!(uni_case_upper_nocase_flag, r"(?i)\p{Lu}+", "ΛΘΓΔα", Some((0, 10)));
-mat!(uni_case_upper_nocase, r"\p{L}+", "ΛΘΓΔα", Some((0, 10)));
-mat!(uni_case_lower, r"\p{Ll}+", "ΛΘΓΔα", Some((8, 10)));
-
-// Test the Unicode friendliness of Perl character classes.
-mat!(uni_perl_w, r"\w+", "dδd", Some((0, 4)));
-mat!(uni_perl_w_not, r"\w+", "⥡", None);
-mat!(uni_perl_w_neg, r"\W+", "⥡", Some((0, 3)));
-mat!(uni_perl_d, r"\d+", "1२३9", Some((0, 8)));
-mat!(uni_perl_d_not, r"\d+", "Ⅱ", None);
-mat!(uni_perl_d_neg, r"\D+", "Ⅱ", Some((0, 3)));
-mat!(uni_perl_s, r"\s+", " ", Some((0, 3)));
-mat!(uni_perl_s_not, r"\s+", "☃", None);
-mat!(uni_perl_s_neg, r"\S+", "☃", Some((0, 3)));
-
-// And do the same for word boundaries.
-mat!(uni_boundary_none, r"\d\b", "6δ", None);
-mat!(uni_boundary_ogham, r"\d\b", "6 ", Some((0, 1)));
-mat!(uni_not_boundary_none, r"\d\B", "6δ", Some((0, 1)));
-mat!(uni_not_boundary_ogham, r"\d\B", "6 ", None);
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/word_boundary.rs
+++ /dev/null
@@ -1,89 +0,0 @@
-// Many of these are cribbed from RE2's test suite.
-
-matiter!(wb1, r"\b", "");
-matiter!(wb2, r"\b", "a", (0, 0), (1, 1));
-matiter!(wb3, r"\b", "ab", (0, 0), (2, 2));
-matiter!(wb4, r"^\b", "ab", (0, 0));
-matiter!(wb5, r"\b$", "ab", (2, 2));
-matiter!(wb6, r"^\b$", "ab");
-matiter!(wb7, r"\bbar\b", "nobar bar foo bar", (6, 9), (14, 17));
-matiter!(wb8, r"a\b", "faoa x", (3, 4));
-matiter!(wb9, r"\bbar", "bar x", (0, 3));
-matiter!(wb10, r"\bbar", "foo\nbar x", (4, 7));
-matiter!(wb11, r"bar\b", "foobar", (3, 6));
-matiter!(wb12, r"bar\b", "foobar\nxxx", (3, 6));
-matiter!(wb13, r"(foo|bar|[A-Z])\b", "foo", (0, 3));
-matiter!(wb14, r"(foo|bar|[A-Z])\b", "foo\n", (0, 3));
-matiter!(wb15, r"\b(foo|bar|[A-Z])", "foo", (0, 3));
-matiter!(wb16, r"\b(foo|bar|[A-Z])\b", "X", (0, 1));
-matiter!(wb17, r"\b(foo|bar|[A-Z])\b", "XY");
-matiter!(wb18, r"\b(foo|bar|[A-Z])\b", "bar", (0, 3));
-matiter!(wb19, r"\b(foo|bar|[A-Z])\b", "foo", (0, 3));
-matiter!(wb20, r"\b(foo|bar|[A-Z])\b", "foo\n", (0, 3));
-matiter!(wb21, r"\b(foo|bar|[A-Z])\b", "ffoo bbar N x", (10, 11));
-matiter!(wb22, r"\b(fo|foo)\b", "fo", (0, 2));
-matiter!(wb23, r"\b(fo|foo)\b", "foo", (0, 3));
-matiter!(wb24, r"\b\b", "");
-matiter!(wb25, r"\b\b", "a", (0, 0), (1, 1));
-matiter!(wb26, r"\b$", "");
-matiter!(wb27, r"\b$", "x", (1, 1));
-matiter!(wb28, r"\b$", "y x", (3, 3));
-matiter!(wb29, r"\b.$", "x", (0, 1));
-matiter!(wb30, r"^\b(fo|foo)\b", "fo", (0, 2));
-matiter!(wb31, r"^\b(fo|foo)\b", "foo", (0, 3));
-matiter!(wb32, r"^\b$", "");
-matiter!(wb33, r"^\b$", "x");
-matiter!(wb34, r"^\b.$", "x", (0, 1));
-matiter!(wb35, r"^\b.\b$", "x", (0, 1));
-matiter!(wb36, r"^^^^^\b$$$$$", "");
-matiter!(wb37, r"^^^^^\b.$$$$$", "x", (0, 1));
-matiter!(wb38, r"^^^^^\b$$$$$", "x");
-matiter!(wb39, r"^^^^^\b\b\b.\b\b\b$$$$$", "x", (0, 1));
-matiter!(wb40, r"\b.+\b", "$$abc$$", (2, 5));
-matiter!(wb41, r"\b", "a b c", (0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5));
-
-matiter!(nb1, r"\Bfoo\B", "n foo xfoox that", (7, 10));
-matiter!(nb2, r"a\B", "faoa x", (1, 2));
-matiter!(nb3, r"\Bbar", "bar x");
-matiter!(nb4, r"\Bbar", "foo\nbar x");
-matiter!(nb5, r"bar\B", "foobar");
-matiter!(nb6, r"bar\B", "foobar\nxxx");
-matiter!(nb7, r"(foo|bar|[A-Z])\B", "foox", (0, 3));
-matiter!(nb8, r"(foo|bar|[A-Z])\B", "foo\n");
-matiter!(nb9, r"\B", "", (0, 0));
-matiter!(nb10, r"\B", "x");
-matiter!(nb11, r"\B(foo|bar|[A-Z])", "foo");
-matiter!(nb12, r"\B(foo|bar|[A-Z])\B", "xXy", (1, 2));
-matiter!(nb13, r"\B(foo|bar|[A-Z])\B", "XY");
-matiter!(nb14, r"\B(foo|bar|[A-Z])\B", "XYZ", (1, 2));
-matiter!(nb15, r"\B(foo|bar|[A-Z])\B", "abara", (1, 4));
-matiter!(nb16, r"\B(foo|bar|[A-Z])\B", "xfoo_", (1, 4));
-matiter!(nb17, r"\B(foo|bar|[A-Z])\B", "xfoo\n");
-matiter!(nb18, r"\B(foo|bar|[A-Z])\B", "foo bar vNX", (9, 10));
-matiter!(nb19, r"\B(fo|foo)\B", "xfoo", (1, 3));
-matiter!(nb20, r"\B(foo|fo)\B", "xfooo", (1, 4));
-matiter!(nb21, r"\B\B", "", (0, 0));
-matiter!(nb22, r"\B\B", "x");
-matiter!(nb23, r"\B$", "", (0, 0));
-matiter!(nb24, r"\B$", "x");
-matiter!(nb25, r"\B$", "y x");
-matiter!(nb26, r"\B.$", "x");
-matiter!(nb27, r"^\B(fo|foo)\B", "fo");
-matiter!(nb28, r"^\B(fo|foo)\B", "foo");
-matiter!(nb29, r"^\B", "", (0, 0));
-matiter!(nb30, r"^\B", "x");
-matiter!(nb31, r"^\B\B", "", (0, 0));
-matiter!(nb32, r"^\B\B", "x");
-matiter!(nb33, r"^\B$", "", (0, 0));
-matiter!(nb34, r"^\B$", "x");
-matiter!(nb35, r"^\B.$", "x");
-matiter!(nb36, r"^\B.\B$", "x");
-matiter!(nb37, r"^^^^^\B$$$$$", "", (0, 0));
-matiter!(nb38, r"^^^^^\B.$$$$$", "x");
-matiter!(nb39, r"^^^^^\B$$$$$", "x");
-
-// These work for both Unicode and ASCII because all matches are reported as
-// byte offsets, and « and » do not correspond to word boundaries at either
-// the character or byte level.
-matiter!(unicode1, r"\bx\b", "«x", (2, 3));
-matiter!(unicode2, r"\bx\b", "x»", (0, 1));
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/word_boundary_ascii.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// ASCII word boundaries are completely oblivious to Unicode characters.
-// For Unicode word boundaries, the tests are precisely inverted.
-matiter!(ascii1, r"(?-u:\b)x(?-u:\b)", "áxβ", (2, 3));
-matiter!(ascii2, r"(?-u:\B)x(?-u:\B)", "áxβ");
-matiter!(ascii3, r"(?-u:\B)", "0\u{7EF5E}", (2, 2), (3, 3), (4, 4), (5, 5));
-
-// We still get Unicode word boundaries by default in byte regexes.
-matiter!(unicode1, r"\bx\b", "áxβ");
-matiter!(unicode2, r"\Bx\B", "áxβ", (2, 3));
deleted file mode 100644
--- a/third_party/rust/regex-0.2.1/tests/word_boundary_unicode.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// Unicode word boundaries know about Unicode characters.
-// For ASCII word boundaries, the tests are precisely inverted.
-matiter!(unicode1, r"\bx\b", "áxβ");
-matiter!(unicode2, r"\Bx\B", "áxβ", (2, 3));
-
-matiter!(ascii1, r"(?-u:\b)x(?-u:\b)", "áxβ", (2, 3));
-matiter!(ascii2, r"(?-u:\B)x(?-u:\B)", "áxβ");
-matiter!(ascii3, r"(?-u:\B)", "0\u{7EF5E}", (5, 5));
deleted file mode 100644
--- a/third_party/rust/regex-syntax-0.4.0/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{"Cargo.toml":"4dcafdf5074d2513fc8d62df02a4d35e59899db0985d44cb5e5dedbe9bc3a131","src/lib.rs":"577adaaa48b3d06622f679461ec9538704ea328ca25f921c71d1d4db6ed505e3","src/literals.rs":"4c6d5678ef4df87e95cffde99aa3e0c8ab8012014b11f1b61e0e3b0a99ec9b17","src/parser.rs":"b36eb64716447491e0c1ff1cdeb0854eb21386b9bd404e6322e5a0b838d48244","src/properties.rs":"b3faea84cde7db615c7d502972fa5b92f2edf46fc7dfb39b35c0721c5fe497b7","src/unicode.rs":"5bbab13485910b55a56e8f8437786e820f409902e96d07ba2018c28cecb033fc"},"package":"2f9191b1f57603095f105d317e375d19b1c9c5c3185ea9633a99a6dcbed04457"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/regex-syntax-0.4.0/Cargo.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-[package]
-name = "regex-syntax"
-version = "0.4.0"  #:version
-authors = ["The Rust Project Developers"]
-license = "MIT/Apache-2.0"
-repository = "https://github.com/rust-lang/regex"
-documentation = "http://doc.rust-lang.org/regex/regex_syntax/index.html"
-homepage = "https://github.com/rust-lang/regex"
-description = "A regular expression parser."
-
-[dev-dependencies]
-quickcheck = "0.4.1"
-rand = "0.3.15"
deleted file mode 100644
--- a/third_party/rust/regex-syntax-0.4.0/src/lib.rs
+++ /dev/null
@@ -1,2059 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-/*!
-This crate provides a regular expression parser and an abstract syntax for
-regular expressions. The abstract syntax is defined by the `Expr` type. The
-concrete syntax is enumerated in the
-[`regex`](../regex/index.html#syntax)
-crate documentation.
-
-Note that since this crate is first and foremost an implementation detail for
-the `regex` crate, it may experience more frequent breaking changes. It is
-exposed as a separate crate so that others may use it to do analysis on regular
-expressions or even build their own matching engine.
-
-# Example: parsing an expression
-
-Parsing a regular expression can be done with the `Expr::parse` function.
-
-```rust
-use regex_syntax::Expr;
-
-assert_eq!(Expr::parse(r"ab|yz").unwrap(), Expr::Alternate(vec![
-    Expr::Literal { chars: vec!['a', 'b'], casei: false },
-    Expr::Literal { chars: vec!['y', 'z'], casei: false },
-]));
-```
-
-# Example: inspecting an error
-
-The parser in this crate provides very detailed error values. For example,
-if an invalid character class range is given:
-
-```rust
-use regex_syntax::{Expr, ErrorKind};
-
-let err = Expr::parse(r"[z-a]").unwrap_err();
-assert_eq!(err.position(), 4);
-assert_eq!(err.kind(), &ErrorKind::InvalidClassRange {
-    start: 'z',
-    end: 'a',
-});
-```
-
-Or unbalanced parentheses:
-
-```rust
-use regex_syntax::{Expr, ErrorKind};
-
-let err = Expr::parse(r"ab(cd").unwrap_err();
-assert_eq!(err.position(), 2);
-assert_eq!(err.kind(), &ErrorKind::UnclosedParen);
-```
-*/
-
-#![deny(missing_docs)]
-#![cfg_attr(test, deny(warnings))]
-
-#[cfg(test)] extern crate quickcheck;
-#[cfg(test)] extern crate rand;
-
-mod literals;
-mod parser;
-mod unicode;
-
-use std::ascii;
-use std::char;
-use std::cmp::{Ordering, max, min};
-use std::fmt;
-use std::iter::IntoIterator;
-use std::ops::Deref;
-use std::result;
-use std::slice;
-use std::u8;
-use std::vec;
-
-use unicode::case_folding;
-
-use self::Expr::*;
-use self::Repeater::*;
-
-use parser::{Flags, Parser};
-
-pub use literals::{Literals, Lit};
-
-/// A regular expression abstract syntax tree.
-///
-/// An `Expr` represents the abstract syntax of a regular expression.
-#[derive(Clone, Debug, PartialEq, Eq)]
-pub enum Expr {
-    /// An empty regex (which never matches any text).
-    Empty,
-    /// A sequence of one or more literal characters to be matched.
-    Literal {
-        /// The characters.
-        chars: Vec<char>,
-        /// Whether to match case insensitively.
-        casei: bool,
-    },
-    /// A sequence of one or more literal bytes to be matched.
-    LiteralBytes {
-        /// The bytes.
-        bytes: Vec<u8>,
-        /// Whether to match case insensitively.
-        ///
-        /// The interpretation of "case insensitive" in this context is
-        /// ambiguous since `bytes` can be arbitrary. However, a good heuristic
-        /// is to assume that the bytes are ASCII-compatible and do simple
-        /// ASCII case folding.
-        casei: bool,
-    },
-    /// Match any character.
-    AnyChar,
-    /// Match any character, excluding new line (`0xA`).
-    AnyCharNoNL,
-    /// Match any byte.
-    AnyByte,
-    /// Match any byte, excluding new line (`0xA`).
-    AnyByteNoNL,
-    /// A character class.
-    Class(CharClass),
-    /// A character class with byte ranges only.
-    ClassBytes(ByteClass),
-    /// Match the start of a line or beginning of input.
-    StartLine,
-    /// Match the end of a line or end of input.
-    EndLine,
-    /// Match the beginning of input.
-    StartText,
-    /// Match the end of input.
-    EndText,
-    /// Match a word boundary (word character on one side and a non-word
-    /// character on the other).
-    WordBoundary,
-    /// Match a position that is not a word boundary (word or non-word
-    /// characters on both sides).
-    NotWordBoundary,
-    /// Match an ASCII word boundary.
-    WordBoundaryAscii,
-    /// Match a position that is not an ASCII word boundary.
-    NotWordBoundaryAscii,
-    /// A group, possibly non-capturing.
-    Group {
-        /// The expression inside the group.
-        e: Box<Expr>,
-        /// The capture index (starting at `1`) only for capturing groups.
-        i: Option<usize>,
-        /// The capture name, only for capturing named groups.
-        name: Option<String>,
-    },
-    /// A repeat operator (`?`, `*`, `+` or `{m,n}`).
-    Repeat {
-        /// The expression to be repeated. Limited to literals, `.`, classes
-        /// or grouped expressions.
-        e: Box<Expr>,
-        /// The type of repeat operator used.
-        r: Repeater,
-        /// Whether the repeat is greedy (match the most) or not (match the
-        /// least).
-        greedy: bool,
-    },
-    /// A concatenation of expressions. Must be matched one after the other.
-    ///
-    /// N.B. A concat expression can only appear at the top-level or
-    /// immediately inside a group expression.
-    Concat(Vec<Expr>),
-    /// An alternation of expressions. Only one must match.
-    ///
-    /// N.B. An alternate expression can only appear at the top-level or
-    /// immediately inside a group expression.
-    Alternate(Vec<Expr>),
-}
-
-type CaptureIndex = Option<usize>;
-
-type CaptureName = Option<String>;
-
-/// The type of a repeat operator expression.
-#[derive(Clone, Copy, Debug, PartialEq, Eq)]
-pub enum Repeater {
-    /// Match zero or one (`?`).
-    ZeroOrOne,
-    /// Match zero or more (`*`).
-    ZeroOrMore,
-    /// Match one or more (`+`).
-    OneOrMore,
-    /// Match for at least `min` and at most `max` (`{m,n}`).
-    ///
-    /// When `max` is `None`, there is no upper bound on the number of matches.
-    Range {
-        /// Lower bound on the number of matches.
-        min: u32,
-        /// Optional upper bound on the number of matches.
-        max: Option<u32>,
-    },
-}
-
-impl Repeater {
-    /// Returns true if and only if this repetition can match the empty string.
-    fn matches_empty(&self) -> bool {
-        use self::Repeater::*;
-        match *self {
-            ZeroOrOne => true,
-            ZeroOrMore => true,
-            OneOrMore => false,
-            Range { min, .. } => min == 0,
-        }
-    }
-}
-
-/// A character class.
-///
-/// A character class has a canonical format that the parser guarantees. Its
-/// canonical format is defined by the following invariants:
-///
-/// 1. Given any Unicode scalar value, it is matched by *at most* one character
-///    range in a canonical character class.
-/// 2. Every adjacent character range is separated by at least one Unicode
-///    scalar value.
-/// 3. Given any pair of character ranges `r1` and `r2`, if
-///    `r1.end < r2.start`, then `r1` comes before `r2` in a canonical
-///    character class.
-///
-/// In sum, any `CharClass` produced by this crate's parser is a sorted
-/// sequence of non-overlapping ranges. This makes it possible to test whether
-/// a character is matched by a class with a binary search.
-///
-/// If the case insensitive flag was set when parsing a character class, then
-/// simple case folding is done automatically. For example, `(?i)[a-c]` is
-/// automatically translated to `[a-cA-C]`.
-#[derive(Clone, Debug, PartialEq, Eq)]
-pub struct CharClass {
-    ranges: Vec<ClassRange>,
-}
-
-/// A single inclusive range in a character class.
-///
-/// Since range boundaries are defined by Unicode scalar values, the boundaries
-/// can never be in the open interval `(0xD7FF, 0xE000)`. However, a range may
-/// *cover* codepoints that are not scalar values.
-///
-/// Note that this has a few convenient impls on `PartialEq` and `PartialOrd`
-/// for testing whether a character is contained inside a given range.
-#[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Eq, Ord)]
-pub struct ClassRange {
-    /// The start character of the range.
-    ///
-    /// This must be less than or equal to `end`.
-    pub start: char,
-
-    /// The end character of the range.
-    ///
-    /// This must be greater than or equal to `start`.
-    pub end: char,
-}
-
-/// A byte class for byte ranges only.
-///
-/// A byte class has a canonical format that the parser guarantees. Its
-/// canonical format is defined by the following invariants:
-///
-/// 1. Given any byte, it is matched by *at most* one byte range in a canonical
-///    character class.
-/// 2. Every adjacent byte range is separated by at least one byte.
-/// 3. Given any pair of byte ranges `r1` and `r2`, if
-///    `r1.end < r2.start`, then `r1` comes before `r2` in a canonical
-///    character class.
-///
-/// In sum, any `ByteClass` produced by this crate's parser is a sorted
-/// sequence of non-overlapping ranges. This makes it possible to test whether
-/// a byte is matched by a class with a binary search.
-///
-/// If the case insensitive flag was set when parsing a character class,
-/// then simple ASCII-only case folding is done automatically. For example,
-/// `(?i)[a-c]` is automatically translated to `[a-cA-C]`.
-#[derive(Clone, Debug, PartialEq, Eq)]
-pub struct ByteClass {
-    ranges: Vec<ByteRange>,
-}
-
-/// A single inclusive range in a byte class.
-///
-/// Note that this has a few convenient impls on `PartialEq` and `PartialOrd`
-/// for testing whether a byte is contained inside a given range.
-#[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Eq, Ord)]
-pub struct ByteRange {
-    /// The start byte of the range.
-    ///
-    /// This must be less than or equal to `end`.
-    pub start: u8,
-
-    /// The end byte of the range.
-    ///
-    /// This must be greater than or equal to `end`.
-    pub end: u8,
-}
-
-/// A builder for configuring regular expression parsing.
-///
-/// This allows setting the default values of flags and other options, such
-/// as the maximum nesting depth.
-#[derive(Clone, Debug)]
-pub struct ExprBuilder {
-    flags: Flags,
-    nest_limit: usize,
-}
-
-impl ExprBuilder {
-    /// Create a new builder for configuring expression parsing.
-    ///
-    /// Note that all flags are disabled by default.
-    pub fn new() -> ExprBuilder {
-        ExprBuilder {
-            flags: Flags::default(),
-            nest_limit: 200,
-        }
-    }
-
-    /// Set the default value for the case insensitive (`i`) flag.
-    pub fn case_insensitive(mut self, yes: bool) -> ExprBuilder {
-        self.flags.casei = yes;
-        self
-    }
-
-    /// Set the default value for the multi-line matching (`m`) flag.
-    pub fn multi_line(mut self, yes: bool) -> ExprBuilder {
-        self.flags.multi = yes;
-        self
-    }
-
-    /// Set the default value for the any character (`s`) flag.
-    pub fn dot_matches_new_line(mut self, yes: bool) -> ExprBuilder {
-        self.flags.dotnl = yes;
-        self
-    }
-
-    /// Set the default value for the greedy swap (`U`) flag.
-    pub fn swap_greed(mut self, yes: bool) -> ExprBuilder {
-        self.flags.swap_greed = yes;
-        self
-    }
-
-    /// Set the default value for the ignore whitespace (`x`) flag.
-    pub fn ignore_whitespace(mut self, yes: bool) -> ExprBuilder {
-        self.flags.ignore_space = yes;
-        self
-    }
-
-    /// Set the default value for the Unicode (`u`) flag.
-    ///
-    /// If `yes` is false, then `allow_bytes` is set to true.
-    pub fn unicode(mut self, yes: bool) -> ExprBuilder {
-        self.flags.unicode = yes;
-        if !yes {
-            self.allow_bytes(true)
-        } else {
-            self
-        }
-    }
-
-    /// Whether the parser allows matching arbitrary bytes or not.
-    ///
-    /// When the `u` flag is disabled (either with this builder or in the
-    /// expression itself), the parser switches to interpreting the expression
-    /// as matching arbitrary bytes instead of Unicode codepoints. For example,
-    /// the expression `(?u:\xFF)` matches the *codepoint* `\xFF`, which
-    /// corresponds to the UTF-8 byte sequence `\xCE\xBF`. Conversely,
-    /// `(?-u:\xFF)` matches the *byte* `\xFF`, which is not valid UTF-8.
-    ///
-    /// When `allow_bytes` is disabled (the default), an expression like
-    /// `(?-u:\xFF)` will cause the parser to return an error, since it would
-    /// otherwise match invalid UTF-8. When enabled, it will be allowed.
-    pub fn allow_bytes(mut self, yes: bool) -> ExprBuilder {
-        self.flags.allow_bytes = yes;
-        self
-    }
-
-    /// Set the nesting limit for regular expression parsing.
-    ///
-    /// Regular expressions that nest more than this limit will result in a
-    /// `StackExhausted` error.
-    pub fn nest_limit(mut self, limit: usize) -> ExprBuilder {
-        self.nest_limit = limit;
-        self
-    }
-
-    /// Parse a string as a regular expression using the current configuraiton.
-    pub fn parse(self, s: &str) -> Result<Expr> {
-        Parser::parse(s, self.flags).and_then(|e| e.simplify(self.nest_limit))
-    }
-}
-
-impl Expr {
-    /// Parses a string in a regular expression syntax tree.
-    ///
-    /// This is a convenience method for parsing an expression using the
-    /// default configuration. To tweak parsing options (such as which flags
-    /// are enabled by default), use the `ExprBuilder` type.
-    pub fn parse(s: &str) -> Result<Expr> {
-        ExprBuilder::new().parse(s)
-    }
-
-    /// Returns true iff the expression can be repeated by a quantifier.
-    fn can_repeat(&self) -> bool {
-        match *self {
-            Literal{..} | LiteralBytes{..}
-            | AnyChar | AnyCharNoNL | AnyByte | AnyByteNoNL
-            | Class(_) | ClassBytes(_)
-            | StartLine | EndLine | StartText | EndText
-            | WordBoundary | NotWordBoundary
-            | WordBoundaryAscii | NotWordBoundaryAscii
-            | Group{..}
-            => true,
-            _ => false,
-        }
-    }
-
-    fn simplify(self, nest_limit: usize) -> Result<Expr> {
-        fn combine_literals(es: &mut Vec<Expr>, e: Expr) {
-            match (es.pop(), e) {
-                (None, e) => es.push(e),
-                (Some(Literal { chars: mut chars1, casei: casei1 }),
-                      Literal { chars: chars2, casei: casei2 }) => {
-                    if casei1 == casei2 {
-                        chars1.extend(chars2);
-                        es.push(Literal { chars: chars1, casei: casei1 });
-                    } else {
-                        es.push(Literal { chars: chars1, casei: casei1 });
-                        es.push(Literal { chars: chars2, casei: casei2 });
-                    }
-                }
-                (Some(LiteralBytes { bytes: mut bytes1, casei: casei1 }),
-                      LiteralBytes { bytes: bytes2, casei: casei2 }) => {
-                    if casei1 == casei2 {
-                        bytes1.extend(bytes2);
-                        es.push(LiteralBytes { bytes: bytes1, casei: casei1 });
-                    } else {
-                        es.push(LiteralBytes { bytes: bytes1, casei: casei1 });
-                        es.push(LiteralBytes { bytes: bytes2, casei: casei2 });
-                    }
-                }
-                (Some(e1), e2) => {
-                    es.push(e1);
-                    es.push(e2);
-                }
-            }
-        }
-        fn simp(expr: Expr, recurse: usize, limit: usize) -> Result<Expr> {
-            if recurse > limit {
-                return Err(Error {
-                    pos: 0,
-                    surround: "".to_owned(),
-                    kind: ErrorKind::StackExhausted,
-                });
-            }
-            let simplify = |e| simp(e, recurse + 1, limit);
-            Ok(match expr {
-                Repeat { e, r, greedy } => Repeat {
-                    e: Box::new(try!(simplify(*e))),
-                    r: r,
-                    greedy: greedy,
-                },
-                Group { e, i, name } => {
-                    let e = try!(simplify(*e));
-                    if i.is_none() && name.is_none() && e.can_repeat() {
-                        e
-                    } else {
-                        Group { e: Box::new(e), i: i, name: name }
-                    }
-                }
-                Concat(es) => {
-                    let mut new_es = Vec::with_capacity(es.len());
-                    for e in es {
-                        combine_literals(&mut new_es, try!(simplify(e)));
-                    }
-                    if new_es.len() == 1 {
-                        new_es.pop().unwrap()
-                    } else {
-                        Concat(new_es)
-                    }
-                }
-                Alternate(es) => {
-                    let mut new_es = Vec::with_capacity(es.len());
-                    for e in es {
-                        new_es.push(try!(simplify(e)));
-                    }
-                    Alternate(new_es)
-                }
-                e => e,
-            })
-        }
-        simp(self, 0, nest_limit)
-    }
-
-    /// Returns a set of literal prefixes extracted from this expression.
-    pub fn prefixes(&self) -> Literals {
-        let mut lits = Literals::empty();
-        lits.union_prefixes(self);
-        lits
-    }
-
-    /// Returns a set of literal suffixes extracted from this expression.
-    pub fn suffixes(&self) -> Literals {
-        let mut lits = Literals::empty();
-        lits.union_suffixes(self);
-        lits
-    }
-
-    /// Returns true if and only if the expression is required to match from
-    /// the beginning of text.
-    pub fn is_anchored_start(&self) -> bool {
-        match *self {
-            Repeat { ref e, r, .. } => {
-                !r.matches_empty() && e.is_anchored_start()
-            }
-            Group { ref e, .. } => e.is_anchored_start(),
-            Concat(ref es) => es[0].is_anchored_start(),
-            Alternate(ref es) => es.iter().all(|e| e.is_anchored_start()),
-            StartText => true,
-            _ => false,
-        }
-    }
-
-    /// Returns true if and only if the expression has at least one matchable
-    /// sub-expression that must match the beginning of text.
-    pub fn has_anchored_start(&self) -> bool {
-        match *self {
-            Repeat { ref e, r, .. } => {
-                !r.matches_empty() && e.has_anchored_start()
-            }
-            Group { ref e, .. } => e.has_anchored_start(),
-            Concat(ref es) => es[0].has_anchored_start(),
-            Alternate(ref es) => es.iter().any(|e| e.has_anchored_start()),
-            StartText => true,
-            _ => false,
-        }
-    }
-
-    /// Returns true if and only if the expression is required to match at the
-    /// end of the text.
-    pub fn is_anchored_end(&self) -> bool {
-        match *self {
-            Repeat { ref e, r, .. } => {
-                !r.matches_empty() && e.is_anchored_end()
-            }
-            Group { ref e, .. } => e.is_anchored_end(),
-            Concat(ref es) => es[es.len() - 1].is_anchored_end(),
-            Alternate(ref es) => es.iter().all(|e| e.is_anchored_end()),
-            EndText => true,
-            _ => false,
-        }
-    }
-
-    /// Returns true if and only if the expression has at least one matchable
-    /// sub-expression that must match the beginning of text.
-    pub fn has_anchored_end(&self) -> bool {
-        match *self {
-            Repeat { ref e, r, .. } => {
-                !r.matches_empty() && e.has_anchored_end()
-            }
-            Group { ref e, .. } => e.has_anchored_end(),
-            Concat(ref es) => es[es.len() - 1].has_anchored_end(),
-            Alternate(ref es) => es.iter().any(|e| e.has_anchored_end()),
-            EndText => true,
-            _ => false,
-        }
-    }
-
-    /// Returns true if and only if the expression contains sub-expressions
-    /// that can match arbitrary bytes.
-    pub fn has_bytes(&self) -> bool {
-        match *self {
-            Repeat { ref e, .. } => e.has_bytes(),
-            Group { ref e, .. } => e.has_bytes(),
-            Concat(ref es) => es.iter().any(|e| e.has_bytes()),
-            Alternate(ref es) => es.iter().any(|e| e.has_bytes()),
-            LiteralBytes{..} => true,
-            AnyByte | AnyByteNoNL => true,
-            ClassBytes(_) => true,
-            WordBoundaryAscii | NotWordBoundaryAscii => true,
-            _ => false,
-        }
-    }
-}
-
-impl Deref for CharClass {
-    type Target = Vec<ClassRange>;
-    fn deref(&self) -> &Vec<ClassRange> { &self.ranges }
-}
-
-impl IntoIterator for CharClass {
-    type Item = ClassRange;
-    type IntoIter = vec::IntoIter<ClassRange>;
-    fn into_iter(self) -> vec::IntoIter<ClassRange> { self.ranges.into_iter() }
-}
-
-impl<'a> IntoIterator for &'a CharClass {
-    type Item = &'a ClassRange;
-    type IntoIter = slice::Iter<'a, ClassRange>;
-    fn into_iter(self) -> slice::Iter<'a, ClassRange> { self.iter() }
-}
-
-impl CharClass {
-    /// Create a new class from an existing set of ranges.
-    pub fn new(ranges: Vec<ClassRange>) -> CharClass {
-        CharClass { ranges: ranges }
-    }
-
-    /// Create an empty class.
-    fn empty() -> CharClass {
-        CharClass::new(Vec::new())
-    }
-
-    /// Returns true if `c` is matched by this character class.
-    pub fn matches(&self, c: char) -> bool {
-        self.binary_search_by(|range| c.partial_cmp(range).unwrap()).is_ok()
-    }
-
-    /// Removes the given character from the class if it exists.
-    ///
-    /// Note that this takes `O(n)` time in the number of ranges.
-    pub fn remove(&mut self, c: char) {
-        let mut i = match self.binary_search_by(|r| c.partial_cmp(r).unwrap()) {
-            Ok(i) => i,
-            Err(_) => return,
-        };
-        let mut r = self.ranges.remove(i);
-        if r.start == c {
-            r.start = inc_char(c);
-            if r.start > r.end || c == char::MAX {
-                return;
-            }
-            self.ranges.insert(i, r);
-        } else if r.end == c {
-            r.end = dec_char(c);
-            if r.end < r.start || c == '\x00' {
-                return;
-            }
-            self.ranges.insert(0, r);
-        } else {
-            let (mut r1, mut r2) = (r.clone(), r.clone());
-            r1.end = dec_char(c);
-            if r1.start <= r1.end {
-                self.ranges.insert(i, r1);
-                i += 1;
-            }
-            r2.start = inc_char(c);
-            if r2.start <= r2.end {
-                self.ranges.insert(i, r2);
-            }
-        }
-    }
-
-    /// Create a new empty class from this one.
-    fn to_empty(&self) -> CharClass {
-        CharClass { ranges: Vec::with_capacity(self.len()) }
-    }
-
-    /// Create a byte class from this character class.
-    ///
-    /// Codepoints above 0xFF are removed.
-    fn to_byte_class(self) -> ByteClass {
-        ByteClass::new(
-            self.ranges.into_iter()
-                       .filter_map(|r| r.to_byte_range())
-                       .collect()).canonicalize()
-    }
-
-    /// Merge two classes and canonicalize them.
-    #[cfg(test)]
-    fn merge(mut self, other: CharClass) -> CharClass {
-        self.ranges.extend(other);
-        self.canonicalize()
-    }
-
-    /// Canonicalze any sequence of ranges.
-    ///
-    /// This is responsible for enforcing the canonical format invariants
-    /// as described on the docs for the `CharClass` type.
-    fn canonicalize(mut self) -> CharClass {
-        // TODO: Save some cycles here by checking if already canonicalized.
-        self.ranges.sort();
-        let mut ordered = self.to_empty(); // TODO: Do this in place?
-        for candidate in self {
-            // If the candidate overlaps with an existing range, then it must
-            // be the most recent range added because we process the candidates
-            // in order.
-            if let Some(or) = ordered.ranges.last_mut() {
-                if or.overlapping(candidate) {
-                    *or = or.merge(candidate);
-                    continue;
-                }
-            }
-            ordered.ranges.push(candidate);
-        }
-        ordered
-    }
-
-    /// Negates the character class.
-    ///
-    /// For all `c` where `c` is a Unicode scalar value, `c` matches `self`
-    /// if and only if `c` does not match `self.negate()`.
-    pub fn negate(mut self) -> CharClass {
-        fn range(s: char, e: char) -> ClassRange { ClassRange::new(s, e) }
-
-        if self.is_empty() {
-            // Inverting an empty range yields all of Unicode.
-            return CharClass {
-                ranges: vec![ClassRange { start: '\x00', end: '\u{10ffff}' }],
-            };
-        }
-        self = self.canonicalize();
-        let mut inv = self.to_empty();
-        if self[0].start > '\x00' {
-            inv.ranges.push(range('\x00', dec_char(self[0].start)));
-        }
-        for win in self.windows(2) {
-            inv.ranges.push(range(inc_char(win[0].end),
-                                  dec_char(win[1].start)));
-        }
-        if self[self.len() - 1].end < char::MAX {
-            inv.ranges.push(range(inc_char(self[self.len() - 1].end),
-                                  char::MAX));
-        }
-        inv
-    }
-
-    /// Apply case folding to this character class.
-    ///
-    /// N.B. Applying case folding to a negated character class probably
-    /// won't produce the expected result. e.g., `(?i)[^x]` really should
-    /// match any character sans `x` and `X`, but if `[^x]` is negated
-    /// before being case folded, you'll end up matching any character.
-    pub fn case_fold(self) -> CharClass {
-        let mut folded = self.to_empty();
-        for r in self {
-            // Applying case folding to a range is expensive because *every*
-            // character needs to be examined. Thus, we avoid that drudgery
-            // if no character in the current range is in our case folding
-            // table.
-            if r.needs_case_folding() {
-                folded.ranges.extend(r.case_fold());
-            }
-            folded.ranges.push(r);
-        }
-        folded.canonicalize()
-    }
-
-    /// Returns the number of characters that match this class.
-    fn num_chars(&self) -> usize {
-        self.ranges.iter()
-            .map(|&r| 1 + (r.end as u32) - (r.start as u32))
-            .fold(0, |acc, len| acc + len)
-            as usize
-    }
-}
-
-impl ClassRange {
-    /// Create a new class range.
-    ///
-    /// If `end < start`, then the two values are swapped so that
-    /// the invariant `start <= end` is preserved.
-    fn new(start: char, end: char) -> ClassRange {
-        if start <= end {
-            ClassRange { start: start, end: end }
-        } else {
-            ClassRange { start: end, end: start }
-        }
-    }
-
-    /// Translate this to a byte class.
-    ///
-    /// If the start codepoint exceeds 0xFF, then this returns `None`.
-    ///
-    /// If the end codepoint exceeds 0xFF, then it is set to 0xFF.
-    fn to_byte_range(self) -> Option<ByteRange> {
-        if self.start > '\u{FF}' {
-            None
-        } else {
-            let s = self.start as u8;
-            let e = min('\u{FF}', self.end) as u8;
-            Some(ByteRange::new(s, e))
-        }
-    }
-
-    /// Create a range of one character.
-    fn one(c: char) -> ClassRange {
-        ClassRange { start: c, end: c }
-    }
-
-    /// Returns true if and only if the two ranges are overlapping. Note that
-    /// since ranges are inclusive, `a-c` and `d-f` are overlapping!
-    fn overlapping(self, other: ClassRange) -> bool {
-        max(self.start, other.start) <= inc_char(min(self.end, other.end))
-    }
-
-    /// Creates a new range representing the union of `self` and `other.
-    fn merge(self, other: ClassRange) -> ClassRange {
-        ClassRange {
-            start: min(self.start, other.start),
-            end: max(self.end, other.end),
-        }
-    }
-
-    /// Returns true if and only if this range contains a character that is
-    /// in the case folding table.
-    fn needs_case_folding(self) -> bool {
-        case_folding::C_plus_S_both_table
-        .binary_search_by(|&(c, _)| self.partial_cmp(&c).unwrap()).is_ok()
-    }
-
-    /// Apply case folding to this range.
-    ///
-    /// Since case folding might add characters such that the range is no
-    /// longer contiguous, this returns multiple class ranges. They are in
-    /// canonical order.
-    fn case_fold(self) -> Vec<ClassRange> {
-        let table = &case_folding::C_plus_S_both_table;
-        let (s, e) = (self.start as u32, self.end as u32 + 1);
-        let mut start = self.start;
-        let mut end = start;
-        let mut next_case_fold = '\x00';
-        let mut ranges = Vec::with_capacity(10);
-        for mut c in (s..e).filter_map(char::from_u32) {
-            if c >= next_case_fold {
-                c = match simple_case_fold_both_result(c) {
-                    Ok(i) => {
-                        for &(c1, c2) in &table[i..] {
-                            if c1 != c {
-                                break;
-                            }
-                            if c2 != inc_char(end) {
-                                ranges.push(ClassRange::new(start, end));
-                                start = c2;
-                            }
-                            end = c2;
-                        }
-                        continue;
-                    }
-                    Err(i) => {
-                        if i < table.len() {
-                            next_case_fold = table[i].0;
-                        } else {
-                            next_case_fold = '\u{10FFFF}';
-                        }
-                        c
-                    }
-                };
-            }
-            // The fast path. We know this character doesn't have an entry
-            // in the case folding table.
-            if c != inc_char(end) {
-                ranges.push(ClassRange::new(start, end));
-                start = c;
-            }
-            end = c;
-        }
-        ranges.push(ClassRange::new(start, end));
-        ranges
-    }
-}
-
-impl PartialEq<char> for ClassRange {
-    #[inline]
-    fn eq(&self, other: &char) -> bool {
-        self.start <= *other && *other <= self.end
-    }
-}
-
-impl PartialEq<ClassRange> for char {
-    #[inline]
-    fn eq(&self, other: &ClassRange) -> bool {
-        other.eq(self)
-    }
-}
-
-impl PartialOrd<char> for ClassRange {
-    #[inline]
-    fn partial_cmp(&self, other: &char) -> Option<Ordering> {
-        Some(if self == other {
-            Ordering::Equal
-        } else if *other > self.end {
-            Ordering::Greater
-        } else {
-            Ordering::Less
-        })
-    }
-}
-
-impl PartialOrd<ClassRange> for char {
-    #[inline]
-    fn partial_cmp(&self, other: &ClassRange) -> Option<Ordering> {
-        other.partial_cmp(self).map(|o| o.reverse())
-    }
-}
-
-impl ByteClass {
-    /// Create a new class from an existing set of ranges.
-    pub fn new(ranges: Vec<ByteRange>) -> ByteClass {
-        ByteClass { ranges: ranges }
-    }
-
-    /// Returns true if `b` is matched by this byte class.
-    pub fn matches(&self, b: u8) -> bool {
-        self.binary_search_by(|range| b.partial_cmp(range).unwrap()).is_ok()
-    }
-
-    /// Removes the given byte from the class if it exists.
-    ///
-    /// Note that this takes `O(n)` time in the number of ranges.
-    pub fn remove(&mut self, b: u8) {
-        let mut i = match self.binary_search_by(|r| b.partial_cmp(r).unwrap()) {
-            Ok(i) => i,
-            Err(_) => return,
-        };
-        let mut r = self.ranges.remove(i);
-        if r.start == b {
-            r.start = b.saturating_add(1);
-            if r.start > r.end || b == u8::MAX {
-                return;
-            }
-            self.ranges.insert(i, r);
-        } else if r.end == b {
-            r.end = b.saturating_sub(1);
-            if r.end < r.start || b == b'\x00' {
-                return;
-            }
-            self.ranges.insert(0, r);
-        } else {
-            let (mut r1, mut r2) = (r.clone(), r.clone());
-            r1.end = b.saturating_sub(1);
-            if r1.start <= r1.end {
-                self.ranges.insert(i, r1);
-                i += 1;
-            }
-            r2.start = b.saturating_add(1);
-            if r2.start <= r2.end {
-                self.ranges.insert(i, r2);
-            }
-        }
-    }
-
-    /// Create a new empty class from this one.
-    fn to_empty(&self) -> ByteClass {
-        ByteClass { ranges: Vec::with_capacity(self.len()) }
-    }
-
-    /// Canonicalze any sequence of ranges.
-    ///
-    /// This is responsible for enforcing the canonical format invariants
-    /// as described on the docs for the `ByteClass` type.
-    fn canonicalize(mut self) -> ByteClass {
-        // TODO: Save some cycles here by checking if already canonicalized.
-        self.ranges.sort();
-        let mut ordered = self.to_empty(); // TODO: Do this in place?
-        for candidate in self {
-            // If the candidate overlaps with an existing range, then it must
-            // be the most recent range added because we process the candidates
-            // in order.
-            if let Some(or) = ordered.ranges.last_mut() {
-                if or.overlapping(candidate) {
-                    *or = or.merge(candidate);
-                    continue;
-                }
-            }
-            ordered.ranges.push(candidate);
-        }
-        ordered
-    }
-
-    /// Negates the byte class.
-    ///
-    /// For all `b` where `b` is a byte, `b` matches `self` if and only if `b`
-    /// does not match `self.negate()`.
-    pub fn negate(mut self) -> ByteClass {
-        fn range(s: u8, e: u8) -> ByteRange { ByteRange::new(s, e) }
-
-        if self.is_empty() {
-            // Inverting an empty range yields all bytes.
-            return ByteClass {
-                ranges: vec![ByteRange { start: b'\x00', end: b'\xff' }],
-            };
-        }
-        self = self.canonicalize();
-        let mut inv = self.to_empty();
-        if self[0].start > b'\x00' {
-            inv.ranges.push(range(b'\x00', self[0].start.saturating_sub(1)));
-        }
-        for win in self.windows(2) {
-            inv.ranges.push(range(win[0].end.saturating_add(1),
-                                  win[1].start.saturating_sub(1)));
-        }
-        if self[self.len() - 1].end < u8::MAX {
-            inv.ranges.push(range(self[self.len() - 1].end.saturating_add(1),
-                                  u8::MAX));
-        }
-        inv
-    }
-
-    /// Apply case folding to this byte class.
-    ///
-    /// This assumes that the bytes in the ranges are ASCII compatible.
-    ///
-    /// N.B. Applying case folding to a negated character class probably
-    /// won't produce the expected result. e.g., `(?i)[^x]` really should
-    /// match any character sans `x` and `X`, but if `[^x]` is negated
-    /// before being case folded, you'll end up matching any character.
-    pub fn case_fold(self) -> ByteClass {
-        let mut folded = self.to_empty();
-        for r in self {
-            folded.ranges.extend(r.case_fold());
-        }
-        folded.canonicalize()
-    }
-
-    /// Returns the number of bytes that match this class.
-    fn num_bytes(&self) -> usize {
-        self.ranges.iter()
-            .map(|&r| 1 + (r.end as u32) - (r.start as u32))
-            .fold(0, |acc, len| acc + len)
-            as usize
-    }
-}
-
-impl ByteRange {
-    /// Create a new class range.
-    ///
-    /// If `end < start`, then the two values are swapped so that
-    /// the invariant `start <= end` is preserved.
-    fn new(start: u8, end: u8) -> ByteRange {
-        if start <= end {
-            ByteRange { start: start, end: end }
-        } else {
-            ByteRange { start: end, end: start }
-        }
-    }
-
-    /// Returns true if and only if the two ranges are overlapping. Note that
-    /// since ranges are inclusive, `a-c` and `d-f` are overlapping!
-    fn overlapping(self, other: ByteRange) -> bool {
-        max(self.start, other.start)
-        <= min(self.end, other.end).saturating_add(1)
-    }
-
-    /// Returns true if and only if the intersection of self and other is non
-    /// empty.
-    fn is_intersect_empty(self, other: ByteRange) -> bool {
-        max(self.start, other.start) > min(self.end, other.end)
-    }
-
-    /// Creates a new range representing the union of `self` and `other.
-    fn merge(self, other: ByteRange) -> ByteRange {
-        ByteRange {
-            start: min(self.start, other.start),
-            end: max(self.end, other.end),
-        }
-    }
-
-    /// Apply case folding to this range.
-    ///
-    /// Since case folding might add bytes such that the range is no
-    /// longer contiguous, this returns multiple byte ranges.
-    ///
-    /// This assumes that the bytes in this range are ASCII compatible.
-    fn case_fold(self) -> Vec<ByteRange> {
-        // So much easier than Unicode case folding!
-        let mut ranges = vec![self];
-        if !ByteRange::new(b'a', b'z').is_intersect_empty(self) {
-            let lower = max(self.start, b'a');
-            let upper = min(self.end, b'z');
-            ranges.push(ByteRange::new(lower - 32, upper - 32));
-        }
-        if !ByteRange::new(b'A', b'Z').is_intersect_empty(self) {
-            let lower = max(self.start, b'A');
-            let upper = min(self.end, b'Z');
-            ranges.push(ByteRange::new(lower + 32, upper + 32));
-        }
-        ranges
-    }
-}
-
-impl Deref for ByteClass {
-    type Target = Vec<ByteRange>;
-    fn deref(&self) -> &Vec<ByteRange> { &self.ranges }
-}
-
-impl IntoIterator for ByteClass {
-    type Item = ByteRange;
-    type IntoIter = vec::IntoIter<ByteRange>;
-    fn into_iter(self) -> vec::IntoIter<ByteRange> { self.ranges.into_iter() }
-}
-
-impl<'a> IntoIterator for &'a ByteClass {
-    type Item = &'a ByteRange;
-    type IntoIter = slice::Iter<'a, ByteRange>;
-    fn into_iter(self) -> slice::Iter<'a, ByteRange> { self.iter() }
-}
-
-impl PartialEq<u8> for ByteRange {
-    #[inline]
-    fn eq(&self, other: &u8) -> bool {
-        self.start <= *other && *other <= self.end
-    }
-}
-
-impl PartialEq<ByteRange> for u8 {
-    #[inline]
-    fn eq(&self, other: &ByteRange) -> bool {
-        other.eq(self)
-    }
-}
-
-impl PartialOrd<u8> for ByteRange {
-    #[inline]
-    fn partial_cmp(&self, other: &u8) -> Option<Ordering> {
-        Some(if self == other {
-            Ordering::Equal
-        } else if *other > self.end {
-            Ordering::Greater
-        } else {
-            Ordering::Less
-        })
-    }
-}
-
-impl PartialOrd<ByteRange> for u8 {
-    #[inline]
-    fn partial_cmp(&self, other: &ByteRange) -> Option<Ordering> {
-        other.partial_cmp(self).map(|o| o.reverse())
-    }
-}
-
-/// This implementation of `Display` will write a regular expression from the
-/// syntax tree. It does not write the original string parsed.
-impl fmt::Display for Expr {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            Empty => write!(f, ""),
-            Literal { ref chars, casei } => {
-                if casei {
-                    try!(write!(f, "(?iu:"));
-                } else {
-                    try!(write!(f, "(?u:"));
-                }
-                for &c in chars {
-                    try!(write!(f, "{}", quote_char(c)));
-                }
-                try!(write!(f, ")"));
-                Ok(())
-            }
-            LiteralBytes { ref bytes, casei } => {
-                if casei {
-                    try!(write!(f, "(?i-u:"));
-                } else {
-                    try!(write!(f, "(?-u:"));
-                }
-                for &b in bytes {
-                    try!(write!(f, "{}", quote_byte(b)));
-                }
-                try!(write!(f, ")"));
-                Ok(())
-            }
-            AnyChar => write!(f, "(?su:.)"),
-            AnyCharNoNL => write!(f, "(?u:.)"),
-            AnyByte => write!(f, "(?s-u:.)"),
-            AnyByteNoNL => write!(f, "(?-u:.)"),
-            Class(ref cls) => write!(f, "{}", cls),
-            ClassBytes(ref cls) => write!(f, "{}", cls),
-            StartLine => write!(f, "(?m:^)"),
-            EndLine => write!(f, "(?m:$)"),
-            StartText => write!(f, r"^"),
-            EndText => write!(f, r"$"),
-            WordBoundary => write!(f, r"(?u:\b)"),
-            NotWordBoundary => write!(f, r"(?u:\B)"),
-            WordBoundaryAscii => write!(f, r"(?-u:\b)"),
-            NotWordBoundaryAscii => write!(f, r"(?-u:\B)"),
-            Group { ref e, i: None, name: None } => write!(f, "(?:{})", e),
-            Group { ref e, name: None, .. } => write!(f, "({})", e),
-            Group { ref e, name: Some(ref n), .. } => {
-                write!(f, "(?P<{}>{})", n, e)
-            }
-            Repeat { ref e, r, greedy } => {
-                match &**e {
-                    &Literal { ref chars, .. } if chars.len() > 1 => {
-                        try!(write!(f, "(?:{}){}", e, r))
-                    }
-                    _ => try!(write!(f, "{}{}", e, r)),
-                }
-                if !greedy { try!(write!(f, "?")); }
-                Ok(())
-            }
-            Concat(ref es) => {
-                for e in es {
-                    try!(write!(f, "{}", e));
-                }
-                Ok(())
-            }
-            Alternate(ref es) => {
-                for (i, e) in es.iter().enumerate() {
-                    if i > 0 { try!(write!(f, "|")); }
-                    try!(write!(f, "{}", e));
-                }
-                Ok(())
-            }
-        }
-    }
-}
-
-impl fmt::Display for Repeater {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            ZeroOrOne => write!(f, "?"),
-            ZeroOrMore => write!(f, "*"),
-            OneOrMore => write!(f, "+"),
-            Range { min: s, max: None } => write!(f, "{{{},}}", s),
-            Range { min: s, max: Some(e) } if s == e => write!(f, "{{{}}}", s),
-            Range { min: s, max: Some(e) } => write!(f, "{{{}, {}}}", s, e),
-        }
-    }
-}
-
-impl fmt::Display for CharClass {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, "(?u:["));
-        for range in self.iter() {
-            if range.start == '-' || range.end == '-' {
-                try!(write!(f, "-"));
-                break;
-            }
-        }
-        for range in self.iter() {
-            let mut range = *range;
-            if range.start == '-' {
-                range.start = ((range.start as u8) + 1) as char;
-            }
-            if range.end == '-' {
-                range.end = ((range.end as u8) - 1) as char;
-            }
-            if range.start > range.end {
-                continue;
-            }
-            try!(write!(f, "{}", range));
-        }
-        try!(write!(f, "])"));
-        Ok(())
-    }
-}
-
-impl fmt::Display for ClassRange {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}-{}", quote_char(self.start), quote_char(self.end))
-    }
-}
-
-impl fmt::Display for ByteClass {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, "(?-u:["));
-        for range in self.iter() {
-            if range.start == b'-' || range.end == b'-' {
-                try!(write!(f, "-"));
-                break;
-            }
-        }
-        for range in self.iter() {
-            let mut range = *range;
-            if range.start == b'-' {
-                range.start += 1;
-            }
-            if range.end == b'-' {
-                range.start -= 1;
-            }
-            if range.start > range.end {
-                continue;
-            }
-            try!(write!(f, "{}", range));
-        }
-        try!(write!(f, "])"));
-        Ok(())
-    }
-}
-
-impl fmt::Display for ByteRange {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}-{}", quote_byte(self.start), quote_byte(self.end))
-    }
-}
-
-/// An alias for computations that can return a `Error`.
-pub type Result<T> = ::std::result::Result<T, Error>;
-
-/// A parse error.
-///
-/// This includes details about the specific type of error and a rough
-/// approximation of where it occurred.
-#[derive(Clone, Debug, PartialEq)]
-pub struct Error {
-    pos: usize,
-    surround: String,
-    kind: ErrorKind,
-}
-
-/// The specific type of parse error that can occur.
-#[derive(Clone, Debug, PartialEq)]
-pub enum ErrorKind {
-    /// A negation symbol is used twice in flag settings.
-    /// e.g., `(?-i-s)`.
-    DoubleFlagNegation,
-    /// The same capture name was used more than once.
-    /// e.g., `(?P<a>.)(?P<a>.)`.
-    DuplicateCaptureName(String),
-    /// An alternate is empty. e.g., `(|a)`.
-    EmptyAlternate,
-    /// A capture group name is empty. e.g., `(?P<>a)`.
-    EmptyCaptureName,
-    /// A negation symbol was not proceded by any flags. e.g., `(?i-)`.
-    EmptyFlagNegation,
-    /// A group is empty. e.g., `()`.
-    EmptyGroup,
-    /// An invalid number was used in a counted repetition. e.g., `a{b}`.
-    InvalidBase10(String),
-    /// An invalid hexadecimal number was used in an escape sequence.
-    /// e.g., `\xAG`.
-    InvalidBase16(String),
-    /// An invalid capture name was used. e.g., `(?P<0a>b)`.
-    InvalidCaptureName(String),
-    /// An invalid class range was givien. Specifically, when the start of the
-    /// range is greater than the end. e.g., `[z-a]`.
-    InvalidClassRange {
-        /// The first character specified in the range.
-        start: char,
-        /// The second character specified in the range.
-        end: char,
-    },
-    /// An escape sequence was used in a character class where it is not
-    /// allowed. e.g., `[a-\pN]` or `[\A]`.
-    InvalidClassEscape(Expr),
-    /// An invalid counted repetition min/max was given. e.g., `a{2,1}`.
-    InvalidRepeatRange {
-        /// The first number specified in the repetition.
-        min: u32,
-        /// The second number specified in the repetition.
-        max: u32,
-    },
-    /// An invalid Unicode scalar value was used in a long hexadecimal
-    /// sequence. e.g., `\x{D800}`.
-    InvalidScalarValue(u32),
-    /// An empty counted repetition operator. e.g., `a{}`.
-    MissingBase10,
-    /// A repetition operator was not applied to an expression. e.g., `*`.
-    RepeaterExpectsExpr,
-    /// A repetition operator was applied to an expression that cannot be
-    /// repeated. e.g., `a+*` or `a|*`.
-    RepeaterUnexpectedExpr(Expr),
-    /// A capture group name that is never closed. e.g., `(?P<a`.
-    UnclosedCaptureName(String),
-    /// An unclosed hexadecimal literal. e.g., `\x{a`.
-    UnclosedHex,
-    /// An unclosed parenthesis. e.g., `(a`.
-    UnclosedParen,
-    /// An unclosed counted repetition operator. e.g., `a{2`.
-    UnclosedRepeat,
-    /// An unclosed named Unicode class. e.g., `\p{Yi`.
-    UnclosedUnicodeName,
-    /// Saw end of regex before class was closed. e.g., `[a`.
-    UnexpectedClassEof,
-    /// Saw end of regex before escape sequence was closed. e.g., `\`.
-    UnexpectedEscapeEof,
-    /// Saw end of regex before flags were closed. e.g., `(?i`.
-    UnexpectedFlagEof,
-    /// Saw end of regex before two hexadecimal digits were seen. e.g., `\xA`.
-    UnexpectedTwoDigitHexEof,
-    /// Unopened parenthesis. e.g., `)`.
-    UnopenedParen,
-    /// Unrecognized escape sequence. e.g., `\q`.
-    UnrecognizedEscape(char),
-    /// Unrecognized flag. e.g., `(?a)`.
-    UnrecognizedFlag(char),
-    /// Unrecognized named Unicode class. e.g., `\p{Foo}`.
-    UnrecognizedUnicodeClass(String),
-    /// Indicates that the regex uses too much nesting.
-    ///
-    /// (N.B. This error exists because traversing the Expr is recursive and
-    /// an explicit heap allocated stack is not (yet?) used. Regardless, some
-    /// sort of limit must be applied to avoid unbounded memory growth.
-    StackExhausted,
-    /// A disallowed flag was found (e.g., `u`).
-    FlagNotAllowed(char),
-    /// A Unicode class was used when the Unicode (`u`) flag was disabled.
-    UnicodeNotAllowed,
-    /// InvalidUtf8 indicates that the expression may match non-UTF-8 bytes.
-    /// This never returned if the parser is permitted to allow expressions
-    /// that match arbitrary bytes.
-    InvalidUtf8,
-    /// A character class was constructed such that it is empty.
-    /// e.g., `[^\d\D]`.
-    EmptyClass,
-    /// Indicates that unsupported notation was used in a character class.
-    ///
-    /// The char in this error corresponds to the illegal character.
-    ///
-    /// The intent of this error is to carve a path to support set notation
-    /// as described in UTS#18 RL1.3. We do this by rejecting regexes that
-    /// would use the notation.
-    ///
-    /// The work around for end users is to escape the character included in
-    /// this error message.
-    UnsupportedClassChar(char),
-    /// Hints that destructuring should not be exhaustive.
-    ///
-    /// This enum may grow additional variants, so this makes sure clients
-    /// don't count on exhaustive matching. (Otherwise, adding a new variant
-    /// could break existing code.)
-    #[doc(hidden)]
-    __Nonexhaustive,
-}
-
-impl Error {
-    /// Returns an approximate *character* offset at which the error occurred.
-    ///
-    /// The character offset may be equal to the number of characters in the
-    /// string, in which case it should be interpreted as pointing to the end
-    /// of the regex.
-    pub fn position(&self) -> usize {
-        self.pos
-    }
-
-    /// Returns the type of the regex parse error.
-    pub fn kind(&self) -> &ErrorKind {
-        &self.kind
-    }
-}
-
-impl ErrorKind {
-    fn description(&self) -> &str {
-        use ErrorKind::*;
-        match *self {
-            DoubleFlagNegation => "double flag negation",
-            DuplicateCaptureName(_) => "duplicate capture name",
-            EmptyAlternate => "empty alternate",
-            EmptyCaptureName => "empty capture name",
-            EmptyFlagNegation => "flag negation without any flags",
-            EmptyGroup => "empty group (e.g., '()')",
-            InvalidBase10(_) => "invalid base 10 number",
-            InvalidBase16(_) => "invalid base 16 number",
-            InvalidCaptureName(_) => "invalid capture name",
-            InvalidClassRange{..} => "invalid character class range",
-            InvalidClassEscape(_) => "invalid escape sequence in class",
-            InvalidRepeatRange{..} => "invalid counted repetition range",
-            InvalidScalarValue(_) => "invalid Unicode scalar value",
-            MissingBase10 => "missing count in repetition operator",
-            RepeaterExpectsExpr => "repetition operator missing expression",
-            RepeaterUnexpectedExpr(_) => "expression cannot be repeated",
-            UnclosedCaptureName(_) => "unclosed capture group name",
-            UnclosedHex => "unclosed hexadecimal literal",
-            UnclosedParen => "unclosed parenthesis",
-            UnclosedRepeat => "unclosed counted repetition operator",
-            UnclosedUnicodeName => "unclosed Unicode class literal",
-            UnexpectedClassEof => "unexpected EOF in character class",
-            UnexpectedEscapeEof => "unexpected EOF in escape sequence",
-            UnexpectedFlagEof => "unexpected EOF in flags",
-            UnexpectedTwoDigitHexEof => "unexpected EOF in hex literal",
-            UnopenedParen => "unopened parenthesis",
-            UnrecognizedEscape(_) => "unrecognized escape sequence",
-            UnrecognizedFlag(_) => "unrecognized flag",
-            UnrecognizedUnicodeClass(_) => "unrecognized Unicode class name",
-            StackExhausted => "stack exhausted, too much nesting",
-            FlagNotAllowed(_) => "flag not allowed",
-            UnicodeNotAllowed => "Unicode features not allowed",
-            InvalidUtf8 => "matching arbitrary bytes is not allowed",
-            EmptyClass => "empty character class",
-            UnsupportedClassChar(_) => "unsupported class notation",
-            __Nonexhaustive => unreachable!(),
-        }
-    }
-}
-
-impl ::std::error::Error for Error {
-    fn description(&self) -> &str {
-        self.kind.description()
-    }
-}
-
-impl fmt::Display for Error {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        if let ErrorKind::StackExhausted = self.kind {
-            write!(f, "Error parsing regex: {}", self.kind)
-        } else {
-            write!(
-                f, "Error parsing regex near '{}' at character offset {}: {}",
-                self.surround, self.pos, self.kind)
-        }
-    }
-}
-
-impl fmt::Display for ErrorKind {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        use ErrorKind::*;
-        match *self {
-            DoubleFlagNegation =>
-                write!(f, "Only one negation symbol is allowed in flags."),
-            DuplicateCaptureName(ref s) =>
-                write!(f, "Capture name '{}' is used more than once.", s),
-            EmptyAlternate =>
-                write!(f, "Alternations cannot be empty."),
-            EmptyCaptureName =>
-                write!(f, "Capture names cannot be empty."),
-            EmptyFlagNegation =>
-                write!(f, "Flag negation requires setting at least one flag."),
-            EmptyGroup =>
-                write!(f, "Empty regex groups (e.g., '()') are not allowed."),
-            InvalidBase10(ref s) =>
-                write!(f, "Not a valid base 10 number: '{}'", s),
-            InvalidBase16(ref s) =>
-                write!(f, "Not a valid base 16 number: '{}'", s),
-            InvalidCaptureName(ref s) =>
-                write!(f, "Invalid capture name: '{}'. Capture names must \
-                           consist of [_a-zA-Z0-9] and are not allowed to \
-                           start with with a number.", s),
-            InvalidClassRange { start, end } =>
-                write!(f, "Invalid character class range '{}-{}'. \
-                           Character class ranges must start with the smaller \
-                           character, but {} > {}", start, end, start, end),
-            InvalidClassEscape(ref e) =>
-                write!(f, "Invalid escape sequence in character \
-                           class: '{}'.", e),
-            InvalidRepeatRange { min, max } =>
-                write!(f, "Invalid counted repetition range: {{{}, {}}}. \
-                           Counted repetition ranges must start with the \
-                           minimum, but {} > {}", min, max, min, max),
-            InvalidScalarValue(c) =>
-                write!(f, "Number does not correspond to a Unicode scalar \
-                           value: '{}'.", c),
-            MissingBase10 =>
-                write!(f, "Missing maximum in counted
-repetition operator."),
-            RepeaterExpectsExpr =>
-                write!(f, "Missing expression for repetition operator."),
-            RepeaterUnexpectedExpr(ref e) =>
-                write!(f, "Invalid application of repetition operator to: \
-                          '{}'.", e),
-            UnclosedCaptureName(ref s) =>
-                write!(f, "Capture name group for '{}' is not closed. \
-                           (Missing a '>'.)", s),
-            UnclosedHex =>
-                write!(f, "Unclosed hexadecimal literal (missing a '}}')."),
-            UnclosedParen =>
-                write!(f, "Unclosed parenthesis."),
-            UnclosedRepeat =>
-                write!(f, "Unclosed counted repetition (missing a '}}')."),
-            UnclosedUnicodeName =>
-                write!(f, "Unclosed Unicode literal (missing a '}}')."),
-            UnexpectedClassEof =>
-                write!(f, "Character class was not closed before the end of \
-                           the regex (missing a ']')."),
-            UnexpectedEscapeEof =>
-                write!(f, "Started an escape sequence that didn't finish \
-                           before the end of the regex."),
-            UnexpectedFlagEof =>
-                write!(f, "Inline flag settings was not closed before the end \
-                           of the regex (missing a ')' or ':')."),
-            UnexpectedTwoDigitHexEof =>
-                write!(f, "Unexpected end of two digit hexadecimal literal."),
-            UnopenedParen =>
-                write!(f, "Unopened parenthesis."),
-            UnrecognizedEscape(c) =>
-                write!(f, "Unrecognized escape sequence: '\\{}'.", c),
-            UnrecognizedFlag(c) =>
-                write!(f, "Unrecognized flag: '{}'. \
-                           (Allowed flags: i, m, s, U, u, x.)", c),
-            UnrecognizedUnicodeClass(ref s) =>
-                write!(f, "Unrecognized Unicode class name: '{}'.", s),
-            StackExhausted =>
-                write!(f, "Exhausted space required to parse regex with too \
-                           much nesting."),
-            FlagNotAllowed(flag) =>
-                write!(f, "Use of the flag '{}' is not allowed.", flag),
-            UnicodeNotAllowed =>
-                write!(f, "Unicode features are not allowed when the Unicode \
-                           (u) flag is not set."),
-            InvalidUtf8 =>
-                write!(f, "Matching arbitrary bytes is not allowed."),
-            EmptyClass =>
-                write!(f, "Empty character classes are not allowed."),
-            UnsupportedClassChar(c) =>
-                write!(f, "Use of unescaped '{}' in character class is \
-                           not allowed.", c),
-            __Nonexhaustive => unreachable!(),
-        }
-    }
-}
-
-/// The result of binary search on the simple case folding table.
-///
-/// Note that this binary search is done on the "both" table, such that
-/// the index returned corresponds to the *first* location of `c1` in the
-/// table. The table can then be scanned linearly starting from the position
-/// returned to find other case mappings for `c1`.
-fn simple_case_fold_both_result(c1: char) -> result::Result<usize, usize> {
-    let table = &case_folding::C_plus_S_both_table;
-    let i = binary_search(table, |&(c2, _)| c1 <= c2);
-    if i >= table.len() || table[i].0 != c1 {
-        Err(i)
-    } else {
-        Ok(i)
-    }
-}
-
-/// Binary search to find first element such that `pred(T) == true`.
-///
-/// Assumes that if `pred(xs[i]) == true` then `pred(xs[i+1]) == true`.
-///
-/// If all elements yield `pred(T) == false`, then `xs.len()` is returned.
-fn binary_search<T, F>(xs: &[T], mut pred: F) -> usize
-        where F: FnMut(&T) -> bool {
-    let (mut left, mut right) = (0, xs.len());
-    while left < right {
-        let mid = (left + right) / 2;
-        if pred(&xs[mid]) {
-            right = mid;
-        } else {
-            left = mid + 1;
-        }
-    }
-    left
-}
-
-/// Escapes all regular expression meta characters in `text`.
-///
-/// The string returned may be safely used as a literal in a regular
-/// expression.
-pub fn escape(text: &str) -> String {
-    let mut quoted = String::with_capacity(text.len());
-    for c in text.chars() {
-        if parser::is_punct(c) {
-            quoted.push('\\');
-        }
-        quoted.push(c);
-    }
-    quoted
-}
-
-fn quote_char(c: char) -> String {
-    let mut s = String::new();
-    if parser::is_punct(c) {
-        s.push('\\');
-    }
-    s.push(c);
-    s
-}
-
-fn quote_byte(b: u8) -> String {
-    if parser::is_punct(b as char) || b == b'\'' || b == b'"' {
-        quote_char(b as char)
-    } else {
-        let escaped: Vec<u8> = ascii::escape_default(b).collect();
-        String::from_utf8(escaped).unwrap()
-    }
-}
-
-fn inc_char(c: char) -> char {
-    match c {
-        char::MAX => char::MAX,
-        '\u{D7FF}' => '\u{E000}',
-        c => char::from_u32(c as u32 + 1).unwrap(),
-    }
-}
-
-fn dec_char(c: char) -> char {
-    match c {
-        '\x00' => '\x00',
-        '\u{E000}' => '\u{D7FF}',
-        c => char::from_u32(c as u32 - 1).unwrap(),
-    }
-}
-
-/// Returns true if and only if `c` is a word character.
-#[doc(hidden)]
-pub fn is_word_char(c: char) -> bool {
-    match c {
-        '_' | '0' ... '9' | 'a' ... 'z' | 'A' ... 'Z'  => true,
-        _ => ::unicode::regex::PERLW.binary_search_by(|&(start, end)| {
-            if c >= start && c <= end {
-                Ordering::Equal
-            } else if start > c {
-                Ordering::Greater
-            } else {
-                Ordering::Less
-            }
-        }).is_ok(),
-    }
-}
-
-/// Returns true if and only if `c` is an ASCII word byte.
-#[doc(hidden)]
-pub fn is_word_byte(b: u8) -> bool {
-    match b {
-        b'_' | b'0' ... b'9' | b'a' ... b'z' | b'A' ... b'Z'  => true,
-        _ => false,
-    }
-}
-
-#[cfg(test)]
-mod properties;
-
-#[cfg(test)]
-mod tests {
-    use {CharClass, ClassRange, ByteClass, ByteRange, Expr};
-
-    fn class(ranges: &[(char, char)]) -> CharClass {
-        let ranges = ranges.iter().cloned()
-                           .map(|(c1, c2)| ClassRange::new(c1, c2)).collect();
-        CharClass::new(ranges)
-    }
-
-    fn bclass(ranges: &[(u8, u8)]) -> ByteClass {
-        let ranges = ranges.iter().cloned()
-                           .map(|(c1, c2)| ByteRange::new(c1, c2)).collect();
-        ByteClass::new(ranges)
-    }
-
-    fn e(re: &str) -> Expr { Expr::parse(re).unwrap() }
-
-    #[test]
-    fn stack_exhaustion() {
-        use std::iter::repeat;
-
-        let open: String = repeat('(').take(200).collect();
-        let close: String = repeat(')').take(200).collect();
-        assert!(Expr::parse(&format!("{}a{}", open, close)).is_ok());
-
-        let open: String = repeat('(').take(200 + 1).collect();
-        let close: String = repeat(')').take(200 + 1).collect();
-        assert!(Expr::parse(&format!("{}a{}", open, close)).is_err());
-    }
-
-    #[test]
-    fn anchored_start() {
-        assert!(e("^a").is_anchored_start());
-        assert!(e("(^a)").is_anchored_start());
-        assert!(e("^a|^b").is_anchored_start());
-        assert!(e("(^a)|(^b)").is_anchored_start());
-        assert!(e("(^(a|b))").is_anchored_start());
-
-        assert!(!e("^a|b").is_anchored_start());
-        assert!(!e("a|^b").is_anchored_start());
-    }
-
-    #[test]
-    fn anchored_end() {
-        assert!(e("a$").is_anchored_end());
-        assert!(e("(a$)").is_anchored_end());
-        assert!(e("a$|b$").is_anchored_end());
-        assert!(e("(a$)|(b$)").is_anchored_end());
-        assert!(e("((a|b)$)").is_anchored_end());
-
-        assert!(!e("a$|b").is_anchored_end());
-        assert!(!e("a|b$").is_anchored_end());
-    }
-
-    #[test]
-    fn class_canon_no_change() {
-        let cls = class(&[('a', 'c'), ('x', 'z')]);
-        assert_eq!(cls.clone().canonicalize(), cls);
-    }
-
-    #[test]
-    fn class_canon_unordered() {
-        let cls = class(&[('x', 'z'), ('a', 'c')]);
-        assert_eq!(cls.canonicalize(), class(&[
-            ('a', 'c'), ('x', 'z'),
-        ]));
-    }
-
-    #[test]
-    fn class_canon_overlap() {
-        let cls = class(&[('x', 'z'), ('w', 'y')]);
-        assert_eq!(cls.canonicalize(), class(&[
-            ('w', 'z'),
-        ]));
-    }
-
-    #[test]
-    fn class_canon_overlap_many() {
-        let cls = class(&[
-            ('c', 'f'), ('a', 'g'), ('d', 'j'), ('a', 'c'),
-            ('m', 'p'), ('l', 's'),
-        ]);
-        assert_eq!(cls.clone().canonicalize(), class(&[
-            ('a', 'j'), ('l', 's'),
-        ]));
-    }
-
-    #[test]
-    fn class_canon_overlap_boundary() {
-        let cls = class(&[('x', 'z'), ('u', 'w')]);
-        assert_eq!(cls.canonicalize(), class(&[
-            ('u', 'z'),
-        ]));
-    }
-
-    #[test]
-    fn class_canon_extreme_edge_case() {
-        let cls = class(&[('\x00', '\u{10FFFF}'), ('\x00', '\u{10FFFF}')]);
-        assert_eq!(cls.canonicalize(), class(&[
-            ('\x00', '\u{10FFFF}'),
-        ]));
-    }
-
-    #[test]
-    fn class_canon_singles() {
-        let cls = class(&[('a', 'a'), ('b', 'b')]);
-        assert_eq!(cls.canonicalize(), class(&[('a', 'b')]));
-    }
-
-    #[test]
-    fn class_negate_single() {
-        let cls = class(&[('a', 'a')]);
-        assert_eq!(cls.negate(), class(&[
-            ('\x00', '\x60'), ('\x62', '\u{10FFFF}'),
-        ]));
-    }
-
-    #[test]
-    fn class_negate_singles() {
-        let cls = class(&[('a', 'a'), ('b', 'b')]);
-        assert_eq!(cls.negate(), class(&[
-            ('\x00', '\x60'), ('\x63', '\u{10FFFF}'),
-        ]));
-    }
-
-    #[test]
-    fn class_negate_multiples() {
-        let cls = class(&[('a', 'c'), ('x', 'z')]);
-        assert_eq!(cls.negate(), class(&[
-            ('\x00', '\x60'), ('\x64', '\x77'), ('\x7b', '\u{10FFFF}'),
-        ]));
-    }
-
-    #[test]
-    fn class_negate_min_scalar() {
-        let cls = class(&[('\x00', 'a')]);
-        assert_eq!(cls.negate(), class(&[
-            ('\x62', '\u{10FFFF}'),
-        ]));
-    }
-
-    #[test]
-    fn class_negate_max_scalar() {
-        let cls = class(&[('a', '\u{10FFFF}')]);
-        assert_eq!(cls.negate(), class(&[
-            ('\x00', '\x60'),
-        ]));
-    }
-
-    #[test]
-    fn class_negate_everything() {
-        let cls = class(&[('\x00', '\u{10FFFF}')]);
-        assert_eq!(cls.negate(), class(&[]));
-    }
-
-    #[test]
-    fn class_negate_everything_sans_one() {
-        let cls = class(&[
-            ('\x00', '\u{10FFFD}'), ('\u{10FFFF}', '\u{10FFFF}')
-        ]);
-        assert_eq!(cls.negate(), class(&[
-            ('\u{10FFFE}', '\u{10FFFE}'),
-        ]));
-    }
-
-    #[test]
-    fn class_negate_surrogates_min() {
-        let cls = class(&[('\x00', '\u{D7FF}')]);
-        assert_eq!(cls.negate(), class(&[
-            ('\u{E000}', '\u{10FFFF}'),
-        ]));
-    }
-
-    #[test]
-    fn class_negate_surrogates_min_edge() {
-        let cls = class(&[('\x00', '\u{D7FE}')]);
-        assert_eq!(cls.negate(), class(&[
-            ('\u{D7FF}', '\u{10FFFF}'),
-        ]));
-    }
-
-    #[test]
-    fn class_negate_surrogates_max() {
-        let cls = class(&[('\u{E000}', '\u{10FFFF}')]);
-        assert_eq!(cls.negate(), class(&[
-            ('\x00', '\u{D7FF}'),
-        ]));
-    }
-
-    #[test]
-    fn class_negate_surrogates_max_edge() {
-        let cls = class(&[('\u{E001}', '\u{10FFFF}')]);
-        assert_eq!(cls.negate(), class(&[
-            ('\x00', '\u{E000}'),
-        ]));
-    }
-
-    #[test]
-    fn class_canon_overlap_many_case_fold() {
-        let cls = class(&[
-            ('C', 'F'), ('A', 'G'), ('D', 'J'), ('A', 'C'),
-            ('M', 'P'), ('L', 'S'), ('c', 'f'),
-        ]);
-        assert_eq!(cls.case_fold(), class(&[
-            ('A', 'J'), ('L', 'S'),
-            ('a', 'j'), ('l', 's'),
-            ('\u{17F}', '\u{17F}'),
-        ]));
-
-        let cls = bclass(&[
-            (b'C', b'F'), (b'A', b'G'), (b'D', b'J'), (b'A', b'C'),
-            (b'M', b'P'), (b'L', b'S'), (b'c', b'f'),
-        ]);
-        assert_eq!(cls.case_fold(), bclass(&[
-            (b'A', b'J'), (b'L', b'S'),
-            (b'a', b'j'), (b'l', b's'),
-        ]));
-    }
-
-    #[test]
-    fn class_fold_az() {
-        let cls = class(&[('A', 'Z')]);
-        assert_eq!(cls.case_fold(), class(&[
-            ('A', 'Z'), ('a', 'z'),
-            ('\u{17F}', '\u{17F}'),
-            ('\u{212A}', '\u{212A}'),
-        ]));
-        let cls = class(&[('a', 'z')]);
-        assert_eq!(cls.case_fold(), class(&[
-            ('A', 'Z'), ('a', 'z'),
-            ('\u{17F}', '\u{17F}'),
-            ('\u{212A}', '\u{212A}'),
-        ]));
-
-        let cls = bclass(&[(b'A', b'Z')]);
-        assert_eq!(cls.case_fold(), bclass(&[
-            (b'A', b'Z'), (b'a', b'z'),
-        ]));
-        let cls = bclass(&[(b'a', b'z')]);
-        assert_eq!(cls.case_fold(), bclass(&[
-            (b'A', b'Z'), (b'a', b'z'),
-        ]));
-    }
-
-    #[test]
-    fn class_fold_a_underscore() {
-        let cls = class(&[('A', 'A'), ('_', '_')]);
-        assert_eq!(cls.clone().canonicalize(), class(&[
-            ('A', 'A'), ('_', '_'),
-        ]));
-        assert_eq!(cls.case_fold(), class(&[
-            ('A', 'A'), ('_', '_'), ('a', 'a'),
-        ]));
-
-        let cls = bclass(&[(b'A', b'A'), (b'_', b'_')]);
-        assert_eq!(cls.clone().canonicalize(), bclass(&[
-            (b'A', b'A'), (b'_', b'_'),
-        ]));
-        assert_eq!(cls.case_fold(), bclass(&[
-            (b'A', b'A'), (b'_', b'_'), (b'a', b'a'),
-        ]));
-    }
-
-    #[test]
-    fn class_fold_a_equals() {
-        let cls = class(&[('A', 'A'), ('=', '=')]);
-        assert_eq!(cls.clone().canonicalize(), class(&[
-            ('=', '='), ('A', 'A'),
-        ]));
-        assert_eq!(cls.case_fold(), class(&[
-            ('=', '='), ('A', 'A'), ('a', 'a'),
-        ]));
-
-        let cls = bclass(&[(b'A', b'A'), (b'=', b'=')]);
-        assert_eq!(cls.clone().canonicalize(), bclass(&[
-            (b'=', b'='), (b'A', b'A'),
-        ]));
-        assert_eq!(cls.case_fold(), bclass(&[
-            (b'=', b'='), (b'A', b'A'), (b'a', b'a'),
-        ]));
-    }
-
-    #[test]
-    fn class_fold_no_folding_needed() {
-        let cls = class(&[('\x00', '\x10')]);
-        assert_eq!(cls.case_fold(), class(&[
-            ('\x00', '\x10'),
-        ]));
-
-        let cls = bclass(&[(b'\x00', b'\x10')]);
-        assert_eq!(cls.case_fold(), bclass(&[
-            (b'\x00', b'\x10'),
-        ]));
-    }
-
-    #[test]
-    fn class_fold_negated() {
-        let cls = class(&[('x', 'x')]);
-        assert_eq!(cls.clone().case_fold(), class(&[
-            ('X', 'X'), ('x', 'x'),
-        ]));
-        assert_eq!(cls.case_fold().negate(), class(&[
-            ('\x00', 'W'), ('Y', 'w'), ('y', '\u{10FFFF}'),
-        ]));
-
-        let cls = bclass(&[(b'x', b'x')]);
-        assert_eq!(cls.clone().case_fold(), bclass(&[
-            (b'X', b'X'), (b'x', b'x'),
-        ]));
-        assert_eq!(cls.case_fold().negate(), bclass(&[
-            (b'\x00', b'W'), (b'Y', b'w'), (b'y', b'\xff'),
-        ]));
-    }
-
-    #[test]
-    fn class_fold_single_to_multiple() {
-        let cls = class(&[('k', 'k')]);
-        assert_eq!(cls.case_fold(), class(&[
-            ('K', 'K'), ('k', 'k'), ('\u{212A}', '\u{212A}'),
-        ]));
-
-        let cls = bclass(&[(b'k', b'k')]);
-        assert_eq!(cls.case_fold(), bclass(&[
-            (b'K', b'K'), (b'k', b'k'),
-        ]));
-    }
-
-    #[test]
-    fn class_fold_at() {
-        let cls = class(&[('@', '@')]);
-        assert_eq!(cls.clone().canonicalize(), class(&[('@', '@')]));
-        assert_eq!(cls.case_fold(), class(&[('@', '@')]));
-
-        let cls = bclass(&[(b'@', b'@')]);
-        assert_eq!(cls.clone().canonicalize(), bclass(&[(b'@', b'@')]));
-        assert_eq!(cls.case_fold(), bclass(&[(b'@', b'@')]));
-    }
-
-    #[test]
-    fn roundtrip_class_hypen() {
-        let expr = e("[-./]");
-        assert_eq!("(?u:[-\\.-/])", expr.to_string());
-
-        let expr = e("(?-u)[-./]");
-        assert_eq!("(?-u:[-\\.-/])", expr.to_string());
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-syntax-0.4.0/src/literals.rs
+++ /dev/null
@@ -1,1502 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::cmp;
-use std::fmt;
-use std::iter;
-use std::mem;
-use std::ops;
-
-use {Expr, CharClass, ClassRange, ByteClass, ByteRange, Repeater};
-
-/// A set of literal byte strings extracted from a regular expression.
-///
-/// Every member of the set is a `Lit`, which is represented by a `Vec<u8>`.
-/// (Notably, it may contain invalid UTF-8.) Every member is said to be either
-/// *complete* or *cut*. A complete literal means that it extends until the
-/// beginning (or end) of the regular expression. In some circumstances, this
-/// can be used to indicate a match in the regular expression.
-///
-/// Note that a key aspect of literal extraction is knowing when to stop. It is
-/// not feasible to blindly extract all literals from a regular expression,
-/// even if there are finitely many. For example, the regular expression
-/// `[0-9]{10}` has `10^10` distinct literals. For this reason, literal
-/// extraction is bounded to some low number by default using heuristics, but
-/// the limits can be tweaked.
-#[derive(Clone, Eq, PartialEq)]
-pub struct Literals {
-    lits: Vec<Lit>,
-    limit_size: usize,
-    limit_class: usize,
-}
-
-/// A single member of a set of literals extracted from a regular expression.
-///
-/// This type has `Deref` and `DerefMut` impls to `Vec<u8>` so that all slice
-/// and `Vec` operations are available.
-#[derive(Clone, Eq, Ord)]
-pub struct Lit {
-    v: Vec<u8>,
-    cut: bool,
-}
-
-impl Literals {
-    /// Returns a new empty set of literals using default limits.
-    pub fn empty() -> Literals {
-        Literals {
-            lits: vec![],
-            limit_size: 250,
-            limit_class: 10,
-        }
-    }
-
-    /// Get the approximate size limit (in bytes) of this set.
-    pub fn limit_size(&self) -> usize {
-        self.limit_size
-    }
-
-    /// Set the approximate size limit (in bytes) of this set.
-    ///
-    /// If extracting a literal would put the set over this limit, then
-    /// extraction stops.
-    ///
-    /// The new limits will only apply to additions to this set. Existing
-    /// members remain unchanged, even if the set exceeds the new limit.
-    pub fn set_limit_size(&mut self, size: usize) -> &mut Literals {
-        self.limit_size = size;
-        self
-    }
-
-    /// Get the character class size limit for this set.
-    pub fn limit_class(&self) -> usize {
-        self.limit_class
-    }
-
-    /// Limits the size of character(or byte) classes considered.
-    ///
-    /// A value of `0` prevents all character classes from being considered.
-    ///
-    /// This limit also applies to case insensitive literals, since each
-    /// character in the case insensitive literal is converted to a class, and
-    /// then case folded.
-    ///
-    /// The new limits will only apply to additions to this set. Existing
-    /// members remain unchanged, even if the set exceeds the new limit.
-    pub fn set_limit_class(&mut self, size: usize) -> &mut Literals {
-        self.limit_class = size;
-        self
-    }
-
-    /// Returns the set of literals as a slice. Its order is unspecified.
-    pub fn literals(&self) -> &[Lit] {
-        &self.lits
-    }
-
-    /// Returns the length of the smallest literal.
-    ///
-    /// Returns None is there are no literals in the set.
-    pub fn min_len(&self) -> Option<usize> {
-        let mut min = None;
-        for lit in &self.lits {
-            match min {
-                None => min = Some(lit.len()),
-                Some(m) if lit.len() < m => min = Some(lit.len()),
-                _ => {}
-            }
-        }
-        min
-    }
-
-    /// Returns true if all members in this set are complete.
-    pub fn all_complete(&self) -> bool {
-        !self.lits.is_empty() && self.lits.iter().all(|l| !l.is_cut())
-    }
-
-    /// Returns true if any member in this set is complete.
-    pub fn any_complete(&self) -> bool {
-        self.lits.iter().any(|lit| !lit.is_cut())
-    }
-
-    /// Returns true if this set contains an empty literal.
-    pub fn contains_empty(&self) -> bool {
-        self.lits.iter().any(|lit| lit.is_empty())
-    }
-
-    /// Returns true if this set is empty or if all of its members is empty.
-    pub fn is_empty(&self) -> bool {
-        self.lits.is_empty() || self.lits.iter().all(|lit| lit.is_empty())
-    }
-
-    /// Returns a new empty set of literals using this set's limits.
-    pub fn to_empty(&self) -> Literals {
-        let mut lits = Literals::empty();
-        lits.set_limit_size(self.limit_size)
-            .set_limit_class(self.limit_class);
-        lits
-    }
-
-    /// Returns the longest common prefix of all members in this set.
-    pub fn longest_common_prefix(&self) -> &[u8] {
-        if self.is_empty() {
-            return &[];
-        }
-        let lit0 = &*self.lits[0];
-        let mut len = lit0.len();
-        for lit in &self.lits[1..] {
-            len = cmp::min(
-                len,
-                lit.iter()
-                   .zip(lit0)
-                   .take_while(|&(a, b)| a == b)
-                   .count());
-        }
-        &self.lits[0][..len]
-    }
-
-    /// Returns the longest common suffix of all members in this set.
-    pub fn longest_common_suffix(&self) -> &[u8] {
-        if self.is_empty() {
-            return &[];
-        }
-        let lit0 = &*self.lits[0];
-        let mut len = lit0.len();
-        for lit in &self.lits[1..] {
-            len = cmp::min(
-                len,
-                lit.iter()
-                   .rev()
-                   .zip(lit0.iter().rev())
-                   .take_while(|&(a, b)| a == b)
-                   .count());
-        }
-        &self.lits[0][self.lits[0].len() - len..]
-    }
-
-    /// Returns a new set of literals with the given number of bytes trimmed
-    /// from the suffix of each literal.
-    ///
-    /// If any literal would be cut out completely by trimming, then None is
-    /// returned.
-    ///
-    /// Any duplicates that are created as a result of this transformation are
-    /// removed.
-    pub fn trim_suffix(&self, num_bytes: usize) -> Option<Literals> {
-        if self.min_len().map(|len| len <= num_bytes).unwrap_or(true) {
-            return None;
-        }
-        let mut new = self.to_empty();
-        for mut lit in self.lits.iter().cloned() {
-            let new_len = lit.len() - num_bytes;
-            lit.truncate(new_len);
-            lit.cut();
-            new.lits.push(lit);
-        }
-        new.lits.sort();
-        new.lits.dedup();
-        Some(new)
-    }
-
-    /// Returns a new set of prefixes of this set of literals that are
-    /// guaranteed to be unambiguous.
-    ///
-    /// Any substring match with a member of the set is returned is guaranteed
-    /// to never overlap with a substring match of another member of the set
-    /// at the same starting position.
-    ///
-    /// Given any two members of the returned set, neither is a substring of
-    /// the other.
-    pub fn unambiguous_prefixes(&self) -> Literals {
-        if self.lits.is_empty() {
-            return self.to_empty();
-        }
-        let mut old: Vec<Lit> = self.lits.iter().cloned().collect();
-        let mut new = self.to_empty();
-    'OUTER:
-        while let Some(mut candidate) = old.pop() {
-            if candidate.is_empty() {
-                continue;
-            }
-            if new.lits.is_empty() {
-                new.lits.push(candidate);
-                continue;
-            }
-            for lit2 in &mut new.lits {
-                if lit2.is_empty() {
-                    continue;
-                }
-                if &candidate == lit2 {
-                    // If the literal is already in the set, then we can
-                    // just drop it. But make sure that cut literals are
-                    // infectious!
-                    candidate.cut = candidate.cut || lit2.cut;
-                    lit2.cut = candidate.cut;
-                    continue 'OUTER;
-                }
-                if candidate.len() < lit2.len() {
-                    if let Some(i) = position(&candidate, &lit2) {
-                        candidate.cut();
-                        let mut lit3 = lit2.clone();
-                        lit3.truncate(i);
-                        lit3.cut();
-                        old.push(lit3);
-                        lit2.clear();
-                    }
-                } else {
-                    if let Some(i) = position(&lit2, &candidate) {
-                        lit2.cut();
-                        let mut new_candidate = candidate.clone();
-                        new_candidate.truncate(i);
-                        new_candidate.cut();
-                        old.push(new_candidate);
-                        candidate.clear();
-                    }
-                }
-                // Oops, the candidate is already represented in the set.
-                if candidate.is_empty() {
-                    continue 'OUTER;
-                }
-            }
-            new.lits.push(candidate);
-        }
-        new.lits.retain(|lit| !lit.is_empty());
-        new.lits.sort();
-        new.lits.dedup();
-        new
-    }
-
-    /// Returns a new set of suffixes of this set of literals that are
-    /// guaranteed to be unambiguous.
-    ///
-    /// Any substring match with a member of the set is returned is guaranteed
-    /// to never overlap with a substring match of another member of the set
-    /// at the same ending position.
-    ///
-    /// Given any two members of the returned set, neither is a substring of
-    /// the other.
-    pub fn unambiguous_suffixes(&self) -> Literals {
-        // This is a touch wasteful...
-        let mut lits = self.clone();
-        lits.reverse();
-        let mut unamb = lits.unambiguous_prefixes();
-        unamb.reverse();
-        unamb
-    }
-
-    /// Unions the prefixes from the given expression to this set.
-    ///
-    /// If prefixes could not be added (for example, this set would exceed its
-    /// size limits or the set of prefixes from `expr` includes the empty
-    /// string), then false is returned.
-    ///
-    /// Note that prefix literals extracted from `expr` are said to be complete
-    /// if and only if the literal extends from the beginning of `expr` to the
-    /// end of `expr`.
-    pub fn union_prefixes(&mut self, expr: &Expr) -> bool {
-        let mut lits = self.to_empty();
-        prefixes(expr, &mut lits);
-        !lits.is_empty() && !lits.contains_empty() && self.union(lits)
-    }
-
-    /// Unions the suffixes from the given expression to this set.
-    ///
-    /// If suffixes could not be added (for example, this set would exceed its
-    /// size limits or the set of suffixes from `expr` includes the empty
-    /// string), then false is returned.
-    ///
-    /// Note that prefix literals extracted from `expr` are said to be complete
-    /// if and only if the literal extends from the end of `expr` to the
-    /// beginning of `expr`.
-    pub fn union_suffixes(&mut self, expr: &Expr) -> bool {
-        let mut lits = self.to_empty();
-        suffixes(expr, &mut lits);
-        lits.reverse();
-        !lits.is_empty() && !lits.contains_empty() && self.union(lits)
-    }
-
-    /// Unions this set with another set.
-    ///
-    /// If the union would cause the set to exceed its limits, then the union
-    /// is skipped and it returns false. Otherwise, if the union succeeds, it
-    /// returns true.
-    pub fn union(&mut self, lits: Literals) -> bool {
-        if self.num_bytes() + lits.num_bytes() > self.limit_size {
-            return false;
-        }
-        if lits.is_empty() {
-            self.lits.push(Lit::empty());
-        } else {
-            self.lits.extend(lits.lits);
-        }
-        true
-    }
-
-    /// Extends this set with another set.
-    ///
-    /// The set of literals is extended via a cross product.
-    ///
-    /// If a cross product would cause this set to exceed its limits, then the
-    /// cross product is skipped and it returns false. Otherwise, if the cross
-    /// product succeeds, it returns true.
-    pub fn cross_product(&mut self, lits: &Literals) -> bool {
-        if lits.is_empty() {
-            return true;
-        }
-        // Check that we make sure we stay in our limits.
-        let mut size_after;
-        if self.is_empty() || !self.any_complete() {
-            size_after = self.num_bytes();
-            for lits_lit in lits.literals() {
-                size_after += lits_lit.len();
-            }
-        } else {
-            size_after = self.lits.iter().fold(0, |accum, lit| {
-                accum + if lit.is_cut() { lit.len() } else { 0 }
-            });
-            for lits_lit in lits.literals() {
-                for self_lit in self.literals() {
-                    if !self_lit.is_cut() {
-                        size_after += self_lit.len() + lits_lit.len();
-                    }
-                }
-            }
-        }
-        if size_after > self.limit_size {
-            return false;
-        }
-
-        let mut base = self.remove_complete();
-        if base.is_empty() {
-            base = vec![Lit::empty()];
-        }
-        for lits_lit in lits.literals() {
-            for mut self_lit in base.clone() {
-                self_lit.extend(&**lits_lit);
-                self_lit.cut = lits_lit.cut;
-                self.lits.push(self_lit);
-            }
-        }
-        true
-    }
-
-    /// Extends each literal in this set with the bytes given.
-    ///
-    /// If the set is empty, then the given literal is added to the set.
-    ///
-    /// If adding any number of bytes to all members of this set causes a limit
-    /// to be exceeded, then no bytes are added and false is returned. If a
-    /// prefix of `bytes` can be fit into this set, then it is used and all
-    /// resulting literals are cut.
-    pub fn cross_add(&mut self, bytes: &[u8]) -> bool {
-        // N.B. This could be implemented by simply calling cross_product with
-        // a literal set containing just `bytes`, but we can be smarter about
-        // taking shorter prefixes of `bytes` if they'll fit.
-        if bytes.is_empty() {
-            return true;
-        }
-        if self.lits.is_empty() {
-            let i = cmp::min(self.limit_size, bytes.len());
-            self.lits.push(Lit::new(bytes[..i].to_owned()));
-            self.lits[0].cut = i < bytes.len();
-            return !self.lits[0].is_cut();
-        }
-        let size = self.num_bytes();
-        if size + self.lits.len() >= self.limit_size {
-            return false;
-        }
-        let mut i = 1;
-        while size + (i * self.lits.len()) <= self.limit_size
-            && i < bytes.len() {
-            i += 1;
-        }
-        for lit in &mut self.lits {
-            if !lit.is_cut() {
-                lit.extend(&bytes[..i]);
-                if i < bytes.len() {
-                    lit.cut();
-                }
-            }
-        }
-        true
-    }
-
-    /// Adds the given literal to this set.
-    ///
-    /// Returns false if adding this literal would cause the class to be too
-    /// big.
-    pub fn add(&mut self, lit: Lit) -> bool {
-        if self.num_bytes() + lit.len() > self.limit_size {
-            return false;
-        }
-        self.lits.push(lit);
-        true
-    }
-
-    /// Extends each literal in this set with the character class given.
-    ///
-    /// Returns false if the character class was too big to add.
-    pub fn add_char_class(&mut self, cls: &CharClass) -> bool {
-        self._add_char_class(cls, false)
-    }
-
-    /// Extends each literal in this set with the character class given,
-    /// writing the bytes of each character in reverse.
-    ///
-    /// Returns false if the character class was too big to add.
-    fn add_char_class_reverse(&mut self, cls: &CharClass) -> bool {
-        self._add_char_class(cls, true)
-    }
-
-    fn _add_char_class(&mut self, cls: &CharClass, reverse: bool) -> bool {
-        use std::char;
-
-        if self.class_exceeds_limits(cls.num_chars()) {
-            return false;
-        }
-        let mut base = self.remove_complete();
-        if base.is_empty() {
-            base = vec![Lit::empty()];
-        }
-        for r in cls {
-            let (s, e) = (r.start as u32, r.end as u32 + 1);
-            for c in (s..e).filter_map(char::from_u32) {
-                for mut lit in base.clone() {
-                    let mut bytes = c.to_string().into_bytes();
-                    if reverse {
-                        bytes.reverse();
-                    }
-                    lit.extend(&bytes);
-                    self.lits.push(lit);
-                }
-            }
-        }
-        true
-    }
-
-    /// Extends each literal in this set with the byte class given.
-    ///
-    /// Returns false if the byte class was too big to add.
-    pub fn add_byte_class(&mut self, cls: &ByteClass) -> bool {
-        if self.class_exceeds_limits(cls.num_bytes()) {
-            return false;
-        }
-        let mut base = self.remove_complete();
-        if base.is_empty() {
-            base = vec![Lit::empty()];
-        }
-        for r in cls {
-            let (s, e) = (r.start as u32, r.end as u32 + 1);
-            for b in (s..e).map(|b| b as u8) {
-                for mut lit in base.clone() {
-                    lit.push(b);
-                    self.lits.push(lit);
-                }
-            }
-        }
-        true
-    }
-
-    /// Cuts every member of this set. When a member is cut, it can never
-    /// be extended.
-    pub fn cut(&mut self) {
-        for lit in &mut self.lits {
-            lit.cut();
-        }
-    }
-
-    /// Reverses all members in place.
-    pub fn reverse(&mut self) {
-        for lit in &mut self.lits {
-            lit.reverse();
-        }
-    }
-
-    /// Clears this set of all members.
-    pub fn clear(&mut self) {
-        self.lits.clear();
-    }
-
-    /// Pops all complete literals out of this set.
-    fn remove_complete(&mut self) -> Vec<Lit> {
-        let mut base = vec![];
-        for lit in mem::replace(&mut self.lits, vec![]) {
-            if lit.is_cut() {
-                self.lits.push(lit);
-            } else {
-                base.push(lit);
-            }
-        }
-        base
-    }
-
-    /// Returns the total number of bytes in this set.
-    fn num_bytes(&self) -> usize {
-        self.lits.iter().fold(0, |accum, lit| accum + lit.len())
-    }
-
-    /// Returns true if a character class with the given size would cause this
-    /// set to exceed its limits.
-    ///
-    /// The size given should correspond to the number of items in the class.
-    fn class_exceeds_limits(&self, size: usize) -> bool {
-        if size > self.limit_class {
-            return true;
-        }
-        // This is an approximation since codepoints in a char class can encode
-        // to 1-4 bytes.
-        let new_byte_count =
-            if self.lits.is_empty() {
-                size
-            } else {
-                self.lits
-                    .iter()
-                    .fold(0, |accum, lit| {
-                        accum + if lit.is_cut() {
-                            // If the literal is cut, then we'll never add
-                            // anything to it, so don't count it.
-                            0
-                        } else {
-                            (lit.len() + 1) * size
-                        }
-                    })
-            };
-        new_byte_count > self.limit_size
-    }
-}
-
-fn prefixes(expr: &Expr, lits: &mut Literals) {
-    use Expr::*;
-    match *expr {
-        Literal { ref chars, casei: false } => {
-            let s: String = chars.iter().cloned().collect();
-            lits.cross_add(s.as_bytes());
-        }
-        Literal { ref chars, casei: true } => {
-            for &c in chars {
-                let cls = CharClass::new(vec![
-                    ClassRange { start: c, end: c },
-                ]).case_fold();
-                if !lits.add_char_class(&cls) {
-                    lits.cut();
-                    return;
-                }
-            }
-        }
-        LiteralBytes { ref bytes, casei: false } => {
-            lits.cross_add(bytes);
-        }
-        LiteralBytes { ref bytes, casei: true } => {
-            for &b in bytes {
-                let cls = ByteClass::new(vec![
-                    ByteRange { start: b, end: b },
-                ]).case_fold();
-                if !lits.add_byte_class(&cls) {
-                    lits.cut();
-                    return;
-                }
-            }
-        }
-        Class(ref cls) => {
-            if !lits.add_char_class(cls) {
-                lits.cut();
-            }
-        }
-        ClassBytes(ref cls) => {
-            if !lits.add_byte_class(cls) {
-                lits.cut();
-            }
-        }
-        Group { ref e, .. } => {
-            prefixes(&**e, lits);
-        }
-        Repeat { ref e, r: Repeater::ZeroOrOne, .. } => {
-            repeat_zero_or_one_literals(&**e, lits, prefixes);
-        }
-        Repeat { ref e, r: Repeater::ZeroOrMore, .. } => {
-            repeat_zero_or_more_literals(&**e, lits, prefixes);
-        }
-        Repeat { ref e, r: Repeater::OneOrMore, .. } => {
-            repeat_one_or_more_literals(&**e, lits, prefixes);
-        }
-        Repeat { ref e, r: Repeater::Range { min, max }, greedy } => {
-            repeat_range_literals(&**e, min, max, greedy, lits, prefixes);
-        }
-        Concat(ref es) if es.is_empty() => {}
-        Concat(ref es) if es.len() == 1 => prefixes(&es[0], lits),
-        Concat(ref es) => {
-            for e in es {
-                if let StartText = *e {
-                    if !lits.is_empty() {
-                        lits.cut();
-                        break;
-                    }
-                    lits.add(Lit::empty());
-                    continue;
-                }
-                let mut lits2 = lits.to_empty();
-                prefixes(e, &mut lits2);
-                if !lits.cross_product(&lits2) || !lits2.any_complete() {
-                    // If this expression couldn't yield any literal that
-                    // could be extended, then we need to quit. Since we're
-                    // short-circuiting, we also need to freeze every member.
-                    lits.cut();
-                    break;
-                }
-            }
-        }
-        Alternate(ref es) => {
-            alternate_literals(es, lits, prefixes);
-        }
-        _ => lits.cut(),
-    }
-}
-
-fn suffixes(expr: &Expr, lits: &mut Literals) {
-    use Expr::*;
-    match *expr {
-        Literal { ref chars, casei: false } => {
-            let s: String = chars.iter().cloned().collect();
-            let mut bytes = s.into_bytes();
-            bytes.reverse();
-            lits.cross_add(&bytes);
-        }
-        Literal { ref chars, casei: true } => {
-            for &c in chars.iter().rev() {
-                let cls = CharClass::new(vec![
-                    ClassRange { start: c, end: c },
-                ]).case_fold();
-                if !lits.add_char_class_reverse(&cls) {
-                    lits.cut();
-                    return;
-                }
-            }
-        }
-        LiteralBytes { ref bytes, casei: false } => {
-            let b: Vec<u8> = bytes.iter().rev().cloned().collect();
-            lits.cross_add(&b);
-        }
-        LiteralBytes { ref bytes, casei: true } => {
-            for &b in bytes.iter().rev() {
-                let cls = ByteClass::new(vec![
-                    ByteRange { start: b, end: b },
-                ]).case_fold();
-                if !lits.add_byte_class(&cls) {
-                    lits.cut();
-                    return;
-                }
-            }
-        }
-        Class(ref cls) => {
-            if !lits.add_char_class_reverse(cls) {
-                lits.cut();
-            }
-        }
-        ClassBytes(ref cls) => {
-            if !lits.add_byte_class(cls) {
-                lits.cut();
-            }
-        }
-        Group { ref e, .. } => {
-            suffixes(&**e, lits);
-        }
-        Repeat { ref e, r: Repeater::ZeroOrOne, .. } => {
-            repeat_zero_or_one_literals(&**e, lits, suffixes);
-        }
-        Repeat { ref e, r: Repeater::ZeroOrMore, .. } => {
-            repeat_zero_or_more_literals(&**e, lits, suffixes);
-        }
-        Repeat { ref e, r: Repeater::OneOrMore, .. } => {
-            repeat_one_or_more_literals(&**e, lits, suffixes);
-        }
-        Repeat { ref e, r: Repeater::Range { min, max }, greedy } => {
-            repeat_range_literals(&**e, min, max, greedy, lits, suffixes);
-        }
-        Concat(ref es) if es.is_empty() => {}
-        Concat(ref es) if es.len() == 1 => suffixes(&es[0], lits),
-        Concat(ref es) => {
-            for e in es.iter().rev() {
-                if let EndText = *e {
-                    if !lits.is_empty() {
-                        lits.cut();
-                        break;
-                    }
-                    lits.add(Lit::empty());
-                    continue;
-                }
-                let mut lits2 = lits.to_empty();
-                suffixes(e, &mut lits2);
-                if !lits.cross_product(&lits2) || !lits2.any_complete() {
-                    // If this expression couldn't yield any literal that
-                    // could be extended, then we need to quit. Since we're
-                    // short-circuiting, we also need to freeze every member.
-                    lits.cut();
-                    break;
-                }
-            }
-        }
-        Alternate(ref es) => {
-            alternate_literals(es, lits, suffixes);
-        }
-        _ => lits.cut(),
-    }
-}
-
-fn repeat_zero_or_one_literals<F: FnMut(&Expr, &mut Literals)>(
-    e: &Expr,
-    lits: &mut Literals,
-    mut f: F,
-) {
-    let (mut lits2, mut lits3) = (lits.clone(), lits.to_empty());
-    lits3.set_limit_size(lits.limit_size() / 2);
-    f(e, &mut lits3);
-
-    if lits3.is_empty() || !lits2.cross_product(&lits3) {
-        lits.cut();
-        return;
-    }
-    lits2.add(Lit::empty());
-    if !lits.union(lits2) {
-        lits.cut();
-    }
-}
-
-fn repeat_zero_or_more_literals<F: FnMut(&Expr, &mut Literals)>(
-    e: &Expr,
-    lits: &mut Literals,
-    mut f: F,
-) {
-    let (mut lits2, mut lits3) = (lits.clone(), lits.to_empty());
-    lits3.set_limit_size(lits.limit_size() / 2);
-    f(e, &mut lits3);
-
-    if lits3.is_empty() || !lits2.cross_product(&lits3) {
-        lits.cut();
-        return;
-    }
-    lits2.cut();
-    lits2.add(Lit::empty());
-    if !lits.union(lits2) {
-        lits.cut();
-    }
-}
-
-fn repeat_one_or_more_literals<F: FnMut(&Expr, &mut Literals)>(
-    e: &Expr,
-    lits: &mut Literals,
-    mut f: F,
-) {
-    f(e, lits);
-    lits.cut();
-}
-
-fn repeat_range_literals<F: FnMut(&Expr, &mut Literals)>(
-    e: &Expr,
-    min: u32,
-    max: Option<u32>,
-    greedy: bool,
-    lits: &mut Literals,
-    mut f: F,
-) {
-    use Expr::*;
-
-    if min == 0 {
-        // This is a bit conservative. If `max` is set, then we could
-        // treat this as a finite set of alternations. For now, we
-        // just treat it as `e*`.
-        f(&Repeat {
-            e: Box::new(e.clone()),
-            r: Repeater::ZeroOrMore,
-            greedy: greedy,
-        }, lits);
-    } else {
-        if min > 0 {
-            let n = cmp::min(lits.limit_size, min as usize);
-            let es = iter::repeat(e.clone()).take(n).collect();
-            f(&Concat(es), lits);
-            if n < min as usize {
-                lits.cut();
-            }
-        }
-        if max.map_or(true, |max| min < max) {
-            lits.cut();
-        }
-    }
-}
-
-fn alternate_literals<F: FnMut(&Expr, &mut Literals)>(
-    es: &[Expr],
-    lits: &mut Literals,
-    mut f: F,
-) {
-    let mut lits2 = lits.to_empty();
-    for e in es {
-        let mut lits3 = lits.to_empty();
-        lits3.set_limit_size(lits.limit_size() / 5);
-        f(e, &mut lits3);
-        if lits3.is_empty() || !lits2.union(lits3) {
-            // If we couldn't find suffixes for *any* of the
-            // alternates, then the entire alternation has to be thrown
-            // away and any existing members must be frozen. Similarly,
-            // if the union couldn't complete, stop and freeze.
-            lits.cut();
-            return;
-        }
-    }
-    if !lits.cross_product(&lits2) {
-        lits.cut();
-    }
-}
-
-impl fmt::Debug for Literals {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.debug_struct("Literals")
-         .field("lits", &self.lits)
-         .field("limit_size", &self.limit_size)
-         .field("limit_class", &self.limit_class)
-         .finish()
-    }
-}
-
-impl Lit {
-    /// Returns a new complete literal with the bytes given.
-    pub fn new(bytes: Vec<u8>) -> Lit {
-        Lit { v: bytes, cut: false }
-    }
-
-    /// Returns a new complete empty literal.
-    pub fn empty() -> Lit {
-        Lit { v: vec![], cut: false }
-    }
-
-    /// Returns true if this literal was "cut."
-    pub fn is_cut(&self) -> bool {
-        self.cut
-    }
-
-    /// Cuts this literal.
-    pub fn cut(&mut self) {
-        self.cut = true;
-    }
-}
-
-impl PartialEq for Lit {
-    fn eq(&self, other: &Lit) -> bool {
-        self.v == other.v
-    }
-}
-
-impl PartialOrd for Lit {
-    fn partial_cmp(&self, other: &Lit) -> Option<cmp::Ordering> {
-        self.v.partial_cmp(&other.v)
-    }
-}
-
-impl fmt::Debug for Lit {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        if self.is_cut() {
-            write!(f, "Cut({})", escape_unicode(&self.v))
-        } else {
-            write!(f, "Complete({})", escape_unicode(&self.v))
-        }
-    }
-}
-
-impl AsRef<[u8]> for Lit {
-    fn as_ref(&self) -> &[u8] { &self.v }
-}
-
-impl ops::Deref for Lit {
-    type Target = Vec<u8>;
-    fn deref(&self) -> &Vec<u8> { &self.v }
-}
-
-impl ops::DerefMut for Lit {
-    fn deref_mut(&mut self) -> &mut Vec<u8> { &mut self.v }
-}
-
-fn position(needle: &[u8], mut haystack: &[u8]) -> Option<usize> {
-    let mut i = 0;
-    while haystack.len() >= needle.len() {
-        if needle == &haystack[..needle.len()] {
-            return Some(i);
-        }
-        i += 1;
-        haystack = &haystack[1..];
-    }
-    None
-}
-
-fn escape_unicode(bytes: &[u8]) -> String {
-    let show = match ::std::str::from_utf8(bytes) {
-        Ok(v) => v.to_string(),
-        Err(_) => escape_bytes(bytes),
-    };
-    let mut space_escaped = String::new();
-    for c in show.chars() {
-        if c.is_whitespace() {
-            let escaped = if c as u32 <= 0x7F {
-                escape_byte(c as u8)
-            } else {
-                if c as u32 <= 0xFFFF {
-                    format!(r"\u{{{:04x}}}", c as u32)
-                } else {
-                    format!(r"\U{{{:08x}}}", c as u32)
-                }
-            };
-            space_escaped.push_str(&escaped);
-        } else {
-            space_escaped.push(c);
-        }
-    }
-    space_escaped
-}
-
-fn escape_bytes(bytes: &[u8]) -> String {
-    let mut s = String::new();
-    for &b in bytes {
-        s.push_str(&escape_byte(b));
-    }
-    s
-}
-
-fn escape_byte(byte: u8) -> String {
-    use std::ascii::escape_default;
-
-    let escaped: Vec<u8> = escape_default(byte).collect();
-    String::from_utf8_lossy(&escaped).into_owned()
-}
-
-#[cfg(test)]
-mod tests {
-    use std::fmt;
-
-    use {Expr, ExprBuilder};
-    use super::{Literals, Lit, escape_bytes};
-
-    // To make test failures easier to read.
-    #[derive(Debug, Eq, PartialEq)]
-    struct Bytes(Vec<ULit>);
-    #[derive(Debug, Eq, PartialEq)]
-    struct Unicode(Vec<ULit>);
-
-    fn escape_lits(blits: &[Lit]) -> Vec<ULit> {
-        let mut ulits = vec![];
-        for blit in blits {
-            ulits.push(ULit { v: escape_bytes(&blit), cut: blit.is_cut() });
-        }
-        ulits
-    }
-
-    fn create_lits<I: IntoIterator<Item=Lit>>(it: I) -> Literals {
-        Literals {
-            lits: it.into_iter().collect(),
-            limit_size: 0,
-            limit_class: 0,
-        }
-    }
-
-    // Needs to be pub for 1.3?
-    #[derive(Clone, Eq, PartialEq)]
-    pub struct ULit {
-        v: String,
-        cut: bool,
-    }
-
-    impl ULit {
-        fn is_cut(&self) -> bool { self.cut }
-    }
-
-    impl fmt::Debug for ULit {
-        fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-            if self.is_cut() {
-                write!(f, "Cut({})", self.v)
-            } else {
-                write!(f, "Complete({})", self.v)
-            }
-        }
-    }
-
-    impl PartialEq<Lit> for ULit {
-        fn eq(&self, other: &Lit) -> bool {
-            self.v.as_bytes() == &*other.v && self.is_cut() == other.is_cut()
-        }
-    }
-
-    impl PartialEq<ULit> for Lit {
-        fn eq(&self, other: &ULit) -> bool {
-            &*self.v == other.v.as_bytes() && self.is_cut() == other.is_cut()
-        }
-    }
-
-    #[allow(non_snake_case)]
-    fn C(s: &'static str) -> ULit { ULit { v: s.to_owned(), cut: true } }
-    #[allow(non_snake_case)]
-    fn M(s: &'static str) -> ULit { ULit { v: s.to_owned(), cut: false } }
-
-    fn prefixes(lits: &mut Literals, expr: &Expr) {
-        lits.union_prefixes(expr);
-    }
-
-    fn suffixes(lits: &mut Literals, expr: &Expr) {
-        lits.union_suffixes(expr);
-    }
-
-    macro_rules! assert_lit_eq {
-        ($which:ident, $got_lits:expr, $($expected_lit:expr),*) => {{
-            let expected: Vec<ULit> = vec![$($expected_lit),*];
-            let lits = $got_lits;
-            assert_eq!(
-                $which(expected.clone()),
-                $which(escape_lits(lits.literals())));
-            assert_eq!(
-                !expected.is_empty() && expected.iter().all(|l| !l.is_cut()),
-                lits.all_complete());
-            assert_eq!(
-                expected.iter().any(|l| !l.is_cut()),
-                lits.any_complete());
-        }};
-    }
-
-    macro_rules! test_lit {
-        ($name:ident, $which:ident, $re:expr) => {
-            test_lit!($name, $which, $re,);
-        };
-        ($name:ident, $which:ident, $re:expr, $($lit:expr),*) => {
-            #[test]
-            fn $name() {
-                let expr = Expr::parse($re).unwrap();
-                let lits = expr.$which();
-                assert_lit_eq!(Unicode, lits, $($lit),*);
-
-                let expr = ExprBuilder::new().allow_bytes(true).unicode(false)
-                                       .parse($re).unwrap();
-                let lits = expr.$which();
-                assert_lit_eq!(Bytes, lits, $($lit),*);
-            }
-        };
-    }
-
-    // ************************************************************************
-    // Tests for prefix literal extraction.
-    // ************************************************************************
-
-    // Elementary tests.
-    test_lit!(pfx_one_lit1, prefixes, "a", M("a"));
-    test_lit!(pfx_one_lit2, prefixes, "abc", M("abc"));
-    test_lit!(pfx_one_lit3, prefixes, "(?u)☃", M("\\xe2\\x98\\x83"));
-    test_lit!(pfx_one_lit4, prefixes, "(?ui)☃", M("\\xe2\\x98\\x83"));
-    test_lit!(pfx_class1, prefixes, "[1-4]",
-              M("1"), M("2"), M("3"), M("4"));
-    test_lit!(pfx_class2, prefixes, "(?u)[☃Ⅰ]",
-              M("\\xe2\\x85\\xa0"), M("\\xe2\\x98\\x83"));
-    test_lit!(pfx_class3, prefixes, "(?ui)[☃Ⅰ]",
-              M("\\xe2\\x85\\xa0"), M("\\xe2\\x85\\xb0"),
-              M("\\xe2\\x98\\x83"));
-    test_lit!(pfx_one_lit_casei1, prefixes, "(?i)a",
-              M("A"), M("a"));
-    test_lit!(pfx_one_lit_casei2, prefixes, "(?i)abc",
-              M("ABC"), M("aBC"), M("AbC"), M("abC"),
-              M("ABc"), M("aBc"), M("Abc"), M("abc"));
-    test_lit!(pfx_group1, prefixes, "(a)", M("a"));
-    test_lit!(pfx_rep_zero_or_one1, prefixes, "a?");
-    test_lit!(pfx_rep_zero_or_one2, prefixes, "(?:abc)?");
-    test_lit!(pfx_rep_zero_or_more1, prefixes, "a*");
-    test_lit!(pfx_rep_zero_or_more2, prefixes, "(?:abc)*");
-    test_lit!(pfx_rep_one_or_more1, prefixes, "a+", C("a"));
-    test_lit!(pfx_rep_one_or_more2, prefixes, "(?:abc)+", C("abc"));
-    test_lit!(pfx_rep_nested_one_or_more, prefixes, "(?:a+)+", C("a"));
-    test_lit!(pfx_rep_range1, prefixes, "a{0}");
-    test_lit!(pfx_rep_range2, prefixes, "a{0,}");
-    test_lit!(pfx_rep_range3, prefixes, "a{0,1}");
-    test_lit!(pfx_rep_range4, prefixes, "a{1}", M("a"));
-    test_lit!(pfx_rep_range5, prefixes, "a{2}", M("aa"));
-    test_lit!(pfx_rep_range6, prefixes, "a{1,2}", C("a"));
-    test_lit!(pfx_rep_range7, prefixes, "a{2,3}", C("aa"));
-
-    // Test regexes with concatenations.
-    test_lit!(pfx_cat1, prefixes, "(?:a)(?:b)", M("ab"));
-    test_lit!(pfx_cat2, prefixes, "[ab]z", M("az"), M("bz"));
-    test_lit!(pfx_cat3, prefixes, "(?i)[ab]z",
-              M("AZ"), M("BZ"), M("aZ"), M("bZ"),
-              M("Az"), M("Bz"), M("az"), M("bz"));
-    test_lit!(pfx_cat4, prefixes, "[ab][yz]",
-              M("ay"), M("by"), M("az"), M("bz"));
-    test_lit!(pfx_cat5, prefixes, "a*b", C("a"), M("b"));
-    test_lit!(pfx_cat6, prefixes, "a*b*c", C("a"), C("b"), M("c"));
-    test_lit!(pfx_cat7, prefixes, "a*b*c+", C("a"), C("b"), C("c"));
-    test_lit!(pfx_cat8, prefixes, "a*b+c", C("a"), C("b"));
-    test_lit!(pfx_cat9, prefixes, "a*b+c*", C("a"), C("b"));
-    test_lit!(pfx_cat10, prefixes, "ab*", C("ab"), M("a"));
-    test_lit!(pfx_cat11, prefixes, "ab*c", C("ab"), M("ac"));
-    test_lit!(pfx_cat12, prefixes, "ab+", C("ab"));
-    test_lit!(pfx_cat13, prefixes, "ab+c", C("ab"));
-    test_lit!(pfx_cat14, prefixes, "a^", C("a"));
-    test_lit!(pfx_cat15, prefixes, "$a");
-    test_lit!(pfx_cat16, prefixes, r"ab*c", C("ab"), M("ac"));
-    test_lit!(pfx_cat17, prefixes, r"ab+c", C("ab"));
-    test_lit!(pfx_cat18, prefixes, r"z*azb", C("z"), M("azb"));
-    test_lit!(pfx_cat19, prefixes, "a.z", C("a"));
-
-    // Test regexes with alternations.
-    test_lit!(pfx_alt1, prefixes, "a|b", M("a"), M("b"));
-    test_lit!(pfx_alt2, prefixes, "[1-3]|b", M("1"), M("2"), M("3"), M("b"));
-    test_lit!(pfx_alt3, prefixes, "y(?:a|b)z", M("yaz"), M("ybz"));
-    test_lit!(pfx_alt4, prefixes, "a|b*");
-    test_lit!(pfx_alt5, prefixes, "a|b+", M("a"), C("b"));
-    test_lit!(pfx_alt6, prefixes, "a|(?:b|c*)");
-    test_lit!(pfx_alt7, prefixes, "(a|b)*c|(a|ab)*c",
-              C("a"), C("b"), M("c"), C("a"), C("ab"), M("c"));
-    test_lit!(pfx_alt8, prefixes, "a*b|c", C("a"), M("b"), M("c"));
-
-    // Test regexes with empty assertions.
-    test_lit!(pfx_empty1, prefixes, "^a", M("a"));
-    test_lit!(pfx_empty2, prefixes, "^abc", M("abc"));
-    test_lit!(pfx_empty3, prefixes, "(?:^abc)|(?:^z)", M("abc"), M("z"));
-
-    // Make sure some curious regexes have no prefixes.
-    test_lit!(pfx_nothing1, prefixes, ".");
-    test_lit!(pfx_nothing2, prefixes, "(?s).");
-    test_lit!(pfx_nothing3, prefixes, "^");
-    test_lit!(pfx_nothing4, prefixes, "$");
-    test_lit!(pfx_nothing6, prefixes, "(?m)$");
-    test_lit!(pfx_nothing7, prefixes, r"\b");
-    test_lit!(pfx_nothing8, prefixes, r"\B");
-
-    // Test a few regexes that defeat any prefix literal detection.
-    test_lit!(pfx_defeated1, prefixes, ".a");
-    test_lit!(pfx_defeated2, prefixes, "(?s).a");
-    test_lit!(pfx_defeated3, prefixes, "a*b*c*");
-    test_lit!(pfx_defeated4, prefixes, "a|.");
-    test_lit!(pfx_defeated5, prefixes, ".|a");
-    test_lit!(pfx_defeated6, prefixes, "a|^");
-    test_lit!(pfx_defeated7, prefixes, ".(?:a(?:b)(?:c))");
-    test_lit!(pfx_defeated8, prefixes, "$a");
-    test_lit!(pfx_defeated9, prefixes, "(?m)$a");
-    test_lit!(pfx_defeated10, prefixes, r"\ba");
-    test_lit!(pfx_defeated11, prefixes, r"\Ba");
-    test_lit!(pfx_defeated12, prefixes, "^*a");
-    test_lit!(pfx_defeated13, prefixes, "^+a");
-
-    test_lit!(
-        pfx_crazy1,
-        prefixes,
-        r"M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]",
-        C("Mo\\'am"), C("Mu\\'am"), C("Moam"), C("Muam"));
-
-    // ************************************************************************
-    // Tests for quiting prefix literal search.
-    // ************************************************************************
-
-    macro_rules! test_exhausted {
-        ($name:ident, $which:ident, $re:expr) => {
-            test_exhausted!($name, $which, $re,);
-        };
-        ($name:ident, $which:ident, $re:expr, $($lit:expr),*) => {
-            #[test]
-            fn $name() {
-                let expr = Expr::parse($re).unwrap();
-                let mut lits = Literals::empty();
-                lits.set_limit_size(20).set_limit_class(10);
-                $which(&mut lits, &expr);
-                assert_lit_eq!(Unicode, lits, $($lit),*);
-
-                let expr = ExprBuilder::new().allow_bytes(true).unicode(false)
-                                       .parse($re).unwrap();
-                let mut lits = Literals::empty();
-                lits.set_limit_size(20).set_limit_class(10);
-                $which(&mut lits, &expr);
-                assert_lit_eq!(Bytes, lits, $($lit),*);
-            }
-        };
-    }
-
-    // These test use a much lower limit than the default so that we can
-    // write test cases of reasonable size.
-    test_exhausted!(pfx_exhausted1, prefixes, "[a-z]");
-    test_exhausted!(pfx_exhausted2, prefixes, "[a-z]*A");
-    test_exhausted!(pfx_exhausted3, prefixes, "A[a-z]Z", C("A"));
-    test_exhausted!(pfx_exhausted4, prefixes, "(?i)foobar",
-                    C("FO"), C("fO"), C("Fo"), C("fo"));
-    test_exhausted!(pfx_exhausted5, prefixes, "(?:ab){100}",
-                    C("abababababababababab"));
-    test_exhausted!(pfx_exhausted6, prefixes, "(?:(?:ab){100})*cd",
-                    C("ababababab"), M("cd"));
-    test_exhausted!(pfx_exhausted7, prefixes, "z(?:(?:ab){100})*cd",
-                    C("zababababab"), M("zcd"));
-    test_exhausted!(pfx_exhausted8, prefixes, "aaaaaaaaaaaaaaaaaaaaz",
-                    C("aaaaaaaaaaaaaaaaaaaa"));
-
-    // ************************************************************************
-    // Tests for suffix literal extraction.
-    // ************************************************************************
-
-    // Elementary tests.
-    test_lit!(sfx_one_lit1, suffixes, "a", M("a"));
-    test_lit!(sfx_one_lit2, suffixes, "abc", M("abc"));
-    test_lit!(sfx_one_lit3, suffixes, "(?u)☃", M("\\xe2\\x98\\x83"));
-    test_lit!(sfx_one_lit4, suffixes, "(?ui)☃", M("\\xe2\\x98\\x83"));
-    test_lit!(sfx_class1, suffixes, "[1-4]",
-              M("1"), M("2"), M("3"), M("4"));
-    test_lit!(sfx_class2, suffixes, "(?u)[☃Ⅰ]",
-              M("\\xe2\\x85\\xa0"), M("\\xe2\\x98\\x83"));
-    test_lit!(sfx_class3, suffixes, "(?ui)[☃Ⅰ]",
-              M("\\xe2\\x85\\xa0"), M("\\xe2\\x85\\xb0"),
-              M("\\xe2\\x98\\x83"));
-    test_lit!(sfx_one_lit_casei1, suffixes, "(?i)a",
-              M("A"), M("a"));
-    test_lit!(sfx_one_lit_casei2, suffixes, "(?i)abc",
-              M("ABC"), M("ABc"), M("AbC"), M("Abc"),
-              M("aBC"), M("aBc"), M("abC"), M("abc"));
-    test_lit!(sfx_group1, suffixes, "(a)", M("a"));
-    test_lit!(sfx_rep_zero_or_one1, suffixes, "a?");
-    test_lit!(sfx_rep_zero_or_one2, suffixes, "(?:abc)?");
-    test_lit!(sfx_rep_zero_or_more1, suffixes, "a*");
-    test_lit!(sfx_rep_zero_or_more2, suffixes, "(?:abc)*");
-    test_lit!(sfx_rep_one_or_more1, suffixes, "a+", C("a"));
-    test_lit!(sfx_rep_one_or_more2, suffixes, "(?:abc)+", C("abc"));
-    test_lit!(sfx_rep_nested_one_or_more, suffixes, "(?:a+)+", C("a"));
-    test_lit!(sfx_rep_range1, suffixes, "a{0}");
-    test_lit!(sfx_rep_range2, suffixes, "a{0,}");
-    test_lit!(sfx_rep_range3, suffixes, "a{0,1}");
-    test_lit!(sfx_rep_range4, suffixes, "a{1}", M("a"));
-    test_lit!(sfx_rep_range5, suffixes, "a{2}", M("aa"));
-    test_lit!(sfx_rep_range6, suffixes, "a{1,2}", C("a"));
-    test_lit!(sfx_rep_range7, suffixes, "a{2,3}", C("aa"));
-
-    // Test regexes with concatenations.
-    test_lit!(sfx_cat1, suffixes, "(?:a)(?:b)", M("ab"));
-    test_lit!(sfx_cat2, suffixes, "[ab]z", M("az"), M("bz"));
-    test_lit!(sfx_cat3, suffixes, "(?i)[ab]z",
-              M("AZ"), M("Az"), M("BZ"), M("Bz"),
-              M("aZ"), M("az"), M("bZ"), M("bz"));
-    test_lit!(sfx_cat4, suffixes, "[ab][yz]",
-              M("ay"), M("az"), M("by"), M("bz"));
-    test_lit!(sfx_cat5, suffixes, "a*b", C("ab"), M("b"));
-    test_lit!(sfx_cat6, suffixes, "a*b*c", C("bc"), C("ac"), M("c"));
-    test_lit!(sfx_cat7, suffixes, "a*b*c+", C("c"));
-    test_lit!(sfx_cat8, suffixes, "a*b+c", C("bc"));
-    test_lit!(sfx_cat9, suffixes, "a*b+c*", C("c"), C("b"));
-    test_lit!(sfx_cat10, suffixes, "ab*", C("b"), M("a"));
-    test_lit!(sfx_cat11, suffixes, "ab*c", C("bc"), M("ac"));
-    test_lit!(sfx_cat12, suffixes, "ab+", C("b"));
-    test_lit!(sfx_cat13, suffixes, "ab+c", C("bc"));
-    test_lit!(sfx_cat14, suffixes, "a^");
-    test_lit!(sfx_cat15, suffixes, "$a", C("a"));
-    test_lit!(sfx_cat16, suffixes, r"ab*c", C("bc"), M("ac"));
-    test_lit!(sfx_cat17, suffixes, r"ab+c", C("bc"));
-    test_lit!(sfx_cat18, suffixes, r"z*azb", C("zazb"), M("azb"));
-    test_lit!(sfx_cat19, suffixes, "a.z", C("z"));
-
-    // Test regexes with alternations.
-    test_lit!(sfx_alt1, suffixes, "a|b", M("a"), M("b"));
-    test_lit!(sfx_alt2, suffixes, "[1-3]|b", M("1"), M("2"), M("3"), M("b"));
-    test_lit!(sfx_alt3, suffixes, "y(?:a|b)z", M("yaz"), M("ybz"));
-    test_lit!(sfx_alt4, suffixes, "a|b*");
-    test_lit!(sfx_alt5, suffixes, "a|b+", M("a"), C("b"));
-    test_lit!(sfx_alt6, suffixes, "a|(?:b|c*)");
-    test_lit!(sfx_alt7, suffixes, "(a|b)*c|(a|ab)*c",
-              C("ac"), C("bc"), M("c"), C("ac"), C("abc"), M("c"));
-    test_lit!(sfx_alt8, suffixes, "a*b|c", C("ab"), M("b"), M("c"));
-
-    // Test regexes with empty assertions.
-    test_lit!(sfx_empty1, suffixes, "a$", M("a"));
-
-    // Make sure some curious regexes have no suffixes.
-    test_lit!(sfx_nothing1, suffixes, ".");
-    test_lit!(sfx_nothing2, suffixes, "(?s).");
-    test_lit!(sfx_nothing3, suffixes, "^");
-    test_lit!(sfx_nothing4, suffixes, "$");
-    test_lit!(sfx_nothing6, suffixes, "(?m)$");
-    test_lit!(sfx_nothing7, suffixes, r"\b");
-    test_lit!(sfx_nothing8, suffixes, r"\B");
-
-    // Test a few regexes that defeat any suffix literal detection.
-    test_lit!(sfx_defeated1, suffixes, "a.");
-    test_lit!(sfx_defeated2, suffixes, "(?s)a.");
-    test_lit!(sfx_defeated3, suffixes, "a*b*c*");
-    test_lit!(sfx_defeated4, suffixes, "a|.");
-    test_lit!(sfx_defeated5, suffixes, ".|a");
-    test_lit!(sfx_defeated6, suffixes, "a|^");
-    test_lit!(sfx_defeated7, suffixes, "(?:a(?:b)(?:c)).");
-    test_lit!(sfx_defeated8, suffixes, "a^");
-    test_lit!(sfx_defeated9, suffixes, "(?m)a$");
-    test_lit!(sfx_defeated10, suffixes, r"a\b");
-    test_lit!(sfx_defeated11, suffixes, r"a\B");
-    test_lit!(sfx_defeated12, suffixes, "a^*");
-    test_lit!(sfx_defeated13, suffixes, "a^+");
-
-    // These test use a much lower limit than the default so that we can
-    // write test cases of reasonable size.
-    test_exhausted!(sfx_exhausted1, suffixes, "[a-z]");
-    test_exhausted!(sfx_exhausted2, suffixes, "A[a-z]*");
-    test_exhausted!(sfx_exhausted3, suffixes, "A[a-z]Z", C("Z"));
-    test_exhausted!(sfx_exhausted4, suffixes, "(?i)foobar",
-                    C("AR"), C("Ar"), C("aR"), C("ar"));
-    test_exhausted!(sfx_exhausted5, suffixes, "(?:ab){100}",
-                    C("abababababababababab"));
-    test_exhausted!(sfx_exhausted6, suffixes, "cd(?:(?:ab){100})*",
-                    C("ababababab"), M("cd"));
-    test_exhausted!(sfx_exhausted7, suffixes, "cd(?:(?:ab){100})*z",
-                    C("abababababz"), M("cdz"));
-    test_exhausted!(sfx_exhausted8, suffixes, "zaaaaaaaaaaaaaaaaaaaa",
-                    C("aaaaaaaaaaaaaaaaaaaa"));
-
-    // ************************************************************************
-    // Tests for generating unambiguous literal sets.
-    // ************************************************************************
-
-    macro_rules! test_unamb {
-        ($name:ident, $given:expr, $expected:expr) => {
-            #[test]
-            fn $name() {
-                let given: Vec<Lit> =
-                    $given
-                    .into_iter()
-                    .map(|ul| {
-                        let cut = ul.is_cut();
-                        Lit { v: ul.v.into_bytes(), cut: cut }
-                    })
-                    .collect();
-                let lits = create_lits(given);
-                let got = lits.unambiguous_prefixes();
-                assert_eq!($expected, escape_lits(got.literals()));
-            }
-        };
-    }
-
-    test_unamb!(unambiguous1, vec![M("z"), M("azb")], vec![C("a"), C("z")]);
-    test_unamb!(unambiguous2,
-                vec![M("zaaaaaa"), M("aa")], vec![C("aa"), C("z")]);
-    test_unamb!(unambiguous3,
-                vec![M("Sherlock"), M("Watson")],
-                vec![M("Sherlock"), M("Watson")]);
-    test_unamb!(unambiguous4, vec![M("abc"), M("bc")], vec![C("a"), C("bc")]);
-    test_unamb!(unambiguous5, vec![M("bc"), M("abc")], vec![C("a"), C("bc")]);
-    test_unamb!(unambiguous6, vec![M("a"), M("aa")], vec![C("a")]);
-    test_unamb!(unambiguous7, vec![M("aa"), M("a")], vec![C("a")]);
-    test_unamb!(unambiguous8, vec![M("ab"), M("a")], vec![C("a")]);
-    test_unamb!(unambiguous9,
-                vec![M("ac"), M("bc"), M("c"), M("ac"), M("abc"), M("c")],
-                vec![C("a"), C("b"), C("c")]);
-    test_unamb!(unambiguous10,
-                vec![M("Mo'"), M("Mu'"), M("Mo"), M("Mu")],
-                vec![C("Mo"), C("Mu")]);
-    test_unamb!(unambiguous11,
-                vec![M("zazb"), M("azb")], vec![C("a"), C("z")]);
-    test_unamb!(unambiguous12, vec![M("foo"), C("foo")], vec![C("foo")]);
-    test_unamb!(unambiguous13,
-                vec![M("ABCX"), M("CDAX"), M("BCX")],
-                vec![C("A"), C("BCX"), C("CD")]);
-    test_unamb!(unambiguous14,
-                vec![M("IMGX"), M("MVIX"), M("MGX"), M("DSX")],
-                vec![M("DSX"), C("I"), C("MGX"), C("MV")]);
-    test_unamb!(unambiguous15,
-                vec![M("IMG_"), M("MG_"), M("CIMG")],
-                vec![C("C"), C("I"), C("MG_")]);
-
-
-    // ************************************************************************
-    // Tests for suffix trimming.
-    // ************************************************************************
-    macro_rules! test_trim {
-        ($name:ident, $trim:expr, $given:expr, $expected:expr) => {
-            #[test]
-            fn $name() {
-                let given: Vec<Lit> =
-                    $given
-                    .into_iter()
-                    .map(|ul| {
-                        let cut = ul.is_cut();
-                        Lit { v: ul.v.into_bytes(), cut: cut }
-                    })
-                    .collect();
-                let lits = create_lits(given);
-                let got = lits.trim_suffix($trim).unwrap();
-                assert_eq!($expected, escape_lits(got.literals()));
-            }
-        }
-    }
-
-    test_trim!(trim1, 1, vec![M("ab"), M("yz")], vec![C("a"), C("y")]);
-    test_trim!(trim2, 1, vec![M("abc"), M("abd")], vec![C("ab")]);
-    test_trim!(trim3, 2, vec![M("abc"), M("abd")], vec![C("a")]);
-    test_trim!(trim4, 2, vec![M("abc"), M("ghij")], vec![C("a"), C("gh")]);
-
-    // ************************************************************************
-    // Tests for longest common prefix.
-    // ************************************************************************
-
-    macro_rules! test_lcp {
-        ($name:ident, $given:expr, $expected:expr) => {
-            #[test]
-            fn $name() {
-                let given: Vec<Lit> =
-                    $given
-                    .into_iter()
-                    .map(|s: &str| Lit {
-                        v: s.to_owned().into_bytes(),
-                        cut: false,
-                    })
-                    .collect();
-                let lits = create_lits(given);
-                let got = lits.longest_common_prefix();
-                assert_eq!($expected, escape_bytes(got));
-            }
-        };
-    }
-
-    test_lcp!(lcp1, vec!["a"], "a");
-    test_lcp!(lcp2, vec![], "");
-    test_lcp!(lcp3, vec!["a", "b"], "");
-    test_lcp!(lcp4, vec!["ab", "ab"], "ab");
-    test_lcp!(lcp5, vec!["ab", "a"], "a");
-    test_lcp!(lcp6, vec!["a", "ab"], "a");
-    test_lcp!(lcp7, vec!["ab", "b"], "");
-    test_lcp!(lcp8, vec!["b", "ab"], "");
-    test_lcp!(lcp9, vec!["foobar", "foobaz"], "fooba");
-    test_lcp!(lcp10, vec!["foobar", "foobaz", "a"], "");
-    test_lcp!(lcp11, vec!["a", "foobar", "foobaz"], "");
-    test_lcp!(lcp12, vec!["foo", "flub", "flab", "floo"], "f");
-
-    // ************************************************************************
-    // Tests for longest common suffix.
-    // ************************************************************************
-
-    macro_rules! test_lcs {
-        ($name:ident, $given:expr, $expected:expr) => {
-            #[test]
-            fn $name() {
-                let given: Vec<Lit> =
-                    $given
-                    .into_iter()
-                    .map(|s: &str| Lit {
-                        v: s.to_owned().into_bytes(),
-                        cut: false,
-                    })
-                    .collect();
-                let lits = create_lits(given);
-                let got = lits.longest_common_suffix();
-                assert_eq!($expected, escape_bytes(got));
-            }
-        };
-    }
-
-    test_lcs!(lcs1, vec!["a"], "a");
-    test_lcs!(lcs2, vec![], "");
-    test_lcs!(lcs3, vec!["a", "b"], "");
-    test_lcs!(lcs4, vec!["ab", "ab"], "ab");
-    test_lcs!(lcs5, vec!["ab", "a"], "");
-    test_lcs!(lcs6, vec!["a", "ab"], "");
-    test_lcs!(lcs7, vec!["ab", "b"], "b");
-    test_lcs!(lcs8, vec!["b", "ab"], "b");
-    test_lcs!(lcs9, vec!["barfoo", "bazfoo"], "foo");
-    test_lcs!(lcs10, vec!["barfoo", "bazfoo", "a"], "");
-    test_lcs!(lcs11, vec!["a", "barfoo", "bazfoo"], "");
-    test_lcs!(lcs12, vec!["flub", "bub", "boob", "dub"], "b");
-}
deleted file mode 100644
--- a/third_party/rust/regex-syntax-0.4.0/src/parser.rs
+++ /dev/null
@@ -1,2818 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::cmp::{max, min};
-use std::u8;
-
-use unicode::regex::UNICODE_CLASSES;
-
-use {
-    Expr, Repeater, CharClass, ClassRange,
-    CaptureIndex, CaptureName,
-    Error, ErrorKind, Result,
-};
-
-/// Parser state.
-///
-/// Keeps the entire input in memory and maintains a cursor (char offset).
-///
-/// It also keeps an expression stack, which is responsible for managing
-/// grouped expressions and flag state.
-#[derive(Debug)]
-pub struct Parser {
-    chars: Vec<char>,
-    chari: usize,
-    stack: Vec<Build>,
-    caps: usize,
-    names: Vec<String>, // to check for duplicates
-    flags: Flags,
-}
-
-/// Flag state used in the parser.
-#[derive(Clone, Copy, Debug)]
-pub struct Flags {
-    /// i
-    pub casei: bool,
-    /// m
-    pub multi: bool,
-    /// s
-    pub dotnl: bool,
-    /// U
-    pub swap_greed: bool,
-    /// x
-    pub ignore_space: bool,
-    /// u
-    pub unicode: bool,
-    /// Not actually a flag, but when disabled, every regex that may not match
-    /// UTF-8 exclusively will cause the parser to return an error.
-    pub allow_bytes: bool,
-}
-
-impl Default for Flags {
-    fn default() -> Self {
-        Flags {
-            casei: false,
-            multi: false,
-            dotnl: false,
-            swap_greed: false,
-            ignore_space: false,
-            unicode: true,
-            allow_bytes: false,
-        }
-    }
-}
-
-/// An ephemeral type for representing the expression stack.
-///
-/// Everything on the stack is either a regular expression or a marker
-/// indicating the opening of a group (possibly non-capturing). The opening
-/// of a group copies the current flag state, which is reset on the parser
-/// state once the group closes.
-#[derive(Debug)]
-enum Build {
-    Expr(Expr),
-    LeftParen {
-        i: CaptureIndex,
-        name: CaptureName,
-        chari: usize,
-        old_flags: Flags,
-    },
-}
-
-// Primary expression parsing routines.
-impl Parser {
-    pub fn parse(s: &str, flags: Flags) -> Result<Expr> {
-        Parser {
-            chars: s.chars().collect(),
-            chari: 0,
-            stack: vec![],
-            caps: 0,
-            names: vec![],
-            flags: flags,
-        }.parse_expr()
-    }
-
-    // Top-level expression parser.
-    //
-    // Starts at the beginning of the input and consumes until either the end
-    // of input or an error.
-    fn parse_expr(mut self) -> Result<Expr> {
-        while !self.eof() {
-            let build_expr = match self.cur() {
-                '\\' => try!(self.parse_escape()),
-                '|' => { let e = try!(self.alternate()); self.bump(); e }
-                '?' => try!(self.parse_simple_repeat(Repeater::ZeroOrOne)),
-                '*' => try!(self.parse_simple_repeat(Repeater::ZeroOrMore)),
-                '+' => try!(self.parse_simple_repeat(Repeater::OneOrMore)),
-                '{' => try!(self.parse_counted_repeat()),
-                '[' => try!(self.parse_class()),
-                '^' => {
-                    if self.flags.multi {
-                        self.parse_one(Expr::StartLine)
-                    } else {
-                        self.parse_one(Expr::StartText)
-                    }
-                }
-                '$' => {
-                    if self.flags.multi {
-                        self.parse_one(Expr::EndLine)
-                    } else {
-                        self.parse_one(Expr::EndText)
-                    }
-                }
-                '.' => {
-                    if self.flags.dotnl {
-                        if self.flags.unicode {
-                            self.parse_one(Expr::AnyChar)
-                        } else {
-                            if !self.flags.allow_bytes {
-                                return Err(self.err(ErrorKind::InvalidUtf8));
-                            }
-                            self.parse_one(Expr::AnyByte)
-                        }
-                    } else {
-                        if self.flags.unicode {
-                            self.parse_one(Expr::AnyCharNoNL)
-                        } else {
-                            if !self.flags.allow_bytes {
-                                return Err(self.err(ErrorKind::InvalidUtf8));
-                            }
-                            self.parse_one(Expr::AnyByteNoNL)
-                        }
-                    }
-                }
-                '(' => try!(self.parse_group()),
-                ')' => {
-                    let (old_flags, e) = try!(self.close_paren());
-                    self.bump();
-                    self.flags = old_flags;
-                    e
-                }
-                _ => {
-                    let c = self.bump();
-                    try!(self.lit(c))
-                }
-            };
-            if !build_expr.is_empty() {
-                self.stack.push(build_expr);
-            }
-        }
-        self.finish_concat()
-    }
-
-    // Parses an escape sequence, e.g., \Ax
-    //
-    // Start: `\`
-    // End:   `x`
-    fn parse_escape(&mut self) -> Result<Build> {
-        self.bump();
-        if self.eof() {
-            return Err(self.err(ErrorKind::UnexpectedEscapeEof));
-        }
-        let c = self.cur();
-        if is_punct(c) {
-            let c = self.bump();
-            return Ok(try!(self.lit(c)));
-        }
-        match c {
-            'a' => { self.bump(); Ok(try!(self.lit('\x07'))) }
-            'f' => { self.bump(); Ok(try!(self.lit('\x0C'))) }
-            't' => { self.bump(); Ok(try!(self.lit('\t'))) }
-            'n' => { self.bump(); Ok(try!(self.lit('\n'))) }
-            'r' => { self.bump(); Ok(try!(self.lit('\r'))) }
-            'v' => { self.bump(); Ok(try!(self.lit('\x0B'))) }
-            'A' => { self.bump(); Ok(Build::Expr(Expr::StartText)) }
-            'z' => { self.bump(); Ok(Build::Expr(Expr::EndText)) }
-            'b' => {
-                self.bump();
-                Ok(Build::Expr(if self.flags.unicode {
-                    Expr::WordBoundary
-                } else {
-                    Expr::WordBoundaryAscii
-                }))
-            }
-            'B' => {
-                self.bump();
-                Ok(Build::Expr(if self.flags.unicode {
-                    Expr::NotWordBoundary
-                } else {
-                    Expr::NotWordBoundaryAscii
-                }))
-            }
-            '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7' => self.parse_octal(),
-            'x' => { self.bump(); self.parse_hex() }
-            'p'|'P' => {
-                self.bump();
-                self.parse_unicode_class(c == 'P')
-                    .map(|cls| Build::Expr(Expr::Class(cls)))
-            }
-            'd'|'s'|'w'|'D'|'S'|'W' => {
-                self.bump();
-                Ok(Build::Expr(Expr::Class(self.parse_perl_class(c))))
-            }
-            c => Err(self.err(ErrorKind::UnrecognizedEscape(c))),
-        }
-    }
-
-    // Parses a group, e.g., `(abc)`.
-    //
-    // Start: `(`
-    // End:   `a`
-    //
-    // A more interesting example, `(?P<foo>abc)`.
-    //
-    // Start: `(`
-    // End:   `a`
-    fn parse_group(&mut self) -> Result<Build> {
-        let chari = self.chari;
-        let mut name: CaptureName = None;
-        self.bump();
-        if self.bump_if("?P<") {
-            let n = try!(self.parse_group_name());
-            if self.names.iter().any(|n2| n2 == &n) {
-                return Err(self.err(ErrorKind::DuplicateCaptureName(n)));
-            }
-            self.names.push(n.clone());
-            name = Some(n);
-        } else if self.bump_if("?") {
-            // This can never be capturing. It's either setting flags for
-            // the current group, or it's opening a non-capturing group or
-            // it's opening a group with a specific set of flags (which is
-            // also non-capturing).
-            // Anything else is an error.
-            return self.parse_group_flags(chari);
-        }
-        self.caps = checkadd(self.caps, 1);
-        Ok(Build::LeftParen {
-            i: Some(self.caps),
-            name: name,
-            chari: chari,
-            old_flags: self.flags, // no flags changed if we're here
-        })
-    }
-
-    // Parses flags (inline or grouped), e.g., `(?s-i:abc)`.
-    //
-    // Start: `s`
-    // End:   `a`
-    //
-    // Another example, `(?s-i)a`.
-    //
-    // Start: `s`
-    // End:   `a`
-    fn parse_group_flags(&mut self, opening_chari: usize) -> Result<Build> {
-        let old_flags = self.flags;
-        let mut sign = true;
-        let mut saw_flag = false;
-        loop {
-            if self.eof() {
-                // e.g., (?i
-                return Err(self.err(ErrorKind::UnexpectedFlagEof));
-            }
-            match self.cur() {
-                'i' => { self.flags.casei = sign; saw_flag = true }
-                'm' => { self.flags.multi = sign; saw_flag = true }
-                's' => { self.flags.dotnl = sign; saw_flag = true }
-                'U' => { self.flags.swap_greed = sign; saw_flag = true }
-                'x' => { self.flags.ignore_space = sign; saw_flag = true }
-                'u' => { self.flags.unicode = sign; saw_flag = true }
-                '-' => {
-                    if !sign {
-                        // e.g., (?-i-s)
-                        return Err(self.err(ErrorKind::DoubleFlagNegation));
-                    }
-                    sign = false;
-                    saw_flag = false;
-                }
-                ')' => {
-                    if !saw_flag {
-                        // e.g., (?)
-                        return Err(self.err(ErrorKind::EmptyFlagNegation));
-                    }
-                    // At this point, we're just changing the flags inside
-                    // the current group, which means the old flags have
-                    // been saved elsewhere. Our modifications in place are
-                    // okey dokey!
-                    //
-                    // This particular flag expression only has a stateful
-                    // impact on a regex's AST, so nothing gets explicitly
-                    // added.
-                    self.bump();
-                    return Ok(Build::Expr(Expr::Empty));
-                }
-                ':' => {
-                    if !sign && !saw_flag {
-                        // e.g., (?i-:a)
-                        // Note that if there's no negation, it's OK not
-                        // to see flag, because you end up with a regular
-                        // non-capturing group: `(?:a)`.
-                        return Err(self.err(ErrorKind::EmptyFlagNegation));
-                    }
-                    self.bump();
-                    return Ok(Build::LeftParen {
-                        i: None,
-                        name: None,
-                        chari: opening_chari,
-                        old_flags: old_flags,
-                    });
-                }
-                // e.g., (?z:a)
-                c => return Err(self.err(ErrorKind::UnrecognizedFlag(c))),
-            }
-            self.bump();
-        }
-    }
-
-    // Parses a group name, e.g., `foo` in `(?P<foo>abc)`.
-    //
-    // Start: `f`
-    // End:   `a`
-    fn parse_group_name(&mut self) -> Result<String> {
-        let mut name = String::new();
-        while !self.eof() && !self.peek_is('>') {
-            name.push(self.bump());
-        }
-        if self.eof() {
-            // e.g., (?P<a
-            return Err(self.err(ErrorKind::UnclosedCaptureName(name)));
-        }
-        let all_valid = name.chars().all(is_valid_capture_char);
-        match name.chars().next() {
-            // e.g., (?P<>a)
-            None => Err(self.err(ErrorKind::EmptyCaptureName)),
-            Some(c) if (c >= '0' && c <= '9') || !all_valid => {
-                // e.g., (?P<a#>x)
-                // e.g., (?P<1a>x)
-                Err(self.err(ErrorKind::InvalidCaptureName(name)))
-            }
-            _ => {
-                self.bump(); // for `>`
-                Ok(name)
-            }
-        }
-    }
-
-    // Parses a counted repeition operator, e.g., `a{2,4}?z`.
-    //
-    // Start: `{`
-    // End:   `z`
-    fn parse_counted_repeat(&mut self) -> Result<Build> {
-        let e = try!(self.pop(ErrorKind::RepeaterExpectsExpr)); // e.g., ({5}
-        if !e.can_repeat() {
-            // e.g., a*{5}
-            return Err(self.err(ErrorKind::RepeaterUnexpectedExpr(e)));
-        }
-        self.bump();
-        let min = try!(self.parse_decimal(|c| c != ',' && c != '}'));
-        let mut max_opt = Some(min);
-        if self.bump_if(',') {
-            if self.peek_is('}') {
-                max_opt = None;
-            } else {
-                let max = try!(self.parse_decimal(|c| c != '}'));
-                if min > max {
-                    // e.g., a{2,1}
-                    return Err(self.err(ErrorKind::InvalidRepeatRange {
-                        min: min,
-                        max: max,
-                    }));
-                }
-                max_opt = Some(max);
-            }
-        }
-        if !self.bump_if('}') {
-            Err(self.err(ErrorKind::UnclosedRepeat))
-        } else {
-            Ok(Build::Expr(Expr::Repeat {
-                e: Box::new(e),
-                r: Repeater::Range { min: min, max: max_opt },
-                greedy: !self.bump_if('?') ^ self.flags.swap_greed,
-            }))
-        }
-    }
-
-    // Parses a simple repetition operator, e.g., `a+?z`.
-    //
-    // Start: `+`
-    // End:   `z`
-    //
-    // N.B. "simple" in this context means "not min/max repetition",
-    // e.g., `a{1,2}`.
-    fn parse_simple_repeat(&mut self, rep: Repeater) -> Result<Build> {
-        let e = try!(self.pop(ErrorKind::RepeaterExpectsExpr)); // e.g., (*
-        if !e.can_repeat() {
-            // e.g., a**
-            return Err(self.err(ErrorKind::RepeaterUnexpectedExpr(e)));
-        }
-        self.bump();
-        Ok(Build::Expr(Expr::Repeat {
-            e: Box::new(e),
-            r: rep,
-            greedy: !self.bump_if('?') ^ self.flags.swap_greed,
-        }))
-    }
-
-    // Parses a decimal number until the given character, e.g., `a{123,456}`.
-    //
-    // Start: `1`
-    // End:   `,` (where `until == ','`)
-    fn parse_decimal<B: Bumpable>(&mut self, until: B) -> Result<u32> {
-        match self.bump_get(until) {
-            // e.g., a{}
-            None => Err(self.err(ErrorKind::MissingBase10)),
-            Some(n) => {
-                // e.g., a{xyz
-                // e.g., a{9999999999}
-                let n = n.trim();
-                u32::from_str_radix(n, 10)
-                    .map_err(|_| self.err(ErrorKind::InvalidBase10(n.into())))
-            }
-        }
-    }
-
-    // Parses an octal number, up to 3 digits, e.g., `a\123b`
-    //
-    // Start: `1`
-    // End:   `b`
-    fn parse_octal(&mut self) -> Result<Build> {
-        use std::char;
-        let mut i = 0; // counter for limiting octal to 3 digits.
-        let n = self.bump_get(|c| { i += 1; i <= 3 && c >= '0' && c <= '7' })
-                    .expect("octal string"); // guaranteed at least 1 digit
-        // I think both of the following unwraps are impossible to fail.
-        // We limit it to a three digit octal number, which maxes out at
-        // `0777` or `511` in decimal. Since all digits are in `0...7`, we'll
-        // always have a valid `u32` number. Moreover, since all numbers in
-        // the range `0...511` are valid Unicode scalar values, it will always
-        // be a valid `char`.
-        //
-        // Hence, we `unwrap` with reckless abandon.
-        let n = u32::from_str_radix(&n, 8).ok().expect("valid octal number");
-        if !self.flags.unicode {
-            return Ok(try!(self.u32_to_one_byte(n)));
-        }
-        let c = char::from_u32(n).expect("Unicode scalar value");
-        Ok(try!(self.lit(c)))
-    }
-
-    // Parses a hex number, e.g., `a\x5ab`.
-    //
-    // Start: `5`
-    // End:   `b`
-    //
-    // And also, `a\x{2603}b`.
-    //
-    // Start: `{`
-    // End:   `b`
-    fn parse_hex(&mut self) -> Result<Build> {
-        if self.bump_if('{') {
-            self.parse_hex_many_digits()
-        } else {
-            self.parse_hex_two_digits()
-        }
-    }
-
-    // Parses a many-digit hex number, e.g., `a\x{2603}b`.
-    //
-    // Start: `2`
-    // End:   `b`
-    fn parse_hex_many_digits(&mut self) -> Result<Build> {
-        use std::char;
-
-        let s = self.bump_get(|c| c != '}').unwrap_or("".into());
-        let n = try!(u32::from_str_radix(&s, 16)
-                         .map_err(|_| self.err(ErrorKind::InvalidBase16(s))));
-        if !self.bump_if('}') {
-            // e.g., a\x{d
-            return Err(self.err(ErrorKind::UnclosedHex));
-        }
-        if !self.flags.unicode {
-            return Ok(try!(self.u32_to_one_byte(n)));
-        }
-        let c = try!(char::from_u32(n)
-                          .ok_or(self.err(ErrorKind::InvalidScalarValue(n))));
-        Ok(try!(self.lit(c)))
-    }
-
-    // Parses a two-digit hex number, e.g., `a\x5ab`.
-    //
-    // Start: `5`
-    // End:   `b`
-    fn parse_hex_two_digits(&mut self) -> Result<Build> {
-        use std::char;
-
-        let mut i = 0;
-        let s = self.bump_get(|_| { i += 1; i <= 2 }).unwrap_or("".into());
-        if s.len() < 2 {
-            // e.g., a\x
-            // e.g., a\xf
-            return Err(self.err(ErrorKind::UnexpectedTwoDigitHexEof));
-        }
-        let n = try!(u32::from_str_radix(&s, 16)
-                         .map_err(|_| self.err(ErrorKind::InvalidBase16(s))));
-        if !self.flags.unicode {
-            return Ok(try!(self.u32_to_one_byte(n)));
-        }
-        let c = char::from_u32(n).expect("Unicode scalar value");
-        Ok(try!(self.lit(c)))
-    }
-
-    // Parses a character class, e.g., `[^a-zA-Z0-9]+`.
-    //
-    // Start: `[`
-    // End:   `+`
-    fn parse_class(&mut self) -> Result<Build> {
-        self.bump();
-        let negated = self.bump_if('^');
-        let mut class = CharClass::empty();
-        while self.bump_if('-') {
-            class.ranges.push(ClassRange::one('-'));
-        }
-        loop {
-            if self.eof() {
-                // e.g., [a
-                return Err(self.err(ErrorKind::UnexpectedClassEof));
-            }
-            match self.cur() {
-                // If no ranges have been added, then `]` is the first
-                // character (sans, perhaps, the `^` symbol), so it should
-                // be interpreted as a `]` instead of a closing class bracket.
-                ']' if class.len() > 0 => { self.bump(); break }
-                '[' => match self.maybe_parse_ascii() {
-                    Some(class2) => class.ranges.extend(class2),
-                    None => {
-                        return Err(self.err(
-                            ErrorKind::UnsupportedClassChar('[')));
-                    }
-                },
-                '\\' => match try!(self.parse_escape()) {
-                    Build::Expr(Expr::Class(class2)) => {
-                        class.ranges.extend(class2);
-                    }
-                    Build::Expr(Expr::ClassBytes(class2)) => {
-                        for byte_range in class2 {
-                            let s = byte_range.start as char;
-                            let e = byte_range.end as char;
-                            class.ranges.push(ClassRange::new(s, e));
-                        }
-                    }
-                    Build::Expr(Expr::Literal { chars, .. }) => {
-                        try!(self.parse_class_range(&mut class, chars[0]));
-                    }
-                    Build::Expr(Expr::LiteralBytes { bytes, .. }) => {
-                        let start = bytes[0] as char;
-                        try!(self.parse_class_range(&mut class, start));
-                    }
-                    Build::Expr(e) => {
-                        let err = ErrorKind::InvalidClassEscape(e);
-                        return Err(self.err(err));
-                    }
-                    // Because `parse_escape` can never return `LeftParen`.
-                    _ => unreachable!(),
-                },
-                start => {
-                    if !self.flags.unicode {
-                        let _ = try!(self.codepoint_to_one_byte(start));
-                    }
-                    self.bump();
-                    match start {
-                        '&'|'~'|'-' => {
-                            // Only report an error if we see && or ~~ or --.
-                            if self.peek_is(start) {
-                                return Err(self.err(
-                                    ErrorKind::UnsupportedClassChar(start)));
-                            }
-                        }
-                        _ => {}
-                    }
-                    try!(self.parse_class_range(&mut class, start));
-                }
-            }
-        }
-        class = self.class_transform(negated, class).canonicalize();
-        if class.is_empty() {
-            // e.g., [^\d\D]
-            return Err(self.err(ErrorKind::EmptyClass));
-        }
-        Ok(Build::Expr(if self.flags.unicode {
-            Expr::Class(class)
-        } else {
-            let byte_class = class.to_byte_class();
-
-            // If `class` was only non-empty due to multibyte characters, the
-            // corresponding byte class will now be empty.
-            //
-            // See https://github.com/rust-lang/regex/issues/303
-            if byte_class.is_empty() {
-                // e.g., (?-u)[^\x00-\xFF]
-                return Err(self.err(ErrorKind::EmptyClass));
-            }
-
-            Expr::ClassBytes(byte_class)
-        }))
-    }
-
-    // Parses a single range in a character class.
-    //
-    // Since this is a helper for `parse_class`, its signature sticks out.
-    // Namely, it requires the start character of the range and the char
-    // class to mutate.
-    //
-    // e.g., `[a-z]`
-    //
-    // Start: `-` (with start == `a`)
-    // End:   `]`
-    fn parse_class_range(&mut self, class: &mut CharClass, start: char)
-                        -> Result<()> {
-        if !self.bump_if('-') {
-            // Not a range, so just push a singleton range.
-            class.ranges.push(ClassRange::one(start));
-            return Ok(());
-        }
-        if self.eof() {
-            // e.g., [a-
-            return Err(self.err(ErrorKind::UnexpectedClassEof));
-        }
-        if self.peek_is(']') {
-            // This is the end of the class, so we permit use of `-` as a
-            // regular char (just like we do in the beginning).
-            class.ranges.push(ClassRange::one(start));
-            class.ranges.push(ClassRange::one('-'));
-            return Ok(());
-        }
-
-        // We have a real range. Just need to check to parse literal and
-        // make sure it's a valid range.
-        let end = match self.cur() {
-            '\\' => match try!(self.parse_escape()) {
-                Build::Expr(Expr::Literal { chars, .. }) => {
-                    chars[0]
-                }
-                Build::Expr(Expr::LiteralBytes { bytes, .. }) => {
-                    bytes[0] as char
-                }
-                Build::Expr(e) => {
-                    return Err(self.err(ErrorKind::InvalidClassEscape(e)));
-                }
-                // Because `parse_escape` can never return `LeftParen`.
-                _ => unreachable!(),
-            },
-            c => {
-                self.bump();
-                if c == '-' {
-                    return Err(self.err(ErrorKind::UnsupportedClassChar('-')));
-                }
-                if !self.flags.unicode {
-                    let _ = try!(self.codepoint_to_one_byte(c));
-                }
-                c
-            }
-        };
-        if end < start {
-            // e.g., [z-a]
-            return Err(self.err(ErrorKind::InvalidClassRange {
-                start: start,
-                end: end,
-            }));
-        }
-        class.ranges.push(ClassRange::new(start, end));
-        Ok(())
-    }
-
-    // Parses an ASCII class, e.g., `[:alnum:]+`.
-    //
-    // Start: `[`
-    // End:   `+`
-    //
-    // Also supports negation, e.g., `[:^alnum:]`.
-    //
-    // This parsing routine is distinct from the others in that it doesn't
-    // actually report any errors. Namely, if it fails, then the parser should
-    // fall back to parsing a regular class.
-    //
-    // This method will only make progress in the parser if it succeeds.
-    // Otherwise, the input remains where it started.
-    fn maybe_parse_ascii(&mut self) -> Option<CharClass> {
-        fn parse(p: &mut Parser) -> Option<CharClass> {
-            p.bump(); // the `[`
-            if !p.bump_if(':') { return None; }
-            let negate = p.bump_if('^');
-            let name = match p.bump_get(|c| c != ':') {
-                None => return None,
-                Some(name) => name,
-            };
-            if !p.bump_if(":]") { return None; }
-            ascii_class(&name).map(|cls| p.class_transform(negate, cls))
-        }
-        let start = self.chari;
-        match parse(self) {
-            None => { self.chari = start; None }
-            result => result,
-        }
-    }
-
-    // Parses a Uncode class name, e.g., `a\pLb`.
-    //
-    // Start: `L`
-    // End:   `b`
-    //
-    // And also, `a\p{Greek}b`.
-    //
-    // Start: `{`
-    // End:   `b`
-    //
-    // `negate` is true when the class name is used with `\P`.
-    fn parse_unicode_class(&mut self, neg: bool) -> Result<CharClass> {
-        let name =
-            if self.bump_if('{') {
-                let n = self.bump_get(|c| c != '}').unwrap_or("".into());
-                if n.is_empty() || !self.bump_if('}') {
-                    // e.g., \p{Greek
-                    return Err(self.err(ErrorKind::UnclosedUnicodeName));
-                }
-                n
-            } else {
-                if self.eof() {
-                    // e.g., \p
-                    return Err(self.err(ErrorKind::UnexpectedEscapeEof));
-                }
-                self.bump().to_string()
-            };
-        match unicode_class(&name) {
-            None => Err(self.err(ErrorKind::UnrecognizedUnicodeClass(name))),
-            Some(cls) => {
-                if self.flags.unicode {
-                    Ok(self.class_transform(neg, cls))
-                } else {
-                    Err(self.err(ErrorKind::UnicodeNotAllowed))
-                }
-            }
-        }
-    }
-
-    // Parses a perl character class with Unicode support.
-    //
-    // `name` must be one of d, s, w, D, S, W. If not, this function panics.
-    //
-    // No parser state is changed.
-    fn parse_perl_class(&mut self, name: char) -> CharClass {
-        use unicode::regex::{PERLD, PERLS, PERLW};
-        let (cls, negate) = match (self.flags.unicode, name) {
-            (true, 'd') => (raw_class_to_expr(PERLD), false),
-            (true, 'D') => (raw_class_to_expr(PERLD), true),
-            (true, 's') => (raw_class_to_expr(PERLS), false),
-            (true, 'S') => (raw_class_to_expr(PERLS), true),
-            (true, 'w') => (raw_class_to_expr(PERLW), false),
-            (true, 'W') => (raw_class_to_expr(PERLW), true),
-            (false, 'd') => (ascii_class("digit").unwrap(), false),
-            (false, 'D') => (ascii_class("digit").unwrap(), true),
-            (false, 's') => (ascii_class("space").unwrap(), false),
-            (false, 'S') => (ascii_class("space").unwrap(), true),
-            (false, 'w') => (ascii_class("word").unwrap(), false),
-            (false, 'W') => (ascii_class("word").unwrap(), true),
-            _ => unreachable!(),
-        };
-        self.class_transform(negate, cls)
-    }
-
-    // Always bump to the next input and return the given expression as a
-    // `Build`.
-    //
-    // This is mostly for convenience when the surrounding context implies
-    // that the next character corresponds to the given expression.
-    fn parse_one(&mut self, e: Expr) -> Build {
-        self.bump();
-        Build::Expr(e)
-    }
-}
-
-// Auxiliary helper methods.
-impl Parser {
-    fn chars(&self) -> Chars {
-        Chars::new(&self.chars[self.chari..], self.flags.ignore_space)
-    }
-
-    fn bump(&mut self) -> char {
-        let c = self.cur();
-        self.chari = checkadd(self.chari, self.chars().next_count());
-        c
-    }
-
-    fn cur(&self) -> char { self.chars().next().unwrap() }
-
-    fn eof(&self) -> bool { self.chars().next().is_none() }
-
-    fn bump_get<B: Bumpable>(&mut self, s: B) -> Option<String> {
-        let n = s.match_end(self);
-        if n == 0 {
-            None
-        } else {
-            let end = checkadd(self.chari, n);
-            let s = self.chars[self.chari..end]
-                        .iter().cloned().collect::<String>();
-            self.chari = end;
-            Some(s)
-        }
-    }
-
-    fn bump_if<B: Bumpable>(&mut self, s: B) -> bool {
-        let n = s.match_end(self);
-        if n == 0 {
-            false
-        } else {
-            self.chari = checkadd(self.chari, n);
-            true
-        }
-    }
-
-    fn peek_is<B: Bumpable>(&self, s: B) -> bool {
-        s.match_end(self) > 0
-    }
-
-    fn err(&self, kind: ErrorKind) -> Error {
-        self.errat(self.chari, kind)
-    }
-
-    fn errat(&self, pos: usize, kind: ErrorKind) -> Error {
-        Error { pos: pos, surround: self.windowat(pos), kind: kind }
-    }
-
-    fn windowat(&self, pos: usize) -> String {
-        let s = max(5, pos) - 5;
-        let e = min(self.chars.len(), checkadd(pos, 5));
-        self.chars[s..e].iter().cloned().collect()
-    }
-
-    fn pop(&mut self, expected: ErrorKind) -> Result<Expr> {
-        match self.stack.pop() {
-            None | Some(Build::LeftParen{..}) => Err(self.err(expected)),
-            Some(Build::Expr(e)) => Ok(e),
-        }
-    }
-
-    // If the current context calls for case insensitivity, then apply
-    // case folding. Similarly, if `negate` is `true`, then negate the
-    // class. (Negation always proceeds case folding.)
-    fn class_transform(&self, negate: bool, mut cls: CharClass) -> CharClass {
-        if self.flags.casei {
-            cls = cls.case_fold();
-        }
-        if negate {
-            cls = cls.negate();
-        }
-        cls
-    }
-
-    // Translates a Unicode codepoint into a single UTF-8 byte, and returns an
-    // error if it's not possible.
-    //
-    // This will panic if self.flags.unicode == true.
-    fn codepoint_to_one_byte(&self, c: char) -> Result<u8> {
-        assert!(!self.flags.unicode);
-        let bytes = c.to_string().as_bytes().to_owned();
-        if bytes.len() > 1 {
-            return Err(self.err(ErrorKind::UnicodeNotAllowed));
-        }
-        Ok(bytes[0])
-    }
-
-    // Creates a new byte literal from a single byte.
-    //
-    // If the given number can't fit into a single byte, then it is assumed
-    // to be a Unicode codepoint and an error is returned.
-    //
-    // This should only be called when the bytes flag is enabled.
-    fn u32_to_one_byte(&self, b: u32) -> Result<Build> {
-        assert!(!self.flags.unicode);
-        if b > u8::MAX as u32 {
-            Err(self.err(ErrorKind::UnicodeNotAllowed))
-        } else if !self.flags.allow_bytes && b > 0x7F {
-            Err(self.err(ErrorKind::InvalidUtf8))
-        } else {
-            Ok(Build::Expr(Expr::LiteralBytes {
-                bytes: vec![b as u8],
-                casei: self.flags.casei,
-            }))
-        }
-    }
-
-    // Creates a new literal expr from a Unicode codepoint.
-    //
-    // Creates a byte literal if the `bytes` flag is set.
-    fn lit(&self, c: char) -> Result<Build> {
-        Ok(Build::Expr(if self.flags.unicode {
-            Expr::Literal {
-                chars: vec![c],
-                casei: self.flags.casei,
-            }
-        } else {
-            Expr::LiteralBytes {
-                bytes: vec![try!(self.codepoint_to_one_byte(c))],
-                casei: self.flags.casei,
-            }
-        }))
-    }
-}
-
-struct Chars<'a> {
-    chars: &'a [char],
-    cur: usize,
-    ignore_space: bool,
-}
-
-impl<'a> Iterator for Chars<'a> {
-    type Item = char;
-    fn next(&mut self) -> Option<char> {
-        if !self.ignore_space {
-            let x = self.c();
-            self.advance();
-            return x;
-        }
-        while let Some(c) = self.c() {
-            self.advance();
-            match c {
-                '\\' => return match self.c() {
-                            Some('#') => {self.advance(); Some('#')}
-                            _ => Some('\\')
-                        },
-                '#'  => loop {
-                            match self.c() {
-                                Some(c) => {
-                                    self.advance();
-                                    if c == '\n' {
-                                        break;
-                                    }
-                                },
-                                None => return None
-                            }
-                        },
-                _    => if !c.is_whitespace() {return Some(c);}
-            }
-        }
-        None
-    }
-}
-
-impl<'a> Chars<'a> {
-    fn new(chars: &[char], ignore_space: bool) -> Chars {
-        Chars {
-            chars: chars,
-            cur: 0,
-            ignore_space: ignore_space,
-        }
-    }
-
-    fn c(&self) -> Option<char> {
-        self.chars.get(self.cur).map(|&c| c)
-    }
-
-    fn advance(&mut self) {
-        self.cur = checkadd(self.cur, 1);
-    }
-
-    fn next_count(&mut self) -> usize {
-        self.next();
-        self.cur
-    }
-}
-
-// Auxiliary methods for manipulating the expression stack.
-impl Parser {
-    // Called whenever an alternate (`|`) is found.
-    //
-    // This pops the expression stack until:
-    //
-    //  1. The stack is empty. Pushes an alternation with one arm.
-    //  2. An opening parenthesis is found. Leave the parenthesis
-    //     on the stack and push an alternation with one arm.
-    //  3. An alternate (`|`) is found. Pop the existing alternation,
-    //     add an arm and push the modified alternation.
-    //
-    // Each "arm" in the above corresponds to the concatenation of all
-    // popped expressions.
-    //
-    // In the first two cases, the stack is left in an invalid state
-    // because an alternation with one arm is not allowed. This
-    // particular state will be detected by `finish_concat` and an
-    // error will be reported.
-    //
-    // In none of the cases is an empty arm allowed. If an empty arm
-    // is found, an error is reported.
-    fn alternate(&mut self) -> Result<Build> {
-        let mut concat = vec![];
-        let alts = |es| Ok(Build::Expr(Expr::Alternate(es)));
-        loop {
-            match self.stack.pop() {
-                None => {
-                    if concat.is_empty() {
-                        // e.g., |a
-                        return Err(self.err(ErrorKind::EmptyAlternate));
-                    }
-                    return alts(vec![rev_concat(concat)]);
-                }
-                Some(e @ Build::LeftParen{..}) => {
-                    if concat.is_empty() {
-                        // e.g., (|a)
-                        return Err(self.err(ErrorKind::EmptyAlternate));
-                    }
-                    self.stack.push(e);
-                    return alts(vec![rev_concat(concat)]);
-                }
-                Some(Build::Expr(Expr::Alternate(mut es))) => {
-                    if concat.is_empty() {
-                        // e.g., a||
-                        return Err(self.err(ErrorKind::EmptyAlternate));
-                    }
-                    es.push(rev_concat(concat));
-                    return alts(es);
-                }
-                Some(Build::Expr(e)) => { concat.push(e); }
-            }
-        }
-    }
-
-    // Called whenever a closing parenthesis (`)`) is found.
-    //
-    // This pops the expression stack until:
-    //
-    //  1. The stack is empty. An error is reported because this
-    //     indicates an unopened parenthesis.
-    //  2. An opening parenthesis is found. Pop the opening parenthesis
-    //     and push a `Group` expression.
-    //  3. An alternate (`|`) is found. Pop the existing alternation
-    //     and an arm to it in place. Pop one more item from the stack.
-    //     If the stack was empty, then report an unopened parenthesis
-    //     error, otherwise assume it is an opening parenthesis and
-    //     push a `Group` expression with the popped alternation.
-    //     (We can assume this is an opening parenthesis because an
-    //     alternation either corresponds to the entire Regex or it
-    //     corresponds to an entire group. This is guaranteed by the
-    //     `alternate` method.)
-    //
-    // Each "arm" in the above corresponds to the concatenation of all
-    // popped expressions.
-    //
-    // Empty arms nor empty groups are allowed.
-    fn close_paren(&mut self) -> Result<(Flags, Build)> {
-        let mut concat = vec![];
-        loop {
-            match self.stack.pop() {
-                // e.g., )
-                None => return Err(self.err(ErrorKind::UnopenedParen)),
-                Some(Build::LeftParen { i, name, old_flags, .. }) => {
-                    if concat.is_empty() {
-                        // e.g., ()
-                        return Err(self.err(ErrorKind::EmptyGroup));
-                    }
-                    return Ok((old_flags, Build::Expr(Expr::Group {
-                        e: Box::new(rev_concat(concat)),
-                        i: i,
-                        name: name,
-                    })));
-                }
-                Some(Build::Expr(Expr::Alternate(mut es))) => {
-                    if concat.is_empty() {
-                        // e.g., (a|)
-                        return Err(self.err(ErrorKind::EmptyAlternate));
-                    }
-                    es.push(rev_concat(concat));
-                    match self.stack.pop() {
-                        // e.g., a|b)
-                        None => return Err(self.err(ErrorKind::UnopenedParen)),
-                        Some(Build::Expr(_)) => unreachable!(),
-                        Some(Build::LeftParen { i, name, old_flags, .. }) => {
-                            return Ok((old_flags, Build::Expr(Expr::Group {
-                                e: Box::new(Expr::Alternate(es)),
-                                i: i,
-                                name: name,
-                            })));
-                        }
-                    }
-                }
-                Some(Build::Expr(e)) => { concat.push(e); }
-            }
-        }
-    }
-
-    // Called only when the parser reaches the end of input.
-    //
-    // This pops the expression stack until:
-    //
-    //  1. The stack is empty. Return concatenation of popped
-    //     expressions. This concatenation may be empty!
-    //  2. An alternation is found. Pop the alternation and push
-    //     a new arm. Return the alternation as the entire Regex.
-    //     After this, the stack must be empty, or else there is
-    //     an unclosed paren.
-    //
-    // If an opening parenthesis is popped, then an error is
-    // returned since it indicates an unclosed parenthesis.
-    fn finish_concat(&mut self) -> Result<Expr> {
-        let mut concat = vec![];
-        loop {
-            match self.stack.pop() {
-                None => { return Ok(rev_concat(concat)); }
-                Some(Build::LeftParen{ chari, ..}) => {
-                    // e.g., a(b
-                    return Err(self.errat(chari, ErrorKind::UnclosedParen));
-                }
-                Some(Build::Expr(Expr::Alternate(mut es))) => {
-                    if concat.is_empty() {
-                        // e.g., a|
-                        return Err(self.err(ErrorKind::EmptyAlternate));
-                    }
-                    es.push(rev_concat(concat));
-                    // Make sure there are no opening parens remaining.
-                    match self.stack.pop() {
-                        None => return Ok(Expr::Alternate(es)),
-                        Some(Build::LeftParen{ chari, ..}) => {
-                            // e.g., (a|b
-                            return Err(self.errat(
-                                chari, ErrorKind::UnclosedParen));
-                        }
-                        e => unreachable!("{:?}", e),
-                    }
-                }
-                Some(Build::Expr(e)) => { concat.push(e); }
-            }
-        }
-    }
-}
-
-impl Build {
-    fn is_empty(&self) -> bool {
-        match *self {
-            Build::Expr(Expr::Empty) => true,
-            _ => false,
-        }
-    }
-}
-
-// Make it ergonomic to conditionally bump the parser.
-// i.e., `bump_if('a')` or `bump_if("abc")`.
-trait Bumpable {
-    fn match_end(self, p: &Parser) -> usize;
-}
-
-impl Bumpable for char {
-    fn match_end(self, p: &Parser) -> usize {
-        let mut chars = p.chars();
-        if chars.next().map(|c| c == self).unwrap_or(false) {
-            chars.cur
-        } else {
-            0
-        }
-    }
-}
-
-impl<'a> Bumpable for &'a str {
-    fn match_end(self, p: &Parser) -> usize {
-        let mut search = self.chars();
-        let mut rest = p.chars();
-        let mut count = 0;
-        loop {
-            match (rest.next(), search.next()) {
-                (Some(c1), Some(c2)) if c1 == c2 => count = rest.cur,
-                (_, None) => return count,
-                _ => return 0,
-            }
-        }
-    }
-}
-
-impl<F: FnMut(char) -> bool> Bumpable for F {
-    fn match_end(mut self, p: &Parser) -> usize {
-        let mut chars = p.chars();
-        let mut count = 0;
-        while let Some(c) = chars.next() {
-            if !self(c) {
-                break
-            }
-            count = chars.cur;
-        }
-        count
-    }
-}
-
-// Turn a sequence of expressions into a concatenation.
-// This only uses `Concat` if there are 2 or more expressions.
-fn rev_concat(mut exprs: Vec<Expr>) -> Expr {
-    if exprs.len() == 0 {
-        Expr::Empty
-    } else if exprs.len() == 1 {
-        exprs.pop().unwrap()
-    } else {
-        exprs.reverse();
-        Expr::Concat(exprs)
-    }
-}
-
-// Returns true if and only if the given character is allowed in a capture
-// name. Note that the first char of a capture name must not be numeric.
-fn is_valid_capture_char(c: char) -> bool {
-    c == '_' || (c >= '0' && c <= '9')
-    || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
-}
-
-/// Returns true if the give character has significance in a regex.
-pub fn is_punct(c: char) -> bool {
-    match c {
-        '\\' | '.' | '+' | '*' | '?' | '(' | ')' | '|' |
-        '[' | ']' | '{' | '}' | '^' | '$' | '#' | '&' | '-' | '~' => true,
-        _ => false,
-    }
-}
-
-fn checkadd(x: usize, y: usize) -> usize {
-    x.checked_add(y).expect("regex length overflow")
-}
-
-fn unicode_class(name: &str) -> Option<CharClass> {
-    UNICODE_CLASSES.binary_search_by(|&(s, _)| s.cmp(name)).ok().map(|i| {
-        raw_class_to_expr(UNICODE_CLASSES[i].1)
-    })
-}
-
-fn ascii_class(name: &str) -> Option<CharClass> {
-    ASCII_CLASSES.binary_search_by(|&(s, _)| s.cmp(name)).ok().map(|i| {
-        raw_class_to_expr(ASCII_CLASSES[i].1)
-    })
-}
-
-fn raw_class_to_expr(raw: &[(char, char)]) -> CharClass {
-    let range = |&(s, e)| ClassRange { start: s, end: e };
-    CharClass::new(raw.iter().map(range).collect())
-}
-
-type Class = &'static [(char, char)];
-type NamedClasses = &'static [(&'static str, Class)];
-
-const ASCII_CLASSES: NamedClasses = &[
-    // Classes must be in alphabetical order so that bsearch works.
-    // [:alnum:]      alphanumeric (== [0-9A-Za-z])
-    // [:alpha:]      alphabetic (== [A-Za-z])
-    // [:ascii:]      ASCII (== [\x00-\x7F])
-    // [:blank:]      blank (== [\t ])
-    // [:cntrl:]      control (== [\x00-\x1F\x7F])
-    // [:digit:]      digits (== [0-9])
-    // [:graph:]      graphical (== [!-~])
-    // [:lower:]      lower case (== [a-z])
-    // [:print:]      printable (== [ -~] == [ [:graph:]])
-    // [:punct:]      punctuation (== [!-/:-@[-`{-~])
-    // [:space:]      whitespace (== [\t\n\v\f\r ])
-    // [:upper:]      upper case (== [A-Z])
-    // [:word:]       word characters (== [0-9A-Za-z_])
-    // [:xdigit:]     hex digit (== [0-9A-Fa-f])
-    // Taken from: http://golang.org/pkg/regex/syntax/
-    ("alnum", &ALNUM),
-    ("alpha", &ALPHA),
-    ("ascii", &ASCII),
-    ("blank", &BLANK),
-    ("cntrl", &CNTRL),
-    ("digit", &DIGIT),
-    ("graph", &GRAPH),
-    ("lower", &LOWER),
-    ("print", &PRINT),
-    ("punct", &PUNCT),
-    ("space", &SPACE),
-    ("upper", &UPPER),
-    ("word", &WORD),
-    ("xdigit", &XDIGIT),
-];
-
-const ALNUM: Class = &[('0', '9'), ('A', 'Z'), ('a', 'z')];
-const ALPHA: Class = &[('A', 'Z'), ('a', 'z')];
-const ASCII: Class = &[('\x00', '\x7F')];
-const BLANK: Class = &[(' ', ' '), ('\t', '\t')];
-const CNTRL: Class = &[('\x00', '\x1F'), ('\x7F', '\x7F')];
-const DIGIT: Class = &[('0', '9')];
-const GRAPH: Class = &[('!', '~')];
-const LOWER: Class = &[('a', 'z')];
-const PRINT: Class = &[(' ', '~')];
-const PUNCT: Class = &[('!', '/'), (':', '@'), ('[', '`'), ('{', '~')];
-const SPACE: Class = &[('\t', '\t'), ('\n', '\n'), ('\x0B', '\x0B'),
-                       ('\x0C', '\x0C'), ('\r', '\r'), (' ', ' ')];
-const UPPER: Class = &[('A', 'Z')];
-const WORD: Class = &[('0', '9'), ('A', 'Z'), ('_', '_'), ('a', 'z')];
-const XDIGIT: Class = &[('0', '9'), ('A', 'F'), ('a', 'f')];
-
-#[cfg(test)]
-mod tests {
-    use {
-        CharClass, ClassRange, ByteClass, ByteRange,
-        Expr, Repeater,
-        ErrorKind,
-    };
-    use unicode::regex::{PERLD, PERLS, PERLW};
-    use super::{LOWER, UPPER, WORD, Flags, Parser, ascii_class};
-
-    static YI: &'static [(char, char)] = &[
-        ('\u{a000}', '\u{a48c}'), ('\u{a490}', '\u{a4c6}'),
-    ];
-
-    fn p(s: &str) -> Expr { Parser::parse(s, Flags::default()).unwrap() }
-    fn pf(s: &str, flags: Flags) -> Expr { Parser::parse(s, flags).unwrap() }
-    fn lit(c: char) -> Expr { Expr::Literal { chars: vec![c], casei: false } }
-    fn liti(c: char) -> Expr { Expr::Literal { chars: vec![c], casei: true } }
-    fn b<T>(v: T) -> Box<T> { Box::new(v) }
-    fn c(es: &[Expr]) -> Expr { Expr::Concat(es.to_vec()) }
-
-    fn pb(s: &str) -> Expr {
-        let flags = Flags { allow_bytes: true, .. Flags::default() };
-        Parser::parse(s, flags).unwrap()
-    }
-
-    fn blit(b: u8) -> Expr {
-        Expr::LiteralBytes {
-            bytes: vec![b],
-            casei: false,
-        }
-    }
-
-    fn bliti(b: u8) -> Expr {
-        Expr::LiteralBytes {
-            bytes: vec![b],
-            casei: true,
-        }
-    }
-
-    fn class(ranges: &[(char, char)]) -> CharClass {
-        let ranges = ranges.iter().cloned()
-                           .map(|(c1, c2)| ClassRange::new(c1, c2)).collect();
-        CharClass::new(ranges)
-    }
-
-    fn classes(classes: &[&[(char, char)]]) -> CharClass {
-        let mut cls = CharClass::empty();
-        for &ranges in classes {
-            cls.ranges.extend(class(ranges));
-        }
-        cls.canonicalize()
-    }
-
-    fn bclass(ranges: &[(u8, u8)]) -> ByteClass {
-        let ranges = ranges.iter().cloned()
-                           .map(|(c1, c2)| ByteRange::new(c1, c2)).collect();
-        ByteClass::new(ranges)
-    }
-
-    fn asciid() -> CharClass {
-        ascii_class("digit").unwrap()
-    }
-
-    fn asciis() -> CharClass {
-        ascii_class("space").unwrap()
-    }
-
-    fn asciiw() -> CharClass {
-        ascii_class("word").unwrap()
-    }
-
-    fn asciid_bytes() -> ByteClass {
-        asciid().to_byte_class()
-    }
-
-    fn asciis_bytes() -> ByteClass {
-        asciis().to_byte_class()
-    }
-
-    fn asciiw_bytes() -> ByteClass {
-        asciiw().to_byte_class()
-    }
-
-    #[test]
-    fn empty() {
-        assert_eq!(p(""), Expr::Empty);
-    }
-
-    #[test]
-    fn literal() {
-        assert_eq!(p("a"), lit('a'));
-        assert_eq!(pb("(?-u)a"), blit(b'a'));
-    }
-
-    #[test]
-    fn literal_string() {
-        assert_eq!(p("ab"), Expr::Concat(vec![lit('a'), lit('b')]));
-        assert_eq!(pb("(?-u)ab"), Expr::Concat(vec![blit(b'a'), blit(b'b')]));
-    }
-
-    #[test]
-    fn start_literal() {
-        assert_eq!(p("^a"), Expr::Concat(vec![
-            Expr::StartText,
-            Expr::Literal { chars: vec!['a'], casei: false },
-        ]));
-    }
-
-    #[test]
-    fn repeat_zero_or_one_greedy() {
-        assert_eq!(p("a?"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::ZeroOrOne,
-            greedy: true,
-        });
-    }
-
-    #[test]
-    fn repeat_zero_or_one_greedy_concat() {
-        assert_eq!(p("ab?"), Expr::Concat(vec![
-            lit('a'),
-            Expr::Repeat {
-                e: b(lit('b')),
-                r: Repeater::ZeroOrOne,
-                greedy: true,
-            },
-        ]));
-    }
-
-    #[test]
-    fn repeat_zero_or_one_nongreedy() {
-        assert_eq!(p("a??"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::ZeroOrOne,
-            greedy: false,
-        });
-    }
-
-    #[test]
-    fn repeat_one_or_more_greedy() {
-        assert_eq!(p("a+"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::OneOrMore,
-            greedy: true,
-        });
-    }
-
-    #[test]
-    fn repeat_one_or_more_nongreedy() {
-        assert_eq!(p("a+?"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::OneOrMore,
-            greedy: false,
-        });
-    }
-
-    #[test]
-    fn repeat_zero_or_more_greedy() {
-        assert_eq!(p("a*"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::ZeroOrMore,
-            greedy: true,
-        });
-    }
-
-    #[test]
-    fn repeat_zero_or_more_nongreedy() {
-        assert_eq!(p("a*?"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::ZeroOrMore,
-            greedy: false,
-        });
-    }
-
-    #[test]
-    fn repeat_counted_exact() {
-        assert_eq!(p("a{5}"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::Range { min: 5, max: Some(5) },
-            greedy: true,
-        });
-    }
-
-    #[test]
-    fn repeat_counted_min() {
-        assert_eq!(p("a{5,}"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::Range { min: 5, max: None },
-            greedy: true,
-        });
-    }
-
-    #[test]
-    fn repeat_counted_min_max() {
-        assert_eq!(p("a{5,10}"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::Range { min: 5, max: Some(10) },
-            greedy: true,
-        });
-    }
-
-    #[test]
-    fn repeat_counted_exact_nongreedy() {
-        assert_eq!(p("a{5}?"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::Range { min: 5, max: Some(5) },
-            greedy: false,
-        });
-    }
-
-    #[test]
-    fn repeat_counted_min_nongreedy() {
-        assert_eq!(p("a{5,}?"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::Range { min: 5, max: None },
-            greedy: false,
-        });
-    }
-
-    #[test]
-    fn repeat_counted_min_max_nongreedy() {
-        assert_eq!(p("a{5,10}?"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::Range { min: 5, max: Some(10) },
-            greedy: false,
-        });
-    }
-
-    #[test]
-    fn repeat_counted_whitespace() {
-        assert_eq!(p("a{ 5   }"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::Range { min: 5, max: Some(5) },
-            greedy: true,
-        });
-        assert_eq!(p("a{ 5 , 10 }"), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::Range { min: 5, max: Some(10) },
-            greedy: true,
-        });
-    }
-
-    #[test]
-    fn group_literal() {
-        assert_eq!(p("(a)"), Expr::Group {
-            e: b(lit('a')),
-            i: Some(1),
-            name: None,
-        });
-    }
-
-    #[test]
-    fn group_literal_concat() {
-        assert_eq!(p("(ab)"), Expr::Group {
-            e: b(c(&[lit('a'), lit('b')])),
-            i: Some(1),
-            name: None,
-        });
-    }
-
-    #[test]
-    fn alt_two() {
-        assert_eq!(p("a|b"), Expr::Alternate(vec![lit('a'), lit('b')]));
-    }
-
-    #[test]
-    fn alt_many() {
-        assert_eq!(p("a|b|c"), Expr::Alternate(vec![
-            lit('a'), lit('b'), lit('c'),
-        ]));
-    }
-
-    #[test]
-    fn alt_many_concat() {
-        assert_eq!(p("ab|bc|cd"), Expr::Alternate(vec![
-            c(&[lit('a'), lit('b')]),
-            c(&[lit('b'), lit('c')]),
-            c(&[lit('c'), lit('d')]),
-        ]));
-    }
-
-    #[test]
-    fn alt_group_two() {
-        assert_eq!(p("(a|b)"), Expr::Group {
-            e: b(Expr::Alternate(vec![lit('a'), lit('b')])),
-            i: Some(1),
-            name: None,
-        });
-    }
-
-    #[test]
-    fn alt_group_many() {
-        assert_eq!(p("(a|b|c)"), Expr::Group {
-            e: b(Expr::Alternate(vec![lit('a'), lit('b'), lit('c')])),
-            i: Some(1),
-            name: None,
-        });
-    }
-
-    #[test]
-    fn alt_group_many_concat() {
-        assert_eq!(p("(ab|bc|cd)"), Expr::Group {
-            e: b(Expr::Alternate(vec![
-                c(&[lit('a'), lit('b')]),
-                c(&[lit('b'), lit('c')]),
-                c(&[lit('c'), lit('d')]),
-            ])),
-            i: Some(1),
-            name: None,
-        });
-    }
-
-    #[test]
-    fn alt_group_nested() {
-        assert_eq!(p("(ab|(bc|(cd)))"), Expr::Group {
-            e: b(Expr::Alternate(vec![
-                c(&[lit('a'), lit('b')]),
-                Expr::Group {
-                    e: b(Expr::Alternate(vec![
-                        c(&[lit('b'), lit('c')]),
-                        Expr::Group {
-                            e: b(c(&[lit('c'), lit('d')])),
-                            i: Some(3),
-                            name: None,
-                        }
-                    ])),
-                    i: Some(2),
-                    name: None,
-                },
-            ])),
-            i: Some(1),
-            name: None,
-        });
-    }
-
-    #[test]
-    fn group_name() {
-        assert_eq!(p("(?P<foo>a)"), Expr::Group {
-            e: b(lit('a')),
-            i: Some(1),
-            name: Some("foo".into()),
-        });
-    }
-
-    #[test]
-    fn group_no_capture() {
-        assert_eq!(p("(?:a)"), Expr::Group {
-            e: b(lit('a')),
-            i: None,
-            name: None,
-        });
-    }
-
-    #[test]
-    fn group_flags() {
-        assert_eq!(p("(?i:a)"), Expr::Group {
-            e: b(liti('a')),
-            i: None,
-            name: None,
-        });
-        assert_eq!(pb("(?i-u:a)"), Expr::Group {
-            e: b(bliti(b'a')),
-            i: None,
-            name: None,
-        });
-    }
-
-    #[test]
-    fn group_flags_returned() {
-        assert_eq!(p("(?i:a)a"), c(&[
-            Expr::Group {
-                e: b(liti('a')),
-                i: None,
-                name: None,
-            },
-            lit('a'),
-        ]));
-        assert_eq!(pb("(?i-u:a)a"), c(&[
-            Expr::Group {
-                e: b(bliti(b'a')),
-                i: None,
-                name: None,
-            },
-            lit('a'),
-        ]));
-    }
-
-    #[test]
-    fn group_flags_retained() {
-        assert_eq!(p("(?i)(?-i:a)a"), c(&[
-            Expr::Group {
-                e: b(lit('a')),
-                i: None,
-                name: None,
-            },
-            liti('a'),
-        ]));
-        assert_eq!(pb("(?i-u)(?u-i:a)a"), c(&[
-            Expr::Group {
-                e: b(lit('a')),
-                i: None,
-                name: None,
-            },
-            bliti(b'a'),
-        ]));
-    }
-
-    #[test]
-    fn flags_inline() {
-        assert_eq!(p("(?i)a"), liti('a'));
-    }
-
-    #[test]
-    fn flags_inline_multiple() {
-        assert_eq!(p("(?is)a."), c(&[liti('a'), Expr::AnyChar]));
-    }
-
-    #[test]
-    fn flags_inline_multiline() {
-        assert_eq!(p("(?m)^(?-m)$"), c(&[Expr::StartLine, Expr::EndText]));
-    }
-
-    #[test]
-    fn flags_inline_swap_greed() {
-        assert_eq!(p("(?U)a*a*?(?i-U)a*a*?"), c(&[
-            Expr::Repeat {
-                e: b(lit('a')),
-                r: Repeater::ZeroOrMore,
-                greedy: false,
-            },
-            Expr::Repeat {
-                e: b(lit('a')),
-                r: Repeater::ZeroOrMore,
-                greedy: true,
-            },
-            Expr::Repeat {
-                e: b(liti('a')),
-                r: Repeater::ZeroOrMore,
-                greedy: true,
-            },
-            Expr::Repeat {
-                e: b(liti('a')),
-                r: Repeater::ZeroOrMore,
-                greedy: false,
-            },
-        ]));
-    }
-
-    #[test]
-    fn flags_inline_multiple_negate_one() {
-        assert_eq!(p("(?is)a.(?i-s)a."), c(&[
-            liti('a'), Expr::AnyChar, liti('a'), Expr::AnyCharNoNL,
-        ]));
-    }
-
-    #[test]
-    fn any_byte() {
-        assert_eq!(
-            pb("(?-u).(?u)."), c(&[Expr::AnyByteNoNL, Expr::AnyCharNoNL]));
-        assert_eq!(
-            pb("(?s)(?-u).(?u)."), c(&[Expr::AnyByte, Expr::AnyChar]));
-    }
-
-    #[test]
-    fn flags_inline_negate() {
-        assert_eq!(p("(?i)a(?-i)a"), c(&[liti('a'), lit('a')]));
-    }
-
-    #[test]
-    fn flags_group_inline() {
-        assert_eq!(p("(a(?i)a)a"), c(&[
-            Expr::Group {
-                e: b(c(&[lit('a'), liti('a')])),
-                i: Some(1),
-                name: None,
-            },
-            lit('a'),
-        ]));
-    }
-
-    #[test]
-    fn flags_group_inline_retain() {
-        assert_eq!(p("(?i)((?-i)a)a"), c(&[
-            Expr::Group {
-                e: b(lit('a')),
-                i: Some(1),
-                name: None,
-            },
-            liti('a'),
-        ]));
-    }
-
-    #[test]
-    fn flags_default_casei() {
-        let flags = Flags { casei: true, .. Flags::default() };
-        assert_eq!(pf("a", flags), liti('a'));
-    }
-
-    #[test]
-    fn flags_default_multi() {
-        let flags = Flags { multi: true, .. Flags::default() };
-        assert_eq!(pf("^", flags), Expr::StartLine);
-    }
-
-    #[test]
-    fn flags_default_dotnl() {
-        let flags = Flags { dotnl: true, .. Flags::default() };
-        assert_eq!(pf(".", flags), Expr::AnyChar);
-    }
-
-    #[test]
-    fn flags_default_swap_greed() {
-        let flags = Flags { swap_greed: true, .. Flags::default() };
-        assert_eq!(pf("a+", flags), Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::OneOrMore,
-            greedy: false,
-        });
-    }
-
-    #[test]
-    fn flags_default_ignore_space() {
-        let flags = Flags { ignore_space: true, .. Flags::default() };
-        assert_eq!(pf(" a ", flags), lit('a'));
-    }
-
-    #[test]
-    fn escape_simple() {
-        assert_eq!(p(r"\a\f\t\n\r\v"), c(&[
-            lit('\x07'), lit('\x0C'), lit('\t'),
-            lit('\n'), lit('\r'), lit('\x0B'),
-        ]));
-    }
-
-    #[test]
-    fn escape_boundaries() {
-        assert_eq!(p(r"\A\z\b\B"), c(&[
-            Expr::StartText, Expr::EndText,
-            Expr::WordBoundary, Expr::NotWordBoundary,
-        ]));
-        assert_eq!(pb(r"(?-u)\b\B"), c(&[
-            Expr::WordBoundaryAscii, Expr::NotWordBoundaryAscii,
-        ]));
-    }
-
-    #[test]
-    fn escape_punctuation() {
-        assert_eq!(p(r"\\\.\+\*\?\(\)\|\[\]\{\}\^\$\#"), c(&[
-            lit('\\'), lit('.'), lit('+'), lit('*'), lit('?'),
-            lit('('), lit(')'), lit('|'), lit('['), lit(']'),
-            lit('{'), lit('}'), lit('^'), lit('$'), lit('#'),
-        ]));
-    }
-
-    #[test]
-    fn escape_octal() {
-        assert_eq!(p(r"\123"), lit('S'));
-        assert_eq!(p(r"\1234"), c(&[lit('S'), lit('4')]));
-
-        assert_eq!(pb(r"(?-u)\377"), blit(0xFF));
-    }
-
-    #[test]
-    fn escape_hex2() {
-        assert_eq!(p(r"\x53"), lit('S'));
-        assert_eq!(p(r"\x534"), c(&[lit('S'), lit('4')]));
-
-        assert_eq!(pb(r"(?-u)\xff"), blit(0xFF));
-        assert_eq!(pb(r"(?-u)\x00"), blit(0x0));
-        assert_eq!(pb(r"(?-u)[\x00]"),
-                   Expr::ClassBytes(bclass(&[(b'\x00', b'\x00')])));
-        assert_eq!(pb(r"(?-u)[^\x00]"),
-                   Expr::ClassBytes(bclass(&[(b'\x01', b'\xFF')])));
-    }
-
-    #[test]
-    fn escape_hex() {
-        assert_eq!(p(r"\x{53}"), lit('S'));
-        assert_eq!(p(r"\x{53}4"), c(&[lit('S'), lit('4')]));
-        assert_eq!(p(r"\x{2603}"), lit('\u{2603}'));
-
-        assert_eq!(pb(r"(?-u)\x{00FF}"), blit(0xFF));
-    }
-
-    #[test]
-    fn escape_unicode_name() {
-        assert_eq!(p(r"\p{Yi}"), Expr::Class(class(YI)));
-    }
-
-    #[test]
-    fn escape_unicode_letter() {
-        assert_eq!(p(r"\pZ"), Expr::Class(class(&[
-            ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'),
-            ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'),
-            ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'),
-            ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}'),
-        ])));
-    }
-
-    #[test]
-    fn escape_unicode_name_case_fold() {
-        assert_eq!(p(r"(?i)\p{Yi}"), Expr::Class(class(YI).case_fold()));
-    }
-
-    #[test]
-    fn escape_unicode_letter_case_fold() {
-        assert_eq!(p(r"(?i)\pZ"), Expr::Class(class(&[
-            ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'),
-            ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'),
-            ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'),
-            ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}'),
-        ]).case_fold()));
-    }
-
-    #[test]
-    fn escape_unicode_name_negate() {
-        assert_eq!(p(r"\P{Yi}"), Expr::Class(class(YI).negate()));
-    }
-
-    #[test]
-    fn escape_unicode_letter_negate() {
-        assert_eq!(p(r"\PZ"), Expr::Class(class(&[
-            ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'),
-            ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'),
-            ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'),
-            ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}'),
-        ]).negate()));
-    }
-
-    #[test]
-    fn escape_unicode_name_negate_case_fold() {
-        assert_eq!(p(r"(?i)\P{Yi}"),
-                   Expr::Class(class(YI).negate().case_fold()));
-    }
-
-    #[test]
-    fn escape_unicode_letter_negate_case_fold() {
-        assert_eq!(p(r"(?i)\PZ"), Expr::Class(class(&[
-            ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'),
-            ('\u{1680}', '\u{1680}'), ('\u{2000}', '\u{200a}'),
-            ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'),
-            ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}'),
-        ]).negate().case_fold()));
-    }
-
-    #[test]
-    fn escape_perl_d() {
-        assert_eq!(p(r"\d"), Expr::Class(class(PERLD)));
-        assert_eq!(pb(r"(?-u)\d"), Expr::Class(asciid()));
-    }
-
-    #[test]
-    fn escape_perl_s() {
-        assert_eq!(p(r"\s"), Expr::Class(class(PERLS)));
-        assert_eq!(pb(r"(?-u)\s"), Expr::Class(asciis()));
-    }
-
-    #[test]
-    fn escape_perl_w() {
-        assert_eq!(p(r"\w"), Expr::Class(class(PERLW)));
-        assert_eq!(pb(r"(?-u)\w"), Expr::Class(asciiw()));
-    }
-
-    #[test]
-    fn escape_perl_d_negate() {
-        assert_eq!(p(r"\D"), Expr::Class(class(PERLD).negate()));
-        assert_eq!(pb(r"(?-u)\D"), Expr::Class(asciid().negate()));
-    }
-
-    #[test]
-    fn escape_perl_s_negate() {
-        assert_eq!(p(r"\S"), Expr::Class(class(PERLS).negate()));
-        assert_eq!(pb(r"(?-u)\S"), Expr::Class(asciis().negate()));
-    }
-
-    #[test]
-    fn escape_perl_w_negate() {
-        assert_eq!(p(r"\W"), Expr::Class(class(PERLW).negate()));
-        assert_eq!(pb(r"(?-u)\W"), Expr::Class(asciiw().negate()));
-    }
-
-    #[test]
-    fn escape_perl_d_case_fold() {
-        assert_eq!(p(r"(?i)\d"), Expr::Class(class(PERLD).case_fold()));
-        assert_eq!(pb(r"(?i-u)\d"), Expr::Class(asciid().case_fold()));
-    }
-
-    #[test]
-    fn escape_perl_s_case_fold() {
-        assert_eq!(p(r"(?i)\s"), Expr::Class(class(PERLS).case_fold()));
-        assert_eq!(pb(r"(?i-u)\s"), Expr::Class(asciis().case_fold()));
-    }
-
-    #[test]
-    fn escape_perl_w_case_fold() {
-        assert_eq!(p(r"(?i)\w"), Expr::Class(class(PERLW).case_fold()));
-        assert_eq!(pb(r"(?i-u)\w"), Expr::Class(asciiw().case_fold()));
-    }
-
-    #[test]
-    fn escape_perl_d_case_fold_negate() {
-        assert_eq!(p(r"(?i)\D"),
-                   Expr::Class(class(PERLD).case_fold().negate()));
-        let bytes = asciid().case_fold().negate();
-        assert_eq!(pb(r"(?i-u)\D"), Expr::Class(bytes));
-    }
-
-    #[test]
-    fn escape_perl_s_case_fold_negate() {
-        assert_eq!(p(r"(?i)\S"),
-                   Expr::Class(class(PERLS).case_fold().negate()));
-        let bytes = asciis().case_fold().negate();
-        assert_eq!(pb(r"(?i-u)\S"), Expr::Class(bytes));
-    }
-
-    #[test]
-    fn escape_perl_w_case_fold_negate() {
-        assert_eq!(p(r"(?i)\W"),
-                   Expr::Class(class(PERLW).case_fold().negate()));
-        let bytes = asciiw().case_fold().negate();
-        assert_eq!(pb(r"(?i-u)\W"), Expr::Class(bytes));
-    }
-
-    #[test]
-    fn class_singleton() {
-        assert_eq!(p(r"[a]"), Expr::Class(class(&[('a', 'a')])));
-        assert_eq!(p(r"[\x00]"), Expr::Class(class(&[('\x00', '\x00')])));
-        assert_eq!(p(r"[\n]"), Expr::Class(class(&[('\n', '\n')])));
-        assert_eq!(p("[\n]"), Expr::Class(class(&[('\n', '\n')])));
-
-        assert_eq!(pb(r"(?-u)[a]"), Expr::ClassBytes(bclass(&[(b'a', b'a')])));
-        assert_eq!(pb(r"(?-u)[\x00]"), Expr::ClassBytes(bclass(&[(0, 0)])));
-        assert_eq!(pb(r"(?-u)[\xFF]"),
-                   Expr::ClassBytes(bclass(&[(0xFF, 0xFF)])));
-        assert_eq!(pb("(?-u)[\n]"),
-                   Expr::ClassBytes(bclass(&[(b'\n', b'\n')])));
-        assert_eq!(pb(r"(?-u)[\n]"),
-                   Expr::ClassBytes(bclass(&[(b'\n', b'\n')])));
-    }
-
-    #[test]
-    fn class_singleton_negate() {
-        assert_eq!(p(r"[^a]"), Expr::Class(class(&[
-            ('\x00', '\x60'), ('\x62', '\u{10FFFF}'),
-        ])));
-        assert_eq!(p(r"[^\x00]"), Expr::Class(class(&[
-            ('\x01', '\u{10FFFF}'),
-        ])));
-        assert_eq!(p(r"[^\n]"), Expr::Class(class(&[
-            ('\x00', '\x09'), ('\x0b', '\u{10FFFF}'),
-        ])));
-        assert_eq!(p("[^\n]"), Expr::Class(class(&[
-            ('\x00', '\x09'), ('\x0b', '\u{10FFFF}'),
-        ])));
-
-        assert_eq!(pb(r"(?-u)[^a]"), Expr::ClassBytes(bclass(&[
-            (0x00, 0x60), (0x62, 0xFF),
-        ])));
-        assert_eq!(pb(r"(?-u)[^\x00]"), Expr::ClassBytes(bclass(&[
-            (0x01, 0xFF),
-        ])));
-        assert_eq!(pb(r"(?-u)[^\n]"), Expr::ClassBytes(bclass(&[
-            (0x00, 0x09), (0x0B, 0xFF),
-        ])));
-        assert_eq!(pb("(?-u)[^\n]"), Expr::ClassBytes(bclass(&[
-            (0x00, 0x09), (0x0B, 0xFF),
-        ])));
-    }
-
-    #[test]
-    fn class_singleton_class() {
-        assert_eq!(p(r"[\d]"), Expr::Class(class(PERLD)));
-        assert_eq!(p(r"[\p{Yi}]"), Expr::Class(class(YI)));
-
-        let bytes = class(PERLD).to_byte_class();
-        assert_eq!(pb(r"(?-u)[\d]"), Expr::ClassBytes(bytes));
-    }
-
-    #[test]
-    fn class_singleton_class_negate() {
-        assert_eq!(p(r"[^\d]"), Expr::Class(class(PERLD).negate()));
-        assert_eq!(p(r"[^\w]"), Expr::Class(class(PERLW).negate()));
-        assert_eq!(p(r"[^\s]"), Expr::Class(class(PERLS).negate()));
-
-        let bytes = asciid_bytes().negate();
-        assert_eq!(pb(r"(?-u)[^\d]"), Expr::ClassBytes(bytes));
-        let bytes = asciiw_bytes().negate();
-        assert_eq!(pb(r"(?-u)[^\w]"), Expr::ClassBytes(bytes));
-        let bytes = asciis_bytes().negate();
-        assert_eq!(pb(r"(?-u)[^\s]"), Expr::ClassBytes(bytes));
-    }
-
-    #[test]
-    fn class_singleton_class_negate_negate() {
-        assert_eq!(p(r"[^\D]"), Expr::Class(class(PERLD)));
-        assert_eq!(p(r"[^\W]"), Expr::Class(class(PERLW)));
-        assert_eq!(p(r"[^\S]"), Expr::Class(class(PERLS)));
-
-        assert_eq!(pb(r"(?-u)[^\D]"), Expr::ClassBytes(asciid_bytes()));
-        assert_eq!(pb(r"(?-u)[^\W]"), Expr::ClassBytes(asciiw_bytes()));
-        assert_eq!(pb(r"(?-u)[^\S]"), Expr::ClassBytes(asciis_bytes()));
-    }
-
-    #[test]
-    fn class_singleton_class_casei() {
-        assert_eq!(p(r"(?i)[\d]"), Expr::Class(class(PERLD).case_fold()));
-        assert_eq!(p(r"(?i)[\p{Yi}]"), Expr::Class(class(YI).case_fold()));
-
-        assert_eq!(pb(r"(?i-u)[\d]"),
-                   Expr::ClassBytes(asciid_bytes().case_fold()));
-    }
-
-    #[test]
-    fn class_singleton_class_negate_casei() {
-        assert_eq!(p(r"(?i)[^\d]"),
-                   Expr::Class(class(PERLD).case_fold().negate()));
-        assert_eq!(p(r"(?i)[^\w]"),
-                   Expr::Class(class(PERLW).case_fold().negate()));
-        assert_eq!(p(r"(?i)[^\s]"),
-                   Expr::Class(class(PERLS).case_fold().negate()));
-
-        let bytes = asciid_bytes().case_fold().negate();
-        assert_eq!(pb(r"(?i-u)[^\d]"), Expr::ClassBytes(bytes));
-        let bytes = asciiw_bytes().case_fold().negate();
-        assert_eq!(pb(r"(?i-u)[^\w]"), Expr::ClassBytes(bytes));
-        let bytes = asciis_bytes().case_fold().negate();
-        assert_eq!(pb(r"(?i-u)[^\s]"), Expr::ClassBytes(bytes));
-    }
-
-    #[test]
-    fn class_singleton_class_negate_negate_casei() {
-        assert_eq!(p(r"(?i)[^\D]"), Expr::Class(class(PERLD).case_fold()));
-        assert_eq!(p(r"(?i)[^\W]"), Expr::Class(class(PERLW).case_fold()));
-        assert_eq!(p(r"(?i)[^\S]"), Expr::Class(class(PERLS).case_fold()));
-
-        assert_eq!(pb(r"(?i-u)[^\D]"),
-                   Expr::ClassBytes(asciid_bytes().case_fold()));
-        assert_eq!(pb(r"(?i-u)[^\W]"),
-                   Expr::ClassBytes(asciiw_bytes().case_fold()));
-        assert_eq!(pb(r"(?i-u)[^\S]"),
-                   Expr::ClassBytes(asciis_bytes().case_fold()));
-    }
-
-    #[test]
-    fn class_multiple_class() {
-        assert_eq!(p(r"[\d\p{Yi}]"), Expr::Class(classes(&[
-            PERLD, YI,
-        ])));
-    }
-
-    #[test]
-    fn class_multiple_class_negate() {
-        assert_eq!(p(r"[^\d\p{Yi}]"), Expr::Class(classes(&[
-            PERLD, YI,
-        ]).negate()));
-    }
-
-    #[test]
-    fn class_multiple_class_negate_negate() {
-        let nperlw = class(PERLW).negate();
-        let nyi = class(YI).negate();
-        let cls = CharClass::empty().merge(nperlw).merge(nyi);
-        assert_eq!(p(r"[^\W\P{Yi}]"), Expr::Class(cls.negate()));
-    }
-
-    #[test]
-    fn class_multiple_class_casei() {
-        assert_eq!(p(r"(?i)[\d\p{Yi}]"), Expr::Class(classes(&[
-            PERLD, YI,
-        ]).case_fold()));
-    }
-
-    #[test]
-    fn class_multiple_class_negate_casei() {
-        assert_eq!(p(r"(?i)[^\d\p{Yi}]"), Expr::Class(classes(&[
-            PERLD, YI,
-        ]).case_fold().negate()));
-    }
-
-    #[test]
-    fn class_multiple_class_negate_negate_casei() {
-        let nperlw = class(PERLW).negate();
-        let nyi = class(YI).negate();
-        let class = CharClass::empty().merge(nperlw).merge(nyi);
-        assert_eq!(p(r"(?i)[^\W\P{Yi}]"),
-                   Expr::Class(class.case_fold().negate()));
-    }
-
-    #[test]
-    fn class_class_hypen() {
-        assert_eq!(p(r"[\p{Yi}-]"), Expr::Class(classes(&[
-            &[('-', '-')], YI,
-        ])));
-        assert_eq!(p(r"[\p{Yi}-a]"), Expr::Class(classes(&[
-            &[('-', '-')], &[('a', 'a')], YI,
-        ])));
-    }
-
-    #[test]
-    fn class_brackets() {
-        assert_eq!(p(r"[]]"), Expr::Class(class(&[(']', ']')])));
-        assert_eq!(p(r"[]\[]"), Expr::Class(class(&[('[', '['), (']', ']')])));
-        assert_eq!(p(r"[\[]]"), Expr::Concat(vec![
-            Expr::Class(class(&[('[', '[')])),
-            lit(']'),
-        ]));
-    }
-
-    #[test]
-    fn class_brackets_hypen() {
-        assert_eq!(p("[]-]"), Expr::Class(class(&[('-', '-'), (']', ']')])));
-        assert_eq!(p("[-]]"), Expr::Concat(vec![
-            Expr::Class(class(&[('-', '-')])),
-            lit(']'),
-        ]));
-    }
-
-    #[test]
-    fn class_special_escaped_set_chars() {
-        // These tests ensure that some special characters require escaping
-        // for use in character classes. The intention is to use these
-        // characters to implement sets as described in UTC#18 RL1.3. Once
-        // that's done, these tests should be removed and replaced with others.
-        assert_eq!(p(r"[\[]"), Expr::Class(class(&[('[', '[')])));
-        assert_eq!(p(r"[&]"), Expr::Class(class(&[('&', '&')])));
-        assert_eq!(p(r"[\&]"), Expr::Class(class(&[('&', '&')])));
-        assert_eq!(p(r"[\&\&]"), Expr::Class(class(&[('&', '&')])));
-        assert_eq!(p(r"[\x00-&]"), Expr::Class(class(&[('\u{0}', '&')])));
-        assert_eq!(p(r"[&-\xFF]"), Expr::Class(class(&[('&', '\u{FF}')])));
-
-        assert_eq!(p(r"[~]"), Expr::Class(class(&[('~', '~')])));
-        assert_eq!(p(r"[\~]"), Expr::Class(class(&[('~', '~')])));
-        assert_eq!(p(r"[\~\~]"), Expr::Class(class(&[('~', '~')])));
-        assert_eq!(p(r"[\x00-~]"), Expr::Class(class(&[('\u{0}', '~')])));
-        assert_eq!(p(r"[~-\xFF]"), Expr::Class(class(&[('~', '\u{FF}')])));
-
-        assert_eq!(p(r"[+-\-]"), Expr::Class(class(&[('+', '-')])));
-        assert_eq!(p(r"[a-a\--\xFF]"), Expr::Class(class(&[
-            ('-', '\u{FF}'),
-        ])));
-    }
-
-    #[test]
-    fn class_overlapping() {
-        assert_eq!(p("[a-fd-h]"), Expr::Class(class(&[('a', 'h')])));
-        assert_eq!(p("[a-fg-m]"), Expr::Class(class(&[('a', 'm')])));
-
-        assert_eq!(pb("(?-u)[a-fd-h]"),
-                   Expr::ClassBytes(bclass(&[(b'a', b'h')])));
-        assert_eq!(pb("(?-u)[a-fg-m]"),
-                   Expr::ClassBytes(bclass(&[(b'a', b'm')])));
-    }
-
-    #[test]
-    fn ascii_classes() {
-        assert_eq!(p("[:blank:]"), Expr::Class(class(&[
-            (':', ':'), ('a', 'b'), ('k', 'l'), ('n', 'n'),
-        ])));
-        assert_eq!(p("[[:upper:]]"), Expr::Class(class(UPPER)));
-
-        assert_eq!(pb("(?-u)[[:upper:]]"),
-                   Expr::ClassBytes(class(UPPER).to_byte_class()));
-    }
-
-    #[test]
-    fn ascii_classes_not() {
-        assert_eq!(p("[:abc:]"),
-                   Expr::Class(class(&[(':', ':'), ('a', 'c')])));
-        assert_eq!(pb("(?-u)[:abc:]"),
-                   Expr::ClassBytes(bclass(&[(b':', b':'), (b'a', b'c')])));
-    }
-
-    #[test]
-    fn ascii_classes_multiple() {
-        assert_eq!(p("[[:lower:][:upper:]]"),
-                   Expr::Class(classes(&[UPPER, LOWER])));
-
-        assert_eq!(pb("(?-u)[[:lower:][:upper:]]"),
-                   Expr::ClassBytes(classes(&[UPPER, LOWER]).to_byte_class()));
-    }
-
-    #[test]
-    fn ascii_classes_negate() {
-        assert_eq!(p("[[:^upper:]]"), Expr::Class(class(UPPER).negate()));
-        assert_eq!(p("[^[:^upper:]]"), Expr::Class(class(UPPER)));
-
-        assert_eq!(pb("(?-u)[[:^upper:]]"),
-                   Expr::ClassBytes(class(UPPER).to_byte_class().negate()));
-        assert_eq!(pb("(?-u)[^[:^upper:]]"),
-                   Expr::ClassBytes(class(UPPER).to_byte_class()));
-    }
-
-    #[test]
-    fn ascii_classes_negate_multiple() {
-        let (nlower, nword) = (class(LOWER).negate(), class(WORD).negate());
-        let cls = CharClass::empty().merge(nlower).merge(nword);
-        assert_eq!(p("[[:^lower:][:^word:]]"), Expr::Class(cls.clone()));
-        assert_eq!(p("[^[:^lower:][:^word:]]"), Expr::Class(cls.negate()));
-    }
-
-    #[test]
-    fn ascii_classes_case_fold() {
-        assert_eq!(p("(?i)[[:upper:]]"),
-                   Expr::Class(class(UPPER).case_fold()));
-
-        assert_eq!(pb("(?i-u)[[:upper:]]"),
-                   Expr::ClassBytes(class(UPPER).to_byte_class().case_fold()));
-    }
-
-    #[test]
-    fn ascii_classes_negate_case_fold() {
-        assert_eq!(p("(?i)[[:^upper:]]"),
-                   Expr::Class(class(UPPER).case_fold().negate()));
-        assert_eq!(p("(?i)[^[:^upper:]]"),
-                   Expr::Class(class(UPPER).case_fold()));
-
-        assert_eq!(pb("(?i-u)[[:^upper:]]"),
-                   Expr::ClassBytes(
-                       class(UPPER).to_byte_class().case_fold().negate()));
-        assert_eq!(pb("(?i-u)[^[:^upper:]]"),
-                   Expr::ClassBytes(class(UPPER).to_byte_class().case_fold()));
-    }
-
-    #[test]
-    fn single_class_negate_case_fold() {
-        assert_eq!(p("(?i)[^x]"),
-                   Expr::Class(class(&[('x', 'x')]).case_fold().negate()));
-
-        assert_eq!(pb("(?i-u)[^x]"),
-                   Expr::ClassBytes(
-                       class(&[('x', 'x')])
-                       .to_byte_class().case_fold().negate()));
-    }
-
-    #[test]
-    fn ignore_space_empty() {
-        assert_eq!(p("(?x) "), Expr::Empty);
-    }
-
-    #[test]
-    fn ignore_space_literal() {
-        assert_eq!(p("(?x) a b c"), Expr::Concat(vec![
-            lit('a'), lit('b'), lit('c'),
-        ]));
-    }
-
-    #[test]
-    fn ignore_space_literal_off() {
-        assert_eq!(p("(?x) a b c(?-x) a"), Expr::Concat(vec![
-            lit('a'), lit('b'), lit('c'), lit(' '), lit('a'),
-        ]));
-    }
-
-    #[test]
-    fn ignore_space_class() {
-        assert_eq!(p("(?x)[a
-        - z
-]"), Expr::Class(class(&[('a', 'z')])));
-        assert_eq!(p("(?x)[  ^   a
-        - z
-]"), Expr::Class(class(&[('a', 'z')]).negate()));
-    }
-
-    #[test]
-    fn ignore_space_escape() {
-        assert_eq!(p(r"(?x)\ d"), Expr::Class(class(PERLD)));
-        assert_eq!(p(r"(?x)\
-                     D"), Expr::Class(class(PERLD).negate()));
-    }
-
-    #[test]
-    fn ignore_space_comments() {
-        assert_eq!(p(r"(?x)(?P<foo>
-    a # comment 1
-)(?P<bar>
-    z # comment 2
-)"), Expr::Concat(vec![
-        Expr::Group {
-            e: Box::new(lit('a')),
-            i: Some(1),
-            name: Some("foo".into()),
-        },
-        Expr::Group {
-            e: Box::new(lit('z')),
-            i: Some(2),
-            name: Some("bar".into()),
-        },
-    ]));
-    }
-
-    #[test]
-    fn ignore_space_comments_re_enable() {
-        assert_eq!(p(r"(?x)a # hi
-(?-x:#) # sweet"), Expr::Concat(vec![
-            lit('a'),
-            Expr::Group {
-                e: Box::new(lit('#')),
-                i: None,
-                name: None,
-            },
-        ]));
-    }
-
-    #[test]
-    fn ignore_space_escape_punctuation() {
-        assert_eq!(p(r"(?x)\\\.\+\*\?\(\)\|\[\]\{\}\^\$\#"), c(&[
-            lit('\\'), lit('.'), lit('+'), lit('*'), lit('?'),
-            lit('('), lit(')'), lit('|'), lit('['), lit(']'),
-            lit('{'), lit('}'), lit('^'), lit('$'), lit('#'),
-        ]));
-    }
-
-    #[test]
-    fn ignore_space_escape_hash() {
-        assert_eq!(p(r"(?x)a\# # hi there"), Expr::Concat(vec![
-            lit('a'),
-            lit('#'),
-        ]));
-    }
-
-    // Test every single possible error case.
-
-    macro_rules! test_err {
-        ($re:expr, $pos:expr, $kind:expr) => {
-            test_err!($re, $pos, $kind, Flags::default());
-        };
-        ($re:expr, $pos:expr, $kind:expr, $flags:expr) => {{
-            let err = Parser::parse($re, $flags).unwrap_err();
-            assert_eq!($pos, err.pos);
-            assert_eq!($kind, err.kind);
-            assert!($re.contains(&err.surround));
-        }}
-    }
-
-    #[test]
-    fn invalid_utf8_not_allowed() {
-        // let flags = Flags { unicode: false, .. Flags::default() };
-        test_err!(r"(?-u)\xFF", 9, ErrorKind::InvalidUtf8);
-        test_err!(r"(?-u).", 5, ErrorKind::InvalidUtf8);
-        test_err!(r"(?-u)(?s).", 9, ErrorKind::InvalidUtf8);
-        test_err!(r"(?-u)[\x00-\x80]", 15, ErrorKind::InvalidUtf8);
-        test_err!(r"(?-u)\222", 9, ErrorKind::InvalidUtf8);
-        test_err!(r"(?-u)\x{0080}", 13, ErrorKind::InvalidUtf8);
-    }
-
-    #[test]
-    fn unicode_char_not_allowed() {
-        let flags = Flags { allow_bytes: true, .. Flags::default() };
-        test_err!("☃(?-u:☃)", 7, ErrorKind::UnicodeNotAllowed, flags);
-    }
-
-    #[test]
-    fn unicode_class_not_allowed() {
-        let flags = Flags { allow_bytes: true, .. Flags::default() };
-        test_err!(r"☃(?-u:\pL)", 9, ErrorKind::UnicodeNotAllowed, flags);
-    }
-
-    #[test]
-    fn unicode_class_literal_not_allowed() {
-        let flags = Flags { allow_bytes: true, .. Flags::default() };
-        test_err!(r"(?-u)[☃]", 6, ErrorKind::UnicodeNotAllowed, flags);
-        test_err!(r"(?-u)[☃-☃]", 6, ErrorKind::UnicodeNotAllowed, flags);
-    }
-
-    #[test]
-    fn unicode_hex_not_allowed() {
-        let flags = Flags { allow_bytes: true, .. Flags::default() };
-        test_err!(r"(?-u)\x{FFFF}", 13, ErrorKind::UnicodeNotAllowed, flags);
-        test_err!(r"(?-u)\x{100}", 12, ErrorKind::UnicodeNotAllowed, flags);
-    }
-
-    #[test]
-    fn unicode_octal_not_allowed() {
-        let flags = Flags { allow_bytes: true, .. Flags::default() };
-        test_err!(r"(?-u)\400", 9, ErrorKind::UnicodeNotAllowed, flags);
-    }
-
-    #[test]
-    fn error_repeat_no_expr_simple() {
-        test_err!("(*", 1, ErrorKind::RepeaterExpectsExpr);
-    }
-
-    #[test]
-    fn error_repeat_no_expr_counted() {
-        test_err!("({5}", 1, ErrorKind::RepeaterExpectsExpr);
-    }
-
-    #[test]
-    fn error_repeat_beginning_counted() {
-        test_err!("{5}", 0, ErrorKind::RepeaterExpectsExpr);
-    }
-
-    #[test]
-    fn error_repeat_illegal_exprs_simple() {
-        test_err!("a**", 2, ErrorKind::RepeaterUnexpectedExpr(Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::ZeroOrMore,
-            greedy: true,
-        }));
-        test_err!("a|*", 2,
-            ErrorKind::RepeaterUnexpectedExpr(Expr::Alternate(vec![lit('a')]))
-        );
-    }
-
-    #[test]
-    fn error_repeat_illegal_exprs_counted() {
-        test_err!("a*{5}", 2, ErrorKind::RepeaterUnexpectedExpr(Expr::Repeat {
-            e: b(lit('a')),
-            r: Repeater::ZeroOrMore,
-            greedy: true,
-        }));
-        test_err!("a|{5}", 2,
-            ErrorKind::RepeaterUnexpectedExpr(Expr::Alternate(vec![lit('a')]))
-        );
-    }
-
-    #[test]
-    fn error_repeat_empty_number() {
-        test_err!("a{}", 2, ErrorKind::MissingBase10);
-    }
-
-    #[test]
-    fn error_repeat_eof() {
-        test_err!("a{5", 3, ErrorKind::UnclosedRepeat);
-    }
-
-    #[test]
-    fn error_repeat_empty_number_eof() {
-        test_err!("a{xyz", 5, ErrorKind::InvalidBase10("xyz".into()));
-        test_err!("a{12,xyz", 8, ErrorKind::InvalidBase10("xyz".into()));
-    }
-
-    #[test]
-    fn error_repeat_invalid_number() {
-        test_err!("a{9999999999}", 12,
-                  ErrorKind::InvalidBase10("9999999999".into()));
-        test_err!("a{1,9999999999}", 14,
-                  ErrorKind::InvalidBase10("9999999999".into()));
-    }
-
-    #[test]
-    fn error_repeat_invalid_number_extra() {
-        test_err!("a{12x}", 5, ErrorKind::InvalidBase10("12x".into()));
-        test_err!("a{1,12x}", 7, ErrorKind::InvalidBase10("12x".into()));
-    }
-
-    #[test]
-    fn error_repeat_invalid_range() {
-        test_err!("a{2,1}", 5,
-                  ErrorKind::InvalidRepeatRange { min: 2, max: 1 });
-    }
-
-    #[test]
-    fn error_alternate_empty() {
-        test_err!("|a", 0, ErrorKind::EmptyAlternate);
-    }
-
-    #[test]
-    fn error_alternate_empty_with_group() {
-        test_err!("(|a)", 1, ErrorKind::EmptyAlternate);
-    }
-
-    #[test]
-    fn error_alternate_empty_with_alternate() {
-        test_err!("a||", 2, ErrorKind::EmptyAlternate);
-    }
-
-    #[test]
-    fn error_close_paren_unopened_empty() {
-        test_err!(")", 0, ErrorKind::UnopenedParen);
-    }
-
-    #[test]
-    fn error_close_paren_unopened() {
-        test_err!("ab)", 2, ErrorKind::UnopenedParen);
-    }
-
-    #[test]
-    fn error_close_paren_unopened_with_alt() {
-        test_err!("a|b)", 3, ErrorKind::UnopenedParen);
-    }
-
-    #[test]
-    fn error_close_paren_unclosed_with_alt() {
-        test_err!("(a|b", 0, ErrorKind::UnclosedParen);
-    }
-
-    #[test]
-    fn error_close_paren_empty_alt() {
-        test_err!("(a|)", 3, ErrorKind::EmptyAlternate);
-    }
-
-    #[test]
-    fn error_close_paren_empty_group() {
-        test_err!("()", 1, ErrorKind::EmptyGroup);
-    }
-
-    #[test]
-    fn error_close_paren_empty_group_with_name() {
-        test_err!("(?P<foo>)", 8, ErrorKind::EmptyGroup);
-    }
-
-    #[test]
-    fn error_finish_concat_unclosed() {
-        test_err!("ab(xy", 2, ErrorKind::UnclosedParen);
-    }
-
-    #[test]
-    fn error_finish_concat_empty_alt() {
-        test_err!("a|", 2, ErrorKind::EmptyAlternate);
-    }
-
-    #[test]
-    fn error_group_name_invalid() {
-        test_err!("(?P<a#>x)", 6, ErrorKind::InvalidCaptureName("a#".into()));
-    }
-
-    #[test]
-    fn error_group_name_invalid_leading() {
-        test_err!("(?P<1a>a)", 6, ErrorKind::InvalidCaptureName("1a".into()));
-    }
-
-    #[test]
-    fn error_group_name_unexpected_eof() {
-        test_err!("(?P<a", 5, ErrorKind::UnclosedCaptureName("a".into()));
-    }
-
-    #[test]
-    fn error_group_name_empty() {
-        test_err!("(?P<>a)", 4, ErrorKind::EmptyCaptureName);
-    }
-
-    #[test]
-    fn error_group_opts_unrecognized_flag() {
-        test_err!("(?z:a)", 2, ErrorKind::UnrecognizedFlag('z'));
-    }
-
-    #[test]
-    fn error_group_opts_unexpected_eof() {
-        test_err!("(?i", 3, ErrorKind::UnexpectedFlagEof);
-    }
-
-    #[test]
-    fn error_group_opts_double_negation() {
-        test_err!("(?-i-s:a)", 4, ErrorKind::DoubleFlagNegation);
-    }
-
-    #[test]
-    fn error_group_opts_empty_negation() {
-        test_err!("(?i-:a)", 4, ErrorKind::EmptyFlagNegation);
-    }
-
-    #[test]
-    fn error_group_opts_empty() {
-        test_err!("(?)", 2, ErrorKind::EmptyFlagNegation);
-    }
-
-    #[test]
-    fn error_escape_unexpected_eof() {
-        test_err!(r"\", 1, ErrorKind::UnexpectedEscapeEof);
-    }
-
-    #[test]
-    fn error_escape_unrecognized() {
-        test_err!(r"\m", 1, ErrorKind::UnrecognizedEscape('m'));
-    }
-
-    #[test]
-    fn error_escape_hex2_eof0() {
-        test_err!(r"\x", 2, ErrorKind::UnexpectedTwoDigitHexEof);
-    }
-
-    #[test]
-    fn error_escape_hex2_eof1() {
-        test_err!(r"\xA", 3, ErrorKind::UnexpectedTwoDigitHexEof);
-    }
-
-    #[test]
-    fn error_escape_hex2_invalid() {
-        test_err!(r"\xAG", 4, ErrorKind::InvalidBase16("AG".into()));
-    }
-
-    #[test]
-    fn error_escape_hex_eof0() {
-        test_err!(r"\x{", 3, ErrorKind::InvalidBase16("".into()));
-    }
-
-    #[test]
-    fn error_escape_hex_eof1() {
-        test_err!(r"\x{A", 4, ErrorKind::UnclosedHex);
-    }
-
-    #[test]
-    fn error_escape_hex_invalid() {
-        test_err!(r"\x{AG}", 5, ErrorKind::InvalidBase16("AG".into()));
-    }
-
-    #[test]
-    fn error_escape_hex_invalid_scalar_value_surrogate() {
-        test_err!(r"\x{D800}", 8, ErrorKind::InvalidScalarValue(0xD800));
-    }
-
-    #[test]
-    fn error_escape_hex_invalid_scalar_value_high() {
-        test_err!(r"\x{110000}", 10, ErrorKind::InvalidScalarValue(0x110000));
-    }
-
-    #[test]
-    fn error_escape_hex_invalid_u32() {
-        test_err!(r"\x{9999999999}", 13,
-                  ErrorKind::InvalidBase16("9999999999".into()));
-    }
-
-    #[test]
-    fn error_unicode_unclosed() {
-        test_err!(r"\p{", 3, ErrorKind::UnclosedUnicodeName);
-        test_err!(r"\p{Greek", 8, ErrorKind::UnclosedUnicodeName);
-    }
-
-    #[test]
-    fn error_unicode_no_letter() {
-        test_err!(r"\p", 2, ErrorKind::UnexpectedEscapeEof);
-    }
-
-    #[test]
-    fn error_unicode_unknown_letter() {
-        test_err!(r"\pA", 3, ErrorKind::UnrecognizedUnicodeClass("A".into()));
-    }
-
-    #[test]
-    fn error_unicode_unknown_name() {
-        test_err!(r"\p{Yii}", 7,
-                  ErrorKind::UnrecognizedUnicodeClass("Yii".into()));
-    }
-
-    #[test]
-    fn error_class_eof_empty() {
-        test_err!("[", 1, ErrorKind::UnexpectedClassEof);
-        test_err!("[^", 2, ErrorKind::UnexpectedClassEof);
-    }
-
-    #[test]
-    fn error_class_eof_non_empty() {
-        test_err!("[a", 2, ErrorKind::UnexpectedClassEof);
-        test_err!("[^a", 3, ErrorKind::UnexpectedClassEof);
-    }
-
-    #[test]
-    fn error_class_eof_range() {
-        test_err!("[a-", 3, ErrorKind::UnexpectedClassEof);
-        test_err!("[^a-", 4, ErrorKind::UnexpectedClassEof);
-        test_err!("[---", 4, ErrorKind::UnexpectedClassEof);
-    }
-
-    #[test]
-    fn error_class_invalid_escape() {
-        test_err!(r"[\pA]", 4,
-                  ErrorKind::UnrecognizedUnicodeClass("A".into()));
-    }
-
-    #[test]
-    fn error_class_valid_escape_not_allowed() {
-        test_err!(r"[\A]", 3, ErrorKind::InvalidClassEscape(Expr::StartText));
-    }
-
-    #[test]
-    fn error_class_range_valid_escape_not_allowed() {
-        test_err!(r"[a-\d]", 5,
-                  ErrorKind::InvalidClassEscape(Expr::Class(class(PERLD))));
-        test_err!(r"[a-\A]", 5,
-                  ErrorKind::InvalidClassEscape(Expr::StartText));
-        test_err!(r"[\A-a]", 3,
-                  ErrorKind::InvalidClassEscape(Expr::StartText));
-    }
-
-    #[test]
-    fn error_class_invalid_range() {
-        test_err!("[z-a]", 4, ErrorKind::InvalidClassRange {
-            start: 'z',
-            end: 'a',
-        });
-    }
-
-    #[test]
-    fn error_class_empty_range() {
-        test_err!("[]", 2, ErrorKind::UnexpectedClassEof);
-        test_err!("[^]", 3, ErrorKind::UnexpectedClassEof);
-        test_err!(r"[^\d\D]", 7, ErrorKind::EmptyClass);
-
-        let flags = Flags { allow_bytes: true, .. Flags::default() };
-        test_err!(r"(?-u)[^\x00-\xFF]", 17, ErrorKind::EmptyClass, flags);
-    }
-
-    #[test]
-    fn error_class_unsupported_char() {
-        // These tests ensure that some unescaped special characters are
-        // rejected in character classes. The intention is to use these
-        // characters to implement sets as described in UTC#18 RL1.3. Once
-        // that's done, these tests should be removed and replaced with others.
-        test_err!("[[]", 1, ErrorKind::UnsupportedClassChar('['));
-        test_err!("[&&]", 2, ErrorKind::UnsupportedClassChar('&'));
-        test_err!("[~~]", 2, ErrorKind::UnsupportedClassChar('~'));
-        test_err!("[+--]", 4, ErrorKind::UnsupportedClassChar('-'));
-        test_err!(r"[a-a--\xFF]", 5, ErrorKind::UnsupportedClassChar('-'));
-    }
-
-    #[test]
-    fn error_duplicate_capture_name() {
-        test_err!("(?P<a>.)(?P<a>.)", 14,
-                  ErrorKind::DuplicateCaptureName("a".into()));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/regex-syntax-0.4.0/src/properties.rs
+++ /dev/null
@@ -1,459 +0,0 @@
-// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use quickcheck::{Arbitrary, Gen, Testable, QuickCheck, StdGen};
-
-use {
-    Expr, ExprBuilder,
-    CharClass, ClassRange, ByteClass, ByteRange, Repeater, dec_char,
-};
-
-fn qc<T: Testable>(t: T) {
-    QuickCheck::new()
-        .tests(10_000)
-        .max_tests(20_000)
-        .quickcheck(t);
-}
-
-fn class(ranges: &[(char, char)]) -> CharClass {
-    let ranges = ranges.iter().cloned()
-                       .map(|(c1, c2)| ClassRange::new(c1, c2)).collect();
-    CharClass::new(ranges)
-}
-
-// Test invariants for canonicalizing character classes.
-
-#[test]
-fn negate() {
-    fn prop(ranges: Vec<(char, char)>) -> bool {
-        let expected = class(&ranges).canonicalize();
-        let got = class(&ranges).negate().negate();
-        expected == got
-    }
-    qc(prop as fn(Vec<(char, char)>) -> bool);
-}
-
-#[test]
-fn classes_are_sorted_and_nonoverlapping() {
-    fn prop(ranges: Vec<(char, char)>) -> bool {
-        class(&ranges)
-            .canonicalize()
-            .windows(2)
-            .all(|w| w[0].end < dec_char(w[1].start))
-    }
-    qc(prop as fn(Vec<(char, char)>) -> bool);
-}
-
-#[test]
-fn valid_class_ranges() {
-    fn prop(ranges: Vec<(char, char)>) -> bool {
-        class(&ranges).canonicalize().into_iter().all(|r| r.start <= r.end)
-    }
-    qc(prop as fn(Vec<(char, char)>) -> bool);
-}
-
-/// A wrapper type for generating "regex-like" Unicode strings.
-///
-/// In particular, this type's `Arbitrary` impl specifically biases toward
-/// special regex characters to make test cases more interesting.
-#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
-struct RegexLikeString(String);
-
-impl Arbitrary for RegexLikeString {
-    fn arbitrary<G: Gen>(g: &mut G) -> RegexLikeString {
-        const SPECIAL: &'static [char] = &[
-            '\\', '.', '+', '*', '?', '(', ')', '|', '[', ']', '{', '}',
-            '^', '$',
-        ];
-        // Generating random Unicode strings results in mostly uninteresting
-        // regexes. Namely, they'll mostly just be literals.
-        // To make properties using regex strings more interesting, we bias
-        // toward selecting characters of significance to a regex.
-        let size = { let s = g.size(); g.gen_range(0, s) };
-        RegexLikeString((0..size).map(|_| {
-            if g.gen_weighted_bool(3) {
-                *g.choose(SPECIAL).unwrap()
-            } else {
-                g.gen()
-            }
-        }).collect())
-    }
-
-    fn shrink(&self) -> Box<Iterator<Item=RegexLikeString>> {
-        // The regular `String` shrinker is good enough.
-        Box::new(self.0.shrink().map(RegexLikeString))
-    }
-}
-
-/// A special type for generating small non-zero sized ASCII strings.
-#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
-struct SmallAscii(String);
-
-impl Arbitrary for SmallAscii {
-    fn arbitrary<G: Gen>(g: &mut G) -> SmallAscii {
-        use std::char::from_u32;
-        let size = g.gen_range(1, 5);
-        SmallAscii((0..size)
-                   .map(|_| from_u32(g.gen_range(97, 123)).unwrap())
-                   .collect())
-    }
-
-    fn shrink(&self) -> Box<Iterator<Item=SmallAscii>> {
-        Box::new(self.0.shrink().map(SmallAscii))
-    }
-}
-
-#[test]
-fn parser_never_panics() {
-    fn prop(s: RegexLikeString) -> bool {
-        let _ = Expr::parse(&s.0); true
-    }
-    qc(prop as fn(RegexLikeString) -> bool);
-}
-
-// Testing entire expressions.
-//
-// We only have one test at the moment, but the machinery could be useful
-// for other things.
-//
-// In particular, Russ Cox writes about testing regexes by comparing the
-// strings they match with other regex implementations. A fuzzer/shrinker
-// (which is what's implemented below) would be a great way to drive that
-// process. ---AG
-
-impl Arbitrary for Expr {
-    fn arbitrary<G: Gen>(g: &mut G) -> Expr {
-        let e = fix_capture_indices(gen_expr(g, 0, ExprType::Anything));
-        e.simplify(200).unwrap()
-    }
-
-    fn shrink(&self) -> Box<Iterator<Item=Expr>> {
-        use Expr::*;
-
-        let nada = || Box::new(None.into_iter());
-        let es: Box<Iterator<Item=Expr>> = match *self {
-            Empty | AnyChar | AnyCharNoNL | AnyByte | AnyByteNoNL
-            | StartLine | EndLine | StartText | EndText
-            | WordBoundary | NotWordBoundary
-            | WordBoundaryAscii | NotWordBoundaryAscii => nada(),
-            Literal { ref chars, .. } if chars.len() == 1 => nada(),
-            Literal { ref chars, casei } => {
-                Box::new((chars.clone(), casei)
-                         .shrink()
-                         .filter(|&(ref chars, _)| chars.len() > 0)
-                         .map(|(chars, casei)| {
-                             Literal { chars: chars, casei: casei }
-                         }))
-            }
-            LiteralBytes { ref bytes, .. } if bytes.len() == 1 => nada(),
-            LiteralBytes { ref bytes, casei } => {
-                Box::new((bytes.clone(), casei)
-                         .shrink()
-                         .filter(|&(ref bytes, _)| bytes.len() > 0)
-                         .map(|(bytes, casei)| {
-                             LiteralBytes { bytes: bytes, casei: casei }
-                         }))
-            }
-            Class(ref cls) => Box::new(cls.shrink().map(Class)),
-            ClassBytes(ref cls) => Box::new(cls.shrink().map(ClassBytes)),
-            Group { ref e, ref i, ref name } => {
-                let (i, name) = (i.clone(), name.clone());
-                Box::new(e.clone().shrink()
-                          .chain(e.clone().shrink()
-                                  .map(move |e| Group {
-                                      e: Box::new(e),
-                                      i: i.clone(),
-                                      name: name.clone(),
-                                  })))
-            }
-            Repeat { ref e, ref r, greedy } => {
-                Box::new((*e.clone(), r.clone())
-                         .shrink()
-                         .filter(|&(ref e, _)| e.can_repeat())
-                         .map(move |(e, r)| Repeat {
-                             e: Box::new(e),
-                             r: r,
-                             greedy: greedy,
-                         }))
-            }
-            // Concat(ref es) if es.len() <= 2 => nada(),
-            Concat(ref es) => {
-                Box::new(es.clone()
-                           .shrink()
-                           .filter(|es| es.len() > 0)
-                           .map(|mut es| if es.len() == 1 {
-                               es.pop().unwrap()
-                           } else {
-                               Concat(es)
-                           }))
-            }
-            // Alternate(ref es) if es.len() <= 2 => nada(),
-            Alternate(ref es) => {
-                Box::new(es.clone()
-                           .shrink()
-                           .filter(|es| es.len() > 0)
-                           .map(|mut es| if es.len() == 1 {
-                               es.pop().unwrap()
-                           } else {
-                               Alternate(es)
-                           }))
-            }
-        };
-        Box::new(es.map(|e| fix_capture_indices(e).simplify(200).unwrap()))
-    }
-}
-
-enum ExprType {
-    NoSequences, // disallow concat/alternate
-    Anything,
-}
-
-fn gen_expr<G: Gen>(g: &mut G, depth: u32, ty: ExprType) -> Expr {
-    use Expr::*;
-    let ub = match (depth as usize >= g.size(), ty) {
-        (true, _) => 16,
-        (false, ExprType::NoSequences) => 18,
-        (false, ExprType::Anything) => 20,
-    };
-    match g.gen_range(1, ub) {
-        0 => Empty,
-        1 => Literal {
-            chars: SmallAscii::arbitrary(g).0.chars().collect(),
-            casei: g.gen(),
-        },
-        2 => LiteralBytes {
-            bytes: SmallAscii::arbitrary(g).0.as_bytes().to_owned(),
-            casei: g.gen(),
-        },
-        3 => AnyChar,
-        4 => AnyCharNoNL,
-        5 => AnyByte,
-        6 => AnyByteNoNL,
-        7 => Class(CharClass::arbitrary(g)),
-        8 => StartLine,
-        9 => EndLine,
-        10 => StartText,
-        11 => EndText,
-        12 => WordBoundary,
-        13 => NotWordBoundary,
-        14 => WordBoundaryAscii,
-        15 => NotWordBoundaryAscii,
-        16 => gen_group_expr(g, depth + 1),
-        17 => Repeat {
-            e: Box::new(gen_repeatable_expr(g, depth + 1)),
-            r: Repeater::arbitrary(g),
-            greedy: bool::arbitrary(g),
-        },
-        18 => {
-            let size = { let s = g.size(); g.gen_range(2, s) };
-            Concat((0..size)
-                   .map(|_| {
-                       gen_expr(g, depth + 1, ExprType::NoSequences)
-                    })
-                   .collect())
-        }
-        19 => {
-            let size = { let s = g.size(); g.gen_range(2, s) };
-            Alternate((0..size)
-                      .map(|_| {
-                          gen_expr(g, depth + 1, ExprType::NoSequences)
-                      })
-                      .collect())
-        }
-        _ => unreachable!()
-    }
-}
-
-fn gen_repeatable_expr<G: Gen>(g: &mut G, depth: u32) -> Expr {
-    use Expr::*;
-    match g.gen_range(1, 10) {
-        0 => Empty,
-        1 => Literal {
-            chars: vec![Arbitrary::arbitrary(g)],
-            casei: g.gen(),
-        },
-        2 => LiteralBytes {
-            bytes: vec![Arbitrary::arbitrary(g)],
-            casei: g.gen(),
-        },
-        3 => AnyChar,
-        4 => AnyCharNoNL,
-        5 => AnyByte,
-        6 => AnyByteNoNL,
-        7 => Class(CharClass::arbitrary(g)),
-        8 => ClassBytes(ByteClass::arbitrary(g)),
-        9 => gen_group_expr(g, depth + 1),
-        _ => unreachable!(),
-    }
-}
-
-fn gen_group_expr<G: Gen>(g: &mut G, depth: u32) -> Expr {
-    let (i, name) = if g.gen() {
-        (None, None)
-    } else {
-        (Some(0), if g.gen() {
-            Some(SmallAscii::arbitrary(g).0)
-        } else {
-            None
-        })
-    };
-    Expr::Group {
-        e: Box::new(gen_expr(g, depth + 1, ExprType::Anything)),
-        i: i,
-        name: name,
-    }
-}
-
-fn fix_capture_indices(e: Expr) -> Expr {
-    fn bx(e: Expr) -> Box<Expr> { Box::new(e) }
-    fn fix(e: Expr, capi: &mut usize, names: &mut Vec<String>) -> Expr {
-        use Expr::*;
-        match e {
-            Group { e, i: Some(_), mut name } => {
-                *capi += 1;
-                let i = *capi;
-                let mut dupe_name = false;
-                if let Some(ref n1) = name {
-                    if names.iter().any(|n2| n1 == n2) {
-                        dupe_name = true;
-                    } else {
-                        names.push(n1.clone());
-                    }
-                }
-                if dupe_name { name = None; }
-                Group { e: bx(fix(*e, capi, names)), i: Some(i), name: name }
-            }
-            Group { e, i, name } => {
-                Group { e: bx(fix(*e, capi, names)), i: i, name: name }
-            }
-            Repeat { e, r, greedy } => {
-                Repeat { e: bx(fix(*e, capi, names)), r: r, greedy: greedy }
-            }
-            Concat(es) =>
-                Concat(es.into_iter().map(|e| fix(e, capi, names)).collect()),
-            Alternate(es) =>
-                Alternate(es.into_iter().map(|e| fix(e, capi, names)).collect()),
-            e => e,
-        }
-    }
-    fix(e, &mut 0, &mut vec![])
-}
-
-impl Arbitrary for Repeater {
-    fn arbitrary<G: Gen>(g: &mut G) -> Repeater {
-        use Repeater::*;
-        match g.gen_range(0, 4) {
-            0 => ZeroOrOne,
-            1 => ZeroOrMore,
-            2 => OneOrMore,
-            3 => {
-                use std::cmp::{max, min};
-                let n1 = Arbitrary::arbitrary(g);
-                let n2 = Arbitrary::arbitrary(g);
-                Range {
-                    min: min(n1, n2),
-                    max: if g.gen() { None } else { Some(max(n1, n2)) },
-                }
-            },
-            _ => unreachable!(),
-        }
-    }
-
-    fn shrink(&self) -> Box<Iterator<Item=Repeater>> {
-        use Repeater::*;
-        match *self {
-            ZeroOrOne | ZeroOrMore | OneOrMore => Box::new(None.into_iter()),
-            Range { min, max } => {
-                Box::new((min, max)
-                         .shrink()
-                         .map(|(min, max)| Range { min: min, max: max }))
-            }
-        }
-    }
-}
-
-impl Arbitrary for CharClass {
-    fn arbitrary<G: Gen>(g: &mut G) -> CharClass {
-        let mut ranges: Vec<ClassRange> = Arbitrary::arbitrary(g);
-        if ranges.is_empty() {
-            ranges.push(Arbitrary::arbitrary(g));
-        }
-        let cls = CharClass { ranges: ranges }.canonicalize();
-        if g.gen() { cls.case_fold() } else { cls }
-    }
-
-    fn shrink(&self) -> Box<Iterator<Item=CharClass>> {
-        Box::new(self.ranges.clone()
-                 .shrink()
-                 .filter(|ranges| ranges.len() > 0)
-                 .map(|ranges| CharClass { ranges: ranges }.canonicalize()))
-    }
-}
-
-impl Arbitrary for ClassRange {
-    fn arbitrary<G: Gen>(g: &mut G) -> ClassRange {
-        use std::char::from_u32;
-        ClassRange::new(
-            from_u32(g.gen_range(97, 123)).unwrap(),
-            from_u32(g.gen_range(97, 123)).unwrap(),
-        )
-    }
-
-    fn shrink(&self) -> Box<Iterator<Item=ClassRange>> {
-        Box::new((self.start, self.end)
-                 .shrink().map(|(s, e)| ClassRange::new(s, e)))
-    }
-}
-
-impl Arbitrary for ByteClass {
-    fn arbitrary<G: Gen>(g: &mut G) -> ByteClass {
-        let mut ranges: Vec<ByteRange> = Arbitrary::arbitrary(g);
-        if ranges.is_empty() {
-            ranges.push(Arbitrary::arbitrary(g));
-        }
-        let cls = ByteClass { ranges: ranges }.canonicalize();
-        if g.gen() { cls.case_fold() } else { cls }
-    }
-
-    fn shrink(&self) -> Box<Iterator<Item=ByteClass>> {
-        Box::new(self.ranges.clone()
-                 .shrink()
-                 .filter(|ranges| ranges.len() > 0)
-                 .map(|ranges| ByteClass { ranges: ranges }.canonicalize()))
-    }
-}
-
-impl Arbitrary for ByteRange {
-    fn arbitrary<G: Gen>(g: &mut G) -> ByteRange {
-        ByteRange::new(g.gen_range(97, 123), g.gen_range(97, 123))
-    }
-
-    fn shrink(&self) -> Box<Iterator<Item=ByteRange>> {
-        Box::new((self.start, self.end)
-                 .shrink().map(|(s, e)| ByteRange::new(s, e)))
-    }
-}
-
-#[test]
-fn display_regex_roundtrips() {
-    // Given an AST, if we print it as a regex and then re-parse it, do we
-    // get back the same AST?
-    // A lot of this relies crucially on regex simplification. So this is
-    // testing `Expr::simplify` as much as it is testing the `Display` impl.
-    fn prop(e: Expr) -> bool {
-        let parser = ExprBuilder::new().allow_bytes(true);
-        e == parser.parse(&e.to_string()).unwrap()
-    }
-    QuickCheck::new()
-        .tests(10_000)
-        .max_tests(20_000)
-        .gen(StdGen::new(::rand::thread_rng(), 50))
-        .quickcheck(prop as fn(Expr) -> bool);
-}
deleted file mode 100644
--- a/third_party/rust/regex-syntax-0.4.0/src/unicode.rs
+++ /dev/null
@@ -1,5715 +0,0 @@
-// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// NOTE: The following code was generated by "scripts/unicode.py", do not edit
-// directly
-
-#![allow(warnings)]
-pub mod general_category {
-    pub const C_table: &'static [(char, char)] = &[
-        ('\u{0}', '\u{1f}'), ('\u{7f}', '\u{9f}'), ('\u{ad}', '\u{ad}'),
-        ('\u{378}', '\u{379}'), ('\u{380}', '\u{383}'), ('\u{38b}', '\u{38b}'),
-        ('\u{38d}', '\u{38d}'), ('\u{3a2}', '\u{3a2}'), ('\u{530}', '\u{530}'),
-        ('\u{557}', '\u{558}'), ('\u{560}', '\u{560}'), ('\u{588}', '\u{588}'),
-        ('\u{58b}', '\u{58c}'), ('\u{590}', '\u{590}'), ('\u{5c8}', '\u{5cf}'),
-        ('\u{5eb}', '\u{5ef}'), ('\u{5f5}', '\u{605}'), ('\u{61c}', '\u{61d}'),
-        ('\u{6dd}', '\u{6dd}'), ('\u{70e}', '\u{70f}'), ('\u{74b}', '\u{74c}'),
-        ('\u{7b2}', '\u{7bf}'), ('\u{7fb}', '\u{7ff}'), ('\u{82e}', '\u{82f}'),
-        ('\u{83f}', '\u{83f}'), ('\u{85c}', '\u{85d}'), ('\u{85f}', '\u{89f}'),
-        ('\u{8b5}', '\u{8e2}'), ('\u{984}', '\u{984}'), ('\u{98d}', '\u{98e}'),
-        ('\u{991}', '\u{992}'), ('\u{9a9}', '\u{9a9}'), ('\u{9b1}', '\u{9b1}'),
-        ('\u{9b3}', '\u{9b5}'), ('\u{9ba}', '\u{9bb}'), ('\u{9c5}', '\u{9c6}'),
-        ('\u{9c9}', '\u{9ca}'), ('\u{9cf}', '\u{9d6}'), ('\u{9d8}', '\u{9db}'),
-        ('\u{9de}', '\u{9de}'), ('\u{9e4}', '\u{9e5}'), ('\u{9fc}', '\u{a00}'),
-        ('\u{a04}', '\u{a04}'), ('\u{a0b}', '\u{a0e}'), ('\u{a11}', '\u{a12}'),
-        ('\u{a29}', '\u{a29}'), ('\u{a31}', '\u{a31}'), ('\u{a34}', '\u{a34}'),
-        ('\u{a37}', '\u{a37}'), ('\u{a3a}', '\u{a3b}'), ('\u{a3d}', '\u{a3d}'),
-        ('\u{a43}', '\u{a46}'), ('\u{a49}', '\u{a4a}'), ('\u{a4e}', '\u{a50}'),
-        ('\u{a52}', '\u{a58}'), ('\u{a5d}', '\u{a5d}'), ('\u{a5f}', '\u{a65}'),
-        ('\u{a76}', '\u{a80}'), ('\u{a84}', '\u{a84}'), ('\u{a8e}', '\u{a8e}'),
-        ('\u{a92}', '\u{a92}'), ('\u{aa9}', '\u{aa9}'), ('\u{ab1}', '\u{ab1}'),
-        ('\u{ab4}', '\u{ab4}'), ('\u{aba}', '\u{abb}'), ('\u{ac6}', '\u{ac6}'),
-        ('\u{aca}', '\u{aca}'), ('\u{ace}', '\u{acf}'), ('\u{ad1}', '\u{adf}'),
-        ('\u{ae4}', '\u{ae5}'), ('\u{af2}', '\u{af8}'), ('\u{afa}', '\u{b00}'),
-        ('\u{b04}', '\u{b04}'), ('\u{b0d}', '\u{b0e}'), ('\u{b11}', '\u{b12}'),
-        ('\u{b29}', '\u{b29}'), ('\u{b31}', '\u{b31}'), ('\u{b34}', '\u{b34}'),
-        ('\u{b3a}', '\u{b3b}'), ('\u{b45}', '\u{b46}'), ('\u{b49}', '\u{b4a}'),
-        ('\u{b4e}', '\u{b55}'), ('\u{b58}', '\u{b5b}'), ('\u{b5e}', '\u{b5e}'),
-        ('\u{b64}', '\u{b65}'), ('\u{b78}', '\u{b81}'), ('\u{b84}', '\u{b84}'),
-        ('\u{b8b}', '\u{b8d}'), ('\u{b91}', '\u{b91}'), ('\u{b96}', '\u{b98}'),
-        ('\u{b9b}', '\u{b9b}'), ('\u{b9d}', '\u{b9d}'), ('\u{ba0}', '\u{ba2}'),
-        ('\u{ba5}', '\u{ba7}'), ('\u{bab}', '\u{bad}'), ('\u{bba}', '\u{bbd}'),
-        ('\u{bc3}', '\u{bc5}'), ('\u{bc9}', '\u{bc9}'), ('\u{bce}', '\u{bcf}'),
-        ('\u{bd1}', '\u{bd6}'), ('\u{bd8}', '\u{be5}'), ('\u{bfb}', '\u{bff}'),
-        ('\u{c04}', '\u{c04}'), ('\u{c0d}', '\u{c0d}'), ('\u{c11}', '\u{c11}'),
-        ('\u{c29}', '\u{c29}'), ('\u{c3a}', '\u{c3c}'), ('\u{c45}', '\u{c45}'),
-        ('\u{c49}', '\u{c49}'), ('\u{c4e}', '\u{c54}'), ('\u{c57}', '\u{c57}'),
-        ('\u{c5b}', '\u{c5f}'), ('\u{c64}', '\u{c65}'), ('\u{c70}', '\u{c77}'),
-        ('\u{c80}', '\u{c80}'), ('\u{c84}', '\u{c84}'), ('\u{c8d}', '\u{c8d}'),
-        ('\u{c91}', '\u{c91}'), ('\u{ca9}', '\u{ca9}'), ('\u{cb4}', '\u{cb4}'),
-        ('\u{cba}', '\u{cbb}'), ('\u{cc5}', '\u{cc5}'), ('\u{cc9}', '\u{cc9}'),
-        ('\u{cce}', '\u{cd4}'), ('\u{cd7}', '\u{cdd}'), ('\u{cdf}', '\u{cdf}'),
-        ('\u{ce4}', '\u{ce5}'), ('\u{cf0}', '\u{cf0}'), ('\u{cf3}', '\u{d00}'),
-        ('\u{d04}', '\u{d04}'), ('\u{d0d}', '\u{d0d}'), ('\u{d11}', '\u{d11}'),
-        ('\u{d3b}', '\u{d3c}'), ('\u{d45}', '\u{d45}'), ('\u{d49}', '\u{d49}'),
-        ('\u{d4f}', '\u{d56}'), ('\u{d58}', '\u{d5e}'), ('\u{d64}', '\u{d65}'),
-        ('\u{d76}', '\u{d78}'), ('\u{d80}', '\u{d81}'), ('\u{d84}', '\u{d84}'),
-        ('\u{d97}', '\u{d99}'), ('\u{db2}', '\u{db2}'), ('\u{dbc}', '\u{dbc}'),
-        ('\u{dbe}', '\u{dbf}'), ('\u{dc7}', '\u{dc9}'), ('\u{dcb}', '\u{dce}'),
-        ('\u{dd5}', '\u{dd5}'), ('\u{dd7}', '\u{dd7}'), ('\u{de0}', '\u{de5}'),
-        ('\u{df0}', '\u{df1}'), ('\u{df5}', '\u{e00}'), ('\u{e3b}', '\u{e3e}'),
-        ('\u{e5c}', '\u{e80}'), ('\u{e83}', '\u{e83}'), ('\u{e85}', '\u{e86}'),
-        ('\u{e89}', '\u{e89}'), ('\u{e8b}', '\u{e8c}'), ('\u{e8e}', '\u{e93}'),
-        ('\u{e98}', '\u{e98}'), ('\u{ea0}', '\u{ea0}'), ('\u{ea4}', '\u{ea4}'),
-        ('\u{ea6}', '\u{ea6}'), ('\u{ea8}', '\u{ea9}'), ('\u{eac}', '\u{eac}'),
-        ('\u{eba}', '\u{eba}'), ('\u{ebe}', '\u{ebf}'), ('\u{ec5}', '\u{ec5}'),
-        ('\u{ec7}', '\u{ec7}'), ('\u{ece}', '\u{ecf}'), ('\u{eda}', '\u{edb}'),
-        ('\u{ee0}', '\u{eff}'), ('\u{f48}', '\u{f48}'), ('\u{f6d}', '\u{f70}'),
-        ('\u{f98}', '\u{f98}'), ('\u{fbd}', '\u{fbd}'), ('\u{fcd}', '\u{fcd}'),
-        ('\u{fdb}', '\u{fff}'), ('\u{10c6}', '\u{10c6}'), ('\u{10c8}',
-        '\u{10cc}'), ('\u{10ce}', '\u{10cf}'), ('\u{1249}', '\u{1249}'),
-        ('\u{124e}', '\u{124f}'), ('\u{1257}', '\u{1257}'), ('\u{1259}',
-        '\u{1259}'), ('\u{125e}', '\u{125f}'), ('\u{1289}', '\u{1289}'),
-        ('\u{128e}', '\u{128f}'), ('\u{12b1}', '\u{12b1}'), ('\u{12b6}',
-        '\u{12b7}'), ('\u{12bf}', '\u{12bf}'), ('\u{12c1}', '\u{12c1}'),
-        ('\u{12c6}', '\u{12c7}'), ('\u{12d7}', '\u{12d7}'), ('\u{1311}',
-        '\u{1311}'), ('\u{1316}', '\u{1317}'), ('\u{135b}', '\u{135c}'),
-        ('\u{137d}', '\u{137f}'), ('\u{139a}', '\u{139f}'), ('\u{13f6}',
-        '\u{13f7}'), ('\u{13fe}', '\u{13ff}'), ('\u{169d}', '\u{169f}'),
-        ('\u{16f9}', '\u{16ff}'), ('\u{170d}', '\u{170d}'), ('\u{1715}',
-        '\u{171f}'), ('\u{1737}', '\u{173f}'), ('\u{1754}', '\u{175f}'),
-        ('\u{176d}', '\u{176d}'), ('\u{1771}', '\u{1771}'), ('\u{1774}',
-        '\u{177f}'), ('\u{17de}', '\u{17df}'), ('\u{17ea}', '\u{17ef}'),
-        ('\u{17fa}', '\u{17ff}'), ('\u{180e}', '\u{180f}'), ('\u{181a}',
-        '\u{181f}'), ('\u{1878}', '\u{187f}'), ('\u{18ab}', '\u{18af}'),
-        ('\u{18f6}', '\u{18ff}'), ('\u{191f}', '\u{191f}'), ('\u{192c}',
-        '\u{192f}'), ('\u{193c}', '\u{193f}'), ('\u{1941}', '\u{1943}'),
-        ('\u{196e}', '\u{196f}'), ('\u{1975}', '\u{197f}'), ('\u{19ac}',
-        '\u{19af}'), ('\u{19ca}', '\u{19cf}'), ('\u{19db}', '\u{19dd}'),
-        ('\u{1a1c}', '\u{1a1d}'), ('\u{1a5f}', '\u{1a5f}'), ('\u{1a7d}',
-        '\u{1a7e}'), ('\u{1a8a}', '\u{1a8f}'), ('\u{1a9a}', '\u{1a9f}'),
-        ('\u{1aae}', '\u{1aaf}'), ('\u{1abf}', '\u{1aff}'), ('\u{1b4c}',
-        '\u{1b4f}'), ('\u{1b7d}', '\u{1b7f}'), ('\u{1bf4}', '\u{1bfb}'),
-        ('\u{1c38}', '\u{1c3a}'), ('\u{1c4a}', '\u{1c4c}'), ('\u{1c80}',
-        '\u{1cbf}'), ('\u{1cc8}', '\u{1ccf}'), ('\u{1cf7}', '\u{1cf7}'),
-        ('\u{1cfa}', '\u{1cff}'), ('\u{1df6}', '\u{1dfb}'), ('\u{1f16}',
-        '\u{1f17}'), ('\u{1f1e}', '\u{1f1f}'), ('\u{1f46}', '\u{1f47}'),
-        ('\u{1f4e}', '\u{1f4f}'), ('\u{1f58}', '\u{1f58}'), ('\u{1f5a}',
-        '\u{1f5a}'), ('\u{1f5c}', '\u{1f5c}'), ('\u{1f5e}', '\u{1f5e}'),
-        ('\u{1f7e}', '\u{1f7f}'), ('\u{1fb5}', '\u{1fb5}'), ('\u{1fc5}',
-        '\u{1fc5}'), ('\u{1fd4}', '\u{1fd5}'), ('\u{1fdc}', '\u{1fdc}'),
-        ('\u{1ff0}', '\u{1ff1}'), ('\u{1ff5}', '\u{1ff5}'), ('\u{1fff}',
-        '\u{1fff}'), ('\u{200b}', '\u{200f}'), ('\u{202a}', '\u{202e}'),
-        ('\u{2060}', '\u{206f}'), ('\u{2072}', '\u{2073}'), ('\u{208f}',
-        '\u{208f}'), ('\u{209d}', '\u{209f}'), ('\u{20bf}', '\u{20cf}'),
-        ('\u{20f1}', '\u{20ff}'), ('\u{218c}', '\u{218f}'), ('\u{23fb}',
-        '\u{23ff}'), ('\u{2427}', '\u{243f}'), ('\u{244b}', '\u{245f}'),
-        ('\u{2b74}', '\u{2b75}'), ('\u{2b96}', '\u{2b97}'), ('\u{2bba}',
-        '\u{2bbc}'), ('\u{2bc9}', '\u{2bc9}'), ('\u{2bd2}', '\u{2beb}'),
-        ('\u{2bf0}', '\u{2bff}'), ('\u{2c2f}', '\u{2c2f}'), ('\u{2c5f}',
-        '\u{2c5f}'), ('\u{2cf4}', '\u{2cf8}'), ('\u{2d26}', '\u{2d26}'),
-        ('\u{2d28}', '\u{2d2c}'), ('\u{2d2e}', '\u{2d2f}'), ('\u{2d68}',
-        '\u{2d6e}'), ('\u{2d71}', '\u{2d7e}'), ('\u{2d97}', '\u{2d9f}'),
-        ('\u{2da7}', '\u{2da7}'), ('\u{2daf}', '\u{2daf}'), ('\u{2db7}',
-        '\u{2db7}'), ('\u{2dbf}', '\u{2dbf}'), ('\u{2dc7}', '\u{2dc7}'),
-        ('\u{2dcf}', '\u{2dcf}'), ('\u{2dd7}', '\u{2dd7}'), ('\u{2ddf}',
-        '\u{2ddf}'), ('\u{2e43}', '\u{2e7f}'), ('\u{2e9a}', '\u{2e9a}'),
-        ('\u{2ef4}', '\u{2eff}'), ('\u{2fd6}', '\u{2fef}'), ('\u{2ffc}',
-        '\u{2fff}'), ('\u{3040}', '\u{3040}'), ('\u{3097}', '\u{3098}'),
-        ('\u{3100}', '\u{3104}'), ('\u{312e}', '\u{3130}'), ('\u{318f}',
-        '\u{318f}'), ('\u{31bb}', '\u{31bf}'), ('\u{31e4}', '\u{31ef}'),
-        ('\u{321f}', '\u{321f}'), ('\u{32ff}', '\u{32ff}'), ('\u{4db6}',
-        '\u{4dbf}'), ('\u{9fd6}', '\u{9fff}'), ('\u{a48d}', '\u{a48f}'),
-        ('\u{a4c7}', '\u{a4cf}'), ('\u{a62c}', '\u{a63f}'), ('\u{a6f8}',
-        '\u{a6ff}'), ('\u{a7ae}', '\u{a7af}'), ('\u{a7b8}', '\u{a7f6}'),
-        ('\u{a82c}', '\u{a82f}'), ('\u{a83a}', '\u{a83f}'), ('\u{a878}',
-        '\u{a87f}'), ('\u{a8c5}', '\u{a8cd}'), ('\u{a8da}', '\u{a8df}'),
-        ('\u{a8fe}', '\u{a8ff}'), ('\u{a954}', '\u{a95e}'), ('\u{a97d}',
-        '\u{a97f}'), ('\u{a9ce}', '\u{a9ce}'), ('\u{a9da}', '\u{a9dd}'),
-        ('\u{a9ff}', '\u{a9ff}'), ('\u{aa37}', '\u{aa3f}'), ('\u{aa4e}',
-        '\u{aa4f}'), ('\u{aa5a}', '\u{aa5b}'), ('\u{aac3}', '\u{aada}'),
-        ('\u{aaf7}', '\u{ab00}'), ('\u{ab07}', '\u{ab08}'), ('\u{ab0f}',
-        '\u{ab10}'), ('\u{ab17}', '\u{ab1f}'), ('\u{ab27}', '\u{ab27}'),
-        ('\u{ab2f}', '\u{ab2f}'), ('\u{ab66}', '\u{ab6f}'), ('\u{abee}',
-        '\u{abef}'), ('\u{abfa}', '\u{abff}'), ('\u{d7a4}', '\u{d7af}'),
-        ('\u{d7c7}', '\u{d7ca}'), ('\u{d7fc}', '\u{d7ff}'), ('\u{e000}',
-        '\u{f8ff}'), ('\u{fa6e}', '\u{fa6f}'), ('\u{fada}', '\u{faff}'),
-        ('\u{fb07}', '\u{fb12}'), ('\u{fb18}', '\u{fb1c}'), ('\u{fb37}',
-        '\u{fb37}'), ('\u{fb3d}', '\u{fb3d}'), ('\u{fb3f}', '\u{fb3f}'),
-        ('\u{fb42}', '\u{fb42}'), ('\u{fb45}', '\u{fb45}'), ('\u{fbc2}',
-        '\u{fbd2}'), ('\u{fd40}', '\u{fd4f}'), ('\u{fd90}', '\u{fd91}'),
-        ('\u{fdc8}', '\u{fdef}'), ('\u{fdfe}', '\u{fdff}'), ('\u{fe1a}',
-        '\u{fe1f}'), ('\u{fe53}', '\u{fe53}'), ('\u{fe67}', '\u{fe67}'),
-        ('\u{fe6c}', '\u{fe6f}'), ('\u{fe75}', '\u{fe75}'), ('\u{fefd}',
-        '\u{ff00}'), ('\u{ffbf}', '\u{ffc1}'), ('\u{ffc8}', '\u{ffc9}'),
-        ('\u{ffd0}', '\u{ffd1}'), ('\u{ffd8}', '\u{ffd9}'), ('\u{ffdd}',
-        '\u{ffdf}'), ('\u{ffe7}', '\u{ffe7}'), ('\u{ffef}', '\u{fffb}'),
-        ('\u{fffe}', '\u{ffff}'), ('\u{1000c}', '\u{1000c}'), ('\u{10027}',
-        '\u{10027}'), ('\u{1003b}', '\u{1003b}'), ('\u{1003e}', '\u{1003e}'),
-        ('\u{1004e}', '\u{1004f}'), ('\u{1005e}', '\u{1007f}'), ('\u{100fb}',
-        '\u{100ff}'), ('\u{10103}', '\u{10106}'), ('\u{10134}', '\u{10136}'),
-        ('\u{1018d}', '\u{1018f}'), ('\u{1019c}', '\u{1019f}'), ('\u{101a1}',
-        '\u{101cf}'), ('\u{101fe}', '\u{1027f}'), ('\u{1029d}', '\u{1029f}'),
-        ('\u{102d1}', '\u{102df}'), ('\u{102fc}', '\u{102ff}'), ('\u{10324}',
-        '\u{1032f}'), ('\u{1034b}', '\u{1034f}'), ('\u{1037b}', '\u{1037f}'),
-        ('\u{1039e}', '\u{1039e}'), ('\u{103c4}', '\u{103c7}'), ('\u{103d6}',
-        '\u{103ff}'), ('\u{1049e}', '\u{1049f}'), ('\u{104aa}', '\u{104ff}'),
-        ('\u{10528}', '\u{1052f}'), ('\u{10564}', '\u{1056e}'), ('\u{10570}',
-        '\u{105ff}'), ('\u{10737}', '\u{1073f}'), ('\u{10756}', '\u{1075f}'),
-        ('\u{10768}', '\u{107ff}'), ('\u{10806}', '\u{10807}'), ('\u{10809}',
-        '\u{10809}'), ('\u{10836}', '\u{10836}'), ('\u{10839}', '\u{1083b}'),
-        ('\u{1083d}', '\u{1083e}'), ('\u{10856}', '\u{10856}'), ('\u{1089f}',
-        '\u{108a6}'), ('\u{108b0}', '\u{108df}'), ('\u{108f3}', '\u{108f3}'),
-        ('\u{108f6}', '\u{108fa}'), ('\u{1091c}', '\u{1091e}'), ('\u{1093a}',
-        '\u{1093e}'), ('\u{10940}', '\u{1097f}'), ('\u{109b8}', '\u{109bb}'),
-        ('\u{109d0}', '\u{109d1}'), ('\u{10a04}', '\u{10a04}'), ('\u{10a07}',
-        '\u{10a0b}'), ('\u{10a14}', '\u{10a14}'), ('\u{10a18}', '\u{10a18}'),
-        ('\u{10a34}', '\u{10a37}'), ('\u{10a3b}', '\u{10a3e}'), ('\u{10a48}',
-        '\u{10a4f}'), ('\u{10a59}', '\u{10a5f}'), ('\u{10aa0}', '\u{10abf}'),
-        ('\u{10ae7}', '\u{10aea}'), ('\u{10af7}', '\u{10aff}'), ('\u{10b36}',
-        '\u{10b38}'), ('\u{10b56}', '\u{10b57}'), ('\u{10b73}', '\u{10b77}'),
-        ('\u{10b92}', '\u{10b98}'), ('\u{10b9d}', '\u{10ba8}'), ('\u{10bb0}',
-        '\u{10bff}'), ('\u{10c49}', '\u{10c7f}'), ('\u{10cb3}', '\u{10cbf}'),
-        ('\u{10cf3}', '\u{10cf9}'), ('\u{10d00}', '\u{10e5f}'), ('\u{10e7f}',
-        '\u{10fff}'), ('\u{1104e}', '\u{11051}'), ('\u{11070}', '\u{1107e}'),
-        ('\u{110bd}', '\u{110bd}'), ('\u{110c2}', '\u{110cf}'), ('\u{110e9}',
-        '\u{110ef}'), ('\u{110fa}', '\u{110ff}'), ('\u{11135}', '\u{11135}'),
-        ('\u{11144}', '\u{1114f}'), ('\u{11177}', '\u{1117f}'), ('\u{111ce}',
-        '\u{111cf}'), ('\u{111e0}', '\u{111e0}'), ('\u{111f5}', '\u{111ff}'),
-        ('\u{11212}', '\u{11212}'), ('\u{1123e}', '\u{1127f}'), ('\u{11287}',
-        '\u{11287}'), ('\u{11289}', '\u{11289}'), ('\u{1128e}', '\u{1128e}'),
-        ('\u{1129e}', '\u{1129e}'), ('\u{112aa}', '\u{112af}'), ('\u{112eb}',
-        '\u{112ef}'), ('\u{112fa}', '\u{112ff}'), ('\u{11304}', '\u{11304}'),
-        ('\u{1130d}', '\u{1130e}'), ('\u{11311}', '\u{11312}'), ('\u{11329}',
-        '\u{11329}'), ('\u{11331}', '\u{11331}'), ('\u{11334}', '\u{11334}'),
-        ('\u{1133a}', '\u{1133b}'), ('\u{11345}', '\u{11346}'), ('\u{11349}',
-        '\u{1134a}'), ('\u{1134e}', '\u{1134f}'), ('\u{11351}', '\u{11356}'),
-        ('\u{11358}', '\u{1135c}'), ('\u{11364}', '\u{11365}'), ('\u{1136d}',
-        '\u{1136f}'), ('\u{11375}', '\u{1147f}'), ('\u{114c8}', '\u{114cf}'),
-        ('\u{114da}', '\u{1157f}'), ('\u{115b6}', '\u{115b7}'), ('\u{115de}',
-        '\u{115ff}'), ('\u{11645}', '\u{1164f}'), ('\u{1165a}', '\u{1167f}'),
-        ('\u{116b8}', '\u{116bf}'), ('\u{116ca}', '\u{116ff}'), ('\u{1171a}',
-        '\u{1171c}'), ('\u{1172c}', '\u{1172f}'), ('\u{11740}', '\u{1189f}'),
-        ('\u{118f3}', '\u{118fe}'), ('\u{11900}', '\u{11abf}'), ('\u{11af9}',
-        '\u{11fff}'), ('\u{1239a}', '\u{123ff}'), ('\u{1246f}', '\u{1246f}'),
-        ('\u{12475}', '\u{1247f}'), ('\u{12544}', '\u{12fff}'), ('\u{1342f}',
-        '\u{143ff}'), ('\u{14647}', '\u{167ff}'), ('\u{16a39}', '\u{16a3f}'),
-        ('\u{16a5f}', '\u{16a5f}'), ('\u{16a6a}', '\u{16a6d}'), ('\u{16a70}',
-        '\u{16acf}'), ('\u{16aee}', '\u{16aef}'), ('\u{16af6}', '\u{16aff}'),
-        ('\u{16b46}', '\u{16b4f}'), ('\u{16b5a}', '\u{16b5a}'), ('\u{16b62}',
-        '\u{16b62}'), ('\u{16b78}', '\u{16b7c}'), ('\u{16b90}', '\u{16eff}'),
-        ('\u{16f45}', '\u{16f4f}'), ('\u{16f7f}', '\u{16f8e}'), ('\u{16fa0}',
-        '\u{1afff}'), ('\u{1b002}', '\u{1bbff}'), ('\u{1bc6b}', '\u{1bc6f}'),
-        ('\u{1bc7d}', '\u{1bc7f}'), ('\u{1bc89}', '\u{1bc8f}'), ('\u{1bc9a}',
-        '\u{1bc9b}'), ('\u{1bca0}', '\u{1cfff}'), ('\u{1d0f6}', '\u{1d0ff}'),
-        ('\u{1d127}', '\u{1d128}'), ('\u{1d173}', '\u{1d17a}'), ('\u{1d1e9}',
-        '\u{1d1ff}'), ('\u{1d246}', '\u{1d2ff}'), ('\u{1d357}', '\u{1d35f}'),
-        ('\u{1d372}', '\u{1d3ff}'), ('\u{1d455}', '\u{1d455}'), ('\u{1d49d}',
-        '\u{1d49d}'), ('\u{1d4a0}', '\u{1d4a1}'), ('\u{1d4a3}', '\u{1d4a4}'),
-        ('\u{1d4a7}', '\u{1d4a8}'), ('\u{1d4ad}', '\u{1d4ad}'), ('\u{1d4ba}',
-        '\u{1d4ba}'), ('\u{1d4bc}', '\u{1d4bc}'), ('\u{1d4c4}', '\u{1d4c4}'),
-        ('\u{1d506}', '\u{1d506}'), ('\u{1d50b}', '\u{1d50c}'), ('\u{1d515}',
-        '\u{1d515}'), ('\u{1d51d}', '\u{1d51d}'), ('\u{1d53a}', '\u{1d53a}'),
-        ('\u{1d53f}', '\u{1d53f}'), ('\u{1d545}', '\u{1d545}'), ('\u{1d547}',
-        '\u{1d549}'), ('\u{1d551}', '\u{1d551}'), ('\u{1d6a6}', '\u{1d6a7}'),
-        ('\u{1d7cc}', '\u{1d7cd}'), ('\u{1da8c}', '\u{1da9a}'), ('\u{1daa0}',
-        '\u{1daa0}'), ('\u{1dab0}', '\u{1e7ff}'), ('\u{1e8c5}', '\u{1e8c6}'),
-        ('\u{1e8d7}', '\u{1edff}'), ('\u{1ee04}', '\u{1ee04}'), ('\u{1ee20}',
-        '\u{1ee20}'), ('\u{1ee23}', '\u{1ee23}'), ('\u{1ee25}', '\u{1ee26}'),
-        ('\u{1ee28}', '\u{1ee28}'), ('\u{1ee33}', '\u{1ee33}'), ('\u{1ee38}',
-        '\u{1ee38}'), ('\u{1ee3a}', '\u{1ee3a}'), ('\u{1ee3c}', '\u{1ee41}'),
-        ('\u{1ee43}', '\u{1ee46}'), ('\u{1ee48}', '\u{1ee48}'), ('\u{1ee4a}',
-        '\u{1ee4a}'), ('\u{1ee4c}', '\u{1ee4c}'), ('\u{1ee50}', '\u{1ee50}'),
-        ('\u{1ee53}', '\u{1ee53}'), ('\u{1ee55}', '\u{1ee56}'), ('\u{1ee58}',
-        '\u{1ee58}'), ('\u{1ee5a}', '\u{1ee5a}'), ('\u{1ee5c}', '\u{1ee5c}'),
-        ('\u{1ee5e}', '\u{1ee5e}'), ('\u{1ee60}', '\u{1ee60}'), ('\u{1ee63}',
-        '\u{1ee63}'), ('\u{1ee65}', '\u{1ee66}'), ('\u{1ee6b}', '\u{1ee6b}'),
-        ('\u{1ee73}', '\u{1ee73}'), ('\u{1ee78}', '\u{1ee78}'), ('\u{1ee7d}',
-        '\u{1ee7d}'), ('\u{1ee7f}', '\u{1ee7f}'), ('\u{1ee8a}', '\u{1ee8a}'),
-        ('\u{1ee9c}', '\u{1eea0}'), ('\u{1eea4}', '\u{1eea4}'), ('\u{1eeaa}',
-        '\u{1eeaa}'), ('\u{1eebc}', '\u{1eeef}'), ('\u{1eef2}', '\u{1efff}'),
-        ('\u{1f02c}', '\u{1f02f}'), ('\u{1f094}', '\u{1f09f}'), ('\u{1f0af}',
-        '\u{1f0b0}'), ('\u{1f0c0}', '\u{1f0c0}'), ('\u{1f0d0}', '\u{1f0d0}'),
-        ('\u{1f0f6}', '\u{1f0ff}'), ('\u{1f10d}', '\u{1f10f}'), ('\u{1f12f}',
-        '\u{1f12f}'), ('\u{1f16c}', '\u{1f16f}'), ('\u{1f19b}', '\u{1f1e5}'),
-        ('\u{1f203}', '\u{1f20f}'), ('\u{1f23b}', '\u{1f23f}'), ('\u{1f249}',
-        '\u{1f24f}'), ('\u{1f252}', '\u{1f2ff}'), ('\u{1f57a}', '\u{1f57a}'),
-        ('\u{1f5a4}', '\u{1f5a4}'), ('\u{1f6d1}', '\u{1f6df}'), ('\u{1f6ed}',
-        '\u{1f6ef}'), ('\u{1f6f4}', '\u{1f6ff}'), ('\u{1f774}', '\u{1f77f}'),
-        ('\u{1f7d5}', '\u{1f7ff}'), ('\u{1f80c}', '\u{1f80f}'), ('\u{1f848}',
-        '\u{1f84f}'), ('\u{1f85a}', '\u{1f85f}'), ('\u{1f888}', '\u{1f88f}'),
-        ('\u{1f8ae}', '\u{1f90f}'), ('\u{1f919}', '\u{1f97f}'), ('\u{1f985}',
-        '\u{1f9bf}'), ('\u{1f9c1}', '\u{1ffff}'), ('\u{2a6d7}', '\u{2a6ff}'),
-        ('\u{2b735}', '\u{2b73f}'), ('\u{2b81e}', '\u{2b81f}'), ('\u{2cea2}',
-        '\u{2f7ff}'), ('\u{2fa1e}', '\u{e00ff}'), ('\u{e01f0}', '\u{10ffff}')
-    ];
-
-    pub const Cc_table: &'static [(char, char)] = &[
-        ('\u{0}', '\u{1f}'), ('\u{7f}', '\u{9f}')
-    ];
-
-    pub const Cf_table: &'static [(char, char)] = &[
-        ('\u{ad}', '\u{ad}'), ('\u{600}', '\u{605}'), ('\u{61c}', '\u{61c}'),
-        ('\u{6dd}', '\u{6dd}'), ('\u{70f}', '\u{70f}'), ('\u{180e}',
-        '\u{180e}'), ('\u{200b}', '\u{200f}'), ('\u{202a}', '\u{202e}'),
-        ('\u{2060}', '\u{2064}'), ('\u{2066}', '\u{206f}'), ('\u{feff}',
-        '\u{feff}'), ('\u{fff9}', '\u{fffb}'), ('\u{110bd}', '\u{110bd}'),
-        ('\u{1bca0}', '\u{1bca3}'), ('\u{1d173}', '\u{1d17a}'), ('\u{e0001}',
-        '\u{e0001}'), ('\u{e0020}', '\u{e007f}')
-    ];
-
-    pub const Cn_table: &'static [(char, char)] = &[
-        ('\u{378}', '\u{379}'), ('\u{380}', '\u{383}'), ('\u{38b}', '\u{38b}'),
-        ('\u{38d}', '\u{38d}'), ('\u{3a2}', '\u{3a2}'), ('\u{530}', '\u{530}'),
-        ('\u{557}', '\u{558}'), ('\u{560}', '\u{560}'), ('\u{588}', '\u{588}'),
-        ('\u{58b}', '\u{58c}'), ('\u{590}', '\u{590}'), ('\u{5c8}', '\u{5cf}'),
-        ('\u{5eb}', '\u{5ef}'), ('\u{5f5}', '\u{5ff}'), ('\u{61d}', '\u{61d}'),
-        ('\u{70e}', '\u{70e}'), ('\u{74b}', '\u{74c}'), ('\u{7b2}', '\u{7bf}'),
-        ('\u{7fb}', '\u{7ff}'), ('\u{82e}', '\u{82f}'), ('\u{83f}', '\u{83f}'),
-        ('\u{85c}', '\u{85d}'), ('\u{85f}', '\u{89f}'), ('\u{8b5}', '\u{8e2}'),
-        ('\u{984}', '\u{984}'), ('\u{98d}', '\u{98e}'), ('\u{991}', '\u{992}'),
-        ('\u{9a9}', '\u{9a9}'), ('\u{9b1}', '\u{9b1}'), ('\u{9b3}', '\u{9b5}'),
-        ('\u{9ba}', '\u{9bb}'), ('\u{9c5}', '\u{9c6}'), ('\u{9c9}', '\u{9ca}'),
-        ('\u{9cf}', '\u{9d6}'), ('\u{9d8}', '\u{9db}'), ('\u{9de}', '\u{9de}'),
-        ('\u{9e4}', '\u{9e5}'), ('\u{9fc}', '\u{a00}'), ('\u{a04}', '\u{a04}'),
-        ('\u{a0b}', '\u{a0e}'), ('\u{a11}', '\u{a12}'), ('\u{a29}', '\u{a29}'),
-        ('\u{a31}', '\u{a31}'), ('\u{a34}', '\u{a34}'), ('\u{a37}', '\u{a37}'),
-        ('\u{a3a}', '\u{a3b}'), ('\u{a3d}', '\u{a3d}'), ('\u{a43}', '\u{a46}'),
-        ('\u{a49}', '\u{a4a}'), ('\u{a4e}', '\u{a50}'), ('\u{a52}', '\u{a58}'),
-        ('\u{a5d}', '\u{a5d}'), ('\u{a5f}', '\u{a65}'), ('\u{a76}', '\u{a80}'),
-        ('\u{a84}', '\u{a84}'), ('\u{a8e}', '\u{a8e}'), ('\u{a92}', '\u{a92}'),
-        ('\u{aa9}', '\u{aa9}'), ('\u{ab1}', '\u{ab1}'), ('\u{ab4}', '\u{ab4}'),
-        ('\u{aba}', '\u{abb}'), ('\u{ac6}', '\u{ac6}'), ('\u{aca}', '\u{aca}'),
-        ('\u{ace}', '\u{acf}'), ('\u{ad1}', '\u{adf}'), ('\u{ae4}', '\u{ae5}'),
-        ('\u{af2}', '\u{af8}'), ('\u{afa}', '\u{b00}'), ('\u{b04}', '\u{b04}'),
-        ('\u{b0d}', '\u{b0e}'), ('\u{b11}', '\u{b12}'), ('\u{b29}', '\u{b29}'),
-        ('\u{b31}', '\u{b31}'), ('\u{b34}', '\u{b34}'), ('\u{b3a}', '\u{b3b}'),
-        ('\u{b45}', '\u{b46}'), ('\u{b49}', '\u{b4a}'), ('\u{b4e}', '\u{b55}'),
-        ('\u{b58}', '\u{b5b}'), ('\u{b5e}', '\u{b5e}'), ('\u{b64}', '\u{b65}'),
-        ('\u{b78}', '\u{b81}'), ('\u{b84}', '\u{b84}'), ('\u{b8b}', '\u{b8d}'),
-        ('\u{b91}', '\u{b91}'), ('\u{b96}', '\u{b98}'), ('\u{b9b}', '\u{b9b}'),
-        ('\u{b9d}', '\u{b9d}'), ('\u{ba0}', '\u{ba2}'), ('\u{ba5}', '\u{ba7}'),
-        ('\u{bab}', '\u{bad}'), ('\u{bba}', '\u{bbd}'), ('\u{bc3}', '\u{bc5}'),
-        ('\u{bc9}', '\u{bc9}'), ('\u{bce}', '\u{bcf}'), ('\u{bd1}', '\u{bd6}'),
-        ('\u{bd8}', '\u{be5}'), ('\u{bfb}', '\u{bff}'), ('\u{c04}', '\u{c04}'),
-        ('\u{c0d}', '\u{c0d}'), ('\u{c11}', '\u{c11}'), ('\u{c29}', '\u{c29}'),
-        ('\u{c3a}', '\u{c3c}'), ('\u{c45}', '\u{c45}'), ('\u{c49}', '\u{c49}'),
-        ('\u{c4e}', '\u{c54}'), ('\u{c57}', '\u{c57}'), ('\u{c5b}', '\u{c5f}'),
-        ('\u{c64}', '\u{c65}'), ('\u{c70}', '\u{c77}'), ('\u{c80}', '\u{c80}'),
-        ('\u{c84}', '\u{c84}'), ('\u{c8d}', '\u{c8d}'), ('\u{c91}', '\u{c91}'),
-        ('\u{ca9}', '\u{ca9}'), ('\u{cb4}', '\u{cb4}'), ('\u{cba}', '\u{cbb}'),
-        ('\u{cc5}', '\u{cc5}'), ('\u{cc9}', '\u{cc9}'), ('\u{cce}', '\u{cd4}'),
-        ('\u{cd7}', '\u{cdd}'), ('\u{cdf}', '\u{cdf}'), ('\u{ce4}', '\u{ce5}'),
-        ('\u{cf0}', '\u{cf0}'), ('\u{cf3}', '\u{d00}'), ('\u{d04}', '\u{d04}'),
-        ('\u{d0d}', '\u{d0d}'), ('\u{d11}', '\u{d11}'), ('\u{d3b}', '\u{d3c}'),
-        ('\u{d45}', '\u{d45}'), ('\u{d49}', '\u{d49}'), ('\u{d4f}', '\u{d56}'),
-        ('\u{d58}', '\u{d5e}'), ('\u{d64}', '\u{d65}'), ('\u{d76}', '\u{d78}'),
-        ('\u{d80}', '\u{d81}'), ('\u{d84}', '\u{d84}'), ('\u{d97}', '\u{d99}'),
-        ('\u{db2}', '\u{db2}'), ('\u{dbc}', '\u{dbc}'), ('\u{dbe}', '\u{dbf}'),
-        ('\u{dc7}', '\u{dc9}'), ('\u{dcb}', '\u{dce}'), ('\u{dd5}', '\u{dd5}'),
-        ('\u{dd7}', '\u{dd7}'), ('\u{de0}', '\u{de5}'), ('\u{df0}', '\u{df1}'),
-        ('\u{df5}', '\u{e00}'), ('\u{e3b}', '\u{e3e}'), ('\u{e5c}', '\u{e80}'),
-        ('\u{e83}', '\u{e83}'), ('\u{e85}', '\u{e86}'), ('\u{e89}', '\u{e89}'),
-        ('\u{e8b}', '\u{e8c}'), ('\u{e8e}', '\u{e93}'), ('\u{e98}', '\u{e98}'),
-        ('\u{ea0}', '\u{ea0}'), ('\u{ea4}', '\u{ea4}'), ('\u{ea6}', '\u{ea6}'),
-        ('\u{ea8}', '\u{ea9}'), ('\u{eac}', '\u{eac}'), ('\u{eba}', '\u{eba}'),
-        ('\u{ebe}', '\u{ebf}'), ('\u{ec5}', '\u{ec5}'), ('\u{ec7}', '\u{ec7}'),
-        ('\u{ece}', '\u{ecf}'), ('\u{eda}', '\u{edb}'), ('\u{ee0}', '\u{eff}'),
-        ('\u{f48}', '\u{f48}'), ('\u{f6d}', '\u{f70}'), ('\u{f98}', '\u{f98}'),
-        ('\u{fbd}', '\u{fbd}'), ('\u{fcd}', '\u{fcd}'), ('\u{fdb}', '\u{fff}'),
-        ('\u{10c6}', '\u{10c6}'), ('\u{10c8}', '\u{10cc}'), ('\u{10ce}',
-        '\u{10cf}'), ('\u{1249}', '\u{1249}'), ('\u{124e}', '\u{124f}'),
-        ('\u{1257}', '\u{1257}'), ('\u{1259}', '\u{1259}'), ('\u{125e}',
-        '\u{125f}'), ('\u{1289}', '\u{1289}'), ('\u{128e}', '\u{128f}'),
-        ('\u{12b1}', '\u{12b1}'), ('\u{12b6}', '\u{12b7}'), ('\u{12bf}',
-        '\u{12bf}'), ('\u{12c1}', '\u{12c1}'), ('\u{12c6}', '\u{12c7}'),
-        ('\u{12d7}', '\u{12d7}'), ('\u{1311}', '\u{1311}'), ('\u{1316}',
-        '\u{1317}'), ('\u{135b}', '\u{135c}'), ('\u{137d}', '\u{137f}'),
-        ('\u{139a}', '\u{139f}'), ('\u{13f6}', '\u{13f7}'), ('\u{13fe}',
-        '\u{13ff}'), ('\u{169d}', '\u{169f}'), ('\u{16f9}', '\u{16ff}'),
-        ('\u{170d}', '\u{170d}'), ('\u{1715}', '\u{171f}'), ('\u{1737}',
-        '\u{173f}'), ('\u{1754}', '\u{175f}'), ('\u{176d}', '\u{176d}'),
-        ('\u{1771}', '\u{1771}'), ('\u{1774}', '\u{177f}'), ('\u{17de}',
-        '\u{17df}'), ('\u{17ea}', '\u{17ef}'), ('\u{17fa}', '\u{17ff}'),
-        ('\u{180f}', '\u{180f}'), ('\u{181a}', '\u{181f}'), ('\u{1878}',
-        '\u{187f}'), ('\u{18ab}', '\u{18af}'), ('\u{18f6}', '\u{18ff}'),
-        ('\u{191f}', '\u{191f}'), ('\u{192c}', '\u{192f}'), ('\u{193c}',
-        '\u{193f}'), ('\u{1941}', '\u{1943}'), ('\u{196e}', '\u{196f}'),
-        ('\u{1975}', '\u{197f}'), ('\u{19ac}', '\u{19af}'), ('\u{19ca}',
-        '\u{19cf}'), ('\u{19db}', '\u{19dd}'), ('\u{1a1c}', '\u{1a1d}'),
-        ('\u{1a5f}', '\u{1a5f}'), ('\u{1a7d}', '\u{1a7e}'), ('\u{1a8a}',
-        '\u{1a8f}'), ('\u{1a9a}', '\u{1a9f}'), ('\u{1aae}', '\u{1aaf}'),
-        ('\u{1abf}', '\u{1aff}'), ('\u{1b4c}', '\u{1b4f}'), ('\u{1b7d}',
-        '\u{1b7f}'), ('\u{1bf4}', '\u{1bfb}'), ('\u{1c38}', '\u{1c3a}'),
-        ('\u{1c4a}', '\u{1c4c}'), ('\u{1c80}', '\u{1cbf}'), ('\u{1cc8}',
-        '\u{1ccf}'), ('\u{1cf7}', '\u{1cf7}'), ('\u{1cfa}', '\u{1cff}'),
-        ('\u{1df6}', '\u{1dfb}'), ('\u{1f16}', '\u{1f17}'), ('\u{1f1e}',
-        '\u{1f1f}'), ('\u{1f46}', '\u{1f47}'), ('\u{1f4e}', '\u{1f4f}'),
-        ('\u{1f58}', '\u{1f58}'), ('\u{1f5a}', '\u{1f5a}'), ('\u{1f5c}',
-        '\u{1f5c}'), ('\u{1f5e}', '\u{1f5e}'), ('\u{1f7e}', '\u{1f7f}'),
-        ('\u{1fb5}', '\u{1fb5}'), ('\u{1fc5}', '\u{1fc5}'), ('\u{1fd4}',
-        '\u{1fd5}'), ('\u{1fdc}', '\u{1fdc}'), ('\u{1ff0}', '\u{1ff1}'),
-        ('\u{1ff5}', '\u{1ff5}'), ('\u{1fff}', '\u{1fff}'), ('\u{2065}',
-        '\u{2065}'), ('\u{2072}', '\u{2073}'), ('\u{208f}', '\u{208f}'),
-        ('\u{209d}', '\u{209f}'), ('\u{20bf}', '\u{20cf}'), ('\u{20f1}',
-        '\u{20ff}'), ('\u{218c}', '\u{218f}'), ('\u{23fb}', '\u{23ff}'),
-        ('\u{2427}', '\u{243f}'), ('\u{244b}', '\u{245f}'), ('\u{2b74}',
-        '\u{2b75}'), ('\u{2b96}', '\u{2b97}'), ('\u{2bba}', '\u{2bbc}'),
-        ('\u{2bc9}', '\u{2bc9}'), ('\u{2bd2}', '\u{2beb}'), ('\u{2bf0}',
-        '\u{2bff}'), ('\u{2c2f}', '\u{2c2f}'), ('\u{2c5f}', '\u{2c5f}'),
-        ('\u{2cf4}', '\u{2cf8}'), ('\u{2d26}', '\u{2d26}'), ('\u{2d28}',
-        '\u{2d2c}'), ('\u{2d2e}', '\u{2d2f}'), ('\u{2d68}', '\u{2d6e}'),
-        ('\u{2d71}', '\u{2d7e}'), ('\u{2d97}', '\u{2d9f}'), ('\u{2da7}',
-        '\u{2da7}'), ('\u{2daf}', '\u{2daf}'), ('\u{2db7}', '\u{2db7}'),
-        ('\u{2dbf}', '\u{2dbf}'), ('\u{2dc7}', '\u{2dc7}'), ('\u{2dcf}',
-        '\u{2dcf}'), ('\u{2dd7}', '\u{2dd7}'), ('\u{2ddf}', '\u{2ddf}'),
-        ('\u{2e43}', '\u{2e7f}'), ('\u{2e9a}', '\u{2e9a}'), ('\u{2ef4}',
-        '\u{2eff}'), ('\u{2fd6}', '\u{2fef}'), ('\u{2ffc}', '\u{2fff}'),
-        ('\u{3040}', '\u{3040}'), ('\u{3097}', '\u{3098}'), ('\u{3100}',
-        '\u{3104}'), ('\u{312e}', '\u{3130}'), ('\u{318f}', '\u{318f}'),
-        ('\u{31bb}', '\u{31bf}'), ('\u{31e4}', '\u{31ef}'), ('\u{321f}',
-        '\u{321f}'), ('\u{32ff}', '\u{32ff}'), ('\u{4db6}', '\u{4dbf}'),
-        ('\u{9fd6}', '\u{9fff}'), ('\u{a48d}', '\u{a48f}'), ('\u{a4c7}',
-        '\u{a4cf}'), ('\u{a62c}', '\u{a63f}'), ('\u{a6f8}', '\u{a6ff}'),
-        ('\u{a7ae}', '\u{a7af}'), ('\u{a7b8}', '\u{a7f6}'), ('\u{a82c}',
-        '\u{a82f}'), ('\u{a83a}', '\u{a83f}'), ('\u{a878}', '\u{a87f}'),
-        ('\u{a8c5}', '\u{a8cd}'), ('\u{a8da}', '\u{a8df}'), ('\u{a8fe}',
-        '\u{a8ff}'), ('\u{a954}', '\u{a95e}'), ('\u{a97d}', '\u{a97f}'),
-        ('\u{a9ce}', '\u{a9ce}'), ('\u{a9da}', '\u{a9dd}'), ('\u{a9ff}',
-        '\u{a9ff}'), ('\u{aa37}', '\u{aa3f}'), ('\u{aa4e}', '\u{aa4f}'),
-        ('\u{aa5a}', '\u{aa5b}'), ('\u{aac3}', '\u{aada}'), ('\u{aaf7}',
-        '\u{ab00}'), ('\u{ab07}', '\u{ab08}'), ('\u{ab0f}', '\u{ab10}'),
-        ('\u{ab17}', '\u{ab1f}'), ('\u{ab27}', '\u{ab27}'), ('\u{ab2f}',
-        '\u{ab2f}'), ('\u{ab66}', '\u{ab6f}'), ('\u{abee}', '\u{abef}'),
-        ('\u{abfa}', '\u{abff}'), ('\u{d7a4}', '\u{d7af}'), ('\u{d7c7}',
-        '\u{d7ca}'), ('\u{d7fc}', '\u{d7ff}'), ('\u{fa6e}', '\u{fa6f}'),
-        ('\u{fada}', '\u{faff}'), ('\u{fb07}', '\u{fb12}'), ('\u{fb18}',
-        '\u{fb1c}'), ('\u{fb37}', '\u{fb37}'), ('\u{fb3d}', '\u{fb3d}'),
-        ('\u{fb3f}', '\u{fb3f}'), ('\u{fb42}', '\u{fb42}'), ('\u{fb45}',
-        '\u{fb45}'), ('\u{fbc2}', '\u{fbd2}'), ('\u{fd40}', '\u{fd4f}'),
-        ('\u{fd90}', '\u{fd91}'), ('\u{fdc8}', '\u{fdef}'), ('\u{fdfe}',
-        '\u{fdff}'), ('\u{fe1a}', '\u{fe1f}'), ('\u{fe53}', '\u{fe53}'),
-        ('\u{fe67}', '\u{fe67}'), ('\u{fe6c}', '\u{fe6f}'), ('\u{fe75}',
-        '\u{fe75}'), ('\u{fefd}', '\u{fefe}'), ('\u{ff00}', '\u{ff00}'),
-        ('\u{ffbf}', '\u{ffc1}'), ('\u{ffc8}', '\u{ffc9}'), ('\u{ffd0}',
-        '\u{ffd1}'), ('\u{ffd8}', '\u{ffd9}'), ('\u{ffdd}', '\u{ffdf}'),
-        ('\u{ffe7}', '\u{ffe7}'), ('\u{ffef}', '\u{fff8}'), ('\u{fffe}',
-        '\u{ffff}'), ('\u{1000c}', '\u{1000c}'), ('\u{10027}', '\u{10027}'),
-        ('\u{1003b}', '\u{1003b}'), ('\u{1003e}', '\u{1003e}'), ('\u{1004e}',
-        '\u{1004f}'), ('\u{1005e}', '\u{1007f}'), ('\u{100fb}', '\u{100ff}'),
-        ('\u{10103}', '\u{10106}'), ('\u{10134}', '\u{10136}'), ('\u{1018d}',
-        '\u{1018f}'), ('\u{1019c}', '\u{1019f}'), ('\u{101a1}', '\u{101cf}'),
-        ('\u{101fe}', '\u{1027f}'), ('\u{1029d}', '\u{1029f}'), ('\u{102d1}',
-        '\u{102df}'), ('\u{102fc}', '\u{102ff}'), ('\u{10324}', '\u{1032f}'),
-        ('\u{1034b}', '\u{1034f}'), ('\u{1037b}', '\u{1037f}'), ('\u{1039e}',
-        '\u{1039e}'), ('\u{103c4}', '\u{103c7}'), ('\u{103d6}', '\u{103ff}'),
-        ('\u{1049e}', '\u{1049f}'), ('\u{104aa}', '\u{104ff}'), ('\u{10528}',
-        '\u{1052f}'), ('\u{10564}', '\u{1056e}'), ('\u{10570}', '\u{105ff}'),
-        ('\u{10737}', '\u{1073f}'), ('\u{10756}', '\u{1075f}'), ('\u{10768}',
-        '\u{107ff}'), ('\u{10806}', '\u{10807}'), ('\u{10809}', '\u{10809}'),
-        ('\u{10836}', '\u{10836}'), ('\u{10839}', '\u{1083b}'), ('\u{1083d}',
-        '\u{1083e}'), ('\u{10856}', '\u{10856}'), ('\u{1089f}', '\u{108a6}'),
-        ('\u{108b0}', '\u{108df}'), ('\u{108f3}', '\u{108f3}'), ('\u{108f6}',
-        '\u{108fa}'), ('\u{1091c}', '\u{1091e}'), ('\u{1093a}', '\u{1093e}'),
-        ('\u{10940}', '\u{1097f}'), ('\u{109b8}', '\u{109bb}'), ('\u{109d0}',
-        '\u{109d1}'), ('\u{10a04}', '\u{10a04}'), ('\u{10a07}', '\u{10a0b}'),
-        ('\u{10a14}', '\u{10a14}'), ('\u{10a18}', '\u{10a18}'), ('\u{10a34}',
-        '\u{10a37}'), ('\u{10a3b}', '\u{10a3e}'), ('\u{10a48}', '\u{10a4f}'),
-        ('\u{10a59}', '\u{10a5f}'), ('\u{10aa0}', '\u{10abf}'), ('\u{10ae7}',
-        '\u{10aea}'), ('\u{10af7}', '\u{10aff}'), ('\u{10b36}', '\u{10b38}'),
-        ('\u{10b56}', '\u{10b57}'), ('\u{10b73}', '\u{10b77}'), ('\u{10b92}',
-        '\u{10b98}'), ('\u{10b9d}', '\u{10ba8}'), ('\u{10bb0}', '\u{10bff}'),
-        ('\u{10c49}', '\u{10c7f}'), ('\u{10cb3}', '\u{10cbf}'), ('\u{10cf3}',
-        '\u{10cf9}'), ('\u{10d00}', '\u{10e5f}'), ('\u{10e7f}', '\u{10fff}'),
-        ('\u{1104e}', '\u{11051}'), ('\u{11070}', '\u{1107e}'), ('\u{110c2}',
-        '\u{110cf}'), ('\u{110e9}', '\u{110ef}'), ('\u{110fa}', '\u{110ff}'),
-        ('\u{11135}', '\u{11135}'), ('\u{11144}', '\u{1114f}'), ('\u{11177}',
-        '\u{1117f}'), ('\u{111ce}', '\u{111cf}'), ('\u{111e0}', '\u{111e0}'),
-        ('\u{111f5}', '\u{111ff}'), ('\u{11212}', '\u{11212}'), ('\u{1123e}',
-        '\u{1127f}'), ('\u{11287}', '\u{11287}'), ('\u{11289}', '\u{11289}'),
-        ('\u{1128e}', '\u{1128e}'), ('\u{1129e}', '\u{1129e}'), ('\u{112aa}',
-        '\u{112af}'), ('\u{112eb}', '\u{112ef}'), ('\u{112fa}', '\u{112ff}'),
-        ('\u{11304}', '\u{11304}'), ('\u{1130d}', '\u{1130e}'), ('\u{11311}',
-        '\u{11312}'), ('\u{11329}', '\u{11329}'), ('\u{11331}', '\u{11331}'),
-        ('\u{11334}', '\u{11334}'), ('\u{1133a}', '\u{1133b}'), ('\u{11345}',
-        '\u{11346}'), ('\u{11349}', '\u{1134a}'), ('\u{1134e}', '\u{1134f}'),
-        ('\u{11351}', '\u{11356}'), ('\u{11358}', '\u{1135c}'), ('\u{11364}',
-        '\u{11365}'), ('\u{1136d}', '\u{1136f}'), ('\u{11375}', '\u{1147f}'),
-        ('\u{114c8}', '\u{114cf}'), ('\u{114da}', '\u{1157f}'), ('\u{115b6}',
-        '\u{115b7}'), ('\u{115de}', '\u{115ff}'), ('\u{11645}', '\u{1164f}'),
-        ('\u{1165a}', '\u{1167f}'), ('\u{116b8}', '\u{116bf}'), ('\u{116ca}',
-        '\u{116ff}'), ('\u{1171a}', '\u{1171c}'), ('\u{1172c}', '\u{1172f}'),
-        ('\u{11740}', '\u{1189f}'), ('\u{118f3}', '\u{118fe}'), ('\u{11900}',
-        '\u{11abf}'), ('\u{11af9}', '\u{11fff}'), ('\u{1239a}', '\u{123ff}'),
-        ('\u{1246f}', '\u{1246f}'), ('\u{12475}', '\u{1247f}'), ('\u{12544}',
-        '\u{12fff}'), ('\u{1342f}', '\u{143ff}'), ('\u{14647}', '\u{167ff}'),
-        ('\u{16a39}', '\u{16a3f}'), ('\u{16a5f}', '\u{16a5f}'), ('\u{16a6a}',
-        '\u{16a6d}'), ('\u{16a70}', '\u{16acf}'), ('\u{16aee}', '\u{16aef}'),
-        ('\u{16af6}', '\u{16aff}'), ('\u{16b46}', '\u{16b4f}'), ('\u{16b5a}',
-        '\u{16b5a}'), ('\u{16b62}', '\u{16b62}'), ('\u{16b78}', '\u{16b7c}'),
-        ('\u{16b90}', '\u{16eff}'), ('\u{16f45}', '\u{16f4f}'), ('\u{16f7f}',
-        '\u{16f8e}'), ('\u{16fa0}', '\u{1afff}'), ('\u{1b002}', '\u{1bbff}'),
-        ('\u{1bc6b}', '\u{1bc6f}'), ('\u{1bc7d}', '\u{1bc7f}'), ('\u{1bc89}',
-        '\u{1bc8f}'), ('\u{1bc9a}', '\u{1bc9b}'), ('\u{1bca4}', '\u{1cfff}'),
-        ('\u{1d0f6}', '\u{1d0ff}'), ('\u{1d127}', '\u{1d128}'), ('\u{1d1e9}',
-        '\u{1d1ff}'), ('\u{1d246}', '\u{1d2ff}'), ('\u{1d357}', '\u{1d35f}'),
-        ('\u{1d372}', '\u{1d3ff}'), ('\u{1d455}', '\u{1d455}'), ('\u{1d49d}',
-        '\u{1d49d}'), ('\u{1d4a0}', '\u{1d4a1}'), ('\u{1d4a3}', '\u{1d4a4}'),
-        ('\u{1d4a7}', '\u{1d4a8}'), ('\u{1d4ad}', '\u{1d4ad}'), ('\u{1d4ba}',
-        '\u{1d4ba}'), ('\u{1d4bc}', '\u{1d4bc}'), ('\u{1d4c4}', '\u{1d4c4}'),
-        ('\u{1d506}', '\u{1d506}'), ('\u{1d50b}', '\u{1d50c}'), ('\u{1d515}',
-        '\u{1d515}'), ('\u{1d51d}', '\u{1d51d}'), ('\u{1d53a}', '\u{1d53a}'),
-        ('\u{1d53f}', '\u{1d53f}'), ('\u{1d545}', '\u{1d545}'), ('\u{1d547}',
-        '\u{1d549}'), ('\u{1d551}', '\u{1d551}'), ('\u{1d6a6}', '\u{1d6a7}'),
-        ('\u{1d7cc}', '\u{1d7cd}'), ('\u{1da8c}', '\u{1da9a}'), ('\u{1daa0}',
-        '\u{1daa0}'), ('\u{1dab0}', '\u{1e7ff}'), ('\u{1e8c5}', '\u{1e8c6}'),
-        ('\u{1e8d7}', '\u{1edff}'), ('\u{1ee04}', '\u{1ee04}'), ('\u{1ee20}',
-        '\u{1ee20}'), ('\u{1ee23}', '\u{1ee23}'), ('\u{1ee25}', '\u{1ee26}'),
-        ('\u{1ee28}', '\u{1ee28}'), ('\u{1ee33}', '\u{1ee33}'), ('\u{1ee38}',
-        '\u{1ee38}'), ('\u{1ee3a}', '\u{1ee3a}'), ('\u{1ee3c}', '\u{1ee41}'),
-        ('\u{1ee43}', '\u{1ee46}'), ('\u{1ee48}', '\u{1ee48}'), ('\u{1ee4a}',
-        '\u{1ee4a}'), ('\u{1ee4c}', '\u{1ee4c}'), ('\u{1ee50}', '\u{1ee50}'),
-        ('\u{1ee53}', '\u{1ee53}'), ('\u{1ee55}', '\u{1ee56}'), ('\u{1ee58}',
-        '\u{1ee58}'), ('\u{1ee5a}', '\u{1ee5a}'), ('\u{1ee5c}', '\u{1ee5c}'),
-        ('\u{1ee5e}', '\u{1ee5e}'), ('\u{1ee60}', '\u{1ee60}'), ('\u{1ee63}',
-        '\u{1ee63}'), ('\u{1ee65}', '\u{1ee66}'), ('\u{1ee6b}', '\u{1ee6b}'),
-        ('\u{1ee73}', '\u{1ee73}'), ('\u{1ee78}', '\u{1ee78}'), ('\u{1ee7d}',
-        '\u{1ee7d}'), ('\u{1ee7f}', '\u{1ee7f}'), ('\u{1ee8a}', '\u{1ee8a}'),
-        ('\u{1ee9c}', '\u{1eea0}'), ('\u{1eea4}', '\u{1eea4}'), ('\u{1eeaa}',
-        '\u{1eeaa}'), ('\u{1eebc}', '\u{1eeef}'), ('\u{1eef2}', '\u{1efff}'),
-        ('\u{1f02c}', '\u{1f02f}'), ('\u{1f094}', '\u{1f09f}'), ('\u{1f0af}',
-        '\u{1f0b0}'), ('\u{1f0c0}', '\u{1f0c0}'), ('\u{1f0d0}', '\u{1f0d0}'),
-        ('\u{1f0f6}', '\u{1f0ff}'), ('\u{1f10d}', '\u{1f10f}'), ('\u{1f12f}',
-        '\u{1f12f}'), ('\u{1f16c}', '\u{1f16f}'), ('\u{1f19b}', '\u{1f1e5}'),
-        ('\u{1f203}', '\u{1f20f}'), ('\u{1f23b}', '\u{1f23f}'), ('\u{1f249}',
-        '\u{1f24f}'), ('\u{1f252}', '\u{1f2ff}'), ('\u{1f57a}', '\u{1f57a}'),
-        ('\u{1f5a4}', '\u{1f5a4}'), ('\u{1f6d1}', '\u{1f6df}'), ('\u{1f6ed}',
-        '\u{1f6ef}'), ('\u{1f6f4}', '\u{1f6ff}'), ('\u{1f774}', '\u{1f77f}'),
-        ('\u{1f7d5}', '\u{1f7ff}'), ('\u{1f80c}', '\u{1f80f}'), ('\u{1f848}',
-        '\u{1f84f}'), ('\u{1f85a}', '\u{1f85f}'), ('\u{1f888}', '\u{1f88f}'),
-        ('\u{1f8ae}', '\u{1f90f}'), ('\u{1f919}', '\u{1f97f}'), ('\u{1f985}',
-        '\u{1f9bf}'), ('\u{1f9c1}', '\u{1ffff}'), ('\u{2a6d7}', '\u{2a6ff}'),
-        ('\u{2b735}', '\u{2b73f}'), ('\u{2b81e}', '\u{2b81f}'), ('\u{2cea2}',
-        '\u{2f7ff}'), ('\u{2fa1e}', '\u{e0000}'), ('\u{e0002}', '\u{e001f}'),
-        ('\u{e0080}', '\u{e00ff}'), ('\u{e01f0}', '\u{effff}'), ('\u{ffffe}',
-        '\u{fffff}'), ('\u{10fffe}', '\u{10ffff}')
-    ];
-
-    pub const Co_table: &'static [(char, char)] = &[
-        ('\u{e000}', '\u{f8ff}'), ('\u{f0000}', '\u{ffffd}'), ('\u{100000}',
-        '\u{10fffd}')
-    ];
-
-    pub const L_table: &'static [(char, char)] = &[
-        ('\u{41}', '\u{5a}'), ('\u{61}', '\u{7a}'), ('\u{aa}', '\u{aa}'),
-        ('\u{b5}', '\u{b5}'), ('\u{ba}', '\u{ba}'), ('\u{c0}', '\u{d6}'),
-        ('\u{d8}', '\u{f6}'), ('\u{f8}', '\u{2c1}'), ('\u{2c6}', '\u{2d1}'),
-        ('\u{2e0}', '\u{2e4}'), ('\u{2ec}', '\u{2ec}'), ('\u{2ee}', '\u{2ee}'),
-        ('\u{370}', '\u{374}'), ('\u{376}', '\u{377}'), ('\u{37a}', '\u{37d}'),
-        ('\u{37f}', '\u{37f}'), ('\u{386}', '\u{386}'), ('\u{388}', '\u{38a}'),
-        ('\u{38c}', '\u{38c}'), ('\u{38e}', '\u{3a1}'), ('\u{3a3}', '\u{3f5}'),
-        ('\u{3f7}', '\u{481}'), ('\u{48a}', '\u{52f}'), ('\u{531}', '\u{556}'),
-        ('\u{559}', '\u{559}'), ('\u{561}', '\u{587}'), ('\u{5d0}', '\u{5ea}'),
-        ('\u{5f0}', '\u{5f2}'), ('\u{620}', '\u{64a}'), ('\u{66e}', '\u{66f}'),
-        ('\u{671}', '\u{6d3}'), ('\u{6d5}', '\u{6d5}'), ('\u{6e5}', '\u{6e6}'),
-        ('\u{6ee}', '\u{6ef}'), ('\u{6fa}', '\u{6fc}'), ('\u{6ff}', '\u{6ff}'),
-        ('\u{710}', '\u{710}'), ('\u{712}', '\u{72f}'), ('\u{74d}', '\u{7a5}'),
-        ('\u{7b1}', '\u{7b1}'), ('\u{7ca}', '\u{7ea}'), ('\u{7f4}', '\u{7f5}'),
-        ('\u{7fa}', '\u{7fa}'), ('\u{800}', '\u{815}'), ('\u{81a}', '\u{81a}'),
-        ('\u{824}', '\u{824}'), ('\u{828}', '\u{828}'), ('\u{840}', '\u{858}'),
-        ('\u{8a0}', '\u{8b4}'), ('\u{904}', '\u{939}'), ('\u{93d}', '\u{93d}'),
-        ('\u{950}', '\u{950}'), ('\u{958}', '\u{961}'), ('\u{971}', '\u{980}'),
-        ('\u{985}', '\u{98c}'), ('\u{98f}', '\u{990}'), ('\u{993}', '\u{9a8}'),
-        ('\u{9aa}', '\u{9b0}'), ('\u{9b2}', '\u{9b2}'), ('\u{9b6}', '\u{9b9}'),
-        ('\u{9bd}', '\u{9bd}'), ('\u{9ce}', '\u{9ce}'), ('\u{9dc}', '\u{9dd}'),
-        ('\u{9df}', '\u{9e1}'), ('\u{9f0}', '\u{9f1}'), ('\u{a05}', '\u{a0a}'),
-        ('\u{a0f}', '\u{a10}'), ('\u{a13}', '\u{a28}'), ('\u{a2a}', '\u{a30}'),
-        ('\u{a32}', '\u{a33}'), ('\u{a35}', '\u{a36}'), ('\u{a38}', '\u{a39}'),
-        ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'), ('\u{a72}', '\u{a74}'),
-        ('\u{a85}', '\u{a8d}'), ('\u{a8f}', '\u{a91}'), ('\u{a93}', '\u{aa8}'),
-        ('\u{aaa}', '\u{ab0}'), ('\u{ab2}', '\u{ab3}'), ('\u{ab5}', '\u{ab9}'),
-        ('\u{abd}', '\u{abd}'), ('\u{ad0}', '\u{ad0}'), ('\u{ae0}', '\u{ae1}'),
-        ('\u{af9}', '\u{af9}'), ('\u{b05}', '\u{b0c}'), ('\u{b0f}', '\u{b10}'),
-        ('\u{b13}', '\u{b28}'), ('\u{b2a}', '\u{b30}'), ('\u{b32}', '\u{b33}'),
-        ('\u{b35}', '\u{b39}'), ('\u{b3d}', '\u{b3d}'), ('\u{b5c}', '\u{b5d}'),
-        ('\u{b5f}', '\u{b61}'), ('\u{b71}', '\u{b71}'), ('\u{b83}', '\u{b83}'),
-        ('\u{b85}', '\u{b8a}'), ('\u{b8e}', '\u{b90}'), ('\u{b92}', '\u{b95}'),
-        ('\u{b99}', '\u{b9a}'), ('\u{b9c}', '\u{b9c}'), ('\u{b9e}', '\u{b9f}'),
-        ('\u{ba3}', '\u{ba4}'), ('\u{ba8}', '\u{baa}'), ('\u{bae}', '\u{bb9}'),
-        ('\u{bd0}', '\u{bd0}'), ('\u{c05}', '\u{c0c}'), ('\u{c0e}', '\u{c10}'),
-        ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'), ('\u{c3d}', '\u{c3d}'),
-        ('\u{c58}', '\u{c5a}'), ('\u{c60}', '\u{c61}'), ('\u{c85}', '\u{c8c}'),
-        ('\u{c8e}', '\u{c90}'), ('\u{c92}', '\u{ca8}'), ('\u{caa}', '\u{cb3}'),
-        ('\u{cb5}', '\u{cb9}'), ('\u{cbd}', '\u{cbd}'), ('\u{cde}', '\u{cde}'),
-        ('\u{ce0}', '\u{ce1}'), ('\u{cf1}', '\u{cf2}'), ('\u{d05}', '\u{d0c}'),
-        ('\u{d0e}', '\u{d10}'), ('\u{d12}', '\u{d3a}'), ('\u{d3d}', '\u{d3d}'),
-        ('\u{d4e}', '\u{d4e}'), ('\u{d5f}', '\u{d61}'), ('\u{d7a}', '\u{d7f}'),
-        ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'), ('\u{db3}', '\u{dbb}'),
-        ('\u{dbd}', '\u{dbd}'), ('\u{dc0}', '\u{dc6}'), ('\u{e01}', '\u{e30}'),
-        ('\u{e32}', '\u{e33}'), ('\u{e40}', '\u{e46}'), ('\u{e81}', '\u{e82}'),
-        ('\u{e84}', '\u{e84}'), ('\u{e87}', '\u{e88}'), ('\u{e8a}', '\u{e8a}'),
-        ('\u{e8d}', '\u{e8d}'), ('\u{e94}', '\u{e97}'), ('\u{e99}', '\u{e9f}'),
-        ('\u{ea1}', '\u{ea3}'), ('\u{ea5}', '\u{ea5}'), ('\u{ea7}', '\u{ea7}'),
-        ('\u{eaa}', '\u{eab}'), ('\u{ead}', '\u{eb0}'), ('\u{eb2}', '\u{eb3}'),
-        ('\u{ebd}', '\u{ebd}'), ('\u{ec0}', '\u{ec4}'), ('\u{ec6}', '\u{ec6}'),
-        ('\u{edc}', '\u{edf}'), ('\u{f00}', '\u{f00}'), ('\u{f40}', '\u{f47}'),
-        ('\u{f49}', '\u{f6c}'), ('\u{f88}', '\u{f8c}'), ('\u{1000}',
-        '\u{102a}'), ('\u{103f}', '\u{103f}'), ('\u{1050}', '\u{1055}'),
-        ('\u{105a}', '\u{105d}'), ('\u{1061}', '\u{1061}'), ('\u{1065}',
-        '\u{1066}'), ('\u{106e}', '\u{1070}'), ('\u{1075}', '\u{1081}'),
-        ('\u{108e}', '\u{108e}'), ('\u{10a0}', '\u{10c5}'), ('\u{10c7}',
-        '\u{10c7}'), ('\u{10cd}', '\u{10cd}'), ('\u{10d0}', '\u{10fa}'),
-        ('\u{10fc}', '\u{1248}'), ('\u{124a}', '\u{124d}'), ('\u{1250}',
-        '\u{1256}'), ('\u{1258}', '\u{1258}'), ('\u{125a}', '\u{125d}'),
-        ('\u{1260}', '\u{1288}'), ('\u{128a}', '\u{128d}'), ('\u{1290}',
-        '\u{12b0}'), ('\u{12b2}', '\u{12b5}'), ('\u{12b8}', '\u{12be}'),
-        ('\u{12c0}', '\u{12c0}'), ('\u{12c2}', '\u{12c5}'), ('\u{12c8}',
-        '\u{12d6}'), ('\u{12d8}', '\u{1310}'), ('\u{1312}', '\u{1315}'),
-        ('\u{1318}', '\u{135a}'), ('\u{1380}', '\u{138f}'), ('\u{13a0}',
-        '\u{13f5}'), ('\u{13f8}', '\u{13fd}'), ('\u{1401}', '\u{166c}'),
-        ('\u{166f}', '\u{167f}'), ('\u{1681}', '\u{169a}'), ('\u{16a0}',
-        '\u{16ea}'), ('\u{16f1}', '\u{16f8}'), ('\u{1700}', '\u{170c}'),
-        ('\u{170e}', '\u{1711}'), ('\u{1720}', '\u{1731}'), ('\u{1740}',
-        '\u{1751}'), ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'),
-        ('\u{1780}', '\u{17b3}'), ('\u{17d7}', '\u{17d7}'), ('\u{17dc}',
-        '\u{17dc}'), ('\u{1820}', '\u{1877}'), ('\u{1880}', '\u{18a8}'),
-        ('\u{18aa}', '\u{18aa}'), ('\u{18b0}', '\u{18f5}'), ('\u{1900}',
-        '\u{191e}'), ('\u{1950}', '\u{196d}'), ('\u{1970}', '\u{1974}'),
-        ('\u{1980}', '\u{19ab}'), ('\u{19b0}', '\u{19c9}'), ('\u{1a00}',
-        '\u{1a16}'), ('\u{1a20}', '\u{1a54}'), ('\u{1aa7}', '\u{1aa7}'),
-        ('\u{1b05}', '\u{1b33}'), ('\u{1b45}', '\u{1b4b}'), ('\u{1b83}',
-        '\u{1ba0}'), ('\u{1bae}', '\u{1baf}'), ('\u{1bba}', '\u{1be5}'),
-        ('\u{1c00}', '\u{1c23}'), ('\u{1c4d}', '\u{1c4f}'), ('\u{1c5a}',
-        '\u{1c7d}'), ('\u{1ce9}', '\u{1cec}'), ('\u{1cee}', '\u{1cf1}'),
-        ('\u{1cf5}', '\u{1cf6}'), ('\u{1d00}', '\u{1dbf}'), ('\u{1e00}',
-        '\u{1f15}'), ('\u{1f18}', '\u{1f1d}'), ('\u{1f20}', '\u{1f45}'),
-        ('\u{1f48}', '\u{1f4d}'), ('\u{1f50}', '\u{1f57}'), ('\u{1f59}',
-        '\u{1f59}'), ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'),
-        ('\u{1f5f}', '\u{1f7d}'), ('\u{1f80}', '\u{1fb4}'), ('\u{1fb6}',
-        '\u{1fbc}'), ('\u{1fbe}', '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'),
-        ('\u{1fc6}', '\u{1fcc}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}',
-        '\u{1fdb}'), ('\u{1fe0}', '\u{1fec}'), ('\u{1ff2}', '\u{1ff4}'),
-        ('\u{1ff6}', '\u{1ffc}'), ('\u{2071}', '\u{2071}'), ('\u{207f}',
-        '\u{207f}'), ('\u{2090}', '\u{209c}'), ('\u{2102}', '\u{2102}'),
-        ('\u{2107}', '\u{2107}'), ('\u{210a}', '\u{2113}'), ('\u{2115}',
-        '\u{2115}'), ('\u{2119}', '\u{211d}'), ('\u{2124}', '\u{2124}'),
-        ('\u{2126}', '\u{2126}'), ('\u{2128}', '\u{2128}'), ('\u{212a}',
-        '\u{212d}'), ('\u{212f}', '\u{2139}'), ('\u{213c}', '\u{213f}'),
-        ('\u{2145}', '\u{2149}'), ('\u{214e}', '\u{214e}'), ('\u{2183}',
-        '\u{2184}'), ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}', '\u{2c5e}'),
-        ('\u{2c60}', '\u{2ce4}'), ('\u{2ceb}', '\u{2cee}'), ('\u{2cf2}',
-        '\u{2cf3}'), ('\u{2d00}', '\u{2d25}'), ('\u{2d27}', '\u{2d27}'),
-        ('\u{2d2d}', '\u{2d2d}'), ('\u{2d30}', '\u{2d67}'), ('\u{2d6f}',
-        '\u{2d6f}'), ('\u{2d80}', '\u{2d96}'), ('\u{2da0}', '\u{2da6}'),
-        ('\u{2da8}', '\u{2dae}'), ('\u{2db0}', '\u{2db6}'), ('\u{2db8}',
-        '\u{2dbe}'), ('\u{2dc0}', '\u{2dc6}'), ('\u{2dc8}', '\u{2dce}'),
-        ('\u{2dd0}', '\u{2dd6}'), ('\u{2dd8}', '\u{2dde}'), ('\u{2e2f}',
-        '\u{2e2f}'), ('\u{3005}', '\u{3006}'), ('\u{3031}', '\u{3035}'),
-        ('\u{303b}', '\u{303c}'), ('\u{3041}', '\u{3096}'), ('\u{309d}',
-        '\u{309f}'), ('\u{30a1}', '\u{30fa}'), ('\u{30fc}', '\u{30ff}'),
-        ('\u{3105}', '\u{312d}'), ('\u{3131}', '\u{318e}'), ('\u{31a0}',
-        '\u{31ba}'), ('\u{31f0}', '\u{31ff}'), ('\u{3400}', '\u{4db5}'),
-        ('\u{4e00}', '\u{9fd5}'), ('\u{a000}', '\u{a48c}'), ('\u{a4d0}',
-        '\u{a4fd}'), ('\u{a500}', '\u{a60c}'), ('\u{a610}', '\u{a61f}'),
-        ('\u{a62a}', '\u{a62b}'), ('\u{a640}', '\u{a66e}'), ('\u{a67f}',
-        '\u{a69d}'), ('\u{a6a0}', '\u{a6e5}'), ('\u{a717}', '\u{a71f}'),
-        ('\u{a722}', '\u{a788}'), ('\u{a78b}', '\u{a7ad}'), ('\u{a7b0}',
-        '\u{a7b7}'), ('\u{a7f7}', '\u{a801}'), ('\u{a803}', '\u{a805}'),
-        ('\u{a807}', '\u{a80a}'), ('\u{a80c}', '\u{a822}'), ('\u{a840}',
-        '\u{a873}'), ('\u{a882}', '\u{a8b3}'), ('\u{a8f2}', '\u{a8f7}'),
-        ('\u{a8fb}', '\u{a8fb}'), ('\u{a8fd}', '\u{a8fd}'), ('\u{a90a}',
-        '\u{a925}'), ('\u{a930}', '\u{a946}'), ('\u{a960}', '\u{a97c}'),
-        ('\u{a984}', '\u{a9b2}'), ('\u{a9cf}', '\u{a9cf}'), ('\u{a9e0}',
-        '\u{a9e4}'), ('\u{a9e6}', '\u{a9ef}'), ('\u{a9fa}', '\u{a9fe}'),
-        ('\u{aa00}', '\u{aa28}'), ('\u{aa40}', '\u{aa42}'), ('\u{aa44}',
-        '\u{aa4b}'), ('\u{aa60}', '\u{aa76}'), ('\u{aa7a}', '\u{aa7a}'),
-        ('\u{aa7e}', '\u{aaaf}'), ('\u{aab1}', '\u{aab1}'), ('\u{aab5}',
-        '\u{aab6}'), ('\u{aab9}', '\u{aabd}'), ('\u{aac0}', '\u{aac0}'),
-        ('\u{aac2}', '\u{aac2}'), ('\u{aadb}', '\u{aadd}'), ('\u{aae0}',
-        '\u{aaea}'), ('\u{aaf2}', '\u{aaf4}'), ('\u{ab01}', '\u{ab06}'),
-        ('\u{ab09}', '\u{ab0e}'), ('\u{ab11}', '\u{ab16}'), ('\u{ab20}',
-        '\u{ab26}'), ('\u{ab28}', '\u{ab2e}'), ('\u{ab30}', '\u{ab5a}'),
-        ('\u{ab5c}', '\u{ab65}'), ('\u{ab70}', '\u{abe2}'), ('\u{ac00}',
-        '\u{d7a3}'), ('\u{d7b0}', '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'),
-        ('\u{f900}', '\u{fa6d}'), ('\u{fa70}', '\u{fad9}'), ('\u{fb00}',
-        '\u{fb06}'), ('\u{fb13}', '\u{fb17}'), ('\u{fb1d}', '\u{fb1d}'),
-        ('\u{fb1f}', '\u{fb28}'), ('\u{fb2a}', '\u{fb36}'), ('\u{fb38}',
-        '\u{fb3c}'), ('\u{fb3e}', '\u{fb3e}'), ('\u{fb40}', '\u{fb41}'),
-        ('\u{fb43}', '\u{fb44}'), ('\u{fb46}', '\u{fbb1}'), ('\u{fbd3}',
-        '\u{fd3d}'), ('\u{fd50}', '\u{fd8f}'), ('\u{fd92}', '\u{fdc7}'),
-        ('\u{fdf0}', '\u{fdfb}'), ('\u{fe70}', '\u{fe74}'), ('\u{fe76}',
-        '\u{fefc}'), ('\u{ff21}', '\u{ff3a}'), ('\u{ff41}', '\u{ff5a}'),
-        ('\u{ff66}', '\u{ffbe}'), ('\u{ffc2}', '\u{ffc7}'), ('\u{ffca}',
-        '\u{ffcf}'), ('\u{ffd2}', '\u{ffd7}'), ('\u{ffda}', '\u{ffdc}'),
-        ('\u{10000}', '\u{1000b}'), ('\u{1000d}', '\u{10026}'), ('\u{10028}',
-        '\u{1003a}'), ('\u{1003c}', '\u{1003d}'), ('\u{1003f}', '\u{1004d}'),
-        ('\u{10050}', '\u{1005d}'), ('\u{10080}', '\u{100fa}'), ('\u{10280}',
-        '\u{1029c}'), ('\u{102a0}', '\u{102d0}'), ('\u{10300}', '\u{1031f}'),
-        ('\u{10330}', '\u{10340}'), ('\u{10342}', '\u{10349}'), ('\u{10350}',
-        '\u{10375}'), ('\u{10380}', '\u{1039d}'), ('\u{103a0}', '\u{103c3}'),
-        ('\u{103c8}', '\u{103cf}'), ('\u{10400}', '\u{1049d}'), ('\u{10500}',
-        '\u{10527}'), ('\u{10530}', '\u{10563}'), ('\u{10600}', '\u{10736}'),
-        ('\u{10740}', '\u{10755}'), ('\u{10760}', '\u{10767}'), ('\u{10800}',
-        '\u{10805}'), ('\u{10808}', '\u{10808}'), ('\u{1080a}', '\u{10835}'),
-        ('\u{10837}', '\u{10838}'), ('\u{1083c}', '\u{1083c}'), ('\u{1083f}',
-        '\u{10855}'), ('\u{10860}', '\u{10876}'), ('\u{10880}', '\u{1089e}'),
-        ('\u{108e0}', '\u{108f2}'), ('\u{108f4}', '\u{108f5}'), ('\u{10900}',
-        '\u{10915}'), ('\u{10920}', '\u{10939}'), ('\u{10980}', '\u{109b7}'),
-        ('\u{109be}', '\u{109bf}'), ('\u{10a00}', '\u{10a00}'), ('\u{10a10}',
-        '\u{10a13}'), ('\u{10a15}', '\u{10a17}'), ('\u{10a19}', '\u{10a33}'),
-        ('\u{10a60}', '\u{10a7c}'), ('\u{10a80}', '\u{10a9c}'), ('\u{10ac0}',
-        '\u{10ac7}'), ('\u{10ac9}', '\u{10ae4}'), ('\u{10b00}', '\u{10b35}'),
-        ('\u{10b40}', '\u{10b55}'), ('\u{10b60}', '\u{10b72}'), ('\u{10b80}',
-        '\u{10b91}'), ('\u{10c00}', '\u{10c48}'), ('\u{10c80}', '\u{10cb2}'),
-        ('\u{10cc0}', '\u{10cf2}'), ('\u{11003}', '\u{11037}'), ('\u{11083}',
-        '\u{110af}'), ('\u{110d0}', '\u{110e8}'), ('\u{11103}', '\u{11126}'),
-        ('\u{11150}', '\u{11172}'), ('\u{11176}', '\u{11176}'), ('\u{11183}',
-        '\u{111b2}'), ('\u{111c1}', '\u{111c4}'), ('\u{111da}', '\u{111da}'),
-        ('\u{111dc}', '\u{111dc}'), ('\u{11200}', '\u{11211}'), ('\u{11213}',
-        '\u{1122b}'), ('\u{11280}', '\u{11286}'), ('\u{11288}', '\u{11288}'),
-        ('\u{1128a}', '\u{1128d}'), ('\u{1128f}', '\u{1129d}'), ('\u{1129f}',
-        '\u{112a8}'), ('\u{112b0}', '\u{112de}'), ('\u{11305}', '\u{1130c}'),
-        ('\u{1130f}', '\u{11310}'), ('\u{11313}', '\u{11328}'), ('\u{1132a}',
-        '\u{11330}'), ('\u{11332}', '\u{11333}'), ('\u{11335}', '\u{11339}'),
-        ('\u{1133d}', '\u{1133d}'), ('\u{11350}', '\u{11350}'), ('\u{1135d}',
-        '\u{11361}'), ('\u{11480}', '\u{114af}'), ('\u{114c4}', '\u{114c5}'),
-        ('\u{114c7}', '\u{114c7}'), ('\u{11580}', '\u{115ae}'), ('\u{115d8}',
-        '\u{115db}'), ('\u{11600}', '\u{1162f}'), ('\u{11644}', '\u{11644}'),
-        ('\u{11680}', '\u{116aa}'), ('\u{11700}', '\u{11719}'), ('\u{118a0}',
-        '\u{118df}'), ('\u{118ff}', '\u{118ff}'), ('\u{11ac0}', '\u{11af8}'),
-        ('\u{12000}', '\u{12399}'), ('\u{12480}', '\u{12543}'), ('\u{13000}',
-        '\u{1342e}'), ('\u{14400}', '\u{14646}'), ('\u{16800}', '\u{16a38}'),
-        ('\u{16a40}', '\u{16a5e}'), ('\u{16ad0}', '\u{16aed}'), ('\u{16b00}',
-        '\u{16b2f}'), ('\u{16b40}', '\u{16b43}'), ('\u{16b63}', '\u{16b77}'),
-        ('\u{16b7d}', '\u{16b8f}'), ('\u{16f00}', '\u{16f44}'), ('\u{16f50}',
-        '\u{16f50}'), ('\u{16f93}', '\u{16f9f}'), ('\u{1b000}', '\u{1b001}'),
-        ('\u{1bc00}', '\u{1bc6a}'), ('\u{1bc70}', '\u{1bc7c}'), ('\u{1bc80}',
-        '\u{1bc88}'), ('\u{1bc90}', '\u{1bc99}'), ('\u{1d400}', '\u{1d454}'),
-        ('\u{1d456}', '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}',
-        '\u{1d4a2}'), ('\u{1d4a5}', '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'),
-        ('\u{1d4ae}', '\u{1d4b9}'), ('\u{1d4bb}', '\u{1d4bb}'), ('\u{1d4bd}',
-        '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d505}'), ('\u{1d507}', '\u{1d50a}'),
-        ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'), ('\u{1d51e}',
-        '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}', '\u{1d544}'),
-        ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'), ('\u{1d552}',
-        '\u{1d6a5}'), ('\u{1d6a8}', '\u{1d6c0}'), ('\u{1d6c2}', '\u{1d6da}'),
-        ('\u{1d6dc}', '\u{1d6fa}'), ('\u{1d6fc}', '\u{1d714}'), ('\u{1d716}',
-        '\u{1d734}'), ('\u{1d736}', '\u{1d74e}'), ('\u{1d750}', '\u{1d76e}'),
-        ('\u{1d770}', '\u{1d788}'), ('\u{1d78a}', '\u{1d7a8}'), ('\u{1d7aa}',
-        '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7cb}'), ('\u{1e800}', '\u{1e8c4}'),
-        ('\u{1ee00}', '\u{1ee03}'), ('\u{1ee05}', '\u{1ee1f}'), ('\u{1ee21}',
-        '\u{1ee22}'), ('\u{1ee24}', '\u{1ee24}'), ('\u{1ee27}', '\u{1ee27}'),
-        ('\u{1ee29}', '\u{1ee32}'), ('\u{1ee34}', '\u{1ee37}'), ('\u{1ee39}',
-        '\u{1ee39}'), ('\u{1ee3b}', '\u{1ee3b}'), ('\u{1ee42}', '\u{1ee42}'),
-        ('\u{1ee47}', '\u{1ee47}'), ('\u{1ee49}', '\u{1ee49}'), ('\u{1ee4b}',
-        '\u{1ee4b}'), ('\u{1ee4d}', '\u{1ee4f}'), ('\u{1ee51}', '\u{1ee52}'),
-        ('\u{1ee54}', '\u{1ee54}'), ('\u{1ee57}', '\u{1ee57}'), ('\u{1ee59}',
-        '\u{1ee59}'), ('\u{1ee5b}', '\u{1ee5b}'), ('\u{1ee5d}', '\u{1ee5d}'),
-        ('\u{1ee5f}', '\u{1ee5f}'), ('\u{1ee61}', '\u{1ee62}'), ('\u{1ee64}',
-        '\u{1ee64}'), ('\u{1ee67}', '\u{1ee6a}'), ('\u{1ee6c}', '\u{1ee72}'),
-        ('\u{1ee74}', '\u{1ee77}'), ('\u{1ee79}', '\u{1ee7c}'), ('\u{1ee7e}',
-        '\u{1ee7e}'), ('\u{1ee80}', '\u{1ee89}'), ('\u{1ee8b}', '\u{1ee9b}'),
-        ('\u{1eea1}', '\u{1eea3}'), ('\u{1eea5}', '\u{1eea9}'), ('\u{1eeab}',
-        '\u{1eebb}'), ('\u{20000}', '\u{2a6d6}'), ('\u{2a700}', '\u{2b734}'),
-        ('\u{2b740}', '\u{2b81d}'), ('\u{2b820}', '\u{2cea1}'), ('\u{2f800}',
-        '\u{2fa1d}')
-    ];
-
-    pub const LC_table: &'static [(char, char)] = &[
-        ('\u{41}', '\u{5a}'), ('\u{61}', '\u{7a}'), ('\u{b5}', '\u{b5}'),
-        ('\u{c0}', '\u{d6}'), ('\u{d8}', '\u{f6}'), ('\u{f8}', '\u{1ba}'),
-        ('\u{1bc}', '\u{1bf}'), ('\u{1c4}', '\u{293}'), ('\u{295}', '\u{2af}'),
-        ('\u{370}', '\u{373}'), ('\u{376}', '\u{377}'), ('\u{37b}', '\u{37d}'),
-        ('\u{37f}', '\u{37f}'), ('\u{386}', '\u{386}'), ('\u{388}', '\u{38a}'),
-        ('\u{38c}', '\u{38c}'), ('\u{38e}', '\u{3a1}'), ('\u{3a3}', '\u{3f5}'),
-        ('\u{3f7}', '\u{481}'), ('\u{48a}', '\u{52f}'), ('\u{531}', '\u{556}'),
-        ('\u{561}', '\u{587}'), ('\u{10a0}', '\u{10c5}'), ('\u{10c7}',
-        '\u{10c7}'), ('\u{10cd}', '\u{10cd}'), ('\u{13a0}', '\u{13f5}'),
-        ('\u{13f8}', '\u{13fd}'), ('\u{1d00}', '\u{1d2b}'), ('\u{1d6b}',
-        '\u{1d77}'), ('\u{1d79}', '\u{1d9a}'), ('\u{1e00}', '\u{1f15}'),
-        ('\u{1f18}', '\u{1f1d}'), ('\u{1f20}', '\u{1f45}'), ('\u{1f48}',
-        '\u{1f4d}'), ('\u{1f50}', '\u{1f57}'), ('\u{1f59}', '\u{1f59}'),
-        ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'), ('\u{1f5f}',
-        '\u{1f7d}'), ('\u{1f80}', '\u{1fb4}'), ('\u{1fb6}', '\u{1fbc}'),
-        ('\u{1fbe}', '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'), ('\u{1fc6}',
-        '\u{1fcc}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}', '\u{1fdb}'),
-        ('\u{1fe0}', '\u{1fec}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}',
-        '\u{1ffc}'), ('\u{2102}', '\u{2102}'), ('\u{2107}', '\u{2107}'),
-        ('\u{210a}', '\u{2113}'), ('\u{2115}', '\u{2115}'), ('\u{2119}',
-        '\u{211d}'), ('\u{2124}', '\u{2124}'), ('\u{2126}', '\u{2126}'),
-        ('\u{2128}', '\u{2128}'), ('\u{212a}', '\u{212d}'), ('\u{212f}',
-        '\u{2134}'), ('\u{2139}', '\u{2139}'), ('\u{213c}', '\u{213f}'),
-        ('\u{2145}', '\u{2149}'), ('\u{214e}', '\u{214e}'), ('\u{2183}',
-        '\u{2184}'), ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}', '\u{2c5e}'),
-        ('\u{2c60}', '\u{2c7b}'), ('\u{2c7e}', '\u{2ce4}'), ('\u{2ceb}',
-        '\u{2cee}'), ('\u{2cf2}', '\u{2cf3}'), ('\u{2d00}', '\u{2d25}'),
-        ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}'), ('\u{a640}',
-        '\u{a66d}'), ('\u{a680}', '\u{a69b}'), ('\u{a722}', '\u{a76f}'),
-        ('\u{a771}', '\u{a787}'), ('\u{a78b}', '\u{a78e}'), ('\u{a790}',
-        '\u{a7ad}'), ('\u{a7b0}', '\u{a7b7}'), ('\u{a7fa}', '\u{a7fa}'),
-        ('\u{ab30}', '\u{ab5a}'), ('\u{ab60}', '\u{ab65}'), ('\u{ab70}',
-        '\u{abbf}'), ('\u{fb00}', '\u{fb06}'), ('\u{fb13}', '\u{fb17}'),
-        ('\u{ff21}', '\u{ff3a}'), ('\u{ff41}', '\u{ff5a}'), ('\u{10400}',
-        '\u{1044f}'), ('\u{10c80}', '\u{10cb2}'), ('\u{10cc0}', '\u{10cf2}'),
-        ('\u{118a0}', '\u{118df}'), ('\u{1d400}', '\u{1d454}'), ('\u{1d456}',
-        '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}', '\u{1d4a2}'),
-        ('\u{1d4a5}', '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'), ('\u{1d4ae}',
-        '\u{1d4b9}'), ('\u{1d4bb}', '\u{1d4bb}'), ('\u{1d4bd}', '\u{1d4c3}'),
-        ('\u{1d4c5}', '\u{1d505}'), ('\u{1d507}', '\u{1d50a}'), ('\u{1d50d}',
-        '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'), ('\u{1d51e}', '\u{1d539}'),
-        ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}', '\u{1d544}'), ('\u{1d546}',
-        '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'), ('\u{1d552}', '\u{1d6a5}'),
-        ('\u{1d6a8}', '\u{1d6c0}'), ('\u{1d6c2}', '\u{1d6da}'), ('\u{1d6dc}',
-        '\u{1d6fa}'), ('\u{1d6fc}', '\u{1d714}'), ('\u{1d716}', '\u{1d734}'),
-        ('\u{1d736}', '\u{1d74e}'), ('\u{1d750}', '\u{1d76e}'), ('\u{1d770}',
-        '\u{1d788}'), ('\u{1d78a}', '\u{1d7a8}'), ('\u{1d7aa}', '\u{1d7c2}'),
-        ('\u{1d7c4}', '\u{1d7cb}')
-    ];
-
-    pub const Ll_table: &'static [(char, char)] = &[
-        ('\u{61}', '\u{7a}'), ('\u{b5}', '\u{b5}'), ('\u{df}', '\u{f6}'),
-        ('\u{f8}', '\u{ff}'), ('\u{101}', '\u{101}'), ('\u{103}', '\u{103}'),
-        ('\u{105}', '\u{105}'), ('\u{107}', '\u{107}'), ('\u{109}', '\u{109}'),
-        ('\u{10b}', '\u{10b}'), ('\u{10d}', '\u{10d}'), ('\u{10f}', '\u{10f}'),
-        ('\u{111}', '\u{111}'), ('\u{113}', '\u{113}'), ('\u{115}', '\u{115}'),
-        ('\u{117}', '\u{117}'), ('\u{119}', '\u{119}'), ('\u{11b}', '\u{11b}'),
-        ('\u{11d}', '\u{11d}'), ('\u{11f}', '\u{11f}'), ('\u{121}', '\u{121}'),
-        ('\u{123}', '\u{123}'), ('\u{125}', '\u{125}'), ('\u{127}', '\u{127}'),
-        ('\u{129}', '\u{129}'), ('\u{12b}', '\u{12b}'), ('\u{12d}', '\u{12d}'),
-        ('\u{12f}', '\u{12f}'), ('\u{131}', '\u{131}'), ('\u{133}', '\u{133}'),
-        ('\u{135}', '\u{135}'), ('\u{137}', '\u{138}'), ('\u{13a}', '\u{13a}'),
-        ('\u{13c}', '\u{13c}'), ('\u{13e}', '\u{13e}'), ('\u{140}', '\u{140}'),
-        ('\u{142}', '\u{142}'), ('\u{144}', '\u{144}'), ('\u{146}', '\u{146}'),
-        ('\u{148}', '\u{149}'), ('\u{14b}', '\u{14b}'), ('\u{14d}', '\u{14d}'),
-        ('\u{14f}', '\u{14f}'), ('\u{151}', '\u{151}'), ('\u{153}', '\u{153}'),
-        ('\u{155}', '\u{155}'), ('\u{157}', '\u{157}'), ('\u{159}', '\u{159}'),
-        ('\u{15b}', '\u{15b}'), ('\u{15d}', '\u{15d}'), ('\u{15f}', '\u{15f}'),
-        ('\u{161}', '\u{161}'), ('\u{163}', '\u{163}'), ('\u{165}', '\u{165}'),
-        ('\u{167}', '\u{167}'), ('\u{169}', '\u{169}'), ('\u{16b}', '\u{16b}'),
-        ('\u{16d}', '\u{16d}'), ('\u{16f}', '\u{16f}'), ('\u{171}', '\u{171}'),
-        ('\u{173}', '\u{173}'), ('\u{175}', '\u{175}'), ('\u{177}', '\u{177}'),
-        ('\u{17a}', '\u{17a}'), ('\u{17c}', '\u{17c}'), ('\u{17e}', '\u{180}'),
-        ('\u{183}', '\u{183}'), ('\u{185}', '\u{185}'), ('\u{188}', '\u{188}'),
-        ('\u{18c}', '\u{18d}'), ('\u{192}', '\u{192}'), ('\u{195}', '\u{195}'),
-        ('\u{199}', '\u{19b}'), ('\u{19e}', '\u{19e}'), ('\u{1a1}', '\u{1a1}'),
-        ('\u{1a3}', '\u{1a3}'), ('\u{1a5}', '\u{1a5}'), ('\u{1a8}', '\u{1a8}'),
-        ('\u{1aa}', '\u{1ab}'), ('\u{1ad}', '\u{1ad}'), ('\u{1b0}', '\u{1b0}'),
-        ('\u{1b4}', '\u{1b4}'), ('\u{1b6}', '\u{1b6}'), ('\u{1b9}', '\u{1ba}'),
-        ('\u{1bd}', '\u{1bf}'), ('\u{1c6}', '\u{1c6}'), ('\u{1c9}', '\u{1c9}'),
-        ('\u{1cc}', '\u{1cc}'), ('\u{1ce}', '\u{1ce}'), ('\u{1d0}', '\u{1d0}'),
-        ('\u{1d2}', '\u{1d2}'), ('\u{1d4}', '\u{1d4}'), ('\u{1d6}', '\u{1d6}'),
-        ('\u{1d8}', '\u{1d8}'), ('\u{1da}', '\u{1da}'), ('\u{1dc}', '\u{1dd}'),
-        ('\u{1df}', '\u{1df}'), ('\u{1e1}', '\u{1e1}'), ('\u{1e3}', '\u{1e3}'),
-        ('\u{1e5}', '\u{1e5}'), ('\u{1e7}', '\u{1e7}'), ('\u{1e9}', '\u{1e9}'),
-        ('\u{1eb}', '\u{1eb}'), ('\u{1ed}', '\u{1ed}'), ('\u{1ef}', '\u{1f0}'),
-        ('\u{1f3}', '\u{1f3}'), ('\u{1f5}', '\u{1f5}'), ('\u{1f9}', '\u{1f9}'),
-        ('\u{1fb}', '\u{1fb}'), ('\u{1fd}', '\u{1fd}'), ('\u{1ff}', '\u{1ff}'),
-        ('\u{201}', '\u{201}'), ('\u{203}', '\u{203}'), ('\u{205}', '\u{205}'),
-        ('\u{207}', '\u{207}'), ('\u{209}', '\u{209}'), ('\u{20b}', '\u{20b}'),
-        ('\u{20d}', '\u{20d}'), ('\u{20f}', '\u{20f}'), ('\u{211}', '\u{211}'),
-        ('\u{213}', '\u{213}'), ('\u{215}', '\u{215}'), ('\u{217}', '\u{217}'),
-        ('\u{219}', '\u{219}'), ('\u{21b}', '\u{21b}'), ('\u{21d}', '\u{21d}'),
-        ('\u{21f}', '\u{21f}'), ('\u{221}', '\u{221}'), ('\u{223}', '\u{223}'),
-        ('\u{225}', '\u{225}'), ('\u{227}', '\u{227}'), ('\u{229}', '\u{229}'),
-        ('\u{22b}', '\u{22b}'), ('\u{22d}', '\u{22d}'), ('\u{22f}', '\u{22f}'),
-        ('\u{231}', '\u{231}'), ('\u{233}', '\u{239}'), ('\u{23c}', '\u{23c}'),
-        ('\u{23f}', '\u{240}'), ('\u{242}', '\u{242}'), ('\u{247}', '\u{247}'),
-        ('\u{249}', '\u{249}'), ('\u{24b}', '\u{24b}'), ('\u{24d}', '\u{24d}'),
-        ('\u{24f}', '\u{293}'), ('\u{295}', '\u{2af}'), ('\u{371}', '\u{371}'),
-        ('\u{373}', '\u{373}'), ('\u{377}', '\u{377}'), ('\u{37b}', '\u{37d}'),
-        ('\u{390}', '\u{390}'), ('\u{3ac}', '\u{3ce}'), ('\u{3d0}', '\u{3d1}'),
-        ('\u{3d5}', '\u{3d7}'), ('\u{3d9}', '\u{3d9}'), ('\u{3db}', '\u{3db}'),
-        ('\u{3dd}', '\u{3dd}'), ('\u{3df}', '\u{3df}'), ('\u{3e1}', '\u{3e1}'),
-        ('\u{3e3}', '\u{3e3}'), ('\u{3e5}', '\u{3e5}'), ('\u{3e7}', '\u{3e7}'),
-        ('\u{3e9}', '\u{3e9}'), ('\u{3eb}', '\u{3eb}'), ('\u{3ed}', '\u{3ed}'),
-        ('\u{3ef}', '\u{3f3}'), ('\u{3f5}', '\u{3f5}'), ('\u{3f8}', '\u{3f8}'),
-        ('\u{3fb}', '\u{3fc}'), ('\u{430}', '\u{45f}'), ('\u{461}', '\u{461}'),
-        ('\u{463}', '\u{463}'), ('\u{465}', '\u{465}'), ('\u{467}', '\u{467}'),
-        ('\u{469}', '\u{469}'), ('\u{46b}', '\u{46b}'), ('\u{46d}', '\u{46d}'),
-        ('\u{46f}', '\u{46f}'), ('\u{471}', '\u{471}'), ('\u{473}', '\u{473}'),
-        ('\u{475}', '\u{475}'), ('\u{477}', '\u{477}'), ('\u{479}', '\u{479}'),
-        ('\u{47b}', '\u{47b}'), ('\u{47d}', '\u{47d}'), ('\u{47f}', '\u{47f}'),
-        ('\u{481}', '\u{481}'), ('\u{48b}', '\u{48b}'), ('\u{48d}', '\u{48d}'),
-        ('\u{48f}', '\u{48f}'), ('\u{491}', '\u{491}'), ('\u{493}', '\u{493}'),
-        ('\u{495}', '\u{495}'), ('\u{497}', '\u{497}'), ('\u{499}', '\u{499}'),
-        ('\u{49b}', '\u{49b}'), ('\u{49d}', '\u{49d}'), ('\u{49f}', '\u{49f}'),
-        ('\u{4a1}', '\u{4a1}'), ('\u{4a3}', '\u{4a3}'), ('\u{4a5}', '\u{4a5}'),
-        ('\u{4a7}', '\u{4a7}'), ('\u{4a9}', '\u{4a9}'), ('\u{4ab}', '\u{4ab}'),
-        ('\u{4ad}', '\u{4ad}'), ('\u{4af}', '\u{4af}'), ('\u{4b1}', '\u{4b1}'),
-        ('\u{4b3}', '\u{4b3}'), ('\u{4b5}', '\u{4b5}'), ('\u{4b7}', '\u{4b7}'),
-        ('\u{4b9}', '\u{4b9}'), ('\u{4bb}', '\u{4bb}'), ('\u{4bd}', '\u{4bd}'),
-        ('\u{4bf}', '\u{4bf}'), ('\u{4c2}', '\u{4c2}'), ('\u{4c4}', '\u{4c4}'),
-        ('\u{4c6}', '\u{4c6}'), ('\u{4c8}', '\u{4c8}'), ('\u{4ca}', '\u{4ca}'),
-        ('\u{4cc}', '\u{4cc}'), ('\u{4ce}', '\u{4cf}'), ('\u{4d1}', '\u{4d1}'),
-        ('\u{4d3}', '\u{4d3}'), ('\u{4d5}', '\u{4d5}'), ('\u{4d7}', '\u{4d7}'),
-        ('\u{4d9}', '\u{4d9}'), ('\u{4db}', '\u{4db}'), ('\u{4dd}', '\u{4dd}'),
-        ('\u{4df}', '\u{4df}'), ('\u{4e1}', '\u{4e1}'), ('\u{4e3}', '\u{4e3}'),
-        ('\u{4e5}', '\u{4e5}'), ('\u{4e7}', '\u{4e7}'), ('\u{4e9}', '\u{4e9}'),
-        ('\u{4eb}', '\u{4eb}'), ('\u{4ed}', '\u{4ed}'), ('\u{4ef}', '\u{4ef}'),
-        ('\u{4f1}', '\u{4f1}'), ('\u{4f3}', '\u{4f3}'), ('\u{4f5}', '\u{4f5}'),
-        ('\u{4f7}', '\u{4f7}'), ('\u{4f9}', '\u{4f9}'), ('\u{4fb}', '\u{4fb}'),
-        ('\u{4fd}', '\u{4fd}'), ('\u{4ff}', '\u{4ff}'), ('\u{501}', '\u{501}'),
-        ('\u{503}', '\u{503}'), ('\u{505}', '\u{505}'), ('\u{507}', '\u{507}'),
-        ('\u{509}', '\u{509}'), ('\u{50b}', '\u{50b}'), ('\u{50d}', '\u{50d}'),
-        ('\u{50f}', '\u{50f}'), ('\u{511}', '\u{511}'), ('\u{513}', '\u{513}'),
-        ('\u{515}', '\u{515}'), ('\u{517}', '\u{517}'), ('\u{519}', '\u{519}'),
-        ('\u{51b}', '\u{51b}'), ('\u{51d}', '\u{51d}'), ('\u{51f}', '\u{51f}'),
-        ('\u{521}', '\u{521}'), ('\u{523}', '\u{523}'), ('\u{525}', '\u{525}'),
-        ('\u{527}', '\u{527}'), ('\u{529}', '\u{529}'), ('\u{52b}', '\u{52b}'),
-        ('\u{52d}', '\u{52d}'), ('\u{52f}', '\u{52f}'), ('\u{561}', '\u{587}'),
-        ('\u{13f8}', '\u{13fd}'), ('\u{1d00}', '\u{1d2b}'), ('\u{1d6b}',
-        '\u{1d77}'), ('\u{1d79}', '\u{1d9a}'), ('\u{1e01}', '\u{1e01}'),
-        ('\u{1e03}', '\u{1e03}'), ('\u{1e05}', '\u{1e05}'), ('\u{1e07}',
-        '\u{1e07}'), ('\u{1e09}', '\u{1e09}'), ('\u{1e0b}', '\u{1e0b}'),
-        ('\u{1e0d}', '\u{1e0d}'), ('\u{1e0f}', '\u{1e0f}'), ('\u{1e11}',
-        '\u{1e11}'), ('\u{1e13}', '\u{1e13}'), ('\u{1e15}', '\u{1e15}'),
-        ('\u{1e17}', '\u{1e17}'), ('\u{1e19}', '\u{1e19}'), ('\u{1e1b}',
-        '\u{1e1b}'), ('\u{1e1d}', '\u{1e1d}'), ('\u{1e1f}', '\u{1e1f}'),
-        ('\u{1e21}', '\u{1e21}'), ('\u{1e23}', '\u{1e23}'), ('\u{1e25}',
-        '\u{1e25}'), ('\u{1e27}', '\u{1e27}'), ('\u{1e29}', '\u{1e29}'),
-        ('\u{1e2b}', '\u{1e2b}'), ('\u{1e2d}', '\u{1e2d}'), ('\u{1e2f}',
-        '\u{1e2f}'), ('\u{1e31}', '\u{1e31}'), ('\u{1e33}', '\u{1e33}'),
-        ('\u{1e35}', '\u{1e35}'), ('\u{1e37}', '\u{1e37}'), ('\u{1e39}',
-        '\u{1e39}'), ('\u{1e3b}', '\u{1e3b}'), ('\u{1e3d}', '\u{1e3d}'),
-        ('\u{1e3f}', '\u{1e3f}'), ('\u{1e41}', '\u{1e41}'), ('\u{1e43}',
-        '\u{1e43}'), ('\u{1e45}', '\u{1e45}'), ('\u{1e47}', '\u{1e47}'),
-        ('\u{1e49}', '\u{1e49}'), ('\u{1e4b}', '\u{1e4b}'), ('\u{1e4d}',
-        '\u{1e4d}'), ('\u{1e4f}', '\u{1e4f}'), ('\u{1e51}', '\u{1e51}'),
-        ('\u{1e53}', '\u{1e53}'), ('\u{1e55}', '\u{1e55}'), ('\u{1e57}',
-        '\u{1e57}'), ('\u{1e59}', '\u{1e59}'), ('\u{1e5b}', '\u{1e5b}'),
-        ('\u{1e5d}', '\u{1e5d}'), ('\u{1e5f}', '\u{1e5f}'), ('\u{1e61}',
-        '\u{1e61}'), ('\u{1e63}', '\u{1e63}'), ('\u{1e65}', '\u{1e65}'),
-        ('\u{1e67}', '\u{1e67}'), ('\u{1e69}', '\u{1e69}'), ('\u{1e6b}',
-        '\u{1e6b}'), ('\u{1e6d}', '\u{1e6d}'), ('\u{1e6f}', '\u{1e6f}'),
-        ('\u{1e71}', '\u{1e71}'), ('\u{1e73}', '\u{1e73}'), ('\u{1e75}',
-        '\u{1e75}'), ('\u{1e77}', '\u{1e77}'), ('\u{1e79}', '\u{1e79}'),
-        ('\u{1e7b}', '\u{1e7b}'), ('\u{1e7d}', '\u{1e7d}'), ('\u{1e7f}',
-        '\u{1e7f}'), ('\u{1e81}', '\u{1e81}'), ('\u{1e83}', '\u{1e83}'),
-        ('\u{1e85}', '\u{1e85}'), ('\u{1e87}', '\u{1e87}'), ('\u{1e89}',
-        '\u{1e89}'), ('\u{1e8b}', '\u{1e8b}'), ('\u{1e8d}', '\u{1e8d}'),
-        ('\u{1e8f}', '\u{1e8f}'), ('\u{1e91}', '\u{1e91}'), ('\u{1e93}',
-        '\u{1e93}'), ('\u{1e95}', '\u{1e9d}'), ('\u{1e9f}', '\u{1e9f}'),
-        ('\u{1ea1}', '\u{1ea1}'), ('\u{1ea3}', '\u{1ea3}'), ('\u{1ea5}',
-        '\u{1ea5}'), ('\u{1ea7}', '\u{1ea7}'), ('\u{1ea9}', '\u{1ea9}'),
-        ('\u{1eab}', '\u{1eab}'), ('\u{1ead}', '\u{1ead}'), ('\u{1eaf}',
-        '\u{1eaf}'), ('\u{1eb1}', '\u{1eb1}'), ('\u{1eb3}', '\u{1eb3}'),
-        ('\u{1eb5}', '\u{1eb5}'), ('\u{1eb7}', '\u{1eb7}'), ('\u{1eb9}',
-        '\u{1eb9}'), ('\u{1ebb}', '\u{1ebb}'), ('\u{1ebd}', '\u{1ebd}'),
-        ('\u{1ebf}', '\u{1ebf}'), ('\u{1ec1}', '\u{1ec1}'), ('\u{1ec3}',
-        '\u{1ec3}'), ('\u{1ec5}', '\u{1ec5}'), ('\u{1ec7}', '\u{1ec7}'),
-        ('\u{1ec9}', '\u{1ec9}'), ('\u{1ecb}', '\u{1ecb}'), ('\u{1ecd}',
-        '\u{1ecd}'), ('\u{1ecf}', '\u{1ecf}'), ('\u{1ed1}', '\u{1ed1}'),
-        ('\u{1ed3}', '\u{1ed3}'), ('\u{1ed5}', '\u{1ed5}'), ('\u{1ed7}',
-        '\u{1ed7}'), ('\u{1ed9}', '\u{1ed9}'), ('\u{1edb}', '\u{1edb}'),
-        ('\u{1edd}', '\u{1edd}'), ('\u{1edf}', '\u{1edf}'), ('\u{1ee1}',
-        '\u{1ee1}'), ('\u{1ee3}', '\u{1ee3}'), ('\u{1ee5}', '\u{1ee5}'),
-        ('\u{1ee7}', '\u{1ee7}'), ('\u{1ee9}', '\u{1ee9}'), ('\u{1eeb}',
-        '\u{1eeb}'), ('\u{1eed}', '\u{1eed}'), ('\u{1eef}', '\u{1eef}'),
-        ('\u{1ef1}', '\u{1ef1}'), ('\u{1ef3}', '\u{1ef3}'), ('\u{1ef5}',
-        '\u{1ef5}'), ('\u{1ef7}', '\u{1ef7}'), ('\u{1ef9}', '\u{1ef9}'),
-        ('\u{1efb}', '\u{1efb}'), ('\u{1efd}', '\u{1efd}'), ('\u{1eff}',
-        '\u{1f07}'), ('\u{1f10}', '\u{1f15}'), ('\u{1f20}', '\u{1f27}'),
-        ('\u{1f30}', '\u{1f37}'), ('\u{1f40}', '\u{1f45}'), ('\u{1f50}',
-        '\u{1f57}'), ('\u{1f60}', '\u{1f67}'), ('\u{1f70}', '\u{1f7d}'),
-        ('\u{1f80}', '\u{1f87}'), ('\u{1f90}', '\u{1f97}'), ('\u{1fa0}',
-        '\u{1fa7}'), ('\u{1fb0}', '\u{1fb4}'), ('\u{1fb6}', '\u{1fb7}'),
-        ('\u{1fbe}', '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'), ('\u{1fc6}',
-        '\u{1fc7}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}', '\u{1fd7}'),
-        ('\u{1fe0}', '\u{1fe7}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}',
-        '\u{1ff7}'), ('\u{210a}', '\u{210a}'), ('\u{210e}', '\u{210f}'),
-        ('\u{2113}', '\u{2113}'), ('\u{212f}', '\u{212f}'), ('\u{2134}',
-        '\u{2134}'), ('\u{2139}', '\u{2139}'), ('\u{213c}', '\u{213d}'),
-        ('\u{2146}', '\u{2149}'), ('\u{214e}', '\u{214e}'), ('\u{2184}',
-        '\u{2184}'), ('\u{2c30}', '\u{2c5e}'), ('\u{2c61}', '\u{2c61}'),
-        ('\u{2c65}', '\u{2c66}'), ('\u{2c68}', '\u{2c68}'), ('\u{2c6a}',
-        '\u{2c6a}'), ('\u{2c6c}', '\u{2c6c}'), ('\u{2c71}', '\u{2c71}'),
-        ('\u{2c73}', '\u{2c74}'), ('\u{2c76}', '\u{2c7b}'), ('\u{2c81}',
-        '\u{2c81}'), ('\u{2c83}', '\u{2c83}'), ('\u{2c85}', '\u{2c85}'),
-        ('\u{2c87}', '\u{2c87}'), ('\u{2c89}', '\u{2c89}'), ('\u{2c8b}',
-        '\u{2c8b}'), ('\u{2c8d}', '\u{2c8d}'), ('\u{2c8f}', '\u{2c8f}'),
-        ('\u{2c91}', '\u{2c91}'), ('\u{2c93}', '\u{2c93}'), ('\u{2c95}',
-        '\u{2c95}'), ('\u{2c97}', '\u{2c97}'), ('\u{2c99}', '\u{2c99}'),
-        ('\u{2c9b}', '\u{2c9b}'), ('\u{2c9d}', '\u{2c9d}'), ('\u{2c9f}',
-        '\u{2c9f}'), ('\u{2ca1}', '\u{2ca1}'), ('\u{2ca3}', '\u{2ca3}'),
-        ('\u{2ca5}', '\u{2ca5}'), ('\u{2ca7}', '\u{2ca7}'), ('\u{2ca9}',
-        '\u{2ca9}'), ('\u{2cab}', '\u{2cab}'), ('\u{2cad}', '\u{2cad}'),
-        ('\u{2caf}', '\u{2caf}'), ('\u{2cb1}', '\u{2cb1}'), ('\u{2cb3}',
-        '\u{2cb3}'), ('\u{2cb5}', '\u{2cb5}'), ('\u{2cb7}', '\u{2cb7}'),
-        ('\u{2cb9}', '\u{2cb9}'), ('\u{2cbb}', '\u{2cbb}'), ('\u{2cbd}',
-        '\u{2cbd}'), ('\u{2cbf}', '\u{2cbf}'), ('\u{2cc1}', '\u{2cc1}'),
-        ('\u{2cc3}', '\u{2cc3}'), ('\u{2cc5}', '\u{2cc5}'), ('\u{2cc7}',
-        '\u{2cc7}'), ('\u{2cc9}', '\u{2cc9}'), ('\u{2ccb}', '\u{2ccb}'),
-        ('\u{2ccd}', '\u{2ccd}'), ('\u{2ccf}', '\u{2ccf}'), ('\u{2cd1}',
-        '\u{2cd1}'), ('\u{2cd3}', '\u{2cd3}'), ('\u{2cd5}', '\u{2cd5}'),
-        ('\u{2cd7}', '\u{2cd7}'), ('\u{2cd9}', '\u{2cd9}'), ('\u{2cdb}',
-        '\u{2cdb}'), ('\u{2cdd}', '\u{2cdd}'), ('\u{2cdf}', '\u{2cdf}'),
-        ('\u{2ce1}', '\u{2ce1}'), ('\u{2ce3}', '\u{2ce4}'), ('\u{2cec}',
-        '\u{2cec}'), ('\u{2cee}', '\u{2cee}'), ('\u{2cf3}', '\u{2cf3}'),
-        ('\u{2d00}', '\u{2d25}'), ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}',
-        '\u{2d2d}'), ('\u{a641}', '\u{a641}'), ('\u{a643}', '\u{a643}'),
-        ('\u{a645}', '\u{a645}'), ('\u{a647}', '\u{a647}'), ('\u{a649}',
-        '\u{a649}'), ('\u{a64b}', '\u{a64b}'), ('\u{a64d}', '\u{a64d}'),
-        ('\u{a64f}', '\u{a64f}'), ('\u{a651}', '\u{a651}'), ('\u{a653}',
-        '\u{a653}'), ('\u{a655}', '\u{a655}'), ('\u{a657}', '\u{a657}'),
-        ('\u{a659}', '\u{a659}'), ('\u{a65b}', '\u{a65b}'), ('\u{a65d}',
-        '\u{a65d}'), ('\u{a65f}', '\u{a65f}'), ('\u{a661}', '\u{a661}'),
-        ('\u{a663}', '\u{a663}'), ('\u{a665}', '\u{a665}'), ('\u{a667}',
-        '\u{a667}'), ('\u{a669}', '\u{a669}'), ('\u{a66b}', '\u{a66b}'),
-        ('\u{a66d}', '\u{a66d}'), ('\u{a681}', '\u{a681}'), ('\u{a683}',
-        '\u{a683}'), ('\u{a685}', '\u{a685}'), ('\u{a687}', '\u{a687}'),
-        ('\u{a689}', '\u{a689}'), ('\u{a68b}', '\u{a68b}'), ('\u{a68d}',
-        '\u{a68d}'), ('\u{a68f}', '\u{a68f}'), ('\u{a691}', '\u{a691}'),
-        ('\u{a693}', '\u{a693}'), ('\u{a695}', '\u{a695}'), ('\u{a697}',
-        '\u{a697}'), ('\u{a699}', '\u{a699}'), ('\u{a69b}', '\u{a69b}'),
-        ('\u{a723}', '\u{a723}'), ('\u{a725}', '\u{a725}'), ('\u{a727}',
-        '\u{a727}'), ('\u{a729}', '\u{a729}'), ('\u{a72b}', '\u{a72b}'),
-        ('\u{a72d}', '\u{a72d}'), ('\u{a72f}', '\u{a731}'), ('\u{a733}',
-        '\u{a733}'), ('\u{a735}', '\u{a735}'), ('\u{a737}', '\u{a737}'),
-        ('\u{a739}', '\u{a739}'), ('\u{a73b}', '\u{a73b}'), ('\u{a73d}',
-        '\u{a73d}'), ('\u{a73f}', '\u{a73f}'), ('\u{a741}', '\u{a741}'),
-        ('\u{a743}', '\u{a743}'), ('\u{a745}', '\u{a745}'), ('\u{a747}',
-        '\u{a747}'), ('\u{a749}', '\u{a749}'), ('\u{a74b}', '\u{a74b}'),
-        ('\u{a74d}', '\u{a74d}'), ('\u{a74f}', '\u{a74f}'), ('\u{a751}',
-        '\u{a751}'), ('\u{a753}', '\u{a753}'), ('\u{a755}', '\u{a755}'),
-        ('\u{a757}', '\u{a757}'), ('\u{a759}', '\u{a759}'), ('\u{a75b}',
-        '\u{a75b}'), ('\u{a75d}', '\u{a75d}'), ('\u{a75f}', '\u{a75f}'),
-        ('\u{a761}', '\u{a761}'), ('\u{a763}', '\u{a763}'), ('\u{a765}',
-        '\u{a765}'), ('\u{a767}', '\u{a767}'), ('\u{a769}', '\u{a769}'),
-        ('\u{a76b}', '\u{a76b}'), ('\u{a76d}', '\u{a76d}'), ('\u{a76f}',
-        '\u{a76f}'), ('\u{a771}', '\u{a778}'), ('\u{a77a}', '\u{a77a}'),
-        ('\u{a77c}', '\u{a77c}'), ('\u{a77f}', '\u{a77f}'), ('\u{a781}',
-        '\u{a781}'), ('\u{a783}', '\u{a783}'), ('\u{a785}', '\u{a785}'),
-        ('\u{a787}', '\u{a787}'), ('\u{a78c}', '\u{a78c}'), ('\u{a78e}',
-        '\u{a78e}'), ('\u{a791}', '\u{a791}'), ('\u{a793}', '\u{a795}'),
-        ('\u{a797}', '\u{a797}'), ('\u{a799}', '\u{a799}'), ('\u{a79b}',
-        '\u{a79b}'), ('\u{a79d}', '\u{a79d}'), ('\u{a79f}', '\u{a79f}'),
-        ('\u{a7a1}', '\u{a7a1}'), ('\u{a7a3}', '\u{a7a3}'), ('\u{a7a5}',
-        '\u{a7a5}'), ('\u{a7a7}', '\u{a7a7}'), ('\u{a7a9}', '\u{a7a9}'),
-        ('\u{a7b5}', '\u{a7b5}'), ('\u{a7b7}', '\u{a7b7}'), ('\u{a7fa}',
-        '\u{a7fa}'), ('\u{ab30}', '\u{ab5a}'), ('\u{ab60}', '\u{ab65}'),
-        ('\u{ab70}', '\u{abbf}'), ('\u{fb00}', '\u{fb06}'), ('\u{fb13}',
-        '\u{fb17}'), ('\u{ff41}', '\u{ff5a}'), ('\u{10428}', '\u{1044f}'),
-        ('\u{10cc0}', '\u{10cf2}'), ('\u{118c0}', '\u{118df}'), ('\u{1d41a}',
-        '\u{1d433}'), ('\u{1d44e}', '\u{1d454}'), ('\u{1d456}', '\u{1d467}'),
-        ('\u{1d482}', '\u{1d49b}'), ('\u{1d4b6}', '\u{1d4b9}'), ('\u{1d4bb}',
-        '\u{1d4bb}'), ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d4cf}'),
-        ('\u{1d4ea}', '\u{1d503}'), ('\u{1d51e}', '\u{1d537}'), ('\u{1d552}',
-        '\u{1d56b}'), ('\u{1d586}', '\u{1d59f}'), ('\u{1d5ba}', '\u{1d5d3}'),
-        ('\u{1d5ee}', '\u{1d607}'), ('\u{1d622}', '\u{1d63b}'), ('\u{1d656}',
-        '\u{1d66f}'), ('\u{1d68a}', '\u{1d6a5}'), ('\u{1d6c2}', '\u{1d6da}'),
-        ('\u{1d6dc}', '\u{1d6e1}'), ('\u{1d6fc}', '\u{1d714}'), ('\u{1d716}',
-        '\u{1d71b}'), ('\u{1d736}', '\u{1d74e}'), ('\u{1d750}', '\u{1d755}'),
-        ('\u{1d770}', '\u{1d788}'), ('\u{1d78a}', '\u{1d78f}'), ('\u{1d7aa}',
-        '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7c9}'), ('\u{1d7cb}', '\u{1d7cb}')
-    ];
-
-    pub const Lm_table: &'static [(char, char)] = &[
-        ('\u{2b0}', '\u{2c1}'), ('\u{2c6}', '\u{2d1}'), ('\u{2e0}', '\u{2e4}'),
-        ('\u{2ec}', '\u{2ec}'), ('\u{2ee}', '\u{2ee}'), ('\u{374}', '\u{374}'),
-        ('\u{37a}', '\u{37a}'), ('\u{559}', '\u{559}'), ('\u{640}', '\u{640}'),
-        ('\u{6e5}', '\u{6e6}'), ('\u{7f4}', '\u{7f5}'), ('\u{7fa}', '\u{7fa}'),
-        ('\u{81a}', '\u{81a}'), ('\u{824}', '\u{824}'), ('\u{828}', '\u{828}'),
-        ('\u{971}', '\u{971}'), ('\u{e46}', '\u{e46}'), ('\u{ec6}', '\u{ec6}'),
-        ('\u{10fc}', '\u{10fc}'), ('\u{17d7}', '\u{17d7}'), ('\u{1843}',
-        '\u{1843}'), ('\u{1aa7}', '\u{1aa7}'), ('\u{1c78}', '\u{1c7d}'),
-        ('\u{1d2c}', '\u{1d6a}'), ('\u{1d78}', '\u{1d78}'), ('\u{1d9b}',
-        '\u{1dbf}'), ('\u{2071}', '\u{2071}'), ('\u{207f}', '\u{207f}'),
-        ('\u{2090}', '\u{209c}'), ('\u{2c7c}', '\u{2c7d}'), ('\u{2d6f}',
-        '\u{2d6f}'), ('\u{2e2f}', '\u{2e2f}'), ('\u{3005}', '\u{3005}'),
-        ('\u{3031}', '\u{3035}'), ('\u{303b}', '\u{303b}'), ('\u{309d}',
-        '\u{309e}'), ('\u{30fc}', '\u{30fe}'), ('\u{a015}', '\u{a015}'),
-        ('\u{a4f8}', '\u{a4fd}'), ('\u{a60c}', '\u{a60c}'), ('\u{a67f}',
-        '\u{a67f}'), ('\u{a69c}', '\u{a69d}'), ('\u{a717}', '\u{a71f}'),
-        ('\u{a770}', '\u{a770}'), ('\u{a788}', '\u{a788}'), ('\u{a7f8}',
-        '\u{a7f9}'), ('\u{a9cf}', '\u{a9cf}'), ('\u{a9e6}', '\u{a9e6}'),
-        ('\u{aa70}', '\u{aa70}'), ('\u{aadd}', '\u{aadd}'), ('\u{aaf3}',
-        '\u{aaf4}'), ('\u{ab5c}', '\u{ab5f}'), ('\u{ff70}', '\u{ff70}'),
-        ('\u{ff9e}', '\u{ff9f}'), ('\u{16b40}', '\u{16b43}'), ('\u{16f93}',
-        '\u{16f9f}')
-    ];
-
-    pub const Lo_table: &'static [(char, char)] = &[
-        ('\u{aa}', '\u{aa}'), ('\u{ba}', '\u{ba}'), ('\u{1bb}', '\u{1bb}'),
-        ('\u{1c0}', '\u{1c3}'), ('\u{294}', '\u{294}'), ('\u{5d0}', '\u{5ea}'),
-        ('\u{5f0}', '\u{5f2}'), ('\u{620}', '\u{63f}'), ('\u{641}', '\u{64a}'),
-        ('\u{66e}', '\u{66f}'), ('\u{671}', '\u{6d3}'), ('\u{6d5}', '\u{6d5}'),
-        ('\u{6ee}', '\u{6ef}'), ('\u{6fa}', '\u{6fc}'), ('\u{6ff}', '\u{6ff}'),
-        ('\u{710}', '\u{710}'), ('\u{712}', '\u{72f}'), ('\u{74d}', '\u{7a5}'),
-        ('\u{7b1}', '\u{7b1}'), ('\u{7ca}', '\u{7ea}'), ('\u{800}', '\u{815}'),
-        ('\u{840}', '\u{858}'), ('\u{8a0}', '\u{8b4}'), ('\u{904}', '\u{939}'),
-        ('\u{93d}', '\u{93d}'), ('\u{950}', '\u{950}'), ('\u{958}', '\u{961}'),
-        ('\u{972}', '\u{980}'), ('\u{985}', '\u{98c}'), ('\u{98f}', '\u{990}'),
-        ('\u{993}', '\u{9a8}'), ('\u{9aa}', '\u{9b0}'), ('\u{9b2}', '\u{9b2}'),
-        ('\u{9b6}', '\u{9b9}'), ('\u{9bd}', '\u{9bd}'), ('\u{9ce}', '\u{9ce}'),
-        ('\u{9dc}', '\u{9dd}'), ('\u{9df}', '\u{9e1}'), ('\u{9f0}', '\u{9f1}'),
-        ('\u{a05}', '\u{a0a}'), ('\u{a0f}', '\u{a10}'), ('\u{a13}', '\u{a28}'),
-        ('\u{a2a}', '\u{a30}'), ('\u{a32}', '\u{a33}'), ('\u{a35}', '\u{a36}'),
-        ('\u{a38}', '\u{a39}'), ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'),
-        ('\u{a72}', '\u{a74}'), ('\u{a85}', '\u{a8d}'), ('\u{a8f}', '\u{a91}'),
-        ('\u{a93}', '\u{aa8}'), ('\u{aaa}', '\u{ab0}'), ('\u{ab2}', '\u{ab3}'),
-        ('\u{ab5}', '\u{ab9}'), ('\u{abd}', '\u{abd}'), ('\u{ad0}', '\u{ad0}'),
-        ('\u{ae0}', '\u{ae1}'), ('\u{af9}', '\u{af9}'), ('\u{b05}', '\u{b0c}'),
-        ('\u{b0f}', '\u{b10}'), ('\u{b13}', '\u{b28}'), ('\u{b2a}', '\u{b30}'),
-        ('\u{b32}', '\u{b33}'), ('\u{b35}', '\u{b39}'), ('\u{b3d}', '\u{b3d}'),
-        ('\u{b5c}', '\u{b5d}'), ('\u{b5f}', '\u{b61}'), ('\u{b71}', '\u{b71}'),
-        ('\u{b83}', '\u{b83}'), ('\u{b85}', '\u{b8a}'), ('\u{b8e}', '\u{b90}'),
-        ('\u{b92}', '\u{b95}'), ('\u{b99}', '\u{b9a}'), ('\u{b9c}', '\u{b9c}'),
-        ('\u{b9e}', '\u{b9f}'), ('\u{ba3}', '\u{ba4}'), ('\u{ba8}', '\u{baa}'),
-        ('\u{bae}', '\u{bb9}'), ('\u{bd0}', '\u{bd0}'), ('\u{c05}', '\u{c0c}'),
-        ('\u{c0e}', '\u{c10}'), ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'),
-        ('\u{c3d}', '\u{c3d}'), ('\u{c58}', '\u{c5a}'), ('\u{c60}', '\u{c61}'),
-        ('\u{c85}', '\u{c8c}'), ('\u{c8e}', '\u{c90}'), ('\u{c92}', '\u{ca8}'),
-        ('\u{caa}', '\u{cb3}'), ('\u{cb5}', '\u{cb9}'), ('\u{cbd}', '\u{cbd}'),
-        ('\u{cde}', '\u{cde}'), ('\u{ce0}', '\u{ce1}'), ('\u{cf1}', '\u{cf2}'),
-        ('\u{d05}', '\u{d0c}'), ('\u{d0e}', '\u{d10}'), ('\u{d12}', '\u{d3a}'),
-        ('\u{d3d}', '\u{d3d}'), ('\u{d4e}', '\u{d4e}'), ('\u{d5f}', '\u{d61}'),
-        ('\u{d7a}', '\u{d7f}'), ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'),
-        ('\u{db3}', '\u{dbb}'), ('\u{dbd}', '\u{dbd}'), ('\u{dc0}', '\u{dc6}'),
-        ('\u{e01}', '\u{e30}'), ('\u{e32}', '\u{e33}'), ('\u{e40}', '\u{e45}'),
-        ('\u{e81}', '\u{e82}'), ('\u{e84}', '\u{e84}'), ('\u{e87}', '\u{e88}'),
-        ('\u{e8a}', '\u{e8a}'), ('\u{e8d}', '\u{e8d}'), ('\u{e94}', '\u{e97}'),
-        ('\u{e99}', '\u{e9f}'), ('\u{ea1}', '\u{ea3}'), ('\u{ea5}', '\u{ea5}'),
-        ('\u{ea7}', '\u{ea7}'), ('\u{eaa}', '\u{eab}'), ('\u{ead}', '\u{eb0}'),
-        ('\u{eb2}', '\u{eb3}'), ('\u{ebd}', '\u{ebd}'), ('\u{ec0}', '\u{ec4}'),
-        ('\u{edc}', '\u{edf}'), ('\u{f00}', '\u{f00}'), ('\u{f40}', '\u{f47}'),
-        ('\u{f49}', '\u{f6c}'), ('\u{f88}', '\u{f8c}'), ('\u{1000}',
-        '\u{102a}'), ('\u{103f}', '\u{103f}'), ('\u{1050}', '\u{1055}'),
-        ('\u{105a}', '\u{105d}'), ('\u{1061}', '\u{1061}'), ('\u{1065}',
-        '\u{1066}'), ('\u{106e}', '\u{1070}'), ('\u{1075}', '\u{1081}'),
-        ('\u{108e}', '\u{108e}'), ('\u{10d0}', '\u{10fa}'), ('\u{10fd}',
-        '\u{1248}'), ('\u{124a}', '\u{124d}'), ('\u{1250}', '\u{1256}'),
-        ('\u{1258}', '\u{1258}'), ('\u{125a}', '\u{125d}'), ('\u{1260}',
-        '\u{1288}'), ('\u{128a}', '\u{128d}'), ('\u{1290}', '\u{12b0}'),
-        ('\u{12b2}', '\u{12b5}'), ('\u{12b8}', '\u{12be}'), ('\u{12c0}',
-        '\u{12c0}'), ('\u{12c2}', '\u{12c5}'), ('\u{12c8}', '\u{12d6}'),
-        ('\u{12d8}', '\u{1310}'), ('\u{1312}', '\u{1315}'), ('\u{1318}',
-        '\u{135a}'), ('\u{1380}', '\u{138f}'), ('\u{1401}', '\u{166c}'),
-        ('\u{166f}', '\u{167f}'), ('\u{1681}', '\u{169a}'), ('\u{16a0}',
-        '\u{16ea}'), ('\u{16f1}', '\u{16f8}'), ('\u{1700}', '\u{170c}'),
-        ('\u{170e}', '\u{1711}'), ('\u{1720}', '\u{1731}'), ('\u{1740}',
-        '\u{1751}'), ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'),
-        ('\u{1780}', '\u{17b3}'), ('\u{17dc}', '\u{17dc}'), ('\u{1820}',
-        '\u{1842}'), ('\u{1844}', '\u{1877}'), ('\u{1880}', '\u{18a8}'),
-        ('\u{18aa}', '\u{18aa}'), ('\u{18b0}', '\u{18f5}'), ('\u{1900}',
-        '\u{191e}'), ('\u{1950}', '\u{196d}'), ('\u{1970}', '\u{1974}'),
-        ('\u{1980}', '\u{19ab}'), ('\u{19b0}', '\u{19c9}'), ('\u{1a00}',
-        '\u{1a16}'), ('\u{1a20}', '\u{1a54}'), ('\u{1b05}', '\u{1b33}'),
-        ('\u{1b45}', '\u{1b4b}'), ('\u{1b83}', '\u{1ba0}'), ('\u{1bae}',
-        '\u{1baf}'), ('\u{1bba}', '\u{1be5}'), ('\u{1c00}', '\u{1c23}'),
-        ('\u{1c4d}', '\u{1c4f}'), ('\u{1c5a}', '\u{1c77}'), ('\u{1ce9}',
-        '\u{1cec}'), ('\u{1cee}', '\u{1cf1}'), ('\u{1cf5}', '\u{1cf6}'),
-        ('\u{2135}', '\u{2138}'), ('\u{2d30}', '\u{2d67}'), ('\u{2d80}',
-        '\u{2d96}'), ('\u{2da0}', '\u{2da6}'), ('\u{2da8}', '\u{2dae}'),
-        ('\u{2db0}', '\u{2db6}'), ('\u{2db8}', '\u{2dbe}'), ('\u{2dc0}',
-        '\u{2dc6}'), ('\u{2dc8}', '\u{2dce}'), ('\u{2dd0}', '\u{2dd6}'),
-        ('\u{2dd8}', '\u{2dde}'), ('\u{3006}', '\u{3006}'), ('\u{303c}',
-        '\u{303c}'), ('\u{3041}', '\u{3096}'), ('\u{309f}', '\u{309f}'),
-        ('\u{30a1}', '\u{30fa}'), ('\u{30ff}', '\u{30ff}'), ('\u{3105}',
-        '\u{312d}'), ('\u{3131}', '\u{318e}'), ('\u{31a0}', '\u{31ba}'),
-        ('\u{31f0}', '\u{31ff}'), ('\u{3400}', '\u{4db5}'), ('\u{4e00}',
-        '\u{9fd5}'), ('\u{a000}', '\u{a014}'), ('\u{a016}', '\u{a48c}'),
-        ('\u{a4d0}', '\u{a4f7}'), ('\u{a500}', '\u{a60b}'), ('\u{a610}',
-        '\u{a61f}'), ('\u{a62a}', '\u{a62b}'), ('\u{a66e}', '\u{a66e}'),
-        ('\u{a6a0}', '\u{a6e5}'), ('\u{a78f}', '\u{a78f}'), ('\u{a7f7}',
-        '\u{a7f7}'), ('\u{a7fb}', '\u{a801}'), ('\u{a803}', '\u{a805}'),
-        ('\u{a807}', '\u{a80a}'), ('\u{a80c}', '\u{a822}'), ('\u{a840}',
-        '\u{a873}'), ('\u{a882}', '\u{a8b3}'), ('\u{a8f2}', '\u{a8f7}'),
-        ('\u{a8fb}', '\u{a8fb}'), ('\u{a8fd}', '\u{a8fd}'), ('\u{a90a}',
-        '\u{a925}'), ('\u{a930}', '\u{a946}'), ('\u{a960}', '\u{a97c}'),
-        ('\u{a984}', '\u{a9b2}'), ('\u{a9e0}', '\u{a9e4}'), ('\u{a9e7}',
-        '\u{a9ef}'), ('\u{a9fa}', '\u{a9fe}'), ('\u{aa00}', '\u{aa28}'),
-        ('\u{aa40}', '\u{aa42}'), ('\u{aa44}', '\u{aa4b}'), ('\u{aa60}',
-        '\u{aa6f}'), ('\u{aa71}', '\u{aa76}'), ('\u{aa7a}', '\u{aa7a}'),
-        ('\u{aa7e}', '\u{aaaf}'), ('\u{aab1}', '\u{aab1}'), ('\u{aab5}',
-        '\u{aab6}'), ('\u{aab9}', '\u{aabd}'), ('\u{aac0}', '\u{aac0}'),
-        ('\u{aac2}', '\u{aac2}'), ('\u{aadb}', '\u{aadc}'), ('\u{aae0}',
-        '\u{aaea}'), ('\u{aaf2}', '\u{aaf2}'), ('\u{ab01}', '\u{ab06}'),
-        ('\u{ab09}', '\u{ab0e}'), ('\u{ab11}', '\u{ab16}'), ('\u{ab20}',
-        '\u{ab26}'), ('\u{ab28}', '\u{ab2e}'), ('\u{abc0}', '\u{abe2}'),
-        ('\u{ac00}', '\u{d7a3}'), ('\u{d7b0}', '\u{d7c6}'), ('\u{d7cb}',
-        '\u{d7fb}'), ('\u{f900}', '\u{fa6d}'), ('\u{fa70}', '\u{fad9}'),
-        ('\u{fb1d}', '\u{fb1d}'), ('\u{fb1f}', '\u{fb28}'), ('\u{fb2a}',
-        '\u{fb36}'), ('\u{fb38}', '\u{fb3c}'), ('\u{fb3e}', '\u{fb3e}'),
-        ('\u{fb40}', '\u{fb41}'), ('\u{fb43}', '\u{fb44}'), ('\u{fb46}',
-        '\u{fbb1}'), ('\u{fbd3}', '\u{fd3d}'), ('\u{fd50}', '\u{fd8f}'),
-        ('\u{fd92}', '\u{fdc7}'), ('\u{fdf0}', '\u{fdfb}'), ('\u{fe70}',
-        '\u{fe74}'), ('\u{fe76}', '\u{fefc}'), ('\u{ff66}', '\u{ff6f}'),
-        ('\u{ff71}', '\u{ff9d}'), ('\u{ffa0}', '\u{ffbe}'), ('\u{ffc2}',
-        '\u{ffc7}'), ('\u{ffca}', '\u{ffcf}'), ('\u{ffd2}', '\u{ffd7}'),
-        ('\u{ffda}', '\u{ffdc}'), ('\u{10000}', '\u{1000b}'), ('\u{1000d}',
-        '\u{10026}'), ('\u{10028}', '\u{1003a}'), ('\u{1003c}', '\u{1003d}'),
-        ('\u{1003f}', '\u{1004d}'), ('\u{10050}', '\u{1005d}'), ('\u{10080}',
-        '\u{100fa}'), ('\u{10280}', '\u{1029c}'), ('\u{102a0}', '\u{102d0}'),
-        ('\u{10300}', '\u{1031f}'), ('\u{10330}', '\u{10340}'), ('\u{10342}',
-        '\u{10349}'), ('\u{10350}', '\u{10375}'), ('\u{10380}', '\u{1039d}'),
-        ('\u{103a0}', '\u{103c3}'), ('\u{103c8}', '\u{103cf}'), ('\u{10450}',
-        '\u{1049d}'), ('\u{10500}', '\u{10527}'), ('\u{10530}', '\u{10563}'),
-        ('\u{10600}', '\u{10736}'), ('\u{10740}', '\u{10755}'), ('\u{10760}',
-        '\u{10767}'), ('\u{10800}', '\u{10805}'), ('\u{10808}', '\u{10808}'),
-        ('\u{1080a}', '\u{10835}'), ('\u{10837}', '\u{10838}'), ('\u{1083c}',
-        '\u{1083c}'), ('\u{1083f}', '\u{10855}'), ('\u{10860}', '\u{10876}'),
-        ('\u{10880}', '\u{1089e}'), ('\u{108e0}', '\u{108f2}'), ('\u{108f4}',
-        '\u{108f5}'), ('\u{10900}', '\u{10915}'), ('\u{10920}', '\u{10939}'),
-        ('\u{10980}', '\u{109b7}'), ('\u{109be}', '\u{109bf}'), ('\u{10a00}',
-        '\u{10a00}'), ('\u{10a10}', '\u{10a13}'), ('\u{10a15}', '\u{10a17}'),
-        ('\u{10a19}', '\u{10a33}'), ('\u{10a60}', '\u{10a7c}'), ('\u{10a80}',
-        '\u{10a9c}'), ('\u{10ac0}', '\u{10ac7}'), ('\u{10ac9}', '\u{10ae4}'),
-        ('\u{10b00}', '\u{10b35}'), ('\u{10b40}', '\u{10b55}'), ('\u{10b60}',
-        '\u{10b72}'), ('\u{10b80}', '\u{10b91}'), ('\u{10c00}', '\u{10c48}'),
-        ('\u{11003}', '\u{11037}'), ('\u{11083}', '\u{110af}'), ('\u{110d0}',
-        '\u{110e8}'), ('\u{11103}', '\u{11126}'), ('\u{11150}', '\u{11172}'),
-        ('\u{11176}', '\u{11176}'), ('\u{11183}', '\u{111b2}'), ('\u{111c1}',
-        '\u{111c4}'), ('\u{111da}', '\u{111da}'), ('\u{111dc}', '\u{111dc}'),
-        ('\u{11200}', '\u{11211}'), ('\u{11213}', '\u{1122b}'), ('\u{11280}',
-        '\u{11286}'), ('\u{11288}', '\u{11288}'), ('\u{1128a}', '\u{1128d}'),
-        ('\u{1128f}', '\u{1129d}'), ('\u{1129f}', '\u{112a8}'), ('\u{112b0}',
-        '\u{112de}'), ('\u{11305}', '\u{1130c}'), ('\u{1130f}', '\u{11310}'),
-        ('\u{11313}', '\u{11328}'), ('\u{1132a}', '\u{11330}'), ('\u{11332}',
-        '\u{11333}'), ('\u{11335}', '\u{11339}'), ('\u{1133d}', '\u{1133d}'),
-        ('\u{11350}', '\u{11350}'), ('\u{1135d}', '\u{11361}'), ('\u{11480}',
-        '\u{114af}'), ('\u{114c4}', '\u{114c5}'), ('\u{114c7}', '\u{114c7}'),
-        ('\u{11580}', '\u{115ae}'), ('\u{115d8}', '\u{115db}'), ('\u{11600}',
-        '\u{1162f}'), ('\u{11644}', '\u{11644}'), ('\u{11680}', '\u{116aa}'),
-        ('\u{11700}', '\u{11719}'), ('\u{118ff}', '\u{118ff}'), ('\u{11ac0}',
-        '\u{11af8}'), ('\u{12000}', '\u{12399}'), ('\u{12480}', '\u{12543}'),
-        ('\u{13000}', '\u{1342e}'), ('\u{14400}', '\u{14646}'), ('\u{16800}',
-        '\u{16a38}'), ('\u{16a40}', '\u{16a5e}'), ('\u{16ad0}', '\u{16aed}'),
-        ('\u{16b00}', '\u{16b2f}'), ('\u{16b63}', '\u{16b77}'), ('\u{16b7d}',
-        '\u{16b8f}'), ('\u{16f00}', '\u{16f44}'), ('\u{16f50}', '\u{16f50}'),
-        ('\u{1b000}', '\u{1b001}'), ('\u{1bc00}', '\u{1bc6a}'), ('\u{1bc70}',
-        '\u{1bc7c}'), ('\u{1bc80}', '\u{1bc88}'), ('\u{1bc90}', '\u{1bc99}'),
-        ('\u{1e800}', '\u{1e8c4}'), ('\u{1ee00}', '\u{1ee03}'), ('\u{1ee05}',
-        '\u{1ee1f}'), ('\u{1ee21}', '\u{1ee22}'), ('\u{1ee24}', '\u{1ee24}'),
-        ('\u{1ee27}', '\u{1ee27}'), ('\u{1ee29}', '\u{1ee32}'), ('\u{1ee34}',
-        '\u{1ee37}'), ('\u{1ee39}', '\u{1ee39}'), ('\u{1ee3b}', '\u{1ee3b}'),
-        ('\u{1ee42}', '\u{1ee42}'), ('\u{1ee47}', '\u{1ee47}'), ('\u{1ee49}',
-        '\u{1ee49}'), ('\u{1ee4b}', '\u{1ee4b}'), ('\u{1ee4d}', '\u{1ee4f}'),
-        ('\u{1ee51}', '\u{1ee52}'), ('\u{1ee54}', '\u{1ee54}'), ('\u{1ee57}',
-        '\u{1ee57}'), ('\u{1ee59}', '\u{1ee59}'), ('\u{1ee5b}', '\u{1ee5b}'),
-        ('\u{1ee5d}', '\u{1ee5d}'), ('\u{1ee5f}', '\u{1ee5f}'), ('\u{1ee61}',
-        '\u{1ee62}'), ('\u{1ee64}', '\u{1ee64}'), ('\u{1ee67}', '\u{1ee6a}'),
-        ('\u{1ee6c}', '\u{1ee72}'), ('\u{1ee74}', '\u{1ee77}'), ('\u{1ee79}',
-        '\u{1ee7c}'), ('\u{1ee7e}', '\u{1ee7e}'), ('\u{1ee80}', '\u{1ee89}'),
-        ('\u{1ee8b}', '\u{1ee9b}'), ('\u{1eea1}', '\u{1eea3}'), ('\u{1eea5}',
-        '\u{1eea9}'), ('\u{1eeab}', '\u{1eebb}'), ('\u{20000}', '\u{2a6d6}'),
-        ('\u{2a700}', '\u{2b734}'), ('\u{2b740}', '\u{2b81d}'), ('\u{2b820}',
-        '\u{2cea1}'), ('\u{2f800}', '\u{2fa1d}')
-    ];
-
-    pub const Lt_table: &'static [(char, char)] = &[
-        ('\u{1c5}', '\u{1c5}'), ('\u{1c8}', '\u{1c8}'), ('\u{1cb}', '\u{1cb}'),
-        ('\u{1f2}', '\u{1f2}'), ('\u{1f88}', '\u{1f8f}'), ('\u{1f98}',
-        '\u{1f9f}'), ('\u{1fa8}', '\u{1faf}'), ('\u{1fbc}', '\u{1fbc}'),
-        ('\u{1fcc}', '\u{1fcc}'), ('\u{1ffc}', '\u{1ffc}')
-    ];
-
-    pub const Lu_table: &'static [(char, char)] = &[
-        ('\u{41}', '\u{5a}'), ('\u{c0}', '\u{d6}'), ('\u{d8}', '\u{de}'),
-        ('\u{100}', '\u{100}'), ('\u{102}', '\u{102}'), ('\u{104}', '\u{104}'),
-        ('\u{106}', '\u{106}'), ('\u{108}', '\u{108}'), ('\u{10a}', '\u{10a}'),
-        ('\u{10c}', '\u{10c}'), ('\u{10e}', '\u{10e}'), ('\u{110}', '\u{110}'),
-        ('\u{112}', '\u{112}'), ('\u{114}', '\u{114}'), ('\u{116}', '\u{116}'),
-        ('\u{118}', '\u{118}'), ('\u{11a}', '\u{11a}'), ('\u{11c}', '\u{11c}'),
-        ('\u{11e}', '\u{11e}'), ('\u{120}', '\u{120}'), ('\u{122}', '\u{122}'),
-        ('\u{124}', '\u{124}'), ('\u{126}', '\u{126}'), ('\u{128}', '\u{128}'),
-        ('\u{12a}', '\u{12a}'), ('\u{12c}', '\u{12c}'), ('\u{12e}', '\u{12e}'),
-        ('\u{130}', '\u{130}'), ('\u{132}', '\u{132}'), ('\u{134}', '\u{134}'),
-        ('\u{136}', '\u{136}'), ('\u{139}', '\u{139}'), ('\u{13b}', '\u{13b}'),
-        ('\u{13d}', '\u{13d}'), ('\u{13f}', '\u{13f}'), ('\u{141}', '\u{141}'),
-        ('\u{143}', '\u{143}'), ('\u{145}', '\u{145}'), ('\u{147}', '\u{147}'),
-        ('\u{14a}', '\u{14a}'), ('\u{14c}', '\u{14c}'), ('\u{14e}', '\u{14e}'),
-        ('\u{150}', '\u{150}'), ('\u{152}', '\u{152}'), ('\u{154}', '\u{154}'),
-        ('\u{156}', '\u{156}'), ('\u{158}', '\u{158}'), ('\u{15a}', '\u{15a}'),
-        ('\u{15c}', '\u{15c}'), ('\u{15e}', '\u{15e}'), ('\u{160}', '\u{160}'),
-        ('\u{162}', '\u{162}'), ('\u{164}', '\u{164}'), ('\u{166}', '\u{166}'),
-        ('\u{168}', '\u{168}'), ('\u{16a}', '\u{16a}'), ('\u{16c}', '\u{16c}'),
-        ('\u{16e}', '\u{16e}'), ('\u{170}', '\u{170}'), ('\u{172}', '\u{172}'),
-        ('\u{174}', '\u{174}'), ('\u{176}', '\u{176}'), ('\u{178}', '\u{179}'),
-        ('\u{17b}', '\u{17b}'), ('\u{17d}', '\u{17d}'), ('\u{181}', '\u{182}'),
-        ('\u{184}', '\u{184}'), ('\u{186}', '\u{187}'), ('\u{189}', '\u{18b}'),
-        ('\u{18e}', '\u{191}'), ('\u{193}', '\u{194}'), ('\u{196}', '\u{198}'),
-        ('\u{19c}', '\u{19d}'), ('\u{19f}', '\u{1a0}'), ('\u{1a2}', '\u{1a2}'),
-        ('\u{1a4}', '\u{1a4}'), ('\u{1a6}', '\u{1a7}'), ('\u{1a9}', '\u{1a9}'),
-        ('\u{1ac}', '\u{1ac}'), ('\u{1ae}', '\u{1af}'), ('\u{1b1}', '\u{1b3}'),
-        ('\u{1b5}', '\u{1b5}'), ('\u{1b7}', '\u{1b8}'), ('\u{1bc}', '\u{1bc}'),
-        ('\u{1c4}', '\u{1c4}'), ('\u{1c7}', '\u{1c7}'), ('\u{1ca}', '\u{1ca}'),
-        ('\u{1cd}', '\u{1cd}'), ('\u{1cf}', '\u{1cf}'), ('\u{1d1}', '\u{1d1}'),
-        ('\u{1d3}', '\u{1d3}'), ('\u{1d5}', '\u{1d5}'), ('\u{1d7}', '\u{1d7}'),
-        ('\u{1d9}', '\u{1d9}'), ('\u{1db}', '\u{1db}'), ('\u{1de}', '\u{1de}'),
-        ('\u{1e0}', '\u{1e0}'), ('\u{1e2}', '\u{1e2}'), ('\u{1e4}', '\u{1e4}'),
-        ('\u{1e6}', '\u{1e6}'), ('\u{1e8}', '\u{1e8}'), ('\u{1ea}', '\u{1ea}'),
-        ('\u{1ec}', '\u{1ec}'), ('\u{1ee}', '\u{1ee}'), ('\u{1f1}', '\u{1f1}'),
-        ('\u{1f4}', '\u{1f4}'), ('\u{1f6}', '\u{1f8}'), ('\u{1fa}', '\u{1fa}'),
-        ('\u{1fc}', '\u{1fc}'), ('\u{1fe}', '\u{1fe}'), ('\u{200}', '\u{200}'),
-        ('\u{202}', '\u{202}'), ('\u{204}', '\u{204}'), ('\u{206}', '\u{206}'),
-        ('\u{208}', '\u{208}'), ('\u{20a}', '\u{20a}'), ('\u{20c}', '\u{20c}'),
-        ('\u{20e}', '\u{20e}'), ('\u{210}', '\u{210}'), ('\u{212}', '\u{212}'),
-        ('\u{214}', '\u{214}'), ('\u{216}', '\u{216}'), ('\u{218}', '\u{218}'),
-        ('\u{21a}', '\u{21a}'), ('\u{21c}', '\u{21c}'), ('\u{21e}', '\u{21e}'),
-        ('\u{220}', '\u{220}'), ('\u{222}', '\u{222}'), ('\u{224}', '\u{224}'),
-        ('\u{226}', '\u{226}'), ('\u{228}', '\u{228}'), ('\u{22a}', '\u{22a}'),
-        ('\u{22c}', '\u{22c}'), ('\u{22e}', '\u{22e}'), ('\u{230}', '\u{230}'),
-        ('\u{232}', '\u{232}'), ('\u{23a}', '\u{23b}'), ('\u{23d}', '\u{23e}'),
-        ('\u{241}', '\u{241}'), ('\u{243}', '\u{246}'), ('\u{248}', '\u{248}'),
-        ('\u{24a}', '\u{24a}'), ('\u{24c}', '\u{24c}'), ('\u{24e}', '\u{24e}'),
-        ('\u{370}', '\u{370}'), ('\u{372}', '\u{372}'), ('\u{376}', '\u{376}'),
-        ('\u{37f}', '\u{37f}'), ('\u{386}', '\u{386}'), ('\u{388}', '\u{38a}'),
-        ('\u{38c}', '\u{38c}'), ('\u{38e}', '\u{38f}'), ('\u{391}', '\u{3a1}'),
-        ('\u{3a3}', '\u{3ab}'), ('\u{3cf}', '\u{3cf}'), ('\u{3d2}', '\u{3d4}'),
-        ('\u{3d8}', '\u{3d8}'), ('\u{3da}', '\u{3da}'), ('\u{3dc}', '\u{3dc}'),
-        ('\u{3de}', '\u{3de}'), ('\u{3e0}', '\u{3e0}'), ('\u{3e2}', '\u{3e2}'),
-        ('\u{3e4}', '\u{3e4}'), ('\u{3e6}', '\u{3e6}'), ('\u{3e8}', '\u{3e8}'),
-        ('\u{3ea}', '\u{3ea}'), ('\u{3ec}', '\u{3ec}'), ('\u{3ee}', '\u{3ee}'),
-        ('\u{3f4}', '\u{3f4}'), ('\u{3f7}', '\u{3f7}'), ('\u{3f9}', '\u{3fa}'),
-        ('\u{3fd}', '\u{42f}'), ('\u{460}', '\u{460}'), ('\u{462}', '\u{462}'),
-        ('\u{464}', '\u{464}'), ('\u{466}', '\u{466}'), ('\u{468}', '\u{468}'),
-        ('\u{46a}', '\u{46a}'), ('\u{46c}', '\u{46c}'), ('\u{46e}', '\u{46e}'),
-        ('\u{470}', '\u{470}'), ('\u{472}', '\u{472}'), ('\u{474}', '\u{474}'),
-        ('\u{476}', '\u{476}'), ('\u{478}', '\u{478}'), ('\u{47a}', '\u{47a}'),
-        ('\u{47c}', '\u{47c}'), ('\u{47e}', '\u{47e}'), ('\u{480}', '\u{480}'),
-        ('\u{48a}', '\u{48a}'), ('\u{48c}', '\u{48c}'), ('\u{48e}', '\u{48e}'),
-        ('\u{490}', '\u{490}'), ('\u{492}', '\u{492}'), ('\u{494}', '\u{494}'),
-        ('\u{496}', '\u{496}'), ('\u{498}', '\u{498}'), ('\u{49a}', '\u{49a}'),
-        ('\u{49c}', '\u{49c}'), ('\u{49e}', '\u{49e}'), ('\u{4a0}', '\u{4a0}'),
-        ('\u{4a2}', '\u{4a2}'), ('\u{4a4}', '\u{4a4}'), ('\u{4a6}', '\u{4a6}'),
-        ('\u{4a8}', '\u{4a8}'), ('\u{4aa}', '\u{4aa}'), ('\u{4ac}', '\u{4ac}'),
-        ('\u{4ae}', '\u{4ae}'), ('\u{4b0}', '\u{4b0}'), ('\u{4b2}', '\u{4b2}'),
-        ('\u{4b4}', '\u{4b4}'), ('\u{4b6}', '\u{4b6}'), ('\u{4b8}', '\u{4b8}'),
-        ('\u{4ba}', '\u{4ba}'), ('\u{4bc}', '\u{4bc}'), ('\u{4be}', '\u{4be}'),
-        ('\u{4c0}', '\u{4c1}'), ('\u{4c3}', '\u{4c3}'), ('\u{4c5}', '\u{4c5}'),
-        ('\u{4c7}', '\u{4c7}'), ('\u{4c9}', '\u{4c9}'), ('\u{4cb}', '\u{4cb}'),
-        ('\u{4cd}', '\u{4cd}'), ('\u{4d0}', '\u{4d0}'), ('\u{4d2}', '\u{4d2}'),
-        ('\u{4d4}', '\u{4d4}'), ('\u{4d6}', '\u{4d6}'), ('\u{4d8}', '\u{4d8}'),
-        ('\u{4da}', '\u{4da}'), ('\u{4dc}', '\u{4dc}'), ('\u{4de}', '\u{4de}'),
-        ('\u{4e0}', '\u{4e0}'), ('\u{4e2}', '\u{4e2}'), ('\u{4e4}', '\u{4e4}'),
-        ('\u{4e6}', '\u{4e6}'), ('\u{4e8}', '\u{4e8}'), ('\u{4ea}', '\u{4ea}'),
-        ('\u{4ec}', '\u{4ec}'), ('\u{4ee}', '\u{4ee}'), ('\u{4f0}', '\u{4f0}'),
-        ('\u{4f2}', '\u{4f2}'), ('\u{4f4}', '\u{4f4}'), ('\u{4f6}', '\u{4f6}'),
-        ('\u{4f8}', '\u{4f8}'), ('\u{4fa}', '\u{4fa}'), ('\u{4fc}', '\u{4fc}'),
-        ('\u{4fe}', '\u{4fe}'), ('\u{500}', '\u{500}'), ('\u{502}', '\u{502}'),
-        ('\u{504}', '\u{504}'), ('\u{506}', '\u{506}'), ('\u{508}', '\u{508}'),
-        ('\u{50a}', '\u{50a}'), ('\u{50c}', '\u{50c}'), ('\u{50e}', '\u{50e}'),
-        ('\u{510}', '\u{510}'), ('\u{512}', '\u{512}'), ('\u{514}', '\u{514}'),
-        ('\u{516}', '\u{516}'), ('\u{518}', '\u{518}'), ('\u{51a}', '\u{51a}'),
-        ('\u{51c}', '\u{51c}'), ('\u{51e}', '\u{51e}'), ('\u{520}', '\u{520}'),
-        ('\u{522}', '\u{522}'), ('\u{524}', '\u{524}'), ('\u{526}', '\u{526}'),
-        ('\u{528}', '\u{528}'), ('\u{52a}', '\u{52a}'), ('\u{52c}', '\u{52c}'),
-        ('\u{52e}', '\u{52e}'), ('\u{531}', '\u{556}'), ('\u{10a0}',
-        '\u{10c5}'), ('\u{10c7}', '\u{10c7}'), ('\u{10cd}', '\u{10cd}'),
-        ('\u{13a0}', '\u{13f5}'), ('\u{1e00}', '\u{1e00}'), ('\u{1e02}',
-        '\u{1e02}'), ('\u{1e04}', '\u{1e04}'), ('\u{1e06}', '\u{1e06}'),
-        ('\u{1e08}', '\u{1e08}'), ('\u{1e0a}', '\u{1e0a}'), ('\u{1e0c}',
-        '\u{1e0c}'), ('\u{1e0e}', '\u{1e0e}'), ('\u{1e10}', '\u{1e10}'),
-        ('\u{1e12}', '\u{1e12}'), ('\u{1e14}', '\u{1e14}'), ('\u{1e16}',
-        '\u{1e16}'), ('\u{1e18}', '\u{1e18}'), ('\u{1e1a}', '\u{1e1a}'),
-        ('\u{1e1c}', '\u{1e1c}'), ('\u{1e1e}', '\u{1e1e}'), ('\u{1e20}',
-        '\u{1e20}'), ('\u{1e22}', '\u{1e22}'), ('\u{1e24}', '\u{1e24}'),
-        ('\u{1e26}', '\u{1e26}'), ('\u{1e28}', '\u{1e28}'), ('\u{1e2a}',
-        '\u{1e2a}'), ('\u{1e2c}', '\u{1e2c}'), ('\u{1e2e}', '\u{1e2e}'),
-        ('\u{1e30}', '\u{1e30}'), ('\u{1e32}', '\u{1e32}'), ('\u{1e34}',
-        '\u{1e34}'), ('\u{1e36}', '\u{1e36}'), ('\u{1e38}', '\u{1e38}'),
-        ('\u{1e3a}', '\u{1e3a}'), ('\u{1e3c}', '\u{1e3c}'), ('\u{1e3e}',
-        '\u{1e3e}'), ('\u{1e40}', '\u{1e40}'), ('\u{1e42}', '\u{1e42}'),
-        ('\u{1e44}', '\u{1e44}'), ('\u{1e46}', '\u{1e46}'), ('\u{1e48}',
-        '\u{1e48}'), ('\u{1e4a}', '\u{1e4a}'), ('\u{1e4c}', '\u{1e4c}'),
-        ('\u{1e4e}', '\u{1e4e}'), ('\u{1e50}', '\u{1e50}'), ('\u{1e52}',
-        '\u{1e52}'), ('\u{1e54}', '\u{1e54}'), ('\u{1e56}', '\u{1e56}'),
-        ('\u{1e58}', '\u{1e58}'), ('\u{1e5a}', '\u{1e5a}'), ('\u{1e5c}',
-        '\u{1e5c}'), ('\u{1e5e}', '\u{1e5e}'), ('\u{1e60}', '\u{1e60}'),
-        ('\u{1e62}', '\u{1e62}'), ('\u{1e64}', '\u{1e64}'), ('\u{1e66}',
-        '\u{1e66}'), ('\u{1e68}', '\u{1e68}'), ('\u{1e6a}', '\u{1e6a}'),
-        ('\u{1e6c}', '\u{1e6c}'), ('\u{1e6e}', '\u{1e6e}'), ('\u{1e70}',
-        '\u{1e70}'), ('\u{1e72}', '\u{1e72}'), ('\u{1e74}', '\u{1e74}'),
-        ('\u{1e76}', '\u{1e76}'), ('\u{1e78}', '\u{1e78}'), ('\u{1e7a}',
-        '\u{1e7a}'), ('\u{1e7c}', '\u{1e7c}'), ('\u{1e7e}', '\u{1e7e}'),
-        ('\u{1e80}', '\u{1e80}'), ('\u{1e82}', '\u{1e82}'), ('\u{1e84}',
-        '\u{1e84}'), ('\u{1e86}', '\u{1e86}'), ('\u{1e88}', '\u{1e88}'),
-        ('\u{1e8a}', '\u{1e8a}'), ('\u{1e8c}', '\u{1e8c}'), ('\u{1e8e}',
-        '\u{1e8e}'), ('\u{1e90}', '\u{1e90}'), ('\u{1e92}', '\u{1e92}'),
-        ('\u{1e94}', '\u{1e94}'), ('\u{1e9e}', '\u{1e9e}'), ('\u{1ea0}',
-        '\u{1ea0}'), ('\u{1ea2}', '\u{1ea2}'), ('\u{1ea4}', '\u{1ea4}'),
-        ('\u{1ea6}', '\u{1ea6}'), ('\u{1ea8}', '\u{1ea8}'), ('\u{1eaa}',
-        '\u{1eaa}'), ('\u{1eac}', '\u{1eac}'), ('\u{1eae}', '\u{1eae}'),
-        ('\u{1eb0}', '\u{1eb0}'), ('\u{1eb2}', '\u{1eb2}'), ('\u{1eb4}',
-        '\u{1eb4}'), ('\u{1eb6}', '\u{1eb6}'), ('\u{1eb8}', '\u{1eb8}'),
-        ('\u{1eba}', '\u{1eba}'), ('\u{1ebc}', '\u{1ebc}'), ('\u{1ebe}',
-        '\u{1ebe}'), ('\u{1ec0}', '\u{1ec0}'), ('\u{1ec2}', '\u{1ec2}'),
-        ('\u{1ec4}', '\u{1ec4}'), ('\u{1ec6}', '\u{1ec6}'), ('\u{1ec8}',
-        '\u{1ec8}'), ('\u{1eca}', '\u{1eca}'), ('\u{1ecc}', '\u{1ecc}'),
-        ('\u{1ece}', '\u{1ece}'), ('\u{1ed0}', '\u{1ed0}'), ('\u{1ed2}',
-        '\u{1ed2}'), ('\u{1ed4}', '\u{1ed4}'), ('\u{1ed6}', '\u{1ed6}'),
-        ('\u{1ed8}', '\u{1ed8}'), ('\u{1eda}', '\u{1eda}'), ('\u{1edc}',
-        '\u{1edc}'), ('\u{1ede}', '\u{1ede}'), ('\u{1ee0}', '\u{1ee0}'),
-        ('\u{1ee2}', '\u{1ee2}'), ('\u{1ee4}', '\u{1ee4}'), ('\u{1ee6}',
-        '\u{1ee6}'), ('\u{1ee8}', '\u{1ee8}'), ('\u{1eea}', '\u{1eea}'),
-        ('\u{1eec}', '\u{1eec}'), ('\u{1eee}', '\u{1eee}'), ('\u{1ef0}',
-        '\u{1ef0}'), ('\u{1ef2}', '\u{1ef2}'), ('\u{1ef4}', '\u{1ef4}'),
-        ('\u{1ef6}', '\u{1ef6}'), ('\u{1ef8}', '\u{1ef8}'), ('\u{1efa}',
-        '\u{1efa}'), ('\u{1efc}', '\u{1efc}'), ('\u{1efe}', '\u{1efe}'),
-        ('\u{1f08}', '\u{1f0f}'), ('\u{1f18}', '\u{1f1d}'), ('\u{1f28}',
-        '\u{1f2f}'), ('\u{1f38}', '\u{1f3f}'), ('\u{1f48}', '\u{1f4d}'),
-        ('\u{1f59}', '\u{1f59}'), ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}',
-        '\u{1f5d}'), ('\u{1f5f}', '\u{1f5f}'), ('\u{1f68}', '\u{1f6f}'),
-        ('\u{1fb8}', '\u{1fbb}'), ('\u{1fc8}', '\u{1fcb}'), ('\u{1fd8}',
-        '\u{1fdb}'), ('\u{1fe8}', '\u{1fec}'), ('\u{1ff8}', '\u{1ffb}'),
-        ('\u{2102}', '\u{2102}'), ('\u{2107}', '\u{2107}'), ('\u{210b}',
-        '\u{210d}'), ('\u{2110}', '\u{2112}'), ('\u{2115}', '\u{2115}'),
-        ('\u{2119}', '\u{211d}'), ('\u{2124}', '\u{2124}'), ('\u{2126}',
-        '\u{2126}'), ('\u{2128}', '\u{2128}'), ('\u{212a}', '\u{212d}'),
-        ('\u{2130}', '\u{2133}'), ('\u{213e}', '\u{213f}'), ('\u{2145}',
-        '\u{2145}'), ('\u{2183}', '\u{2183}'), ('\u{2c00}', '\u{2c2e}'),
-        ('\u{2c60}', '\u{2c60}'), ('\u{2c62}', '\u{2c64}'), ('\u{2c67}',
-        '\u{2c67}'), ('\u{2c69}', '\u{2c69}'), ('\u{2c6b}', '\u{2c6b}'),
-        ('\u{2c6d}', '\u{2c70}'), ('\u{2c72}', '\u{2c72}'), ('\u{2c75}',
-        '\u{2c75}'), ('\u{2c7e}', '\u{2c80}'), ('\u{2c82}', '\u{2c82}'),
-        ('\u{2c84}', '\u{2c84}'), ('\u{2c86}', '\u{2c86}'), ('\u{2c88}',
-        '\u{2c88}'), ('\u{2c8a}', '\u{2c8a}'), ('\u{2c8c}', '\u{2c8c}'),
-        ('\u{2c8e}', '\u{2c8e}'), ('\u{2c90}', '\u{2c90}'), ('\u{2c92}',
-        '\u{2c92}'), ('\u{2c94}', '\u{2c94}'), ('\u{2c96}', '\u{2c96}'),
-        ('\u{2c98}', '\u{2c98}'), ('\u{2c9a}', '\u{2c9a}'), ('\u{2c9c}',
-        '\u{2c9c}'), ('\u{2c9e}', '\u{2c9e}'), ('\u{2ca0}', '\u{2ca0}'),
-        ('\u{2ca2}', '\u{2ca2}'), ('\u{2ca4}', '\u{2ca4}'), ('\u{2ca6}',
-        '\u{2ca6}'), ('\u{2ca8}', '\u{2ca8}'), ('\u{2caa}', '\u{2caa}'),
-        ('\u{2cac}', '\u{2cac}'), ('\u{2cae}', '\u{2cae}'), ('\u{2cb0}',
-        '\u{2cb0}'), ('\u{2cb2}', '\u{2cb2}'), ('\u{2cb4}', '\u{2cb4}'),
-        ('\u{2cb6}', '\u{2cb6}'), ('\u{2cb8}', '\u{2cb8}'), ('\u{2cba}',
-        '\u{2cba}'), ('\u{2cbc}', '\u{2cbc}'), ('\u{2cbe}', '\u{2cbe}'),
-        ('\u{2cc0}', '\u{2cc0}'), ('\u{2cc2}', '\u{2cc2}'), ('\u{2cc4}',
-        '\u{2cc4}'), ('\u{2cc6}', '\u{2cc6}'), ('\u{2cc8}', '\u{2cc8}'),
-        ('\u{2cca}', '\u{2cca}'), ('\u{2ccc}', '\u{2ccc}'), ('\u{2cce}',
-        '\u{2cce}'), ('\u{2cd0}', '\u{2cd0}'), ('\u{2cd2}', '\u{2cd2}'),
-        ('\u{2cd4}', '\u{2cd4}'), ('\u{2cd6}', '\u{2cd6}'), ('\u{2cd8}',
-        '\u{2cd8}'), ('\u{2cda}', '\u{2cda}'), ('\u{2cdc}', '\u{2cdc}'),
-        ('\u{2cde}', '\u{2cde}'), ('\u{2ce0}', '\u{2ce0}'), ('\u{2ce2}',
-        '\u{2ce2}'), ('\u{2ceb}', '\u{2ceb}'), ('\u{2ced}', '\u{2ced}'),
-        ('\u{2cf2}', '\u{2cf2}'), ('\u{a640}', '\u{a640}'), ('\u{a642}',
-        '\u{a642}'), ('\u{a644}', '\u{a644}'), ('\u{a646}', '\u{a646}'),
-        ('\u{a648}', '\u{a648}'), ('\u{a64a}', '\u{a64a}'), ('\u{a64c}',
-        '\u{a64c}'), ('\u{a64e}', '\u{a64e}'), ('\u{a650}', '\u{a650}'),
-        ('\u{a652}', '\u{a652}'), ('\u{a654}', '\u{a654}'), ('\u{a656}',
-        '\u{a656}'), ('\u{a658}', '\u{a658}'), ('\u{a65a}', '\u{a65a}'),
-        ('\u{a65c}', '\u{a65c}'), ('\u{a65e}', '\u{a65e}'), ('\u{a660}',
-        '\u{a660}'), ('\u{a662}', '\u{a662}'), ('\u{a664}', '\u{a664}'),
-        ('\u{a666}', '\u{a666}'), ('\u{a668}', '\u{a668}'), ('\u{a66a}',
-        '\u{a66a}'), ('\u{a66c}', '\u{a66c}'), ('\u{a680}', '\u{a680}'),
-        ('\u{a682}', '\u{a682}'), ('\u{a684}', '\u{a684}'), ('\u{a686}',
-        '\u{a686}'), ('\u{a688}', '\u{a688}'), ('\u{a68a}', '\u{a68a}'),
-        ('\u{a68c}', '\u{a68c}'), ('\u{a68e}', '\u{a68e}'), ('\u{a690}',
-        '\u{a690}'), ('\u{a692}', '\u{a692}'), ('\u{a694}', '\u{a694}'),
-        ('\u{a696}', '\u{a696}'), ('\u{a698}', '\u{a698}'), ('\u{a69a}',
-        '\u{a69a}'), ('\u{a722}', '\u{a722}'), ('\u{a724}', '\u{a724}'),
-        ('\u{a726}', '\u{a726}'), ('\u{a728}', '\u{a728}'), ('\u{a72a}',
-        '\u{a72a}'), ('\u{a72c}', '\u{a72c}'), ('\u{a72e}', '\u{a72e}'),
-        ('\u{a732}', '\u{a732}'), ('\u{a734}', '\u{a734}'), ('\u{a736}',
-        '\u{a736}'), ('\u{a738}', '\u{a738}'), ('\u{a73a}', '\u{a73a}'),
-        ('\u{a73c}', '\u{a73c}'), ('\u{a73e}', '\u{a73e}'), ('\u{a740}',
-        '\u{a740}'), ('\u{a742}', '\u{a742}'), ('\u{a744}', '\u{a744}'),
-        ('\u{a746}', '\u{a746}'), ('\u{a748}', '\u{a748}'), ('\u{a74a}',
-        '\u{a74a}'), ('\u{a74c}', '\u{a74c}'), ('\u{a74e}', '\u{a74e}'),
-        ('\u{a750}', '\u{a750}'), ('\u{a752}', '\u{a752}'), ('\u{a754}',
-        '\u{a754}'), ('\u{a756}', '\u{a756}'), ('\u{a758}', '\u{a758}'),
-        ('\u{a75a}', '\u{a75a}'), ('\u{a75c}', '\u{a75c}'), ('\u{a75e}',
-        '\u{a75e}'), ('\u{a760}', '\u{a760}'), ('\u{a762}', '\u{a762}'),
-        ('\u{a764}', '\u{a764}'), ('\u{a766}', '\u{a766}'), ('\u{a768}',
-        '\u{a768}'), ('\u{a76a}', '\u{a76a}'), ('\u{a76c}', '\u{a76c}'),
-        ('\u{a76e}', '\u{a76e}'), ('\u{a779}', '\u{a779}'), ('\u{a77b}',
-        '\u{a77b}'), ('\u{a77d}', '\u{a77e}'), ('\u{a780}', '\u{a780}'),
-        ('\u{a782}', '\u{a782}'), ('\u{a784}', '\u{a784}'), ('\u{a786}',
-        '\u{a786}'), ('\u{a78b}', '\u{a78b}'), ('\u{a78d}', '\u{a78d}'),
-        ('\u{a790}', '\u{a790}'), ('\u{a792}', '\u{a792}'), ('\u{a796}',
-        '\u{a796}'), ('\u{a798}', '\u{a798}'), ('\u{a79a}', '\u{a79a}'),
-        ('\u{a79c}', '\u{a79c}'), ('\u{a79e}', '\u{a79e}'), ('\u{a7a0}',
-        '\u{a7a0}'), ('\u{a7a2}', '\u{a7a2}'), ('\u{a7a4}', '\u{a7a4}'),
-        ('\u{a7a6}', '\u{a7a6}'), ('\u{a7a8}', '\u{a7a8}'), ('\u{a7aa}',
-        '\u{a7ad}'), ('\u{a7b0}', '\u{a7b4}'), ('\u{a7b6}', '\u{a7b6}'),
-        ('\u{ff21}', '\u{ff3a}'), ('\u{10400}', '\u{10427}'), ('\u{10c80}',
-        '\u{10cb2}'), ('\u{118a0}', '\u{118bf}'), ('\u{1d400}', '\u{1d419}'),
-        ('\u{1d434}', '\u{1d44d}'), ('\u{1d468}', '\u{1d481}'), ('\u{1d49c}',
-        '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}', '\u{1d4a2}'),
-        ('\u{1d4a5}', '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'), ('\u{1d4ae}',
-        '\u{1d4b5}'), ('\u{1d4d0}', '\u{1d4e9}'), ('\u{1d504}', '\u{1d505}'),
-        ('\u{1d507}', '\u{1d50a}'), ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}',
-        '\u{1d51c}'), ('\u{1d538}', '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'),
-        ('\u{1d540}', '\u{1d544}'), ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}',
-        '\u{1d550}'), ('\u{1d56c}', '\u{1d585}'), ('\u{1d5a0}', '\u{1d5b9}'),
-        ('\u{1d5d4}', '\u{1d5ed}'), ('\u{1d608}', '\u{1d621}'), ('\u{1d63c}',
-        '\u{1d655}'), ('\u{1d670}', '\u{1d689}'), ('\u{1d6a8}', '\u{1d6c0}'),
-        ('\u{1d6e2}', '\u{1d6fa}'), ('\u{1d71c}', '\u{1d734}'), ('\u{1d756}',
-        '\u{1d76e}'), ('\u{1d790}', '\u{1d7a8}'), ('\u{1d7ca}', '\u{1d7ca}')
-    ];
-
-    pub const M_table: &'static [(char, char)] = &[
-        ('\u{300}', '\u{36f}'), ('\u{483}', '\u{489}'), ('\u{591}', '\u{5bd}'),
-        ('\u{5bf}', '\u{5bf}'), ('\u{5c1}', '\u{5c2}'), ('\u{5c4}', '\u{5c5}'),
-        ('\u{5c7}', '\u{5c7}'), ('\u{610}', '\u{61a}'), ('\u{64b}', '\u{65f}'),
-        ('\u{670}', '\u{670}'), ('\u{6d6}', '\u{6dc}'), ('\u{6df}', '\u{6e4}'),
-        ('\u{6e7}', '\u{6e8}'), ('\u{6ea}', '\u{6ed}'), ('\u{711}', '\u{711}'),
-        ('\u{730}', '\u{74a}'), ('\u{7a6}', '\u{7b0}'), ('\u{7eb}', '\u{7f3}'),
-        ('\u{816}', '\u{819}'), ('\u{81b}', '\u{823}'), ('\u{825}', '\u{827}'),
-        ('\u{829}', '\u{82d}'), ('\u{859}', '\u{85b}'), ('\u{8e3}', '\u{903}'),
-        ('\u{93a}', '\u{93c}'), ('\u{93e}', '\u{94f}'), ('\u{951}', '\u{957}'),
-        ('\u{962}', '\u{963}'), ('\u{981}', '\u{983}'), ('\u{9bc}', '\u{9bc}'),
-        ('\u{9be}', '\u{9c4}'), ('\u{9c7}', '\u{9c8}'), ('\u{9cb}', '\u{9cd}'),
-        ('\u{9d7}', '\u{9d7}'), ('\u{9e2}', '\u{9e3}'), ('\u{a01}', '\u{a03}'),
-        ('\u{a3c}', '\u{a3c}'), ('\u{a3e}', '\u{a42}'), ('\u{a47}', '\u{a48}'),
-        ('\u{a4b}', '\u{a4d}'), ('\u{a51}', '\u{a51}'), ('\u{a70}', '\u{a71}'),
-        ('\u{a75}', '\u{a75}'), ('\u{a81}', '\u{a83}'), ('\u{abc}', '\u{abc}'),
-        ('\u{abe}', '\u{ac5}'), ('\u{ac7}', '\u{ac9}'), ('\u{acb}', '\u{acd}'),
-        ('\u{ae2}', '\u{ae3}'), ('\u{b01}', '\u{b03}'), ('\u{b3c}', '\u{b3c}'),
-        ('\u{b3e}', '\u{b44}'), ('\u{b47}', '\u{b48}'), ('\u{b4b}', '\u{b4d}'),
-        ('\u{b56}', '\u{b57}'), ('\u{b62}', '\u{b63}'), ('\u{b82}', '\u{b82}'),
-        ('\u{bbe}', '\u{bc2}'), ('\u{bc6}', '\u{bc8}'), ('\u{bca}', '\u{bcd}'),
-        ('\u{bd7}', '\u{bd7}'), ('\u{c00}', '\u{c03}'), ('\u{c3e}', '\u{c44}'),
-        ('\u{c46}', '\u{c48}'), ('\u{c4a}', '\u{c4d}'), ('\u{c55}', '\u{c56}'),
-        ('\u{c62}', '\u{c63}'), ('\u{c81}', '\u{c83}'), ('\u{cbc}', '\u{cbc}'),
-        ('\u{cbe}', '\u{cc4}'), ('\u{cc6}', '\u{cc8}'), ('\u{cca}', '\u{ccd}'),
-        ('\u{cd5}', '\u{cd6}'), ('\u{ce2}', '\u{ce3}'), ('\u{d01}', '\u{d03}'),
-        ('\u{d3e}', '\u{d44}'), ('\u{d46}', '\u{d48}'), ('\u{d4a}', '\u{d4d}'),
-        ('\u{d57}', '\u{d57}'), ('\u{d62}', '\u{d63}'), ('\u{d82}', '\u{d83}'),
-        ('\u{dca}', '\u{dca}'), ('\u{dcf}', '\u{dd4}'), ('\u{dd6}', '\u{dd6}'),
-        ('\u{dd8}', '\u{ddf}'), ('\u{df2}', '\u{df3}'), ('\u{e31}', '\u{e31}'),
-        ('\u{e34}', '\u{e3a}'), ('\u{e47}', '\u{e4e}'), ('\u{eb1}', '\u{eb1}'),
-        ('\u{eb4}', '\u{eb9}'), ('\u{ebb}', '\u{ebc}'), ('\u{ec8}', '\u{ecd}'),
-        ('\u{f18}', '\u{f19}'), ('\u{f35}', '\u{f35}'), ('\u{f37}', '\u{f37}'),
-        ('\u{f39}', '\u{f39}'), ('\u{f3e}', '\u{f3f}'), ('\u{f71}', '\u{f84}'),
-        ('\u{f86}', '\u{f87}'), ('\u{f8d}', '\u{f97}'), ('\u{f99}', '\u{fbc}'),
-        ('\u{fc6}', '\u{fc6}'), ('\u{102b}', '\u{103e}'), ('\u{1056}',
-        '\u{1059}'), ('\u{105e}', '\u{1060}'), ('\u{1062}', '\u{1064}'),
-        ('\u{1067}', '\u{106d}'), ('\u{1071}', '\u{1074}'), ('\u{1082}',
-        '\u{108d}'), ('\u{108f}', '\u{108f}'), ('\u{109a}', '\u{109d}'),
-        ('\u{135d}', '\u{135f}'), ('\u{1712}', '\u{1714}'), ('\u{1732}',
-        '\u{1734}'), ('\u{1752}', '\u{1753}'), ('\u{1772}', '\u{1773}'),
-        ('\u{17b4}', '\u{17d3}'), ('\u{17dd}', '\u{17dd}'), ('\u{180b}',
-        '\u{180d}'), ('\u{18a9}', '\u{18a9}'), ('\u{1920}', '\u{192b}'),
-        ('\u{1930}', '\u{193b}'), ('\u{1a17}', '\u{1a1b}'), ('\u{1a55}',
-        '\u{1a5e}'), ('\u{1a60}', '\u{1a7c}'), ('\u{1a7f}', '\u{1a7f}'),
-        ('\u{1ab0}', '\u{1abe}'), ('\u{1b00}', '\u{1b04}'), ('\u{1b34}',
-        '\u{1b44}'), ('\u{1b6b}', '\u{1b73}'), ('\u{1b80}', '\u{1b82}'),
-        ('\u{1ba1}', '\u{1bad}'), ('\u{1be6}', '\u{1bf3}'), ('\u{1c24}',
-        '\u{1c37}'), ('\u{1cd0}', '\u{1cd2}'), ('\u{1cd4}', '\u{1ce8}'),
-        ('\u{1ced}', '\u{1ced}'), ('\u{1cf2}', '\u{1cf4}'), ('\u{1cf8}',
-        '\u{1cf9}'), ('\u{1dc0}', '\u{1df5}'), ('\u{1dfc}', '\u{1dff}'),
-        ('\u{20d0}', '\u{20f0}'), ('\u{2cef}', '\u{2cf1}'), ('\u{2d7f}',
-        '\u{2d7f}'), ('\u{2de0}', '\u{2dff}'), ('\u{302a}', '\u{302f}'),
-        ('\u{3099}', '\u{309a}'), ('\u{a66f}', '\u{a672}'), ('\u{a674}',
-        '\u{a67d}'), ('\u{a69e}', '\u{a69f}'), ('\u{a6f0}', '\u{a6f1}'),
-        ('\u{a802}', '\u{a802}'), ('\u{a806}', '\u{a806}'), ('\u{a80b}',
-        '\u{a80b}'), ('\u{a823}', '\u{a827}'), ('\u{a880}', '\u{a881}'),
-        ('\u{a8b4}', '\u{a8c4}'), ('\u{a8e0}', '\u{a8f1}'), ('\u{a926}',
-        '\u{a92d}'), ('\u{a947}', '\u{a953}'), ('\u{a980}', '\u{a983}'),
-        ('\u{a9b3}', '\u{a9c0}'), ('\u{a9e5}', '\u{a9e5}'), ('\u{aa29}',
-        '\u{aa36}'), ('\u{aa43}', '\u{aa43}'), ('\u{aa4c}', '\u{aa4d}'),
-        ('\u{aa7b}', '\u{aa7d}'), ('\u{aab0}', '\u{aab0}'), ('\u{aab2}',
-        '\u{aab4}'), ('\u{aab7}', '\u{aab8}'), ('\u{aabe}', '\u{aabf}'),
-        ('\u{aac1}', '\u{aac1}'), ('\u{aaeb}', '\u{aaef}'), ('\u{aaf5}',
-        '\u{aaf6}'), ('\u{abe3}', '\u{abea}'), ('\u{abec}', '\u{abed}'),
-        ('\u{fb1e}', '\u{fb1e}'), ('\u{fe00}', '\u{fe0f}'), ('\u{fe20}',
-        '\u{fe2f}'), ('\u{101fd}', '\u{101fd}'), ('\u{102e0}', '\u{102e0}'),
-        ('\u{10376}', '\u{1037a}'), ('\u{10a01}', '\u{10a03}'), ('\u{10a05}',
-        '\u{10a06}'), ('\u{10a0c}', '\u{10a0f}'), ('\u{10a38}', '\u{10a3a}'),
-        ('\u{10a3f}', '\u{10a3f}'), ('\u{10ae5}', '\u{10ae6}'), ('\u{11000}',
-        '\u{11002}'), ('\u{11038}', '\u{11046}'), ('\u{1107f}', '\u{11082}'),
-        ('\u{110b0}', '\u{110ba}'), ('\u{11100}', '\u{11102}'), ('\u{11127}',
-        '\u{11134}'), ('\u{11173}', '\u{11173}'), ('\u{11180}', '\u{11182}'),
-        ('\u{111b3}', '\u{111c0}'), ('\u{111ca}', '\u{111cc}'), ('\u{1122c}',
-        '\u{11237}'), ('\u{112df}', '\u{112ea}'), ('\u{11300}', '\u{11303}'),
-        ('\u{1133c}', '\u{1133c}'), ('\u{1133e}', '\u{11344}'), ('\u{11347}',
-        '\u{11348}'), ('\u{1134b}', '\u{1134d}'), ('\u{11357}', '\u{11357}'),
-        ('\u{11362}', '\u{11363}'), ('\u{11366}', '\u{1136c}'), ('\u{11370}',
-        '\u{11374}'), ('\u{114b0}', '\u{114c3}'), ('\u{115af}', '\u{115b5}'),
-        ('\u{115b8}', '\u{115c0}'), ('\u{115dc}', '\u{115dd}'), ('\u{11630}',
-        '\u{11640}'), ('\u{116ab}', '\u{116b7}'), ('\u{1171d}', '\u{1172b}'),
-        ('\u{16af0}', '\u{16af4}'), ('\u{16b30}', '\u{16b36}'), ('\u{16f51}',
-        '\u{16f7e}'), ('\u{16f8f}', '\u{16f92}'), ('\u{1bc9d}', '\u{1bc9e}'),
-        ('\u{1d165}', '\u{1d169}'), ('\u{1d16d}', '\u{1d172}'), ('\u{1d17b}',
-        '\u{1d182}'), ('\u{1d185}', '\u{1d18b}'), ('\u{1d1aa}', '\u{1d1ad}'),
-        ('\u{1d242}', '\u{1d244}'), ('\u{1da00}', '\u{1da36}'), ('\u{1da3b}',
-        '\u{1da6c}'), ('\u{1da75}', '\u{1da75}'), ('\u{1da84}', '\u{1da84}'),
-        ('\u{1da9b}', '\u{1da9f}'), ('\u{1daa1}', '\u{1daaf}'), ('\u{1e8d0}',
-        '\u{1e8d6}'), ('\u{e0100}', '\u{e01ef}')
-    ];
-
-    pub const Mc_table: &'static [(char, char)] = &[
-        ('\u{903}', '\u{903}'), ('\u{93b}', '\u{93b}'), ('\u{93e}', '\u{940}'),
-        ('\u{949}', '\u{94c}'), ('\u{94e}', '\u{94f}'), ('\u{982}', '\u{983}'),
-        ('\u{9be}', '\u{9c0}'), ('\u{9c7}', '\u{9c8}'), ('\u{9cb}', '\u{9cc}'),
-        ('\u{9d7}', '\u{9d7}'), ('\u{a03}', '\u{a03}'), ('\u{a3e}', '\u{a40}'),
-        ('\u{a83}', '\u{a83}'), ('\u{abe}', '\u{ac0}'), ('\u{ac9}', '\u{ac9}'),
-        ('\u{acb}', '\u{acc}'), ('\u{b02}', '\u{b03}'), ('\u{b3e}', '\u{b3e}'),
-        ('\u{b40}', '\u{b40}'), ('\u{b47}', '\u{b48}'), ('\u{b4b}', '\u{b4c}'),
-        ('\u{b57}', '\u{b57}'), ('\u{bbe}', '\u{bbf}'), ('\u{bc1}', '\u{bc2}'),
-        ('\u{bc6}', '\u{bc8}'), ('\u{bca}', '\u{bcc}'), ('\u{bd7}', '\u{bd7}'),
-        ('\u{c01}', '\u{c03}'), ('\u{c41}', '\u{c44}'), ('\u{c82}', '\u{c83}'),
-        ('\u{cbe}', '\u{cbe}'), ('\u{cc0}', '\u{cc4}'), ('\u{cc7}', '\u{cc8}'),
-        ('\u{cca}', '\u{ccb}'), ('\u{cd5}', '\u{cd6}'), ('\u{d02}', '\u{d03}'),
-        ('\u{d3e}', '\u{d40}'), ('\u{d46}', '\u{d48}'), ('\u{d4a}', '\u{d4c}'),
-        ('\u{d57}', '\u{d57}'), ('\u{d82}', '\u{d83}'), ('\u{dcf}', '\u{dd1}'),
-        ('\u{dd8}', '\u{ddf}'), ('\u{df2}', '\u{df3}'), ('\u{f3e}', '\u{f3f}'),
-        ('\u{f7f}', '\u{f7f}'), ('\u{102b}', '\u{102c}'), ('\u{1031}',
-        '\u{1031}'), ('\u{1038}', '\u{1038}'), ('\u{103b}', '\u{103c}'),
-        ('\u{1056}', '\u{1057}'), ('\u{1062}', '\u{1064}'), ('\u{1067}',
-        '\u{106d}'), ('\u{1083}', '\u{1084}'), ('\u{1087}', '\u{108c}'),
-        ('\u{108f}', '\u{108f}'), ('\u{109a}', '\u{109c}'), ('\u{17b6}',
-        '\u{17b6}'), ('\u{17be}', '\u{17c5}'), ('\u{17c7}', '\u{17c8}'),
-        ('\u{1923}', '\u{1926}'), ('\u{1929}', '\u{192b}'), ('\u{1930}',
-        '\u{1931}'), ('\u{1933}', '\u{1938}'), ('\u{1a19}', '\u{1a1a}'),
-        ('\u{1a55}', '\u{1a55}'), ('\u{1a57}', '\u{1a57}'), ('\u{1a61}',
-        '\u{1a61}'), ('\u{1a63}', '\u{1a64}'), ('\u{1a6d}', '\u{1a72}'),
-        ('\u{1b04}', '\u{1b04}'), ('\u{1b35}', '\u{1b35}'), ('\u{1b3b}',
-        '\u{1b3b}'), ('\u{1b3d}', '\u{1b41}'), ('\u{1b43}', '\u{1b44}'),
-        ('\u{1b82}', '\u{1b82}'), ('\u{1ba1}', '\u{1ba1}'), ('\u{1ba6}',
-        '\u{1ba7}'), ('\u{1baa}', '\u{1baa}'), ('\u{1be7}', '\u{1be7}'),
-        ('\u{1bea}', '\u{1bec}'), ('\u{1bee}', '\u{1bee}'), ('\u{1bf2}',
-        '\u{1bf3}'), ('\u{1c24}', '\u{1c2b}'), ('\u{1c34}', '\u{1c35}'),
-        ('\u{1ce1}', '\u{1ce1}'), ('\u{1cf2}', '\u{1cf3}'), ('\u{302e}',
-        '\u{302f}'), ('\u{a823}', '\u{a824}'), ('\u{a827}', '\u{a827}'),
-        ('\u{a880}', '\u{a881}'), ('\u{a8b4}', '\u{a8c3}'), ('\u{a952}',
-        '\u{a953}'), ('\u{a983}', '\u{a983}'), ('\u{a9b4}', '\u{a9b5}'),
-        ('\u{a9ba}', '\u{a9bb}'), ('\u{a9bd}', '\u{a9c0}'), ('\u{aa2f}',
-        '\u{aa30}'), ('\u{aa33}', '\u{aa34}'), ('\u{aa4d}', '\u{aa4d}'),
-        ('\u{aa7b}', '\u{aa7b}'), ('\u{aa7d}', '\u{aa7d}'), ('\u{aaeb}',
-        '\u{aaeb}'), ('\u{aaee}', '\u{aaef}'), ('\u{aaf5}', '\u{aaf5}'),
-        ('\u{abe3}', '\u{abe4}'), ('\u{abe6}', '\u{abe7}'), ('\u{abe9}',
-        '\u{abea}'), ('\u{abec}', '\u{abec}'), ('\u{11000}', '\u{11000}'),
-        ('\u{11002}', '\u{11002}'), ('\u{11082}', '\u{11082}'), ('\u{110b0}',
-        '\u{110b2}'), ('\u{110b7}', '\u{110b8}'), ('\u{1112c}', '\u{1112c}'),
-        ('\u{11182}', '\u{11182}'), ('\u{111b3}', '\u{111b5}'), ('\u{111bf}',
-        '\u{111c0}'), ('\u{1122c}', '\u{1122e}'), ('\u{11232}', '\u{11233}'),
-        ('\u{11235}', '\u{11235}'), ('\u{112e0}', '\u{112e2}'), ('\u{11302}',
-        '\u{11303}'), ('\u{1133e}', '\u{1133f}'), ('\u{11341}', '\u{11344}'),
-        ('\u{11347}', '\u{11348}'), ('\u{1134b}', '\u{1134d}'), ('\u{11357}',
-        '\u{11357}'), ('\u{11362}', '\u{11363}'), ('\u{114b0}', '\u{114b2}'),
-        ('\u{114b9}', '\u{114b9}'), ('\u{114bb}', '\u{114be}'), ('\u{114c1}',
-        '\u{114c1}'), ('\u{115af}', '\u{115b1}'), ('\u{115b8}', '\u{115bb}'),
-        ('\u{115be}', '\u{115be}'), ('\u{11630}', '\u{11632}'), ('\u{1163b}',
-        '\u{1163c}'), ('\u{1163e}', '\u{1163e}'), ('\u{116ac}', '\u{116ac}'),
-        ('\u{116ae}', '\u{116af}'), ('\u{116b6}', '\u{116b6}'), ('\u{11720}',
-        '\u{11721}'), ('\u{11726}', '\u{11726}'), ('\u{16f51}', '\u{16f7e}'),
-        ('\u{1d165}', '\u{1d166}'), ('\u{1d16d}', '\u{1d172}')
-    ];
-
-    pub const Me_table: &'static [(char, char)] = &[
-        ('\u{488}', '\u{489}'), ('\u{1abe}', '\u{1abe}'), ('\u{20dd}',
-        '\u{20e0}'), ('\u{20e2}', '\u{20e4}'), ('\u{a670}', '\u{a672}')
-    ];
-
-    pub const Mn_table: &'static [(char, char)] = &[
-        ('\u{300}', '\u{36f}'), ('\u{483}', '\u{487}'), ('\u{591}', '\u{5bd}'),
-        ('\u{5bf}', '\u{5bf}'), ('\u{5c1}', '\u{5c2}'), ('\u{5c4}', '\u{5c5}'),
-        ('\u{5c7}', '\u{5c7}'), ('\u{610}', '\u{61a}'), ('\u{64b}', '\u{65f}'),
-        ('\u{670}', '\u{670}'), ('\u{6d6}', '\u{6dc}'), ('\u{6df}', '\u{6e4}'),
-        ('\u{6e7}', '\u{6e8}'), ('\u{6ea}', '\u{6ed}'), ('\u{711}', '\u{711}'),
-        ('\u{730}', '\u{74a}'), ('\u{7a6}', '\u{7b0}'), ('\u{7eb}', '\u{7f3}'),
-        ('\u{816}', '\u{819}'), ('\u{81b}', '\u{823}'), ('\u{825}', '\u{827}'),
-        ('\u{829}', '\u{82d}'), ('\u{859}', '\u{85b}'), ('\u{8e3}', '\u{902}'),
-        ('\u{93a}', '\u{93a}'), ('\u{93c}', '\u{93c}'), ('\u{941}', '\u{948}'),
-        ('\u{94d}', '\u{94d}'), ('\u{951}', '\u{957}'), ('\u{962}', '\u{963}'),
-        ('\u{981}', '\u{981}'), ('\u{9bc}', '\u{9bc}'), ('\u{9c1}', '\u{9c4}'),
-        ('\u{9cd}', '\u{9cd}'), ('\u{9e2}', '\u{9e3}'), ('\u{a01}', '\u{a02}'),
-        ('\u{a3c}', '\u{a3c}'), ('\u{a41}', '\u{a42}'), ('\u{a47}', '\u{a48}'),
-        ('\u{a4b}', '\u{a4d}'), ('\u{a51}', '\u{a51}'), ('\u{a70}', '\u{a71}'),
-        ('\u{a75}', '\u{a75}'), ('\u{a81}', '\u{a82}'), ('\u{abc}', '\u{abc}'),
-        ('\u{ac1}', '\u{ac5}'), ('\u{ac7}', '\u{ac8}'), ('\u{acd}', '\u{acd}'),
-        ('\u{ae2}', '\u{ae3}'), ('\u{b01}', '\u{b01}'), ('\u{b3c}', '\u{b3c}'),
-        ('\u{b3f}', '\u{b3f}'), ('\u{b41}', '\u{b44}'), ('\u{b4d}', '\u{b4d}'),
-        ('\u{b56}', '\u{b56}'), ('\u{b62}', '\u{b63}'), ('\u{b82}', '\u{b82}'),
-        ('\u{bc0}', '\u{bc0}'), ('\u{bcd}', '\u{bcd}'), ('\u{c00}', '\u{c00}'),
-        ('\u{c3e}', '\u{c40}'), ('\u{c46}', '\u{c48}'), ('\u{c4a}', '\u{c4d}'),
-        ('\u{c55}', '\u{c56}'), ('\u{c62}', '\u{c63}'), ('\u{c81}', '\u{c81}'),
-        ('\u{cbc}', '\u{cbc}'), ('\u{cbf}', '\u{cbf}'), ('\u{cc6}', '\u{cc6}'),
-        ('\u{ccc}', '\u{ccd}'), ('\u{ce2}', '\u{ce3}'), ('\u{d01}', '\u{d01}'),
-        ('\u{d41}', '\u{d44}'), ('\u{d4d}', '\u{d4d}'), ('\u{d62}', '\u{d63}'),
-        ('\u{dca}', '\u{dca}'), ('\u{dd2}', '\u{dd4}'), ('\u{dd6}', '\u{dd6}'),
-        ('\u{e31}', '\u{e31}'), ('\u{e34}', '\u{e3a}'), ('\u{e47}', '\u{e4e}'),
-        ('\u{eb1}', '\u{eb1}'), ('\u{eb4}', '\u{eb9}'), ('\u{ebb}', '\u{ebc}'),
-        ('\u{ec8}', '\u{ecd}'), ('\u{f18}', '\u{f19}'), ('\u{f35}', '\u{f35}'),
-        ('\u{f37}', '\u{f37}'), ('\u{f39}', '\u{f39}'), ('\u{f71}', '\u{f7e}'),
-        ('\u{f80}', '\u{f84}'), ('\u{f86}', '\u{f87}'), ('\u{f8d}', '\u{f97}'),
-        ('\u{f99}', '\u{fbc}'), ('\u{fc6}', '\u{fc6}'), ('\u{102d}',
-        '\u{1030}'), ('\u{1032}', '\u{1037}'), ('\u{1039}', '\u{103a}'),
-        ('\u{103d}', '\u{103e}'), ('\u{1058}', '\u{1059}'), ('\u{105e}',
-        '\u{1060}'), ('\u{1071}', '\u{1074}'), ('\u{1082}', '\u{1082}'),
-        ('\u{1085}', '\u{1086}'), ('\u{108d}', '\u{108d}'), ('\u{109d}',
-        '\u{109d}'), ('\u{135d}', '\u{135f}'), ('\u{1712}', '\u{1714}'),
-        ('\u{1732}', '\u{1734}'), ('\u{1752}', '\u{1753}'), ('\u{1772}',
-        '\u{1773}'), ('\u{17b4}', '\u{17b5}'), ('\u{17b7}', '\u{17bd}'),
-        ('\u{17c6}', '\u{17c6}'), ('\u{17c9}', '\u{17d3}'), ('\u{17dd}',
-        '\u{17dd}'), ('\u{180b}', '\u{180d}'), ('\u{18a9}', '\u{18a9}'),
-        ('\u{1920}', '\u{1922}'), ('\u{1927}', '\u{1928}'), ('\u{1932}',
-        '\u{1932}'), ('\u{1939}', '\u{193b}'), ('\u{1a17}', '\u{1a18}'),
-        ('\u{1a1b}', '\u{1a1b}'), ('\u{1a56}', '\u{1a56}'), ('\u{1a58}',
-        '\u{1a5e}'), ('\u{1a60}', '\u{1a60}'), ('\u{1a62}', '\u{1a62}'),
-        ('\u{1a65}', '\u{1a6c}'), ('\u{1a73}', '\u{1a7c}'), ('\u{1a7f}',
-        '\u{1a7f}'), ('\u{1ab0}', '\u{1abd}'), ('\u{1b00}', '\u{1b03}'),
-        ('\u{1b34}', '\u{1b34}'), ('\u{1b36}', '\u{1b3a}'), ('\u{1b3c}',
-        '\u{1b3c}'), ('\u{1b42}', '\u{1b42}'), ('\u{1b6b}', '\u{1b73}'),
-        ('\u{1b80}', '\u{1b81}'), ('\u{1ba2}', '\u{1ba5}'), ('\u{1ba8}',
-        '\u{1ba9}'), ('\u{1bab}', '\u{1bad}'), ('\u{1be6}', '\u{1be6}'),
-        ('\u{1be8}', '\u{1be9}'), ('\u{1bed}', '\u{1bed}'), ('\u{1bef}',
-        '\u{1bf1}'), ('\u{1c2c}', '\u{1c33}'), ('\u{1c36}', '\u{1c37}'),
-        ('\u{1cd0}', '\u{1cd2}'), ('\u{1cd4}', '\u{1ce0}'), ('\u{1ce2}',
-        '\u{1ce8}'), ('\u{1ced}', '\u{1ced}'), ('\u{1cf4}', '\u{1cf4}'),
-        ('\u{1cf8}', '\u{1cf9}'), ('\u{1dc0}', '\u{1df5}'), ('\u{1dfc}',
-        '\u{1dff}'), ('\u{20d0}', '\u{20dc}'), ('\u{20e1}', '\u{20e1}'),
-        ('\u{20e5}', '\u{20f0}'), ('\u{2cef}', '\u{2cf1}'), ('\u{2d7f}',
-        '\u{2d7f}'), ('\u{2de0}', '\u{2dff}'), ('\u{302a}', '\u{302d}'),
-        ('\u{3099}', '\u{309a}'), ('\u{a66f}', '\u{a66f}'), ('\u{a674}',
-        '\u{a67d}'), ('\u{a69e}', '\u{a69f}'), ('\u{a6f0}', '\u{a6f1}'),
-        ('\u{a802}', '\u{a802}'), ('\u{a806}', '\u{a806}'), ('\u{a80b}',
-        '\u{a80b}'), ('\u{a825}', '\u{a826}'), ('\u{a8c4}', '\u{a8c4}'),
-        ('\u{a8e0}', '\u{a8f1}'), ('\u{a926}', '\u{a92d}'), ('\u{a947}',
-        '\u{a951}'), ('\u{a980}', '\u{a982}'), ('\u{a9b3}', '\u{a9b3}'),
-        ('\u{a9b6}', '\u{a9b9}'), ('\u{a9bc}', '\u{a9bc}'), ('\u{a9e5}',
-        '\u{a9e5}'), ('\u{aa29}', '\u{aa2e}'), ('\u{aa31}', '\u{aa32}'),
-        ('\u{aa35}', '\u{aa36}'), ('\u{aa43}', '\u{aa43}'), ('\u{aa4c}',
-        '\u{aa4c}'), ('\u{aa7c}', '\u{aa7c}'), ('\u{aab0}', '\u{aab0}'),
-        ('\u{aab2}', '\u{aab4}'), ('\u{aab7}', '\u{aab8}'), ('\u{aabe}',
-        '\u{aabf}'), ('\u{aac1}', '\u{aac1}'), ('\u{aaec}', '\u{aaed}'),
-        ('\u{aaf6}', '\u{aaf6}'), ('\u{abe5}', '\u{abe5}'), ('\u{abe8}',
-        '\u{abe8}'), ('\u{abed}', '\u{abed}'), ('\u{fb1e}', '\u{fb1e}'),
-        ('\u{fe00}', '\u{fe0f}'), ('\u{fe20}', '\u{fe2f}'), ('\u{101fd}',
-        '\u{101fd}'), ('\u{102e0}', '\u{102e0}'), ('\u{10376}', '\u{1037a}'),
-        ('\u{10a01}', '\u{10a03}'), ('\u{10a05}', '\u{10a06}'), ('\u{10a0c}',
-        '\u{10a0f}'), ('\u{10a38}', '\u{10a3a}'), ('\u{10a3f}', '\u{10a3f}'),
-        ('\u{10ae5}', '\u{10ae6}'), ('\u{11001}', '\u{11001}'), ('\u{11038}',
-        '\u{11046}'), ('\u{1107f}', '\u{11081}'), ('\u{110b3}', '\u{110b6}'),
-        ('\u{110b9}', '\u{110ba}'), ('\u{11100}', '\u{11102}'), ('\u{11127}',
-        '\u{1112b}'), ('\u{1112d}', '\u{11134}'), ('\u{11173}', '\u{11173}'),
-        ('\u{11180}', '\u{11181}'), ('\u{111b6}', '\u{111be}'), ('\u{111ca}',
-        '\u{111cc}'), ('\u{1122f}', '\u{11231}'), ('\u{11234}', '\u{11234}'),
-        ('\u{11236}', '\u{11237}'), ('\u{112df}', '\u{112df}'), ('\u{112e3}',
-        '\u{112ea}'), ('\u{11300}', '\u{11301}'), ('\u{1133c}', '\u{1133c}'),
-        ('\u{11340}', '\u{11340}'), ('\u{11366}', '\u{1136c}'), ('\u{11370}',
-        '\u{11374}'), ('\u{114b3}', '\u{114b8}'), ('\u{114ba}', '\u{114ba}'),
-        ('\u{114bf}', '\u{114c0}'), ('\u{114c2}', '\u{114c3}'), ('\u{115b2}',
-        '\u{115b5}'), ('\u{115bc}', '\u{115bd}'), ('\u{115bf}', '\u{115c0}'),
-        ('\u{115dc}', '\u{115dd}'), ('\u{11633}', '\u{1163a}'), ('\u{1163d}',
-        '\u{1163d}'), ('\u{1163f}', '\u{11640}'), ('\u{116ab}', '\u{116ab}'),
-        ('\u{116ad}', '\u{116ad}'), ('\u{116b0}', '\u{116b5}'), ('\u{116b7}',
-        '\u{116b7}'), ('\u{1171d}', '\u{1171f}'), ('\u{11722}', '\u{11725}'),
-        ('\u{11727}', '\u{1172b}'), ('\u{16af0}', '\u{16af4}'), ('\u{16b30}',
-        '\u{16b36}'), ('\u{16f8f}', '\u{16f92}'), ('\u{1bc9d}', '\u{1bc9e}'),
-        ('\u{1d167}', '\u{1d169}'), ('\u{1d17b}', '\u{1d182}'), ('\u{1d185}',
-        '\u{1d18b}'), ('\u{1d1aa}', '\u{1d1ad}'), ('\u{1d242}', '\u{1d244}'),
-        ('\u{1da00}', '\u{1da36}'), ('\u{1da3b}', '\u{1da6c}'), ('\u{1da75}',
-        '\u{1da75}'), ('\u{1da84}', '\u{1da84}'), ('\u{1da9b}', '\u{1da9f}'),
-        ('\u{1daa1}', '\u{1daaf}'), ('\u{1e8d0}', '\u{1e8d6}'), ('\u{e0100}',
-        '\u{e01ef}')
-    ];
-
-    pub const N_table: &'static [(char, char)] = &[
-        ('\u{30}', '\u{39}'), ('\u{660}', '\u{669}'), ('\u{6f0}', '\u{6f9}'),
-        ('\u{7c0}', '\u{7c9}'), ('\u{966}', '\u{96f}'), ('\u{9e6}', '\u{9ef}'),
-        ('\u{a66}', '\u{a6f}'), ('\u{ae6}', '\u{aef}'), ('\u{b66}', '\u{b6f}'),
-        ('\u{be6}', '\u{bef}'), ('\u{c66}', '\u{c6f}'), ('\u{ce6}', '\u{cef}'),
-        ('\u{d66}', '\u{d6f}'), ('\u{de6}', '\u{def}'), ('\u{e50}', '\u{e59}'),
-        ('\u{ed0}', '\u{ed9}'), ('\u{f20}', '\u{f29}'), ('\u{1040}',
-        '\u{1049}'), ('\u{1090}', '\u{1099}'), ('\u{16ee}', '\u{16f0}'),
-        ('\u{17e0}', '\u{17e9}'), ('\u{1810}', '\u{1819}'), ('\u{1946}',
-        '\u{194f}'), ('\u{19d0}', '\u{19d9}'), ('\u{1a80}', '\u{1a89}'),
-        ('\u{1a90}', '\u{1a99}'), ('\u{1b50}', '\u{1b59}'), ('\u{1bb0}',
-        '\u{1bb9}'), ('\u{1c40}', '\u{1c49}'), ('\u{1c50}', '\u{1c59}'),
-        ('\u{2160}', '\u{2182}'), ('\u{2185}', '\u{2188}'), ('\u{3007}',
-        '\u{3007}'), ('\u{3021}', '\u{3029}'), ('\u{3038}', '\u{303a}'),
-        ('\u{a620}', '\u{a629}'), ('\u{a6e6}', '\u{a6ef}'), ('\u{a8d0}',
-        '\u{a8d9}'), ('\u{a900}', '\u{a909}'), ('\u{a9d0}', '\u{a9d9}'),
-        ('\u{a9f0}', '\u{a9f9}'), ('\u{aa50}', '\u{aa59}'), ('\u{abf0}',
-        '\u{abf9}'), ('\u{ff10}', '\u{ff19}'), ('\u{10140}', '\u{10174}'),
-        ('\u{10341}', '\u{10341}'), ('\u{1034a}', '\u{1034a}'), ('\u{103d1}',
-        '\u{103d5}'), ('\u{104a0}', '\u{104a9}'), ('\u{11066}', '\u{1106f}'),
-        ('\u{110f0}', '\u{110f9}'), ('\u{11136}', '\u{1113f}'), ('\u{111d0}',
-        '\u{111d9}'), ('\u{112f0}', '\u{112f9}'), ('\u{114d0}', '\u{114d9}'),
-        ('\u{11650}', '\u{11659}'), ('\u{116c0}', '\u{116c9}'), ('\u{11730}',
-        '\u{11739}'), ('\u{118e0}', '\u{118e9}'), ('\u{12400}', '\u{1246e}'),
-        ('\u{16a60}', '\u{16a69}'), ('\u{16b50}', '\u{16b59}'), ('\u{1d7ce}',
-        '\u{1d7ff}')
-    ];
-
-    pub const Nd_table: &'static [(char, char)] = &[
-        ('\u{30}', '\u{39}'), ('\u{660}', '\u{669}'), ('\u{6f0}', '\u{6f9}'),
-        ('\u{7c0}', '\u{7c9}'), ('\u{966}', '\u{96f}'), ('\u{9e6}', '\u{9ef}'),
-        ('\u{a66}', '\u{a6f}'), ('\u{ae6}', '\u{aef}'), ('\u{b66}', '\u{b6f}'),
-        ('\u{be6}', '\u{bef}'), ('\u{c66}', '\u{c6f}'), ('\u{ce6}', '\u{cef}'),
-        ('\u{d66}', '\u{d6f}'), ('\u{de6}', '\u{def}'), ('\u{e50}', '\u{e59}'),
-        ('\u{ed0}', '\u{ed9}'), ('\u{f20}', '\u{f29}'), ('\u{1040}',
-        '\u{1049}'), ('\u{1090}', '\u{1099}'), ('\u{17e0}', '\u{17e9}'),
-        ('\u{1810}', '\u{1819}'), ('\u{1946}', '\u{194f}'), ('\u{19d0}',
-        '\u{19d9}'), ('\u{1a80}', '\u{1a89}'), ('\u{1a90}', '\u{1a99}'),
-        ('\u{1b50}', '\u{1b59}'), ('\u{1bb0}', '\u{1bb9}'), ('\u{1c40}',
-        '\u{1c49}'), ('\u{1c50}', '\u{1c59}'), ('\u{a620}', '\u{a629}'),
-        ('\u{a8d0}', '\u{a8d9}'), ('\u{a900}', '\u{a909}'), ('\u{a9d0}',
-        '\u{a9d9}'), ('\u{a9f0}', '\u{a9f9}'), ('\u{aa50}', '\u{aa59}'),
-        ('\u{abf0}', '\u{abf9}'), ('\u{ff10}', '\u{ff19}'), ('\u{104a0}',
-        '\u{104a9}'), ('\u{11066}', '\u{1106f}'), ('\u{110f0}', '\u{110f9}'),
-        ('\u{11136}', '\u{1113f}'), ('\u{111d0}', '\u{111d9}'), ('\u{112f0}',
-        '\u{112f9}'), ('\u{114d0}', '\u{114d9}'), ('\u{11650}', '\u{11659}'),
-        ('\u{116c0}', '\u{116c9}'), ('\u{11730}', '\u{11739}'), ('\u{118e0}',
-        '\u{118e9}'), ('\u{16a60}', '\u{16a69}'), ('\u{16b50}', '\u{16b59}'),
-        ('\u{1d7ce}', '\u{1d7ff}')
-    ];
-
-    pub const Nl_table: &'static [(char, char)] = &[
-        ('\u{16ee}', '\u{16f0}'), ('\u{2160}', '\u{2182}'), ('\u{2185}',
-        '\u{2188}'), ('\u{3007}', '\u{3007}'), ('\u{3021}', '\u{3029}'),
-        ('\u{3038}', '\u{303a}'), ('\u{a6e6}', '\u{a6ef}'), ('\u{10140}',
-        '\u{10174}'), ('\u{10341}', '\u{10341}'), ('\u{1034a}', '\u{1034a}'),
-        ('\u{103d1}', '\u{103d5}'), ('\u{12400}', '\u{1246e}')
-    ];
-
-    pub const No_table: &'static [(char, char)] = &[
-        ('\u{b2}', '\u{b3}'), ('\u{b9}', '\u{b9}'), ('\u{bc}', '\u{be}'),
-        ('\u{9f4}', '\u{9f9}'), ('\u{b72}', '\u{b77}'), ('\u{bf0}', '\u{bf2}'),
-        ('\u{c78}', '\u{c7e}'), ('\u{d70}', '\u{d75}'), ('\u{f2a}', '\u{f33}'),
-        ('\u{1369}', '\u{137c}'), ('\u{17f0}', '\u{17f9}'), ('\u{19da}',
-        '\u{19da}'), ('\u{2070}', '\u{2070}'), ('\u{2074}', '\u{2079}'),
-        ('\u{2080}', '\u{2089}'), ('\u{2150}', '\u{215f}'), ('\u{2189}',
-        '\u{2189}'), ('\u{2460}', '\u{249b}'), ('\u{24ea}', '\u{24ff}'),
-        ('\u{2776}', '\u{2793}'), ('\u{2cfd}', '\u{2cfd}'), ('\u{3192}',
-        '\u{3195}'), ('\u{3220}', '\u{3229}'), ('\u{3248}', '\u{324f}'),
-        ('\u{3251}', '\u{325f}'), ('\u{3280}', '\u{3289}'), ('\u{32b1}',
-        '\u{32bf}'), ('\u{a830}', '\u{a835}'), ('\u{10107}', '\u{10133}'),
-        ('\u{10175}', '\u{10178}'), ('\u{1018a}', '\u{1018b}'), ('\u{102e1}',
-        '\u{102fb}'), ('\u{10320}', '\u{10323}'), ('\u{10858}', '\u{1085f}'),
-        ('\u{10879}', '\u{1087f}'), ('\u{108a7}', '\u{108af}'), ('\u{108fb}',
-        '\u{108ff}'), ('\u{10916}', '\u{1091b}'), ('\u{109bc}', '\u{109bd}'),
-        ('\u{109c0}', '\u{109cf}'), ('\u{109d2}', '\u{109ff}'), ('\u{10a40}',
-        '\u{10a47}'), ('\u{10a7d}', '\u{10a7e}'), ('\u{10a9d}', '\u{10a9f}'),
-        ('\u{10aeb}', '\u{10aef}'), ('\u{10b58}', '\u{10b5f}'), ('\u{10b78}',
-        '\u{10b7f}'), ('\u{10ba9}', '\u{10baf}'), ('\u{10cfa}', '\u{10cff}'),
-        ('\u{10e60}', '\u{10e7e}'), ('\u{11052}', '\u{11065}'), ('\u{111e1}',
-        '\u{111f4}'), ('\u{1173a}', '\u{1173b}'), ('\u{118ea}', '\u{118f2}'),
-        ('\u{16b5b}', '\u{16b61}'), ('\u{1d360}', '\u{1d371}'), ('\u{1e8c7}',
-        '\u{1e8cf}'), ('\u{1f100}', '\u{1f10c}')
-    ];
-
-    pub const P_table: &'static [(char, char)] = &[
-        ('\u{21}', '\u{23}'), ('\u{25}', '\u{2a}'), ('\u{2c}', '\u{2f}'),
-        ('\u{3a}', '\u{3b}'), ('\u{3f}', '\u{40}'), ('\u{5b}', '\u{5d}'),
-        ('\u{5f}', '\u{5f}'), ('\u{7b}', '\u{7b}'), ('\u{7d}', '\u{7d}'),
-        ('\u{a1}', '\u{a1}'), ('\u{a7}', '\u{a7}'), ('\u{ab}', '\u{ab}'),
-        ('\u{b6}', '\u{b7}'), ('\u{bb}', '\u{bb}'), ('\u{bf}', '\u{bf}'),
-        ('\u{37e}', '\u{37e}'), ('\u{387}', '\u{387}'), ('\u{55a}', '\u{55f}'),
-        ('\u{589}', '\u{58a}'), ('\u{5be}', '\u{5be}'), ('\u{5c0}', '\u{5c0}'),
-        ('\u{5c3}', '\u{5c3}'), ('\u{5c6}', '\u{5c6}'), ('\u{5f3}', '\u{5f4}'),
-        ('\u{609}', '\u{60a}'), ('\u{60c}', '\u{60d}'), ('\u{61b}', '\u{61b}'),
-        ('\u{61e}', '\u{61f}'), ('\u{66a}', '\u{66d}'), ('\u{6d4}', '\u{6d4}'),
-        ('\u{700}', '\u{70d}'), ('\u{7f7}', '\u{7f9}'), ('\u{830}', '\u{83e}'),
-        ('\u{85e}', '\u{85e}'), ('\u{964}', '\u{965}'), ('\u{970}', '\u{970}'),
-        ('\u{af0}', '\u{af0}'), ('\u{df4}', '\u{df4}'), ('\u{e4f}', '\u{e4f}'),
-        ('\u{e5a}', '\u{e5b}'), ('\u{f04}', '\u{f12}'), ('\u{f14}', '\u{f14}'),
-        ('\u{f3a}', '\u{f3d}'), ('\u{f85}', '\u{f85}'), ('\u{fd0}', '\u{fd4}'),
-        ('\u{fd9}', '\u{fda}'), ('\u{104a}', '\u{104f}'), ('\u{10fb}',
-        '\u{10fb}'), ('\u{1360}', '\u{1368}'), ('\u{1400}', '\u{1400}'),
-        ('\u{166d}', '\u{166e}'), ('\u{169b}', '\u{169c}'), ('\u{16eb}',
-        '\u{16ed}'), ('\u{1735}', '\u{1736}'), ('\u{17d4}', '\u{17d6}'),
-        ('\u{17d8}', '\u{17da}'), ('\u{1800}', '\u{180a}'), ('\u{1944}',
-        '\u{1945}'), ('\u{1a1e}', '\u{1a1f}'), ('\u{1aa0}', '\u{1aa6}'),
-        ('\u{1aa8}', '\u{1aad}'), ('\u{1b5a}', '\u{1b60}'), ('\u{1bfc}',
-        '\u{1bff}'), ('\u{1c3b}', '\u{1c3f}'), ('\u{1c7e}', '\u{1c7f}'),
-        ('\u{1cc0}', '\u{1cc7}'), ('\u{1cd3}', '\u{1cd3}'), ('\u{2010}',
-        '\u{2027}'), ('\u{2030}', '\u{2043}'), ('\u{2045}', '\u{2051}'),
-        ('\u{2053}', '\u{205e}'), ('\u{207d}', '\u{207e}'), ('\u{208d}',
-        '\u{208e}'), ('\u{2308}', '\u{230b}'), ('\u{2329}', '\u{232a}'),
-        ('\u{2768}', '\u{2775}'), ('\u{27c5}', '\u{27c6}'), ('\u{27e6}',
-        '\u{27ef}'), ('\u{2983}', '\u{2998}'), ('\u{29d8}', '\u{29db}'),
-        ('\u{29fc}', '\u{29fd}'), ('\u{2cf9}', '\u{2cfc}'), ('\u{2cfe}',
-        '\u{2cff}'), ('\u{2d70}', '\u{2d70}'), ('\u{2e00}', '\u{2e2e}'),
-        ('\u{2e30}', '\u{2e42}'), ('\u{3001}', '\u{3003}'), ('\u{3008}',
-        '\u{3011}'), ('\u{3014}', '\u{301f}'), ('\u{3030}', '\u{3030}'),
-        ('\u{303d}', '\u{303d}'), ('\u{30a0}', '\u{30a0}'), ('\u{30fb}',
-        '\u{30fb}'), ('\u{a4fe}', '\u{a4ff}'), ('\u{a60d}', '\u{a60f}'),
-        ('\u{a673}', '\u{a673}'), ('\u{a67e}', '\u{a67e}'), ('\u{a6f2}',
-        '\u{a6f7}'), ('\u{a874}', '\u{a877}'), ('\u{a8ce}', '\u{a8cf}'),
-        ('\u{a8f8}', '\u{a8fa}'), ('\u{a8fc}', '\u{a8fc}'), ('\u{a92e}',
-        '\u{a92f}'), ('\u{a95f}', '\u{a95f}'), ('\u{a9c1}', '\u{a9cd}'),
-        ('\u{a9de}', '\u{a9df}'), ('\u{aa5c}', '\u{aa5f}'), ('\u{aade}',
-        '\u{aadf}'), ('\u{aaf0}', '\u{aaf1}'), ('\u{abeb}', '\u{abeb}'),
-        ('\u{fd3e}', '\u{fd3f}'), ('\u{fe10}', '\u{fe19}'), ('\u{fe30}',
-        '\u{fe52}'), ('\u{fe54}', '\u{fe61}'), ('\u{fe63}', '\u{fe63}'),
-        ('\u{fe68}', '\u{fe68}'), ('\u{fe6a}', '\u{fe6b}'), ('\u{ff01}',
-        '\u{ff03}'), ('\u{ff05}', '\u{ff0a}'), ('\u{ff0c}', '\u{ff0f}'),
-        ('\u{ff1a}', '\u{ff1b}'), ('\u{ff1f}', '\u{ff20}'), ('\u{ff3b}',
-        '\u{ff3d}'), ('\u{ff3f}', '\u{ff3f}'), ('\u{ff5b}', '\u{ff5b}'),
-        ('\u{ff5d}', '\u{ff5d}'), ('\u{ff5f}', '\u{ff65}'), ('\u{10100}',
-        '\u{10102}'), ('\u{1039f}', '\u{1039f}'), ('\u{103d0}', '\u{103d0}'),
-        ('\u{1056f}', '\u{1056f}'), ('\u{10857}', '\u{10857}'), ('\u{1091f}',
-        '\u{1091f}'), ('\u{1093f}', '\u{1093f}'), ('\u{10a50}', '\u{10a58}'),
-        ('\u{10a7f}', '\u{10a7f}'), ('\u{10af0}', '\u{10af6}'), ('\u{10b39}',
-        '\u{10b3f}'), ('\u{10b99}', '\u{10b9c}'), ('\u{11047}', '\u{1104d}'),
-        ('\u{110bb}', '\u{110bc}'), ('\u{110be}', '\u{110c1}'), ('\u{11140}',
-        '\u{11143}'), ('\u{11174}', '\u{11175}'), ('\u{111c5}', '\u{111c9}'),
-        ('\u{111cd}', '\u{111cd}'), ('\u{111db}', '\u{111db}'), ('\u{111dd}',
-        '\u{111df}'), ('\u{11238}', '\u{1123d}'), ('\u{112a9}', '\u{112a9}'),
-        ('\u{114c6}', '\u{114c6}'), ('\u{115c1}', '\u{115d7}'), ('\u{11641}',
-        '\u{11643}'), ('\u{1173c}', '\u{1173e}'), ('\u{12470}', '\u{12474}'),
-        ('\u{16a6e}', '\u{16a6f}'), ('\u{16af5}', '\u{16af5}'), ('\u{16b37}',
-        '\u{16b3b}'), ('\u{16b44}', '\u{16b44}'), ('\u{1bc9f}', '\u{1bc9f}'),
-        ('\u{1da87}', '\u{1da8b}')
-    ];
-
-    pub const Pc_table: &'static [(char, char)] = &[
-        ('\u{5f}', '\u{5f}'), ('\u{203f}', '\u{2040}'), ('\u{2054}',
-        '\u{2054}'), ('\u{fe33}', '\u{fe34}'), ('\u{fe4d}', '\u{fe4f}'),
-        ('\u{ff3f}', '\u{ff3f}')
-    ];
-
-    pub const Pd_table: &'static [(char, char)] = &[
-        ('\u{2d}', '\u{2d}'), ('\u{58a}', '\u{58a}'), ('\u{5be}', '\u{5be}'),
-        ('\u{1400}', '\u{1400}'), ('\u{1806}', '\u{1806}'), ('\u{2010}',
-        '\u{2015}'), ('\u{2e17}', '\u{2e17}'), ('\u{2e1a}', '\u{2e1a}'),
-        ('\u{2e3a}', '\u{2e3b}'), ('\u{2e40}', '\u{2e40}'), ('\u{301c}',
-        '\u{301c}'), ('\u{3030}', '\u{3030}'), ('\u{30a0}', '\u{30a0}'),
-        ('\u{fe31}', '\u{fe32}'), ('\u{fe58}', '\u{fe58}'), ('\u{fe63}',
-        '\u{fe63}'), ('\u{ff0d}', '\u{ff0d}')
-    ];
-
-    pub const Pe_table: &'static [(char, char)] = &[
-        ('\u{29}', '\u{29}'), ('\u{5d}', '\u{5d}'), ('\u{7d}', '\u{7d}'),
-        ('\u{f3b}', '\u{f3b}'), ('\u{f3d}', '\u{f3d}'), ('\u{169c}',
-        '\u{169c}'), ('\u{2046}', '\u{2046}'), ('\u{207e}', '\u{207e}'),
-        ('\u{208e}', '\u{208e}'), ('\u{2309}', '\u{2309}'), ('\u{230b}',
-        '\u{230b}'), ('\u{232a}', '\u{232a}'), ('\u{2769}', '\u{2769}'),
-        ('\u{276b}', '\u{276b}'), ('\u{276d}', '\u{276d}'), ('\u{276f}',
-        '\u{276f}'), ('\u{2771}', '\u{2771}'), ('\u{2773}', '\u{2773}'),
-        ('\u{2775}', '\u{2775}'), ('\u{27c6}', '\u{27c6}'), ('\u{27e7}',
-        '\u{27e7}'), ('\u{27e9}', '\u{27e9}'), ('\u{27eb}', '\u{27eb}'),
-        ('\u{27ed}', '\u{27ed}'), ('\u{27ef}', '\u{27ef}'), ('\u{2984}',
-        '\u{2984}'), ('\u{2986}', '\u{2986}'), ('\u{2988}', '\u{2988}'),
-        ('\u{298a}', '\u{298a}'), ('\u{298c}', '\u{298c}'), ('\u{298e}',
-        '\u{298e}'), ('\u{2990}', '\u{2990}'), ('\u{2992}', '\u{2992}'),
-        ('\u{2994}', '\u{2994}'), ('\u{2996}', '\u{2996}'), ('\u{2998}',
-        '\u{2998}'), ('\u{29d9}', '\u{29d9}'), ('\u{29db}', '\u{29db}'),
-        ('\u{29fd}', '\u{29fd}'), ('\u{2e23}', '\u{2e23}'), ('\u{2e25}',
-        '\u{2e25}'), ('\u{2e27}', '\u{2e27}'), ('\u{2e29}', '\u{2e29}'),
-        ('\u{3009}', '\u{3009}'), ('\u{300b}', '\u{300b}'), ('\u{300d}',
-        '\u{300d}'), ('\u{300f}', '\u{300f}'), ('\u{3011}', '\u{3011}'),
-        ('\u{3015}', '\u{3015}'), ('\u{3017}', '\u{3017}'), ('\u{3019}',
-        '\u{3019}'), ('\u{301b}', '\u{301b}'), ('\u{301e}', '\u{301f}'),
-        ('\u{fd3e}', '\u{fd3e}'), ('\u{fe18}', '\u{fe18}'), ('\u{fe36}',
-        '\u{fe36}'), ('\u{fe38}', '\u{fe38}'), ('\u{fe3a}', '\u{fe3a}'),
-        ('\u{fe3c}', '\u{fe3c}'), ('\u{fe3e}', '\u{fe3e}'), ('\u{fe40}',
-        '\u{fe40}'), ('\u{fe42}', '\u{fe42}'), ('\u{fe44}', '\u{fe44}'),
-        ('\u{fe48}', '\u{fe48}'), ('\u{fe5a}', '\u{fe5a}'), ('\u{fe5c}',
-        '\u{fe5c}'), ('\u{fe5e}', '\u{fe5e}'), ('\u{ff09}', '\u{ff09}'),
-        ('\u{ff3d}', '\u{ff3d}'), ('\u{ff5d}', '\u{ff5d}'), ('\u{ff60}',
-        '\u{ff60}'), ('\u{ff63}', '\u{ff63}')
-    ];
-
-    pub const Pf_table: &'static [(char, char)] = &[
-        ('\u{bb}', '\u{bb}'), ('\u{2019}', '\u{2019}'), ('\u{201d}',
-        '\u{201d}'), ('\u{203a}', '\u{203a}'), ('\u{2e03}', '\u{2e03}'),
-        ('\u{2e05}', '\u{2e05}'), ('\u{2e0a}', '\u{2e0a}'), ('\u{2e0d}',
-        '\u{2e0d}'), ('\u{2e1d}', '\u{2e1d}'), ('\u{2e21}', '\u{2e21}')
-    ];
-
-    pub const Pi_table: &'static [(char, char)] = &[
-        ('\u{ab}', '\u{ab}'), ('\u{2018}', '\u{2018}'), ('\u{201b}',
-        '\u{201c}'), ('\u{201f}', '\u{201f}'), ('\u{2039}', '\u{2039}'),
-        ('\u{2e02}', '\u{2e02}'), ('\u{2e04}', '\u{2e04}'), ('\u{2e09}',
-        '\u{2e09}'), ('\u{2e0c}', '\u{2e0c}'), ('\u{2e1c}', '\u{2e1c}'),
-        ('\u{2e20}', '\u{2e20}')
-    ];
-
-    pub const Po_table: &'static [(char, char)] = &[
-        ('\u{21}', '\u{23}'), ('\u{25}', '\u{27}'), ('\u{2a}', '\u{2a}'),
-        ('\u{2c}', '\u{2c}'), ('\u{2e}', '\u{2f}'), ('\u{3a}', '\u{3b}'),
-        ('\u{3f}', '\u{40}'), ('\u{5c}', '\u{5c}'), ('\u{a1}', '\u{a1}'),
-        ('\u{a7}', '\u{a7}'), ('\u{b6}', '\u{b7}'), ('\u{bf}', '\u{bf}'),
-        ('\u{37e}', '\u{37e}'), ('\u{387}', '\u{387}'), ('\u{55a}', '\u{55f}'),
-        ('\u{589}', '\u{589}'), ('\u{5c0}', '\u{5c0}'), ('\u{5c3}', '\u{5c3}'),
-        ('\u{5c6}', '\u{5c6}'), ('\u{5f3}', '\u{5f4}'), ('\u{609}', '\u{60a}'),
-        ('\u{60c}', '\u{60d}'), ('\u{61b}', '\u{61b}'), ('\u{61e}', '\u{61f}'),
-        ('\u{66a}', '\u{66d}'), ('\u{6d4}', '\u{6d4}'), ('\u{700}', '\u{70d}'),
-        ('\u{7f7}', '\u{7f9}'), ('\u{830}', '\u{83e}'), ('\u{85e}', '\u{85e}'),
-        ('\u{964}', '\u{965}'), ('\u{970}', '\u{970}'), ('\u{af0}', '\u{af0}'),
-        ('\u{df4}', '\u{df4}'), ('\u{e4f}', '\u{e4f}'), ('\u{e5a}', '\u{e5b}'),
-        ('\u{f04}', '\u{f12}'), ('\u{f14}', '\u{f14}'), ('\u{f85}', '\u{f85}'),
-        ('\u{fd0}', '\u{fd4}'), ('\u{fd9}', '\u{fda}'), ('\u{104a}',
-        '\u{104f}'), ('\u{10fb}', '\u{10fb}'), ('\u{1360}', '\u{1368}'),
-        ('\u{166d}', '\u{166e}'), ('\u{16eb}', '\u{16ed}'), ('\u{1735}',
-        '\u{1736}'), ('\u{17d4}', '\u{17d6}'), ('\u{17d8}', '\u{17da}'),
-        ('\u{1800}', '\u{1805}'), ('\u{1807}', '\u{180a}'), ('\u{1944}',
-        '\u{1945}'), ('\u{1a1e}', '\u{1a1f}'), ('\u{1aa0}', '\u{1aa6}'),
-        ('\u{1aa8}', '\u{1aad}'), ('\u{1b5a}', '\u{1b60}'), ('\u{1bfc}',
-        '\u{1bff}'), ('\u{1c3b}', '\u{1c3f}'), ('\u{1c7e}', '\u{1c7f}'),
-        ('\u{1cc0}', '\u{1cc7}'), ('\u{1cd3}', '\u{1cd3}'), ('\u{2016}',
-        '\u{2017}'), ('\u{2020}', '\u{2027}'), ('\u{2030}', '\u{2038}'),
-        ('\u{203b}', '\u{203e}'), ('\u{2041}', '\u{2043}'), ('\u{2047}',
-        '\u{2051}'), ('\u{2053}', '\u{2053}'), ('\u{2055}', '\u{205e}'),
-        ('\u{2cf9}', '\u{2cfc}'), ('\u{2cfe}', '\u{2cff}'), ('\u{2d70}',
-        '\u{2d70}'), ('\u{2e00}', '\u{2e01}'), ('\u{2e06}', '\u{2e08}'),
-        ('\u{2e0b}', '\u{2e0b}'), ('\u{2e0e}', '\u{2e16}'), ('\u{2e18}',
-        '\u{2e19}'), ('\u{2e1b}', '\u{2e1b}'), ('\u{2e1e}', '\u{2e1f}'),
-        ('\u{2e2a}', '\u{2e2e}'), ('\u{2e30}', '\u{2e39}'), ('\u{2e3c}',
-        '\u{2e3f}'), ('\u{2e41}', '\u{2e41}'), ('\u{3001}', '\u{3003}'),
-        ('\u{303d}', '\u{303d}'), ('\u{30fb}', '\u{30fb}'), ('\u{a4fe}',
-        '\u{a4ff}'), ('\u{a60d}', '\u{a60f}'), ('\u{a673}', '\u{a673}'),
-        ('\u{a67e}', '\u{a67e}'), ('\u{a6f2}', '\u{a6f7}'), ('\u{a874}',
-        '\u{a877}'), ('\u{a8ce}', '\u{a8cf}'), ('\u{a8f8}', '\u{a8fa}'),
-        ('\u{a8fc}', '\u{a8fc}'), ('\u{a92e}', '\u{a92f}'), ('\u{a95f}',
-        '\u{a95f}'), ('\u{a9c1}', '\u{a9cd}'), ('\u{a9de}', '\u{a9df}'),
-        ('\u{aa5c}', '\u{aa5f}'), ('\u{aade}', '\u{aadf}'), ('\u{aaf0}',
-        '\u{aaf1}'), ('\u{abeb}', '\u{abeb}'), ('\u{fe10}', '\u{fe16}'),
-        ('\u{fe19}', '\u{fe19}'), ('\u{fe30}', '\u{fe30}'), ('\u{fe45}',
-        '\u{fe46}'), ('\u{fe49}', '\u{fe4c}'), ('\u{fe50}', '\u{fe52}'),
-        ('\u{fe54}', '\u{fe57}'), ('\u{fe5f}', '\u{fe61}'), ('\u{fe68}',
-        '\u{fe68}'), ('\u{fe6a}', '\u{fe6b}'), ('\u{ff01}', '\u{ff03}'),
-        ('\u{ff05}', '\u{ff07}'), ('\u{ff0a}', '\u{ff0a}'), ('\u{ff0c}',
-        '\u{ff0c}'), ('\u{ff0e}', '\u{ff0f}'), ('\u{ff1a}', '\u{ff1b}'),
-        ('\u{ff1f}', '\u{ff20}'), ('\u{ff3c}', '\u{ff3c}'), ('\u{ff61}',
-        '\u{ff61}'), ('\u{ff64}', '\u{ff65}'), ('\u{10100}', '\u{10102}'),
-        ('\u{1039f}', '\u{1039f}'), ('\u{103d0}', '\u{103d0}'), ('\u{1056f}',
-        '\u{1056f}'), ('\u{10857}', '\u{10857}'), ('\u{1091f}', '\u{1091f}'),
-        ('\u{1093f}', '\u{1093f}'), ('\u{10a50}', '\u{10a58}'), ('\u{10a7f}',
-        '\u{10a7f}'), ('\u{10af0}', '\u{10af6}'), ('\u{10b39}', '\u{10b3f}'),
-        ('\u{10b99}', '\u{10b9c}'), ('\u{11047}', '\u{1104d}'), ('\u{110bb}',
-        '\u{110bc}'), ('\u{110be}', '\u{110c1}'), ('\u{11140}', '\u{11143}'),
-        ('\u{11174}', '\u{11175}'), ('\u{111c5}', '\u{111c9}'), ('\u{111cd}',
-        '\u{111cd}'), ('\u{111db}', '\u{111db}'), ('\u{111dd}', '\u{111df}'),
-        ('\u{11238}', '\u{1123d}'), ('\u{112a9}', '\u{112a9}'), ('\u{114c6}',
-        '\u{114c6}'), ('\u{115c1}', '\u{115d7}'), ('\u{11641}', '\u{11643}'),
-        ('\u{1173c}', '\u{1173e}'), ('\u{12470}', '\u{12474}'), ('\u{16a6e}',
-        '\u{16a6f}'), ('\u{16af5}', '\u{16af5}'), ('\u{16b37}', '\u{16b3b}'),
-        ('\u{16b44}', '\u{16b44}'), ('\u{1bc9f}', '\u{1bc9f}'), ('\u{1da87}',
-        '\u{1da8b}')
-    ];
-
-    pub const Ps_table: &'static [(char, char)] = &[
-        ('\u{28}', '\u{28}'), ('\u{5b}', '\u{5b}'), ('\u{7b}', '\u{7b}'),
-        ('\u{f3a}', '\u{f3a}'), ('\u{f3c}', '\u{f3c}'), ('\u{169b}',
-        '\u{169b}'), ('\u{201a}', '\u{201a}'), ('\u{201e}', '\u{201e}'),
-        ('\u{2045}', '\u{2045}'), ('\u{207d}', '\u{207d}'), ('\u{208d}',
-        '\u{208d}'), ('\u{2308}', '\u{2308}'), ('\u{230a}', '\u{230a}'),
-        ('\u{2329}', '\u{2329}'), ('\u{2768}', '\u{2768}'), ('\u{276a}',
-        '\u{276a}'), ('\u{276c}', '\u{276c}'), ('\u{276e}', '\u{276e}'),
-        ('\u{2770}', '\u{2770}'), ('\u{2772}', '\u{2772}'), ('\u{2774}',
-        '\u{2774}'), ('\u{27c5}', '\u{27c5}'), ('\u{27e6}', '\u{27e6}'),
-        ('\u{27e8}', '\u{27e8}'), ('\u{27ea}', '\u{27ea}'), ('\u{27ec}',
-        '\u{27ec}'), ('\u{27ee}', '\u{27ee}'), ('\u{2983}', '\u{2983}'),
-        ('\u{2985}', '\u{2985}'), ('\u{2987}', '\u{2987}'), ('\u{2989}',
-        '\u{2989}'), ('\u{298b}', '\u{298b}'), ('\u{298d}', '\u{298d}'),
-        ('\u{298f}', '\u{298f}'), ('\u{2991}', '\u{2991}'), ('\u{2993}',
-        '\u{2993}'), ('\u{2995}', '\u{2995}'), ('\u{2997}', '\u{2997}'),
-        ('\u{29d8}', '\u{29d8}'), ('\u{29da}', '\u{29da}'), ('\u{29fc}',
-        '\u{29fc}'), ('\u{2e22}', '\u{2e22}'), ('\u{2e24}', '\u{2e24}'),
-        ('\u{2e26}', '\u{2e26}'), ('\u{2e28}', '\u{2e28}'), ('\u{2e42}',
-        '\u{2e42}'), ('\u{3008}', '\u{3008}'), ('\u{300a}', '\u{300a}'),
-        ('\u{300c}', '\u{300c}'), ('\u{300e}', '\u{300e}'), ('\u{3010}',
-        '\u{3010}'), ('\u{3014}', '\u{3014}'), ('\u{3016}', '\u{3016}'),
-        ('\u{3018}', '\u{3018}'), ('\u{301a}', '\u{301a}'), ('\u{301d}',
-        '\u{301d}'), ('\u{fd3f}', '\u{fd3f}'), ('\u{fe17}', '\u{fe17}'),
-        ('\u{fe35}', '\u{fe35}'), ('\u{fe37}', '\u{fe37}'), ('\u{fe39}',
-        '\u{fe39}'), ('\u{fe3b}', '\u{fe3b}'), ('\u{fe3d}', '\u{fe3d}'),
-        ('\u{fe3f}', '\u{fe3f}'), ('\u{fe41}', '\u{fe41}'), ('\u{fe43}',
-        '\u{fe43}'), ('\u{fe47}', '\u{fe47}'), ('\u{fe59}', '\u{fe59}'),
-        ('\u{fe5b}', '\u{fe5b}'), ('\u{fe5d}', '\u{fe5d}'), ('\u{ff08}',
-        '\u{ff08}'), ('\u{ff3b}', '\u{ff3b}'), ('\u{ff5b}', '\u{ff5b}'),
-        ('\u{ff5f}', '\u{ff5f}'), ('\u{ff62}', '\u{ff62}')
-    ];
-
-    pub const S_table: &'static [(char, char)] = &[
-        ('\u{24}', '\u{24}'), ('\u{2b}', '\u{2b}'), ('\u{3c}', '\u{3e}'),
-        ('\u{5e}', '\u{5e}'), ('\u{60}', '\u{60}'), ('\u{7c}', '\u{7c}'),
-        ('\u{7e}', '\u{7e}'), ('\u{a2}', '\u{a6}'), ('\u{a8}', '\u{a9}'),
-        ('\u{ac}', '\u{ac}'), ('\u{ae}', '\u{b1}'), ('\u{b4}', '\u{b4}'),
-        ('\u{b8}', '\u{b8}'), ('\u{d7}', '\u{d7}'), ('\u{f7}', '\u{f7}'),
-        ('\u{2c2}', '\u{2c5}'), ('\u{2d2}', '\u{2df}'), ('\u{2e5}', '\u{2eb}'),
-        ('\u{2ed}', '\u{2ed}'), ('\u{2ef}', '\u{2ff}'), ('\u{375}', '\u{375}'),
-        ('\u{384}', '\u{385}'), ('\u{3f6}', '\u{3f6}'), ('\u{482}', '\u{482}'),
-        ('\u{58d}', '\u{58f}'), ('\u{606}', '\u{608}'), ('\u{60b}', '\u{60b}'),
-        ('\u{60e}', '\u{60f}'), ('\u{6de}', '\u{6de}'), ('\u{6e9}', '\u{6e9}'),
-        ('\u{6fd}', '\u{6fe}'), ('\u{7f6}', '\u{7f6}'), ('\u{9f2}', '\u{9f3}'),
-        ('\u{9fa}', '\u{9fb}'), ('\u{af1}', '\u{af1}'), ('\u{b70}', '\u{b70}'),
-        ('\u{bf3}', '\u{bfa}'), ('\u{c7f}', '\u{c7f}'), ('\u{d79}', '\u{d79}'),
-        ('\u{e3f}', '\u{e3f}'), ('\u{f01}', '\u{f03}'), ('\u{f13}', '\u{f13}'),
-        ('\u{f15}', '\u{f17}'), ('\u{f1a}', '\u{f1f}'), ('\u{f34}', '\u{f34}'),
-        ('\u{f36}', '\u{f36}'), ('\u{f38}', '\u{f38}'), ('\u{fbe}', '\u{fc5}'),
-        ('\u{fc7}', '\u{fcc}'), ('\u{fce}', '\u{fcf}'), ('\u{fd5}', '\u{fd8}'),
-        ('\u{109e}', '\u{109f}'), ('\u{1390}', '\u{1399}'), ('\u{17db}',
-        '\u{17db}'), ('\u{1940}', '\u{1940}'), ('\u{19de}', '\u{19ff}'),
-        ('\u{1b61}', '\u{1b6a}'), ('\u{1b74}', '\u{1b7c}'), ('\u{1fbd}',
-        '\u{1fbd}'), ('\u{1fbf}', '\u{1fc1}'), ('\u{1fcd}', '\u{1fcf}'),
-        ('\u{1fdd}', '\u{1fdf}'), ('\u{1fed}', '\u{1fef}'), ('\u{1ffd}',
-        '\u{1ffe}'), ('\u{2044}', '\u{2044}'), ('\u{2052}', '\u{2052}'),
-        ('\u{207a}', '\u{207c}'), ('\u{208a}', '\u{208c}'), ('\u{20a0}',
-        '\u{20be}'), ('\u{2100}', '\u{2101}'), ('\u{2103}', '\u{2106}'),
-        ('\u{2108}', '\u{2109}'), ('\u{2114}', '\u{2114}'), ('\u{2116}',
-        '\u{2118}'), ('\u{211e}', '\u{2123}'), ('\u{2125}', '\u{2125}'),
-        ('\u{2127}', '\u{2127}'), ('\u{2129}', '\u{2129}'), ('\u{212e}',
-        '\u{212e}'), ('\u{213a}', '\u{213b}'), ('\u{2140}', '\u{2144}'),
-        ('\u{214a}', '\u{214d}'), ('\u{214f}', '\u{214f}'), ('\u{218a}',
-        '\u{218b}'), ('\u{2190}', '\u{2307}'), ('\u{230c}', '\u{2328}'),
-        ('\u{232b}', '\u{23fa}'), ('\u{2400}', '\u{2426}'), ('\u{2440}',
-        '\u{244a}'), ('\u{249c}', '\u{24e9}'), ('\u{2500}', '\u{2767}'),
-        ('\u{2794}', '\u{27c4}'), ('\u{27c7}', '\u{27e5}'), ('\u{27f0}',
-        '\u{2982}'), ('\u{2999}', '\u{29d7}'), ('\u{29dc}', '\u{29fb}'),
-        ('\u{29fe}', '\u{2b73}'), ('\u{2b76}', '\u{2b95}'), ('\u{2b98}',
-        '\u{2bb9}'), ('\u{2bbd}', '\u{2bc8}'), ('\u{2bca}', '\u{2bd1}'),
-        ('\u{2bec}', '\u{2bef}'), ('\u{2ce5}', '\u{2cea}'), ('\u{2e80}',
-        '\u{2e99}'), ('\u{2e9b}', '\u{2ef3}'), ('\u{2f00}', '\u{2fd5}'),
-        ('\u{2ff0}', '\u{2ffb}'), ('\u{3004}', '\u{3004}'), ('\u{3012}',
-        '\u{3013}'), ('\u{3020}', '\u{3020}'), ('\u{3036}', '\u{3037}'),
-        ('\u{303e}', '\u{303f}'), ('\u{309b}', '\u{309c}'), ('\u{3190}',
-        '\u{3191}'), ('\u{3196}', '\u{319f}'), ('\u{31c0}', '\u{31e3}'),
-        ('\u{3200}', '\u{321e}'), ('\u{322a}', '\u{3247}'), ('\u{3250}',
-        '\u{3250}'), ('\u{3260}', '\u{327f}'), ('\u{328a}', '\u{32b0}'),
-        ('\u{32c0}', '\u{32fe}'), ('\u{3300}', '\u{33ff}'), ('\u{4dc0}',
-        '\u{4dff}'), ('\u{a490}', '\u{a4c6}'), ('\u{a700}', '\u{a716}'),
-        ('\u{a720}', '\u{a721}'), ('\u{a789}', '\u{a78a}'), ('\u{a828}',
-        '\u{a82b}'), ('\u{a836}', '\u{a839}'), ('\u{aa77}', '\u{aa79}'),
-        ('\u{ab5b}', '\u{ab5b}'), ('\u{fb29}', '\u{fb29}'), ('\u{fbb2}',
-        '\u{fbc1}'), ('\u{fdfc}', '\u{fdfd}'), ('\u{fe62}', '\u{fe62}'),
-        ('\u{fe64}', '\u{fe66}'), ('\u{fe69}', '\u{fe69}'), ('\u{ff04}',
-        '\u{ff04}'), ('\u{ff0b}', '\u{ff0b}'), ('\u{ff1c}', '\u{ff1e}'),
-        ('\u{ff3e}', '\u{ff3e}'), ('\u{ff40}', '\u{ff40}'), ('\u{ff5c}',
-        '\u{ff5c}'), ('\u{ff5e}', '\u{ff5e}'), ('\u{ffe0}', '\u{ffe6}'),
-        ('\u{ffe8}', '\u{ffee}'), ('\u{fffc}', '\u{fffd}'), ('\u{10137}',
-        '\u{1013f}'), ('\u{10179}', '\u{10189}'), ('\u{1018c}', '\u{1018c}'),
-        ('\u{10190}', '\u{1019b}'), ('\u{101a0}', '\u{101a0}'), ('\u{101d0}',
-        '\u{101fc}'), ('\u{10877}', '\u{10878}'), ('\u{10ac8}', '\u{10ac8}'),
-        ('\u{1173f}', '\u{1173f}'), ('\u{16b3c}', '\u{16b3f}'), ('\u{16b45}',
-        '\u{16b45}'), ('\u{1bc9c}', '\u{1bc9c}'), ('\u{1d000}', '\u{1d0f5}'),
-        ('\u{1d100}', '\u{1d126}'), ('\u{1d129}', '\u{1d164}'), ('\u{1d16a}',
-        '\u{1d16c}'), ('\u{1d183}', '\u{1d184}'), ('\u{1d18c}', '\u{1d1a9}'),
-        ('\u{1d1ae}', '\u{1d1e8}'), ('\u{1d200}', '\u{1d241}'), ('\u{1d245}',
-        '\u{1d245}'), ('\u{1d300}', '\u{1d356}'), ('\u{1d6c1}', '\u{1d6c1}'),
-        ('\u{1d6db}', '\u{1d6db}'), ('\u{1d6fb}', '\u{1d6fb}'), ('\u{1d715}',
-        '\u{1d715}'), ('\u{1d735}', '\u{1d735}'), ('\u{1d74f}', '\u{1d74f}'),
-        ('\u{1d76f}', '\u{1d76f}'), ('\u{1d789}', '\u{1d789}'), ('\u{1d7a9}',
-        '\u{1d7a9}'), ('\u{1d7c3}', '\u{1d7c3}'), ('\u{1d800}', '\u{1d9ff}'),
-        ('\u{1da37}', '\u{1da3a}'), ('\u{1da6d}', '\u{1da74}'), ('\u{1da76}',
-        '\u{1da83}'), ('\u{1da85}', '\u{1da86}'), ('\u{1eef0}', '\u{1eef1}'),
-        ('\u{1f000}', '\u{1f02b}'), ('\u{1f030}', '\u{1f093}'), ('\u{1f0a0}',
-        '\u{1f0ae}'), ('\u{1f0b1}', '\u{1f0bf}'), ('\u{1f0c1}', '\u{1f0cf}'),
-        ('\u{1f0d1}', '\u{1f0f5}'), ('\u{1f110}', '\u{1f12e}'), ('\u{1f130}',
-        '\u{1f16b}'), ('\u{1f170}', '\u{1f19a}'), ('\u{1f1e6}', '\u{1f202}'),
-        ('\u{1f210}', '\u{1f23a}'), ('\u{1f240}', '\u{1f248}'), ('\u{1f250}',
-        '\u{1f251}'), ('\u{1f300}', '\u{1f579}'), ('\u{1f57b}', '\u{1f5a3}'),
-        ('\u{1f5a5}', '\u{1f6d0}'), ('\u{1f6e0}', '\u{1f6ec}'), ('\u{1f6f0}',
-        '\u{1f6f3}'), ('\u{1f700}', '\u{1f773}'), ('\u{1f780}', '\u{1f7d4}'),
-        ('\u{1f800}', '\u{1f80b}'), ('\u{1f810}', '\u{1f847}'), ('\u{1f850}',
-        '\u{1f859}'), ('\u{1f860}', '\u{1f887}'), ('\u{1f890}', '\u{1f8ad}'),
-        ('\u{1f910}', '\u{1f918}'), ('\u{1f980}', '\u{1f984}'), ('\u{1f9c0}',
-        '\u{1f9c0}')
-    ];
-
-    pub const Sc_table: &'static [(char, char)] = &[
-        ('\u{24}', '\u{24}'), ('\u{a2}', '\u{a5}'), ('\u{58f}', '\u{58f}'),
-        ('\u{60b}', '\u{60b}'), ('\u{9f2}', '\u{9f3}'), ('\u{9fb}', '\u{9fb}'),
-        ('\u{af1}', '\u{af1}'), ('\u{bf9}', '\u{bf9}'), ('\u{e3f}', '\u{e3f}'),
-        ('\u{17db}', '\u{17db}'), ('\u{20a0}', '\u{20be}'), ('\u{a838}',
-        '\u{a838}'), ('\u{fdfc}', '\u{fdfc}'), ('\u{fe69}', '\u{fe69}'),
-        ('\u{ff04}', '\u{ff04}'), ('\u{ffe0}', '\u{ffe1}'), ('\u{ffe5}',
-        '\u{ffe6}')
-    ];
-
-    pub const Sk_table: &'static [(char, char)] = &[
-        ('\u{5e}', '\u{5e}'), ('\u{60}', '\u{60}'), ('\u{a8}', '\u{a8}'),
-        ('\u{af}', '\u{af}'), ('\u{b4}', '\u{b4}'), ('\u{b8}', '\u{b8}'),
-        ('\u{2c2}', '\u{2c5}'), ('\u{2d2}', '\u{2df}'), ('\u{2e5}', '\u{2eb}'),
-        ('\u{2ed}', '\u{2ed}'), ('\u{2ef}', '\u{2ff}'), ('\u{375}', '\u{375}'),
-        ('\u{384}', '\u{385}'), ('\u{1fbd}', '\u{1fbd}'), ('\u{1fbf}',
-        '\u{1fc1}'), ('\u{1fcd}', '\u{1fcf}'), ('\u{1fdd}', '\u{1fdf}'),
-        ('\u{1fed}', '\u{1fef}'), ('\u{1ffd}', '\u{1ffe}'), ('\u{309b}',
-        '\u{309c}'), ('\u{a700}', '\u{a716}'), ('\u{a720}', '\u{a721}'),
-        ('\u{a789}', '\u{a78a}'), ('\u{ab5b}', '\u{ab5b}'), ('\u{fbb2}',
-        '\u{fbc1}'), ('\u{ff3e}', '\u{ff3e}'), ('\u{ff40}', '\u{ff40}'),
-        ('\u{ffe3}', '\u{ffe3}'), ('\u{1f3fb}', '\u{1f3ff}')
-    ];
-
-    pub const Sm_table: &'static [(char, char)] = &[
-        ('\u{2b}', '\u{2b}'), ('\u{3c}', '\u{3e}'), ('\u{7c}', '\u{7c}'),
-        ('\u{7e}', '\u{7e}'), ('\u{ac}', '\u{ac}'), ('\u{b1}', '\u{b1}'),
-        ('\u{d7}', '\u{d7}'), ('\u{f7}', '\u{f7}'), ('\u{3f6}', '\u{3f6}'),
-        ('\u{606}', '\u{608}'), ('\u{2044}', '\u{2044}'), ('\u{2052}',
-        '\u{2052}'), ('\u{207a}', '\u{207c}'), ('\u{208a}', '\u{208c}'),
-        ('\u{2118}', '\u{2118}'), ('\u{2140}', '\u{2144}'), ('\u{214b}',
-        '\u{214b}'), ('\u{2190}', '\u{2194}'), ('\u{219a}', '\u{219b}'),
-        ('\u{21a0}', '\u{21a0}'), ('\u{21a3}', '\u{21a3}'), ('\u{21a6}',
-        '\u{21a6}'), ('\u{21ae}', '\u{21ae}'), ('\u{21ce}', '\u{21cf}'),
-        ('\u{21d2}', '\u{21d2}'), ('\u{21d4}', '\u{21d4}'), ('\u{21f4}',
-        '\u{22ff}'), ('\u{2320}', '\u{2321}'), ('\u{237c}', '\u{237c}'),
-        ('\u{239b}', '\u{23b3}'), ('\u{23dc}', '\u{23e1}'), ('\u{25b7}',
-        '\u{25b7}'), ('\u{25c1}', '\u{25c1}'), ('\u{25f8}', '\u{25ff}'),
-        ('\u{266f}', '\u{266f}'), ('\u{27c0}', '\u{27c4}'), ('\u{27c7}',
-        '\u{27e5}'), ('\u{27f0}', '\u{27ff}'), ('\u{2900}', '\u{2982}'),
-        ('\u{2999}', '\u{29d7}'), ('\u{29dc}', '\u{29fb}'), ('\u{29fe}',
-        '\u{2aff}'), ('\u{2b30}', '\u{2b44}'), ('\u{2b47}', '\u{2b4c}'),
-        ('\u{fb29}', '\u{fb29}'), ('\u{fe62}', '\u{fe62}'), ('\u{fe64}',
-        '\u{fe66}'), ('\u{ff0b}', '\u{ff0b}'), ('\u{ff1c}', '\u{ff1e}'),
-        ('\u{ff5c}', '\u{ff5c}'), ('\u{ff5e}', '\u{ff5e}'), ('\u{ffe2}',
-        '\u{ffe2}'), ('\u{ffe9}', '\u{ffec}'), ('\u{1d6c1}', '\u{1d6c1}'),
-        ('\u{1d6db}', '\u{1d6db}'), ('\u{1d6fb}', '\u{1d6fb}'), ('\u{1d715}',
-        '\u{1d715}'), ('\u{1d735}', '\u{1d735}'), ('\u{1d74f}', '\u{1d74f}'),
-        ('\u{1d76f}', '\u{1d76f}'), ('\u{1d789}', '\u{1d789}'), ('\u{1d7a9}',
-        '\u{1d7a9}'), ('\u{1d7c3}', '\u{1d7c3}'), ('\u{1eef0}', '\u{1eef1}')
-    ];
-
-    pub const So_table: &'static [(char, char)] = &[
-        ('\u{a6}', '\u{a6}'), ('\u{a9}', '\u{a9}'), ('\u{ae}', '\u{ae}'),
-        ('\u{b0}', '\u{b0}'), ('\u{482}', '\u{482}'), ('\u{58d}', '\u{58e}'),
-        ('\u{60e}', '\u{60f}'), ('\u{6de}', '\u{6de}'), ('\u{6e9}', '\u{6e9}'),
-        ('\u{6fd}', '\u{6fe}'), ('\u{7f6}', '\u{7f6}'), ('\u{9fa}', '\u{9fa}'),
-        ('\u{b70}', '\u{b70}'), ('\u{bf3}', '\u{bf8}'), ('\u{bfa}', '\u{bfa}'),
-        ('\u{c7f}', '\u{c7f}'), ('\u{d79}', '\u{d79}'), ('\u{f01}', '\u{f03}'),
-        ('\u{f13}', '\u{f13}'), ('\u{f15}', '\u{f17}'), ('\u{f1a}', '\u{f1f}'),
-        ('\u{f34}', '\u{f34}'), ('\u{f36}', '\u{f36}'), ('\u{f38}', '\u{f38}'),
-        ('\u{fbe}', '\u{fc5}'), ('\u{fc7}', '\u{fcc}'), ('\u{fce}', '\u{fcf}'),
-        ('\u{fd5}', '\u{fd8}'), ('\u{109e}', '\u{109f}'), ('\u{1390}',
-        '\u{1399}'), ('\u{1940}', '\u{1940}'), ('\u{19de}', '\u{19ff}'),
-        ('\u{1b61}', '\u{1b6a}'), ('\u{1b74}', '\u{1b7c}'), ('\u{2100}',
-        '\u{2101}'), ('\u{2103}', '\u{2106}'), ('\u{2108}', '\u{2109}'),
-        ('\u{2114}', '\u{2114}'), ('\u{2116}', '\u{2117}'), ('\u{211e}',
-        '\u{2123}'), ('\u{2125}', '\u{2125}'), ('\u{2127}', '\u{2127}'),
-        ('\u{2129}', '\u{2129}'), ('\u{212e}', '\u{212e}'), ('\u{213a}',
-        '\u{213b}'), ('\u{214a}', '\u{214a}'), ('\u{214c}', '\u{214d}'),
-        ('\u{214f}', '\u{214f}'), ('\u{218a}', '\u{218b}'), ('\u{2195}',
-        '\u{2199}'), ('\u{219c}', '\u{219f}'), ('\u{21a1}', '\u{21a2}'),
-        ('\u{21a4}', '\u{21a5}'), ('\u{21a7}', '\u{21ad}'), ('\u{21af}',
-        '\u{21cd}'), ('\u{21d0}', '\u{21d1}'), ('\u{21d3}', '\u{21d3}'),
-        ('\u{21d5}', '\u{21f3}'), ('\u{2300}', '\u{2307}'), ('\u{230c}',
-        '\u{231f}'), ('\u{2322}', '\u{2328}'), ('\u{232b}', '\u{237b}'),
-        ('\u{237d}', '\u{239a}'), ('\u{23b4}', '\u{23db}'), ('\u{23e2}',
-        '\u{23fa}'), ('\u{2400}', '\u{2426}'), ('\u{2440}', '\u{244a}'),
-        ('\u{249c}', '\u{24e9}'), ('\u{2500}', '\u{25b6}'), ('\u{25b8}',
-        '\u{25c0}'), ('\u{25c2}', '\u{25f7}'), ('\u{2600}', '\u{266e}'),
-        ('\u{2670}', '\u{2767}'), ('\u{2794}', '\u{27bf}'), ('\u{2800}',
-        '\u{28ff}'), ('\u{2b00}', '\u{2b2f}'), ('\u{2b45}', '\u{2b46}'),
-        ('\u{2b4d}', '\u{2b73}'), ('\u{2b76}', '\u{2b95}'), ('\u{2b98}',
-        '\u{2bb9}'), ('\u{2bbd}', '\u{2bc8}'), ('\u{2bca}', '\u{2bd1}'),
-        ('\u{2bec}', '\u{2bef}'), ('\u{2ce5}', '\u{2cea}'), ('\u{2e80}',
-        '\u{2e99}'), ('\u{2e9b}', '\u{2ef3}'), ('\u{2f00}', '\u{2fd5}'),
-        ('\u{2ff0}', '\u{2ffb}'), ('\u{3004}', '\u{3004}'), ('\u{3012}',
-        '\u{3013}'), ('\u{3020}', '\u{3020}'), ('\u{3036}', '\u{3037}'),
-        ('\u{303e}', '\u{303f}'), ('\u{3190}', '\u{3191}'), ('\u{3196}',
-        '\u{319f}'), ('\u{31c0}', '\u{31e3}'), ('\u{3200}', '\u{321e}'),
-        ('\u{322a}', '\u{3247}'), ('\u{3250}', '\u{3250}'), ('\u{3260}',
-        '\u{327f}'), ('\u{328a}', '\u{32b0}'), ('\u{32c0}', '\u{32fe}'),
-        ('\u{3300}', '\u{33ff}'), ('\u{4dc0}', '\u{4dff}'), ('\u{a490}',
-        '\u{a4c6}'), ('\u{a828}', '\u{a82b}'), ('\u{a836}', '\u{a837}'),
-        ('\u{a839}', '\u{a839}'), ('\u{aa77}', '\u{aa79}'), ('\u{fdfd}',
-        '\u{fdfd}'), ('\u{ffe4}', '\u{ffe4}'), ('\u{ffe8}', '\u{ffe8}'),
-        ('\u{ffed}', '\u{ffee}'), ('\u{fffc}', '\u{fffd}'), ('\u{10137}',
-        '\u{1013f}'), ('\u{10179}', '\u{10189}'), ('\u{1018c}', '\u{1018c}'),
-        ('\u{10190}', '\u{1019b}'), ('\u{101a0}', '\u{101a0}'), ('\u{101d0}',
-        '\u{101fc}'), ('\u{10877}', '\u{10878}'), ('\u{10ac8}', '\u{10ac8}'),
-        ('\u{1173f}', '\u{1173f}'), ('\u{16b3c}', '\u{16b3f}'), ('\u{16b45}',
-        '\u{16b45}'), ('\u{1bc9c}', '\u{1bc9c}'), ('\u{1d000}', '\u{1d0f5}'),
-        ('\u{1d100}', '\u{1d126}'), ('\u{1d129}', '\u{1d164}'), ('\u{1d16a}',
-        '\u{1d16c}'), ('\u{1d183}', '\u{1d184}'), ('\u{1d18c}', '\u{1d1a9}'),
-        ('\u{1d1ae}', '\u{1d1e8}'), ('\u{1d200}', '\u{1d241}'), ('\u{1d245}',
-        '\u{1d245}'), ('\u{1d300}', '\u{1d356}'), ('\u{1d800}', '\u{1d9ff}'),
-        ('\u{1da37}', '\u{1da3a}'), ('\u{1da6d}', '\u{1da74}'), ('\u{1da76}',
-        '\u{1da83}'), ('\u{1da85}', '\u{1da86}'), ('\u{1f000}', '\u{1f02b}'),
-        ('\u{1f030}', '\u{1f093}'), ('\u{1f0a0}', '\u{1f0ae}'), ('\u{1f0b1}',
-        '\u{1f0bf}'), ('\u{1f0c1}', '\u{1f0cf}'), ('\u{1f0d1}', '\u{1f0f5}'),
-        ('\u{1f110}', '\u{1f12e}'), ('\u{1f130}', '\u{1f16b}'), ('\u{1f170}',
-        '\u{1f19a}'), ('\u{1f1e6}', '\u{1f202}'), ('\u{1f210}', '\u{1f23a}'),
-        ('\u{1f240}', '\u{1f248}'), ('\u{1f250}', '\u{1f251}'), ('\u{1f300}',
-        '\u{1f3fa}'), ('\u{1f400}', '\u{1f579}'), ('\u{1f57b}', '\u{1f5a3}'),
-        ('\u{1f5a5}', '\u{1f6d0}'), ('\u{1f6e0}', '\u{1f6ec}'), ('\u{1f6f0}',
-        '\u{1f6f3}'), ('\u{1f700}', '\u{1f773}'), ('\u{1f780}', '\u{1f7d4}'),
-        ('\u{1f800}', '\u{1f80b}'), ('\u{1f810}', '\u{1f847}'), ('\u{1f850}',
-        '\u{1f859}'), ('\u{1f860}', '\u{1f887}'), ('\u{1f890}', '\u{1f8ad}'),
-        ('\u{1f910}', '\u{1f918}'), ('\u{1f980}', '\u{1f984}'), ('\u{1f9c0}',
-        '\u{1f9c0}')
-    ];
-
-    pub const Z_table: &'static [(char, char)] = &[
-        ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'), ('\u{1680}', '\u{1680}'),
-        ('\u{2000}', '\u{200a}'), ('\u{2028}', '\u{2029}'), ('\u{202f}',
-        '\u{202f}'), ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}')
-    ];
-
-    pub const Zl_table: &'static [(char, char)] = &[
-        ('\u{2028}', '\u{2028}')
-    ];
-
-    pub const Zp_table: &'static [(char, char)] = &[
-        ('\u{2029}', '\u{2029}')
-    ];
-
-    pub const Zs_table: &'static [(char, char)] = &[
-        ('\u{20}', '\u{20}'), ('\u{a0}', '\u{a0}'), ('\u{1680}', '\u{1680}'),
-        ('\u{2000}', '\u{200a}'), ('\u{202f}', '\u{202f}'), ('\u{205f}',
-        '\u{205f}'), ('\u{3000}', '\u{3000}')
-    ];
-
-}
-
-pub mod derived_property {
-    pub const Alphabetic_table: &'static [(char, char)] = &[
-        ('\u{41}', '\u{5a}'), ('\u{61}', '\u{7a}'), ('\u{aa}', '\u{aa}'),
-        ('\u{b5}', '\u{b5}'), ('\u{ba}', '\u{ba}'), ('\u{c0}', '\u{d6}'),
-        ('\u{d8}', '\u{f6}'), ('\u{f8}', '\u{2c1}'), ('\u{2c6}', '\u{2d1}'),
-        ('\u{2e0}', '\u{2e4}'), ('\u{2ec}', '\u{2ec}'), ('\u{2ee}', '\u{2ee}'),
-        ('\u{345}', '\u{345}'), ('\u{370}', '\u{374}'), ('\u{376}', '\u{377}'),
-        ('\u{37a}', '\u{37d}'), ('\u{37f}', '\u{37f}'), ('\u{386}', '\u{386}'),
-        ('\u{388}', '\u{38a}'), ('\u{38c}', '\u{38c}'), ('\u{38e}', '\u{3a1}'),
-        ('\u{3a3}', '\u{3f5}'), ('\u{3f7}', '\u{481}'), ('\u{48a}', '\u{52f}'),
-        ('\u{531}', '\u{556}'), ('\u{559}', '\u{559}'), ('\u{561}', '\u{587}'),
-        ('\u{5b0}', '\u{5bd}'), ('\u{5bf}', '\u{5bf}'), ('\u{5c1}', '\u{5c2}'),
-        ('\u{5c4}', '\u{5c5}'), ('\u{5c7}', '\u{5c7}'), ('\u{5d0}', '\u{5ea}'),
-        ('\u{5f0}', '\u{5f2}'), ('\u{610}', '\u{61a}'), ('\u{620}', '\u{657}'),
-        ('\u{659}', '\u{65f}'), ('\u{66e}', '\u{6d3}'), ('\u{6d5}', '\u{6dc}'),
-        ('\u{6e1}', '\u{6e8}'), ('\u{6ed}', '\u{6ef}'), ('\u{6fa}', '\u{6fc}'),
-        ('\u{6ff}', '\u{6ff}'), ('\u{710}', '\u{73f}'), ('\u{74d}', '\u{7b1}'),
-        ('\u{7ca}', '\u{7ea}'), ('\u{7f4}', '\u{7f5}'), ('\u{7fa}', '\u{7fa}'),
-        ('\u{800}', '\u{817}'), ('\u{81a}', '\u{82c}'), ('\u{840}', '\u{858}'),
-        ('\u{8a0}', '\u{8b4}'), ('\u{8e3}', '\u{8e9}'), ('\u{8f0}', '\u{93b}'),
-        ('\u{93d}', '\u{94c}'), ('\u{94e}', '\u{950}'), ('\u{955}', '\u{963}'),
-        ('\u{971}', '\u{983}'), ('\u{985}', '\u{98c}'), ('\u{98f}', '\u{990}'),
-        ('\u{993}', '\u{9a8}'), ('\u{9aa}', '\u{9b0}'), ('\u{9b2}', '\u{9b2}'),
-        ('\u{9b6}', '\u{9b9}'), ('\u{9bd}', '\u{9c4}'), ('\u{9c7}', '\u{9c8}'),
-        ('\u{9cb}', '\u{9cc}'), ('\u{9ce}', '\u{9ce}'), ('\u{9d7}', '\u{9d7}'),
-        ('\u{9dc}', '\u{9dd}'), ('\u{9df}', '\u{9e3}'), ('\u{9f0}', '\u{9f1}'),
-        ('\u{a01}', '\u{a03}'), ('\u{a05}', '\u{a0a}'), ('\u{a0f}', '\u{a10}'),
-        ('\u{a13}', '\u{a28}'), ('\u{a2a}', '\u{a30}'), ('\u{a32}', '\u{a33}'),
-        ('\u{a35}', '\u{a36}'), ('\u{a38}', '\u{a39}'), ('\u{a3e}', '\u{a42}'),
-        ('\u{a47}', '\u{a48}'), ('\u{a4b}', '\u{a4c}'), ('\u{a51}', '\u{a51}'),
-        ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'), ('\u{a70}', '\u{a75}'),
-        ('\u{a81}', '\u{a83}'), ('\u{a85}', '\u{a8d}'), ('\u{a8f}', '\u{a91}'),
-        ('\u{a93}', '\u{aa8}'), ('\u{aaa}', '\u{ab0}'), ('\u{ab2}', '\u{ab3}'),
-        ('\u{ab5}', '\u{ab9}'), ('\u{abd}', '\u{ac5}'), ('\u{ac7}', '\u{ac9}'),
-        ('\u{acb}', '\u{acc}'), ('\u{ad0}', '\u{ad0}'), ('\u{ae0}', '\u{ae3}'),
-        ('\u{af9}', '\u{af9}'), ('\u{b01}', '\u{b03}'), ('\u{b05}', '\u{b0c}'),
-        ('\u{b0f}', '\u{b10}'), ('\u{b13}', '\u{b28}'), ('\u{b2a}', '\u{b30}'),
-        ('\u{b32}', '\u{b33}'), ('\u{b35}', '\u{b39}'), ('\u{b3d}', '\u{b44}'),
-        ('\u{b47}', '\u{b48}'), ('\u{b4b}', '\u{b4c}'), ('\u{b56}', '\u{b57}'),
-        ('\u{b5c}', '\u{b5d}'), ('\u{b5f}', '\u{b63}'), ('\u{b71}', '\u{b71}'),
-        ('\u{b82}', '\u{b83}'), ('\u{b85}', '\u{b8a}'), ('\u{b8e}', '\u{b90}'),
-        ('\u{b92}', '\u{b95}'), ('\u{b99}', '\u{b9a}'), ('\u{b9c}', '\u{b9c}'),
-        ('\u{b9e}', '\u{b9f}'), ('\u{ba3}', '\u{ba4}'), ('\u{ba8}', '\u{baa}'),
-        ('\u{bae}', '\u{bb9}'), ('\u{bbe}', '\u{bc2}'), ('\u{bc6}', '\u{bc8}'),
-        ('\u{bca}', '\u{bcc}'), ('\u{bd0}', '\u{bd0}'), ('\u{bd7}', '\u{bd7}'),
-        ('\u{c00}', '\u{c03}'), ('\u{c05}', '\u{c0c}'), ('\u{c0e}', '\u{c10}'),
-        ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'), ('\u{c3d}', '\u{c44}'),
-        ('\u{c46}', '\u{c48}'), ('\u{c4a}', '\u{c4c}'), ('\u{c55}', '\u{c56}'),
-        ('\u{c58}', '\u{c5a}'), ('\u{c60}', '\u{c63}'), ('\u{c81}', '\u{c83}'),
-        ('\u{c85}', '\u{c8c}'), ('\u{c8e}', '\u{c90}'), ('\u{c92}', '\u{ca8}'),
-        ('\u{caa}', '\u{cb3}'), ('\u{cb5}', '\u{cb9}'), ('\u{cbd}', '\u{cc4}'),
-        ('\u{cc6}', '\u{cc8}'), ('\u{cca}', '\u{ccc}'), ('\u{cd5}', '\u{cd6}'),
-        ('\u{cde}', '\u{cde}'), ('\u{ce0}', '\u{ce3}'), ('\u{cf1}', '\u{cf2}'),
-        ('\u{d01}', '\u{d03}'), ('\u{d05}', '\u{d0c}'), ('\u{d0e}', '\u{d10}'),
-        ('\u{d12}', '\u{d3a}'), ('\u{d3d}', '\u{d44}'), ('\u{d46}', '\u{d48}'),
-        ('\u{d4a}', '\u{d4c}'), ('\u{d4e}', '\u{d4e}'), ('\u{d57}', '\u{d57}'),
-        ('\u{d5f}', '\u{d63}'), ('\u{d7a}', '\u{d7f}'), ('\u{d82}', '\u{d83}'),
-        ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'), ('\u{db3}', '\u{dbb}'),
-        ('\u{dbd}', '\u{dbd}'), ('\u{dc0}', '\u{dc6}'), ('\u{dcf}', '\u{dd4}'),
-        ('\u{dd6}', '\u{dd6}'), ('\u{dd8}', '\u{ddf}'), ('\u{df2}', '\u{df3}'),
-        ('\u{e01}', '\u{e3a}'), ('\u{e40}', '\u{e46}'), ('\u{e4d}', '\u{e4d}'),
-        ('\u{e81}', '\u{e82}'), ('\u{e84}', '\u{e84}'), ('\u{e87}', '\u{e88}'),
-        ('\u{e8a}', '\u{e8a}'), ('\u{e8d}', '\u{e8d}'), ('\u{e94}', '\u{e97}'),
-        ('\u{e99}', '\u{e9f}'), ('\u{ea1}', '\u{ea3}'), ('\u{ea5}', '\u{ea5}'),
-        ('\u{ea7}', '\u{ea7}'), ('\u{eaa}', '\u{eab}'), ('\u{ead}', '\u{eb9}'),
-        ('\u{ebb}', '\u{ebd}'), ('\u{ec0}', '\u{ec4}'), ('\u{ec6}', '\u{ec6}'),
-        ('\u{ecd}', '\u{ecd}'), ('\u{edc}', '\u{edf}'), ('\u{f00}', '\u{f00}'),
-        ('\u{f40}', '\u{f47}'), ('\u{f49}', '\u{f6c}'), ('\u{f71}', '\u{f81}'),
-        ('\u{f88}', '\u{f97}'), ('\u{f99}', '\u{fbc}'), ('\u{1000}',
-        '\u{1036}'), ('\u{1038}', '\u{1038}'), ('\u{103b}', '\u{103f}'),
-        ('\u{1050}', '\u{1062}'), ('\u{1065}', '\u{1068}'), ('\u{106e}',
-        '\u{1086}'), ('\u{108e}', '\u{108e}'), ('\u{109c}', '\u{109d}'),
-        ('\u{10a0}', '\u{10c5}'), ('\u{10c7}', '\u{10c7}'), ('\u{10cd}',
-        '\u{10cd}'), ('\u{10d0}', '\u{10fa}'), ('\u{10fc}', '\u{1248}'),
-        ('\u{124a}', '\u{124d}'), ('\u{1250}', '\u{1256}'), ('\u{1258}',
-        '\u{1258}'), ('\u{125a}', '\u{125d}'), ('\u{1260}', '\u{1288}'),
-        ('\u{128a}', '\u{128d}'), ('\u{1290}', '\u{12b0}'), ('\u{12b2}',
-        '\u{12b5}'), ('\u{12b8}', '\u{12be}'), ('\u{12c0}', '\u{12c0}'),
-        ('\u{12c2}', '\u{12c5}'), ('\u{12c8}', '\u{12d6}'), ('\u{12d8}',
-        '\u{1310}'), ('\u{1312}', '\u{1315}'), ('\u{1318}', '\u{135a}'),
-        ('\u{135f}', '\u{135f}'), ('\u{1380}', '\u{138f}'), ('\u{13a0}',
-        '\u{13f5}'), ('\u{13f8}', '\u{13fd}'), ('\u{1401}', '\u{166c}'),
-        ('\u{166f}', '\u{167f}'), ('\u{1681}', '\u{169a}'), ('\u{16a0}',
-        '\u{16ea}'), ('\u{16ee}', '\u{16f8}'), ('\u{1700}', '\u{170c}'),
-        ('\u{170e}', '\u{1713}'), ('\u{1720}', '\u{1733}'), ('\u{1740}',
-        '\u{1753}'), ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'),
-        ('\u{1772}', '\u{1773}'), ('\u{1780}', '\u{17b3}'), ('\u{17b6}',
-        '\u{17c8}'), ('\u{17d7}', '\u{17d7}'), ('\u{17dc}', '\u{17dc}'),
-        ('\u{1820}', '\u{1877}'), ('\u{1880}', '\u{18aa}'), ('\u{18b0}',
-        '\u{18f5}'), ('\u{1900}', '\u{191e}'), ('\u{1920}', '\u{192b}'),
-        ('\u{1930}', '\u{1938}'), ('\u{1950}', '\u{196d}'), ('\u{1970}',
-        '\u{1974}'), ('\u{1980}', '\u{19ab}'), ('\u{19b0}', '\u{19c9}'),
-        ('\u{1a00}', '\u{1a1b}'), ('\u{1a20}', '\u{1a5e}'), ('\u{1a61}',
-        '\u{1a74}'), ('\u{1aa7}', '\u{1aa7}'), ('\u{1b00}', '\u{1b33}'),
-        ('\u{1b35}', '\u{1b43}'), ('\u{1b45}', '\u{1b4b}'), ('\u{1b80}',
-        '\u{1ba9}'), ('\u{1bac}', '\u{1baf}'), ('\u{1bba}', '\u{1be5}'),
-        ('\u{1be7}', '\u{1bf1}'), ('\u{1c00}', '\u{1c35}'), ('\u{1c4d}',
-        '\u{1c4f}'), ('\u{1c5a}', '\u{1c7d}'), ('\u{1ce9}', '\u{1cec}'),
-        ('\u{1cee}', '\u{1cf3}'), ('\u{1cf5}', '\u{1cf6}'), ('\u{1d00}',
-        '\u{1dbf}'), ('\u{1de7}', '\u{1df4}'), ('\u{1e00}', '\u{1f15}'),
-        ('\u{1f18}', '\u{1f1d}'), ('\u{1f20}', '\u{1f45}'), ('\u{1f48}',
-        '\u{1f4d}'), ('\u{1f50}', '\u{1f57}'), ('\u{1f59}', '\u{1f59}'),
-        ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'), ('\u{1f5f}',
-        '\u{1f7d}'), ('\u{1f80}', '\u{1fb4}'), ('\u{1fb6}', '\u{1fbc}'),
-        ('\u{1fbe}', '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'), ('\u{1fc6}',
-        '\u{1fcc}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}', '\u{1fdb}'),
-        ('\u{1fe0}', '\u{1fec}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}',
-        '\u{1ffc}'), ('\u{2071}', '\u{2071}'), ('\u{207f}', '\u{207f}'),
-        ('\u{2090}', '\u{209c}'), ('\u{2102}', '\u{2102}'), ('\u{2107}',
-        '\u{2107}'), ('\u{210a}', '\u{2113}'), ('\u{2115}', '\u{2115}'),
-        ('\u{2119}', '\u{211d}'), ('\u{2124}', '\u{2124}'), ('\u{2126}',
-        '\u{2126}'), ('\u{2128}', '\u{2128}'), ('\u{212a}', '\u{212d}'),
-        ('\u{212f}', '\u{2139}'), ('\u{213c}', '\u{213f}'), ('\u{2145}',
-        '\u{2149}'), ('\u{214e}', '\u{214e}'), ('\u{2160}', '\u{2188}'),
-        ('\u{24b6}', '\u{24e9}'), ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}',
-        '\u{2c5e}'), ('\u{2c60}', '\u{2ce4}'), ('\u{2ceb}', '\u{2cee}'),
-        ('\u{2cf2}', '\u{2cf3}'), ('\u{2d00}', '\u{2d25}'), ('\u{2d27}',
-        '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}'), ('\u{2d30}', '\u{2d67}'),
-        ('\u{2d6f}', '\u{2d6f}'), ('\u{2d80}', '\u{2d96}'), ('\u{2da0}',
-        '\u{2da6}'), ('\u{2da8}', '\u{2dae}'), ('\u{2db0}', '\u{2db6}'),
-        ('\u{2db8}', '\u{2dbe}'), ('\u{2dc0}', '\u{2dc6}'), ('\u{2dc8}',
-        '\u{2dce}'), ('\u{2dd0}', '\u{2dd6}'), ('\u{2dd8}', '\u{2dde}'),
-        ('\u{2de0}', '\u{2dff}'), ('\u{2e2f}', '\u{2e2f}'), ('\u{3005}',
-        '\u{3007}'), ('\u{3021}', '\u{3029}'), ('\u{3031}', '\u{3035}'),
-        ('\u{3038}', '\u{303c}'), ('\u{3041}', '\u{3096}'), ('\u{309d}',
-        '\u{309f}'), ('\u{30a1}', '\u{30fa}'), ('\u{30fc}', '\u{30ff}'),
-        ('\u{3105}', '\u{312d}'), ('\u{3131}', '\u{318e}'), ('\u{31a0}',
-        '\u{31ba}'), ('\u{31f0}', '\u{31ff}'), ('\u{3400}', '\u{4db5}'),
-        ('\u{4e00}', '\u{9fd5}'), ('\u{a000}', '\u{a48c}'), ('\u{a4d0}',
-        '\u{a4fd}'), ('\u{a500}', '\u{a60c}'), ('\u{a610}', '\u{a61f}'),
-        ('\u{a62a}', '\u{a62b}'), ('\u{a640}', '\u{a66e}'), ('\u{a674}',
-        '\u{a67b}'), ('\u{a67f}', '\u{a6ef}'), ('\u{a717}', '\u{a71f}'),
-        ('\u{a722}', '\u{a788}'), ('\u{a78b}', '\u{a7ad}'), ('\u{a7b0}',
-        '\u{a7b7}'), ('\u{a7f7}', '\u{a801}'), ('\u{a803}', '\u{a805}'),
-        ('\u{a807}', '\u{a80a}'), ('\u{a80c}', '\u{a827}'), ('\u{a840}',
-        '\u{a873}'), ('\u{a880}', '\u{a8c3}'), ('\u{a8f2}', '\u{a8f7}'),
-        ('\u{a8fb}', '\u{a8fb}'), ('\u{a8fd}', '\u{a8fd}'), ('\u{a90a}',
-        '\u{a92a}'), ('\u{a930}', '\u{a952}'), ('\u{a960}', '\u{a97c}'),
-        ('\u{a980}', '\u{a9b2}'), ('\u{a9b4}', '\u{a9bf}'), ('\u{a9cf}',
-        '\u{a9cf}'), ('\u{a9e0}', '\u{a9e4}'), ('\u{a9e6}', '\u{a9ef}'),
-        ('\u{a9fa}', '\u{a9fe}'), ('\u{aa00}', '\u{aa36}'), ('\u{aa40}',
-        '\u{aa4d}'), ('\u{aa60}', '\u{aa76}'), ('\u{aa7a}', '\u{aa7a}'),
-        ('\u{aa7e}', '\u{aabe}'), ('\u{aac0}', '\u{aac0}'), ('\u{aac2}',
-        '\u{aac2}'), ('\u{aadb}', '\u{aadd}'), ('\u{aae0}', '\u{aaef}'),
-        ('\u{aaf2}', '\u{aaf5}'), ('\u{ab01}', '\u{ab06}'), ('\u{ab09}',
-        '\u{ab0e}'), ('\u{ab11}', '\u{ab16}'), ('\u{ab20}', '\u{ab26}'),
-        ('\u{ab28}', '\u{ab2e}'), ('\u{ab30}', '\u{ab5a}'), ('\u{ab5c}',
-        '\u{ab65}'), ('\u{ab70}', '\u{abea}'), ('\u{ac00}', '\u{d7a3}'),
-        ('\u{d7b0}', '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'), ('\u{f900}',
-        '\u{fa6d}'), ('\u{fa70}', '\u{fad9}'), ('\u{fb00}', '\u{fb06}'),
-        ('\u{fb13}', '\u{fb17}'), ('\u{fb1d}', '\u{fb28}'), ('\u{fb2a}',
-        '\u{fb36}'), ('\u{fb38}', '\u{fb3c}'), ('\u{fb3e}', '\u{fb3e}'),
-        ('\u{fb40}', '\u{fb41}'), ('\u{fb43}', '\u{fb44}'), ('\u{fb46}',
-        '\u{fbb1}'), ('\u{fbd3}', '\u{fd3d}'), ('\u{fd50}', '\u{fd8f}'),
-        ('\u{fd92}', '\u{fdc7}'), ('\u{fdf0}', '\u{fdfb}'), ('\u{fe70}',
-        '\u{fe74}'), ('\u{fe76}', '\u{fefc}'), ('\u{ff21}', '\u{ff3a}'),
-        ('\u{ff41}', '\u{ff5a}'), ('\u{ff66}', '\u{ffbe}'), ('\u{ffc2}',
-        '\u{ffc7}'), ('\u{ffca}', '\u{ffcf}'), ('\u{ffd2}', '\u{ffd7}'),
-        ('\u{ffda}', '\u{ffdc}'), ('\u{10000}', '\u{1000b}'), ('\u{1000d}',
-        '\u{10026}'), ('\u{10028}', '\u{1003a}'), ('\u{1003c}', '\u{1003d}'),
-        ('\u{1003f}', '\u{1004d}'), ('\u{10050}', '\u{1005d}'), ('\u{10080}',
-        '\u{100fa}'), ('\u{10140}', '\u{10174}'), ('\u{10280}', '\u{1029c}'),
-        ('\u{102a0}', '\u{102d0}'), ('\u{10300}', '\u{1031f}'), ('\u{10330}',
-        '\u{1034a}'), ('\u{10350}', '\u{1037a}'), ('\u{10380}', '\u{1039d}'),
-        ('\u{103a0}', '\u{103c3}'), ('\u{103c8}', '\u{103cf}'), ('\u{103d1}',
-        '\u{103d5}'), ('\u{10400}', '\u{1049d}'), ('\u{10500}', '\u{10527}'),
-        ('\u{10530}', '\u{10563}'), ('\u{10600}', '\u{10736}'), ('\u{10740}',
-        '\u{10755}'), ('\u{10760}', '\u{10767}'), ('\u{10800}', '\u{10805}'),
-        ('\u{10808}', '\u{10808}'), ('\u{1080a}', '\u{10835}'), ('\u{10837}',
-        '\u{10838}'), ('\u{1083c}', '\u{1083c}'), ('\u{1083f}', '\u{10855}'),
-        ('\u{10860}', '\u{10876}'), ('\u{10880}', '\u{1089e}'), ('\u{108e0}',
-        '\u{108f2}'), ('\u{108f4}', '\u{108f5}'), ('\u{10900}', '\u{10915}'),
-        ('\u{10920}', '\u{10939}'), ('\u{10980}', '\u{109b7}'), ('\u{109be}',
-        '\u{109bf}'), ('\u{10a00}', '\u{10a03}'), ('\u{10a05}', '\u{10a06}'),
-        ('\u{10a0c}', '\u{10a13}'), ('\u{10a15}', '\u{10a17}'), ('\u{10a19}',
-        '\u{10a33}'), ('\u{10a60}', '\u{10a7c}'), ('\u{10a80}', '\u{10a9c}'),
-        ('\u{10ac0}', '\u{10ac7}'), ('\u{10ac9}', '\u{10ae4}'), ('\u{10b00}',
-        '\u{10b35}'), ('\u{10b40}', '\u{10b55}'), ('\u{10b60}', '\u{10b72}'),
-        ('\u{10b80}', '\u{10b91}'), ('\u{10c00}', '\u{10c48}'), ('\u{10c80}',
-        '\u{10cb2}'), ('\u{10cc0}', '\u{10cf2}'), ('\u{11000}', '\u{11045}'),
-        ('\u{11082}', '\u{110b8}'), ('\u{110d0}', '\u{110e8}'), ('\u{11100}',
-        '\u{11132}'), ('\u{11150}', '\u{11172}'), ('\u{11176}', '\u{11176}'),
-        ('\u{11180}', '\u{111bf}'), ('\u{111c1}', '\u{111c4}'), ('\u{111da}',
-        '\u{111da}'), ('\u{111dc}', '\u{111dc}'), ('\u{11200}', '\u{11211}'),
-        ('\u{11213}', '\u{11234}'), ('\u{11237}', '\u{11237}'), ('\u{11280}',
-        '\u{11286}'), ('\u{11288}', '\u{11288}'), ('\u{1128a}', '\u{1128d}'),
-        ('\u{1128f}', '\u{1129d}'), ('\u{1129f}', '\u{112a8}'), ('\u{112b0}',
-        '\u{112e8}'), ('\u{11300}', '\u{11303}'), ('\u{11305}', '\u{1130c}'),
-        ('\u{1130f}', '\u{11310}'), ('\u{11313}', '\u{11328}'), ('\u{1132a}',
-        '\u{11330}'), ('\u{11332}', '\u{11333}'), ('\u{11335}', '\u{11339}'),
-        ('\u{1133d}', '\u{11344}'), ('\u{11347}', '\u{11348}'), ('\u{1134b}',
-        '\u{1134c}'), ('\u{11350}', '\u{11350}'), ('\u{11357}', '\u{11357}'),
-        ('\u{1135d}', '\u{11363}'), ('\u{11480}', '\u{114c1}'), ('\u{114c4}',
-        '\u{114c5}'), ('\u{114c7}', '\u{114c7}'), ('\u{11580}', '\u{115b5}'),
-        ('\u{115b8}', '\u{115be}'), ('\u{115d8}', '\u{115dd}'), ('\u{11600}',
-        '\u{1163e}'), ('\u{11640}', '\u{11640}'), ('\u{11644}', '\u{11644}'),
-        ('\u{11680}', '\u{116b5}'), ('\u{11700}', '\u{11719}'), ('\u{1171d}',
-        '\u{1172a}'), ('\u{118a0}', '\u{118df}'), ('\u{118ff}', '\u{118ff}'),
-        ('\u{11ac0}', '\u{11af8}'), ('\u{12000}', '\u{12399}'), ('\u{12400}',
-        '\u{1246e}'), ('\u{12480}', '\u{12543}'), ('\u{13000}', '\u{1342e}'),
-        ('\u{14400}', '\u{14646}'), ('\u{16800}', '\u{16a38}'), ('\u{16a40}',
-        '\u{16a5e}'), ('\u{16ad0}', '\u{16aed}'), ('\u{16b00}', '\u{16b36}'),
-        ('\u{16b40}', '\u{16b43}'), ('\u{16b63}', '\u{16b77}'), ('\u{16b7d}',
-        '\u{16b8f}'), ('\u{16f00}', '\u{16f44}'), ('\u{16f50}', '\u{16f7e}'),
-        ('\u{16f93}', '\u{16f9f}'), ('\u{1b000}', '\u{1b001}'), ('\u{1bc00}',
-        '\u{1bc6a}'), ('\u{1bc70}', '\u{1bc7c}'), ('\u{1bc80}', '\u{1bc88}'),
-        ('\u{1bc90}', '\u{1bc99}'), ('\u{1bc9e}', '\u{1bc9e}'), ('\u{1d400}',
-        '\u{1d454}'), ('\u{1d456}', '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'),
-        ('\u{1d4a2}', '\u{1d4a2}'), ('\u{1d4a5}', '\u{1d4a6}'), ('\u{1d4a9}',
-        '\u{1d4ac}'), ('\u{1d4ae}', '\u{1d4b9}'), ('\u{1d4bb}', '\u{1d4bb}'),
-        ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d505}'), ('\u{1d507}',
-        '\u{1d50a}'), ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'),
-        ('\u{1d51e}', '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}',
-        '\u{1d544}'), ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'),
-        ('\u{1d552}', '\u{1d6a5}'), ('\u{1d6a8}', '\u{1d6c0}'), ('\u{1d6c2}',
-        '\u{1d6da}'), ('\u{1d6dc}', '\u{1d6fa}'), ('\u{1d6fc}', '\u{1d714}'),
-        ('\u{1d716}', '\u{1d734}'), ('\u{1d736}', '\u{1d74e}'), ('\u{1d750}',
-        '\u{1d76e}'), ('\u{1d770}', '\u{1d788}'), ('\u{1d78a}', '\u{1d7a8}'),
-        ('\u{1d7aa}', '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7cb}'), ('\u{1e800}',
-        '\u{1e8c4}'), ('\u{1ee00}', '\u{1ee03}'), ('\u{1ee05}', '\u{1ee1f}'),
-        ('\u{1ee21}', '\u{1ee22}'), ('\u{1ee24}', '\u{1ee24}'), ('\u{1ee27}',
-        '\u{1ee27}'), ('\u{1ee29}', '\u{1ee32}'), ('\u{1ee34}', '\u{1ee37}'),
-        ('\u{1ee39}', '\u{1ee39}'), ('\u{1ee3b}', '\u{1ee3b}'), ('\u{1ee42}',
-        '\u{1ee42}'), ('\u{1ee47}', '\u{1ee47}'), ('\u{1ee49}', '\u{1ee49}'),
-        ('\u{1ee4b}', '\u{1ee4b}'), ('\u{1ee4d}', '\u{1ee4f}'), ('\u{1ee51}',
-        '\u{1ee52}'), ('\u{1ee54}', '\u{1ee54}'), ('\u{1ee57}', '\u{1ee57}'),
-        ('\u{1ee59}', '\u{1ee59}'), ('\u{1ee5b}', '\u{1ee5b}'), ('\u{1ee5d}',
-        '\u{1ee5d}'), ('\u{1ee5f}', '\u{1ee5f}'), ('\u{1ee61}', '\u{1ee62}'),
-        ('\u{1ee64}', '\u{1ee64}'), ('\u{1ee67}', '\u{1ee6a}'), ('\u{1ee6c}',
-        '\u{1ee72}'), ('\u{1ee74}', '\u{1ee77}'), ('\u{1ee79}', '\u{1ee7c}'),
-        ('\u{1ee7e}', '\u{1ee7e}'), ('\u{1ee80}', '\u{1ee89}'), ('\u{1ee8b}',
-        '\u{1ee9b}'), ('\u{1eea1}', '\u{1eea3}'), ('\u{1eea5}', '\u{1eea9}'),
-        ('\u{1eeab}', '\u{1eebb}'), ('\u{1f130}', '\u{1f149}'), ('\u{1f150}',
-        '\u{1f169}'), ('\u{1f170}', '\u{1f189}'), ('\u{20000}', '\u{2a6d6}'),
-        ('\u{2a700}', '\u{2b734}'), ('\u{2b740}', '\u{2b81d}'), ('\u{2b820}',
-        '\u{2cea1}'), ('\u{2f800}', '\u{2fa1d}')
-    ];
-
-    pub const Default_Ignorable_Code_Point_table: &'static [(char, char)] = &[
-        ('\u{ad}', '\u{ad}'), ('\u{34f}', '\u{34f}'), ('\u{61c}', '\u{61c}'),
-        ('\u{115f}', '\u{1160}'), ('\u{17b4}', '\u{17b5}'), ('\u{180b}',
-        '\u{180e}'), ('\u{200b}', '\u{200f}'), ('\u{202a}', '\u{202e}'),
-        ('\u{2060}', '\u{206f}'), ('\u{3164}', '\u{3164}'), ('\u{fe00}',
-        '\u{fe0f}'), ('\u{feff}', '\u{feff}'), ('\u{ffa0}', '\u{ffa0}'),
-        ('\u{fff0}', '\u{fff8}'), ('\u{1bca0}', '\u{1bca3}'), ('\u{1d173}',
-        '\u{1d17a}'), ('\u{e0000}', '\u{e0fff}')
-    ];
-
-    pub const Grapheme_Extend_table: &'static [(char, char)] = &[
-        ('\u{300}', '\u{36f}'), ('\u{483}', '\u{489}'), ('\u{591}', '\u{5bd}'),
-        ('\u{5bf}', '\u{5bf}'), ('\u{5c1}', '\u{5c2}'), ('\u{5c4}', '\u{5c5}'),
-        ('\u{5c7}', '\u{5c7}'), ('\u{610}', '\u{61a}'), ('\u{64b}', '\u{65f}'),
-        ('\u{670}', '\u{670}'), ('\u{6d6}', '\u{6dc}'), ('\u{6df}', '\u{6e4}'),
-        ('\u{6e7}', '\u{6e8}'), ('\u{6ea}', '\u{6ed}'), ('\u{711}', '\u{711}'),
-        ('\u{730}', '\u{74a}'), ('\u{7a6}', '\u{7b0}'), ('\u{7eb}', '\u{7f3}'),
-        ('\u{816}', '\u{819}'), ('\u{81b}', '\u{823}'), ('\u{825}', '\u{827}'),
-        ('\u{829}', '\u{82d}'), ('\u{859}', '\u{85b}'), ('\u{8e3}', '\u{902}'),
-        ('\u{93a}', '\u{93a}'), ('\u{93c}', '\u{93c}'), ('\u{941}', '\u{948}'),
-        ('\u{94d}', '\u{94d}'), ('\u{951}', '\u{957}'), ('\u{962}', '\u{963}'),
-        ('\u{981}', '\u{981}'), ('\u{9bc}', '\u{9bc}'), ('\u{9be}', '\u{9be}'),
-        ('\u{9c1}', '\u{9c4}'), ('\u{9cd}', '\u{9cd}'), ('\u{9d7}', '\u{9d7}'),
-        ('\u{9e2}', '\u{9e3}'), ('\u{a01}', '\u{a02}'), ('\u{a3c}', '\u{a3c}'),
-        ('\u{a41}', '\u{a42}'), ('\u{a47}', '\u{a48}'), ('\u{a4b}', '\u{a4d}'),
-        ('\u{a51}', '\u{a51}'), ('\u{a70}', '\u{a71}'), ('\u{a75}', '\u{a75}'),
-        ('\u{a81}', '\u{a82}'), ('\u{abc}', '\u{abc}'), ('\u{ac1}', '\u{ac5}'),
-        ('\u{ac7}', '\u{ac8}'), ('\u{acd}', '\u{acd}'), ('\u{ae2}', '\u{ae3}'),
-        ('\u{b01}', '\u{b01}'), ('\u{b3c}', '\u{b3c}'), ('\u{b3e}', '\u{b3f}'),
-        ('\u{b41}', '\u{b44}'), ('\u{b4d}', '\u{b4d}'), ('\u{b56}', '\u{b57}'),
-        ('\u{b62}', '\u{b63}'), ('\u{b82}', '\u{b82}'), ('\u{bbe}', '\u{bbe}'),
-        ('\u{bc0}', '\u{bc0}'), ('\u{bcd}', '\u{bcd}'), ('\u{bd7}', '\u{bd7}'),
-        ('\u{c00}', '\u{c00}'), ('\u{c3e}', '\u{c40}'), ('\u{c46}', '\u{c48}'),
-        ('\u{c4a}', '\u{c4d}'), ('\u{c55}', '\u{c56}'), ('\u{c62}', '\u{c63}'),
-        ('\u{c81}', '\u{c81}'), ('\u{cbc}', '\u{cbc}'), ('\u{cbf}', '\u{cbf}'),
-        ('\u{cc2}', '\u{cc2}'), ('\u{cc6}', '\u{cc6}'), ('\u{ccc}', '\u{ccd}'),
-        ('\u{cd5}', '\u{cd6}'), ('\u{ce2}', '\u{ce3}'), ('\u{d01}', '\u{d01}'),
-        ('\u{d3e}', '\u{d3e}'), ('\u{d41}', '\u{d44}'), ('\u{d4d}', '\u{d4d}'),
-        ('\u{d57}', '\u{d57}'), ('\u{d62}', '\u{d63}'), ('\u{dca}', '\u{dca}'),
-        ('\u{dcf}', '\u{dcf}'), ('\u{dd2}', '\u{dd4}'), ('\u{dd6}', '\u{dd6}'),
-        ('\u{ddf}', '\u{ddf}'), ('\u{e31}', '\u{e31}'), ('\u{e34}', '\u{e3a}'),
-        ('\u{e47}', '\u{e4e}'), ('\u{eb1}', '\u{eb1}'), ('\u{eb4}', '\u{eb9}'),
-        ('\u{ebb}', '\u{ebc}'), ('\u{ec8}', '\u{ecd}'), ('\u{f18}', '\u{f19}'),
-        ('\u{f35}', '\u{f35}'), ('\u{f37}', '\u{f37}'), ('\u{f39}', '\u{f39}'),
-        ('\u{f71}', '\u{f7e}'), ('\u{f80}', '\u{f84}'), ('\u{f86}', '\u{f87}'),
-        ('\u{f8d}', '\u{f97}'), ('\u{f99}', '\u{fbc}'), ('\u{fc6}', '\u{fc6}'),
-        ('\u{102d}', '\u{1030}'), ('\u{1032}', '\u{1037}'), ('\u{1039}',
-        '\u{103a}'), ('\u{103d}', '\u{103e}'), ('\u{1058}', '\u{1059}'),
-        ('\u{105e}', '\u{1060}'), ('\u{1071}', '\u{1074}'), ('\u{1082}',
-        '\u{1082}'), ('\u{1085}', '\u{1086}'), ('\u{108d}', '\u{108d}'),
-        ('\u{109d}', '\u{109d}'), ('\u{135d}', '\u{135f}'), ('\u{1712}',
-        '\u{1714}'), ('\u{1732}', '\u{1734}'), ('\u{1752}', '\u{1753}'),
-        ('\u{1772}', '\u{1773}'), ('\u{17b4}', '\u{17b5}'), ('\u{17b7}',
-        '\u{17bd}'), ('\u{17c6}', '\u{17c6}'), ('\u{17c9}', '\u{17d3}'),
-        ('\u{17dd}', '\u{17dd}'), ('\u{180b}', '\u{180d}'), ('\u{18a9}',
-        '\u{18a9}'), ('\u{1920}', '\u{1922}'), ('\u{1927}', '\u{1928}'),
-        ('\u{1932}', '\u{1932}'), ('\u{1939}', '\u{193b}'), ('\u{1a17}',
-        '\u{1a18}'), ('\u{1a1b}', '\u{1a1b}'), ('\u{1a56}', '\u{1a56}'),
-        ('\u{1a58}', '\u{1a5e}'), ('\u{1a60}', '\u{1a60}'), ('\u{1a62}',
-        '\u{1a62}'), ('\u{1a65}', '\u{1a6c}'), ('\u{1a73}', '\u{1a7c}'),
-        ('\u{1a7f}', '\u{1a7f}'), ('\u{1ab0}', '\u{1abe}'), ('\u{1b00}',
-        '\u{1b03}'), ('\u{1b34}', '\u{1b34}'), ('\u{1b36}', '\u{1b3a}'),
-        ('\u{1b3c}', '\u{1b3c}'), ('\u{1b42}', '\u{1b42}'), ('\u{1b6b}',
-        '\u{1b73}'), ('\u{1b80}', '\u{1b81}'), ('\u{1ba2}', '\u{1ba5}'),
-        ('\u{1ba8}', '\u{1ba9}'), ('\u{1bab}', '\u{1bad}'), ('\u{1be6}',
-        '\u{1be6}'), ('\u{1be8}', '\u{1be9}'), ('\u{1bed}', '\u{1bed}'),
-        ('\u{1bef}', '\u{1bf1}'), ('\u{1c2c}', '\u{1c33}'), ('\u{1c36}',
-        '\u{1c37}'), ('\u{1cd0}', '\u{1cd2}'), ('\u{1cd4}', '\u{1ce0}'),
-        ('\u{1ce2}', '\u{1ce8}'), ('\u{1ced}', '\u{1ced}'), ('\u{1cf4}',
-        '\u{1cf4}'), ('\u{1cf8}', '\u{1cf9}'), ('\u{1dc0}', '\u{1df5}'),
-        ('\u{1dfc}', '\u{1dff}'), ('\u{200c}', '\u{200d}'), ('\u{20d0}',
-        '\u{20f0}'), ('\u{2cef}', '\u{2cf1}'), ('\u{2d7f}', '\u{2d7f}'),
-        ('\u{2de0}', '\u{2dff}'), ('\u{302a}', '\u{302f}'), ('\u{3099}',
-        '\u{309a}'), ('\u{a66f}', '\u{a672}'), ('\u{a674}', '\u{a67d}'),
-        ('\u{a69e}', '\u{a69f}'), ('\u{a6f0}', '\u{a6f1}'), ('\u{a802}',
-        '\u{a802}'), ('\u{a806}', '\u{a806}'), ('\u{a80b}', '\u{a80b}'),
-        ('\u{a825}', '\u{a826}'), ('\u{a8c4}', '\u{a8c4}'), ('\u{a8e0}',
-        '\u{a8f1}'), ('\u{a926}', '\u{a92d}'), ('\u{a947}', '\u{a951}'),
-        ('\u{a980}', '\u{a982}'), ('\u{a9b3}', '\u{a9b3}'), ('\u{a9b6}',
-        '\u{a9b9}'), ('\u{a9bc}', '\u{a9bc}'), ('\u{a9e5}', '\u{a9e5}'),
-        ('\u{aa29}', '\u{aa2e}'), ('\u{aa31}', '\u{aa32}'), ('\u{aa35}',
-        '\u{aa36}'), ('\u{aa43}', '\u{aa43}'), ('\u{aa4c}', '\u{aa4c}'),
-        ('\u{aa7c}', '\u{aa7c}'), ('\u{aab0}', '\u{aab0}'), ('\u{aab2}',
-        '\u{aab4}'), ('\u{aab7}', '\u{aab8}'), ('\u{aabe}', '\u{aabf}'),
-        ('\u{aac1}', '\u{aac1}'), ('\u{aaec}', '\u{aaed}'), ('\u{aaf6}',
-        '\u{aaf6}'), ('\u{abe5}', '\u{abe5}'), ('\u{abe8}', '\u{abe8}'),
-        ('\u{abed}', '\u{abed}'), ('\u{fb1e}', '\u{fb1e}'), ('\u{fe00}',
-        '\u{fe0f}'), ('\u{fe20}', '\u{fe2f}'), ('\u{ff9e}', '\u{ff9f}'),
-        ('\u{101fd}', '\u{101fd}'), ('\u{102e0}', '\u{102e0}'), ('\u{10376}',
-        '\u{1037a}'), ('\u{10a01}', '\u{10a03}'), ('\u{10a05}', '\u{10a06}'),
-        ('\u{10a0c}', '\u{10a0f}'), ('\u{10a38}', '\u{10a3a}'), ('\u{10a3f}',
-        '\u{10a3f}'), ('\u{10ae5}', '\u{10ae6}'), ('\u{11001}', '\u{11001}'),
-        ('\u{11038}', '\u{11046}'), ('\u{1107f}', '\u{11081}'), ('\u{110b3}',
-        '\u{110b6}'), ('\u{110b9}', '\u{110ba}'), ('\u{11100}', '\u{11102}'),
-        ('\u{11127}', '\u{1112b}'), ('\u{1112d}', '\u{11134}'), ('\u{11173}',
-        '\u{11173}'), ('\u{11180}', '\u{11181}'), ('\u{111b6}', '\u{111be}'),
-        ('\u{111ca}', '\u{111cc}'), ('\u{1122f}', '\u{11231}'), ('\u{11234}',
-        '\u{11234}'), ('\u{11236}', '\u{11237}'), ('\u{112df}', '\u{112df}'),
-        ('\u{112e3}', '\u{112ea}'), ('\u{11300}', '\u{11301}'), ('\u{1133c}',
-        '\u{1133c}'), ('\u{1133e}', '\u{1133e}'), ('\u{11340}', '\u{11340}'),
-        ('\u{11357}', '\u{11357}'), ('\u{11366}', '\u{1136c}'), ('\u{11370}',
-        '\u{11374}'), ('\u{114b0}', '\u{114b0}'), ('\u{114b3}', '\u{114b8}'),
-        ('\u{114ba}', '\u{114ba}'), ('\u{114bd}', '\u{114bd}'), ('\u{114bf}',
-        '\u{114c0}'), ('\u{114c2}', '\u{114c3}'), ('\u{115af}', '\u{115af}'),
-        ('\u{115b2}', '\u{115b5}'), ('\u{115bc}', '\u{115bd}'), ('\u{115bf}',
-        '\u{115c0}'), ('\u{115dc}', '\u{115dd}'), ('\u{11633}', '\u{1163a}'),
-        ('\u{1163d}', '\u{1163d}'), ('\u{1163f}', '\u{11640}'), ('\u{116ab}',
-        '\u{116ab}'), ('\u{116ad}', '\u{116ad}'), ('\u{116b0}', '\u{116b5}'),
-        ('\u{116b7}', '\u{116b7}'), ('\u{1171d}', '\u{1171f}'), ('\u{11722}',
-        '\u{11725}'), ('\u{11727}', '\u{1172b}'), ('\u{16af0}', '\u{16af4}'),
-        ('\u{16b30}', '\u{16b36}'), ('\u{16f8f}', '\u{16f92}'), ('\u{1bc9d}',
-        '\u{1bc9e}'), ('\u{1d165}', '\u{1d165}'), ('\u{1d167}', '\u{1d169}'),
-        ('\u{1d16e}', '\u{1d172}'), ('\u{1d17b}', '\u{1d182}'), ('\u{1d185}',
-        '\u{1d18b}'), ('\u{1d1aa}', '\u{1d1ad}'), ('\u{1d242}', '\u{1d244}'),
-        ('\u{1da00}', '\u{1da36}'), ('\u{1da3b}', '\u{1da6c}'), ('\u{1da75}',
-        '\u{1da75}'), ('\u{1da84}', '\u{1da84}'), ('\u{1da9b}', '\u{1da9f}'),
-        ('\u{1daa1}', '\u{1daaf}'), ('\u{1e8d0}', '\u{1e8d6}'), ('\u{e0100}',
-        '\u{e01ef}')
-    ];
-
-    pub const Lowercase_table: &'static [(char, char)] = &[
-        ('\u{61}', '\u{7a}'), ('\u{aa}', '\u{aa}'), ('\u{b5}', '\u{b5}'),
-        ('\u{ba}', '\u{ba}'), ('\u{df}', '\u{f6}'), ('\u{f8}', '\u{ff}'),
-        ('\u{101}', '\u{101}'), ('\u{103}', '\u{103}'), ('\u{105}', '\u{105}'),
-        ('\u{107}', '\u{107}'), ('\u{109}', '\u{109}'), ('\u{10b}', '\u{10b}'),
-        ('\u{10d}', '\u{10d}'), ('\u{10f}', '\u{10f}'), ('\u{111}', '\u{111}'),
-        ('\u{113}', '\u{113}'), ('\u{115}', '\u{115}'), ('\u{117}', '\u{117}'),
-        ('\u{119}', '\u{119}'), ('\u{11b}', '\u{11b}'), ('\u{11d}', '\u{11d}'),
-        ('\u{11f}', '\u{11f}'), ('\u{121}', '\u{121}'), ('\u{123}', '\u{123}'),
-        ('\u{125}', '\u{125}'), ('\u{127}', '\u{127}'), ('\u{129}', '\u{129}'),
-        ('\u{12b}', '\u{12b}'), ('\u{12d}', '\u{12d}'), ('\u{12f}', '\u{12f}'),
-        ('\u{131}', '\u{131}'), ('\u{133}', '\u{133}'), ('\u{135}', '\u{135}'),
-        ('\u{137}', '\u{138}'), ('\u{13a}', '\u{13a}'), ('\u{13c}', '\u{13c}'),
-        ('\u{13e}', '\u{13e}'), ('\u{140}', '\u{140}'), ('\u{142}', '\u{142}'),
-        ('\u{144}', '\u{144}'), ('\u{146}', '\u{146}'), ('\u{148}', '\u{149}'),
-        ('\u{14b}', '\u{14b}'), ('\u{14d}', '\u{14d}'), ('\u{14f}', '\u{14f}'),
-        ('\u{151}', '\u{151}'), ('\u{153}', '\u{153}'), ('\u{155}', '\u{155}'),
-        ('\u{157}', '\u{157}'), ('\u{159}', '\u{159}'), ('\u{15b}', '\u{15b}'),
-        ('\u{15d}', '\u{15d}'), ('\u{15f}', '\u{15f}'), ('\u{161}', '\u{161}'),
-        ('\u{163}', '\u{163}'), ('\u{165}', '\u{165}'), ('\u{167}', '\u{167}'),
-        ('\u{169}', '\u{169}'), ('\u{16b}', '\u{16b}'), ('\u{16d}', '\u{16d}'),
-        ('\u{16f}', '\u{16f}'), ('\u{171}', '\u{171}'), ('\u{173}', '\u{173}'),
-        ('\u{175}', '\u{175}'), ('\u{177}', '\u{177}'), ('\u{17a}', '\u{17a}'),
-        ('\u{17c}', '\u{17c}'), ('\u{17e}', '\u{180}'), ('\u{183}', '\u{183}'),
-        ('\u{185}', '\u{185}'), ('\u{188}', '\u{188}'), ('\u{18c}', '\u{18d}'),
-        ('\u{192}', '\u{192}'), ('\u{195}', '\u{195}'), ('\u{199}', '\u{19b}'),
-        ('\u{19e}', '\u{19e}'), ('\u{1a1}', '\u{1a1}'), ('\u{1a3}', '\u{1a3}'),
-        ('\u{1a5}', '\u{1a5}'), ('\u{1a8}', '\u{1a8}'), ('\u{1aa}', '\u{1ab}'),
-        ('\u{1ad}', '\u{1ad}'), ('\u{1b0}', '\u{1b0}'), ('\u{1b4}', '\u{1b4}'),
-        ('\u{1b6}', '\u{1b6}'), ('\u{1b9}', '\u{1ba}'), ('\u{1bd}', '\u{1bf}'),
-        ('\u{1c6}', '\u{1c6}'), ('\u{1c9}', '\u{1c9}'), ('\u{1cc}', '\u{1cc}'),
-        ('\u{1ce}', '\u{1ce}'), ('\u{1d0}', '\u{1d0}'), ('\u{1d2}', '\u{1d2}'),
-        ('\u{1d4}', '\u{1d4}'), ('\u{1d6}', '\u{1d6}'), ('\u{1d8}', '\u{1d8}'),
-        ('\u{1da}', '\u{1da}'), ('\u{1dc}', '\u{1dd}'), ('\u{1df}', '\u{1df}'),
-        ('\u{1e1}', '\u{1e1}'), ('\u{1e3}', '\u{1e3}'), ('\u{1e5}', '\u{1e5}'),
-        ('\u{1e7}', '\u{1e7}'), ('\u{1e9}', '\u{1e9}'), ('\u{1eb}', '\u{1eb}'),
-        ('\u{1ed}', '\u{1ed}'), ('\u{1ef}', '\u{1f0}'), ('\u{1f3}', '\u{1f3}'),
-        ('\u{1f5}', '\u{1f5}'), ('\u{1f9}', '\u{1f9}'), ('\u{1fb}', '\u{1fb}'),
-        ('\u{1fd}', '\u{1fd}'), ('\u{1ff}', '\u{1ff}'), ('\u{201}', '\u{201}'),
-        ('\u{203}', '\u{203}'), ('\u{205}', '\u{205}'), ('\u{207}', '\u{207}'),
-        ('\u{209}', '\u{209}'), ('\u{20b}', '\u{20b}'), ('\u{20d}', '\u{20d}'),
-        ('\u{20f}', '\u{20f}'), ('\u{211}', '\u{211}'), ('\u{213}', '\u{213}'),
-        ('\u{215}', '\u{215}'), ('\u{217}', '\u{217}'), ('\u{219}', '\u{219}'),
-        ('\u{21b}', '\u{21b}'), ('\u{21d}', '\u{21d}'), ('\u{21f}', '\u{21f}'),
-        ('\u{221}', '\u{221}'), ('\u{223}', '\u{223}'), ('\u{225}', '\u{225}'),
-        ('\u{227}', '\u{227}'), ('\u{229}', '\u{229}'), ('\u{22b}', '\u{22b}'),
-        ('\u{22d}', '\u{22d}'), ('\u{22f}', '\u{22f}'), ('\u{231}', '\u{231}'),
-        ('\u{233}', '\u{239}'), ('\u{23c}', '\u{23c}'), ('\u{23f}', '\u{240}'),
-        ('\u{242}', '\u{242}'), ('\u{247}', '\u{247}'), ('\u{249}', '\u{249}'),
-        ('\u{24b}', '\u{24b}'), ('\u{24d}', '\u{24d}'), ('\u{24f}', '\u{293}'),
-        ('\u{295}', '\u{2b8}'), ('\u{2c0}', '\u{2c1}'), ('\u{2e0}', '\u{2e4}'),
-        ('\u{345}', '\u{345}'), ('\u{371}', '\u{371}'), ('\u{373}', '\u{373}'),
-        ('\u{377}', '\u{377}'), ('\u{37a}', '\u{37d}'), ('\u{390}', '\u{390}'),
-        ('\u{3ac}', '\u{3ce}'), ('\u{3d0}', '\u{3d1}'), ('\u{3d5}', '\u{3d7}'),
-        ('\u{3d9}', '\u{3d9}'), ('\u{3db}', '\u{3db}'), ('\u{3dd}', '\u{3dd}'),
-        ('\u{3df}', '\u{3df}'), ('\u{3e1}', '\u{3e1}'), ('\u{3e3}', '\u{3e3}'),
-        ('\u{3e5}', '\u{3e5}'), ('\u{3e7}', '\u{3e7}'), ('\u{3e9}', '\u{3e9}'),
-        ('\u{3eb}', '\u{3eb}'), ('\u{3ed}', '\u{3ed}'), ('\u{3ef}', '\u{3f3}'),
-        ('\u{3f5}', '\u{3f5}'), ('\u{3f8}', '\u{3f8}'), ('\u{3fb}', '\u{3fc}'),
-        ('\u{430}', '\u{45f}'), ('\u{461}', '\u{461}'), ('\u{463}', '\u{463}'),
-        ('\u{465}', '\u{465}'), ('\u{467}', '\u{467}'), ('\u{469}', '\u{469}'),
-        ('\u{46b}', '\u{46b}'), ('\u{46d}', '\u{46d}'), ('\u{46f}', '\u{46f}'),
-        ('\u{471}', '\u{471}'), ('\u{473}', '\u{473}'), ('\u{475}', '\u{475}'),
-        ('\u{477}', '\u{477}'), ('\u{479}', '\u{479}'), ('\u{47b}', '\u{47b}'),
-        ('\u{47d}', '\u{47d}'), ('\u{47f}', '\u{47f}'), ('\u{481}', '\u{481}'),
-        ('\u{48b}', '\u{48b}'), ('\u{48d}', '\u{48d}'), ('\u{48f}', '\u{48f}'),
-        ('\u{491}', '\u{491}'), ('\u{493}', '\u{493}'), ('\u{495}', '\u{495}'),
-        ('\u{497}', '\u{497}'), ('\u{499}', '\u{499}'), ('\u{49b}', '\u{49b}'),
-        ('\u{49d}', '\u{49d}'), ('\u{49f}', '\u{49f}'), ('\u{4a1}', '\u{4a1}'),
-        ('\u{4a3}', '\u{4a3}'), ('\u{4a5}', '\u{4a5}'), ('\u{4a7}', '\u{4a7}'),
-        ('\u{4a9}', '\u{4a9}'), ('\u{4ab}', '\u{4ab}'), ('\u{4ad}', '\u{4ad}'),
-        ('\u{4af}', '\u{4af}'), ('\u{4b1}', '\u{4b1}'), ('\u{4b3}', '\u{4b3}'),
-        ('\u{4b5}', '\u{4b5}'), ('\u{4b7}', '\u{4b7}'), ('\u{4b9}', '\u{4b9}'),
-        ('\u{4bb}', '\u{4bb}'), ('\u{4bd}', '\u{4bd}'), ('\u{4bf}', '\u{4bf}'),
-        ('\u{4c2}', '\u{4c2}'), ('\u{4c4}', '\u{4c4}'), ('\u{4c6}', '\u{4c6}'),
-        ('\u{4c8}', '\u{4c8}'), ('\u{4ca}', '\u{4ca}'), ('\u{4cc}', '\u{4cc}'),
-        ('\u{4ce}', '\u{4cf}'), ('\u{4d1}', '\u{4d1}'), ('\u{4d3}', '\u{4d3}'),
-        ('\u{4d5}', '\u{4d5}'), ('\u{4d7}', '\u{4d7}'), ('\u{4d9}', '\u{4d9}'),
-        ('\u{4db}', '\u{4db}'), ('\u{4dd}', '\u{4dd}'), ('\u{4df}', '\u{4df}'),
-        ('\u{4e1}', '\u{4e1}'), ('\u{4e3}', '\u{4e3}'), ('\u{4e5}', '\u{4e5}'),
-        ('\u{4e7}', '\u{4e7}'), ('\u{4e9}', '\u{4e9}'), ('\u{4eb}', '\u{4eb}'),
-        ('\u{4ed}', '\u{4ed}'), ('\u{4ef}', '\u{4ef}'), ('\u{4f1}', '\u{4f1}'),
-        ('\u{4f3}', '\u{4f3}'), ('\u{4f5}', '\u{4f5}'), ('\u{4f7}', '\u{4f7}'),
-        ('\u{4f9}', '\u{4f9}'), ('\u{4fb}', '\u{4fb}'), ('\u{4fd}', '\u{4fd}'),
-        ('\u{4ff}', '\u{4ff}'), ('\u{501}', '\u{501}'), ('\u{503}', '\u{503}'),
-        ('\u{505}', '\u{505}'), ('\u{507}', '\u{507}'), ('\u{509}', '\u{509}'),
-        ('\u{50b}', '\u{50b}'), ('\u{50d}', '\u{50d}'), ('\u{50f}', '\u{50f}'),
-        ('\u{511}', '\u{511}'), ('\u{513}', '\u{513}'), ('\u{515}', '\u{515}'),
-        ('\u{517}', '\u{517}'), ('\u{519}', '\u{519}'), ('\u{51b}', '\u{51b}'),
-        ('\u{51d}', '\u{51d}'), ('\u{51f}', '\u{51f}'), ('\u{521}', '\u{521}'),
-        ('\u{523}', '\u{523}'), ('\u{525}', '\u{525}'), ('\u{527}', '\u{527}'),
-        ('\u{529}', '\u{529}'), ('\u{52b}', '\u{52b}'), ('\u{52d}', '\u{52d}'),
-        ('\u{52f}', '\u{52f}'), ('\u{561}', '\u{587}'), ('\u{13f8}',
-        '\u{13fd}'), ('\u{1d00}', '\u{1dbf}'), ('\u{1e01}', '\u{1e01}'),
-        ('\u{1e03}', '\u{1e03}'), ('\u{1e05}', '\u{1e05}'), ('\u{1e07}',
-        '\u{1e07}'), ('\u{1e09}', '\u{1e09}'), ('\u{1e0b}', '\u{1e0b}'),
-        ('\u{1e0d}', '\u{1e0d}'), ('\u{1e0f}', '\u{1e0f}'), ('\u{1e11}',
-        '\u{1e11}'), ('\u{1e13}', '\u{1e13}'), ('\u{1e15}', '\u{1e15}'),
-        ('\u{1e17}', '\u{1e17}'), ('\u{1e19}', '\u{1e19}'), ('\u{1e1b}',
-        '\u{1e1b}'), ('\u{1e1d}', '\u{1e1d}'), ('\u{1e1f}', '\u{1e1f}'),
-        ('\u{1e21}', '\u{1e21}'), ('\u{1e23}', '\u{1e23}'), ('\u{1e25}',
-        '\u{1e25}'), ('\u{1e27}', '\u{1e27}'), ('\u{1e29}', '\u{1e29}'),
-        ('\u{1e2b}', '\u{1e2b}'), ('\u{1e2d}', '\u{1e2d}'), ('\u{1e2f}',
-        '\u{1e2f}'), ('\u{1e31}', '\u{1e31}'), ('\u{1e33}', '\u{1e33}'),
-        ('\u{1e35}', '\u{1e35}'), ('\u{1e37}', '\u{1e37}'), ('\u{1e39}',
-        '\u{1e39}'), ('\u{1e3b}', '\u{1e3b}'), ('\u{1e3d}', '\u{1e3d}'),
-        ('\u{1e3f}', '\u{1e3f}'), ('\u{1e41}', '\u{1e41}'), ('\u{1e43}',
-        '\u{1e43}'), ('\u{1e45}', '\u{1e45}'), ('\u{1e47}', '\u{1e47}'),
-        ('\u{1e49}', '\u{1e49}'), ('\u{1e4b}', '\u{1e4b}'), ('\u{1e4d}',
-        '\u{1e4d}'), ('\u{1e4f}', '\u{1e4f}'), ('\u{1e51}', '\u{1e51}'),
-        ('\u{1e53}', '\u{1e53}'), ('\u{1e55}', '\u{1e55}'), ('\u{1e57}',
-        '\u{1e57}'), ('\u{1e59}', '\u{1e59}'), ('\u{1e5b}', '\u{1e5b}'),
-        ('\u{1e5d}', '\u{1e5d}'), ('\u{1e5f}', '\u{1e5f}'), ('\u{1e61}',
-        '\u{1e61}'), ('\u{1e63}', '\u{1e63}'), ('\u{1e65}', '\u{1e65}'),
-        ('\u{1e67}', '\u{1e67}'), ('\u{1e69}', '\u{1e69}'), ('\u{1e6b}',
-        '\u{1e6b}'), ('\u{1e6d}', '\u{1e6d}'), ('\u{1e6f}', '\u{1e6f}'),
-        ('\u{1e71}', '\u{1e71}'), ('\u{1e73}', '\u{1e73}'), ('\u{1e75}',
-        '\u{1e75}'), ('\u{1e77}', '\u{1e77}'), ('\u{1e79}', '\u{1e79}'),
-        ('\u{1e7b}', '\u{1e7b}'), ('\u{1e7d}', '\u{1e7d}'), ('\u{1e7f}',
-        '\u{1e7f}'), ('\u{1e81}', '\u{1e81}'), ('\u{1e83}', '\u{1e83}'),
-        ('\u{1e85}', '\u{1e85}'), ('\u{1e87}', '\u{1e87}'), ('\u{1e89}',
-        '\u{1e89}'), ('\u{1e8b}', '\u{1e8b}'), ('\u{1e8d}', '\u{1e8d}'),
-        ('\u{1e8f}', '\u{1e8f}'), ('\u{1e91}', '\u{1e91}'), ('\u{1e93}',
-        '\u{1e93}'), ('\u{1e95}', '\u{1e9d}'), ('\u{1e9f}', '\u{1e9f}'),
-        ('\u{1ea1}', '\u{1ea1}'), ('\u{1ea3}', '\u{1ea3}'), ('\u{1ea5}',
-        '\u{1ea5}'), ('\u{1ea7}', '\u{1ea7}'), ('\u{1ea9}', '\u{1ea9}'),
-        ('\u{1eab}', '\u{1eab}'), ('\u{1ead}', '\u{1ead}'), ('\u{1eaf}',
-        '\u{1eaf}'), ('\u{1eb1}', '\u{1eb1}'), ('\u{1eb3}', '\u{1eb3}'),
-        ('\u{1eb5}', '\u{1eb5}'), ('\u{1eb7}', '\u{1eb7}'), ('\u{1eb9}',
-        '\u{1eb9}'), ('\u{1ebb}', '\u{1ebb}'), ('\u{1ebd}', '\u{1ebd}'),
-        ('\u{1ebf}', '\u{1ebf}'), ('\u{1ec1}', '\u{1ec1}'), ('\u{1ec3}',
-        '\u{1ec3}'), ('\u{1ec5}', '\u{1ec5}'), ('\u{1ec7}', '\u{1ec7}'),
-        ('\u{1ec9}', '\u{1ec9}'), ('\u{1ecb}', '\u{1ecb}'), ('\u{1ecd}',
-        '\u{1ecd}'), ('\u{1ecf}', '\u{1ecf}'), ('\u{1ed1}', '\u{1ed1}'),
-        ('\u{1ed3}', '\u{1ed3}'), ('\u{1ed5}', '\u{1ed5}'), ('\u{1ed7}',
-        '\u{1ed7}'), ('\u{1ed9}', '\u{1ed9}'), ('\u{1edb}', '\u{1edb}'),
-        ('\u{1edd}', '\u{1edd}'), ('\u{1edf}', '\u{1edf}'), ('\u{1ee1}',
-        '\u{1ee1}'), ('\u{1ee3}', '\u{1ee3}'), ('\u{1ee5}', '\u{1ee5}'),
-        ('\u{1ee7}', '\u{1ee7}'), ('\u{1ee9}', '\u{1ee9}'), ('\u{1eeb}',
-        '\u{1eeb}'), ('\u{1eed}', '\u{1eed}'), ('\u{1eef}', '\u{1eef}'),
-        ('\u{1ef1}', '\u{1ef1}'), ('\u{1ef3}', '\u{1ef3}'), ('\u{1ef5}',
-        '\u{1ef5}'), ('\u{1ef7}', '\u{1ef7}'), ('\u{1ef9}', '\u{1ef9}'),
-        ('\u{1efb}', '\u{1efb}'), ('\u{1efd}', '\u{1efd}'), ('\u{1eff}',
-        '\u{1f07}'), ('\u{1f10}', '\u{1f15}'), ('\u{1f20}', '\u{1f27}'),
-        ('\u{1f30}', '\u{1f37}'), ('\u{1f40}', '\u{1f45}'), ('\u{1f50}',
-        '\u{1f57}'), ('\u{1f60}', '\u{1f67}'), ('\u{1f70}', '\u{1f7d}'),
-        ('\u{1f80}', '\u{1f87}'), ('\u{1f90}', '\u{1f97}'), ('\u{1fa0}',
-        '\u{1fa7}'), ('\u{1fb0}', '\u{1fb4}'), ('\u{1fb6}', '\u{1fb7}'),
-        ('\u{1fbe}', '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'), ('\u{1fc6}',
-        '\u{1fc7}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}', '\u{1fd7}'),
-        ('\u{1fe0}', '\u{1fe7}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}',
-        '\u{1ff7}'), ('\u{2071}', '\u{2071}'), ('\u{207f}', '\u{207f}'),
-        ('\u{2090}', '\u{209c}'), ('\u{210a}', '\u{210a}'), ('\u{210e}',
-        '\u{210f}'), ('\u{2113}', '\u{2113}'), ('\u{212f}', '\u{212f}'),
-        ('\u{2134}', '\u{2134}'), ('\u{2139}', '\u{2139}'), ('\u{213c}',
-        '\u{213d}'), ('\u{2146}', '\u{2149}'), ('\u{214e}', '\u{214e}'),
-        ('\u{2170}', '\u{217f}'), ('\u{2184}', '\u{2184}'), ('\u{24d0}',
-        '\u{24e9}'), ('\u{2c30}', '\u{2c5e}'), ('\u{2c61}', '\u{2c61}'),
-        ('\u{2c65}', '\u{2c66}'), ('\u{2c68}', '\u{2c68}'), ('\u{2c6a}',
-        '\u{2c6a}'), ('\u{2c6c}', '\u{2c6c}'), ('\u{2c71}', '\u{2c71}'),
-        ('\u{2c73}', '\u{2c74}'), ('\u{2c76}', '\u{2c7d}'), ('\u{2c81}',
-        '\u{2c81}'), ('\u{2c83}', '\u{2c83}'), ('\u{2c85}', '\u{2c85}'),
-        ('\u{2c87}', '\u{2c87}'), ('\u{2c89}', '\u{2c89}'), ('\u{2c8b}',
-        '\u{2c8b}'), ('\u{2c8d}', '\u{2c8d}'), ('\u{2c8f}', '\u{2c8f}'),
-        ('\u{2c91}', '\u{2c91}'), ('\u{2c93}', '\u{2c93}'), ('\u{2c95}',
-        '\u{2c95}'), ('\u{2c97}', '\u{2c97}'), ('\u{2c99}', '\u{2c99}'),
-        ('\u{2c9b}', '\u{2c9b}'), ('\u{2c9d}', '\u{2c9d}'), ('\u{2c9f}',
-        '\u{2c9f}'), ('\u{2ca1}', '\u{2ca1}'), ('\u{2ca3}', '\u{2ca3}'),
-        ('\u{2ca5}', '\u{2ca5}'), ('\u{2ca7}', '\u{2ca7}'), ('\u{2ca9}',
-        '\u{2ca9}'), ('\u{2cab}', '\u{2cab}'), ('\u{2cad}', '\u{2cad}'),
-        ('\u{2caf}', '\u{2caf}'), ('\u{2cb1}', '\u{2cb1}'), ('\u{2cb3}',
-        '\u{2cb3}'), ('\u{2cb5}', '\u{2cb5}'), ('\u{2cb7}', '\u{2cb7}'),
-        ('\u{2cb9}', '\u{2cb9}'), ('\u{2cbb}', '\u{2cbb}'), ('\u{2cbd}',
-        '\u{2cbd}'), ('\u{2cbf}', '\u{2cbf}'), ('\u{2cc1}', '\u{2cc1}'),
-        ('\u{2cc3}', '\u{2cc3}'), ('\u{2cc5}', '\u{2cc5}'), ('\u{2cc7}',
-        '\u{2cc7}'), ('\u{2cc9}', '\u{2cc9}'), ('\u{2ccb}', '\u{2ccb}'),
-        ('\u{2ccd}', '\u{2ccd}'), ('\u{2ccf}', '\u{2ccf}'), ('\u{2cd1}',
-        '\u{2cd1}'), ('\u{2cd3}', '\u{2cd3}'), ('\u{2cd5}', '\u{2cd5}'),
-        ('\u{2cd7}', '\u{2cd7}'), ('\u{2cd9}', '\u{2cd9}'), ('\u{2cdb}',
-        '\u{2cdb}'), ('\u{2cdd}', '\u{2cdd}'), ('\u{2cdf}', '\u{2cdf}'),
-        ('\u{2ce1}', '\u{2ce1}'), ('\u{2ce3}', '\u{2ce4}'), ('\u{2cec}',
-        '\u{2cec}'), ('\u{2cee}', '\u{2cee}'), ('\u{2cf3}', '\u{2cf3}'),
-        ('\u{2d00}', '\u{2d25}'), ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}',
-        '\u{2d2d}'), ('\u{a641}', '\u{a641}'), ('\u{a643}', '\u{a643}'),
-        ('\u{a645}', '\u{a645}'), ('\u{a647}', '\u{a647}'), ('\u{a649}',
-        '\u{a649}'), ('\u{a64b}', '\u{a64b}'), ('\u{a64d}', '\u{a64d}'),
-        ('\u{a64f}', '\u{a64f}'), ('\u{a651}', '\u{a651}'), ('\u{a653}',
-        '\u{a653}'), ('\u{a655}', '\u{a655}'), ('\u{a657}', '\u{a657}'),
-        ('\u{a659}', '\u{a659}'), ('\u{a65b}', '\u{a65b}'), ('\u{a65d}',
-        '\u{a65d}'), ('\u{a65f}', '\u{a65f}'), ('\u{a661}', '\u{a661}'),
-        ('\u{a663}', '\u{a663}'), ('\u{a665}', '\u{a665}'), ('\u{a667}',
-        '\u{a667}'), ('\u{a669}', '\u{a669}'), ('\u{a66b}', '\u{a66b}'),
-        ('\u{a66d}', '\u{a66d}'), ('\u{a681}', '\u{a681}'), ('\u{a683}',
-        '\u{a683}'), ('\u{a685}', '\u{a685}'), ('\u{a687}', '\u{a687}'),
-        ('\u{a689}', '\u{a689}'), ('\u{a68b}', '\u{a68b}'), ('\u{a68d}',
-        '\u{a68d}'), ('\u{a68f}', '\u{a68f}'), ('\u{a691}', '\u{a691}'),
-        ('\u{a693}', '\u{a693}'), ('\u{a695}', '\u{a695}'), ('\u{a697}',
-        '\u{a697}'), ('\u{a699}', '\u{a699}'), ('\u{a69b}', '\u{a69d}'),
-        ('\u{a723}', '\u{a723}'), ('\u{a725}', '\u{a725}'), ('\u{a727}',
-        '\u{a727}'), ('\u{a729}', '\u{a729}'), ('\u{a72b}', '\u{a72b}'),
-        ('\u{a72d}', '\u{a72d}'), ('\u{a72f}', '\u{a731}'), ('\u{a733}',
-        '\u{a733}'), ('\u{a735}', '\u{a735}'), ('\u{a737}', '\u{a737}'),
-        ('\u{a739}', '\u{a739}'), ('\u{a73b}', '\u{a73b}'), ('\u{a73d}',
-        '\u{a73d}'), ('\u{a73f}', '\u{a73f}'), ('\u{a741}', '\u{a741}'),
-        ('\u{a743}', '\u{a743}'), ('\u{a745}', '\u{a745}'), ('\u{a747}',
-        '\u{a747}'), ('\u{a749}', '\u{a749}'), ('\u{a74b}', '\u{a74b}'),
-        ('\u{a74d}', '\u{a74d}'), ('\u{a74f}', '\u{a74f}'), ('\u{a751}',
-        '\u{a751}'), ('\u{a753}', '\u{a753}'), ('\u{a755}', '\u{a755}'),
-        ('\u{a757}', '\u{a757}'), ('\u{a759}', '\u{a759}'), ('\u{a75b}',
-        '\u{a75b}'), ('\u{a75d}', '\u{a75d}'), ('\u{a75f}', '\u{a75f}'),
-        ('\u{a761}', '\u{a761}'), ('\u{a763}', '\u{a763}'), ('\u{a765}',
-        '\u{a765}'), ('\u{a767}', '\u{a767}'), ('\u{a769}', '\u{a769}'),
-        ('\u{a76b}', '\u{a76b}'), ('\u{a76d}', '\u{a76d}'), ('\u{a76f}',
-        '\u{a778}'), ('\u{a77a}', '\u{a77a}'), ('\u{a77c}', '\u{a77c}'),
-        ('\u{a77f}', '\u{a77f}'), ('\u{a781}', '\u{a781}'), ('\u{a783}',
-        '\u{a783}'), ('\u{a785}', '\u{a785}'), ('\u{a787}', '\u{a787}'),
-        ('\u{a78c}', '\u{a78c}'), ('\u{a78e}', '\u{a78e}'), ('\u{a791}',
-        '\u{a791}'), ('\u{a793}', '\u{a795}'), ('\u{a797}', '\u{a797}'),
-        ('\u{a799}', '\u{a799}'), ('\u{a79b}', '\u{a79b}'), ('\u{a79d}',
-        '\u{a79d}'), ('\u{a79f}', '\u{a79f}'), ('\u{a7a1}', '\u{a7a1}'),
-        ('\u{a7a3}', '\u{a7a3}'), ('\u{a7a5}', '\u{a7a5}'), ('\u{a7a7}',
-        '\u{a7a7}'), ('\u{a7a9}', '\u{a7a9}'), ('\u{a7b5}', '\u{a7b5}'),
-        ('\u{a7b7}', '\u{a7b7}'), ('\u{a7f8}', '\u{a7fa}'), ('\u{ab30}',
-        '\u{ab5a}'), ('\u{ab5c}', '\u{ab65}'), ('\u{ab70}', '\u{abbf}'),
-        ('\u{fb00}', '\u{fb06}'), ('\u{fb13}', '\u{fb17}'), ('\u{ff41}',
-        '\u{ff5a}'), ('\u{10428}', '\u{1044f}'), ('\u{10cc0}', '\u{10cf2}'),
-        ('\u{118c0}', '\u{118df}'), ('\u{1d41a}', '\u{1d433}'), ('\u{1d44e}',
-        '\u{1d454}'), ('\u{1d456}', '\u{1d467}'), ('\u{1d482}', '\u{1d49b}'),
-        ('\u{1d4b6}', '\u{1d4b9}'), ('\u{1d4bb}', '\u{1d4bb}'), ('\u{1d4bd}',
-        '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d4cf}'), ('\u{1d4ea}', '\u{1d503}'),
-        ('\u{1d51e}', '\u{1d537}'), ('\u{1d552}', '\u{1d56b}'), ('\u{1d586}',
-        '\u{1d59f}'), ('\u{1d5ba}', '\u{1d5d3}'), ('\u{1d5ee}', '\u{1d607}'),
-        ('\u{1d622}', '\u{1d63b}'), ('\u{1d656}', '\u{1d66f}'), ('\u{1d68a}',
-        '\u{1d6a5}'), ('\u{1d6c2}', '\u{1d6da}'), ('\u{1d6dc}', '\u{1d6e1}'),
-        ('\u{1d6fc}', '\u{1d714}'), ('\u{1d716}', '\u{1d71b}'), ('\u{1d736}',
-        '\u{1d74e}'), ('\u{1d750}', '\u{1d755}'), ('\u{1d770}', '\u{1d788}'),
-        ('\u{1d78a}', '\u{1d78f}'), ('\u{1d7aa}', '\u{1d7c2}'), ('\u{1d7c4}',
-        '\u{1d7c9}'), ('\u{1d7cb}', '\u{1d7cb}')
-    ];
-
-    pub const Uppercase_table: &'static [(char, char)] = &[
-        ('\u{41}', '\u{5a}'), ('\u{c0}', '\u{d6}'), ('\u{d8}', '\u{de}'),
-        ('\u{100}', '\u{100}'), ('\u{102}', '\u{102}'), ('\u{104}', '\u{104}'),
-        ('\u{106}', '\u{106}'), ('\u{108}', '\u{108}'), ('\u{10a}', '\u{10a}'),
-        ('\u{10c}', '\u{10c}'), ('\u{10e}', '\u{10e}'), ('\u{110}', '\u{110}'),
-        ('\u{112}', '\u{112}'), ('\u{114}', '\u{114}'), ('\u{116}', '\u{116}'),
-        ('\u{118}', '\u{118}'), ('\u{11a}', '\u{11a}'), ('\u{11c}', '\u{11c}'),
-        ('\u{11e}', '\u{11e}'), ('\u{120}', '\u{120}'), ('\u{122}', '\u{122}'),
-        ('\u{124}', '\u{124}'), ('\u{126}', '\u{126}'), ('\u{128}', '\u{128}'),
-        ('\u{12a}', '\u{12a}'), ('\u{12c}', '\u{12c}'), ('\u{12e}', '\u{12e}'),
-        ('\u{130}', '\u{130}'), ('\u{132}', '\u{132}'), ('\u{134}', '\u{134}'),
-        ('\u{136}', '\u{136}'), ('\u{139}', '\u{139}'), ('\u{13b}', '\u{13b}'),
-        ('\u{13d}', '\u{13d}'), ('\u{13f}', '\u{13f}'), ('\u{141}', '\u{141}'),
-        ('\u{143}', '\u{143}'), ('\u{145}', '\u{145}'), ('\u{147}', '\u{147}'),
-        ('\u{14a}', '\u{14a}'), ('\u{14c}', '\u{14c}'), ('\u{14e}', '\u{14e}'),
-        ('\u{150}', '\u{150}'), ('\u{152}', '\u{152}'), ('\u{154}', '\u{154}'),
-        ('\u{156}', '\u{156}'), ('\u{158}', '\u{158}'), ('\u{15a}', '\u{15a}'),
-        ('\u{15c}', '\u{15c}'), ('\u{15e}', '\u{15e}'), ('\u{160}', '\u{160}'),
-        ('\u{162}', '\u{162}'), ('\u{164}', '\u{164}'), ('\u{166}', '\u{166}'),
-        ('\u{168}', '\u{168}'), ('\u{16a}', '\u{16a}'), ('\u{16c}', '\u{16c}'),
-        ('\u{16e}', '\u{16e}'), ('\u{170}', '\u{170}'), ('\u{172}', '\u{172}'),
-        ('\u{174}', '\u{174}'), ('\u{176}', '\u{176}'), ('\u{178}', '\u{179}'),
-        ('\u{17b}', '\u{17b}'), ('\u{17d}', '\u{17d}'), ('\u{181}', '\u{182}'),
-        ('\u{184}', '\u{184}'), ('\u{186}', '\u{187}'), ('\u{189}', '\u{18b}'),
-        ('\u{18e}', '\u{191}'), ('\u{193}', '\u{194}'), ('\u{196}', '\u{198}'),
-        ('\u{19c}', '\u{19d}'), ('\u{19f}', '\u{1a0}'), ('\u{1a2}', '\u{1a2}'),
-        ('\u{1a4}', '\u{1a4}'), ('\u{1a6}', '\u{1a7}'), ('\u{1a9}', '\u{1a9}'),
-        ('\u{1ac}', '\u{1ac}'), ('\u{1ae}', '\u{1af}'), ('\u{1b1}', '\u{1b3}'),
-        ('\u{1b5}', '\u{1b5}'), ('\u{1b7}', '\u{1b8}'), ('\u{1bc}', '\u{1bc}'),
-        ('\u{1c4}', '\u{1c4}'), ('\u{1c7}', '\u{1c7}'), ('\u{1ca}', '\u{1ca}'),
-        ('\u{1cd}', '\u{1cd}'), ('\u{1cf}', '\u{1cf}'), ('\u{1d1}', '\u{1d1}'),
-        ('\u{1d3}', '\u{1d3}'), ('\u{1d5}', '\u{1d5}'), ('\u{1d7}', '\u{1d7}'),
-        ('\u{1d9}', '\u{1d9}'), ('\u{1db}', '\u{1db}'), ('\u{1de}', '\u{1de}'),
-        ('\u{1e0}', '\u{1e0}'), ('\u{1e2}', '\u{1e2}'), ('\u{1e4}', '\u{1e4}'),
-        ('\u{1e6}', '\u{1e6}'), ('\u{1e8}', '\u{1e8}'), ('\u{1ea}', '\u{1ea}'),
-        ('\u{1ec}', '\u{1ec}'), ('\u{1ee}', '\u{1ee}'), ('\u{1f1}', '\u{1f1}'),
-        ('\u{1f4}', '\u{1f4}'), ('\u{1f6}', '\u{1f8}'), ('\u{1fa}', '\u{1fa}'),
-        ('\u{1fc}', '\u{1fc}'), ('\u{1fe}', '\u{1fe}'), ('\u{200}', '\u{200}'),
-        ('\u{202}', '\u{202}'), ('\u{204}', '\u{204}'), ('\u{206}', '\u{206}'),
-        ('\u{208}', '\u{208}'), ('\u{20a}', '\u{20a}'), ('\u{20c}', '\u{20c}'),
-        ('\u{20e}', '\u{20e}'), ('\u{210}', '\u{210}'), ('\u{212}', '\u{212}'),
-        ('\u{214}', '\u{214}'), ('\u{216}', '\u{216}'), ('\u{218}', '\u{218}'),
-        ('\u{21a}', '\u{21a}'), ('\u{21c}', '\u{21c}'), ('\u{21e}', '\u{21e}'),
-        ('\u{220}', '\u{220}'), ('\u{222}', '\u{222}'), ('\u{224}', '\u{224}'),
-        ('\u{226}', '\u{226}'), ('\u{228}', '\u{228}'), ('\u{22a}', '\u{22a}'),
-        ('\u{22c}', '\u{22c}'), ('\u{22e}', '\u{22e}'), ('\u{230}', '\u{230}'),
-        ('\u{232}', '\u{232}'), ('\u{23a}', '\u{23b}'), ('\u{23d}', '\u{23e}'),
-        ('\u{241}', '\u{241}'), ('\u{243}', '\u{246}'), ('\u{248}', '\u{248}'),
-        ('\u{24a}', '\u{24a}'), ('\u{24c}', '\u{24c}'), ('\u{24e}', '\u{24e}'),
-        ('\u{370}', '\u{370}'), ('\u{372}', '\u{372}'), ('\u{376}', '\u{376}'),
-        ('\u{37f}', '\u{37f}'), ('\u{386}', '\u{386}'), ('\u{388}', '\u{38a}'),
-        ('\u{38c}', '\u{38c}'), ('\u{38e}', '\u{38f}'), ('\u{391}', '\u{3a1}'),
-        ('\u{3a3}', '\u{3ab}'), ('\u{3cf}', '\u{3cf}'), ('\u{3d2}', '\u{3d4}'),
-        ('\u{3d8}', '\u{3d8}'), ('\u{3da}', '\u{3da}'), ('\u{3dc}', '\u{3dc}'),
-        ('\u{3de}', '\u{3de}'), ('\u{3e0}', '\u{3e0}'), ('\u{3e2}', '\u{3e2}'),
-        ('\u{3e4}', '\u{3e4}'), ('\u{3e6}', '\u{3e6}'), ('\u{3e8}', '\u{3e8}'),
-        ('\u{3ea}', '\u{3ea}'), ('\u{3ec}', '\u{3ec}'), ('\u{3ee}', '\u{3ee}'),
-        ('\u{3f4}', '\u{3f4}'), ('\u{3f7}', '\u{3f7}'), ('\u{3f9}', '\u{3fa}'),
-        ('\u{3fd}', '\u{42f}'), ('\u{460}', '\u{460}'), ('\u{462}', '\u{462}'),
-        ('\u{464}', '\u{464}'), ('\u{466}', '\u{466}'), ('\u{468}', '\u{468}'),
-        ('\u{46a}', '\u{46a}'), ('\u{46c}', '\u{46c}'), ('\u{46e}', '\u{46e}'),
-        ('\u{470}', '\u{470}'), ('\u{472}', '\u{472}'), ('\u{474}', '\u{474}'),
-        ('\u{476}', '\u{476}'), ('\u{478}', '\u{478}'), ('\u{47a}', '\u{47a}'),
-        ('\u{47c}', '\u{47c}'), ('\u{47e}', '\u{47e}'), ('\u{480}', '\u{480}'),
-        ('\u{48a}', '\u{48a}'), ('\u{48c}', '\u{48c}'), ('\u{48e}', '\u{48e}'),
-        ('\u{490}', '\u{490}'), ('\u{492}', '\u{492}'), ('\u{494}', '\u{494}'),
-        ('\u{496}', '\u{496}'), ('\u{498}', '\u{498}'), ('\u{49a}', '\u{49a}'),
-        ('\u{49c}', '\u{49c}'), ('\u{49e}', '\u{49e}'), ('\u{4a0}', '\u{4a0}'),
-        ('\u{4a2}', '\u{4a2}'), ('\u{4a4}', '\u{4a4}'), ('\u{4a6}', '\u{4a6}'),
-        ('\u{4a8}', '\u{4a8}'), ('\u{4aa}', '\u{4aa}'), ('\u{4ac}', '\u{4ac}'),
-        ('\u{4ae}', '\u{4ae}'), ('\u{4b0}', '\u{4b0}'), ('\u{4b2}', '\u{4b2}'),
-        ('\u{4b4}', '\u{4b4}'), ('\u{4b6}', '\u{4b6}'), ('\u{4b8}', '\u{4b8}'),
-        ('\u{4ba}', '\u{4ba}'), ('\u{4bc}', '\u{4bc}'), ('\u{4be}', '\u{4be}'),
-        ('\u{4c0}', '\u{4c1}'), ('\u{4c3}', '\u{4c3}'), ('\u{4c5}', '\u{4c5}'),
-        ('\u{4c7}', '\u{4c7}'), ('\u{4c9}', '\u{4c9}'), ('\u{4cb}', '\u{4cb}'),
-        ('\u{4cd}', '\u{4cd}'), ('\u{4d0}', '\u{4d0}'), ('\u{4d2}', '\u{4d2}'),
-        ('\u{4d4}', '\u{4d4}'), ('\u{4d6}', '\u{4d6}'), ('\u{4d8}', '\u{4d8}'),
-        ('\u{4da}', '\u{4da}'), ('\u{4dc}', '\u{4dc}'), ('\u{4de}', '\u{4de}'),
-        ('\u{4e0}', '\u{4e0}'), ('\u{4e2}', '\u{4e2}'), ('\u{4e4}', '\u{4e4}'),
-        ('\u{4e6}', '\u{4e6}'), ('\u{4e8}', '\u{4e8}'), ('\u{4ea}', '\u{4ea}'),
-        ('\u{4ec}', '\u{4ec}'), ('\u{4ee}', '\u{4ee}'), ('\u{4f0}', '\u{4f0}'),
-        ('\u{4f2}', '\u{4f2}'), ('\u{4f4}', '\u{4f4}'), ('\u{4f6}', '\u{4f6}'),
-        ('\u{4f8}', '\u{4f8}'), ('\u{4fa}', '\u{4fa}'), ('\u{4fc}', '\u{4fc}'),
-        ('\u{4fe}', '\u{4fe}'), ('\u{500}', '\u{500}'), ('\u{502}', '\u{502}'),
-        ('\u{504}', '\u{504}'), ('\u{506}', '\u{506}'), ('\u{508}', '\u{508}'),
-        ('\u{50a}', '\u{50a}'), ('\u{50c}', '\u{50c}'), ('\u{50e}', '\u{50e}'),
-        ('\u{510}', '\u{510}'), ('\u{512}', '\u{512}'), ('\u{514}', '\u{514}'),
-        ('\u{516}', '\u{516}'), ('\u{518}', '\u{518}'), ('\u{51a}', '\u{51a}'),
-        ('\u{51c}', '\u{51c}'), ('\u{51e}', '\u{51e}'), ('\u{520}', '\u{520}'),
-        ('\u{522}', '\u{522}'), ('\u{524}', '\u{524}'), ('\u{526}', '\u{526}'),
-        ('\u{528}', '\u{528}'), ('\u{52a}', '\u{52a}'), ('\u{52c}', '\u{52c}'),
-        ('\u{52e}', '\u{52e}'), ('\u{531}', '\u{556}'), ('\u{10a0}',
-        '\u{10c5}'), ('\u{10c7}', '\u{10c7}'), ('\u{10cd}', '\u{10cd}'),
-        ('\u{13a0}', '\u{13f5}'), ('\u{1e00}', '\u{1e00}'), ('\u{1e02}',
-        '\u{1e02}'), ('\u{1e04}', '\u{1e04}'), ('\u{1e06}', '\u{1e06}'),
-        ('\u{1e08}', '\u{1e08}'), ('\u{1e0a}', '\u{1e0a}'), ('\u{1e0c}',
-        '\u{1e0c}'), ('\u{1e0e}', '\u{1e0e}'), ('\u{1e10}', '\u{1e10}'),
-        ('\u{1e12}', '\u{1e12}'), ('\u{1e14}', '\u{1e14}'), ('\u{1e16}',
-        '\u{1e16}'), ('\u{1e18}', '\u{1e18}'), ('\u{1e1a}', '\u{1e1a}'),
-        ('\u{1e1c}', '\u{1e1c}'), ('\u{1e1e}', '\u{1e1e}'), ('\u{1e20}',
-        '\u{1e20}'), ('\u{1e22}', '\u{1e22}'), ('\u{1e24}', '\u{1e24}'),
-        ('\u{1e26}', '\u{1e26}'), ('\u{1e28}', '\u{1e28}'), ('\u{1e2a}',
-        '\u{1e2a}'), ('\u{1e2c}', '\u{1e2c}'), ('\u{1e2e}', '\u{1e2e}'),
-        ('\u{1e30}', '\u{1e30}'), ('\u{1e32}', '\u{1e32}'), ('\u{1e34}',
-        '\u{1e34}'), ('\u{1e36}', '\u{1e36}'), ('\u{1e38}', '\u{1e38}'),
-        ('\u{1e3a}', '\u{1e3a}'), ('\u{1e3c}', '\u{1e3c}'), ('\u{1e3e}',
-        '\u{1e3e}'), ('\u{1e40}', '\u{1e40}'), ('\u{1e42}', '\u{1e42}'),
-        ('\u{1e44}', '\u{1e44}'), ('\u{1e46}', '\u{1e46}'), ('\u{1e48}',
-        '\u{1e48}'), ('\u{1e4a}', '\u{1e4a}'), ('\u{1e4c}', '\u{1e4c}'),
-        ('\u{1e4e}', '\u{1e4e}'), ('\u{1e50}', '\u{1e50}'), ('\u{1e52}',
-        '\u{1e52}'), ('\u{1e54}', '\u{1e54}'), ('\u{1e56}', '\u{1e56}'),
-        ('\u{1e58}', '\u{1e58}'), ('\u{1e5a}', '\u{1e5a}'), ('\u{1e5c}',
-        '\u{1e5c}'), ('\u{1e5e}', '\u{1e5e}'), ('\u{1e60}', '\u{1e60}'),
-        ('\u{1e62}', '\u{1e62}'), ('\u{1e64}', '\u{1e64}'), ('\u{1e66}',
-        '\u{1e66}'), ('\u{1e68}', '\u{1e68}'), ('\u{1e6a}', '\u{1e6a}'),
-        ('\u{1e6c}', '\u{1e6c}'), ('\u{1e6e}', '\u{1e6e}'), ('\u{1e70}',
-        '\u{1e70}'), ('\u{1e72}', '\u{1e72}'), ('\u{1e74}', '\u{1e74}'),
-        ('\u{1e76}', '\u{1e76}'), ('\u{1e78}', '\u{1e78}'), ('\u{1e7a}',
-        '\u{1e7a}'), ('\u{1e7c}', '\u{1e7c}'), ('\u{1e7e}', '\u{1e7e}'),
-        ('\u{1e80}', '\u{1e80}'), ('\u{1e82}', '\u{1e82}'), ('\u{1e84}',
-        '\u{1e84}'), ('\u{1e86}', '\u{1e86}'), ('\u{1e88}', '\u{1e88}'),
-        ('\u{1e8a}', '\u{1e8a}'), ('\u{1e8c}', '\u{1e8c}'), ('\u{1e8e}',
-        '\u{1e8e}'), ('\u{1e90}', '\u{1e90}'), ('\u{1e92}', '\u{1e92}'),
-        ('\u{1e94}', '\u{1e94}'), ('\u{1e9e}', '\u{1e9e}'), ('\u{1ea0}',
-        '\u{1ea0}'), ('\u{1ea2}', '\u{1ea2}'), ('\u{1ea4}', '\u{1ea4}'),
-        ('\u{1ea6}', '\u{1ea6}'), ('\u{1ea8}', '\u{1ea8}'), ('\u{1eaa}',
-        '\u{1eaa}'), ('\u{1eac}', '\u{1eac}'), ('\u{1eae}', '\u{1eae}'),
-        ('\u{1eb0}', '\u{1eb0}'), ('\u{1eb2}', '\u{1eb2}'), ('\u{1eb4}',
-        '\u{1eb4}'), ('\u{1eb6}', '\u{1eb6}'), ('\u{1eb8}', '\u{1eb8}'),
-        ('\u{1eba}', '\u{1eba}'), ('\u{1ebc}', '\u{1ebc}'), ('\u{1ebe}',
-        '\u{1ebe}'), ('\u{1ec0}', '\u{1ec0}'), ('\u{1ec2}', '\u{1ec2}'),
-        ('\u{1ec4}', '\u{1ec4}'), ('\u{1ec6}', '\u{1ec6}'), ('\u{1ec8}',
-        '\u{1ec8}'), ('\u{1eca}', '\u{1eca}'), ('\u{1ecc}', '\u{1ecc}'),
-        ('\u{1ece}', '\u{1ece}'), ('\u{1ed0}', '\u{1ed0}'), ('\u{1ed2}',
-        '\u{1ed2}'), ('\u{1ed4}', '\u{1ed4}'), ('\u{1ed6}', '\u{1ed6}'),
-        ('\u{1ed8}', '\u{1ed8}'), ('\u{1eda}', '\u{1eda}'), ('\u{1edc}',
-        '\u{1edc}'), ('\u{1ede}', '\u{1ede}'), ('\u{1ee0}', '\u{1ee0}'),
-        ('\u{1ee2}', '\u{1ee2}'), ('\u{1ee4}', '\u{1ee4}'), ('\u{1ee6}',
-        '\u{1ee6}'), ('\u{1ee8}', '\u{1ee8}'), ('\u{1eea}', '\u{1eea}'),
-        ('\u{1eec}', '\u{1eec}'), ('\u{1eee}', '\u{1eee}'), ('\u{1ef0}',
-        '\u{1ef0}'), ('\u{1ef2}', '\u{1ef2}'), ('\u{1ef4}', '\u{1ef4}'),
-        ('\u{1ef6}', '\u{1ef6}'), ('\u{1ef8}', '\u{1ef8}'), ('\u{1efa}',
-        '\u{1efa}'), ('\u{1efc}', '\u{1efc}'), ('\u{1efe}', '\u{1efe}'),
-        ('\u{1f08}', '\u{1f0f}'), ('\u{1f18}', '\u{1f1d}'), ('\u{1f28}',
-        '\u{1f2f}'), ('\u{1f38}', '\u{1f3f}'), ('\u{1f48}', '\u{1f4d}'),
-        ('\u{1f59}', '\u{1f59}'), ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}',
-        '\u{1f5d}'), ('\u{1f5f}', '\u{1f5f}'), ('\u{1f68}', '\u{1f6f}'),
-        ('\u{1fb8}', '\u{1fbb}'), ('\u{1fc8}', '\u{1fcb}'), ('\u{1fd8}',
-        '\u{1fdb}'), ('\u{1fe8}', '\u{1fec}'), ('\u{1ff8}', '\u{1ffb}'),
-        ('\u{2102}', '\u{2102}'), ('\u{2107}', '\u{2107}'), ('\u{210b}',
-        '\u{210d}'), ('\u{2110}', '\u{2112}'), ('\u{2115}', '\u{2115}'),
-        ('\u{2119}', '\u{211d}'), ('\u{2124}', '\u{2124}'), ('\u{2126}',
-        '\u{2126}'), ('\u{2128}', '\u{2128}'), ('\u{212a}', '\u{212d}'),
-        ('\u{2130}', '\u{2133}'), ('\u{213e}', '\u{213f}'), ('\u{2145}',
-        '\u{2145}'), ('\u{2160}', '\u{216f}'), ('\u{2183}', '\u{2183}'),
-        ('\u{24b6}', '\u{24cf}'), ('\u{2c00}', '\u{2c2e}'), ('\u{2c60}',
-        '\u{2c60}'), ('\u{2c62}', '\u{2c64}'), ('\u{2c67}', '\u{2c67}'),
-        ('\u{2c69}', '\u{2c69}'), ('\u{2c6b}', '\u{2c6b}'), ('\u{2c6d}',
-        '\u{2c70}'), ('\u{2c72}', '\u{2c72}'), ('\u{2c75}', '\u{2c75}'),
-        ('\u{2c7e}', '\u{2c80}'), ('\u{2c82}', '\u{2c82}'), ('\u{2c84}',
-        '\u{2c84}'), ('\u{2c86}', '\u{2c86}'), ('\u{2c88}', '\u{2c88}'),
-        ('\u{2c8a}', '\u{2c8a}'), ('\u{2c8c}', '\u{2c8c}'), ('\u{2c8e}',
-        '\u{2c8e}'), ('\u{2c90}', '\u{2c90}'), ('\u{2c92}', '\u{2c92}'),
-        ('\u{2c94}', '\u{2c94}'), ('\u{2c96}', '\u{2c96}'), ('\u{2c98}',
-        '\u{2c98}'), ('\u{2c9a}', '\u{2c9a}'), ('\u{2c9c}', '\u{2c9c}'),
-        ('\u{2c9e}', '\u{2c9e}'), ('\u{2ca0}', '\u{2ca0}'), ('\u{2ca2}',
-        '\u{2ca2}'), ('\u{2ca4}', '\u{2ca4}'), ('\u{2ca6}', '\u{2ca6}'),
-        ('\u{2ca8}', '\u{2ca8}'), ('\u{2caa}', '\u{2caa}'), ('\u{2cac}',
-        '\u{2cac}'), ('\u{2cae}', '\u{2cae}'), ('\u{2cb0}', '\u{2cb0}'),
-        ('\u{2cb2}', '\u{2cb2}'), ('\u{2cb4}', '\u{2cb4}'), ('\u{2cb6}',
-        '\u{2cb6}'), ('\u{2cb8}', '\u{2cb8}'), ('\u{2cba}', '\u{2cba}'),
-        ('\u{2cbc}', '\u{2cbc}'), ('\u{2cbe}', '\u{2cbe}'), ('\u{2cc0}',
-        '\u{2cc0}'), ('\u{2cc2}', '\u{2cc2}'), ('\u{2cc4}', '\u{2cc4}'),
-        ('\u{2cc6}', '\u{2cc6}'), ('\u{2cc8}', '\u{2cc8}'), ('\u{2cca}',
-        '\u{2cca}'), ('\u{2ccc}', '\u{2ccc}'), ('\u{2cce}', '\u{2cce}'),
-        ('\u{2cd0}', '\u{2cd0}'), ('\u{2cd2}', '\u{2cd2}'), ('\u{2cd4}',
-        '\u{2cd4}'), ('\u{2cd6}', '\u{2cd6}'), ('\u{2cd8}', '\u{2cd8}'),
-        ('\u{2cda}', '\u{2cda}'), ('\u{2cdc}', '\u{2cdc}'), ('\u{2cde}',
-        '\u{2cde}'), ('\u{2ce0}', '\u{2ce0}'), ('\u{2ce2}', '\u{2ce2}'),
-        ('\u{2ceb}', '\u{2ceb}'), ('\u{2ced}', '\u{2ced}'), ('\u{2cf2}',
-        '\u{2cf2}'), ('\u{a640}', '\u{a640}'), ('\u{a642}', '\u{a642}'),
-        ('\u{a644}', '\u{a644}'), ('\u{a646}', '\u{a646}'), ('\u{a648}',
-        '\u{a648}'), ('\u{a64a}', '\u{a64a}'), ('\u{a64c}', '\u{a64c}'),
-        ('\u{a64e}', '\u{a64e}'), ('\u{a650}', '\u{a650}'), ('\u{a652}',
-        '\u{a652}'), ('\u{a654}', '\u{a654}'), ('\u{a656}', '\u{a656}'),
-        ('\u{a658}', '\u{a658}'), ('\u{a65a}', '\u{a65a}'), ('\u{a65c}',
-        '\u{a65c}'), ('\u{a65e}', '\u{a65e}'), ('\u{a660}', '\u{a660}'),
-        ('\u{a662}', '\u{a662}'), ('\u{a664}', '\u{a664}'), ('\u{a666}',
-        '\u{a666}'), ('\u{a668}', '\u{a668}'), ('\u{a66a}', '\u{a66a}'),
-        ('\u{a66c}', '\u{a66c}'), ('\u{a680}', '\u{a680}'), ('\u{a682}',
-        '\u{a682}'), ('\u{a684}', '\u{a684}'), ('\u{a686}', '\u{a686}'),
-        ('\u{a688}', '\u{a688}'), ('\u{a68a}', '\u{a68a}'), ('\u{a68c}',
-        '\u{a68c}'), ('\u{a68e}', '\u{a68e}'), ('\u{a690}', '\u{a690}'),
-        ('\u{a692}', '\u{a692}'), ('\u{a694}', '\u{a694}'), ('\u{a696}',
-        '\u{a696}'), ('\u{a698}', '\u{a698}'), ('\u{a69a}', '\u{a69a}'),
-        ('\u{a722}', '\u{a722}'), ('\u{a724}', '\u{a724}'), ('\u{a726}',
-        '\u{a726}'), ('\u{a728}', '\u{a728}'), ('\u{a72a}', '\u{a72a}'),
-        ('\u{a72c}', '\u{a72c}'), ('\u{a72e}', '\u{a72e}'), ('\u{a732}',
-        '\u{a732}'), ('\u{a734}', '\u{a734}'), ('\u{a736}', '\u{a736}'),
-        ('\u{a738}', '\u{a738}'), ('\u{a73a}', '\u{a73a}'), ('\u{a73c}',
-        '\u{a73c}'), ('\u{a73e}', '\u{a73e}'), ('\u{a740}', '\u{a740}'),
-        ('\u{a742}', '\u{a742}'), ('\u{a744}', '\u{a744}'), ('\u{a746}',
-        '\u{a746}'), ('\u{a748}', '\u{a748}'), ('\u{a74a}', '\u{a74a}'),
-        ('\u{a74c}', '\u{a74c}'), ('\u{a74e}', '\u{a74e}'), ('\u{a750}',
-        '\u{a750}'), ('\u{a752}', '\u{a752}'), ('\u{a754}', '\u{a754}'),
-        ('\u{a756}', '\u{a756}'), ('\u{a758}', '\u{a758}'), ('\u{a75a}',
-        '\u{a75a}'), ('\u{a75c}', '\u{a75c}'), ('\u{a75e}', '\u{a75e}'),
-        ('\u{a760}', '\u{a760}'), ('\u{a762}', '\u{a762}'), ('\u{a764}',
-        '\u{a764}'), ('\u{a766}', '\u{a766}'), ('\u{a768}', '\u{a768}'),
-        ('\u{a76a}', '\u{a76a}'), ('\u{a76c}', '\u{a76c}'), ('\u{a76e}',
-        '\u{a76e}'), ('\u{a779}', '\u{a779}'), ('\u{a77b}', '\u{a77b}'),
-        ('\u{a77d}', '\u{a77e}'), ('\u{a780}', '\u{a780}'), ('\u{a782}',
-        '\u{a782}'), ('\u{a784}', '\u{a784}'), ('\u{a786}', '\u{a786}'),
-        ('\u{a78b}', '\u{a78b}'), ('\u{a78d}', '\u{a78d}'), ('\u{a790}',
-        '\u{a790}'), ('\u{a792}', '\u{a792}'), ('\u{a796}', '\u{a796}'),
-        ('\u{a798}', '\u{a798}'), ('\u{a79a}', '\u{a79a}'), ('\u{a79c}',
-        '\u{a79c}'), ('\u{a79e}', '\u{a79e}'), ('\u{a7a0}', '\u{a7a0}'),
-        ('\u{a7a2}', '\u{a7a2}'), ('\u{a7a4}', '\u{a7a4}'), ('\u{a7a6}',
-        '\u{a7a6}'), ('\u{a7a8}', '\u{a7a8}'), ('\u{a7aa}', '\u{a7ad}'),
-        ('\u{a7b0}', '\u{a7b4}'), ('\u{a7b6}', '\u{a7b6}'), ('\u{ff21}',
-        '\u{ff3a}'), ('\u{10400}', '\u{10427}'), ('\u{10c80}', '\u{10cb2}'),
-        ('\u{118a0}', '\u{118bf}'), ('\u{1d400}', '\u{1d419}'), ('\u{1d434}',
-        '\u{1d44d}'), ('\u{1d468}', '\u{1d481}'), ('\u{1d49c}', '\u{1d49c}'),
-        ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}', '\u{1d4a2}'), ('\u{1d4a5}',
-        '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'), ('\u{1d4ae}', '\u{1d4b5}'),
-        ('\u{1d4d0}', '\u{1d4e9}'), ('\u{1d504}', '\u{1d505}'), ('\u{1d507}',
-        '\u{1d50a}'), ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'),
-        ('\u{1d538}', '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}',
-        '\u{1d544}'), ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'),
-        ('\u{1d56c}', '\u{1d585}'), ('\u{1d5a0}', '\u{1d5b9}'), ('\u{1d5d4}',
-        '\u{1d5ed}'), ('\u{1d608}', '\u{1d621}'), ('\u{1d63c}', '\u{1d655}'),
-        ('\u{1d670}', '\u{1d689}'), ('\u{1d6a8}', '\u{1d6c0}'), ('\u{1d6e2}',
-        '\u{1d6fa}'), ('\u{1d71c}', '\u{1d734}'), ('\u{1d756}', '\u{1d76e}'),
-        ('\u{1d790}', '\u{1d7a8}'), ('\u{1d7ca}', '\u{1d7ca}'), ('\u{1f130}',
-        '\u{1f149}'), ('\u{1f150}', '\u{1f169}'), ('\u{1f170}', '\u{1f189}')
-    ];
-
-    pub const XID_Continue_table: &'static [(char, char)] = &[
-        ('\u{30}', '\u{39}'), ('\u{41}', '\u{5a}'), ('\u{5f}', '\u{5f}'),
-        ('\u{61}', '\u{7a}'), ('\u{aa}', '\u{aa}'), ('\u{b5}', '\u{b5}'),
-        ('\u{b7}', '\u{b7}'), ('\u{ba}', '\u{ba}'), ('\u{c0}', '\u{d6}'),
-        ('\u{d8}', '\u{f6}'), ('\u{f8}', '\u{2c1}'), ('\u{2c6}', '\u{2d1}'),
-        ('\u{2e0}', '\u{2e4}'), ('\u{2ec}', '\u{2ec}'), ('\u{2ee}', '\u{2ee}'),
-        ('\u{300}', '\u{374}'), ('\u{376}', '\u{377}'), ('\u{37b}', '\u{37d}'),
-        ('\u{37f}', '\u{37f}'), ('\u{386}', '\u{38a}'), ('\u{38c}', '\u{38c}'),
-        ('\u{38e}', '\u{3a1}'), ('\u{3a3}', '\u{3f5}'), ('\u{3f7}', '\u{481}'),
-        ('\u{483}', '\u{487}'), ('\u{48a}', '\u{52f}'), ('\u{531}', '\u{556}'),
-        ('\u{559}', '\u{559}'), ('\u{561}', '\u{587}'), ('\u{591}', '\u{5bd}'),
-        ('\u{5bf}', '\u{5bf}'), ('\u{5c1}', '\u{5c2}'), ('\u{5c4}', '\u{5c5}'),
-        ('\u{5c7}', '\u{5c7}'), ('\u{5d0}', '\u{5ea}'), ('\u{5f0}', '\u{5f2}'),
-        ('\u{610}', '\u{61a}'), ('\u{620}', '\u{669}'), ('\u{66e}', '\u{6d3}'),
-        ('\u{6d5}', '\u{6dc}'), ('\u{6df}', '\u{6e8}'), ('\u{6ea}', '\u{6fc}'),
-        ('\u{6ff}', '\u{6ff}'), ('\u{710}', '\u{74a}'), ('\u{74d}', '\u{7b1}'),
-        ('\u{7c0}', '\u{7f5}'), ('\u{7fa}', '\u{7fa}'), ('\u{800}', '\u{82d}'),
-        ('\u{840}', '\u{85b}'), ('\u{8a0}', '\u{8b4}'), ('\u{8e3}', '\u{963}'),
-        ('\u{966}', '\u{96f}'), ('\u{971}', '\u{983}'), ('\u{985}', '\u{98c}'),
-        ('\u{98f}', '\u{990}'), ('\u{993}', '\u{9a8}'), ('\u{9aa}', '\u{9b0}'),
-        ('\u{9b2}', '\u{9b2}'), ('\u{9b6}', '\u{9b9}'), ('\u{9bc}', '\u{9c4}'),
-        ('\u{9c7}', '\u{9c8}'), ('\u{9cb}', '\u{9ce}'), ('\u{9d7}', '\u{9d7}'),
-        ('\u{9dc}', '\u{9dd}'), ('\u{9df}', '\u{9e3}'), ('\u{9e6}', '\u{9f1}'),
-        ('\u{a01}', '\u{a03}'), ('\u{a05}', '\u{a0a}'), ('\u{a0f}', '\u{a10}'),
-        ('\u{a13}', '\u{a28}'), ('\u{a2a}', '\u{a30}'), ('\u{a32}', '\u{a33}'),
-        ('\u{a35}', '\u{a36}'), ('\u{a38}', '\u{a39}'), ('\u{a3c}', '\u{a3c}'),
-        ('\u{a3e}', '\u{a42}'), ('\u{a47}', '\u{a48}'), ('\u{a4b}', '\u{a4d}'),
-        ('\u{a51}', '\u{a51}'), ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'),
-        ('\u{a66}', '\u{a75}'), ('\u{a81}', '\u{a83}'), ('\u{a85}', '\u{a8d}'),
-        ('\u{a8f}', '\u{a91}'), ('\u{a93}', '\u{aa8}'), ('\u{aaa}', '\u{ab0}'),
-        ('\u{ab2}', '\u{ab3}'), ('\u{ab5}', '\u{ab9}'), ('\u{abc}', '\u{ac5}'),
-        ('\u{ac7}', '\u{ac9}'), ('\u{acb}', '\u{acd}'), ('\u{ad0}', '\u{ad0}'),
-        ('\u{ae0}', '\u{ae3}'), ('\u{ae6}', '\u{aef}'), ('\u{af9}', '\u{af9}'),
-        ('\u{b01}', '\u{b03}'), ('\u{b05}', '\u{b0c}'), ('\u{b0f}', '\u{b10}'),
-        ('\u{b13}', '\u{b28}'), ('\u{b2a}', '\u{b30}'), ('\u{b32}', '\u{b33}'),
-        ('\u{b35}', '\u{b39}'), ('\u{b3c}', '\u{b44}'), ('\u{b47}', '\u{b48}'),
-        ('\u{b4b}', '\u{b4d}'), ('\u{b56}', '\u{b57}'), ('\u{b5c}', '\u{b5d}'),
-        ('\u{b5f}', '\u{b63}'), ('\u{b66}', '\u{b6f}'), ('\u{b71}', '\u{b71}'),
-        ('\u{b82}', '\u{b83}'), ('\u{b85}', '\u{b8a}'), ('\u{b8e}', '\u{b90}'),
-        ('\u{b92}', '\u{b95}'), ('\u{b99}', '\u{b9a}'), ('\u{b9c}', '\u{b9c}'),
-        ('\u{b9e}', '\u{b9f}'), ('\u{ba3}', '\u{ba4}'), ('\u{ba8}', '\u{baa}'),
-        ('\u{bae}', '\u{bb9}'), ('\u{bbe}', '\u{bc2}'), ('\u{bc6}', '\u{bc8}'),
-        ('\u{bca}', '\u{bcd}'), ('\u{bd0}', '\u{bd0}'), ('\u{bd7}', '\u{bd7}'),
-        ('\u{be6}', '\u{bef}'), ('\u{c00}', '\u{c03}'), ('\u{c05}', '\u{c0c}'),
-        ('\u{c0e}', '\u{c10}'), ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'),
-        ('\u{c3d}', '\u{c44}'), ('\u{c46}', '\u{c48}'), ('\u{c4a}', '\u{c4d}'),
-        ('\u{c55}', '\u{c56}'), ('\u{c58}', '\u{c5a}'), ('\u{c60}', '\u{c63}'),
-        ('\u{c66}', '\u{c6f}'), ('\u{c81}', '\u{c83}'), ('\u{c85}', '\u{c8c}'),
-        ('\u{c8e}', '\u{c90}'), ('\u{c92}', '\u{ca8}'), ('\u{caa}', '\u{cb3}'),
-        ('\u{cb5}', '\u{cb9}'), ('\u{cbc}', '\u{cc4}'), ('\u{cc6}', '\u{cc8}'),
-        ('\u{cca}', '\u{ccd}'), ('\u{cd5}', '\u{cd6}'), ('\u{cde}', '\u{cde}'),
-        ('\u{ce0}', '\u{ce3}'), ('\u{ce6}', '\u{cef}'), ('\u{cf1}', '\u{cf2}'),
-        ('\u{d01}', '\u{d03}'), ('\u{d05}', '\u{d0c}'), ('\u{d0e}', '\u{d10}'),
-        ('\u{d12}', '\u{d3a}'), ('\u{d3d}', '\u{d44}'), ('\u{d46}', '\u{d48}'),
-        ('\u{d4a}', '\u{d4e}'), ('\u{d57}', '\u{d57}'), ('\u{d5f}', '\u{d63}'),
-        ('\u{d66}', '\u{d6f}'), ('\u{d7a}', '\u{d7f}'), ('\u{d82}', '\u{d83}'),
-        ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'), ('\u{db3}', '\u{dbb}'),
-        ('\u{dbd}', '\u{dbd}'), ('\u{dc0}', '\u{dc6}'), ('\u{dca}', '\u{dca}'),
-        ('\u{dcf}', '\u{dd4}'), ('\u{dd6}', '\u{dd6}'), ('\u{dd8}', '\u{ddf}'),
-        ('\u{de6}', '\u{def}'), ('\u{df2}', '\u{df3}'), ('\u{e01}', '\u{e3a}'),
-        ('\u{e40}', '\u{e4e}'), ('\u{e50}', '\u{e59}'), ('\u{e81}', '\u{e82}'),
-        ('\u{e84}', '\u{e84}'), ('\u{e87}', '\u{e88}'), ('\u{e8a}', '\u{e8a}'),
-        ('\u{e8d}', '\u{e8d}'), ('\u{e94}', '\u{e97}'), ('\u{e99}', '\u{e9f}'),
-        ('\u{ea1}', '\u{ea3}'), ('\u{ea5}', '\u{ea5}'), ('\u{ea7}', '\u{ea7}'),
-        ('\u{eaa}', '\u{eab}'), ('\u{ead}', '\u{eb9}'), ('\u{ebb}', '\u{ebd}'),
-        ('\u{ec0}', '\u{ec4}'), ('\u{ec6}', '\u{ec6}'), ('\u{ec8}', '\u{ecd}'),
-        ('\u{ed0}', '\u{ed9}'), ('\u{edc}', '\u{edf}'), ('\u{f00}', '\u{f00}'),
-        ('\u{f18}', '\u{f19}'), ('\u{f20}', '\u{f29}'), ('\u{f35}', '\u{f35}'),
-        ('\u{f37}', '\u{f37}'), ('\u{f39}', '\u{f39}'), ('\u{f3e}', '\u{f47}'),
-        ('\u{f49}', '\u{f6c}'), ('\u{f71}', '\u{f84}'), ('\u{f86}', '\u{f97}'),
-        ('\u{f99}', '\u{fbc}'), ('\u{fc6}', '\u{fc6}'), ('\u{1000}',
-        '\u{1049}'), ('\u{1050}', '\u{109d}'), ('\u{10a0}', '\u{10c5}'),
-        ('\u{10c7}', '\u{10c7}'), ('\u{10cd}', '\u{10cd}'), ('\u{10d0}',
-        '\u{10fa}'), ('\u{10fc}', '\u{1248}'), ('\u{124a}', '\u{124d}'),
-        ('\u{1250}', '\u{1256}'), ('\u{1258}', '\u{1258}'), ('\u{125a}',
-        '\u{125d}'), ('\u{1260}', '\u{1288}'), ('\u{128a}', '\u{128d}'),
-        ('\u{1290}', '\u{12b0}'), ('\u{12b2}', '\u{12b5}'), ('\u{12b8}',
-        '\u{12be}'), ('\u{12c0}', '\u{12c0}'), ('\u{12c2}', '\u{12c5}'),
-        ('\u{12c8}', '\u{12d6}'), ('\u{12d8}', '\u{1310}'), ('\u{1312}',
-        '\u{1315}'), ('\u{1318}', '\u{135a}'), ('\u{135d}', '\u{135f}'),
-        ('\u{1369}', '\u{1371}'), ('\u{1380}', '\u{138f}'), ('\u{13a0}',
-        '\u{13f5}'), ('\u{13f8}', '\u{13fd}'), ('\u{1401}', '\u{166c}'),
-        ('\u{166f}', '\u{167f}'), ('\u{1681}', '\u{169a}'), ('\u{16a0}',
-        '\u{16ea}'), ('\u{16ee}', '\u{16f8}'), ('\u{1700}', '\u{170c}'),
-        ('\u{170e}', '\u{1714}'), ('\u{1720}', '\u{1734}'), ('\u{1740}',
-        '\u{1753}'), ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'),
-        ('\u{1772}', '\u{1773}'), ('\u{1780}', '\u{17d3}'), ('\u{17d7}',
-        '\u{17d7}'), ('\u{17dc}', '\u{17dd}'), ('\u{17e0}', '\u{17e9}'),
-        ('\u{180b}', '\u{180d}'), ('\u{1810}', '\u{1819}'), ('\u{1820}',
-        '\u{1877}'), ('\u{1880}', '\u{18aa}'), ('\u{18b0}', '\u{18f5}'),
-        ('\u{1900}', '\u{191e}'), ('\u{1920}', '\u{192b}'), ('\u{1930}',
-        '\u{193b}'), ('\u{1946}', '\u{196d}'), ('\u{1970}', '\u{1974}'),
-        ('\u{1980}', '\u{19ab}'), ('\u{19b0}', '\u{19c9}'), ('\u{19d0}',
-        '\u{19da}'), ('\u{1a00}', '\u{1a1b}'), ('\u{1a20}', '\u{1a5e}'),
-        ('\u{1a60}', '\u{1a7c}'), ('\u{1a7f}', '\u{1a89}'), ('\u{1a90}',
-        '\u{1a99}'), ('\u{1aa7}', '\u{1aa7}'), ('\u{1ab0}', '\u{1abd}'),
-        ('\u{1b00}', '\u{1b4b}'), ('\u{1b50}', '\u{1b59}'), ('\u{1b6b}',
-        '\u{1b73}'), ('\u{1b80}', '\u{1bf3}'), ('\u{1c00}', '\u{1c37}'),
-        ('\u{1c40}', '\u{1c49}'), ('\u{1c4d}', '\u{1c7d}'), ('\u{1cd0}',
-        '\u{1cd2}'), ('\u{1cd4}', '\u{1cf6}'), ('\u{1cf8}', '\u{1cf9}'),
-        ('\u{1d00}', '\u{1df5}'), ('\u{1dfc}', '\u{1f15}'), ('\u{1f18}',
-        '\u{1f1d}'), ('\u{1f20}', '\u{1f45}'), ('\u{1f48}', '\u{1f4d}'),
-        ('\u{1f50}', '\u{1f57}'), ('\u{1f59}', '\u{1f59}'), ('\u{1f5b}',
-        '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'), ('\u{1f5f}', '\u{1f7d}'),
-        ('\u{1f80}', '\u{1fb4}'), ('\u{1fb6}', '\u{1fbc}'), ('\u{1fbe}',
-        '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'), ('\u{1fc6}', '\u{1fcc}'),
-        ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}', '\u{1fdb}'), ('\u{1fe0}',
-        '\u{1fec}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}', '\u{1ffc}'),
-        ('\u{203f}', '\u{2040}'), ('\u{2054}', '\u{2054}'), ('\u{2071}',
-        '\u{2071}'), ('\u{207f}', '\u{207f}'), ('\u{2090}', '\u{209c}'),
-        ('\u{20d0}', '\u{20dc}'), ('\u{20e1}', '\u{20e1}'), ('\u{20e5}',
-        '\u{20f0}'), ('\u{2102}', '\u{2102}'), ('\u{2107}', '\u{2107}'),
-        ('\u{210a}', '\u{2113}'), ('\u{2115}', '\u{2115}'), ('\u{2118}',
-        '\u{211d}'), ('\u{2124}', '\u{2124}'), ('\u{2126}', '\u{2126}'),
-        ('\u{2128}', '\u{2128}'), ('\u{212a}', '\u{2139}'), ('\u{213c}',
-        '\u{213f}'), ('\u{2145}', '\u{2149}'), ('\u{214e}', '\u{214e}'),
-        ('\u{2160}', '\u{2188}'), ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}',
-        '\u{2c5e}'), ('\u{2c60}', '\u{2ce4}'), ('\u{2ceb}', '\u{2cf3}'),
-        ('\u{2d00}', '\u{2d25}'), ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}',
-        '\u{2d2d}'), ('\u{2d30}', '\u{2d67}'), ('\u{2d6f}', '\u{2d6f}'),
-        ('\u{2d7f}', '\u{2d96}'), ('\u{2da0}', '\u{2da6}'), ('\u{2da8}',
-        '\u{2dae}'), ('\u{2db0}', '\u{2db6}'), ('\u{2db8}', '\u{2dbe}'),
-        ('\u{2dc0}', '\u{2dc6}'), ('\u{2dc8}', '\u{2dce}'), ('\u{2dd0}',
-        '\u{2dd6}'), ('\u{2dd8}', '\u{2dde}'), ('\u{2de0}', '\u{2dff}'),
-        ('\u{3005}', '\u{3007}'), ('\u{3021}', '\u{302f}'), ('\u{3031}',
-        '\u{3035}'), ('\u{3038}', '\u{303c}'), ('\u{3041}', '\u{3096}'),
-        ('\u{3099}', '\u{309a}'), ('\u{309d}', '\u{309f}'), ('\u{30a1}',
-        '\u{30fa}'), ('\u{30fc}', '\u{30ff}'), ('\u{3105}', '\u{312d}'),
-        ('\u{3131}', '\u{318e}'), ('\u{31a0}', '\u{31ba}'), ('\u{31f0}',
-        '\u{31ff}'), ('\u{3400}', '\u{4db5}'), ('\u{4e00}', '\u{9fd5}'),
-        ('\u{a000}', '\u{a48c}'), ('\u{a4d0}', '\u{a4fd}'), ('\u{a500}',
-        '\u{a60c}'), ('\u{a610}', '\u{a62b}'), ('\u{a640}', '\u{a66f}'),
-        ('\u{a674}', '\u{a67d}'), ('\u{a67f}', '\u{a6f1}'), ('\u{a717}',
-        '\u{a71f}'), ('\u{a722}', '\u{a788}'), ('\u{a78b}', '\u{a7ad}'),
-        ('\u{a7b0}', '\u{a7b7}'), ('\u{a7f7}', '\u{a827}'), ('\u{a840}',
-        '\u{a873}'), ('\u{a880}', '\u{a8c4}'), ('\u{a8d0}', '\u{a8d9}'),
-        ('\u{a8e0}', '\u{a8f7}'), ('\u{a8fb}', '\u{a8fb}'), ('\u{a8fd}',
-        '\u{a8fd}'), ('\u{a900}', '\u{a92d}'), ('\u{a930}', '\u{a953}'),
-        ('\u{a960}', '\u{a97c}'), ('\u{a980}', '\u{a9c0}'), ('\u{a9cf}',
-        '\u{a9d9}'), ('\u{a9e0}', '\u{a9fe}'), ('\u{aa00}', '\u{aa36}'),
-        ('\u{aa40}', '\u{aa4d}'), ('\u{aa50}', '\u{aa59}'), ('\u{aa60}',
-        '\u{aa76}'), ('\u{aa7a}', '\u{aac2}'), ('\u{aadb}', '\u{aadd}'),
-        ('\u{aae0}', '\u{aaef}'), ('\u{aaf2}', '\u{aaf6}'), ('\u{ab01}',
-        '\u{ab06}'), ('\u{ab09}', '\u{ab0e}'), ('\u{ab11}', '\u{ab16}'),
-        ('\u{ab20}', '\u{ab26}'), ('\u{ab28}', '\u{ab2e}'), ('\u{ab30}',
-        '\u{ab5a}'), ('\u{ab5c}', '\u{ab65}'), ('\u{ab70}', '\u{abea}'),
-        ('\u{abec}', '\u{abed}'), ('\u{abf0}', '\u{abf9}'), ('\u{ac00}',
-        '\u{d7a3}'), ('\u{d7b0}', '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'),
-        ('\u{f900}', '\u{fa6d}'), ('\u{fa70}', '\u{fad9}'), ('\u{fb00}',
-        '\u{fb06}'), ('\u{fb13}', '\u{fb17}'), ('\u{fb1d}', '\u{fb28}'),
-        ('\u{fb2a}', '\u{fb36}'), ('\u{fb38}', '\u{fb3c}'), ('\u{fb3e}',
-        '\u{fb3e}'), ('\u{fb40}', '\u{fb41}'), ('\u{fb43}', '\u{fb44}'),
-        ('\u{fb46}', '\u{fbb1}'), ('\u{fbd3}', '\u{fc5d}'), ('\u{fc64}',
-        '\u{fd3d}'), ('\u{fd50}', '\u{fd8f}'), ('\u{fd92}', '\u{fdc7}'),
-        ('\u{fdf0}', '\u{fdf9}'), ('\u{fe00}', '\u{fe0f}'), ('\u{fe20}',
-        '\u{fe2f}'), ('\u{fe33}', '\u{fe34}'), ('\u{fe4d}', '\u{fe4f}'),
-        ('\u{fe71}', '\u{fe71}'), ('\u{fe73}', '\u{fe73}'), ('\u{fe77}',
-        '\u{fe77}'), ('\u{fe79}', '\u{fe79}'), ('\u{fe7b}', '\u{fe7b}'),
-        ('\u{fe7d}', '\u{fe7d}'), ('\u{fe7f}', '\u{fefc}'), ('\u{ff10}',
-        '\u{ff19}'), ('\u{ff21}', '\u{ff3a}'), ('\u{ff3f}', '\u{ff3f}'),
-        ('\u{ff41}', '\u{ff5a}'), ('\u{ff66}', '\u{ffbe}'), ('\u{ffc2}',
-        '\u{ffc7}'), ('\u{ffca}', '\u{ffcf}'), ('\u{ffd2}', '\u{ffd7}'),
-        ('\u{ffda}', '\u{ffdc}'), ('\u{10000}', '\u{1000b}'), ('\u{1000d}',
-        '\u{10026}'), ('\u{10028}', '\u{1003a}'), ('\u{1003c}', '\u{1003d}'),
-        ('\u{1003f}', '\u{1004d}'), ('\u{10050}', '\u{1005d}'), ('\u{10080}',
-        '\u{100fa}'), ('\u{10140}', '\u{10174}'), ('\u{101fd}', '\u{101fd}'),
-        ('\u{10280}', '\u{1029c}'), ('\u{102a0}', '\u{102d0}'), ('\u{102e0}',
-        '\u{102e0}'), ('\u{10300}', '\u{1031f}'), ('\u{10330}', '\u{1034a}'),
-        ('\u{10350}', '\u{1037a}'), ('\u{10380}', '\u{1039d}'), ('\u{103a0}',
-        '\u{103c3}'), ('\u{103c8}', '\u{103cf}'), ('\u{103d1}', '\u{103d5}'),
-        ('\u{10400}', '\u{1049d}'), ('\u{104a0}', '\u{104a9}'), ('\u{10500}',
-        '\u{10527}'), ('\u{10530}', '\u{10563}'), ('\u{10600}', '\u{10736}'),
-        ('\u{10740}', '\u{10755}'), ('\u{10760}', '\u{10767}'), ('\u{10800}',
-        '\u{10805}'), ('\u{10808}', '\u{10808}'), ('\u{1080a}', '\u{10835}'),
-        ('\u{10837}', '\u{10838}'), ('\u{1083c}', '\u{1083c}'), ('\u{1083f}',
-        '\u{10855}'), ('\u{10860}', '\u{10876}'), ('\u{10880}', '\u{1089e}'),
-        ('\u{108e0}', '\u{108f2}'), ('\u{108f4}', '\u{108f5}'), ('\u{10900}',
-        '\u{10915}'), ('\u{10920}', '\u{10939}'), ('\u{10980}', '\u{109b7}'),
-        ('\u{109be}', '\u{109bf}'), ('\u{10a00}', '\u{10a03}'), ('\u{10a05}',
-        '\u{10a06}'), ('\u{10a0c}', '\u{10a13}'), ('\u{10a15}', '\u{10a17}'),
-        ('\u{10a19}', '\u{10a33}'), ('\u{10a38}', '\u{10a3a}'), ('\u{10a3f}',
-        '\u{10a3f}'), ('\u{10a60}', '\u{10a7c}'), ('\u{10a80}', '\u{10a9c}'),
-        ('\u{10ac0}', '\u{10ac7}'), ('\u{10ac9}', '\u{10ae6}'), ('\u{10b00}',
-        '\u{10b35}'), ('\u{10b40}', '\u{10b55}'), ('\u{10b60}', '\u{10b72}'),
-        ('\u{10b80}', '\u{10b91}'), ('\u{10c00}', '\u{10c48}'), ('\u{10c80}',
-        '\u{10cb2}'), ('\u{10cc0}', '\u{10cf2}'), ('\u{11000}', '\u{11046}'),
-        ('\u{11066}', '\u{1106f}'), ('\u{1107f}', '\u{110ba}'), ('\u{110d0}',
-        '\u{110e8}'), ('\u{110f0}', '\u{110f9}'), ('\u{11100}', '\u{11134}'),
-        ('\u{11136}', '\u{1113f}'), ('\u{11150}', '\u{11173}'), ('\u{11176}',
-        '\u{11176}'), ('\u{11180}', '\u{111c4}'), ('\u{111ca}', '\u{111cc}'),
-        ('\u{111d0}', '\u{111da}'), ('\u{111dc}', '\u{111dc}'), ('\u{11200}',
-        '\u{11211}'), ('\u{11213}', '\u{11237}'), ('\u{11280}', '\u{11286}'),
-        ('\u{11288}', '\u{11288}'), ('\u{1128a}', '\u{1128d}'), ('\u{1128f}',
-        '\u{1129d}'), ('\u{1129f}', '\u{112a8}'), ('\u{112b0}', '\u{112ea}'),
-        ('\u{112f0}', '\u{112f9}'), ('\u{11300}', '\u{11303}'), ('\u{11305}',
-        '\u{1130c}'), ('\u{1130f}', '\u{11310}'), ('\u{11313}', '\u{11328}'),
-        ('\u{1132a}', '\u{11330}'), ('\u{11332}', '\u{11333}'), ('\u{11335}',
-        '\u{11339}'), ('\u{1133c}', '\u{11344}'), ('\u{11347}', '\u{11348}'),
-        ('\u{1134b}', '\u{1134d}'), ('\u{11350}', '\u{11350}'), ('\u{11357}',
-        '\u{11357}'), ('\u{1135d}', '\u{11363}'), ('\u{11366}', '\u{1136c}'),
-        ('\u{11370}', '\u{11374}'), ('\u{11480}', '\u{114c5}'), ('\u{114c7}',
-        '\u{114c7}'), ('\u{114d0}', '\u{114d9}'), ('\u{11580}', '\u{115b5}'),
-        ('\u{115b8}', '\u{115c0}'), ('\u{115d8}', '\u{115dd}'), ('\u{11600}',
-        '\u{11640}'), ('\u{11644}', '\u{11644}'), ('\u{11650}', '\u{11659}'),
-        ('\u{11680}', '\u{116b7}'), ('\u{116c0}', '\u{116c9}'), ('\u{11700}',
-        '\u{11719}'), ('\u{1171d}', '\u{1172b}'), ('\u{11730}', '\u{11739}'),
-        ('\u{118a0}', '\u{118e9}'), ('\u{118ff}', '\u{118ff}'), ('\u{11ac0}',
-        '\u{11af8}'), ('\u{12000}', '\u{12399}'), ('\u{12400}', '\u{1246e}'),
-        ('\u{12480}', '\u{12543}'), ('\u{13000}', '\u{1342e}'), ('\u{14400}',
-        '\u{14646}'), ('\u{16800}', '\u{16a38}'), ('\u{16a40}', '\u{16a5e}'),
-        ('\u{16a60}', '\u{16a69}'), ('\u{16ad0}', '\u{16aed}'), ('\u{16af0}',
-        '\u{16af4}'), ('\u{16b00}', '\u{16b36}'), ('\u{16b40}', '\u{16b43}'),
-        ('\u{16b50}', '\u{16b59}'), ('\u{16b63}', '\u{16b77}'), ('\u{16b7d}',
-        '\u{16b8f}'), ('\u{16f00}', '\u{16f44}'), ('\u{16f50}', '\u{16f7e}'),
-        ('\u{16f8f}', '\u{16f9f}'), ('\u{1b000}', '\u{1b001}'), ('\u{1bc00}',
-        '\u{1bc6a}'), ('\u{1bc70}', '\u{1bc7c}'), ('\u{1bc80}', '\u{1bc88}'),
-        ('\u{1bc90}', '\u{1bc99}'), ('\u{1bc9d}', '\u{1bc9e}'), ('\u{1d165}',
-        '\u{1d169}'), ('\u{1d16d}', '\u{1d172}'), ('\u{1d17b}', '\u{1d182}'),
-        ('\u{1d185}', '\u{1d18b}'), ('\u{1d1aa}', '\u{1d1ad}'), ('\u{1d242}',
-        '\u{1d244}'), ('\u{1d400}', '\u{1d454}'), ('\u{1d456}', '\u{1d49c}'),
-        ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}', '\u{1d4a2}'), ('\u{1d4a5}',
-        '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'), ('\u{1d4ae}', '\u{1d4b9}'),
-        ('\u{1d4bb}', '\u{1d4bb}'), ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}',
-        '\u{1d505}'), ('\u{1d507}', '\u{1d50a}'), ('\u{1d50d}', '\u{1d514}'),
-        ('\u{1d516}', '\u{1d51c}'), ('\u{1d51e}', '\u{1d539}'), ('\u{1d53b}',
-        '\u{1d53e}'), ('\u{1d540}', '\u{1d544}'), ('\u{1d546}', '\u{1d546}'),
-        ('\u{1d54a}', '\u{1d550}'), ('\u{1d552}', '\u{1d6a5}'), ('\u{1d6a8}',
-        '\u{1d6c0}'), ('\u{1d6c2}', '\u{1d6da}'), ('\u{1d6dc}', '\u{1d6fa}'),
-        ('\u{1d6fc}', '\u{1d714}'), ('\u{1d716}', '\u{1d734}'), ('\u{1d736}',
-        '\u{1d74e}'), ('\u{1d750}', '\u{1d76e}'), ('\u{1d770}', '\u{1d788}'),
-        ('\u{1d78a}', '\u{1d7a8}'), ('\u{1d7aa}', '\u{1d7c2}'), ('\u{1d7c4}',
-        '\u{1d7cb}'), ('\u{1d7ce}', '\u{1d7ff}'), ('\u{1da00}', '\u{1da36}'),
-        ('\u{1da3b}', '\u{1da6c}'), ('\u{1da75}', '\u{1da75}'), ('\u{1da84}',
-        '\u{1da84}'), ('\u{1da9b}', '\u{1da9f}'), ('\u{1daa1}', '\u{1daaf}'),
-        ('\u{1e800}', '\u{1e8c4}'), ('\u{1e8d0}', '\u{1e8d6}'), ('\u{1ee00}',
-        '\u{1ee03}'), ('\u{1ee05}', '\u{1ee1f}'), ('\u{1ee21}', '\u{1ee22}'),
-        ('\u{1ee24}', '\u{1ee24}'), ('\u{1ee27}', '\u{1ee27}'), ('\u{1ee29}',
-        '\u{1ee32}'), ('\u{1ee34}', '\u{1ee37}'), ('\u{1ee39}', '\u{1ee39}'),
-        ('\u{1ee3b}', '\u{1ee3b}'), ('\u{1ee42}', '\u{1ee42}'), ('\u{1ee47}',
-        '\u{1ee47}'), ('\u{1ee49}', '\u{1ee49}'), ('\u{1ee4b}', '\u{1ee4b}'),
-        ('\u{1ee4d}', '\u{1ee4f}'), ('\u{1ee51}', '\u{1ee52}'), ('\u{1ee54}',
-        '\u{1ee54}'), ('\u{1ee57}', '\u{1ee57}'), ('\u{1ee59}', '\u{1ee59}'),
-        ('\u{1ee5b}', '\u{1ee5b}'), ('\u{1ee5d}', '\u{1ee5d}'), ('\u{1ee5f}',
-        '\u{1ee5f}'), ('\u{1ee61}', '\u{1ee62}'), ('\u{1ee64}', '\u{1ee64}'),
-        ('\u{1ee67}', '\u{1ee6a}'), ('\u{1ee6c}', '\u{1ee72}'), ('\u{1ee74}',
-        '\u{1ee77}'), ('\u{1ee79}', '\u{1ee7c}'), ('\u{1ee7e}', '\u{1ee7e}'),
-        ('\u{1ee80}', '\u{1ee89}'), ('\u{1ee8b}', '\u{1ee9b}'), ('\u{1eea1}',
-        '\u{1eea3}'), ('\u{1eea5}', '\u{1eea9}'), ('\u{1eeab}', '\u{1eebb}'),
-        ('\u{20000}', '\u{2a6d6}'), ('\u{2a700}', '\u{2b734}'), ('\u{2b740}',
-        '\u{2b81d}'), ('\u{2b820}', '\u{2cea1}'), ('\u{2f800}', '\u{2fa1d}'),
-        ('\u{e0100}', '\u{e01ef}')
-    ];
-
-    pub const XID_Start_table: &'static [(char, char)] = &[
-        ('\u{41}', '\u{5a}'), ('\u{61}', '\u{7a}'), ('\u{aa}', '\u{aa}'),
-        ('\u{b5}', '\u{b5}'), ('\u{ba}', '\u{ba}'), ('\u{c0}', '\u{d6}'),
-        ('\u{d8}', '\u{f6}'), ('\u{f8}', '\u{2c1}'), ('\u{2c6}', '\u{2d1}'),
-        ('\u{2e0}', '\u{2e4}'), ('\u{2ec}', '\u{2ec}'), ('\u{2ee}', '\u{2ee}'),
-        ('\u{370}', '\u{374}'), ('\u{376}', '\u{377}'), ('\u{37b}', '\u{37d}'),
-        ('\u{37f}', '\u{37f}'), ('\u{386}', '\u{386}'), ('\u{388}', '\u{38a}'),
-        ('\u{38c}', '\u{38c}'), ('\u{38e}', '\u{3a1}'), ('\u{3a3}', '\u{3f5}'),
-        ('\u{3f7}', '\u{481}'), ('\u{48a}', '\u{52f}'), ('\u{531}', '\u{556}'),
-        ('\u{559}', '\u{559}'), ('\u{561}', '\u{587}'), ('\u{5d0}', '\u{5ea}'),
-        ('\u{5f0}', '\u{5f2}'), ('\u{620}', '\u{64a}'), ('\u{66e}', '\u{66f}'),
-        ('\u{671}', '\u{6d3}'), ('\u{6d5}', '\u{6d5}'), ('\u{6e5}', '\u{6e6}'),
-        ('\u{6ee}', '\u{6ef}'), ('\u{6fa}', '\u{6fc}'), ('\u{6ff}', '\u{6ff}'),
-        ('\u{710}', '\u{710}'), ('\u{712}', '\u{72f}'), ('\u{74d}', '\u{7a5}'),
-        ('\u{7b1}', '\u{7b1}'), ('\u{7ca}', '\u{7ea}'), ('\u{7f4}', '\u{7f5}'),
-        ('\u{7fa}', '\u{7fa}'), ('\u{800}', '\u{815}'), ('\u{81a}', '\u{81a}'),
-        ('\u{824}', '\u{824}'), ('\u{828}', '\u{828}'), ('\u{840}', '\u{858}'),
-        ('\u{8a0}', '\u{8b4}'), ('\u{904}', '\u{939}'), ('\u{93d}', '\u{93d}'),
-        ('\u{950}', '\u{950}'), ('\u{958}', '\u{961}'), ('\u{971}', '\u{980}'),
-        ('\u{985}', '\u{98c}'), ('\u{98f}', '\u{990}'), ('\u{993}', '\u{9a8}'),
-        ('\u{9aa}', '\u{9b0}'), ('\u{9b2}', '\u{9b2}'), ('\u{9b6}', '\u{9b9}'),
-        ('\u{9bd}', '\u{9bd}'), ('\u{9ce}', '\u{9ce}'), ('\u{9dc}', '\u{9dd}'),
-        ('\u{9df}', '\u{9e1}'), ('\u{9f0}', '\u{9f1}'), ('\u{a05}', '\u{a0a}'),
-        ('\u{a0f}', '\u{a10}'), ('\u{a13}', '\u{a28}'), ('\u{a2a}', '\u{a30}'),
-        ('\u{a32}', '\u{a33}'), ('\u{a35}', '\u{a36}'), ('\u{a38}', '\u{a39}'),
-        ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'), ('\u{a72}', '\u{a74}'),
-        ('\u{a85}', '\u{a8d}'), ('\u{a8f}', '\u{a91}'), ('\u{a93}', '\u{aa8}'),
-        ('\u{aaa}', '\u{ab0}'), ('\u{ab2}', '\u{ab3}'), ('\u{ab5}', '\u{ab9}'),
-        ('\u{abd}', '\u{abd}'), ('\u{ad0}', '\u{ad0}'), ('\u{ae0}', '\u{ae1}'),
-        ('\u{af9}', '\u{af9}'), ('\u{b05}', '\u{b0c}'), ('\u{b0f}', '\u{b10}'),
-        ('\u{b13}', '\u{b28}'), ('\u{b2a}', '\u{b30}'), ('\u{b32}', '\u{b33}'),
-        ('\u{b35}', '\u{b39}'), ('\u{b3d}', '\u{b3d}'), ('\u{b5c}', '\u{b5d}'),
-        ('\u{b5f}', '\u{b61}'), ('\u{b71}', '\u{b71}'), ('\u{b83}', '\u{b83}'),
-        ('\u{b85}', '\u{b8a}'), ('\u{b8e}', '\u{b90}'), ('\u{b92}', '\u{b95}'),
-        ('\u{b99}', '\u{b9a}'), ('\u{b9c}', '\u{b9c}'), ('\u{b9e}', '\u{b9f}'),
-        ('\u{ba3}', '\u{ba4}'), ('\u{ba8}', '\u{baa}'), ('\u{bae}', '\u{bb9}'),
-        ('\u{bd0}', '\u{bd0}'), ('\u{c05}', '\u{c0c}'), ('\u{c0e}', '\u{c10}'),
-        ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'), ('\u{c3d}', '\u{c3d}'),
-        ('\u{c58}', '\u{c5a}'), ('\u{c60}', '\u{c61}'), ('\u{c85}', '\u{c8c}'),
-        ('\u{c8e}', '\u{c90}'), ('\u{c92}', '\u{ca8}'), ('\u{caa}', '\u{cb3}'),
-        ('\u{cb5}', '\u{cb9}'), ('\u{cbd}', '\u{cbd}'), ('\u{cde}', '\u{cde}'),
-        ('\u{ce0}', '\u{ce1}'), ('\u{cf1}', '\u{cf2}'), ('\u{d05}', '\u{d0c}'),
-        ('\u{d0e}', '\u{d10}'), ('\u{d12}', '\u{d3a}'), ('\u{d3d}', '\u{d3d}'),
-        ('\u{d4e}', '\u{d4e}'), ('\u{d5f}', '\u{d61}'), ('\u{d7a}', '\u{d7f}'),
-        ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'), ('\u{db3}', '\u{dbb}'),
-        ('\u{dbd}', '\u{dbd}'), ('\u{dc0}', '\u{dc6}'), ('\u{e01}', '\u{e30}'),
-        ('\u{e32}', '\u{e32}'), ('\u{e40}', '\u{e46}'), ('\u{e81}', '\u{e82}'),
-        ('\u{e84}', '\u{e84}'), ('\u{e87}', '\u{e88}'), ('\u{e8a}', '\u{e8a}'),
-        ('\u{e8d}', '\u{e8d}'), ('\u{e94}', '\u{e97}'), ('\u{e99}', '\u{e9f}'),
-        ('\u{ea1}', '\u{ea3}'), ('\u{ea5}', '\u{ea5}'), ('\u{ea7}', '\u{ea7}'),
-        ('\u{eaa}', '\u{eab}'), ('\u{ead}', '\u{eb0}'), ('\u{eb2}', '\u{eb2}'),
-        ('\u{ebd}', '\u{ebd}'), ('\u{ec0}', '\u{ec4}'), ('\u{ec6}', '\u{ec6}'),
-        ('\u{edc}', '\u{edf}'), ('\u{f00}', '\u{f00}'), ('\u{f40}', '\u{f47}'),
-        ('\u{f49}', '\u{f6c}'), ('\u{f88}', '\u{f8c}'), ('\u{1000}',
-        '\u{102a}'), ('\u{103f}', '\u{103f}'), ('\u{1050}', '\u{1055}'),
-        ('\u{105a}', '\u{105d}'), ('\u{1061}', '\u{1061}'), ('\u{1065}',
-        '\u{1066}'), ('\u{106e}', '\u{1070}'), ('\u{1075}', '\u{1081}'),
-        ('\u{108e}', '\u{108e}'), ('\u{10a0}', '\u{10c5}'), ('\u{10c7}',
-        '\u{10c7}'), ('\u{10cd}', '\u{10cd}'), ('\u{10d0}', '\u{10fa}'),
-        ('\u{10fc}', '\u{1248}'), ('\u{124a}', '\u{124d}'), ('\u{1250}',
-        '\u{1256}'), ('\u{1258}', '\u{1258}'), ('\u{125a}', '\u{125d}'),
-        ('\u{1260}', '\u{1288}'), ('\u{128a}', '\u{128d}'), ('\u{1290}',
-        '\u{12b0}'), ('\u{12b2}', '\u{12b5}'), ('\u{12b8}', '\u{12be}'),
-        ('\u{12c0}', '\u{12c0}'), ('\u{12c2}', '\u{12c5}'), ('\u{12c8}',
-        '\u{12d6}'), ('\u{12d8}', '\u{1310}'), ('\u{1312}', '\u{1315}'),
-        ('\u{1318}', '\u{135a}'), ('\u{1380}', '\u{138f}'), ('\u{13a0}',
-        '\u{13f5}'), ('\u{13f8}', '\u{13fd}'), ('\u{1401}', '\u{166c}'),
-        ('\u{166f}', '\u{167f}'), ('\u{1681}', '\u{169a}'), ('\u{16a0}',
-        '\u{16ea}'), ('\u{16ee}', '\u{16f8}'), ('\u{1700}', '\u{170c}'),
-        ('\u{170e}', '\u{1711}'), ('\u{1720}', '\u{1731}'), ('\u{1740}',
-        '\u{1751}'), ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'),
-        ('\u{1780}', '\u{17b3}'), ('\u{17d7}', '\u{17d7}'), ('\u{17dc}',
-        '\u{17dc}'), ('\u{1820}', '\u{1877}'), ('\u{1880}', '\u{18a8}'),
-        ('\u{18aa}', '\u{18aa}'), ('\u{18b0}', '\u{18f5}'), ('\u{1900}',
-        '\u{191e}'), ('\u{1950}', '\u{196d}'), ('\u{1970}', '\u{1974}'),
-        ('\u{1980}', '\u{19ab}'), ('\u{19b0}', '\u{19c9}'), ('\u{1a00}',
-        '\u{1a16}'), ('\u{1a20}', '\u{1a54}'), ('\u{1aa7}', '\u{1aa7}'),
-        ('\u{1b05}', '\u{1b33}'), ('\u{1b45}', '\u{1b4b}'), ('\u{1b83}',
-        '\u{1ba0}'), ('\u{1bae}', '\u{1baf}'), ('\u{1bba}', '\u{1be5}'),
-        ('\u{1c00}', '\u{1c23}'), ('\u{1c4d}', '\u{1c4f}'), ('\u{1c5a}',
-        '\u{1c7d}'), ('\u{1ce9}', '\u{1cec}'), ('\u{1cee}', '\u{1cf1}'),
-        ('\u{1cf5}', '\u{1cf6}'), ('\u{1d00}', '\u{1dbf}'), ('\u{1e00}',
-        '\u{1f15}'), ('\u{1f18}', '\u{1f1d}'), ('\u{1f20}', '\u{1f45}'),
-        ('\u{1f48}', '\u{1f4d}'), ('\u{1f50}', '\u{1f57}'), ('\u{1f59}',
-        '\u{1f59}'), ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'),
-        ('\u{1f5f}', '\u{1f7d}'), ('\u{1f80}', '\u{1fb4}'), ('\u{1fb6}',
-        '\u{1fbc}'), ('\u{1fbe}', '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'),
-        ('\u{1fc6}', '\u{1fcc}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}',
-        '\u{1fdb}'), ('\u{1fe0}', '\u{1fec}'), ('\u{1ff2}', '\u{1ff4}'),
-        ('\u{1ff6}', '\u{1ffc}'), ('\u{2071}', '\u{2071}'), ('\u{207f}',
-        '\u{207f}'), ('\u{2090}', '\u{209c}'), ('\u{2102}', '\u{2102}'),
-        ('\u{2107}', '\u{2107}'), ('\u{210a}', '\u{2113}'), ('\u{2115}',
-        '\u{2115}'), ('\u{2118}', '\u{211d}'), ('\u{2124}', '\u{2124}'),
-        ('\u{2126}', '\u{2126}'), ('\u{2128}', '\u{2128}'), ('\u{212a}',
-        '\u{2139}'), ('\u{213c}', '\u{213f}'), ('\u{2145}', '\u{2149}'),
-        ('\u{214e}', '\u{214e}'), ('\u{2160}', '\u{2188}'), ('\u{2c00}',
-        '\u{2c2e}'), ('\u{2c30}', '\u{2c5e}'), ('\u{2c60}', '\u{2ce4}'),
-        ('\u{2ceb}', '\u{2cee}'), ('\u{2cf2}', '\u{2cf3}'), ('\u{2d00}',
-        '\u{2d25}'), ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}'),
-        ('\u{2d30}', '\u{2d67}'), ('\u{2d6f}', '\u{2d6f}'), ('\u{2d80}',
-        '\u{2d96}'), ('\u{2da0}', '\u{2da6}'), ('\u{2da8}', '\u{2dae}'),
-        ('\u{2db0}', '\u{2db6}'), ('\u{2db8}', '\u{2dbe}'), ('\u{2dc0}',
-        '\u{2dc6}'), ('\u{2dc8}', '\u{2dce}'), ('\u{2dd0}', '\u{2dd6}'),
-        ('\u{2dd8}', '\u{2dde}'), ('\u{3005}', '\u{3007}'), ('\u{3021}',
-        '\u{3029}'), ('\u{3031}', '\u{3035}'), ('\u{3038}', '\u{303c}'),
-        ('\u{3041}', '\u{3096}'), ('\u{309d}', '\u{309f}'), ('\u{30a1}',
-        '\u{30fa}'), ('\u{30fc}', '\u{30ff}'), ('\u{3105}', '\u{312d}'),
-        ('\u{3131}', '\u{318e}'), ('\u{31a0}', '\u{31ba}'), ('\u{31f0}',
-        '\u{31ff}'), ('\u{3400}', '\u{4db5}'), ('\u{4e00}', '\u{9fd5}'),
-        ('\u{a000}', '\u{a48c}'), ('\u{a4d0}', '\u{a4fd}'), ('\u{a500}',
-        '\u{a60c}'), ('\u{a610}', '\u{a61f}'), ('\u{a62a}', '\u{a62b}'),
-        ('\u{a640}', '\u{a66e}'), ('\u{a67f}', '\u{a69d}'), ('\u{a6a0}',
-        '\u{a6ef}'), ('\u{a717}', '\u{a71f}'), ('\u{a722}', '\u{a788}'),
-        ('\u{a78b}', '\u{a7ad}'), ('\u{a7b0}', '\u{a7b7}'), ('\u{a7f7}',
-        '\u{a801}'), ('\u{a803}', '\u{a805}'), ('\u{a807}', '\u{a80a}'),
-        ('\u{a80c}', '\u{a822}'), ('\u{a840}', '\u{a873}'), ('\u{a882}',
-        '\u{a8b3}'), ('\u{a8f2}', '\u{a8f7}'), ('\u{a8fb}', '\u{a8fb}'),
-        ('\u{a8fd}', '\u{a8fd}'), ('\u{a90a}', '\u{a925}'), ('\u{a930}',
-        '\u{a946}'), ('\u{a960}', '\u{a97c}'), ('\u{a984}', '\u{a9b2}'),
-        ('\u{a9cf}', '\u{a9cf}'), ('\u{a9e0}', '\u{a9e4}'), ('\u{a9e6}',
-        '\u{a9ef}'), ('\u{a9fa}', '\u{a9fe}'), ('\u{aa00}', '\u{aa28}'),
-        ('\u{aa40}', '\u{aa42}'), ('\u{aa44}', '\u{aa4b}'), ('\u{aa60}',
-        '\u{aa76}'), ('\u{aa7a}', '\u{aa7a}'), ('\u{aa7e}', '\u{aaaf}'),
-        ('\u{aab1}', '\u{aab1}'), ('\u{aab5}', '\u{aab6}'), ('\u{aab9}',
-        '\u{aabd}'), ('\u{aac0}', '\u{aac0}'), ('\u{aac2}', '\u{aac2}'),
-        ('\u{aadb}', '\u{aadd}'), ('\u{aae0}', '\u{aaea}'), ('\u{aaf2}',
-        '\u{aaf4}'), ('\u{ab01}', '\u{ab06}'), ('\u{ab09}', '\u{ab0e}'),
-        ('\u{ab11}', '\u{ab16}'), ('\u{ab20}', '\u{ab26}'), ('\u{ab28}',
-        '\u{ab2e}'), ('\u{ab30}', '\u{ab5a}'), ('\u{ab5c}', '\u{ab65}'),
-        ('\u{ab70}', '\u{abe2}'), ('\u{ac00}', '\u{d7a3}'), ('\u{d7b0}',
-        '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'), ('\u{f900}', '\u{fa6d}'),
-        ('\u{fa70}', '\u{fad9}'), ('\u{fb00}', '\u{fb06}'), ('\u{fb13}',
-        '\u{fb17}'), ('\u{fb1d}', '\u{fb1d}'), ('\u{fb1f}', '\u{fb28}'),
-        ('\u{fb2a}', '\u{fb36}'), ('\u{fb38}', '\u{fb3c}'), ('\u{fb3e}',
-        '\u{fb3e}'), ('\u{fb40}', '\u{fb41}'), ('\u{fb43}', '\u{fb44}'),
-        ('\u{fb46}', '\u{fbb1}'), ('\u{fbd3}', '\u{fc5d}'), ('\u{fc64}',
-        '\u{fd3d}'), ('\u{fd50}', '\u{fd8f}'), ('\u{fd92}', '\u{fdc7}'),
-        ('\u{fdf0}', '\u{fdf9}'), ('\u{fe71}', '\u{fe71}'), ('\u{fe73}',
-        '\u{fe73}'), ('\u{fe77}', '\u{fe77}'), ('\u{fe79}', '\u{fe79}'),
-        ('\u{fe7b}', '\u{fe7b}'), ('\u{fe7d}', '\u{fe7d}'), ('\u{fe7f}',
-        '\u{fefc}'), ('\u{ff21}', '\u{ff3a}'), ('\u{ff41}', '\u{ff5a}'),
-        ('\u{ff66}', '\u{ff9d}'), ('\u{ffa0}', '\u{ffbe}'), ('\u{ffc2}',
-        '\u{ffc7}'), ('\u{ffca}', '\u{ffcf}'), ('\u{ffd2}', '\u{ffd7}'),
-        ('\u{ffda}', '\u{ffdc}'), ('\u{10000}', '\u{1000b}'), ('\u{1000d}',
-        '\u{10026}'), ('\u{10028}', '\u{1003a}'), ('\u{1003c}', '\u{1003d}'),
-        ('\u{1003f}', '\u{1004d}'), ('\u{10050}', '\u{1005d}'), ('\u{10080}',
-        '\u{100fa}'), ('\u{10140}', '\u{10174}'), ('\u{10280}', '\u{1029c}'),
-        ('\u{102a0}', '\u{102d0}'), ('\u{10300}', '\u{1031f}'), ('\u{10330}',
-        '\u{1034a}'), ('\u{10350}', '\u{10375}'), ('\u{10380}', '\u{1039d}'),
-        ('\u{103a0}', '\u{103c3}'), ('\u{103c8}', '\u{103cf}'), ('\u{103d1}',
-        '\u{103d5}'), ('\u{10400}', '\u{1049d}'), ('\u{10500}', '\u{10527}'),
-        ('\u{10530}', '\u{10563}'), ('\u{10600}', '\u{10736}'), ('\u{10740}',
-        '\u{10755}'), ('\u{10760}', '\u{10767}'), ('\u{10800}', '\u{10805}'),
-        ('\u{10808}', '\u{10808}'), ('\u{1080a}', '\u{10835}'), ('\u{10837}',
-        '\u{10838}'), ('\u{1083c}', '\u{1083c}'), ('\u{1083f}', '\u{10855}'),
-        ('\u{10860}', '\u{10876}'), ('\u{10880}', '\u{1089e}'), ('\u{108e0}',
-        '\u{108f2}'), ('\u{108f4}', '\u{108f5}'), ('\u{10900}', '\u{10915}'),
-        ('\u{10920}', '\u{10939}'), ('\u{10980}', '\u{109b7}'), ('\u{109be}',
-        '\u{109bf}'), ('\u{10a00}', '\u{10a00}'), ('\u{10a10}', '\u{10a13}'),
-        ('\u{10a15}', '\u{10a17}'), ('\u{10a19}', '\u{10a33}'), ('\u{10a60}',
-        '\u{10a7c}'), ('\u{10a80}', '\u{10a9c}'), ('\u{10ac0}', '\u{10ac7}'),
-        ('\u{10ac9}', '\u{10ae4}'), ('\u{10b00}', '\u{10b35}'), ('\u{10b40}',
-        '\u{10b55}'), ('\u{10b60}', '\u{10b72}'), ('\u{10b80}', '\u{10b91}'),
-        ('\u{10c00}', '\u{10c48}'), ('\u{10c80}', '\u{10cb2}'), ('\u{10cc0}',
-        '\u{10cf2}'), ('\u{11003}', '\u{11037}'), ('\u{11083}', '\u{110af}'),
-        ('\u{110d0}', '\u{110e8}'), ('\u{11103}', '\u{11126}'), ('\u{11150}',
-        '\u{11172}'), ('\u{11176}', '\u{11176}'), ('\u{11183}', '\u{111b2}'),
-        ('\u{111c1}', '\u{111c4}'), ('\u{111da}', '\u{111da}'), ('\u{111dc}',
-        '\u{111dc}'), ('\u{11200}', '\u{11211}'), ('\u{11213}', '\u{1122b}'),
-        ('\u{11280}', '\u{11286}'), ('\u{11288}', '\u{11288}'), ('\u{1128a}',
-        '\u{1128d}'), ('\u{1128f}', '\u{1129d}'), ('\u{1129f}', '\u{112a8}'),
-        ('\u{112b0}', '\u{112de}'), ('\u{11305}', '\u{1130c}'), ('\u{1130f}',
-        '\u{11310}'), ('\u{11313}', '\u{11328}'), ('\u{1132a}', '\u{11330}'),
-        ('\u{11332}', '\u{11333}'), ('\u{11335}', '\u{11339}'), ('\u{1133d}',
-        '\u{1133d}'), ('\u{11350}', '\u{11350}'), ('\u{1135d}', '\u{11361}'),
-        ('\u{11480}', '\u{114af}'), ('\u{114c4}', '\u{114c5}'), ('\u{114c7}',
-        '\u{114c7}'), ('\u{11580}', '\u{115ae}'), ('\u{115d8}', '\u{115db}'),
-        ('\u{11600}', '\u{1162f}'), ('\u{11644}', '\u{11644}'), ('\u{11680}',
-        '\u{116aa}'), ('\u{11700}', '\u{11719}'), ('\u{118a0}', '\u{118df}'),
-        ('\u{118ff}', '\u{118ff}'), ('\u{11ac0}', '\u{11af8}'), ('\u{12000}',
-        '\u{12399}'), ('\u{12400}', '\u{1246e}'), ('\u{12480}', '\u{12543}'),
-        ('\u{13000}', '\u{1342e}'), ('\u{14400}', '\u{14646}'), ('\u{16800}',
-        '\u{16a38}'), ('\u{16a40}', '\u{16a5e}'), ('\u{16ad0}', '\u{16aed}'),
-        ('\u{16b00}', '\u{16b2f}'), ('\u{16b40}', '\u{16b43}'), ('\u{16b63}',
-        '\u{16b77}'), ('\u{16b7d}', '\u{16b8f}'), ('\u{16f00}', '\u{16f44}'),
-        ('\u{16f50}', '\u{16f50}'), ('\u{16f93}', '\u{16f9f}'), ('\u{1b000}',
-        '\u{1b001}'), ('\u{1bc00}', '\u{1bc6a}'), ('\u{1bc70}', '\u{1bc7c}'),
-        ('\u{1bc80}', '\u{1bc88}'), ('\u{1bc90}', '\u{1bc99}'), ('\u{1d400}',
-        '\u{1d454}'), ('\u{1d456}', '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'),
-        ('\u{1d4a2}', '\u{1d4a2}'), ('\u{1d4a5}', '\u{1d4a6}'), ('\u{1d4a9}',
-        '\u{1d4ac}'), ('\u{1d4ae}', '\u{1d4b9}'), ('\u{1d4bb}', '\u{1d4bb}'),
-        ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d505}'), ('\u{1d507}',
-        '\u{1d50a}'), ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'),
-        ('\u{1d51e}', '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}',
-        '\u{1d544}'), ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'),
-        ('\u{1d552}', '\u{1d6a5}'), ('\u{1d6a8}', '\u{1d6c0}'), ('\u{1d6c2}',
-        '\u{1d6da}'), ('\u{1d6dc}', '\u{1d6fa}'), ('\u{1d6fc}', '\u{1d714}'),
-        ('\u{1d716}', '\u{1d734}'), ('\u{1d736}', '\u{1d74e}'), ('\u{1d750}',
-        '\u{1d76e}'), ('\u{1d770}', '\u{1d788}'), ('\u{1d78a}', '\u{1d7a8}'),
-        ('\u{1d7aa}', '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7cb}'), ('\u{1e800}',
-        '\u{1e8c4}'), ('\u{1ee00}', '\u{1ee03}'), ('\u{1ee05}', '\u{1ee1f}'),
-        ('\u{1ee21}', '\u{1ee22}'), ('\u{1ee24}', '\u{1ee24}'), ('\u{1ee27}',
-        '\u{1ee27}'), ('\u{1ee29}', '\u{1ee32}'), ('\u{1ee34}', '\u{1ee37}'),
-        ('\u{1ee39}', '\u{1ee39}'), ('\u{1ee3b}', '\u{1ee3b}'), ('\u{1ee42}',
-        '\u{1ee42}'), ('\u{1ee47}', '\u{1ee47}'), ('\u{1ee49}', '\u{1ee49}'),
-        ('\u{1ee4b}', '\u{1ee4b}'), ('\u{1ee4d}', '\u{1ee4f}'), ('\u{1ee51}',
-        '\u{1ee52}'), ('\u{1ee54}', '\u{1ee54}'), ('\u{1ee57}', '\u{1ee57}'),
-        ('\u{1ee59}', '\u{1ee59}'), ('\u{1ee5b}', '\u{1ee5b}'), ('\u{1ee5d}',
-        '\u{1ee5d}'), ('\u{1ee5f}', '\u{1ee5f}'), ('\u{1ee61}', '\u{1ee62}'),
-        ('\u{1ee64}', '\u{1ee64}'), ('\u{1ee67}', '\u{1ee6a}'), ('\u{1ee6c}',
-        '\u{1ee72}'), ('\u{1ee74}', '\u{1ee77}'), ('\u{1ee79}', '\u{1ee7c}'),
-        ('\u{1ee7e}', '\u{1ee7e}'), ('\u{1ee80}', '\u{1ee89}'), ('\u{1ee8b}',
-        '\u{1ee9b}'), ('\u{1eea1}', '\u{1eea3}'), ('\u{1eea5}', '\u{1eea9}'),
-        ('\u{1eeab}', '\u{1eebb}'), ('\u{20000}', '\u{2a6d6}'), ('\u{2a700}',
-        '\u{2b734}'), ('\u{2b740}', '\u{2b81d}'), ('\u{2b820}', '\u{2cea1}'),
-        ('\u{2f800}', '\u{2fa1d}')
-    ];
-
-}
-
-pub mod script {
-    pub const Ahom_table: &'static [(char, char)] = &[
-        ('\u{11700}', '\u{11719}'), ('\u{1171d}', '\u{1172b}'), ('\u{11730}',
-        '\u{1173f}')
-    ];
-
-    pub const Anatolian_Hieroglyphs_table: &'static [(char, char)] = &[
-        ('\u{14400}', '\u{14646}')
-    ];
-
-    pub const Arabic_table: &'static [(char, char)] = &[
-        ('\u{600}', '\u{604}'), ('\u{606}', '\u{60b}'), ('\u{60d}', '\u{61a}'),
-        ('\u{61e}', '\u{61e}'), ('\u{620}', '\u{63f}'), ('\u{641}', '\u{64a}'),
-        ('\u{656}', '\u{66f}'), ('\u{671}', '\u{6dc}'), ('\u{6de}', '\u{6ff}'),
-        ('\u{750}', '\u{77f}'), ('\u{8a0}', '\u{8b4}'), ('\u{8e3}', '\u{8ff}'),
-        ('\u{fb50}', '\u{fbc1}'), ('\u{fbd3}', '\u{fd3d}'), ('\u{fd50}',
-        '\u{fd8f}'), ('\u{fd92}', '\u{fdc7}'), ('\u{fdf0}', '\u{fdfd}'),
-        ('\u{fe70}', '\u{fe74}'), ('\u{fe76}', '\u{fefc}'), ('\u{10e60}',
-        '\u{10e7e}'), ('\u{1ee00}', '\u{1ee03}'), ('\u{1ee05}', '\u{1ee1f}'),
-        ('\u{1ee21}', '\u{1ee22}'), ('\u{1ee24}', '\u{1ee24}'), ('\u{1ee27}',
-        '\u{1ee27}'), ('\u{1ee29}', '\u{1ee32}'), ('\u{1ee34}', '\u{1ee37}'),
-        ('\u{1ee39}', '\u{1ee39}'), ('\u{1ee3b}', '\u{1ee3b}'), ('\u{1ee42}',
-        '\u{1ee42}'), ('\u{1ee47}', '\u{1ee47}'), ('\u{1ee49}', '\u{1ee49}'),
-        ('\u{1ee4b}', '\u{1ee4b}'), ('\u{1ee4d}', '\u{1ee4f}'), ('\u{1ee51}',
-        '\u{1ee52}'), ('\u{1ee54}', '\u{1ee54}'), ('\u{1ee57}', '\u{1ee57}'),
-        ('\u{1ee59}', '\u{1ee59}'), ('\u{1ee5b}', '\u{1ee5b}'), ('\u{1ee5d}',
-        '\u{1ee5d}'), ('\u{1ee5f}', '\u{1ee5f}'), ('\u{1ee61}', '\u{1ee62}'),
-        ('\u{1ee64}', '\u{1ee64}'), ('\u{1ee67}', '\u{1ee6a}'), ('\u{1ee6c}',
-        '\u{1ee72}'), ('\u{1ee74}', '\u{1ee77}'), ('\u{1ee79}', '\u{1ee7c}'),
-        ('\u{1ee7e}', '\u{1ee7e}'), ('\u{1ee80}', '\u{1ee89}'), ('\u{1ee8b}',
-        '\u{1ee9b}'), ('\u{1eea1}', '\u{1eea3}'), ('\u{1eea5}', '\u{1eea9}'),
-        ('\u{1eeab}', '\u{1eebb}'), ('\u{1eef0}', '\u{1eef1}')
-    ];
-
-    pub const Armenian_table: &'static [(char, char)] = &[
-        ('\u{531}', '\u{556}'), ('\u{559}', '\u{55f}'), ('\u{561}', '\u{587}'),
-        ('\u{58a}', '\u{58a}'), ('\u{58d}', '\u{58f}'), ('\u{fb13}',
-        '\u{fb17}')
-    ];
-
-    pub const Avestan_table: &'static [(char, char)] = &[
-        ('\u{10b00}', '\u{10b35}'), ('\u{10b39}', '\u{10b3f}')
-    ];
-
-    pub const Balinese_table: &'static [(char, char)] = &[
-        ('\u{1b00}', '\u{1b4b}'), ('\u{1b50}', '\u{1b7c}')
-    ];
-
-    pub const Bamum_table: &'static [(char, char)] = &[
-        ('\u{a6a0}', '\u{a6f7}'), ('\u{16800}', '\u{16a38}')
-    ];
-
-    pub const Bassa_Vah_table: &'static [(char, char)] = &[
-        ('\u{16ad0}', '\u{16aed}'), ('\u{16af0}', '\u{16af5}')
-    ];
-
-    pub const Batak_table: &'static [(char, char)] = &[
-        ('\u{1bc0}', '\u{1bf3}'), ('\u{1bfc}', '\u{1bff}')
-    ];
-
-    pub const Bengali_table: &'static [(char, char)] = &[
-        ('\u{980}', '\u{983}'), ('\u{985}', '\u{98c}'), ('\u{98f}', '\u{990}'),
-        ('\u{993}', '\u{9a8}'), ('\u{9aa}', '\u{9b0}'), ('\u{9b2}', '\u{9b2}'),
-        ('\u{9b6}', '\u{9b9}'), ('\u{9bc}', '\u{9c4}'), ('\u{9c7}', '\u{9c8}'),
-        ('\u{9cb}', '\u{9ce}'), ('\u{9d7}', '\u{9d7}'), ('\u{9dc}', '\u{9dd}'),
-        ('\u{9df}', '\u{9e3}'), ('\u{9e6}', '\u{9fb}')
-    ];
-
-    pub const Bopomofo_table: &'static [(char, char)] = &[
-        ('\u{2ea}', '\u{2eb}'), ('\u{3105}', '\u{312d}'), ('\u{31a0}',
-        '\u{31ba}')
-    ];
-
-    pub const Brahmi_table: &'static [(char, char)] = &[
-        ('\u{11000}', '\u{1104d}'), ('\u{11052}', '\u{1106f}'), ('\u{1107f}',
-        '\u{1107f}')
-    ];
-
-    pub const Braille_table: &'static [(char, char)] = &[
-        ('\u{2800}', '\u{28ff}')
-    ];
-
-    pub const Buginese_table: &'static [(char, char)] = &[
-        ('\u{1a00}', '\u{1a1b}'), ('\u{1a1e}', '\u{1a1f}')
-    ];
-
-    pub const Buhid_table: &'static [(char, char)] = &[
-        ('\u{1740}', '\u{1753}')
-    ];
-
-    pub const Canadian_Aboriginal_table: &'static [(char, char)] = &[
-        ('\u{1400}', '\u{167f}'), ('\u{18b0}', '\u{18f5}')
-    ];
-
-    pub const Carian_table: &'static [(char, char)] = &[
-        ('\u{102a0}', '\u{102d0}')
-    ];
-
-    pub const Caucasian_Albanian_table: &'static [(char, char)] = &[
-        ('\u{10530}', '\u{10563}'), ('\u{1056f}', '\u{1056f}')
-    ];
-
-    pub const Chakma_table: &'static [(char, char)] = &[
-        ('\u{11100}', '\u{11134}'), ('\u{11136}', '\u{11143}')
-    ];
-
-    pub const Cham_table: &'static [(char, char)] = &[
-        ('\u{aa00}', '\u{aa36}'), ('\u{aa40}', '\u{aa4d}'), ('\u{aa50}',
-        '\u{aa59}'), ('\u{aa5c}', '\u{aa5f}')
-    ];
-
-    pub const Cherokee_table: &'static [(char, char)] = &[
-        ('\u{13a0}', '\u{13f5}'), ('\u{13f8}', '\u{13fd}'), ('\u{ab70}',
-        '\u{abbf}')
-    ];
-
-    pub const Common_table: &'static [(char, char)] = &[
-        ('\u{0}', '\u{40}'), ('\u{5b}', '\u{60}'), ('\u{7b}', '\u{a9}'),
-        ('\u{ab}', '\u{b9}'), ('\u{bb}', '\u{bf}'), ('\u{d7}', '\u{d7}'),
-        ('\u{f7}', '\u{f7}'), ('\u{2b9}', '\u{2df}'), ('\u{2e5}', '\u{2e9}'),
-        ('\u{2ec}', '\u{2ff}'), ('\u{374}', '\u{374}'), ('\u{37e}', '\u{37e}'),
-        ('\u{385}', '\u{385}'), ('\u{387}', '\u{387}'), ('\u{589}', '\u{589}'),
-        ('\u{605}', '\u{605}'), ('\u{60c}', '\u{60c}'), ('\u{61b}', '\u{61c}'),
-        ('\u{61f}', '\u{61f}'), ('\u{640}', '\u{640}'), ('\u{6dd}', '\u{6dd}'),
-        ('\u{964}', '\u{965}'), ('\u{e3f}', '\u{e3f}'), ('\u{fd5}', '\u{fd8}'),
-        ('\u{10fb}', '\u{10fb}'), ('\u{16eb}', '\u{16ed}'), ('\u{1735}',
-        '\u{1736}'), ('\u{1802}', '\u{1803}'), ('\u{1805}', '\u{1805}'),
-        ('\u{1cd3}', '\u{1cd3}'), ('\u{1ce1}', '\u{1ce1}'), ('\u{1ce9}',
-        '\u{1cec}'), ('\u{1cee}', '\u{1cf3}'), ('\u{1cf5}', '\u{1cf6}'),
-        ('\u{2000}', '\u{200b}'), ('\u{200e}', '\u{2064}'), ('\u{2066}',
-        '\u{2070}'), ('\u{2074}', '\u{207e}'), ('\u{2080}', '\u{208e}'),
-        ('\u{20a0}', '\u{20be}'), ('\u{2100}', '\u{2125}'), ('\u{2127}',
-        '\u{2129}'), ('\u{212c}', '\u{2131}'), ('\u{2133}', '\u{214d}'),
-        ('\u{214f}', '\u{215f}'), ('\u{2189}', '\u{218b}'), ('\u{2190}',
-        '\u{23fa}'), ('\u{2400}', '\u{2426}'), ('\u{2440}', '\u{244a}'),
-        ('\u{2460}', '\u{27ff}'), ('\u{2900}', '\u{2b73}'), ('\u{2b76}',
-        '\u{2b95}'), ('\u{2b98}', '\u{2bb9}'), ('\u{2bbd}', '\u{2bc8}'),
-        ('\u{2bca}', '\u{2bd1}'), ('\u{2bec}', '\u{2bef}'), ('\u{2e00}',
-        '\u{2e42}'), ('\u{2ff0}', '\u{2ffb}'), ('\u{3000}', '\u{3004}'),
-        ('\u{3006}', '\u{3006}'), ('\u{3008}', '\u{3020}'), ('\u{3030}',
-        '\u{3037}'), ('\u{303c}', '\u{303f}'), ('\u{309b}', '\u{309c}'),
-        ('\u{30a0}', '\u{30a0}'), ('\u{30fb}', '\u{30fc}'), ('\u{3190}',
-        '\u{319f}'), ('\u{31c0}', '\u{31e3}'), ('\u{3220}', '\u{325f}'),
-        ('\u{327f}', '\u{32cf}'), ('\u{3358}', '\u{33ff}'), ('\u{4dc0}',
-        '\u{4dff}'), ('\u{a700}', '\u{a721}'), ('\u{a788}', '\u{a78a}'),
-        ('\u{a830}', '\u{a839}'), ('\u{a92e}', '\u{a92e}'), ('\u{a9cf}',
-        '\u{a9cf}'), ('\u{ab5b}', '\u{ab5b}'), ('\u{fd3e}', '\u{fd3f}'),
-        ('\u{fe10}', '\u{fe19}'), ('\u{fe30}', '\u{fe52}'), ('\u{fe54}',
-        '\u{fe66}'), ('\u{fe68}', '\u{fe6b}'), ('\u{feff}', '\u{feff}'),
-        ('\u{ff01}', '\u{ff20}'), ('\u{ff3b}', '\u{ff40}'), ('\u{ff5b}',
-        '\u{ff65}'), ('\u{ff70}', '\u{ff70}'), ('\u{ff9e}', '\u{ff9f}'),
-        ('\u{ffe0}', '\u{ffe6}'), ('\u{ffe8}', '\u{ffee}'), ('\u{fff9}',
-        '\u{fffd}'), ('\u{10100}', '\u{10102}'), ('\u{10107}', '\u{10133}'),
-        ('\u{10137}', '\u{1013f}'), ('\u{10190}', '\u{1019b}'), ('\u{101d0}',
-        '\u{101fc}'), ('\u{102e1}', '\u{102fb}'), ('\u{1bca0}', '\u{1bca3}'),
-        ('\u{1d000}', '\u{1d0f5}'), ('\u{1d100}', '\u{1d126}'), ('\u{1d129}',
-        '\u{1d166}'), ('\u{1d16a}', '\u{1d17a}'), ('\u{1d183}', '\u{1d184}'),
-        ('\u{1d18c}', '\u{1d1a9}'), ('\u{1d1ae}', '\u{1d1e8}'), ('\u{1d300}',
-        '\u{1d356}'), ('\u{1d360}', '\u{1d371}'), ('\u{1d400}', '\u{1d454}'),
-        ('\u{1d456}', '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'), ('\u{1d4a2}',
-        '\u{1d4a2}'), ('\u{1d4a5}', '\u{1d4a6}'), ('\u{1d4a9}', '\u{1d4ac}'),
-        ('\u{1d4ae}', '\u{1d4b9}'), ('\u{1d4bb}', '\u{1d4bb}'), ('\u{1d4bd}',
-        '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d505}'), ('\u{1d507}', '\u{1d50a}'),
-        ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'), ('\u{1d51e}',
-        '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}', '\u{1d544}'),
-        ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'), ('\u{1d552}',
-        '\u{1d6a5}'), ('\u{1d6a8}', '\u{1d7cb}'), ('\u{1d7ce}', '\u{1d7ff}'),
-        ('\u{1f000}', '\u{1f02b}'), ('\u{1f030}', '\u{1f093}'), ('\u{1f0a0}',
-        '\u{1f0ae}'), ('\u{1f0b1}', '\u{1f0bf}'), ('\u{1f0c1}', '\u{1f0cf}'),
-        ('\u{1f0d1}', '\u{1f0f5}'), ('\u{1f100}', '\u{1f10c}'), ('\u{1f110}',
-        '\u{1f12e}'), ('\u{1f130}', '\u{1f16b}'), ('\u{1f170}', '\u{1f19a}'),
-        ('\u{1f1e6}', '\u{1f1ff}'), ('\u{1f201}', '\u{1f202}'), ('\u{1f210}',
-        '\u{1f23a}'), ('\u{1f240}', '\u{1f248}'), ('\u{1f250}', '\u{1f251}'),
-        ('\u{1f300}', '\u{1f579}'), ('\u{1f57b}', '\u{1f5a3}'), ('\u{1f5a5}',
-        '\u{1f6d0}'), ('\u{1f6e0}', '\u{1f6ec}'), ('\u{1f6f0}', '\u{1f6f3}'),
-        ('\u{1f700}', '\u{1f773}'), ('\u{1f780}', '\u{1f7d4}'), ('\u{1f800}',
-        '\u{1f80b}'), ('\u{1f810}', '\u{1f847}'), ('\u{1f850}', '\u{1f859}'),
-        ('\u{1f860}', '\u{1f887}'), ('\u{1f890}', '\u{1f8ad}'), ('\u{1f910}',
-        '\u{1f918}'), ('\u{1f980}', '\u{1f984}'), ('\u{1f9c0}', '\u{1f9c0}'),
-        ('\u{e0001}', '\u{e0001}'), ('\u{e0020}', '\u{e007f}')
-    ];
-
-    pub const Coptic_table: &'static [(char, char)] = &[
-        ('\u{3e2}', '\u{3ef}'), ('\u{2c80}', '\u{2cf3}'), ('\u{2cf9}',
-        '\u{2cff}')
-    ];
-
-    pub const Cuneiform_table: &'static [(char, char)] = &[
-        ('\u{12000}', '\u{12399}'), ('\u{12400}', '\u{1246e}'), ('\u{12470}',
-        '\u{12474}'), ('\u{12480}', '\u{12543}')
-    ];
-
-    pub const Cypriot_table: &'static [(char, char)] = &[
-        ('\u{10800}', '\u{10805}'), ('\u{10808}', '\u{10808}'), ('\u{1080a}',
-        '\u{10835}'), ('\u{10837}', '\u{10838}'), ('\u{1083c}', '\u{1083c}'),
-        ('\u{1083f}', '\u{1083f}')
-    ];
-
-    pub const Cyrillic_table: &'static [(char, char)] = &[
-        ('\u{400}', '\u{484}'), ('\u{487}', '\u{52f}'), ('\u{1d2b}',
-        '\u{1d2b}'), ('\u{1d78}', '\u{1d78}'), ('\u{2de0}', '\u{2dff}'),
-        ('\u{a640}', '\u{a69f}'), ('\u{fe2e}', '\u{fe2f}')
-    ];
-
-    pub const Deseret_table: &'static [(char, char)] = &[
-        ('\u{10400}', '\u{1044f}')
-    ];
-
-    pub const Devanagari_table: &'static [(char, char)] = &[
-        ('\u{900}', '\u{950}'), ('\u{953}', '\u{963}'), ('\u{966}', '\u{97f}'),
-        ('\u{a8e0}', '\u{a8fd}')
-    ];
-
-    pub const Duployan_table: &'static [(char, char)] = &[
-        ('\u{1bc00}', '\u{1bc6a}'), ('\u{1bc70}', '\u{1bc7c}'), ('\u{1bc80}',
-        '\u{1bc88}'), ('\u{1bc90}', '\u{1bc99}'), ('\u{1bc9c}', '\u{1bc9f}')
-    ];
-
-    pub const Egyptian_Hieroglyphs_table: &'static [(char, char)] = &[
-        ('\u{13000}', '\u{1342e}')
-    ];
-
-    pub const Elbasan_table: &'static [(char, char)] = &[
-        ('\u{10500}', '\u{10527}')
-    ];
-
-    pub const Ethiopic_table: &'static [(char, char)] = &[
-        ('\u{1200}', '\u{1248}'), ('\u{124a}', '\u{124d}'), ('\u{1250}',
-        '\u{1256}'), ('\u{1258}', '\u{1258}'), ('\u{125a}', '\u{125d}'),
-        ('\u{1260}', '\u{1288}'), ('\u{128a}', '\u{128d}'), ('\u{1290}',
-        '\u{12b0}'), ('\u{12b2}', '\u{12b5}'), ('\u{12b8}', '\u{12be}'),
-        ('\u{12c0}', '\u{12c0}'), ('\u{12c2}', '\u{12c5}'), ('\u{12c8}',
-        '\u{12d6}'), ('\u{12d8}', '\u{1310}'), ('\u{1312}', '\u{1315}'),
-        ('\u{1318}', '\u{135a}'), ('\u{135d}', '\u{137c}'), ('\u{1380}',
-        '\u{1399}'), ('\u{2d80}', '\u{2d96}'), ('\u{2da0}', '\u{2da6}'),
-        ('\u{2da8}', '\u{2dae}'), ('\u{2db0}', '\u{2db6}'), ('\u{2db8}',
-        '\u{2dbe}'), ('\u{2dc0}', '\u{2dc6}'), ('\u{2dc8}', '\u{2dce}'),
-        ('\u{2dd0}', '\u{2dd6}'), ('\u{2dd8}', '\u{2dde}'), ('\u{ab01}',
-        '\u{ab06}'), ('\u{ab09}', '\u{ab0e}'), ('\u{ab11}', '\u{ab16}'),
-        ('\u{ab20}', '\u{ab26}'), ('\u{ab28}', '\u{ab2e}')
-    ];
-
-    pub const Georgian_table: &'static [(char, char)] = &[
-        ('\u{10a0}', '\u{10c5}'), ('\u{10c7}', '\u{10c7}'), ('\u{10cd}',
-        '\u{10cd}'), ('\u{10d0}', '\u{10fa}'), ('\u{10fc}', '\u{10ff}'),
-        ('\u{2d00}', '\u{2d25}'), ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}',
-        '\u{2d2d}')
-    ];
-
-    pub const Glagolitic_table: &'static [(char, char)] = &[
-        ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}', '\u{2c5e}')
-    ];
-
-    pub const Gothic_table: &'static [(char, char)] = &[
-        ('\u{10330}', '\u{1034a}')
-    ];
-
-    pub const Grantha_table: &'static [(char, char)] = &[
-        ('\u{11300}', '\u{11303}'), ('\u{11305}', '\u{1130c}'), ('\u{1130f}',
-        '\u{11310}'), ('\u{11313}', '\u{11328}'), ('\u{1132a}', '\u{11330}'),
-        ('\u{11332}', '\u{11333}'), ('\u{11335}', '\u{11339}'), ('\u{1133c}',
-        '\u{11344}'), ('\u{11347}', '\u{11348}'), ('\u{1134b}', '\u{1134d}'),
-        ('\u{11350}', '\u{11350}'), ('\u{11357}', '\u{11357}'), ('\u{1135d}',
-        '\u{11363}'), ('\u{11366}', '\u{1136c}'), ('\u{11370}', '\u{11374}')
-    ];
-
-    pub const Greek_table: &'static [(char, char)] = &[
-        ('\u{370}', '\u{373}'), ('\u{375}', '\u{377}'), ('\u{37a}', '\u{37d}'),
-        ('\u{37f}', '\u{37f}'), ('\u{384}', '\u{384}'), ('\u{386}', '\u{386}'),
-        ('\u{388}', '\u{38a}'), ('\u{38c}', '\u{38c}'), ('\u{38e}', '\u{3a1}'),
-        ('\u{3a3}', '\u{3e1}'), ('\u{3f0}', '\u{3ff}'), ('\u{1d26}',
-        '\u{1d2a}'), ('\u{1d5d}', '\u{1d61}'), ('\u{1d66}', '\u{1d6a}'),
-        ('\u{1dbf}', '\u{1dbf}'), ('\u{1f00}', '\u{1f15}'), ('\u{1f18}',
-        '\u{1f1d}'), ('\u{1f20}', '\u{1f45}'), ('\u{1f48}', '\u{1f4d}'),
-        ('\u{1f50}', '\u{1f57}'), ('\u{1f59}', '\u{1f59}'), ('\u{1f5b}',
-        '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'), ('\u{1f5f}', '\u{1f7d}'),
-        ('\u{1f80}', '\u{1fb4}'), ('\u{1fb6}', '\u{1fc4}'), ('\u{1fc6}',
-        '\u{1fd3}'), ('\u{1fd6}', '\u{1fdb}'), ('\u{1fdd}', '\u{1fef}'),
-        ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}', '\u{1ffe}'), ('\u{2126}',
-        '\u{2126}'), ('\u{ab65}', '\u{ab65}'), ('\u{10140}', '\u{1018c}'),
-        ('\u{101a0}', '\u{101a0}'), ('\u{1d200}', '\u{1d245}')
-    ];
-
-    pub const Gujarati_table: &'static [(char, char)] = &[
-        ('\u{a81}', '\u{a83}'), ('\u{a85}', '\u{a8d}'), ('\u{a8f}', '\u{a91}'),
-        ('\u{a93}', '\u{aa8}'), ('\u{aaa}', '\u{ab0}'), ('\u{ab2}', '\u{ab3}'),
-        ('\u{ab5}', '\u{ab9}'), ('\u{abc}', '\u{ac5}'), ('\u{ac7}', '\u{ac9}'),
-        ('\u{acb}', '\u{acd}'), ('\u{ad0}', '\u{ad0}'), ('\u{ae0}', '\u{ae3}'),
-        ('\u{ae6}', '\u{af1}'), ('\u{af9}', '\u{af9}')
-    ];
-
-    pub const Gurmukhi_table: &'static [(char, char)] = &[
-        ('\u{a01}', '\u{a03}'), ('\u{a05}', '\u{a0a}'), ('\u{a0f}', '\u{a10}'),
-        ('\u{a13}', '\u{a28}'), ('\u{a2a}', '\u{a30}'), ('\u{a32}', '\u{a33}'),
-        ('\u{a35}', '\u{a36}'), ('\u{a38}', '\u{a39}'), ('\u{a3c}', '\u{a3c}'),
-        ('\u{a3e}', '\u{a42}'), ('\u{a47}', '\u{a48}'), ('\u{a4b}', '\u{a4d}'),
-        ('\u{a51}', '\u{a51}'), ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'),
-        ('\u{a66}', '\u{a75}')
-    ];
-
-    pub const Han_table: &'static [(char, char)] = &[
-        ('\u{2e80}', '\u{2e99}'), ('\u{2e9b}', '\u{2ef3}'), ('\u{2f00}',
-        '\u{2fd5}'), ('\u{3005}', '\u{3005}'), ('\u{3007}', '\u{3007}'),
-        ('\u{3021}', '\u{3029}'), ('\u{3038}', '\u{303b}'), ('\u{3400}',
-        '\u{4db5}'), ('\u{4e00}', '\u{9fd5}'), ('\u{f900}', '\u{fa6d}'),
-        ('\u{fa70}', '\u{fad9}'), ('\u{20000}', '\u{2a6d6}'), ('\u{2a700}',
-        '\u{2b734}'), ('\u{2b740}', '\u{2b81d}'), ('\u{2b820}', '\u{2cea1}'),
-        ('\u{2f800}', '\u{2fa1d}')
-    ];
-
-    pub const Hangul_table: &'static [(char, char)] = &[
-        ('\u{1100}', '\u{11ff}'), ('\u{302e}', '\u{302f}'), ('\u{3131}',
-        '\u{318e}'), ('\u{3200}', '\u{321e}'), ('\u{3260}', '\u{327e}'),
-        ('\u{a960}', '\u{a97c}'), ('\u{ac00}', '\u{d7a3}'), ('\u{d7b0}',
-        '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'), ('\u{ffa0}', '\u{ffbe}'),
-        ('\u{ffc2}', '\u{ffc7}'), ('\u{ffca}', '\u{ffcf}'), ('\u{ffd2}',
-        '\u{ffd7}'), ('\u{ffda}', '\u{ffdc}')
-    ];
-
-    pub const Hanunoo_table: &'static [(char, char)] = &[
-        ('\u{1720}', '\u{1734}')
-    ];
-
-    pub const Hatran_table: &'static [(char, char)] = &[
-        ('\u{108e0}', '\u{108f2}'), ('\u{108f4}', '\u{108f5}'), ('\u{108fb}',
-        '\u{108ff}')
-    ];
-
-    pub const Hebrew_table: &'static [(char, char)] = &[
-        ('\u{591}', '\u{5c7}'), ('\u{5d0}', '\u{5ea}'), ('\u{5f0}', '\u{5f4}'),
-        ('\u{fb1d}', '\u{fb36}'), ('\u{fb38}', '\u{fb3c}'), ('\u{fb3e}',
-        '\u{fb3e}'), ('\u{fb40}', '\u{fb41}'), ('\u{fb43}', '\u{fb44}'),
-        ('\u{fb46}', '\u{fb4f}')
-    ];
-
-    pub const Hiragana_table: &'static [(char, char)] = &[
-        ('\u{3041}', '\u{3096}'), ('\u{309d}', '\u{309f}'), ('\u{1b001}',
-        '\u{1b001}'), ('\u{1f200}', '\u{1f200}')
-    ];
-
-    pub const Imperial_Aramaic_table: &'static [(char, char)] = &[
-        ('\u{10840}', '\u{10855}'), ('\u{10857}', '\u{1085f}')
-    ];
-
-    pub const Inherited_table: &'static [(char, char)] = &[
-        ('\u{300}', '\u{36f}'), ('\u{485}', '\u{486}'), ('\u{64b}', '\u{655}'),
-        ('\u{670}', '\u{670}'), ('\u{951}', '\u{952}'), ('\u{1ab0}',
-        '\u{1abe}'), ('\u{1cd0}', '\u{1cd2}'), ('\u{1cd4}', '\u{1ce0}'),
-        ('\u{1ce2}', '\u{1ce8}'), ('\u{1ced}', '\u{1ced}'), ('\u{1cf4}',
-        '\u{1cf4}'), ('\u{1cf8}', '\u{1cf9}'), ('\u{1dc0}', '\u{1df5}'),
-        ('\u{1dfc}', '\u{1dff}'), ('\u{200c}', '\u{200d}'), ('\u{20d0}',
-        '\u{20f0}'), ('\u{302a}', '\u{302d}'), ('\u{3099}', '\u{309a}'),
-        ('\u{fe00}', '\u{fe0f}'), ('\u{fe20}', '\u{fe2d}'), ('\u{101fd}',
-        '\u{101fd}'), ('\u{102e0}', '\u{102e0}'), ('\u{1d167}', '\u{1d169}'),
-        ('\u{1d17b}', '\u{1d182}'), ('\u{1d185}', '\u{1d18b}'), ('\u{1d1aa}',
-        '\u{1d1ad}'), ('\u{e0100}', '\u{e01ef}')
-    ];
-
-    pub const Inscriptional_Pahlavi_table: &'static [(char, char)] = &[
-        ('\u{10b60}', '\u{10b72}'), ('\u{10b78}', '\u{10b7f}')
-    ];
-
-    pub const Inscriptional_Parthian_table: &'static [(char, char)] = &[
-        ('\u{10b40}', '\u{10b55}'), ('\u{10b58}', '\u{10b5f}')
-    ];
-
-    pub const Javanese_table: &'static [(char, char)] = &[
-        ('\u{a980}', '\u{a9cd}'), ('\u{a9d0}', '\u{a9d9}'), ('\u{a9de}',
-        '\u{a9df}')
-    ];
-
-    pub const Kaithi_table: &'static [(char, char)] = &[
-        ('\u{11080}', '\u{110c1}')
-    ];
-
-    pub const Kannada_table: &'static [(char, char)] = &[
-        ('\u{c81}', '\u{c83}'), ('\u{c85}', '\u{c8c}'), ('\u{c8e}', '\u{c90}'),
-        ('\u{c92}', '\u{ca8}'), ('\u{caa}', '\u{cb3}'), ('\u{cb5}', '\u{cb9}'),
-        ('\u{cbc}', '\u{cc4}'), ('\u{cc6}', '\u{cc8}'), ('\u{cca}', '\u{ccd}'),
-        ('\u{cd5}', '\u{cd6}'), ('\u{cde}', '\u{cde}'), ('\u{ce0}', '\u{ce3}'),
-        ('\u{ce6}', '\u{cef}'), ('\u{cf1}', '\u{cf2}')
-    ];
-
-    pub const Katakana_table: &'static [(char, char)] = &[
-        ('\u{30a1}', '\u{30fa}'), ('\u{30fd}', '\u{30ff}'), ('\u{31f0}',
-        '\u{31ff}'), ('\u{32d0}', '\u{32fe}'), ('\u{3300}', '\u{3357}'),
-        ('\u{ff66}', '\u{ff6f}'), ('\u{ff71}', '\u{ff9d}'), ('\u{1b000}',
-        '\u{1b000}')
-    ];
-
-    pub const Kayah_Li_table: &'static [(char, char)] = &[
-        ('\u{a900}', '\u{a92d}'), ('\u{a92f}', '\u{a92f}')
-    ];
-
-    pub const Kharoshthi_table: &'static [(char, char)] = &[
-        ('\u{10a00}', '\u{10a03}'), ('\u{10a05}', '\u{10a06}'), ('\u{10a0c}',
-        '\u{10a13}'), ('\u{10a15}', '\u{10a17}'), ('\u{10a19}', '\u{10a33}'),
-        ('\u{10a38}', '\u{10a3a}'), ('\u{10a3f}', '\u{10a47}'), ('\u{10a50}',
-        '\u{10a58}')
-    ];
-
-    pub const Khmer_table: &'static [(char, char)] = &[
-        ('\u{1780}', '\u{17dd}'), ('\u{17e0}', '\u{17e9}'), ('\u{17f0}',
-        '\u{17f9}'), ('\u{19e0}', '\u{19ff}')
-    ];
-
-    pub const Khojki_table: &'static [(char, char)] = &[
-        ('\u{11200}', '\u{11211}'), ('\u{11213}', '\u{1123d}')
-    ];
-
-    pub const Khudawadi_table: &'static [(char, char)] = &[
-        ('\u{112b0}', '\u{112ea}'), ('\u{112f0}', '\u{112f9}')
-    ];
-
-    pub const Lao_table: &'static [(char, char)] = &[
-        ('\u{e81}', '\u{e82}'), ('\u{e84}', '\u{e84}'), ('\u{e87}', '\u{e88}'),
-        ('\u{e8a}', '\u{e8a}'), ('\u{e8d}', '\u{e8d}'), ('\u{e94}', '\u{e97}'),
-        ('\u{e99}', '\u{e9f}'), ('\u{ea1}', '\u{ea3}'), ('\u{ea5}', '\u{ea5}'),
-        ('\u{ea7}', '\u{ea7}'), ('\u{eaa}', '\u{eab}'), ('\u{ead}', '\u{eb9}'),
-        ('\u{ebb}', '\u{ebd}'), ('\u{ec0}', '\u{ec4}'), ('\u{ec6}', '\u{ec6}'),
-        ('\u{ec8}', '\u{ecd}'), ('\u{ed0}', '\u{ed9}'), ('\u{edc}', '\u{edf}')
-    ];
-
-    pub const Latin_table: &'static [(char, char)] = &[
-        ('\u{41}', '\u{5a}'), ('\u{61}', '\u{7a}'), ('\u{aa}', '\u{aa}'),
-        ('\u{ba}', '\u{ba}'), ('\u{c0}', '\u{d6}'), ('\u{d8}', '\u{f6}'),
-        ('\u{f8}', '\u{2b8}'), ('\u{2e0}', '\u{2e4}'), ('\u{1d00}', '\u{1d25}'),
-        ('\u{1d2c}', '\u{1d5c}'), ('\u{1d62}', '\u{1d65}'), ('\u{1d6b}',
-        '\u{1d77}'), ('\u{1d79}', '\u{1dbe}'), ('\u{1e00}', '\u{1eff}'),
-        ('\u{2071}', '\u{2071}'), ('\u{207f}', '\u{207f}'), ('\u{2090}',
-        '\u{209c}'), ('\u{212a}', '\u{212b}'), ('\u{2132}', '\u{2132}'),
-        ('\u{214e}', '\u{214e}'), ('\u{2160}', '\u{2188}'), ('\u{2c60}',
-        '\u{2c7f}'), ('\u{a722}', '\u{a787}'), ('\u{a78b}', '\u{a7ad}'),
-        ('\u{a7b0}', '\u{a7b7}'), ('\u{a7f7}', '\u{a7ff}'), ('\u{ab30}',
-        '\u{ab5a}'), ('\u{ab5c}', '\u{ab64}'), ('\u{fb00}', '\u{fb06}'),
-        ('\u{ff21}', '\u{ff3a}'), ('\u{ff41}', '\u{ff5a}')
-    ];
-
-    pub const Lepcha_table: &'static [(char, char)] = &[
-        ('\u{1c00}', '\u{1c37}'), ('\u{1c3b}', '\u{1c49}'), ('\u{1c4d}',
-        '\u{1c4f}')
-    ];
-
-    pub const Limbu_table: &'static [(char, char)] = &[
-        ('\u{1900}', '\u{191e}'), ('\u{1920}', '\u{192b}'), ('\u{1930}',
-        '\u{193b}'), ('\u{1940}', '\u{1940}'), ('\u{1944}', '\u{194f}')
-    ];
-
-    pub const Linear_A_table: &'static [(char, char)] = &[
-        ('\u{10600}', '\u{10736}'), ('\u{10740}', '\u{10755}'), ('\u{10760}',
-        '\u{10767}')
-    ];
-
-    pub const Linear_B_table: &'static [(char, char)] = &[
-        ('\u{10000}', '\u{1000b}'), ('\u{1000d}', '\u{10026}'), ('\u{10028}',
-        '\u{1003a}'), ('\u{1003c}', '\u{1003d}'), ('\u{1003f}', '\u{1004d}'),
-        ('\u{10050}', '\u{1005d}'), ('\u{10080}', '\u{100fa}')
-    ];
-
-    pub const Lisu_table: &'static [(char, char)] = &[
-        ('\u{a4d0}', '\u{a4ff}')
-    ];
-
-    pub const Lycian_table: &'static [(char, char)] = &[
-        ('\u{10280}', '\u{1029c}')
-    ];
-
-    pub const Lydian_table: &'static [(char, char)] = &[
-        ('\u{10920}', '\u{10939}'), ('\u{1093f}', '\u{1093f}')
-    ];
-
-    pub const Mahajani_table: &'static [(char, char)] = &[
-        ('\u{11150}', '\u{11176}')
-    ];
-
-    pub const Malayalam_table: &'static [(char, char)] = &[
-        ('\u{d01}', '\u{d03}'), ('\u{d05}', '\u{d0c}'), ('\u{d0e}', '\u{d10}'),
-        ('\u{d12}', '\u{d3a}'), ('\u{d3d}', '\u{d44}'), ('\u{d46}', '\u{d48}'),
-        ('\u{d4a}', '\u{d4e}'), ('\u{d57}', '\u{d57}'), ('\u{d5f}', '\u{d63}'),
-        ('\u{d66}', '\u{d75}'), ('\u{d79}', '\u{d7f}')
-    ];
-
-    pub const Mandaic_table: &'static [(char, char)] = &[
-        ('\u{840}', '\u{85b}'), ('\u{85e}', '\u{85e}')
-    ];
-
-    pub const Manichaean_table: &'static [(char, char)] = &[
-        ('\u{10ac0}', '\u{10ae6}'), ('\u{10aeb}', '\u{10af6}')
-    ];
-
-    pub const Meetei_Mayek_table: &'static [(char, char)] = &[
-        ('\u{aae0}', '\u{aaf6}'), ('\u{abc0}', '\u{abed}'), ('\u{abf0}',
-        '\u{abf9}')
-    ];
-
-    pub const Mende_Kikakui_table: &'static [(char, char)] = &[
-        ('\u{1e800}', '\u{1e8c4}'), ('\u{1e8c7}', '\u{1e8d6}')
-    ];
-
-    pub const Meroitic_Cursive_table: &'static [(char, char)] = &[
-        ('\u{109a0}', '\u{109b7}'), ('\u{109bc}', '\u{109cf}'), ('\u{109d2}',
-        '\u{109ff}')
-    ];
-
-    pub const Meroitic_Hieroglyphs_table: &'static [(char, char)] = &[
-        ('\u{10980}', '\u{1099f}')
-    ];
-
-    pub const Miao_table: &'static [(char, char)] = &[
-        ('\u{16f00}', '\u{16f44}'), ('\u{16f50}', '\u{16f7e}'), ('\u{16f8f}',
-        '\u{16f9f}')
-    ];
-
-    pub const Modi_table: &'static [(char, char)] = &[
-        ('\u{11600}', '\u{11644}'), ('\u{11650}', '\u{11659}')
-    ];
-
-    pub const Mongolian_table: &'static [(char, char)] = &[
-        ('\u{1800}', '\u{1801}'), ('\u{1804}', '\u{1804}'), ('\u{1806}',
-        '\u{180e}'), ('\u{1810}', '\u{1819}'), ('\u{1820}', '\u{1877}'),
-        ('\u{1880}', '\u{18aa}')
-    ];
-
-    pub const Mro_table: &'static [(char, char)] = &[
-        ('\u{16a40}', '\u{16a5e}'), ('\u{16a60}', '\u{16a69}'), ('\u{16a6e}',
-        '\u{16a6f}')
-    ];
-
-    pub const Multani_table: &'static [(char, char)] = &[
-        ('\u{11280}', '\u{11286}'), ('\u{11288}', '\u{11288}'), ('\u{1128a}',
-        '\u{1128d}'), ('\u{1128f}', '\u{1129d}'), ('\u{1129f}', '\u{112a9}')
-    ];
-
-    pub const Myanmar_table: &'static [(char, char)] = &[
-        ('\u{1000}', '\u{109f}'), ('\u{a9e0}', '\u{a9fe}'), ('\u{aa60}',
-        '\u{aa7f}')
-    ];
-
-    pub const Nabataean_table: &'static [(char, char)] = &[
-        ('\u{10880}', '\u{1089e}'), ('\u{108a7}', '\u{108af}')
-    ];
-
-    pub const New_Tai_Lue_table: &'static [(char, char)] = &[
-        ('\u{1980}', '\u{19ab}'), ('\u{19b0}', '\u{19c9}'), ('\u{19d0}',
-        '\u{19da}'), ('\u{19de}', '\u{19df}')
-    ];
-
-    pub const Nko_table: &'static [(char, char)] = &[
-        ('\u{7c0}', '\u{7fa}')
-    ];
-
-    pub const Ogham_table: &'static [(char, char)] = &[
-        ('\u{1680}', '\u{169c}')
-    ];
-
-    pub const Ol_Chiki_table: &'static [(char, char)] = &[
-        ('\u{1c50}', '\u{1c7f}')
-    ];
-
-    pub const Old_Hungarian_table: &'static [(char, char)] = &[
-        ('\u{10c80}', '\u{10cb2}'), ('\u{10cc0}', '\u{10cf2}'), ('\u{10cfa}',
-        '\u{10cff}')
-    ];
-
-    pub const Old_Italic_table: &'static [(char, char)] = &[
-        ('\u{10300}', '\u{10323}')
-    ];
-
-    pub const Old_North_Arabian_table: &'static [(char, char)] = &[
-        ('\u{10a80}', '\u{10a9f}')
-    ];
-
-    pub const Old_Permic_table: &'static [(char, char)] = &[
-        ('\u{10350}', '\u{1037a}')
-    ];
-
-    pub const Old_Persian_table: &'static [(char, char)] = &[
-        ('\u{103a0}', '\u{103c3}'), ('\u{103c8}', '\u{103d5}')
-    ];
-
-    pub const Old_South_Arabian_table: &'static [(char, char)] = &[
-        ('\u{10a60}', '\u{10a7f}')
-    ];
-
-    pub const Old_Turkic_table: &'static [(char, char)] = &[
-        ('\u{10c00}', '\u{10c48}')
-    ];
-
-    pub const Oriya_table: &'static [(char, char)] = &[
-        ('\u{b01}', '\u{b03}'), ('\u{b05}', '\u{b0c}'), ('\u{b0f}', '\u{b10}'),
-        ('\u{b13}', '\u{b28}'), ('\u{b2a}', '\u{b30}'), ('\u{b32}', '\u{b33}'),
-        ('\u{b35}', '\u{b39}'), ('\u{b3c}', '\u{b44}'), ('\u{b47}', '\u{b48}'),
-        ('\u{b4b}', '\u{b4d}'), ('\u{b56}', '\u{b57}'), ('\u{b5c}', '\u{b5d}'),
-        ('\u{b5f}', '\u{b63}'), ('\u{b66}', '\u{b77}')
-    ];
-
-    pub const Osmanya_table: &'static [(char, char)] = &[
-        ('\u{10480}', '\u{1049d}'), ('\u{104a0}', '\u{104a9}')
-    ];
-
-    pub const Pahawh_Hmong_table: &'static [(char, char)] = &[
-        ('\u{16b00}', '\u{16b45}'), ('\u{16b50}', '\u{16b59}'), ('\u{16b5b}',
-        '\u{16b61}'), ('\u{16b63}', '\u{16b77}'), ('\u{16b7d}', '\u{16b8f}')
-    ];
-
-    pub const Palmyrene_table: &'static [(char, char)] = &[
-        ('\u{10860}', '\u{1087f}')
-    ];
-
-    pub const Pau_Cin_Hau_table: &'static [(char, char)] = &[
-        ('\u{11ac0}', '\u{11af8}')
-    ];
-
-    pub const Phags_Pa_table: &'static [(char, char)] = &[
-        ('\u{a840}', '\u{a877}')
-    ];
-
-    pub const Phoenician_table: &'static [(char, char)] = &[
-        ('\u{10900}', '\u{1091b}'), ('\u{1091f}', '\u{1091f}')
-    ];
-
-    pub const Psalter_Pahlavi_table: &'static [(char, char)] = &[
-        ('\u{10b80}', '\u{10b91}'), ('\u{10b99}', '\u{10b9c}'), ('\u{10ba9}',
-        '\u{10baf}')
-    ];
-
-    pub const Rejang_table: &'static [(char, char)] = &[
-        ('\u{a930}', '\u{a953}'), ('\u{a95f}', '\u{a95f}')
-    ];
-
-    pub const Runic_table: &'static [(char, char)] = &[
-        ('\u{16a0}', '\u{16ea}'), ('\u{16ee}', '\u{16f8}')
-    ];
-
-    pub const Samaritan_table: &'static [(char, char)] = &[
-        ('\u{800}', '\u{82d}'), ('\u{830}', '\u{83e}')
-    ];
-
-    pub const Saurashtra_table: &'static [(char, char)] = &[
-        ('\u{a880}', '\u{a8c4}'), ('\u{a8ce}', '\u{a8d9}')
-    ];
-
-    pub const Sharada_table: &'static [(char, char)] = &[
-        ('\u{11180}', '\u{111cd}'), ('\u{111d0}', '\u{111df}')
-    ];
-
-    pub const Shavian_table: &'static [(char, char)] = &[
-        ('\u{10450}', '\u{1047f}')
-    ];
-
-    pub const Siddham_table: &'static [(char, char)] = &[
-        ('\u{11580}', '\u{115b5}'), ('\u{115b8}', '\u{115dd}')
-    ];
-
-    pub const SignWriting_table: &'static [(char, char)] = &[
-        ('\u{1d800}', '\u{1da8b}'), ('\u{1da9b}', '\u{1da9f}'), ('\u{1daa1}',
-        '\u{1daaf}')
-    ];
-
-    pub const Sinhala_table: &'static [(char, char)] = &[
-        ('\u{d82}', '\u{d83}'), ('\u{d85}', '\u{d96}'), ('\u{d9a}', '\u{db1}'),
-        ('\u{db3}', '\u{dbb}'), ('\u{dbd}', '\u{dbd}'), ('\u{dc0}', '\u{dc6}'),
-        ('\u{dca}', '\u{dca}'), ('\u{dcf}', '\u{dd4}'), ('\u{dd6}', '\u{dd6}'),
-        ('\u{dd8}', '\u{ddf}'), ('\u{de6}', '\u{def}'), ('\u{df2}', '\u{df4}'),
-        ('\u{111e1}', '\u{111f4}')
-    ];
-
-    pub const Sora_Sompeng_table: &'static [(char, char)] = &[
-        ('\u{110d0}', '\u{110e8}'), ('\u{110f0}', '\u{110f9}')
-    ];
-
-    pub const Sundanese_table: &'static [(char, char)] = &[
-        ('\u{1b80}', '\u{1bbf}'), ('\u{1cc0}', '\u{1cc7}')
-    ];
-
-    pub const Syloti_Nagri_table: &'static [(char, char)] = &[
-        ('\u{a800}', '\u{a82b}')
-    ];
-
-    pub const Syriac_table: &'static [(char, char)] = &[
-        ('\u{700}', '\u{70d}'), ('\u{70f}', '\u{74a}'), ('\u{74d}', '\u{74f}')
-    ];
-
-    pub const Tagalog_table: &'static [(char, char)] = &[
-        ('\u{1700}', '\u{170c}'), ('\u{170e}', '\u{1714}')
-    ];
-
-    pub const Tagbanwa_table: &'static [(char, char)] = &[
-        ('\u{1760}', '\u{176c}'), ('\u{176e}', '\u{1770}'), ('\u{1772}',
-        '\u{1773}')
-    ];
-
-    pub const Tai_Le_table: &'static [(char, char)] = &[
-        ('\u{1950}', '\u{196d}'), ('\u{1970}', '\u{1974}')
-    ];
-
-    pub const Tai_Tham_table: &'static [(char, char)] = &[
-        ('\u{1a20}', '\u{1a5e}'), ('\u{1a60}', '\u{1a7c}'), ('\u{1a7f}',
-        '\u{1a89}'), ('\u{1a90}', '\u{1a99}'), ('\u{1aa0}', '\u{1aad}')
-    ];
-
-    pub const Tai_Viet_table: &'static [(char, char)] = &[
-        ('\u{aa80}', '\u{aac2}'), ('\u{aadb}', '\u{aadf}')
-    ];
-
-    pub const Takri_table: &'static [(char, char)] = &[
-        ('\u{11680}', '\u{116b7}'), ('\u{116c0}', '\u{116c9}')
-    ];
-
-    pub const Tamil_table: &'static [(char, char)] = &[
-        ('\u{b82}', '\u{b83}'), ('\u{b85}', '\u{b8a}'), ('\u{b8e}', '\u{b90}'),
-        ('\u{b92}', '\u{b95}'), ('\u{b99}', '\u{b9a}'), ('\u{b9c}', '\u{b9c}'),
-        ('\u{b9e}', '\u{b9f}'), ('\u{ba3}', '\u{ba4}'), ('\u{ba8}', '\u{baa}'),
-        ('\u{bae}', '\u{bb9}'), ('\u{bbe}', '\u{bc2}'), ('\u{bc6}', '\u{bc8}'),
-        ('\u{bca}', '\u{bcd}'), ('\u{bd0}', '\u{bd0}'), ('\u{bd7}', '\u{bd7}'),
-        ('\u{be6}', '\u{bfa}')
-    ];
-
-    pub const Telugu_table: &'static [(char, char)] = &[
-        ('\u{c00}', '\u{c03}'), ('\u{c05}', '\u{c0c}'), ('\u{c0e}', '\u{c10}'),
-        ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'), ('\u{c3d}', '\u{c44}'),
-        ('\u{c46}', '\u{c48}'), ('\u{c4a}', '\u{c4d}'), ('\u{c55}', '\u{c56}'),
-        ('\u{c58}', '\u{c5a}'), ('\u{c60}', '\u{c63}'), ('\u{c66}', '\u{c6f}'),
-        ('\u{c78}', '\u{c7f}')
-    ];
-
-    pub const Thaana_table: &'static [(char, char)] = &[
-        ('\u{780}', '\u{7b1}')
-    ];
-
-    pub const Thai_table: &'static [(char, char)] = &[
-        ('\u{e01}', '\u{e3a}'), ('\u{e40}', '\u{e5b}')
-    ];
-
-    pub const Tibetan_table: &'static [(char, char)] = &[
-        ('\u{f00}', '\u{f47}'), ('\u{f49}', '\u{f6c}'), ('\u{f71}', '\u{f97}'),
-        ('\u{f99}', '\u{fbc}'), ('\u{fbe}', '\u{fcc}'), ('\u{fce}', '\u{fd4}'),
-        ('\u{fd9}', '\u{fda}')
-    ];
-
-    pub const Tifinagh_table: &'static [(char, char)] = &[
-        ('\u{2d30}', '\u{2d67}'), ('\u{2d6f}', '\u{2d70}'), ('\u{2d7f}',
-        '\u{2d7f}')
-    ];
-
-    pub const Tirhuta_table: &'static [(char, char)] = &[
-        ('\u{11480}', '\u{114c7}'), ('\u{114d0}', '\u{114d9}')
-    ];
-
-    pub const Ugaritic_table: &'static [(char, char)] = &[
-        ('\u{10380}', '\u{1039d}'), ('\u{1039f}', '\u{1039f}')
-    ];
-
-    pub const Vai_table: &'static [(char, char)] = &[
-        ('\u{a500}', '\u{a62b}')
-    ];
-
-    pub const Warang_Citi_table: &'static [(char, char)] = &[
-        ('\u{118a0}', '\u{118f2}'), ('\u{118ff}', '\u{118ff}')
-    ];
-
-    pub const Yi_table: &'static [(char, char)] = &[
-        ('\u{a000}', '\u{a48c}'), ('\u{a490}', '\u{a4c6}')
-    ];
-
-}
-
-pub mod property {
-    pub const Join_Control_table: &'static [(char, char)] = &[
-        ('\u{200c}', '\u{200d}')
-    ];
-
-    pub const Noncharacter_Code_Point_table: &'static [(char, char)] = &[
-        ('\u{fdd0}', '\u{fdef}'), ('\u{fffe}', '\u{ffff}'), ('\u{1fffe}',
-        '\u{1ffff}'), ('\u{2fffe}', '\u{2ffff}'), ('\u{3fffe}', '\u{3ffff}'),
-        ('\u{4fffe}', '\u{4ffff}'), ('\u{5fffe}', '\u{5ffff}'), ('\u{6fffe}',
-        '\u{6ffff}'), ('\u{7fffe}', '\u{7ffff}'), ('\u{8fffe}', '\u{8ffff}'),
-        ('\u{9fffe}', '\u{9ffff}'), ('\u{afffe}', '\u{affff}'), ('\u{bfffe}',
-        '\u{bffff}'), ('\u{cfffe}', '\u{cffff}'), ('\u{dfffe}', '\u{dffff}'),
-        ('\u{efffe}', '\u{effff}'), ('\u{ffffe}', '\u{fffff}'), ('\u{10fffe}',
-        '\u{10ffff}')
-    ];
-
-    pub const White_Space_table: &'static [(char, char)] = &[
-        ('\u{9}', '\u{d}'), ('\u{20}', '\u{20}'), ('\u{85}', '\u{85}'),
-        ('\u{a0}', '\u{a0}'), ('\u{1680}', '\u{1680}'), ('\u{2000}',
-        '\u{200a}'), ('\u{2028}', '\u{2029}'), ('\u{202f}', '\u{202f}'),
-        ('\u{205f}', '\u{205f}'), ('\u{3000}', '\u{3000}')
-    ];
-
-}
-
-pub mod regex {
-    pub const UNICODE_CLASSES: &'static [(&'static str, &'static [(char, char)])] = &[
-        ("Ahom", super::script::Ahom_table), ("Alphabetic",
-        super::derived_property::Alphabetic_table), ("Anatolian_Hieroglyphs",
-        super::script::Anatolian_Hieroglyphs_table), ("Arabic",
-        super::script::Arabic_table), ("Armenian",
-        super::script::Armenian_table), ("Avestan",
-        super::script::Avestan_table), ("Balinese",
-        super::script::Balinese_table), ("Bamum", super::script::Bamum_table),
-        ("Bassa_Vah", super::script::Bassa_Vah_table), ("Batak",
-        super::script::Batak_table), ("Bengali", super::script::Bengali_table),
-        ("Bopomofo", super::script::Bopomofo_table), ("Brahmi",
-        super::script::Brahmi_table), ("Braille", super::script::Braille_table),
-        ("Buginese", super::script::Buginese_table), ("Buhid",
-        super::script::Buhid_table), ("C", super::general_category::C_table),
-        ("Canadian_Aboriginal", super::script::Canadian_Aboriginal_table),
-        ("Carian", super::script::Carian_table), ("Caucasian_Albanian",
-        super::script::Caucasian_Albanian_table), ("Cc",
-        super::general_category::Cc_table), ("Cf",
-        super::general_category::Cf_table), ("Chakma",
-        super::script::Chakma_table), ("Cham", super::script::Cham_table),
-        ("Cherokee", super::script::Cherokee_table), ("Cn",
-        super::general_category::Cn_table), ("Co",
-        super::general_category::Co_table), ("Common",
-        super::script::Common_table), ("Coptic", super::script::Coptic_table),
-        ("Cuneiform", super::script::Cuneiform_table), ("Cypriot",
-        super::script::Cypriot_table), ("Cyrillic",
-        super::script::Cyrillic_table), ("Default_Ignorable_Code_Point",
-        super::derived_property::Default_Ignorable_Code_Point_table),
-        ("Deseret", super::script::Deseret_table), ("Devanagari",
-        super::script::Devanagari_table), ("Duployan",
-        super::script::Duployan_table), ("Egyptian_Hieroglyphs",
-        super::script::Egyptian_Hieroglyphs_table), ("Elbasan",
-        super::script::Elbasan_table), ("Ethiopic",
-        super::script::Ethiopic_table), ("Georgian",
-        super::script::Georgian_table), ("Glagolitic",
-        super::script::Glagolitic_table), ("Gothic",
-        super::script::Gothic_table), ("Grantha", super::script::Grantha_table),
-        ("Grapheme_Extend", super::derived_property::Grapheme_Extend_table),
-        ("Greek", super::script::Greek_table), ("Gujarati",
-        super::script::Gujarati_table), ("Gurmukhi",
-        super::script::Gurmukhi_table), ("Han", super::script::Han_table),
-        ("Hangul", super::script::Hangul_table), ("Hanunoo",
-        super::script::Hanunoo_table), ("Hatran", super::script::Hatran_table),
-        ("Hebrew", super::script::Hebrew_table), ("Hiragana",
-        super::script::Hiragana_table), ("Imperial_Aramaic",
-        super::script::Imperial_Aramaic_table), ("Inherited",
-        super::script::Inherited_table), ("Inscriptional_Pahlavi",
-        super::script::Inscriptional_Pahlavi_table), ("Inscriptional_Parthian",
-        super::script::Inscriptional_Parthian_table), ("Javanese",
-        super::script::Javanese_table), ("Join_Control",
-        super::property::Join_Control_table), ("Kaithi",
-        super::script::Kaithi_table), ("Kannada", super::script::Kannada_table),
-        ("Katakana", super::script::Katakana_table), ("Kayah_Li",
-        super::script::Kayah_Li_table), ("Kharoshthi",
-        super::script::Kharoshthi_table), ("Khmer", super::script::Khmer_table),
-        ("Khojki", super::script::Khojki_table), ("Khudawadi",
-        super::script::Khudawadi_table), ("L",
-        super::general_category::L_table), ("LC",
-        super::general_category::LC_table), ("Lao", super::script::Lao_table),
-        ("Latin", super::script::Latin_table), ("Lepcha",
-        super::script::Lepcha_table), ("Limbu", super::script::Limbu_table),
-        ("Linear_A", super::script::Linear_A_table), ("Linear_B",
-        super::script::Linear_B_table), ("Lisu", super::script::Lisu_table),
-        ("Ll", super::general_category::Ll_table), ("Lm",
-        super::general_category::Lm_table), ("Lo",
-        super::general_category::Lo_table), ("Lowercase",
-        super::derived_property::Lowercase_table), ("Lt",
-        super::general_category::Lt_table), ("Lu",
-        super::general_category::Lu_table), ("Lycian",
-        super::script::Lycian_table), ("Lydian", super::script::Lydian_table),
-        ("M", super::general_category::M_table), ("Mahajani",
-        super::script::Mahajani_table), ("Malayalam",
-        super::script::Malayalam_table), ("Mandaic",
-        super::script::Mandaic_table), ("Manichaean",
-        super::script::Manichaean_table), ("Mc",
-        super::general_category::Mc_table), ("Me",
-        super::general_category::Me_table), ("Meetei_Mayek",
-        super::script::Meetei_Mayek_table), ("Mende_Kikakui",
-        super::script::Mende_Kikakui_table), ("Meroitic_Cursive",
-        super::script::Meroitic_Cursive_table), ("Meroitic_Hieroglyphs",
-        super::script::Meroitic_Hieroglyphs_table), ("Miao",
-        super::script::Miao_table), ("Mn", super::general_category::Mn_table),
-        ("Modi", super::script::Modi_table), ("Mongolian",
-        super::script::Mongolian_table), ("Mro", super::script::Mro_table),
-        ("Multani", super::script::Multani_table), ("Myanmar",
-        super::script::Myanmar_table), ("N", super::general_category::N_table),
-        ("Nabataean", super::script::Nabataean_table), ("Nd",
-        super::general_category::Nd_table), ("New_Tai_Lue",
-        super::script::New_Tai_Lue_table), ("Nko", super::script::Nko_table),
-        ("Nl", super::general_category::Nl_table), ("No",
-        super::general_category::No_table), ("Noncharacter_Code_Point",
-        super::property::Noncharacter_Code_Point_table), ("Ogham",
-        super::script::Ogham_table), ("Ol_Chiki",
-        super::script::Ol_Chiki_table), ("Old_Hungarian",
-        super::script::Old_Hungarian_table), ("Old_Italic",
-        super::script::Old_Italic_table), ("Old_North_Arabian",
-        super::script::Old_North_Arabian_table), ("Old_Permic",
-        super::script::Old_Permic_table), ("Old_Persian",
-        super::script::Old_Persian_table), ("Old_South_Arabian",
-        super::script::Old_South_Arabian_table), ("Old_Turkic",
-        super::script::Old_Turkic_table), ("Oriya", super::script::Oriya_table),
-        ("Osmanya", super::script::Osmanya_table), ("P",
-        super::general_category::P_table), ("Pahawh_Hmong",
-        super::script::Pahawh_Hmong_table), ("Palmyrene",
-        super::script::Palmyrene_table), ("Pau_Cin_Hau",
-        super::script::Pau_Cin_Hau_table), ("Pc",
-        super::general_category::Pc_table), ("Pd",
-        super::general_category::Pd_table), ("Pe",
-        super::general_category::Pe_table), ("Pf",
-        super::general_category::Pf_table), ("Phags_Pa",
-        super::script::Phags_Pa_table), ("Phoenician",
-        super::script::Phoenician_table), ("Pi",
-        super::general_category::Pi_table), ("Po",
-        super::general_category::Po_table), ("Ps",
-        super::general_category::Ps_table), ("Psalter_Pahlavi",
-        super::script::Psalter_Pahlavi_table), ("Rejang",
-        super::script::Rejang_table), ("Runic", super::script::Runic_table),
-        ("S", super::general_category::S_table), ("Samaritan",
-        super::script::Samaritan_table), ("Saurashtra",
-        super::script::Saurashtra_table), ("Sc",
-        super::general_category::Sc_table), ("Sharada",
-        super::script::Sharada_table), ("Shavian",
-        super::script::Shavian_table), ("Siddham",
-        super::script::Siddham_table), ("SignWriting",
-        super::script::SignWriting_table), ("Sinhala",
-        super::script::Sinhala_table), ("Sk",
-        super::general_category::Sk_table), ("Sm",
-        super::general_category::Sm_table), ("So",
-        super::general_category::So_table), ("Sora_Sompeng",
-        super::script::Sora_Sompeng_table), ("Sundanese",
-        super::script::Sundanese_table), ("Syloti_Nagri",
-        super::script::Syloti_Nagri_table), ("Syriac",
-        super::script::Syriac_table), ("Tagalog", super::script::Tagalog_table),
-        ("Tagbanwa", super::script::Tagbanwa_table), ("Tai_Le",
-        super::script::Tai_Le_table), ("Tai_Tham",
-        super::script::Tai_Tham_table), ("Tai_Viet",
-        super::script::Tai_Viet_table), ("Takri", super::script::Takri_table),
-        ("Tamil", super::script::Tamil_table), ("Telugu",
-        super::script::Telugu_table), ("Thaana", super::script::Thaana_table),
-        ("Thai", super::script::Thai_table), ("Tibetan",
-        super::script::Tibetan_table), ("Tifinagh",
-        super::script::Tifinagh_table), ("Tirhuta",
-        super::script::Tirhuta_table), ("Ugaritic",
-        super::script::Ugaritic_table), ("Uppercase",
-        super::derived_property::Uppercase_table), ("Vai",
-        super::script::Vai_table), ("Warang_Citi",
-        super::script::Warang_Citi_table), ("White_Space",
-        super::property::White_Space_table), ("XID_Continue",
-        super::derived_property::XID_Continue_table), ("XID_Start",
-        super::derived_property::XID_Start_table), ("Yi",
-        super::script::Yi_table), ("Z", super::general_category::Z_table),
-        ("Zl", super::general_category::Zl_table), ("Zp",
-        super::general_category::Zp_table), ("Zs",
-        super::general_category::Zs_table)
-    ];
-
-    pub const PERLD: &'static [(char, char)] = super::general_category::Nd_table;
-
-    pub const PERLS: &'static [(char, char)] = super::property::White_Space_table;
-
-    pub const PERLW: &'static [(char, char)] = &[
-        ('\u{30}', '\u{39}'), ('\u{41}', '\u{5a}'), ('\u{5f}', '\u{5f}'),
-        ('\u{61}', '\u{7a}'), ('\u{aa}', '\u{aa}'), ('\u{b5}', '\u{b5}'),
-        ('\u{ba}', '\u{ba}'), ('\u{c0}', '\u{d6}'), ('\u{d8}', '\u{f6}'),
-        ('\u{f8}', '\u{2c1}'), ('\u{2c6}', '\u{2d1}'), ('\u{2e0}', '\u{2e4}'),
-        ('\u{2ec}', '\u{2ec}'), ('\u{2ee}', '\u{2ee}'), ('\u{300}', '\u{374}'),
-        ('\u{376}', '\u{377}'), ('\u{37a}', '\u{37d}'), ('\u{37f}', '\u{37f}'),
-        ('\u{386}', '\u{386}'), ('\u{388}', '\u{38a}'), ('\u{38c}', '\u{38c}'),
-        ('\u{38e}', '\u{3a1}'), ('\u{3a3}', '\u{3f5}'), ('\u{3f7}', '\u{481}'),
-        ('\u{483}', '\u{52f}'), ('\u{531}', '\u{556}'), ('\u{559}', '\u{559}'),
-        ('\u{561}', '\u{587}'), ('\u{591}', '\u{5bd}'), ('\u{5bf}', '\u{5bf}'),
-        ('\u{5c1}', '\u{5c2}'), ('\u{5c4}', '\u{5c5}'), ('\u{5c7}', '\u{5c7}'),
-        ('\u{5d0}', '\u{5ea}'), ('\u{5f0}', '\u{5f2}'), ('\u{610}', '\u{61a}'),
-        ('\u{620}', '\u{669}'), ('\u{66e}', '\u{6d3}'), ('\u{6d5}', '\u{6dc}'),
-        ('\u{6df}', '\u{6e8}'), ('\u{6ea}', '\u{6fc}'), ('\u{6ff}', '\u{6ff}'),
-        ('\u{710}', '\u{74a}'), ('\u{74d}', '\u{7b1}'), ('\u{7c0}', '\u{7f5}'),
-        ('\u{7fa}', '\u{7fa}'), ('\u{800}', '\u{82d}'), ('\u{840}', '\u{85b}'),
-        ('\u{8a0}', '\u{8b4}'), ('\u{8e3}', '\u{963}'), ('\u{966}', '\u{96f}'),
-        ('\u{971}', '\u{983}'), ('\u{985}', '\u{98c}'), ('\u{98f}', '\u{990}'),
-        ('\u{993}', '\u{9a8}'), ('\u{9aa}', '\u{9b0}'), ('\u{9b2}', '\u{9b2}'),
-        ('\u{9b6}', '\u{9b9}'), ('\u{9bc}', '\u{9c4}'), ('\u{9c7}', '\u{9c8}'),
-        ('\u{9cb}', '\u{9ce}'), ('\u{9d7}', '\u{9d7}'), ('\u{9dc}', '\u{9dd}'),
-        ('\u{9df}', '\u{9e3}'), ('\u{9e6}', '\u{9f1}'), ('\u{a01}', '\u{a03}'),
-        ('\u{a05}', '\u{a0a}'), ('\u{a0f}', '\u{a10}'), ('\u{a13}', '\u{a28}'),
-        ('\u{a2a}', '\u{a30}'), ('\u{a32}', '\u{a33}'), ('\u{a35}', '\u{a36}'),
-        ('\u{a38}', '\u{a39}'), ('\u{a3c}', '\u{a3c}'), ('\u{a3e}', '\u{a42}'),
-        ('\u{a47}', '\u{a48}'), ('\u{a4b}', '\u{a4d}'), ('\u{a51}', '\u{a51}'),
-        ('\u{a59}', '\u{a5c}'), ('\u{a5e}', '\u{a5e}'), ('\u{a66}', '\u{a75}'),
-        ('\u{a81}', '\u{a83}'), ('\u{a85}', '\u{a8d}'), ('\u{a8f}', '\u{a91}'),
-        ('\u{a93}', '\u{aa8}'), ('\u{aaa}', '\u{ab0}'), ('\u{ab2}', '\u{ab3}'),
-        ('\u{ab5}', '\u{ab9}'), ('\u{abc}', '\u{ac5}'), ('\u{ac7}', '\u{ac9}'),
-        ('\u{acb}', '\u{acd}'), ('\u{ad0}', '\u{ad0}'), ('\u{ae0}', '\u{ae3}'),
-        ('\u{ae6}', '\u{aef}'), ('\u{af9}', '\u{af9}'), ('\u{b01}', '\u{b03}'),
-        ('\u{b05}', '\u{b0c}'), ('\u{b0f}', '\u{b10}'), ('\u{b13}', '\u{b28}'),
-        ('\u{b2a}', '\u{b30}'), ('\u{b32}', '\u{b33}'), ('\u{b35}', '\u{b39}'),
-        ('\u{b3c}', '\u{b44}'), ('\u{b47}', '\u{b48}'), ('\u{b4b}', '\u{b4d}'),
-        ('\u{b56}', '\u{b57}'), ('\u{b5c}', '\u{b5d}'), ('\u{b5f}', '\u{b63}'),
-        ('\u{b66}', '\u{b6f}'), ('\u{b71}', '\u{b71}'), ('\u{b82}', '\u{b83}'),
-        ('\u{b85}', '\u{b8a}'), ('\u{b8e}', '\u{b90}'), ('\u{b92}', '\u{b95}'),
-        ('\u{b99}', '\u{b9a}'), ('\u{b9c}', '\u{b9c}'), ('\u{b9e}', '\u{b9f}'),
-        ('\u{ba3}', '\u{ba4}'), ('\u{ba8}', '\u{baa}'), ('\u{bae}', '\u{bb9}'),
-        ('\u{bbe}', '\u{bc2}'), ('\u{bc6}', '\u{bc8}'), ('\u{bca}', '\u{bcd}'),
-        ('\u{bd0}', '\u{bd0}'), ('\u{bd7}', '\u{bd7}'), ('\u{be6}', '\u{bef}'),
-        ('\u{c00}', '\u{c03}'), ('\u{c05}', '\u{c0c}'), ('\u{c0e}', '\u{c10}'),
-        ('\u{c12}', '\u{c28}'), ('\u{c2a}', '\u{c39}'), ('\u{c3d}', '\u{c44}'),
-        ('\u{c46}', '\u{c48}'), ('\u{c4a}', '\u{c4d}'), ('\u{c55}', '\u{c56}'),
-        ('\u{c58}', '\u{c5a}'), ('\u{c60}', '\u{c63}'), ('\u{c66}', '\u{c6f}'),
-        ('\u{c81}', '\u{c83}'), ('\u{c85}', '\u{c8c}'), ('\u{c8e}', '\u{c90}'),
-        ('\u{c92}', '\u{ca8}'), ('\u{caa}', '\u{cb3}'), ('\u{cb5}', '\u{cb9}'),
-        ('\u{cbc}', '\u{cc4}'), ('\u{cc6}', '\u{cc8}'), ('\u{cca}', '\u{ccd}'),
-        ('\u{cd5}', '\u{cd6}'), ('\u{cde}', '\u{cde}'), ('\u{ce0}', '\u{ce3}'),
-        ('\u{ce6}', '\u{cef}'), ('\u{cf1}', '\u{cf2}'), ('\u{d01}', '\u{d03}'),
-        ('\u{d05}', '\u{d0c}'), ('\u{d0e}', '\u{d10}'), ('\u{d12}', '\u{d3a}'),
-        ('\u{d3d}', '\u{d44}'), ('\u{d46}', '\u{d48}'), ('\u{d4a}', '\u{d4e}'),
-        ('\u{d57}', '\u{d57}'), ('\u{d5f}', '\u{d63}'), ('\u{d66}', '\u{d6f}'),
-        ('\u{d7a}', '\u{d7f}'), ('\u{d82}', '\u{d83}'), ('\u{d85}', '\u{d96}'),
-        ('\u{d9a}', '\u{db1}'), ('\u{db3}', '\u{dbb}'), ('\u{dbd}', '\u{dbd}'),
-        ('\u{dc0}', '\u{dc6}'), ('\u{dca}', '\u{dca}'), ('\u{dcf}', '\u{dd4}'),
-        ('\u{dd6}', '\u{dd6}'), ('\u{dd8}', '\u{ddf}'), ('\u{de6}', '\u{def}'),
-        ('\u{df2}', '\u{df3}'), ('\u{e01}', '\u{e3a}'), ('\u{e40}', '\u{e4e}'),
-        ('\u{e50}', '\u{e59}'), ('\u{e81}', '\u{e82}'), ('\u{e84}', '\u{e84}'),
-        ('\u{e87}', '\u{e88}'), ('\u{e8a}', '\u{e8a}'), ('\u{e8d}', '\u{e8d}'),
-        ('\u{e94}', '\u{e97}'), ('\u{e99}', '\u{e9f}'), ('\u{ea1}', '\u{ea3}'),
-        ('\u{ea5}', '\u{ea5}'), ('\u{ea7}', '\u{ea7}'), ('\u{eaa}', '\u{eab}'),
-        ('\u{ead}', '\u{eb9}'), ('\u{ebb}', '\u{ebd}'), ('\u{ec0}', '\u{ec4}'),
-        ('\u{ec6}', '\u{ec6}'), ('\u{ec8}', '\u{ecd}'), ('\u{ed0}', '\u{ed9}'),
-        ('\u{edc}', '\u{edf}'), ('\u{f00}', '\u{f00}'), ('\u{f18}', '\u{f19}'),
-        ('\u{f20}', '\u{f29}'), ('\u{f35}', '\u{f35}'), ('\u{f37}', '\u{f37}'),
-        ('\u{f39}', '\u{f39}'), ('\u{f3e}', '\u{f47}'), ('\u{f49}', '\u{f6c}'),
-        ('\u{f71}', '\u{f84}'), ('\u{f86}', '\u{f97}'), ('\u{f99}', '\u{fbc}'),
-        ('\u{fc6}', '\u{fc6}'), ('\u{1000}', '\u{1049}'), ('\u{1050}',
-        '\u{109d}'), ('\u{10a0}', '\u{10c5}'), ('\u{10c7}', '\u{10c7}'),
-        ('\u{10cd}', '\u{10cd}'), ('\u{10d0}', '\u{10fa}'), ('\u{10fc}',
-        '\u{1248}'), ('\u{124a}', '\u{124d}'), ('\u{1250}', '\u{1256}'),
-        ('\u{1258}', '\u{1258}'), ('\u{125a}', '\u{125d}'), ('\u{1260}',
-        '\u{1288}'), ('\u{128a}', '\u{128d}'), ('\u{1290}', '\u{12b0}'),
-        ('\u{12b2}', '\u{12b5}'), ('\u{12b8}', '\u{12be}'), ('\u{12c0}',
-        '\u{12c0}'), ('\u{12c2}', '\u{12c5}'), ('\u{12c8}', '\u{12d6}'),
-        ('\u{12d8}', '\u{1310}'), ('\u{1312}', '\u{1315}'), ('\u{1318}',
-        '\u{135a}'), ('\u{135d}', '\u{135f}'), ('\u{1380}', '\u{138f}'),
-        ('\u{13a0}', '\u{13f5}'), ('\u{13f8}', '\u{13fd}'), ('\u{1401}',
-        '\u{166c}'), ('\u{166f}', '\u{167f}'), ('\u{1681}', '\u{169a}'),
-        ('\u{16a0}', '\u{16ea}'), ('\u{16ee}', '\u{16f8}'), ('\u{1700}',
-        '\u{170c}'), ('\u{170e}', '\u{1714}'), ('\u{1720}', '\u{1734}'),
-        ('\u{1740}', '\u{1753}'), ('\u{1760}', '\u{176c}'), ('\u{176e}',
-        '\u{1770}'), ('\u{1772}', '\u{1773}'), ('\u{1780}', '\u{17d3}'),
-        ('\u{17d7}', '\u{17d7}'), ('\u{17dc}', '\u{17dd}'), ('\u{17e0}',
-        '\u{17e9}'), ('\u{180b}', '\u{180d}'), ('\u{1810}', '\u{1819}'),
-        ('\u{1820}', '\u{1877}'), ('\u{1880}', '\u{18aa}'), ('\u{18b0}',
-        '\u{18f5}'), ('\u{1900}', '\u{191e}'), ('\u{1920}', '\u{192b}'),
-        ('\u{1930}', '\u{193b}'), ('\u{1946}', '\u{196d}'), ('\u{1970}',
-        '\u{1974}'), ('\u{1980}', '\u{19ab}'), ('\u{19b0}', '\u{19c9}'),
-        ('\u{19d0}', '\u{19d9}'), ('\u{1a00}', '\u{1a1b}'), ('\u{1a20}',
-        '\u{1a5e}'), ('\u{1a60}', '\u{1a7c}'), ('\u{1a7f}', '\u{1a89}'),
-        ('\u{1a90}', '\u{1a99}'), ('\u{1aa7}', '\u{1aa7}'), ('\u{1ab0}',
-        '\u{1abe}'), ('\u{1b00}', '\u{1b4b}'), ('\u{1b50}', '\u{1b59}'),
-        ('\u{1b6b}', '\u{1b73}'), ('\u{1b80}', '\u{1bf3}'), ('\u{1c00}',
-        '\u{1c37}'), ('\u{1c40}', '\u{1c49}'), ('\u{1c4d}', '\u{1c7d}'),
-        ('\u{1cd0}', '\u{1cd2}'), ('\u{1cd4}', '\u{1cf6}'), ('\u{1cf8}',
-        '\u{1cf9}'), ('\u{1d00}', '\u{1df5}'), ('\u{1dfc}', '\u{1f15}'),
-        ('\u{1f18}', '\u{1f1d}'), ('\u{1f20}', '\u{1f45}'), ('\u{1f48}',
-        '\u{1f4d}'), ('\u{1f50}', '\u{1f57}'), ('\u{1f59}', '\u{1f59}'),
-        ('\u{1f5b}', '\u{1f5b}'), ('\u{1f5d}', '\u{1f5d}'), ('\u{1f5f}',
-        '\u{1f7d}'), ('\u{1f80}', '\u{1fb4}'), ('\u{1fb6}', '\u{1fbc}'),
-        ('\u{1fbe}', '\u{1fbe}'), ('\u{1fc2}', '\u{1fc4}'), ('\u{1fc6}',
-        '\u{1fcc}'), ('\u{1fd0}', '\u{1fd3}'), ('\u{1fd6}', '\u{1fdb}'),
-        ('\u{1fe0}', '\u{1fec}'), ('\u{1ff2}', '\u{1ff4}'), ('\u{1ff6}',
-        '\u{1ffc}'), ('\u{200c}', '\u{200d}'), ('\u{203f}', '\u{2040}'),
-        ('\u{2054}', '\u{2054}'), ('\u{2071}', '\u{2071}'), ('\u{207f}',
-        '\u{207f}'), ('\u{2090}', '\u{209c}'), ('\u{20d0}', '\u{20f0}'),
-        ('\u{2102}', '\u{2102}'), ('\u{2107}', '\u{2107}'), ('\u{210a}',
-        '\u{2113}'), ('\u{2115}', '\u{2115}'), ('\u{2119}', '\u{211d}'),
-        ('\u{2124}', '\u{2124}'), ('\u{2126}', '\u{2126}'), ('\u{2128}',
-        '\u{2128}'), ('\u{212a}', '\u{212d}'), ('\u{212f}', '\u{2139}'),
-        ('\u{213c}', '\u{213f}'), ('\u{2145}', '\u{2149}'), ('\u{214e}',
-        '\u{214e}'), ('\u{2160}', '\u{2188}'), ('\u{24b6}', '\u{24e9}'),
-        ('\u{2c00}', '\u{2c2e}'), ('\u{2c30}', '\u{2c5e}'), ('\u{2c60}',
-        '\u{2ce4}'), ('\u{2ceb}', '\u{2cf3}'), ('\u{2d00}', '\u{2d25}'),
-        ('\u{2d27}', '\u{2d27}'), ('\u{2d2d}', '\u{2d2d}'), ('\u{2d30}',
-        '\u{2d67}'), ('\u{2d6f}', '\u{2d6f}'), ('\u{2d7f}', '\u{2d96}'),
-        ('\u{2da0}', '\u{2da6}'), ('\u{2da8}', '\u{2dae}'), ('\u{2db0}',
-        '\u{2db6}'), ('\u{2db8}', '\u{2dbe}'), ('\u{2dc0}', '\u{2dc6}'),
-        ('\u{2dc8}', '\u{2dce}'), ('\u{2dd0}', '\u{2dd6}'), ('\u{2dd8}',
-        '\u{2dde}'), ('\u{2de0}', '\u{2dff}'), ('\u{2e2f}', '\u{2e2f}'),
-        ('\u{3005}', '\u{3007}'), ('\u{3021}', '\u{302f}'), ('\u{3031}',
-        '\u{3035}'), ('\u{3038}', '\u{303c}'), ('\u{3041}', '\u{3096}'),
-        ('\u{3099}', '\u{309a}'), ('\u{309d}', '\u{309f}'), ('\u{30a1}',
-        '\u{30fa}'), ('\u{30fc}', '\u{30ff}'), ('\u{3105}', '\u{312d}'),
-        ('\u{3131}', '\u{318e}'), ('\u{31a0}', '\u{31ba}'), ('\u{31f0}',
-        '\u{31ff}'), ('\u{3400}', '\u{4db5}'), ('\u{4e00}', '\u{9fd5}'),
-        ('\u{a000}', '\u{a48c}'), ('\u{a4d0}', '\u{a4fd}'), ('\u{a500}',
-        '\u{a60c}'), ('\u{a610}', '\u{a62b}'), ('\u{a640}', '\u{a672}'),
-        ('\u{a674}', '\u{a67d}'), ('\u{a67f}', '\u{a6f1}'), ('\u{a717}',
-        '\u{a71f}'), ('\u{a722}', '\u{a788}'), ('\u{a78b}', '\u{a7ad}'),
-        ('\u{a7b0}', '\u{a7b7}'), ('\u{a7f7}', '\u{a827}'), ('\u{a840}',
-        '\u{a873}'), ('\u{a880}', '\u{a8c4}'), ('\u{a8d0}', '\u{a8d9}'),
-        ('\u{a8e0}', '\u{a8f7}'), ('\u{a8fb}', '\u{a8fb}'), ('\u{a8fd}',
-        '\u{a8fd}'), ('\u{a900}', '\u{a92d}'), ('\u{a930}', '\u{a953}'),
-        ('\u{a960}', '\u{a97c}'), ('\u{a980}', '\u{a9c0}'), ('\u{a9cf}',
-        '\u{a9d9}'), ('\u{a9e0}', '\u{a9fe}'), ('\u{aa00}', '\u{aa36}'),
-        ('\u{aa40}', '\u{aa4d}'), ('\u{aa50}', '\u{aa59}'), ('\u{aa60}',
-        '\u{aa76}'), ('\u{aa7a}', '\u{aac2}'), ('\u{aadb}', '\u{aadd}'),
-        ('\u{aae0}', '\u{aaef}'), ('\u{aaf2}', '\u{aaf6}'), ('\u{ab01}',
-        '\u{ab06}'), ('\u{ab09}', '\u{ab0e}'), ('\u{ab11}', '\u{ab16}'),
-        ('\u{ab20}', '\u{ab26}'), ('\u{ab28}', '\u{ab2e}'), ('\u{ab30}',
-        '\u{ab5a}'), ('\u{ab5c}', '\u{ab65}'), ('\u{ab70}', '\u{abea}'),
-        ('\u{abec}', '\u{abed}'), ('\u{abf0}', '\u{abf9}'), ('\u{ac00}',
-        '\u{d7a3}'), ('\u{d7b0}', '\u{d7c6}'), ('\u{d7cb}', '\u{d7fb}'),
-        ('\u{f900}', '\u{fa6d}'), ('\u{fa70}', '\u{fad9}'), ('\u{fb00}',
-        '\u{fb06}'), ('\u{fb13}', '\u{fb17}'), ('\u{fb1d}', '\u{fb28}'),
-        ('\u{fb2a}', '\u{fb36}'), ('\u{fb38}', '\u{fb3c}'), ('\u{fb3e}',
-        '\u{fb3e}'), ('\u{fb40}', '\u{fb41}'), ('\u{fb43}', '\u{fb44}'),
-        ('\u{fb46}', '\u{fbb1}'), ('\u{fbd3}', '\u{fd3d}'), ('\u{fd50}',
-        '\u{fd8f}'), ('\u{fd92}', '\u{fdc7}'), ('\u{fdf0}', '\u{fdfb}'),
-        ('\u{fe00}', '\u{fe0f}'), ('\u{fe20}', '\u{fe2f}'), ('\u{fe33}',
-        '\u{fe34}'), ('\u{fe4d}', '\u{fe4f}'), ('\u{fe70}', '\u{fe74}'),
-        ('\u{fe76}', '\u{fefc}'), ('\u{ff10}', '\u{ff19}'), ('\u{ff21}',
-        '\u{ff3a}'), ('\u{ff3f}', '\u{ff3f}'), ('\u{ff41}', '\u{ff5a}'),
-        ('\u{ff66}', '\u{ffbe}'), ('\u{ffc2}', '\u{ffc7}'), ('\u{ffca}',
-        '\u{ffcf}'), ('\u{ffd2}', '\u{ffd7}'), ('\u{ffda}', '\u{ffdc}'),
-        ('\u{10000}', '\u{1000b}'), ('\u{1000d}', '\u{10026}'), ('\u{10028}',
-        '\u{1003a}'), ('\u{1003c}', '\u{1003d}'), ('\u{1003f}', '\u{1004d}'),
-        ('\u{10050}', '\u{1005d}'), ('\u{10080}', '\u{100fa}'), ('\u{10140}',
-        '\u{10174}'), ('\u{101fd}', '\u{101fd}'), ('\u{10280}', '\u{1029c}'),
-        ('\u{102a0}', '\u{102d0}'), ('\u{102e0}', '\u{102e0}'), ('\u{10300}',
-        '\u{1031f}'), ('\u{10330}', '\u{1034a}'), ('\u{10350}', '\u{1037a}'),
-        ('\u{10380}', '\u{1039d}'), ('\u{103a0}', '\u{103c3}'), ('\u{103c8}',
-        '\u{103cf}'), ('\u{103d1}', '\u{103d5}'), ('\u{10400}', '\u{1049d}'),
-        ('\u{104a0}', '\u{104a9}'), ('\u{10500}', '\u{10527}'), ('\u{10530}',
-        '\u{10563}'), ('\u{10600}', '\u{10736}'), ('\u{10740}', '\u{10755}'),
-        ('\u{10760}', '\u{10767}'), ('\u{10800}', '\u{10805}'), ('\u{10808}',
-        '\u{10808}'), ('\u{1080a}', '\u{10835}'), ('\u{10837}', '\u{10838}'),
-        ('\u{1083c}', '\u{1083c}'), ('\u{1083f}', '\u{10855}'), ('\u{10860}',
-        '\u{10876}'), ('\u{10880}', '\u{1089e}'), ('\u{108e0}', '\u{108f2}'),
-        ('\u{108f4}', '\u{108f5}'), ('\u{10900}', '\u{10915}'), ('\u{10920}',
-        '\u{10939}'), ('\u{10980}', '\u{109b7}'), ('\u{109be}', '\u{109bf}'),
-        ('\u{10a00}', '\u{10a03}'), ('\u{10a05}', '\u{10a06}'), ('\u{10a0c}',
-        '\u{10a13}'), ('\u{10a15}', '\u{10a17}'), ('\u{10a19}', '\u{10a33}'),
-        ('\u{10a38}', '\u{10a3a}'), ('\u{10a3f}', '\u{10a3f}'), ('\u{10a60}',
-        '\u{10a7c}'), ('\u{10a80}', '\u{10a9c}'), ('\u{10ac0}', '\u{10ac7}'),
-        ('\u{10ac9}', '\u{10ae6}'), ('\u{10b00}', '\u{10b35}'), ('\u{10b40}',
-        '\u{10b55}'), ('\u{10b60}', '\u{10b72}'), ('\u{10b80}', '\u{10b91}'),
-        ('\u{10c00}', '\u{10c48}'), ('\u{10c80}', '\u{10cb2}'), ('\u{10cc0}',
-        '\u{10cf2}'), ('\u{11000}', '\u{11046}'), ('\u{11066}', '\u{1106f}'),
-        ('\u{1107f}', '\u{110ba}'), ('\u{110d0}', '\u{110e8}'), ('\u{110f0}',
-        '\u{110f9}'), ('\u{11100}', '\u{11134}'), ('\u{11136}', '\u{1113f}'),
-        ('\u{11150}', '\u{11173}'), ('\u{11176}', '\u{11176}'), ('\u{11180}',
-        '\u{111c4}'), ('\u{111ca}', '\u{111cc}'), ('\u{111d0}', '\u{111da}'),
-        ('\u{111dc}', '\u{111dc}'), ('\u{11200}', '\u{11211}'), ('\u{11213}',
-        '\u{11237}'), ('\u{11280}', '\u{11286}'), ('\u{11288}', '\u{11288}'),
-        ('\u{1128a}', '\u{1128d}'), ('\u{1128f}', '\u{1129d}'), ('\u{1129f}',
-        '\u{112a8}'), ('\u{112b0}', '\u{112ea}'), ('\u{112f0}', '\u{112f9}'),
-        ('\u{11300}', '\u{11303}'), ('\u{11305}', '\u{1130c}'), ('\u{1130f}',
-        '\u{11310}'), ('\u{11313}', '\u{11328}'), ('\u{1132a}', '\u{11330}'),
-        ('\u{11332}', '\u{11333}'), ('\u{11335}', '\u{11339}'), ('\u{1133c}',
-        '\u{11344}'), ('\u{11347}', '\u{11348}'), ('\u{1134b}', '\u{1134d}'),
-        ('\u{11350}', '\u{11350}'), ('\u{11357}', '\u{11357}'), ('\u{1135d}',
-        '\u{11363}'), ('\u{11366}', '\u{1136c}'), ('\u{11370}', '\u{11374}'),
-        ('\u{11480}', '\u{114c5}'), ('\u{114c7}', '\u{114c7}'), ('\u{114d0}',
-        '\u{114d9}'), ('\u{11580}', '\u{115b5}'), ('\u{115b8}', '\u{115c0}'),
-        ('\u{115d8}', '\u{115dd}'), ('\u{11600}', '\u{11640}'), ('\u{11644}',
-        '\u{11644}'), ('\u{11650}', '\u{11659}'), ('\u{11680}', '\u{116b7}'),
-        ('\u{116c0}', '\u{116c9}'), ('\u{11700}', '\u{11719}'), ('\u{1171d}',
-        '\u{1172b}'), ('\u{11730}', '\u{11739}'), ('\u{118a0}', '\u{118e9}'),
-        ('\u{118ff}', '\u{118ff}'), ('\u{11ac0}', '\u{11af8}'), ('\u{12000}',
-        '\u{12399}'), ('\u{12400}', '\u{1246e}'), ('\u{12480}', '\u{12543}'),
-        ('\u{13000}', '\u{1342e}'), ('\u{14400}', '\u{14646}'), ('\u{16800}',
-        '\u{16a38}'), ('\u{16a40}', '\u{16a5e}'), ('\u{16a60}', '\u{16a69}'),
-        ('\u{16ad0}', '\u{16aed}'), ('\u{16af0}', '\u{16af4}'), ('\u{16b00}',
-        '\u{16b36}'), ('\u{16b40}', '\u{16b43}'), ('\u{16b50}', '\u{16b59}'),
-        ('\u{16b63}', '\u{16b77}'), ('\u{16b7d}', '\u{16b8f}'), ('\u{16f00}',
-        '\u{16f44}'), ('\u{16f50}', '\u{16f7e}'), ('\u{16f8f}', '\u{16f9f}'),
-        ('\u{1b000}', '\u{1b001}'), ('\u{1bc00}', '\u{1bc6a}'), ('\u{1bc70}',
-        '\u{1bc7c}'), ('\u{1bc80}', '\u{1bc88}'), ('\u{1bc90}', '\u{1bc99}'),
-        ('\u{1bc9d}', '\u{1bc9e}'), ('\u{1d165}', '\u{1d169}'), ('\u{1d16d}',
-        '\u{1d172}'), ('\u{1d17b}', '\u{1d182}'), ('\u{1d185}', '\u{1d18b}'),
-        ('\u{1d1aa}', '\u{1d1ad}'), ('\u{1d242}', '\u{1d244}'), ('\u{1d400}',
-        '\u{1d454}'), ('\u{1d456}', '\u{1d49c}'), ('\u{1d49e}', '\u{1d49f}'),
-        ('\u{1d4a2}', '\u{1d4a2}'), ('\u{1d4a5}', '\u{1d4a6}'), ('\u{1d4a9}',
-        '\u{1d4ac}'), ('\u{1d4ae}', '\u{1d4b9}'), ('\u{1d4bb}', '\u{1d4bb}'),
-        ('\u{1d4bd}', '\u{1d4c3}'), ('\u{1d4c5}', '\u{1d505}'), ('\u{1d507}',
-        '\u{1d50a}'), ('\u{1d50d}', '\u{1d514}'), ('\u{1d516}', '\u{1d51c}'),
-        ('\u{1d51e}', '\u{1d539}'), ('\u{1d53b}', '\u{1d53e}'), ('\u{1d540}',
-        '\u{1d544}'), ('\u{1d546}', '\u{1d546}'), ('\u{1d54a}', '\u{1d550}'),
-        ('\u{1d552}', '\u{1d6a5}'), ('\u{1d6a8}', '\u{1d6c0}'), ('\u{1d6c2}',
-        '\u{1d6da}'), ('\u{1d6dc}', '\u{1d6fa}'), ('\u{1d6fc}', '\u{1d714}'),
-        ('\u{1d716}', '\u{1d734}'), ('\u{1d736}', '\u{1d74e}'), ('\u{1d750}',
-        '\u{1d76e}'), ('\u{1d770}', '\u{1d788}'), ('\u{1d78a}', '\u{1d7a8}'),
-        ('\u{1d7aa}', '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7cb}'), ('\u{1d7ce}',
-        '\u{1d7ff}'), ('\u{1da00}', '\u{1da36}'), ('\u{1da3b}', '\u{1da6c}'),
-        ('\u{1da75}', '\u{1da75}'), ('\u{1da84}', '\u{1da84}'), ('\u{1da9b}',
-        '\u{1da9f}'), ('\u{1daa1}', '\u{1daaf}'), ('\u{1e800}', '\u{1e8c4}'),
-        ('\u{1e8d0}', '\u{1e8d6}'), ('\u{1ee00}', '\u{1ee03}'), ('\u{1ee05}',
-        '\u{1ee1f}'), ('\u{1ee21}', '\u{1ee22}'), ('\u{1ee24}', '\u{1ee24}'),
-        ('\u{1ee27}', '\u{1ee27}'), ('\u{1ee29}', '\u{1ee32}'), ('\u{1ee34}',
-        '\u{1ee37}'), ('\u{1ee39}', '\u{1ee39}'), ('\u{1ee3b}', '\u{1ee3b}'),
-        ('\u{1ee42}', '\u{1ee42}'), ('\u{1ee47}', '\u{1ee47}'), ('\u{1ee49}',
-        '\u{1ee49}'), ('\u{1ee4b}', '\u{1ee4b}'), ('\u{1ee4d}', '\u{1ee4f}'),
-        ('\u{1ee51}', '\u{1ee52}'), ('\u{1ee54}', '\u{1ee54}'), ('\u{1ee57}',
-        '\u{1ee57}'), ('\u{1ee59}', '\u{1ee59}'), ('\u{1ee5b}', '\u{1ee5b}'),
-        ('\u{1ee5d}', '\u{1ee5d}'), ('\u{1ee5f}', '\u{1ee5f}'), ('\u{1ee61}',
-        '\u{1ee62}'), ('\u{1ee64}', '\u{1ee64}'), ('\u{1ee67}', '\u{1ee6a}'),
-        ('\u{1ee6c}', '\u{1ee72}'), ('\u{1ee74}', '\u{1ee77}'), ('\u{1ee79}',
-        '\u{1ee7c}'), ('\u{1ee7e}', '\u{1ee7e}'), ('\u{1ee80}', '\u{1ee89}'),
-        ('\u{1ee8b}', '\u{1ee9b}'), ('\u{1eea1}', '\u{1eea3}'), ('\u{1eea5}',
-        '\u{1eea9}'), ('\u{1eeab}', '\u{1eebb}'), ('\u{1f130}', '\u{1f149}'),
-        ('\u{1f150}', '\u{1f169}'), ('\u{1f170}', '\u{1f189}'), ('\u{20000}',
-        '\u{2a6d6}'), ('\u{2a700}', '\u{2b734}'), ('\u{2b740}', '\u{2b81d}'),
-        ('\u{2b820}', '\u{2cea1}'), ('\u{2f800}', '\u{2fa1d}'), ('\u{e0100}',
-        '\u{e01ef}')
-    ];
-
-}
-
-pub mod case_folding {
-    pub const C_plus_S_both_table: &'static [(char, char)] = &[
-        ('\u{41}', '\u{61}'), ('\u{42}', '\u{62}'), ('\u{43}', '\u{63}'),
-        ('\u{44}', '\u{64}'), ('\u{45}', '\u{65}'), ('\u{46}', '\u{66}'),
-        ('\u{47}', '\u{67}'), ('\u{48}', '\u{68}'), ('\u{49}', '\u{69}'),
-        ('\u{4a}', '\u{6a}'), ('\u{4b}', '\u{6b}'), ('\u{4b}', '\u{212a}'),
-        ('\u{4c}', '\u{6c}'), ('\u{4d}', '\u{6d}'), ('\u{4e}', '\u{6e}'),
-        ('\u{4f}', '\u{6f}'), ('\u{50}', '\u{70}'), ('\u{51}', '\u{71}'),
-        ('\u{52}', '\u{72}'), ('\u{53}', '\u{73}'), ('\u{53}', '\u{17f}'),
-        ('\u{54}', '\u{74}'), ('\u{55}', '\u{75}'), ('\u{56}', '\u{76}'),
-        ('\u{57}', '\u{77}'), ('\u{58}', '\u{78}'), ('\u{59}', '\u{79}'),
-        ('\u{5a}', '\u{7a}'), ('\u{61}', '\u{41}'), ('\u{62}', '\u{42}'),
-        ('\u{63}', '\u{43}'), ('\u{64}', '\u{44}'), ('\u{65}', '\u{45}'),
-        ('\u{66}', '\u{46}'), ('\u{67}', '\u{47}'), ('\u{68}', '\u{48}'),
-        ('\u{69}', '\u{49}'), ('\u{6a}', '\u{4a}'), ('\u{6b}', '\u{4b}'),
-        ('\u{6b}', '\u{212a}'), ('\u{6c}', '\u{4c}'), ('\u{6d}', '\u{4d}'),
-        ('\u{6e}', '\u{4e}'), ('\u{6f}', '\u{4f}'), ('\u{70}', '\u{50}'),
-        ('\u{71}', '\u{51}'), ('\u{72}', '\u{52}'), ('\u{73}', '\u{53}'),
-        ('\u{73}', '\u{17f}'), ('\u{74}', '\u{54}'), ('\u{75}', '\u{55}'),
-        ('\u{76}', '\u{56}'), ('\u{77}', '\u{57}'), ('\u{78}', '\u{58}'),
-        ('\u{79}', '\u{59}'), ('\u{7a}', '\u{5a}'), ('\u{b5}', '\u{39c}'),
-        ('\u{b5}', '\u{3bc}'), ('\u{c0}', '\u{e0}'), ('\u{c1}', '\u{e1}'),
-        ('\u{c2}', '\u{e2}'), ('\u{c3}', '\u{e3}'), ('\u{c4}', '\u{e4}'),
-        ('\u{c5}', '\u{e5}'), ('\u{c5}', '\u{212b}'), ('\u{c6}', '\u{e6}'),
-        ('\u{c7}', '\u{e7}'), ('\u{c8}', '\u{e8}'), ('\u{c9}', '\u{e9}'),
-        ('\u{ca}', '\u{ea}'), ('\u{cb}', '\u{eb}'), ('\u{cc}', '\u{ec}'),
-        ('\u{cd}', '\u{ed}'), ('\u{ce}', '\u{ee}'), ('\u{cf}', '\u{ef}'),
-        ('\u{d0}', '\u{f0}'), ('\u{d1}', '\u{f1}'), ('\u{d2}', '\u{f2}'),
-        ('\u{d3}', '\u{f3}'), ('\u{d4}', '\u{f4}'), ('\u{d5}', '\u{f5}'),
-        ('\u{d6}', '\u{f6}'), ('\u{d8}', '\u{f8}'), ('\u{d9}', '\u{f9}'),
-        ('\u{da}', '\u{fa}'), ('\u{db}', '\u{fb}'), ('\u{dc}', '\u{fc}'),
-        ('\u{dd}', '\u{fd}'), ('\u{de}', '\u{fe}'), ('\u{df}', '\u{1e9e}'),
-        ('\u{e0}', '\u{c0}'), ('\u{e1}', '\u{c1}'), ('\u{e2}', '\u{c2}'),
-        ('\u{e3}', '\u{c3}'), ('\u{e4}', '\u{c4}'), ('\u{e5}', '\u{c5}'),
-        ('\u{e5}', '\u{212b}'), ('\u{e6}', '\u{c6}'), ('\u{e7}', '\u{c7}'),
-        ('\u{e8}', '\u{c8}'), ('\u{e9}', '\u{c9}'), ('\u{ea}', '\u{ca}'),
-        ('\u{eb}', '\u{cb}'), ('\u{ec}', '\u{cc}'), ('\u{ed}', '\u{cd}'),
-        ('\u{ee}', '\u{ce}'), ('\u{ef}', '\u{cf}'), ('\u{f0}', '\u{d0}'),
-        ('\u{f1}', '\u{d1}'), ('\u{f2}', '\u{d2}'), ('\u{f3}', '\u{d3}'),
-        ('\u{f4}', '\u{d4}'), ('\u{f5}', '\u{d5}'), ('\u{f6}', '\u{d6}'),
-        ('\u{f8}', '\u{d8}'), ('\u{f9}', '\u{d9}'), ('\u{fa}', '\u{da}'),
-        ('\u{fb}', '\u{db}'), ('\u{fc}', '\u{dc}'), ('\u{fd}', '\u{dd}'),
-        ('\u{fe}', '\u{de}'), ('\u{ff}', '\u{178}'), ('\u{100}', '\u{101}'),
-        ('\u{101}', '\u{100}'), ('\u{102}', '\u{103}'), ('\u{103}', '\u{102}'),
-        ('\u{104}', '\u{105}'), ('\u{105}', '\u{104}'), ('\u{106}', '\u{107}'),
-        ('\u{107}', '\u{106}'), ('\u{108}', '\u{109}'), ('\u{109}', '\u{108}'),
-        ('\u{10a}', '\u{10b}'), ('\u{10b}', '\u{10a}'), ('\u{10c}', '\u{10d}'),
-        ('\u{10d}', '\u{10c}'), ('\u{10e}', '\u{10f}'), ('\u{10f}', '\u{10e}'),
-        ('\u{110}', '\u{111}'), ('\u{111}', '\u{110}'), ('\u{112}', '\u{113}'),
-        ('\u{113}', '\u{112}'), ('\u{114}', '\u{115}'), ('\u{115}', '\u{114}'),
-        ('\u{116}', '\u{117}'), ('\u{117}', '\u{116}'), ('\u{118}', '\u{119}'),
-        ('\u{119}', '\u{118}'), ('\u{11a}', '\u{11b}'), ('\u{11b}', '\u{11a}'),
-        ('\u{11c}', '\u{11d}'), ('\u{11d}', '\u{11c}'), ('\u{11e}', '\u{11f}'),
-        ('\u{11f}', '\u{11e}'), ('\u{120}', '\u{121}'), ('\u{121}', '\u{120}'),
-        ('\u{122}', '\u{123}'), ('\u{123}', '\u{122}'), ('\u{124}', '\u{125}'),
-        ('\u{125}', '\u{124}'), ('\u{126}', '\u{127}'), ('\u{127}', '\u{126}'),
-        ('\u{128}', '\u{129}'), ('\u{129}', '\u{128}'), ('\u{12a}', '\u{12b}'),
-        ('\u{12b}', '\u{12a}'), ('\u{12c}', '\u{12d}'), ('\u{12d}', '\u{12c}'),
-        ('\u{12e}', '\u{12f}'), ('\u{12f}', '\u{12e}'), ('\u{132}', '\u{133}'),
-        ('\u{133}', '\u{132}'), ('\u{134}', '\u{135}'), ('\u{135}', '\u{134}'),
-        ('\u{136}', '\u{137}'), ('\u{137}', '\u{136}'), ('\u{139}', '\u{13a}'),
-        ('\u{13a}', '\u{139}'), ('\u{13b}', '\u{13c}'), ('\u{13c}', '\u{13b}'),
-        ('\u{13d}', '\u{13e}'), ('\u{13e}', '\u{13d}'), ('\u{13f}', '\u{140}'),
-        ('\u{140}', '\u{13f}'), ('\u{141}', '\u{142}'), ('\u{142}', '\u{141}'),
-        ('\u{143}', '\u{144}'), ('\u{144}', '\u{143}'), ('\u{145}', '\u{146}'),
-        ('\u{146}', '\u{145}'), ('\u{147}', '\u{148}'), ('\u{148}', '\u{147}'),
-        ('\u{14a}', '\u{14b}'), ('\u{14b}', '\u{14a}'), ('\u{14c}', '\u{14d}'),
-        ('\u{14d}', '\u{14c}'), ('\u{14e}', '\u{14f}'), ('\u{14f}', '\u{14e}'),
-        ('\u{150}', '\u{151}'), ('\u{151}', '\u{150}'), ('\u{152}', '\u{153}'),
-        ('\u{153}', '\u{152}'), ('\u{154}', '\u{155}'), ('\u{155}', '\u{154}'),
-        ('\u{156}', '\u{157}'), ('\u{157}', '\u{156}'), ('\u{158}', '\u{159}'),
-        ('\u{159}', '\u{158}'), ('\u{15a}', '\u{15b}'), ('\u{15b}', '\u{15a}'),
-        ('\u{15c}', '\u{15d}'), ('\u{15d}', '\u{15c}'), ('\u{15e}', '\u{15f}'),
-        ('\u{15f}', '\u{15e}'), ('\u{160}', '\u{161}'), ('\u{161}', '\u{160}'),
-        ('\u{162}', '\u{163}'), ('\u{163}', '\u{162}'), ('\u{164}', '\u{165}'),
-        ('\u{165}', '\u{164}'), ('\u{166}', '\u{167}'), ('\u{167}', '\u{166}'),
-        ('\u{168}', '\u{169}'), ('\u{169}', '\u{168}'), ('\u{16a}', '\u{16b}'),
-        ('\u{16b}', '\u{16a}'), ('\u{16c}', '\u{16d}'), ('\u{16d}', '\u{16c}'),
-        ('\u{16e}', '\u{16f}'), ('\u{16f}', '\u{16e}'), ('\u{170}', '\u{171}'),
-        ('\u{171}', '\u{170}'), ('\u{172}', '\u{173}'), ('\u{173}', '\u{172}'),
-        ('\u{174}', '\u{175}'), ('\u{175}', '\u{174}'), ('\u{176}', '\u{177}'),
-        ('\u{177}', '\u{176}'), ('\u{178}', '\u{ff}'), ('\u{179}', '\u{17a}'),
-        ('\u{17a}', '\u{179}'), ('\u{17b}', '\u{17c}'), ('\u{17c}', '\u{17b}'),
-        ('\u{17d}', '\u{17e}'), ('\u{17e}', '\u{17d}'), ('\u{17f}', '\u{53}'),
-        ('\u{17f}', '\u{73}'), ('\u{180}', '\u{243}'), ('\u{181}', '\u{253}'),
-        ('\u{182}', '\u{183}'), ('\u{183}', '\u{182}'), ('\u{184}', '\u{185}'),
-        ('\u{185}', '\u{184}'), ('\u{186}', '\u{254}'), ('\u{187}', '\u{188}'),
-        ('\u{188}', '\u{187}'), ('\u{189}', '\u{256}'), ('\u{18a}', '\u{257}'),
-        ('\u{18b}', '\u{18c}'), ('\u{18c}', '\u{18b}'), ('\u{18e}', '\u{1dd}'),
-        ('\u{18f}', '\u{259}'), ('\u{190}', '\u{25b}'), ('\u{191}', '\u{192}'),
-        ('\u{192}', '\u{191}'), ('\u{193}', '\u{260}'), ('\u{194}', '\u{263}'),
-        ('\u{195}', '\u{1f6}'), ('\u{196}', '\u{269}'), ('\u{197}', '\u{268}'),
-        ('\u{198}', '\u{199}'), ('\u{199}', '\u{198}'), ('\u{19a}', '\u{23d}'),
-        ('\u{19c}', '\u{26f}'), ('\u{19d}', '\u{272}'), ('\u{19e}', '\u{220}'),
-        ('\u{19f}', '\u{275}'), ('\u{1a0}', '\u{1a1}'), ('\u{1a1}', '\u{1a0}'),
-        ('\u{1a2}', '\u{1a3}'), ('\u{1a3}', '\u{1a2}'), ('\u{1a4}', '\u{1a5}'),
-        ('\u{1a5}', '\u{1a4}'), ('\u{1a6}', '\u{280}'), ('\u{1a7}', '\u{1a8}'),
-        ('\u{1a8}', '\u{1a7}'), ('\u{1a9}', '\u{283}'), ('\u{1ac}', '\u{1ad}'),
-        ('\u{1ad}', '\u{1ac}'), ('\u{1ae}', '\u{288}'), ('\u{1af}', '\u{1b0}'),
-        ('\u{1b0}', '\u{1af}'), ('\u{1b1}', '\u{28a}'), ('\u{1b2}', '\u{28b}'),
-        ('\u{1b3}', '\u{1b4}'), ('\u{1b4}', '\u{1b3}'), ('\u{1b5}', '\u{1b6}'),
-        ('\u{1b6}', '\u{1b5}'), ('\u{1b7}', '\u{292}'), ('\u{1b8}', '\u{1b9}'),
-        ('\u{1b9}', '\u{1b8}'), ('\u{1bc}', '\u{1bd}'), ('\u{1bd}', '\u{1bc}'),
-        ('\u{1bf}', '\u{1f7}'), ('\u{1c4}', '\u{1c5}'), ('\u{1c4}', '\u{1c6}'),
-        ('\u{1c5}', '\u{1c4}'), ('\u{1c5}', '\u{1c6}'), ('\u{1c6}', '\u{1c4}'),
-        ('\u{1c6}', '\u{1c5}'), ('\u{1c7}', '\u{1c8}'), ('\u{1c7}', '\u{1c9}'),
-        ('\u{1c8}', '\u{1c7}'), ('\u{1c8}', '\u{1c9}'), ('\u{1c9}', '\u{1c7}'),
-        ('\u{1c9}', '\u{1c8}'), ('\u{1ca}', '\u{1cb}'), ('\u{1ca}', '\u{1cc}'),
-        ('\u{1cb}', '\u{1ca}'), ('\u{1cb}', '\u{1cc}'), ('\u{1cc}', '\u{1ca}'),
-        ('\u{1cc}', '\u{1cb}'), ('\u{1cd}', '\u{1ce}'), ('\u{1ce}', '\u{1cd}'),
-        ('\u{1cf}', '\u{1d0}'), ('\u{1d0}', '\u{1cf}'), ('\u{1d1}', '\u{1d2}'),
-        ('\u{1d2}', '\u{1d1}'), ('\u{1d3}', '\u{1d4}'), ('\u{1d4}', '\u{1d3}'),
-        ('\u{1d5}', '\u{1d6}'), ('\u{1d6}', '\u{1d5}'), ('\u{1d7}', '\u{1d8}'),
-        ('\u{1d8}', '\u{1d7}'), ('\u{1d9}', '\u{1da}'), ('\u{1da}', '\u{1d9}'),
-        ('\u{1db}', '\u{1dc}'), ('\u{1dc}', '\u{1db}'), ('\u{1dd}', '\u{18e}'),
-        ('\u{1de}', '\u{1df}'), ('\u{1df}', '\u{1de}'), ('\u{1e0}', '\u{1e1}'),
-        ('\u{1e1}', '\u{1e0}'), ('\u{1e2}', '\u{1e3}'), ('\u{1e3}', '\u{1e2}'),
-        ('\u{1e4}', '\u{1e5}'), ('\u{1e5}', '\u{1e4}'), ('\u{1e6}', '\u{1e7}'),
-        ('\u{1e7}', '\u{1e6}'), ('\u{1e8}', '\u{1e9}'), ('\u{1e9}', '\u{1e8}'),
-        ('\u{1ea}', '\u{1eb}'), ('\u{1eb}', '\u{1ea}'), ('\u{1ec}', '\u{1ed}'),
-        ('\u{1ed}', '\u{1ec}'), ('\u{1ee}', '\u{1ef}'), ('\u{1ef}', '\u{1ee}'),
-        ('\u{1f1}', '\u{1f2}'), ('\u{1f1}', '\u{1f3}'), ('\u{1f2}', '\u{1f1}'),
-        ('\u{1f2}', '\u{1f3}'), ('\u{1f3}', '\u{1f1}'), ('\u{1f3}', '\u{1f2}'),
-        ('\u{1f4}', '\u{1f5}'), ('\u{1f5}', '\u{1f4}'), ('\u{1f6}', '\u{195}'),
-        ('\u{1f7}', '\u{1bf}'), ('\u{1f8}', '\u{1f9}'), ('\u{1f9}', '\u{1f8}'),
-        ('\u{1fa}', '\u{1fb}'), ('\u{1fb}', '\u{1fa}'), ('\u{1fc}', '\u{1fd}'),
-        ('\u{1fd}', '\u{1fc}'), ('\u{1fe}', '\u{1ff}'), ('\u{1ff}', '\u{1fe}'),
-        ('\u{200}', '\u{201}'), ('\u{201}', '\u{200}'), ('\u{202}', '\u{203}'),
-        ('\u{203}', '\u{202}'), ('\u{204}', '\u{205}'), ('\u{205}', '\u{204}'),
-        ('\u{206}', '\u{207}'), ('\u{207}', '\u{206}'), ('\u{208}', '\u{209}'),
-        ('\u{209}', '\u{208}'), ('\u{20a}', '\u{20b}'), ('\u{20b}', '\u{20a}'),
-        ('\u{20c}', '\u{20d}'), ('\u{20d}', '\u{20c}'), ('\u{20e}', '\u{20f}'),
-        ('\u{20f}', '\u{20e}'), ('\u{210}', '\u{211}'), ('\u{211}', '\u{210}'),
-        ('\u{212}', '\u{213}'), ('\u{213}', '\u{212}'), ('\u{214}', '\u{215}'),
-        ('\u{215}', '\u{214}'), ('\u{216}', '\u{217}'), ('\u{217}', '\u{216}'),
-        ('\u{218}', '\u{219}'), ('\u{219}', '\u{218}'), ('\u{21a}', '\u{21b}'),
-        ('\u{21b}', '\u{21a}'), ('\u{21c}', '\u{21d}'), ('\u{21d}', '\u{21c}'),
-        ('\u{21e}', '\u{21f}'), ('\u{21f}', '\u{21e}'), ('\u{220}', '\u{19e}'),
-        ('\u{222}', '\u{223}'), ('\u{223}', '\u{222}'), ('\u{224}', '\u{225}'),
-        ('\u{225}', '\u{224}'), ('\u{226}', '\u{227}'), ('\u{227}', '\u{226}'),
-        ('\u{228}', '\u{229}'), ('\u{229}', '\u{228}'), ('\u{22a}', '\u{22b}'),
-        ('\u{22b}', '\u{22a}'), ('\u{22c}', '\u{22d}'), ('\u{22d}', '\u{22c}'),
-        ('\u{22e}', '\u{22f}'), ('\u{22f}', '\u{22e}'), ('\u{230}', '\u{231}'),
-        ('\u{231}', '\u{230}'), ('\u{232}', '\u{233}'), ('\u{233}', '\u{232}'),
-        ('\u{23a}', '\u{2c65}'), ('\u{23b}', '\u{23c}'), ('\u{23c}', '\u{23b}'),
-        ('\u{23d}', '\u{19a}'), ('\u{23e}', '\u{2c66}'), ('\u{23f}',
-        '\u{2c7e}'), ('\u{240}', '\u{2c7f}'), ('\u{241}', '\u{242}'),
-        ('\u{242}', '\u{241}'), ('\u{243}', '\u{180}'), ('\u{244}', '\u{289}'),
-        ('\u{245}', '\u{28c}'), ('\u{246}', '\u{247}'), ('\u{247}', '\u{246}'),
-        ('\u{248}', '\u{249}'), ('\u{249}', '\u{248}'), ('\u{24a}', '\u{24b}'),
-        ('\u{24b}', '\u{24a}'), ('\u{24c}', '\u{24d}'), ('\u{24d}', '\u{24c}'),
-        ('\u{24e}', '\u{24f}'), ('\u{24f}', '\u{24e}'), ('\u{250}', '\u{2c6f}'),
-        ('\u{251}', '\u{2c6d}'), ('\u{252}', '\u{2c70}'), ('\u{253}',
-        '\u{181}'), ('\u{254}', '\u{186}'), ('\u{256}', '\u{189}'), ('\u{257}',
-        '\u{18a}'), ('\u{259}', '\u{18f}'), ('\u{25b}', '\u{190}'), ('\u{25c}',
-        '\u{a7ab}'), ('\u{260}', '\u{193}'), ('\u{261}', '\u{a7ac}'),
-        ('\u{263}', '\u{194}'), ('\u{265}', '\u{a78d}'), ('\u{266}',
-        '\u{a7aa}'), ('\u{268}', '\u{197}'), ('\u{269}', '\u{196}'), ('\u{26b}',
-        '\u{2c62}'), ('\u{26c}', '\u{a7ad}'), ('\u{26f}', '\u{19c}'),
-        ('\u{271}', '\u{2c6e}'), ('\u{272}', '\u{19d}'), ('\u{275}', '\u{19f}'),
-        ('\u{27d}', '\u{2c64}'), ('\u{280}', '\u{1a6}'), ('\u{283}', '\u{1a9}'),
-        ('\u{287}', '\u{a7b1}'), ('\u{288}', '\u{1ae}'), ('\u{289}', '\u{244}'),
-        ('\u{28a}', '\u{1b1}'), ('\u{28b}', '\u{1b2}'), ('\u{28c}', '\u{245}'),
-        ('\u{292}', '\u{1b7}'), ('\u{29d}', '\u{a7b2}'), ('\u{29e}',
-        '\u{a7b0}'), ('\u{345}', '\u{399}'), ('\u{345}', '\u{3b9}'), ('\u{345}',
-        '\u{1fbe}'), ('\u{370}', '\u{371}'), ('\u{371}', '\u{370}'), ('\u{372}',
-        '\u{373}'), ('\u{373}', '\u{372}'), ('\u{376}', '\u{377}'), ('\u{377}',
-        '\u{376}'), ('\u{37b}', '\u{3fd}'), ('\u{37c}', '\u{3fe}'), ('\u{37d}',
-        '\u{3ff}'), ('\u{37f}', '\u{3f3}'), ('\u{386}', '\u{3ac}'), ('\u{388}',
-        '\u{3ad}'), ('\u{389}', '\u{3ae}'), ('\u{38a}', '\u{3af}'), ('\u{38c}',
-        '\u{3cc}'), ('\u{38e}', '\u{3cd}'), ('\u{38f}', '\u{3ce}'), ('\u{391}',
-        '\u{3b1}'), ('\u{392}', '\u{3b2}'), ('\u{392}', '\u{3d0}'), ('\u{393}',
-        '\u{3b3}'), ('\u{394}', '\u{3b4}'), ('\u{395}', '\u{3b5}'), ('\u{395}',
-        '\u{3f5}'), ('\u{396}', '\u{3b6}'), ('\u{397}', '\u{3b7}'), ('\u{398}',
-        '\u{3b8}'), ('\u{398}', '\u{3d1}'), ('\u{398}', '\u{3f4}'), ('\u{399}',
-        '\u{345}'), ('\u{399}', '\u{3b9}'), ('\u{399}', '\u{1fbe}'), ('\u{39a}',
-        '\u{3ba}'), ('\u{39a}', '\u{3f0}'), ('\u{39b}', '\u{3bb}'), ('\u{39c}',
-        '\u{b5}'), ('\u{39c}', '\u{3bc}'), ('\u{39d}', '\u{3bd}'), ('\u{39e}',
-        '\u{3be}'), ('\u{39f}', '\u{3bf}'), ('\u{3a0}', '\u{3c0}'), ('\u{3a0}',
-        '\u{3d6}'), ('\u{3a1}', '\u{3c1}'), ('\u{3a1}', '\u{3f1}'), ('\u{3a3}',
-        '\u{3c2}'), ('\u{3a3}', '\u{3c3}'), ('\u{3a4}', '\u{3c4}'), ('\u{3a5}',
-        '\u{3c5}'), ('\u{3a6}', '\u{3c6}'), ('\u{3a6}', '\u{3d5}'), ('\u{3a7}',
-        '\u{3c7}'), ('\u{3a8}', '\u{3c8}'), ('\u{3a9}', '\u{3c9}'), ('\u{3a9}',
-        '\u{2126}'), ('\u{3aa}', '\u{3ca}'), ('\u{3ab}', '\u{3cb}'), ('\u{3ac}',
-        '\u{386}'), ('\u{3ad}', '\u{388}'), ('\u{3ae}', '\u{389}'), ('\u{3af}',
-        '\u{38a}'), ('\u{3b1}', '\u{391}'), ('\u{3b2}', '\u{392}'), ('\u{3b2}',
-        '\u{3d0}'), ('\u{3b3}', '\u{393}'), ('\u{3b4}', '\u{394}'), ('\u{3b5}',
-        '\u{395}'), ('\u{3b5}', '\u{3f5}'), ('\u{3b6}', '\u{396}'), ('\u{3b7}',
-        '\u{397}'), ('\u{3b8}', '\u{398}'), ('\u{3b8}', '\u{3d1}'), ('\u{3b8}',
-        '\u{3f4}'), ('\u{3b9}', '\u{345}'), ('\u{3b9}', '\u{399}'), ('\u{3b9}',
-        '\u{1fbe}'), ('\u{3ba}', '\u{39a}'), ('\u{3ba}', '\u{3f0}'), ('\u{3bb}',
-        '\u{39b}'), ('\u{3bc}', '\u{b5}'), ('\u{3bc}', '\u{39c}'), ('\u{3bd}',
-        '\u{39d}'), ('\u{3be}', '\u{39e}'), ('\u{3bf}', '\u{39f}'), ('\u{3c0}',
-        '\u{3a0}'), ('\u{3c0}', '\u{3d6}'), ('\u{3c1}', '\u{3a1}'), ('\u{3c1}',
-        '\u{3f1}'), ('\u{3c2}', '\u{3a3}'), ('\u{3c2}', '\u{3c3}'), ('\u{3c3}',
-        '\u{3a3}'), ('\u{3c3}', '\u{3c2}'), ('\u{3c4}', '\u{3a4}'), ('\u{3c5}',
-        '\u{3a5}'), ('\u{3c6}', '\u{3a6}'), ('\u{3c6}', '\u{3d5}'), ('\u{3c7}',
-        '\u{3a7}'), ('\u{3c8}', '\u{3a8}'), ('\u{3c9}', '\u{3a9}'), ('\u{3c9}',
-        '\u{2126}'), ('\u{3ca}', '\u{3aa}'), ('\u{3cb}', '\u{3ab}'), ('\u{3cc}',
-        '\u{38c}'), ('\u{3cd}', '\u{38e}'), ('\u{3ce}', '\u{38f}'), ('\u{3cf}',
-        '\u{3d7}'), ('\u{3d0}', '\u{392}'), ('\u{3d0}', '\u{3b2}'), ('\u{3d1}',
-        '\u{398}'), ('\u{3d1}', '\u{3b8}'), ('\u{3d1}', '\u{3f4}'), ('\u{3d5}',
-        '\u{3a6}'), ('\u{3d5}', '\u{3c6}'), ('\u{3d6}', '\u{3a0}'), ('\u{3d6}',
-        '\u{3c0}'), ('\u{3d7}', '\u{3cf}'), ('\u{3d8}', '\u{3d9}'), ('\u{3d9}',
-        '\u{3d8}'), ('\u{3da}', '\u{3db}'), ('\u{3db}', '\u{3da}'), ('\u{3dc}',
-        '\u{3dd}'), ('\u{3dd}', '\u{3dc}'), ('\u{3de}', '\u{3df}'), ('\u{3df}',
-        '\u{3de}'), ('\u{3e0}', '\u{3e1}'), ('\u{3e1}', '\u{3e0}'), ('\u{3e2}',
-        '\u{3e3}'), ('\u{3e3}', '\u{3e2}'), ('\u{3e4}', '\u{3e5}'), ('\u{3e5}',
-        '\u{3e4}'), ('\u{3e6}', '\u{3e7}'), ('\u{3e7}', '\u{3e6}'), ('\u{3e8}',
-        '\u{3e9}'), ('\u{3e9}', '\u{3e8}'), ('\u{3ea}', '\u{3eb}'), ('\u{3eb}',
-        '\u{3ea}'), ('\u{3ec}', '\u{3ed}'), ('\u{3ed}', '\u{3ec}'), ('\u{3ee}',
-        '\u{3ef}'), ('\u{3ef}', '\u{3ee}'), ('\u{3f0}', '\u{39a}'), ('\u{3f0}',
-        '\u{3ba}'), ('\u{3f1}', '\u{3a1}'), ('\u{3f1}', '\u{3c1}'), ('\u{3f2}',
-        '\u{3f9}'), ('\u{3f3}', '\u{37f}'), ('\u{3f4}', '\u{398}'), ('\u{3f4}',
-        '\u{3b8}'), ('\u{3f4}', '\u{3d1}'), ('\u{3f5}', '\u{395}'), ('\u{3f5}',
-        '\u{3b5}'), ('\u{3f7}', '\u{3f8}'), ('\u{3f8}', '\u{3f7}'), ('\u{3f9}',
-        '\u{3f2}'), ('\u{3fa}', '\u{3fb}'), ('\u{3fb}', '\u{3fa}'), ('\u{3fd}',
-        '\u{37b}'), ('\u{3fe}', '\u{37c}'), ('\u{3ff}', '\u{37d}'), ('\u{400}',
-        '\u{450}'), ('\u{401}', '\u{451}'), ('\u{402}', '\u{452}'), ('\u{403}',
-        '\u{453}'), ('\u{404}', '\u{454}'), ('\u{405}', '\u{455}'), ('\u{406}',
-        '\u{456}'), ('\u{407}', '\u{457}'), ('\u{408}', '\u{458}'), ('\u{409}',
-        '\u{459}'), ('\u{40a}', '\u{45a}'), ('\u{40b}', '\u{45b}'), ('\u{40c}',
-        '\u{45c}'), ('\u{40d}', '\u{45d}'), ('\u{40e}', '\u{45e}'), ('\u{40f}',
-        '\u{45f}'), ('\u{410}', '\u{430}'), ('\u{411}', '\u{431}'), ('\u{412}',
-        '\u{432}'), ('\u{413}', '\u{433}'), ('\u{414}', '\u{434}'), ('\u{415}',
-        '\u{435}'), ('\u{416}', '\u{436}'), ('\u{417}', '\u{437}'), ('\u{418}',
-        '\u{438}'), ('\u{419}', '\u{439}'), ('\u{41a}', '\u{43a}'), ('\u{41b}',
-        '\u{43b}'), ('\u{41c}', '\u{43c}'), ('\u{41d}', '\u{43d}'), ('\u{41e}',
-        '\u{43e}'), ('\u{41f}', '\u{43f}'), ('\u{420}', '\u{440}'), ('\u{421}',
-        '\u{441}'), ('\u{422}', '\u{442}'), ('\u{423}', '\u{443}'), ('\u{424}',
-        '\u{444}'), ('\u{425}', '\u{445}'), ('\u{426}', '\u{446}'), ('\u{427}',
-        '\u{447}'), ('\u{428}', '\u{448}'), ('\u{429}', '\u{449}'), ('\u{42a}',
-        '\u{44a}'), ('\u{42b}', '\u{44b}'), ('\u{42c}', '\u{44c}'), ('\u{42d}',
-        '\u{44d}'), ('\u{42e}', '\u{44e}'), ('\u{42f}', '\u{44f}'), ('\u{430}',
-        '\u{410}'), ('\u{431}', '\u{411}'), ('\u{432}', '\u{412}'), ('\u{433}',
-        '\u{413}'), ('\u{434}', '\u{414}'), ('\u{435}', '\u{415}'), ('\u{436}',
-        '\u{416}'), ('\u{437}', '\u{417}'), ('\u{438}', '\u{418}'), ('\u{439}',
-        '\u{419}'), ('\u{43a}', '\u{41a}'), ('\u{43b}', '\u{41b}'), ('\u{43c}',
-        '\u{41c}'), ('\u{43d}', '\u{41d}'), ('\u{43e}', '\u{41e}'), ('\u{43f}',
-        '\u{41f}'), ('\u{440}', '\u{420}'), ('\u{441}', '\u{421}'), ('\u{442}',
-        '\u{422}'), ('\u{443}', '\u{423}'), ('\u{444}', '\u{424}'), ('\u{445}',
-        '\u{425}'), ('\u{446}', '\u{426}'), ('\u{447}', '\u{427}'), ('\u{448}',
-        '\u{428}'), ('\u{449}', '\u{429}'), ('\u{44a}', '\u{42a}'), ('\u{44b}',
-        '\u{42b}'), ('\u{44c}', '\u{42c}'), ('\u{44d}', '\u{42d}'), ('\u{44e}',
-        '\u{42e}'), ('\u{44f}', '\u{42f}'), ('\u{450}', '\u{400}'), ('\u{451}',
-        '\u{401}'), ('\u{452}', '\u{402}'), ('\u{453}', '\u{403}'), ('\u{454}',
-        '\u{404}'), ('\u{455}', '\u{405}'), ('\u{456}', '\u{406}'), ('\u{457}',
-        '\u{407}'), ('\u{458}', '\u{408}'), ('\u{459}', '\u{409}'), ('\u{45a}',
-        '\u{40a}'), ('\u{45b}', '\u{40b}'), ('\u{45c}', '\u{40c}'), ('\u{45d}',
-        '\u{40d}'), ('\u{45e}', '\u{40e}'), ('\u{45f}', '\u{40f}'), ('\u{460}',
-        '\u{461}'), ('\u{461}', '\u{460}'), ('\u{462}', '\u{463}'), ('\u{463}',
-        '\u{462}'), ('\u{464}', '\u{465}'), ('\u{465}', '\u{464}'), ('\u{466}',
-        '\u{467}'), ('\u{467}', '\u{466}'), ('\u{468}', '\u{469}'), ('\u{469}',
-        '\u{468}'), ('\u{46a}', '\u{46b}'), ('\u{46b}', '\u{46a}'), ('\u{46c}',
-        '\u{46d}'), ('\u{46d}', '\u{46c}'), ('\u{46e}', '\u{46f}'), ('\u{46f}',
-        '\u{46e}'), ('\u{470}', '\u{471}'), ('\u{471}', '\u{470}'), ('\u{472}',
-        '\u{473}'), ('\u{473}', '\u{472}'), ('\u{474}', '\u{475}'), ('\u{475}',
-        '\u{474}'), ('\u{476}', '\u{477}'), ('\u{477}', '\u{476}'), ('\u{478}',
-        '\u{479}'), ('\u{479}', '\u{478}'), ('\u{47a}', '\u{47b}'), ('\u{47b}',
-        '\u{47a}'), ('\u{47c}', '\u{47d}'), ('\u{47d}', '\u{47c}'), ('\u{47e}',
-        '\u{47f}'), ('\u{47f}', '\u{47e}'), ('\u{480}', '\u{481}'), ('\u{481}',
-        '\u{480}'), ('\u{48a}', '\u{48b}'), ('\u{48b}', '\u{48a}'), ('\u{48c}',
-        '\u{48d}'), ('\u{48d}', '\u{48c}'), ('\u{48e}', '\u{48f}'), ('\u{48f}',
-        '\u{48e}'), ('\u{490}', '\u{491}'), ('\u{491}', '\u{490}'), ('\u{492}',
-        '\u{493}'), ('\u{493}', '\u{492}'), ('\u{494}', '\u{495}'), ('\u{495}',
-        '\u{494}'), ('\u{496}', '\u{497}'), ('\u{497}', '\u{496}'), ('\u{498}',
-        '\u{499}'), ('\u{499}', '\u{498}'), ('\u{49a}', '\u{49b}'), ('\u{49b}',
-        '\u{49a}'), ('\u{49c}', '\u{49d}'), ('\u{49d}', '\u{49c}'), ('\u{49e}',
-        '\u{49f}'), ('\u{49f}', '\u{49e}'), ('\u{4a0}', '\u{4a1}'), ('\u{4a1}',
-        '\u{4a0}'), ('\u{4a2}', '\u{4a3}'), ('\u{4a3}', '\u{4a2}'), ('\u{4a4}',
-        '\u{4a5}'), ('\u{4a5}', '\u{4a4}'), ('\u{4a6}', '\u{4a7}'), ('\u{4a7}',
-        '\u{4a6}'), ('\u{4a8}', '\u{4a9}'), ('\u{4a9}', '\u{4a8}'), ('\u{4aa}',
-        '\u{4ab}'), ('\u{4ab}', '\u{4aa}'), ('\u{4ac}', '\u{4ad}'), ('\u{4ad}',
-        '\u{4ac}'), ('\u{4ae}', '\u{4af}'), ('\u{4af}', '\u{4ae}'), ('\u{4b0}',
-        '\u{4b1}'), ('\u{4b1}', '\u{4b0}'), ('\u{4b2}', '\u{4b3}'), ('\u{4b3}',
-        '\u{4b2}'), ('\u{4b4}', '\u{4b5}'), ('\u{4b5}', '\u{4b4}'), ('\u{4b6}',
-        '\u{4b7}'), ('\u{4b7}', '\u{4b6}'), ('\u{4b8}', '\u{4b9}'), ('\u{4b9}',
-        '\u{4b8}'), ('\u{4ba}', '\u{4bb}'), ('\u{4bb}', '\u{4ba}'), ('\u{4bc}',
-        '\u{4bd}'), ('\u{4bd}', '\u{4bc}'), ('\u{4be}', '\u{4bf}'), ('\u{4bf}',
-        '\u{4be}'), ('\u{4c0}', '\u{4cf}'), ('\u{4c1}', '\u{4c2}'), ('\u{4c2}',
-        '\u{4c1}'), ('\u{4c3}', '\u{4c4}'), ('\u{4c4}', '\u{4c3}'), ('\u{4c5}',
-        '\u{4c6}'), ('\u{4c6}', '\u{4c5}'), ('\u{4c7}', '\u{4c8}'), ('\u{4c8}',
-        '\u{4c7}'), ('\u{4c9}', '\u{4ca}'), ('\u{4ca}', '\u{4c9}'), ('\u{4cb}',
-        '\u{4cc}'), ('\u{4cc}', '\u{4cb}'), ('\u{4cd}', '\u{4ce}'), ('\u{4ce}',
-        '\u{4cd}'), ('\u{4cf}', '\u{4c0}'), ('\u{4d0}', '\u{4d1}'), ('\u{4d1}',
-        '\u{4d0}'), ('\u{4d2}', '\u{4d3}'), ('\u{4d3}', '\u{4d2}'), ('\u{4d4}',
-        '\u{4d5}'), ('\u{4d5}', '\u{4d4}'), ('\u{4d6}', '\u{4d7}'), ('\u{4d7}',
-        '\u{4d6}'), ('\u{4d8}', '\u{4d9}'), ('\u{4d9}', '\u{4d8}'), ('\u{4da}',
-        '\u{4db}'), ('\u{4db}', '\u{4da}'), ('\u{4dc}', '\u{4dd}'), ('\u{4dd}',
-        '\u{4dc}'), ('\u{4de}', '\u{4df}'), ('\u{4df}', '\u{4de}'), ('\u{4e0}',
-        '\u{4e1}'), ('\u{4e1}', '\u{4e0}'), ('\u{4e2}', '\u{4e3}'), ('\u{4e3}',
-        '\u{4e2}'), ('\u{4e4}', '\u{4e5}'), ('\u{4e5}', '\u{4e4}'), ('\u{4e6}',
-        '\u{4e7}'), ('\u{4e7}', '\u{4e6}'), ('\u{4e8}', '\u{4e9}'), ('\u{4e9}',
-        '\u{4e8}'), ('\u{4ea}', '\u{4eb}'), ('\u{4eb}', '\u{4ea}'), ('\u{4ec}',
-        '\u{4ed}'), ('\u{4ed}', '\u{4ec}'), ('\u{4ee}', '\u{4ef}'), ('\u{4ef}',
-        '\u{4ee}'), ('\u{4f0}', '\u{4f1}'), ('\u{4f1}', '\u{4f0}'), ('\u{4f2}',
-        '\u{4f3}'), ('\u{4f3}', '\u{4f2}'), ('\u{4f4}', '\u{4f5}'), ('\u{4f5}',
-        '\u{4f4}'), ('\u{4f6}', '\u{4f7}'), ('\u{4f7}', '\u{4f6}'), ('\u{4f8}',
-        '\u{4f9}'), ('\u{4f9}', '\u{4f8}'), ('\u{4fa}', '\u{4fb}'), ('\u{4fb}',
-        '\u{4fa}'), ('\u{4fc}', '\u{4fd}'), ('\u{4fd}', '\u{4fc}'), ('\u{4fe}',
-        '\u{4ff}'), ('\u{4ff}', '\u{4fe}'), ('\u{500}', '\u{501}'), ('\u{501}',
-        '\u{500}'), ('\u{502}', '\u{503}'), ('\u{503}', '\u{502}'), ('\u{504}',
-        '\u{505}'), ('\u{505}', '\u{504}'), ('\u{506}', '\u{507}'), ('\u{507}',
-        '\u{506}'), ('\u{508}', '\u{509}'), ('\u{509}', '\u{508}'), ('\u{50a}',
-        '\u{50b}'), ('\u{50b}', '\u{50a}'), ('\u{50c}', '\u{50d}'), ('\u{50d}',
-        '\u{50c}'), ('\u{50e}', '\u{50f}'), ('\u{50f}', '\u{50e}'), ('\u{510}',
-        '\u{511}'), ('\u{511}', '\u{510}'), ('\u{512}', '\u{513}'), ('\u{513}',
-        '\u{512}'), ('\u{514}', '\u{515}'), ('\u{515}', '\u{514}'), ('\u{516}',
-        '\u{517}'), ('\u{517}', '\u{516}'), ('\u{518}', '\u{519}'), ('\u{519}',
-        '\u{518}'), ('\u{51a}', '\u{51b}'), ('\u{51b}', '\u{51a}'), ('\u{51c}',
-        '\u{51d}'), ('\u{51d}', '\u{51c}'), ('\u{51e}', '\u{51f}'), ('\u{51f}',
-        '\u{51e}'), ('\u{520}', '\u{521}'), ('\u{521}', '\u{520}'), ('\u{522}',
-        '\u{523}'), ('\u{523}', '\u{522}'), ('\u{524}', '\u{525}'), ('\u{525}',
-        '\u{524}'), ('\u{526}', '\u{527}'), ('\u{527}', '\u{526}'), ('\u{528}',
-        '\u{529}'), ('\u{529}', '\u{528}'), ('\u{52a}', '\u{52b}'), ('\u{52b}',
-        '\u{52a}'), ('\u{52c}', '\u{52d}'), ('\u{52d}', '\u{52c}'), ('\u{52e}',
-        '\u{52f}'), ('\u{52f}', '\u{52e}'), ('\u{531}', '\u{561}'), ('\u{532}',
-        '\u{562}'), ('\u{533}', '\u{563}'), ('\u{534}', '\u{564}'), ('\u{535}',
-        '\u{565}'), ('\u{536}', '\u{566}'), ('\u{537}', '\u{567}'), ('\u{538}',
-        '\u{568}'), ('\u{539}', '\u{569}'), ('\u{53a}', '\u{56a}'), ('\u{53b}',
-        '\u{56b}'), ('\u{53c}', '\u{56c}'), ('\u{53d}', '\u{56d}'), ('\u{53e}',
-        '\u{56e}'), ('\u{53f}', '\u{56f}'), ('\u{540}', '\u{570}'), ('\u{541}',
-        '\u{571}'), ('\u{542}', '\u{572}'), ('\u{543}', '\u{573}'), ('\u{544}',
-        '\u{574}'), ('\u{545}', '\u{575}'), ('\u{546}', '\u{576}'), ('\u{547}',
-        '\u{577}'), ('\u{548}', '\u{578}'), ('\u{549}', '\u{579}'), ('\u{54a}',
-        '\u{57a}'), ('\u{54b}', '\u{57b}'), ('\u{54c}', '\u{57c}'), ('\u{54d}',
-        '\u{57d}'), ('\u{54e}', '\u{57e}'), ('\u{54f}', '\u{57f}'), ('\u{550}',
-        '\u{580}'), ('\u{551}', '\u{581}'), ('\u{552}', '\u{582}'), ('\u{553}',
-        '\u{583}'), ('\u{554}', '\u{584}'), ('\u{555}', '\u{585}'), ('\u{556}',
-        '\u{586}'), ('\u{561}', '\u{531}'), ('\u{562}', '\u{532}'), ('\u{563}',
-        '\u{533}'), ('\u{564}', '\u{534}'), ('\u{565}', '\u{535}'), ('\u{566}',
-        '\u{536}'), ('\u{567}', '\u{537}'), ('\u{568}', '\u{538}'), ('\u{569}',
-        '\u{539}'), ('\u{56a}', '\u{53a}'), ('\u{56b}', '\u{53b}'), ('\u{56c}',
-        '\u{53c}'), ('\u{56d}', '\u{53d}'), ('\u{56e}', '\u{53e}'), ('\u{56f}',
-        '\u{53f}'), ('\u{570}', '\u{540}'), ('\u{571}', '\u{541}'), ('\u{572}',
-        '\u{542}'), ('\u{573}', '\u{543}'), ('\u{574}', '\u{544}'), ('\u{575}',
-        '\u{545}'), ('\u{576}', '\u{546}'), ('\u{577}', '\u{547}'), ('\u{578}',
-        '\u{548}'), ('\u{579}', '\u{549}'), ('\u{57a}', '\u{54a}'), ('\u{57b}',
-        '\u{54b}'), ('\u{57c}', '\u{54c}'), ('\u{57d}', '\u{54d}'), ('\u{57e}',
-        '\u{54e}'), ('\u{57f}', '\u{54f}'), ('\u{580}', '\u{550}'), ('\u{581}',
-        '\u{551}'), ('\u{582}', '\u{552}'), ('\u{583}', '\u{553}'), ('\u{584}',
-        '\u{554}'), ('\u{585}', '\u{555}'), ('\u{586}', '\u{556}'), ('\u{10a0}',
-        '\u{2d00}'), ('\u{10a1}', '\u{2d01}'), ('\u{10a2}', '\u{2d02}'),
-        ('\u{10a3}', '\u{2d03}'), ('\u{10a4}', '\u{2d04}'), ('\u{10a5}',
-        '\u{2d05}'), ('\u{10a6}', '\u{2d06}'), ('\u{10a7}', '\u{2d07}'),
-        ('\u{10a8}', '\u{2d08}'), ('\u{10a9}', '\u{2d09}'), ('\u{10aa}',
-        '\u{2d0a}'), ('\u{10ab}', '\u{2d0b}'), ('\u{10ac}', '\u{2d0c}'),
-        ('\u{10ad}', '\u{2d0d}'), ('\u{10ae}', '\u{2d0e}'), ('\u{10af}',
-        '\u{2d0f}'), ('\u{10b0}', '\u{2d10}'), ('\u{10b1}', '\u{2d11}'),
-        ('\u{10b2}', '\u{2d12}'), ('\u{10b3}', '\u{2d13}'), ('\u{10b4}',
-        '\u{2d14}'), ('\u{10b5}', '\u{2d15}'), ('\u{10b6}', '\u{2d16}'),
-        ('\u{10b7}', '\u{2d17}'), ('\u{10b8}', '\u{2d18}'), ('\u{10b9}',
-        '\u{2d19}'), ('\u{10ba}', '\u{2d1a}'), ('\u{10bb}', '\u{2d1b}'),
-        ('\u{10bc}', '\u{2d1c}'), ('\u{10bd}', '\u{2d1d}'), ('\u{10be}',
-        '\u{2d1e}'), ('\u{10bf}', '\u{2d1f}'), ('\u{10c0}', '\u{2d20}'),
-        ('\u{10c1}', '\u{2d21}'), ('\u{10c2}', '\u{2d22}'), ('\u{10c3}',
-        '\u{2d23}'), ('\u{10c4}', '\u{2d24}'), ('\u{10c5}', '\u{2d25}'),
-        ('\u{10c7}', '\u{2d27}'), ('\u{10cd}', '\u{2d2d}'), ('\u{13a0}',
-        '\u{ab70}'), ('\u{13a1}', '\u{ab71}'), ('\u{13a2}', '\u{ab72}'),
-        ('\u{13a3}', '\u{ab73}'), ('\u{13a4}', '\u{ab74}'), ('\u{13a5}',
-        '\u{ab75}'), ('\u{13a6}', '\u{ab76}'), ('\u{13a7}', '\u{ab77}'),
-        ('\u{13a8}', '\u{ab78}'), ('\u{13a9}', '\u{ab79}'), ('\u{13aa}',
-        '\u{ab7a}'), ('\u{13ab}', '\u{ab7b}'), ('\u{13ac}', '\u{ab7c}'),
-        ('\u{13ad}', '\u{ab7d}'), ('\u{13ae}', '\u{ab7e}'), ('\u{13af}',
-        '\u{ab7f}'), ('\u{13b0}', '\u{ab80}'), ('\u{13b1}', '\u{ab81}'),
-        ('\u{13b2}', '\u{ab82}'), ('\u{13b3}', '\u{ab83}'), ('\u{13b4}',
-        '\u{ab84}'), ('\u{13b5}', '\u{ab85}'), ('\u{13b6}', '\u{ab86}'),
-        ('\u{13b7}', '\u{ab87}'), ('\u{13b8}', '\u{ab88}'), ('\u{13b9}',
-        '\u{ab89}'), ('\u{13ba}', '\u{ab8a}'), ('\u{13bb}', '\u{ab8b}'),
-        ('\u{13bc}', '\u{ab8c}'), ('\u{13bd}', '\u{ab8d}'), ('\u{13be}',
-        '\u{ab8e}'), ('\u{13bf}', '\u{ab8f}'), ('\u{13c0}', '\u{ab90}'),
-        ('\u{13c1}', '\u{ab91}'), ('\u{13c2}', '\u{ab92}'), ('\u{13c3}',
-        '\u{ab93}'), ('\u{13c4}', '\u{ab94}'), ('\u{13c5}', '\u{ab95}'),
-        ('\u{13c6}', '\u{ab96}'), ('\u{13c7}', '\u{ab97}'), ('\u{13c8}',
-        '\u{ab98}'), ('\u{13c9}', '\u{ab99}'), ('\u{13ca}', '\u{ab9a}'),
-        ('\u{13cb}', '\u{ab9b}'), ('\u{13cc}', '\u{ab9c}'), ('\u{13cd}',
-        '\u{ab9d}'), ('\u{13ce}', '\u{ab9e}'), ('\u{13cf}', '\u{ab9f}'),
-        ('\u{13d0}', '\u{aba0}'), ('\u{13d1}', '\u{aba1}'), ('\u{13d2}',
-        '\u{aba2}'), ('\u{13d3}', '\u{aba3}'), ('\u{13d4}', '\u{aba4}'),
-        ('\u{13d5}', '\u{aba5}'), ('\u{13d6}', '\u{aba6}'), ('\u{13d7}',
-        '\u{aba7}'), ('\u{13d8}', '\u{aba8}'), ('\u{13d9}', '\u{aba9}'),
-        ('\u{13da}', '\u{abaa}'), ('\u{13db}', '\u{abab}'), ('\u{13dc}',
-        '\u{abac}'), ('\u{13dd}', '\u{abad}'), ('\u{13de}', '\u{abae}'),
-        ('\u{13df}', '\u{abaf}'), ('\u{13e0}', '\u{abb0}'), ('\u{13e1}',
-        '\u{abb1}'), ('\u{13e2}', '\u{abb2}'), ('\u{13e3}', '\u{abb3}'),
-        ('\u{13e4}', '\u{abb4}'), ('\u{13e5}', '\u{abb5}'), ('\u{13e6}',
-        '\u{abb6}'), ('\u{13e7}', '\u{abb7}'), ('\u{13e8}', '\u{abb8}'),
-        ('\u{13e9}', '\u{abb9}'), ('\u{13ea}', '\u{abba}'), ('\u{13eb}',
-        '\u{abbb}'), ('\u{13ec}', '\u{abbc}'), ('\u{13ed}', '\u{abbd}'),
-        ('\u{13ee}', '\u{abbe}'), ('\u{13ef}', '\u{abbf}'), ('\u{13f0}',
-        '\u{13f8}'), ('\u{13f1}', '\u{13f9}'), ('\u{13f2}', '\u{13fa}'),
-        ('\u{13f3}', '\u{13fb}'), ('\u{13f4}', '\u{13fc}'), ('\u{13f5}',
-        '\u{13fd}'), ('\u{13f8}', '\u{13f0}'), ('\u{13f9}', '\u{13f1}'),
-        ('\u{13fa}', '\u{13f2}'), ('\u{13fb}', '\u{13f3}'), ('\u{13fc}',
-        '\u{13f4}'), ('\u{13fd}', '\u{13f5}'), ('\u{1d79}', '\u{a77d}'),
-        ('\u{1d7d}', '\u{2c63}'), ('\u{1e00}', '\u{1e01}'), ('\u{1e01}',
-        '\u{1e00}'), ('\u{1e02}', '\u{1e03}'), ('\u{1e03}', '\u{1e02}'),
-        ('\u{1e04}', '\u{1e05}'), ('\u{1e05}', '\u{1e04}'), ('\u{1e06}',
-        '\u{1e07}'), ('\u{1e07}', '\u{1e06}'), ('\u{1e08}', '\u{1e09}'),
-        ('\u{1e09}', '\u{1e08}'), ('\u{1e0a}', '\u{1e0b}'), ('\u{1e0b}',
-        '\u{1e0a}'), ('\u{1e0c}', '\u{1e0d}'), ('\u{1e0d}', '\u{1e0c}'),
-        ('\u{1e0e}', '\u{1e0f}'), ('\u{1e0f}', '\u{1e0e}'), ('\u{1e10}',
-        '\u{1e11}'), ('\u{1e11}', '\u{1e10}'), ('\u{1e12}', '\u{1e13}'),
-        ('\u{1e13}', '\u{1e12}'), ('\u{1e14}', '\u{1e15}'), ('\u{1e15}',
-        '\u{1e14}'), ('\u{1e16}', '\u{1e17}'), ('\u{1e17}', '\u{1e16}'),
-        ('\u{1e18}', '\u{1e19}'), ('\u{1e19}', '\u{1e18}'), ('\u{1e1a}',
-        '\u{1e1b}'), ('\u{1e1b}', '\u{1e1a}'), ('\u{1e1c}', '\u{1e1d}'),
-        ('\u{1e1d}', '\u{1e1c}'), ('\u{1e1e}', '\u{1e1f}'), ('\u{1e1f}',
-        '\u{1e1e}'), ('\u{1e20}', '\u{1e21}'), ('\u{1e21}', '\u{1e20}'),
-        ('\u{1e22}', '\u{1e23}'), ('\u{1e23}', '\u{1e22}'), ('\u{1e24}',
-        '\u{1e25}'), ('\u{1e25}', '\u{1e24}'), ('\u{1e26}', '\u{1e27}'),
-        ('\u{1e27}', '\u{1e26}'), ('\u{1e28}', '\u{1e29}'), ('\u{1e29}',
-        '\u{1e28}'), ('\u{1e2a}', '\u{1e2b}'), ('\u{1e2b}', '\u{1e2a}'),
-        ('\u{1e2c}', '\u{1e2d}'), ('\u{1e2d}', '\u{1e2c}'), ('\u{1e2e}',
-        '\u{1e2f}'), ('\u{1e2f}', '\u{1e2e}'), ('\u{1e30}', '\u{1e31}'),
-        ('\u{1e31}', '\u{1e30}'), ('\u{1e32}', '\u{1e33}'), ('\u{1e33}',
-        '\u{1e32}'), ('\u{1e34}', '\u{1e35}'), ('\u{1e35}', '\u{1e34}'),
-        ('\u{1e36}', '\u{1e37}'), ('\u{1e37}', '\u{1e36}'), ('\u{1e38}',
-        '\u{1e39}'), ('\u{1e39}', '\u{1e38}'), ('\u{1e3a}', '\u{1e3b}'),
-        ('\u{1e3b}', '\u{1e3a}'), ('\u{1e3c}', '\u{1e3d}'), ('\u{1e3d}',
-        '\u{1e3c}'), ('\u{1e3e}', '\u{1e3f}'), ('\u{1e3f}', '\u{1e3e}'),
-        ('\u{1e40}', '\u{1e41}'), ('\u{1e41}', '\u{1e40}'), ('\u{1e42}',
-        '\u{1e43}'), ('\u{1e43}', '\u{1e42}'), ('\u{1e44}', '\u{1e45}'),
-        ('\u{1e45}', '\u{1e44}'), ('\u{1e46}', '\u{1e47}'), ('\u{1e47}',
-        '\u{1e46}'), ('\u{1e48}', '\u{1e49}'), ('\u{1e49}', '\u{1e48}'),
-        ('\u{1e4a}', '\u{1e4b}'), ('\u{1e4b}', '\u{1e4a}'), ('\u{1e4c}',
-        '\u{1e4d}'), ('\u{1e4d}', '\u{1e4c}'), ('\u{1e4e}', '\u{1e4f}'),
-        ('\u{1e4f}', '\u{1e4e}'), ('\u{1e50}', '\u{1e51}'), ('\u{1e51}',
-        '\u{1e50}'), ('\u{1e52}', '\u{1e53}'), ('\u{1e53}', '\u{1e52}'),
-        ('\u{1e54}', '\u{1e55}'), ('\u{1e55}', '\u{1e54}'), ('\u{1e56}',
-        '\u{1e57}'), ('\u{1e57}', '\u{1e56}'), ('\u{1e58}', '\u{1e59}'),
-        ('\u{1e59}', '\u{1e58}'), ('\u{1e5a}', '\u{1e5b}'), ('\u{1e5b}',
-        '\u{1e5a}'), ('\u{1e5c}', '\u{1e5d}'), ('\u{1e5d}', '\u{1e5c}'),
-        ('\u{1e5e}', '\u{1e5f}'), ('\u{1e5f}', '\u{1e5e}'), ('\u{1e60}',
-        '\u{1e61}'), ('\u{1e60}', '\u{1e9b}'), ('\u{1e61}', '\u{1e60}'),
-        ('\u{1e61}', '\u{1e9b}'), ('\u{1e62}', '\u{1e63}'), ('\u{1e63}',
-        '\u{1e62}'), ('\u{1e64}', '\u{1e65}'), ('\u{1e65}', '\u{1e64}'),
-        ('\u{1e66}', '\u{1e67}'), ('\u{1e67}', '\u{1e66}'), ('\u{1e68}',
-        '\u{1e69}'), ('\u{1e69}', '\u{1e68}'), ('\u{1e6a}', '\u{1e6b}'),
-        ('\u{1e6b}', '\u{1e6a}'), ('\u{1e6c}', '\u{1e6d}'), ('\u{1e6d}',
-        '\u{1e6c}'), ('\u{1e6e}', '\u{1e6f}'), ('\u{1e6f}', '\u{1e6e}'),
-        ('\u{1e70}', '\u{1e71}'), ('\u{1e71}', '\u{1e70}'), ('\u{1e72}',
-        '\u{1e73}'), ('\u{1e73}', '\u{1e72}'), ('\u{1e74}', '\u{1e75}'),
-        ('\u{1e75}', '\u{1e74}'), ('\u{1e76}', '\u{1e77}'), ('\u{1e77}',
-        '\u{1e76}'), ('\u{1e78}', '\u{1e79}'), ('\u{1e79}', '\u{1e78}'),
-        ('\u{1e7a}', '\u{1e7b}'), ('\u{1e7b}', '\u{1e7a}'), ('\u{1e7c}',
-        '\u{1e7d}'), ('\u{1e7d}', '\u{1e7c}'), ('\u{1e7e}', '\u{1e7f}'),
-        ('\u{1e7f}', '\u{1e7e}'), ('\u{1e80}', '\u{1e81}'), ('\u{1e81}',
-        '\u{1e80}'), ('\u{1e82}', '\u{1e83}'), ('\u{1e83}', '\u{1e82}'),
-        ('\u{1e84}', '\u{1e85}'), ('\u{1e85}', '\u{1e84}'), ('\u{1e86}',
-        '\u{1e87}'), ('\u{1e87}', '\u{1e86}'), ('\u{1e88}', '\u{1e89}'),
-        ('\u{1e89}', '\u{1e88}'), ('\u{1e8a}', '\u{1e8b}'), ('\u{1e8b}',
-        '\u{1e8a}'), ('\u{1e8c}', '\u{1e8d}'), ('\u{1e8d}', '\u{1e8c}'),
-        ('\u{1e8e}', '\u{1e8f}'), ('\u{1e8f}', '\u{1e8e}'), ('\u{1e90}',
-        '\u{1e91}'), ('\u{1e91}', '\u{1e90}'), ('\u{1e92}', '\u{1e93}'),
-        ('\u{1e93}', '\u{1e92}'), ('\u{1e94}', '\u{1e95}'), ('\u{1e95}',
-        '\u{1e94}'), ('\u{1e9b}', '\u{1e60}'), ('\u{1e9b}', '\u{1e61}'),
-        ('\u{1e9e}', '\u{df}'), ('\u{1ea0}', '\u{1ea1}'), ('\u{1ea1}',
-        '\u{1ea0}'), ('\u{1ea2}', '\u{1ea3}'), ('\u{1ea3}', '\u{1ea2}'),
-        ('\u{1ea4}', '\u{1ea5}'), ('\u{1ea5}', '\u{1ea4}'), ('\u{1ea6}',
-        '\u{1ea7}'), ('\u{1ea7}', '\u{1ea6}'), ('\u{1ea8}', '\u{1ea9}'),
-        ('\u{1ea9}', '\u{1ea8}'), ('\u{1eaa}', '\u{1eab}'), ('\u{1eab}',
-        '\u{1eaa}'), ('\u{1eac}', '\u{1ead}'), ('\u{1ead}', '\u{1eac}'),
-        ('\u{1eae}', '\u{1eaf}'), ('\u{1eaf}', '\u{1eae}'), ('\u{1eb0}',
-        '\u{1eb1}'), ('\u{1eb1}', '\u{1eb0}'), ('\u{1eb2}', '\u{1eb3}'),
-        ('\u{1eb3}', '\u{1eb2}'), ('\u{1eb4}', '\u{1eb5}'), ('\u{1eb5}',
-        '\u{1eb4}'), ('\u{1eb6}', '\u{1eb7}'), ('\u{1eb7}', '\u{1eb6}'),
-        ('\u{1eb8}', '\u{1eb9}'), ('\u{1eb9}', '\u{1eb8}'), ('\u{1eba}',
-        '\u{1ebb}'), ('\u{1ebb}', '\u{1eba}'), ('\u{1ebc}', '\u{1ebd}'),
-        ('\u{1ebd}', '\u{1ebc}'), ('\u{1ebe}', '\u{1ebf}'), ('\u{1ebf}',
-        '\u{1ebe}'), ('\u{1ec0}', '\u{1ec1}'), ('\u{1ec1}', '\u{1ec0}'),
-        ('\u{1ec2}', '\u{1ec3}'), ('\u{1ec3}', '\u{1ec2}'), ('\u{1ec4}',
-        '\u{1ec5}'), ('\u{1ec5}', '\u{1ec4}'), ('\u{1ec6}', '\u{1ec7}'),
-        ('\u{1ec7}', '\u{1ec6}'), ('\u{1ec8}', '\u{1ec9}'), ('\u{1ec9}',
-        '\u{1ec8}'), ('\u{1eca}', '\u{1ecb}'), ('\u{1ecb}', '\u{1eca}'),
-        ('\u{1ecc}', '\u{1ecd}'), ('\u{1ecd}', '\u{1ecc}'), ('\u{1ece}',
-        '\u{1ecf}'), ('\u{1ecf}', '\u{1ece}'), ('\u{1ed0}', '\u{1ed1}'),
-        ('\u{1ed1}', '\u{1ed0}'), ('\u{1ed2}', '\u{1ed3}'), ('\u{1ed3}',
-        '\u{1ed2}'), ('\u{1ed4}', '\u{1ed5}'), ('\u{1ed5}', '\u{1ed4}'),
-        ('\u{1ed6}', '\u{1ed7}'), ('\u{1ed7}', '\u{1ed6}'), ('\u{1ed8}',
-        '\u{1ed9}'), ('\u{1ed9}', '\u{1ed8}'), ('\u{1eda}', '\u{1edb}'),
-        ('\u{1edb}', '\u{1eda}'), ('\u{1edc}', '\u{1edd}'), ('\u{1edd}',
-        '\u{1edc}'), ('\u{1ede}', '\u{1edf}'), ('\u{1edf}', '\u{1ede}'),
-        ('\u{1ee0}', '\u{1ee1}'), ('\u{1ee1}', '\u{1ee0}'), ('\u{1ee2}',
-        '\u{1ee3}'), ('\u{1ee3}', '\u{1ee2}'), ('\u{1ee4}', '\u{1ee5}'),
-        ('\u{1ee5}', '\u{1ee4}'), ('\u{1ee6}', '\u{1ee7}'), ('\u{1ee7}',
-        '\u{1ee6}'), ('\u{1ee8}', '\u{1ee9}'), ('\u{1ee9}', '\u{1ee8}'),
-        ('\u{1eea}', '\u{1eeb}'), ('\u{1eeb}', '\u{1eea}'), ('\u{1eec}',
-        '\u{1eed}'), ('\u{1eed}', '\u{1eec}'), ('\u{1eee}', '\u{1eef}'),
-        ('\u{1eef}', '\u{1eee}'), ('\u{1ef0}', '\u{1ef1}'), ('\u{1ef1}',
-        '\u{1ef0}'), ('\u{1ef2}', '\u{1ef3}'), ('\u{1ef3}', '\u{1ef2}'),
-        ('\u{1ef4}', '\u{1ef5}'), ('\u{1ef5}', '\u{1ef4}'), ('\u{1ef6}',
-        '\u{1ef7}'), ('\u{1ef7}', '\u{1ef6}'), ('\u{1ef8}', '\u{1ef9}'),
-        ('\u{1ef9}', '\u{1ef8}'), ('\u{1efa}', '\u{1efb}'), ('\u{1efb}',
-        '\u{1efa}'), ('\u{1efc}', '\u{1efd}'), ('\u{1efd}', '\u{1efc}'),
-        ('\u{1efe}', '\u{1eff}'), ('\u{1eff}', '\u{1efe}'), ('\u{1f00}',
-        '\u{1f08}'), ('\u{1f01}', '\u{1f09}'), ('\u{1f02}', '\u{1f0a}'),
-        ('\u{1f03}', '\u{1f0b}'), ('\u{1f04}', '\u{1f0c}'), ('\u{1f05}',
-        '\u{1f0d}'), ('\u{1f06}', '\u{1f0e}'), ('\u{1f07}', '\u{1f0f}'),
-        ('\u{1f08}', '\u{1f00}'), ('\u{1f09}', '\u{1f01}'), ('\u{1f0a}',
-        '\u{1f02}'), ('\u{1f0b}', '\u{1f03}'), ('\u{1f0c}', '\u{1f04}'),
-        ('\u{1f0d}', '\u{1f05}'), ('\u{1f0e}', '\u{1f06}'), ('\u{1f0f}',
-        '\u{1f07}'), ('\u{1f10}', '\u{1f18}'), ('\u{1f11}', '\u{1f19}'),
-        ('\u{1f12}', '\u{1f1a}'), ('\u{1f13}', '\u{1f1b}'), ('\u{1f14}',
-        '\u{1f1c}'), ('\u{1f15}', '\u{1f1d}'), ('\u{1f18}', '\u{1f10}'),
-        ('\u{1f19}', '\u{1f11}'), ('\u{1f1a}', '\u{1f12}'), ('\u{1f1b}',
-        '\u{1f13}'), ('\u{1f1c}', '\u{1f14}'), ('\u{1f1d}', '\u{1f15}'),
-        ('\u{1f20}', '\u{1f28}'), ('\u{1f21}', '\u{1f29}'), ('\u{1f22}',
-        '\u{1f2a}'), ('\u{1f23}', '\u{1f2b}'), ('\u{1f24}', '\u{1f2c}'),
-        ('\u{1f25}', '\u{1f2d}'), ('\u{1f26}', '\u{1f2e}'), ('\u{1f27}',
-        '\u{1f2f}'), ('\u{1f28}', '\u{1f20}'), ('\u{1f29}', '\u{1f21}'),
-        ('\u{1f2a}', '\u{1f22}'), ('\u{1f2b}', '\u{1f23}'), ('\u{1f2c}',
-        '\u{1f24}'), ('\u{1f2d}', '\u{1f25}'), ('\u{1f2e}', '\u{1f26}'),
-        ('\u{1f2f}', '\u{1f27}'), ('\u{1f30}', '\u{1f38}'), ('\u{1f31}',
-        '\u{1f39}'), ('\u{1f32}', '\u{1f3a}'), ('\u{1f33}', '\u{1f3b}'),
-        ('\u{1f34}', '\u{1f3c}'), ('\u{1f35}', '\u{1f3d}'), ('\u{1f36}',
-        '\u{1f3e}'), ('\u{1f37}', '\u{1f3f}'), ('\u{1f38}', '\u{1f30}'),
-        ('\u{1f39}', '\u{1f31}'), ('\u{1f3a}', '\u{1f32}'), ('\u{1f3b}',
-        '\u{1f33}'), ('\u{1f3c}', '\u{1f34}'), ('\u{1f3d}', '\u{1f35}'),
-        ('\u{1f3e}', '\u{1f36}'), ('\u{1f3f}', '\u{1f37}'), ('\u{1f40}',
-        '\u{1f48}'), ('\u{1f41}', '\u{1f49}'), ('\u{1f42}', '\u{1f4a}'),
-        ('\u{1f43}', '\u{1f4b}'), ('\u{1f44}', '\u{1f4c}'), ('\u{1f45}',
-        '\u{1f4d}'), ('\u{1f48}', '\u{1f40}'), ('\u{1f49}', '\u{1f41}'),
-        ('\u{1f4a}', '\u{1f42}'), ('\u{1f4b}', '\u{1f43}'), ('\u{1f4c}',
-        '\u{1f44}'), ('\u{1f4d}', '\u{1f45}'), ('\u{1f51}', '\u{1f59}'),
-        ('\u{1f53}', '\u{1f5b}'), ('\u{1f55}', '\u{1f5d}'), ('\u{1f57}',
-        '\u{1f5f}'), ('\u{1f59}', '\u{1f51}'), ('\u{1f5b}', '\u{1f53}'),
-        ('\u{1f5d}', '\u{1f55}'), ('\u{1f5f}', '\u{1f57}'), ('\u{1f60}',
-        '\u{1f68}'), ('\u{1f61}', '\u{1f69}'), ('\u{1f62}', '\u{1f6a}'),
-        ('\u{1f63}', '\u{1f6b}'), ('\u{1f64}', '\u{1f6c}'), ('\u{1f65}',
-        '\u{1f6d}'), ('\u{1f66}', '\u{1f6e}'), ('\u{1f67}', '\u{1f6f}'),
-        ('\u{1f68}', '\u{1f60}'), ('\u{1f69}', '\u{1f61}'), ('\u{1f6a}',
-        '\u{1f62}'), ('\u{1f6b}', '\u{1f63}'), ('\u{1f6c}', '\u{1f64}'),
-        ('\u{1f6d}', '\u{1f65}'), ('\u{1f6e}', '\u{1f66}'), ('\u{1f6f}',
-        '\u{1f67}'), ('\u{1f70}', '\u{1fba}'), ('\u{1f71}', '\u{1fbb}'),
-        ('\u{1f72}', '\u{1fc8}'), ('\u{1f73}', '\u{1fc9}'), ('\u{1f74}',
-        '\u{1fca}'), ('\u{1f75}', '\u{1fcb}'), ('\u{1f76}', '\u{1fda}'),
-        ('\u{1f77}', '\u{1fdb}'), ('\u{1f78}', '\u{1ff8}'), ('\u{1f79}',
-        '\u{1ff9}'), ('\u{1f7a}', '\u{1fea}'), ('\u{1f7b}', '\u{1feb}'),
-        ('\u{1f7c}', '\u{1ffa}'), ('\u{1f7d}', '\u{1ffb}'), ('\u{1f80}',
-        '\u{1f88}'), ('\u{1f81}', '\u{1f89}'), ('\u{1f82}', '\u{1f8a}'),
-        ('\u{1f83}', '\u{1f8b}'), ('\u{1f84}', '\u{1f8c}'), ('\u{1f85}',
-        '\u{1f8d}'), ('\u{1f86}', '\u{1f8e}'), ('\u{1f87}', '\u{1f8f}'),
-        ('\u{1f88}', '\u{1f80}'), ('\u{1f89}', '\u{1f81}'), ('\u{1f8a}',
-        '\u{1f82}'), ('\u{1f8b}', '\u{1f83}'), ('\u{1f8c}', '\u{1f84}'),
-        ('\u{1f8d}', '\u{1f85}'), ('\u{1f8e}', '\u{1f86}'), ('\u{1f8f}',
-        '\u{1f87}'), ('\u{1f90}', '\u{1f98}'), ('\u{1f91}', '\u{1f99}'),
-        ('\u{1f92}', '\u{1f9a}'), ('\u{1f93}', '\u{1f9b}'), ('\u{1f94}',
-        '\u{1f9c}'), ('\u{1f95}', '\u{1f9d}'), ('\u{1f96}', '\u{1f9e}'),
-        ('\u{1f97}', '\u{1f9f}'), ('\u{1f98}', '\u{1f90}'), ('\u{1f99}',
-        '\u{1f91}'), ('\u{1f9a}', '\u{1f92}'), ('\u{1f9b}', '\u{1f93}'),
-        ('\u{1f9c}', '\u{1f94}'), ('\u{1f9d}', '\u{1f95}'), ('\u{1f9e}',
-        '\u{1f96}'), ('\u{1f9f}', '\u{1f97}'), ('\u{1fa0}', '\u{1fa8}'),
-        ('\u{1fa1}', '\u{1fa9}'), ('\u{1fa2}', '\u{1faa}'), ('\u{1fa3}',
-        '\u{1fab}'), ('\u{1fa4}', '\u{1fac}'), ('\u{1fa5}', '\u{1fad}'),
-        ('\u{1fa6}', '\u{1fae}'), ('\u{1fa7}', '\u{1faf}'), ('\u{1fa8}',
-        '\u{1fa0}'), ('\u{1fa9}', '\u{1fa1}'), ('\u{1faa}', '\u{1fa2}'),
-        ('\u{1fab}', '\u{1fa3}'), ('\u{1fac}', '\u{1fa4}'), ('\u{1fad}',
-        '\u{1fa5}'), ('\u{1fae}', '\u{1fa6}'), ('\u{1faf}', '\u{1fa7}'),
-        ('\u{1fb0}', '\u{1fb8}'), ('\u{1fb1}', '\u{1fb9}'), ('\u{1fb3}',
-        '\u{1fbc}'), ('\u{1fb8}', '\u{1fb0}'), ('\u{1fb9}', '\u{1fb1}'),
-        ('\u{1fba}', '\u{1f70}'), ('\u{1fbb}', '\u{1f71}'), ('\u{1fbc}',
-        '\u{1fb3}'), ('\u{1fbe}', '\u{345}'), ('\u{1fbe}', '\u{399}'),
-        ('\u{1fbe}', '\u{3b9}'), ('\u{1fc3}', '\u{1fcc}'), ('\u{1fc8}',
-        '\u{1f72}'), ('\u{1fc9}', '\u{1f73}'), ('\u{1fca}', '\u{1f74}'),
-        ('\u{1fcb}', '\u{1f75}'), ('\u{1fcc}', '\u{1fc3}'), ('\u{1fd0}',
-        '\u{1fd8}'), ('\u{1fd1}', '\u{1fd9}'), ('\u{1fd8}', '\u{1fd0}'),
-        ('\u{1fd9}', '\u{1fd1}'), ('\u{1fda}', '\u{1f76}'), ('\u{1fdb}',
-        '\u{1f77}'), ('\u{1fe0}', '\u{1fe8}'), ('\u{1fe1}', '\u{1fe9}'),
-        ('\u{1fe5}', '\u{1fec}'), ('\u{1fe8}', '\u{1fe0}'), ('\u{1fe9}',
-        '\u{1fe1}'), ('\u{1fea}', '\u{1f7a}'), ('\u{1feb}', '\u{1f7b}'),
-        ('\u{1fec}', '\u{1fe5}'), ('\u{1ff3}', '\u{1ffc}'), ('\u{1ff8}',
-        '\u{1f78}'), ('\u{1ff9}', '\u{1f79}'), ('\u{1ffa}', '\u{1f7c}'),
-        ('\u{1ffb}', '\u{1f7d}'), ('\u{1ffc}', '\u{1ff3}'), ('\u{2126}',
-        '\u{3a9}'), ('\u{2126}', '\u{3c9}'), ('\u{212a}', '\u{4b}'),
-        ('\u{212a}', '\u{6b}'), ('\u{212b}', '\u{c5}'), ('\u{212b}', '\u{e5}'),
-        ('\u{2132}', '\u{214e}'), ('\u{214e}', '\u{2132}'), ('\u{2160}',
-        '\u{2170}'), ('\u{2161}', '\u{2171}'), ('\u{2162}', '\u{2172}'),
-        ('\u{2163}', '\u{2173}'), ('\u{2164}', '\u{2174}'), ('\u{2165}',
-        '\u{2175}'), ('\u{2166}', '\u{2176}'), ('\u{2167}', '\u{2177}'),
-        ('\u{2168}', '\u{2178}'), ('\u{2169}', '\u{2179}'), ('\u{216a}',
-        '\u{217a}'), ('\u{216b}', '\u{217b}'), ('\u{216c}', '\u{217c}'),
-        ('\u{216d}', '\u{217d}'), ('\u{216e}', '\u{217e}'), ('\u{216f}',
-        '\u{217f}'), ('\u{2170}', '\u{2160}'), ('\u{2171}', '\u{2161}'),
-        ('\u{2172}', '\u{2162}'), ('\u{2173}', '\u{2163}'), ('\u{2174}',
-        '\u{2164}'), ('\u{2175}', '\u{2165}'), ('\u{2176}', '\u{2166}'),
-        ('\u{2177}', '\u{2167}'), ('\u{2178}', '\u{2168}'), ('\u{2179}',
-        '\u{2169}'), ('\u{217a}', '\u{216a}'), ('\u{217b}', '\u{216b}'),
-        ('\u{217c}', '\u{216c}'), ('\u{217d}', '\u{216d}'), ('\u{217e}',
-        '\u{216e}'), ('\u{217f}', '\u{216f}'), ('\u{2183}', '\u{2184}'),
-        ('\u{2184}', '\u{2183}'), ('\u{24b6}', '\u{24d0}'), ('\u{24b7}',
-        '\u{24d1}'), ('\u{24b8}', '\u{24d2}'), ('\u{24b9}', '\u{24d3}'),
-        ('\u{24ba}', '\u{24d4}'), ('\u{24bb}', '\u{24d5}'), ('\u{24bc}',
-        '\u{24d6}'), ('\u{24bd}', '\u{24d7}'), ('\u{24be}', '\u{24d8}'),
-        ('\u{24bf}', '\u{24d9}'), ('\u{24c0}', '\u{24da}'), ('\u{24c1}',
-        '\u{24db}'), ('\u{24c2}', '\u{24dc}'), ('\u{24c3}', '\u{24dd}'),
-        ('\u{24c4}', '\u{24de}'), ('\u{24c5}', '\u{24df}'), ('\u{24c6}',
-        '\u{24e0}'), ('\u{24c7}', '\u{24e1}'), ('\u{24c8}', '\u{24e2}'),
-        ('\u{24c9}', '\u{24e3}'), ('\u{24ca}', '\u{24e4}'), ('\u{24cb}',
-        '\u{24e5}'), ('\u{24cc}', '\u{24e6}'), ('\u{24cd}', '\u{24e7}'),
-        ('\u{24ce}', '\u{24e8}'), ('\u{24cf}', '\u{24e9}'), ('\u{24d0}',
-        '\u{24b6}'), ('\u{24d1}', '\u{24b7}'), ('\u{24d2}', '\u{24b8}'),
-        ('\u{24d3}', '\u{24b9}'), ('\u{24d4}', '\u{24ba}'), ('\u{24d5}',
-        '\u{24bb}'), ('\u{24d6}', '\u{24bc}'), ('\u{24d7}', '\u{24bd}'),
-        ('\u{24d8}', '\u{24be}'), ('\u{24d9}', '\u{24bf}'), ('\u{24da}',
-        '\u{24c0}'), ('\u{24db}', '\u{24c1}'), ('\u{24dc}', '\u{24c2}'),
-        ('\u{24dd}', '\u{24c3}'), ('\u{24de}', '\u{24c4}'), ('\u{24df}',
-        '\u{24c5}'), ('\u{24e0}', '\u{24c6}'), ('\u{24e1}', '\u{24c7}'),
-        ('\u{24e2}', '\u{24c8}'), ('\u{24e3}', '\u{24c9}'), ('\u{24e4}',
-        '\u{24ca}'), ('\u{24e5}', '\u{24cb}'), ('\u{24e6}', '\u{24cc}'),
-        ('\u{24e7}', '\u{24cd}'), ('\u{24e8}', '\u{24ce}'), ('\u{24e9}',
-        '\u{24cf}'), ('\u{2c00}', '\u{2c30}'), ('\u{2c01}', '\u{2c31}'),
-        ('\u{2c02}', '\u{2c32}'), ('\u{2c03}', '\u{2c33}'), ('\u{2c04}',
-        '\u{2c34}'), ('\u{2c05}', '\u{2c35}'), ('\u{2c06}', '\u{2c36}'),
-        ('\u{2c07}', '\u{2c37}'), ('\u{2c08}', '\u{2c38}'), ('\u{2c09}',
-        '\u{2c39}'), ('\u{2c0a}', '\u{2c3a}'), ('\u{2c0b}', '\u{2c3b}'),
-        ('\u{2c0c}', '\u{2c3c}'), ('\u{2c0d}', '\u{2c3d}'), ('\u{2c0e}',
-        '\u{2c3e}'), ('\u{2c0f}', '\u{2c3f}'), ('\u{2c10}', '\u{2c40}'),
-        ('\u{2c11}', '\u{2c41}'), ('\u{2c12}', '\u{2c42}'), ('\u{2c13}',
-        '\u{2c43}'), ('\u{2c14}', '\u{2c44}'), ('\u{2c15}', '\u{2c45}'),
-        ('\u{2c16}', '\u{2c46}'), ('\u{2c17}', '\u{2c47}'), ('\u{2c18}',
-        '\u{2c48}'), ('\u{2c19}', '\u{2c49}'), ('\u{2c1a}', '\u{2c4a}'),
-        ('\u{2c1b}', '\u{2c4b}'), ('\u{2c1c}', '\u{2c4c}'), ('\u{2c1d}',
-        '\u{2c4d}'), ('\u{2c1e}', '\u{2c4e}'), ('\u{2c1f}', '\u{2c4f}'),
-        ('\u{2c20}', '\u{2c50}'), ('\u{2c21}', '\u{2c51}'), ('\u{2c22}',
-        '\u{2c52}'), ('\u{2c23}', '\u{2c53}'), ('\u{2c24}', '\u{2c54}'),
-        ('\u{2c25}', '\u{2c55}'), ('\u{2c26}', '\u{2c56}'), ('\u{2c27}',
-        '\u{2c57}'), ('\u{2c28}', '\u{2c58}'), ('\u{2c29}', '\u{2c59}'),
-        ('\u{2c2a}', '\u{2c5a}'), ('\u{2c2b}', '\u{2c5b}'), ('\u{2c2c}',
-        '\u{2c5c}'), ('\u{2c2d}', '\u{2c5d}'), ('\u{2c2e}', '\u{2c5e}'),
-        ('\u{2c30}', '\u{2c00}'), ('\u{2c31}', '\u{2c01}'), ('\u{2c32}',
-        '\u{2c02}'), ('\u{2c33}', '\u{2c03}'), ('\u{2c34}', '\u{2c04}'),
-        ('\u{2c35}', '\u{2c05}'), ('\u{2c36}', '\u{2c06}'), ('\u{2c37}',
-        '\u{2c07}'), ('\u{2c38}', '\u{2c08}'), ('\u{2c39}', '\u{2c09}'),
-        ('\u{2c3a}', '\u{2c0a}'), ('\u{2c3b}', '\u{2c0b}'), ('\u{2c3c}',
-        '\u{2c0c}'), ('\u{2c3d}', '\u{2c0d}'), ('\u{2c3e}', '\u{2c0e}'),
-        ('\u{2c3f}', '\u{2c0f}'), ('\u{2c40}', '\u{2c10}'), ('\u{2c41}',
-        '\u{2c11}'), ('\u{2c42}', '\u{2c12}'), ('\u{2c43}', '\u{2c13}'),
-        ('\u{2c44}', '\u{2c14}'), ('\u{2c45}', '\u{2c15}'), ('\u{2c46}',
-        '\u{2c16}'), ('\u{2c47}', '\u{2c17}'), ('\u{2c48}', '\u{2c18}'),
-        ('\u{2c49}', '\u{2c19}'), ('\u{2c4a}', '\u{2c1a}'), ('\u{2c4b}',
-        '\u{2c1b}'), ('\u{2c4c}', '\u{2c1c}'), ('\u{2c4d}', '\u{2c1d}'),
-        ('\u{2c4e}', '\u{2c1e}'), ('\u{2c4f}', '\u{2c1f}'), ('\u{2c50}',
-        '\u{2c20}'), ('\u{2c51}', '\u{2c21}'), ('\u{2c52}', '\u{2c22}'),
-        ('\u{2c53}', '\u{2c23}'), ('\u{2c54}', '\u{2c24}'), ('\u{2c55}',
-        '\u{2c25}'), ('\u{2c56}', '\u{2c26}'), ('\u{2c57}', '\u{2c27}'),
-        ('\u{2c58}', '\u{2c28}'), ('\u{2c59}', '\u{2c29}'), ('\u{2c5a}',
-        '\u{2c2a}'), ('\u{2c5b}', '\u{2c2b}'), ('\u{2c5c}', '\u{2c2c}'),
-        ('\u{2c5d}', '\u{2c2d}'), ('\u{2c5e}', '\u{2c2e}'), ('\u{2c60}',
-        '\u{2c61}'), ('\u{2c61}', '\u{2c60}'), ('\u{2c62}', '\u{26b}'),
-        ('\u{2c63}', '\u{1d7d}'), ('\u{2c64}', '\u{27d}'), ('\u{2c65}',
-        '\u{23a}'), ('\u{2c66}', '\u{23e}'), ('\u{2c67}', '\u{2c68}'),
-        ('\u{2c68}', '\u{2c67}'), ('\u{2c69}', '\u{2c6a}'), ('\u{2c6a}',
-        '\u{2c69}'), ('\u{2c6b}', '\u{2c6c}'), ('\u{2c6c}', '\u{2c6b}'),
-        ('\u{2c6d}', '\u{251}'), ('\u{2c6e}', '\u{271}'), ('\u{2c6f}',
-        '\u{250}'), ('\u{2c70}', '\u{252}'), ('\u{2c72}', '\u{2c73}'),
-        ('\u{2c73}', '\u{2c72}'), ('\u{2c75}', '\u{2c76}'), ('\u{2c76}',
-        '\u{2c75}'), ('\u{2c7e}', '\u{23f}'), ('\u{2c7f}', '\u{240}'),
-        ('\u{2c80}', '\u{2c81}'), ('\u{2c81}', '\u{2c80}'), ('\u{2c82}',
-        '\u{2c83}'), ('\u{2c83}', '\u{2c82}'), ('\u{2c84}', '\u{2c85}'),
-        ('\u{2c85}', '\u{2c84}'), ('\u{2c86}', '\u{2c87}'), ('\u{2c87}',
-        '\u{2c86}'), ('\u{2c88}', '\u{2c89}'), ('\u{2c89}', '\u{2c88}'),
-        ('\u{2c8a}', '\u{2c8b}'), ('\u{2c8b}', '\u{2c8a}'), ('\u{2c8c}',
-        '\u{2c8d}'), ('\u{2c8d}', '\u{2c8c}'), ('\u{2c8e}', '\u{2c8f}'),
-        ('\u{2c8f}', '\u{2c8e}'), ('\u{2c90}', '\u{2c91}'), ('\u{2c91}',
-        '\u{2c90}'), ('\u{2c92}', '\u{2c93}'), ('\u{2c93}', '\u{2c92}'),
-        ('\u{2c94}', '\u{2c95}'), ('\u{2c95}', '\u{2c94}'), ('\u{2c96}',
-        '\u{2c97}'), ('\u{2c97}', '\u{2c96}'), ('\u{2c98}', '\u{2c99}'),
-        ('\u{2c99}', '\u{2c98}'), ('\u{2c9a}', '\u{2c9b}'), ('\u{2c9b}',
-        '\u{2c9a}'), ('\u{2c9c}', '\u{2c9d}'), ('\u{2c9d}', '\u{2c9c}'),
-        ('\u{2c9e}', '\u{2c9f}'), ('\u{2c9f}', '\u{2c9e}'), ('\u{2ca0}',
-        '\u{2ca1}'), ('\u{2ca1}', '\u{2ca0}'), ('\u{2ca2}', '\u{2ca3}'),
-        ('\u{2ca3}', '\u{2ca2}'), ('\u{2ca4}', '\u{2ca5}'), ('\u{2ca5}',
-        '\u{2ca4}'), ('\u{2ca6}', '\u{2ca7}'), ('\u{2ca7}', '\u{2ca6}'),
-        ('\u{2ca8}', '\u{2ca9}'), ('\u{2ca9}', '\u{2ca8}'), ('\u{2caa}',
-        '\u{2cab}'), ('\u{2cab}', '\u{2caa}'), ('\u{2cac}', '\u{2cad}'),
-        ('\u{2cad}', '\u{2cac}'), ('\u{2cae}', '\u{2caf}'), ('\u{2caf}',
-        '\u{2cae}'), ('\u{2cb0}', '\u{2cb1}'), ('\u{2cb1}', '\u{2cb0}'),
-        ('\u{2cb2}', '\u{2cb3}'), ('\u{2cb3}', '\u{2cb2}'), ('\u{2cb4}',
-        '\u{2cb5}'), ('\u{2cb5}', '\u{2cb4}'), ('\u{2cb6}', '\u{2cb7}'),
-        ('\u{2cb7}', '\u{2cb6}'), ('\u{2cb8}', '\u{2cb9}'), ('\u{2cb9}',
-        '\u{2cb8}'), ('\u{2cba}', '\u{2cbb}'), ('\u{2cbb}', '\u{2cba}'),
-        ('\u{2cbc}', '\u{2cbd}'), ('\u{2cbd}', '\u{2cbc}'), ('\u{2cbe}',
-        '\u{2cbf}'), ('\u{2cbf}', '\u{2cbe}'), ('\u{2cc0}', '\u{2cc1}'),
-        ('\u{2cc1}', '\u{2cc0}'), ('\u{2cc2}', '\u{2cc3}'), ('\u{2cc3}',
-        '\u{2cc2}'), ('\u{2cc4}', '\u{2cc5}'), ('\u{2cc5}', '\u{2cc4}'),
-        ('\u{2cc6}', '\u{2cc7}'), ('\u{2cc7}', '\u{2cc6}'), ('\u{2cc8}',
-        '\u{2cc9}'), ('\u{2cc9}', '\u{2cc8}'), ('\u{2cca}', '\u{2ccb}'),
-        ('\u{2ccb}', '\u{2cca}'), ('\u{2ccc}', '\u{2ccd}'), ('\u{2ccd}',
-        '\u{2ccc}'), ('\u{2cce}', '\u{2ccf}'), ('\u{2ccf}', '\u{2cce}'),
-        ('\u{2cd0}', '\u{2cd1}'), ('\u{2cd1}', '\u{2cd0}'), ('\u{2cd2}',
-        '\u{2cd3}'), ('\u{2cd3}', '\u{2cd2}'), ('\u{2cd4}', '\u{2cd5}'),
-        ('\u{2cd5}', '\u{2cd4}'), ('\u{2cd6}', '\u{2cd7}'), ('\u{2cd7}',
-        '\u{2cd6}'), ('\u{2cd8}', '\u{2cd9}'), ('\u{2cd9}', '\u{2cd8}'),
-        ('\u{2cda}', '\u{2cdb}'), ('\u{2cdb}', '\u{2cda}'), ('\u{2cdc}',
-        '\u{2cdd}'), ('\u{2cdd}', '\u{2cdc}'), ('\u{2cde}', '\u{2cdf}'),
-        ('\u{2cdf}', '\u{2cde}'), ('\u{2ce0}', '\u{2ce1}'), ('\u{2ce1}',
-        '\u{2ce0}'), ('\u{2ce2}', '\u{2ce3}'), ('\u{2ce3}', '\u{2ce2}'),
-        ('\u{2ceb}', '\u{2cec}'), ('\u{2cec}', '\u{2ceb}'), ('\u{2ced}',
-        '\u{2cee}'), ('\u{2cee}', '\u{2ced}'), ('\u{2cf2}', '\u{2cf3}'),
-        ('\u{2cf3}', '\u{2cf2}'), ('\u{2d00}', '\u{10a0}'), ('\u{2d01}',
-        '\u{10a1}'), ('\u{2d02}', '\u{10a2}'), ('\u{2d03}', '\u{10a3}'),
-        ('\u{2d04}', '\u{10a4}'), ('\u{2d05}', '\u{10a5}'), ('\u{2d06}',
-        '\u{10a6}'), ('\u{2d07}', '\u{10a7}'), ('\u{2d08}', '\u{10a8}'),
-        ('\u{2d09}', '\u{10a9}'), ('\u{2d0a}', '\u{10aa}'), ('\u{2d0b}',
-        '\u{10ab}'), ('\u{2d0c}', '\u{10ac}'), ('\u{2d0d}', '\u{10ad}'),
-        ('\u{2d0e}', '\u{10ae}'), ('\u{2d0f}', '\u{10af}'), ('\u{2d10}',
-        '\u{10b0}'), ('\u{2d11}', '\u{10b1}'), ('\u{2d12}', '\u{10b2}'),
-        ('\u{2d13}', '\u{10b3}'), ('\u{2d14}', '\u{10b4}'), ('\u{2d15}',
-        '\u{10b5}'), ('\u{2d16}', '\u{10b6}'), ('\u{2d17}', '\u{10b7}'),
-        ('\u{2d18}', '\u{10b8}'), ('\u{2d19}', '\u{10b9}'), ('\u{2d1a}',
-        '\u{10ba}'), ('\u{2d1b}', '\u{10bb}'), ('\u{2d1c}', '\u{10bc}'),
-        ('\u{2d1d}', '\u{10bd}'), ('\u{2d1e}', '\u{10be}'), ('\u{2d1f}',
-        '\u{10bf}'), ('\u{2d20}', '\u{10c0}'), ('\u{2d21}', '\u{10c1}'),
-        ('\u{2d22}', '\u{10c2}'), ('\u{2d23}', '\u{10c3}'), ('\u{2d24}',
-        '\u{10c4}'), ('\u{2d25}', '\u{10c5}'), ('\u{2d27}', '\u{10c7}'),
-        ('\u{2d2d}', '\u{10cd}'), ('\u{a640}', '\u{a641}'), ('\u{a641}',
-        '\u{a640}'), ('\u{a642}', '\u{a643}'), ('\u{a643}', '\u{a642}'),
-        ('\u{a644}', '\u{a645}'), ('\u{a645}', '\u{a644}'), ('\u{a646}',
-        '\u{a647}'), ('\u{a647}', '\u{a646}'), ('\u{a648}', '\u{a649}'),
-        ('\u{a649}', '\u{a648}'), ('\u{a64a}', '\u{a64b}'), ('\u{a64b}',
-        '\u{a64a}'), ('\u{a64c}', '\u{a64d}'), ('\u{a64d}', '\u{a64c}'),
-        ('\u{a64e}', '\u{a64f}'), ('\u{a64f}', '\u{a64e}'), ('\u{a650}',
-        '\u{a651}'), ('\u{a651}', '\u{a650}'), ('\u{a652}', '\u{a653}'),
-        ('\u{a653}', '\u{a652}'), ('\u{a654}', '\u{a655}'), ('\u{a655}',
-        '\u{a654}'), ('\u{a656}', '\u{a657}'), ('\u{a657}', '\u{a656}'),
-        ('\u{a658}', '\u{a659}'), ('\u{a659}', '\u{a658}'), ('\u{a65a}',
-        '\u{a65b}'), ('\u{a65b}', '\u{a65a}'), ('\u{a65c}', '\u{a65d}'),
-        ('\u{a65d}', '\u{a65c}'), ('\u{a65e}', '\u{a65f}'), ('\u{a65f}',
-        '\u{a65e}'), ('\u{a660}', '\u{a661}'), ('\u{a661}', '\u{a660}'),
-        ('\u{a662}', '\u{a663}'), ('\u{a663}', '\u{a662}'), ('\u{a664}',
-        '\u{a665}'), ('\u{a665}', '\u{a664}'), ('\u{a666}', '\u{a667}'),
-        ('\u{a667}', '\u{a666}'), ('\u{a668}', '\u{a669}'), ('\u{a669}',
-        '\u{a668}'), ('\u{a66a}', '\u{a66b}'), ('\u{a66b}', '\u{a66a}'),
-        ('\u{a66c}', '\u{a66d}'), ('\u{a66d}', '\u{a66c}'), ('\u{a680}',
-        '\u{a681}'), ('\u{a681}', '\u{a680}'), ('\u{a682}', '\u{a683}'),
-        ('\u{a683}', '\u{a682}'), ('\u{a684}', '\u{a685}'), ('\u{a685}',
-        '\u{a684}'), ('\u{a686}', '\u{a687}'), ('\u{a687}', '\u{a686}'),
-        ('\u{a688}', '\u{a689}'), ('\u{a689}', '\u{a688}'), ('\u{a68a}',
-        '\u{a68b}'), ('\u{a68b}', '\u{a68a}'), ('\u{a68c}', '\u{a68d}'),
-        ('\u{a68d}', '\u{a68c}'), ('\u{a68e}', '\u{a68f}'), ('\u{a68f}',
-        '\u{a68e}'), ('\u{a690}', '\u{a691}'), ('\u{a691}', '\u{a690}'),
-        ('\u{a692}', '\u{a693}'), ('\u{a693}', '\u{a692}'), ('\u{a694}',
-        '\u{a695}'), ('\u{a695}', '\u{a694}'), ('\u{a696}', '\u{a697}'),
-        ('\u{a697}', '\u{a696}'), ('\u{a698}', '\u{a699}'), ('\u{a699}',
-        '\u{a698}'), ('\u{a69a}', '\u{a69b}'), ('\u{a69b}', '\u{a69a}'),
-        ('\u{a722}', '\u{a723}'), ('\u{a723}', '\u{a722}'), ('\u{a724}',
-        '\u{a725}'), ('\u{a725}', '\u{a724}'), ('\u{a726}', '\u{a727}'),
-        ('\u{a727}', '\u{a726}'), ('\u{a728}', '\u{a729}'), ('\u{a729}',
-        '\u{a728}'), ('\u{a72a}', '\u{a72b}'), ('\u{a72b}', '\u{a72a}'),
-        ('\u{a72c}', '\u{a72d}'), ('\u{a72d}', '\u{a72c}'), ('\u{a72e}',
-        '\u{a72f}'), ('\u{a72f}', '\u{a72e}'), ('\u{a732}', '\u{a733}'),
-        ('\u{a733}', '\u{a732}'), ('\u{a734}', '\u{a735}'), ('\u{a735}',
-        '\u{a734}'), ('\u{a736}', '\u{a737}'), ('\u{a737}', '\u{a736}'),
-        ('\u{a738}', '\u{a739}'), ('\u{a739}', '\u{a738}'), ('\u{a73a}',
-        '\u{a73b}'), ('\u{a73b}', '\u{a73a}'), ('\u{a73c}', '\u{a73d}'),
-        ('\u{a73d}', '\u{a73c}'), ('\u{a73e}', '\u{a73f}'), ('\u{a73f}',
-        '\u{a73e}'), ('\u{a740}', '\u{a741}'), ('\u{a741}', '\u{a740}'),
-        ('\u{a742}', '\u{a743}'), ('\u{a743}', '\u{a742}'), ('\u{a744}',
-        '\u{a745}'), ('\u{a745}', '\u{a744}'), ('\u{a746}', '\u{a747}'),
-        ('\u{a747}', '\u{a746}'), ('\u{a748}', '\u{a749}'), ('\u{a749}',
-        '\u{a748}'), ('\u{a74a}', '\u{a74b}'), ('\u{a74b}', '\u{a74a}'),
-        ('\u{a74c}', '\u{a74d}'), ('\u{a74d}', '\u{a74c}'), ('\u{a74e}',
-        '\u{a74f}'), ('\u{a74f}', '\u{a74e}'), ('\u{a750}', '\u{a751}'),
-        ('\u{a751}', '\u{a750}'), ('\u{a752}', '\u{a753}'), ('\u{a753}',
-        '\u{a752}'), ('\u{a754}', '\u{a755}'), ('\u{a755}', '\u{a754}'),
-        ('\u{a756}', '\u{a757}'), ('\u{a757}', '\u{a756}'), ('\u{a758}',
-        '\u{a759}'), ('\u{a759}', '\u{a758}'), ('\u{a75a}', '\u{a75b}'),
-        ('\u{a75b}', '\u{a75a}'), ('\u{a75c}', '\u{a75d}'), ('\u{a75d}',
-        '\u{a75c}'), ('\u{a75e}', '\u{a75f}'), ('\u{a75f}', '\u{a75e}'),
-        ('\u{a760}', '\u{a761}'), ('\u{a761}', '\u{a760}'), ('\u{a762}',
-        '\u{a763}'), ('\u{a763}', '\u{a762}'), ('\u{a764}', '\u{a765}'),
-        ('\u{a765}', '\u{a764}'), ('\u{a766}', '\u{a767}'), ('\u{a767}',
-        '\u{a766}'), ('\u{a768}', '\u{a769}'), ('\u{a769}', '\u{a768}'),
-        ('\u{a76a}', '\u{a76b}'), ('\u{a76b}', '\u{a76a}'), ('\u{a76c}',
-        '\u{a76d}'), ('\u{a76d}', '\u{a76c}'), ('\u{a76e}', '\u{a76f}'),
-        ('\u{a76f}', '\u{a76e}'), ('\u{a779}', '\u{a77a}'), ('\u{a77a}',
-        '\u{a779}'), ('\u{a77b}', '\u{a77c}'), ('\u{a77c}', '\u{a77b}'),
-        ('\u{a77d}', '\u{1d79}'), ('\u{a77e}', '\u{a77f}'), ('\u{a77f}',
-        '\u{a77e}'), ('\u{a780}', '\u{a781}'), ('\u{a781}', '\u{a780}'),
-        ('\u{a782}', '\u{a783}'), ('\u{a783}', '\u{a782}'), ('\u{a784}',
-        '\u{a785}'), ('\u{a785}', '\u{a784}'), ('\u{a786}', '\u{a787}'),
-        ('\u{a787}', '\u{a786}'), ('\u{a78b}', '\u{a78c}'), ('\u{a78c}',
-        '\u{a78b}'), ('\u{a78d}', '\u{265}'), ('\u{a790}', '\u{a791}'),
-        ('\u{a791}', '\u{a790}'), ('\u{a792}', '\u{a793}'), ('\u{a793}',
-        '\u{a792}'), ('\u{a796}', '\u{a797}'), ('\u{a797}', '\u{a796}'),
-        ('\u{a798}', '\u{a799}'), ('\u{a799}', '\u{a798}'), ('\u{a79a}',
-        '\u{a79b}'), ('\u{a79b}', '\u{a79a}'), ('\u{a79c}', '\u{a79d}'),
-        ('\u{a79d}', '\u{a79c}'), ('\u{a79e}', '\u{a79f}'), ('\u{a79f}',
-        '\u{a79e}'), ('\u{a7a0}', '\u{a7a1}'), ('\u{a7a1}', '\u{a7a0}'),
-        ('\u{a7a2}', '\u{a7a3}'), ('\u{a7a3}', '\u{a7a2}'), ('\u{a7a4}',
-        '\u{a7a5}'), ('\u{a7a5}', '\u{a7a4}'), ('\u{a7a6}', '\u{a7a7}'),
-        ('\u{a7a7}', '\u{a7a6}'), ('\u{a7a8}', '\u{a7a9}'), ('\u{a7a9}',
-        '\u{a7a8}'), ('\u{a7aa}', '\u{266}'), ('\u{a7ab}', '\u{25c}'),
-        ('\u{a7ac}', '\u{261}'), ('\u{a7ad}', '\u{26c}'), ('\u{a7b0}',
-        '\u{29e}'), ('\u{a7b1}', '\u{287}'), ('\u{a7b2}', '\u{29d}'),
-        ('\u{a7b3}', '\u{ab53}'), ('\u{a7b4}', '\u{a7b5}'), ('\u{a7b5}',
-        '\u{a7b4}'), ('\u{a7b6}', '\u{a7b7}'), ('\u{a7b7}', '\u{a7b6}'),
-        ('\u{ab53}', '\u{a7b3}'), ('\u{ab70}', '\u{13a0}'), ('\u{ab71}',
-        '\u{13a1}'), ('\u{ab72}', '\u{13a2}'), ('\u{ab73}', '\u{13a3}'),
-        ('\u{ab74}', '\u{13a4}'), ('\u{ab75}', '\u{13a5}'), ('\u{ab76}',
-        '\u{13a6}'), ('\u{ab77}', '\u{13a7}'), ('\u{ab78}', '\u{13a8}'),
-        ('\u{ab79}', '\u{13a9}'), ('\u{ab7a}', '\u{13aa}'), ('\u{ab7b}',
-        '\u{13ab}'), ('\u{ab7c}', '\u{13ac}'), ('\u{ab7d}', '\u{13ad}'),
-        ('\u{ab7e}', '\u{13ae}'), ('\u{ab7f}', '\u{13af}'), ('\u{ab80}',
-        '\u{13b0}'), ('\u{ab81}', '\u{13b1}'), ('\u{ab82}', '\u{13b2}'),
-        ('\u{ab83}', '\u{13b3}'), ('\u{ab84}', '\u{13b4}'), ('\u{ab85}',
-        '\u{13b5}'), ('\u{ab86}', '\u{13b6}'), ('\u{ab87}', '\u{13b7}'),
-        ('\u{ab88}', '\u{13b8}'), ('\u{ab89}', '\u{13b9}'), ('\u{ab8a}',
-        '\u{13ba}'), ('\u{ab8b}', '\u{13bb}'), ('\u{ab8c}', '\u{13bc}'),
-        ('\u{ab8d}', '\u{13bd}'), ('\u{ab8e}', '\u{13be}'), ('\u{ab8f}',
-        '\u{13bf}'), ('\u{ab90}', '\u{13c0}'), ('\u{ab91}', '\u{13c1}'),
-        ('\u{ab92}', '\u{13c2}'), ('\u{ab93}', '\u{13c3}'), ('\u{ab94}',
-        '\u{13c4}'), ('\u{ab95}', '\u{13c5}'), ('\u{ab96}', '\u{13c6}'),
-        ('\u{ab97}', '\u{13c7}'), ('\u{ab98}', '\u{13c8}'), ('\u{ab99}',
-        '\u{13c9}'), ('\u{ab9a}', '\u{13ca}'), ('\u{ab9b}', '\u{13cb}'),
-        ('\u{ab9c}', '\u{13cc}'), ('\u{ab9d}', '\u{13cd}'), ('\u{ab9e}',
-        '\u{13ce}'), ('\u{ab9f}', '\u{13cf}'), ('\u{aba0}', '\u{13d0}'),
-        ('\u{aba1}', '\u{13d1}'), ('\u{aba2}', '\u{13d2}'), ('\u{aba3}',
-        '\u{13d3}'), ('\u{aba4}', '\u{13d4}'), ('\u{aba5}', '\u{13d5}'),
-        ('\u{aba6}', '\u{13d6}'), ('\u{aba7}', '\u{13d7}'), ('\u{aba8}',
-        '\u{13d8}'), ('\u{aba9}', '\u{13d9}'), ('\u{abaa}', '\u{13da}'),
-        ('\u{abab}', '\u{13db}'), ('\u{abac}', '\u{13dc}'), ('\u{abad}',
-        '\u{13dd}'), ('\u{abae}', '\u{13de}'), ('\u{abaf}', '\u{13df}'),
-        ('\u{abb0}', '\u{13e0}'), ('\u{abb1}', '\u{13e1}'), ('\u{abb2}',
-        '\u{13e2}'), ('\u{abb3}', '\u{13e3}'), ('\u{abb4}', '\u{13e4}'),
-        ('\u{abb5}', '\u{13e5}'), ('\u{abb6}', '\u{13e6}'), ('\u{abb7}',
-        '\u{13e7}'), ('\u{abb8}', '\u{13e8}'), ('\u{abb9}', '\u{13e9}'),
-        ('\u{abba}', '\u{13ea}'), ('\u{abbb}', '\u{13eb}'), ('\u{abbc}',
-        '\u{13ec}'), ('\u{abbd}', '\u{13ed}'), ('\u{abbe}', '\u{13ee}'),
-        ('\u{abbf}', '\u{13ef}'), ('\u{ff21}', '\u{ff41}'), ('\u{ff22}',
-        '\u{ff42}'), ('\u{ff23}', '\u{ff43}'), ('\u{ff24}', '\u{ff44}'),
-        ('\u{ff25}', '\u{ff45}'), ('\u{ff26}', '\u{ff46}'), ('\u{ff27}',
-        '\u{ff47}'), ('\u{ff28}', '\u{ff48}'), ('\u{ff29}', '\u{ff49}'),
-        ('\u{ff2a}', '\u{ff4a}'), ('\u{ff2b}', '\u{ff4b}'), ('\u{ff2c}',
-        '\u{ff4c}'), ('\u{ff2d}', '\u{ff4d}'), ('\u{ff2e}', '\u{ff4e}'),
-        ('\u{ff2f}', '\u{ff4f}'), ('\u{ff30}', '\u{ff50}'), ('\u{ff31}',
-        '\u{ff51}'), ('\u{ff32}', '\u{ff52}'), ('\u{ff33}', '\u{ff53}'),
-        ('\u{ff34}', '\u{ff54}'), ('\u{ff35}', '\u{ff55}'), ('\u{ff36}',
-        '\u{ff56}'), ('\u{ff37}', '\u{ff57}'), ('\u{ff38}', '\u{ff58}'),
-        ('\u{ff39}', '\u{ff59}'), ('\u{ff3a}', '\u{ff5a}'), ('\u{ff41}',
-        '\u{ff21}'), ('\u{ff42}', '\u{ff22}'), ('\u{ff43}', '\u{ff23}'),
-        ('\u{ff44}', '\u{ff24}'), ('\u{ff45}', '\u{ff25}'), ('\u{ff46}',
-        '\u{ff26}'), ('\u{ff47}', '\u{ff27}'), ('\u{ff48}', '\u{ff28}'),
-        ('\u{ff49}', '\u{ff29}'), ('\u{ff4a}', '\u{ff2a}'), ('\u{ff4b}',
-        '\u{ff2b}'), ('\u{ff4c}', '\u{ff2c}'), ('\u{ff4d}', '\u{ff2d}'),
-        ('\u{ff4e}', '\u{ff2e}'), ('\u{ff4f}', '\u{ff2f}'), ('\u{ff50}',
-        '\u{ff30}'), ('\u{ff51}', '\u{ff31}'), ('\u{ff52}', '\u{ff32}'),
-        ('\u{ff53}', '\u{ff33}'), ('\u{ff54}', '\u{ff34}'), ('\u{ff55}',
-        '\u{ff35}'), ('\u{ff56}', '\u{ff36}'), ('\u{ff57}', '\u{ff37}'),
-        ('\u{ff58}', '\u{ff38}'), ('\u{ff59}', '\u{ff39}'), ('\u{ff5a}',
-        '\u{ff3a}'), ('\u{10400}', '\u{10428}'), ('\u{10401}', '\u{10429}'),
-        ('\u{10402}', '\u{1042a}'), ('\u{10403}', '\u{1042b}'), ('\u{10404}',
-        '\u{1042c}'), ('\u{10405}', '\u{1042d}'), ('\u{10406}', '\u{1042e}'),
-        ('\u{10407}', '\u{1042f}'), ('\u{10408}', '\u{10430}'), ('\u{10409}',
-        '\u{10431}'), ('\u{1040a}', '\u{10432}'), ('\u{1040b}', '\u{10433}'),
-        ('\u{1040c}', '\u{10434}'), ('\u{1040d}', '\u{10435}'), ('\u{1040e}',
-        '\u{10436}'), ('\u{1040f}', '\u{10437}'), ('\u{10410}', '\u{10438}'),
-        ('\u{10411}', '\u{10439}'), ('\u{10412}', '\u{1043a}'), ('\u{10413}',
-        '\u{1043b}'), ('\u{10414}', '\u{1043c}'), ('\u{10415}', '\u{1043d}'),
-        ('\u{10416}', '\u{1043e}'), ('\u{10417}', '\u{1043f}'), ('\u{10418}',
-        '\u{10440}'), ('\u{10419}', '\u{10441}'), ('\u{1041a}', '\u{10442}'),
-        ('\u{1041b}', '\u{10443}'), ('\u{1041c}', '\u{10444}'), ('\u{1041d}',
-        '\u{10445}'), ('\u{1041e}', '\u{10446}'), ('\u{1041f}', '\u{10447}'),
-        ('\u{10420}', '\u{10448}'), ('\u{10421}', '\u{10449}'), ('\u{10422}',
-        '\u{1044a}'), ('\u{10423}', '\u{1044b}'), ('\u{10424}', '\u{1044c}'),
-        ('\u{10425}', '\u{1044d}'), ('\u{10426}', '\u{1044e}'), ('\u{10427}',
-        '\u{1044f}'), ('\u{10428}', '\u{10400}'), ('\u{10429}', '\u{10401}'),
-        ('\u{1042a}', '\u{10402}'), ('\u{1042b}', '\u{10403}'), ('\u{1042c}',
-        '\u{10404}'), ('\u{1042d}', '\u{10405}'), ('\u{1042e}', '\u{10406}'),
-        ('\u{1042f}', '\u{10407}'), ('\u{10430}', '\u{10408}'), ('\u{10431}',
-        '\u{10409}'), ('\u{10432}', '\u{1040a}'), ('\u{10433}', '\u{1040b}'),
-        ('\u{10434}', '\u{1040c}'), ('\u{10435}', '\u{1040d}'), ('\u{10436}',
-        '\u{1040e}'), ('\u{10437}', '\u{1040f}'), ('\u{10438}', '\u{10410}'),
-        ('\u{10439}', '\u{10411}'), ('\u{1043a}', '\u{10412}'), ('\u{1043b}',
-        '\u{10413}'), ('\u{1043c}', '\u{10414}'), ('\u{1043d}', '\u{10415}'),
-        ('\u{1043e}', '\u{10416}'), ('\u{1043f}', '\u{10417}'), ('\u{10440}',
-        '\u{10418}'), ('\u{10441}', '\u{10419}'), ('\u{10442}', '\u{1041a}'),
-        ('\u{10443}', '\u{1041b}'), ('\u{10444}', '\u{1041c}'), ('\u{10445}',
-        '\u{1041d}'), ('\u{10446}', '\u{1041e}'), ('\u{10447}', '\u{1041f}'),
-        ('\u{10448}', '\u{10420}'), ('\u{10449}', '\u{10421}'), ('\u{1044a}',
-        '\u{10422}'), ('\u{1044b}', '\u{10423}'), ('\u{1044c}', '\u{10424}'),
-        ('\u{1044d}', '\u{10425}'), ('\u{1044e}', '\u{10426}'), ('\u{1044f}',
-        '\u{10427}'), ('\u{10c80}', '\u{10cc0}'), ('\u{10c81}', '\u{10cc1}'),
-        ('\u{10c82}', '\u{10cc2}'), ('\u{10c83}', '\u{10cc3}'), ('\u{10c84}',
-        '\u{10cc4}'), ('\u{10c85}', '\u{10cc5}'), ('\u{10c86}', '\u{10cc6}'),
-        ('\u{10c87}', '\u{10cc7}'), ('\u{10c88}', '\u{10cc8}'), ('\u{10c89}',
-        '\u{10cc9}'), ('\u{10c8a}', '\u{10cca}'), ('\u{10c8b}', '\u{10ccb}'),
-        ('\u{10c8c}', '\u{10ccc}'), ('\u{10c8d}', '\u{10ccd}'), ('\u{10c8e}',
-        '\u{10cce}'), ('\u{10c8f}', '\u{10ccf}'), ('\u{10c90}', '\u{10cd0}'),
-        ('\u{10c91}', '\u{10cd1}'), ('\u{10c92}', '\u{10cd2}'), ('\u{10c93}',
-        '\u{10cd3}'), ('\u{10c94}', '\u{10cd4}'), ('\u{10c95}', '\u{10cd5}'),
-        ('\u{10c96}', '\u{10cd6}'), ('\u{10c97}', '\u{10cd7}'), ('\u{10c98}',
-        '\u{10cd8}'), ('\u{10c99}', '\u{10cd9}'), ('\u{10c9a}', '\u{10cda}'),
-        ('\u{10c9b}', '\u{10cdb}'), ('\u{10c9c}', '\u{10cdc}'), ('\u{10c9d}',
-        '\u{10cdd}'), ('\u{10c9e}', '\u{10cde}'), ('\u{10c9f}', '\u{10cdf}'),
-        ('\u{10ca0}', '\u{10ce0}'), ('\u{10ca1}', '\u{10ce1}'), ('\u{10ca2}',
-        '\u{10ce2}'), ('\u{10ca3}', '\u{10ce3}'), ('\u{10ca4}', '\u{10ce4}'),
-        ('\u{10ca5}', '\u{10ce5}'), ('\u{10ca6}', '\u{10ce6}'), ('\u{10ca7}',
-        '\u{10ce7}'), ('\u{10ca8}', '\u{10ce8}'), ('\u{10ca9}', '\u{10ce9}'),
-        ('\u{10caa}', '\u{10cea}'), ('\u{10cab}', '\u{10ceb}'), ('\u{10cac}',
-        '\u{10cec}'), ('\u{10cad}', '\u{10ced}'), ('\u{10cae}', '\u{10cee}'),
-        ('\u{10caf}', '\u{10cef}'), ('\u{10cb0}', '\u{10cf0}'), ('\u{10cb1}',
-        '\u{10cf1}'), ('\u{10cb2}', '\u{10cf2}'), ('\u{10cc0}', '\u{10c80}'),
-        ('\u{10cc1}', '\u{10c81}'), ('\u{10cc2}', '\u{10c82}'), ('\u{10cc3}',
-        '\u{10c83}'), ('\u{10cc4}', '\u{10c84}'), ('\u{10cc5}', '\u{10c85}'),
-        ('\u{10cc6}', '\u{10c86}'), ('\u{10cc7}', '\u{10c87}'), ('\u{10cc8}',
-        '\u{10c88}'), ('\u{10cc9}', '\u{10c89}'), ('\u{10cca}', '\u{10c8a}'),
-        ('\u{10ccb}', '\u{10c8b}'), ('\u{10ccc}', '\u{10c8c}'), ('\u{10ccd}',
-        '\u{10c8d}'), ('\u{10cce}', '\u{10c8e}'), ('\u{10ccf}', '\u{10c8f}'),
-        ('\u{10cd0}', '\u{10c90}'), ('\u{10cd1}', '\u{10c91}'), ('\u{10cd2}',
-        '\u{10c92}'), ('\u{10cd3}', '\u{10c93}'), ('\u{10cd4}', '\u{10c94}'),
-        ('\u{10cd5}', '\u{10c95}'), ('\u{10cd6}', '\u{10c96}'), ('\u{10cd7}',
-        '\u{10c97}'), ('\u{10cd8}', '\u{10c98}'), ('\u{10cd9}', '\u{10c99}'),
-        ('\u{10cda}', '\u{10c9a}'), ('\u{10cdb}', '\u{10c9b}'), ('\u{10cdc}',
-        '\u{10c9c}'), ('\u{10cdd}', '\u{10c9d}'), ('\u{10cde}', '\u{10c9e}'),
-        ('\u{10cdf}', '\u{10c9f}'), ('\u{10ce0}', '\u{10ca0}'), ('\u{10ce1}',
-        '\u{10ca1}'), ('\u{10ce2}', '\u{10ca2}'), ('\u{10ce3}', '\u{10ca3}'),
-        ('\u{10ce4}', '\u{10ca4}'), ('\u{10ce5}', '\u{10ca5}'), ('\u{10ce6}',
-        '\u{10ca6}'), ('\u{10ce7}', '\u{10ca7}'), ('\u{10ce8}', '\u{10ca8}'),
-        ('\u{10ce9}', '\u{10ca9}'), ('\u{10cea}', '\u{10caa}'), ('\u{10ceb}',
-        '\u{10cab}'), ('\u{10cec}', '\u{10cac}'), ('\u{10ced}', '\u{10cad}'),
-        ('\u{10cee}', '\u{10cae}'), ('\u{10cef}', '\u{10caf}'), ('\u{10cf0}',
-        '\u{10cb0}'), ('\u{10cf1}', '\u{10cb1}'), ('\u{10cf2}', '\u{10cb2}'),
-        ('\u{118a0}', '\u{118c0}'), ('\u{118a1}', '\u{118c1}'), ('\u{118a2}',
-        '\u{118c2}'), ('\u{118a3}', '\u{118c3}'), ('\u{118a4}', '\u{118c4}'),
-        ('\u{118a5}', '\u{118c5}'), ('\u{118a6}', '\u{118c6}'), ('\u{118a7}',
-        '\u{118c7}'), ('\u{118a8}', '\u{118c8}'), ('\u{118a9}', '\u{118c9}'),
-        ('\u{118aa}', '\u{118ca}'), ('\u{118ab}', '\u{118cb}'), ('\u{118ac}',
-        '\u{118cc}'), ('\u{118ad}', '\u{118cd}'), ('\u{118ae}', '\u{118ce}'),
-        ('\u{118af}', '\u{118cf}'), ('\u{118b0}', '\u{118d0}'), ('\u{118b1}',
-        '\u{118d1}'), ('\u{118b2}', '\u{118d2}'), ('\u{118b3}', '\u{118d3}'),
-        ('\u{118b4}', '\u{118d4}'), ('\u{118b5}', '\u{118d5}'), ('\u{118b6}',
-        '\u{118d6}'), ('\u{118b7}', '\u{118d7}'), ('\u{118b8}', '\u{118d8}'),
-        ('\u{118b9}', '\u{118d9}'), ('\u{118ba}', '\u{118da}'), ('\u{118bb}',
-        '\u{118db}'), ('\u{118bc}', '\u{118dc}'), ('\u{118bd}', '\u{118dd}'),
-        ('\u{118be}', '\u{118de}'), ('\u{118bf}', '\u{118df}'), ('\u{118c0}',
-        '\u{118a0}'), ('\u{118c1}', '\u{118a1}'), ('\u{118c2}', '\u{118a2}'),
-        ('\u{118c3}', '\u{118a3}'), ('\u{118c4}', '\u{118a4}'), ('\u{118c5}',
-        '\u{118a5}'), ('\u{118c6}', '\u{118a6}'), ('\u{118c7}', '\u{118a7}'),
-        ('\u{118c8}', '\u{118a8}'), ('\u{118c9}', '\u{118a9}'), ('\u{118ca}',
-        '\u{118aa}'), ('\u{118cb}', '\u{118ab}'), ('\u{118cc}', '\u{118ac}'),
-        ('\u{118cd}', '\u{118ad}'), ('\u{118ce}', '\u{118ae}'), ('\u{118cf}',
-        '\u{118af}'), ('\u{118d0}', '\u{118b0}'), ('\u{118d1}', '\u{118b1}'),
-        ('\u{118d2}', '\u{118b2}'), ('\u{118d3}', '\u{118b3}'), ('\u{118d4}',
-        '\u{118b4}'), ('\u{118d5}', '\u{118b5}'), ('\u{118d6}', '\u{118b6}'),
-        ('\u{118d7}', '\u{118b7}'), ('\u{118d8}', '\u{118b8}'), ('\u{118d9}',
-        '\u{118b9}'), ('\u{118da}', '\u{118ba}'), ('\u{118db}', '\u{118bb}'),
-        ('\u{118dc}', '\u{118bc}'), ('\u{118dd}', '\u{118bd}'), ('\u{118de}',
-        '\u{118be}'), ('\u{118df}', '\u{118bf}')
-    ];
-
-}
-
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"03dcea6dcd54625b42d91176e86718626dfd911744a343dee3edefa001e87dc5","Cargo.toml":"d2a79a65f523c621e0755c45c7992177fbdec9b6216910f1ec8d983682f7d710","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"11c5bfb489de42f984b1380f8100edb794fb88f750c03e9c62aff0f53860e4d5","appveyor.yml":"da991211b72fa6f231af7adb84c9fb72f5a9131d1c0a3d47b8ceffe5a82c8542","benches/base64.rs":"96f7d0c7d260362e41b8cefb4839f1e1b3c18c2f10344f6ccafac7c434f99ca9","benches/hex.rs":"057821307b4b7de02f2c267f9248457386035382916c5afe4b72d6f2e905062c","benches/json.rs":"659f2ae2e1ad5ed022fafce6418d17dfe09c3dcb3f054857dce0effc907da850","src/base64.rs":"e83a8b3b30180ba0e74e1caca1c04a4e960acb72960fe149aef9ab8dcfb50053","src/collection_impls.rs":"8ae6bc0d61a4777d834c2b24fa987550cb13c570e1564f87ee32eceff3cb2d5b","src/hex.rs":"706f925e8abd8de250d9bbbc4877be726cbbeb5b612ff8f283bd4fee98d7a454","src/json.rs":"6b9541ff2a650d90e290fed24b59fc2fd9410aabc4654f9d8d1f77296e3ab3cf","src/lib.rs":"6e7beb6b5c4ebcaadedb8a82e1cc17249f9a8da2a59d19e1af9dd9a75e8ddf6b","src/serialize.rs":"7ddcc3c32843850e30d05b82a8cda8ae63ec0016e2b0bfbcc46a03ea3ea986e8"},"package":"237546c689f20bb44980270c73c3b9edd0891c1be49cc1274406134a66d3957b"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-language: rust
-rust:
-  - 1.0.0
-  - stable
-  - beta
-  - nightly
-sudo: false
-before_script:
-  - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
-script:
-  - cargo build --verbose
-  - cargo test --verbose
-  - cargo doc --no-deps
-after_success:
-  - travis-cargo --only nightly doc-upload
-env:
-  global:
-    secure: "kJnqqAXRl0C7Afx0c8Y3vA6TAEZsxlasu7eIZMdCbNS4N1+Rwh0jNTa2jy2D3CQCrzW5OCefnkpkPTu8mADrAjedM4p/9X5UXZi0sgg2lzCgfGwrRzitTnyPDkdYidiu4QeC/r0WPC8lYZKHkJXYhF8bZgchB9ypnZ6LAHCcDkA="
-
-
-
-notifications:
-  email:
-    on_success: never
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/Cargo.toml
+++ /dev/null
@@ -1,18 +0,0 @@
-[package]
-
-name = "rustc-serialize"
-version = "0.3.22"
-authors = ["The Rust Project Developers"]
-license = "MIT/Apache-2.0"
-readme = "README.md"
-repository = "https://github.com/rust-lang/rustc-serialize"
-homepage = "https://github.com/rust-lang/rustc-serialize"
-documentation = "https://doc.rust-lang.org/rustc-serialize"
-description = """
-Generic serialization/deserialization support corresponding to the
-`derive(RustcEncodable, RustcDecodable)` mode in the compiler. Also includes
-support for hex, base64, and json encoding and decoding.
-"""
-
-[dev-dependencies]
-rand = "0.3"
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2014 The Rust Project Developers
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# rustc-serialize
-
-Serialization and deserialization support provided by the compiler in the form
-of `derive(RustcEncodable, RustcDecodable)`.
-
-[![Linux Build Status](https://travis-ci.org/rust-lang-nursery/rustc-serialize.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/rustc-serialize)
-[![Windows Build Status](https://ci.appveyor.com/api/projects/status/ka194de75aapwpft?svg=true)](https://ci.appveyor.com/project/alexcrichton/rustc-serialize)
-
-[Documentation](https://doc.rust-lang.org/rustc-serialize)
-
-## Usage
-
-Add this to your `Cargo.toml`:
-
-```toml
-[dependencies]
-rustc-serialize = "0.3"
-```
-
-and this to your crate root:
-
-```rust
-extern crate rustc_serialize;
-```
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/appveyor.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-environment:
-  matrix:
-  - TARGET: x86_64-pc-windows-msvc
-  - TARGET: i686-pc-windows-msvc
-  - TARGET: i686-pc-windows-gnu
-install:
-  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
-  - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
-  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
-  - SET PATH=%PATH%;C:\MinGW\bin
-  - rustc -V
-  - cargo -V
-
-build: false
-
-test_script:
-  - cargo test --verbose
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/benches/base64.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-#![feature(test)]
-
-extern crate test;
-extern crate rustc_serialize;
-
-use rustc_serialize::base64::{FromBase64, ToBase64, STANDARD};
-use test::Bencher;
-
-#[bench]
-fn bench_to_base64(b: &mut Bencher) {
-    let s = "イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム \
-             ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン";
-    b.iter(|| {
-        s.as_bytes().to_base64(STANDARD);
-    });
-    b.bytes = s.len() as u64;
-}
-
-#[bench]
-fn bench_from_base64(b: &mut Bencher) {
-    let s = "イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム \
-             ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン";
-    let sb = s.as_bytes().to_base64(STANDARD);
-    b.iter(|| {
-        sb.from_base64().unwrap();
-    });
-    b.bytes = sb.len() as u64;
-}
-
-
-#[bench]
-fn bench_to_base64_large(b: &mut Bencher) {
-    let s: Vec<_> = (0..10000).map(|i| ((i as u32 * 12345) % 256) as u8).collect();
-    b.iter(|| {
-        s.to_base64(STANDARD);
-    });
-    b.bytes = s.len() as u64;
-}
-
-#[bench]
-fn bench_from_base64_large(b: &mut Bencher) {
-    let s: Vec<_> = (0..10000).map(|i| ((i as u32 * 12345) % 256) as u8).collect();
-    let sb = s.to_base64(STANDARD);
-    b.iter(|| {
-        sb.from_base64().unwrap();
-    });
-    b.bytes = sb.len() as u64;
-}
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/benches/hex.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-#![feature(test)]
-
-extern crate test;
-extern crate rustc_serialize;
-
-use test::Bencher;
-use rustc_serialize::hex::{FromHex, ToHex};
-
-#[bench]
-fn bench_to_hex(b: &mut Bencher) {
-    let s = "イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム \
-             ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン";
-    b.iter(|| {
-        s.as_bytes().to_hex();
-    });
-    b.bytes = s.len() as u64;
-}
-
-#[bench]
-fn bench_from_hex(b: &mut Bencher) {
-    let s = "イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム \
-             ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン";
-    let sb = s.as_bytes().to_hex();
-    b.iter(|| {
-        sb.from_hex().unwrap();
-    });
-    b.bytes = sb.len() as u64;
-}
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/benches/json.rs
+++ /dev/null
@@ -1,84 +0,0 @@
-#![feature(test)]
-
-extern crate test;
-extern crate rustc_serialize;
-
-use std::string;
-use rustc_serialize::json::{Json, Parser};
-use test::Bencher;
-
-#[bench]
-fn bench_streaming_small(b: &mut Bencher) {
-    b.iter( || {
-        let mut parser = Parser::new(
-            r#"{
-                "a": 1.0,
-                "b": [
-                    true,
-                    "foo\nbar",
-                    { "c": {"d": null} }
-                ]
-            }"#.chars()
-        );
-        loop {
-            match parser.next() {
-                None => return,
-                _ => {}
-            }
-        }
-    });
-}
-#[bench]
-fn bench_small(b: &mut Bencher) {
-    b.iter( || {
-        let _ = Json::from_str(r#"{
-            "a": 1.0,
-            "b": [
-                true,
-                "foo\nbar",
-                { "c": {"d": null} }
-            ]
-        }"#);
-    });
-}
-
-#[bench]
-fn bench_decode_hex_escape(b: &mut Bencher) {
-    let mut src = "\"".to_string();
-    for _ in 0..10 {
-        src.push_str("\\uF975\\uf9bc\\uF9A0\\uF9C4\\uF975\\uf9bc\\uF9A0\\uF9C4");
-    }
-    src.push_str("\"");
-    b.iter( || {
-        let _ = Json::from_str(&src);
-    });
-}
-
-fn big_json() -> string::String {
-    let mut src = "[\n".to_string();
-    for _ in 0..500 {
-        src.push_str(r#"{ "a": true, "b": null, "c":3.1415, "d": "Hello world", "e": \
-                        [1,2,3]},"#);
-    }
-    src.push_str("{}]");
-    return src;
-}
-
-#[bench]
-fn bench_streaming_large(b: &mut Bencher) {
-    let src = big_json();
-    b.iter( || {
-        let mut parser = Parser::new(src.chars());
-        loop {
-            match parser.next() {
-                None => return,
-                _ => {}
-            }
-        }
-    });
-}
-#[bench]
-fn bench_large(b: &mut Bencher) {
-    let src = big_json();
-    b.iter( || { let _ = Json::from_str(&src); });
-}
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/src/base64.rs
+++ /dev/null
@@ -1,488 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
-
-//! Base64 binary-to-text encoding
-
-pub use self::FromBase64Error::*;
-pub use self::CharacterSet::*;
-
-use std::fmt;
-use std::error;
-
-/// Available encoding character sets
-#[derive(Clone, Copy, Debug)]
-pub enum CharacterSet {
-    /// The standard character set (uses `+` and `/`)
-    Standard,
-    /// The URL safe character set (uses `-` and `_`)
-    UrlSafe
-}
-
-/// Available newline types
-#[derive(Clone, Copy, Debug)]
-pub enum Newline {
-    /// A linefeed (i.e. Unix-style newline)
-    LF,
-    /// A carriage return and a linefeed (i.e. Windows-style newline)
-    CRLF
-}
-
-/// Contains configuration parameters for `to_base64`.
-#[derive(Clone, Copy, Debug)]
-pub struct Config {
-    /// Character set to use
-    pub char_set: CharacterSet,
-    /// Newline to use
-    pub newline: Newline,
-    /// True to pad output with `=` characters
-    pub pad: bool,
-    /// `Some(len)` to wrap lines at `len`, `None` to disable line wrapping
-    pub line_length: Option<usize>
-}
-
-/// Configuration for RFC 4648 standard base64 encoding
-pub static STANDARD: Config =
-    Config {char_set: Standard, newline: Newline::CRLF, pad: true, line_length: None};
-
-/// Configuration for RFC 4648 base64url encoding
-pub static URL_SAFE: Config =
-    Config {char_set: UrlSafe, newline: Newline::CRLF, pad: false, line_length: None};
-
-/// Configuration for RFC 2045 MIME base64 encoding
-pub static MIME: Config =
-    Config {char_set: Standard, newline: Newline::CRLF, pad: true, line_length: Some(76)};
-
-static STANDARD_CHARS: &'static[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ\
-                                        abcdefghijklmnopqrstuvwxyz\
-                                        0123456789+/";
-
-static URLSAFE_CHARS: &'static[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ\
-                                       abcdefghijklmnopqrstuvwxyz\
-                                       0123456789-_";
-
-/// A trait for converting a value to base64 encoding.
-pub trait ToBase64 {
-    /// Converts the value of `self` to a base64 value following the specified
-    /// format configuration, returning the owned string.
-    fn to_base64(&self, config: Config) -> String;
-}
-
-impl ToBase64 for [u8] {
-    /// Turn a vector of `u8` bytes into a base64 string.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// extern crate rustc_serialize;
-    /// use rustc_serialize::base64::{ToBase64, STANDARD};
-    ///
-    /// fn main () {
-    ///     let str = [52,32].to_base64(STANDARD);
-    ///     println!("base 64 output: {:?}", str);
-    /// }
-    /// ```
-    fn to_base64(&self, config: Config) -> String {
-        let bytes = match config.char_set {
-            Standard => STANDARD_CHARS,
-            UrlSafe => URLSAFE_CHARS
-        };
-
-        let len = self.len();
-        let newline = match config.newline {
-            Newline::LF => "\n",
-            Newline::CRLF => "\r\n",
-        };
-
-        // Preallocate memory.
-        let mut prealloc_len = (len + 2) / 3 * 4;
-        if let Some(line_length) = config.line_length {
-            let num_lines = match prealloc_len {
-                0 => 0,
-                n => (n - 1) / line_length
-            };
-            prealloc_len += num_lines * newline.bytes().count();
-        }
-
-        let mut out_bytes = vec![b'='; prealloc_len];
-
-        // Deal with padding bytes
-        let mod_len = len % 3;
-
-        // Use iterators to reduce branching
-        {
-            let mut cur_length = 0;
-
-            let mut s_in = self[..len - mod_len].iter().map(|&x| x as u32);
-            let mut s_out = out_bytes.iter_mut();
-
-            // Convenient shorthand
-            let enc = |val| bytes[val as usize];
-            let mut write = |val| *s_out.next().unwrap() = val;
-
-            // Iterate though blocks of 4
-            while let (Some(first), Some(second), Some(third)) =
-                        (s_in.next(), s_in.next(), s_in.next()) {
-
-                // Line break if needed
-                if let Some(line_length) = config.line_length {
-                    if cur_length >= line_length {
-                        for b in newline.bytes() { write(b) };
-                        cur_length = 0;
-                    }
-                }
-
-                let n = first << 16 | second << 8 | third;
-
-                // This 24-bit number gets separated into four 6-bit numbers.
-                write(enc((n >> 18) & 63));
-                write(enc((n >> 12) & 63));
-                write(enc((n >> 6 ) & 63));
-                write(enc((n >> 0 ) & 63));
-
-                cur_length += 4;
-            }
-
-            // Line break only needed if padding is required
-            if mod_len != 0 {
-                if let Some(line_length) = config.line_length {
-                    if cur_length >= line_length {
-                        for b in newline.bytes() { write(b) };
-                    }
-                }
-            }
-
-            // Heh, would be cool if we knew this was exhaustive
-            // (the dream of bounded integer types)
-            match mod_len {
-                0 => (),
-                1 => {
-                    let n = (self[len-1] as u32) << 16;
-                    write(enc((n >> 18) & 63));
-                    write(enc((n >> 12) & 63));
-                }
-                2 => {
-                    let n = (self[len-2] as u32) << 16 |
-                            (self[len-1] as u32) << 8;
-                    write(enc((n >> 18) & 63));
-                    write(enc((n >> 12) & 63));
-                    write(enc((n >> 6 ) & 63));
-                }
-                _ => panic!("Algebra is broken, please alert the math police")
-            }
-        }
-
-        // We get padding for "free", so only have to drop it if unwanted.
-        if !config.pad {
-            while let Some(&b'=') = out_bytes.last() {
-                out_bytes.pop();
-            }
-        }
-
-        unsafe { String::from_utf8_unchecked(out_bytes) }
-    }
-}
-
-impl<'a, T: ?Sized + ToBase64> ToBase64 for &'a T {
-    fn to_base64(&self, config: Config) -> String {
-        (**self).to_base64(config)
-    }
-}
-
-/// A trait for converting from base64 encoded values.
-pub trait FromBase64 {
-    /// Converts the value of `self`, interpreted as base64 encoded data, into
-    /// an owned vector of bytes, returning the vector.
-    fn from_base64(&self) -> Result<Vec<u8>, FromBase64Error>;
-}
-
-/// Errors that can occur when decoding a base64 encoded string
-#[derive(Clone, Copy)]
-pub enum FromBase64Error {
-    /// The input contained a character not part of the base64 format
-    InvalidBase64Byte(u8, usize),
-    /// The input had an invalid length
-    InvalidBase64Length,
-}
-
-impl fmt::Debug for FromBase64Error {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            InvalidBase64Byte(ch, idx) =>
-                write!(f, "Invalid character '{}' at position {}", ch, idx),
-            InvalidBase64Length => write!(f, "Invalid length"),
-        }
-    }
-}
-
-impl error::Error for FromBase64Error {
-    fn description(&self) -> &str {
-        match *self {
-            InvalidBase64Byte(_, _) => "invalid character",
-            InvalidBase64Length => "invalid length",
-        }
-    }
-}
-
-impl fmt::Display for FromBase64Error {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Debug::fmt(&self, f)
-    }
-}
-
-impl FromBase64 for str {
-    /// Convert any base64 encoded string (literal, `@`, `&`, or `~`)
-    /// to the byte values it encodes.
-    ///
-    /// You can use the `String::from_utf8` function to turn a `Vec<u8>` into a
-    /// string with characters corresponding to those values.
-    ///
-    /// # Example
-    ///
-    /// This converts a string literal to base64 and back.
-    ///
-    /// ```rust
-    /// extern crate rustc_serialize;
-    /// use rustc_serialize::base64::{ToBase64, FromBase64, STANDARD};
-    ///
-    /// fn main () {
-    ///     let hello_str = b"Hello, World".to_base64(STANDARD);
-    ///     println!("base64 output: {}", hello_str);
-    ///     let res = hello_str.from_base64();
-    ///     if res.is_ok() {
-    ///       let opt_bytes = String::from_utf8(res.unwrap());
-    ///       if opt_bytes.is_ok() {
-    ///         println!("decoded from base64: {:?}", opt_bytes.unwrap());
-    ///       }
-    ///     }
-    /// }
-    /// ```
-    #[inline]
-    fn from_base64(&self) -> Result<Vec<u8>, FromBase64Error> {
-        self.as_bytes().from_base64()
-    }
-}
-
-impl FromBase64 for [u8] {
-    fn from_base64(&self) -> Result<Vec<u8>, FromBase64Error> {
-        let mut r = Vec::with_capacity(self.len());
-        let mut buf: u32 = 0;
-        let mut modulus = 0;
-
-        let mut it = self.iter();
-        for byte in it.by_ref() {
-            let code = DECODE_TABLE[*byte as usize];
-            if code >= SPECIAL_CODES_START {
-                match code {
-                    NEWLINE_CODE => continue,
-                    EQUALS_CODE => break,
-                    INVALID_CODE => return Err(InvalidBase64Byte(
-                            *byte, (byte as *const _ as usize) - self.as_ptr() as usize)),
-                    _ => unreachable!(),
-                }
-            }
-            buf = (buf | code as u32) << 6;
-            modulus += 1;
-            if modulus == 4 {
-                modulus = 0;
-                r.push((buf >> 22) as u8);
-                r.push((buf >> 14) as u8);
-                r.push((buf >> 6 ) as u8);
-            }
-        }
-
-        for byte in it {
-            match *byte {
-                b'=' | b'\r' | b'\n' => continue,
-                _ => return Err(InvalidBase64Byte(
-                        *byte, (byte as *const _ as usize) - self.as_ptr() as usize)),
-            }
-        }
-
-        match modulus {
-            2 => {
-                r.push((buf >> 10) as u8);
-            }
-            3 => {
-                r.push((buf >> 16) as u8);
-                r.push((buf >> 8 ) as u8);
-            }
-            0 => (),
-            _ => return Err(InvalidBase64Length),
-        }
-
-        Ok(r)
-    }
-}
-
-impl<'a, T: ?Sized + FromBase64> FromBase64 for &'a T {
-    fn from_base64(&self) -> Result<Vec<u8>, FromBase64Error> {
-        (**self).from_base64()
-    }
-}
-
-/// Base64 decoding lookup table, generated using:
-/// ```rust
-///     let mut ch = 0u8;
-///     loop {
-///         let code = match ch {
-///             b'A'...b'Z' => ch - 0x41,
-///             b'a'...b'z' => ch - 0x47,
-///             b'0'...b'9' => ch + 0x04,
-///             b'+' | b'-' => 0x3E,
-///             b'/' | b'_' => 0x3F,
-///             b'=' => 0xFE,
-///             b'\r' | b'\n' => 0xFD,
-///             _ => 0xFF,
-///         };
-///         print!("0x{:02X}, ", code);
-///         if ch % 16  == 15 { println!(""); }
-///         else if ch == 0xFF { break; }
-///         ch += 1;
-///     }
-///     println!("");
-/// }
-/// ```
-const DECODE_TABLE: [u8; 256] = [
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3E, 0xFF, 0x3E, 0xFF, 0x3F,
-    0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF,
-    0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E,
-    0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F,
-    0xFF, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
-    0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-];
-const INVALID_CODE: u8 = 0xFF;
-const EQUALS_CODE: u8 = 0xFE;
-const NEWLINE_CODE: u8 = 0xFD;
-const SPECIAL_CODES_START: u8 = NEWLINE_CODE;
-
-#[cfg(test)]
-mod tests {
-    use base64::{Config, Newline, FromBase64, ToBase64, STANDARD, URL_SAFE};
-
-    #[test]
-    fn test_to_base64_basic() {
-        assert_eq!("".as_bytes().to_base64(STANDARD), "");
-        assert_eq!("f".as_bytes().to_base64(STANDARD), "Zg==");
-        assert_eq!("fo".as_bytes().to_base64(STANDARD), "Zm8=");
-        assert_eq!("foo".as_bytes().to_base64(STANDARD), "Zm9v");
-        assert_eq!("foob".as_bytes().to_base64(STANDARD), "Zm9vYg==");
-        assert_eq!("fooba".as_bytes().to_base64(STANDARD), "Zm9vYmE=");
-        assert_eq!("foobar".as_bytes().to_base64(STANDARD), "Zm9vYmFy");
-    }
-
-    #[test]
-    fn test_to_base64_crlf_line_break() {
-        assert!(![08; 1000].to_base64(Config {line_length: None, ..STANDARD})
-                              .contains("\r\n"));
-        assert_eq!(b"foobar".to_base64(Config {line_length: Some(4),
-                                               ..STANDARD}),
-                   "Zm9v\r\nYmFy");
-    }
-
-    #[test]
-    fn test_to_base64_lf_line_break() {
-        assert!(![08; 1000].to_base64(Config {line_length: None,
-                                                 newline: Newline::LF,
-                                                 ..STANDARD})
-                              .contains("\n"));
-        assert_eq!(b"foobar".to_base64(Config {line_length: Some(4),
-                                               newline: Newline::LF,
-                                               ..STANDARD}),
-                   "Zm9v\nYmFy");
-    }
-
-    #[test]
-    fn test_to_base64_padding() {
-        assert_eq!("f".as_bytes().to_base64(Config {pad: false, ..STANDARD}), "Zg");
-        assert_eq!("fo".as_bytes().to_base64(Config {pad: false, ..STANDARD}), "Zm8");
-    }
-
-    #[test]
-    fn test_to_base64_url_safe() {
-        assert_eq!([251, 255].to_base64(URL_SAFE), "-_8");
-        assert_eq!([251, 255].to_base64(STANDARD), "+/8=");
-    }
-
-    #[test]
-    fn test_to_base64_empty_line_length() {
-        [].to_base64(Config {line_length: Some(72), ..STANDARD});
-    }
-
-    #[test]
-    fn test_from_base64_basic() {
-        assert_eq!("".from_base64().unwrap(), b"");
-        assert_eq!("Zg==".from_base64().unwrap(), b"f");
-        assert_eq!("Zm8=".from_base64().unwrap(), b"fo");
-        assert_eq!("Zm9v".from_base64().unwrap(), b"foo");
-        assert_eq!("Zm9vYg==".from_base64().unwrap(), b"foob");
-        assert_eq!("Zm9vYmE=".from_base64().unwrap(), b"fooba");
-        assert_eq!("Zm9vYmFy".from_base64().unwrap(), b"foobar");
-    }
-
-    #[test]
-    fn test_from_base64_bytes() {
-        assert_eq!(b"Zm9vYmFy".from_base64().unwrap(), b"foobar");
-    }
-
-    #[test]
-    fn test_from_base64_newlines() {
-        assert_eq!("Zm9v\r\nYmFy".from_base64().unwrap(),
-                   b"foobar");
-        assert_eq!("Zm9vYg==\r\n".from_base64().unwrap(),
-                   b"foob");
-        assert_eq!("Zm9v\nYmFy".from_base64().unwrap(),
-                   b"foobar");
-        assert_eq!("Zm9vYg==\n".from_base64().unwrap(),
-                   b"foob");
-    }
-
-    #[test]
-    fn test_from_base64_urlsafe() {
-        assert_eq!("-_8".from_base64().unwrap(), "+/8=".from_base64().unwrap());
-    }
-
-    #[test]
-    fn test_from_base64_invalid_char() {
-        assert!("Zm$=".from_base64().is_err());
-        assert!("Zg==$".from_base64().is_err());
-    }
-
-    #[test]
-    fn test_from_base64_invalid_padding() {
-        assert!("Z===".from_base64().is_err());
-    }
-
-    #[test]
-    fn test_base64_random() {
-        use rand::{thread_rng, Rng};
-
-        for _ in 0..1000 {
-            let times = thread_rng().gen_range(1, 100);
-            let v = thread_rng().gen_iter::<u8>().take(times)
-                                .collect::<Vec<_>>();
-            assert_eq!(v.to_base64(STANDARD)
-                        .from_base64()
-                        .unwrap(),
-                       v);
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/src/collection_impls.rs
+++ /dev/null
@@ -1,186 +0,0 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Implementations of serialization for structures found in libcollections
-
-use std::hash::Hash;
-
-use {Decodable, Encodable, Decoder, Encoder, cap_capacity};
-use std::collections::{LinkedList, VecDeque, BTreeMap, BTreeSet, HashMap, HashSet};
-
-impl<
-    T: Encodable
-> Encodable for LinkedList<T> {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_seq(self.len(), |s| {
-            for (i, e) in self.iter().enumerate() {
-                try!(s.emit_seq_elt(i, |s| e.encode(s)));
-            }
-            Ok(())
-        })
-    }
-}
-
-impl<T:Decodable> Decodable for LinkedList<T> {
-    fn decode<D: Decoder>(d: &mut D) -> Result<LinkedList<T>, D::Error> {
-        d.read_seq(|d, len| {
-            let mut list = LinkedList::new();
-            for i in 0..len {
-                list.push_back(try!(d.read_seq_elt(i, |d| Decodable::decode(d))));
-            }
-            Ok(list)
-        })
-    }
-}
-
-impl<T: Encodable> Encodable for VecDeque<T> {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_seq(self.len(), |s| {
-            for (i, e) in self.iter().enumerate() {
-                try!(s.emit_seq_elt(i, |s| e.encode(s)));
-            }
-            Ok(())
-        })
-    }
-}
-
-impl<T:Decodable> Decodable for VecDeque<T> {
-    fn decode<D: Decoder>(d: &mut D) -> Result<VecDeque<T>, D::Error> {
-        d.read_seq(|d, len| {
-            let mut deque: VecDeque<T> = VecDeque::new();
-            for i in 0..len {
-                deque.push_back(try!(d.read_seq_elt(i, |d| Decodable::decode(d))));
-            }
-            Ok(deque)
-        })
-    }
-}
-
-impl<
-    K: Encodable + Ord,
-    V: Encodable
-> Encodable for BTreeMap<K, V> {
-    fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
-        e.emit_map(self.len(), |e| {
-            let mut i = 0;
-            for (key, val) in self.iter() {
-                try!(e.emit_map_elt_key(i, |e| key.encode(e)));
-                try!(e.emit_map_elt_val(i, |e| val.encode(e)));
-                i += 1;
-            }
-            Ok(())
-        })
-    }
-}
-
-impl<
-    K: Decodable + Ord,
-    V: Decodable
-> Decodable for BTreeMap<K, V> {
-    fn decode<D: Decoder>(d: &mut D) -> Result<BTreeMap<K, V>, D::Error> {
-        d.read_map(|d, len| {
-            let mut map = BTreeMap::new();
-            for i in 0..len {
-                let key = try!(d.read_map_elt_key(i, |d| Decodable::decode(d)));
-                let val = try!(d.read_map_elt_val(i, |d| Decodable::decode(d)));
-                map.insert(key, val);
-            }
-            Ok(map)
-        })
-    }
-}
-
-impl<
-    T: Encodable + Ord
-> Encodable for BTreeSet<T> {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_seq(self.len(), |s| {
-            let mut i = 0;
-            for e in self.iter() {
-                try!(s.emit_seq_elt(i, |s| e.encode(s)));
-                i += 1;
-            }
-            Ok(())
-        })
-    }
-}
-
-impl<
-    T: Decodable + Ord
-> Decodable for BTreeSet<T> {
-    fn decode<D: Decoder>(d: &mut D) -> Result<BTreeSet<T>, D::Error> {
-        d.read_seq(|d, len| {
-            let mut set = BTreeSet::new();
-            for i in 0..len {
-                set.insert(try!(d.read_seq_elt(i, |d| Decodable::decode(d))));
-            }
-            Ok(set)
-        })
-    }
-}
-
-impl<K, V> Encodable for HashMap<K, V>
-    where K: Encodable + Hash + Eq,
-          V: Encodable,
-{
-    fn encode<E: Encoder>(&self, e: &mut E) -> Result<(), E::Error> {
-        e.emit_map(self.len(), |e| {
-            let mut i = 0;
-            for (key, val) in self.iter() {
-                try!(e.emit_map_elt_key(i, |e| key.encode(e)));
-                try!(e.emit_map_elt_val(i, |e| val.encode(e)));
-                i += 1;
-            }
-            Ok(())
-        })
-    }
-}
-
-impl<K, V> Decodable for HashMap<K, V>
-    where K: Decodable + Hash + Eq,
-          V: Decodable,
-{
-    fn decode<D: Decoder>(d: &mut D) -> Result<HashMap<K, V>, D::Error> {
-        d.read_map(|d, len| {
-            let mut map = HashMap::with_capacity(cap_capacity::<(K, V)>(len));
-            for i in 0..len {
-                let key = try!(d.read_map_elt_key(i, |d| Decodable::decode(d)));
-                let val = try!(d.read_map_elt_val(i, |d| Decodable::decode(d)));
-                map.insert(key, val);
-            }
-            Ok(map)
-        })
-    }
-}
-
-impl<T> Encodable for HashSet<T> where T: Encodable + Hash + Eq {
-    fn encode<E: Encoder>(&self, s: &mut E) -> Result<(), E::Error> {
-        s.emit_seq(self.len(), |s| {
-            let mut i = 0;
-            for e in self.iter() {
-                try!(s.emit_seq_elt(i, |s| e.encode(s)));
-                i += 1;
-            }
-            Ok(())
-        })
-    }
-}
-
-impl<T> Decodable for HashSet<T> where T: Decodable + Hash + Eq, {
-    fn decode<D: Decoder>(d: &mut D) -> Result<HashSet<T>, D::Error> {
-        d.read_seq(|d, len| {
-            let mut set = HashSet::with_capacity(cap_capacity::<T>(len));
-            for i in 0..len {
-                set.insert(try!(d.read_seq_elt(i, |d| Decodable::decode(d))));
-            }
-            Ok(set)
-        })
-    }
-}
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/src/hex.rs
+++ /dev/null
@@ -1,221 +0,0 @@
-// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-//
-// ignore-lexer-test FIXME #15679
-
-//! Hex binary-to-text encoding
-
-pub use self::FromHexError::*;
-
-use std::fmt;
-use std::error;
-
-/// A trait for converting a value to hexadecimal encoding
-pub trait ToHex {
-    /// Converts the value of `self` to a hex value, returning the owned
-    /// string.
-    fn to_hex(&self) -> String;
-}
-
-static CHARS: &'static[u8] = b"0123456789abcdef";
-
-impl ToHex for [u8] {
-    /// Turn a vector of `u8` bytes into a hexadecimal string.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// extern crate rustc_serialize;
-    /// use rustc_serialize::hex::ToHex;
-    ///
-    /// fn main () {
-    ///     let str = [52,32].to_hex();
-    ///     println!("{}", str);
-    /// }
-    /// ```
-    fn to_hex(&self) -> String {
-        let mut v = Vec::with_capacity(self.len() * 2);
-        for &byte in self.iter() {
-            v.push(CHARS[(byte >> 4) as usize]);
-            v.push(CHARS[(byte & 0xf) as usize]);
-        }
-
-        unsafe {
-            String::from_utf8_unchecked(v)
-        }
-    }
-}
-
-impl<'a, T: ?Sized + ToHex> ToHex for &'a T {
-    fn to_hex(&self) -> String {
-        (**self).to_hex()
-    }
-}
-
-/// A trait for converting hexadecimal encoded values
-pub trait FromHex {
-    /// Converts the value of `self`, interpreted as hexadecimal encoded data,
-    /// into an owned vector of bytes, returning the vector.
-    fn from_hex(&self) -> Result<Vec<u8>, FromHexError>;
-}
-
-/// Errors that can occur when decoding a hex encoded string
-#[derive(Clone, Copy)]
-pub enum FromHexError {
-    /// The input contained a character not part of the hex format
-    InvalidHexCharacter(char, usize),
-    /// The input had an invalid length
-    InvalidHexLength,
-}
-
-impl fmt::Debug for FromHexError {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            InvalidHexCharacter(ch, idx) =>
-                write!(f, "Invalid character '{}' at position {}", ch, idx),
-            InvalidHexLength => write!(f, "Invalid input length"),
-        }
-    }
-}
-
-impl error::Error for FromHexError {
-    fn description(&self) -> &str {
-        match *self {
-            InvalidHexCharacter(_, _) => "invalid character",
-            InvalidHexLength => "invalid length",
-        }
-    }
-}
-
-impl fmt::Display for FromHexError {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Debug::fmt(&self, f)
-    }
-}
-
-impl FromHex for str {
-    /// Convert any hexadecimal encoded string (literal, `@`, `&`, or `~`)
-    /// to the byte values it encodes.
-    ///
-    /// You can use the `String::from_utf8` function to turn a
-    /// `Vec<u8>` into a string with characters corresponding to those values.
-    ///
-    /// # Example
-    ///
-    /// This converts a string literal to hexadecimal and back.
-    ///
-    /// ```rust
-    /// extern crate rustc_serialize;
-    /// use rustc_serialize::hex::{FromHex, ToHex};
-    ///
-    /// fn main () {
-    ///     let hello_str = "Hello, World".as_bytes().to_hex();
-    ///     println!("{}", hello_str);
-    ///     let bytes = hello_str.from_hex().unwrap();
-    ///     println!("{:?}", bytes);
-    ///     let result_str = String::from_utf8(bytes).unwrap();
-    ///     println!("{}", result_str);
-    /// }
-    /// ```
-    fn from_hex(&self) -> Result<Vec<u8>, FromHexError> {
-        // This may be an overestimate if there is any whitespace
-        let mut b = Vec::with_capacity(self.len() / 2);
-        let mut modulus = 0;
-        let mut buf = 08;
-
-        for (idx, byte) in self.bytes().enumerate() {
-            buf <<= 4;
-
-            match byte {
-                b'A'...b'F' => buf |= byte - b'A' + 10,
-                b'a'...b'f' => buf |= byte - b'a' + 10,
-                b'0'...b'9' => buf |= byte - b'0',
-                b' '|b'\r'|b'\n'|b'\t' => {
-                    buf >>= 4;
-                    continue
-                }
-                _ => {
-                    let ch = self[idx..].chars().next().unwrap();
-                    return Err(InvalidHexCharacter(ch, idx))
-                }
-            }
-
-            modulus += 1;
-            if modulus == 2 {
-                modulus = 0;
-                b.push(buf);
-            }
-        }
-
-        match modulus {
-            0 => Ok(b.into_iter().collect()),
-            _ => Err(InvalidHexLength),
-        }
-    }
-}
-
-impl<'a, T: ?Sized + FromHex> FromHex for &'a T {
-    fn from_hex(&self) -> Result<Vec<u8>, FromHexError> {
-        (**self).from_hex()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use hex::{FromHex, ToHex};
-
-    #[test]
-    pub fn test_to_hex() {
-        assert_eq!("foobar".as_bytes().to_hex(), "666f6f626172");
-    }
-
-    #[test]
-    pub fn test_from_hex_okay() {
-        assert_eq!("666f6f626172".from_hex().unwrap(),
-                   b"foobar");
-        assert_eq!("666F6F626172".from_hex().unwrap(),
-                   b"foobar");
-    }
-
-    #[test]
-    pub fn test_from_hex_odd_len() {
-        assert!("666".from_hex().is_err());
-        assert!("66 6".from_hex().is_err());
-    }
-
-    #[test]
-    pub fn test_from_hex_invalid_char() {
-        assert!("66y6".from_hex().is_err());
-    }
-
-    #[test]
-    pub fn test_from_hex_ignores_whitespace() {
-        assert_eq!("666f 6f6\r\n26172 ".from_hex().unwrap(),
-                   b"foobar");
-    }
-
-    #[test]
-    pub fn test_to_hex_all_bytes() {
-        for i in 0..256 {
-            assert_eq!([i as u8].to_hex(), format!("{:02x}", i));
-        }
-    }
-
-    #[test]
-    pub fn test_from_hex_all_bytes() {
-        for i in 0..256 {
-            let ii: &[u8] = &[i as u8];
-            assert_eq!(format!("{:02x}", i).from_hex().unwrap(),
-                       ii);
-            assert_eq!(format!("{:02X}", i).from_hex().unwrap(),
-                       ii);
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/src/json.rs
+++ /dev/null
@@ -1,3992 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Rust JSON serialization library
-// Copyright (c) 2011 Google Inc.
-
-//! JSON parsing and serialization
-//!
-//! # What is JSON?
-//!
-//! JSON (JavaScript Object Notation) is a way to write data in Javascript.
-//! Like XML, it allows encoding structured data in a text format that can be
-//! easily read by humans. Its simple syntax and native compatibility with
-//! JavaScript have made it a widely used format.
-//!
-//! Data types that can be encoded are JavaScript types (see the `Json` enum
-//! for more details):
-//!
-//! * `I64`: equivalent to rust's `i64`
-//! * `U64`: equivalent to rust's `u64`
-//! * `F64`: equivalent to rust's `f64`
-//! * `Boolean`: equivalent to rust's `bool`
-//! * `String`: equivalent to rust's `String`
-//! * `Array`: equivalent to rust's `Vec<T>`, but also allowing objects of
-//!   different types in the
-//!   same array
-//! * `Object`: equivalent to rust's `BTreeMap<String, json::Json>`
-//! * `Null`
-//!
-//! An object is a series of string keys mapping to values, in `"key": value`
-//! format.  Arrays are enclosed in square brackets ([ ... ]) and objects in
-//! curly brackets ({ ... }).  A simple JSON document encoding a person,
-//! their age, address and phone numbers could look like
-//!
-//! ```ignore
-//! {
-//!     "FirstName": "John",
-//!     "LastName": "Doe",
-//!     "Age": 43,
-//!     "Address": {
-//!         "Street": "Downing Street 10",
-//!         "City": "London",
-//!         "Country": "Great Britain"
-//!     },
-//!     "PhoneNumbers": [
-//!         "+44 1234567",
-//!         "+44 2345678"
-//!     ]
-//! }
-//! ```
-//!
-//! # Rust Type-based Encoding and Decoding
-//!
-//! Rust provides a mechanism for low boilerplate encoding & decoding of values
-//! to and from JSON via the serialization API.  To be able to encode a piece
-//! of data, it must implement the `rustc_serialize::Encodable` trait.  To be
-//! able to decode a piece of data, it must implement the
-//! `rustc_serialize::Decodable` trait.  The Rust compiler provides an
-//! annotation to automatically generate the code for these traits:
-//! `#[derive(RustcDecodable, RustcEncodable)]`
-//!
-//! The JSON API provides an enum `json::Json` and a trait `ToJson` to encode
-//! objects.  The `ToJson` trait provides a `to_json` method to convert an
-//! object into a `json::Json` value.  A `json::Json` value can be encoded as a
-//! string or buffer using the functions described above.  You can also use the
-//! `json::Encoder` object, which implements the `Encoder` trait.
-//!
-//! When using `ToJson`, the `Encodable` trait implementation is not
-//! mandatory.
-//!
-//! # Examples of use
-//!
-//! ## Using Autoserialization
-//!
-//! Create a struct called `TestStruct` and serialize and deserialize it to and
-//! from JSON using the serialization API, using the derived serialization code.
-//!
-//! ```rust
-//! extern crate rustc_serialize;
-//! use rustc_serialize::json;
-//!
-//! // Automatically generate `RustcDecodable` and `RustcEncodable` trait
-//! // implementations
-//! #[derive(RustcDecodable, RustcEncodable)]
-//! pub struct TestStruct  {
-//!     data_int: u8,
-//!     data_str: String,
-//!     data_vector: Vec<u8>,
-//! }
-//!
-//! fn main() {
-//!     let object = TestStruct {
-//!         data_int: 1,
-//!         data_str: "homura".to_string(),
-//!         data_vector: vec![2,3,4,5],
-//!     };
-//!
-//!     // Serialize using `json::encode`
-//!     let encoded = json::encode(&object).unwrap();
-//!
-//!     // Deserialize using `json::decode`
-//!     let decoded: TestStruct = json::decode(&encoded).unwrap();
-//! }
-//! ```
-//!
-//! ## Using the `ToJson` trait
-//!
-//! The examples below use the `ToJson` trait to generate the JSON string,
-//! which is required for custom mappings.
-//!
-//! ### Simple example of `ToJson` usage
-//!
-//! ```rust
-//! extern crate rustc_serialize;
-//! use rustc_serialize::json::{self, ToJson, Json};
-//!
-//! // A custom data structure
-//! struct ComplexNum {
-//!     a: f64,
-//!     b: f64,
-//! }
-//!
-//! // JSON value representation
-//! impl ToJson for ComplexNum {
-//!     fn to_json(&self) -> Json {
-//!         Json::String(format!("{}+{}i", self.a, self.b))
-//!     }
-//! }
-//!
-//! // Only generate `RustcEncodable` trait implementation
-//! #[derive(RustcEncodable)]
-//! pub struct ComplexNumRecord {
-//!     uid: u8,
-//!     dsc: String,
-//!     val: Json,
-//! }
-//!
-//! fn main() {
-//!     let num = ComplexNum { a: 0.0001, b: 12.539 };
-//!     let data: String = json::encode(&ComplexNumRecord{
-//!         uid: 1,
-//!         dsc: "test".to_string(),
-//!         val: num.to_json(),
-//!     }).unwrap();
-//!     println!("data: {}", data);
-//!     // data: {"uid":1,"dsc":"test","val":"0.0001+12.539i"};
-//! }
-//! ```
-//!
-//! ### Verbose example of `ToJson` usage
-//!
-//! ```rust
-//! extern crate rustc_serialize;
-//! use std::collections::BTreeMap;
-//! use rustc_serialize::json::{self, Json, ToJson};
-//!
-//! // Only generate `Decodable` trait implementation
-//! #[derive(RustcDecodable)]
-//! pub struct TestStruct {
-//!     data_int: u8,
-//!     data_str: String,
-//!     data_vector: Vec<u8>,
-//! }
-//!
-//! // Specify encoding method manually
-//! impl ToJson for TestStruct {
-//!     fn to_json(&self) -> Json {
-//!         let mut d = BTreeMap::new();
-//!         // All standard types implement `to_json()`, so use it
-//!         d.insert("data_int".to_string(), self.data_int.to_json());
-//!         d.insert("data_str".to_string(), self.data_str.to_json());
-//!         d.insert("data_vector".to_string(), self.data_vector.to_json());
-//!         Json::Object(d)
-//!     }
-//! }
-//!
-//! fn main() {
-//!     // Serialize using `ToJson`
-//!     let input_data = TestStruct {
-//!         data_int: 1,
-//!         data_str: "madoka".to_string(),
-//!         data_vector: vec![2,3,4,5],
-//!     };
-//!     let json_obj: Json = input_data.to_json();
-//!     let json_str: String = json_obj.to_string();
-//!
-//!     // Deserialize like before
-//!     let decoded: TestStruct = json::decode(&json_str).unwrap();
-//! }
-//! ```
-//!
-//! ## Parsing a `str` to `Json` and reading the result
-//!
-//! ```rust
-//! extern crate rustc_serialize;
-//! use rustc_serialize::json::Json;
-//!
-//! fn main() {
-//!     let data = Json::from_str("{\"foo\": 13, \"bar\": \"baz\"}").unwrap();
-//!     println!("data: {}", data);
-//!     // data: {"bar":"baz","foo":13}
-//!     println!("object? {}", data.is_object());
-//!     // object? true
-//!
-//!     let obj = data.as_object().unwrap();
-//!     let foo = obj.get("foo").unwrap();
-//!
-//!     println!("array? {:?}", foo.as_array());
-//!     // array? None
-//!     println!("u64? {:?}", foo.as_u64());
-//!     // u64? Some(13u64)
-//!
-//!     for (key, value) in obj.iter() {
-//!         println!("{}: {}", key, match *value {
-//!             Json::U64(v) => format!("{} (u64)", v),
-//!             Json::String(ref v) => format!("{} (string)", v),
-//!             _ => format!("other")
-//!         });
-//!     }
-//!     // bar: baz (string)
-//!     // foo: 13 (u64)
-//! }
-//! ```
-//!
-//! # The status of this library
-//!
-//! While this library is the standard way of working with JSON in Rust,
-//! there is a next-generation library called Serde that's in the works (it's
-//! faster, overcomes some design limitations of rustc-serialize and has more
-//! features). You might consider using it when starting a new project or
-//! evaluating Rust JSON performance.
-
-use self::JsonEvent::*;
-use self::ErrorCode::*;
-use self::ParserError::*;
-use self::DecoderError::*;
-use self::ParserState::*;
-use self::InternalStackElement::*;
-
-use std::collections::{HashMap, BTreeMap};
-use std::error::Error as StdError;
-use std::i64;
-use std::io::prelude::*;
-use std::mem::swap;
-use std::ops::Index;
-use std::str::FromStr;
-use std::string;
-use std::{char, f64, fmt, io, str};
-
-use Encodable;
-
-/// Represents a json value
-#[derive(Clone, PartialEq, PartialOrd, Debug)]
-pub enum Json {
-    I64(i64),
-    U64(u64),
-    F64(f64),
-    String(string::String),
-    Boolean(bool),
-    Array(self::Array),
-    Object(self::Object),
-    Null,
-}
-
-pub type Array = Vec<Json>;
-pub type Object = BTreeMap<string::String, Json>;
-
-pub struct PrettyJson<'a> { inner: &'a Json }
-
-pub struct AsJson<'a, T: 'a> { inner: &'a T }
-pub struct AsPrettyJson<'a, T: 'a> { inner: &'a T, indent: Option<u32> }
-
-/// The errors that can arise while parsing a JSON stream.
-#[derive(Clone, Copy, PartialEq)]
-pub enum ErrorCode {
-    InvalidSyntax,
-    InvalidNumber,
-    EOFWhileParsingObject,
-    EOFWhileParsingArray,
-    EOFWhileParsingValue,
-    EOFWhileParsingString,
-    KeyMustBeAString,
-    ExpectedColon,
-    TrailingCharacters,
-    TrailingComma,
-    InvalidEscape,
-    InvalidUnicodeCodePoint,
-    LoneLeadingSurrogateInHexEscape,
-    UnexpectedEndOfHexEscape,
-    UnrecognizedHex,
-    NotFourDigit,
-    ControlCharacterInString,
-    NotUtf8,
-}
-
-#[derive(Debug)]
-pub enum ParserError {
-    /// msg, line, col
-    SyntaxError(ErrorCode, usize, usize),
-    IoError(io::Error),
-}
-
-impl PartialEq for ParserError {
-    fn eq(&self, other: &ParserError) -> bool {
-        match (self, other) {
-            (&SyntaxError(msg0, line0, col0), &SyntaxError(msg1, line1, col1)) =>
-                msg0 == msg1 && line0 == line1 && col0 == col1,
-            (&IoError(_), _) => false,
-            (_, &IoError(_)) => false,
-        }
-    }
-}
-
-// Builder and Parser have the same errors.
-pub type BuilderError = ParserError;
-
-#[derive(PartialEq, Debug)]
-pub enum DecoderError {
-    ParseError(ParserError),
-    ExpectedError(string::String, string::String),
-    MissingFieldError(string::String),
-    UnknownVariantError(string::String),
-    ApplicationError(string::String),
-    EOF,
-}
-
-#[derive(Copy, Debug)]
-pub enum EncoderError {
-    FmtError(fmt::Error),
-    BadHashmapKey,
-}
-
-impl PartialEq for EncoderError {
-    fn eq(&self, other: &EncoderError) -> bool {
-        match (*self, *other) {
-            (EncoderError::FmtError(_), EncoderError::FmtError(_)) => true,
-            (EncoderError::BadHashmapKey, EncoderError::BadHashmapKey) => true,
-            _ => false,
-        }
-    }
-}
-
-impl Clone for EncoderError {
-    fn clone(&self) -> Self { *self }
-}
-
-/// Returns a readable error string for a given error code.
-pub fn error_str(error: ErrorCode) -> &'static str {
-    match error {
-        InvalidSyntax => "invalid syntax",
-        InvalidNumber => "invalid number",
-        EOFWhileParsingObject => "EOF While parsing object",
-        EOFWhileParsingArray => "EOF While parsing array",
-        EOFWhileParsingValue => "EOF While parsing value",
-        EOFWhileParsingString => "EOF While parsing string",
-        KeyMustBeAString => "key must be a string",
-        ExpectedColon => "expected `:`",
-        TrailingCharacters => "trailing characters",
-        TrailingComma => "trailing comma",
-        InvalidEscape => "invalid escape",
-        UnrecognizedHex => "invalid \\u{ esc}ape (unrecognized hex)",
-        NotFourDigit => "invalid \\u{ esc}ape (not four digits)",
-        ControlCharacterInString => "unescaped control character in string",
-        NotUtf8 => "contents not utf-8",
-        InvalidUnicodeCodePoint => "invalid Unicode code point",
-        LoneLeadingSurrogateInHexEscape => "lone leading surrogate in hex escape",
-        UnexpectedEndOfHexEscape => "unexpected end of hex escape",
-    }
-}
-
-/// Shortcut function to decode a JSON `&str` into an object
-pub fn decode<T: ::Decodable>(s: &str) -> DecodeResult<T> {
-    let json = match Json::from_str(s) {
-        Ok(x) => x,
-        Err(e) => return Err(ParseError(e))
-    };
-
-    let mut decoder = Decoder::new(json);
-    ::Decodable::decode(&mut decoder)
-}
-
-/// Shortcut function to encode a `T` into a JSON `String`
-pub fn encode<T: ::Encodable>(object: &T) -> EncodeResult<string::String> {
-    let mut s = String::new();
-    {
-        let mut encoder = Encoder::new(&mut s);
-        try!(object.encode(&mut encoder));
-    }
-    Ok(s)
-}
-
-impl fmt::Debug for ErrorCode {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        error_str(*self).fmt(f)
-    }
-}
-
-impl StdError for DecoderError {
-    fn description(&self) -> &str { "decoder error" }
-    fn cause(&self) -> Option<&StdError> {
-        match *self {
-            DecoderError::ParseError(ref e) => Some(e),
-            _ => None,
-        }
-    }
-}
-
-impl fmt::Display for DecoderError {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Debug::fmt(&self, f)
-    }
-}
-
-impl From<ParserError> for DecoderError {
-    fn from(err: ParserError) -> DecoderError {
-        ParseError(From::from(err))
-    }
-}
-
-impl StdError for ParserError {
-    fn description(&self) -> &str { "failed to parse json" }
-}
-
-impl fmt::Display for ParserError {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Debug::fmt(&self, f)
-    }
-}
-
-impl From<io::Error> for ParserError {
-    fn from(err: io::Error) -> ParserError {
-        IoError(err)
-    }
-}
-
-impl StdError for EncoderError {
-    fn description(&self) -> &str { "encoder error" }
-}
-
-impl fmt::Display for EncoderError {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Debug::fmt(&self, f)
-    }
-}
-
-impl From<fmt::Error> for EncoderError {
-    fn from(err: fmt::Error) -> EncoderError { EncoderError::FmtError(err) }
-}
-
-pub type EncodeResult<T> = Result<T, EncoderError>;
-pub type DecodeResult<T> = Result<T, DecoderError>;
-
-fn escape_str(wr: &mut fmt::Write, v: &str) -> EncodeResult<()> {
-    try!(wr.write_str("\""));
-
-    let mut start = 0;
-
-    for (i, byte) in v.bytes().enumerate() {
-        let escaped = match byte {
-            b'"' => "\\\"",
-            b'\\' => "\\\\",
-            b'\x00' => "\\u0000",
-            b'\x01' => "\\u0001",
-            b'\x02' => "\\u0002",
-            b'\x03' => "\\u0003",
-            b'\x04' => "\\u0004",
-            b'\x05' => "\\u0005",
-            b'\x06' => "\\u0006",
-            b'\x07' => "\\u0007",
-            b'\x08' => "\\b",
-            b'\t' => "\\t",
-            b'\n' => "\\n",
-            b'\x0b' => "\\u000b",
-            b'\x0c' => "\\f",
-            b'\r' => "\\r",
-            b'\x0e' => "\\u000e",
-            b'\x0f' => "\\u000f",
-            b'\x10' => "\\u0010",
-            b'\x11' => "\\u0011",
-            b'\x12' => "\\u0012",
-            b'\x13' => "\\u0013",
-            b'\x14' => "\\u0014",
-            b'\x15' => "\\u0015",
-            b'\x16' => "\\u0016",
-            b'\x17' => "\\u0017",
-            b'\x18' => "\\u0018",
-            b'\x19' => "\\u0019",
-            b'\x1a' => "\\u001a",
-            b'\x1b' => "\\u001b",
-            b'\x1c' => "\\u001c",
-            b'\x1d' => "\\u001d",
-            b'\x1e' => "\\u001e",
-            b'\x1f' => "\\u001f",
-            b'\x7f' => "\\u007f",
-            _ => { continue; }
-        };
-
-        if start < i {
-            try!(wr.write_str(&v[start..i]));
-        }
-
-        try!(wr.write_str(escaped));
-
-        start = i + 1;
-    }
-
-    if start != v.len() {
-        try!(wr.write_str(&v[start..]));
-    }
-
-    try!(wr.write_str("\""));
-    Ok(())
-}
-
-fn escape_char(writer: &mut fmt::Write, v: char) -> EncodeResult<()> {
-    let mut buf = [0; 4];
-    let _ = write!(&mut &mut buf[..], "{}", v);
-    let buf = unsafe { str::from_utf8_unchecked(&buf[..v.len_utf8()]) };
-    escape_str(writer, buf)
-}
-
-fn spaces(wr: &mut fmt::Write, n: u32) -> EncodeResult<()> {
-    let mut n = n as usize;
-    const BUF: &'static str = "                ";
-
-    while n >= BUF.len() {
-        try!(wr.write_str(BUF));
-        n -= BUF.len();
-    }
-
-    if n > 0 {
-        try!(wr.write_str(&BUF[..n]));
-    }
-    Ok(())
-}
-
-fn fmt_number_or_null(v: f64) -> string::String {
-    use std::num::FpCategory::{Nan, Infinite};
-
-    match v.classify() {
-        Nan | Infinite => "null".to_string(),
-        _ => {
-            let s = v.to_string();
-            if s.contains(".") {s} else {s + ".0"}
-        }
-    }
-}
-
-macro_rules! emit_enquoted_if_mapkey {
-    ($enc:ident,$e:expr) => {
-        if $enc.is_emitting_map_key {
-            try!(write!($enc.writer, "\"{}\"", $e));
-            Ok(())
-        } else {
-            try!(write!($enc.writer, "{}", $e));
-            Ok(())
-        }
-    }
-}
-
-enum EncodingFormat {
-    Compact,
-    Pretty {
-        curr_indent: u32,
-        indent: u32
-    }
-}
-
-/// A structure for implementing serialization to JSON.
-pub struct Encoder<'a> {
-    writer: &'a mut (fmt::Write+'a),
-    format : EncodingFormat,
-    is_emitting_map_key: bool,
-}
-
-impl<'a> Encoder<'a> {
-    /// Creates a new encoder whose output will be written in human-readable
-    /// JSON to the specified writer
-    pub fn new_pretty(writer: &'a mut fmt::Write) -> Encoder<'a> {
-        Encoder {
-            writer: writer,
-            format: EncodingFormat::Pretty {
-                curr_indent: 0,
-                indent: 2,
-            },
-            is_emitting_map_key: false,
-        }
-    }
-
-    /// Creates a new encoder whose output will be written in compact
-    /// JSON to the specified writer
-    pub fn new(writer: &'a mut fmt::Write) -> Encoder<'a> {
-        Encoder {
-            writer: writer,
-            format: EncodingFormat::Compact,
-            is_emitting_map_key: false,
-        }
-    }
-
-    /// Set the number of spaces to indent for each level.
-    /// This is safe to set during encoding.
-    pub fn set_indent(&mut self, new_indent: u32) -> Result<(), ()> {
-        if let EncodingFormat::Pretty{ref mut curr_indent, ref mut indent} = self.format {
-            // self.indent very well could be 0 so we need to use checked division.
-            let level = curr_indent.checked_div(*indent).unwrap_or(0);
-            *indent = new_indent;
-            *curr_indent = level * *indent;
-            Ok(())
-        } else {
-            Err(())
-        }
-    }
-}
-
-impl<'a> ::Encoder for Encoder<'a> {
-    type Error = EncoderError;
-
-    fn emit_nil(&mut self) -> EncodeResult<()> {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        try!(write!(self.writer, "null"));
-        Ok(())
-    }
-
-    fn emit_usize(&mut self, v: usize) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) }
-    fn emit_u64(&mut self, v: u64) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) }
-    fn emit_u32(&mut self, v: u32) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) }
-    fn emit_u16(&mut self, v: u16) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) }
-    fn emit_u8(&mut self, v: u8) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) }
-
-    fn emit_isize(&mut self, v: isize) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) }
-    fn emit_i64(&mut self, v: i64) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) }
-    fn emit_i32(&mut self, v: i32) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) }
-    fn emit_i16(&mut self, v: i16) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) }
-    fn emit_i8(&mut self, v: i8) -> EncodeResult<()> { emit_enquoted_if_mapkey!(self, v) }
-
-    fn emit_bool(&mut self, v: bool) -> EncodeResult<()> {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        if v {
-            try!(write!(self.writer, "true"));
-        } else {
-            try!(write!(self.writer, "false"));
-        }
-        Ok(())
-    }
-
-    fn emit_f64(&mut self, v: f64) -> EncodeResult<()> {
-        emit_enquoted_if_mapkey!(self, fmt_number_or_null(v))
-    }
-    fn emit_f32(&mut self, v: f32) -> EncodeResult<()> {
-        self.emit_f64(v as f64)
-    }
-
-    fn emit_char(&mut self, v: char) -> EncodeResult<()> {
-        escape_char(self.writer, v)
-    }
-    fn emit_str(&mut self, v: &str) -> EncodeResult<()> {
-        escape_str(self.writer, v)
-    }
-
-    fn emit_enum<F>(&mut self, _name: &str, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        f(self)
-    }
-
-    fn emit_enum_variant<F>(&mut self,
-                            name: &str,
-                            _id: usize,
-                            cnt: usize,
-                            f: F)
-                            -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        // enums are encoded as strings or objects
-        // Bunny => "Bunny"
-        // Kangaroo(34,"William") => {"variant": "Kangaroo", "fields": [34,"William"]}
-        if cnt == 0 {
-            escape_str(self.writer, name)
-        } else {
-            if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-            if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format {
-                try!(write!(self.writer, "{{\n"));
-                *curr_indent += indent;
-                try!(spaces(self.writer, *curr_indent));
-                try!(write!(self.writer, "\"variant\": "));
-                try!(escape_str(self.writer, name));
-                try!(write!(self.writer, ",\n"));
-                try!(spaces(self.writer, *curr_indent));
-                try!(write!(self.writer, "\"fields\": [\n"));
-                *curr_indent += indent;
-            } else {
-                try!(write!(self.writer, "{{\"variant\":"));
-                try!(escape_str(self.writer, name));
-                try!(write!(self.writer, ",\"fields\":["));
-            }
-            try!(f(self));
-            if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format {
-                *curr_indent -= indent;
-                try!(write!(self.writer, "\n"));
-                try!(spaces(self.writer, *curr_indent));
-                *curr_indent -= indent;
-                try!(write!(self.writer, "]\n"));
-                try!(spaces(self.writer, *curr_indent));
-                try!(write!(self.writer, "}}"));
-            } else {
-                try!(write!(self.writer, "]}}"));
-            }
-            Ok(())
-        }
-    }
-
-    fn emit_enum_variant_arg<F>(&mut self, idx: usize, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        if idx != 0 {
-            try!(write!(self.writer, ","));
-            if let EncodingFormat::Pretty{..} = self.format {
-                try!(write!(self.writer, "\n"));
-            }
-        }
-        if let EncodingFormat::Pretty{curr_indent, ..} = self.format {
-            try!(spaces(self.writer, curr_indent));
-        }
-        f(self)
-    }
-
-    fn emit_enum_struct_variant<F>(&mut self,
-                                   name: &str,
-                                   id: usize,
-                                   cnt: usize,
-                                   f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        self.emit_enum_variant(name, id, cnt, f)
-    }
-
-    fn emit_enum_struct_variant_field<F>(&mut self,
-                                         _: &str,
-                                         idx: usize,
-                                         f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        self.emit_enum_variant_arg(idx, f)
-    }
-
-
-    fn emit_struct<F>(&mut self, _: &str, len: usize, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        if len == 0 {
-            try!(write!(self.writer, "{{}}"));
-        } else {
-            try!(write!(self.writer, "{{"));
-            if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format {
-                *curr_indent += indent;
-            }
-            try!(f(self));
-            if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format {
-                *curr_indent -= indent;
-                try!(write!(self.writer, "\n"));
-                try!(spaces(self.writer, *curr_indent));
-            }
-            try!(write!(self.writer, "}}"));
-        }
-        Ok(())
-    }
-
-    fn emit_struct_field<F>(&mut self, name: &str, idx: usize, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        if idx != 0 {
-            try!(write!(self.writer, ","));
-        }
-        if let EncodingFormat::Pretty{curr_indent, ..} = self.format {
-            try!(write!(self.writer, "\n"));
-            try!(spaces(self.writer, curr_indent));
-        }
-        try!(escape_str(self.writer, name));
-        if let EncodingFormat::Pretty{..} = self.format {
-            try!(write!(self.writer, ": "));
-        } else {
-            try!(write!(self.writer, ":"));
-        }
-        f(self)
-    }
-
-    fn emit_tuple<F>(&mut self, len: usize, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        self.emit_seq(len, f)
-    }
-    fn emit_tuple_arg<F>(&mut self, idx: usize, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        self.emit_seq_elt(idx, f)
-    }
-
-    fn emit_tuple_struct<F>(&mut self, _: &str, len: usize, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        self.emit_seq(len, f)
-    }
-    fn emit_tuple_struct_arg<F>(&mut self, idx: usize, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        self.emit_seq_elt(idx, f)
-    }
-
-    fn emit_option<F>(&mut self, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        f(self)
-    }
-    fn emit_option_none(&mut self) -> EncodeResult<()> {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        self.emit_nil()
-    }
-    fn emit_option_some<F>(&mut self, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        f(self)
-    }
-
-    fn emit_seq<F>(&mut self, len: usize, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        if len == 0 {
-            try!(write!(self.writer, "[]"));
-        } else {
-            try!(write!(self.writer, "["));
-            if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format {
-                *curr_indent += indent;
-            }
-            try!(f(self));
-            if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format {
-                *curr_indent -= indent;
-                try!(write!(self.writer, "\n"));
-                try!(spaces(self.writer, *curr_indent));
-            }
-            try!(write!(self.writer, "]"));
-        }
-        Ok(())
-    }
-
-    fn emit_seq_elt<F>(&mut self, idx: usize, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        if idx != 0 {
-            try!(write!(self.writer, ","));
-        }
-        if let EncodingFormat::Pretty{ref mut curr_indent, ..} = self.format {
-            try!(write!(self.writer, "\n"));
-            try!(spaces(self.writer, *curr_indent));
-        }
-        f(self)
-    }
-
-    fn emit_map<F>(&mut self, len: usize, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        if len == 0 {
-            try!(write!(self.writer, "{{}}"));
-        } else {
-            try!(write!(self.writer, "{{"));
-            if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format {
-                *curr_indent += indent;
-            }
-            try!(f(self));
-            if let EncodingFormat::Pretty{ref mut curr_indent, indent} = self.format {
-                *curr_indent -= indent;
-                try!(write!(self.writer, "\n"));
-                try!(spaces(self.writer, *curr_indent));
-            }
-            try!(write!(self.writer, "}}"));
-        }
-        Ok(())
-    }
-
-    fn emit_map_elt_key<F>(&mut self, idx: usize, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        if idx != 0 {
-            try!(write!(self.writer, ","));
-        }
-        if let EncodingFormat::Pretty{curr_indent, ..} = self.format {
-            try!(write!(self.writer, "\n"));
-            try!(spaces(self.writer, curr_indent));
-        }
-        self.is_emitting_map_key = true;
-        try!(f(self));
-        self.is_emitting_map_key = false;
-        Ok(())
-    }
-
-    fn emit_map_elt_val<F>(&mut self, _idx: usize, f: F) -> EncodeResult<()> where
-        F: FnOnce(&mut Encoder<'a>) -> EncodeResult<()>,
-    {
-        if self.is_emitting_map_key { return Err(EncoderError::BadHashmapKey); }
-        if let EncodingFormat::Pretty{..} = self.format {
-            try!(write!(self.writer, ": "));
-        } else {
-            try!(write!(self.writer, ":"));
-        }
-        f(self)
-    }
-}
-
-impl Encodable for Json {
-    fn encode<S: ::Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
-        match *self {
-            Json::I64(v) => v.encode(e),
-            Json::U64(v) => v.encode(e),
-            Json::F64(v) => v.encode(e),
-            Json::String(ref v) => v.encode(e),
-            Json::Boolean(v) => v.encode(e),
-            Json::Array(ref v) => v.encode(e),
-            Json::Object(ref v) => v.encode(e),
-            Json::Null => e.emit_nil(),
-        }
-    }
-}
-
-/// Create an `AsJson` wrapper which can be used to print a value as JSON
-/// on-the-fly via `write!`
-pub fn as_json<T: Encodable>(t: &T) -> AsJson<T> {
-    AsJson { inner: t }
-}
-
-/// Create an `AsPrettyJson` wrapper which can be used to print a value as JSON
-/// on-the-fly via `write!`
-pub fn as_pretty_json<T: Encodable>(t: &T) -> AsPrettyJson<T> {
-    AsPrettyJson { inner: t, indent: None }
-}
-
-impl Json {
-    /// Decodes a json value from an `&mut io::Read`
-    pub fn from_reader(rdr: &mut io::Read) -> Result<Self, BuilderError> {
-        let contents = {
-            let mut c = Vec::new();
-            try!(rdr.read_to_end(&mut c));
-            c
-        };
-        let s = match str::from_utf8(&contents).ok() {
-            Some(s) => s,
-            _       => return Err(SyntaxError(NotUtf8, 0, 0))
-        };
-        let mut builder = Builder::new(s.chars());
-        builder.build()
-    }
-
-    /// Decodes a json value from a string
-    pub fn from_str(s: &str) -> Result<Self, BuilderError> {
-        let mut builder = Builder::new(s.chars());
-        builder.build()
-    }
-
-    /// Borrow this json object as a pretty object to generate a pretty
-    /// representation for it via `Display`.
-    pub fn pretty(&self) -> PrettyJson {
-        PrettyJson { inner: self }
-    }
-
-     /// If the Json value is an Object, returns the value associated with the provided key.
-    /// Otherwise, returns None.
-    pub fn find<'a>(&'a self, key: &str) -> Option<&'a Json>{
-        match self {
-            &Json::Object(ref map) => map.get(key),
-            _ => None
-        }
-    }
-
-    /// Attempts to get a nested Json Object for each key in `keys`.
-    /// If any key is found not to exist, find_path will return None.
-    /// Otherwise, it will return the Json value associated with the final key.
-    pub fn find_path<'a>(&'a self, keys: &[&str]) -> Option<&'a Json>{
-        let mut target = self;
-        for key in keys.iter() {
-            match target.find(*key) {
-                Some(t) => { target = t; },
-                None => return None
-            }
-        }
-        Some(target)
-    }
-
-    /// If the Json value is an Object, performs a depth-first search until
-    /// a value associated with the provided key is found. If no value is found
-    /// or the Json value is not an Object, returns None.
-    pub fn search<'a>(&'a self, key: &str) -> Option<&'a Json> {
-        match self {
-            &Json::Object(ref map) => {
-                match map.get(key) {
-                    Some(json_value) => Some(json_value),
-                    None => {
-                        for (_, v) in map.iter() {
-                            match v.search(key) {
-                                x if x.is_some() => return x,
-                                _ => ()
-                            }
-                        }
-                        None
-                    }
-                }
-            },
-            _ => None
-        }
-    }
-
-    /// Returns true if the Json value is an Object. Returns false otherwise.
-    pub fn is_object<'a>(&'a self) -> bool {
-        self.as_object().is_some()
-    }
-
-    /// If the Json value is an Object, returns a reference to the associated BTreeMap.
-    /// Returns None otherwise.
-    pub fn as_object<'a>(&'a self) -> Option<&'a Object> {
-        match self {
-            &Json::Object(ref map) => Some(map),
-            _ => None
-        }
-    }
-
-    /// If the Json value is an Object, returns a mutable reference to the associated BTreeMap.
-    /// Returns None otherwise.
-    pub fn as_object_mut<'a>(&'a mut self) -> Option<&'a mut Object> {
-        match self {
-            &mut Json::Object(ref mut map) => Some(map),
-            _ => None
-        }
-    }
-
-    /// If the Json value is an Object, returns the associated BTreeMap.
-    /// Returns None otherwise.
-    pub fn into_object(self) -> Option<Object> {
-        match self {
-            Json::Object(map) => Some(map),
-            _ => None
-        }
-    }
-
-    /// Returns true if the Json value is an Array. Returns false otherwise.
-    pub fn is_array<'a>(&'a self) -> bool {
-        self.as_array().is_some()
-    }
-
-    /// If the Json value is an Array, returns a reference to the associated vector.
-    /// Returns None otherwise.
-    pub fn as_array<'a>(&'a self) -> Option<&'a Array> {
-        match self {
-            &Json::Array(ref array) => Some(&*array),
-            _ => None
-        }
-    }
-
-    /// If the Json value is an Array, returns a mutable reference to the associated vector.
-    /// Returns None otherwise.
-    pub fn as_array_mut<'a>(&'a mut self) -> Option<&'a mut Array> {
-        match self {
-            &mut Json::Array(ref mut list) => Some(list),
-            _ => None
-        }
-    }
-
-    /// If the Json value is an Array, returns the associated vector.
-    /// Returns None otherwise.
-    pub fn into_array(self) -> Option<Array> {
-        match self {
-            Json::Array(array) => Some(array),
-            _ => None
-        }
-    }
-
-    /// Returns true if the Json value is a String. Returns false otherwise.
-    pub fn is_string<'a>(&'a self) -> bool {
-        self.as_string().is_some()
-    }
-
-    /// If the Json value is a String, returns the associated str.
-    /// Returns None otherwise.
-    pub fn as_string<'a>(&'a self) -> Option<&'a str> {
-        match *self {
-            Json::String(ref s) => Some(&s),
-            _ => None
-        }
-    }
-
-    /// Returns true if the Json value is a Number. Returns false otherwise.
-    pub fn is_number(&self) -> bool {
-        match *self {
-            Json::I64(_) | Json::U64(_) | Json::F64(_) => true,
-            _ => false,
-        }
-    }
-
-    /// Returns true if the Json value is a i64. Returns false otherwise.
-    pub fn is_i64(&self) -> bool {
-        match *self {
-            Json::I64(_) => true,
-            _ => false,
-        }
-    }
-
-    /// Returns true if the Json value is a u64. Returns false otherwise.
-    pub fn is_u64(&self) -> bool {
-        match *self {
-            Json::U64(_) => true,
-            _ => false,
-        }
-    }
-
-    /// Returns true if the Json value is a f64. Returns false otherwise.
-    pub fn is_f64(&self) -> bool {
-        match *self {
-            Json::F64(_) => true,
-            _ => false,
-        }
-    }
-
-    /// If the Json value is a number, return or cast it to a i64.
-    /// Returns None otherwise.
-    pub fn as_i64(&self) -> Option<i64> {
-        match *self {
-            Json::I64(n) => Some(n),
-            Json::U64(n) if n >= i64::MAX as u64 => None,
-            Json::U64(n) => Some(n as i64),
-            _ => None
-        }
-    }
-
-    /// If the Json value is a number, return or cast it to a u64.
-    /// Returns None otherwise.
-    pub fn as_u64(&self) -> Option<u64> {
-        match *self {
-            Json::I64(n) if n >= 0 => Some(n as u64),
-            Json::U64(n) => Some(n),
-            _ => None
-        }
-    }
-
-    /// If the Json value is a number, return or cast it to a f64.
-    /// Returns None otherwise.
-    pub fn as_f64(&self) -> Option<f64> {
-        match *self {
-            Json::I64(n) => Some(n as f64),
-            Json::U64(n) => Some(n as f64),
-            Json::F64(n) => Some(n),
-            _ => None
-        }
-    }
-
-    /// Returns true if the Json value is a Boolean. Returns false otherwise.
-    pub fn is_boolean(&self) -> bool {
-        self.as_boolean().is_some()
-    }
-
-    /// If the Json value is a Boolean, returns the associated bool.
-    /// Returns None otherwise.
-    pub fn as_boolean(&self) -> Option<bool> {
-        match self {
-            &Json::Boolean(b) => Some(b),
-            _ => None
-        }
-    }
-
-    /// Returns true if the Json value is a Null. Returns false otherwise.
-    pub fn is_null(&self) -> bool {
-        self.as_null().is_some()
-    }
-
-    /// If the Json value is a Null, returns ().
-    /// Returns None otherwise.
-    pub fn as_null(&self) -> Option<()> {
-        match self {
-            &Json::Null => Some(()),
-            _ => None
-        }
-    }
-}
-
-impl<'a> Index<&'a str>  for Json {
-    type Output = Json;
-
-    fn index(&self, idx: &str) -> &Json {
-        self.find(idx).unwrap()
-    }
-}
-
-impl Index<usize> for Json {
-    type Output = Json;
-
-    fn index<'a>(&'a self, idx: usize) -> &'a Json {
-        match self {
-            &Json::Array(ref v) => &v[idx],
-            _ => panic!("can only index Json with usize if it is an array")
-        }
-    }
-}
-
-/// The output of the streaming parser.
-#[derive(PartialEq, Debug)]
-pub enum JsonEvent {
-    ObjectStart,
-    ObjectEnd,
-    ArrayStart,
-    ArrayEnd,
-    BooleanValue(bool),
-    I64Value(i64),
-    U64Value(u64),
-    F64Value(f64),
-    StringValue(string::String),
-    NullValue,
-    Error(ParserError),
-}
-
-#[derive(PartialEq, Debug)]
-enum ParserState {
-    // Parse a value in an array, true means first element.
-    ParseArray(bool),
-    // Parse ',' or ']' after an element in an array.
-    ParseArrayComma,
-    // Parse a key:value in an object, true means first element.
-    ParseObject(bool),
-    // Parse ',' or ']' after an element in an object.
-    ParseObjectComma,
-    // Initial state.
-    ParseStart,
-    // Expecting the stream to end.
-    ParseBeforeFinish,
-    // Parsing can't continue.
-    ParseFinished,
-}
-
-/// A Stack represents the current position of the parser in the logical
-/// structure of the JSON stream.
-/// For example foo.bar[3].x
-pub struct Stack {
-    stack: Vec<InternalStackElement>,
-    str_buffer: Vec<u8>,
-}
-
-/// StackElements compose a Stack.
-/// For example, Key("foo"), Key("bar"), Index(3) and Key("x") are the
-/// StackElements compositing the stack that represents foo.bar[3].x
-#[derive(PartialEq, Clone, Debug)]
-pub enum StackElement<'l> {
-    Index(u32),
-    Key(&'l str),
-}
-
-// Internally, Key elements are stored as indices in a buffer to avoid
-// allocating a string for every member of an object.
-#[derive(PartialEq, Clone, Debug)]
-enum InternalStackElement {
-    InternalIndex(u32),
-    InternalKey(u16, u16), // start, size
-}
-
-impl Stack {
-    pub fn new() -> Stack {
-        Stack { stack: Vec::new(), str_buffer: Vec::new() }
-    }
-
-    /// Returns The number of elements in the Stack.
-    pub fn len(&self) -> usize { self.stack.len() }
-
-    /// Returns true if the stack is empty.
-    pub fn is_empty(&self) -> bool { self.stack.is_empty() }
-
-    /// Provides access to the StackElement at a given index.
-    /// lower indices are at the bottom of the stack while higher indices are
-    /// at the top.
-    pub fn get<'l>(&'l self, idx: usize) -> StackElement<'l> {
-        match self.stack[idx] {
-            InternalIndex(i) => StackElement::Index(i),
-            InternalKey(start, size) => {
-                StackElement::Key(str::from_utf8(
-                    &self.str_buffer[start as usize .. start as usize + size as usize]).unwrap())
-            }
-        }
-    }
-
-    /// Compares this stack with an array of StackElements.
-    pub fn is_equal_to(&self, rhs: &[StackElement]) -> bool {
-        if self.stack.len() != rhs.len() { return false; }
-        for i in 0..rhs.len() {
-            if self.get(i) != rhs[i] { return false; }
-        }
-        return true;
-    }
-
-    /// Returns true if the bottom-most elements of this stack are the same as
-    /// the ones passed as parameter.
-    pub fn starts_with(&self, rhs: &[StackElement]) -> bool {
-        if self.stack.len() < rhs.len() { return false; }
-        for i in 0..rhs.len() {
-            if self.get(i) != rhs[i] { return false; }
-        }
-        return true;
-    }
-
-    /// Returns true if the top-most elements of this stack are the same as
-    /// the ones passed as parameter.
-    pub fn ends_with(&self, rhs: &[StackElement]) -> bool {
-        if self.stack.len() < rhs.len() { return false; }
-        let offset = self.stack.len() - rhs.len();
-        for i in 0..rhs.len() {
-            if self.get(i + offset) != rhs[i] { return false; }
-        }
-        return true;
-    }
-
-    /// Returns the top-most element (if any).
-    pub fn top<'l>(&'l self) -> Option<StackElement<'l>> {
-        return match self.stack.last() {
-            None => None,
-            Some(&InternalIndex(i)) => Some(StackElement::Index(i)),
-            Some(&InternalKey(start, size)) => {
-                Some(StackElement::Key(str::from_utf8(
-                    &self.str_buffer[start as usize .. (start+size) as usize]
-                ).unwrap()))
-            }
-        }
-    }
-
-    // Used by Parser to insert Key elements at the top of the stack.
-    fn push_key(&mut self, key: string::String) {
-        self.stack.push(InternalKey(self.str_buffer.len() as u16, key.len() as u16));
-        for c in key.as_bytes().iter() {
-            self.str_buffer.push(*c);
-        }
-    }
-
-    // Used by Parser to insert Index elements at the top of the stack.
-    fn push_index(&mut self, index: u32) {
-        self.stack.push(InternalIndex(index));
-    }
-
-    // Used by Parser to remove the top-most element of the stack.
-    fn pop(&mut self) {
-        assert!(!self.is_empty());
-        match *self.stack.last().unwrap() {
-            InternalKey(_, sz) => {
-                let new_size = self.str_buffer.len() - sz as usize;
-                self.str_buffer.truncate(new_size);
-            }
-            InternalIndex(_) => {}
-        }
-        self.stack.pop();
-    }
-
-    // Used by Parser to test whether the top-most element is an index.
-    fn last_is_index(&self) -> bool {
-        if self.is_empty() { return false; }
-        return match *self.stack.last().unwrap() {
-            InternalIndex(_) => true,
-            _ => false,
-        }
-    }
-
-    // Used by Parser to increment the index of the top-most element.
-    fn bump_index(&mut self) {
-        let len = self.stack.len();
-        let idx = match *self.stack.last().unwrap() {
-            InternalIndex(i) => { i + 1 }
-            _ => { panic!(); }
-        };
-        self.stack[len - 1] = InternalIndex(idx);
-    }
-}
-
-/// A streaming JSON parser implemented as an iterator of JsonEvent, consuming
-/// an iterator of char.
-pub struct Parser<T> {
-    rdr: T,
-    ch: Option<char>,
-    line: usize,
-    col: usize,
-    // We maintain a stack representing where we are in the logical structure
-    // of the JSON stream.
-    stack: Stack,
-    // A state machine is kept to make it possible to interrupt and resume parsing.
-    state: ParserState,
-}
-
-impl<T: Iterator<Item = char>> Iterator for Parser<T> {
-    type Item = JsonEvent;
-
-    fn next(&mut self) -> Option<JsonEvent> {
-        if self.state == ParseFinished {
-            return None;
-        }
-
-        if self.state == ParseBeforeFinish {
-            self.parse_whitespace();
-            // Make sure there is no trailing characters.
-            if self.eof() {
-                self.state = ParseFinished;
-                return None;
-            } else {
-                return Some(self.error_event(TrailingCharacters));
-            }
-        }
-
-        return Some(self.parse());
-    }
-}
-
-impl<T: Iterator<Item = char>> Parser<T> {
-    /// Creates the JSON parser.
-    pub fn new(rdr: T) -> Parser<T> {
-        let mut p = Parser {
-            rdr: rdr,
-            ch: Some('\x00'),
-            line: 1,
-            col: 0,
-            stack: Stack::new(),
-            state: ParseStart,
-        };
-        p.bump();
-        return p;
-    }
-
-    /// Provides access to the current position in the logical structure of the
-    /// JSON stream.
-    pub fn stack<'l>(&'l self) -> &'l Stack {
-        return &self.stack;
-    }
-
-    fn eof(&self) -> bool { self.ch.is_none() }
-    fn ch_or_null(&self) -> char { self.ch.unwrap_or('\x00') }
-    fn bump(&mut self) {
-        self.ch = self.rdr.next();
-
-        if self.ch_is('\n') {
-            self.line += 1;
-            self.col = 1;
-        } else {
-            self.col += 1;
-        }
-    }
-
-    fn next_char(&mut self) -> Option<char> {
-        self.bump();
-        self.ch
-    }
-    fn ch_is(&self, c: char) -> bool {
-        self.ch == Some(c)
-    }
-
-    fn error<E>(&self, reason: ErrorCode) -> Result<E, ParserError> {
-        Err(SyntaxError(reason, self.line, self.col))
-    }
-
-    fn parse_whitespace(&mut self) {
-        while self.ch_is(' ') ||
-              self.ch_is('\n') ||
-              self.ch_is('\t') ||
-              self.ch_is('\r') { self.bump(); }
-    }
-
-    fn parse_number(&mut self) -> JsonEvent {
-        let mut neg = false;
-
-        if self.ch_is('-') {
-            self.bump();
-            neg = true;
-        }
-
-        let res = match self.parse_u64() {
-            Ok(res) => res,
-            Err(e) => { return Error(e); }
-        };
-
-        if self.ch_is('.') || self.ch_is('e') || self.ch_is('E') {
-            let mut res = res as f64;
-
-            if self.ch_is('.') {
-                res = match self.parse_decimal(res) {
-                    Ok(res) => res,
-                    Err(e) => { return Error(e); }
-                };
-            }
-
-            if self.ch_is('e') || self.ch_is('E') {
-                res = match self.parse_exponent(res) {
-                    Ok(res) => res,
-                    Err(e) => { return Error(e); }
-                };
-            }
-
-            if neg {
-                res *= -1.0;
-            }
-
-            F64Value(res)
-        } else {
-            if neg {
-                // Make sure we don't underflow.
-                if res > (i64::MAX as u64) + 1 {
-                    Error(SyntaxError(InvalidNumber, self.line, self.col))
-                } else if res == 0 {
-                    I64Value(res as i64)
-                } else {
-                    I64Value((!res + 1) as i64)
-                }
-            } else {
-                U64Value(res)
-            }
-        }
-    }
-
-    fn parse_u64(&mut self) -> Result<u64, ParserError> {
-        let mut accum: u64 = 0;
-
-        match self.ch_or_null() {
-            '0' => {
-                self.bump();
-
-                // A leading '0' must be the only digit before the decimal point.
-                match self.ch_or_null() {
-                    '0' ... '9' => return self.error(InvalidNumber),
-                    _ => ()
-                }
-            },
-            '1' ... '9' => {
-                while !self.eof() {
-                    match self.ch_or_null() {
-                        c @ '0' ... '9' => {
-                            macro_rules! try_or_invalid {
-                                ($e: expr) => {
-                                    match $e {
-                                        Some(v) => v,
-                                        None => return self.error(InvalidNumber)
-                                    }
-                                }
-                            }
-                            accum = try_or_invalid!(accum.checked_mul(10));
-                            accum = try_or_invalid!(accum.checked_add((c as u64) - ('0' as u64)));
-
-                            self.bump();
-                        }
-                        _ => break,
-                    }
-                }
-            }
-            _ => return self.error(InvalidNumber),
-        }
-
-        Ok(accum)
-    }
-
-    fn parse_decimal(&mut self, mut res: f64) -> Result<f64, ParserError> {
-        self.bump();
-
-        // Make sure a digit follows the decimal place.
-        match self.ch_or_null() {
-            '0' ... '9' => (),
-             _ => return self.error(InvalidNumber)
-        }
-
-        let mut dec = 1.0;
-        while !self.eof() {
-            match self.ch_or_null() {
-                c @ '0' ... '9' => {
-                    dec /= 10.0;
-                    res += (((c as isize) - ('0' as isize)) as f64) * dec;
-                    self.bump();
-                }
-                _ => break,
-            }
-        }
-
-        Ok(res)
-    }
-
-    fn parse_exponent(&mut self, mut res: f64) -> Result<f64, ParserError> {
-        self.bump();
-
-        let mut exp = 0;
-        let mut neg_exp = false;
-
-        if self.ch_is('+') {
-            self.bump();
-        } else if self.ch_is('-') {
-            self.bump();
-            neg_exp = true;
-        }
-
-        // Make sure a digit follows the exponent place.
-        match self.ch_or_null() {
-            '0' ... '9' => (),
-            _ => return self.error(InvalidNumber)
-        }
-        while !self.eof() {
-            match self.ch_or_null() {
-                c @ '0' ... '9' => {
-                    exp *= 10;
-                    exp += (c as usize) - ('0' as usize);
-
-                    self.bump();
-                }
-                _ => break
-            }
-        }
-
-        let exp = 10_f64.powi(exp as i32);
-        if neg_exp {
-            res /= exp;
-        } else {
-            res *= exp;
-        }
-
-        Ok(res)
-    }
-
-    fn decode_hex_escape(&mut self) -> Result<u16, ParserError> {
-        let mut i = 0;
-        let mut n = 0;
-        while i < 4 {
-            self.bump();
-            n = match self.ch_or_null() {
-                c @ '0' ... '9' => n * 16 + ((c as u16) - ('0' as u16)),
-                c @ 'a' ... 'f' => n * 16 + (10 + (c as u16) - ('a' as u16)),
-                c @ 'A' ... 'F' => n * 16 + (10 + (c as u16) - ('A' as u16)),
-                _ => return self.error(InvalidEscape)
-            };
-
-            i += 1;
-        }
-
-        Ok(n)
-    }
-
-    fn parse_str(&mut self) -> Result<string::String, ParserError> {
-        let mut escape = false;
-        let mut res = string::String::new();
-
-        loop {
-            self.bump();
-            if self.eof() {
-                return self.error(EOFWhileParsingString);
-            }
-
-            if escape {
-                match self.ch_or_null() {
-                    '"' => res.push('"'),
-                    '\\' => res.push('\\'),
-                    '/' => res.push('/'),
-                    'b' => res.push('\x08'),
-                    'f' => res.push('\x0c'),
-                    'n' => res.push('\n'),
-                    'r' => res.push('\r'),
-                    't' => res.push('\t'),
-                    'u' => match try!(self.decode_hex_escape()) {
-                        0xDC00 ... 0xDFFF => {
-                            return self.error(LoneLeadingSurrogateInHexEscape)
-                        }
-
-                        // Non-BMP characters are encoded as a sequence of
-                        // two hex escapes, representing UTF-16 surrogates.
-                        n1 @ 0xD800 ... 0xDBFF => {
-                            match (self.next_char(), self.next_char()) {
-                                (Some('\\'), Some('u')) => (),
-                                _ => return self.error(UnexpectedEndOfHexEscape),
-                            }
-
-                            let n2 = try!(self.decode_hex_escape());
-                            if n2 < 0xDC00 || n2 > 0xDFFF {
-                                return self.error(LoneLeadingSurrogateInHexEscape)
-                            }
-                            let c = (((n1 - 0xD800) as u32) << 10 |
-                                     (n2 - 0xDC00) as u32) + 0x1_0000;
-                            res.push(char::from_u32(c).unwrap());
-                        }
-
-                        n => match char::from_u32(n as u32) {
-                            Some(c) => res.push(c),
-                            None => return self.error(InvalidUnicodeCodePoint),
-                        },
-                    },
-                    _ => return self.error(InvalidEscape),
-                }
-                escape = false;
-            } else if self.ch_is('\\') {
-                escape = true;
-            } else {
-                match self.ch {
-                    Some('"') => {
-                        self.bump();
-                        return Ok(res);
-                    },
-                    Some(c) if c <= '\u{1F}' =>
-                        return self.error(ControlCharacterInString),
-                    Some(c) => res.push(c),
-                    None => unreachable!()
-                }
-            }
-        }
-    }
-
-    // Invoked at each iteration, consumes the stream until it has enough
-    // information to return a JsonEvent.
-    // Manages an internal state so that parsing can be interrupted and resumed.
-    // Also keeps track of the position in the logical structure of the json
-    // stream int the form of a stack that can be queried by the user using the
-    // stack() method.
-    fn parse(&mut self) -> JsonEvent {
-        loop {
-            // The only paths where the loop can spin a new iteration
-            // are in the cases ParseArrayComma and ParseObjectComma if ','
-            // is parsed. In these cases the state is set to (respectively)
-            // ParseArray(false) and ParseObject(false), which always return,
-            // so there is no risk of getting stuck in an infinite loop.
-            // All other paths return before the end of the loop's iteration.
-            self.parse_whitespace();
-
-            match self.state {
-                ParseStart => {
-                    return self.parse_start();
-                }
-                ParseArray(first) => {
-                    return self.parse_array(first);
-                }
-                ParseArrayComma => {
-                    match self.parse_array_comma_or_end() {
-                        Some(evt) => { return evt; }
-                        None => {}
-                    }
-                }
-                ParseObject(first) => {
-                    return self.parse_object(first);
-                }
-                ParseObjectComma => {
-                    self.stack.pop();
-                    if self.ch_is(',') {
-                        self.state = ParseObject(false);
-                        self.bump();
-                    } else {
-                        return self.parse_object_end();
-                    }
-                }
-                _ => {
-                    return self.error_event(InvalidSyntax);
-                }
-            }
-        }
-    }
-
-    fn parse_start(&mut self) -> JsonEvent {
-        let val = self.parse_value();
-        self.state = match val {
-            Error(_) => ParseFinished,
-            ArrayStart => ParseArray(true),
-            ObjectStart => ParseObject(true),
-            _ => ParseBeforeFinish,
-        };
-        return val;
-    }
-
-    fn parse_array(&mut self, first: bool) -> JsonEvent {
-        if self.ch_is(']') {
-            if !first {
-                self.error_event(InvalidSyntax)
-            } else {
-                self.state = if self.stack.is_empty() {
-                    ParseBeforeFinish
-                } else if self.stack.last_is_index() {
-                    ParseArrayComma
-                } else {
-                    ParseObjectComma
-                };
-                self.bump();
-                ArrayEnd
-            }
-        } else {
-            if first {
-                self.stack.push_index(0);
-            }
-            let val = self.parse_value();
-            self.state = match val {
-                Error(_) => ParseFinished,
-                ArrayStart => ParseArray(true),
-                ObjectStart => ParseObject(true),
-                _ => ParseArrayComma,
-            };
-            val
-        }
-    }
-
-    fn parse_array_comma_or_end(&mut self) -> Option<JsonEvent> {
-        if self.ch_is(',') {
-            self.stack.bump_index();
-            self.state = ParseArray(false);
-            self.bump();
-            None
-        } else if self.ch_is(']') {
-            self.stack.pop();
-            self.state = if self.stack.is_empty() {
-                ParseBeforeFinish
-            } else if self.stack.last_is_index() {
-                ParseArrayComma
-            } else {
-                ParseObjectComma
-            };
-            self.bump();
-            Some(ArrayEnd)
-        } else if self.eof() {
-            Some(self.error_event(EOFWhileParsingArray))
-        } else {
-            Some(self.error_event(InvalidSyntax))
-        }
-    }
-
-    fn parse_object(&mut self, first: bool) -> JsonEvent {
-        if self.ch_is('}') {
-            if !first {
-                if self.stack.is_empty() {
-                    return self.error_event(TrailingComma);
-                } else {
-                    self.stack.pop();
-                }
-            }
-            self.state = if self.stack.is_empty() {
-                ParseBeforeFinish
-            } else if self.stack.last_is_index() {
-                ParseArrayComma
-            } else {
-                ParseObjectComma
-            };
-            self.bump();
-            return ObjectEnd;
-        }
-        if self.eof() {
-            return self.error_event(EOFWhileParsingObject);
-        }
-        if !self.ch_is('"') {
-            return self.error_event(KeyMustBeAString);
-        }
-        let s = match self.parse_str() {
-            Ok(s) => s,
-            Err(e) => {
-                self.state = ParseFinished;
-                return Error(e);
-            }
-        };
-        self.parse_whitespace();
-        if self.eof() {
-            return self.error_event(EOFWhileParsingObject);
-        } else if self.ch_or_null() != ':' {
-            return self.error_event(ExpectedColon);
-        }
-        self.stack.push_key(s);
-        self.bump();
-        self.parse_whitespace();
-
-        let val = self.parse_value();
-
-        self.state = match val {
-            Error(_) => ParseFinished,
-            ArrayStart => ParseArray(true),
-            ObjectStart => ParseObject(true),
-            _ => ParseObjectComma,
-        };
-        return val;
-    }
-
-    fn parse_object_end(&mut self) -> JsonEvent {
-        if self.ch_is('}') {
-            self.state = if self.stack.is_empty() {
-                ParseBeforeFinish
-            } else if self.stack.last_is_index() {
-                ParseArrayComma
-            } else {
-                ParseObjectComma
-            };
-            self.bump();
-            ObjectEnd
-        } else if self.eof() {
-            self.error_event(EOFWhileParsingObject)
-        } else {
-            self.error_event(InvalidSyntax)
-        }
-    }
-
-    fn parse_value(&mut self) -> JsonEvent {
-        if self.eof() { return self.error_event(EOFWhileParsingValue); }
-        match self.ch_or_null() {
-            'n' => { self.parse_ident("ull", NullValue) }
-            't' => { self.parse_ident("rue", BooleanValue(true)) }
-            'f' => { self.parse_ident("alse", BooleanValue(false)) }
-            '0' ... '9' | '-' => self.parse_number(),
-            '"' => match self.parse_str() {
-                Ok(s) => StringValue(s),
-                Err(e) => Error(e),
-            },
-            '[' => {
-                self.bump();
-                ArrayStart
-            }
-            '{' => {
-                self.bump();
-                ObjectStart
-            }
-            _ => { self.error_event(InvalidSyntax) }
-        }
-    }
-
-    fn parse_ident(&mut self, ident: &str, value: JsonEvent) -> JsonEvent {
-        if ident.chars().all(|c| Some(c) == self.next_char()) {
-            self.bump();
-            value
-        } else {
-            Error(SyntaxError(InvalidSyntax, self.line, self.col))
-        }
-    }
-
-    fn error_event(&mut self, reason: ErrorCode) -> JsonEvent {
-        self.state = ParseFinished;
-        Error(SyntaxError(reason, self.line, self.col))
-    }
-}
-
-/// A Builder consumes a json::Parser to create a generic Json structure.
-pub struct Builder<T> {
-    parser: Parser<T>,
-    token: Option<JsonEvent>,
-}
-
-impl<T: Iterator<Item = char>> Builder<T> {
-    /// Create a JSON Builder.
-    pub fn new(src: T) -> Builder<T> {
-        Builder { parser: Parser::new(src), token: None, }
-    }
-
-    // Decode a Json value from a Parser.
-    pub fn build(&mut self) -> Result<Json, BuilderError> {
-        self.bump();
-        let result = self.build_value();
-        self.bump();
-        match self.token.take() {
-            None => {}
-            Some(Error(e)) => { return Err(e); }
-            _ => { return Err(SyntaxError(InvalidSyntax, self.parser.line, self.parser.col)); }
-        }
-        result
-    }
-
-    fn bump(&mut self) {
-        self.token = self.parser.next();
-    }
-
-    fn build_value(&mut self) -> Result<Json, BuilderError> {
-        return match self.token.take() {
-            Some(NullValue) => Ok(Json::Null),
-            Some(I64Value(n)) => Ok(Json::I64(n)),
-            Some(U64Value(n)) => Ok(Json::U64(n)),
-            Some(F64Value(n)) => Ok(Json::F64(n)),
-            Some(BooleanValue(b)) => Ok(Json::Boolean(b)),
-            Some(StringValue(ref mut s)) => {
-                let mut temp = string::String::new();
-                swap(s, &mut temp);
-                Ok(Json::String(temp))
-            }
-            Some(Error(e)) => Err(e),
-            Some(ArrayStart) => self.build_array(),
-            Some(ObjectStart) => self.build_object(),
-            Some(ObjectEnd) => self.parser.error(InvalidSyntax),
-            Some(ArrayEnd) => self.parser.error(InvalidSyntax),
-            None => self.parser.error(EOFWhileParsingValue),
-        }
-    }
-
-    fn build_array(&mut self) -> Result<Json, BuilderError> {
-        self.bump();
-        let mut values = Vec::new();
-
-        loop {
-            if let Some(ArrayEnd) = self.token {
-                return Ok(Json::Array(values.into_iter().collect()));
-            }
-            match self.build_value() {
-                Ok(v) => values.push(v),
-                Err(e) => { return Err(e) }
-            }
-            self.bump();
-        }
-    }
-
-    fn build_object(&mut self) -> Result<Json, BuilderError> {
-        self.bump();
-
-        let mut values = BTreeMap::new();
-
-        loop {
-            match self.token.take() {
-                Some(ObjectEnd) => { return Ok(Json::Object(values)); }
-                Some(Error(e)) => { return Err(e); }
-                None => { break; }
-                token => { self.token = token; }
-            }
-            let key = match self.parser.stack().top() {
-                Some(StackElement::Key(k)) => { k.to_string() }
-                _ => { panic!("invalid state"); }
-            };
-            match self.build_value() {
-                Ok(value) => { values.insert(key, value); }
-                Err(e) => { return Err(e); }
-            }
-            self.bump();
-        }
-        return self.parser.error(EOFWhileParsingObject);
-    }
-}
-
-/// A structure to decode JSON to values in rust.
-pub struct Decoder {
-    stack: Vec<Json>,
-}
-
-impl Decoder {
-    /// Creates a new decoder instance for decoding the specified JSON value.
-    pub fn new(json: Json) -> Decoder {
-        Decoder { stack: vec![json] }
-    }
-}
-
-impl Decoder {
-    fn pop(&mut self) -> DecodeResult<Json> {
-        match self.stack.pop() {
-            Some(s) => Ok(s),
-            None => Err(EOF),
-        }
-    }
-}
-
-macro_rules! expect {
-    ($e:expr, Null) => ({
-        match try!($e) {
-            Json::Null => Ok(()),
-            other => Err(ExpectedError("Null".to_string(),
-                                       format!("{}", other)))
-        }
-    });
-    ($e:expr, $t:ident) => ({
-        match try!($e) {
-            Json::$t(v) => Ok(v),
-            other => {
-                Err(ExpectedError(stringify!($t).to_string(),
-                                  format!("{}", other)))
-            }
-        }
-    })
-}
-
-macro_rules! read_primitive {
-    ($name:ident, $ty:ident) => {
-        #[allow(unused_comparisons)]
-        fn $name(&mut self) -> DecodeResult<$ty> {
-            match try!(self.pop()) {
-                Json::I64(i) => {
-                    let other = i as $ty;
-                    if i == other as i64 && (other > 0) == (i > 0) {
-                        Ok(other)
-                    } else {
-                        Err(ExpectedError("Number".to_string(), i.to_string()))
-                    }
-                }
-                Json::U64(u) => {
-                    let other = u as $ty;
-                    if u == other as u64 && other >= 0 {
-                        Ok(other)
-                    } else {
-                        Err(ExpectedError("Number".to_string(), u.to_string()))
-                    }
-                }
-                Json::F64(f) => {
-                    Err(ExpectedError("Integer".to_string(), f.to_string()))
-                }
-                // re: #12967.. a type w/ numeric keys (ie HashMap<usize, V> etc)
-                // is going to have a string here, as per JSON spec.
-                Json::String(s) => match s.parse() {
-                    Ok(f)  => Ok(f),
-                    Err(_) => Err(ExpectedError("Number".to_string(), s)),
-                },
-                value => {
-                    Err(ExpectedError("Number".to_string(), value.to_string()))
-                }
-            }
-        }
-    }
-}
-
-impl ::Decoder for Decoder {
-    type Error = DecoderError;
-
-    fn read_nil(&mut self) -> DecodeResult<()> {
-        expect!(self.pop(), Null)
-    }
-
-    read_primitive! { read_usize, usize }
-    read_primitive! { read_u8, u8 }
-    read_primitive! { read_u16, u16 }
-    read_primitive! { read_u32, u32 }
-    read_primitive! { read_u64, u64 }
-    read_primitive! { read_isize, isize }
-    read_primitive! { read_i8, i8 }
-    read_primitive! { read_i16, i16 }
-    read_primitive! { read_i32, i32 }
-    read_primitive! { read_i64, i64 }
-
-    fn read_f32(&mut self) -> DecodeResult<f32> {
-        self.read_f64().map(|x| x as f32)
-    }
-
-    fn read_f64(&mut self) -> DecodeResult<f64> {
-        match try!(self.pop()) {
-            Json::I64(f) => Ok(f as f64),
-            Json::U64(f) => Ok(f as f64),
-            Json::F64(f) => Ok(f),
-            Json::String(s) => {
-                // re: #12967.. a type w/ numeric keys (ie HashMap<usize, V> etc)
-                // is going to have a string here, as per JSON spec.
-                match s.parse() {
-                    Ok(f)  => Ok(f),
-                    Err(_) => Err(ExpectedError("Number".to_string(), s)),
-                }
-            },
-            Json::Null => Ok(f64::NAN),
-            value => Err(ExpectedError("Number".to_string(), format!("{}", value)))
-        }
-    }
-
-    fn read_bool(&mut self) -> DecodeResult<bool> {
-        expect!(self.pop(), Boolean)
-    }
-
-    fn read_char(&mut self) -> DecodeResult<char> {
-        let s = try!(self.read_str());
-        {
-            let mut it = s.chars();
-            match (it.next(), it.next()) {
-                // exactly one character
-                (Some(c), None) => return Ok(c),
-                _ => ()
-            }
-        }
-        Err(ExpectedError("single character string".to_string(), format!("{}", s)))
-    }
-
-    fn read_str(&mut self) -> DecodeResult<string::String> {
-        expect!(self.pop(), String)
-    }
-
-    fn read_enum<T, F>(&mut self, _name: &str, f: F) -> DecodeResult<T> where
-        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
-    {
-        f(self)
-    }
-
-    fn read_enum_variant<T, F>(&mut self, names: &[&str],
-                               mut f: F) -> DecodeResult<T>
-        where F: FnMut(&mut Decoder, usize) -> DecodeResult<T>,
-    {
-        let name = match try!(self.pop()) {
-            Json::String(s) => s,
-            Json::Object(mut o) => {
-                let n = match o.remove(&"variant".to_string()) {
-                    Some(Json::String(s)) => s,
-                    Some(val) => {
-                        return Err(ExpectedError("String".to_string(), format!("{}", val)))
-                    }
-                    None => {
-                        return Err(MissingFieldError("variant".to_string()))
-                    }
-                };
-                match o.remove(&"fields".to_string()) {
-                    Some(Json::Array(l)) => {
-                        for field in l.into_iter().rev() {
-                            self.stack.push(field);
-                        }
-                    },
-                    Some(val) => {
-                        return Err(ExpectedError("Array".to_string(), format!("{}", val)))
-                    }
-                    None => {
-                        return Err(MissingFieldError("fields".to_string()))
-                    }
-                }
-                n
-            }
-            json => {
-                return Err(ExpectedError("String or Object".to_string(), format!("{}", json)))
-            }
-        };
-        let idx = match names.iter().position(|n| *n == name) {
-            Some(idx) => idx,
-            None => return Err(UnknownVariantError(name))
-        };
-        f(self, idx)
-    }
-
-    fn read_enum_variant_arg<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where
-        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
-    {
-        f(self)
-    }
-
-    fn read_enum_struct_variant<T, F>(&mut self, names: &[&str], f: F) -> DecodeResult<T> where
-        F: FnMut(&mut Decoder, usize) -> DecodeResult<T>,
-    {
-        self.read_enum_variant(names, f)
-    }
-
-
-    fn read_enum_struct_variant_field<T, F>(&mut self,
-                                         _name: &str,
-                                         idx: usize,
-                                         f: F)
-                                         -> DecodeResult<T> where
-        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
-    {
-        self.read_enum_variant_arg(idx, f)
-    }
-
-    fn read_struct<T, F>(&mut self, _name: &str, _len: usize, f: F) -> DecodeResult<T> where
-        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
-    {
-        let value = try!(f(self));
-        try!(self.pop());
-        Ok(value)
-    }
-
-    fn read_struct_field<T, F>(&mut self,
-                               name: &str,
-                               _idx: usize,
-                               f: F)
-                               -> DecodeResult<T> where
-        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
-    {
-        let mut obj = try!(expect!(self.pop(), Object));
-
-        let value = match obj.remove(&name.to_string()) {
-            None => {
-                // Add a Null and try to parse it as an Option<_>
-                // to get None as a default value.
-                self.stack.push(Json::Null);
-                match f(self) {
-                    Ok(x) => x,
-                    Err(_) => return Err(MissingFieldError(name.to_string())),
-                }
-            },
-            Some(json) => {
-                self.stack.push(json);
-                try!(f(self))
-            }
-        };
-        self.stack.push(Json::Object(obj));
-        Ok(value)
-    }
-
-    fn read_tuple<T, F>(&mut self, tuple_len: usize, f: F) -> DecodeResult<T> where
-        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
-    {
-        self.read_seq(move |d, len| {
-            if len == tuple_len {
-                f(d)
-            } else {
-                Err(ExpectedError(format!("Tuple{}", tuple_len), format!("Tuple{}", len)))
-            }
-        })
-    }
-
-    fn read_tuple_arg<T, F>(&mut self, idx: usize, f: F) -> DecodeResult<T> where
-        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
-    {
-        self.read_seq_elt(idx, f)
-    }
-
-    fn read_tuple_struct<T, F>(&mut self,
-                               _name: &str,
-                               len: usize,
-                               f: F)
-                               -> DecodeResult<T> where
-        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
-    {
-        self.read_tuple(len, f)
-    }
-
-    fn read_tuple_struct_arg<T, F>(&mut self,
-                                   idx: usize,
-                                   f: F)
-                                   -> DecodeResult<T> where
-        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
-    {
-        self.read_tuple_arg(idx, f)
-    }
-
-    fn read_option<T, F>(&mut self, mut f: F) -> DecodeResult<T> where
-        F: FnMut(&mut Decoder, bool) -> DecodeResult<T>,
-    {
-        match try!(self.pop()) {
-            Json::Null => f(self, false),
-            value => { self.stack.push(value); f(self, true) }
-        }
-    }
-
-    fn read_seq<T, F>(&mut self, f: F) -> DecodeResult<T> where
-        F: FnOnce(&mut Decoder, usize) -> DecodeResult<T>,
-    {
-        let array = try!(expect!(self.pop(), Array));
-        let len = array.len();
-        for v in array.into_iter().rev() {
-            self.stack.push(v);
-        }
-        f(self, len)
-    }
-
-    fn read_seq_elt<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where
-        F: FnOnce(&mut Decoder) -> DecodeResult<T>,
-    {
-        f(self)
-    }
-
-    fn read_map<T, F>(&mut self, f: F) -> DecodeResult<T> where
-        F: FnOnce(&mut Decoder, usize) -> DecodeResult<T>,
-    {
-        let obj = try!(expect!(self.pop(), Object));
-        let len = obj.len();
-        for (key, value) in obj.into_iter() {
-            self.stack.push(value);
-            self.stack.push(Json::String(key));
-        }
-        f(self, len)
-    }
-
-    fn read_map_elt_key<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where
-       F: FnOnce(&mut Decoder) -> DecodeResult<T>,
-    {
-        f(self)
-    }
-
-    fn read_map_elt_val<T, F>(&mut self, _idx: usize, f: F) -> DecodeResult<T> where
-       F: FnOnce(&mut Decoder) -> DecodeResult<T>,
-    {
-        f(self)
-    }
-
-    fn error(&mut self, err: &str) -> DecoderError {
-        ApplicationError(err.to_string())
-    }
-}
-
-/// A trait for converting values to JSON
-pub trait ToJson {
-    /// Converts the value of `self` to an instance of JSON
-    fn to_json(&self) -> Json;
-}
-
-macro_rules! to_json_impl_i64 {
-    ($($t:ty), +) => (
-        $(impl ToJson for $t {
-            fn to_json(&self) -> Json { Json::I64(*self as i64) }
-        })+
-    )
-}
-
-to_json_impl_i64! { isize, i8, i16, i32, i64 }
-
-macro_rules! to_json_impl_u64 {
-    ($($t:ty), +) => (
-        $(impl ToJson for $t {
-            fn to_json(&self) -> Json { Json::U64(*self as u64) }
-        })+
-    )
-}
-
-to_json_impl_u64! { usize, u8, u16, u32, u64 }
-
-impl ToJson for Json {
-    fn to_json(&self) -> Json { self.clone() }
-}
-
-impl ToJson for f32 {
-    fn to_json(&self) -> Json { (*self as f64).to_json() }
-}
-
-impl ToJson for f64 {
-    fn to_json(&self) -> Json {
-        use std::num::FpCategory::{Nan, Infinite};
-
-        match self.classify() {
-            Nan | Infinite => Json::Null,
-            _                  => Json::F64(*self)
-        }
-    }
-}
-
-impl ToJson for () {
-    fn to_json(&self) -> Json { Json::Null }
-}
-
-impl ToJson for bool {
-    fn to_json(&self) -> Json { Json::Boolean(*self) }
-}
-
-impl ToJson for str {
-    fn to_json(&self) -> Json { Json::String(self.to_string()) }
-}
-
-impl ToJson for string::String {
-    fn to_json(&self) -> Json { Json::String((*self).clone()) }
-}
-
-macro_rules! tuple_impl {
-    // use variables to indicate the arity of the tuple
-    ($($tyvar:ident),* ) => {
-        // the trailing commas are for the 1 tuple
-        impl<
-            $( $tyvar : ToJson ),*
-            > ToJson for ( $( $tyvar ),* , ) {
-
-            #[inline]
-            #[allow(non_snake_case)]
-            fn to_json(&self) -> Json {
-                match *self {
-                    ($(ref $tyvar),*,) => Json::Array(vec![$($tyvar.to_json()),*])
-                }
-            }
-        }
-    }
-}
-
-tuple_impl!{A}
-tuple_impl!{A, B}
-tuple_impl!{A, B, C}
-tuple_impl!{A, B, C, D}
-tuple_impl!{A, B, C, D, E}
-tuple_impl!{A, B, C, D, E, F}
-tuple_impl!{A, B, C, D, E, F, G}
-tuple_impl!{A, B, C, D, E, F, G, H}
-tuple_impl!{A, B, C, D, E, F, G, H, I}
-tuple_impl!{A, B, C, D, E, F, G, H, I, J}
-tuple_impl!{A, B, C, D, E, F, G, H, I, J, K}
-tuple_impl!{A, B, C, D, E, F, G, H, I, J, K, L}
-
-impl<A: ToJson> ToJson for [A] {
-    fn to_json(&self) -> Json { Json::Array(self.iter().map(|elt| elt.to_json()).collect()) }
-}
-
-impl<A: ToJson> ToJson for Vec<A> {
-    fn to_json(&self) -> Json { Json::Array(self.iter().map(|elt| elt.to_json()).collect()) }
-}
-
-impl<A: ToJson> ToJson for BTreeMap<string::String, A> {
-    fn to_json(&self) -> Json {
-        let mut d = BTreeMap::new();
-        for (key, value) in self.iter() {
-            d.insert((*key).clone(), value.to_json());
-        }
-        Json::Object(d)
-    }
-}
-
-impl<A: ToJson> ToJson for HashMap<string::String, A> {
-    fn to_json(&self) -> Json {
-        let mut d = BTreeMap::new();
-        for (key, value) in self.iter() {
-            d.insert((*key).clone(), value.to_json());
-        }
-        Json::Object(d)
-    }
-}
-
-impl<A:ToJson> ToJson for Option<A> {
-    fn to_json(&self) -> Json {
-        match *self {
-            None => Json::Null,
-            Some(ref value) => value.to_json()
-        }
-    }
-}
-
-struct FormatShim<'a, 'b: 'a> {
-    inner: &'a mut fmt::Formatter<'b>,
-}
-
-impl<'a, 'b> fmt::Write for FormatShim<'a, 'b> {
-    fn write_str(&mut self, s: &str) -> fmt::Result {
-        match self.inner.write_str(s) {
-            Ok(_) => Ok(()),
-            Err(_) => Err(fmt::Error)
-        }
-    }
-}
-
-impl fmt::Display for Json {
-    /// Encodes a json value into a string
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let mut shim = FormatShim { inner: f };
-        let mut encoder = Encoder::new(&mut shim);
-        match self.encode(&mut encoder) {
-            Ok(_) => Ok(()),
-            Err(_) => Err(fmt::Error)
-        }
-    }
-}
-
-impl<'a> fmt::Display for PrettyJson<'a> {
-    /// Encodes a json value into a string
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let mut shim = FormatShim { inner: f };
-        let mut encoder = Encoder::new_pretty(&mut shim);
-        match self.inner.encode(&mut encoder) {
-            Ok(_) => Ok(()),
-            Err(_) => Err(fmt::Error)
-        }
-    }
-}
-
-impl<'a, T: Encodable> fmt::Display for AsJson<'a, T> {
-    /// Encodes a json value into a string
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let mut shim = FormatShim { inner: f };
-        let mut encoder = Encoder::new(&mut shim);
-        match self.inner.encode(&mut encoder) {
-            Ok(_) => Ok(()),
-            Err(_) => Err(fmt::Error)
-        }
-    }
-}
-
-impl<'a, T> AsPrettyJson<'a, T> {
-    /// Set the indentation level for the emitted JSON
-    pub fn indent(mut self, indent: u32) -> AsPrettyJson<'a, T> {
-        self.indent = Some(indent);
-        self
-    }
-}
-
-impl<'a, T: Encodable> fmt::Display for AsPrettyJson<'a, T> {
-    /// Encodes a json value into a string
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let mut shim = FormatShim { inner: f };
-        let mut encoder = Encoder::new_pretty(&mut shim);
-        if let Some(n) = self.indent {
-            // unwrap cannot panic for pretty encoders
-            let _ = encoder.set_indent(n);
-        }
-        match self.inner.encode(&mut encoder) {
-            Ok(_) => Ok(()),
-            Err(_) => Err(fmt::Error)
-        }
-    }
-}
-
-impl FromStr for Json {
-    type Err = ParserError;
-    fn from_str(s: &str) -> Result<Json, ParserError> {
-        Json::from_str(s)
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use self::Animal::*;
-    use {Encodable, Decodable};
-    use super::Json::*;
-    use super::ErrorCode::*;
-    use super::ParserError::*;
-    use super::DecoderError::*;
-    use super::JsonEvent::*;
-    use super::StackElement::*;
-    use super::{Json, DecodeResult, DecoderError, JsonEvent, Parser,
-                StackElement, Stack, Decoder, Encoder, EncoderError};
-    use std::{i64, u64, f32, f64};
-    use std::collections::BTreeMap;
-    use std::string;
-
-    #[derive(RustcDecodable, Eq, PartialEq, Debug)]
-    struct OptionData {
-        opt: Option<usize>,
-    }
-
-    #[test]
-    fn test_decode_option_none() {
-        let s ="{}";
-        let obj: OptionData = super::decode(s).unwrap();
-        assert_eq!(obj, OptionData { opt: None });
-    }
-
-    #[test]
-    fn test_decode_option_some() {
-        let s = "{ \"opt\": 10 }";
-        let obj: OptionData = super::decode(s).unwrap();
-        assert_eq!(obj, OptionData { opt: Some(10) });
-    }
-
-    #[test]
-    fn test_decode_option_malformed() {
-        check_err::<OptionData>("{ \"opt\": [] }",
-                                ExpectedError("Number".to_string(), "[]".to_string()));
-        check_err::<OptionData>("{ \"opt\": false }",
-                                ExpectedError("Number".to_string(), "false".to_string()));
-    }
-
-    #[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)]
-    enum Animal {
-        Dog,
-        Frog(string::String, isize)
-    }
-
-    #[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)]
-    struct Inner {
-        a: (),
-        b: usize,
-        c: Vec<string::String>,
-    }
-
-    #[derive(PartialEq, RustcEncodable, RustcDecodable, Debug)]
-    struct Outer {
-        inner: Vec<Inner>,
-    }
-
-    fn mk_object(items: &[(string::String, Json)]) -> Json {
-        let mut d = BTreeMap::new();
-
-        for item in items.iter() {
-            match *item {
-                (ref key, ref value) => { d.insert((*key).clone(), (*value).clone()); },
-            }
-        };
-
-        Object(d)
-    }
-
-    #[test]
-    fn test_from_str_trait() {
-        let s = "null";
-        assert!(s.parse::<Json>().unwrap() == s.parse().unwrap());
-    }
-
-    #[test]
-    fn test_write_null() {
-        assert_eq!(Null.to_string(), "null");
-        assert_eq!(Null.pretty().to_string(), "null");
-    }
-
-    #[test]
-    fn test_write_i64() {
-        assert_eq!(U64(0).to_string(), "0");
-        assert_eq!(U64(0).pretty().to_string(), "0");
-
-        assert_eq!(U64(1234).to_string(), "1234");
-        assert_eq!(U64(1234).pretty().to_string(), "1234");
-
-        assert_eq!(I64(-5678).to_string(), "-5678");
-        assert_eq!(I64(-5678).pretty().to_string(), "-5678");
-
-        assert_eq!(U64(7650007200025252000).to_string(), "7650007200025252000");
-        assert_eq!(U64(7650007200025252000).pretty().to_string(), "7650007200025252000");
-    }
-
-    #[test]
-    fn test_write_f64() {
-        assert_eq!(F64(3.0).to_string(), "3.0");
-        assert_eq!(F64(3.0).pretty().to_string(), "3.0");
-
-        assert_eq!(F64(3.1).to_string(), "3.1");
-        assert_eq!(F64(3.1).pretty().to_string(), "3.1");
-
-        assert_eq!(F64(-1.5).to_string(), "-1.5");
-        assert_eq!(F64(-1.5).pretty().to_string(), "-1.5");
-
-        assert_eq!(F64(0.5).to_string(), "0.5");
-        assert_eq!(F64(0.5).pretty().to_string(), "0.5");
-
-        assert_eq!(F64(f64::NAN).to_string(), "null");
-        assert_eq!(F64(f64::NAN).pretty().to_string(), "null");
-
-        assert_eq!(F64(f64::INFINITY).to_string(), "null");
-        assert_eq!(F64(f64::INFINITY).pretty().to_string(), "null");
-
-        assert_eq!(F64(f64::NEG_INFINITY).to_string(), "null");
-        assert_eq!(F64(f64::NEG_INFINITY).pretty().to_string(), "null");
-    }
-
-    #[test]
-    fn test_write_str() {
-        assert_eq!(String("".to_string()).to_string(), "\"\"");
-        assert_eq!(String("".to_string()).pretty().to_string(), "\"\"");
-
-        assert_eq!(String("homura".to_string()).to_string(), "\"homura\"");
-        assert_eq!(String("madoka".to_string()).pretty().to_string(), "\"madoka\"");
-    }
-
-    #[test]
-    fn test_write_bool() {
-        assert_eq!(Boolean(true).to_string(), "true");
-        assert_eq!(Boolean(true).pretty().to_string(), "true");
-
-        assert_eq!(Boolean(false).to_string(), "false");
-        assert_eq!(Boolean(false).pretty().to_string(), "false");
-    }
-
-    #[test]
-    fn test_write_array() {
-        assert_eq!(Array(vec![]).to_string(), "[]");
-        assert_eq!(Array(vec![]).pretty().to_string(), "[]");
-
-        assert_eq!(Array(vec![Boolean(true)]).to_string(), "[true]");
-        assert_eq!(
-            Array(vec![Boolean(true)]).pretty().to_string(),
-            "\
-            [\n  \
-                true\n\
-            ]"
-        );
-
-        let long_test_array = Array(vec![
-            Boolean(false),
-            Null,
-            Array(vec![String("foo\nbar".to_string()), F64(3.5)])]);
-
-        assert_eq!(long_test_array.to_string(),
-            "[false,null,[\"foo\\nbar\",3.5]]");
-        assert_eq!(
-            long_test_array.pretty().to_string(),
-            "\
-            [\n  \
-                false,\n  \
-                null,\n  \
-                [\n    \
-                    \"foo\\nbar\",\n    \
-                    3.5\n  \
-                ]\n\
-            ]"
-        );
-    }
-
-    #[test]
-    fn test_write_object() {
-        assert_eq!(mk_object(&[]).to_string(), "{}");
-        assert_eq!(mk_object(&[]).pretty().to_string(), "{}");
-
-        assert_eq!(
-            mk_object(&[
-                ("a".to_string(), Boolean(true))
-            ]).to_string(),
-            "{\"a\":true}"
-        );
-        assert_eq!(
-            mk_object(&[("a".to_string(), Boolean(true))]).pretty().to_string(),
-            "\
-            {\n  \
-                \"a\": true\n\
-            }"
-        );
-
-        let complex_obj = mk_object(&[
-                ("b".to_string(), Array(vec![
-                    mk_object(&[("c".to_string(), String("\x0c\r".to_string()))]),
-                    mk_object(&[("d".to_string(), String("".to_string()))])
-                ]))
-            ]);
-
-        assert_eq!(
-            complex_obj.to_string(),
-            "{\
-                \"b\":[\
-                    {\"c\":\"\\f\\r\"},\
-                    {\"d\":\"\"}\
-                ]\
-            }"
-        );
-        assert_eq!(
-            complex_obj.pretty().to_string(),
-            "\
-            {\n  \
-                \"b\": [\n    \
-                    {\n      \
-                        \"c\": \"\\f\\r\"\n    \
-                    },\n    \
-                    {\n      \
-                        \"d\": \"\"\n    \
-                    }\n  \
-                ]\n\
-            }"
-        );
-
-        let a = mk_object(&[
-            ("a".to_string(), Boolean(true)),
-            ("b".to_string(), Array(vec![
-                mk_object(&[("c".to_string(), String("\x0c\r".to_string()))]),
-                mk_object(&[("d".to_string(), String("".to_string()))])
-            ]))
-        ]);
-
-        // We can't compare the strings directly because the object fields be
-        // printed in a different order.
-        assert_eq!(a.clone(), a.to_string().parse().unwrap());
-        assert_eq!(a.clone(), a.pretty().to_string().parse().unwrap());
-    }
-
-    #[test]
-    fn test_write_enum() {
-        let animal = Dog;
-        assert_eq!(
-            format!("{}", super::as_json(&animal)),
-            "\"Dog\""
-        );
-        assert_eq!(
-            format!("{}", super::as_pretty_json(&animal)),
-            "\"Dog\""
-        );
-
-        let animal = Frog("Henry".to_string(), 349);
-        assert_eq!(
-            format!("{}", super::as_json(&animal)),
-            "{\"variant\":\"Frog\",\"fields\":[\"Henry\",349]}"
-        );
-        assert_eq!(
-            format!("{}", super::as_pretty_json(&animal)),
-            "{\n  \
-               \"variant\": \"Frog\",\n  \
-               \"fields\": [\n    \
-                 \"Henry\",\n    \
-                 349\n  \
-               ]\n\
-             }"
-        );
-    }
-
-    macro_rules! check_encoder_for_simple {
-        ($value:expr, $expected:expr) => ({
-            let s = format!("{}", super::as_json(&$value));
-            assert_eq!(s, $expected);
-
-            let s = format!("{}", super::as_pretty_json(&$value));
-            assert_eq!(s, $expected);
-        })
-    }
-
-    #[test]
-    fn test_write_some() {
-        check_encoder_for_simple!(Some("jodhpurs".to_string()), "\"jodhpurs\"");
-    }
-
-    #[test]
-    fn test_write_none() {
-        check_encoder_for_simple!(None::<string::String>, "null");
-    }
-
-    #[test]
-    fn test_write_char() {
-        check_encoder_for_simple!('a', "\"a\"");
-        check_encoder_for_simple!('\t', "\"\\t\"");
-        check_encoder_for_simple!('\u{0000}', "\"\\u0000\"");
-        check_encoder_for_simple!('\u{001b}', "\"\\u001b\"");
-        check_encoder_for_simple!('\u{007f}', "\"\\u007f\"");
-        check_encoder_for_simple!('\u{00a0}', "\"\u{00a0}\"");
-        check_encoder_for_simple!('\u{abcd}', "\"\u{abcd}\"");
-        check_encoder_for_simple!('\u{10ffff}', "\"\u{10ffff}\"");
-    }
-
-    #[test]
-    fn test_trailing_characters() {
-        assert_eq!(Json::from_str("nulla"),  Err(SyntaxError(TrailingCharacters, 1, 5)));
-        assert_eq!(Json::from_str("truea"),  Err(SyntaxError(TrailingCharacters, 1, 5)));
-        assert_eq!(Json::from_str("falsea"), Err(SyntaxError(TrailingCharacters, 1, 6)));
-        assert_eq!(Json::from_str("1a"),     Err(SyntaxError(TrailingCharacters, 1, 2)));
-        assert_eq!(Json::from_str("[]a"),    Err(SyntaxError(TrailingCharacters, 1, 3)));
-        assert_eq!(Json::from_str("{}a"),    Err(SyntaxError(TrailingCharacters, 1, 3)));
-    }
-
-    #[test]
-    fn test_read_identifiers() {
-        assert_eq!(Json::from_str("n"),    Err(SyntaxError(InvalidSyntax, 1, 2)));
-        assert_eq!(Json::from_str("nul"),  Err(SyntaxError(InvalidSyntax, 1, 4)));
-        assert_eq!(Json::from_str("t"),    Err(SyntaxError(InvalidSyntax, 1, 2)));
-        assert_eq!(Json::from_str("truz"), Err(SyntaxError(InvalidSyntax, 1, 4)));
-        assert_eq!(Json::from_str("f"),    Err(SyntaxError(InvalidSyntax, 1, 2)));
-        assert_eq!(Json::from_str("faz"),  Err(SyntaxError(InvalidSyntax, 1, 3)));
-
-        assert_eq!(Json::from_str("null"), Ok(Null));
-        assert_eq!(Json::from_str("true"), Ok(Boolean(true)));
-        assert_eq!(Json::from_str("false"), Ok(Boolean(false)));
-        assert_eq!(Json::from_str(" null "), Ok(Null));
-        assert_eq!(Json::from_str(" true "), Ok(Boolean(true)));
-        assert_eq!(Json::from_str(" false "), Ok(Boolean(false)));
-    }
-
-    #[test]
-    fn test_decode_identifiers() {
-        let v: () = super::decode("null").unwrap();
-        assert_eq!(v, ());
-
-        let v: bool = super::decode("true").unwrap();
-        assert_eq!(v, true);
-
-        let v: bool = super::decode("false").unwrap();
-        assert_eq!(v, false);
-    }
-
-    #[test]
-    fn test_read_number() {
-        assert_eq!(Json::from_str("+"),   Err(SyntaxError(InvalidSyntax, 1, 1)));
-        assert_eq!(Json::from_str("."),   Err(SyntaxError(InvalidSyntax, 1, 1)));
-        assert_eq!(Json::from_str("NaN"), Err(SyntaxError(InvalidSyntax, 1, 1)));
-        assert_eq!(Json::from_str("-"),   Err(SyntaxError(InvalidNumber, 1, 2)));
-        assert_eq!(Json::from_str("00"),  Err(SyntaxError(InvalidNumber, 1, 2)));
-        assert_eq!(Json::from_str("1."),  Err(SyntaxError(InvalidNumber, 1, 3)));
-        assert_eq!(Json::from_str("1e"),  Err(SyntaxError(InvalidNumber, 1, 3)));
-        assert_eq!(Json::from_str("1e+"), Err(SyntaxError(InvalidNumber, 1, 4)));
-
-        assert_eq!(Json::from_str("18446744073709551616"), Err(SyntaxError(InvalidNumber, 1, 20)));
-        assert_eq!(Json::from_str("18446744073709551617"), Err(SyntaxError(InvalidNumber, 1, 20)));
-        assert_eq!(Json::from_str("-9223372036854775809"), Err(SyntaxError(InvalidNumber, 1, 21)));
-
-        assert_eq!(Json::from_str("3"), Ok(U64(3)));
-        assert_eq!(Json::from_str("3.1"), Ok(F64(3.1)));
-        assert_eq!(Json::from_str("-1.2"), Ok(F64(-1.2)));
-        assert_eq!(Json::from_str("0.4"), Ok(F64(0.4)));
-        assert_eq!(Json::from_str("0.4e5"), Ok(F64(0.4e5)));
-        assert_eq!(Json::from_str("0.4e+15"), Ok(F64(0.4e15)));
-        assert_eq!(Json::from_str("0.4e-01"), Ok(F64(0.4e-01)));
-        assert_eq!(Json::from_str(" 3 "), Ok(U64(3)));
-
-        assert_eq!(Json::from_str("-9223372036854775808"), Ok(I64(i64::MIN)));
-        assert_eq!(Json::from_str("9223372036854775807"), Ok(U64(i64::MAX as u64)));
-        assert_eq!(Json::from_str("18446744073709551615"), Ok(U64(u64::MAX)));
-    }
-
-    #[test]
-    fn test_decode_numbers() {
-        let v: f64 = super::decode("3").unwrap();
-        assert_eq!(v, 3.0);
-
-        let v: f64 = super::decode("3.1").unwrap();
-        assert_eq!(v, 3.1);
-
-        let v: f64 = super::decode("-1.2").unwrap();
-        assert_eq!(v, -1.2);
-
-        let v: f64 = super::decode("0.4").unwrap();
-        assert_eq!(v, 0.4);
-
-        let v: f64 = super::decode("0.4e5").unwrap();
-        assert_eq!(v, 0.4e5);
-
-        let v: f64 = super::decode("0.4e15").unwrap();
-        assert_eq!(v, 0.4e15);
-
-        let v: f64 = super::decode("0.4e-01").unwrap();
-        assert_eq!(v, 0.4e-01);
-
-        let v: u64 = super::decode("0").unwrap();
-        assert_eq!(v, 0);
-
-        let v: u64 = super::decode("18446744073709551615").unwrap();
-        assert_eq!(v, u64::MAX);
-
-        let v: i64 = super::decode("-9223372036854775808").unwrap();
-        assert_eq!(v, i64::MIN);
-
-        let v: i64 = super::decode("9223372036854775807").unwrap();
-        assert_eq!(v, i64::MAX);
-
-        let res: DecodeResult<i64> = super::decode("765.25252");
-        match res {
-            Ok(..) => panic!("expected an error"),
-            Err(ExpectedError(ref s, _)) => assert_eq!(s, "Integer"),
-            Err(..) => panic!("expected an 'expected integer' error"),
-        }
-    }
-
-    #[test]
-    fn test_read_str() {
-        assert_eq!(Json::from_str("\""),     Err(SyntaxError(EOFWhileParsingString, 1, 2)));
-        assert_eq!(Json::from_str("\"lol"),  Err(SyntaxError(EOFWhileParsingString, 1, 5)));
-        assert_eq!(Json::from_str("\"\n\""), Err(SyntaxError(ControlCharacterInString, 2, 1)));
-        assert_eq!(Json::from_str("\"\0\""), Err(SyntaxError(ControlCharacterInString, 1, 2)));
-        assert_eq!(Json::from_str("\"\u{1}\""), Err(SyntaxError(ControlCharacterInString, 1, 2)));
-        assert_eq!(Json::from_str("\"\u{1F}\""), Err(SyntaxError(ControlCharacterInString, 1, 2)));
-
-        // Only C0 control characters are excluded.
-        assert!('\u{7F}'.is_control());
-        assert!('\u{80}'.is_control());
-        assert!('\u{9F}'.is_control());
-        let c1_controls = "\u{7F}\u{80}\u{9F}".to_string();
-        assert_eq!(Json::from_str(&format!("\"{}\"", c1_controls)), Ok(String(c1_controls)));
-
-        assert_eq!(Json::from_str("\"\""), Ok(String("".to_string())));
-        assert_eq!(Json::from_str("\"foo\""), Ok(String("foo".to_string())));
-        assert_eq!(Json::from_str("\"\\\"\""), Ok(String("\"".to_string())));
-        assert_eq!(Json::from_str("\"\\b\""), Ok(String("\x08".to_string())));
-        assert_eq!(Json::from_str("\"\\n\""), Ok(String("\n".to_string())));
-        assert_eq!(Json::from_str("\"\\r\""), Ok(String("\r".to_string())));
-        assert_eq!(Json::from_str("\"\\t\""), Ok(String("\t".to_string())));
-        assert_eq!(Json::from_str(" \"foo\" "), Ok(String("foo".to_string())));
-        assert_eq!(Json::from_str("\"\\u12ab\""), Ok(String("\u{12ab}".to_string())));
-        assert_eq!(Json::from_str("\"\\uAB12\""), Ok(String("\u{AB12}".to_string())));
-    }
-
-    #[test]
-    fn test_decode_str() {
-        let s = [("\"\"", ""),
-                 ("\"foo\"", "foo"),
-                 ("\"\\\"\"", "\""),
-                 ("\"\\b\"", "\x08"),
-                 ("\"\\n\"", "\n"),
-                 ("\"\\r\"", "\r"),
-                 ("\"\\t\"", "\t"),
-                 ("\"\\u12ab\"", "\u{12ab}"),
-                 ("\"\\uAB12\"", "\u{AB12}")];
-
-        for &(i, o) in s.iter() {
-            let v: string::String = super::decode(i).unwrap();
-            assert_eq!(v, o);
-        }
-    }
-
-    #[test]
-    fn test_read_array() {
-        assert_eq!(Json::from_str("["),     Err(SyntaxError(EOFWhileParsingValue, 1, 2)));
-        assert_eq!(Json::from_str("[1"),    Err(SyntaxError(EOFWhileParsingArray, 1, 3)));
-        assert_eq!(Json::from_str("[1,"),   Err(SyntaxError(EOFWhileParsingValue, 1, 4)));
-        assert_eq!(Json::from_str("[1,]"),  Err(SyntaxError(InvalidSyntax,        1, 4)));
-        assert_eq!(Json::from_str("[6 7]"), Err(SyntaxError(InvalidSyntax,        1, 4)));
-
-        assert_eq!(Json::from_str("[]"), Ok(Array(vec![])));
-        assert_eq!(Json::from_str("[ ]"), Ok(Array(vec![])));
-        assert_eq!(Json::from_str("[true]"), Ok(Array(vec![Boolean(true)])));
-        assert_eq!(Json::from_str("[ false ]"), Ok(Array(vec![Boolean(false)])));
-        assert_eq!(Json::from_str("[null]"), Ok(Array(vec![Null])));
-        assert_eq!(Json::from_str("[3, 1]"),
-                     Ok(Array(vec![U64(3), U64(1)])));
-        assert_eq!(Json::from_str("\n[3, 2]\n"),
-                     Ok(Array(vec![U64(3), U64(2)])));
-        assert_eq!(Json::from_str("[2, [4, 1]]"),
-               Ok(Array(vec![U64(2), Array(vec![U64(4), U64(1)])])));
-    }
-
-    #[test]
-    fn test_decode_array() {
-        let v: Vec<()> = super::decode("[]").unwrap();
-        assert_eq!(v, vec![]);
-
-        let v: Vec<()> = super::decode("[null]").unwrap();
-        assert_eq!(v, vec![()]);
-
-        let v: Vec<bool> = super::decode("[true]").unwrap();
-        assert_eq!(v, vec![true]);
-
-        let v: Vec<isize> = super::decode("[3, 1]").unwrap();
-        assert_eq!(v, vec![3, 1]);
-
-        let v: Vec<Vec<usize>> = super::decode("[[3], [1, 2]]").unwrap();
-        assert_eq!(v, vec![vec![3], vec![1, 2]]);
-    }
-
-    #[test]
-    fn test_decode_tuple() {
-        let t: (usize, usize, usize) = super::decode("[1, 2, 3]").unwrap();
-        assert_eq!(t, (1, 2, 3));
-
-        let t: (usize, string::String) = super::decode("[1, \"two\"]").unwrap();
-        assert_eq!(t, (1, "two".to_string()));
-    }
-
-    #[test]
-    fn test_decode_tuple_malformed_types() {
-        assert!(super::decode::<(usize, string::String)>("[1, 2]").is_err());
-    }
-
-    #[test]
-    fn test_decode_tuple_malformed_length() {
-        assert!(super::decode::<(usize, usize)>("[1, 2, 3]").is_err());
-    }
-
-    #[test]
-    fn test_read_object() {
-        assert_eq!(Json::from_str("{"),       Err(SyntaxError(EOFWhileParsingObject, 1, 2)));
-        assert_eq!(Json::from_str("{ "),      Err(SyntaxError(EOFWhileParsingObject, 1, 3)));
-        assert_eq!(Json::from_str("{1"),      Err(SyntaxError(KeyMustBeAString,      1, 2)));
-        assert_eq!(Json::from_str("{ \"a\""), Err(SyntaxError(EOFWhileParsingObject, 1, 6)));
-        assert_eq!(Json::from_str("{\"a\""),  Err(SyntaxError(EOFWhileParsingObject, 1, 5)));
-        assert_eq!(Json::from_str("{\"a\" "), Err(SyntaxError(EOFWhileParsingObject, 1, 6)));
-
-        assert_eq!(Json::from_str("{\"a\" 1"),   Err(SyntaxError(ExpectedColon,         1, 6)));
-        assert_eq!(Json::from_str("{\"a\":"),    Err(SyntaxError(EOFWhileParsingValue,  1, 6)));
-        assert_eq!(Json::from_str("{\"a\":1"),   Err(SyntaxError(EOFWhileParsingObject, 1, 7)));
-        assert_eq!(Json::from_str("{\"a\":1 1"), Err(SyntaxError(InvalidSyntax,         1, 8)));
-        assert_eq!(Json::from_str("{\"a\":1,"),  Err(SyntaxError(EOFWhileParsingObject, 1, 8)));
-
-        assert_eq!(Json::from_str("{}").unwrap(), mk_object(&[]));
-        assert_eq!(Json::from_str("{\"a\": 3}").unwrap(),
-                  mk_object(&[("a".to_string(), U64(3))]));
-
-        assert_eq!(Json::from_str(
-                      "{ \"a\": null, \"b\" : true }").unwrap(),
-                  mk_object(&[
-                      ("a".to_string(), Null),
-                      ("b".to_string(), Boolean(true))]));
-        assert_eq!(Json::from_str("\n{ \"a\": null, \"b\" : true }\n").unwrap(),
-                  mk_object(&[
-                      ("a".to_string(), Null),
-                      ("b".to_string(), Boolean(true))]));
-        assert_eq!(Json::from_str(
-                      "{\"a\" : 1.0 ,\"b\": [ true ]}").unwrap(),
-                  mk_object(&[
-                      ("a".to_string(), F64(1.0)),
-                      ("b".to_string(), Array(vec![Boolean(true)]))
-                  ]));
-        assert_eq!(Json::from_str(
-                      "{\
-                          \"a\": 1.0, \
-                          \"b\": [\
-                              true,\
-                              \"foo\\nbar\", \
-                              { \"c\": {\"d\": null} } \
-                          ]\
-                      }").unwrap(),
-                  mk_object(&[
-                      ("a".to_string(), F64(1.0)),
-                      ("b".to_string(), Array(vec![
-                          Boolean(true),
-                          String("foo\nbar".to_string()),
-                          mk_object(&[
-                              ("c".to_string(), mk_object(&[("d".to_string(), Null)]))
-                          ])
-                      ]))
-                  ]));
-    }
-
-    #[test]
-    fn test_decode_struct() {
-        let s = "{
-            \"inner\": [
-                { \"a\": null, \"b\": 2, \"c\": [\"abc\", \"xyz\"] }
-            ]
-        }";
-
-        let v: Outer = super::decode(s).unwrap();
-        assert_eq!(
-            v,
-            Outer {
-                inner: vec![
-                    Inner { a: (), b: 2, c: vec!["abc".to_string(), "xyz".to_string()] }
-                ]
-            }
-        );
-    }
-
-    #[derive(RustcDecodable)]
-    struct FloatStruct {
-        f: f64,
-        a: Vec<f64>
-    }
-    #[test]
-    fn test_decode_struct_with_nan() {
-        let s = "{\"f\":null,\"a\":[null,123]}";
-        let obj: FloatStruct = super::decode(s).unwrap();
-        assert!(obj.f.is_nan());
-        assert!(obj.a[0].is_nan());
-        assert_eq!(obj.a[1], 123f64);
-    }
-
-    #[test]
-    fn test_decode_option() {
-        let value: Option<string::String> = super::decode("null").unwrap();
-        assert_eq!(value, None);
-
-        let value: Option<string::String> = super::decode("\"jodhpurs\"").unwrap();
-        assert_eq!(value, Some("jodhpurs".to_string()));
-    }
-
-    #[test]
-    fn test_decode_enum() {
-        let value: Animal = super::decode("\"Dog\"").unwrap();
-        assert_eq!(value, Dog);
-
-        let s = "{\"variant\":\"Frog\",\"fields\":[\"Henry\",349]}";
-        let value: Animal = super::decode(s).unwrap();
-        assert_eq!(value, Frog("Henry".to_string(), 349));
-    }
-
-    #[test]
-    fn test_decode_result() {
-        let value: Result<i32, i8> = Ok(4);
-        let json_value = super::encode(&value).unwrap();
-        assert_eq!(json_value, "{\"variant\":\"Ok\",\"fields\":[4]}");
-        let decoded_value: Result<i32, i8> = super::decode(&json_value).unwrap();
-        assert_eq!(decoded_value, Ok(4));
-    }
-
-    #[test]
-    fn test_decode_map() {
-        let s = "{\"a\": \"Dog\", \"b\": {\"variant\":\"Frog\",\
-                  \"fields\":[\"Henry\", 349]}}";
-        let mut map: BTreeMap<string::String, Animal> = super::decode(s).unwrap();
-
-        assert_eq!(map.remove(&"a".to_string()), Some(Dog));
-        assert_eq!(map.remove(&"b".to_string()), Some(Frog("Henry".to_string(), 349)));
-    }
-
-    #[test]
-    fn test_multiline_errors() {
-        assert_eq!(Json::from_str("{\n  \"foo\":\n \"bar\""),
-            Err(SyntaxError(EOFWhileParsingObject, 3, 8)));
-    }
-
-    #[derive(RustcDecodable)]
-    #[allow(dead_code)]
-    struct DecodeStruct {
-        x: f64,
-        y: bool,
-        z: string::String,
-        w: Vec<DecodeStruct>
-    }
-    #[derive(RustcDecodable)]
-    enum DecodeEnum {
-        A(f64),
-        B(string::String)
-    }
-    fn check_err<T: Decodable>(to_parse: &'static str, expected: DecoderError) {
-        let res: DecodeResult<T> = match Json::from_str(to_parse) {
-            Err(e) => Err(ParseError(e)),
-            Ok(json) => Decodable::decode(&mut Decoder::new(json))
-        };
-        match res {
-            Ok(_) => panic!("`{:?}` parsed & decoded ok, expecting error `{:?}`",
-                              to_parse, expected),
-            Err(ParseError(e)) => panic!("`{}` is not valid json: {:?}",
-                                           to_parse, e),
-            Err(e) => {
-                assert_eq!(e, expected);
-            }
-        }
-    }
-    #[test]
-    fn test_decode_errors_struct() {
-        check_err::<DecodeStruct>("[]", ExpectedError("Object".to_string(), "[]".to_string()));
-        check_err::<DecodeStruct>("{\"x\": true, \"y\": true, \"z\": \"\", \"w\": []}",
-                                  ExpectedError("Number".to_string(), "true".to_string()));
-        check_err::<DecodeStruct>("{\"x\": 1, \"y\": [], \"z\": \"\", \"w\": []}",
-                                  ExpectedError("Boolean".to_string(), "[]".to_string()));
-        check_err::<DecodeStruct>("{\"x\": 1, \"y\": true, \"z\": {}, \"w\": []}",
-                                  ExpectedError("String".to_string(), "{}".to_string()));
-        check_err::<DecodeStruct>("{\"x\": 1, \"y\": true, \"z\": \"\", \"w\": null}",
-                                  ExpectedError("Array".to_string(), "null".to_string()));
-        check_err::<DecodeStruct>("{\"x\": 1, \"y\": true, \"z\": \"\"}",
-                                  MissingFieldError("w".to_string()));
-    }
-    #[test]
-    fn test_decode_errors_enum() {
-        check_err::<DecodeEnum>("{}",
-                                MissingFieldError("variant".to_string()));
-        check_err::<DecodeEnum>("{\"variant\": 1}",
-                                ExpectedError("String".to_string(), "1".to_string()));
-        check_err::<DecodeEnum>("{\"variant\": \"A\"}",
-                                MissingFieldError("fields".to_string()));
-        check_err::<DecodeEnum>("{\"variant\": \"A\", \"fields\": null}",
-                                ExpectedError("Array".to_string(), "null".to_string()));
-        check_err::<DecodeEnum>("{\"variant\": \"C\", \"fields\": []}",
-                                UnknownVariantError("C".to_string()));
-    }
-
-    #[test]
-    fn test_find(){
-        let json_value = Json::from_str("{\"dog\" : \"cat\"}").unwrap();
-        let found_str = json_value.find("dog");
-        assert!(found_str.unwrap().as_string().unwrap() == "cat");
-    }
-
-    #[test]
-    fn test_find_path(){
-        let json_value = Json::from_str("{\"dog\":{\"cat\": {\"mouse\" : \"cheese\"}}}").unwrap();
-        let found_str = json_value.find_path(&["dog", "cat", "mouse"]);
-        assert!(found_str.unwrap().as_string().unwrap() == "cheese");
-    }
-
-    #[test]
-    fn test_search(){
-        let json_value = Json::from_str("{\"dog\":{\"cat\": {\"mouse\" : \"cheese\"}}}").unwrap();
-        let found_str = json_value.search("mouse").and_then(|j| j.as_string());
-        assert!(found_str.unwrap() == "cheese");
-    }
-
-    #[test]
-    fn test_index(){
-        let json_value = Json::from_str("{\"animals\":[\"dog\",\"cat\",\"mouse\"]}").unwrap();
-        let ref array = json_value["animals"];
-        assert_eq!(array[0].as_string().unwrap(), "dog");
-        assert_eq!(array[1].as_string().unwrap(), "cat");
-        assert_eq!(array[2].as_string().unwrap(), "mouse");
-    }
-
-    #[test]
-    fn test_is_object(){
-        let json_value = Json::from_str("{}").unwrap();
-        assert!(json_value.is_object());
-    }
-
-    #[test]
-    fn test_as_object(){
-        let json_value = Json::from_str("{}").unwrap();
-        let json_object = json_value.as_object();
-        assert!(json_object.is_some());
-    }
-
-    #[test]
-    fn test_is_array(){
-        let json_value = Json::from_str("[1, 2, 3]").unwrap();
-        assert!(json_value.is_array());
-    }
-
-    #[test]
-    fn test_as_array(){
-        let json_value = Json::from_str("[1, 2, 3]").unwrap();
-        let json_array = json_value.as_array();
-        let expected_length = 3;
-        assert!(json_array.is_some() && json_array.unwrap().len() == expected_length);
-    }
-
-    #[test]
-    fn test_is_string(){
-        let json_value = Json::from_str("\"dog\"").unwrap();
-        assert!(json_value.is_string());
-    }
-
-    #[test]
-    fn test_as_string(){
-        let json_value = Json::from_str("\"dog\"").unwrap();
-        let json_str = json_value.as_string();
-        let expected_str = "dog";
-        assert_eq!(json_str, Some(expected_str));
-    }
-
-    #[test]
-    fn test_is_number(){
-        let json_value = Json::from_str("12").unwrap();
-        assert!(json_value.is_number());
-    }
-
-    #[test]
-    fn test_is_i64(){
-        let json_value = Json::from_str("-12").unwrap();
-        assert!(json_value.is_i64());
-
-        let json_value = Json::from_str("12").unwrap();
-        assert!(!json_value.is_i64());
-
-        let json_value = Json::from_str("12.0").unwrap();
-        assert!(!json_value.is_i64());
-    }
-
-    #[test]
-    fn test_is_u64(){
-        let json_value = Json::from_str("12").unwrap();
-        assert!(json_value.is_u64());
-
-        let json_value = Json::from_str("-12").unwrap();
-        assert!(!json_value.is_u64());
-
-        let json_value = Json::from_str("12.0").unwrap();
-        assert!(!json_value.is_u64());
-    }
-
-    #[test]
-    fn test_is_f64(){
-        let json_value = Json::from_str("12").unwrap();
-        assert!(!json_value.is_f64());
-
-        let json_value = Json::from_str("-12").unwrap();
-        assert!(!json_value.is_f64());
-
-        let json_value = Json::from_str("12.0").unwrap();
-        assert!(json_value.is_f64());
-
-        let json_value = Json::from_str("-12.0").unwrap();
-        assert!(json_value.is_f64());
-    }
-
-    #[test]
-    fn test_as_i64(){
-        let json_value = Json::from_str("-12").unwrap();
-        let json_num = json_value.as_i64();
-        assert_eq!(json_num, Some(-12));
-    }
-
-    #[test]
-    fn test_as_u64(){
-        let json_value = Json::from_str("12").unwrap();
-        let json_num = json_value.as_u64();
-        assert_eq!(json_num, Some(12));
-    }
-
-    #[test]
-    fn test_as_f64(){
-        let json_value = Json::from_str("12.0").unwrap();
-        let json_num = json_value.as_f64();
-        assert_eq!(json_num, Some(12f64));
-    }
-
-    #[test]
-    fn test_is_boolean(){
-        let json_value = Json::from_str("false").unwrap();
-        assert!(json_value.is_boolean());
-    }
-
-    #[test]
-    fn test_as_boolean(){
-        let json_value = Json::from_str("false").unwrap();
-        let json_bool = json_value.as_boolean();
-        let expected_bool = false;
-        assert!(json_bool.is_some() && json_bool.unwrap() == expected_bool);
-    }
-
-    #[test]
-    fn test_is_null(){
-        let json_value = Json::from_str("null").unwrap();
-        assert!(json_value.is_null());
-    }
-
-    #[test]
-    fn test_as_null(){
-        let json_value = Json::from_str("null").unwrap();
-        let json_null = json_value.as_null();
-        let expected_null = ();
-        assert!(json_null.is_some() && json_null.unwrap() == expected_null);
-    }
-
-    #[test]
-    fn test_encode_hashmap_with_numeric_key() {
-        use std::collections::HashMap;
-        let mut hm: HashMap<usize, bool> = HashMap::new();
-        hm.insert(1, true);
-        let json_str = super::as_pretty_json(&hm).to_string();
-        match Json::from_str(&json_str) {
-            Err(_) => panic!("Unable to parse json_str: {}", json_str),
-            _ => {} // it parsed and we are good to go
-        }
-    }
-
-    #[test]
-    fn test_negative_zero() {
-        Json::from_str("{\"test\":-0}").unwrap();
-    }
-
-    #[test]
-    fn test_prettyencode_hashmap_with_numeric_key() {
-        use std::collections::HashMap;
-        let mut hm: HashMap<usize, bool> = HashMap::new();
-        hm.insert(1, true);
-        let json_str = super::as_pretty_json(&hm).to_string();
-        match Json::from_str(&json_str) {
-            Err(_) => panic!("Unable to parse json_str: {}", json_str),
-            _ => {} // it parsed and we are good to go
-        }
-    }
-
-    #[test]
-    fn test_prettyencoder_indent_level_param() {
-        use std::collections::BTreeMap;
-
-        let mut tree = BTreeMap::new();
-
-        tree.insert("hello".to_string(), String("guten tag".to_string()));
-        tree.insert("goodbye".to_string(), String("sayonara".to_string()));
-
-        let json = Array(
-            // The following layout below should look a lot like
-            // the pretty-printed JSON (indent * x)
-            vec!
-            ( // 0x
-                String("greetings".to_string()), // 1x
-                Object(tree), // 1x + 2x + 2x + 1x
-            ) // 0x
-            // End JSON array (7 lines)
-        );
-
-        // Helper function for counting indents
-        fn indents(source: &str) -> usize {
-            let trimmed = source.trim_left_matches(' ');
-            source.len() - trimmed.len()
-        }
-
-        // Test up to 4 spaces of indents (more?)
-        for i in 0..4 {
-            let printed = super::as_pretty_json(&json).indent(i as u32)
-                                .to_string();
-
-            // Check for indents at each line
-            let lines: Vec<&str> = printed.lines().collect();
-            assert_eq!(lines.len(), 7); // JSON should be 7 lines
-
-            assert_eq!(indents(lines[0]), 0 * i); // [
-            assert_eq!(indents(lines[1]), 1 * i); //   "greetings",
-            assert_eq!(indents(lines[2]), 1 * i); //   {
-            assert_eq!(indents(lines[3]), 2 * i); //     "hello": "guten tag",
-            assert_eq!(indents(lines[4]), 2 * i); //     "goodbye": "sayonara"
-            assert_eq!(indents(lines[5]), 1 * i); //   },
-            assert_eq!(indents(lines[6]), 0 * i); // ]
-
-            // Finally, test that the pretty-printed JSON is valid
-            Json::from_str(&printed).ok()
-                 .expect("Pretty-printed JSON is invalid!");
-        }
-    }
-
-    #[test]
-    fn test_hashmap_with_numeric_key_can_handle_double_quote_delimited_key() {
-        use std::collections::HashMap;
-        use Decodable;
-        let json_str = "{\"1\":true}";
-        let json_obj = match Json::from_str(json_str) {
-            Err(_) => panic!("Unable to parse json_str: {}", json_str),
-            Ok(o) => o
-        };
-        let mut decoder = Decoder::new(json_obj);
-        let _hm: HashMap<usize, bool> = Decodable::decode(&mut decoder).unwrap();
-    }
-
-    #[test]
-    fn test_hashmap_with_enum_key() {
-        use std::collections::HashMap;
-        use json;
-        #[derive(RustcEncodable, Eq, Hash, PartialEq, RustcDecodable, Debug)]
-        enum Enum {
-            Foo,
-            #[allow(dead_code)]
-            Bar,
-        }
-        let mut map = HashMap::new();
-        map.insert(Enum::Foo, 0);
-        let result = json::encode(&map).unwrap();
-        assert_eq!(result, r#"{"Foo":0}"#);
-        let decoded: HashMap<Enum, _> = json::decode(&result).unwrap();
-        assert_eq!(map, decoded);
-    }
-
-    #[test]
-    fn test_hashmap_with_numeric_key_will_error_with_string_keys() {
-        use std::collections::HashMap;
-        use Decodable;
-        let json_str = "{\"a\":true}";
-        let json_obj = match Json::from_str(json_str) {
-            Err(_) => panic!("Unable to parse json_str: {}", json_str),
-            Ok(o) => o
-        };
-        let mut decoder = Decoder::new(json_obj);
-        let result: Result<HashMap<usize, bool>, DecoderError> = Decodable::decode(&mut decoder);
-        assert_eq!(result, Err(ExpectedError("Number".to_string(), "a".to_string())));
-    }
-
-    fn assert_stream_equal(src: &str,
-                           expected: Vec<(JsonEvent, Vec<StackElement>)>) {
-        let mut parser = Parser::new(src.chars());
-        let mut i = 0;
-        loop {
-            let evt = match parser.next() {
-                Some(e) => e,
-                None => { break; }
-            };
-            let (ref expected_evt, ref expected_stack) = expected[i];
-            if !parser.stack().is_equal_to(&expected_stack) {
-                panic!("Parser stack is not equal to {:?}", expected_stack);
-            }
-            assert_eq!(&evt, expected_evt);
-            i+=1;
-        }
-    }
-    #[test]
-    #[cfg_attr(target_word_size = "32", ignore)] // FIXME(#14064)
-    fn test_streaming_parser() {
-        assert_stream_equal(
-            r#"{ "foo":"bar", "array" : [0, 1, 2, 3, 4, 5], "idents":[null,true,false]}"#,
-            vec![
-                (ObjectStart,             vec![]),
-                  (StringValue("bar".to_string()),   vec![Key("foo")]),
-                  (ArrayStart,            vec![Key("array")]),
-                    (U64Value(0),         vec![Key("array"), Index(0)]),
-                    (U64Value(1),         vec![Key("array"), Index(1)]),
-                    (U64Value(2),         vec![Key("array"), Index(2)]),
-                    (U64Value(3),         vec![Key("array"), Index(3)]),
-                    (U64Value(4),         vec![Key("array"), Index(4)]),
-                    (U64Value(5),         vec![Key("array"), Index(5)]),
-                  (ArrayEnd,              vec![Key("array")]),
-                  (ArrayStart,            vec![Key("idents")]),
-                    (NullValue,           vec![Key("idents"), Index(0)]),
-                    (BooleanValue(true),  vec![Key("idents"), Index(1)]),
-                    (BooleanValue(false), vec![Key("idents"), Index(2)]),
-                  (ArrayEnd,              vec![Key("idents")]),
-                (ObjectEnd,               vec![]),
-            ]
-        );
-    }
-    fn last_event(src: &str) -> JsonEvent {
-        let mut parser = Parser::new(src.chars());
-        let mut evt = NullValue;
-        loop {
-            evt = match parser.next() {
-                Some(e) => e,
-                None => return evt,
-            }
-        }
-    }
-
-    #[test]
-    #[cfg_attr(target_word_size = "32", ignore)] // FIXME(#14064)
-    fn test_read_object_streaming() {
-        assert_eq!(last_event("{ "),      Error(SyntaxError(EOFWhileParsingObject, 1, 3)));
-        assert_eq!(last_event("{1"),      Error(SyntaxError(KeyMustBeAString,      1, 2)));
-        assert_eq!(last_event("{ \"a\""), Error(SyntaxError(EOFWhileParsingObject, 1, 6)));
-        assert_eq!(last_event("{\"a\""),  Error(SyntaxError(EOFWhileParsingObject, 1, 5)));
-        assert_eq!(last_event("{\"a\" "), Error(SyntaxError(EOFWhileParsingObject, 1, 6)));
-
-        assert_eq!(last_event("{\"a\" 1"),   Error(SyntaxError(ExpectedColon,         1, 6)));
-        assert_eq!(last_event("{\"a\":"),    Error(SyntaxError(EOFWhileParsingValue,  1, 6)));
-        assert_eq!(last_event("{\"a\":1"),   Error(SyntaxError(EOFWhileParsingObject, 1, 7)));
-        assert_eq!(last_event("{\"a\":1 1"), Error(SyntaxError(InvalidSyntax,         1, 8)));
-        assert_eq!(last_event("{\"a\":1,"),  Error(SyntaxError(EOFWhileParsingObject, 1, 8)));
-        assert_eq!(last_event("{\"a\":1,}"), Error(SyntaxError(TrailingComma, 1, 8)));
-
-        assert_stream_equal(
-            "{}",
-            vec![(ObjectStart, vec![]), (ObjectEnd, vec![])]
-        );
-        assert_stream_equal(
-            "{\"a\": 3}",
-            vec![
-                (ObjectStart,        vec![]),
-                  (U64Value(3),      vec![Key("a")]),
-                (ObjectEnd,          vec![]),
-            ]
-        );
-        assert_stream_equal(
-            "{ \"a\": null, \"b\" : true }",
-            vec![
-                (ObjectStart,           vec![]),
-                  (NullValue,           vec![Key("a")]),
-                  (BooleanValue(true),  vec![Key("b")]),
-                (ObjectEnd,             vec![]),
-            ]
-        );
-        assert_stream_equal(
-            "{\"a\" : 1.0 ,\"b\": [ true ]}",
-            vec![
-                (ObjectStart,           vec![]),
-                  (F64Value(1.0),       vec![Key("a")]),
-                  (ArrayStart,          vec![Key("b")]),
-                    (BooleanValue(true),vec![Key("b"), Index(0)]),
-                  (ArrayEnd,            vec![Key("b")]),
-                (ObjectEnd,             vec![]),
-            ]
-        );
-        assert_stream_equal(
-            r#"{
-                "a": 1.0,
-                "b": [
-                    true,
-                    "foo\nbar",
-                    { "c": {"d": null} },
-                    "\uD834\uDF06"
-                ]
-            }"#,
-            vec![
-                (ObjectStart,                   vec![]),
-                  (F64Value(1.0),               vec![Key("a")]),
-                  (ArrayStart,                  vec![Key("b")]),
-                    (BooleanValue(true),        vec![Key("b"), Index(0)]),
-                    (StringValue("foo\nbar".to_string()),  vec![Key("b"), Index(1)]),
-                    (ObjectStart,               vec![Key("b"), Index(2)]),
-                      (ObjectStart,             vec![Key("b"), Index(2), Key("c")]),
-                        (NullValue,             vec![Key("b"), Index(2), Key("c"), Key("d")]),
-                      (ObjectEnd,               vec![Key("b"), Index(2), Key("c")]),
-                    (ObjectEnd,                 vec![Key("b"), Index(2)]),
-                    (StringValue("\u{1D306}".to_string()),  vec![Key("b"), Index(3)]),
-                  (ArrayEnd,                    vec![Key("b")]),
-                (ObjectEnd,                     vec![]),
-            ]
-        );
-    }
-    #[test]
-    #[cfg_attr(target_word_size = "32", ignore)] // FIXME(#14064)
-    fn test_read_array_streaming() {
-        assert_stream_equal(
-            "[]",
-            vec![
-                (ArrayStart, vec![]),
-                (ArrayEnd,   vec![]),
-            ]
-        );
-        assert_stream_equal(
-            "[ ]",
-            vec![
-                (ArrayStart, vec![]),
-                (ArrayEnd,   vec![]),
-            ]
-        );
-        assert_stream_equal(
-            "[true]",
-            vec![
-                (ArrayStart,             vec![]),
-                    (BooleanValue(true), vec![Index(0)]),
-                (ArrayEnd,               vec![]),
-            ]
-        );
-        assert_stream_equal(
-            "[ false ]",
-            vec![
-                (ArrayStart,              vec![]),
-                    (BooleanValue(false), vec![Index(0)]),
-                (ArrayEnd,                vec![]),
-            ]
-        );
-        assert_stream_equal(
-            "[null]",
-            vec![
-                (ArrayStart,    vec![]),
-                    (NullValue, vec![Index(0)]),
-                (ArrayEnd,      vec![]),
-            ]
-        );
-        assert_stream_equal(
-            "[3, 1]",
-            vec![
-                (ArrayStart,      vec![]),
-                    (U64Value(3), vec![Index(0)]),
-                    (U64Value(1), vec![Index(1)]),
-                (ArrayEnd,        vec![]),
-            ]
-        );
-        assert_stream_equal(
-            "\n[3, 2]\n",
-            vec![
-                (ArrayStart,      vec![]),
-                    (U64Value(3), vec![Index(0)]),
-                    (U64Value(2), vec![Index(1)]),
-                (ArrayEnd,        vec![]),
-            ]
-        );
-        assert_stream_equal(
-            "[2, [4, 1]]",
-            vec![
-                (ArrayStart,           vec![]),
-                    (U64Value(2),      vec![Index(0)]),
-                    (ArrayStart,       vec![Index(1)]),
-                        (U64Value(4),  vec![Index(1), Index(0)]),
-                        (U64Value(1),  vec![Index(1), Index(1)]),
-                    (ArrayEnd,         vec![Index(1)]),
-                (ArrayEnd,             vec![]),
-            ]
-        );
-
-        assert_eq!(last_event("["), Error(SyntaxError(EOFWhileParsingValue, 1,  2)));
-
-        assert_eq!(Json::from_str("["),     Err(SyntaxError(EOFWhileParsingValue, 1, 2)));
-        assert_eq!(Json::from_str("[1"),    Err(SyntaxError(EOFWhileParsingArray, 1, 3)));
-        assert_eq!(Json::from_str("[1,"),   Err(SyntaxError(EOFWhileParsingValue, 1, 4)));
-        assert_eq!(Json::from_str("[1,]"),  Err(SyntaxError(InvalidSyntax,        1, 4)));
-        assert_eq!(Json::from_str("[6 7]"), Err(SyntaxError(InvalidSyntax,        1, 4)));
-
-    }
-    #[test]
-    fn test_trailing_characters_streaming() {
-        assert_eq!(last_event("nulla"),  Error(SyntaxError(TrailingCharacters, 1, 5)));
-        assert_eq!(last_event("truea"),  Error(SyntaxError(TrailingCharacters, 1, 5)));
-        assert_eq!(last_event("falsea"), Error(SyntaxError(TrailingCharacters, 1, 6)));
-        assert_eq!(last_event("1a"),     Error(SyntaxError(TrailingCharacters, 1, 2)));
-        assert_eq!(last_event("[]a"),    Error(SyntaxError(TrailingCharacters, 1, 3)));
-        assert_eq!(last_event("{}a"),    Error(SyntaxError(TrailingCharacters, 1, 3)));
-    }
-    #[test]
-    fn test_read_identifiers_streaming() {
-        assert_eq!(Parser::new("null".chars()).next(), Some(NullValue));
-        assert_eq!(Parser::new("true".chars()).next(), Some(BooleanValue(true)));
-        assert_eq!(Parser::new("false".chars()).next(), Some(BooleanValue(false)));
-
-        assert_eq!(last_event("n"),    Error(SyntaxError(InvalidSyntax, 1, 2)));
-        assert_eq!(last_event("nul"),  Error(SyntaxError(InvalidSyntax, 1, 4)));
-        assert_eq!(last_event("t"),    Error(SyntaxError(InvalidSyntax, 1, 2)));
-        assert_eq!(last_event("truz"), Error(SyntaxError(InvalidSyntax, 1, 4)));
-        assert_eq!(last_event("f"),    Error(SyntaxError(InvalidSyntax, 1, 2)));
-        assert_eq!(last_event("faz"),  Error(SyntaxError(InvalidSyntax, 1, 3)));
-    }
-
-    #[test]
-    fn test_stack() {
-        let mut stack = Stack::new();
-
-        assert!(stack.is_empty());
-        assert!(stack.len() == 0);
-        assert!(!stack.last_is_index());
-
-        stack.push_index(0);
-        stack.bump_index();
-
-        assert!(stack.len() == 1);
-        assert!(stack.is_equal_to(&[Index(1)]));
-        assert!(stack.starts_with(&[Index(1)]));
-        assert!(stack.ends_with(&[Index(1)]));
-        assert!(stack.last_is_index());
-        assert!(stack.get(0) == Index(1));
-
-        stack.push_key("foo".to_string());
-
-        assert!(stack.len() == 2);
-        assert!(stack.is_equal_to(&[Index(1), Key("foo")]));
-        assert!(stack.starts_with(&[Index(1), Key("foo")]));
-        assert!(stack.starts_with(&[Index(1)]));
-        assert!(stack.ends_with(&[Index(1), Key("foo")]));
-        assert!(stack.ends_with(&[Key("foo")]));
-        assert!(!stack.last_is_index());
-        assert!(stack.get(0) == Index(1));
-        assert!(stack.get(1) == Key("foo"));
-
-        stack.push_key("bar".to_string());
-
-        assert!(stack.len() == 3);
-        assert!(stack.is_equal_to(&[Index(1), Key("foo"), Key("bar")]));
-        assert!(stack.starts_with(&[Index(1)]));
-        assert!(stack.starts_with(&[Index(1), Key("foo")]));
-        assert!(stack.starts_with(&[Index(1), Key("foo"), Key("bar")]));
-        assert!(stack.ends_with(&[Key("bar")]));
-        assert!(stack.ends_with(&[Key("foo"), Key("bar")]));
-        assert!(stack.ends_with(&[Index(1), Key("foo"), Key("bar")]));
-        assert!(!stack.last_is_index());
-        assert!(stack.get(0) == Index(1));
-        assert!(stack.get(1) == Key("foo"));
-        assert!(stack.get(2) == Key("bar"));
-
-        stack.pop();
-
-        assert!(stack.len() == 2);
-        assert!(stack.is_equal_to(&[Index(1), Key("foo")]));
-        assert!(stack.starts_with(&[Index(1), Key("foo")]));
-        assert!(stack.starts_with(&[Index(1)]));
-        assert!(stack.ends_with(&[Index(1), Key("foo")]));
-        assert!(stack.ends_with(&[Key("foo")]));
-        assert!(!stack.last_is_index());
-        assert!(stack.get(0) == Index(1));
-        assert!(stack.get(1) == Key("foo"));
-    }
-
-    #[test]
-    fn test_to_json() {
-        use std::collections::{HashMap,BTreeMap};
-        use super::ToJson;
-
-        let array2 = Array(vec!(I64(1), I64(2)));
-        let array3 = Array(vec!(I64(1), I64(2), I64(3)));
-        let object = {
-            let mut tree_map = BTreeMap::new();
-            tree_map.insert("a".to_string(), U64(1));
-            tree_map.insert("b".to_string(), U64(2));
-            Object(tree_map)
-        };
-
-        assert_eq!(array2.to_json(), array2);
-        assert_eq!(object.to_json(), object);
-        assert_eq!(3_isize.to_json(), I64(3));
-        assert_eq!(4_i8.to_json(), I64(4));
-        assert_eq!(5_i16.to_json(), I64(5));
-        assert_eq!(6_i32.to_json(), I64(6));
-        assert_eq!(7_i64.to_json(), I64(7));
-        assert_eq!(8_usize.to_json(), U64(8));
-        assert_eq!(9_u8.to_json(), U64(9));
-        assert_eq!(10_u16.to_json(), U64(10));
-        assert_eq!(11_u32.to_json(), U64(11));
-        assert_eq!(12_u64.to_json(), U64(12));
-        assert_eq!(13.0_f32.to_json(), F64(13.0_f64));
-        assert_eq!(14.0_f64.to_json(), F64(14.0_f64));
-        assert_eq!(().to_json(), Null);
-        assert_eq!(f32::INFINITY.to_json(), Null);
-        assert_eq!(f64::NAN.to_json(), Null);
-        assert_eq!(true.to_json(), Boolean(true));
-        assert_eq!(false.to_json(), Boolean(false));
-        assert_eq!("abc".to_json(), String("abc".to_string()));
-        assert_eq!("abc".to_string().to_json(), String("abc".to_string()));
-        assert_eq!((1, 2).to_json(), array2);
-        assert_eq!((1, 2, 3).to_json(), array3);
-        assert_eq!([1, 2].to_json(), array2);
-        assert_eq!((&[1, 2, 3]).to_json(), array3);
-        assert_eq!((vec![1, 2]).to_json(), array2);
-        assert_eq!(vec!(1, 2, 3).to_json(), array3);
-        let mut tree_map = BTreeMap::new();
-        tree_map.insert("a".to_string(), 1 as u32);
-        tree_map.insert("b".to_string(), 2);
-        assert_eq!(tree_map.to_json(), object);
-        let mut hash_map = HashMap::new();
-        hash_map.insert("a".to_string(), 1 as u32);
-        hash_map.insert("b".to_string(), 2);
-        assert_eq!(hash_map.to_json(), object);
-        assert_eq!(Some(15).to_json(), I64(15));
-        assert_eq!(Some(15 as u32).to_json(), U64(15));
-        assert_eq!(None::<isize>.to_json(), Null);
-    }
-
-    #[test]
-    fn test_encode_hashmap_with_arbitrary_key() {
-        use std::collections::HashMap;
-        #[derive(PartialEq, Eq, Hash, RustcEncodable)]
-        struct ArbitraryType(u32);
-        let mut hm: HashMap<ArbitraryType, bool> = HashMap::new();
-        hm.insert(ArbitraryType(1), true);
-        let mut mem_buf = string::String::new();
-        let mut encoder = Encoder::new(&mut mem_buf);
-        let result = hm.encode(&mut encoder);
-        match result.err().unwrap() {
-            EncoderError::BadHashmapKey => (),
-            _ => panic!("expected bad hash map key")
-        }
-    }
-
-    #[test]
-    fn test_encode_decode_phantom_data() {
-        use std::marker::PhantomData;
-
-        #[derive(Debug, RustcDecodable, RustcEncodable, Eq, PartialEq)]
-        struct Foo<P> {
-            phantom_data: PhantomData<P>
-        }
-
-        let f: Foo<u8> = Foo {
-            phantom_data: PhantomData
-        };
-        let s = super::encode(&f).unwrap();
-        let d: Foo<u8> = super::decode(&s).unwrap();
-        assert_eq!(f, d);
-    }
-
-    #[test]
-    fn test_bad_json_stack_depleted() {
-        use json;
-        #[derive(Debug, RustcDecodable)]
-        enum ChatEvent {
-            Variant(i32)
-        }
-        let serialized = "{\"variant\": \"Variant\", \"fields\": []}";
-        let r: Result<ChatEvent, _> = json::decode(serialized);
-        assert!(r.unwrap_err() == EOF);
-    }
-
-    #[test]
-    fn fixed_length_array() {
-        #[derive(Debug, RustcDecodable, RustcEncodable, Eq, PartialEq)]
-        struct Foo {
-            a: [u8; 1],
-            b: [i32; 2],
-            c: [u64; 3],
-        }
-        let f = Foo {
-            a: [0],
-            b: [1, 2],
-            c: [3, 4, 5],
-        };
-        let s = super::encode(&f).unwrap();
-        let d = super::decode(&s).unwrap();
-        assert_eq!(f, d);
-    }
-
-    #[test]
-    fn test_unexpected_token() {
-        match Json::from_str("{\"\":\"\",\"\":{\"\":\"\",\"\":[{\"\":\"\",}}}") {
-            Err(e) => assert_eq!(e, SyntaxError(InvalidSyntax, 1, 32)),
-            _ => ()
-        };
-    }
-}
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/src/lib.rs
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Support code for encoding and decoding types.
-//!
-//! # Usage
-//!
-//! This crate is [on crates.io](https://crates.io/crates/rustc-serialize) and
-//! can be used by adding `rustc-serialize` to the dependencies in your
-//! project's `Cargo.toml`.
-//!
-//! ```toml
-//! [dependencies]
-//! rustc-serialize = "0.3"
-//! ```
-//!
-//! and this to your crate root:
-//!
-//! ```rust
-//! extern crate rustc_serialize;
-//! ```
-
-#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
-       html_favicon_url = "https://www.rust-lang.org/favicon.ico",
-       html_root_url = "https://doc.rust-lang.org/rustc-serialize/")]
-#![cfg_attr(test, deny(warnings))]
-#![allow(trivial_numeric_casts)]
-#![cfg_attr(rust_build, feature(staged_api))]
-#![cfg_attr(rust_build, staged_api)]
-#![cfg_attr(rust_build,
-            unstable(feature = "rustc_private",
-                     reason = "use the crates.io `rustc-serialize` library instead"))]
-
-#[cfg(test)] extern crate rand;
-
-pub use self::serialize::{Decoder, Encoder, Decodable, Encodable,
-                          DecoderHelpers, EncoderHelpers};
-
-
-// Limit collections from allocating more than
-// 1 MB for calls to `with_capacity`.
-fn cap_capacity<T>(given_len: usize) -> usize {
-    use std::cmp::min;
-    use std::mem::size_of;
-    const PRE_ALLOCATE_CAP: usize = 0x100000;
-
-    match size_of::<T>() {
-        0 => min(given_len, PRE_ALLOCATE_CAP),
-        n => min(given_len, PRE_ALLOCATE_CAP / n)
-    }
-}
-
-mod serialize;
-mod collection_impls;
-
-pub mod base64;
-pub mod hex;
-pub mod json;
-
-mod rustc_serialize {
-    pub use serialize::*;
-}
deleted file mode 100644
--- a/third_party/rust/rustc-serialize-0.3.22/src/serialize.rs
+++ /dev/null
@@ -1,1671 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Support code for encoding and decoding types.
-//!
-//! In order to allow extensibility in both what types can be encoded and how
-//! they are encoded, encoding and decoding are split into two part each. An
-//! implementation of the Encodable trait knows how to turn a specific type into
-//! a generic form, and then uses an implementation of the Encoder trait to turn
-//! this into concrete output (such as a JSON string). Decoder and Decodable do
-//! the same for decoding.
-
-/*
-Core encoding and decoding interfaces.
-*/
-
-use std::cell::{Cell, RefCell};
-use std::ffi::OsString;
-use std::path;
-use std::rc::Rc;
-use std::sync::Arc;
-use std::marker::PhantomData;
-use std::borrow::Cow;
-
-use cap_capacity;
-
-/// Trait for writing out an encoding when serializing.
-///
-/// This trait provides methods to encode basic types and generic forms of
-/// collections.  Implementations of `Encodable` use it to perform the actual
-/// encoding of a type.
-///
-/// It is unspecified what is done with the encoding - it could be stored in a
-/// variable, or written directly to a file, for example.
-///
-/// Encoders can expect to only have a single "root" method call made on this
-/// trait. Non-trivial types will call one of the collection-emitting methods,
-/// passing a function that may call other methods on the trait, but once the
-/// collection-emitting method has returned, encoding should be complete.
-pub trait Encoder {
-    /// The error type for method results.
-    type Error;
-
-    // Primitive types:
-    /// Emit a nil value.
-    ///
-    /// For example, this might be stored as the null keyword in JSON.
-    fn emit_nil(&mut self) -> Result<(), Self::Error>;
-
-    /// Emit a usize value.
-    fn emit_usize(&mut self, v: usize) -> Result<(), Self::Error>;
-
-    /// Emit a u64 value.
-    fn emit_u64(&mut self, v: u64) -> Result<(), Self::Error>;
-
-    /// Emit a u32 value.
-    fn emit_u32(&mut self, v: u32) -> Result<(), Self::Error>;
-
-    /// Emit a u16 value.
-    fn emit_u16(&mut self, v: u16) -> Result<(), Self::Error>;
-
-    /// Emit a u8 value.
-    fn emit_u8(&mut self, v: u8) -> Result<(), Self::Error>;
-
-    /// Emit a isize value.
-    fn emit_isize(&mut self, v: isize) -> Result<(), Self::Error>;
-
-    /// Emit a i64 value.
-    fn emit_i64(&mut self, v: i64) -> Result<(), Self::Error>;
-
-    /// Emit a i32 value.
-    fn emit_i32(&mut self, v: i32) -> Result<(), Self::Error>;
-
-    /// Emit a i16 value.
-    fn emit_i16(&mut self, v: i16) -> Result<(), Self::Error>;
-
-    /// Emit a i8 value.
-    fn emit_i8(&mut self, v: i8) -> Result<(), Self::Error>;
-
-    /// Emit a bool value.
-    ///
-    /// For example, this might be stored as the true and false keywords in
-    /// JSON.
-    fn emit_bool(&mut self, v: bool) -> Result<(), Self::Error>;
-
-    /// Emit a f64 value.
-    fn emit_f64(&mut self, v: f64) -> Result<(), Self::Error>;
-
-    /// Emit a f32 value.
-    fn emit_f32(&mut self, v: f32) -> Result<(), Self::Error>;
-
-    /// Emit a char value.
-    ///
-    /// Note that strings should be emitted using `emit_str`, not as a sequence
-    /// of `emit_char` calls.
-    fn emit_char(&mut self, v: char) -> Result<(), Self::Error>;
-
-    /// Emit a string value.
-    fn emit_str(&mut self, v: &str) -> Result<(), Self::Error>;
-
-    // Compound types:
-    /// Emit an enumeration value.
-    ///
-    /// * `name` indicates the enumeration type name.
-    /// * `f` is a function that will call `emit_enum_variant` or
-    ///   `emit_enum_struct_variant` as appropriate to write the actual value.
-    fn emit_enum<F>(&mut self, name: &str, f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit a enumeration variant value with no or unnamed data.
-    ///
-    /// This should only be called from a function passed to `emit_enum`.
-    /// Variants with named data should use `emit_enum_struct_variant`.
-    ///
-    /// * `v_name` is the variant name
-    /// * `v_id` is the numeric identifier for the variant.
-    /// * `len` is the number of data items associated with the variant.
-    /// * `f` is a function that will call `emit_enum_variant_arg` for each data
-    ///   item. It may not be called if len is 0.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use rustc_serialize::Encodable;
-    /// use rustc_serialize::Encoder;
-    ///
-    /// enum Message {
-    ///     Quit,
-    ///     ChangeColor(i32, i32, i32),
-    /// }
-    ///
-    /// impl Encodable for Message {
-    ///     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-    ///         s.emit_enum("Message", |s| {
-    ///             match *self {
-    ///                 Message::Quit => {
-    ///                     s.emit_enum_variant("Quit", 0, 0, |s| Ok(()))
-    ///                 }
-    ///                 Message::ChangeColor(r, g, b) => {
-    ///                     s.emit_enum_variant("ChangeColor", 1, 3, |s| {
-    ///                         try!(s.emit_enum_variant_arg(0, |s| {
-    ///                             s.emit_i32(r)
-    ///                         }));
-    ///                         try!(s.emit_enum_variant_arg(1, |s| {
-    ///                             s.emit_i32(g)
-    ///                         }));
-    ///                         try!(s.emit_enum_variant_arg(2, |s| {
-    ///                             s.emit_i32(b)
-    ///                         }));
-    ///                         Ok(())
-    ///                     })
-    ///                 }
-    ///             }
-    ///         })
-    ///     }
-    /// }
-    /// ```
-    fn emit_enum_variant<F>(&mut self, v_name: &str,
-                            v_id: usize,
-                            len: usize,
-                            f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit an unnamed data item for an enumeration variant.
-    ///
-    /// This should only be called from a function passed to
-    /// `emit_enum_variant`.
-    ///
-    /// * `a_idx` is the (zero-based) index of the data item.
-    /// * `f` is a function that will call the appropriate emit method to encode
-    ///   the data object.
-    ///
-    /// Note that variant data items must be emitted in order - starting with
-    /// index `0` and finishing with index `len-1`.
-    fn emit_enum_variant_arg<F>(&mut self, a_idx: usize, f: F)
-                                -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit a enumeration variant value with no or named data.
-    ///
-    /// This should only be called from a function passed to `emit_enum`.
-    /// Variants with unnamed data should use `emit_enum_variant`.
-    ///
-    /// * `v_name` is the variant name.
-    /// * `v_id` is the numeric identifier for the variant.
-    /// * `len` is the number of data items associated with the variant.
-    /// * `f` is a function that will call `emit_enum_struct_variant_field` for
-    ///   each data item. It may not be called if `len` is `0`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use rustc_serialize::Encodable;
-    /// use rustc_serialize::Encoder;
-    ///
-    /// enum Message {
-    ///     Quit,
-    ///     Move { x: i32, y: i32 },
-    /// }
-    ///
-    /// impl Encodable for Message {
-    ///     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-    ///         s.emit_enum("Message", |s| {
-    ///             match *self {
-    ///                 Message::Quit => {
-    ///                     s.emit_enum_struct_variant("Quit", 0, 0, |s| Ok(()))
-    ///                 }
-    ///                 Message::Move { x: x, y: y } => {
-    ///                     s.emit_enum_struct_variant("Move", 1, 2, |s| {
-    ///                         try!(s.emit_enum_struct_variant_field("x", 0, |s| {
-    ///                             s.emit_i32(x)
-    ///                         }));
-    ///                         try!(s.emit_enum_struct_variant_field("y", 1, |s| {
-    ///                             s.emit_i32(y)
-    ///                         }));
-    ///                         Ok(())
-    ///                     })
-    ///                 }
-    ///             }
-    ///         })
-    ///     }
-    /// }
-    /// ```
-    fn emit_enum_struct_variant<F>(&mut self, v_name: &str,
-                                   v_id: usize,
-                                   len: usize,
-                                   f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit a named data item for an enumeration variant.
-    ///
-    /// This should only be called from a function passed to
-    /// `emit_enum_struct_variant`.
-    ///
-    /// * `f_name` is the name of the data item field.
-    /// * `f_idx` is its (zero-based) index.
-    /// * `f` is a function that will call the appropriate emit method to encode
-    ///   the data object.
-    ///
-    /// Note that fields must be emitted in order - starting with index `0` and
-    /// finishing with index `len-1`.
-    fn emit_enum_struct_variant_field<F>(&mut self,
-                                         f_name: &str,
-                                         f_idx: usize,
-                                         f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit a struct value.
-    ///
-    /// * `name` is the name of the struct.
-    /// * `len` is the number of members.
-    /// * `f` is a function that calls `emit_struct_field` for each member.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use rustc_serialize::Encodable;
-    /// use rustc_serialize::Encoder;
-    ///
-    /// struct Point {
-    ///     x: i32,
-    ///     y: i32,
-    /// }
-    ///
-    /// impl Encodable for Point {
-    ///     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-    ///         s.emit_struct("Point", 2, |s| {
-    ///             try!(s.emit_struct_field("x", 0, |s| {
-    ///                 s.emit_i32(self.x)
-    ///             }));
-    ///             try!(s.emit_struct_field("y", 1, |s| {
-    ///                 s.emit_i32(self.y)
-    ///             }));
-    ///             Ok(())
-    ///         })
-    ///     }
-    /// }
-    /// ```
-    fn emit_struct<F>(&mut self, name: &str, len: usize, f: F)
-                      -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-    /// Emit a field item for a struct.
-    ///
-    /// This should only be called from a function passed to `emit_struct`.
-    ///
-    /// * `f_name` is the name of the data item field.
-    /// * `f_idx` is its (zero-based) index.
-    /// * `f` is a function that will call the appropriate emit method to encode
-    ///   the data object.
-    ///
-    /// Note that fields must be emitted in order - starting with index `0` and
-    /// finishing with index `len-1`.
-    fn emit_struct_field<F>(&mut self, f_name: &str, f_idx: usize, f: F)
-                            -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit a tuple value.
-    ///
-    /// * `len` is the number of items in the tuple.
-    /// * `f` is a function that calls `emit_tuple_arg` for each member.
-    ///
-    /// Note that external `Encodable` implementations should not normally need
-    /// to use this method directly; it is meant for the use of this module's
-    /// own implementation of `Encodable` for tuples.
-    fn emit_tuple<F>(&mut self, len: usize, f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit a data item for a tuple.
-    ///
-    /// This should only be called from a function passed to `emit_tuple`.
-    ///
-    /// * `idx` is the (zero-based) index of the data item.
-    /// * `f` is a function that will call the appropriate emit method to encode
-    ///   the data object.
-    ///
-    /// Note that tuple items must be emitted in order - starting with index `0`
-    /// and finishing with index `len-1`.
-    fn emit_tuple_arg<F>(&mut self, idx: usize, f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit a tuple struct value.
-    ///
-    /// * `name` is the name of the tuple struct.
-    /// * `len` is the number of items in the tuple struct.
-    /// * `f` is a function that calls `emit_tuple_struct_arg` for each member.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use rustc_serialize::Encodable;
-    /// use rustc_serialize::Encoder;
-    ///
-    /// struct Pair(i32,i32);
-    ///
-    /// impl Encodable for Pair {
-    ///     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-    ///         let Pair(first,second) = *self;
-    ///         s.emit_tuple_struct("Pair", 2, |s| {
-    ///             try!(s.emit_tuple_arg(0, |s| {
-    ///                 s.emit_i32(first)
-    ///             }));
-    ///             try!(s.emit_tuple_arg(1, |s| {
-    ///                 s.emit_i32(second)
-    ///             }));
-    ///             Ok(())
-    ///         })
-    ///     }
-    /// }
-    /// ```
-    fn emit_tuple_struct<F>(&mut self, name: &str, len: usize, f: F)
-                            -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit a data item for a tuple struct.
-    ///
-    /// This should only be called from a function passed to
-    /// `emit_tuple_struct`.
-    ///
-    /// * `f_idx` is the (zero-based) index of the data item.
-    /// * `f` is a function that will call the appropriate emit method to encode
-    ///   the data object.
-    ///
-    /// Note that tuple items must be emitted in order - starting with index `0`
-    /// and finishing with index `len-1`.
-    fn emit_tuple_struct_arg<F>(&mut self, f_idx: usize, f: F)
-                                -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    // Specialized types:
-    /// Emit an optional value.
-    ///
-    /// `f` is a function that will call either `emit_option_none` or
-    /// `emit_option_some` as appropriate.
-    ///
-    /// This method allows encoders to handle `Option<T>` values specially,
-    /// rather than using the generic enum methods, because many encoding
-    /// formats have a built-in "optional" concept.
-    ///
-    /// Note that external `Encodable` implementations should not normally need
-    /// to use this method directly; it is meant for the use of this module's
-    /// own implementation of `Encodable` for `Option<T>`.
-    fn emit_option<F>(&mut self, f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit the `None` optional value.
-    ///
-    /// This should only be called from a function passed to `emit_option`.
-    fn emit_option_none(&mut self) -> Result<(), Self::Error>;
-
-    /// Emit the `Some(x)` optional value.
-    ///
-    /// `f` is a function that will call the appropriate emit method to encode
-    /// the data object.
-    ///
-    /// This should only be called from a function passed to `emit_option`.
-    fn emit_option_some<F>(&mut self, f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit a sequence of values.
-    ///
-    /// This should be used for both array-like ordered sequences and set-like
-    /// unordered ones.
-    ///
-    /// * `len` is the number of values in the sequence.
-    /// * `f` is a function that will call `emit_seq_elt` for each value in the
-    ///   sequence.
-    fn emit_seq<F>(&mut self, len: usize, f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit an element in a sequence.
-    ///
-    /// This should only be called from a function passed to `emit_seq`.
-    ///
-    /// * `idx` is the (zero-based) index of the value in the sequence.
-    /// * `f` is a function that will call the appropriate emit method to encode
-    ///   the data object.
-    ///
-    /// Note that sequence elements must be emitted in order - starting with
-    /// index `0` and finishing with index `len-1`.
-    fn emit_seq_elt<F>(&mut self, idx: usize, f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit an associative container (map).
-    ///
-    /// * `len` is the number of entries in the map.
-    /// * `f` is a function that will call `emit_map_elt_key` and
-    ///   `emit_map_elt_val` for each entry in the map.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use rustc_serialize::Encodable;
-    /// use rustc_serialize::Encoder;
-    ///
-    /// struct SimpleMap<K,V> {
-    ///     entries: Vec<(K,V)>,
-    /// }
-    ///
-    /// impl<K:Encodable,V:Encodable> Encodable for SimpleMap<K,V> {
-    ///     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-    ///         s.emit_map(self.entries.len(), |s| {
-    ///             for (i, e) in self.entries.iter().enumerate() {
-    ///                 let (ref k, ref v) = *e;
-    ///                 try!(s.emit_map_elt_key(i, |s| k.encode(s)));
-    ///                 try!(s.emit_map_elt_val(i, |s| v.encode(s)));
-    ///             }
-    ///             Ok(())
-    ///         })
-    ///     }
-    /// }
-    /// ```
-    fn emit_map<F>(&mut self, len: usize, f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit the key for an entry in a map.
-    ///
-    /// This should only be called from a function passed to `emit_map`.
-    ///
-    /// * `idx` is the (zero-based) index of the entry in the map
-    /// * `f` is a function that will call the appropriate emit method to encode
-    ///   the key.
-    ///
-    /// Note that map entries must be emitted in order - starting with index `0`
-    /// and finishing with index `len-1` - and for each entry, the key should be
-    /// emitted followed immediately by the value.
-    fn emit_map_elt_key<F>(&mut self, idx: usize, f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-
-    /// Emit the value for an entry in a map.
-    ///
-    /// This should only be called from a function passed to `emit_map`.
-    ///
-    /// * `idx` is the (zero-based) index of the entry in the map
-    /// * `f` is a function that will call the appropriate emit method to encode
-    ///   the value.
-    ///
-    /// Note that map entries must be emitted in order - starting with index `0`
-    /// and finishing with index `len-1` - and for each entry, the key should be
-    /// emitted followed immediately by the value.
-    fn emit_map_elt_val<F>(&mut self, idx: usize, f: F) -> Result<(), Self::Error>
-        where F: FnOnce(&mut Self) -> Result<(), Self::Error>;
-}
-
-/// Trait for reading in an encoding for deserialization.
-///
-/// This trait provides methods to decode basic types and generic forms of
-/// collections.  Implementations of `Decodable` use it to perform the actual
-/// decoding of a type.
-///
-/// Note that, as is typical with deserialization, the design of this API
-/// assumes you know in advance the form of the data you are decoding (ie: what
-/// type is encoded).
-///
-/// Decoders can expect to only have a single "root" method call made on this
-/// trait. Non-trivial types will call one of the collection-reading methods,
-/// passing a function that may call other methods on the trait, but once the
-/// collection-reading method has returned, decoding should be complete.
-pub trait Decoder {
-    /// The error type for method results.
-    type Error;
-
-    // Primitive types:
-    /// Read a nil value.
-    fn read_nil(&mut self) -> Result<(), Self::Error>;
-
-    /// Read a usize value.
-    fn read_usize(&mut self) -> Result<usize, Self::Error>;
-
-    /// Read a u64 value.
-    fn read_u64(&mut self) -> Result<u64, Self::Error>;
-
-    /// Read a u32 value.
-    fn read_u32(&mut self) -> Result<u32, Self::Error>;
-
-    /// Read a u16 value.
-    fn read_u16(&mut self) -> Result<u16, Self::Error>;
-
-    /// Read a u8 value.
-    fn read_u8(&mut self) -> Result<u8, Self::Error>;
-
-    /// Read a isize value.
-    fn read_isize(&mut self) -> Result<isize, Self::Error>;
-
-    /// Read a i64 value.
-    fn read_i64(&mut self) -> Result<i64, Self::Error>;
-
-    /// Read a i32 value.
-    fn read_i32(&mut self) -> Result<i32, Self::Error>;
-
-    /// Read a i16 value.
-    fn read_i16(&mut self) -> Result<i16, Self::Error>;
-
-    /// Read a i8 value.
-    fn read_i8(&mut self) -> Result<i8, Self::Error>;
-
-    /// Read a bool value.
-    fn read_bool(&mut self) -> Result<bool, Self::Error>;
-
-    /// Read a f64 value.
-    fn read_f64(&mut self) -> Result<f64, Self::Error>;
-
-    /// Read a f32 value.
-    fn read_f32(&mut self) -> Result<f32, Self::Error>;
-
-    /// Read a char value.
-    fn read_char(&mut self) -> Result<char, Self::Error>;
-
-    /// Read a string value.
-    fn read_str(&mut self) -> Result<String, Self::Error>;
-
-    // Compound types:
-    /// Read an enumeration value.
-    ///
-    /// * `name` indicates the enumeration type name. It may be used to
-    ///   sanity-check the data being read.
-    /// * `f` is a function that will call `read_enum_variant` (or
-    ///   `read_enum_struct_variant`) to read the actual value.
-    fn read_enum<T, F>(&mut self, name: &str, f: F) -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
-
-    /// Read an enumeration value.
-    ///
-    /// * `names` is a list of the enumeration variant names.
-    /// * `f` is a function that will call `read_enum_variant_arg` or
-    ///   `read_enum_struct_variant_field` as appropriate to read the
-    ///   associated values. It will be passed the index into `names` for the
-    ///   variant that is encoded.
-    fn read_enum_variant<T, F>(&mut self, names: &[&str], f: F)
-                               -> Result<T, Self::Error>
-        where F: FnMut(&mut Self, usize) -> Result<T, Self::Error>;
-
-    /// Read an unnamed data item for an enumeration variant.
-    ///
-    /// This should only be called from a function passed to `read_enum_variant`
-    /// or `read_enum_struct_variant`, and only when the index provided to that
-    /// function indicates that the variant has associated unnamed data. It
-    /// should be called once for each associated data item.
-    ///
-    /// * `a_idx` is the (zero-based) index of the data item.
-    /// * `f` is a function that will call the appropriate read method to deocde
-    ///   the data object.
-    ///
-    /// Note that variant data items must be read in order - starting with index
-    /// `0` and finishing with index `len-1`. Implementations may use `a_idx`,
-    /// the call order or both to select the correct data to decode.
-    fn read_enum_variant_arg<T, F>(&mut self, a_idx: usize, f: F)
-                                   -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
-
-    /// Read an enumeration value.
-    ///
-    /// This is identical to `read_enum_variant`, and is only provided for
-    /// symmetry with the `Encoder` API.
-    fn read_enum_struct_variant<T, F>(&mut self, names: &[&str], f: F)
-                                      -> Result<T, Self::Error>
-        where F: FnMut(&mut Self, usize) -> Result<T, Self::Error>;
-
-    /// Read a named data item for an enumeration variant.
-    ///
-    /// This should only be called from a function passed to `read_enum_variant`
-    /// or `read_enum_struct_variant`, and only when the index provided to that
-    /// function indicates that the variant has associated named data. It should
-    /// be called once for each associated field.
-    ///
-    /// * `f_name` is the name of the field.
-    /// * `f_idx` is the (zero-based) index of the data item.
-    /// * `f` is a function that will call the appropriate read method to deocde
-    ///   the data object.
-    ///
-    /// Note that fields must be read in order - starting with index `0` and
-    /// finishing with index `len-1`. Implementations may use `f_idx`, `f_name`,
-    /// the call order or any combination to choose the correct data to decode,
-    /// and may (but are not required to) return an error if these are
-    /// inconsistent.
-    fn read_enum_struct_variant_field<T, F>(&mut self,
-                                            f_name: &str,
-                                            f_idx: usize,
-                                            f: F)
-                                            -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
-
-    /// Read an struct value.
-    ///
-    /// * `s_name` indicates the struct type name. It may be used to
-    ///   sanity-check the data being read.
-    /// * `len` indicates the number of fields in the struct.
-    /// * `f` is a function that will call `read_struct_field` for each field in
-    ///   the struct.
-    fn read_struct<T, F>(&mut self, s_name: &str, len: usize, f: F)
-                         -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
-
-    /// Read a field for a struct value.
-    ///
-    /// This should only be called from a function passed to `read_struct`. It
-    /// should be called once for each associated field.
-    ///
-    /// * `f_name` is the name of the field.
-    /// * `f_idx` is the (zero-based) index of the data item.
-    /// * `f` is a function that will call the appropriate read method to deocde
-    ///   the data object.
-    ///
-    /// Note that fields must be read in order - starting with index `0` and
-    /// finishing with index `len-1`. Implementations may use `f_idx`, `f_name`,
-    /// the call order or any combination to choose the correct data to decode,
-    /// and may (but are not required to) return an error if these are
-    /// inconsistent.
-    fn read_struct_field<T, F>(&mut self,
-                               f_name: &str,
-                               f_idx: usize,
-                               f: F)
-                               -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
-
-    /// Read a tuple value.
-    ///
-    /// * `len` is the number of items in the tuple.
-    /// * `f` is a function that will call `read_tuple_arg` for each item in the
-    ///   tuple.
-    ///
-    /// Note that external `Decodable` implementations should not normally need
-    /// to use this method directly; it is meant for the use of this module's
-    /// own implementation of `Decodable` for tuples.
-    fn read_tuple<T, F>(&mut self, len: usize, f: F) -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
-
-    /// Read a data item for a tuple.
-    ///
-    /// This should only be called from a function passed to `read_tuple`.
-    ///
-    /// * `a_idx` is the (zero-based) index of the data item.
-    /// * `f` is a function that will call the appropriate read method to encode
-    ///   the data object.
-    ///
-    /// Note that tuple items must be read in order - starting with index `0`
-    /// and finishing with index `len-1`.
-    fn read_tuple_arg<T, F>(&mut self, a_idx: usize, f: F)
-                            -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
-
-    /// Read a tuple struct value.
-    ///
-    /// * `s_name` is the name of the tuple struct.
-    /// * `len` is the number of items in the tuple struct.
-    /// * `f` is a function that calls `read_tuple_struct_arg` for each member.
-    fn read_tuple_struct<T, F>(&mut self, s_name: &str, len: usize, f: F)
-                               -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
-
-    /// Read a data item for a tuple struct.
-    ///
-    /// This should only be called from a function passed to
-    /// `read_tuple_struct`.
-    ///
-    /// * `a_idx` is the (zero-based) index of the data item.
-    /// * `f` is a function that will call the appropriate read method to encode
-    ///   the data object.
-    ///
-    /// Note that tuple struct items must be read in order - starting with index
-    /// `0` and finishing with index `len-1`.
-    fn read_tuple_struct_arg<T, F>(&mut self, a_idx: usize, f: F)
-                                   -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
-
-    // Specialized types:
-    /// Read an optional value.
-    ///
-    /// `f` is a function that will will be passed be passed `false` if the
-    /// value is unset, and `true` if it is set. If the function is passed
-    /// `true`, it will call the appropriate read methods to read the associated
-    /// data type.
-    ///
-    /// This method allows decoders to handle `Option<T>` values specially,
-    /// rather than using the generic enum methods, because many encoding
-    /// formats have a built-in "optional" concept.
-    ///
-    /// Note that external `Decodable` implementations should not normally need
-    /// to use this method directly; it is meant for the use of this module's
-    /// own implementation of `Decodable` for `Option<T>`.
-    fn read_option<T, F>(&mut self, f: F) -> Result<T, Self::Error>
-        where F: FnMut(&mut Self, bool) -> Result<T, Self::Error>;
-
-    /// Read a sequence of values.
-    ///
-    /// This should be used for both array-like ordered sequences and set-like
-    /// unordered ones.
-    ///
-    /// * `f` is a function that will be passed the length of the sequence, and
-    ///   will call `read_seq_elt` for each value in the sequence.
-    fn read_seq<T, F>(&mut self, f: F) -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self, usize) -> Result<T, Self::Error>;
-
-    /// Read an element in the sequence.
-    ///
-    /// This should only be called from a function passed to `read_seq`.
-    ///
-    /// * `idx` is the (zero-based) index of the value in the sequence.
-    /// * `f` is a function that will call the appropriate read method to decode
-    ///   the data object.
-    ///
-    /// Note that sequence elements must be read in order - starting with index
-    /// `0` and finishing with index `len-1`.
-    fn read_seq_elt<T, F>(&mut self, idx: usize, f: F) -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
-
-    /// Read an associative container (map).
-    ///
-    /// * `f` is a function that will be passed the number of entries in the
-    ///   map, and will call `read_map_elt_key` and `read_map_elt_val` to decode
-    ///   each entry.
-    fn read_map<T, F>(&mut self, f: F) -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self, usize) -> Result<T, Self::Error>;
-
-    /// Read the key for an entry in a map.
-    ///
-    /// This should only be called from a function passed to `read_map`.
-    ///
-    /// * `idx` is the (zero-based) index of the entry in the map
-    /// * `f` is a function that will call the appropriate read method to decode
-    ///   the key.
-    ///
-    /// Note that map entries must be read in order - starting with index `0`
-    /// and finishing with index `len-1` - and for each entry, the key should be
-    /// read followed immediately by the value.
-    fn read_map_elt_key<T, F>(&mut self, idx: usize, f: F)
-                              -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
-
-    /// Read the value for an entry in a map.
-    ///
-    /// This should only be called from a function passed to `read_map`.
-    ///
-    /// * `idx` is the (zero-based) index of the entry in the map
-    /// * `f` is a function that will call the appropriate read method to decode
-    ///   the value.
-    ///
-    /// Note that map entries must be read in order - starting with index `0`
-    /// and finishing with index `len-1` - and for each entry, the key should be
-    /// read followed immediately by the value.
-    fn read_map_elt_val<T, F>(&mut self, idx: usize, f: F)
-                              -> Result<T, Self::Error>
-        where F: FnOnce(&mut Self) -> Result<T, Self::Error>;
-
-    // Failure
-    /// Record a decoding error.
-    ///
-    /// This allows `Decodable` implementations to report an error using a
-    /// `Decoder` implementation's error type when inconsistent data is read.
-    /// For example, when reading a fixed-length array and the wrong length is
-    /// given by `read_seq`.
-    fn error(&mut self, err: &str) -> Self::Error;
-}
-
-/// Trait for serializing a type.
-///
-/// This can be implemented for custom data types to allow them to be encoded
-/// with `Encoder` implementations. Most of Rust's built-in or standard data
-/// types (like `i32` and `Vec<T>`) have `Encodable` implementations provided by
-/// this module.
-///
-/// Note that, in general, you should let the compiler implement this for you by
-/// using the `derive(RustcEncodable)` attribute.
-///
-/// # Examples
-///
-/// ```rust
-/// extern crate rustc_serialize;
-///
-/// #[derive(RustcEncodable)]
-/// struct Point {
-///     x: i32,
-///     y: i32,
-/// }
-/// # fn main() {}
-/// ```
-///
-/// This generates code equivalent to:
-///
-/// ```rust
-/// extern crate rustc_serialize;
-/// use rustc_serialize::Encodable;
-/// use rustc_serialize::Encoder;
-///
-/// struct Point {
-///     x: i32,
-///     y: i32,
-/// }
-///
-/// impl Encodable for Point {
-///     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-///         s.emit_struct("Point", 2, |s| {
-///             try!(s.emit_struct_field("x", 0, |s| {
-///                 s.emit_i32(self.x)
-///             }));
-///             try!(s.emit_struct_field("y", 1, |s| {
-///                 s.emit_i32(self.y)
-///             }));
-///             Ok(())
-///         })
-///     }
-/// }
-/// # fn main() {}
-/// ```
-pub trait Encodable {
-    /// Serialize a value using an `Encoder`.
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>;
-}
-
-/// Trait for deserializing a type.
-///
-/// This can be implemented for custom data types to allow them to be decoded
-/// with `Decoder` implementations. Most of Rust's built-in or standard data
-/// types (like `i32` and `Vec<T>`) have `Decodable` implementations provided by
-/// this module.
-///
-/// Note that, in general, you should let the compiler implement this for you by
-/// using the `derive(RustcDecodable)` attribute.
-///
-/// # Examples
-///
-/// ```rust
-/// extern crate rustc_serialize;
-///
-/// #[derive(RustcDecodable)]
-/// struct Point {
-///     x: i32,
-///     y: i32,
-/// }
-/// # fn main() {}
-/// ```
-///
-/// This generates code equivalent to:
-///
-/// ```rust
-/// extern crate rustc_serialize;
-/// use rustc_serialize::Decodable;
-/// use rustc_serialize::Decoder;
-///
-/// struct Point {
-///     x: i32,
-///     y: i32,
-/// }
-///
-/// impl Decodable for Point {
-///     fn decode<D: Decoder>(d: &mut D) -> Result<Point, D::Error> {
-///         d.read_struct("Point", 2, |d| {
-///             let x = try!(d.read_struct_field("x", 0, |d| { d.read_i32() }));
-///             let y = try!(d.read_struct_field("y", 1, |d| { d.read_i32() }));
-///             Ok(Point{ x: x, y: y })
-///         })
-///     }
-/// }
-/// # fn main() {}
-/// ```
-pub trait Decodable: Sized {
-    /// Deserialize a value using a `Decoder`.
-    fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error>;
-}
-
-impl Encodable for usize {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_usize(*self)
-    }
-}
-
-impl Decodable for usize {
-    fn decode<D: Decoder>(d: &mut D) -> Result<usize, D::Error> {
-        d.read_usize()
-    }
-}
-
-impl Encodable for u8 {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_u8(*self)
-    }
-}
-
-impl Decodable for u8 {
-    fn decode<D: Decoder>(d: &mut D) -> Result<u8, D::Error> {
-        d.read_u8()
-    }
-}
-
-impl Encodable for u16 {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_u16(*self)
-    }
-}
-
-impl Decodable for u16 {
-    fn decode<D: Decoder>(d: &mut D) -> Result<u16, D::Error> {
-        d.read_u16()
-    }
-}
-
-impl Encodable for u32 {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_u32(*self)
-    }
-}
-
-impl Decodable for u32 {
-    fn decode<D: Decoder>(d: &mut D) -> Result<u32, D::Error> {
-        d.read_u32()
-    }
-}
-
-impl Encodable for u64 {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_u64(*self)
-    }
-}
-
-impl Decodable for u64 {
-    fn decode<D: Decoder>(d: &mut D) -> Result<u64, D::Error> {
-        d.read_u64()
-    }
-}
-
-impl Encodable for isize {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_isize(*self)
-    }
-}
-
-impl Decodable for isize {
-    fn decode<D: Decoder>(d: &mut D) -> Result<isize, D::Error> {
-        d.read_isize()
-    }
-}
-
-impl Encodable for i8 {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_i8(*self)
-    }
-}
-
-impl Decodable for i8 {
-    fn decode<D: Decoder>(d: &mut D) -> Result<i8, D::Error> {
-        d.read_i8()
-    }
-}
-
-impl Encodable for i16 {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_i16(*self)
-    }
-}
-
-impl Decodable for i16 {
-    fn decode<D: Decoder>(d: &mut D) -> Result<i16, D::Error> {
-        d.read_i16()
-    }
-}
-
-impl Encodable for i32 {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_i32(*self)
-    }
-}
-
-impl Decodable for i32 {
-    fn decode<D: Decoder>(d: &mut D) -> Result<i32, D::Error> {
-        d.read_i32()
-    }
-}
-
-impl Encodable for i64 {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_i64(*self)
-    }
-}
-
-impl Decodable for i64 {
-    fn decode<D: Decoder>(d: &mut D) -> Result<i64, D::Error> {
-        d.read_i64()
-    }
-}
-
-impl Encodable for str {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_str(self)
-    }
-}
-
-impl Encodable for String {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_str(self)
-    }
-}
-
-impl Decodable for String {
-    fn decode<D: Decoder>(d: &mut D) -> Result<String, D::Error> {
-        d.read_str()
-    }
-}
-
-impl Encodable for f32 {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_f32(*self)
-    }
-}
-
-impl Decodable for f32 {
-    fn decode<D: Decoder>(d: &mut D) -> Result<f32, D::Error> {
-        d.read_f32()
-    }
-}
-
-impl Encodable for f64 {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_f64(*self)
-    }
-}
-
-impl Decodable for f64 {
-    fn decode<D: Decoder>(d: &mut D) -> Result<f64, D::Error> {
-        d.read_f64()
-    }
-}
-
-impl Encodable for bool {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_bool(*self)
-    }
-}
-
-impl Decodable for bool {
-    fn decode<D: Decoder>(d: &mut D) -> Result<bool, D::Error> {
-        d.read_bool()
-    }
-}
-
-impl Encodable for char {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_char(*self)
-    }
-}
-
-impl Decodable for char {
-    fn decode<D: Decoder>(d: &mut D) -> Result<char, D::Error> {
-        d.read_char()
-    }
-}
-
-impl Encodable for () {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_nil()
-    }
-}
-
-impl Decodable for () {
-    fn decode<D: Decoder>(d: &mut D) -> Result<(), D::Error> {
-        d.read_nil()
-    }
-}
-
-impl<'a, T: ?Sized + Encodable> Encodable for &'a T {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        (**self).encode(s)
-    }
-}
-
-impl<T: ?Sized + Encodable> Encodable for Box<T> {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        (**self).encode(s)
-    }
-}
-
-impl< T: Decodable> Decodable for Box<T> {
-    fn decode<D: Decoder>(d: &mut D) -> Result<Box<T>, D::Error> {
-        Ok(Box::new(try!(Decodable::decode(d))))
-    }
-}
-
-impl< T: Decodable> Decodable for Box<[T]> {
-    fn decode<D: Decoder>(d: &mut D) -> Result<Box<[T]>, D::Error> {
-        let v: Vec<T> = try!(Decodable::decode(d));
-        Ok(v.into_boxed_slice())
-    }
-}
-
-impl<T:Encodable> Encodable for Rc<T> {
-    #[inline]
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        (**self).encode(s)
-    }
-}
-
-impl<T:Decodable> Decodable for Rc<T> {
-    #[inline]
-    fn decode<D: Decoder>(d: &mut D) -> Result<Rc<T>, D::Error> {
-        Ok(Rc::new(try!(Decodable::decode(d))))
-    }
-}
-
-impl<'a, T:Encodable + ToOwned + ?Sized> Encodable for Cow<'a, T> {
-    #[inline]
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        (**self).encode(s)
-    }
-}
-
-impl<'a, T: ?Sized> Decodable for Cow<'a, T>
-    where T: ToOwned, T::Owned: Decodable
-{
-    #[inline]
-    fn decode<D: Decoder>(d: &mut D) -> Result<Cow<'static, T>, D::Error> {
-        Ok(Cow::Owned(try!(Decodable::decode(d))))
-    }
-}
-
-impl<T:Encodable> Encodable for [T] {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_seq(self.len(), |s| {
-            for (i, e) in self.iter().enumerate() {
-                try!(s.emit_seq_elt(i, |s| e.encode(s)))
-            }
-            Ok(())
-        })
-    }
-}
-
-impl<T:Encodable> Encodable for Vec<T> {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_seq(self.len(), |s| {
-            for (i, e) in self.iter().enumerate() {
-                try!(s.emit_seq_elt(i, |s| e.encode(s)))
-            }
-            Ok(())
-        })
-    }
-}
-
-impl<T:Decodable> Decodable for Vec<T> {
-    fn decode<D: Decoder>(d: &mut D) -> Result<Vec<T>, D::Error> {
-        d.read_seq(|d, len| {
-            let mut v = Vec::with_capacity(cap_capacity::<T>(len));
-            for i in 0..len {
-                v.push(try!(d.read_seq_elt(i, |d| Decodable::decode(d))));
-            }
-            Ok(v)
-        })
-    }
-}
-
-impl<T:Encodable> Encodable for Option<T> {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_option(|s| {
-            match *self {
-                None => s.emit_option_none(),
-                Some(ref v) => s.emit_option_some(|s| v.encode(s)),
-            }
-        })
-    }
-}
-
-impl<T:Decodable> Decodable for Option<T> {
-    fn decode<D: Decoder>(d: &mut D) -> Result<Option<T>, D::Error> {
-        d.read_option(|d, b| {
-            if b {
-                Ok(Some(try!(Decodable::decode(d))))
-            } else {
-                Ok(None)
-            }
-        })
-    }
-}
-
-impl<T:Encodable, E:Encodable> Encodable for Result<T, E> {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_enum("Result", |s| {
-            match *self {
-                Ok(ref v) => {
-                    s.emit_enum_variant("Ok", 0, 1, |s| {
-                        try!(s.emit_enum_variant_arg(0, |s| {
-                            v.encode(s)
-                        }));
-                        Ok(())
-                    })
-                }
-                Err(ref v) => {
-                    s.emit_enum_variant("Err", 1, 1, |s| {
-                        try!(s.emit_enum_variant_arg(0, |s| {
-                            v.encode(s)
-                        }));
-                        Ok(())
-                    })
-                }
-            }
-        })
-    }
-}
-
-impl<T: Decodable, E: Decodable> Decodable for Result<T, E> {
-    fn decode<D: Decoder>(d: &mut D) -> Result<Result<T, E>, D::Error> {
-        d.read_enum("Result", |d| {
-            d.read_enum_variant(&["Ok", "Err"], |d, idx| {
-                match idx {
-                    0 => {
-                        d.read_enum_variant_arg(0, |d| {
-                            T::decode(d)
-                        }).map(|v| Ok(v))
-                    }
-                    1 => {
-                        d.read_enum_variant_arg(0, |d| {
-                            E::decode(d)
-                        }).map(|v| Err(v))
-                    }
-                    _ => panic!("Internal error"),
-                }
-            })
-        })
-    }
-}
-
-impl<T> Encodable for PhantomData<T> {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        s.emit_nil()
-    }
-}
-
-impl<T> Decodable for PhantomData<T> {
-    fn decode<D: Decoder>(_d: &mut D) -> Result<PhantomData<T>, D::Error> {
-        Ok(PhantomData)
-    }
-}
-
-macro_rules! peel {
-    ($name:ident, $($other:ident,)*) => (tuple! { $($other,)* })
-}
-
-/// Evaluates to the number of identifiers passed to it, for example:
-/// `count_idents!(a, b, c) == 3
-macro_rules! count_idents {
-    () => { 0 };
-    ($_i:ident, $($rest:ident,)*) => { 1 + count_idents!($($rest,)*) }
-}
-
-macro_rules! tuple {
-    () => ();
-    ( $($name:ident,)+ ) => (
-        impl<$($name:Decodable),*> Decodable for ($($name,)*) {
-            fn decode<D: Decoder>(d: &mut D) -> Result<($($name,)*), D::Error> {
-                let len: usize = count_idents!($($name,)*);
-                d.read_tuple(len, |d| {
-                    let mut i = 0;
-                    let ret = ($(try!(d.read_tuple_arg({ i+=1; i-1 },
-                                                       |d| -> Result<$name,D::Error> {
-                        Decodable::decode(d)
-                    })),)*);
-                    return Ok(ret);
-                })
-            }
-        }
-        impl<$($name:Encodable),*> Encodable for ($($name,)*) {
-            #[allow(non_snake_case)]
-            fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-                let ($(ref $name,)*) = *self;
-                let mut n = 0;
-                $(let $name = $name; n += 1;)*
-                s.emit_tuple(n, |s| {
-                    let mut i = 0;
-                    $(try!(s.emit_tuple_arg({ i+=1; i-1 }, |s| $name.encode(s)));)*
-                    Ok(())
-                })
-            }
-        }
-        peel! { $($name,)* }
-    )
-}
-
-tuple! { T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, }
-
-macro_rules! array {
-    () => ();
-    ($len:expr, $($idx:expr,)*) => {
-        impl<T:Decodable> Decodable for [T; $len] {
-            fn decode<D: Decoder>(d: &mut D) -> Result<[T; $len], D::Error> {
-                d.read_seq(|d, len| {
-                    if len != $len {
-                        return Err(d.error("wrong array length"));
-                    }
-                    Ok([$(
-                        try!(d.read_seq_elt($len - $idx - 1,
-                                            |d| Decodable::decode(d)))
-                    ),*])
-                })
-            }
-        }
-
-        impl<T:Encodable> Encodable for [T; $len] {
-            fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-                s.emit_seq($len, |s| {
-                    for i in 0..$len {
-                        try!(s.emit_seq_elt(i, |s| self[i].encode(s)));
-                    }
-                    Ok(())
-                })
-            }
-        }
-        array! { $($idx,)* }
-    }
-}
-
-array! {
-    32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16,
-    15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,
-}
-
-impl Encodable for path::Path {
-    #[cfg(target_os = "redox")]
-    fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
-        self.as_os_str().to_str().unwrap().encode(e)
-    }
-    #[cfg(unix)]
-    fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
-        use std::os::unix::prelude::*;
-        self.as_os_str().as_bytes().encode(e)
-    }
-    #[cfg(windows)]
-    fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
-        use std::os::windows::prelude::*;
-        let v = self.as_os_str().encode_wide().collect::<Vec<_>>();
-        v.encode(e)
-    }
-}
-
-impl Encodable for path::PathBuf {
-    fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
-        (**self).encode(e)
-    }
-}
-
-impl Decodable for path::PathBuf {
-    #[cfg(target_os = "redox")]
-    fn decode<D: Decoder>(d: &mut D) -> Result<path::PathBuf, D::Error> {
-        let string: String = try!(Decodable::decode(d));
-        let s: OsString = OsString::from(string);
-        let mut p = path::PathBuf::new();
-        p.push(s);
-        Ok(p)
-    }
-    #[cfg(unix)]
-    fn decode<D: Decoder>(d: &mut D) -> Result<path::PathBuf, D::Error> {
-        use std::os::unix::prelude::*;
-        let bytes: Vec<u8> = try!(Decodable::decode(d));
-        let s: OsString = OsStringExt::from_vec(bytes);
-        let mut p = path::PathBuf::new();
-        p.push(s);
-        Ok(p)
-    }
-    #[cfg(windows)]
-    fn decode<D: Decoder>(d: &mut D) -> Result<path::PathBuf, D::Error> {
-        use std::os::windows::prelude::*;
-        let bytes: Vec<u16> = try!(Decodable::decode(d));
-        let s: OsString = OsStringExt::from_wide(&bytes);
-        let mut p = path::PathBuf::new();
-        p.push(s);
-        Ok(p)
-    }
-}
-
-impl<T: Encodable + Copy> Encodable for Cell<T> {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        self.get().encode(s)
-    }
-}
-
-impl<T: Decodable + Copy> Decodable for Cell<T> {
-    fn decode<D: Decoder>(d: &mut D) -> Result<Cell<T>, D::Error> {
-        Ok(Cell::new(try!(Decodable::decode(d))))
-    }
-}
-
-// FIXME: #15036
-// Should use `try_borrow`, returning a
-// `encoder.error("attempting to Encode borrowed RefCell")`
-// from `encode` when `try_borrow` returns `None`.
-
-impl<T: Encodable> Encodable for RefCell<T> {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        self.borrow().encode(s)
-    }
-}
-
-impl<T: Decodable> Decodable for RefCell<T> {
-    fn decode<D: Decoder>(d: &mut D) -> Result<RefCell<T>, D::Error> {
-        Ok(RefCell::new(try!(Decodable::decode(d))))
-    }
-}
-
-impl<T:Encodable> Encodable for Arc<T> {
-    fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-        (**self).encode(s)
-    }
-}
-
-impl<T:Decodable+Send+Sync> Decodable for Arc<T> {
-    fn decode<D: Decoder>(d: &mut D) -> Result<Arc<T>, D::Error> {
-        Ok(Arc::new(try!(Decodable::decode(d))))
-    }
-}
-
-// ___________________________________________________________________________
-// Helper routines
-
-/// Trait with helper functions for implementing `Encodable`.
-///
-/// This trait is implemented for everything that implements `Encoder`.
-/// `Encodable` implementations can make use of it to make their implementations
-/// easier.
-pub trait EncoderHelpers: Encoder {
-    /// Emit a vector as a sequence.
-    ///
-    /// Storing sequences as vectors is a common pattern. This method makes
-    /// encoding such sequences easier by wrapping the calls to
-    /// `Encoder::emit_seq` and `Encoder::emit_seq_elt`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use rustc_serialize::Encodable;
-    /// use rustc_serialize::Encoder;
-    /// use rustc_serialize::EncoderHelpers;
-    ///
-    /// struct NumberSequence {
-    ///     elements: Vec<i32>,
-    /// }
-    ///
-    /// impl Encodable for NumberSequence {
-    ///     fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
-    ///         s.emit_struct("NumberSequence", 1, |s| {
-    ///             s.emit_struct_field("elements", 0, |s| {
-    ///                 s.emit_from_vec(&self.elements, |s,e| {
-    ///                     s.emit_i32(*e)
-    ///                 })
-    ///             })
-    ///         })
-    ///     }
-    /// }
-    /// ```
-    fn emit_from_vec<T, F>(&mut self, v: &[T], f: F)
-                           -> Result<(), <Self as Encoder>::Error>
-        where F: FnMut(&mut Self, &T) -> Result<(), <Self as Encoder>::Error>;
-}
-
-impl<S:Encoder> EncoderHelpers for S {
-    fn emit_from_vec<T, F>(&mut self, v: &[T], mut f: F) -> Result<(), S::Error> where
-        F: FnMut(&mut S, &T) -> Result<(), S::Error>,
-    {
-        self.emit_seq(v.len(), |this| {
-            for (i, e) in v.iter().enumerate() {
-                try!(this.emit_seq_elt(i, |this| {
-                    f(this, e)
-                }));
-            }
-            Ok(())
-        })
-    }
-}
-
-/// Trait with helper functions for implementing `Decodable`.
-///
-/// This trait is implemented for everything that implements `Decoder`.
-/// `Decodable` implementations can make use of it to make their implementations
-/// easier.
-pub trait DecoderHelpers: Decoder {
-    /// Read a sequence into a vector.
-    ///
-    /// Storing sequences as vectors is a common pattern. This method makes
-    /// deserializing such sequences easier by wrapping the calls to
-    /// `Decoder::read_seq` and `Decoder::read_seq_elt`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use rustc_serialize::Decodable;
-    /// use rustc_serialize::Decoder;
-    /// use rustc_serialize::DecoderHelpers;
-    ///
-    /// struct NumberSequence {
-    ///     elements: Vec<i32>,
-    /// }
-    ///
-    /// impl Decodable for NumberSequence {
-    ///     fn decode<D: Decoder>(d: &mut D) -> Result<NumberSequence, D::Error> {
-    ///         d.read_struct("NumberSequence", 2, |d| {
-    ///             Ok(NumberSequence{
-    ///                 elements: try!(d.read_struct_field("elements", 0, |d| {
-    ///                     d.read_to_vec(|d| { d.read_i32() })
-    ///                 }))
-    ///             })
-    ///         })
-    ///     }
-    /// }
-    /// ```
-    fn read_to_vec<T, F>(&mut self, f: F)
-                         -> Result<Vec<T>, <Self as Decoder>::Error> where
-        F: FnMut(&mut Self) -> Result<T, <Self as Decoder>::Error>;
-}
-
-impl<D: Decoder> DecoderHelpers for D {
-    fn read_to_vec<T, F>(&mut self, mut f: F) -> Result<Vec<T>, D::Error> where F:
-        FnMut(&mut D) -> Result<T, D::Error>,
-    {
-        self.read_seq(|this, len| {
-            let mut v = Vec::with_capacity(cap_capacity::<T>(len));
-            for i in 0..len {
-                v.push(try!(this.read_seq_elt(i, |this| f(this))));
-            }
-            Ok(v)
-        })
-    }
-}
-
-#[test]
-#[allow(unused_variables)]
-fn capacity_rules() {
-    use std::usize::MAX;
-    use std::collections::{HashMap, HashSet};
-
-    struct MyDecoder;
-    impl Decoder for MyDecoder {
-        type Error = ();
-
-        // Primitive types:
-        fn read_nil(&mut self) -> Result<(), Self::Error> { Err(()) }
-        fn read_usize(&mut self) -> Result<usize, Self::Error> { Err(()) }
-        fn read_u64(&mut self) -> Result<u64, Self::Error> { Err(()) }
-        fn read_u32(&mut self) -> Result<u32, Self::Error> { Err(()) }
-        fn read_u16(&mut self) -> Result<u16, Self::Error> { Err(()) }
-        fn read_u8(&mut self) -> Result<u8, Self::Error> { Err(()) }
-        fn read_isize(&mut self) -> Result<isize, Self::Error> { Err(()) }
-        fn read_i64(&mut self) -> Result<i64, Self::Error> { Err(()) }
-        fn read_i32(&mut self) -> Result<i32, Self::Error> { Err(()) }
-        fn read_i16(&mut self) -> Result<i16, Self::Error> { Err(()) }
-        fn read_i8(&mut self) -> Result<i8, Self::Error> { Err(()) }
-        fn read_bool(&mut self) -> Result<bool, Self::Error> { Err(()) }
-        fn read_f64(&mut self) -> Result<f64, Self::Error> { Err(()) }
-        fn read_f32(&mut self) -> Result<f32, Self::Error> { Err(()) }
-        fn read_char(&mut self) -> Result<char, Self::Error> { Err(()) }
-        fn read_str(&mut self) -> Result<String, Self::Error> { Err(()) }
-
-        // Compound types:
-        fn read_enum<T, F>(&mut self, name: &str, f: F) -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) }
-
-        fn read_enum_variant<T, F>(&mut self, names: &[&str], f: F)
-                                   -> Result<T, Self::Error>
-            where F: FnMut(&mut Self, usize) -> Result<T, Self::Error> { Err(()) }
-        fn read_enum_variant_arg<T, F>(&mut self, a_idx: usize, f: F)
-                                       -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) }
-
-        fn read_enum_struct_variant<T, F>(&mut self, names: &[&str], f: F)
-                                          -> Result<T, Self::Error>
-            where F: FnMut(&mut Self, usize) -> Result<T, Self::Error> { Err(()) }
-        fn read_enum_struct_variant_field<T, F>(&mut self,
-                                                f_name: &str,
-                                                f_idx: usize,
-                                                f: F)
-                                                -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) }
-
-        fn read_struct<T, F>(&mut self, s_name: &str, len: usize, f: F)
-                             -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) }
-        fn read_struct_field<T, F>(&mut self,
-                                   f_name: &str,
-                                   f_idx: usize,
-                                   f: F)
-                                   -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) }
-
-        fn read_tuple<T, F>(&mut self, len: usize, f: F) -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) }
-        fn read_tuple_arg<T, F>(&mut self, a_idx: usize, f: F)
-                                -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) }
-
-        fn read_tuple_struct<T, F>(&mut self, s_name: &str, len: usize, f: F)
-                                   -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) }
-        fn read_tuple_struct_arg<T, F>(&mut self, a_idx: usize, f: F)
-                                       -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) }
-
-        // Specialized types:
-        fn read_option<T, F>(&mut self, f: F) -> Result<T, Self::Error>
-            where F: FnMut(&mut Self, bool) -> Result<T, Self::Error> { Err(()) }
-
-        fn read_seq<T, F>(&mut self, f: F) -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self, usize) -> Result<T, Self::Error> {
-                f(self, MAX)
-            }
-        fn read_seq_elt<T, F>(&mut self, idx: usize, f: F) -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) }
-
-        fn read_map<T, F>(&mut self, f: F) -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self, usize) -> Result<T, Self::Error> {
-            f(self, MAX)
-        }
-        fn read_map_elt_key<T, F>(&mut self, idx: usize, f: F)
-                                  -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) }
-        fn read_map_elt_val<T, F>(&mut self, idx: usize, f: F)
-                                  -> Result<T, Self::Error>
-            where F: FnOnce(&mut Self) -> Result<T, Self::Error> { Err(()) }
-
-        // Failure
-        fn error(&mut self, err: &str) -> Self::Error { () }
-    }
-
-    let mut dummy = MyDecoder;
-    let vec_result: Result<Vec<u8>, ()> = Decodable::decode(&mut dummy);
-    assert!(vec_result.is_err());
-
-    let map_result: Result<HashMap<u8, u8>, ()> = Decodable::decode(&mut dummy);
-    assert!(map_result.is_err());
-
-    let set_result: Result<HashSet<u8>, ()> = Decodable::decode(&mut dummy);
-    assert!(set_result.is_err());
-}
deleted file mode 100644
--- a/third_party/rust/rustc_version/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"8d53e23f58f8a03e60b672e7f95116d460fa07088f7f79b519eed425d6195fbe","Cargo.toml":"da5362f4dbb92819294321cca160d67acda7d5950c803577729623ccf4df1c0f","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"c9a75f18b9ab2927829a208fc6aa2cf4e63b8420887ba29cdb265d6619ae82d5","README.md":"9cfa2d130fcb833e436c35c92d9843dcc7660ff944e63638b86e96f29cc8009e","src/lib.rs":"00ad5b5776e357732445e483983f6c7efa4054164f36000501edb8910a182db5"},"package":"c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/rustc_version/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-language: rust
-rust:
-- nightly
-- beta
-- stable
-before_script:
-- |
-  pip install 'travis-cargo<0.2' --user &&
-  ln -s /bin/false $HOME/.local/bin/rustc &&
-  ln -s $HOME/rust/bin/rustc $HOME/.local/bin/real_rustc &&
-  export PATH=$HOME/.local/bin:$PATH &&
-  export RUSTC=real_rustc
-script:
-- |
-  travis-cargo build &&
-  travis-cargo test &&
-  rustdoc --test README.md -L dependency=./target/debug/deps --extern rustc_version=./target/debug/librustc_version.rlib &&
-  travis-cargo bench &&
-  travis-cargo --only stable doc
-after_success:
-- travis-cargo --only stable doc-upload
-env:
-  global:
-  - TRAVIS_CARGO_NIGHTLY_FEATURE=""
-  - secure: mxQyrd6tyvcC10H7crLgKSSRHwquSnLb5mjzaj8iXf4mkooKpoRaffIiwmGf0IACQUN3nKlA6D6irfD2CqaFiUiUav8RqeAd8FjHFTlYu0nKZkqB1iGZBA7/JrW7mlGJIdmNIbzVRoPRQI/lY/730M/eqxIAb+9/xaSktkD2cJYGUikdiyeTm8idezkB+BOOWIN20yopLWzmBIVs7doQJOA0ewqMlEduwn6axvEk17r9qlSgucywDsTvDWkXSAuYldyJU4PdFez4t10sGsXx+TKfbwcaRmwaOj/MImZUVCtQvutEW9Hb/2hJXjCN2uefZ64BfodKn3wyB7ie7PgOixsLkqoR01d/qbfDsWGg/4iLi3DCq5bVtWJoCCT4lS8kfwi8D8HmvcoCQnT+CdU4LhlV9aHTSEMx0SEJW0DHYE/RnoqJjCj+QsK4ji7HAnyYWVwSGYJfnrL0EAwKararAzKY/vABStJKu1IlBzKCsjIQ+0hMpqnFiWldhfRHt/rYhBtK+HYXElamc8xpF/taK8E40NSHDgC+4TciTAZtyAXOWiMhXS0653U3hvJqYY/LtHmobpIqc1XkHe53gQ0QrBd6UsyUN9FjWOLxvPUx4zcyNFJHXcFiwevfK6gYF+OXepVu8TznAQLSP7ToA7KXbhSSVQDM+7UFVcT41VgDbGY=
deleted file mode 100644
--- a/third_party/rust/rustc_version/Cargo.toml
+++ /dev/null
@@ -1,15 +0,0 @@
-[package]
-name = "rustc_version"
-version = "0.1.7"
-authors = ["Marvin Löbel <loebel.marvin@gmail.com>"]
-license = "MIT OR Apache-2.0"
-
-description = "A library for querying the version of a installed rustc compiler"
-readme = "README.md"
-documentation = "http://kimundi.github.io/rustc-version-rs/rustc_version/index.html"
-
-repository = "https://github.com/Kimundi/rustc-version-rs"
-keywords = ["version", "rustc"]
-
-[dependencies]
-semver = "0.1"
deleted file mode 100644
--- a/third_party/rust/rustc_version/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/rustc_version/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2016 The Rust Project Developers
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/rustc_version/README.md
+++ /dev/null
@@ -1,75 +0,0 @@
-rustc-version-rs
-==============
-
-[![Travis-CI Status](https://travis-ci.org/Kimundi/rustc-version-rs.png?branch=master)](https://travis-ci.org/Kimundi/rustc-version-rs)
-
-A library for querying the version of a installed rustc compiler.
-
-For more details, see the [docs](http://kimundi.github.io/rustc-version-rs/rustc_version/index.html).
-
-# Getting Started
-
-[rustc-version-rs is available on crates.io](https://crates.io/crates/rustc_version).
-Add the following dependency to your Cargo manifest to get the latest version of the 0.1 branch:
-```toml
-[dependencies]
-
-rustc_version = "0.1.*"
-```
-
-To always get the latest version, add this git repository to your
-Cargo manifest:
-
-```toml
-[dependencies.rustc_version]
-git = "https://github.com/Kimundi/rustc-version-rs"
-```
-# Example
-
-```rust
-// This could be a cargo build script
-
-extern crate rustc_version;
-use rustc_version::{version, version_matches, version_meta, Channel};
-
-fn main() {
-    // Assert we haven't travelled back in time
-    assert!(version().major >= 1);
-
-    // Set cfg flags depending on release channel
-    match version_meta().channel {
-        Channel::Stable => {
-            println!("cargo:rustc-cfg=RUSTC_IS_STABLE");
-        }
-        Channel::Beta => {
-            println!("cargo:rustc-cfg=RUSTC_IS_BETA");
-        }
-        Channel::Nightly => {
-            println!("cargo:rustc-cfg=RUSTC_IS_NIGHTLY");
-        }
-        Channel::Dev => {
-            println!("cargo:rustc-cfg=RUSTC_IS_DEV");
-        }
-    }
-
-    // Directly check a semver version requirment
-    if version_matches(">= 1.4.0") {
-        println!("cargo:rustc-cfg=compiler_has_important_bugfix");
-    }
-}
-```
-
-## License
-
-Licensed under either of
-
- * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
-
-at your option.
-
-### Contribution
-
-Unless you explicitly state otherwise, any contribution intentionally submitted
-for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
-additional terms or conditions.
deleted file mode 100644
--- a/third_party/rust/rustc_version/src/lib.rs
+++ /dev/null
@@ -1,292 +0,0 @@
-// Copyright 2016 rustc-version-rs developers
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![warn(missing_docs)]
-
-//! Simple library for getting the version information of a `rustc`
-//! compiler.
-//!
-//! This calls `$RUSTC --version` and parses the output, falling
-//! back to `rustc` if `$RUSTC` is not set.
-//!
-//! # Example
-//!
-//! ```rust
-//! // This could be a cargo build script
-//!
-//! extern crate rustc_version;
-//! use rustc_version::{version, version_matches, version_meta, Channel};
-//!
-//! fn main() {
-//!     // Assert we haven't travelled back in time
-//!     assert!(version().major >= 1);
-//!
-//!     // Set cfg flags depending on release channel
-//!     match version_meta().channel {
-//!         Channel::Stable => {
-//!             println!("cargo:rustc-cfg=RUSTC_IS_STABLE");
-//!         }
-//!         Channel::Beta => {
-//!             println!("cargo:rustc-cfg=RUSTC_IS_BETA");
-//!         }
-//!         Channel::Nightly => {
-//!             println!("cargo:rustc-cfg=RUSTC_IS_NIGHTLY");
-//!         }
-//!         Channel::Dev => {
-//!             println!("cargo:rustc-cfg=RUSTC_IS_DEV");
-//!         }
-//!     }
-//!
-//!     // Directly check a semver version requirment
-//!     if version_matches(">= 1.4.0") {
-//!         println!("cargo:rustc-cfg=compiler_has_important_bugfix");
-//!     }
-//! }
-//! ```
-
-extern crate semver;
-use semver::{Version, VersionReq, Identifier};
-use std::process::Command;
-use std::env;
-use std::ffi::OsString;
-
-/// Release channel of the compiler.
-#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
-pub enum Channel {
-    /// Development release channel
-    Dev,
-    /// Nightly release channel
-    Nightly,
-    /// Beta release channel
-    Beta,
-    /// Stable release channel
-    Stable,
-}
-
-/// Rustc version plus metada like git short hash and build date.
-#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
-pub struct VersionMeta {
-    /// Version of the compiler
-    pub semver: Version,
-
-    /// Git short hash of the build of the compiler
-    pub commit_hash: Option<String>,
-
-    /// Commit date of the compiler
-    pub commit_date: Option<String>,
-
-    /// Build date of the compiler; this was removed between Rust 1.0.0 and 1.1.0.
-    pub build_date: Option<String>,
-
-    /// Release channel of the compiler
-    pub channel: Channel,
-
-    /// Host target triple of the compiler
-    pub host: String,
-
-    /// Short version string of the compiler
-    pub short_version_string: String,
-}
-
-/// Returns the `rustc` SemVer version.
-pub fn version() -> Version {
-    version_meta().semver
-}
-
-/// Returns the `rustc` SemVer version and additional metadata
-/// like the git short hash and build date.
-pub fn version_meta() -> VersionMeta {
-    let cmd = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc"));
-
-    let out = Command::new(&cmd)
-        .arg("-vV")
-        .output()
-        .unwrap_or_else(|e| { panic!("failed to execute `RUSTC -vV`: {}", e) });
-
-    let out = String::from_utf8(out.stdout)
-        .ok()
-        .expect("non utf8 output from RUSTC -vV");
-
-    version_meta_for(&out)
-}
-
-/// Parses a "rustc -vV" output string and returns
-/// the SemVer version and additional metadata
-/// like the git short hash and build date.
-pub fn version_meta_for(verbose_version_string: &str) -> VersionMeta {
-    let out: Vec<_> = verbose_version_string.lines().collect();
-
-    const ERR_MSG: &'static str = "unexpected -vV format";
-
-    assert!(out.len() == 6 || out.len() == 7, ERR_MSG);
-
-    let short_version_string = out[0];
-
-    fn expect_prefix<'a>(line: &'a str, prefix: &str) -> &'a str {
-        assert!(line.starts_with(prefix), ERR_MSG);
-        &line[prefix.len()..]
-    }
-
-    let commit_hash = match expect_prefix(out[2], "commit-hash: ") {
-        "unknown" => None,
-        hash => Some(hash.to_owned()),
-    };
-
-    let commit_date = match expect_prefix(out[3], "commit-date: ") {
-        "unknown" => None,
-        hash => Some(hash.to_owned()),
-    };
-
-    // Handle that the build date may or may not be present.
-    let mut idx = 4;
-    let mut build_date = None;
-    if out[idx].starts_with("build-date") {
-        build_date = match expect_prefix(out[idx], "build-date: ") {
-            "unknown" => None,
-            s => Some(s.to_owned()),
-        };
-        idx = idx + 1;
-    }
-
-
-    let host = expect_prefix(out[idx], "host: ");
-    idx = idx +1;
-    let release = expect_prefix(out[idx], "release: ");
-
-    let semver = Version::parse(release).unwrap();
-
-    let channel = if semver.pre.is_empty() {
-        Channel::Stable
-    } else {
-        match semver.pre[0] {
-            Identifier::AlphaNumeric(ref s)
-                if s == "dev" => Channel::Dev,
-            Identifier::AlphaNumeric(ref s)
-                if s == "beta" => Channel::Beta,
-            Identifier::AlphaNumeric(ref s)
-                if s == "nightly" => Channel::Nightly,
-            ref x => panic!("Unknown pre-release tag {}", x),
-        }
-    };
-
-    VersionMeta {
-        semver: semver,
-        commit_hash: commit_hash,
-        commit_date: commit_date,
-        build_date: build_date,
-        channel: channel,
-        host: host.into(),
-        short_version_string: short_version_string.into(),
-    }
-}
-
-/// Check wether the `rustc` version matches the given SemVer
-/// version requirement.
-pub fn version_matches(req: &str) -> bool {
-    VersionReq::parse(req).unwrap().matches(&version())
-}
-
-#[test]
-fn smoketest() {
-    let v = version();
-    assert!(v.major >= 1);
-
-    let v = version_meta();
-    assert!(v.semver.major >= 1);
-
-    assert!(version_matches(">= 1.0.0"));
-}
-
-#[test]
-#[should_panic(expected = "unexpected")]
-// Characterization test for behavior on an unexpected key.
-fn parse_unexpected() {
-    version_meta_for(
-"rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)
-binary: rustc
-commit-hash: a59de37e99060162a2674e3ff45409ac73595c0e
-commit-date: 2015-05-13
-rust-birthday: 2015-05-14
-host: x86_64-unknown-linux-gnu
-release: 1.0.0");
-}
-
-#[test]
-fn parse_1_0_0() {
-    let version = version_meta_for(
-"rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)
-binary: rustc
-commit-hash: a59de37e99060162a2674e3ff45409ac73595c0e
-commit-date: 2015-05-13
-build-date: 2015-05-14
-host: x86_64-unknown-linux-gnu
-release: 1.0.0");
-
-    assert_eq!(version.semver, Version::parse("1.0.0").unwrap());
-    assert_eq!(version.commit_hash, Some("a59de37e99060162a2674e3ff45409ac73595c0e".into()));
-    assert_eq!(version.commit_date, Some("2015-05-13".into()));
-    assert_eq!(version.build_date, Some("2015-05-14".into()));
-    assert_eq!(version.channel, Channel::Stable);
-    assert_eq!(version.host, "x86_64-unknown-linux-gnu");
-    assert_eq!(version.short_version_string, "rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)");
-}
-
-
-#[test]
-fn parse_unknown() {
-    let version = version_meta_for(
-"rustc 1.3.0
-binary: rustc
-commit-hash: unknown
-commit-date: unknown
-host: x86_64-unknown-linux-gnu
-release: 1.3.0");
-
-    assert_eq!(version.semver, Version::parse("1.3.0").unwrap());
-    assert_eq!(version.commit_hash, None);
-    assert_eq!(version.commit_date, None);
-    assert_eq!(version.channel, Channel::Stable);
-    assert_eq!(version.host, "x86_64-unknown-linux-gnu");
-    assert_eq!(version.short_version_string, "rustc 1.3.0");
-}
-
-#[test]
-fn parse_nightly() {
-    let version = version_meta_for(
-"rustc 1.5.0-nightly (65d5c0833 2015-09-29)
-binary: rustc
-commit-hash: 65d5c083377645a115c4ac23a620d3581b9562b6
-commit-date: 2015-09-29
-host: x86_64-unknown-linux-gnu
-release: 1.5.0-nightly");
-
-    assert_eq!(version.semver, Version::parse("1.5.0-nightly").unwrap());
-    assert_eq!(version.commit_hash, Some("65d5c083377645a115c4ac23a620d3581b9562b6".into()));
-    assert_eq!(version.commit_date, Some("2015-09-29".into()));
-    assert_eq!(version.channel, Channel::Nightly);
-    assert_eq!(version.host, "x86_64-unknown-linux-gnu");
-    assert_eq!(version.short_version_string, "rustc 1.5.0-nightly (65d5c0833 2015-09-29)");
-}
-
-#[test]
-fn parse_stable() {
-    let version = version_meta_for(
-"rustc 1.3.0 (9a92aaf19 2015-09-15)
-binary: rustc
-commit-hash: 9a92aaf19a64603b02b4130fe52958cc12488900
-commit-date: 2015-09-15
-host: x86_64-unknown-linux-gnu
-release: 1.3.0");
-
-    assert_eq!(version.semver, Version::parse("1.3.0").unwrap());
-    assert_eq!(version.commit_hash, Some("9a92aaf19a64603b02b4130fe52958cc12488900".into()));
-    assert_eq!(version.commit_date, Some("2015-09-15".into()));
-    assert_eq!(version.channel, Channel::Stable);
-    assert_eq!(version.host, "x86_64-unknown-linux-gnu");
-    assert_eq!(version.short_version_string, "rustc 1.3.0 (9a92aaf19 2015-09-15)");
-}
deleted file mode 100644
--- a/third_party/rust/semver-0.1.20/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"b7ffa089fb467f8afaa9fc30f805d98316b5f1760ef20c8cbe50ef0b2f3e4256","Cargo.toml":"63791ada50820b81fbb92874b91a9ae710001c81c8119736811341a06e014b1b","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"0b0ccc05312192ceddfb0c5ce6ea3fd339286775fbe14b381bb51436e3275546","src/lib.rs":"a7e0aa6048f1fbdeb9f36181492de91fff9544c52747e50474f3a6935940887d","src/version.rs":"2405e3461a6ae5a58972bc5abf638c22801eed13a7b787961bc48c8aeba88201","src/version_req.rs":"c8188011acb803900eb3da512d9ede8cca7f4e2cfb647ff2b4d6d24dfe81fe8a"},"package":"d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/semver-0.1.20/.travis.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-language: rust
-rust:
-  - 1.0.0
-  - 1.1.0
-  - beta
-  - nightly
-sudo: false
-script:
-  - cargo build --verbose
-  - cargo test --verbose
-  - cargo doc
-after_success: |
-  [ $TRAVIS_BRANCH = master ] &&
-  [ $TRAVIS_PULL_REQUEST = false ] &&
-  [ $TRAVIS_RUST_VERSION = nightly ] &&
-  echo '<meta http-equiv=refresh content=0;url=semver/index.html>' > target/doc/index.html &&
-  pip install ghp-import --user $USER &&
-  $HOME/.local/bin/ghp-import -n target/doc &&
-  git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
-language: rust
-env:
-  global:
-    secure: fFDquImTSjxHvuQw3QEZbOVfFMrtg9Ek0t7baAAVW29wf74IIrppBrUX8SPrWb4cuD5mI1gC7AZnaeq2FDAJ0EKKax/XrAtDL2Q42tnoIWpDJxOUBJ+js2v2l+hMpUBlX42vBcFJcOS56w8Nm7ru4bThP1ZL7BogoiBmi1Q7HYs=
-notifications:
-  email:
-    on_success: never
deleted file mode 100644
--- a/third_party/rust/semver-0.1.20/Cargo.toml
+++ /dev/null
@@ -1,12 +0,0 @@
-[package]
-
-name = "semver"
-version = "0.1.20"
-authors = ["The Rust Project Developers"]
-license = "MIT/Apache-2.0"
-repository = "https://github.com/rust-lang/semver"
-homepage = "https://github.com/rust-lang/semver"
-documentation = "http://doc.rust-lang.org/semver"
-description = """
-Semantic version parsing and comparison.
-"""
deleted file mode 100644
--- a/third_party/rust/semver-0.1.20/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/semver-0.1.20/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2014 The Rust Project Developers
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/semver-0.1.20/README.md
+++ /dev/null
@@ -1,104 +0,0 @@
-semver
-======
-
-Semantic version parsing and comparison.
-
-[![Build Status](https://travis-ci.org/rust-lang/semver.svg?branch=master)](https://travis-ci.org/rust-lang/semver)
-
-[Documentation](http://doc.rust-lang.org/semver)
-
-Semantic versioning (see http://semver.org/) is a set of rules for
-assigning version numbers.
-
-## SemVer and the Rust ecosystem
-
-Rust itself follows the SemVer specification, as does its standard libraries. The two are
-not tied together.
-
-[Cargo](http://crates.io), Rust's package manager, uses SemVer to determine which versions of
-packages you need installed.
-
-## Installation
-
-To use `semver`, add these lines to your `Cargo.toml`:
-
-```toml
-[dependencies]
-semver = "*"
-```
-
-And this to your crate root:
-
-```rust
-extern crate semver;
-```
-
-## Versions
-
-At its simplest, the `semver` crate allows you to construct `Version` objects using the `parse`
-method:
-
-```{rust}
-use semver::Version;
-
-assert!(Version::parse("1.2.3") == Ok(Version {
-   major: 1,
-   minor: 2,
-   patch: 3,
-   pre: vec!(),
-   build: vec!(),
-}));
-```
-
-If you have multiple `Version`s, you can use the usual comparison operators to compare them:
-
-```{rust}
-use semver::Version;
-
-assert!(Version::parse("1.2.3-alpha")  != Version::parse("1.2.3-beta"));
-assert!(Version::parse("1.2.3-alpha2") >  Version::parse("1.2.0"));
-```
-
-## Requirements
-
-The `semver` crate also provides the ability to compare requirements, which are more complex
-comparisons.
-
-For example, creating a requirement that only matches versions greater than or
-equal to 1.0.0:
-
-```{rust}
-use semver::Version;
-use semver::VersionReq;
-
-let r = VersionReq::parse(">= 1.0.0").unwrap();
-let v = Version::parse("1.0.0").unwrap();
-
-assert!(r.to_string() == ">= 1.0.0".to_string());
-assert!(r.matches(&v))
-```
-
-It also allows parsing of `~x.y.z` and `^x.y.z` requirements as defined at
-https://www.npmjs.org/doc/misc/semver.html
-
-**Tilde requirements** specify a minimal version with some updates:
-
-```notrust
-~1.2.3 := >=1.2.3 <1.3.0
-~1.2   := >=1.2.0 <1.3.0
-~1     := >=1.0.0 <2.0.0
-```
-
-**Caret requirements** allow SemVer compatible updates to a specified version,
-`0.x` and `0.x+1` are not considered compatible, but `1.x` and `1.x+1` are.
-
-`0.0.x` is not considered compatible with any other version.
-Missing minor and patch versions are desugared to `0` but allow flexibility for that value.
-
-```notrust
-^1.2.3 := >=1.2.3 <2.0.0
-^0.2.3 := >=0.2.3 <0.3.0
-^0.0.3 := >=0.0.3 <0.0.4
-^0.0   := >=0.0.0 <0.1.0
-^0     := >=0.0.0 <1.0.0
-```
deleted file mode 100644
--- a/third_party/rust/semver-0.1.20/src/lib.rs
+++ /dev/null
@@ -1,176 +0,0 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Semantic version parsing and comparison.
-//!
-//! Semantic versioning (see http://semver.org/) is a set of rules for
-//! assigning version numbers.
-//!
-//! ## SemVer overview
-//!
-//! Given a version number MAJOR.MINOR.PATCH, increment the:
-//!
-//! 1. MAJOR version when you make incompatible API changes,
-//! 2. MINOR version when you add functionality in a backwards-compatible
-//!    manner, and
-//! 3. PATCH version when you make backwards-compatible bug fixes.
-//!
-//! Additional labels for pre-release and build metadata are available as
-//! extensions to the MAJOR.MINOR.PATCH format.
-//!
-//! Any references to 'the spec' in this documentation refer to [version 2.0 of
-//! the SemVer spec](http://semver.org/spec/v2.0.0.html).
-//!
-//! ## SemVer and the Rust ecosystem
-//!
-//! Rust itself follows the SemVer specification, as does its standard
-//! libraries. The two are not tied together.
-//!
-//! [Cargo](http://crates.io), Rust's package manager, uses SemVer to determine
-//! which versions of packages you need installed.
-//!
-//! ## Versions
-//!
-//! At its simplest, the `semver` crate allows you to construct `Version`
-//! objects using the `parse` method:
-//!
-//! ```{rust}
-//! use semver::Version;
-//!
-//! assert!(Version::parse("1.2.3") == Ok(Version {
-//!    major: 1,
-//!    minor: 2,
-//!    patch: 3,
-//!    pre: vec!(),
-//!    build: vec!(),
-//! }));
-//! ```
-//!
-//! If you have multiple `Version`s, you can use the usual comparison operators
-//! to compare them:
-//!
-//! ```{rust}
-//! use semver::Version;
-//!
-//! assert!(Version::parse("1.2.3-alpha")  != Version::parse("1.2.3-beta"));
-//! assert!(Version::parse("1.2.3-alpha2") >  Version::parse("1.2.0"));
-//! ```
-//!
-//! If you explicitly need to modify a Version, SemVer also allows you to 
-//! increment the major, minor, and patch numbers in accordance with the spec.
-//! 
-//! Please note that in order to do this, you must use a mutable Version:
-//!
-//! ```{rust}
-//! use semver::Version;
-//!
-//! let mut bugfix_release = Version::parse("1.0.0").unwrap();
-//! bugfix_release.increment_patch();
-//!
-//! assert_eq!(bugfix_release, Version::parse("1.0.1").unwrap());
-//! ```
-//!
-//! When incrementing the minor version number, the patch number resets to zero 
-//! (in accordance with section 7 of the spec)
-//!
-//! ```{rust}
-//! use semver::Version;
-//!
-//! let mut feature_release = Version::parse("1.4.6").unwrap();
-//! feature_release.increment_minor();
-//!
-//! assert_eq!(feature_release, Version::parse("1.5.0").unwrap());
-//! ```
-//!
-//! Similarly, when incrementing the major version number, the patch and minor
-//! numbers reset to zero (in accordance with section 8 of the spec)
-//!
-//! ```{rust}
-//! use semver::Version;
-//!
-//! let mut chrome_release = Version::parse("41.5.5377").unwrap();
-//! chrome_release.increment_major();
-//!
-//! assert_eq!(chrome_release, Version::parse("42.0.0").unwrap());
-//! ```
-//!
-//! ## Requirements
-//!
-//! The `semver` crate also provides the ability to compare requirements, which
-//! are more complex comparisons.
-//!
-//! For example, creating a requirement that only matches versions greater than
-//! or equal to 1.0.0:
-//!
-//! ```{rust}
-//! # #![allow(unstable)]
-//! use semver::Version;
-//! use semver::VersionReq;
-//!
-//! let r = VersionReq::parse(">= 1.0.0").unwrap();
-//! let v = Version::parse("1.0.0").unwrap();
-//!
-//! assert!(r.to_string() == ">= 1.0.0".to_string());
-//! assert!(r.matches(&v))
-//! ```
-//!
-//! It also allows parsing of `~x.y.z` and `^x.y.z` requirements as defined at
-//! https://www.npmjs.org/doc/misc/semver.html
-//!
-//! **Tilde requirements** specify a minimal version with some updates:
-//!
-//! ```notrust
-//! ~1.2.3 := >=1.2.3 <1.3.0
-//! ~1.2   := >=1.2.0 <1.3.0
-//! ~1     := >=1.0.0 <2.0.0
-//! ```
-//!
-//! **Caret requirements** allow SemVer compatible updates to a specified
-//! verion, `0.x` and `0.x+1` are not considered compatible, but `1.x` and
-//! `1.x+1` are.
-//!
-//! `0.0.x` is not considered compatible with any other version.
-//! Missing minor and patch versions are desugared to `0` but allow flexibility
-//! for that value.
-//!
-//! ```notrust
-//! ^1.2.3 := >=1.2.3 <2.0.0
-//! ^0.2.3 := >=0.2.3 <0.3.0
-//! ^0.0.3 := >=0.0.3 <0.0.4
-//! ^0.0   := >=0.0.0 <0.1.0
-//! ^0     := >=0.0.0 <1.0.0
-//! ```
-//!
-//! **Wildcard requirements** allows parsing of version requirements of the
-//! formats `*`, `x.*` and `x.y.*`.
-//!
-//! ```notrust
-//! *     := >=0.0.0
-//! 1.*   := >=1.0.0 <2.0.0
-//! 1.2.* := >=1.2.0 <1.3.0
-//! ```
-
-#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
-       html_favicon_url = "http://www.rust-lang.org/favicon.ico")]
-#![deny(missing_docs)]
-#![cfg_attr(test, deny(warnings))]
-
-// We take the common approach of keeping our own module system private, and
-// just re-exporting the interface that we want.
-
-pub use version::{Version, Identifier, ParseError};
-pub use version::Identifier::{Numeric, AlphaNumeric};
-pub use version_req::{VersionReq, ReqParseError};
-
-// SemVer-compliant versions.
-mod version;
-
-// advanced version comparisons
-mod version_req;
deleted file mode 100644
--- a/third_party/rust/semver-0.1.20/src/version.rs
+++ /dev/null
@@ -1,594 +0,0 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! The `version` module gives you tools to create and compare SemVer-compliant
-//! versions.
-
-use std::ascii::AsciiExt;
-use std::cmp::{self, Ordering};
-use std::error::Error;
-use std::fmt;
-use std::hash;
-
-use self::Identifier::{Numeric, AlphaNumeric};
-use self::ParseError::{GenericFailure, IncorrectParse, NonAsciiIdentifier};
-
-/// An identifier in the pre-release or build metadata.
-///
-/// See sections 9 and 10 of the spec for more about pre-release identifers and
-/// build metadata.
-#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-pub enum Identifier {
-    /// An identifier that's solely numbers.
-    Numeric(u64),
-    /// An identifier with letters and numbers.
-    AlphaNumeric(String)
-}
-
-impl fmt::Display for Identifier {
-    #[inline]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            Numeric(ref n) => fmt::Display::fmt(n, f),
-            AlphaNumeric(ref s) => fmt::Display::fmt(s, f),
-        }
-    }
-}
-
-
-/// Represents a version number conforming to the semantic versioning scheme.
-#[derive(Clone, Eq, Debug)]
-pub struct Version {
-    /// The major version, to be incremented on incompatible changes.
-    pub major: u64,
-    /// The minor version, to be incremented when functionality is added in a
-    /// backwards-compatible manner.
-    pub minor: u64,
-    /// The patch version, to be incremented when backwards-compatible bug
-    /// fixes are made.
-    pub patch: u64,
-    /// The pre-release version identifier, if one exists.
-    pub pre: Vec<Identifier>,
-    /// The build metadata, ignored when determining version precedence.
-    pub build: Vec<Identifier>,
-}
-
-/// A `ParseError` is returned as the `Err` side of a `Result` when a version is
-/// attempted to be parsed.
-#[derive(Clone,PartialEq,Debug,PartialOrd)]
-pub enum ParseError {
-    /// All identifiers must be ASCII.
-    NonAsciiIdentifier,
-    /// The version was mis-parsed.
-    IncorrectParse(Version, String),
-    /// Any other failure.
-    GenericFailure,
-}
-
-impl Version {
-    /// Parse a string into a semver object.
-    pub fn parse(s: &str) -> Result<Version, ParseError> {
-        if !s.is_ascii() {
-            return Err(NonAsciiIdentifier)
-        }
-        let s = s.trim();
-        let v = parse_iter(&mut s.chars());
-        match v {
-            Some(v) => {
-                if v.to_string() == s {
-                    Ok(v)
-                } else {
-                    Err(IncorrectParse(v, s.to_string()))
-                }
-            }
-            None => Err(GenericFailure)
-        }
-    }
-
-    /// Clears the build metadata
-    fn clear_metadata(&mut self) {
-        self.build = Vec::new();
-        self.pre = Vec::new();
-    }
-
-    /// Increments the patch number for this Version (Must be mutable)
-    pub fn increment_patch(&mut self) {
-        self.patch += 1;
-        self.clear_metadata();
-    }
-
-    /// Increments the minor version number for this Version (Must be mutable)
-    ///
-    /// As instructed by section 7 of the spec, the patch number is reset to 0.
-    pub fn increment_minor(&mut self) {
-        self.minor += 1;
-        self.patch = 0;
-        self.clear_metadata();
-    }
-
-    /// Increments the major version number for this Version (Must be mutable)
-    ///
-    /// As instructed by section 8 of the spec, the minor and patch numbers are
-    /// reset to 0
-    pub fn increment_major(&mut self) {
-        self.major += 1;
-        self.minor = 0;
-        self.patch = 0;
-        self.clear_metadata();
-    }
-}
-
-
-impl fmt::Display for Version {
-    #[inline]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, "{}.{}.{}", self.major, self.minor, self.patch));
-        if !self.pre.is_empty() {
-            try!(write!(f, "-"));
-            for (i, x) in self.pre.iter().enumerate() {
-                if i != 0 { try!(write!(f, ".")) };
-                try!(write!(f, "{}", x));
-            }
-        }
-        if !self.build.is_empty() {
-            try!(write!(f, "+"));
-            for (i, x) in self.build.iter().enumerate() {
-                if i != 0 { try!(write!(f, ".")) };
-                try!(write!(f, "{}", x));
-            }
-        }
-        Ok(())
-    }
-}
-
-impl cmp::PartialEq for Version {
-    #[inline]
-    fn eq(&self, other: &Version) -> bool {
-        // We should ignore build metadata here, otherwise versions v1 and v2
-        // can exist such that !(v1 < v2) && !(v1 > v2) && v1 != v2, which
-        // violate strict total ordering rules.
-        self.major == other.major &&
-            self.minor == other.minor &&
-            self.patch == other.patch &&
-            self.pre == other.pre
-    }
-}
-
-impl cmp::PartialOrd for Version {
-    fn partial_cmp(&self, other: &Version) -> Option<Ordering> {
-        Some(self.cmp(other))
-    }
-}
-
-impl cmp::Ord for Version {
-    fn cmp(&self, other: &Version) -> Ordering {
-        match self.major.cmp(&other.major) {
-            Ordering::Equal => {}
-            r => return r,
-        }
-
-        match self.minor.cmp(&other.minor) {
-            Ordering::Equal => {}
-            r => return r,
-        }
-
-        match self.patch.cmp(&other.patch) {
-            Ordering::Equal => {}
-            r => return r,
-        }
-
-        // NB: semver spec says 0.0.0-pre < 0.0.0
-        // but the version of ord defined for vec
-        // says that [] < [pre] so we alter it here
-        match (self.pre.len(), other.pre.len()) {
-            (0, 0) => Ordering::Equal,
-            (0, _) => Ordering::Greater,
-            (_, 0) => Ordering::Less,
-            (_, _) => self.pre.cmp(&other.pre)
-        }
-    }
-}
-
-impl Error for ParseError {
-    fn description(&self) -> &str {
-        match *self {
-            ParseError::NonAsciiIdentifier
-                => "identifiers can only contain ascii characters",
-            ParseError::GenericFailure
-                | ParseError::IncorrectParse(..)
-                => "failed to parse semver from string",
-        }
-    }
-}
-
-impl fmt::Display for ParseError {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            ParseError::NonAsciiIdentifier => {
-                write!(f, "{}", self.description())
-            }
-            ParseError::GenericFailure => {
-                write!(f, "{}", self.description())
-            }
-            ParseError::IncorrectParse(ref a, ref b) => {
-                write!(f, "{}: {} could not be parsed from {:?}", self.description(), a, b)
-            }
-        }
-    }
-}
-
-impl hash::Hash for Version {
-    fn hash<H: hash::Hasher>(&self, into: &mut H) {
-        self.major.hash(into);
-        self.minor.hash(into);
-        self.patch.hash(into);
-        self.pre.hash(into);
-    }
-}
-
-fn take_nonempty_prefix<T, F>(rdr: &mut T, pred: F) -> (String, Option<char>) where
-    T: Iterator<Item = char>,
-    F: Fn(char) -> bool
-{
-    let mut buf = String::new();
-    let mut ch = rdr.next();
-    loop {
-        match ch {
-            None => break,
-            Some(c) if !pred(c) => break,
-            Some(c) => {
-                buf.push(c);
-                ch = rdr.next();
-            }
-        }
-    }
-    (buf, ch)
-}
-
-fn take_num<T: Iterator<Item=char>>(rdr: &mut T) -> Option<(u64, Option<char>)> {
-    let (s, ch) = take_nonempty_prefix(rdr, |c| c.is_digit(10));
-    match s.parse::<u64>().ok() {
-        None => None,
-        Some(i) => Some((i, ch))
-    }
-}
-
-fn take_ident<T: Iterator<Item=char>>(rdr: &mut T) -> Option<(Identifier, Option<char>)> {
-    let (s,ch) = take_nonempty_prefix(rdr, |c| c.is_alphanumeric());
-
-    if s.len() == 0 {
-        None
-    } else if s.chars().all(|c| c.is_digit(10)) && s.chars().next() != Some('0') {
-        match s.parse::<u64>().ok() {
-            None => None,
-            Some(i) => Some((Numeric(i), ch))
-        }
-    } else {
-        Some((AlphaNumeric(s), ch))
-    }
-}
-
-fn expect(ch: Option<char>, c: char) -> Option<()> {
-    if ch != Some(c) {
-        None
-    } else {
-        Some(())
-    }
-}
-
-fn parse_iter<T: Iterator<Item=char>>(rdr: &mut T) -> Option<Version> {
-    let maybe_vers = take_num(rdr).and_then(|(major, ch)| {
-        expect(ch, '.').and_then(|_| Some(major))
-    }).and_then(|major| {
-        take_num(rdr).and_then(|(minor, ch)| {
-            expect(ch, '.').and_then(|_| Some((major, minor)))
-        })
-    }).and_then(|(major, minor)| {
-        take_num(rdr).and_then(|(patch, ch)| {
-           Some((major, minor, patch, ch))
-        })
-    });
-
-    let (major, minor, patch, ch) = match maybe_vers {
-        Some((a, b, c, d)) => (a, b, c, d),
-        None => return None
-    };
-
-    let mut pre = vec!();
-    let mut build = vec!();
-
-    let mut ch = ch;
-    if ch == Some('-') {
-        loop {
-            let (id, c) = match take_ident(rdr) {
-                Some((id, c)) => (id, c),
-                None => return None
-            };
-            pre.push(id);
-            ch = c;
-            if ch != Some('.') { break; }
-        }
-    }
-
-    if ch == Some('+') {
-        loop {
-            let (id, c) = match take_ident(rdr) {
-                Some((id, c)) => (id, c),
-                None => return None
-            };
-            build.push(id);
-            ch = c;
-            if ch != Some('.') { break; }
-        }
-    }
-
-    Some(Version {
-        major: major,
-        minor: minor,
-        patch: patch,
-        pre: pre,
-        build: build,
-    })
-}
-
-#[cfg(test)]
-mod test {
-    use super::{Version};
-    use super::ParseError::{IncorrectParse, GenericFailure};
-    use super::Identifier::{AlphaNumeric, Numeric};
-
-    #[test]
-    fn test_parse() {
-        assert_eq!(Version::parse(""), Err(GenericFailure));
-        assert_eq!(Version::parse("  "), Err(GenericFailure));
-        assert_eq!(Version::parse("1"), Err(GenericFailure));
-        assert_eq!(Version::parse("1.2"), Err(GenericFailure));
-        assert_eq!(Version::parse("1.2.3-"), Err(GenericFailure));
-        assert_eq!(Version::parse("a.b.c"), Err(GenericFailure));
-
-        let version = Version {
-            major: 1,
-            minor: 2,
-            patch: 3,
-            pre: vec!(),
-            build: vec!(),
-        };
-        let error = Err(IncorrectParse(version, "1.2.3 abc".to_string()));
-        assert_eq!(Version::parse("1.2.3 abc"), error);
-
-        assert!(Version::parse("1.2.3") == Ok(Version {
-            major: 1,
-            minor: 2,
-            patch: 3,
-            pre: vec!(),
-            build: vec!(),
-        }));
-        assert!(Version::parse("  1.2.3  ") == Ok(Version {
-            major: 1,
-            minor: 2,
-            patch: 3,
-            pre: vec!(),
-            build: vec!(),
-        }));
-        assert!(Version::parse("1.2.3-alpha1") == Ok(Version {
-            major: 1,
-            minor: 2,
-            patch: 3,
-            pre: vec!(AlphaNumeric("alpha1".to_string())),
-            build: vec!(),
-        }));
-        assert!(Version::parse("  1.2.3-alpha1  ") == Ok(Version {
-            major: 1,
-            minor: 2,
-            patch: 3,
-            pre: vec!(AlphaNumeric("alpha1".to_string())),
-            build: vec!()
-        }));
-        assert!(Version::parse("1.2.3+build5") == Ok(Version {
-            major: 1,
-            minor: 2,
-            patch: 3,
-            pre: vec!(),
-            build: vec!(AlphaNumeric("build5".to_string()))
-        }));
-        assert!(Version::parse("  1.2.3+build5  ") == Ok(Version {
-            major: 1,
-            minor: 2,
-            patch: 3,
-            pre: vec!(),
-            build: vec!(AlphaNumeric("build5".to_string()))
-        }));
-        assert!(Version::parse("1.2.3-alpha1+build5") == Ok(Version {
-            major: 1,
-            minor: 2,
-            patch: 3,
-            pre: vec!(AlphaNumeric("alpha1".to_string())),
-            build: vec!(AlphaNumeric("build5".to_string()))
-        }));
-        assert!(Version::parse("  1.2.3-alpha1+build5  ") == Ok(Version {
-            major: 1,
-            minor: 2,
-            patch: 3,
-            pre: vec!(AlphaNumeric("alpha1".to_string())),
-            build: vec!(AlphaNumeric("build5".to_string()))
-        }));
-        assert!(Version::parse("1.2.3-1.alpha1.9+build5.7.3aedf  ") == Ok(Version {
-            major: 1,
-            minor: 2,
-            patch: 3,
-            pre: vec!(Numeric(1),AlphaNumeric("alpha1".to_string()),Numeric(9)),
-            build: vec!(AlphaNumeric("build5".to_string()),
-                     Numeric(7),
-                     AlphaNumeric("3aedf".to_string()))
-        }));
-        assert_eq!(Version::parse("0.4.0-beta.1+0851523"), Ok(Version {
-            major: 0,
-            minor: 4,
-            patch: 0,
-            pre: vec![AlphaNumeric("beta".to_string()), Numeric(1)],
-            build: vec![AlphaNumeric("0851523".to_string())],
-        }));
-
-    }
-
-    #[test]
-    fn test_increment_patch() {
-        let mut buggy_release = Version::parse("0.1.0").unwrap();
-        buggy_release.increment_patch();
-        assert_eq!(buggy_release, Version::parse("0.1.1").unwrap());
-    }
-
-    #[test]
-    fn test_increment_minor() {
-        let mut feature_release = Version::parse("1.4.6").unwrap();
-        feature_release.increment_minor();
-        assert_eq!(feature_release, Version::parse("1.5.0").unwrap());
-    }
-
-    #[test]
-    fn test_increment_major() {
-        let mut chrome_release = Version::parse("46.1.246773").unwrap();
-        chrome_release.increment_major();
-        assert_eq!(chrome_release, Version::parse("47.0.0").unwrap());
-    }
-
-    #[test]
-    fn test_increment_keep_prerelease() {
-        let mut release = Version::parse("1.0.0-alpha").unwrap();
-        release.increment_patch();
-
-        assert_eq!(release, Version::parse("1.0.1").unwrap());
-
-        release.increment_minor();
-
-        assert_eq!(release, Version::parse("1.1.0").unwrap());
-
-        release.increment_major();
-
-        assert_eq!(release, Version::parse("2.0.0").unwrap());
-    }
-
-
-    #[test]
-    fn test_increment_clear_metadata() {
-        let mut release = Version::parse("1.0.0+4442").unwrap();
-        release.increment_patch();
-
-        assert_eq!(release, Version::parse("1.0.1").unwrap());
-        release = Version::parse("1.0.1+hello").unwrap();
-
-        release.increment_minor();
-
-        assert_eq!(release, Version::parse("1.1.0").unwrap());
-        release = Version::parse("1.1.3747+hello").unwrap();
-
-        release.increment_major();
-
-        assert_eq!(release, Version::parse("2.0.0").unwrap());
-    }
-
-    #[test]
-    fn test_eq() {
-        assert_eq!(Version::parse("1.2.3"), Version::parse("1.2.3"));
-        assert_eq!(Version::parse("1.2.3-alpha1"), Version::parse("1.2.3-alpha1"));
-        assert_eq!(Version::parse("1.2.3+build.42"), Version::parse("1.2.3+build.42"));
-        assert_eq!(Version::parse("1.2.3-alpha1+42"), Version::parse("1.2.3-alpha1+42"));
-        assert_eq!(Version::parse("1.2.3+23"), Version::parse("1.2.3+42"));
-    }
-
-    #[test]
-    fn test_ne() {
-        assert!(Version::parse("0.0.0")       != Version::parse("0.0.1"));
-        assert!(Version::parse("0.0.0")       != Version::parse("0.1.0"));
-        assert!(Version::parse("0.0.0")       != Version::parse("1.0.0"));
-        assert!(Version::parse("1.2.3-alpha") != Version::parse("1.2.3-beta"));
-    }
-
-    #[test]
-    fn test_show() {
-        assert_eq!(format!("{}", Version::parse("1.2.3").unwrap()),
-                   "1.2.3".to_string());
-        assert_eq!(format!("{}", Version::parse("1.2.3-alpha1").unwrap()),
-                   "1.2.3-alpha1".to_string());
-        assert_eq!(format!("{}", Version::parse("1.2.3+build.42").unwrap()),
-                   "1.2.3+build.42".to_string());
-        assert_eq!(format!("{}", Version::parse("1.2.3-alpha1+42").unwrap()),
-                   "1.2.3-alpha1+42".to_string());
-    }
-
-    #[test]
-    fn test_to_string() {
-        assert_eq!(Version::parse("1.2.3").unwrap().to_string(), "1.2.3".to_string());
-        assert_eq!(Version::parse("1.2.3-alpha1").unwrap().to_string(), "1.2.3-alpha1".to_string());
-        assert_eq!(Version::parse("1.2.3+build.42").unwrap().to_string(), "1.2.3+build.42".to_string());
-        assert_eq!(Version::parse("1.2.3-alpha1+42").unwrap().to_string(), "1.2.3-alpha1+42".to_string());
-    }
-
-    #[test]
-    fn test_lt() {
-        assert!(Version::parse("0.0.0")          < Version::parse("1.2.3-alpha2"));
-        assert!(Version::parse("1.0.0")          < Version::parse("1.2.3-alpha2"));
-        assert!(Version::parse("1.2.0")          < Version::parse("1.2.3-alpha2"));
-        assert!(Version::parse("1.2.3-alpha1")   < Version::parse("1.2.3"));
-        assert!(Version::parse("1.2.3-alpha1")   < Version::parse("1.2.3-alpha2"));
-        assert!(!(Version::parse("1.2.3-alpha2") < Version::parse("1.2.3-alpha2")));
-        assert!(!(Version::parse("1.2.3+23")     < Version::parse("1.2.3+42")));
-    }
-
-    #[test]
-    fn test_le() {
-        assert!(Version::parse("0.0.0")        <= Version::parse("1.2.3-alpha2"));
-        assert!(Version::parse("1.0.0")        <= Version::parse("1.2.3-alpha2"));
-        assert!(Version::parse("1.2.0")        <= Version::parse("1.2.3-alpha2"));
-        assert!(Version::parse("1.2.3-alpha1") <= Version::parse("1.2.3-alpha2"));
-        assert!(Version::parse("1.2.3-alpha2") <= Version::parse("1.2.3-alpha2"));
-        assert!(Version::parse("1.2.3+23")     <= Version::parse("1.2.3+42"));
-    }
-
-    #[test]
-    fn test_gt() {
-        assert!(Version::parse("1.2.3-alpha2")   > Version::parse("0.0.0"));
-        assert!(Version::parse("1.2.3-alpha2")   > Version::parse("1.0.0"));
-        assert!(Version::parse("1.2.3-alpha2")   > Version::parse("1.2.0"));
-        assert!(Version::parse("1.2.3-alpha2")   > Version::parse("1.2.3-alpha1"));
-        assert!(Version::parse("1.2.3")          > Version::parse("1.2.3-alpha2"));
-        assert!(!(Version::parse("1.2.3-alpha2") > Version::parse("1.2.3-alpha2")));
-        assert!(!(Version::parse("1.2.3+23")     > Version::parse("1.2.3+42")));
-    }
-
-    #[test]
-    fn test_ge() {
-        assert!(Version::parse("1.2.3-alpha2") >= Version::parse("0.0.0"));
-        assert!(Version::parse("1.2.3-alpha2") >= Version::parse("1.0.0"));
-        assert!(Version::parse("1.2.3-alpha2") >= Version::parse("1.2.0"));
-        assert!(Version::parse("1.2.3-alpha2") >= Version::parse("1.2.3-alpha1"));
-        assert!(Version::parse("1.2.3-alpha2") >= Version::parse("1.2.3-alpha2"));
-        assert!(Version::parse("1.2.3+23")     >= Version::parse("1.2.3+42"));
-    }
-
-    #[test]
-    fn test_spec_order() {
-        let vs = ["1.0.0-alpha",
-                  "1.0.0-alpha.1",
-                  "1.0.0-alpha.beta",
-                  "1.0.0-beta",
-                  "1.0.0-beta.2",
-                  "1.0.0-beta.11",
-                  "1.0.0-rc.1",
-                  "1.0.0"];
-        let mut i = 1;
-        while i < vs.len() {
-            let a = Version::parse(vs[i-1]).unwrap();
-            let b = Version::parse(vs[i]).unwrap();
-            assert!(a < b);
-            i += 1;
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/semver-0.1.20/src/version_req.rs
+++ /dev/null
@@ -1,877 +0,0 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::error::Error;
-use std::fmt;
-use std::str::CharIndices;
-
-use super::version::Version;
-
-use self::VersionComponent::{NumericVersionComponent, WildcardVersionComponent};
-use self::Op::{Ex, Gt, GtEq, Lt, LtEq, Tilde, Compatible, Wildcard};
-use self::LexState::{LexInit, LexStart, LexVersionComponent, LexSigil, LexErr};
-use self::Token::{Sigil, AlphaNum, Comma, Dot};
-use self::WildcardVersion::{Major, Minor, Patch};
-use self::ReqParseError::{
-    InvalidVersionRequirement,
-    OpAlreadySet,
-    InvalidSigil,
-    VersionComponentsMustBeNumeric,
-    MajorVersionRequired,
-    UnimplementedVersionRequirement
-};
-
-/// A `VersionReq` is a struct containing a list of predicates that can apply to ranges of version
-/// numbers. Matching operations can then be done with the `VersionReq` against a particular
-/// version to see if it satisfies some or all of the constraints.
-#[derive(PartialEq,Clone,Debug)]
-pub struct VersionReq {
-    predicates: Vec<Predicate>
-}
-
-enum VersionComponent {
-    NumericVersionComponent(u64),
-    WildcardVersionComponent
-}
-
-#[derive(Clone, PartialEq, Debug)]
-enum WildcardVersion {
-    Major,
-    Minor,
-    Patch
-}
-
-#[derive(PartialEq,Clone,Debug)]
-enum Op {
-    Ex,   // Exact
-    Gt,   // Greater than
-    GtEq, // Greater than or equal to
-    Lt,   // Less than
-    LtEq, // Less than or equal to
-    Tilde, // e.g. ~1.0.0
-    Compatible, // compatible by definition of semver, indicated by ^
-    Wildcard(WildcardVersion), // x.y.*, x.*, *
-}
-
-#[derive(PartialEq,Clone,Debug)]
-struct Predicate {
-    op: Op,
-    major: u64,
-    minor: Option<u64>,
-    patch: Option<u64>
-}
-
-struct PredBuilder {
-    op: Option<Op>,
-    major: Option<u64>,
-    minor: Option<u64>,
-    patch: Option<u64>
-}
-
-/// A `ReqParseError` is returned from methods which parse a string into a `VersionReq`. Each
-/// enumeration is one of the possible errors that can occur.
-#[derive(Copy, Clone, Debug, PartialEq)]
-pub enum ReqParseError {
-    /// The given version requirement is invalid.
-    InvalidVersionRequirement,
-    /// You have already provided an operation, such as `=`, `~`, or `^`. Only use one.
-    OpAlreadySet,
-    /// The sigil you have written is not correct.
-    InvalidSigil,
-    /// All components of a version must be numeric.
-    VersionComponentsMustBeNumeric,
-    /// At least a major version is required.
-    MajorVersionRequired,
-    /// An unimplemented version requirement.
-    UnimplementedVersionRequirement,
-}
-
-impl fmt::Display for ReqParseError {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        self.description().fmt(f)
-    }
-}
-
-impl Error for ReqParseError {
-    fn description(&self) -> &str {
-        match *self {
-            InvalidVersionRequirement => "the given version requirement is invalid",
-            OpAlreadySet => "you have already provided an operation, such as =, ~, or ^; only use one",
-            InvalidSigil => "the sigil you have written is not correct",
-            VersionComponentsMustBeNumeric => "version components must be numeric",
-            MajorVersionRequired => "at least a major version number is required",
-            UnimplementedVersionRequirement => "the given version requirement is not implemented, yet",
-        }
-    }
-}
-
-impl VersionReq {
-    /// `any()` is a factory method which creates a `VersionReq` with no constraints. In other
-    /// words, any version will match against it.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use semver::VersionReq;
-    ///
-    /// let anything = VersionReq::any();
-    /// ```
-    pub fn any() -> VersionReq {
-        VersionReq { predicates: vec!() }
-    }
-
-    /// `parse()` is the main constructor of a `VersionReq`. It turns a string like `"^1.2.3"`
-    /// and turns it into a `VersionReq` that matches that particular constraint.
-    ///
-    /// A `Result` is returned which contains a `ReqParseError` if there was a problem parsing the
-    /// `VersionReq`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use semver::VersionReq;
-    ///
-    /// let version = VersionReq::parse("=1.2.3");
-    /// let version = VersionReq::parse(">1.2.3");
-    /// let version = VersionReq::parse("<1.2.3");
-    /// let version = VersionReq::parse("~1.2.3");
-    /// let version = VersionReq::parse("^1.2.3");
-    /// let version = VersionReq::parse("<=1.2.3");
-    /// let version = VersionReq::parse(">=1.2.3");
-    /// ```
-    ///
-    /// This example demonstrates error handling, and will panic.
-    ///
-    /// ```should-panic
-    /// use semver::VersionReq;
-    ///
-    /// let version = match VersionReq::parse("not a version") {
-    ///     Ok(version) => version,
-    ///     Err(e) => panic!("There was a problem parsing: {}", e),
-    /// }
-    /// ```
-    pub fn parse(input: &str) -> Result<VersionReq, ReqParseError> {
-        let mut lexer = Lexer::new(input);
-        let mut builder = PredBuilder::new();
-        let mut predicates = Vec::new();
-
-        for token in lexer.by_ref() {
-            let result = match token {
-                Sigil(x) => builder.set_sigil(x),
-                AlphaNum(x) => builder.set_version_part(x),
-                Dot => Ok(()), // Nothing to do for now
-                Comma => {
-                    let result = builder.build().map(|p| predicates.push(p));
-                    builder = PredBuilder::new();
-                    result
-                }
-            };
-
-            match result {
-                Ok(_) => (),
-                Err(e) => return Err(e),
-            }
-        }
-
-        if lexer.is_error() {
-            return Err(InvalidVersionRequirement);
-        }
-
-        match builder.build() {
-            Ok(e) => predicates.push(e),
-            Err(e) => return Err(e),
-        }
-
-        Ok(VersionReq { predicates: predicates })
-    }
-
-    /// `exact()` is a factory method which creates a `VersionReq` with one exact constraint.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use semver::VersionReq;
-    /// use semver::Version;
-    ///
-    /// let version = Version { major: 1, minor: 1, patch: 1, pre: vec![], build: vec![] };
-    /// let exact = VersionReq::exact(&version);
-    /// ```
-    pub fn exact(version: &Version) -> VersionReq {
-        VersionReq { predicates: vec!(Predicate::exact(version)) }
-    }
-
-    /// `matches()` matches a given `Version` against this `VersionReq`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use semver::VersionReq;
-    /// use semver::Version;
-    ///
-    /// let version = Version { major: 1, minor: 1, patch: 1, pre: vec![], build: vec![] };
-    /// let exact = VersionReq::exact(&version);
-    ///
-    /// assert!(exact.matches(&version));
-    /// ```
-    pub fn matches(&self, version: &Version) -> bool {
-        self.predicates.iter().all(|p| p.matches(version))
-    }
-}
-
-impl Predicate {
-    fn exact(version: &Version) -> Predicate {
-        Predicate {
-            op: Ex,
-            major: version.major,
-            minor: Some(version.minor),
-            patch: Some(version.patch)
-        }
-    }
-
-    /// `matches()` takes a `Version` and determines if it matches this particular `Predicate`.
-    pub fn matches(&self, ver: &Version) -> bool {
-        match self.op {
-            Ex => self.is_exact(ver),
-            Gt => self.is_greater(ver),
-            GtEq => self.is_exact(ver) || self.is_greater(ver),
-            Lt => !self.is_exact(ver) && !self.is_greater(ver),
-            LtEq => !self.is_greater(ver),
-            Tilde => self.matches_tilde(ver),
-            Compatible => self.is_compatible(ver),
-            Wildcard(_) => self.matches_wildcard(ver)
-        }
-    }
-
-    fn is_exact(&self, ver: &Version) -> bool {
-        if self.major != ver.major {
-            return false;
-        }
-
-        match self.minor {
-            Some(minor) => {
-                if minor != ver.minor {
-                    return false;
-                }
-            }
-            None => return true
-        }
-
-        match self.patch {
-            Some(patch) => {
-                if patch != ver.patch {
-                    return false;
-                }
-            }
-            None => return true
-        }
-
-        true
-    }
-
-    fn is_greater(&self, ver: &Version) -> bool {
-        if self.major != ver.major {
-            return ver.major > self.major;
-        }
-
-        match self.minor {
-            Some(minor) => {
-                if minor != ver.minor {
-                    return ver.minor > minor
-                }
-            }
-            None => return false
-        }
-
-        match self.patch {
-            Some(patch) => {
-                if patch != ver.patch {
-                    return ver.patch > patch
-                }
-            }
-            None => return false
-        }
-
-        false
-    }
-
-    // see https://www.npmjs.org/doc/misc/semver.html for behavior
-    fn matches_tilde(&self, ver: &Version) -> bool {
-        let minor = match self.minor {
-            Some(n) => n,
-            None => return self.major == ver.major
-        };
-
-        match self.patch {
-            Some(patch) => {
-                self.major == ver.major && minor == ver.minor && ver.patch >= patch
-            }
-            None => {
-                self.major == ver.major && minor == ver.minor
-            }
-        }
-    }
-
-    // see https://www.npmjs.org/doc/misc/semver.html for behavior
-    fn is_compatible(&self, ver: &Version) -> bool {
-        if self.major != ver.major {
-            return false;
-        }
-
-        let minor = match self.minor {
-            Some(n) => n,
-            None => return self.major == ver.major
-        };
-
-        match self.patch {
-            Some(patch) => if self.major == 0 {
-                if minor == 0 {
-                    ver.minor == minor && ver.patch == patch
-                } else {
-                    ver.minor == minor && ver.patch >= patch
-                }
-            } else {
-                ver.minor > minor || (ver.minor == minor && ver.patch >= patch)
-            },
-            None => if self.major == 0 {
-                ver.minor == minor
-            } else {
-                ver.minor >= minor
-            }
-        }
-    }
-
-    // see https://www.npmjs.org/doc/misc/semver.html for behavior
-    fn matches_wildcard(&self, ver: &Version) -> bool {
-        match self.op {
-            Wildcard(Major) => true,
-            Wildcard(Minor) => self.major == ver.major,
-            Wildcard(Patch) => {
-                match self.minor {
-                    Some(minor) => self.major == ver.major && minor == ver.minor,
-                    None => false  // unreachable
-                }
-            }
-            _ => false  // unreachable
-        }
-    }
-}
-
-impl PredBuilder {
-    fn new() -> PredBuilder {
-        PredBuilder {
-            op: None,
-            major: None,
-            minor: None,
-            patch: None
-        }
-    }
-
-    fn set_sigil(&mut self, sigil: &str) -> Result<(), ReqParseError> {
-        if self.op.is_some() {
-            return Err(OpAlreadySet);
-        }
-
-        match Op::from_sigil(sigil) {
-            Some(op) => self.op = Some(op),
-            _ => return Err(InvalidSigil),
-        }
-
-        Ok(())
-    }
-
-    fn set_version_part(&mut self, part: &str) -> Result<(), ReqParseError> {
-        if self.op.is_none() {
-            // If no op is specified, then the predicate is an exact match on
-            // the version
-            self.op = Some(Compatible);
-        }
-
-        if self.major.is_none() {
-            match parse_version_part(part) {
-                Ok(NumericVersionComponent(e)) => self.major = Some(e),
-                Ok(WildcardVersionComponent) => {
-                    self.major = Some(0);
-                    self.op = Some(Wildcard(Major))
-                }
-                Err(e) => return Err(e),
-            }
-        } else if self.minor.is_none() {
-            match parse_version_part(part) {
-                Ok(NumericVersionComponent(e)) => self.minor = Some(e),
-                Ok(WildcardVersionComponent) => self.op = Some(Wildcard(Minor)),
-                Err(e) => return Err(e),
-            }
-        }
-        else if self.patch.is_none() {
-            match parse_version_part(part) {
-                Ok(NumericVersionComponent(e)) => self.patch = Some(e),
-                Ok(WildcardVersionComponent) => self.op = Some(Wildcard(Patch)),
-                Err(e) => return Err(e),
-            }
-        }
-
-        Ok(())
-    }
-
-    /// Validates that a version predicate can be created given the present
-    /// information.
-    fn build(&self) -> Result<Predicate, ReqParseError> {
-        let op = match self.op {
-            Some(ref x) => x.clone(),
-            None => return Err(InvalidVersionRequirement),
-        };
-
-        let major = match self.major {
-            Some(x) => x,
-            None => return Err(MajorVersionRequired),
-        };
-
-        Ok(Predicate {
-            op: op,
-            major: major,
-            minor: self.minor,
-            patch: self.patch
-        })
-    }
-}
-
-struct Lexer<'a> {
-    c: char,
-    idx: usize,
-    iter: CharIndices<'a>,
-    mark: Option<usize>,
-    input: &'a str,
-    state: LexState
-}
-
-#[derive(Copy, Clone, Debug, PartialEq)]
-enum LexState {
-    LexInit,
-    LexStart,
-    LexVersionComponent,
-    LexSigil,
-    LexErr,
-}
-
-#[derive(Debug)]
-enum Token<'a> {
-    Sigil(&'a str),
-    AlphaNum(&'a str),
-    Comma,
-    Dot
-}
-
-impl<'a> Lexer<'a> {
-    fn new(input: &'a str) -> Lexer<'a> {
-        Lexer {
-            c: '\0',
-            idx: 0,
-            iter: input.char_indices(),
-            mark: None,
-            input: input,
-            state: LexInit
-        }
-    }
-
-    fn is_error(&self) -> bool {
-        self.state == LexErr
-    }
-
-    fn mark(&mut self, at: usize) {
-        self.mark = Some(at)
-    }
-
-    fn flush(&mut self, to: usize, kind: LexState) -> Option<Token<'a>> {
-        match self.mark {
-            Some(mark) => {
-                if to <= mark {
-                    return None;
-                }
-
-                let s = &self.input[mark..to];
-
-                self.mark = None;
-
-                match kind {
-                    LexVersionComponent => Some(AlphaNum(s)),
-                    LexSigil => Some(Sigil(s)),
-                    _ => None // bug
-                }
-            }
-            None => None
-        }
-    }
-}
-
-impl<'a> Iterator for Lexer<'a> {
-    type Item = Token<'a>;
-
-    fn next(&mut self) -> Option<Token<'a>> {
-        let mut c;
-        let mut idx = 0;
-
-        macro_rules! next {
-            () => (
-                match self.iter.next() {
-                    Some((n_idx, n_char)) => {
-                        c = n_char;
-                        idx = n_idx;
-                    }
-                    _ => {
-                      let s = self.state;
-                      return self.flush(idx + 1, s)
-                    }
-                }
-            )
-        }
-
-        macro_rules! flush {
-            ($s:expr) => ({
-                self.c = c;
-                self.idx = idx;
-                self.flush(idx, $s)
-            })
-        }
-
-
-        if self.state == LexInit {
-            self.state = LexStart;
-            next!();
-        } else {
-            c = self.c;
-            idx = self.idx;
-        }
-
-        loop {
-            match self.state {
-                LexStart => {
-                    if c.is_whitespace() {
-                        next!(); // Ignore
-                    }
-                    else if c.is_alphanumeric() || c == '*' {
-                        self.mark(idx);
-                        self.state = LexVersionComponent;
-                        next!();
-                    }
-                    else if is_sigil(c) {
-                        self.mark(idx);
-                        self.state = LexSigil;
-                        next!();
-                    }
-                    else if c == '.' {
-                        self.state = LexInit;
-                        return Some(Dot);
-                    }
-                    else if c == ',' {
-                        self.state = LexInit;
-                        return Some(Comma);
-                    } else {
-                        self.state = LexErr;
-                        return None;
-                    }
-                }
-                LexVersionComponent => {
-                    if c.is_alphanumeric() {
-                        next!();
-                    } else {
-                        self.state = LexStart;
-                        return flush!(LexVersionComponent);
-                    }
-                }
-                LexSigil => {
-                    if is_sigil(c) {
-                        next!();
-                    } else {
-                        self.state = LexStart;
-                        return flush!(LexSigil);
-                    }
-                }
-                LexErr => return None,
-                LexInit => return None // bug
-            }
-        }
-    }
-}
-
-impl Op {
-    fn from_sigil(sigil: &str) -> Option<Op> {
-        match sigil {
-            "=" => Some(Ex),
-            ">" => Some(Gt),
-            ">=" => Some(GtEq),
-            "<" => Some(Lt),
-            "<=" => Some(LtEq),
-            "~" => Some(Tilde),
-            "^" => Some(Compatible),
-            _ => None
-        }
-    }
-}
-
-fn parse_version_part(s: &str) -> Result<VersionComponent, ReqParseError> {
-    let mut ret = 0;
-
-    if s == "*" {
-        return Ok(WildcardVersionComponent)
-    }
-
-    for c in s.chars() {
-        let n = (c as u64) - ('0' as u64);
-
-        if n > 9 {
-            return Err(VersionComponentsMustBeNumeric);
-        }
-
-        ret *= 10;
-        ret +=  n;
-    }
-
-    Ok(NumericVersionComponent(ret))
-}
-
-fn is_sigil(c: char) -> bool {
-    match c {
-        '>' | '<' | '=' | '~' | '^' => true,
-        _ => false
-    }
-}
-
-impl fmt::Display for VersionReq {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        if self.predicates.is_empty() {
-            try!(write!(fmt, "*"));
-        } else {
-            for (i, ref pred) in self.predicates.iter().enumerate() {
-                if i == 0 {
-                    try!(write!(fmt, "{}", pred));
-                } else {
-                    try!(write!(fmt, ", {}", pred));
-                }
-            }
-        }
-
-        Ok(())
-    }
-}
-
-impl fmt::Display for Predicate {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        match self.op {
-            Wildcard(Major) => try!(write!(fmt, "*")),
-            Wildcard(Minor) => try!(write!(fmt, "{}.*", self.major)),
-            Wildcard(Patch) => try!(write!(fmt, "{}.{}.*", self.major, self.minor.unwrap())),
-            _ => {
-                try!(write!(fmt, "{}{}", self.op, self.major));
-
-                match self.minor {
-                    Some(v) => try!(write!(fmt, ".{}", v)),
-                    None => ()
-                }
-
-                match self.patch {
-                    Some(v) => try!(write!(fmt, ".{}", v)),
-                    None => ()
-                }
-            },
-        }
-
-        Ok(())
-    }
-}
-
-impl fmt::Display for Op {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            Ex          => try!(write!(fmt, "= ")),
-            Gt          => try!(write!(fmt, "> ")),
-            GtEq        => try!(write!(fmt, ">= ")),
-            Lt          => try!(write!(fmt, "< ")),
-            LtEq        => try!(write!(fmt, "<= ")),
-            Tilde       => try!(write!(fmt, "~")),
-            Compatible  => try!(write!(fmt, "^")),
-             // gets handled specially in Predicate::fmt
-            Wildcard(_) => try!(write!(fmt, "")),
-        }
-        Ok(())
-    }
-}
-
-#[cfg(test)]
-mod test {
-    use super::VersionReq;
-    use super::super::version::Version;
-    use super::ReqParseError::{
-        InvalidVersionRequirement,
-        OpAlreadySet,
-        InvalidSigil,
-        VersionComponentsMustBeNumeric,
-        MajorVersionRequired,
-    };
-
-    fn req(s: &str) -> VersionReq {
-        VersionReq::parse(s).unwrap()
-    }
-
-    fn version(s: &str) -> Version {
-        match Version::parse(s) {
-            Ok(v) => v,
-            Err(e) => panic!("`{}` is not a valid version. Reason: {}", s, e)
-        }
-    }
-
-    fn assert_match(req: &VersionReq, vers: &[&str]) {
-        for ver in vers.iter() {
-            assert!(req.matches(&version(*ver)), "did not match {}", ver);
-        }
-    }
-
-    fn assert_not_match(req: &VersionReq, vers: &[&str]) {
-        for ver in vers.iter() {
-            assert!(!req.matches(&version(*ver)), "matched {}", ver);
-        }
-    }
-
-    #[test]
-    fn test_parsing_default() {
-        let r = req("1.0.0");
-
-        assert_eq!(r.to_string(), "^1.0.0".to_string());
-
-        assert_match(&r, &["1.0.0", "1.0.1"]);
-        assert_not_match(&r, &["0.9.9", "0.10.0", "0.1.0"]);
-    }
-
-    #[test]
-    fn test_parsing_exact() {
-        let r = req("=1.0.0");
-
-        assert!(r.to_string() == "= 1.0.0".to_string());
-        assert_eq!(r.to_string(), "= 1.0.0".to_string());
-
-        assert_match(&r, &["1.0.0"]);
-        assert_not_match(&r, &["1.0.1", "0.9.9", "0.10.0", "0.1.0"]);
-
-        let r = req("=0.9.0");
-
-        assert_eq!(r.to_string(), "= 0.9.0".to_string());
-
-        assert_match(&r, &["0.9.0"]);
-        assert_not_match(&r, &["0.9.1", "1.9.0", "0.0.9"]);
-    }
-
-    #[test]
-    pub fn test_parsing_greater_than() {
-        let r = req(">= 1.0.0");
-
-        assert_eq!(r.to_string(), ">= 1.0.0".to_string());
-
-        assert_match(&r, &["1.0.0"]);
-    }
-
-    #[test]
-    pub fn test_multiple() {
-        let r = req("> 0.0.9, <= 2.5.3");
-        assert_eq!(r.to_string(), "> 0.0.9, <= 2.5.3".to_string());
-        assert_match(&r, &["0.0.10", "1.0.0", "2.5.3"]);
-        assert_not_match(&r, &["0.0.8", "2.5.4"]);
-
-        let r = req("0.3.0, 0.4.0");
-        assert_eq!(r.to_string(), "^0.3.0, ^0.4.0".to_string());
-        assert_not_match(&r, &["0.0.8", "0.3.0", "0.4.0"]);
-
-        let r = req("<= 0.2.0, >= 0.5.0");
-        assert_eq!(r.to_string(), "<= 0.2.0, >= 0.5.0".to_string());
-        assert_not_match(&r, &["0.0.8", "0.3.0", "0.5.1"]);
-
-        let r = req("0.1.0, 0.1.4, 0.1.6");
-        assert_eq!(r.to_string(), "^0.1.0, ^0.1.4, ^0.1.6".to_string());
-        assert_match(&r, &["0.1.6", "0.1.9"]);
-        assert_not_match(&r, &["0.1.0", "0.1.4", "0.2.0"]);
-
-        assert!(VersionReq::parse("> 0.1.0,").is_err());
-        assert!(VersionReq::parse("> 0.3.0, ,").is_err());
-    }
-
-    #[test]
-    pub fn test_parsing_tilde() {
-        let r = req("~1");
-        assert_match(&r, &["1.0.0", "1.0.1", "1.1.1"]);
-        assert_not_match(&r, &["0.9.1", "2.9.0", "0.0.9"]);
-
-        let r = req("~1.2");
-        assert_match(&r, &["1.2.0", "1.2.1"]);
-        assert_not_match(&r, &["1.1.1", "1.3.0", "0.0.9"]);
-
-        let r = req("~1.2.2");
-        assert_match(&r, &["1.2.2", "1.2.4"]);
-        assert_not_match(&r, &["1.2.1", "1.9.0", "1.0.9", "2.0.1", "0.1.3"]);
-    }
-
-    #[test]
-    pub fn test_parsing_compatible() {
-        let r = req("^1");
-        assert_match(&r, &["1.1.2", "1.1.0", "1.2.1", "1.0.1"]);
-        assert_not_match(&r, &["0.9.1", "2.9.0", "0.1.4"]);
-
-        let r = req("^1.1");
-        assert_match(&r, &["1.1.2", "1.1.0", "1.2.1"]);
-        assert_not_match(&r, &["0.9.1", "2.9.0", "1.0.1", "0.1.4"]);
-
-        let r = req("^1.1.2");
-        assert_match(&r, &["1.1.2", "1.1.4", "1.2.1"]);
-        assert_not_match(&r, &["0.9.1", "2.9.0", "1.1.1", "0.0.1"]);
-
-        let r = req("^0.1.2");
-        assert_match(&r, &["0.1.2", "0.1.4"]);
-        assert_not_match(&r, &["0.9.1", "2.9.0", "1.1.1", "0.0.1"]);
-
-        let r = req("^0.0.2");
-        assert_match(&r, &["0.0.2"]);
-        assert_not_match(&r, &["0.9.1", "2.9.0", "1.1.1", "0.0.1", "0.1.4"]);
-
-        let r = req("^0.0");
-        assert_match(&r, &["0.0.2", "0.0.0"]);
-        assert_not_match(&r, &["0.9.1", "2.9.0", "1.1.1", "0.1.4"]);
-
-        let r = req("^0");
-        assert_match(&r, &["0.9.1", "0.0.2", "0.0.0"]);
-        assert_not_match(&r, &["2.9.0", "1.1.1"]);
-    }
-
-    #[test]
-    pub fn test_parsing_wildcard() {
-        let r = req("*");
-        assert_match(&r, &["0.9.1", "2.9.0", "0.0.9", "1.0.1", "1.1.1"]);
-        assert_not_match(&r, &[]);
-
-        let r = req("1.*");
-        assert_match(&r, &["1.2.0", "1.2.1", "1.1.1", "1.3.0"]);
-        assert_not_match(&r, &["0.0.9"]);
-
-        let r = req("1.2.*");
-        assert_match(&r, &["1.2.0", "1.2.2", "1.2.4"]);
-        assert_not_match(&r, &["1.9.0", "1.0.9", "2.0.1", "0.1.3"]);
-    }
-
-
-    #[test]
-    pub fn test_parse_errors() {
-        assert_eq!(Err(InvalidVersionRequirement), VersionReq::parse("0-0.1"));
-        assert_eq!(Err(OpAlreadySet), VersionReq::parse(">= >= 0.0.2"));
-        assert_eq!(Err(InvalidSigil), VersionReq::parse(">== 0.0.2"));
-        assert_eq!(Err(VersionComponentsMustBeNumeric), VersionReq::parse("a.0.0"));
-        assert_eq!(Err(MajorVersionRequired), VersionReq::parse(">="));
-    }
-
-
-    /* TODO:
-     * - Handle pre releases
-     */
-}
--- a/third_party/rust/slog/.cargo-checksum.json
+++ b/third_party/rust/slog/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".cargo/config":"b1d2b4fdf0d7fcfa75533a98408cfad4a537048ce0cd7ac72027d0feda4126b6",".travis.yml":"a9c415cf334e2a854281337d5287cad4990178ae1c4f7d4e17c3aed4f20ba0b4","CHANGELOG.md":"9f8c92f27f9e33501690064a8b749bd04bc7d45fae7c44d2e0a345bf1e26f2ff","Cargo.toml":"df5343247e18112ae3227c71306c4e58ab58a1db87b75b267c992b14f7a7c835","LICENSE-MPL2":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","Makefile":"a8bb2d458c5e2a58be185209143165182e9bb353e097ef752caea500b2c46892","README.md":"350d15b5cf70a84fd1fc9be995881ae4d4bbfbafd825c42a4589aebf79cc4c25","benches.txt":"dd19c2f77e35973a0bf28ec289652436e9709dcb90536ac447c5ed62d9a8a68e","examples.txt":"6939adf8563bd6657a4194f02ed7aa04ce7e88a377351e90d32729a5bcfae3bb","src/_drain.rs":"7dee5308c5abd351dd77b10cdcc79f1fe5a6914cfd96d18ccce6f434f3ab52ad","src/_level.rs":"2d6eba54b7e7dc72c988e8205a0fda52570f41210e43325220286d05da01ef82","src/_logger.rs":"3cedb65d7718738e635bdb08addbfc1f878f28d0d83ef50badf25e52f3d92da5","src/lib.rs":"31c75daf335e35a634a0edfbac282beb4b7b524b3a1860de49815db8caef3faf","src/ser.rs":"4cb0d46f7ea8e5d0c8ff2a8469dcbd188d7232b1652014e82bf51c2b1cbfcf7e","src/tests.rs":"b34f2279d7d1111300bc1965c2760bd3485cf49cfda70dd10030b6a8abbfa842"},"package":"bab9d589681f7d6b9ca4ed5cc861779a392bca7beaae2f69f2341617415a78dc"}
\ No newline at end of file
+{"files":{".cargo/config":"b1d2b4fdf0d7fcfa75533a98408cfad4a537048ce0cd7ac72027d0feda4126b6",".travis.yml":"a9c415cf334e2a854281337d5287cad4990178ae1c4f7d4e17c3aed4f20ba0b4","CHANGELOG.md":"a8de74f313235275bcb16143ef3d379050e396ed509bf0b03b06165f8644f0ea","Cargo.toml":"276ee9cc214c9b9b476b1ec916f4b1008a1820ce69f4a454d118f6958bb47d4a","LICENSE-MPL2":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","Makefile":"a8bb2d458c5e2a58be185209143165182e9bb353e097ef752caea500b2c46892","README.md":"350d15b5cf70a84fd1fc9be995881ae4d4bbfbafd825c42a4589aebf79cc4c25","benches.txt":"dd19c2f77e35973a0bf28ec289652436e9709dcb90536ac447c5ed62d9a8a68e","examples.txt":"6939adf8563bd6657a4194f02ed7aa04ce7e88a377351e90d32729a5bcfae3bb","rusty-tags.vi":"1b8c898a4b26fcafb934e1a6a5d29141c63c9b826763dd8a44dc58e4f524e1d6","src/_drain.rs":"7dee5308c5abd351dd77b10cdcc79f1fe5a6914cfd96d18ccce6f434f3ab52ad","src/_level.rs":"2d6eba54b7e7dc72c988e8205a0fda52570f41210e43325220286d05da01ef82","src/_logger.rs":"3cedb65d7718738e635bdb08addbfc1f878f28d0d83ef50badf25e52f3d92da5","src/lib.rs":"acab0d836f6e0a4313fb977c16a1ca72b845f5f6993c636499e4fd15e903fd33","src/ser.rs":"4cb0d46f7ea8e5d0c8ff2a8469dcbd188d7232b1652014e82bf51c2b1cbfcf7e","src/tests.rs":"b34f2279d7d1111300bc1965c2760bd3485cf49cfda70dd10030b6a8abbfa842"},"package":"5b965551440d867da261b10d50871ae608537c56fbeb872a296b12add733acf1"}
\ No newline at end of file
--- a/third_party/rust/slog/CHANGELOG.md
+++ b/third_party/rust/slog/CHANGELOG.md
@@ -2,16 +2,22 @@
 corresponding `crates/*/` directory.
 
 # Change Log
 All notable changes to this project will be documented in this file.
 
 The format is based on [Keep a Changelog](http://keepachangelog.com/)
 and this project adheres to [Semantic Versioning](http://semver.org/).
 
+## 1.6.0 - 2017-10-19
+### Changed
+
+* *Breaking*: `fmt::Arguments<'static>` should not be `Sync` -
+  https://github.com/slog-rs/slog/pull/148
+
 ## 1.5.0 - 2017-01-19
 ### Changed
 
 * Order of key-value pairs is now strictly defined
 
 ## 1.4.1 - 2017-01-19
 ### Changed
 
--- a/third_party/rust/slog/Cargo.toml
+++ b/third_party/rust/slog/Cargo.toml
@@ -1,48 +1,51 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
 [package]
 name = "slog"
-version = "1.5.2"
+version = "1.6.0"
 authors = ["Dawid Ciężarkiewicz <dpc@dpc.pw>"]
 description = "Structured, composable logging for Rust"
+homepage = "https://github.com/slog-rs/slog"
+documentation = "https://docs.rs/slog"
+readme = "README.md"
 keywords = ["log", "logging", "structured", "hierarchical"]
 categories = ["development-tools::debugging"]
 license = "MPL-2.0"
-documentation = "https://docs.rs/slog"
-homepage = "https://github.com/slog-rs/slog"
 repository = "https://github.com/slog-rs/slog"
-readme = "README.md"
+[profile.bench]
+opt-level = 3
+lto = true
+debug = false
+debug-assertions = false
 
 [profile.release]
 opt-level = 3
-debug = false
 lto = true
-debug-assertions = false
-
-[profile.bench]
-opt-level = 3
 debug = false
-lto = true
 debug-assertions = false
 
-[workspace]
-members = [
-"crates/nursery",
-]
-
 [features]
-
-std = []
 default = ["std"]
-
-max_level_off   = []
-max_level_error = []
-max_level_warn  = []
-max_level_info  = []
 max_level_debug = []
+release_max_level_off = []
+release_max_level_warn = []
+max_level_warn = []
+max_level_info = []
+max_level_off = []
+release_max_level_debug = []
 max_level_trace = []
-
-release_max_level_off   = []
+max_level_error = []
+release_max_level_info = []
+release_max_level_trace = []
 release_max_level_error = []
-release_max_level_warn  = []
-release_max_level_info  = []
-release_max_level_debug = []
-release_max_level_trace = []
+std = []
new file mode 100644
--- /dev/null
+++ b/third_party/rust/slog/rusty-tags.vi
@@ -0,0 +1,459 @@
+!_TAG_FILE_FORMAT	2	/extended format; --format=1 will not append ;" to lines/
+!_TAG_FILE_SORTED	1	/0=unsorted, 1=sorted, 2=foldcase/
+ASCII_LOWERCASE_MAP	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^static ASCII_LOWERCASE_MAP: [u8; 256] =$/;"	c
+AnyTerminal	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^enum AnyTerminal {$/;"	g
+AsFmtSerializer	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^struct AsFmtSerializer<F>(pub F)$/;"	s
+Async	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl Async {$/;"	i
+Async	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^pub struct Async {$/;"	s
+AsyncBuilder	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl<D> AsyncBuilder<D>$/;"	i
+AsyncBuilder	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^pub struct AsyncBuilder<D>$/;"	s
+AsyncCore	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl AsyncCore {$/;"	i
+AsyncCore	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^pub struct AsyncCore {$/;"	s
+AsyncCoreBuilder	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl<D> AsyncCoreBuilder<D>$/;"	i
+AsyncCoreBuilder	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^pub struct AsyncCoreBuilder<D>$/;"	s
+AsyncError	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^pub enum AsyncError {$/;"	g
+AsyncGuard	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^pub struct AsyncGuard {$/;"	s
+AsyncMsg	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^enum AsyncMsg {$/;"	g
+AsyncRecord	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^struct AsyncRecord {$/;"	s
+AsyncResult	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^pub type AsyncResult<T> = std::result::Result<T, AsyncError>;$/;"	T
+BorrowedKV	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct BorrowedKV<'a>($/;"	s
+CheckOwned	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^        struct CheckOwned;$/;"	s
+CompactFormat	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<D> CompactFormat<D>$/;"	i
+CompactFormat	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub struct CompactFormat<D>$/;"	s
+CompactFormatBuilder	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<D> CompactFormatBuilder<D>$/;"	i
+CompactFormatBuilder	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub struct CompactFormatBuilder<D>$/;"	s
+CompactFormatSerializer	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a> CompactFormatSerializer<'a> {$/;"	i
+CompactFormatSerializer	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^struct CompactFormatSerializer<'a> {$/;"	s
+CountingWriter	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a> CountingWriter<'a> {$/;"	i
+CountingWriter	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^struct CountingWriter<'a> {$/;"	s
+Decorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub trait Decorator {$/;"	t
+Decorator for Box	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<T: ?Sized> Decorator for Box<T>$/;"	i
+Decorator for PlainDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<W> Decorator for PlainDecorator<W>$/;"	i
+Decorator for PlainSyncDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<W> Decorator for PlainSyncDecorator<W>$/;"	i
+Decorator for TermDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl Decorator for TermDecorator {$/;"	i
+Discard	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct Discard;$/;"	s
+Drain	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait Drain {$/;"	t
+Drain for Arc	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain + ?Sized> Drain for Arc<D> {$/;"	i
+Drain for Async	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl Drain for Async {$/;"	i
+Drain for AsyncCore	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl Drain for AsyncCore {$/;"	i
+Drain for Box	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain + ?Sized> Drain for Box<D> {$/;"	i
+Drain for CheckOwned	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^        impl Drain for CheckOwned {$/;"	i
+Drain for CompactFormat	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<D> Drain for CompactFormat<D>$/;"	i
+Drain for Discard	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl Drain for Discard {$/;"	i
+Drain for Duplicate	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D1: Drain, D2: Drain> Drain for Duplicate<D1, D2> {$/;"	i
+Drain for Filter	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain, F> Drain for Filter<D, F>$/;"	i
+Drain for FullFormat	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<D> Drain for FullFormat<D>$/;"	i
+Drain for Fuse	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain> Drain for Fuse<D>$/;"	i
+Drain for IgnoreResult	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain> Drain for IgnoreResult<D> {$/;"	i
+Drain for LevelFilter	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain> Drain for LevelFilter<D> {$/;"	i
+Drain for Logger	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D> Drain for Logger<D>$/;"	i
+Drain for MapError	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain, E> Drain for MapError<D, E> {$/;"	i
+Drain for std	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain> Drain for std::sync::Mutex<D> {$/;"	i
+Drop for Async	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl Drop for Async {$/;"	i
+Drop for AsyncCore	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl Drop for AsyncCore {$/;"	i
+Drop for AsyncGuard	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl Drop for AsyncGuard {$/;"	i
+Drop for PlainRecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a, W> Drop for PlainRecordDecorator<'a, W>$/;"	i
+Drop for PlainSyncRecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<W> Drop for PlainSyncRecordDecorator<W>$/;"	i
+Drop for PushFnValueSerializer	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<'a> Drop for PushFnValueSerializer<'a> {$/;"	i
+Drop for Serializer	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a> Drop for Serializer<'a> {$/;"	i
+Drop for TermRecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a> Drop for TermRecordDecorator<'a> {$/;"	i
+Duplicate	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D1: Drain, D2: Drain> Duplicate<D1, D2> {$/;"	i
+Duplicate	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct Duplicate<D1: Drain, D2: Drain>(pub D1, pub D2);$/;"	s
+Err	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    type Err = AsyncError;$/;"	T
+Err	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    type Err = io::Error;$/;"	T
+Err	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    type Err = ($/;"	T
+Err	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    type Err = ();$/;"	T
+Err	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    type Err = D::Err;$/;"	T
+Err	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    type Err = E;$/;"	T
+Err	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    type Err = MutexDrainError<D>;$/;"	T
+Err	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    type Err = Never;$/;"	T
+Err	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    type Err;$/;"	T
+Err	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^            type Err = Never;$/;"	T
+Error	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub enum Error {$/;"	g
+Filter	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain, F> Filter<D, F>$/;"	i
+Filter	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct Filter<D: Drain, F>(pub D, pub F)$/;"	s
+FilterFn	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait FilterFn$/;"	t
+FilterFn	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait FilterFn: 'static + Sync + Send + Fn(&Record) -> bool {}$/;"	t
+FilterFn for T	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> FilterFn for T$/;"	i
+FilterLevel	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl FilterLevel {$/;"	i
+FilterLevel	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub enum FilterLevel {$/;"	g
+FnValue	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct FnValue<V: Value, F>(pub F)$/;"	s
+Foo	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^    impl Foo {$/;"	i
+Foo	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^    struct Foo;$/;"	s
+From	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl<T> From<mpsc::TrySendError<T>> for AsyncError {$/;"	i
+From	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl<T> From<std::sync::PoisonError<T>> for AsyncError {$/;"	i
+From	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl<T> From<std::sync::TryLockError<T>> for AsyncError {$/;"	i
+From	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<'a, D: Drain> From<std::sync::PoisonError<std::sync::MutexGuard<'a, D>>>$/;"	i
+From for Error	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl From<core::fmt::Error> for Error {$/;"	i
+From for Error	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl From<std::io::Error> for Error {$/;"	i
+From for std	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl From<Error> for std::io::Error {$/;"	i
+FromStr for FilterLevel	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl FromStr for FilterLevel {$/;"	i
+FromStr for Level	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl FromStr for Level {$/;"	i
+FullFormat	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<D> FullFormat<D>$/;"	i
+FullFormat	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub struct FullFormat<D>$/;"	s
+FullFormatBuilder	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<D> FullFormatBuilder<D>$/;"	i
+FullFormatBuilder	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub struct FullFormatBuilder<D>$/;"	s
+Fuse	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain> Fuse<D>$/;"	i
+Fuse	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct Fuse<D: Drain>(pub D)$/;"	s
+IgnoreResult	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain> IgnoreResult<D> {$/;"	i
+IgnoreResult	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct IgnoreResult<D: Drain> {$/;"	s
+K	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^        struct K;$/;"	s
+KV	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl KV for () {$/;"	i
+KV	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<'a, T> KV for &'a T$/;"	i
+KV	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T: KV, R: KV> KV for (T, R) {$/;"	i
+KV	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait KV {$/;"	t
+KV for Arc	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> KV for Arc<T>$/;"	i
+KV for BorrowedKV	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<'a> KV for BorrowedKV<'a> {$/;"	i
+KV for Box	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> KV for Box<T>$/;"	i
+KV for K	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^        impl KV for K {$/;"	i
+KV for MultiListNode	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl KV for MultiListNode {$/;"	i
+KV for OwnedKV	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> KV for OwnedKV<T>$/;"	i
+KV for OwnedKVList	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl KV for OwnedKVList {$/;"	i
+KV for OwnedKVListNode	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> KV for OwnedKVListNode<T>$/;"	i
+KV for SingleKV	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<V> KV for SingleKV<V>$/;"	i
+Key	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub type Key = &'static str;$/;"	T
+LOC	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^        static LOC : $crate::RecordLocation = $crate::RecordLocation {$/;"	c
+LOG_LEVEL_NAMES	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub static LOG_LEVEL_NAMES: [&'static str; 7] =$/;"	c
+LOG_LEVEL_SHORT_NAMES	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub static LOG_LEVEL_SHORT_NAMES: [&'static str; 7] =$/;"	c
+Level	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl Level {$/;"	i
+Level	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub enum Level {$/;"	g
+LevelFilter	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain> LevelFilter<D> {$/;"	i
+LevelFilter	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct LevelFilter<D: Drain>(pub D, pub Level);$/;"	s
+Logger	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D> Logger<D>$/;"	i
+Logger	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct Logger<D = Arc<SendSyncRefUnwindSafeDrain<Ok = (), Err = Never>>>$/;"	s
+MapErrFn	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait MapErrFn<EI, EO>$/;"	t
+MapErrFn	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait MapErrFn<EI, EO>: 'static + Sync + Send + Fn(EI) -> EO {}$/;"	t
+MapErrFn for T	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T, EI, EO> MapErrFn<EI, EO> for T$/;"	i
+MapError	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain, E> MapError<D, E> {$/;"	i
+MapError	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct MapError<D: Drain, E> {$/;"	s
+MultiListNode	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^struct MultiListNode {$/;"	s
+MutexDrainError	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub enum MutexDrainError<D: Drain> {$/;"	g
+Never	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub type Never = private::NeverStruct;$/;"	T
+NeverStruct	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub struct NeverStruct(());$/;"	s
+Ok	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    type Ok = ();$/;"	T
+Ok	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    type Ok = ();$/;"	T
+Ok	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    type Ok = ();$/;"	T
+Ok	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    type Ok = (D1::Ok, D2::Ok);$/;"	T
+Ok	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    type Ok = D::Ok;$/;"	T
+Ok	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    type Ok = Option<D::Ok>;$/;"	T
+Ok	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    type Ok;$/;"	T
+Ok	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^            type Ok = ();$/;"	T
+OwnedKV	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct OwnedKV<T>($/;"	s
+OwnedKVList	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl OwnedKVList {$/;"	i
+OwnedKVList	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct OwnedKVList {$/;"	s
+OwnedKVListNode	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^struct OwnedKVListNode<T>$/;"	s
+OwnedKeyValueList	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub type OwnedKeyValueList = OwnedKVList;$/;"	T
+PlainDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<W> PlainDecorator<W>$/;"	i
+PlainDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub struct PlainDecorator<W>(RefCell<W>)$/;"	s
+PlainRecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub struct PlainRecordDecorator<'a, W: 'a>(&'a RefCell<W>)$/;"	s
+PlainSyncDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<W> PlainSyncDecorator<W>$/;"	i
+PlainSyncDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub struct PlainSyncDecorator<W>(sync::Arc<sync::Mutex<W>>)$/;"	s
+PlainSyncRecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub struct PlainSyncRecordDecorator<W>$/;"	s
+PushFnSerializer	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub type PushFnSerializer<'a> = PushFnValueSerializer<'a>;$/;"	T
+PushFnValue	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct PushFnValue<F>(pub F)$/;"	s
+PushFnValueSerializer	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<'a> PushFnValueSerializer<'a> {$/;"	i
+PushFnValueSerializer	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct PushFnValueSerializer<'a> {$/;"	s
+PushLazy	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub type PushLazy<T> = PushFnValue<T>;$/;"	T
+RS	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^        static RS : $crate::RecordStatic<'static> = record_static!($lvl, $tag);$/;"	c
+RS	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^        static RS : $crate::RecordStatic<'static> = slog_record_static!($lvl,$/;"	c
+Record	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<'a> Record<'a> {$/;"	i
+Record	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct Record<'a> {$/;"	s
+RecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub trait RecordDecorator: io::Write {$/;"	t
+RecordDecorator for Box	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl RecordDecorator for Box<RecordDecorator> {$/;"	i
+RecordDecorator for PlainRecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a, W> RecordDecorator for PlainRecordDecorator<'a, W>$/;"	i
+RecordDecorator for PlainSyncRecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<W> RecordDecorator for PlainSyncRecordDecorator<W>$/;"	i
+RecordDecorator for TermRecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a> RecordDecorator for TermRecordDecorator<'a> {$/;"	i
+RecordLocation	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct RecordLocation {$/;"	s
+RecordStatic	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct RecordStatic<'a> {$/;"	s
+Result	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub type Result<T = ()> = result::Result<T, Error>;$/;"	T
+STATIC_TERMINATOR_UNIT	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub static STATIC_TERMINATOR_UNIT: () = ();$/;"	c
+SendRefUnwindSafeDrain	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait SendRefUnwindSafeDrain: Drain + Send + RefUnwindSafe {}$/;"	t
+SendRefUnwindSafeDrain	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait SendRefUnwindSafeDrain: Drain + Send {}$/;"	t
+SendRefUnwindSafeDrain for T	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> SendRefUnwindSafeDrain for T$/;"	i
+SendSyncRefUnwindSafeDrain	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait SendSyncRefUnwindSafeDrain: Drain + Send + Sync + RefUnwindSafe {}$/;"	t
+SendSyncRefUnwindSafeDrain	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait SendSyncRefUnwindSafeDrain: Drain + Send + Sync {}$/;"	t
+SendSyncRefUnwindSafeDrain for T	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> SendSyncRefUnwindSafeDrain for T$/;"	i
+SendSyncRefUnwindSafeKV	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait SendSyncRefUnwindSafeKV: KV + Send + Sync + RefUnwindSafe {}$/;"	t
+SendSyncRefUnwindSafeKV	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait SendSyncRefUnwindSafeKV: KV + Send + Sync {}$/;"	t
+SendSyncRefUnwindSafeKV for T	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> SendSyncRefUnwindSafeKV for T$/;"	i
+SendSyncUnwindSafe	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait SendSyncUnwindSafe: Send + Sync + UnwindSafe {}$/;"	t
+SendSyncUnwindSafe for T	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> SendSyncUnwindSafe for T$/;"	i
+SendSyncUnwindSafeDrain	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait SendSyncUnwindSafeDrain: Drain + Send + Sync + UnwindSafe {}$/;"	t
+SendSyncUnwindSafeDrain	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait SendSyncUnwindSafeDrain: Drain + Send + Sync {}$/;"	t
+SendSyncUnwindSafeDrain for T	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> SendSyncUnwindSafeDrain for T$/;"	i
+Serialize	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub type Serialize = Value;$/;"	T
+Serializer	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a> Serializer<'a> {$/;"	i
+Serializer	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^struct Serializer<'a> {$/;"	s
+Serializer	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait Serializer {$/;"	t
+Serializer for AsFmtSerializer	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<F> Serializer for AsFmtSerializer<F>$/;"	i
+Serializer for ToSendSerializer	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl Serializer for ToSendSerializer {$/;"	i
+SingleKV	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub struct SingleKV<V>(pub Key, pub V)$/;"	s
+TIMESTAMP_FORMAT	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^const TIMESTAMP_FORMAT: &'static str = "%b %d %H:%M:%S%.3f";$/;"	c
+TermDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl TermDecorator {$/;"	i
+TermDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub struct TermDecorator {$/;"	s
+TermDecoratorBuilder	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl TermDecoratorBuilder {$/;"	i
+TermDecoratorBuilder	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub struct TermDecoratorBuilder {$/;"	s
+TermRecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub struct TermRecordDecorator<'a> {$/;"	s
+TestStdoutWriter	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub struct TestStdoutWriter;$/;"	s
+ThreadSafeTimestampFn	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub trait ThreadSafeTimestampFn$/;"	t
+ThreadSafeTimestampFn for F	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<F> ThreadSafeTimestampFn for F$/;"	i
+ToSendSerializer	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^impl ToSendSerializer {$/;"	i
+ToSendSerializer	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^struct ToSendSerializer {$/;"	s
+Value	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^        impl Value for $t {$/;"	i
+Value	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl Value for () {$/;"	i
+Value	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<'a, V> Value for &'a V$/;"	i
+Value	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub trait Value {$/;"	t
+Value for Arc	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> Value for Arc<T>$/;"	i
+Value for Box	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> Value for Box<T>$/;"	i
+Value for FnValue	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<'a, V: 'a + Value, F> Value for FnValue<V, F>$/;"	i
+Value for Option	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T: Value> Value for Option<T> {$/;"	i
+Value for PushFnValue	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<F> Value for PushFnValue<F>$/;"	i
+Value for Rc	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> Value for Rc<T>$/;"	i
+Value for String	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl Value for String {$/;"	i
+Value for core	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> Value for core::num::Wrapping<T>$/;"	i
+Value for fmt	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<'a> Value for fmt::Arguments<'a> {$/;"	i
+Value for std	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<'a> Value for std::path::Display<'a>$/;"	i
+Value for str	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl Value for str {$/;"	i
+ValueSerializer	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub type ValueSerializer<'a> = PushFnValueSerializer<'a>;$/;"	T
+X	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^    struct X {$/;"	s
+__slog_static_max_level	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub fn __slog_static_max_level() -> FilterLevel {$/;"	f
+as_short_str	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn as_short_str(&self) -> &'static str {$/;"	f
+as_str	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn as_str(&self) -> &'static str {$/;"	f
+as_usize	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn as_usize(&self) -> usize {$/;"	f
+b	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! b($/;"	d
+bar	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^        fn bar(&self) -> u32 {$/;"	f
+build	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    pub fn build(self) -> Async {$/;"	f
+build	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    pub fn build(self) -> AsyncCore {$/;"	f
+build	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn build(self) -> CompactFormat<D> {$/;"	f
+build	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn build(self) -> FullFormat<D> {$/;"	f
+build	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn build(self) -> TermDecorator {$/;"	f
+build_no_guard	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    pub fn build_no_guard(self) -> Async {$/;"	f
+build_no_guard	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    pub fn build_no_guard(self) -> AsyncCore {$/;"	f
+build_with_guard	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    pub fn build_with_guard(self) -> (Async, AsyncGuard) {$/;"	f
+build_with_guard	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    pub fn build_with_guard(self) -> (AsyncCore, AsyncGuard) {$/;"	f
+cause	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn cause(&self) -> Option<&std::error::Error> {$/;"	f
+chan_size	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    pub fn chan_size(mut self, s: usize) -> Self {$/;"	f
+chan_size	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    pub fn chan_size(self, s: usize) -> Self {$/;"	f
+column	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn column(&self) -> u32 {$/;"	f
+convert	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<T> convert::From<OwnedKV<T>> for OwnedKVList$/;"	i
+core::fmt::Display for Error	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl core::fmt::Display for Error {$/;"	i
+count	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn count(&self) -> usize {$/;"	f
+crit	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! crit($/;"	d
+cs	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^macro_rules! cs($/;"	d
+custom	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    pub fn custom<$/;"	f
+debug	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! debug($/;"	d
+default	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    pub fn default<$/;"	f
+description	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn description(&self) -> &str {$/;"	f
+drop	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn drop(&mut self) {$/;"	f
+drop	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn drop(&mut self) {$/;"	f
+drop	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn drop(&mut self) {$/;"	f
+emit	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn emit<'b, S: 'b + Value>(mut self, s: S) -> Result {$/;"	f
+emit_arguments	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_arguments($/;"	f
+emit_arguments	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_arguments($/;"	f
+emit_arguments	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn emit_arguments(&mut self, key: Key, val: &fmt::Arguments) -> Result {$/;"	f
+emit_arguments	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn emit_arguments(&mut self, key: Key, val: &fmt::Arguments) -> Result;$/;"	f
+emit_bool	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_bool(&mut self, key: Key, val: bool) -> slog::Result {$/;"	f
+emit_bool	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_bool(&mut self, key: &str, val: bool) -> slog::Result {$/;"	f
+emit_char	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_char(&mut self, key: Key, val: char) -> slog::Result {$/;"	f
+emit_char	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_char(&mut self, key: &str, val: char) -> slog::Result {$/;"	f
+emit_f32	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_f32(&mut self, key: Key, val: f32) -> slog::Result {$/;"	f
+emit_f32	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_f32(&mut self, key: &str, val: f32) -> slog::Result {$/;"	f
+emit_f64	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_f64(&mut self, key: Key, val: f64) -> slog::Result {$/;"	f
+emit_f64	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_f64(&mut self, key: &str, val: f64) -> slog::Result {$/;"	f
+emit_i16	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_i16(&mut self, key: Key, val: i16) -> slog::Result {$/;"	f
+emit_i16	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_i16(&mut self, key: &str, val: i16) -> slog::Result {$/;"	f
+emit_i32	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_i32(&mut self, key: Key, val: i32) -> slog::Result {$/;"	f
+emit_i32	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_i32(&mut self, key: &str, val: i32) -> slog::Result {$/;"	f
+emit_i64	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_i64(&mut self, key: Key, val: i64) -> slog::Result {$/;"	f
+emit_i64	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_i64(&mut self, key: &str, val: i64) -> slog::Result {$/;"	f
+emit_i8	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_i8(&mut self, key: Key, val: i8) -> slog::Result {$/;"	f
+emit_i8	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_i8(&mut self, key: &str, val: i8) -> slog::Result {$/;"	f
+emit_isize	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_isize(&mut self, key: Key, val: isize) -> slog::Result {$/;"	f
+emit_isize	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_isize(&mut self, key: &str, val: isize) -> slog::Result {$/;"	f
+emit_none	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_none(&mut self, key: Key) -> slog::Result {$/;"	f
+emit_none	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_none(&mut self, key: &str) -> slog::Result {$/;"	f
+emit_none	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn emit_none(&mut self, key: Key) -> Result {$/;"	f
+emit_str	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_str(&mut self, key: Key, val: &str) -> slog::Result {$/;"	f
+emit_str	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_str(&mut self, key: &str, val: &str) -> slog::Result {$/;"	f
+emit_u16	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_u16(&mut self, key: Key, val: u16) -> slog::Result {$/;"	f
+emit_u16	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_u16(&mut self, key: &str, val: u16) -> slog::Result {$/;"	f
+emit_u32	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_u32(&mut self, key: Key, val: u32) -> slog::Result {$/;"	f
+emit_u32	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_u32(&mut self, key: &str, val: u32) -> slog::Result {$/;"	f
+emit_u64	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_u64(&mut self, key: Key, val: u64) -> slog::Result {$/;"	f
+emit_u64	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_u64(&mut self, key: &str, val: u64) -> slog::Result {$/;"	f
+emit_u8	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_u8(&mut self, key: Key, val: u8) -> slog::Result {$/;"	f
+emit_u8	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_u8(&mut self, key: &str, val: u8) -> slog::Result {$/;"	f
+emit_unit	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_unit(&mut self, key: Key) -> slog::Result {$/;"	f
+emit_unit	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_unit(&mut self, key: &str) -> slog::Result {$/;"	f
+emit_unit	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn emit_unit(&mut self, key: Key) -> Result {$/;"	f
+emit_usize	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn emit_usize(&mut self, key: Key, val: usize) -> slog::Result {$/;"	f
+emit_usize	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn emit_usize(&mut self, key: &str, val: usize) -> slog::Result {$/;"	f
+error	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! error($/;"	d
+expressions	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^fn expressions() {$/;"	f
+expressions_fmt	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^fn expressions_fmt() {$/;"	f
+file	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn file(&self) -> &'static str {$/;"	f
+filter	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn filter<F>(self, f: F) -> Filter<Self, F>$/;"	f
+filter_level	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn filter_level(self, level: Level) -> LevelFilter<Self>$/;"	f
+filterlevel_sanity	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^fn filterlevel_sanity() {$/;"	f
+finish	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn finish(self) -> Box<KV + Send> {$/;"	f
+finish	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn finish(&mut self) -> io::Result<usize> {$/;"	f
+finish	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn finish(mut self) -> io::Result<()> {$/;"	f
+flush	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn flush(&mut self) -> io::Result<()> {$/;"	f
+fmt	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {$/;"	f
+fmt	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn fmt(&self, f: &mut fmt::Formatter) -> result::Result<(), fmt::Error> {$/;"	f
+fmt	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn fmt(&self, fmt: &mut core::fmt::Formatter) -> std::fmt::Result {$/;"	f
+fmt::Debug for Logger	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D> fmt::Debug for Logger<D>$/;"	i
+fmt::Debug for MutexDrainError	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D> fmt::Debug for MutexDrainError<D>$/;"	i
+fmt::Debug for OwnedKVList	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl fmt::Debug for OwnedKVList {$/;"	i
+fmt::Display for Level	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl fmt::Display for Level {$/;"	i
+fmt::Display for MutexDrainError	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D: Drain> fmt::Display for MutexDrainError<D>$/;"	i
+force_color	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn force_color(mut self) -> Self {$/;"	f
+force_plain	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn force_plain(mut self) -> Self {$/;"	f
+format_compact	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn format_compact($/;"	f
+format_full	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn format_full($/;"	f
+from	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn from(_: mpsc::TrySendError<T>) -> AsyncError {$/;"	f
+from	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn from(_: std::sync::TryLockError<T>) -> AsyncError {$/;"	f
+from	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn from(err: std::sync::PoisonError<T>) -> AsyncError {$/;"	f
+from	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn from($/;"	f
+from	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn from(_: core::fmt::Error) -> Error {$/;"	f
+from	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn from(e: Error) -> std::io::Error {$/;"	f
+from	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn from(err: std::io::Error) -> Error {$/;"	f
+from	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn from(from: OwnedKV<T>) -> Self {$/;"	f
+from_str	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn from_str(level: &str) -> core::result::Result<FilterLevel, ()> {$/;"	f
+from_str	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn from_str(level: &str) -> core::result::Result<Level, ()> {$/;"	f
+from_usize	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn from_usize(u: usize) -> Option<FilterLevel> {$/;"	f
+from_usize	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn from_usize(u: usize) -> Option<Level> {$/;"	f
+function	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn function(&self) -> &'static str {$/;"	f
+fuse	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn fuse(self) -> Fuse<Self>$/;"	f
+get_sender	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn get_sender($/;"	f
+ignore_res	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn ignore_res(self) -> IgnoreResult<Self>$/;"	f
+impl_default_as_fmt	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! impl_default_as_fmt{$/;"	d
+impl_value_for	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! impl_value_for{$/;"	d
+info	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! info($/;"	d
+into_erased	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn into_erased($/;"	f
+io::Write for CountingWriter	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a> io::Write for CountingWriter<'a> {$/;"	i
+io::Write for PlainRecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a, W> io::Write for PlainRecordDecorator<'a, W>$/;"	i
+io::Write for PlainSyncRecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<W> io::Write for PlainSyncRecordDecorator<W>$/;"	i
+io::Write for TermRecordDecorator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a> io::Write for TermRecordDecorator<'a> {$/;"	i
+io::Write for TestStdoutWriter	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl io::Write for TestStdoutWriter {$/;"	i
+is_at_least	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn is_at_least(&self, level: Self) -> bool {$/;"	f
+kv	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn kv(&self) -> BorrowedKV {$/;"	f
+kv	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! kv($/;"	d
+level	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn level(&self) -> Level {$/;"	f
+level_at_least	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^fn level_at_least() {$/;"	f
+level_from_str	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^fn level_from_str() {$/;"	f
+level_to_color	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn level_to_color(level: slog::Level) -> u16 {$/;"	f
+line	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn line(&self) -> u32 {$/;"	f
+list	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn list(&self) -> &OwnedKVList {$/;"	f
+location	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn location(&self) -> &RecordLocation {$/;"	f
+log	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn log($/;"	f
+log	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn log($/;"	f
+log	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn log($/;"	f
+log	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn log(&self, _: &Record, _: &OwnedKVList) -> result::Result<(), Never> {$/;"	f
+log	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn log(&self, record: &Record) {$/;"	f
+log	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! log($/;"	d
+log	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^            fn log($/;"	f
+logger_fmt_debug_sanity	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^    fn logger_fmt_debug_sanity() {$/;"	f
+logger_to_erased	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^fn logger_to_erased() {$/;"	f
+makers	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^fn makers() {$/;"	f
+map	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn map<F, R>(self, f: F) -> R$/;"	f
+map_err	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn map_err<F, E>(self, f: F) -> MapError<Self, E>$/;"	f
+max	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn max() -> Self {$/;"	f
+maybe_print_comma	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn maybe_print_comma(&mut self) -> io::Result<()> {$/;"	f
+min	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn min() -> Self {$/;"	f
+module	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn module(&self) -> &'static str {$/;"	f
+msg	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn msg(&self) -> &fmt::Arguments {$/;"	f
+multichain	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^    fn multichain() {$/;"	f
+new	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn new() -> Self {$/;"	f
+new	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn new(drain: D) -> AsyncBuilder<D> {$/;"	f
+new	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn new(drain: D) -> Self {$/;"	f
+new	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    pub fn new<D: slog::Drain<Err = slog::Never, Ok = ()> + Send + 'static>($/;"	f
+new	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    pub fn new<D>(drain: D) -> Self$/;"	f
+new	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn new($/;"	f
+new	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn new() -> Self {$/;"	f
+new	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn new(wrapped: &'a mut io::Write) -> CountingWriter {$/;"	f
+new	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn new() -> TermDecoratorBuilder {$/;"	f
+new	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn new(d: D) -> CompactFormatBuilder<D> {$/;"	f
+new	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn new(d: D) -> FullFormatBuilder<D> {$/;"	f
+new	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn new(io: W) -> Self {$/;"	f
+new	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn new<T>($/;"	f
+new	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn new($/;"	f
+new	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn new(drain1: D1, drain2: D2) -> Self {$/;"	f
+new	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn new(drain: D) -> Self {$/;"	f
+new	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn new(drain: D, cond: F) -> Self {$/;"	f
+new	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn new(drain: D, level: Level) -> Self {$/;"	f
+new	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn new<F>(drain: D, map_fn: F) -> Self$/;"	f
+new	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn new<T>(&self, values: OwnedKV<T>) -> Logger<D>$/;"	f
+no_imports	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^mod no_imports {$/;"	m
+o	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! o($/;"	d
+print_msg_header	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^fn print_msg_header($/;"	f
+private	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^mod private {$/;"	m
+push_dropped	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn push_dropped(&self, logger_values: &OwnedKVList) -> AsyncResult<()> {$/;"	f
+record	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! record($/;"	d
+record_static	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! record_static($/;"	d
+reset	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn reset(&mut self) -> io::Result<()> {$/;"	f
+reset	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn reset(&mut self) -> io::Result<()>;$/;"	f
+root	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn root<T>(values: OwnedKV<T>) -> Self$/;"	f
+root	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn root<T>(drain: D, values: OwnedKV<T>) -> Logger$/;"	f
+root_typed	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn root_typed<T>(drain: D, values: OwnedKV<T>) -> Logger<D>$/;"	f
+s	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^macro_rules! s($/;"	d
+send	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn send(&self, r: AsyncRecord) -> AsyncResult<()> {$/;"	f
+ser	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^pub mod ser {$/;"	m
+serialize	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^            fn serialize(&self,$/;"	f
+serialize	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn serialize($/;"	f
+serialize	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn serialize(&self, record: &Record, serializer: &mut Serializer)$/;"	f
+serialize	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    fn serialize(&self,$/;"	f
+serialize	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn serialize<'b, S: 'b + Value>(self, s: S) -> Result {$/;"	f
+serialize	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^            fn serialize($/;"	f
+should_use_color	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn should_use_color(&self) -> bool {$/;"	f
+simple_logger_erased	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^fn simple_logger_erased() {$/;"	f
+slog::ser::Serializer for CompactFormatSerializer	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a> slog::ser::Serializer for CompactFormatSerializer<'a> {$/;"	i
+slog::ser::Serializer for Serializer	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^impl<'a> slog::ser::Serializer for Serializer<'a> {$/;"	i
+slog_b	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! slog_b($/;"	d
+slog_crit	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! slog_crit($/;"	d
+slog_debug	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! slog_debug($/;"	d
+slog_error	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! slog_error($/;"	d
+slog_info	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! slog_info($/;"	d
+slog_kv	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! slog_kv($/;"	d
+slog_log	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! slog_log($/;"	d
+slog_o	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! slog_o($/;"	d
+slog_record	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! slog_record($/;"	d
+slog_record_static	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! slog_record_static($/;"	d
+slog_trace	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! slog_trace($/;"	d
+slog_warn	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! slog_warn($/;"	d
+spawn_thread	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-async-2.1.0/lib.rs	/^    fn spawn_thread($/;"	f
+start_comma	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn start_comma(&mut self) -> io::Result<()> {$/;"	f
+start_key	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn start_key(&mut self) -> io::Result<()> {$/;"	f
+start_level	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn start_level(&mut self) -> io::Result<()> {$/;"	f
+start_msg	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn start_msg(&mut self) -> io::Result<()> {$/;"	f
+start_separator	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn start_separator(&mut self) -> io::Result<()> {$/;"	f
+start_timestamp	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn start_timestamp(&mut self) -> io::Result<()> {$/;"	f
+start_value	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn start_value(&mut self) -> io::Result<()> {$/;"	f
+start_whitespace	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn start_whitespace(&mut self) -> io::Result<()> {$/;"	f
+std::error::Error for Error	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl std::error::Error for Error {$/;"	i
+std::error::Error for MutexDrainError	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^impl<D> std::error::Error for MutexDrainError<D>$/;"	i
+std_only	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^mod std_only {$/;"	m
+stderr	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn stderr(mut self) -> Self {$/;"	f
+stdout	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn stdout(mut self) -> Self {$/;"	f
+tag	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn tag(&self) -> &str {$/;"	f
+takes_arced_drain	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^    fn takes_arced_drain(_l: Logger) {}$/;"	f
+term_compact	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub fn term_compact() -> CompactFormat<TermDecorator> {$/;"	f
+term_error_to_io_error	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^fn term_error_to_io_error(e: term::Error) -> io::Error {$/;"	f
+term_full	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub fn term_full() -> FullFormat<TermDecorator> {$/;"	f
+test_o_macro_expansion	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^    fn test_o_macro_expansion() {$/;"	f
+test_slog_o_macro_expansion	/home/dpc/lab/rust/slog/slog-rs/src/tests.rs	/^    fn test_slog_o_macro_expansion() {$/;"	f
+tests	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^mod tests;$/;"	m
+timestamp_local	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub fn timestamp_local(io: &mut io::Write) -> io::Result<()> {$/;"	f
+timestamp_utc	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^pub fn timestamp_utc(io: &mut io::Write) -> io::Result<()> {$/;"	f
+to_erased	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^    pub fn to_erased($/;"	f
+trace	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! trace($/;"	d
+try_build	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn try_build(self) -> Option<TermDecorator> {$/;"	f
+use_custom_timestamp	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn use_custom_timestamp<F>(mut self, f: F) -> Self$/;"	f
+use_local_timestamp	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn use_local_timestamp(mut self) -> Self {$/;"	f
+use_original_order	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn use_original_order(mut self) -> Self {$/;"	f
+use_utc_timestamp	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    pub fn use_utc_timestamp(mut self) -> Self {$/;"	f
+warn	/home/dpc/lab/rust/slog/slog-rs/src/lib.rs	/^macro_rules! warn($/;"	d
+with_record	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn with_record<F>($/;"	f
+write	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {$/;"	f
+write	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn write(&mut self, data: &[u8]) -> io::Result<usize> {$/;"	f
+write_all	/home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-term-2.2.0/src/lib.rs	/^    fn write_all(&mut self, buf: &[u8]) -> io::Result<()> {$/;"	f
--- a/third_party/rust/slog/src/lib.rs
+++ b/third_party/rust/slog/src/lib.rs
@@ -660,44 +660,57 @@ struct OwnedKeyValueListInner {
 /// Chain of `SyncMultiSerialize`-s of a `Logger` and its ancestors
 #[derive(Clone)]
 pub struct OwnedKeyValueList {
     inner : Arc<OwnedKeyValueListInner>,
 }
 
 impl OwnedKeyValueList {
     /// New `OwnedKeyValueList` node with an existing parent
+    #[deprecated]
     pub fn new(values: Box<ser::SyncMultiSerialize>, parent: OwnedKeyValueList) -> Self {
         OwnedKeyValueList {
             inner: Arc::new(OwnedKeyValueListInner {
                 parent: Some(parent),
                 values: Some(values),
             })
         }
     }
 
     /// New `OwnedKeyValue` node without a parent (root)
+    #[deprecated]
     pub fn root(values: Option<Box<ser::SyncMultiSerialize>>) -> Self {
         OwnedKeyValueList {
             inner: Arc::new(OwnedKeyValueListInner {
                 parent: None,
                 values: values,
             })
         }
     }
 
     /// Get the parent node element on the chain of values
     ///
     /// Since `OwnedKeyValueList` is just a chain of `SyncMultiSerialize` instances: each
     /// containing one more more `OwnedKeyValue`, it's possible to iterate through the whole list
     /// group-by-group with `parent()` and `values()`.
+    #[deprecated(note="&Option<...> is a stupid type to return. Use `get_parent` for now.")]
     pub fn parent(&self) -> &Option<OwnedKeyValueList> {
         &self.inner.parent
     }
 
+    /// Get the previous element on the chain of values
+    ///
+    /// Since `OwnedKeyValueList` is just a chain of `SyncMultiSerialize` instances: each
+    /// containing one more more `OwnedKeyValue`, it's possible to iterate through the whole list
+    /// group-by-group with `parent()` and `values()`.
+    #[deprecated]
+    pub fn previous(&self) -> Option<OwnedKeyValueList> {
+        self.inner.parent.clone()
+    }
+
     /// Get the head node `SyncMultiSerialize` values
     pub fn values(&self) -> Option<&ser::SyncMultiSerialize> {
         self.inner.values.as_ref().map(|b| &**b)
     }
 
     /// Iterator over all `OwnedKeyValue`-s in every `SyncMultiSerialize` of the list
     ///
     /// The order is reverse to how it was built. Eg.
copy from third_party/rust/textwrap/.appveyor.yml
copy to third_party/rust/textwrap-0.6.0/.appveyor.yml
copy from third_party/rust/textwrap/.cargo-checksum.json
copy to third_party/rust/textwrap-0.6.0/.cargo-checksum.json
copy from third_party/rust/textwrap/.travis.yml
copy to third_party/rust/textwrap-0.6.0/.travis.yml
copy from third_party/rust/textwrap/Cargo.toml
copy to third_party/rust/textwrap-0.6.0/Cargo.toml
new file mode 100644
--- /dev/null
+++ b/third_party/rust/textwrap-0.6.0/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Martin Geisler
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
copy from third_party/rust/textwrap/README.md
copy to third_party/rust/textwrap-0.6.0/README.md
copy from third_party/rust/textwrap/benches/linear.rs
copy to third_party/rust/textwrap-0.6.0/benches/linear.rs
copy from third_party/rust/textwrap/examples/layout.rs
copy to third_party/rust/textwrap-0.6.0/examples/layout.rs
copy from third_party/rust/textwrap/examples/termwidth.rs
copy to third_party/rust/textwrap-0.6.0/examples/termwidth.rs
copy from third_party/rust/textwrap/src/lib.rs
copy to third_party/rust/textwrap-0.6.0/src/lib.rs
--- a/third_party/rust/textwrap/.appveyor.yml
+++ b/third_party/rust/textwrap/.appveyor.yml
@@ -1,24 +1,11 @@
 environment:
   matrix:
-  - TOOLCHAIN: 1.8.0
-    FEATURES: ""
   - TOOLCHAIN: stable
-    FEATURES: ""
-  - TOOLCHAIN: beta
-    FEATURES: ""
-  - TOOLCHAIN: nightly
-    FEATURES: ""
-
-  - TOOLCHAIN: 1.13.0
-    FEATURES: "hyphenation"
-  - TOOLCHAIN: stable
-    FEATURES: "hyphenation"
-  - TOOLCHAIN: beta
     FEATURES: "hyphenation"
   - TOOLCHAIN: nightly
     FEATURES: "hyphenation"
 
 matrix:
   allow_failures:
     - TOOLCHAIN: nightly
 
--- a/third_party/rust/textwrap/.cargo-checksum.json
+++ b/third_party/rust/textwrap/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".appveyor.yml":"c4f7300b7fbb4c0e02665b0bf8d55b94d331600e3626cd4b4b64e56067735bd8",".travis.yml":"afc3861d80dbffc431e723bd4be8a9065e176fb377d900db1db91957a2a47917","Cargo.toml":"ad4d2c450155a390799f0231bfc40531a9abb28069a0d308c3ecb75ec4447d15","LICENSE":"ce93600c49fbb3e14df32efe752264644f6a2f8e08a735ba981725799e5309ef","README.md":"67b7eca97cfa6438073316538a4e6442a01e7d811f33b93cbb9b54f795d5ea90","benches/linear.rs":"c53704dadf156847142a8a8f19860d310daa7bee5ed25da8203445620eb2284f","examples/layout.rs":"bff2fc9b51bb9e8fcf7e3305f2efcb293fc068817d190ab83e76a4bbd75d2111","examples/termwidth.rs":"91c6762d35c4a542432885f3949b8db1cf5b5e428a0bec23f780c7bbd31c7fe3","src/lib.rs":"671b02360dfbdfa7198717ed3cda0fc32251d2cb0864a17a02b227f83cf5a76e"},"package":"f86300c3e7416ee233abd7cda890c492007a3980f941f79185c753a701257167"}
\ No newline at end of file
+{"files":{".appveyor.yml":"71febf4135af9ce7be6350b192d2906078269f0eab94b743e003e02e8191e11f",".rustfmt.toml":"6faa2937abb6a114e2f099614d492ae8c0fd08f8060497ecd18a3e31c3b5d69f",".travis.yml":"0aa0c290da95cef37877fadaad3a668cbffe60533986bbcfa04c7db0c830d674","Cargo.toml":"cb72f8ac90e87d794252acfe2e957fbe0effe937ab2eded759af1daad4bc052d","LICENSE":"ce93600c49fbb3e14df32efe752264644f6a2f8e08a735ba981725799e5309ef","README.md":"9cd343e0b056f823677521bfe96b3ff1440d6a5e4455179ae3fe28cd6c4038da","benches/linear.rs":"0484029d32f3f0e8e0d61085db9cdae610019241a73f05485f9b9a9a7a5e1c53","examples/layout.rs":"7758e5526a8b1718c7a69748a4f63703545b6ac13042d753a6d14de0a1b3edcf","examples/termwidth.rs":"f969e869802d21daf59d1ae23c668539bfb493d5b9ef9c7cbc9de30ce315a529","src/lib.rs":"2c42a300a12236d36d855c2799dae69b1a9de69de97e655d4ced409e814d5c7b","tests/version-numbers.rs":"0d75532e72e9054cb8c8c12b8851e55fad7319ed14482b562f6806872f18dd0f"},"package":"c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693"}
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/third_party/rust/textwrap/.rustfmt.toml
@@ -0,0 +1,6 @@
+array_layout = "Visual"
+control_style = "Legacy"
+fn_args_layout = "Visual"
+fn_call_style = "Visual"
+generics_indent = "Visual"
+struct_lit_width = 40
--- a/third_party/rust/textwrap/.travis.yml
+++ b/third_party/rust/textwrap/.travis.yml
@@ -2,16 +2,25 @@ language: rust
 
 rust:
   - stable
   - beta
   - nightly
 
 cache: cargo
 
+before_install:
+  # We need Rust 1.15 or later for version-sync
+  - |
+      if [[ "$TRAVIS_RUST_VERSION" =~ 1\.(8|13)\.0 ]]; then
+          echo "Old Rust detected, removing version-sync dependency"
+          sed -i "/^version-sync =/d" Cargo.toml
+          rm "tests/version-numbers.rs"
+      fi
+
 script:
   - cargo build --verbose --features "$FEATURES"
   - cargo test --verbose --features "$FEATURES"
 
 env:
   - FEATURES=""
   - FEATURES="hyphenation"
 
--- a/third_party/rust/textwrap/Cargo.toml
+++ b/third_party/rust/textwrap/Cargo.toml
@@ -1,27 +1,49 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g. crates.io) dependencies
+#
+# If you believe there's an error in this file please file an
+# issue against the rust-lang/cargo repository. If you're
+# editing this file be aware that the upstream Cargo.toml
+# will likely look very different (and much more reasonable)
+
 [package]
 name = "textwrap"
-version = "0.6.0"
+version = "0.9.0"
 authors = ["Martin Geisler <martin@geisler.net>"]
-description = """
-Textwrap is a small library for word wrapping, indenting, and
-dedenting strings.
-
-You can use it to format strings (such as help and error messages) for
-display in commandline applications. It is designed to be efficient
-and handle Unicode characters correctly.
-"""
+exclude = [".dir-locals.el"]
+description = "Textwrap is a small library for word wrapping, indenting, and\ndedenting strings.\n\nYou can use it to format strings (such as help and error messages) for\ndisplay in commandline applications. It is designed to be efficient\nand handle Unicode characters correctly.\n"
 documentation = "https://docs.rs/textwrap/"
-repository = "https://github.com/mgeisler/textwrap"
 readme = "README.md"
 keywords = ["text", "formatting", "wrap", "typesetting", "hyphenation"]
 categories = ["text-processing", "command-line-interface"]
 license = "MIT"
+repository = "https://github.com/mgeisler/textwrap"
+[package.metadata.docs.rs]
+all-features = true
+[dependencies.unicode-width]
+version = "0.1.3"
 
-[badges]
-travis-ci = { repository = "mgeisler/textwrap" }
-appveyor = { repository = "mgeisler/textwrap" }
+[dependencies.hyphenation]
+version = "0.6.1"
+optional = true
 
-[dependencies]
-unicode-width = "0.1.3"
-term_size = "0.3.0"
-hyphenation = { version = "0.6.1", optional = true }
+[dependencies.term_size]
+version = "0.3.0"
+optional = true
+[dev-dependencies.lipsum]
+version = "0.3"
+
+[dev-dependencies.version-sync]
+version = "0.2"
+
+[dev-dependencies.rand]
+version = "0.3"
+[badges.appveyor]
+repository = "mgeisler/textwrap"
+
+[badges.travis-ci]
+repository = "mgeisler/textwrap"
--- a/third_party/rust/textwrap/README.md
+++ b/third_party/rust/textwrap/README.md
@@ -10,29 +10,37 @@ to format strings for display in command
 name and interface is inspired by
 the [Python textwrap module][py-textwrap].
 
 ## Usage
 
 Add this to your `Cargo.toml`:
 ```toml
 [dependencies]
-textwrap = "0.6"
+textwrap = "0.9"
 ```
 
 and this to your crate root:
 ```rust
 extern crate textwrap;
 ```
 
 If you would like to have automatic hyphenation, specify the
 dependency as:
 ```toml
 [dependencies]
-textwrap = { version: "0.6", features: ["hyphenation"] }
+textwrap = { version = "0.9", features = ["hyphenation"] }
+```
+
+To conveniently wrap text at the current terminal width, enable the
+`term_size` feature:
+
+```toml
+[dependencies]
+textwrap = { version = "0.9", features = ["term_size"] }
 ```
 
 ## Documentation
 
 **[API documentation][api-docs]**
 
 ## Getting Started
 
@@ -60,34 +68,34 @@ configure the hyphenation patterns to us
 extern crate hyphenation;
 extern crate textwrap;
 
 use hyphenation::Language;
 use textwrap::Wrapper;
 
 fn main() {
     let corpus = hyphenation::load(Language::English_US).unwrap();
-    let wrapper = Wrapper::new(18).word_splitter(Box::new(corpus));
+    let wrapper = Wrapper::with_splitter(18, corpus);
     let text = "textwrap: a small library for wrapping text.";
     println!("{}", wrapper.fill(text))
 }
 ```
 
 The output now looks like this:
 ```
 textwrap: a small
 library for wrap-
 ping text.
 ```
 
 The hyphenation uses high-quality TeX hyphenation patterns.
 
 ## Examples
 
-The library comes with a small example programs that shows various
+The library comes with some small example programs that shows various
 features.
 
 ### Layout Example
 
 The `layout` example shows how a fixed example string is wrapped at
 different widths. Run the example with:
 
 ```shell
@@ -168,16 +176,71 @@ Memory safety without garbage collection
 cost abstractions.
 ----
 ```
 
 ## Release History
 
 This section lists the largest changes per release.
 
+### Version 0.9.0 — October 5th, 2017
+
+The dependency on `term_size` is now optional, and by default this
+feature is not enabled. This is a *breaking change* for users of
+`Wrapper::with_termwidth`. Enable the `term_size` feature to restore
+the old functionality.
+
+Added a regression test for case where width is set to usize::MAX.
+Thanks @Fraser999! All public structs now implement `Debug`.
+
+Issues closed:
+
+* Fixed [#101][issue-101]: Remove `term_size` as a (hard required)
+  dependency.
+
+### Version 0.8.0 — September 4th, 2017
+
+The `Wrapper` stuct is now generic over the type of word splitter
+being used. This means less boxing and a nicer API. The
+`Wrapper::word_splitter` method has been removed. This is a *breaking
+API change* if you used the method to change the word splitter.
+
+The `Wrapper` struct has two new methods that will wrap the input text
+lazily: `Wrapper::wrap_iter` and `Wrapper::into_wrap_iter`. Use those
+if you will be iterating over the wrapped lines one by one.
+
+Issues closed:
+
+* Fixed [#59][issue-59]: `wrap` could return an iterator. Thanks
+  @hcpl!
+
+* Fixed [#81][issue-81]: Set `html_root_url`
+
+### Version 0.7.0 — July 20th, 2017
+
+Version 0.7.0 changes the return type of `Wrapper::wrap` from
+`Vec<String>` to `Vec<Cow<'a, str>>`. This means that the output lines
+borrow data from the input string. This is a *breaking API change* if
+you relied on the exact return type of `Wrapper::wrap`. Callers of the
+`textwrap::fill` convenience function will see no breakage.
+
+The above change and other optimizations makes version 0.7.0 roughly
+15-30% faster than version 0.6.0.
+
+The `squeeze_whitespace` option has been removed since it was
+complicating the above optimization. Let us know if this option is
+important for you so we can provide a work around.
+
+Issues closed:
+
+* Fixed [#58][issue-58]: Add a "fast_wrap" function that reuses the
+  input string
+
+* Fixed [#61][issue-61]: Documentation errors
+
 ### Version 0.6.0 — May 22nd, 2017
 
 Version 0.6.0 adds builder methods to `Wrapper` for easy one-line
 initialization and configuration:
 
 ```rust
 let wrapper = Wrapper::new(60).break_words(false);
 ```
@@ -195,17 +258,17 @@ Version 0.5.0 has *breaking API changes*
 code using the hyphenation feature. The feature is now optional, so
 you will first need to enable the `hyphenation` feature as described
 above. Afterwards, please change your code from
 ```rust
 wrapper.corpus = Some(&corpus);
 ```
 to
 ```rust
-wrapper.splitter = corpus;
+wrapper.splitter = Box::new(corpus);
 ```
 
 Other changes include optimizations, so version 0.5.0 is roughly
 10-15% faster than version 0.4.0.
 
 Issues closed:
 
 * Fixed [#19][issue-19]: Add support for finding terminal size
@@ -239,17 +302,22 @@ Textwrap can be distributed according to
 Contributions will be accepted under the same license.
 
 [crates-io]: https://crates.io/crates/textwrap
 [travis-ci]: https://travis-ci.org/mgeisler/textwrap
 [appveyor]: https://ci.appveyor.com/project/mgeisler/textwrap
 [py-textwrap]: https://docs.python.org/library/textwrap
 [patterns]: https://github.com/tapeinosyne/hyphenation/tree/master/patterns-tex
 [api-docs]: https://docs.rs/textwrap/
-[issue-13]: ../../issues/13
-[issue-14]: ../../issues/14
-[issue-19]: ../../issues/19
-[issue-25]: ../../issues/25
-[issue-26]: ../../issues/26
-[issue-28]: ../../issues/28
-[issue-36]: ../../issues/36
-[issue-39]: ../../issues/39
+[issue-13]: https://github.com/mgeisler/textwrap/issues/13
+[issue-14]: https://github.com/mgeisler/textwrap/issues/14
+[issue-19]: https://github.com/mgeisler/textwrap/issues/19
+[issue-25]: https://github.com/mgeisler/textwrap/issues/25
+[issue-26]: https://github.com/mgeisler/textwrap/issues/26
+[issue-28]: https://github.com/mgeisler/textwrap/issues/28
+[issue-36]: https://github.com/mgeisler/textwrap/issues/36
+[issue-39]: https://github.com/mgeisler/textwrap/issues/39
+[issue-58]: https://github.com/mgeisler/textwrap/issues/58
+[issue-59]: https://github.com/mgeisler/textwrap/issues/59
+[issue-61]: https://github.com/mgeisler/textwrap/issues/61
+[issue-81]: https://github.com/mgeisler/textwrap/issues/81
+[issue-101]: https://github.com/mgeisler/textwrap/issues/101
 [mit]: LICENSE
--- a/third_party/rust/textwrap/benches/linear.rs
+++ b/third_party/rust/textwrap/benches/linear.rs
@@ -1,92 +1,122 @@
 #![feature(test)]
 
 // The benchmarks here verify that the complexity grows as O(*n*)
-// where *n* is the size of the text to be wrapped.
+// where *n* is the number of characters in the text to be wrapped.
 
 extern crate test;
+extern crate rand;
+extern crate lipsum;
+extern crate textwrap;
 #[cfg(feature = "hyphenation")]
 extern crate hyphenation;
-extern crate textwrap;
 
 use test::Bencher;
 #[cfg(feature = "hyphenation")]
 use hyphenation::Language;
 #[cfg(feature = "hyphenation")]
 use textwrap::Wrapper;
+use rand::XorShiftRng;
+use lipsum::MarkovChain;
 
 const LINE_LENGTH: usize = 60;
 
-fn lorem_ipsum(length: usize) -> &'static str {
-    let text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas feugiat non mi \
-                rutrum consectetur. Nulla iaculis luctus ex suscipit posuere. Sed et tellus quis \
-                elit volutpat pretium. Sed faucibus purus vitae feugiat tincidunt. Nulla \
-                malesuada interdum tempus. Proin consectetur malesuada magna, id suscipit enim \
-                tempus in. Sed sollicitudin velit tortor, quis condimentum nisl vulputate \
-                lobortis. Curabitur id lectus arcu. Nullam quis aliquam nisi. Vestibulum quam \
-                enim, elementum vel urna scelerisque, ultricies cursus urna. Mauris vestibulum, \
-                augue non posuere viverra, risus tortor iaculis augue, eget convallis metus nisl \
-                vestibulum nisi. Aenean auctor dui vel aliquet sagittis. Aliquam quis enim \
-                mauris. Nunc eu leo et orci euismod bibendum vel eu tortor. Nam egestas volutpat \
-                ex, a turpis duis.";
-    text.split_at(length).0
+/// Generate a lorem ipsum text with the given number of characters.
+fn lorem_ipsum(length: usize) -> String {
+    // The average word length in the lorem ipsum text is somewhere
+    // between 6 and 7. So we conservatively divide by 5 to have a
+    // long enough text that we can truncate below.
+    let rng = XorShiftRng::new_unseeded();
+    let mut chain = MarkovChain::new_with_rng(rng);
+    chain.learn(lipsum::LOREM_IPSUM);
+    chain.learn(lipsum::LIBER_PRIMUS);
+
+    let mut text = chain.generate_from(length / 5, ("Lorem", "ipsum"));
+    text.truncate(length);
+    text
 }
 
 #[bench]
-fn lorem_100(b: &mut Bencher) {
-    let text = lorem_ipsum(100);
+fn fill_100(b: &mut Bencher) {
+    let text = &lorem_ipsum(100);
+    b.iter(|| textwrap::fill(text, LINE_LENGTH))
+}
+
+#[bench]
+fn fill_200(b: &mut Bencher) {
+    let text = &lorem_ipsum(200);
     b.iter(|| textwrap::fill(text, LINE_LENGTH))
 }
 
 #[bench]
-fn lorem_200(b: &mut Bencher) {
-    let text = lorem_ipsum(200);
-    b.iter(|| textwrap::fill(text, LINE_LENGTH))
-}
-
-#[bench]
-fn lorem_400(b: &mut Bencher) {
-    let text = lorem_ipsum(400);
+fn fill_400(b: &mut Bencher) {
+    let text = &lorem_ipsum(400);
     b.iter(|| textwrap::fill(text, LINE_LENGTH))
 }
 
 #[bench]
-fn lorem_800(b: &mut Bencher) {
-    let text = lorem_ipsum(800);
+fn fill_800(b: &mut Bencher) {
+    let text = &lorem_ipsum(800);
     b.iter(|| textwrap::fill(text, LINE_LENGTH))
 }
 
+
+#[bench]
+fn wrap_100(b: &mut Bencher) {
+    let text = &lorem_ipsum(100);
+    b.iter(|| textwrap::wrap(text, LINE_LENGTH))
+}
+
+#[bench]
+fn wrap_200(b: &mut Bencher) {
+    let text = &lorem_ipsum(200);
+    b.iter(|| textwrap::wrap(text, LINE_LENGTH))
+}
+
 #[bench]
+fn wrap_400(b: &mut Bencher) {
+    let text = &lorem_ipsum(400);
+    b.iter(|| textwrap::wrap(text, LINE_LENGTH))
+}
+
+#[bench]
+fn wrap_800(b: &mut Bencher) {
+    let text = &lorem_ipsum(800);
+    b.iter(|| textwrap::wrap(text, LINE_LENGTH))
+}
+
+
+#[bench]
 #[cfg(feature = "hyphenation")]
-fn hyphenation_lorem_100(b: &mut Bencher) {
-    let text = lorem_ipsum(100);
+fn hyphenation_fill_100(b: &mut Bencher) {
+    let text = &lorem_ipsum(100);
     let corpus = hyphenation::load(Language::Latin).unwrap();
-    let wrapper = Wrapper::new(LINE_LENGTH).word_splitter(Box::new(corpus));
+    let wrapper = Wrapper::with_splitter(LINE_LENGTH, corpus);
     b.iter(|| wrapper.fill(text))
 }
 
 #[bench]
 #[cfg(feature = "hyphenation")]
-fn hyphenation_lorem_200(b: &mut Bencher) {
-    let text = lorem_ipsum(200);
+fn hyphenation_fill_200(b: &mut Bencher) {
+    let text = &lorem_ipsum(200);
     let corpus = hyphenation::load(Language::Latin).unwrap();
-    let wrapper = Wrapper::new(LINE_LENGTH).word_splitter(Box::new(corpus));
+    let wrapper = Wrapper::with_splitter(LINE_LENGTH, corpus);
     b.iter(|| wrapper.fill(text))
 }
 
 #[bench]
 #[cfg(feature = "hyphenation")]
-fn hyphenation_lorem_400(b: &mut Bencher) {
-    let text = lorem_ipsum(400);
+fn hyphenation_fill_400(b: &mut Bencher) {
+    let text = &lorem_ipsum(400);
     let corpus = hyphenation::load(Language::Latin).unwrap();
-    let wrapper = Wrapper::new(LINE_LENGTH).word_splitter(Box::new(corpus));
+    let wrapper = Wrapper::with_splitter(LINE_LENGTH, corpus);
     b.iter(|| wrapper.fill(text))
 }
 
 #[bench]
 #[cfg(feature = "hyphenation")]
-fn hyphenation_lorem_800(b: &mut Bencher) {
-    let text = lorem_ipsum(800);
+fn hyphenation_fill_800(b: &mut Bencher) {
+    let text = &lorem_ipsum(800);
     let corpus = hyphenation::load(Language::Latin).unwrap();
-    let wrapper = Wrapper::new(LINE_LENGTH).word_splitter(Box::new(corpus));
+    let wrapper = Wrapper::with_splitter(LINE_LENGTH, corpus);
     b.iter(|| wrapper.fill(text))
 }
--- a/third_party/rust/textwrap/examples/layout.rs
+++ b/third_party/rust/textwrap/examples/layout.rs
@@ -3,32 +3,30 @@ extern crate hyphenation;
 extern crate textwrap;
 
 #[cfg(feature = "hyphenation")]
 use hyphenation::Language;
 use textwrap::Wrapper;
 
 
 #[cfg(not(feature = "hyphenation"))]
-fn new_wrapper<'a>() -> Wrapper<'a> {
+fn new_wrapper<'a>() -> Wrapper<'a, textwrap::HyphenSplitter> {
     Wrapper::new(0)
 }
 
 #[cfg(feature = "hyphenation")]
-fn new_wrapper<'a>() -> Wrapper<'a> {
+fn new_wrapper<'a>() -> Wrapper<'a, hyphenation::Corpus> {
     let corpus = hyphenation::load(Language::English_US).unwrap();
-    Wrapper::new(0).word_splitter(Box::new(corpus))
+    Wrapper::with_splitter(0, corpus)
 }
 
 fn main() {
-    let example = "
-Memory safety without garbage collection.
-Concurrency without data races.
-Zero-cost abstractions.
-";
+    let example = "Memory safety without garbage collection. \
+                   Concurrency without data races. \
+                   Zero-cost abstractions.";
     let mut prev_lines = vec![];
     let mut wrapper = new_wrapper();
     for width in 15..60 {
         wrapper.width = width;
         let lines = wrapper.wrap(example);
         if lines != prev_lines {
             let title = format!(" Width: {} ", width);
             println!(".{:-^1$}.", title, width + 2);
--- a/third_party/rust/textwrap/examples/termwidth.rs
+++ b/third_party/rust/textwrap/examples/termwidth.rs
@@ -1,18 +1,21 @@
+#[cfg(feature = "term_size")]
 extern crate textwrap;
 
-use textwrap::Wrapper;
-
+#[cfg(not(feature = "term_size"))]
 fn main() {
-    let example = "
-Memory safety without garbage collection.
-Concurrency without data races.
-Zero-cost abstractions.
-";
+    println!("Please enable the term_size feature to run this example.");
+}
+
+#[cfg(feature = "term_size")]
+fn main() {
+    let example = "Memory safety without garbage collection. \
+                   Concurrency without data races. \
+                   Zero-cost abstractions.";
     // Create a new Wrapper -- automatically set the width to the
     // current terminal width.
-    let wrapper = Wrapper::with_termwidth();
+    let wrapper = textwrap::Wrapper::with_termwidth();
     println!("Formatted in within {} columns:", wrapper.width);
     println!("----");
     println!("{}", wrapper.fill(example));
     println!("----");
 }
--- a/third_party/rust/textwrap/src/lib.rs
+++ b/third_party/rust/textwrap/src/lib.rs
@@ -1,25 +1,26 @@
 //! `textwrap` provides functions for word wrapping and filling text.
 //!
 //! Wrapping text can be very useful in commandline programs where you
 //! want to format dynamic output nicely so it looks good in a
 //! terminal. A quick example:
 //!
-//! ```
+//! ```no_run
 //! extern crate textwrap;
 //! use textwrap::fill;
 //!
 //! fn main() {
 //!    let text = "textwrap: a small library for wrapping text.";
 //!    println!("{}", fill(text, 18));
 //! }
 //! ```
 //!
 //! This will display the following output:
+//!
 //! ```text
 //! textwrap: a small
 //! library for
 //! wrapping text.
 //! ```
 //!
 //! # Displayed Width vs Byte Size
 //!
@@ -35,495 +36,790 @@
 //! `0xe2 0x9a 0x99` (three bytes) in UTF-8, respectively.
 //!
 //! This is why we take care to use the displayed width instead of the
 //! byte count when computing line lengths. All functions in this
 //! library handle Unicode characters like this.
 //!
 //! [unicode-width]: https://docs.rs/unicode-width/
 
+#![doc(html_root_url = "https://docs.rs/textwrap/0.9.0")]
+#![deny(missing_docs)]
+#![deny(missing_debug_implementations)]
 
 extern crate unicode_width;
+#[cfg(feature = "term_size")]
 extern crate term_size;
 #[cfg(feature = "hyphenation")]
 extern crate hyphenation;
 
+use std::fmt;
+use std::borrow::Cow;
+use std::str::CharIndices;
+
 use unicode_width::UnicodeWidthStr;
 use unicode_width::UnicodeWidthChar;
 #[cfg(feature = "hyphenation")]
 use hyphenation::{Hyphenation, Corpus};
 
+/// A non-breaking space.
+const NBSP: char = '\u{a0}';
+
 /// An interface for splitting words.
 ///
-/// When the [`wrap`] method will try to fit text into a line, it will
-/// eventually find a word that it too large the current text width.
-/// It will then call the currently configured `WordSplitter` to have
-/// it attempt to split the word into smaller parts. This trait
+/// When the [`wrap_iter`] method will try to fit text into a line, it
+/// will eventually find a word that it too large the current text
+/// width. It will then call the currently configured `WordSplitter` to
+/// have it attempt to split the word into smaller parts. This trait
 /// describes that functionality via the [`split`] method.
 ///
 /// If the `textwrap` crate has been compiled with the `hyphenation`
 /// feature enabled, you will find an implementation of `WordSplitter`
 /// by the `hyphenation::language::Corpus` struct. Use this struct for
 /// language-aware hyphenation. See the [`hyphenation` documentation]
 /// for details.
 ///
-/// [`wrap`]: struct.Wrapper.html#method.wrap
+/// [`wrap_iter`]: struct.Wrapper.html#method.wrap_iter
 /// [`split`]: #tymethod.split
 /// [`hyphenation` documentation]: https://docs.rs/hyphenation/
 pub trait WordSplitter {
     /// Return all possible splits of word. Each split is a triple
     /// with a head, a hyphen, and a tail where `head + &hyphen +
     /// &tail == word`. The hyphen can be empty if there is already a
     /// hyphen in the head.
     ///
     /// The splits should go from smallest to longest and should
     /// include no split at all. So the word "technology" could be
     /// split into
     ///
-    /// ```
+    /// ```no_run
     /// vec![("tech", "-", "nology"),
     ///      ("technol", "-", "ogy"),
     ///      ("technolo", "-", "gy"),
     ///      ("technology", "", "")];
     /// ```
     fn split<'w>(&self, word: &'w str) -> Vec<(&'w str, &'w str, &'w str)>;
 }
 
 /// Use this as a [`Wrapper.splitter`] to avoid any kind of
 /// hyphenation:
+///
 /// ```
 /// use textwrap::{Wrapper, NoHyphenation};
 ///
-/// let wrapper = Wrapper::new(8).word_splitter(Box::new(NoHyphenation));
+/// let wrapper = Wrapper::with_splitter(8, NoHyphenation);
 /// assert_eq!(wrapper.wrap("foo bar-baz"), vec!["foo", "bar-baz"]);
 /// ```
 ///
 /// [`Wrapper.splitter`]: struct.Wrapper.html#structfield.splitter
+#[derive(Clone, Debug)]
 pub struct NoHyphenation;
 
 /// `NoHyphenation` implements `WordSplitter` by not splitting the
 /// word at all.
 impl WordSplitter for NoHyphenation {
     fn split<'w>(&self, word: &'w str) -> Vec<(&'w str, &'w str, &'w str)> {
         vec![(word, "", "")]
     }
 }
 
 /// Simple and default way to split words: splitting on existing
 /// hyphens only.
 ///
 /// You probably don't need to use this type since it's already used
 /// by default by `Wrapper::new`.
+#[derive(Clone, Debug)]
 pub struct HyphenSplitter;
 
-/// HyphenSplitter is the default WordSplitter used by `Wrapper::new`.
-/// It will split words on any existing hyphens in the word.
+/// `HyphenSplitter` is the default `WordSplitter` used by
+/// `Wrapper::new`. It will split words on any existing hyphens in the
+/// word.
 ///
 /// It will only use hyphens that are surrounded by alphanumeric
 /// characters, which prevents a word like "--foo-bar" from being
 /// split on the first or second hyphen.
 impl WordSplitter for HyphenSplitter {
     fn split<'w>(&self, word: &'w str) -> Vec<(&'w str, &'w str, &'w str)> {
         let mut triples = Vec::new();
         // Split on hyphens, smallest split first. We only use hyphens
         // that are surrounded by alphanumeric characters. This is to
         // avoid splitting on repeated hyphens, such as those found in
         // --foo-bar.
-        let char_indices = word.char_indices().collect::<Vec<_>>();
-        for w in char_indices.windows(3) {
-            let ((_, prev), (n, c), (_, next)) = (w[0], w[1], w[2]);
-            if prev.is_alphanumeric() && c == '-' && next.is_alphanumeric() {
-                let (head, tail) = word.split_at(n + 1);
+        let mut char_indices = word.char_indices();
+        // Early return if the word is empty.
+        let mut prev = match char_indices.next() {
+            None => return vec![(word, "", "")],
+            Some((_, ch)) => ch,
+        };
+
+        // Find current word, or return early if the word only has a
+        // single character.
+        let (mut idx, mut cur) = match char_indices.next() {
+            None => return vec![(word, "", "")],
+            Some((idx, cur)) => (idx, cur),
+        };
+
+        for (i, next) in char_indices {
+            if prev.is_alphanumeric() && cur == '-' && next.is_alphanumeric() {
+                let (head, tail) = word.split_at(idx + 1);
                 triples.push((head, "", tail));
             }
+            prev = cur;
+            idx = i;
+            cur = next;
         }
 
         // Finally option is no split at all.
         triples.push((word, "", ""));
 
         triples
     }
 }
 
 /// A hyphenation Corpus can be used to do language-specific
 /// hyphenation using patterns from the hyphenation crate.
 #[cfg(feature = "hyphenation")]
 impl WordSplitter for Corpus {
     fn split<'w>(&self, word: &'w str) -> Vec<(&'w str, &'w str, &'w str)> {
         // Find splits based on language corpus.
         let mut triples = Vec::new();
-        for n in word.opportunities(&self) {
+        for n in word.opportunities(self) {
             let (head, tail) = word.split_at(n);
             let hyphen = if head.ends_with('-') { "" } else { "-" };
             triples.push((head, hyphen, tail));
         }
         // Finally option is no split at all.
         triples.push((word, "", ""));
 
         triples
     }
 }
 
-struct IndentedString {
-    value: String,
-    empty_len: usize,
-}
-
-impl IndentedString {
-    /// Create a new indented string. The string will initially have
-    /// the content `indent` and the given capacity.
-    #[inline]
-    fn new(indent: &str, capacity: usize) -> IndentedString {
-        let mut value = String::with_capacity(capacity);
-        value.push_str(indent);
-        IndentedString {
-            value: value,
-            empty_len: indent.len(),
+/// Backport of the `AddAssign` trait implementation from Rust 1.14.
+fn cow_add_assign<'a>(lhs: &mut Cow<'a, str>, rhs: &'a str) {
+    if lhs.is_empty() {
+        *lhs = Cow::Borrowed(rhs)
+    } else if rhs.is_empty() {
+        return;
+    } else {
+        if let Cow::Borrowed(inner) = *lhs {
+            let mut s = String::with_capacity(lhs.len() + rhs.len());
+            s.push_str(inner);
+            *lhs = Cow::Owned(s);
         }
-    }
-
-    /// Returns `true` if the string has no other content apart from
-    /// the indentation.
-    #[inline]
-    fn is_empty(&self) -> bool {
-        self.value.len() == self.empty_len
-    }
-
-    /// Appends the given `char` to the end of this string.
-    #[inline]
-    fn push(&mut self, ch: char) {
-        self.value.push(ch);
-    }
-
-    /// Appends the given string slice to the end of this string.
-    #[inline]
-    fn push_str(&mut self, s: &str) {
-        self.value.push_str(s);
-    }
-
-    /// Return the inner `String`.
-    fn into_string(self) -> String {
-        self.value
+        lhs.to_mut().push_str(rhs);
     }
 }
 
+
 /// A Wrapper holds settings for wrapping and filling text. Use it
-/// when the convenience [`wrap`] and [`fill`] functions are not
-/// flexible enough.
+/// when the convenience [`wrap_iter`], [`wrap`] and [`fill`] functions
+/// are not flexible enough.
 ///
+/// [`wrap_iter`]: fn.wrap_iter.html
 /// [`wrap`]: fn.wrap.html
 /// [`fill`]: fn.fill.html
 ///
-/// The algorithm used by the `wrap` method works by doing a single
-/// scan over words in the input string and splitting them into one or
-/// more lines. The time and memory complexity is O(*n*) where *n* is
-/// the length of the input string.
-pub struct Wrapper<'a> {
+/// The algorithm used by the `WrapIter` iterator (returned from the
+/// `wrap_iter` method)  works by doing successive partial scans over
+/// words in the input string (where each single scan yields a single
+/// line) so that the overall time and memory complexity is O(*n*) where
+/// *n* is the length of the input string.
+#[derive(Clone, Debug)]
+pub struct Wrapper<'a, S: WordSplitter> {
     /// The width in columns at which the text will be wrapped.
     pub width: usize,
     /// Indentation used for the first line of output.
     pub initial_indent: &'a str,
     /// Indentation used for subsequent lines of output.
     pub subsequent_indent: &'a str,
     /// Allow long words to be broken if they cannot fit on a line.
-    /// When set to `false`, some lines be being longer than
+    /// When set to `false`, some lines may be longer than
     /// `self.width`.
     pub break_words: bool,
-    /// This crate treats every whitespace character (space, newline,
-    /// TAB, ...) as a space character. When this option is set to
-    /// `true`, the whitespace between words will be squeezed into a
-    /// single space character. Otherwise, the whitespace is
-    /// significant and will be kept in the output. Whitespace
-    /// characters such as TAB will still be turned into a single
-    /// space -- consider expanding TABs manually if this is a
-    /// concern.
-    pub squeeze_whitespace: bool,
     /// The method for splitting words. If the `hyphenation` feature
     /// is enabled, you can use a `hyphenation::language::Corpus` here
     /// to get language-aware hyphenation.
-    pub splitter: Box<WordSplitter>,
+    pub splitter: S,
 }
 
-impl<'a> Wrapper<'a> {
+impl<'a> Wrapper<'a, HyphenSplitter> {
     /// Create a new Wrapper for wrapping at the specified width. By
     /// default, we allow words longer than `width` to be broken. A
     /// [`HyphenSplitter`] will be used by default for splitting
     /// words. See the [`WordSplitter`] trait for other options.
     ///
     /// [`HyphenSplitter`]: struct.HyphenSplitter.html
     /// [`WordSplitter`]: trait.WordSplitter.html
-    pub fn new(width: usize) -> Wrapper<'a> {
+    pub fn new(width: usize) -> Wrapper<'a, HyphenSplitter> {
+        Wrapper::with_splitter(width, HyphenSplitter)
+    }
+
+    /// Create a new Wrapper for wrapping text at the current terminal
+    /// width. If the terminal width cannot be determined (typically
+    /// because the standard input and output is not connected to a
+    /// terminal), a width of 80 characters will be used. Other
+    /// settings use the same defaults as `Wrapper::new`.
+    ///
+    /// Equivalent to:
+    ///
+    /// ```no_run
+    /// # #![allow(unused_variables)]
+    /// use textwrap::{Wrapper, termwidth};
+    ///
+    /// let wrapper = Wrapper::new(termwidth());
+    /// ```
+    #[cfg(feature = "term_size")]
+    pub fn with_termwidth() -> Wrapper<'a, HyphenSplitter> {
+        Wrapper::new(termwidth())
+    }
+}
+
+impl<'w, 'a: 'w, S: WordSplitter> Wrapper<'a, S> {
+    /// Use the given [`WordSplitter`] to create a new Wrapper for
+    /// wrapping at the specified width. By default, we allow words
+    /// longer than `width` to be broken.
+    ///
+    /// [`WordSplitter`]: trait.WordSplitter.html
+    pub fn with_splitter(width: usize, splitter: S) -> Wrapper<'a, S> {
         Wrapper {
             width: width,
             initial_indent: "",
             subsequent_indent: "",
             break_words: true,
-            squeeze_whitespace: false,
-            splitter: Box::new(HyphenSplitter),
+            splitter: splitter,
         }
     }
 
-    /// Crate a new Wrapper for wrapping text at the current terminal
-    /// width. If the terminal width cannot be determined (typically
-    /// because the standard input and output is not connected to a
-    /// terminal), a width of 80 characters will be used. Other
-    /// settings use the same defaults as `Wrapper::new`.
-    pub fn with_termwidth() -> Wrapper<'a> {
-        Wrapper::new(term_size::dimensions_stdout().map_or(80, |(w, _)| w))
-    }
-
     /// Change [`self.initial_indent`]. The initial indentation is
-    /// used on the very first line of output. Setting it to something
-    /// like `"* "` can be useful if you are formatting an item in a
-    /// bulleted list. You will then probably want to set
-    /// `self.subsequent_indent` to `"  "`.
+    /// used on the very first line of output.
+    ///
+    /// # Examples
+    ///
+    /// Classic paragraph indentation can be achieved by specifying an
+    /// initial indentation and wrapping each paragraph by itself:
+    ///
+    /// ```no_run
+    /// # #![allow(unused_variables)]
+    /// use textwrap::Wrapper;
+    ///
+    /// let wrapper = Wrapper::new(15).initial_indent("    ");
+    /// ```
     ///
     /// [`self.initial_indent`]: #structfield.initial_indent
-    pub fn initial_indent(self, indent: &'a str) -> Wrapper<'a> {
+    pub fn initial_indent(self, indent: &'a str) -> Wrapper<'a, S> {
         Wrapper { initial_indent: indent, ..self }
     }
 
     /// Change [`self.subsequent_indent`]. The subsequent indentation
-    /// is used on lines following the first line of output. Setting
-    /// it to something like `"  "` can be useful if you are
-    /// formatting an item in a bulleted list.
+    /// is used on lines following the first line of output.
+    ///
+    /// # Examples
+    ///
+    /// Combining initial and subsequent indentation lets you format a
+    /// single paragraph as a bullet list:
+    ///
+    /// ```no_run
+    /// # #![allow(unused_variables)]
+    /// use textwrap::Wrapper;
+    ///
+    /// let wrapper = Wrapper::new(15)
+    ///     .initial_indent("* ")
+    ///     .subsequent_indent("  ");
+    /// ```
     ///
     /// [`self.subsequent_indent`]: #structfield.subsequent_indent
-    pub fn subsequent_indent(self, indent: &'a str) -> Wrapper<'a> {
+    pub fn subsequent_indent(self, indent: &'a str) -> Wrapper<'a, S> {
         Wrapper { subsequent_indent: indent, ..self }
     }
 
     /// Change [`self.break_words`]. This controls if words longer
     /// than `self.width` can be broken, or if they will be left
     /// sticking out into the right margin.
     ///
     /// [`self.break_words`]: #structfield.break_words
-    pub fn break_words(self, setting: bool) -> Wrapper<'a> {
+    pub fn break_words(self, setting: bool) -> Wrapper<'a, S> {
         Wrapper { break_words: setting, ..self }
     }
 
-    /// Change [`self.squeeze_whitespace`]. This controls if
-    /// whitespace betweee words is squeezed together to a single
-    /// space. Regardless of this setting, all whitespace characters
-    /// are converted to space (`' '`) characters.
-    ///
-    /// [`self.squeeze_whitespace`]: #structfield.squeeze_whitespace
-    pub fn squeeze_whitespace(self, setting: bool) -> Wrapper<'a> {
-        Wrapper { squeeze_whitespace: setting, ..self }
-    }
-
-    /// Change [`self.splitter`]. The word splitter is consulted when
-    /// a word is too wide to fit the current line. By changing this,
-    /// you can decide if such words should be hyphenated or left
-    /// alone. Hyphenation can be done using existing hyphens (see
-    /// [`HyphenSplitter`]) or it can be based on TeX hyphenation
-    /// patterns, if the `hyphenation` feature is enabled.
-    ///
-    /// [`self.splitter`]: #structfield.splitter
-    pub fn word_splitter(self, splitter: Box<WordSplitter>) -> Wrapper<'a> {
-        Wrapper { splitter: splitter, ..self }
-    }
-
     /// Fill a line of text at `self.width` characters. Strings are
     /// wrapped based on their displayed width, not their size in
     /// bytes.
     ///
     /// The result is a string with newlines between each line. Use
     /// the `wrap` method if you need access to the individual lines.
     ///
+    /// # Complexities
+    ///
+    /// This method simply joins the lines produced by `wrap_iter`. As
+    /// such, it inherits the O(*n*) time and memory complexity where
+    /// *n* is the input string length.
+    ///
+    /// # Examples
+    ///
     /// ```
     /// use textwrap::Wrapper;
     ///
     /// let wrapper = Wrapper::new(15);
     /// assert_eq!(wrapper.fill("Memory safety without garbage collection."),
     ///            "Memory safety\nwithout garbage\ncollection.");
     /// ```
-    ///
-    /// This method simply joins the lines produced by `wrap`. As
-    /// such, it inherits the O(*n*) time and memory complexity where
-    /// *n* is the input string length.
     pub fn fill(&self, s: &str) -> String {
-        self.wrap(s).join("\n")
+        // This will avoid reallocation in simple cases (no
+        // indentation, no hyphenation).
+        let mut result = String::with_capacity(s.len());
+
+        for (i, line) in self.wrap_iter(s).enumerate() {
+            if i > 0 {
+                result.push('\n');
+            }
+            result.push_str(&line);
+        }
+
+        result
     }
 
     /// Wrap a line of text at `self.width` characters. Strings are
     /// wrapped based on their displayed width, not their size in
     /// bytes.
     ///
+    /// # Complexities
+    ///
+    /// This method simply collects the lines produced by `wrap_iter`.
+    /// As such, it inherits the O(*n*) overall time and memory
+    /// complexity where *n* is the input string length.
+    ///
+    /// # Examples
+    ///
     /// ```
     /// use textwrap::Wrapper;
     ///
     /// let wrap15 = Wrapper::new(15);
     /// assert_eq!(wrap15.wrap("Concurrency without data races."),
     ///            vec!["Concurrency",
     ///                 "without data",
     ///                 "races."]);
     ///
     /// let wrap20 = Wrapper::new(20);
     /// assert_eq!(wrap20.wrap("Concurrency without data races."),
     ///            vec!["Concurrency without",
     ///                 "data races."]);
     /// ```
+    pub fn wrap(&self, s: &'a str) -> Vec<Cow<'a, str>> {
+        self.wrap_iter(s).collect::<Vec<_>>()
+    }
+
+    /// Lazily wrap a line of text at `self.width` characters. Strings
+    /// are wrapped based on their displayed width, not their size in
+    /// bytes.
+    ///
+    /// The [`WordSplitter`] stored in [`self.splitter`] is used
+    /// whenever when a word is too large to fit on the current line.
+    /// By changing the field, different hyphenation strategies can be
+    /// implemented.
+    ///
+    /// # Complexities
+    ///
+    /// This method returns a [`WrapIter`] iterator which borrows this
+    /// `Wrapper`. The algorithm used has a linear complexity, so
+    /// getting the next line from the iterator will take O(*w*) time,
+    /// where *w* is the wrapping width. Fully processing the iterator
+    /// will take O(*n*) time for an input string of length *n*.
+    ///
+    /// When no indentation is used, each line returned is a slice of
+    /// the input string and the memory overhead is thus constant.
+    /// Otherwise new memory is allocated for each line returned.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::borrow::Cow;
+    /// use textwrap::Wrapper;
+    ///
+    /// let wrap20 = Wrapper::new(20);
+    /// let mut wrap20_iter = wrap20.wrap_iter("Zero-cost abstractions.");
+    /// assert_eq!(wrap20_iter.next(), Some(Cow::from("Zero-cost")));
+    /// assert_eq!(wrap20_iter.next(), Some(Cow::from("abstractions.")));
+    /// assert_eq!(wrap20_iter.next(), None);
+    ///
+    /// let wrap25 = Wrapper::new(25);
+    /// let mut wrap25_iter = wrap25.wrap_iter("Zero-cost abstractions.");
+    /// assert_eq!(wrap25_iter.next(), Some(Cow::from("Zero-cost abstractions.")));
+    /// assert_eq!(wrap25_iter.next(), None);
+    /// ```
+    ///
+    /// [`self.splitter`]: #structfield.splitter
+    /// [`WordSplitter`]: trait.WordSplitter.html
+    /// [`WrapIter`]: struct.WrapIter.html
+    pub fn wrap_iter(&'w self, s: &'a str) -> WrapIter<'w, 'a, S> {
+        WrapIter {
+            wrapper: self,
+            wrap_iter_impl: WrapIterImpl::new(self, s),
+        }
+    }
+
+    /// Lazily wrap a line of text at `self.width` characters. Strings
+    /// are wrapped based on their displayed width, not their size in
+    /// bytes.
     ///
     /// The [`WordSplitter`] stored in [`self.splitter`] is used
     /// whenever when a word is too large to fit on the current line.
     /// By changing the field, different hyphenation strategies can be
     /// implemented.
     ///
-    /// This method does a single scan over the input string, it has
-    /// an O(*n*) time and memory complexity where *n* is the input
-    /// string length.
+    /// # Complexities
+    ///
+    /// This method consumes the `Wrapper` and returns a
+    /// [`IntoWrapIter`] iterator. Fully processing the iterator has
+    /// the same O(*n*) time complexity as [`wrap_iter`], where *n* is
+    /// the length of the input string.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use std::borrow::Cow;
+    /// use textwrap::Wrapper;
+    ///
+    /// let wrap20 = Wrapper::new(20);
+    /// let mut wrap20_iter = wrap20.into_wrap_iter("Zero-cost abstractions.");
+    /// assert_eq!(wrap20_iter.next(), Some(Cow::from("Zero-cost")));
+    /// assert_eq!(wrap20_iter.next(), Some(Cow::from("abstractions.")));
+    /// assert_eq!(wrap20_iter.next(), None);
+    /// ```
     ///
     /// [`self.splitter`]: #structfield.splitter
     /// [`WordSplitter`]: trait.WordSplitter.html
-    ///
-    pub fn wrap(&self, s: &str) -> Vec<String> {
-        let mut lines = Vec::with_capacity(s.len() / (self.width + 1));
-        let mut line = IndentedString::new(self.initial_indent, self.width);
-        let mut remaining = self.width - self.initial_indent.width();
-        const NBSP: char = '\u{a0}'; // non-breaking space
+    /// [`IntoWrapIter`]: struct.IntoWrapIter.html
+    /// [`wrap_iter`]: #method.wrap_iter
+    pub fn into_wrap_iter(self, s: &'a str) -> IntoWrapIter<'a, S> {
+        let wrap_iter_impl = WrapIterImpl::new(&self, s);
+
+        IntoWrapIter {
+            wrapper: self,
+            wrap_iter_impl: wrap_iter_impl,
+        }
+    }
+}
+
+
+/// An iterator over the lines of the input string which owns a
+/// `Wrapper`. An instance of `IntoWrapIter` is typically obtained
+/// through either [`wrap_iter`] or [`Wrapper::into_wrap_iter`].
+///
+/// Each call of `.next()` method yields a line wrapped in `Some` if the
+/// input hasn't been fully processed yet. Otherwise it returns `None`.
+///
+/// [`wrap_iter`]: fn.wrap_iter.html
+/// [`Wrapper::into_wrap_iter`]: struct.Wrapper.html#method.into_wrap_iter
+#[derive(Debug)]
+pub struct IntoWrapIter<'a, S: WordSplitter> {
+    wrapper: Wrapper<'a, S>,
+    wrap_iter_impl: WrapIterImpl<'a>,
+}
 
-        for mut word in s.split(|c: char| c.is_whitespace() && c != NBSP) {
-            // Skip over adjacent whitespace characters.
-            if self.squeeze_whitespace && word.is_empty() {
-                continue;
-            }
+impl<'a, S: WordSplitter> Iterator for IntoWrapIter<'a, S> {
+    type Item = Cow<'a, str>;
+
+    fn next(&mut self) -> Option<Cow<'a, str>> {
+        self.wrap_iter_impl.impl_next(&self.wrapper)
+    }
+}
 
-            // Attempt to fit the word without any splitting.
-            if self.fit_part(word, "", &mut remaining, &mut line) {
-                continue;
-            }
+/// An iterator over the lines of the input string which borrows a
+/// `Wrapper`. An instance of `WrapIter` is typically obtained
+/// through the [`Wrapper::wrap_iter`] method.
+///
+/// Each call of `.next()` method yields a line wrapped in `Some` if the
+/// input hasn't been fully processed yet. Otherwise it returns `None`.
+///
+/// [`Wrapper::wrap_iter`]: struct.Wrapper.html#method.wrap_iter
+#[derive(Debug)]
+pub struct WrapIter<'w, 'a: 'w, S: WordSplitter + 'w> {
+    wrapper: &'w Wrapper<'a, S>,
+    wrap_iter_impl: WrapIterImpl<'a>,
+}
+
+impl<'w, 'a: 'w, S: WordSplitter> Iterator for WrapIter<'w, 'a, S> {
+    type Item = Cow<'a, str>;
+
+    fn next(&mut self) -> Option<Cow<'a, str>> {
+        self.wrap_iter_impl.impl_next(self.wrapper)
+    }
+}
 
-            // If that failed, loop until nothing remains to be added.
-            while !word.is_empty() {
-                let splits = self.splitter.split(word);
-                let (smallest, hyphen, longest) = splits[0];
-                let min_width = smallest.width() + hyphen.len();
+struct WrapIterImpl<'a> {
+    // String to wrap.
+    source: &'a str,
+    // CharIndices iterator over self.source.
+    char_indices: CharIndices<'a>,
+    // Is the next element the first one ever produced?
+    is_next_first: bool,
+    // Byte index where the current line starts.
+    start: usize,
+    // Byte index of the last place where the string can be split.
+    split: usize,
+    // Size in bytes of the character at self.source[self.split].
+    split_len: usize,
+    // Width of self.source[self.start..idx].
+    line_width: usize,
+    // Width of self.source[self.start..self.split].
+    line_width_at_split: usize,
+    // Tracking runs of whitespace characters.
+    in_whitespace: bool,
+    // Has iterator finished producing elements?
+    finished: bool,
+}
+
+impl<'a> fmt::Debug for WrapIterImpl<'a> {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        f.debug_struct("WrapIterImpl")
+            .field("source", &self.source)
+            .field("char_indices", &"CharIndices { ... }")
+            .field("is_next_first", &self.is_next_first)
+            .field("start", &self.start)
+            .field("split", &self.split)
+            .field("split_len", &self.split_len)
+            .field("line_width", &self.line_width)
+            .field("line_width_at_split", &self.line_width_at_split)
+            .field("in_whitespace", &self.in_whitespace)
+            .field("finished", &self.finished)
+            .finish()
+    }
+}
 
-                // Add a new line if even the smallest split doesn't
-                // fit.
-                if !line.is_empty() && 1 + min_width > remaining {
-                    lines.push(line.into_string());
-                    line = IndentedString::new(self.subsequent_indent, self.width);
-                    remaining = self.width - self.subsequent_indent.width();
+impl<'a> WrapIterImpl<'a> {
+    fn new<S: WordSplitter>(wrapper: &Wrapper<'a, S>, s: &'a str) -> WrapIterImpl<'a> {
+        WrapIterImpl {
+            source: s,
+            char_indices: s.char_indices(),
+            is_next_first: true,
+            start: 0,
+            split: 0,
+            split_len: 0,
+            line_width: wrapper.initial_indent.width(),
+            line_width_at_split: wrapper.initial_indent.width(),
+            in_whitespace: false,
+            finished: false,
+        }
+    }
+
+    fn create_result_line<S: WordSplitter>(&mut self, wrapper: &Wrapper<'a, S>) -> Cow<'a, str> {
+        if self.is_next_first {
+            self.is_next_first = false;
+            Cow::from(wrapper.initial_indent)
+        } else {
+            Cow::from(wrapper.subsequent_indent)
+        }
+    }
+
+    fn impl_next<S: WordSplitter>(&mut self, wrapper: &Wrapper<'a, S>) -> Option<Cow<'a, str>> {
+        if self.finished {
+            return None;
+        }
+
+        while let Some((idx, ch)) = self.char_indices.next() {
+            let char_width = ch.width().unwrap_or(0);
+            let char_len = ch.len_utf8();
+            if ch.is_whitespace() && ch != NBSP {
+                // Extend the previous split or create a new one.
+                if self.in_whitespace {
+                    self.split_len += char_len;
+                } else {
+                    self.split = idx;
+                    self.split_len = char_len;
                 }
+                self.line_width_at_split = self.line_width + char_width;
+                self.in_whitespace = true;
+            } else if self.line_width + char_width > wrapper.width {
+                // There is no room for this character on the current
+                // line. Try to split the final word.
+                let remaining_text = &self.source[self.split + self.split_len..];
+                let final_word = match remaining_text
+                          .find(|ch: char| ch.is_whitespace() && ch != NBSP) {
+                    Some(i) => &remaining_text[..i],
+                    None => remaining_text,
+                };
 
-                // Find a split that fits on the current line.
-                for &(head, hyphen, tail) in splits.iter().rev() {
-                    if self.fit_part(head, hyphen, &mut remaining, &mut line) {
-                        word = tail;
+                let mut hyphen = "";
+                let splits = wrapper.splitter.split(final_word);
+                for &(head, hyp, _) in splits.iter().rev() {
+                    if self.line_width_at_split + head.width() + hyp.width() <= wrapper.width {
+                        self.split += head.len();
+                        self.split_len = 0;
+                        hyphen = hyp;
                         break;
                     }
                 }
 
-                // If even the smallest split doesn't fit on the line,
-                // we might have to break the word.
-                if line.is_empty() {
-                    if self.break_words && self.width > 1 {
-                        // Break word on a character boundary as close
-                        // to self.width as possible. Characters are
-                        // at most 2 columns wide, so we will chop off
-                        // at least one character.
-                        let mut head_width = 0;
-                        for (idx, c) in word.char_indices() {
-                            head_width += c.width().unwrap_or(0);
-                            if head_width > remaining {
-                                let (head, tail) = word.split_at(idx);
-                                line.push_str(head);
-                                lines.push(line.into_string());
-                                line = IndentedString::new(self.subsequent_indent, self.width);
-                                word = tail;
-                                break;
-                            }
-                        }
+                if self.start >= self.split {
+                    // The word is too big to fit on a single line, so we
+                    // need to split it at the current index.
+                    if wrapper.break_words {
+                        // Break work at current index.
+                        self.split = idx;
+                        self.split_len = 0;
+                        self.line_width_at_split = self.line_width;
                     } else {
-                        // We forcibly add the smallest split and
-                        // continue with the longest tail. This will
-                        // result in a line longer than self.width.
-                        lines.push(String::from(smallest) + hyphen);
-                        remaining = self.width;
-                        word = longest;
+                        // Add smallest split.
+                        self.split = self.start + splits[0].0.len();
+                        self.split_len = 0;
+                        self.line_width_at_split = self.line_width;
                     }
                 }
-            }
-        }
-        if !line.is_empty() {
-            lines.push(line.into_string());
-        }
-        lines
-    }
+
+                if self.start < self.split {
+                    let mut result_line = self.create_result_line(wrapper);
+                    cow_add_assign(&mut result_line, &self.source[self.start..self.split]);
+                    cow_add_assign(&mut result_line, hyphen);
 
-    /// Try to fit a word (or part of a word) onto a line. The line
-    /// and the remaining width is updated as appropriate if the word
-    /// or part fits.
-    fn fit_part<'b>(&self,
-                    part: &'b str,
-                    hyphen: &'b str,
-                    remaining: &mut usize,
-                    line: &mut IndentedString)
-                    -> bool {
-        let space = if line.is_empty() { 0 } else { 1 };
-        let space_needed = space + part.width() + hyphen.len();
-        let fits_in_line = space_needed <= *remaining;
-        if fits_in_line {
-            if !line.is_empty() {
-                line.push(' ');
+                    self.start = self.split + self.split_len;
+                    self.line_width += wrapper.subsequent_indent.width();
+                    self.line_width -= self.line_width_at_split;
+                    self.line_width += char_width;
+
+                    return Some(result_line);
+                }
+            } else {
+                self.in_whitespace = false;
             }
-            line.push_str(part);
-            line.push_str(hyphen);
-            *remaining -= space_needed;
+            self.line_width += char_width;
         }
 
-        fits_in_line
+        // Add final line.
+        let final_line = if self.start < self.source.len() {
+            let mut result_line = self.create_result_line(wrapper);
+            cow_add_assign(&mut result_line, &self.source[self.start..]);
+
+            Some(result_line)
+        } else {
+            None
+        };
+
+        self.finished = true;
+
+        final_line
     }
 }
 
+
+/// Return the current terminal width. If the terminal width cannot be
+/// determined (typically because the standard output is not connected
+/// to a terminal), a default width of 80 characters will be used.
+///
+/// # Examples
+///
+/// Create a `Wrapper` for the current terminal with a two column
+/// margin:
+///
+/// ```no_run
+/// # #![allow(unused_variables)]
+/// use textwrap::{Wrapper, NoHyphenation, termwidth};
+///
+/// let width = termwidth() - 4; // Two columns on each side.
+/// let wrapper = Wrapper::with_splitter(width, NoHyphenation)
+///     .initial_indent("  ")
+///     .subsequent_indent("  ");
+/// ```
+#[cfg(feature = "term_size")]
+pub fn termwidth() -> usize {
+    term_size::dimensions_stdout().map_or(80, |(w, _)| w)
+}
+
 /// Fill a line of text at `width` characters. Strings are wrapped
 /// based on their displayed width, not their size in bytes.
 ///
-/// The result is a string with newlines between each line. Use `wrap`
-/// if you need access to the individual lines.
+/// The result is a string with newlines between each line. Use
+/// [`wrap`] if you need access to the individual lines or
+/// [`wrap_iter`] for its iterator counterpart.
 ///
 /// ```
 /// use textwrap::fill;
 ///
 /// assert_eq!(fill("Memory safety without garbage collection.", 15),
 ///            "Memory safety\nwithout garbage\ncollection.");
 /// ```
 ///
 /// This function creates a Wrapper on the fly with default settings.
 /// If you need to set a language corpus for automatic hyphenation, or
-/// need to fill many strings, then it is suggested to create Wrapper
-/// and call its [`fill` method](struct.Wrapper.html#method.fill).
+/// need to fill many strings, then it is suggested to create a Wrapper
+/// and call its [`fill` method].
+///
+/// [`wrap`]: fn.wrap.html
+/// [`wrap_iter`]: fn.wrap_iter.html
+/// [`fill` method]: struct.Wrapper.html#method.fill
 pub fn fill(s: &str, width: usize) -> String {
-    wrap(s, width).join("\n")
+    Wrapper::new(width).fill(s)
 }
 
 /// Wrap a line of text at `width` characters. Strings are wrapped
 /// based on their displayed width, not their size in bytes.
 ///
+/// This function creates a Wrapper on the fly with default settings.
+/// If you need to set a language corpus for automatic hyphenation, or
+/// need to wrap many strings, then it is suggested to create a Wrapper
+/// and call its [`wrap` method].
+///
+/// The result is a vector of strings. Use [`wrap_iter`] if you need an
+/// iterator version.
+///
+/// # Examples
+///
 /// ```
 /// use textwrap::wrap;
 ///
 /// assert_eq!(wrap("Concurrency without data races.", 15),
 ///            vec!["Concurrency",
 ///                 "without data",
 ///                 "races."]);
 ///
 /// assert_eq!(wrap("Concurrency without data races.", 20),
 ///            vec!["Concurrency without",
 ///                 "data races."]);
 /// ```
 ///
+/// [`wrap_iter`]: fn.wrap_iter.html
+/// [`wrap` method]: struct.Wrapper.html#method.wrap
+pub fn wrap(s: &str, width: usize) -> Vec<Cow<str>> {
+    Wrapper::new(width).wrap(s)
+}
+
+/// Lazily wrap a line of text at `self.width` characters. Strings are
+/// wrapped based on their displayed width, not their size in bytes.
+///
 /// This function creates a Wrapper on the fly with default settings.
+/// It then calls the [`into_wrap_iter`] method. Hence, the return
+/// value is an [`IntoWrapIter`], not a [`WrapIter`] as the function
+/// name would otherwise suggest.
+///
 /// If you need to set a language corpus for automatic hyphenation, or
-/// need to wrap many strings, then it is suggested to create Wrapper
-/// and call its [`wrap` method](struct.Wrapper.html#method.wrap).
-pub fn wrap(s: &str, width: usize) -> Vec<String> {
-    Wrapper::new(width).wrap(s)
+/// need to wrap many strings, then it is suggested to create a Wrapper
+/// and call its [`wrap_iter`] or [`into_wrap_iter`] methods.
+///
+/// # Examples
+///
+/// ```
+/// use std::borrow::Cow;
+/// use textwrap::wrap_iter;
+///
+/// let mut wrap20_iter = wrap_iter("Zero-cost abstractions.", 20);
+/// assert_eq!(wrap20_iter.next(), Some(Cow::from("Zero-cost")));
+/// assert_eq!(wrap20_iter.next(), Some(Cow::from("abstractions.")));
+/// assert_eq!(wrap20_iter.next(), None);
+///
+/// let mut wrap25_iter = wrap_iter("Zero-cost abstractions.", 25);
+/// assert_eq!(wrap25_iter.next(), Some(Cow::from("Zero-cost abstractions.")));
+/// assert_eq!(wrap25_iter.next(), None);
+/// ```
+///
+/// [`wrap_iter`]: struct.Wrapper.html#method.wrap_iter
+/// [`into_wrap_iter`]: struct.Wrapper.html#method.into_wrap_iter
+/// [`IntoWrapIter`]: struct.IntoWrapIter.html
+/// [`WrapIter`]: struct.WrapIter.html
+pub fn wrap_iter(s: &str, width: usize) -> IntoWrapIter<HyphenSplitter> {
+    Wrapper::new(width).into_wrap_iter(s)
 }
 
 /// Add prefix to each non-empty line.
 ///
 /// ```
 /// use textwrap::indent;
 ///
 /// assert_eq!(indent("Foo\nBar\n", "  "), "  Foo\n  Bar\n");
@@ -618,17 +914,17 @@ mod tests {
     extern crate hyphenation;
 
     #[cfg(feature = "hyphenation")]
     use hyphenation::Language;
     use super::*;
 
     /// Add newlines. Ensures that the final line in the vector also
     /// has a newline.
-    fn add_nl(lines: &Vec<&str>) -> String {
+    fn add_nl(lines: &[&str]) -> String {
         lines.join("\n") + "\n"
     }
 
     #[test]
     fn no_wrap() {
         assert_eq!(wrap("foo", 10), vec!["foo"]);
     }
 
@@ -639,42 +935,51 @@ mod tests {
 
     #[test]
     fn multi_word_on_line() {
         assert_eq!(wrap("foo bar baz", 10), vec!["foo bar", "baz"]);
     }
 
     #[test]
     fn long_word() {
-        assert_eq!(wrap("foo", 0), vec!["foo"]);
+        assert_eq!(wrap("foo", 0), vec!["f", "o", "o"]);
     }
 
     #[test]
     fn long_words() {
-        assert_eq!(wrap("foo bar", 0), vec!["foo", "bar"]);
+        assert_eq!(wrap("foo bar", 0), vec!["f", "o", "o", "b", "a", "r"]);
+    }
+
+    #[test]
+    fn max_width() {
+        assert_eq!(wrap("foo bar", usize::max_value()), vec!["foo bar"]);
     }
 
     #[test]
-    fn whitespace_is_significant() {
+    fn leading_whitespace() {
+        assert_eq!(wrap("  foo bar", 6), vec!["  foo", "bar"]);
+    }
+
+    #[test]
+    fn trailing_whitespace() {
+        assert_eq!(wrap("foo bar  ", 6), vec!["foo", "bar  "]);
+    }
+
+    #[test]
+    fn interior_whitespace() {
         assert_eq!(wrap("foo:   bar baz", 10), vec!["foo:   bar", "baz"]);
     }
 
     #[test]
     fn extra_whitespace_start_of_line() {
         // Whitespace is only significant inside a line. After a line
         // gets too long and is broken, the first word starts in
         // column zero and is not indented. The line before might end
         // up with trailing whitespace.
-        assert_eq!(wrap("foo               bar", 5), vec!["foo  ", "bar"]);
-    }
-
-    #[test]
-    fn whitespace_is_squeezed() {
-        let wrapper = Wrapper::new(10).squeeze_whitespace(true);
-        assert_eq!(wrapper.wrap(" foo \t  bar  "), vec!["foo bar"]);
+        assert_eq!(wrap("foo               bar", 5), vec!["foo", "bar"]);
     }
 
     #[test]
     fn wide_character_handling() {
         assert_eq!(wrap("Hello, World!", 15), vec!["Hello, World!"]);
         assert_eq!(wrap("Hello, World!", 15),
                    vec!["Hello,", "World!"]);
     }
@@ -751,58 +1056,78 @@ mod tests {
     #[test]
     fn forced_split() {
         let wrapper = Wrapper::new(5).break_words(false);
         assert_eq!(wrapper.wrap("foobar-baz"), vec!["foobar-", "baz"]);
     }
 
     #[test]
     fn no_hyphenation() {
-        let wrapper = Wrapper::new(8).word_splitter(Box::new(NoHyphenation));
+        let wrapper = Wrapper::with_splitter(8, NoHyphenation);
         assert_eq!(wrapper.wrap("foo bar-baz"), vec!["foo", "bar-baz"]);
     }
 
     #[test]
     #[cfg(feature = "hyphenation")]
     fn auto_hyphenation() {
         let corpus = hyphenation::load(Language::English_US).unwrap();
         let wrapper = Wrapper::new(10);
         assert_eq!(wrapper.wrap("Internationalization"),
                    vec!["Internatio", "nalization"]);
 
-        let wrapper = wrapper.word_splitter(Box::new(corpus));
+        let wrapper = Wrapper::with_splitter(10, corpus);
         assert_eq!(wrapper.wrap("Internationalization"),
                    vec!["Interna-", "tionaliza-", "tion"]);
     }
 
     #[test]
     #[cfg(feature = "hyphenation")]
+    fn borrowed_lines() {
+        // Lines that end with an extra hyphen are owned, the final
+        // line is borrowed.
+        use std::borrow::Cow::{Borrowed, Owned};
+        let corpus = hyphenation::load(Language::English_US).unwrap();
+        let wrapper = Wrapper::with_splitter(10, corpus);
+        let lines = wrapper.wrap("Internationalization");
+        if let Borrowed(s) = lines[0] {
+            assert!(false, "should not have been borrowed: {:?}", s);
+        }
+        if let Borrowed(s) = lines[1] {
+            assert!(false, "should not have been borrowed: {:?}", s);
+        }
+        if let Owned(ref s) = lines[2] {
+            assert!(false, "should not have been owned: {:?}", s);
+        }
+    }
+
+    #[test]
+    #[cfg(feature = "hyphenation")]
     fn auto_hyphenation_with_hyphen() {
         let corpus = hyphenation::load(Language::English_US).unwrap();
         let wrapper = Wrapper::new(8).break_words(false);
         assert_eq!(wrapper.wrap("over-caffinated"), vec!["over-", "caffinated"]);
 
-        let wrapper = wrapper.word_splitter(Box::new(corpus));
+        let wrapper = Wrapper::with_splitter(8, corpus).break_words(false);
         assert_eq!(wrapper.wrap("over-caffinated"),
                    vec!["over-", "caffi-", "nated"]);
     }
 
     #[test]
     fn break_words() {
         assert_eq!(wrap("foobarbaz", 3), vec!["foo", "bar", "baz"]);
     }
 
     #[test]
     fn break_words_wide_characters() {
         assert_eq!(wrap("Hello", 5), vec!["He", "ll", "o"]);
     }
 
     #[test]
     fn break_words_zero_width() {
-        assert_eq!(wrap("foobar", 0), vec!["foobar"]);
+        assert_eq!(wrap("foobar", 0), vec!["f", "o", "o", "b", "a", "r"]);
     }
 
     #[test]
     fn test_non_breaking_space() {
         let wrapper = Wrapper::new(5).break_words(false);
         assert_eq!(wrapper.fill("foo bar baz"), "foo bar baz");
     }
 
new file mode 100644
--- /dev/null
+++ b/third_party/rust/textwrap/tests/version-numbers.rs
@@ -0,0 +1,12 @@
+#[macro_use]
+extern crate version_sync;
+
+#[test]
+fn test_readme_deps() {
+    assert_markdown_deps_updated!("README.md");
+}
+
+#[test]
+fn test_html_root_url() {
+    assert_html_root_url_updated!("src/lib.rs");
+}
deleted file mode 100644
--- a/third_party/rust/thread-id-3.0.0/.appveyor.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-environment:
-  matrix:
-    - target: 1.8.0-x86_64-pc-windows-msvc
-    - target: 1.8.0-i686-pc-windows-msvc
-    - target: 1.9.0-x86_64-pc-windows-msvc
-    - target: 1.9.0-i686-pc-windows-msvc
-    - target: 1.10.0-x86_64-pc-windows-msvc
-    - target: 1.10.0-i686-pc-windows-msvc
-    - target: 1.11.0-x86_64-pc-windows-msvc
-    - target: 1.11.0-i686-pc-windows-msvc
-    - target: 1.12.0-x86_64-pc-windows-msvc
-    - target: 1.12.0-i686-pc-windows-msvc
-    - target: beta-x86_64-pc-windows-msvc
-    - target: beta-i686-pc-windows-msvc
-    - target: beta-x86_64-pc-windows-gnu
-    - target: beta-i686-pc-windows-gnu
-    - target: nightly-x86_64-pc-windows-msvc
-    - target: nightly-i686-pc-windows-msvc
-    - target: nightly-x86_64-pc-windows-gnu
-    - target: nightly-i686-pc-windows-gnu
-
-install:
-  # Download the Rust and Cargo installer.
-  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:target}.msi"
-
-  # Install Rust and Cargo and wait for installation to finish by using Write-Output.
-  - ps: msiexec /package "rust-${env:target}.msi" /quiet /norestart | Write-Output
-
-  # Pick up the new Path variable after the installer modified it.
-  - ps: $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
-
-  # Print versions for future reference.
-  - rustc --version
-  - cargo --version
-
-build_script:
-  - cargo build
-
-test_script:
-  - cargo test
deleted file mode 100644
--- a/third_party/rust/thread-id-3.0.0/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".appveyor.yml":"cfe46be66dff73ff99ca297407aedde317d2c85c815f495f1b6e4404386f9d29",".travis.yml":"7a0ee4b2dd2e8bd06e96c6dac2967ccb9ea31faddd4e491f622fc1644aa2a731","Cargo.toml":"239ded51738713e7f828b9b21661774f48d95540fa0728499b4e0b349ded4751","license":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","readme.md":"2d0c11d07a578664683d7a5bff5cd26d940b346a7567a2e7c617b621c338852d","src/lib.rs":"92d7d1f4fd23e2866f5cab2f10d04c099eb63a5b70a23f0c818884be06dac04d"},"package":"4437c97558c70d129e40629a5b385b3fb1ffac301e63941335e4d354081ec14a"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/thread-id-3.0.0/.travis.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-language: rust
-
-rust:
-  - 1.8.0
-  - 1.9.0
-  - 1.10.0
-  - 1.11.0
-  - 1.12.0
-  - beta
-  - nightly
deleted file mode 100644
--- a/third_party/rust/thread-id-3.0.0/Cargo.toml
+++ /dev/null
@@ -1,16 +0,0 @@
-[package]
-name = "thread-id"
-version = "3.0.0"
-authors = ["Ruud van Asseldonk <dev@veniogames.com>"]
-license = "Apache-2.0"
-readme = "readme.md"
-keywords = ["thread", "pthread", "getcurrentthreadid"]
-description = "Get a unique thread ID"
-repository = "https://github.com/ruuda/thread-id"
-documentation = "https://docs.rs/thread-id"
-
-[target.'cfg(unix)'.dependencies]
-libc = "0.2.6"
-
-[target.'cfg(windows)'.dependencies]
-kernel32-sys = "0.2.1"
deleted file mode 100644
--- a/third_party/rust/thread-id-3.0.0/license
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
deleted file mode 100644
--- a/third_party/rust/thread-id-3.0.0/readme.md
+++ /dev/null
@@ -1,48 +0,0 @@
-Thread-ID
-=========
-Get a unique ID for the current thread in Rust.
-
-[![Build Status][tr-img]][tr]
-[![Build Status][av-img]][av]
-[![Crates.io version][crate-img]][crate]
-[![Documentation][docs-img]][docs]
-
-For diagnostics and debugging it can often be useful to get an ID that is
-different for every thread. [Until Rust 1.14][stdlib-pr], the standard library
-did not expose a way to do that, hence this crate.
-
-Example
--------
-
-```rust
-use std::thread;
-use thread_id;
-
-thread::spawn(move || {
-    println!("spawned thread has id {}", thread_id::get());
-});
-
-println!("main thread has id {}", thread_id::get());
-```
-
-This will print two different numbers.
-
-License
--------
-Thread-ID is licensed under the [Apache 2.0][apache2] license. It may be used
-in free software as well as closed-source applications, both for commercial and
-non-commercial use under the conditions given in the license. If you want to use
-Thread-ID in your GPLv2-licensed software, you can add an [exception][except]
-to your copyright notice.
-
-[tr-img]:    https://travis-ci.org/ruuda/thread-id.svg?branch=master
-[tr]:        https://travis-ci.org/ruuda/thread-id
-[av-img]:    https://ci.appveyor.com/api/projects/status/a6ccbm3x4fgi6wku?svg=true
-[av]:        https://ci.appveyor.com/project/ruuda/thread-id
-[crate-img]: https://img.shields.io/crates/v/thread-id.svg
-[crate]:     https://crates.io/crates/thread-id
-[docs-img]:  https://img.shields.io/badge/docs-online-blue.svg
-[docs]:      https://docs.rs/thread-id
-[stdlib-pr]: https://github.com/rust-lang/rust/pull/36341
-[apache2]:   https://www.apache.org/licenses/LICENSE-2.0
-[except]:    https://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs
deleted file mode 100644
--- a/third_party/rust/thread-id-3.0.0/src/lib.rs
+++ /dev/null
@@ -1,67 +0,0 @@
-// Thread-ID -- Get a unique thread ID
-// Copyright 2016 Ruud van Asseldonk
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// A copy of the License has been included in the root of the repository.
-
-//! Thread-ID: get a unique ID for the current thread.
-//!
-//! For diagnostics and debugging it can often be useful to get an ID that is
-//! different for every thread. This crate provides that functionality.
-//!
-//! # Example
-//!
-//! ```
-//! use std::thread;
-//! use thread_id;
-//!
-//! thread::spawn(move || {
-//!     println!("spawned thread has id {}", thread_id::get());
-//! });
-//!
-//! println!("main thread has id {}", thread_id::get());
-//! ```
-
-#![warn(missing_docs)]
-
-#[cfg(unix)]
-extern crate libc;
-
-#[cfg(windows)]
-extern crate kernel32;
-
-/// Returns a number that is unique to the calling thread.
-///
-/// Calling this function twice from the same thread will return the same
-/// number. Calling this function from a different thread will return a
-/// different number.
-#[inline]
-pub fn get() -> usize {
-    get_internal()
-}
-
-#[cfg(unix)]
-#[inline]
-fn get_internal() -> usize {
-    unsafe { libc::pthread_self() as usize }
-}
-
-#[cfg(windows)]
-#[inline]
-fn get_internal() -> usize {
-    unsafe { kernel32::GetCurrentThreadId() as usize }
-}
-
-#[test]
-fn distinct_threads_have_distinct_ids() {
-    use std::sync::mpsc;
-    use std::thread;
-
-    let (tx, rx) = mpsc::channel();
-    thread::spawn(move || tx.send(::get()).unwrap()).join().unwrap();
-
-    let main_tid = ::get();
-    let other_tid = rx.recv().unwrap();
-    assert!(main_tid != other_tid);
-}
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"659372b49358cc4b09cde98923122b608b9733a861ae51a7bb27ffe25808fad7","Cargo.toml":"b0a7941038e0cd9aa68c0bffdd2d872e71e1228f0d6fa33e090c09c843ee6a93","LICENSE":"a745ca7ae4a3c089cfbe4b0a6288fa95776244a65be2914b147878146f8c64da","README.md":"4c7e3e81e09029b9c8465241a6b673ba5f723ea279464fd0d44c3544ed0867c5","build.rs":"81a706e8a238587fdea06eb97c3756dd9eda8d92028c4ccd6339ffedbe0b78ff","src/lib.rs":"cca9109bf1124f46e9158e88b426bd74353917685226aeb442013ad30f84ab5d"},"package":"13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-language: rust
-rust:
-  - stable
-  - beta
-  - nightly
-matrix:
-  allow_failures:
-    - rust: nightly
-
-after_success: |
-    [ $TRAVIS_BRANCH = master ] &&
-    [ $TRAVIS_PULL_REQUEST = false ] &&
-    cargo doc &&
-    echo '<meta http-equiv=refresh content=0;url=case/index.html>' > target/doc/index.html &&
-    sudo pip install ghp-import &&
-    ghp-import -n target/doc &&
-    git push -fq https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
-
-env:
-    global:
-        - secure: rkPwcgjGQobsH3/LAV3Ecyt5Q6BiqWhAITLUUCX/lrBjXDaUma+RUjnh7bEzCQ5sG1hFLCJUlLZbWuNx+95t7yRgP14T3asp/a4PdtPkwL8okqq7RLAt7tjI6optUZ8Kr7HNp3jQDHda4tpSLDaZvM3zmrHOLwsDpYLRNAbhWM8=
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/Cargo.toml
+++ /dev/null
@@ -1,25 +0,0 @@
-[package]
-
-name = "unicase"
-version = "1.4.0"
-authors = ["Sean McArthur <sean.monstar@gmail.com>"]
-description = "A case-insensitive wrapper around strings."
-repository = "https://github.com/seanmonstar/unicase"
-license = "MIT"
-keywords = ["lowercase", "case", "case-insensitive"]
-
-build = "build.rs"
-
-[build-dependencies]
-rustc_version = "0.1"
-
-[dependencies.heapsize]
-version = ">=0.2.0, <0.4"
-optional = true
-
-[dependencies.heapsize_plugin]
-version = "0.1.2"
-optional = true
-
-[features]
-heap_size = ["heapsize", "heapsize_plugin"]
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014-2015 Sean McArthur
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# unicase
-
-[![Build Status](https://travis-ci.org/seanmonstar/unicase.svg?branch=master)](https://travis-ci.org/seanmonstar/unicase)
-
-Compare strings when case is not important.
-
-```rust
-if UniCase(method) == UniCase('GET') {
-    // GET request
-}
-```
-
-## License
-
-[MIT](./LICENSE)
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/build.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-extern crate rustc_version as rustc;
-
-fn main() {
-    if rustc::version_matches(">= 1.5") {
-        println!("cargo:rustc-cfg=iter_cmp");
-    }
-}
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/src/lib.rs
+++ /dev/null
@@ -1,210 +0,0 @@
-#![cfg_attr(test, deny(missing_docs))]
-#![cfg_attr(test, deny(warnings))]
-#![cfg_attr(feature = "heap_size", feature(custom_derive, plugin))]
-#![cfg_attr(feature = "heap_size", plugin(heapsize_plugin))]
-
-//! # Case
-//!
-//! Case provices a way of specifying strings that are case-insensitive.
-//!
-//! ## Example
-//!
-//! ```rust
-//! use unicase::UniCase;
-//!
-//! let a = UniCase("foobar");
-//! let b = UniCase("FoObAr");
-//!
-//! assert_eq!(a, b);
-//! ```
-
-#[cfg(feature = "heap_size")]
-extern crate heapsize;
-
-use std::ascii::AsciiExt;
-#[cfg(iter_cmp)]
-use std::cmp::Ordering;
-use std::fmt;
-use std::hash::{Hash, Hasher};
-use std::ops::{Deref, DerefMut};
-use std::str::FromStr;
-
-/// Case Insensitive wrapper of strings.
-#[derive(Copy, Clone, Debug)]
-#[cfg_attr(feature = "heap_size", derive(HeapSizeOf))]
-pub struct UniCase<S>(pub S);
-
-impl<S> Deref for UniCase<S> {
-    type Target = S;
-    #[inline]
-    fn deref<'a>(&'a self) -> &'a S {
-        &self.0
-    }
-}
-
-impl<S> DerefMut for UniCase<S> {
-    #[inline]
-    fn deref_mut<'a>(&'a mut self) -> &'a mut S {
-        &mut self.0
-    }
-}
-
-#[cfg(iter_cmp)]
-impl<T: AsRef<str>> PartialOrd for UniCase<T> {
-    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
-        Some(self.cmp(other))
-    }
-}
-
-#[cfg(iter_cmp)]
-impl<T: AsRef<str>> Ord for UniCase<T> {
-    fn cmp(&self, other: &Self) -> Ordering {
-        let self_chars = self.as_ref().chars().map(|c| c.to_ascii_lowercase());
-        let other_chars = other.as_ref().chars().map(|c| c.to_ascii_lowercase());
-        self_chars.cmp(other_chars)
-    }
-}
-
-impl<S: AsRef<str>> AsRef<str> for UniCase<S> {
-    #[inline]
-    fn as_ref(&self) -> &str {
-        self.0.as_ref()
-    }
-
-}
-
-impl<S: fmt::Display> fmt::Display for UniCase<S> {
-    #[inline]
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self.0, fmt)
-    }
-}
-
-impl<S1: AsRef<str>, S2: AsRef<str>> PartialEq<S2> for UniCase<S1> {
-    #[inline]
-    fn eq(&self, other: &S2) -> bool {
-        self.as_ref().eq_ignore_ascii_case(other.as_ref())
-    }
-}
-
-
-impl<S: AsRef<str>> Eq for UniCase<S> {}
-
-impl<S: FromStr> FromStr for UniCase<S> {
-    type Err = <S as FromStr>::Err;
-    fn from_str(s: &str) -> Result<UniCase<S>, <S as FromStr>::Err> {
-        s.parse().map(UniCase)
-    }
-}
-
-impl<S: AsRef<str>> Hash for UniCase<S> {
-    #[inline]
-    fn hash<H: Hasher>(&self, hasher: &mut H) {
-        for byte in self.as_ref().bytes().map(|b| b.to_ascii_lowercase()) {
-            hasher.write(&[byte]);
-        }
-    }
-}
-
-macro_rules! from_impl {
-    ($from:ty => $to:ty; $by:ident) => (
-        impl<'a> From<$from> for UniCase<$to> {
-            fn from(s: $from) -> Self {
-                UniCase(s.$by())
-            }
-        }
-    );
-    ($from:ty => $to:ty) => ( from_impl!($from => $to; into); )
-}
-
-macro_rules! into_impl {
-    ($to:ty) => (
-        impl<'a> Into<$to> for UniCase<$to> {
-            fn into(self) -> $to {
-                self.0
-            }
-        }
-    );
-}
-
-from_impl!(&'a str => &'a str);
-from_impl!(&'a str => String);
-from_impl!(&'a String => &'a str; as_ref);
-from_impl!(String => String);
-
-into_impl!(&'a str);
-into_impl!(String);
-
-#[cfg(test)]
-mod test {
-    use super::UniCase;
-    use std::hash::{Hash, Hasher, SipHasher};
-
-    fn hash<T: Hash>(t: &T) -> u64 {
-        let mut s = SipHasher::new();
-        t.hash(&mut s);
-        s.finish()
-    }
-
-    #[test]
-    fn test_copy_for_refs() {
-        fn foo<T>(_: UniCase<T>) {}
-
-        let a = UniCase("foobar");
-        foo(a);
-        foo(a);
-    }
-
-    #[test]
-    fn test_case_insensitive() {
-        let a = UniCase("foobar");
-        let b = UniCase("FOOBAR");
-
-        assert_eq!(a, b);
-        assert_eq!(hash(&a), hash(&b));
-    }
-
-    #[test]
-    fn test_different_string_types() {
-        let a = UniCase("foobar");
-        let b = "FOOBAR".to_owned();
-        assert_eq!(a, b);
-        assert_eq!(UniCase(b), a);
-    }
-
-    #[cfg(iter_cmp)]
-    #[test]
-    fn test_case_cmp() {
-        assert!(UniCase("foobar") == UniCase("FOOBAR"));
-        assert!(UniCase("a") < UniCase("B"));
-
-        assert!(UniCase("A") < UniCase("b"));
-        assert!(UniCase("aa") > UniCase("a"));
-
-        assert!(UniCase("a") < UniCase("aa"));
-        assert!(UniCase("a") < UniCase("AA"));
-    }
-
-    #[test]
-    fn test_from_impls() {
-        let view: &'static str = "foobar";
-        let _: UniCase<&'static str> = view.into();
-        let _: UniCase<&str> = view.into();
-        let _: UniCase<String> = view.into();
-
-        let owned: String = view.to_owned();
-        let _: UniCase<&str> = (&owned).into();
-        let _: UniCase<String> = owned.into();
-    }
-
-    #[test]
-    fn test_into_impls() {
-        let view: UniCase<&'static str> = UniCase("foobar");
-        let _: &'static str = view.into();
-        let _: &str = view.into();
-
-        let owned: UniCase<String> = "foobar".into();
-        let _: String = owned.clone().into();
-        let _: &str = owned.as_ref();
-    }
-}