]> git.lizzy.rs Git - rust.git/commit
syntax: Respect allow_internal_unstable in macros
authorAlex Crichton <alex@alexcrichton.com>
Wed, 16 Dec 2015 17:24:08 +0000 (09:24 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 22 Dec 2015 06:05:37 +0000 (22:05 -0800)
commit617a7af70400c7a3f82fafcb50daf01f01db95a0
tree7d6e3b7b770d47e2eb670d1e050c347852b310d7
parentb67b5a8d0149096712e75336f6aa32daffcaa42d
syntax: Respect allow_internal_unstable in macros

This change modifies the feature gating of special `#[cfg]` attributes to not
require a `#![feature]` directive in the crate-of-use if the source of the macro
was declared with `#[allow_internal_unstable]`. This enables the standard
library's macro for `thread_local!` to make use of the
`#[cfg(target_thread_local)]` attribute despite it being feature gated (e.g.
it's a hidden implementation detail).
src/librustc_driver/driver.rs
src/libsyntax/feature_gate.rs