Rollup merge of #45461 - wesleywiser:intrinsics_docs, r=dtolnay

Two small enhancements to intrinsics docs
This commit is contained in:
Guillaume Gomez 2017-10-25 09:48:09 +02:00 committed by GitHub
commit cb1e4142b4

View file

@ -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.