Skip to content

Commit 1a0e8f9

Browse files
Remove namespace for keywords
1 parent fb945f0 commit 1a0e8f9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/librustdoc/html/render.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1827,8 +1827,8 @@ impl Context {
18271827
*slot.borrow_mut() = self.current.clone();
18281828
});
18291829

1830-
let mut title = if it.is_primitive() {
1831-
// No need to include the namespace for primitive types
1830+
let mut title = if it.is_primitive() || it.is_keyword() {
1831+
// No need to include the namespace for primitive types and keywords
18321832
String::new()
18331833
} else {
18341834
self.current.join("::")

src/test/rustdoc/keyword.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// @has foo/index.html '//h2[@id="keywords"]' 'Keywords'
1616
// @has foo/index.html '//a[@href="keyword.match.html"]' 'match'
1717
// @has foo/keyword.match.html '//a[@class="keyword"]' 'match'
18+
// @has foo/keyword.match.html '//span[@class="in-band"]' 'Keyword match'
1819
// @has foo/keyword.match.html '//section[@id="main"]//div[@class="docblock"]//p' 'this is a test!'
1920
// @!has foo/index.html '//a/@href' 'foo/index.html'
2021
// @!has foo/foo/index.html

0 commit comments

Comments
 (0)