Skip to content

Commit 1ccbb88

Browse files
ftxqxdalexcrichton
authored andcommitted
---
yaml --- r: 152497 b: refs/heads/try2 c: 00e1a69 h: refs/heads/master i: 152495: a9dabad v: v3
1 parent c10e20f commit 1ccbb88

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 42d538e6157cc4f923b4c2b8a3382d6465c90447
8+
refs/heads/try2: 00e1a6923773500f0d5b9bad64d05eb5d4a24c53
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libcore/any.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Traits for dynamic typing of any type (through runtime reflection)
11+
//! Traits for dynamic typing of any `'static` type (through runtime reflection)
1212
//!
1313
//! 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.
1515
//!
1616
//! `Any` itself can be used to get a `TypeId`, and has more features when used as a trait object.
1717
//! 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 { }
3232
// Any trait
3333
///////////////////////////////////////////////////////////////////////////////
3434

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.
3739
pub trait Any {
3840
/// Get the `TypeId` of `self`
3941
fn get_type_id(&self) -> TypeId;

0 commit comments

Comments
 (0)