]> git.lizzy.rs Git - rust.git/blobdiff - src/test/rustdoc-ui/lint-missing-doc-code-example.rs
Rollup merge of #95352 - jyn514:full-relative-path, r=Mark-Simulacrum
[rust.git] / src / test / rustdoc-ui / lint-missing-doc-code-example.rs
index 41e8847792694635d97ecdfe1a6b70ff75ffb870..fac6342cd24b9e86da8152b50c1e574e7d9b4973 100644 (file)
@@ -70,6 +70,22 @@ pub union Union {
     b: f32,
 }
 
+// no code example and it's fine!
+impl Clone for Struct {
+    fn clone(&self) -> Self {
+        Self { field: self.field }
+    }
+}
+
+
+
+/// doc
+///
+/// ```
+/// println!("hello");
+/// ```
+#[derive(Clone)]
+pub struct NiceStruct;
 
 #[doc(hidden)]
 pub mod foo {