Skip to content

Commit b7c8b96

Browse files
committed
trait_sel: only test predicates w/ no substs
This commit modifies the `substitute_normalize_and_test_predicates` query, renaming it to `impossible_predicates` and only checking predicates which do not require substs. By making this change, polymorphization doesn't have to explicitly support vtables. Signed-off-by: David Wood <[email protected]>
1 parent 5a20489 commit b7c8b96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ pub fn fn_has_unsatisfiable_preds(cx: &LateContext<'_>, did: DefId) -> bool {
13461346
.predicates
13471347
.iter()
13481348
.filter_map(|(p, _)| if p.is_global() { Some(*p) } else { None });
1349-
!traits::normalize_and_test_predicates(
1349+
traits::impossible_predicates(
13501350
cx.tcx,
13511351
traits::elaborate_predicates(cx.tcx, predicates)
13521352
.map(|o| o.predicate)

0 commit comments

Comments
 (0)