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

Allow internal use of stdsimd from detect_feature #1321

Merged
merged 1 commit into from
Aug 22, 2022
Merged

Allow internal use of stdsimd from detect_feature #1321

merged 1 commit into from
Aug 22, 2022

Conversation

tmiasko
Copy link
Contributor

@tmiasko tmiasko commented Aug 13, 2022

This allows using feature detection macros, without placing a
requirement of enabled stdsimd feature gate from end users.

A follow-up to changes from #1311, which introduced the new macro.

Noticed while preparing a bump of stdarch submodule in the standard library.

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@Amanieu
Copy link
Member

Amanieu commented Aug 20, 2022

What exactly is this enabling? I'm concerned about accidentally stabilizing something we don't want to stabilize here.

@tmiasko
Copy link
Contributor Author

tmiasko commented Aug 21, 2022

This allows the macro to internally use stdsimd feature, without requiring
end users to enable it. This is necessary to use already stable macros, without
requiring stdsimd feature gate.

Note that this implementation strategy is in place since #1303, and this pull
request merely extends the existing approach to a new macro. I presumed this
implementation strategy was already "blessed".

This change surfaces the same stability concerns as #1303. It makes stdsimd
feature gate ineffective from within macros. The only reason this seems fine to
me, is that things happen to be organized such that the generated macro itself
requires stdsimd feature gate whenever more fine grained target features
require it.

This allows using feature detection macros, without placing a
requirement of enabled stdsimd feature gate from end users.

A follow-up to changes from #1311, which introduced the new macro.
@Amanieu Amanieu merged commit e169964 into rust-lang:master Aug 22, 2022
@tmiasko tmiasko deleted the allow-internal-unstable branch August 23, 2022 07:37
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