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

unsafe: check use of target_feature attribute #1711

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

snprajwal
Copy link
Contributor

The target_feature attribute is for conditional compilation and may or may not compile on all platforms. Using it requires an unsafe function or block.

Addresses #1411

@CohenArthur CohenArthur self-assigned this Jan 2, 2023
@CohenArthur CohenArthur added this to the Final upstream patches milestone Jan 2, 2023
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

This looks great! Thank you :D

Just waiting for you to add the comment and we'll merge this

gcc/rust/util/rust-attributes.cc Show resolved Hide resolved
The `target_feature` attribute is for conditional compilation and may or
may not compile on all platforms. Using it requires an unsafe function
or block.

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

Great stuff :) Thank you! I'll merge this soon

@CohenArthur
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 5, 2023

@bors bors bot merged commit 68b0212 into Rust-GCC:master Jan 5, 2023
@snprajwal snprajwal deleted the unsafe-targetfeature-attr branch December 1, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants