Skip to content

Support boolean expressions in is_*_feature_detected! - #165619

Open
Kolgrim33 wants to merge 1 commit into
rust-lang:mainfrom
Kolgrim33:feature-detection-boolean-syntax-164651
Open

Kolgrim33 wants to merge 1 commit into
rust-lang:mainfrom
Kolgrim33:feature-detection-boolean-syntax-164651

Conversation

@Kolgrim33

@Kolgrim33 Kolgrim33 commented Nov 7, 2026 •

Copy link
Copy Markdown

Adds support for &&, ||, and parenthesized expressions in is_*_feature_detected! macros behind #![feature(feature_detection_boolean_syntax)], caching loaded CACHE slots across the expression to avoid duplicate atomic loads.

Tracking issue: #164651
ACP: rust-lang/libs-team#585

@rustbot

rustbot commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in std_detect

cc @Amanieu, @folkertdev, @sayantn

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 7, 2026
@rustbot

rustbot commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @ChrisDenton (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Please see the contribution instructions and our LLM policy for more information.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: libs
  • libs expanded to 38 candidates
  • Random selection from 6 candidates

@rust-log-analyzer

This comment has been minimized.

@Kolgrim33
Kolgrim33 force-pushed the feature-detection-boolean-syntax-164651 branch from 0875be1 to 4cbd359 Compare November 7, 2026 23:44
@ChrisDenton

ChrisDenton commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

This should probably at least be looked at by someone more familiar with std_detect than me. cc @folkertdev (chosen by a fair dice role)

I'm happy to review but I'll be winging it 😅

@Kolgrim33

Copy link
Copy Markdown
Author

This should probably at least be looked at by someone more familiar with std_detect than me. cc @folkertdev (chosen by a fair dice role)

I'm happy to review but I'll be winging it 😅

Thats cool🤣

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

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants