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

rustc: Tweak #[target_feature] syntax #47223

Merged
merged 2 commits into from
Jan 14, 2018

Commits on Jan 13, 2018

  1. 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
    alexcrichton committed Jan 13, 2018
    Configuration menu
    Copy the full SHA
    5f006ce View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2018

  1. rustc: Refactor attribute checking to operate on HIR

    This'll enable running queries that could be cached and overall be more amenable
    to the query infastructure.
    alexcrichton committed Jan 14, 2018
    Configuration menu
    Copy the full SHA
    0ecaa67 View commit details
    Browse the repository at this point in the history