No bug - Revendor rust dependencies
authorServo VCS Sync <servo-vcs-sync@mozilla.com>
Mon, 11 Sep 2017 15:34:19 +0000
changeset 429546 b9c7d951bf57ddeb19f0c940a258607884ecbcee
parent 429545 002ebb2eb2b708d72bbc82c2cac7bb5c3451cfb1
child 429547 3b7add087f2b2fe1c489350af9c3ffe1fb21fb2a
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
No bug - Revendor rust dependencies
third_party/rust/smallbitvec/.cargo-checksum.json
third_party/rust/smallbitvec/.cargo-ok
third_party/rust/smallbitvec/Cargo.toml
third_party/rust/smallbitvec/LICENSE-APACHE
third_party/rust/smallbitvec/LICENSE-MIT
third_party/rust/smallbitvec/README.md
third_party/rust/smallbitvec/benches/bench.rs
third_party/rust/smallbitvec/src/lib.rs
toolkit/library/gtest/rust/Cargo.lock
toolkit/library/rust/Cargo.lock
new file mode 100644
--- /dev/null
+++ b/third_party/rust/smallbitvec/.cargo-checksum.json
@@ -0,0 +1,1 @@
+{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"37dbe41747b297eb3344c056e34570fc454cbbc29593e4f147a8db41f6b401c5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"daa94322de7eab889e055932396160395bd8e3af82f56ae8c419d3049111da72","README.md":"c7b7102e5b19a19c3a0e1cefeddb228fb57c7fac6ce91f15dada4d81d8dc2dac","benches/bench.rs":"753ab48c39c771fb0443bb150b8e7c28f0992ca8e9a725c27efbbf664e7a2f1e","src/lib.rs":"e8aa141e8d27fab0d09cf84ba8e299250cbcb814d790dffef7a6f76e316a27cd"},"package":"c1ebf4681dc284c22efb7248986bbdf8aa23c2749ea85a0107e0e787038d303e"}
\ No newline at end of file
new file mode 100644
new file mode 100644
--- /dev/null
+++ b/third_party/rust/smallbitvec/Cargo.toml
@@ -0,0 +1,27 @@
+# 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 = "smallbitvec"
+version = "1.0.3"
+authors = ["Matt Brubeck <mbrubeck@limpet.net>"]
+description = "A bit vector optimized for size and inline storage"
+documentation = "https://docs.rs/smallbitvec"
+readme = "README.md"
+keywords = ["bitvec", "bitmap", "vec", "data-structures"]
+license = "MIT / Apache-2.0"
+repository = "https://github.com/servo/smallbitvec"
+[dev-dependencies.bit-vec]
+version = "0.4.4"
+
+[dev-dependencies.rand]
+version = "0.3.15"
new file mode 100644
--- /dev/null
+++ b/third_party/rust/smallbitvec/LICENSE-APACHE
@@ -0,0 +1,201 @@
+                              Apache License
+                        Version 2.0, January 2004
+                     http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   "License" shall mean the terms and conditions for use, reproduction,
+   and distribution as defined by Sections 1 through 9 of this document.
+
+   "Licensor" shall mean the copyright owner or entity authorized by
+   the copyright owner that is granting the License.
+
+   "Legal Entity" shall mean the union of the acting entity and all
+   other entities that control, are controlled by, or are under common
+   control with that entity. For the purposes of this definition,
+   "control" means (i) the power, direct or indirect, to cause the
+   direction or management of such entity, whether by contract or
+   otherwise, or (ii) ownership of fifty percent (50%) or more of the
+   outstanding shares, or (iii) beneficial ownership of such entity.
+
+   "You" (or "Your") shall mean an individual or Legal Entity
+   exercising permissions granted by this License.
+
+   "Source" form shall mean the preferred form for making modifications,
+   including but not limited to software source code, documentation
+   source, and configuration files.
+
+   "Object" form shall mean any form resulting from mechanical
+   transformation or translation of a Source form, including but
+   not limited to compiled object code, generated documentation,
+   and conversions to other media types.
+
+   "Work" shall mean the work of authorship, whether in Source or
+   Object form, made available under the License, as indicated by a
+   copyright notice that is included in or attached to the work
+   (an example is provided in the Appendix below).
+
+   "Derivative Works" shall mean any work, whether in Source or Object
+   form, that is based on (or derived from) the Work and for which the
+   editorial revisions, annotations, elaborations, or other modifications
+   represent, as a whole, an original work of authorship. For the purposes
+   of this License, Derivative Works shall not include works that remain
+   separable from, or merely link (or bind by name) to the interfaces of,
+   the Work and Derivative Works thereof.
+
+   "Contribution" shall mean any work of authorship, including
+   the original version of the Work and any modifications or additions
+   to that Work or Derivative Works thereof, that is intentionally
+   submitted to Licensor for inclusion in the Work by the copyright owner
+   or by an individual or Legal Entity authorized to submit on behalf of
+   the copyright owner. For the purposes of this definition, "submitted"
+   means any form of electronic, verbal, or written communication sent
+   to the Licensor or its representatives, including but not limited to
+   communication on electronic mailing lists, source code control systems,
+   and issue tracking systems that are managed by, or on behalf of, the
+   Licensor for the purpose of discussing and improving the Work, but
+   excluding communication that is conspicuously marked or otherwise
+   designated in writing by the copyright owner as "Not a Contribution."
+
+   "Contributor" shall mean Licensor and any individual or Legal Entity
+   on behalf of whom a Contribution has been received by Licensor and
+   subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   copyright license to reproduce, prepare Derivative Works of,
+   publicly display, publicly perform, sublicense, and distribute the
+   Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   (except as stated in this section) patent license to make, have made,
+   use, offer to sell, sell, import, and otherwise transfer the Work,
+   where such license applies only to those patent claims licensable
+   by such Contributor that are necessarily infringed by their
+   Contribution(s) alone or by combination of their Contribution(s)
+   with the Work to which such Contribution(s) was submitted. If You
+   institute patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Work
+   or a Contribution incorporated within the Work constitutes direct
+   or contributory patent infringement, then any patent licenses
+   granted to You under this License for that Work shall terminate
+   as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+   Work or Derivative Works thereof in any medium, with or without
+   modifications, and in Source or Object form, provided that You
+   meet the following conditions:
+
+   (a) You must give any other recipients of the Work or
+       Derivative Works a copy of this License; and
+
+   (b) You must cause any modified files to carry prominent notices
+       stating that You changed the files; and
+
+   (c) You must retain, in the Source form of any Derivative Works
+       that You distribute, all copyright, patent, trademark, and
+       attribution notices from the Source form of the Work,
+       excluding those notices that do not pertain to any part of
+       the Derivative Works; and
+
+   (d) If the Work includes a "NOTICE" text file as part of its
+       distribution, then any Derivative Works that You distribute must
+       include a readable copy of the attribution notices contained
+       within such NOTICE file, excluding those notices that do not
+       pertain to any part of the Derivative Works, in at least one
+       of the following places: within a NOTICE text file distributed
+       as part of the Derivative Works; within the Source form or
+       documentation, if provided along with the Derivative Works; or,
+       within a display generated by the Derivative Works, if and
+       wherever such third-party notices normally appear. The contents
+       of the NOTICE file are for informational purposes only and
+       do not modify the License. You may add Your own attribution
+       notices within Derivative Works that You distribute, alongside
+       or as an addendum to the NOTICE text from the Work, provided
+       that such additional attribution notices cannot be construed
+       as modifying the License.
+
+   You may add Your own copyright statement to Your modifications and
+   may provide additional or different license terms and conditions
+   for use, reproduction, or distribution of Your modifications, or
+   for any such Derivative Works as a whole, provided Your use,
+   reproduction, and distribution of the Work otherwise complies with
+   the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+   any Contribution intentionally submitted for inclusion in the Work
+   by You to the Licensor shall be under the terms and conditions of
+   this License, without any additional terms or conditions.
+   Notwithstanding the above, nothing herein shall supersede or modify
+   the terms of any separate license agreement you may have executed
+   with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+   names, trademarks, service marks, or product names of the Licensor,
+   except as required for reasonable and customary use in describing the
+   origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+   agreed to in writing, Licensor provides the Work (and each
+   Contributor provides its Contributions) on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied, including, without limitation, any warranties or conditions
+   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+   PARTICULAR PURPOSE. You are solely responsible for determining the
+   appropriateness of using or redistributing the Work and assume any
+   risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+   whether in tort (including negligence), contract, or otherwise,
+   unless required by applicable law (such as deliberate and grossly
+   negligent acts) or agreed to in writing, shall any Contributor be
+   liable to You for damages, including any direct, indirect, special,
+   incidental, or consequential damages of any character arising as a
+   result of this License or out of the use or inability to use the
+   Work (including but not limited to damages for loss of goodwill,
+   work stoppage, computer failure or malfunction, or any and all
+   other commercial damages or losses), even if such Contributor
+   has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+   the Work or Derivative Works thereof, You may choose to offer,
+   and charge a fee for, acceptance of support, warranty, indemnity,
+   or other liability obligations and/or rights consistent with this
+   License. However, in accepting such obligations, You may act only
+   on Your own behalf and on Your sole responsibility, not on behalf
+   of any other Contributor, and only if You agree to indemnify,
+   defend, and hold each Contributor harmless for any liability
+   incurred by, or claims asserted against, such Contributor by reason
+   of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+   To apply the Apache License to your work, attach the following
+   boilerplate notice, with the fields enclosed by brackets "[]"
+   replaced with your own identifying information. (Don't include
+   the brackets!)  The text should be enclosed in the appropriate
+   comment syntax for the file format. We also recommend that a
+   file or class name and description of purpose be included on the
+   same "printed page" as the copyright notice for easier
+   identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+	http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
new file mode 100644
--- /dev/null
+++ b/third_party/rust/smallbitvec/LICENSE-MIT
@@ -0,0 +1,25 @@
+Copyright (c) 2017 Matt Brubeck
+
+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.
new file mode 100644
--- /dev/null
+++ b/third_party/rust/smallbitvec/README.md
@@ -0,0 +1,7 @@
+# smallbitvec
+
+A bit vector that is only one word wide, and can store data either inline or
+on the heap.
+
+* [Documentation](https://docs.rs/smallbitvec)
+* [crates.io](https://crates.io/crates/smallbitvec)
new file mode 100644
--- /dev/null
+++ b/third_party/rust/smallbitvec/benches/bench.rs
@@ -0,0 +1,209 @@
+// Copyright 2012-2014 The Rust Project Developers.
+// Copyright 2017 Matt Brubeck.
+// 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(test)]
+
+extern crate bit_vec;
+extern crate rand;
+extern crate smallbitvec;
+extern crate test;
+
+use bit_vec::BitVec;
+use rand::{Rng, weak_rng, XorShiftRng};
+use smallbitvec::SmallBitVec;
+use test::{Bencher, black_box};
+
+const BENCH_BITS : usize = 1 << 14;
+const U32_BITS: usize = 32;
+
+fn rng() -> XorShiftRng {
+    weak_rng()
+}
+
+#[bench]
+fn bench_bit_set_big_fixed_bv(b: &mut Bencher) {
+    let mut r = rng();
+    let mut bit_vec = BitVec::from_elem(BENCH_BITS, false);
+    b.iter(|| {
+        for _ in 0..100 {
+            bit_vec.set((r.next_u32() as usize) % BENCH_BITS, true);
+        }
+        black_box(&bit_vec);
+    });
+}
+
+#[bench]
+fn bench_bit_set_big_fixed_sbv(b: &mut Bencher) {
+    let mut r = rng();
+    let mut bit_vec = SmallBitVec::from_elem(BENCH_BITS as u32, false);
+    b.iter(|| {
+        for _ in 0..100 {
+            bit_vec.set(r.next_u32() % BENCH_BITS as u32, true);
+        }
+        black_box(&bit_vec);
+    });
+}
+
+#[bench]
+fn bench_big_set_big_variable_bv(b: &mut Bencher) {
+    let mut r = rng();
+    let mut bit_vec = BitVec::from_elem(BENCH_BITS, false);
+    b.iter(|| {
+        for _ in 0..100 {
+            bit_vec.set((r.next_u32() as usize) % BENCH_BITS, r.gen());
+        }
+        black_box(&bit_vec);
+    });
+}
+
+#[bench]
+fn bench_bit_set_big_variable_sbv(b: &mut Bencher) {
+    let mut r = rng();
+    let mut bit_vec = SmallBitVec::from_elem(BENCH_BITS as u32, false);
+    b.iter(|| {
+        for _ in 0..100 {
+            bit_vec.set(r.next_u32() % BENCH_BITS as u32, r.gen());
+        }
+        black_box(&bit_vec);
+    });
+}
+
+#[bench]
+fn bench_bit_set_small_bv(b: &mut Bencher) {
+    let mut r = rng();
+    let mut bit_vec = BitVec::from_elem(U32_BITS, false);
+    b.iter(|| {
+        for _ in 0..100 {
+            bit_vec.set((r.next_u32() as usize) % U32_BITS, true);
+        }
+        black_box(&bit_vec);
+    });
+}
+
+#[bench]
+fn bench_bit_set_small_sbv(b: &mut Bencher) {
+    let mut r = rng();
+    let mut bit_vec = SmallBitVec::from_elem(U32_BITS as u32, false);
+    b.iter(|| {
+        for _ in 0..100 {
+            bit_vec.set(r.next_u32() % U32_BITS as u32, true);
+        }
+        black_box(&bit_vec);
+    });
+}
+
+#[bench]
+fn bench_bit_vec_small_eq_bv(b: &mut Bencher) {
+    let x = BitVec::from_elem(U32_BITS, false);
+    let y = BitVec::from_elem(U32_BITS, false);
+    b.iter(|| {
+        x == y
+    });
+}
+
+#[bench]
+fn bench_bit_vec_small_eq_sbv(b: &mut Bencher) {
+    let x = SmallBitVec::from_elem(U32_BITS as u32, false);
+    let y = SmallBitVec::from_elem(U32_BITS as u32, false);
+    b.iter(|| {
+        x == y
+    });
+}
+
+#[bench]
+fn bench_bit_vec_big_eq_bv(b: &mut Bencher) {
+    let x = BitVec::from_elem(BENCH_BITS, false);
+    let y = BitVec::from_elem(BENCH_BITS, false);
+    b.iter(|| {
+        x == y
+    });
+}
+
+#[bench]
+fn bench_bit_vec_big_eq_sbv(b: &mut Bencher) {
+    let x = SmallBitVec::from_elem(BENCH_BITS as u32, false);
+    let y = SmallBitVec::from_elem(BENCH_BITS as u32, false);
+    b.iter(|| {
+        x == y
+    });
+}
+
+#[bench]
+fn bench_bit_vec_small_iter_bv(b: &mut Bencher) {
+    let bit_vec = BitVec::from_elem(U32_BITS, false);
+    b.iter(|| {
+        let mut sum = 0;
+        for _ in 0..10 {
+            for pres in &bit_vec {
+                sum += pres as usize;
+            }
+        }
+        sum
+    })
+}
+
+#[bench]
+fn bench_bit_vec_small_iter_sbv(b: &mut Bencher) {
+    let bit_vec = SmallBitVec::from_elem(U32_BITS as u32, false);
+    b.iter(|| {
+        let mut sum = 0;
+        for _ in 0..10 {
+            for pres in &bit_vec {
+                sum += pres as usize;
+            }
+        }
+        sum
+    })
+}
+
+#[bench]
+fn bench_bit_vec_big_iter_bv(b: &mut Bencher) {
+    let bit_vec = BitVec::from_elem(BENCH_BITS, false);
+    b.iter(|| {
+        let mut sum = 0;
+        for pres in &bit_vec {
+            sum += pres as usize;
+        }
+        sum
+    })
+}
+
+#[bench]
+fn bench_bit_vec_big_iter_sbv(b: &mut Bencher) {
+    let bit_vec = SmallBitVec::from_elem(BENCH_BITS as u32, false);
+    b.iter(|| {
+        let mut sum = 0;
+        for pres in &bit_vec {
+            sum += pres as usize;
+        }
+        sum
+    })
+}
+
+#[bench]
+fn bench_from_elem_bv(b: &mut Bencher) {
+    let cap = black_box(BENCH_BITS);
+    let bit = black_box(true);
+    b.iter(|| {
+        BitVec::from_elem(cap, bit)
+    });
+    b.bytes = cap as u64 / 8;
+}
+
+#[bench]
+fn bench_from_elem_sbv(b: &mut Bencher) {
+    let cap = black_box(BENCH_BITS) as u32;
+    let bit = black_box(true);
+    b.iter(|| {
+        SmallBitVec::from_elem(cap, bit)
+    });
+    b.bytes = cap as u64 / 8;
+}
new file mode 100644
--- /dev/null
+++ b/third_party/rust/smallbitvec/src/lib.rs
@@ -0,0 +1,890 @@
+// Copyright 2017 Matt Brubeck. 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.
+
+//! [`SmallBitVec`] is a bit vector, a vector of single-bit values stored compactly in memory.
+//!
+//! SmallBitVec grows dynamically, like the standard `Vec<T>` type.  It can hold up to about one
+//! word of bits inline (without a separate heap allocation).  If the number of bits exceeds this
+//! inline capacity, it will allocate a buffer on the heap.
+//!
+//! [`SmallBitVec`]: struct.SmallBitVec.html
+
+use std::cmp::max;
+use std::fmt;
+use std::hash;
+use std::iter::{DoubleEndedIterator, ExactSizeIterator, FromIterator};
+use std::mem::{forget, replace, size_of};
+use std::ops::Range;
+use std::slice;
+
+/// A resizable bit vector, optimized for size and inline storage.
+///
+/// `SmallBitVec` is exactly one word wide. Depending on the required capacity, this word
+/// either stores the bits inline, or it stores a pointer to a separate buffer on the heap.
+pub struct SmallBitVec {
+    data: usize,
+}
+
+/// Total number of bits per word.
+fn inline_bits() -> u32 {
+    size_of::<usize>() as u32 * 8
+}
+
+/// For an inline vector, all bits except two can be used as storage capacity:
+///
+/// - The rightmost bit is set to zero to signal an inline vector.
+/// - The position of the rightmost nonzero bit encodes the length.
+fn inline_capacity() -> u32 {
+    inline_bits() - 2
+}
+
+/// The position of the nth bit of storage in an inline vector.
+fn inline_index(n: u32) -> usize {
+    debug_assert!(n <= inline_capacity());
+    // The storage starts at the leftmost bit.
+    1 << (inline_bits() - 1 - n)
+}
+
+/// If the rightmost bit of `data` is set, then the remaining bits of `data`
+/// are a pointer to a heap allocation.
+const HEAP_FLAG: usize = 1;
+
+/// The allocation will contain a `Header` followed by a [Storage] buffer.
+type Storage = u32;
+
+/// The number of bits in one `Storage`.
+#[inline(always)]
+fn bits_per_storage() -> u32 {
+    size_of::<Storage>() as u32 * 8
+}
+
+/// Data stored at the start of the heap allocation.
+///
+/// `Header` must have the same alignment as `Storage`.
+struct Header {
+    /// The number of bits in this bit vector.
+    len: Storage,
+
+    /// The number of elements in the [u32] buffer that follows this header.
+    buffer_len: Storage,
+}
+
+impl Header {
+    /// Create a heap allocation with enough space for a header,
+    /// plus a buffer of at least `cap` bits, each initialized to `val`.
+    fn new(cap: u32, len: u32, val: bool) -> *mut Header {
+        let alloc_len = header_len() + buffer_len(cap);
+        let init = if val { !0 } else { 0 };
+
+        let v: Vec<Storage> = vec![init; alloc_len];
+
+        let buffer_len = v.capacity() - header_len();
+        let header_ptr = v.as_ptr() as *mut Header;
+
+        forget(v);
+
+        unsafe {
+            (*header_ptr).len = len;
+            (*header_ptr).buffer_len = buffer_len as u32;
+        }
+        header_ptr
+    }
+}
+
+/// The number of `Storage` elements to allocate to hold a header.
+fn header_len() -> usize {
+    size_of::<Header>() / size_of::<Storage>()
+}
+
+/// The minimum number of `Storage` elements to hold at least `cap` bits.
+fn buffer_len(cap: u32) -> usize {
+    ((cap + bits_per_storage() - 1) / bits_per_storage()) as usize
+}
+
+impl SmallBitVec {
+    /// Create an empty vector.
+    #[inline]
+    pub fn new() -> SmallBitVec {
+        SmallBitVec {
+            data: inline_index(0)
+        }
+    }
+
+    /// Create a vector containing `len` bits, each set to `val`.
+    pub fn from_elem(len: u32, val: bool) -> SmallBitVec {
+        let header_ptr = Header::new(len, len, val);
+        SmallBitVec {
+            data: (header_ptr as usize) | HEAP_FLAG
+        }
+    }
+
+    /// Create a vector with at least `cap` bits of storage.
+    pub fn with_capacity(cap: u32) -> SmallBitVec {
+        // Use inline storage if possible.
+        if cap <= inline_capacity() {
+            return SmallBitVec::new()
+        }
+
+        // Otherwise, allocate on the heap.
+        let header_ptr = Header::new(cap, 0, false);
+        SmallBitVec {
+            data: (header_ptr as usize) | HEAP_FLAG
+        }
+    }
+
+    /// The number of bits stored in this bit vector.
+    #[inline]
+    pub fn len(&self) -> u32 {
+        if self.is_inline() {
+            // The rightmost nonzero bit is a sentinel.  All bits to the left of
+            // the sentinel bit are the elements of the bit vector.
+            inline_bits() - self.data.trailing_zeros() - 1
+        } else {
+            self.header().len
+        }
+    }
+
+    /// Returns `true` if this vector contains no bits.
+    #[inline]
+    pub fn is_empty(&self) -> bool {
+        self.len() == 0
+    }
+
+    /// The number of bits that can be stored in this bit vector without re-allocating.
+    #[inline]
+    pub fn capacity(&self) -> u32 {
+        if self.is_inline() {
+            inline_capacity()
+        } else {
+            self.header().buffer_len * bits_per_storage()
+        }
+    }
+
+    /// Get the nth bit in this bit vector.  Panics if the index is out of bounds.
+    #[inline]
+    pub fn get(&self, n: u32) -> bool {
+        assert!(n < self.len(), "Index {} out of bounds", n);
+        unsafe { self.get_unchecked(n) }
+    }
+
+    /// Get the nth bit in this bit vector, without bounds checks.
+    pub unsafe fn get_unchecked(&self, n: u32) -> bool {
+        if self.is_inline() {
+            self.data & inline_index(n) != 0
+        } else {
+            let buffer = self.buffer();
+            let i = (n / bits_per_storage()) as usize;
+            let offset = n % bits_per_storage();
+            *buffer.get_unchecked(i) & (1 << offset) != 0
+        }
+    }
+
+    /// Set the nth bit in this bit vector to `val`.  Panics if the index is out of bounds.
+    pub fn set(&mut self, n: u32, val: bool) {
+        assert!(n < self.len(), "Index {} out of bounds", n);
+        unsafe { self.set_unchecked(n, val); }
+    }
+
+    /// Set the nth bit in this bit vector to `val`, without bounds checks.
+    pub unsafe fn set_unchecked(&mut self, n: u32, val: bool) {
+        if self.is_inline() {
+            if val {
+                self.data |= inline_index(n);
+            } else {
+                self.data &= !inline_index(n);
+            }
+        } else {
+            let buffer = self.buffer_mut();
+            let i = (n / bits_per_storage()) as usize;
+            let offset = n % bits_per_storage();
+            if val {
+                *buffer.get_unchecked_mut(i) |= 1 << offset;
+            } else {
+                *buffer.get_unchecked_mut(i) &= !(1 << offset);
+            }
+        }
+    }
+
+    /// Append a bit to the end of the vector.
+    ///
+    /// ```
+    /// use smallbitvec::SmallBitVec;
+    /// let mut v = SmallBitVec::new();
+    /// v.push(true);
+    ///
+    /// assert_eq!(v.len(), 1);
+    /// assert_eq!(v.get(0), true);
+    /// ```
+    #[inline]
+    pub fn push(&mut self, val: bool) {
+        let idx = self.len();
+        if idx == self.capacity() {
+            self.reserve(1);
+        }
+        unsafe {
+            self.set_len(idx + 1);
+            self.set_unchecked(idx, val);
+        }
+    }
+
+    /// Remove the last bit from the vector and return it, if there is one.
+    ///
+    /// ```
+    /// use smallbitvec::SmallBitVec;
+    /// let mut v = SmallBitVec::new();
+    /// v.push(false);
+    ///
+    /// assert_eq!(v.pop(), Some(false));
+    /// assert_eq!(v.len(), 0);
+    /// assert_eq!(v.pop(), None);
+    /// ```
+    pub fn pop(&mut self) -> Option<bool> {
+        let old_len = self.len();
+        if old_len == 0 {
+            return None
+        }
+        unsafe {
+            let val = self.get_unchecked(old_len - 1);
+            self.set_len(old_len - 1);
+            Some(val)
+        }
+    }
+
+    /// Remove the bit at index `idx`, shifting all later bits toward the front.
+    ///
+    /// Panics if the index is out of bounds.
+    pub fn remove(&mut self, idx: u32) {
+        assert!(idx < self.len(), "Index {} out of bounds", idx);
+
+        for i in (idx+1)..self.len() {
+            unsafe {
+                let next_val = self.get_unchecked(i);
+                self.set_unchecked(i - 1, next_val);
+            }
+        }
+        self.pop();
+    }
+
+    /// Remove all elements from the vector, without deallocating its buffer.
+    pub fn clear(&mut self) {
+        unsafe {
+            self.set_len(0);
+        }
+    }
+
+    /// Reserve capacity for at least `additional` more elements to be inserted.
+    ///
+    /// May reserve more space than requested, to avoid frequent reallocations.
+    ///
+    /// Panics if the new capacity overflows `u32`.
+    ///
+    /// Re-allocates only if `self.capacity() < self.len() + additional`.
+    pub fn reserve(&mut self, additional: u32) {
+        let old_cap = self.capacity();
+        let new_cap = self.len().checked_add(additional).expect("capacity overflow");
+        if new_cap <= old_cap {
+            return
+        }
+        // Ensure the new capacity is at least double, to guarantee exponential growth.
+        let double_cap = old_cap.saturating_mul(2);
+        self.reallocate(max(new_cap, double_cap));
+    }
+
+    /// Set the length of the vector. The length must not exceed the capacity.
+    ///
+    /// If this makes the vector longer, then the values of its new elements
+    /// are not specified.
+    unsafe fn set_len(&mut self, len: u32) {
+        debug_assert!(len <= self.capacity());
+        if self.is_inline() {
+            let sentinel = inline_index(len);
+            let mask = !(sentinel - 1);
+            self.data |= sentinel;
+            self.data &= mask;
+        } else {
+            self.header_mut().len = len;
+        }
+    }
+
+    /// Returns an iterator that yields the bits of the vector in order, as `bool` values.
+    pub fn iter(&self) -> Iter {
+        Iter { vec: self, range: 0..self.len() }
+    }
+
+    /// Returns true if all the bits in the vec are set to zero/false.
+    pub fn all_false(&self) -> bool {
+        let mut len = self.len();
+        if len == 0 {
+            return true
+        }
+
+        if self.is_inline() {
+            let mask = !(inline_index(len - 1) - 1);
+            self.data & mask == 0
+        } else {
+            for &storage in self.buffer() {
+                if len >= bits_per_storage() {
+                    if storage != 0 {
+                        return false
+                    }
+                    len -= bits_per_storage();
+                } else {
+                    let mask = (1 << len) - 1;
+                    if storage & mask != 0 {
+                        return false
+                    }
+                    break
+                }
+            }
+            true
+        }
+    }
+
+    /// Returns true if all the bits in the vec are set to one/true.
+    pub fn all_true(&self) -> bool {
+        let mut len = self.len();
+        if len == 0 {
+            return true
+        }
+
+        if self.is_inline() {
+            let mask = !(inline_index(len - 1) - 1);
+            self.data & mask == mask
+        } else {
+            for &storage in self.buffer() {
+                if len >= bits_per_storage() {
+                    if storage != !0 {
+                        return false
+                    }
+                    len -= bits_per_storage();
+                } else {
+                    let mask = (1 << len) - 1;
+                    if storage & mask != mask {
+                        return false
+                    }
+                    break
+                }
+            }
+            true
+        }
+    }
+
+    /// Resize the vector to have capacity for at least `cap` bits.
+    ///
+    /// `cap` must be at least as large as the length of the vector.
+    fn reallocate(&mut self, cap: u32) {
+        let old_cap = self.capacity();
+        if cap <= old_cap {
+            return
+        }
+        assert!(self.len() <= cap);
+
+        if self.is_heap() {
+            let old_buffer_len = self.header().buffer_len as usize;
+            let new_buffer_len = buffer_len(cap);
+
+            let old_alloc_len = header_len() + old_buffer_len;
+            let new_alloc_len = header_len() + new_buffer_len;
+
+            let old_ptr = self.header_raw() as *mut Storage;
+            let mut v = unsafe {
+                Vec::from_raw_parts(old_ptr, old_alloc_len, old_alloc_len)
+            };
+            v.resize(new_alloc_len, 0);
+            v.shrink_to_fit();
+            self.data = v.as_ptr() as usize | HEAP_FLAG;
+            forget(v);
+
+            self.header_mut().buffer_len = new_buffer_len as u32;
+        } else {
+            let old_self = replace(self, SmallBitVec::with_capacity(cap));
+            unsafe {
+                self.set_len(old_self.len());
+                for i in 0..old_self.len() {
+                    self.set_unchecked(i, old_self.get_unchecked(i));
+                }
+            }
+        }
+    }
+
+    /// If the rightmost bit is set, then we treat it as inline storage.
+    fn is_inline(&self) -> bool {
+        self.data & HEAP_FLAG == 0
+    }
+
+    /// Otherwise, `data` is a pointer to a heap allocation.
+    fn is_heap(&self) -> bool {
+        !self.is_inline()
+    }
+
+    /// Get the header of a heap-allocated vector.
+    fn header_raw(&self) -> *mut Header {
+        assert!(self.is_heap());
+        (self.data & !HEAP_FLAG) as *mut Header
+    }
+
+    fn header_mut(&mut self) -> &mut Header {
+        unsafe { &mut *self.header_raw() }
+    }
+
+    fn header(&self) -> &Header {
+        unsafe { &*self.header_raw() }
+    }
+
+    /// Get the buffer of a heap-allocated vector.
+    fn buffer_raw(&self) -> *mut [Storage] {
+        unsafe {
+            let header_ptr = self.header_raw();
+            let buffer_len = (*header_ptr).buffer_len as usize;
+            let buffer_ptr = (header_ptr as *mut Storage)
+                .offset((size_of::<Header>() / size_of::<Storage>()) as isize);
+            slice::from_raw_parts_mut(buffer_ptr, buffer_len)
+        }
+    }
+
+    fn buffer_mut(&self) -> &mut [Storage] {
+        unsafe { &mut *self.buffer_raw() }
+    }
+
+    fn buffer(&self) -> &[Storage] {
+        unsafe { &*self.buffer_raw() }
+    }
+}
+
+// Trait implementations:
+
+impl fmt::Debug for SmallBitVec {
+    #[inline]
+    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+        fmt.debug_list().entries(self.iter().map(|b| b as u8)).finish()
+    }
+}
+
+impl PartialEq for SmallBitVec {
+    fn eq(&self, other: &Self) -> bool {
+        // Compare by inline representation
+        if self.is_inline() && other.is_inline() {
+            return self.data == other.data
+        }
+
+        let len = self.len();
+        if len != other.len() {
+            return false
+        }
+
+        // Compare by heap representation
+        if self.is_heap() && other.is_heap() {
+            let buf0 = self.buffer();
+            let buf1 = other.buffer();
+
+            let full_blocks = (len / bits_per_storage()) as usize;
+            let remainder = len % bits_per_storage();
+
+            if buf0[..full_blocks] != buf1[..full_blocks] {
+                return false
+            }
+
+            if remainder != 0 {
+                let mask = (1 << remainder) - 1;
+                if buf0[full_blocks] & mask != buf1[full_blocks] & mask {
+                    return false
+                }
+            }
+            return true
+        }
+
+        // Representations differ; fall back to bit-by-bit comparison
+        Iterator::eq(self.iter(), other.iter())
+    }
+}
+
+impl Eq for SmallBitVec {}
+
+impl Drop for SmallBitVec {
+    fn drop(&mut self) {
+        if self.is_heap() {
+            unsafe {
+                let header_ptr = self.header_raw();
+                let alloc_ptr = header_ptr as *mut Storage;
+                let alloc_len = header_len() + (*header_ptr).buffer_len as usize;
+                Vec::from_raw_parts(alloc_ptr, alloc_len, alloc_len);
+            }
+        }
+    }
+}
+
+impl Clone for SmallBitVec {
+    fn clone(&self) -> Self {
+        if self.is_inline() {
+            return SmallBitVec { data: self.data }
+        }
+
+        let buffer_len = self.header().buffer_len as usize;
+        let alloc_len = header_len() + buffer_len;
+        let ptr = self.header_raw() as *mut Storage;
+        let raw_allocation = unsafe {
+            slice::from_raw_parts(ptr, alloc_len)
+        };
+
+        let v = raw_allocation.to_vec();
+        let header_ptr = v.as_ptr() as *mut Header;
+        forget(v);
+        SmallBitVec {
+            data: (header_ptr as usize) | HEAP_FLAG
+        }
+    }
+}
+
+impl hash::Hash for SmallBitVec {
+    #[inline]
+    fn hash<H: hash::Hasher>(&self, state: &mut H) {
+        self.len().hash(state);
+        for b in self.iter() {
+            b.hash(state);
+        }
+    }
+}
+
+impl Extend<bool> for SmallBitVec {
+    #[inline]
+    fn extend<I: IntoIterator<Item=bool>>(&mut self, iter: I) {
+        let iter = iter.into_iter();
+
+        let (min, _) = iter.size_hint();
+        assert!(min <= u32::max_value() as usize, "capacity overflow");
+        self.reserve(min as u32);
+
+        for element in iter {
+            self.push(element)
+        }
+    }
+}
+
+impl FromIterator<bool> for SmallBitVec {
+    #[inline]
+    fn from_iter<I: IntoIterator<Item=bool>>(iter: I) -> Self {
+        let mut v = SmallBitVec::new();
+        v.extend(iter);
+        v
+    }
+}
+
+impl IntoIterator for SmallBitVec {
+    type Item = bool;
+    type IntoIter = IntoIter;
+
+    #[inline]
+    fn into_iter(self) -> IntoIter {
+        IntoIter { range: 0..self.len(), vec: self }
+    }
+}
+
+impl<'a> IntoIterator for &'a SmallBitVec {
+    type Item = bool;
+    type IntoIter = Iter<'a>;
+
+    #[inline]
+    fn into_iter(self) -> Iter<'a> {
+        self.iter()
+    }
+}
+
+/// An iterator that borrows a SmallBitVec and yields its bits as `bool` values.
+///
+/// Returned from [`SmallBitVec::into_iter`][1].
+///
+/// [1]: struct.SmallBitVec.html#method.into_iter
+pub struct IntoIter {
+    vec: SmallBitVec,
+    range: Range<u32>,
+}
+
+impl Iterator for IntoIter {
+    type Item = bool;
+
+    #[inline]
+    fn next(&mut self) -> Option<bool> {
+        self.range.next().map(|i| unsafe { self.vec.get_unchecked(i) })
+    }
+
+    #[inline]
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        self.range.size_hint()
+    }
+}
+
+impl DoubleEndedIterator for IntoIter {
+    #[inline]
+    fn next_back(&mut self) -> Option<bool> {
+        self.range.next_back().map(|i| unsafe { self.vec.get_unchecked(i) })
+    }
+}
+
+impl ExactSizeIterator for IntoIter {}
+
+/// An iterator that borrows a SmallBitVec and yields its bits as `bool` values.
+///
+/// Returned from [`SmallBitVec::iter`][1].
+///
+/// [1]: struct.SmallBitVec.html#method.iter
+pub struct Iter<'a> {
+    vec: &'a SmallBitVec,
+    range: Range<u32>,
+}
+
+impl<'a> Iterator for Iter<'a> {
+    type Item = bool;
+
+    #[inline]
+    fn next(&mut self) -> Option<bool> {
+        self.range.next().map(|i| unsafe { self.vec.get_unchecked(i) })
+    }
+
+    #[inline]
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        self.range.size_hint()
+    }
+}
+
+impl<'a> DoubleEndedIterator for Iter<'a> {
+    #[inline]
+    fn next_back(&mut self) -> Option<bool> {
+        self.range.next_back().map(|i| unsafe { self.vec.get_unchecked(i) })
+    }
+}
+
+impl<'a> ExactSizeIterator for Iter<'a> {}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    macro_rules! v {
+        ($elem:expr; $n:expr) => ({
+            SmallBitVec::from_elem($n, $elem)
+        });
+        ($($x:expr),*) => ({
+            [$($x),*].iter().cloned().collect::<SmallBitVec>()
+        });
+    }
+
+
+    #[cfg(target_pointer_width = "32")]
+    #[test]
+    fn test_inline_capacity() {
+        assert_eq!(inline_capacity(), 30);
+    }
+
+    #[cfg(target_pointer_width = "64")]
+    #[test]
+    fn test_inline_capacity() {
+        assert_eq!(inline_capacity(), 62);
+    }
+
+    #[test]
+    fn new() {
+        let v = SmallBitVec::new();
+        assert_eq!(v.len(), 0);
+        assert_eq!(v.capacity(), inline_capacity());
+        assert!(v.is_empty());
+        assert!(v.is_inline());
+    }
+
+    #[test]
+    fn with_capacity_inline() {
+        for cap in 0..(inline_capacity() + 1) {
+            let v = SmallBitVec::with_capacity(cap);
+            assert_eq!(v.len(), 0);
+            assert_eq!(v.capacity(), inline_capacity());
+            assert!(v.is_inline());
+        }
+    }
+
+    #[test]
+    fn with_capacity_heap() {
+        let cap = inline_capacity() + 1;
+        let v = SmallBitVec::with_capacity(cap);
+        assert_eq!(v.len(), 0);
+        assert!(v.capacity() > inline_capacity());
+        assert!(v.is_heap());
+    }
+
+    #[test]
+    fn set_len_inline() {
+        let mut v = SmallBitVec::new();
+        for i in 0..(inline_capacity() + 1) {
+            unsafe { v.set_len(i); }
+            assert_eq!(v.len(), i);
+        }
+        for i in (0..(inline_capacity() + 1)).rev() {
+            unsafe { v.set_len(i); }
+            assert_eq!(v.len(), i);
+        }
+    }
+
+    #[test]
+    fn set_len_heap() {
+        let mut v = SmallBitVec::with_capacity(500);
+        unsafe { v.set_len(30); }
+        assert_eq!(v.len(), 30);
+    }
+
+    #[test]
+    fn push_many() {
+        let mut v = SmallBitVec::new();
+        for i in 0..500 {
+            v.push(i % 3 == 0);
+        }
+        assert_eq!(v.len(), 500);
+
+        for i in 0..500 {
+            assert_eq!(v.get(i), (i % 3 == 0), "{}", i);
+        }
+    }
+
+    #[test]
+    #[should_panic]
+    fn get_out_of_bounds() {
+        let v = SmallBitVec::new();
+        v.get(0);
+    }
+
+    #[test]
+    #[should_panic]
+    fn set_out_of_bounds() {
+        let mut v = SmallBitVec::new();
+        v.set(2, false);
+    }
+
+    #[test]
+    fn all_false() {
+        let mut v = SmallBitVec::new();
+        assert!(v.all_false());
+        for _ in 0..100 {
+            v.push(false);
+            assert!(v.all_false());
+
+            let mut v2 = v.clone();
+            v2.push(true);
+            assert!(!v2.all_false());
+        }
+    }
+
+    #[test]
+    fn all_true() {
+        let mut v = SmallBitVec::new();
+        assert!(v.all_true());
+        for _ in 0..100 {
+            v.push(true);
+            assert!(v.all_true());
+
+            let mut v2 = v.clone();
+            v2.push(false);
+            assert!(!v2.all_true());
+        }
+    }
+
+    #[test]
+    fn iter() {
+        let mut v = SmallBitVec::new();
+        v.push(true);
+        v.push(false);
+        v.push(false);
+
+        let mut i = v.iter();
+        assert_eq!(i.next(), Some(true));
+        assert_eq!(i.next(), Some(false));
+        assert_eq!(i.next(), Some(false));
+        assert_eq!(i.next(), None);
+    }
+
+    #[test]
+    fn into_iter() {
+        let mut v = SmallBitVec::new();
+        v.push(true);
+        v.push(false);
+        v.push(false);
+
+        let mut i = v.into_iter();
+        assert_eq!(i.next(), Some(true));
+        assert_eq!(i.next(), Some(false));
+        assert_eq!(i.next(), Some(false));
+        assert_eq!(i.next(), None);
+    }
+
+    #[test]
+    fn iter_back() {
+        let mut v = SmallBitVec::new();
+        v.push(true);
+        v.push(false);
+        v.push(false);
+
+        let mut i = v.iter();
+        assert_eq!(i.next_back(), Some(false));
+        assert_eq!(i.next_back(), Some(false));
+        assert_eq!(i.next_back(), Some(true));
+        assert_eq!(i.next(), None);
+    }
+
+    #[test]
+    fn debug() {
+        let mut v = SmallBitVec::new();
+        v.push(true);
+        v.push(false);
+        v.push(false);
+
+        assert_eq!(format!("{:?}", v), "[1, 0, 0]")
+    }
+
+    #[test]
+    fn from_elem() {
+        for len in 0..100 {
+            let ones = SmallBitVec::from_elem(len, true);
+            assert_eq!(ones.len(), len);
+            assert!(ones.all_true());
+
+            let zeros = SmallBitVec::from_elem(len, false);
+            assert_eq!(zeros.len(), len);
+            assert!(zeros.all_false());
+        }
+    }
+
+    #[test]
+    fn remove() {
+        let mut v = SmallBitVec::new();
+        v.push(false);
+        v.push(true);
+        v.push(false);
+        v.push(false);
+        v.push(true);
+
+        v.remove(1);
+        assert_eq!(format!("{:?}", v), "[0, 0, 0, 1]")
+    }
+
+    #[test]
+    fn eq() {
+        assert_eq!(v![], v![]);
+        assert_eq!(v![true], v![true]);
+        assert_eq!(v![false], v![false]);
+
+        assert_ne!(v![], v![false]);
+        assert_ne!(v![true], v![]);
+        assert_ne!(v![true], v![false]);
+        assert_ne!(v![false], v![true]);
+
+        assert_eq!(v![true, false], v![true, false]);
+        assert_eq!(v![true; 400], v![true; 400]);
+        assert_eq!(v![false; 400], v![false; 400]);
+
+        assert_ne!(v![true, false], v![true, true]);
+        assert_ne!(v![true; 400], v![true; 401]);
+        assert_ne!(v![false; 401], v![false; 400]);
+    }
+}
--- a/toolkit/library/gtest/rust/Cargo.lock
+++ b/toolkit/library/gtest/rust/Cargo.lock
@@ -1188,16 +1188,21 @@ version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "slab"
 version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
