References must also be non-null

This commit is contained in:
Joshua Liebow-Feeser 2024-05-11 12:08:19 -07:00 committed by GitHub
parent 1cefaa7432
commit 15df3d78e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1467,6 +1467,7 @@ mod prim_usize {}
/// For all types, `T: ?Sized`, and for all `t: &T` or `t: &mut T`, when such values cross an API /// For all types, `T: ?Sized`, and for all `t: &T` or `t: &mut T`, when such values cross an API
/// boundary, the following invariants must generally be upheld: /// boundary, the following invariants must generally be upheld:
/// ///
/// * `t` is non-null
/// * `t` is aligned to `align_of_val(t)` /// * `t` is aligned to `align_of_val(t)`
/// * if `size_of_val(t) > 0`, then `t` is dereferenceable for `size_of_val(t)` many bytes /// * if `size_of_val(t) > 0`, then `t` is dereferenceable for `size_of_val(t)` many bytes
/// ///