diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-09-10 11:27:21 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-09-10 11:27:21 +0200 |
| commit | 1a0e8f95f54195831fe681dc4e4f4fa97d96e20e (patch) | |
| tree | c604731d1b8505296aa0ba3ce7afd63d935e7097 /src | |
| parent | fb945f0ebba1a6d5d0f9d0b62dedacd6c828fff7 (diff) | |
| download | rust-1a0e8f95f54195831fe681dc4e4f4fa97d96e20e.tar.gz rust-1a0e8f95f54195831fe681dc4e4f4fa97d96e20e.zip | |
Remove namespace for keywords
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/render.rs | 4 | ||||
| -rw-r--r-- | src/test/rustdoc/keyword.rs | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 972c2f0e15c..3dc55c5556b 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -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("::") diff --git a/src/test/rustdoc/keyword.rs b/src/test/rustdoc/keyword.rs index b255ffddafa..73a026c581b 100644 --- a/src/test/rustdoc/keyword.rs +++ b/src/test/rustdoc/keyword.rs @@ -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 |
