As discussed in #71618, skip_binder is called very often in diagnostics code. In general, this is incorrect for types with late-bound regions, e.g. function pointers. We should audit uses of skip_binder and replace them with no_bound_vars + early return or unwrap. If there are uses of skip_binder that are benign, for example debug printing or comparing with a known type, we should abstract this behind a function to minimize the number of calls to skip_binder that need to be checked.
As discussed in #71618,
skip_binderis called very often in diagnostics code. In general, this is incorrect for types with late-bound regions, e.g. function pointers. We should audit uses ofskip_binderand replace them withno_bound_vars+ early return orunwrap. If there are uses ofskip_binderthat are benign, for example debug printing or comparing with a known type, we should abstract this behind a function to minimize the number of calls toskip_binderthat need to be checked.