Skip to content

Commit cb1e414

Browse files
Rollup merge of #45461 - wesleywiser:intrinsics_docs, r=dtolnay
Two small enhancements to intrinsics docs
2 parents 5a7de59 + 3bc97bf commit cb1e414

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libcore/intrinsics.rs

+7
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,10 @@ extern "rust-intrinsic" {
676676
pub fn min_align_of<T>() -> usize;
677677
pub fn pref_align_of<T>() -> usize;
678678

679+
/// The size of the referenced value in bytes.
680+
///
681+
/// The stabilized version of this intrinsic is
682+
/// [`std::mem::size_of_val`](../../std/mem/fn.size_of_val.html).
679683
pub fn size_of_val<T: ?Sized>(_: &T) -> usize;
680684
pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize;
681685

@@ -921,6 +925,9 @@ extern "rust-intrinsic" {
921925
///
922926
/// If the actual type neither requires drop glue nor implements
923927
/// `Copy`, then may return `true` or `false`.
928+
///
929+
/// The stabilized version of this intrinsic is
930+
/// [`std::mem::needs_drop`](../../std/mem/fn.needs_drop.html).
924931
pub fn needs_drop<T>() -> bool;
925932

926933
/// Calculates the offset from a pointer.

0 commit comments

Comments
 (0)