about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-01-05 13:26:26 -0800
committerAlex Crichton <alex@alexcrichton.com>2018-01-13 10:07:18 -0800
commit5f006cebfc5939195f6df6d1f50f02f079233928 (patch)
tree1005c357e535f4cb262041470959dd001a81d591 /src/rustllvm/RustWrapper.cpp
parente6072a7b3835f1875e81c9fd27799f9b20a0770c (diff)
downloadrust-5f006cebfc5939195f6df6d1f50f02f079233928.tar.gz
rust-5f006cebfc5939195f6df6d1f50f02f079233928.zip
rustc: Tweak `#[target_feature]` syntax
This is an implementation of the `#[target_feature]` syntax-related changes of
[RFC 2045][rfc]. Notably two changes have been implemented:

* The new syntax is `#[target_feature(enable = "..")]` instead of
  `#[target_feature = "+.."]`. The `enable` key is necessary instead of the `+`
  to indicate that a feature is being enabled, and a sub-list is used for
  possible expansion in the future. Additionally within this syntax the feature
  names being enabled are now whitelisted against a known set of target feature
  names that we know about.

* The `#[target_feature]` attribute can only be applied to unsafe functions. It
  was decided in the RFC that invoking an instruction possibly not defined for
  the current processor is undefined behavior, so to enable this feature for now
  it requires an `unsafe` intervention.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/2045-target-feature.md
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions