fn print_type_of<T>(_: &T) {
println!("{}", std::any::type_name::<T>())
}
fn main() {
let a = "Rust";
let b = 42;
let c = 3.14;
let d = false;
let e: f32 = 787.007;
let f: i8 = 12;
let g: char = 'a';
let h = vec!['r', 'u', 's', 't'];
print_type_of(&a);
print_type_of(&b);
print_type_of(&c);
print_type_of(&d);
print_type_of(&e);
print_type_of(&f);
print_type_of(&g);
print_type_of(&h);
}
/*
run:
&str
i32
f64
bool
f32
i8
char
alloc::vec::Vec<char>
*/