diff options
| author | Jules Bertholet <julesbertholet@quoi.xyz> | 2023-11-17 19:54:37 -0500 |
|---|---|---|
| committer | Jules Bertholet <julesbertholet@quoi.xyz> | 2023-11-17 19:54:37 -0500 |
| commit | db629211591f7ac8ab6d502d8bee3fce8b528312 (patch) | |
| tree | 5d04f0bf438b228ba95e5fdc0cf4092fc16a7d36 /library/core/src | |
| parent | 1db4b12494f698754b925f55061eb9e6b3241423 (diff) | |
| download | rust-db629211591f7ac8ab6d502d8bee3fce8b528312.tar.gz rust-db629211591f7ac8ab6d502d8bee3fce8b528312.zip | |
Document behavior of `<dyn Any as Any>::type_id()`
See also #57893
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/any.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/library/core/src/any.rs b/library/core/src/any.rs index 8f5404d9713..22777fb078a 100644 --- a/library/core/src/any.rs +++ b/library/core/src/any.rs @@ -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 /// /// ``` |
