rust-lang / hashbrown

Rust port of Google's SwissTable hash map
https://rust-lang.github.io/hashbrown
Apache License 2.0
2.46k stars 288 forks source link

mark const fn constructors as rustc_const_stable_indirect #586

Closed RalfJung closed 1 week ago

RalfJung commented 1 week ago

This is a promise that they can be implemented entirely using stable const features (and the compiler checks this when -Zforce-unstable-if-unmarked is set).

Part of https://github.com/rust-lang/rust/issues/102575.

Amanieu commented 1 week ago

I assume you need a new hashbrown release with this?

RalfJung commented 1 week ago

Yeah to use this in std this will need a release.

cuviper commented 1 week ago

I think you won't be able to bootstrap that until the new attribute reaches beta for stage0.

RalfJung commented 1 week ago

Ah, true, good point.

There's a beta branching in about a week so that's not too long of a wait. :) But I should probably double-check that this will actually work...

RalfJung commented 1 week ago

I checked that if I do make these not(bootstrap), and add my local hashbrown as a path dependency to std, then everything builds in stage 1. So it should therefore also work with stage 0 after a bootstrap bump.

RalfJung commented 18 hours ago

The bootstrap bump should happen any day now. @Amanieu would be nice to get a release. :)

Amanieu commented 9 hours ago

Done