forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#44273 - bluss:rc-downcast, r=alexcrichton
Implement <Rc<Any>>::downcast * Implement `<Rc<Any>>::downcast::<T>` * New unstable method. Works just like Box\<Any\>, but for Rc. * Any has two cases for its methods: Any and Any + Send; Rc is never Send, so that case is skipped for Rc. * Motivation for being a method with self is to match Box and there is no user-supplied type; the inner type is Any and downcast does not conflict with any method of Any. * Arc was skipped because Any itself has no downcast for the case that makes most sense: Any + Send + Sync
- Loading branch information
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters