From 1eb7b460da28b54009e15697dd82a7feafdca19e Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Fri, 8 May 2026 18:16:31 +0200 Subject: [PATCH] replace awkward wording --- src/doc/rustc-dev-guide/src/unsafety-checking.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/rustc-dev-guide/src/unsafety-checking.md b/src/doc/rustc-dev-guide/src/unsafety-checking.md index d1a3ddb13850..fcdd4a8236b5 100644 --- a/src/doc/rustc-dev-guide/src/unsafety-checking.md +++ b/src/doc/rustc-dev-guide/src/unsafety-checking.md @@ -19,8 +19,8 @@ THIR is chosen because there are fewer cases to consider than in HIR, for example unsafe function calls and unsafe method calls have the same representation in THIR. The check is not done on MIR because safety checks do not depend on control flow, -so MIR is not necessary to use, -and MIR doesn't have as precise spans for some expressions. +so there is no need to use MIR. +Also, MIR doesn't have precise enough spans for some expressions. Most unsafe operations can be identified by checking the `ExprKind` in THIR and checking the type of the argument.