]> git.lizzy.rs Git - rust.git/commitdiff
Move feature enable in ptr::hash doc example
authorDale Wijnand <dale.wijnand@gmail.com>
Tue, 27 Nov 2018 21:18:20 +0000 (21:18 +0000)
committerDale Wijnand <dale.wijnand@gmail.com>
Tue, 27 Nov 2018 21:18:20 +0000 (21:18 +0000)
src/libcore/ptr.rs

index 3024031b3bb291610ae608109c9356a960ab8da7..0213b310efaa35f61ab5bd556472b3e62483a09a 100644 (file)
@@ -2515,6 +2515,7 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
 /// # Examples
 ///
 /// ```
+/// #![feature(ptr_hash)]
 /// use std::collections::hash_map::DefaultHasher;
 /// use std::hash::{Hash, Hasher};
 /// use std::ptr;
@@ -2523,7 +2524,6 @@ pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
 /// let five_ref = &five;
 ///
 /// let mut hasher = DefaultHasher::new();
-/// #[feature(ptr_hash)]
 /// ptr::hash(five_ref, &mut hasher);
 /// let actual = hasher.finish();
 ///