about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/messages.ftl
diff options
context:
space:
mode:
authorWim Looman <git@nemo157.com>2023-05-27 22:20:14 +0200
committerWim Looman <git@nemo157.com>2023-06-13 15:48:57 +0200
commit8f3e876e522f9ecc8f855485bb4857163c0f86e4 (patch)
tree35cabbf833c365a1aacd372192ed1db970904469 /compiler/rustc_mir_transform/messages.ftl
parent62a712a8bbb29a5d2f4e82b74d1ee5aa0490a5a3 (diff)
downloadrust-8f3e876e522f9ecc8f855485bb4857163c0f86e4.tar.gz
rust-8f3e876e522f9ecc8f855485bb4857163c0f86e4.zip
Add note about unsafe functions body not being unsafe
Diffstat (limited to 'compiler/rustc_mir_transform/messages.ftl')
-rw-r--r--compiler/rustc_mir_transform/messages.ftl1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_mir_transform/messages.ftl b/compiler/rustc_mir_transform/messages.ftl
index 300e592a6b4..2598eb2ed09 100644
--- a/compiler/rustc_mir_transform/messages.ftl
+++ b/compiler/rustc_mir_transform/messages.ftl
@@ -56,6 +56,7 @@ mir_transform_union_access_label = access to union field
 mir_transform_union_access_note = the field may not be properly initialized: using uninitialized data will cause undefined behavior
 mir_transform_unsafe_op_in_unsafe_fn = {$details} is unsafe and requires unsafe block (error E0133)
     .suggestion = consider wrapping the function body in an unsafe block
+    .note = an unsafe function restricts its caller, but its body is safe by default
 
 mir_transform_unused_unsafe = unnecessary `unsafe` block
     .label = because it's nested under this `unsafe` block