From 40653a9b771cf4e13603175ba2d5165f5d4f2f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=91=E4=BC=A6=E5=B0=91=E6=96=B9=E8=84=B8?= Date: Thu, 2 Oct 2025 17:11:21 +0800 Subject: [PATCH] Update ch04-02-references-and-borrowing.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit delete a redundant word "通过" --- src/ch04-02-references-and-borrowing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch04-02-references-and-borrowing.md b/src/ch04-02-references-and-borrowing.md index b356c14..12a17a3 100644 --- a/src/ch04-02-references-and-borrowing.md +++ b/src/ch04-02-references-and-borrowing.md @@ -131,7 +131,7 @@ Rust 在同时使用可变与不可变引用时也强制采用类似的规则。 在具有指针的语言中,很容易通过释放内存时保留指向它的指针而错误地生成一个**悬垂指针**(*dangling pointer*)—— 指向可能已被分配给其他用途的内存位置的指针。相比之下,在 Rust 中编译器确保引用永远也不会变成悬垂引用:当你拥有一些数据的引用,编译器确保数据不会在其引用之前离开作用域。 -让我们尝试创建一个悬垂引用,看看 Rust 如何通过通过一个编译时错误来防止它: +让我们尝试创建一个悬垂引用,看看 Rust 如何通过一个编译时错误来防止它: 文件名:src/main.rs