Skip to content

Add unstable_rust_features attribute#3963

Open
FabianWolff wants to merge 2 commits intobazelbuild:mainfrom
FabianWolff:unstable_rust_features
Open

Add unstable_rust_features attribute#3963
FabianWolff wants to merge 2 commits intobazelbuild:mainfrom
FabianWolff:unstable_rust_features

Conversation

@FabianWolff
Copy link
Copy Markdown
Contributor

This attribute can be set to the label of a target that provides UnstableRustFeaturesInfo, which maps a label to a set of unstable features allowed for that label. The intent is to provide a way to centrally manage the use of unstable features, without having to use -Zallow-features= manually in rustc_flags for every affected target.

@FabianWolff FabianWolff force-pushed the unstable_rust_features branch 3 times, most recently from 968751a to 48e46b3 Compare April 14, 2026 14:26
@krasimirgg krasimirgg self-requested a review April 16, 2026 07:31
Copy link
Copy Markdown
Collaborator

@krasimirgg krasimirgg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add some tests. Since this requires nightly, testing is a bit awkward:

  1. You define a new "integration test" that itself has a top-level MODULE.bazel file where you register a nightly toolchain.
  2. Then you update the continuous testing definitions to add a new environment that uses that.
  3. The results should immediately show up in CI testing results for the PR.

See this PR that does something similar.

Comment thread rust/private/providers.bzl Outdated
Comment thread rust/private/rust.bzl
@FabianWolff FabianWolff force-pushed the unstable_rust_features branch 6 times, most recently from b5218ab to 8bb1119 Compare April 16, 2026 11:11
@FabianWolff FabianWolff requested a review from krasimirgg April 16, 2026 11:27
Comment thread rust/private/rust.bzl Outdated
@FabianWolff FabianWolff force-pushed the unstable_rust_features branch 2 times, most recently from 5c1c197 to 63e4702 Compare April 16, 2026 13:51
@FabianWolff FabianWolff requested a review from krasimirgg April 16, 2026 13:54
Comment thread test/integration/unstable_rust_features/.bazelrc
@FabianWolff FabianWolff force-pushed the unstable_rust_features branch from 63e4702 to 4440bb9 Compare April 16, 2026 14:01
@krasimirgg krasimirgg enabled auto-merge April 16, 2026 14:03
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.

2 participants