Put doc keyword behind feature flag

This commit is contained in:
Guillaume Gomez 2018-06-03 00:45:49 +02:00
parent f784d5ead2
commit ded5c5a9ee
3 changed files with 11 additions and 0 deletions

View File

@ -316,6 +316,7 @@
#![cfg_attr(test, feature(update_panic_count))]
#![cfg_attr(windows, feature(used))]
#![feature(doc_alias)]
#![feature(doc_keyword)]
#![feature(float_internals)]
#![feature(panic_info_message)]
#![cfg_attr(not(stage0), feature(panic_implementation))]

View File

@ -476,8 +476,12 @@ declare_features! (
// 'a: { break 'a; }
(active, label_break_value, "1.28.0", Some(48594), None),
// #[panic_implementation]
(active, panic_implementation, "1.28.0", Some(44489), None),
// #[doc(keyword = "...")]
(active, doc_keyword, "1.28.0", Some(51315), None),
);
declare_features! (
@ -1506,6 +1510,10 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
gate_feature_post!(&self, doc_alias, attr.span,
"#[doc(alias = \"...\")] is experimental"
);
} else if content.iter().any(|c| c.check_name("keyword")) {
gate_feature_post!(&self, doc_keyword, attr.span,
"#[doc(keyword = \"...\")] is experimental"
);
}
}
}

View File

@ -10,6 +10,8 @@
#![crate_name = "foo"]
#![feature(doc_keyword)]
// @has foo/index.html '//h2[@id="keywords"]' 'Keywords'
// @has foo/index.html '//a[@href="keyword.match.html"]' 'match'
// @has foo/keyword.match.html '//a[@class="keyword"]' 'match'