Added const_hash tracking issue id

This commit is contained in:
onestacked 2022-11-06 18:01:44 +01:00
parent 5f9899b289
commit dc1f1a8e97
3 changed files with 21 additions and 21 deletions

View File

@ -567,7 +567,7 @@ pub trait Hasher {
}
#[stable(feature = "indirect_hasher_impl", since = "1.22.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl<H: ~const Hasher + ?Sized> const Hasher for &mut H {
fn finish(&self) -> u64 {
(**self).finish()
@ -776,7 +776,7 @@ impl<H> fmt::Debug for BuildHasherDefault<H> {
}
#[stable(since = "1.7.0", feature = "build_hasher")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl<H: ~const Default + Hasher> const BuildHasher for BuildHasherDefault<H> {
type Hasher = H;
@ -819,7 +819,7 @@ mod impls {
macro_rules! impl_write {
($(($ty:ident, $meth:ident),)*) => {$(
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl const Hash for $ty {
#[inline]
fn hash<H: ~const Hasher>(&self, state: &mut H) {
@ -856,7 +856,7 @@ mod impls {
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl const Hash for bool {
#[inline]
fn hash<H: ~const Hasher>(&self, state: &mut H) {
@ -865,7 +865,7 @@ mod impls {
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl const Hash for char {
#[inline]
fn hash<H: ~const Hasher>(&self, state: &mut H) {
@ -874,7 +874,7 @@ mod impls {
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl const Hash for str {
#[inline]
fn hash<H: ~const Hasher>(&self, state: &mut H) {
@ -883,7 +883,7 @@ mod impls {
}
#[stable(feature = "never_hash", since = "1.29.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl const Hash for ! {
#[inline]
fn hash<H: ~const Hasher>(&self, _: &mut H) {
@ -894,7 +894,7 @@ mod impls {
macro_rules! impl_hash_tuple {
() => (
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl const Hash for () {
#[inline]
fn hash<H: ~const Hasher>(&self, _state: &mut H) {}
@ -905,7 +905,7 @@ mod impls {
maybe_tuple_doc! {
$($name)+ @
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl<$($name: ~const Hash),+> const Hash for ($($name,)+) where last_type!($($name,)+): ?Sized {
#[allow(non_snake_case)]
#[inline]
@ -952,7 +952,7 @@ mod impls {
impl_hash_tuple! { T B C D E F G H I J K L }
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl<T: ~const Hash> const Hash for [T] {
#[inline]
fn hash<H: ~const Hasher>(&self, state: &mut H) {
@ -962,7 +962,7 @@ mod impls {
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl<T: ?Sized + ~const Hash> const Hash for &T {
#[inline]
fn hash<H: ~const Hasher>(&self, state: &mut H) {
@ -971,7 +971,7 @@ mod impls {
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl<T: ?Sized + ~const Hash> const Hash for &mut T {
#[inline]
fn hash<H: Hasher>(&self, state: &mut H) {

View File

@ -150,7 +150,7 @@ impl SipHasher {
since = "1.13.0",
note = "use `std::collections::hash_map::DefaultHasher` instead"
)]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
#[must_use]
pub const fn new() -> SipHasher {
SipHasher::new_with_keys(0, 0)
@ -163,7 +163,7 @@ impl SipHasher {
since = "1.13.0",
note = "use `std::collections::hash_map::DefaultHasher` instead"
)]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
#[must_use]
pub const fn new_with_keys(key0: u64, key1: u64) -> SipHasher {
SipHasher(SipHasher24 { hasher: Hasher::new_with_keys(key0, key1) })
@ -178,7 +178,7 @@ impl SipHasher13 {
since = "1.13.0",
note = "use `std::collections::hash_map::DefaultHasher` instead"
)]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
pub const fn new() -> SipHasher13 {
SipHasher13::new_with_keys(0, 0)
}
@ -190,7 +190,7 @@ impl SipHasher13 {
since = "1.13.0",
note = "use `std::collections::hash_map::DefaultHasher` instead"
)]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
pub const fn new_with_keys(key0: u64, key1: u64) -> SipHasher13 {
SipHasher13 { hasher: Hasher::new_with_keys(key0, key1) }
}
@ -224,7 +224,7 @@ impl<S: Sip> Hasher<S> {
}
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl const super::Hasher for SipHasher {
#[inline]
fn write(&mut self, msg: &[u8]) {
@ -243,7 +243,7 @@ impl const super::Hasher for SipHasher {
}
#[unstable(feature = "hashmap_internals", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl const super::Hasher for SipHasher13
where
Hasher<Sip13Rounds>: ~const super::Hasher,

View File

@ -3161,7 +3161,7 @@ impl DefaultHasher {
#[stable(feature = "hashmap_default_hasher", since = "1.13.0")]
#[inline]
#[allow(deprecated)]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
#[must_use]
pub const fn new() -> DefaultHasher {
DefaultHasher(SipHasher13::new_with_keys(0, 0))
@ -3169,7 +3169,7 @@ impl DefaultHasher {
}
#[stable(feature = "hashmap_default_hasher", since = "1.13.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl const Default for DefaultHasher {
/// Creates a new `DefaultHasher` using [`new`].
/// See its documentation for more.
@ -3182,7 +3182,7 @@ impl const Default for DefaultHasher {
}
#[stable(feature = "hashmap_default_hasher", since = "1.13.0")]
#[rustc_const_unstable(feature = "const_hash", issue = "none")]
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl const Hasher for DefaultHasher {
// The underlying `SipHasher13` doesn't override the other
// `write_*` methods, so it's ok not to forward them here.