@@ -96,7 +96,7 @@ pub fn overlapping_impls(
96
96
}
97
97
98
98
let infcx = tcx. infer_ctxt ( ) . intercrate ( ) . build ( ) ;
99
- let selcx = & mut SelectionContext :: new ( & infcx) ;
99
+ let selcx = & mut SelectionContext :: new ( & infcx, DefiningAnchor :: Error ) ;
100
100
let overlaps =
101
101
overlap ( selcx, skip_leak_check, impl1_def_id, impl2_def_id, overlap_mode) . is_some ( ) ;
102
102
if !overlaps {
@@ -107,7 +107,7 @@ pub fn overlapping_impls(
107
107
// this time tracking intercrate ambiguity causes for better
108
108
// diagnostics. (These take time and can lead to false errors.)
109
109
let infcx = tcx. infer_ctxt ( ) . intercrate ( ) . build ( ) ;
110
- let selcx = & mut SelectionContext :: new ( & infcx) ;
110
+ let selcx = & mut SelectionContext :: new ( & infcx, DefiningAnchor :: Error ) ;
111
111
selcx. enable_tracking_intercrate_ambiguity_causes ( ) ;
112
112
Some ( overlap ( selcx, skip_leak_check, impl1_def_id, impl2_def_id, overlap_mode) . unwrap ( ) )
113
113
}
@@ -305,7 +305,7 @@ fn negative_impl(tcx: TyCtxt<'_>, impl1_def_id: DefId, impl2_def_id: DefId) -> b
305
305
} ;
306
306
307
307
// Attempt to prove that impl2 applies, given all of the above.
308
- let selcx = & mut SelectionContext :: new ( & infcx) ;
308
+ let selcx = & mut SelectionContext :: new ( & infcx, DefiningAnchor :: Error ) ;
309
309
let impl2_substs = infcx. fresh_substs_for_item ( DUMMY_SP , impl2_def_id) ;
310
310
let ( subject2, obligations) =
311
311
impl_subject_and_oblig ( selcx, impl_env, impl2_def_id, impl2_substs) ;
0 commit comments