Expose type_name()
method on Any.
#68379
Labels
A-intrinsics
Area: Intrinsics
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
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>
toT
because&Box<T>
is also&Any
.The text was updated successfully, but these errors were encountered: