@@ -4,7 +4,7 @@ use rustc_hir as hir;
44use rustc_hir:: def:: DefKind ;
55use rustc_middle:: traits:: { ObligationCause , ObligationCauseCode } ;
66use rustc_middle:: ty:: error:: { ExpectedFound , TypeError } ;
7- use rustc_middle:: ty:: fast_reject:: { DeepRejectCtxt , TreatParams } ;
7+ use rustc_middle:: ty:: fast_reject:: DeepRejectCtxt ;
88use rustc_middle:: ty:: print:: { FmtPrinter , Printer } ;
99use rustc_middle:: ty:: { self , suggest_constraining_type_param, Ty } ;
1010use rustc_span:: def_id:: DefId ;
@@ -317,7 +317,7 @@ impl<T> Trait<T> for X {
317317 {
318318 let mut has_matching_impl = false ;
319319 tcx. for_each_relevant_impl ( def_id, values. found , |did| {
320- if DeepRejectCtxt :: new ( tcx, TreatParams :: ForLookup )
320+ if DeepRejectCtxt :: relate_rigid_infer ( tcx)
321321 . types_may_unify ( values. found , tcx. type_of ( did) . skip_binder ( ) )
322322 {
323323 has_matching_impl = true ;
@@ -338,7 +338,7 @@ impl<T> Trait<T> for X {
338338 {
339339 let mut has_matching_impl = false ;
340340 tcx. for_each_relevant_impl ( def_id, values. expected , |did| {
341- if DeepRejectCtxt :: new ( tcx, TreatParams :: ForLookup )
341+ if DeepRejectCtxt :: relate_rigid_infer ( tcx)
342342 . types_may_unify ( values. expected , tcx. type_of ( did) . skip_binder ( ) )
343343 {
344344 has_matching_impl = true ;
@@ -358,7 +358,7 @@ impl<T> Trait<T> for X {
358358 {
359359 let mut has_matching_impl = false ;
360360 tcx. for_each_relevant_impl ( def_id, values. found , |did| {
361- if DeepRejectCtxt :: new ( tcx, TreatParams :: ForLookup )
361+ if DeepRejectCtxt :: relate_rigid_infer ( tcx)
362362 . types_may_unify ( values. found , tcx. type_of ( did) . skip_binder ( ) )
363363 {
364364 has_matching_impl = true ;
0 commit comments