Skip to content

Commit 10d0800

Browse files
Use queryfied impossible preds
1 parent 3b9adbe commit 10d0800

File tree

1 file changed

+1
-5
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+1
-5
lines changed

compiler/rustc_trait_selection/src/traits/vtable.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,7 @@ fn vtable_entries<'tcx>(
276276
// do not hold for this particular set of type parameters.
277277
// Note that this method could then never be called, so we
278278
// do not want to try and codegen it, in that case (see #23435).
279-
let predicates = tcx.predicates_of(def_id).instantiate_own(tcx, args);
280-
if impossible_predicates(
281-
tcx,
282-
predicates.map(|(predicate, _)| predicate).collect(),
283-
) {
279+
if tcx.instantiate_and_check_impossible_predicates((def_id, args)) {
284280
debug!("vtable_entries: predicates do not hold");
285281
return VtblEntry::Vacant;
286282
}

0 commit comments

Comments
 (0)