clippy_utils::higher

Function get_vec_init_kind

Source
pub fn get_vec_init_kind<'tcx>(
    cx: &LateContext<'tcx>,
    expr: &'tcx Expr<'tcx>,
) -> Option<VecInitKind>
Expand description

Checks if the given expression is an initialization of Vec and returns its kind.