Skip to content

Pass through -Zallow-features when unstable_rust_features_config is unset - #4373

Open
digit-google wants to merge 1 commit into
bazelbuild:mainfrom
digit-google:pass-through-toolchain-allow-features
Open

digit-google wants to merge 1 commit into
bazelbuild:mainfrom
digit-google:pass-through-toolchain-allow-features

Conversation

@digit-google

Copy link
Copy Markdown

When unstable_rust_features_config is None, -Zallow-features= flags in extra_rustc_flags and rust_flags were unconditionally stripped and dropped, silently disabling toolchain- or target-level unstable feature restrictions (such as -Zallow-features=).

Only extract -Zallow-features= flags when unstable_rust_features_config is configured, passing them through unchanged otherwise.

Fixes #4364

…nset

When `unstable_rust_features_config` is None, `-Zallow-features=` flags
in `extra_rustc_flags` and `rust_flags` were unconditionally stripped
and dropped, silently disabling toolchain- or target-level unstable
feature restrictions (such as `-Zallow-features=`).

Only extract `-Zallow-features=` flags when `unstable_rust_features_config`
is configured, passing them through unchanged otherwise.

Fixes bazelbuild#4364
@krasimirgg
krasimirgg self-requested a review November 4, 2026 12:09

This branch has not been deployed

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

rust_toolchain -Zallow-features= is silently dropped unless unstable_rust_features_config is set

2 participants