@@ -2,12 +2,13 @@ use std::fmt;
22use std:: ops:: Deref ;
33
44use derive_where:: derive_where;
5+ // We *would* normally import these through `rustc_data_structures`, but external
6+ // users (i.e. rust-analyzer) may need the impls for these traits.
7+ use ena:: unify:: { NoError , UnifyKey , UnifyValue } ;
58use rustc_ast_ir:: Mutability ;
69#[ cfg( feature = "nightly" ) ]
710use rustc_data_structures:: stable_hasher:: { HashStable , StableHasher } ;
811#[ cfg( feature = "nightly" ) ]
9- use rustc_data_structures:: unify:: { NoError , UnifyKey , UnifyValue } ;
10- #[ cfg( feature = "nightly" ) ]
1112use rustc_macros:: { Decodable_NoContext , Encodable_NoContext , HashStable_NoContext } ;
1213use rustc_type_ir_macros:: { Lift_Generic , TypeFoldable_Generic , TypeVisitable_Generic } ;
1314
@@ -796,7 +797,6 @@ pub enum InferTy {
796797
797798/// Raw `TyVid` are used as the unification key for `sub_relations`;
798799/// they carry no values.
799- #[ cfg( feature = "nightly" ) ]
800800impl UnifyKey for TyVid {
801801 type Value = ( ) ;
802802 #[ inline]
@@ -812,7 +812,6 @@ impl UnifyKey for TyVid {
812812 }
813813}
814814
815- #[ cfg( feature = "nightly" ) ]
816815impl UnifyValue for IntVarValue {
817816 type Error = NoError ;
818817
@@ -832,7 +831,6 @@ impl UnifyValue for IntVarValue {
832831 }
833832}
834833
835- #[ cfg( feature = "nightly" ) ]
836834impl UnifyKey for IntVid {
837835 type Value = IntVarValue ;
838836 #[ inline] // make this function eligible for inlining - it is quite hot.
@@ -848,7 +846,6 @@ impl UnifyKey for IntVid {
848846 }
849847}
850848
851- #[ cfg( feature = "nightly" ) ]
852849impl UnifyValue for FloatVarValue {
853850 type Error = NoError ;
854851
@@ -866,7 +863,6 @@ impl UnifyValue for FloatVarValue {
866863 }
867864}
868865
869- #[ cfg( feature = "nightly" ) ]
870866impl UnifyKey for FloatVid {
871867 type Value = FloatVarValue ;
872868 #[ inline]
0 commit comments