Rollup merge of #45461 - wesleywiser:intrinsics_docs, r=dtolnay
Two small enhancements to intrinsics docs
This commit is contained in:
commit
cb1e4142b4
1 changed files with 7 additions and 0 deletions
|
|
@ -676,6 +676,10 @@ extern "rust-intrinsic" {
|
|||
pub fn min_align_of<T>() -> usize;
|
||||
pub fn pref_align_of<T>() -> usize;
|
||||
|
||||
/// The size of the referenced value in bytes.
|
||||
///
|
||||
/// The stabilized version of this intrinsic is
|
||||
/// [`std::mem::size_of_val`](../../std/mem/fn.size_of_val.html).
|
||||
pub fn size_of_val<T: ?Sized>(_: &T) -> usize;
|
||||
pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize;
|
||||
|
||||
|
|
@ -921,6 +925,9 @@ extern "rust-intrinsic" {
|
|||
///
|
||||
/// If the actual type neither requires drop glue nor implements
|
||||
/// `Copy`, then may return `true` or `false`.
|
||||
///
|
||||
/// The stabilized version of this intrinsic is
|
||||
/// [`std::mem::needs_drop`](../../std/mem/fn.needs_drop.html).
|
||||
pub fn needs_drop<T>() -> bool;
|
||||
|
||||
/// Calculates the offset from a pointer.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue