]> git.lizzy.rs Git - rust.git/commitdiff
Remove namespace for keywords
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 10 Sep 2018 09:27:21 +0000 (11:27 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 10 Sep 2018 09:27:21 +0000 (11:27 +0200)
src/librustdoc/html/render.rs
src/test/rustdoc/keyword.rs

index 972c2f0e15c5eb33ad63776bf453cb35e1b0536f..3dc55c5556b7f1f28a6a57de235849b4bfbcc31a 100644 (file)
@@ -1827,8 +1827,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("::")
index b255ffddafac87c6e443a2964ea1ebcd8ab095c4..73a026c581be55563a5e3ae4e01f35f5ef1a191f 100644 (file)
@@ -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