未验证 提交 6aed133e 编写于 作者: G Guillaume Gomez 提交者: GitHub

Rollup merge of #54097 - GuillaumeGomez:remove-keyword-namespace, r=QuietMisdreavus

rustdoc: Remove namespace for keywords

Fixes #54084.

r? @QuietMisdreavus
......@@ -1830,8 +1830,8 @@ fn render_item(&self,
*slot.borrow_mut() = self.current.clone();
});
let mut title = if it.is_primitive() {
// No need to include the namespace for primitive types
let mut title = if it.is_primitive() || it.is_keyword() {
// No need to include the namespace for primitive types and keywords
String::new()
} else {
self.current.join("::")
......
......@@ -15,6 +15,7 @@
// @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'
// @has foo/keyword.match.html '//span[@class="in-band"]' 'Keyword match'
// @has foo/keyword.match.html '//section[@id="main"]//div[@class="docblock"]//p' 'this is a test!'
// @!has foo/index.html '//a/@href' 'foo/index.html'
// @!has foo/foo/index.html
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册