Function clippy_utils::can_move_expr_to_closure
source · pub fn can_move_expr_to_closure<'tcx>(
cx: &LateContext<'tcx>,
expr: &'tcx Expr<'_>
) -> Option<HirIdMap<CaptureKind>>
Expand description
Checks if the expression can be moved into a closure as is. This will return a list of captures
if so, otherwise, None
.