Update primitive_docs.rs

This commit is contained in:
Joshua Liebow-Feeser 2023-11-03 06:41:23 -07:00 committed by GitHub
parent 55487e235b
commit 1a0309afb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1393,8 +1393,9 @@ mod prim_usize {}
/// # Safety
///
/// For all types, `T: ?Sized`, and for all `t: &T` or `t: &mut T`, unsafe code may assume that
/// the following properties hold. It is undefined behavior to produce a `t: &T` or `t: &mut T`
/// which violates any of these properties.
/// the following properties hold. Rust programmers must assume that, unless explicitly stated
/// otherwise, any Rust code they did not author themselves may rely on these properties, and that
/// violating them may cause that code to exhibit undefined behavior.
///
/// * `t` is aligned to `align_of_val(t)`
/// * `t` is dereferenceable for `size_of_val(t)` many bytes