rust/library
bors f6b6d5cf64 Auto merge of #79870 - sharnoff:smart-pointer-Any-type_id, r=shepmaster
Add docs note about `Any::type_id` on smart pointers

Fixes #79868.

There's an issue I've run into a couple times while using values of type `Box<dyn Any>` - essentially, calling `value.type_id()` doesn't dereference to the trait object, but uses the implementation of `Any` for `Box<dyn Any>`, giving us the `TypeId` of the container instead of the object inside it.

I couldn't find any notes about this in the documentation and - while it could be inferred from existing knowledge of Rust and the blanket implemenation of `Any` - I think it'd be nice to have a note about it in the documentation for the `any` module.

Anyways, here's a first draft of a section about it. I'm happy to revise wording :)
2021-01-02 04:12:48 +00:00
..
alloc Auto merge of #77832 - camelid:remove-manual-link-resolves, r=jyn514 2021-01-02 01:31:03 +00:00
backtrace@af078ecc0b std: Update the backtrace crate submodule 2020-11-20 11:56:07 -08:00
core Auto merge of #79870 - sharnoff:smart-pointer-Any-type_id, r=shepmaster 2021-01-02 04:12:48 +00:00
panic_abort slightly more typed interface to panic implementation 2020-12-21 13:37:59 +01:00
panic_unwind fix another comment, and make __rust_start_panic code a bit more semantically clear 2020-12-25 23:37:27 +01:00
proc_macro Bump bootstrap compiler to 1.50 beta 2020-12-30 09:27:19 -05:00
profiler_builtins Fix warning whe building profiler_builtins crate 2020-09-04 15:10:29 +02:00
rtstartup Bump bootstrap compiler to 1.50 beta 2020-12-30 09:27:19 -05:00
rustc-std-workspace-alloc mv std libs to library/ 2020-07-27 19:51:13 -05:00
rustc-std-workspace-core Fix rustc-std-workspace-core documentation 2020-12-20 15:23:21 +08:00
rustc-std-workspace-std mv std libs to library/ 2020-07-27 19:51:13 -05:00
std Remove many unnecessary manual link resolves from library 2020-12-31 11:54:32 -08:00
stdarch@9c732a56f6 Update stdarch submodule 2020-12-21 00:00:00 +00:00
term mv std libs to library/ 2020-07-27 19:51:13 -05:00
test Dogfood 'str_split_once()` in the std lib 2020-12-07 14:24:05 -07:00
unwind Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00