diff options
| author | Jethro Beekman <jethro@fortanix.com> | 2016-10-17 17:49:07 -0700 |
|---|---|---|
| committer | Jethro Beekman <jethro@fortanix.com> | 2016-10-17 17:49:07 -0700 |
| commit | a29b50303325cab60a6e4db0cbba434b2fe243a2 (patch) | |
| tree | 1a8e625f7f9f4c1e623e1e21506b4cdb19cd3d14 | |
| parent | e0111758eb4f215db4ec26f809ef3edf5dfb66f5 (diff) | |
| download | rust-a29b50303325cab60a6e4db0cbba434b2fe243a2.tar.gz rust-a29b50303325cab60a6e4db0cbba434b2fe243a2.zip | |
Add stable example to TypeId
| -rw-r--r-- | src/libcore/any.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libcore/any.rs b/src/libcore/any.rs index f7edcb998a9..eb0636e8576 100644 --- a/src/libcore/any.rs +++ b/src/libcore/any.rs @@ -351,12 +351,10 @@ impl TypeId { /// # Examples /// /// ``` - /// #![feature(get_type_id)] - /// /// use std::any::{Any, TypeId}; /// - /// fn is_string(s: &Any) -> bool { - /// TypeId::of::<String>() == s.get_type_id() + /// fn is_string<T: ?Sized + Any>(_s: &T) -> bool { + /// TypeId::of::<String>() == TypeId::of::<T>() /// } /// /// fn main() { |
