mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 14:38:46 +00:00
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 <david@davidtw.co>
This commit is contained in:
parent
5a20489c5c
commit
b7c8b96e66
1 changed files with 1 additions and 1 deletions
|
@ -1346,7 +1346,7 @@ pub fn fn_has_unsatisfiable_preds(cx: &LateContext<'_>, did: DefId) -> bool {
|
||||||
.predicates
|
.predicates
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|(p, _)| if p.is_global() { Some(*p) } else { None });
|
.filter_map(|(p, _)| if p.is_global() { Some(*p) } else { None });
|
||||||
!traits::normalize_and_test_predicates(
|
traits::impossible_predicates(
|
||||||
cx.tcx,
|
cx.tcx,
|
||||||
traits::elaborate_predicates(cx.tcx, predicates)
|
traits::elaborate_predicates(cx.tcx, predicates)
|
||||||
.map(|o| o.predicate)
|
.map(|o| o.predicate)
|
||||||
|
|
Loading…
Add table
Reference in a new issue