In a similar spirit to #61533, it would be nice if the Any trait contained an auto implemented method akin to:
fn type_name(&self) -> &'static str
{
std::any::type_name::<T>()
}
This way it would be a lot easier print and surface errors like accidentally trying to cast Box<T> to T because &Box<T> is also &Any.
In a similar spirit to #61533, it would be nice if the Any trait contained an auto implemented method akin to:
This way it would be a lot easier print and surface errors like accidentally trying to cast
Box<T>toTbecause&Box<T>is also&Any.