about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorleonardo.yvens <leoyvens@gmail.com>2017-10-12 15:36:18 -0300
committerleonardo.yvens <leoyvens@gmail.com>2017-11-03 16:13:21 -0200
commit37dfc0c5982029ea0793699eead1d8ec4c5cef73 (patch)
tree6851b8f0f2602e1781e93abe0dd89f7a791814a4 /src/libsyntax
parent00be060daf3c38256e58360bfa591b8e22f60f7a (diff)
downloadrust-37dfc0c5982029ea0793699eead1d8ec4c5cef73.tar.gz
rust-37dfc0c5982029ea0793699eead1d8ec4c5cef73.zip
Feature gate `auto trait` and ignore it in rustdoc
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 83f5553a792..9aee2441a9d 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -1389,6 +1389,12 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
                 }
             }
 
+            ast::ItemKind::Trait(ast::IsAuto::Yes, ..) => {
+                gate_feature_post!(&self, optin_builtin_traits,
+                                   i.span,
+                                   "auto traits are experimental and possibly buggy");
+            }
+            
             ast::ItemKind::MacroDef(ast::MacroDef { legacy: false, .. }) => {
                 let msg = "`macro` is experimental";
                 gate_feature_post!(&self, decl_macro, i.span, msg);