about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2018-01-24 11:50:30 +0530
committerManish Goregaokar <manishsmail@gmail.com>2018-01-29 11:41:03 +0530
commit540f95d9fad41a605e4c8b898d77f47374a76cbd (patch)
treef8b26690a103e16aec8df59b458e702700899fc7 /src/libsyntax/feature_gate.rs
parenta53bdc6212b9abf8538a877ebfde214120bf061f (diff)
downloadrust-540f95d9fad41a605e4c8b898d77f47374a76cbd.tar.gz
rust-540f95d9fad41a605e4c8b898d77f47374a76cbd.zip
Add internal-only rustc_serialize_exclude_null attribute for making the field only exist in the json if the flag is passed
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
-rw-r--r--src/libsyntax/feature_gate.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 9a2560b0458..3e523fca92a 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -788,6 +788,11 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
                                                        is just used for rustc unit tests \
                                                        and will never be stable",
                                                       cfg_fn!(rustc_attrs))),
+    ("rustc_serialize_exclude_null", Normal, Gated(Stability::Unstable,
+                                             "rustc_attrs",
+                                             "the `#[rustc_serialize_exclude_null]` attribute \
+                                              is an internal-only feature",
+                                             cfg_fn!(rustc_attrs))),
     ("rustc_synthetic", Whitelisted, Gated(Stability::Unstable,
                                                       "rustc_attrs",
                                                       "this attribute \