-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Expose type_name() method on Any. #68379
Copy link
Copy link
Open
Labels
A-intrinsicsArea: IntrinsicsArea: IntrinsicsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-intrinsicsArea: IntrinsicsArea: IntrinsicsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.