Put doc keyword behind feature flag
This commit is contained in:
parent
f784d5ead2
commit
ded5c5a9ee
|
@ -316,6 +316,7 @@
|
||||||
#![cfg_attr(test, feature(update_panic_count))]
|
#![cfg_attr(test, feature(update_panic_count))]
|
||||||
#![cfg_attr(windows, feature(used))]
|
#![cfg_attr(windows, feature(used))]
|
||||||
#![feature(doc_alias)]
|
#![feature(doc_alias)]
|
||||||
|
#![feature(doc_keyword)]
|
||||||
#![feature(float_internals)]
|
#![feature(float_internals)]
|
||||||
#![feature(panic_info_message)]
|
#![feature(panic_info_message)]
|
||||||
#![cfg_attr(not(stage0), feature(panic_implementation))]
|
#![cfg_attr(not(stage0), feature(panic_implementation))]
|
||||||
|
|
|
@ -476,8 +476,12 @@ declare_features! (
|
||||||
// 'a: { break 'a; }
|
// 'a: { break 'a; }
|
||||||
(active, label_break_value, "1.28.0", Some(48594), None),
|
(active, label_break_value, "1.28.0", Some(48594), None),
|
||||||
|
|
||||||
|
|
||||||
// #[panic_implementation]
|
// #[panic_implementation]
|
||||||
(active, panic_implementation, "1.28.0", Some(44489), None),
|
(active, panic_implementation, "1.28.0", Some(44489), None),
|
||||||
|
|
||||||
|
// #[doc(keyword = "...")]
|
||||||
|
(active, doc_keyword, "1.28.0", Some(51315), None),
|
||||||
);
|
);
|
||||||
|
|
||||||
declare_features! (
|
declare_features! (
|
||||||
|
@ -1506,6 +1510,10 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
|
||||||
gate_feature_post!(&self, doc_alias, attr.span,
|
gate_feature_post!(&self, doc_alias, attr.span,
|
||||||
"#[doc(alias = \"...\")] is experimental"
|
"#[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"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
|
#![feature(doc_keyword)]
|
||||||
|
|
||||||
// @has foo/index.html '//h2[@id="keywords"]' 'Keywords'
|
// @has foo/index.html '//h2[@id="keywords"]' 'Keywords'
|
||||||
// @has foo/index.html '//a[@href="keyword.match.html"]' 'match'
|
// @has foo/index.html '//a[@href="keyword.match.html"]' 'match'
|
||||||
// @has foo/keyword.match.html '//a[@class="keyword"]' 'match'
|
// @has foo/keyword.match.html '//a[@class="keyword"]' 'match'
|
||||||
|
|
Loading…
Reference in New Issue