@@ -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 ;
@@ -316,7 +316,7 @@ impl<T> Trait<T> for X {
316316 {
317317 let mut has_matching_impl = false ;
318318 tcx. for_each_relevant_impl ( def_id, values. found , |did| {
319- if DeepRejectCtxt :: new ( tcx, TreatParams :: ForLookup )
319+ if DeepRejectCtxt :: relate_rigid_infer ( tcx)
320320 . types_may_unify ( values. found , tcx. type_of ( did) . skip_binder ( ) )
321321 {
322322 has_matching_impl = true ;
@@ -337,7 +337,7 @@ impl<T> Trait<T> for X {
337337 {
338338 let mut has_matching_impl = false ;
339339 tcx. for_each_relevant_impl ( def_id, values. expected , |did| {
340- if DeepRejectCtxt :: new ( tcx, TreatParams :: ForLookup )
340+ if DeepRejectCtxt :: relate_rigid_infer ( tcx)
341341 . types_may_unify ( values. expected , tcx. type_of ( did) . skip_binder ( ) )
342342 {
343343 has_matching_impl = true ;
@@ -357,7 +357,7 @@ impl<T> Trait<T> for X {
357357 {
358358 let mut has_matching_impl = false ;
359359 tcx. for_each_relevant_impl ( def_id, values. found , |did| {
360- if DeepRejectCtxt :: new ( tcx, TreatParams :: ForLookup )
360+ if DeepRejectCtxt :: relate_rigid_infer ( tcx)
361361 . types_may_unify ( values. found , tcx. type_of ( did) . skip_binder ( ) )
362362 {
363363 has_matching_impl = true ;
0 commit comments