File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 3770c42a4959cbabc73da52abc7e3db96657974e
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: d6736a1440d42f6af967a8a20ab8d73522112b72
5
- refs/heads/try: 42d538e6157cc4f923b4c2b8a3382d6465c90447
5
+ refs/heads/try: 00e1a6923773500f0d5b9bad64d05eb5d4a24c53
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- //! Traits for dynamic typing of any type (through runtime reflection)
11
+ //! Traits for dynamic typing of any `'static` type (through runtime reflection)
12
12
//!
13
13
//! This module implements the `Any` trait, which enables dynamic typing
14
- //! of any type, through runtime reflection.
14
+ //! of any `'static` type through runtime reflection.
15
15
//!
16
16
//! `Any` itself can be used to get a `TypeId`, and has more features when used as a trait object.
17
17
//! As `&Any` (a borrowed trait object), it has the `is` and `as_ref` methods, to test if the
@@ -32,8 +32,10 @@ pub enum Void { }
32
32
// Any trait
33
33
///////////////////////////////////////////////////////////////////////////////
34
34
35
- /// The `Any` trait is implemented by all types, and can be used as a trait object
36
- /// for dynamic typing
35
+ /// The `Any` trait is implemented by all `'static` types, and can be used for dynamic typing
36
+ ///
37
+ /// Every type with no non-`'static` references implements `Any`, so `Any` can be used as a trait
38
+ /// object to emulate the effects dynamic typing.
37
39
pub trait Any {
38
40
/// Get the `TypeId` of `self`
39
41
fn get_type_id ( & self ) -> TypeId ;
You can’t perform that action at this time.
0 commit comments