We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e011175 commit a29b503Copy full SHA for a29b503
src/libcore/any.rs
@@ -351,12 +351,10 @@ impl TypeId {
351
/// # Examples
352
///
353
/// ```
354
- /// #![feature(get_type_id)]
355
- ///
356
/// use std::any::{Any, TypeId};
357
358
- /// fn is_string(s: &Any) -> bool {
359
- /// TypeId::of::<String>() == s.get_type_id()
+ /// fn is_string<T: ?Sized + Any>(_s: &T) -> bool {
+ /// TypeId::of::<String>() == TypeId::of::<T>()
360
/// }
361
362
/// fn main() {
0 commit comments