1
Fork 0

Move feature enable in ptr::hash doc example

This commit is contained in:
Dale Wijnand 2018-11-27 21:18:20 +00:00
parent 9755410f73
commit 097b5db5f6
No known key found for this signature in database
GPG key ID: 4F256E3D151DF5EF

View 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();
///