-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Consider limiting #[rustc_args_required_const(...)] to intrinsics. #70271
Copy link
Copy link
Closed
Labels
A-SIMDArea: SIMD (Single Instruction Multiple Data)Area: SIMD (Single Instruction Multiple Data)A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-SIMDArea: SIMD (Single Instruction Multiple Data)Area: SIMD (Single Instruction Multiple Data)A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I've just been made aware that functions like this exist: https://github.com/rust-lang/stdarch/blob/abe96ca3b87fcca6aa1dfcefd40d8c8d92d2e673/crates/core_arch/src/x86_64/avx2.rs#L28-L34
I was under the impression that
#[rustc_args_required_const(...)]would be used primarily for intrinsics (including the behind-rustc's-back imported LLVM intrinsics), and maybe unstable implementation details.At least right now I am uncomfortable letting
#[rustc_args_required_const(...)]proliferate any further, and would much prefer any stabilized library-defined functions that rely on the attribute, to become true intrinsics.Sadly, there are a few of them, so this won't be trivial.
cc @rust-lang/compiler