Skip to content

Commit 2a39fb2

Browse files
committed
Replace two uses of old_defining_use_anchor with error
They were already `Error` at all use sites
1 parent c7c4f24 commit 2a39fb2

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

compiler/rustc_hir_analysis/src/check/compare_impl_item.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,6 @@ fn compare_method_predicate_entailment<'tcx>(
238238
// type.
239239

240240
// Compute placeholder form of impl and trait method tys.
241-
let tcx = infcx.tcx;
242-
243241
let mut wf_tys = FxIndexSet::default();
244242

245243
let unnormalized_impl_sig = infcx.instantiate_binder_with_fresh_vars(

compiler/rustc_trait_selection/src/traits/coherence.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ fn resolve_negative_obligation<'tcx>(
376376
};
377377

378378
let param_env = o.param_env;
379-
if !super::fully_solve_obligation(&infcx, o, infcx.old_defining_use_anchor).is_empty() {
379+
if !super::fully_solve_obligation(&infcx, o, DefiningAnchor::Error).is_empty() {
380380
return false;
381381
}
382382

compiler/rustc_trait_selection/src/traits/outlives_bounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl<'a, 'tcx: 'a> InferCtxtExt<'a, 'tcx> for InferCtxt<'tcx> {
8383
param_env,
8484
)
8585
}),
86-
self.old_defining_use_anchor,
86+
rustc_infer::infer::DefiningAnchor::Error,
8787
);
8888
if !constraints.member_constraints.is_empty() {
8989
span_bug!(span, "{:#?}", constraints.member_constraints);

0 commit comments

Comments
 (0)