Skip to content

Tracking Issue for fn const BuildHasherDefault::new() #123197

Closed
@krtab

Description

@krtab

Feature gate: #![feature(build_hasher_default_const_new)]

This is a tracking issue for a new new class method for BuildHasherDefault. It allows creating a BuildHasherDefault in const contexts.
Because HashMap::with_hasher constness is being stabilized in #118427 this will in turn allow creating empty HashMap<K,V,BuildHasherDefault<H>> in const context for any H: Default + Hasher.

Public API

impl<H> BuildHasherDefault<H> {
    pub const fn new() -> Self;
}

Steps / History

Unresolved Questions

  • None yet.

@rustbot claim

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

Labels

C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions