dump 0.1.1

A simple macro that takes one or more variables and prints the name, type, and value of each variable. The output is also prefixed with [source_file:line_no].
Documentation
#![feature(core_intrinsics)]

pub fn get_type_of<T>(_: &T) -> String {
	unsafe {
		std::intrinsics::type_name::<T>()
	}.to_owned()
}

#[macro_export]
macro_rules! dump(
	($($a:expr),*) => {
		println!(concat!("[", file!(), ":", line!(), "] ", $(stringify!($a), ": {} = {:?}; "),*), $($crate::get_type_of(&$a), $a),*);
	}
);

#[cfg(test)]
mod test {
	#[test]
	fn it_works() {
		let s = String::new();
		let n = 3;
		dump!(s);
		// The output looks kind of nonsensical when passing in
		// literals instead of variable names, but it still works.
		dump!(&&n, s, 9, "test", 2 + 2);
	}
}