You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In light of `unsafe extern`, we need to note that only unsafe extern
statics need `unsafe { .. }` and to clarify that not all foreign
functions are necessarily unsafe to call.
Co-authored-by: ehuss
Copy file name to clipboardExpand all lines: src/unsafety.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,13 @@ r[safety.unsafe-deref]
13
13
- Dereferencing a [raw pointer].
14
14
15
15
r[safety.unsafe-static]
16
-
- Reading or writing a [mutable] or [external] static variable.
16
+
- Reading or writing a [mutable] or unsafe [external] static variable.
17
17
18
18
r[safety.unsafe-union-access]
19
19
- Accessing a field of a [`union`], other than to assign to it.
20
20
21
21
r[safety.unsafe-call]
22
-
- Calling an unsafe function (including an intrinsic or foreign function).
22
+
- Calling an unsafe function.
23
23
24
24
r[safety.unsafe-target-feature-call]
25
25
- Calling a safe function marked with a [`target_feature`][attributes.codegen.target_feature] from a function that does not have a `target_feature` attribute enabling the same features (see [attributes.codegen.target_feature.safety-restrictions]).
0 commit comments