Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 3 tasks
krtab opened this issue Mar 29, 2024 · 0 comments
Open
1 of 3 tasks

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

krtab opened this issue Mar 29, 2024 · 0 comments
Assignees
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@krtab
Copy link
Contributor

krtab commented Mar 29, 2024

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

@krtab krtab added C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Mar 29, 2024
@Amanieu Amanieu added I-libs-api-nominated Nominated for discussion during a libs-api team meeting. and removed I-libs-api-nominated Nominated for discussion during a libs-api team meeting. labels Mar 30, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 2, 2024
…ew, r=Amanieu

Add fn const BuildHasherDefault::new

See [tracking issue](rust-lang#123197) for justification.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 2, 2024
…ew, r=Amanieu

Add fn const BuildHasherDefault::new

See [tracking issue](rust-lang#123197) for justification.
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Apr 2, 2024
Rollup merge of rust-lang#123198 - krtab:build_hasher_default_const_new, r=Amanieu

Add fn const BuildHasherDefault::new

See [tracking issue](rust-lang#123197) for justification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants