Skip to content

Commit 216f100

Browse files
Document stable versions of type_name and type_id
1 parent abcbf7c commit 216f100

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libcore/intrinsics.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,12 +870,16 @@ extern "rust-intrinsic" {
870870
pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize;
871871

872872
/// Gets a static string slice containing the name of a type.
873+
/// The stabilized version of this intrinsic is
874+
/// [`std::any::type_name`](../../std/any/fn.type_name.html)
873875
#[rustc_const_unstable(feature = "const_type_name", issue = "none")]
874876
pub fn type_name<T: ?Sized>() -> &'static str;
875877

876878
/// Gets an identifier which is globally unique to the specified type. This
877879
/// function will return the same value for a type regardless of whichever
878880
/// crate it is invoked in.
881+
/// The stabilized version of this intrinsic is
882+
/// [`std::any::TypeId::of`](../../std/any/struct.TypeId.html#method.of)
879883
#[rustc_const_unstable(feature = "const_type_id", issue = "none")]
880884
pub fn type_id<T: ?Sized + 'static>() -> u64;
881885

0 commit comments

Comments
 (0)