Skip to content

Commit

Permalink
Document behavior of <dyn Any as Any>::type_id()
Browse files Browse the repository at this point in the history
See also #57893
  • Loading branch information
Jules-Bertholet committed Nov 18, 2023
1 parent 1db4b12 commit db62921
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/core/src/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
/// ```
Expand Down

0 comments on commit db62921

Please sign in to comment.