File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
branches/try2/src/libcore Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: 42d538e6157cc4f923b4c2b8a3382d6465c90447
8
+ refs/heads/try2: 00e1a6923773500f0d5b9bad64d05eb5d4a24c53
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
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