@@ -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 ;
@@ -317,7 +317,7 @@ impl<T> Trait<T> for X {
317
317
{
318
318
let mut has_matching_impl = false ;
319
319
tcx. for_each_relevant_impl ( def_id, values. found , |did| {
320
- if DeepRejectCtxt :: new ( tcx, TreatParams :: ForLookup )
320
+ if DeepRejectCtxt :: relate_rigid_infer ( tcx)
321
321
. types_may_unify ( values. found , tcx. type_of ( did) . skip_binder ( ) )
322
322
{
323
323
has_matching_impl = true ;
@@ -338,7 +338,7 @@ impl<T> Trait<T> for X {
338
338
{
339
339
let mut has_matching_impl = false ;
340
340
tcx. for_each_relevant_impl ( def_id, values. expected , |did| {
341
- if DeepRejectCtxt :: new ( tcx, TreatParams :: ForLookup )
341
+ if DeepRejectCtxt :: relate_rigid_infer ( tcx)
342
342
. types_may_unify ( values. expected , tcx. type_of ( did) . skip_binder ( ) )
343
343
{
344
344
has_matching_impl = true ;
@@ -358,7 +358,7 @@ impl<T> Trait<T> for X {
358
358
{
359
359
let mut has_matching_impl = false ;
360
360
tcx. for_each_relevant_impl ( def_id, values. found , |did| {
361
- if DeepRejectCtxt :: new ( tcx, TreatParams :: ForLookup )
361
+ if DeepRejectCtxt :: relate_rigid_infer ( tcx)
362
362
. types_may_unify ( values. found , tcx. type_of ( did) . skip_binder ( ) )
363
363
{
364
364
has_matching_impl = true ;
0 commit comments