paralegal_flow::utils

Function is_virtual

Source
pub fn is_virtual(tcx: TyCtxt<'_>, function: DefId) -> bool
Expand description

Returns whether this method is expected to have a body we can analyze.

Specifically this returns true if function refers to an associated item of a trait which has no default value.

Note: While you are supposed to call this whit a function that refers to a function, it will not crash if it refers to a type or constant instead.