Skip to content

Commit aeb9332

Browse files
committed
Complete doc.
1 parent 63a7712 commit aeb9332

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
@@ -2798,7 +2798,11 @@ pub const fn align_of<T>() -> usize;
27982798
/// Therefore, implementations must not require the user to uphold
27992799
/// any safety invariants.
28002800
///
2801+
/// This intrinsic can only be evaluated at compile-time, and should only appear in
2802+
/// constants or inline const blocks.
2803+
///
28012804
/// The stabilized version of this intrinsic is [`core::mem::offset_of`].
2805+
/// This intrinsic is also a lang item so `offset_of!` can desugar to calls to it.
28022806
#[rustc_nounwind]
28032807
#[unstable(feature = "core_intrinsics", issue = "none")]
28042808
#[rustc_const_unstable(feature = "core_intrinsics", issue = "none")]

0 commit comments

Comments
 (0)