summaryrefslogtreecommitdiffstats
path: root/vendor/ena
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ena')
-rw-r--r--vendor/ena/.cargo-checksum.json2
-rw-r--r--vendor/ena/Cargo.toml23
-rw-r--r--vendor/ena/README.md2
-rw-r--r--vendor/ena/src/unify/mod.rs24
4 files changed, 21 insertions, 30 deletions
diff --git a/vendor/ena/.cargo-checksum.json b/vendor/ena/.cargo-checksum.json
index 246be2f1d..cce0ccf73 100644
--- a/vendor/ena/.cargo-checksum.json
+++ b/vendor/ena/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"9cc278873c11103275c22c025d2170754767dc30ae109ddafd60b881b7d5a64b","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"c623c5a776782edc92b00e4934bd50b7754a861dc6cad02ee4c2a87f946a542f","measurements.txt":"b209f98f2bc696904a48829e86952f4f09b59e4e685f7c12087c59d05ed31829","src/bitvec.rs":"c6c66c348776ff480b7ff6e4a3e0f64554a4194266f614408b45b5e3c324ec0a","src/lib.rs":"9b94637cb53e882625d3fb714acac37bb5fe7762d2a583ad4fd43f276f849214","src/snapshot_vec.rs":"b9fce507e3eece42c742405aea870562f99fdea3a4e30a122cea64ef5634f197","src/undo_log.rs":"5c94971d95ae1dd2de04eae2ea1ec5b99c627fbe92b2ea40a4fa3c37d340e7b8","src/unify/backing_vec.rs":"97cc2cec917ad87bb59b9f08ab3e081758ab5632d4a2e35621ba68c175ab10e5","src/unify/mod.rs":"bffe4e412b7624cf67efb64e75ecb3f537050080c8aefa69e354c2d774906976","src/unify/tests.rs":"6ffe2de338f1c8014292fdc7e764451c7af3de344fd405a46b818447304bdd23","tests/external_undo_log.rs":"215645f44d90b22b6ff07f72157b285e9cc277b856c31a0b82526b1534bef240"},"package":"d7402b94a93c24e742487327a7cd839dc9d36fec9de9fb25b09f2dae459f36c3"} \ No newline at end of file
+{"files":{"Cargo.toml":"820aad545a6df3f8e1c17d0f4d3b9ad97b90c4d307dd7df17e4c375d378efcb2","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"1c15c9176a442a293a7fe046172e316f95b3acca6c01ee495162d4bc57e6841b","measurements.txt":"b209f98f2bc696904a48829e86952f4f09b59e4e685f7c12087c59d05ed31829","src/bitvec.rs":"c6c66c348776ff480b7ff6e4a3e0f64554a4194266f614408b45b5e3c324ec0a","src/lib.rs":"9b94637cb53e882625d3fb714acac37bb5fe7762d2a583ad4fd43f276f849214","src/snapshot_vec.rs":"b9fce507e3eece42c742405aea870562f99fdea3a4e30a122cea64ef5634f197","src/undo_log.rs":"5c94971d95ae1dd2de04eae2ea1ec5b99c627fbe92b2ea40a4fa3c37d340e7b8","src/unify/backing_vec.rs":"97cc2cec917ad87bb59b9f08ab3e081758ab5632d4a2e35621ba68c175ab10e5","src/unify/mod.rs":"986c502c11d0c921ef78916b0ccf17ffd18c5baf6e807be1295b237a2d3d87a1","src/unify/tests.rs":"6ffe2de338f1c8014292fdc7e764451c7af3de344fd405a46b818447304bdd23","tests/external_undo_log.rs":"215645f44d90b22b6ff07f72157b285e9cc277b856c31a0b82526b1534bef240"},"package":"b2e5d13ca2353ab7d0230988629def93914a8c4015f621f9b13ed2955614731d"} \ No newline at end of file
diff --git a/vendor/ena/Cargo.toml b/vendor/ena/Cargo.toml
index 620558398..d19260c80 100644
--- a/vendor/ena/Cargo.toml
+++ b/vendor/ena/Cargo.toml
@@ -3,23 +3,26 @@
# 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
+# 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)
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
[package]
name = "ena"
-version = "0.14.0"
+version = "0.14.1"
authors = ["Niko Matsakis <niko@alum.mit.edu>"]
description = "Union-find, congruence closure, and other unification code. Based on code from rustc."
-homepage = "https://github.com/rust-lang-nursery/ena"
+homepage = "https://github.com/rust-lang/ena"
readme = "README.md"
-keywords = ["unification", "union-find"]
-license = "MIT/Apache-2.0"
-repository = "https://github.com/rust-lang-nursery/ena"
+keywords = [
+ "unification",
+ "union-find",
+]
+license = "MIT OR Apache-2.0"
+repository = "https://github.com/rust-lang/ena"
+
[dependencies.dogged]
version = "0.2.0"
optional = true
diff --git a/vendor/ena/README.md b/vendor/ena/README.md
index afa6567c6..416598ba3 100644
--- a/vendor/ena/README.md
+++ b/vendor/ena/README.md
@@ -1,4 +1,4 @@
-[![Build Status](https://travis-ci.com/rust-lang-nursery/ena.svg?branch=master)](https://travis-ci.com/rust-lang-nursery/ena)
+[![Build Status](https://travis-ci.org/rust-lang/ena.svg?branch=master)](https://travis-ci.org/rust-lang/ena)
An implementation of union-find in Rust; extracted from (and used by)
rustc.
diff --git a/vendor/ena/src/unify/mod.rs b/vendor/ena/src/unify/mod.rs
index a26d699d8..5377177be 100644
--- a/vendor/ena/src/unify/mod.rs
+++ b/vendor/ena/src/unify/mod.rs
@@ -230,19 +230,8 @@ impl<K: UnifyKey> VarValue<K> {
self.rank = rank;
self.value = value;
}
-
- fn parent(&self, self_key: K) -> Option<K> {
- self.if_not_self(self.parent, self_key)
- }
-
- fn if_not_self(&self, key: K, self_key: K) -> Option<K> {
- if key == self_key {
- None
- } else {
- Some(key)
- }
- }
}
+
impl<K> UnificationTableStorage<K>
where
K: UnifyKey,
@@ -358,13 +347,12 @@ impl<S: UnificationStoreMut> UnificationTable<S> {
/// callsites. `uninlined_get_root_key` is the never-inlined version.
#[inline(always)]
fn inlined_get_root_key(&mut self, vid: S::Key) -> S::Key {
- let redirect = {
- match self.value(vid).parent(vid) {
- None => return vid,
- Some(redirect) => redirect,
- }
- };
+ let v = self.value(vid);
+ if v.parent == vid {
+ return vid;
+ }
+ let redirect = v.parent;
let root_key: S::Key = self.uninlined_get_root_key(redirect);
if root_key != redirect {
// Path compression