rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.16k stars 12.69k forks source link

Tracking Issue for Hashing in const context #104061

Open onestacked opened 1 year ago

onestacked commented 1 year ago

Feature gate: #![feature(const_hash)]

This is a tracking issue for constructing "hashers" in const conext.

Public API

// std::collections::hash
impl DefaultHasher {
    pub const fn new() -> DefaultHasher;
}

impl SipHasher {
    #[deprecated]
    pub const fn new() -> SipHasher;
    #[deprecated]
    pub const fn new_with_keys(key0: u64, key1: u64) -> SipHasher;
}
impl SipHasher13 {
    #[deprecated]
    pub const fn new() -> SipHasher;
    #[deprecated]
    pub const fn new_with_keys(key0: u64, key1: u64) -> SipHasher;
}

Steps / History

Unresolved Questions

RalfJung commented 1 month ago

Most of this feature got removed in https://github.com/rust-lang/rust/pull/110393, I updated the description to match what is left.