diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-11-03 20:28:20 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-11-09 17:50:51 +0300 |
| commit | 3a223a917378f439fd9107e26ee7355f5f92c62d (patch) | |
| tree | 973b335a5debf2e4be2791df7af0f85d666bd133 /src/libsyntax/feature_gate | |
| parent | 5a5027519a4a634baa6cde5b698b907d27fbe6b3 (diff) | |
| download | rust-3a223a917378f439fd9107e26ee7355f5f92c62d.tar.gz rust-3a223a917378f439fd9107e26ee7355f5f92c62d.zip | |
Support registering attributes and attribute tools using crate-level attributes
Diffstat (limited to 'src/libsyntax/feature_gate')
| -rw-r--r-- | src/libsyntax/feature_gate/active.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/feature_gate/builtin_attrs.rs | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate/active.rs b/src/libsyntax/feature_gate/active.rs index 1d198fca56b..087a754b27e 100644 --- a/src/libsyntax/feature_gate/active.rs +++ b/src/libsyntax/feature_gate/active.rs @@ -526,6 +526,12 @@ declare_features! ( /// Allows using the `efiapi` ABI. (active, abi_efiapi, "1.40.0", Some(65815), None), + /// Allows using the `#[register_attr]` attribute. + (active, register_attr, "1.41.0", Some(29642), None), + + /// Allows using the `#[register_attr]` attribute. + (active, register_tool, "1.41.0", Some(44690), None), + // ------------------------------------------------------------------------- // feature-group-end: actual feature gates // ------------------------------------------------------------------------- diff --git a/src/libsyntax/feature_gate/builtin_attrs.rs b/src/libsyntax/feature_gate/builtin_attrs.rs index b32a887c6b2..3e77b4cf495 100644 --- a/src/libsyntax/feature_gate/builtin_attrs.rs +++ b/src/libsyntax/feature_gate/builtin_attrs.rs @@ -329,6 +329,14 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ gated!(ffi_returns_twice, Whitelisted, template!(Word), experimental!(ffi_returns_twice)), gated!(track_caller, Whitelisted, template!(Word), experimental!(track_caller)), + gated!( + register_attr, Whitelisted, template!(List: "attr1, attr2, ..."), + experimental!(register_attr), + ), + gated!( + register_tool, Whitelisted, template!(List: "tool1, tool2, ..."), + experimental!(register_tool), + ), // ========================================================================== // Internal attributes: Stability, deprecation, and unsafe: |
