We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63a7712 commit aeb9332Copy full SHA for aeb9332
library/core/src/intrinsics/mod.rs
@@ -2798,7 +2798,11 @@ pub const fn align_of<T>() -> usize;
2798
/// Therefore, implementations must not require the user to uphold
2799
/// any safety invariants.
2800
///
2801
+/// This intrinsic can only be evaluated at compile-time, and should only appear in
2802
+/// constants or inline const blocks.
2803
+///
2804
/// 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.
2806
#[rustc_nounwind]
2807
#[unstable(feature = "core_intrinsics", issue = "none")]
2808
#[rustc_const_unstable(feature = "core_intrinsics", issue = "none")]
0 commit comments