type_name/
lib.rs

1//! A safe wrapper around the `type_name` API.
2
3#![no_std]
4#![feature(core_intrinsics)]
5
6use core::intrinsics;
7
8/// Get the type name of `T`.
9pub fn get<T>() -> &'static str {
10    unsafe {
11        intrinsics::type_name::<T>()
12    }
13}