move Debug bounds onto Lift
Just for convenience.
This commit is contained in:
parent
be27a5a775
commit
21592cdecd
3 changed files with 3 additions and 4 deletions
|
|
@ -348,7 +348,6 @@ impl<'tcx> Index<CanonicalVar> 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<Canonical<'gcx, QueryResult<'gcx, T::Lifted>>>;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ impl<'cx, 'gcx, 'tcx> InferCtxt<'cx, 'gcx, 'tcx> {
|
|||
) -> Result<CanonicalizedQueryResult<'gcx, T>, 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);
|
||||
|
|
|
|||
|
|
@ -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<Self::Lifted>;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue