Skip to content

Commit

Permalink
Remove namespace for keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Sep 10, 2018
1 parent fb945f0 commit 1a0e8f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/html/render.rs
Expand Up @@ -1827,8 +1827,8 @@ impl Context {
*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("::")
Expand Down
1 change: 1 addition & 0 deletions src/test/rustdoc/keyword.rs
Expand Up @@ -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
Expand Down

0 comments on commit 1a0e8f9

Please sign in to comment.