Created
December 26, 2018 09:02
-
-
Save nyinyithann/767e096a9a1f97da5cad45a10c900852 to your computer and use it in GitHub Desktop.
get type name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![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