Skip to content

Commit d65ccdd

Browse files
committed
Complete doc.
1 parent 7234992 commit d65ccdd

File tree

1 file changed

+4
-0
lines changed
  • library/core/src/intrinsics

1 file changed

+4
-0
lines changed

library/core/src/intrinsics/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2788,7 +2788,11 @@ pub const fn align_of<T>() -> usize;
27882788
/// Therefore, implementations must not require the user to uphold
27892789
/// any safety invariants.
27902790
///
2791+
/// This intrinsic can only be evaluated at compile-time, and should appear
2792+
/// constants or inline const blocks.
2793+
///
27912794
/// The stabilized version of this intrinsic is [`core::mem::offset_of`].
2795+
/// This intrinsic is also a lang item so `offset_of!` can desugar to calls to it.
27922796
#[rustc_nounwind]
27932797
#[unstable(feature = "core_intrinsics", issue = "none")]
27942798
#[rustc_const_unstable(feature = "core_intrinsics", issue = "none")]

0 commit comments

Comments
 (0)