1
Fork 0
This commit is contained in:
Pietro Albini 2025-01-08 22:11:33 +01:00
parent a7f84e981e
commit d894ce8827
No known key found for this signature in database
GPG key ID: 3E06ABE80BAAF19C
4 changed files with 4 additions and 13 deletions

View file

@ -296,10 +296,7 @@ impl<K, V, S> HashMap<K, V, S> {
/// ```
#[inline]
#[stable(feature = "hashmap_build_hasher", since = "1.7.0")]
#[rustc_const_stable(
feature = "const_collections_with_hasher",
since = "1.85.0"
)]
#[rustc_const_stable(feature = "const_collections_with_hasher", since = "1.85.0")]
pub const fn with_hasher(hash_builder: S) -> HashMap<K, V, S> {
HashMap { base: base::HashMap::with_hasher(hash_builder) }
}

View file

@ -388,10 +388,7 @@ impl<T, S> HashSet<T, S> {
/// ```
#[inline]
#[stable(feature = "hashmap_build_hasher", since = "1.7.0")]
#[rustc_const_stable(
feature = "const_collections_with_hasher",
since = "1.85.0"
)]
#[rustc_const_stable(feature = "const_collections_with_hasher", since = "1.85.0")]
pub const fn with_hasher(hasher: S) -> HashSet<T, S> {
HashSet { base: base::HashSet::with_hasher(hasher) }
}