mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
Feature gate auto trait and ignore it in rustdoc
This commit is contained in:
@@ -481,7 +481,7 @@ pub fn visit_item(&mut self, item: &hir::Item,
|
||||
};
|
||||
om.constants.push(s);
|
||||
},
|
||||
hir::ItemTrait(unsafety, ref gen, ref b, ref item_ids) => {
|
||||
hir::ItemTrait(_, unsafety, ref gen, ref b, ref item_ids) => {
|
||||
let items = item_ids.iter()
|
||||
.map(|ti| self.cx.tcx.hir.trait_item(ti.id).clone())
|
||||
.collect();
|
||||
|
||||
@@ -1389,6 +1389,12 @@ fn visit_item(&mut self, i: &'a ast::Item) {
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user