about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
-rw-r--r--src/libsyntax/feature_gate.rs17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index cd0fa184a09..1c6ee8acc94 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -102,6 +102,7 @@ pub struct Features {
     pub rustc_diagnostic_macros: bool,
     pub import_shadowing: bool,
     pub visible_private_types: bool,
+    pub quote: bool,
 }
 
 impl Features {
@@ -112,6 +113,7 @@ impl Features {
             rustc_diagnostic_macros: false,
             import_shadowing: false,
             visible_private_types: false,
+            quote: false,
         }
     }
 }
@@ -282,10 +284,6 @@ impl<'a, 'v> Visitor<'v> for Context<'a> {
     fn visit_mac(&mut self, macro: &ast::Mac) {
         let ast::MacInvocTT(ref path, _, _) = macro.node;
         let id = path.segments.last().unwrap().identifier;
-        let quotes = ["quote_tokens", "quote_expr", "quote_ty",
-                      "quote_item", "quote_pat", "quote_stmt"];
-        let msg = " is not stable enough for use and are subject to change";
-
 
         if id == token::str_to_ident("macro_rules") {
             self.gate_feature("macro_rules", path.span, "macro definitions are \
@@ -311,16 +309,6 @@ impl<'a, 'v> Visitor<'v> for Context<'a> {
             self.gate_feature("concat_idents", path.span, "`concat_idents` is not \
                 stable enough for use and is subject to change");
         }
-
-        else {
-            for &quote in quotes.iter() {
-                if id == token::str_to_ident(quote) {
-                  self.gate_feature("quote",
-                                    path.span,
-                                    format!("{}{}", quote, msg).as_slice());
-                }
-            }
-        }
     }
 
     fn visit_foreign_item(&mut self, i: &ast::ForeignItem) {
@@ -483,6 +471,7 @@ pub fn check_crate(span_handler: &SpanHandler, krate: &ast::Crate) -> (Features,
         rustc_diagnostic_macros: cx.has_feature("rustc_diagnostic_macros"),
         import_shadowing: cx.has_feature("import_shadowing"),
         visible_private_types: cx.has_feature("visible_private_types"),
+        quote: cx.has_feature("quote"),
     },
     unknown_features)
 }