Skip to content

Commit

Permalink
Rollup merge of rust-lang#118028 - Jules-Bertholet:dyn-any-doc, r=thomcc
Browse files Browse the repository at this point in the history
Document behavior of `<dyn Any as Any>::type_id()`

See also rust-lang#57893

`@rustbot` label A-docs T-libs
  • Loading branch information
matthiaskrgr committed Nov 24, 2023
2 parents f38de06 + db62921 commit c3216e2
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 c3216e2

Please sign in to comment.