Skip to content

Instantly share code, notes, and snippets.

@nyinyithann
Created December 26, 2018 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nyinyithann/767e096a9a1f97da5cad45a10c900852 to your computer and use it in GitHub Desktop.
Save nyinyithann/767e096a9a1f97da5cad45a10c900852 to your computer and use it in GitHub Desktop.
get type name
#![feature(core_intrinsics)]
fn print_type_of<T>(_: &T) {
println!("{}", unsafe { std::intrinsics::type_name::<T>() });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment