diff --git a/src/librustc/infer/type_variable.rs b/src/librustc/infer/type_variable.rs index 8ea1b705d44..f391a054a2a 100644 --- a/src/librustc/infer/type_variable.rs +++ b/src/librustc/infer/type_variable.rs @@ -453,18 +453,3 @@ impl<'tcx> ut::UnifyValue for TypeVariableValue<'tcx> { } } } - -/// Raw `TyVid` are used as the unification key for `sub_relations`; -/// they carry no values. -impl ut::UnifyKey for ty::TyVid { - type Value = (); - fn index(&self) -> u32 { - self.index - } - fn from_index(i: u32) -> ty::TyVid { - ty::TyVid { index: i } - } - fn tag() -> &'static str { - "TyVid" - } -} diff --git a/src/librustc/infer/unify_key.rs b/src/librustc/infer/unify_key.rs index c5ec0ba73e4..d88188538fc 100644 --- a/src/librustc/infer/unify_key.rs +++ b/src/librustc/infer/unify_key.rs @@ -12,6 +12,21 @@ pub trait ToType { fn to_type<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Ty<'tcx>; } +/// Raw `TyVid` are used as the unification key for `sub_relations`; +/// they carry no values. +impl UnifyKey for ty::TyVid { + type Value = (); + fn index(&self) -> u32 { + self.index + } + fn from_index(i: u32) -> ty::TyVid { + ty::TyVid { index: i } + } + fn tag() -> &'static str { + "TyVid" + } +} + impl UnifyKey for ty::IntVid { type Value = Option; fn index(&self) -> u32 {