diff --git a/src/librustc/infer/canonical/mod.rs b/src/librustc/infer/canonical/mod.rs index f60ae20827a5..6af8fee66315 100644 --- a/src/librustc/infer/canonical/mod.rs +++ b/src/librustc/infer/canonical/mod.rs @@ -348,7 +348,6 @@ impl<'tcx> Index for CanonicalVarValues<'tcx> { impl<'gcx: 'tcx, 'tcx, T> Canonicalize<'gcx, 'tcx> for QueryResult<'tcx, T> where T: TypeFoldable<'tcx> + Lift<'gcx>, - T::Lifted: Debug, { // we ought to intern this, but I'm too lazy just now type Canonicalized = Lrc>>; diff --git a/src/librustc/infer/canonical/query_result.rs b/src/librustc/infer/canonical/query_result.rs index ab8fb519afd9..d61434daf993 100644 --- a/src/librustc/infer/canonical/query_result.rs +++ b/src/librustc/infer/canonical/query_result.rs @@ -63,7 +63,6 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> { ) -> Result, NoSolution> where T: Debug + Lift<'gcx> + TypeFoldable<'tcx>, - T::Lifted: Debug, { let query_result = self.make_query_result(inference_vars, answer, fulfill_cx)?; let (canonical_result, _) = self.canonicalize_response(&query_result); diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index 6cbf4fad02cb..111167cfc109 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -64,6 +64,7 @@ use std::borrow::Borrow; use std::cmp::Ordering; use std::collections::hash_map::{self, Entry}; use std::hash::{Hash, Hasher}; +use std::fmt::Debug; use std::mem; use std::ops::Deref; use std::iter; @@ -1503,8 +1504,8 @@ impl<'gcx: 'tcx, 'tcx> GlobalCtxt<'gcx> { /// contain the TypeVariants key or if the address of the interned /// pointer differs. The latter case is possible if a primitive type, /// e.g. `()` or `u8`, was interned in a different context. -pub trait Lift<'tcx> { - type Lifted: 'tcx; +pub trait Lift<'tcx>: Debug { + type Lifted: Debug + 'tcx; fn lift_to_tcx<'a, 'gcx>(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> Option; }