1
Fork 0

Add note about unsafe functions body not being unsafe

This commit is contained in:
Wim Looman 2023-05-27 22:20:14 +02:00
parent 62a712a8bb
commit 8f3e876e52
No known key found for this signature in database
GPG key ID: C6F5748C6DD1607B
7 changed files with 89 additions and 22 deletions

View file

@ -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