Add more from the std

This commit is contained in:
2026-03-19 11:52:43 +01:00
parent fc3a04a20e
commit 45d23efe77
116 changed files with 24256 additions and 551 deletions

View File

@@ -6,7 +6,7 @@ use hashbrown::hash_set as base;
use super::map::map_try_reserve_error;
use crate::alloc::{Allocator, Global};
use crate::borrow::Borrow;
use alloc_crate::collections::TryReserveError;
use crate::collections::TryReserveError;
use crate::fmt;
use crate::hash::{BuildHasher, Hash, RandomState};
use crate::iter::{Chain, FusedIterator};
@@ -231,7 +231,7 @@ impl<T, S> HashSet<T, S> {
#[inline]
#[must_use]
#[stable(feature = "hashmap_build_hasher", since = "1.7.0")]
#[rustc_const_stable(feature = "const_collections_with_hasher", since = "1.85.0")]
#[rustc_const_unstable(feature = "custom_std", issue = "none")]
pub const fn with_hasher(hasher: S) -> HashSet<T, S> {
HashSet { base: base::HashSet::with_hasher(hasher) }
}