summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-05-13 12:23:43 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-05-13 12:40:12 +0530
commit22b720a920612211d83f7176d7cf2f184c74d294 (patch)
tree18801235b8eceefeec1a1a5c36f8ead482929301 /src/libsyntax
parent96e1cf3b0693e5724797abd566bd4913be4f6d79 (diff)
downloadrust-22b720a920612211d83f7176d7cf2f184c74d294.tar.gz
rust-22b720a920612211d83f7176d7cf2f184c74d294.zip
address more review comments
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index abb4ce15996..495f152d315 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -389,6 +389,8 @@ impl<'a> Context<'a> {
         for &(ref n, ref ty) in self.plugin_attributes.iter() {
             if &*n == name {
                 // Plugins can't gate attributes, so we don't check for it
+                // unlike the code above; we only use this loop to
+                // short-circuit to avoid the checks below
                 debug!("check_attribute: {:?} is registered by a plugin, {:?}", name, ty);
                 return;
             }
@@ -403,7 +405,10 @@ impl<'a> Context<'a> {
                               "attributes of the form `#[derive_*]` are reserved \
                                for the compiler");
         } else {
-            // Only do the custom attribute lint post-expansion
+            // Only run the custom attribute lint during regular
+            // feature gate checking. Macro gating runs
+            // before the plugin attributes are registered
+            // so we skip this then
             if !is_macro {
                 self.gate_feature("custom_attribute", attr.span,
                            &format!("The attribute `{}` is currently \