Document behavior of <dyn Any as Any>::type_id()

See also #57893
This commit is contained in:
Jules Bertholet 2023-11-17 19:54:37 -05:00
parent 1db4b12494
commit db62921159
No known key found for this signature in database
GPG Key ID: 32034DAFC38C1BFC

View File

@ -115,6 +115,11 @@ use crate::intrinsics;
pub trait Any: 'static {
/// Gets the `TypeId` of `self`.
///
/// If called on a `dyn Any` trait object
/// (or a trait object of a subtrait of `Any`),
/// this returns the `TypeId` of the underlying
/// concrete type, not that of `dyn Any` itself.
///
/// # Examples
///
/// ```