This commit is contained in:
parent
5e8c0c5ae0
commit
f7bdead5ec
@ -113,8 +113,8 @@ fn check_fn(
|
||||
|
||||
let preds = traits::elaborate_predicates(cx.tcx, cx.param_env.caller_bounds.to_vec())
|
||||
.filter(|p| !p.is_global())
|
||||
.filter_map(|pred| {
|
||||
if let ty::Predicate::Trait(poly_trait_ref, _) = pred {
|
||||
.filter_map(|obligation| {
|
||||
if let ty::Predicate::Trait(poly_trait_ref, _) = obligation.predicate {
|
||||
if poly_trait_ref.def_id() == sized_trait || poly_trait_ref.skip_binder().has_escaping_bound_vars()
|
||||
{
|
||||
return None;
|
||||
|
@ -1389,7 +1389,12 @@ pub fn fn_has_unsatisfiable_preds(cx: &LateContext<'_, '_>, did: DefId) -> bool
|
||||
.iter()
|
||||
.filter_map(|(p, _)| if p.is_global() { Some(*p) } else { None })
|
||||
.collect();
|
||||
!traits::normalize_and_test_predicates(cx.tcx, traits::elaborate_predicates(cx.tcx, predicates).collect())
|
||||
!traits::normalize_and_test_predicates(
|
||||
cx.tcx,
|
||||
traits::elaborate_predicates(cx.tcx, predicates)
|
||||
.map(|o| o.predicate)
|
||||
.collect::<Vec<_>>(),
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
Loading…
Reference in New Issue
Block a user