pub fn is_vtable_safe_method(
    tcx: TyCtxt<'_>,
    trait_def_id: DefId,
    method: AssocItem
) -> bool
Expand description

We say a method is vtable safe if it can be invoked on a trait object. Note that object-safe traits can have some non-vtable-safe methods, so long as they require Self: Sized or otherwise ensure that they cannot be used when Self = Trait.

MethodViolationCode::WhereClauseReferencesSelf is considered object safe due to backwards compatibility, see https://github.com/rust-lang/rust/issues/51443 and WHERE_CLAUSES_OBJECT_SAFETY.