about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/json.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2020-08-19 22:44:58 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2020-08-20 17:42:17 +0200
commit6fb7e02a3688efa5f3eec4835ef9b5de50eb3c3c (patch)
tree9071416cad0dc24d36ec50ac6de5829d23bcc9e2 /src/test/rustdoc-ui/coverage/json.rs
parent3307ba8212a440e0f13a5dfdae57f2a24acdc025 (diff)
downloadrust-6fb7e02a3688efa5f3eec4835ef9b5de50eb3c3c.tar.gz
rust-6fb7e02a3688efa5f3eec4835ef9b5de50eb3c3c.zip
Update rustdoc coverage UI test
Diffstat (limited to 'src/test/rustdoc-ui/coverage/json.rs')
-rw-r--r--src/test/rustdoc-ui/coverage/json.rs40
1 files changed, 39 insertions, 1 deletions
diff --git a/src/test/rustdoc-ui/coverage/json.rs b/src/test/rustdoc-ui/coverage/json.rs
index 2bd6a312ab5..a591cd5dba4 100644
--- a/src/test/rustdoc-ui/coverage/json.rs
+++ b/src/test/rustdoc-ui/coverage/json.rs
@@ -12,16 +12,54 @@ pub mod foo {
 pub struct X;
 
 /// Bar
+///
+/// ```
+/// let x = 12;
+/// ```
 pub mod bar {
     /// bar
     pub struct Bar;
     /// X
-    pub enum X { Y }
+    pub enum X {
+        /// ```
+        /// let x = "should be ignored!";
+        /// ```
+        Y
+    }
 }
 
 /// yolo
+///
+/// ```text
+/// should not be counted as a code example!
+/// ```
 pub enum Yolo { X }
 
+impl Yolo {
+    /// ```
+    /// let x = "should be ignored!";
+    /// ```
+    pub const Const: u32 = 0;
+}
+
 pub struct Xo<T: Clone> {
+    /// ```
+    /// let x = "should be ignored!";
+    /// ```
     x: T,
 }
+
+/// ```
+/// let x = "should be ignored!";
+/// ```
+pub static StaticFoo: u32 = 0;
+
+/// ```
+/// let x = "should be ignored!";
+/// ```
+pub const ConstFoo: u32 = 0;
+
+/// ```
+/// let x = "should be ignored!";
+/// ```
+pub type TypeFoo = u32;