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
  • Loading branch information
Jules-Bertholet authored and meng-xu-cs committed Nov 25, 2023
1 parent a24a27f commit 12cbe55
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 12cbe55

Please sign in to comment.