@@ -37,7 +37,7 @@ use crate::traits::{Obligation, PredicateObligations};
37
37
use rustc_data_structures:: sso:: SsoHashMap ;
38
38
use rustc_hir:: def_id:: DefId ;
39
39
use rustc_middle:: traits:: ObligationCause ;
40
- use rustc_middle:: ty:: error:: TypeError ;
40
+ use rustc_middle:: ty:: error:: { ExpectedFound , TypeError } ;
41
41
use rustc_middle:: ty:: relate:: { self , Relate , RelateResult , TypeRelation } ;
42
42
use rustc_middle:: ty:: subst:: SubstsRef ;
43
43
use rustc_middle:: ty:: { self , InferConst , ToPredicate , Ty , TyCtxt , TypeFoldable } ;
@@ -790,23 +790,23 @@ pub fn const_unification_error<'tcx>(
790
790
a_is_expected : bool ,
791
791
( a, b) : ( & ' tcx ty:: Const < ' tcx > , & ' tcx ty:: Const < ' tcx > ) ,
792
792
) -> TypeError < ' tcx > {
793
- TypeError :: ConstMismatch ( ty :: relate :: expected_found_bool ( a_is_expected, a, b) )
793
+ TypeError :: ConstMismatch ( ExpectedFound :: new ( a_is_expected, a, b) )
794
794
}
795
795
796
796
fn int_unification_error < ' tcx > (
797
797
a_is_expected : bool ,
798
798
v : ( ty:: IntVarValue , ty:: IntVarValue ) ,
799
799
) -> TypeError < ' tcx > {
800
800
let ( a, b) = v;
801
- TypeError :: IntMismatch ( ty :: relate :: expected_found_bool ( a_is_expected, a, b) )
801
+ TypeError :: IntMismatch ( ExpectedFound :: new ( a_is_expected, a, b) )
802
802
}
803
803
804
804
fn float_unification_error < ' tcx > (
805
805
a_is_expected : bool ,
806
806
v : ( ty:: FloatVarValue , ty:: FloatVarValue ) ,
807
807
) -> TypeError < ' tcx > {
808
808
let ( ty:: FloatVarValue ( a) , ty:: FloatVarValue ( b) ) = v;
809
- TypeError :: FloatMismatch ( ty :: relate :: expected_found_bool ( a_is_expected, a, b) )
809
+ TypeError :: FloatMismatch ( ExpectedFound :: new ( a_is_expected, a, b) )
810
810
}
811
811
812
812
struct ConstInferUnifier < ' cx , ' tcx > {
0 commit comments