/// assert_eq!(is_string(&"cookie monster".to_string()), true);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
- #[rustc_const_stable(feature = "const_type_id", since = "1.45.0")]
+ #[rustc_const_stable(feature = "const_type_id", since = "1.46.0")]
pub const fn of<T: ?Sized + 'static>() -> TypeId {
TypeId { t: intrinsics::type_id::<T>() }
}
///
/// The stabilized version of this intrinsic is
/// [`std::any::TypeId::of`](../../std/any/struct.TypeId.html#method.of)
- #[rustc_const_stable(feature = "const_type_id", since = "1.45.0")]
+ #[rustc_const_stable(feature = "const_type_id", since = "1.46.0")]
pub fn type_id<T: ?Sized + 'static>() -> u64;
/// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited: