From ad6961a4c69382f07f47b73c2a400275965082a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A1=BB=E8=AF=AD?= <2806397186@qq.com> Date: Wed, 19 Nov 2025 22:25:09 +0800 Subject: [PATCH] Remove the extra words. --- src/compiler/fight-with-compiler/lifetime/loop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/fight-with-compiler/lifetime/loop.md b/src/compiler/fight-with-compiler/lifetime/loop.md index 3184f1c5..fc764e37 100644 --- a/src/compiler/fight-with-compiler/lifetime/loop.md +++ b/src/compiler/fight-with-compiler/lifetime/loop.md @@ -68,7 +68,7 @@ error[E0499]: cannot borrow `arr[_]` as mutable more than once at a time 2. `&mut arr[i]`报错,因为在上一次循环中,已经借用过同样的可变引用`&mut arr[i]` 3. `tile`的生命周期跟`arr`不一致 -奇了怪了,跟我们之前的分析完全背道而驰,按理来说`arr.len()`的借用应该在调用后立刻结束,而不是持续到后面的代码行;同时可变借用`&mut arr[i]`也应该随着每次循环的结束而结束,为什么会前后两次循环会因为同一处的引用而报错? +奇了怪了,跟我们之前的分析完全背道而驰,按理来说`arr.len()`的借用应该在调用后立刻结束,而不是持续到后面的代码行;同时可变借用`&mut arr[i]`也应该随着每次循环的结束而结束,为什么前后两次循环会因为同一处的引用而报错? ## 尝试去掉中间变量