is_vtable_safe_method in rustc_trait_selection::traits - Rust
Description: We say a method is vtable safe if it can be invoked on a trait object. Note that dyn-compatible 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`.

Skip to main content

## is_vtable_safe_method

# Function is_vtable_safe_method

Source

    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 dyn-compatible 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`.