diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-09-29 08:12:51 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-09-29 08:12:51 -0700 |
| commit | 792e32bcfc121a64ce59664949cf4e5df71cf201 (patch) | |
| tree | 5637d17805b711816b8534efda5cb7976a6cd27c /src/libsyntax/feature_gate.rs | |
| parent | 757fa6ffbaea0c2ddfba31d6c5777f0a61722947 (diff) | |
| parent | fc1b908322a5a2ebf8aa599d7178accdd3cbaed9 (diff) | |
| download | rust-792e32bcfc121a64ce59664949cf4e5df71cf201.tar.gz rust-792e32bcfc121a64ce59664949cf4e5df71cf201.zip | |
rollup merge of #17576 : kmcallister/hide-quotes
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 17 |
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 "e 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) } |
