From 509fb7e6de544221bbfcddb68adabb7535c1c0b7 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Mon, 20 Apr 2026 07:33:45 +0200 Subject: [PATCH] expt.closure.capture-mut-ref: make sentence more easy to understand --- src/expressions/closure-expr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/expressions/closure-expr.md b/src/expressions/closure-expr.md index 8f71ddd9b8..7142eb7c79 100644 --- a/src/expressions/closure-expr.md +++ b/src/expressions/closure-expr.md @@ -38,7 +38,7 @@ r[expr.closure.capture-inference] Without the `move` keyword, the closure expression [infers how it captures each variable from its environment](../types/closure.md#capture-modes), preferring to capture by shared reference, effectively borrowing all outer variables mentioned inside the closure's body. r[expr.closure.capture-mut-ref] -If needed the compiler will infer that instead mutable references should be taken, or that the values should be moved or copied (depending on their type) from the environment. +If needed, the compiler will instead infer that mutable references should be taken, or that the values should be moved or copied (depending on their type) from the environment. r[expr.closure.capture-move] A closure can be forced to capture its environment by copying or moving values by prefixing it with the `move` keyword. This is often used to ensure that the closure's lifetime is `'static`.