@@ -4,7 +4,7 @@ use rustc_hir as hir;
4
4
use rustc_hir:: def:: DefKind ;
5
5
use rustc_middle:: traits:: { ObligationCause , ObligationCauseCode } ;
6
6
use rustc_middle:: ty:: error:: { ExpectedFound , TypeError } ;
7
- use rustc_middle:: ty:: fast_reject:: { DeepRejectCtxt , TreatParams } ;
7
+ use rustc_middle:: ty:: fast_reject:: DeepRejectCtxt ;
8
8
use rustc_middle:: ty:: print:: { FmtPrinter , Printer } ;
9
9
use rustc_middle:: ty:: { self , suggest_constraining_type_param, Ty } ;
10
10
use rustc_span:: def_id:: DefId ;
@@ -316,7 +316,7 @@ impl<T> Trait<T> for X {
316
316
{
317
317
let mut has_matching_impl = false ;
318
318
tcx. for_each_relevant_impl ( def_id, values. found , |did| {
319
- if DeepRejectCtxt :: new ( tcx, TreatParams :: ForLookup )
319
+ if DeepRejectCtxt :: relate_rigid_infer ( tcx)
320
320
. types_may_unify ( values. found , tcx. type_of ( did) . skip_binder ( ) )
321
321
{
322
322
has_matching_impl = true ;
@@ -337,7 +337,7 @@ impl<T> Trait<T> for X {
337
337
{
338
338
let mut has_matching_impl = false ;
339
339
tcx. for_each_relevant_impl ( def_id, values. expected , |did| {
340
- if DeepRejectCtxt :: new ( tcx, TreatParams :: ForLookup )
340
+ if DeepRejectCtxt :: relate_rigid_infer ( tcx)
341
341
. types_may_unify ( values. expected , tcx. type_of ( did) . skip_binder ( ) )
342
342
{
343
343
has_matching_impl = true ;
@@ -357,7 +357,7 @@ impl<T> Trait<T> for X {
357
357
{
358
358
let mut has_matching_impl = false ;
359
359
tcx. for_each_relevant_impl ( def_id, values. found , |did| {
360
- if DeepRejectCtxt :: new ( tcx, TreatParams :: ForLookup )
360
+ if DeepRejectCtxt :: relate_rigid_infer ( tcx)
361
361
. types_may_unify ( values. found , tcx. type_of ( did) . skip_binder ( ) )
362
362
{
363
363
has_matching_impl = true ;
0 commit comments