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

mark const fn constructors as rustc_const_stable_indirect #586

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Nov 13, 2024

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 rust-lang/rust#102575.

@Amanieu Amanieu added this pull request to the merge queue Nov 13, 2024
@Amanieu
Copy link
Member

Amanieu commented Nov 13, 2024

I assume you need a new hashbrown release with this?

Merged via the queue into rust-lang:master with commit 1baa359 Nov 13, 2024
24 checks passed
@RalfJung
Copy link
Member Author

RalfJung commented Nov 13, 2024 via email

@cuviper
Copy link
Member

cuviper commented Nov 14, 2024

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

@RalfJung
Copy link
Member Author

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...

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 15, 2024
…r=compiler-errors

check_consts: fix error requesting feature gate when that gate is not actually needed

When working on rust-lang/hashbrown#586 I noticed that the compiler asks for the `rustc_private` feature to be enabled if one forgets to set `rustc_const_stable_indirect` on a function -- but enabling `rustc_private` would not actually help. This fixes the diagnostics.

r? `@compiler-errors`
@RalfJung RalfJung deleted the rustc_const_stable_indirect branch November 16, 2024 14:37
@RalfJung
Copy link
Member Author

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
Copy link
Member Author

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

@Amanieu
Copy link
Member

Amanieu commented Nov 25, 2024

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants