hir_ty::diagnostics

Function missing_unsafe

Source
pub fn missing_unsafe(
    db: &dyn HirDatabase,
    def: DefWithBodyId,
) -> (Vec<(ExprOrPatId, UnsafetyReason)>, bool)
Expand description

Returns (unsafe_exprs, fn_is_unsafe).

If fn_is_unsafe is false, unsafe_exprs are hard errors. If true, they’re unsafe_op_in_unsafe_fn.