From fec12865ca8d58aba118d4430f5e2ce11e9a794c Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Fri, 7 Sep 2018 21:08:32 +0300 Subject: [PATCH] Add bounds to type aliases (needed by rust-lang/rust#54033). --- src/unify/backing_vec.rs | 3 ++- src/unify/mod.rs | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/unify/backing_vec.rs b/src/unify/backing_vec.rs index 5423a31..f1e720c 100644 --- a/src/unify/backing_vec.rs +++ b/src/unify/backing_vec.rs @@ -7,7 +7,8 @@ use std::marker::PhantomData; use super::{VarValue, UnifyKey, UnifyValue}; #[allow(dead_code)] // rustc BUG -type Key = ::Key; +#[allow(type_alias_bounds)] +type Key = ::Key; /// Largely internal trait implemented by the unification table /// backing store types. The most common such type is `InPlace`, diff --git a/src/unify/mod.rs b/src/unify/mod.rs index be168c4..d8e871a 100644 --- a/src/unify/mod.rs +++ b/src/unify/mod.rs @@ -181,11 +181,13 @@ pub struct UnificationTable { } /// A unification table that uses an "in-place" vector. -pub type InPlaceUnificationTable = UnificationTable>; +#[allow(type_alias_bounds)] +pub type InPlaceUnificationTable = UnificationTable>; /// A unification table that uses a "persistent" vector. #[cfg(feature = "persistent")] -pub type PersistentUnificationTable = UnificationTable>; +#[allow(type_alias_bounds)] +pub type PersistentUnificationTable = UnificationTable>; /// At any time, users may snapshot a unification table. The changes /// made during the snapshot may either be *committed* or *rolled back*.