about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libcore/any.rs6
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() {