about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-11-20 03:05:11 +0000
committerbors <bors@rust-lang.org>2018-11-20 03:05:11 +0000
commit046e054a995c7b293e26968774ff88b38661cd3c (patch)
tree3d21348ad4e0a164bc827951733900f0e7ed867e /src/libsyntax
parent31fa30145e15d57a17de8029e8950c60d28d6c8f (diff)
parent9b8791179f116af912806ff79d101131d412df87 (diff)
downloadrust-046e054a995c7b293e26968774ff88b38661cd3c.tar.gz
rust-046e054a995c7b293e26968774ff88b38661cd3c.zip
Auto merge of #55983 - oli-obk:static_, r=Mark-Simulacrum
Fix stability hole with `static _`

The `underscore_const_names` only gated const items with `_` as the name.

`static _: () = ();` works on beta without feature gates right now, this PR fixes that.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 55652c481bd..a7c97feee49 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -1583,6 +1583,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
                 }
             }
 
+            ast::ItemKind::Static(..) |
             ast::ItemKind::Const(_,_) => {
                 if i.ident.name == "_" {
                     gate_feature_post!(&self, underscore_const_names, i.span,