clippy_utils

Function fn_has_unsatisfiable_preds

source
pub fn fn_has_unsatisfiable_preds(cx: &LateContext<'_>, did: DefId) -> bool
Expand description

Check if it’s even possible to satisfy the where clause for the item.

trivial_bounds feature allows functions with unsatisfiable bounds, for example:

fn foo() where i32: Iterator {
    for _ in 2i32 {}
}