+name = "smallbitvec"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
 name = "smallvec"
 version = "0.4.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "stable_deref_trait"
 version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1211,17 +1216,16 @@ source = "registry+https://github.com/ru
 name = "style"
 version = "0.0.1"
 dependencies = [
  "app_units 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "arraydeque 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "arrayvec 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bindgen 0.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "bit-vec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "fallible 0.0.1",
  "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "hashglobe 0.1.0",
@@ -1239,16 +1243,17 @@ dependencies = [
  "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "parking_lot 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "pdqsort 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "precomputed-hash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "rayon 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.19.0",
  "servo_arc 0.0.1",
+ "smallbitvec 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "style_derive 0.0.1",
  "style_traits 0.0.1",
  "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
  "toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1671,16 +1676,17 @@ dependencies = [
 "checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537"
 "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
 "checksum serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f530d36fb84ec48fb7146936881f026cdbf4892028835fd9398475f82c1bb4"
 "checksum serde_derive 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "10552fad5500771f3902d0c5ba187c5881942b811b7ba0d8fbbfbf84d80806d3"
 "checksum serde_derive_internals 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37aee4e0da52d801acfbc0cc219eb1eda7142112339726e427926a6f6ee65d3a"
 "checksum simd 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a94d14a2ae1f1f110937de5fb69e494372560181c7e1739a097fcc2cee37ba0"
 "checksum siphasher 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ffc669b726f2bc9a3bcff66e5e23b56ba6bf70e22a34c3d7b6d0b3450b65b84"
 "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23"
+"checksum smallbitvec 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c1ebf4681dc284c22efb7248986bbdf8aa23c2749ea85a0107e0e787038d303e"
 "checksum smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8fcd03faf178110ab0334d74ca9631d77f94c8c11cc77fcb59538abf0025695d"
 "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
 "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
 "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
 "checksum synom 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "27e31aa4b09b9f4cb12dff3c30ba503e17b1a624413d764d32dab76e3920e5bc"
 "checksum synstructure 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cf318c34a2f8381a4f3d4db2c91b45bca2b1cd8cbe56caced900647be164800c"
 "checksum syntex 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a8f5e3aaa79319573d19938ea38d068056b826db9883a5d47f86c1cecc688f0e"
 "checksum syntex_errors 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "867cc5c2d7140ae7eaad2ae9e8bf39cb18a67ca651b7834f88d46ca98faadb9c"
--- a/toolkit/library/rust/Cargo.lock
+++ b/toolkit/library/rust/Cargo.lock
@@ -1175,16 +1175,21 @@ version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "slab"
 version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
+name = "smallbitvec"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
 name = "smallvec"
 version = "0.4.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "stable_deref_trait"
 version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1198,17 +1203,16 @@ source = "registry+https://github.com/ru
 name = "style"
 version = "0.0.1"
 dependencies = [
  "app_units 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "arraydeque 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "arrayvec 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bindgen 0.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "bit-vec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cssparser 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "fallible 0.0.1",
  "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "hashglobe 0.1.0",
@@ -1226,16 +1230,17 @@ dependencies = [
  "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "parking_lot 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "pdqsort 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "precomputed-hash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "rayon 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.19.0",
  "servo_arc 0.0.1",
+ "smallbitvec 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "style_derive 0.0.1",
  "style_traits 0.0.1",
  "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
  "toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1658,16 +1663,17 @@ dependencies = [
 "checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537"
 "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
 "checksum serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f530d36fb84ec48fb7146936881f026cdbf4892028835fd9398475f82c1bb4"
 "checksum serde_derive 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "10552fad5500771f3902d0c5ba187c5881942b811b7ba0d8fbbfbf84d80806d3"
 "checksum serde_derive_internals 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37aee4e0da52d801acfbc0cc219eb1eda7142112339726e427926a6f6ee65d3a"
 "checksum simd 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a94d14a2ae1f1f110937de5fb69e494372560181c7e1739a097fcc2cee37ba0"
 "checksum siphasher 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ffc669b726f2bc9a3bcff66e5e23b56ba6bf70e22a34c3d7b6d0b3450b65b84"
 "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23"
+"checksum smallbitvec 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c1ebf4681dc284c22efb7248986bbdf8aa23c2749ea85a0107e0e787038d303e"
 "checksum smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8fcd03faf178110ab0334d74ca9631d77f94c8c11cc77fcb59538abf0025695d"
 "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b"
 "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
 "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
 "checksum synom 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "27e31aa4b09b9f4cb12dff3c30ba503e17b1a624413d764d32dab76e3920e5bc"
 "checksum synstructure 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cf318c34a2f8381a4f3d4db2c91b45bca2b1cd8cbe56caced900647be164800c"
 "checksum syntex 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a8f5e3aaa79319573d19938ea38d068056b826db9883a5d47f86c1cecc688f0e"
 "checksum syntex_errors 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "867cc5c2d7140ae7eaad2ae9e8bf39cb18a67ca651b7834f88d46ca98faadb9c"