Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn typeid<T: std::any::Any>(_: &T) -> std::any::TypeId {
- let result = std::any::TypeId::of::<T>();
- result
- }
- fn main() {
- let arch_match = 2.0;
- println!("{:?}", typeid(&arch_match));
- }
- // prints this:
- // TypeId { t: 14742493193654942124 }
- // I was expecting it to print some sort of string indicating it was a float?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement