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

View File

@@ -1393,8 +1393,9 @@ mod prim_usize {}
/// # Safety /// # Safety
/// ///
/// For all types, `T: ?Sized`, and for all `t: &T` or `t: &mut T`, unsafe code may assume that /// 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` /// the following properties hold. Rust programmers must assume that, unless explicitly stated
/// which violates any of these properties. /// 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 aligned to `align_of_val(t)`
/// * `t` is dereferenceable for `size_of_val(t)` many bytes /// * `t` is dereferenceable for `size_of_val(t)` many bytes