Skip to content

Commit 4699a81

Browse files
committed
Complete doc.
1 parent 35ea63b commit 4699a81

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
@@ -2770,7 +2770,11 @@ pub const fn align_of<T>() -> usize;
27702770
/// Therefore, implementations must not require the user to uphold
27712771
/// any safety invariants.
27722772
///
2773+
/// This intrinsic can only be evaluated at compile-time, and should appear
2774+
/// constants or inline const blocks.
2775+
///
27732776
/// The stabilized version of this intrinsic is [`core::mem::offset_of`].
2777+
/// This intrinsic is also a lang item so `offset_of!` can desugar to calls to it.
27742778
#[rustc_nounwind]
27752779
#[unstable(feature = "core_intrinsics", issue = "none")]
27762780
#[rustc_const_unstable(feature = "core_intrinsics", issue = "none")]

0 commit comments

Comments
 (0)