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

Add #[rustc_args_required_const] annotations #319

Merged
merged 1 commit into from
Feb 11, 2018

Conversation

alexcrichton
Copy link
Member

Support isn't quite in nightly to make this work yet, but using a local build
this gets everything passing again! This also implements native verification
that we have the attribute in the right place

@alexcrichton alexcrichton requested a review from gnzlbg February 10, 2018 16:59
@alexcrichton
Copy link
Member Author

FWIW this is blocked on rust-lang/rust#48078 reaching nightlies

@@ -96,6 +96,7 @@ pub unsafe fn _mm256_or_ps(a: __m256, b: __m256) -> __m256 {
#[inline]
#[target_feature(enable = "avx")]
#[cfg_attr(test, assert_instr(vshufpd, imm8 = 0x1))]
#[rustc_args_required_const(2)]

Choose a reason for hiding this comment

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

It looks like supporting attributes attached directly to function parameters would help with cases like this.
*Adds it to the list of things to implement some time*

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed!

@alexcrichton alexcrichton force-pushed the const branch 3 times, most recently from e78e13a to a46b0d2 Compare February 11, 2018 16:08
Support isn't quite in nightly to make this work yet, but using a local build
this gets everything passing again! This also implements native verification
that we have the attribute in the right place
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