Skip to content

Commit 0c82a1b

Browse files
committed
Complete doc.
1 parent 92e74f2 commit 0c82a1b

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
@@ -2784,7 +2784,11 @@ pub const fn align_of<T>() -> usize;
27842784
/// Therefore, implementations must not require the user to uphold
27852785
/// any safety invariants.
27862786
///
2787+
/// This intrinsic can only be evaluated at compile-time, and should only appear in
2788+
/// constants or inline const blocks.
2789+
///
27872790
/// The stabilized version of this intrinsic is [`core::mem::offset_of`].
2791+
/// This intrinsic is also a lang item so `offset_of!` can desugar to calls to it.
27882792
#[rustc_nounwind]
27892793
#[unstable(feature = "core_intrinsics", issue = "none")]
27902794
#[rustc_const_unstable(feature = "core_intrinsics", issue = "none")]

0 commit comments

Comments
 (0)