@@ -839,10 +839,10 @@ pub const unsafe fn transmute_unchecked<Src, Dst>(src: Src) -> Dst;
839839/// If the actual type neither requires drop glue nor implements
840840/// `Copy`, then the return value of this function is unspecified.
841841///
842- /// Note that, unlike most intrinsics, this is safe to call;
843- /// it does not require an `unsafe` block.
844- /// Therefore, implementations must not require the user to uphold
845- /// any safety invariants .
842+ /// Note that, unlike most intrinsics, this can only be called at compile-time
843+ /// as backends do not have an implementation for it. The only caller (its
844+ /// stable counterpart), wraps this intrinsic call in a `const` block so that
845+ /// backends only see an evaluated constant .
846846///
847847/// The stabilized version of this intrinsic is [`mem::needs_drop`](crate::mem::needs_drop).
848848#[ rustc_intrinsic_const_stable_indirect]
@@ -2655,10 +2655,10 @@ pub const fn align_of<T>() -> usize;
26552655/// Returns the number of variants of the type `T` cast to a `usize`;
26562656/// if `T` has no variants, returns `0`. Uninhabited variants will be counted.
26572657///
2658- /// Note that, unlike most intrinsics, this is safe to call;
2659- /// it does not require an `unsafe` block.
2660- /// Therefore, implementations must not require the user to uphold
2661- /// any safety invariants .
2658+ /// Note that, unlike most intrinsics, this can only be called at compile-time
2659+ /// as backends do not have an implementation for it. The only caller (its
2660+ /// stable counterpart), wraps this intrinsic call in a `const` block so that
2661+ /// backends only see an evaluated constant .
26622662///
26632663/// The to-be-stabilized version of this intrinsic is [`crate::mem::variant_count`].
26642664#[ rustc_nounwind]
@@ -2694,10 +2694,10 @@ pub const unsafe fn align_of_val<T: ?Sized>(ptr: *const T) -> usize;
26942694
26952695/// Gets a static string slice containing the name of a type.
26962696///
2697- /// Note that, unlike most intrinsics, this is safe to call;
2698- /// it does not require an `unsafe` block.
2699- /// Therefore, implementations must not require the user to uphold
2700- /// any safety invariants .
2697+ /// Note that, unlike most intrinsics, this can only be called at compile-time
2698+ /// as backends do not have an implementation for it. The only caller (its
2699+ /// stable counterpart), wraps this intrinsic call in a `const` block so that
2700+ /// backends only see an evaluated constant .
27012701///
27022702/// The stabilized version of this intrinsic is [`core::any::type_name`].
27032703#[ rustc_nounwind]
@@ -2709,10 +2709,10 @@ pub const fn type_name<T: ?Sized>() -> &'static str;
27092709/// function will return the same value for a type regardless of whichever
27102710/// crate it is invoked in.
27112711///
2712- /// Note that, unlike most intrinsics, this is safe to call;
2713- /// it does not require an `unsafe` block.
2714- /// Therefore, implementations must not require the user to uphold
2715- /// any safety invariants .
2712+ /// Note that, unlike most intrinsics, this can only be called at compile-time
2713+ /// as backends do not have an implementation for it. The only caller (its
2714+ /// stable counterpart), wraps this intrinsic call in a `const` block so that
2715+ /// backends only see an evaluated constant .
27162716///
27172717/// The stabilized version of this intrinsic is [`core::any::TypeId::of`].
27182718#[ rustc_nounwind]
0 commit comments