forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustc: Forbid #[inline(always)] with #[target_feature]
Once a target feature is enabled for a function that means that it in general can't be inlined into other functions which don't have that target feature enabled. This can cause both safety and LLVM issues if we were to actually inline it, so `#[inline(always)]` both can't be respected and would be an error if we did so! Today LLVM doesn't inline functions with different `#[target_feature]` annotations, but it turns out that if one is tagged with `#[inline(always)]` it'll override this and cause scary LLVM error to arise! This commit fixes this issue by forbidding these two attributes to be used in conjunction with one another. cc rust-lang/stdarch#404
- Loading branch information
1 parent
9c9424d
commit 38d48ef
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters